json - Kendoui databind with Jquery datasource not working -


hi i'm trying bind data kendochart, no bars appearing on chart. if url in web browser, following string returned.

[{"areaname":"rondebosch","numberofincidents":2}, {"areaname":"claremont","numberofincidents":2}, {"areaname":"athlone","numberofincidents":2}] 

the code follows

var reports = {};     $.ajax({         url: "home/getincidentperarea",         async: false,         datatype: 'json',         success: function (json) {             reports = json;             $("#chart").kendochart({ title: { text: "incidents per area" },                 datasource: {                     data: reports                 },                 series: [{ name: "incidents per area", field:"numberofincidents"}]         });     } }); 

please help...

the datasource option spelled in camel case.

in addition, data source can request data directly:

datasource: {     transport: {         read: "home/getincidentperarea"     } } 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -