gpt4 book ai didi

extjs4 - 未捕获的类型错误 : Cannot read property 'chart' of undefined in highcharts

转载 作者:行者123 更新时间:2023-12-02 19:28:15 24 4
gpt4 key购买 nike

当我尝试在 extjs 面板中添加 highchart 时遇到此错误:

Uncaught TypeError: Cannot read property 'chart' of undefined  in highchart.js 

测试.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]
}]

});

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 - 未捕获的类型错误 : Cannot read property 'chart' of undefined in highcharts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16668047/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com