Search code examples
kendo-uikendo-dataviz

KendoUI Line Chart Legend Series Toggle Broken


I'm using KendoUI version 2013.2.716 and I have a problem where whenever the series legend is toggled the shown lines mess up. After toggling one line to not be shown it is not possible to return to the state where all lines are shown. Would appreciate any help if there is a known solution for this. My line code is nothing special, but here it is anyway:

    function createLine(data, leaf) {
    var entity = leaf ? "#graphLeaf" : "#graph";
    $(entity).kendoChart({
        dataSource: {
            data: data
        },
        title: {
            text: "Stats"
        },
        legend: {
            position: "bottom"
        },
        seriesDefaults: {
            type: "line",
            missingValues: "gap"
        },
        series:
        [{
            field: "CountOne",
            name: "Count One"
        }, {
            field: "CountTwo",
            name: "Count Two"
        }],
        categoryAxis: {
            field: "DateNum",
            labels: {
                template: "#= convertDateNum(value) #"
            },
            minorUnit: 1
        },
        valueAxis: {
            min: 0,
            labels: {
                format: "{0:n0}"
            },
        },
        tooltip: {
            visible: true,
            format: "{0:n0}"
        },
        chartArea: {
            background: 'transparent'
        }
    });

Solution

  • The issue was due to using both the kendo web and kendo dataviz javascript files:

    • kendo.dataviz.min.js
    • kendo.web.min.js

    Changing to the kendo all file used on their own site, kendo.all.min.js, fixed the problem.