Hi there,
I am just getting starting and I cant seem to make the line chart work when I bind it to a json file.
I followed your documentation and here is the code and attached the files:
function createChart() {
var dataSource = new kendo.data.DataSource({
transport: {
read: "sales.js",
dataType: "json"
}
});
$("#chart").kendoChart({
dataSource: dataSource,
theme: $(document).data("kendoSkin") || "BlueOpal",
legend: {
position: "top",
},
chartArea: {
background: "",
},
series: [{
field: "value",
}],
categoryAxis: {
field: "year",
}
});
}
sales.js file:
[ { "year": "2000", "value": 200 },
{ "year": "2001", "value": 450 },
{ "year": "2002", "value": 300 },
{ "year": "2003", "value": 125 },
]
Regards
Claudia
I am just getting starting and I cant seem to make the line chart work when I bind it to a json file.
I followed your documentation and here is the code and attached the files:
function createChart() {
var dataSource = new kendo.data.DataSource({
transport: {
read: "sales.js",
dataType: "json"
}
});
$("#chart").kendoChart({
dataSource: dataSource,
theme: $(document).data("kendoSkin") || "BlueOpal",
legend: {
position: "top",
},
chartArea: {
background: "",
},
series: [{
field: "value",
}],
categoryAxis: {
field: "year",
}
});
}
sales.js file:
[ { "year": "2000", "value": 200 },
{ "year": "2001", "value": 450 },
{ "year": "2002", "value": 300 },
{ "year": "2003", "value": 125 },
]
Regards
Claudia