This is a migrated thread and some comments may be shown as answers.

[Solved] Line chart High/Low lines not showing for single point(X axis).

0 Answers 23 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sohil
Top achievements
Rank 1
Sohil asked on 07 Sep 2012, 06:20 AM
Hi,
I am using telerik line chart in my application, i want to show High/Low Lines in the graph.
For multiple records for X axis it shows but for only single data for X axis, it just shows the single points for High/Low instead of lines.
please give me some suggestions to display both the lines.So basically, even for a single plot on the X asis I would still need 2 lines to show the High and Low for that point.

Code:


@Html.Telerik().Chart(Model).Name(
"MyChart").Legend(false).DataBinding(databind => databind.Ajax().Select("PatientVitalGraphAjaxCall", "PatientVital", new { patientID = ViewBag.PatientID })).SeriesDefaults(series => { series.Line(); }).Series(series =>
                                                  {
                                                      series.Line(m => m.ActualValue).Color("#787878").Markers(true).Width(1.1).MissingValues(ChartLineMissingValues.Interpolate);
                                                      series.Line(m => m.HighValue).Color("#f18289").Markers(true).Width(1.1);
                                                      series.Line(m => m.LowValue).Color("#f9c77e").Markers(true).Width(1.1);
                                                      series.Line(m => m.ActualValueBP).Color("#787878").Markers(true).Width(1.1).Opacity(0).MissingValues(ChartLineMissingValues.Interpolate);
                                                      series.Line(m => m.HighValueBP).Color("#f18289").Markers(false).Width(1.1).Opacity(0);
                                                      series.Line(m => m.LowValueBP).Color("#f9c77e").Markers(false).Width(1.1).Opacity(0);
                                                  }).ClientEvents(events => events.OnDataBound("onDataBound")).CategoryAxis(axis => axis.Categories(s => s.VisitDate)).Tooltip(tooltip => tooltip.Visible(true).Format("{0:#.#}")).HtmlAttributes(new { style = "height:263px; width:639px;" })

Please advise.

Thanks,
Sohil

Tags
Chart
Asked by
Sohil
Top achievements
Rank 1
Share this question
or