Your documentation implies that this should work, but it doesn't. How do I use a local shared data source that allows multiple charts and grids to sort the same data?
If I get the data source from an XML file, it works, but not from a local JS array.
var salesData = [{
employee: "Joe Smith",
sales: 2000
}, {
employee: "Jane Smith",
sales: 2250
}, {
employee: "Will Roberts",
sales: 1550
}];
var localDataSource = new kendo.data.DataSource({ data: salesData });
$(document).ready(function () {
$("#test").kendoChart({
title: {
text: "Employee Sales"
},
dataSource: {
data: localDataSource
},
series: [{
type: "line",
field: "sales",
name: "Sales in Units"
}],
categoryAxis: {
field: "employee"
}
});
});
If I get the data source from an XML file, it works, but not from a local JS array.
var salesData = [{
employee: "Joe Smith",
sales: 2000
}, {
employee: "Jane Smith",
sales: 2250
}, {
employee: "Will Roberts",
sales: 1550
}];
var localDataSource = new kendo.data.DataSource({ data: salesData });
$(document).ready(function () {
$("#test").kendoChart({
title: {
text: "Employee Sales"
},
dataSource: {
data: localDataSource
},
series: [{
type: "line",
field: "sales",
name: "Sales in Units"
}],
categoryAxis: {
field: "employee"
}
});
});