我在尝试在extjs面板中添加highchart时遇到此错误:
Uncaught TypeError: Cannot read property 'chart' of undefined in highchart.js
testing.js
var chartObject = new Chart.ux.HighChart({
chart: {
type: 'bar'
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['Apples', 'Bananas', 'Oranges']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: 'Jane',
data: [1, 0, 4]
}, {
name: 'John',
data: [5, 7, 3]
}]
});
error on highchart.js:275
https://github.com/JoeKuan/Highcharts_ExtJs_4/blob/master/Chart/ux/HighChart.js
最佳答案
在chartConfig中定义图表配置:
chartConfig : {
chart : {
// ...
},
title : {
text : '....',
x : -20 //center
},
subtitle : {
text : '....',
x : -20
},
xAxis : [{
//... and so on
看这个example。
关于extjs4 - 未捕获的TypeError:无法读取highcharts中未定义的属性“chart”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16668047/