New to Telerik UI for ASP.NET MVC? Start a free 30-day trial
Plotting a Threshold Line in a DrillDown Series Chart
Environment
Product | Telerik UI for ASP.NET MVC Upload |
Progress Telerik UI for ASP.NET MVC version | Created with the 2023.3.1010 version |
Description
By design, the defined plot band in the DrillDown Chart will be visible on each view. How can I plot a threshold line only in the first series?
Solution
- Handle the
DrillDown
event of the Chart and remove theplotBands
settings from the initial Chart options. - Handle the
DrilldownSeriesFactory
event that triggers when the current drill-down level has changed and set back the plot bands when the level is0
.
Here is a sample implementation:
Razor
@(Html.Kendo().ChartBreadcrumb()
.Name("cb")
.Chart("chart")
)
@(Html.Kendo().Chart<ChartViewModel>()
.Name("chart")
...
.Events(ev => ev.DrilldownLevelChange("onDrilldownLevelChange").Drilldown("onDrillDown"))
)