Hi, I have json data coming back correctly (can see it in fiddler) but I'm not sure how to bind it to kendo charts correctly.
This is how the data is formatted:
[{"Question":"lorem ipsum....?","OptionTitles":["Branch Office 2","Head office"],"OptionCounts":[1,1]}]
The data I want to use for the chart is the option titles for categories and the option counts as the bar/column display.
The example below is of a bar chart, currently there are no bars and the y axis displays [object Object], maybe I need to drill into the json somehow?
My chart:
$("#chartBar").kendoChart({
theme: "metro",
dataSource: {
transport: {
read: {
url: 'urltodata',
dataType: 'json'
}
}
},
series: [{ name: "Stuff", type: "bar", field: "OptionCounts" }],
categoryAxis: [{ field: "OptionTitles" }],
line: { visible: false },
tooltip: { visible: true, format: "{0:00}%" },
legend: { position: "bottom" }
});
Many thanks!
This is how the data is formatted:
[{"Question":"lorem ipsum....?","OptionTitles":["Branch Office 2","Head office"],"OptionCounts":[1,1]}]
The data I want to use for the chart is the option titles for categories and the option counts as the bar/column display.
The example below is of a bar chart, currently there are no bars and the y axis displays [object Object], maybe I need to drill into the json somehow?
My chart:
$("#chartBar").kendoChart({
theme: "metro",
dataSource: {
transport: {
read: {
url: 'urltodata',
dataType: 'json'
}
}
},
series: [{ name: "Stuff", type: "bar", field: "OptionCounts" }],
categoryAxis: [{ field: "OptionTitles" }],
line: { visible: false },
tooltip: { visible: true, format: "{0:00}%" },
legend: { position: "bottom" }
});
Many thanks!