This is a migrated thread and some comments may be shown as answers.

JSON Format

1 Answer 56 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 10 Mar 2013, 02:45 AM
Can anybody tell me if this JSON is formatted incorrectly the dataSource isn't consuming it to create a chartl Thanks.

JSON:
{"customerSatisfactionChart":[{"KPIColumnName":"Time To Reach Qualified Tech","KPIColumnValue":3.579831},{"KPIColumnName":"Completeness Of Solution","KPIColumnValue":3.359243},{"KPIColumnName":"Opinion Of Overall Service","KPIColumnValue":3.720588},{"KPIColumnName":"Tech Ability And Prod Knowledge","KPIColumnValue":3.636554},{"KPIColumnName":"Time To Provide Solution","KPIColumnValue":3.285714},{"KPIColumnName":"Ease Of Requesting Help","KPIColumnValue":3.758403},{"KPIColumnName":"How Well Are You Kept Informed","KPIColumnValue":3.262605}]}


dataSource setup:

        dataSource: {
            transport: {
                read: {
                    url: '../Test/GetData',
                    dataType: "json"
                }
            }
        },
        schema: {
            data: "customerSatisfactionChart"
        },
        series: [{
            field: "KPITestColumnValue"
        }],
        categoryAxis: {
            field: "KPITestColumnName"
        },

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 11 Mar 2013, 10:52 AM
Hi Alexander,

I believe the observed issue is caused because the schema is part from the dataSource, not from the Chart's configuration. I.e. the correct syntax should be: 
dataSource: {
   transport: {
      read: {
         url: '../Test/GetData',
         dataType: "json"
      }
   },
   schema: {
      data: "customerSatisfactionChart"
   }
},
series: [{
     field: "KPIColumnValue"
 }],


Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Alexander
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or