Hello,
I want to create a line chart and bind the data using JSON file. This is my code but it is not working.
$("#line-chart1").kendoChart({
theme: $(document).data("kendoSkin") || "BlueOpal",
legend: {
visible: false
},
dataSource: {
transport: {
read: {
url: "Myjsonfile",
dataType: "json"
}
}
},
seriesDefaults: {
type: "Line"
},
series: [{
currentField: "current",
targetField: "target"
}],
valueAxis: {
majorUnit: 8000
},
tooltip: {
visible: true,
shared: true,
format: "N0"
}
});
This is my json file
[{
"current": 800,
"target": 200
}]
Thanks.
I want to create a line chart and bind the data using JSON file. This is my code but it is not working.
$("#line-chart1").kendoChart({
theme: $(document).data("kendoSkin") || "BlueOpal",
legend: {
visible: false
},
dataSource: {
transport: {
read: {
url: "Myjsonfile",
dataType: "json"
}
}
},
seriesDefaults: {
type: "Line"
},
series: [{
currentField: "current",
targetField: "target"
}],
valueAxis: {
majorUnit: 8000
},
tooltip: {
visible: true,
shared: true,
format: "N0"
}
});
This is my json file
[{
"current": 800,
"target": 200
}]
Thanks.