New to Telerik UI for ASP.NET MVCStart a free 30-day trial

Plotting a Threshold Line in a DrillDown Series Chart

Environment

ProductTelerik UI for ASP.NET MVC Upload
Progress Telerik UI for ASP.NET MVC versionCreated 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

  1. Handle the DrillDown event of the Chart and remove the plotBands settings from the initial Chart options.
  2. Handle the DrilldownSeriesFactory event that triggers when the current drill-down level has changed and set back the plot bands when the level is 0.

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"))
)

More ASP.NET MVC DrillDown Chart Resources

See Also