我在 GXT 应用程序中使用 highcharts。GXT折叠面板有2个图表,一个是柱形图,一个是饼图,总是弹出异常显示
(TypeError): c is undefined
fileName: http://127.0.0.1:8888/js/highcharts.js
lineNumber: 118
columnNumber: 0
为饼图注入json数据时(柱形图正常工作)。
有人可以帮我检查一下吗?
这是饼图的 JSON 数据
{
"title" : {
"text" : "pie chart"
},
"chart" : {
"type" : "pie",
"renderTo" : "container",
"events" : {
"load" : function(event) { this.id = 'chart320002'; $wnd.registerChart(this, true);}
}
},
"series" : [ {
"name" : "COUNT",
"data" : [ [ "A", 37 ], [ "B", 23 ], [ "C", 21 ], [ "D", 21 ], [ "E", 23 ], [ "F", 19 ], [ "G", 20 ] ]
} ],
"exporting" : {
"buttons" : {"printButton":{"enabled":false}},
"type" : "img/png",
"url" : "http://127.0.0.1:8888/export/hiChart"
},
"credits" : {
"enabled" : false
},
"plotOptions" : {
"pie" : {"dataLabels":{"formatter":function(){return this.point.name+': '+$wnd.Highcharts.numberFormat(this.percentage,2)+'%';}}}
},
"xAxis" : {
"title" : {
"text" : "Compliant"
}
},
"yAxis" : {
"title" : { }
}
}