Search code examples
kendo-uikendo-chart

Customize Kendo Line chart?


] kendo line chart customization

Can I achieve the chart like the above with kendo? The idea is the "line" and "Longdash" type in one line.

Any help/suggestion would be very much appreciated.


Solution

  • You could have separate series for the dashed lines and hide them from legend:

    series: [{
        name: "India",
        data: [3.907, 7.943, 7.848, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, null]
    },{
        name: "World",
        data: [1.988, 2.733, 3.994, 3.464, 4.001, 3.939, 1.333, -2.245, 4.339, null]
    },{
        name: "India-predict",
        data: [null, null, null, null, null, null, null, null, 9.552, 10.855],
        dashType: "dash",
        visibleInLegend: false,
        color: "red"
    },{
        name: "World-predict",
        data: [null, null, null, null, null, null, null, null,  4.339, 5.727],
        dashType: "dash",
        visibleInLegend: false,
        color: "red"
    }],
    

    DEMO