未捕获的TypeError:无法在highcharts中读取未定义的属性“图表”

时间:2013-05-21 10:42:45

标签: extjs4 highcharts

当我尝试在extjs面板中添加高图时,我遇到了这个错误:

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

2 个答案:

答案 0 :(得分:0)

在chartConfig中定义图表配置:

chartConfig : {
    chart : {
        // ...
    },
    title : {
      text : '....',
      x : -20 //center
    },
    subtitle : {
      text : '....',
      x : -20
      },
      xAxis : [{

      //... and so on

看看这个example

答案 1 :(得分:0)

您可以在此网址http://www.highcharts.com/download

下载highchart.zip文件

在此zip文件中,highcharts.js中没有错误。

编辑: 您还可以使用http://code.highcharts.com

中的文件