Search code examples
javascriptkendo-datavizkendo-chart

Add a horizontal line to the chart


I have a requirement to have horizontal lines in Kendo Line Chart to denote maximum and minimum values as well as high limit and low limit.


Solution

  • Another solution would be to add plotbands.

    Example:

    <div id="chart"></div>
    <script>
    $("#chart").kendoChart({
        valueAxis:  {
            plotBands: [
                { from: 89, to: 90, color: "red" }
            ]
        }
    });
    </script>