Question

I have used kendo charts to display data, but now i want to read the json that i've used before to set datasource. Unfortunately i am not able to get it to work, can anyone help me with, how to read the data(json) from kendochart.

I used this $("#OneMileChartMaleAge").data("kendoChart") but it doesn't displays the json that i had used previously to bind with the datasource. I need to read the json that i've used previously to bind the datasource.

Please point me in right direction.

Was it helpful?

Solution

After digging into the kendo javascript, i was able to successfully retrieve the json data that i had used before to bind the chart.

$("#OneMilePieChartMaleAge").data("kendoChart").options.series[0].data

The above line of code will return back the json that we have used before to bind the data, OneMilePieChartMaleAge is my div id.

I've checked the above code for both bar and pie chart of kendo. I hope this helps. Happy coding. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top