New to Kendo UI for jQuery? Start a free 30-day trial

DataSource

configuration

DataSource configuration or instance.

js
$("#sparkline").kendoSparkline({
    dataSource: {
        transport: {
             read: "spain-electricity.json"
        }
    },
    series: [{
        field: "value"
    }],
    categoryAxis: {
        field: "year"
    }
});

// Alternative configuration
var dataSource = new kendo.data.DataSource({
    transport: {
         read: "spain-electricity.json"
    }
});

$("#sparkline").kendoSparkline({
    dataSource: dataSource,
    series: [{
        field: "value"
    }],
    categoryAxis: {
        field: "year"
    }
});
Not finding the help you need?
Contact Support