Highstock图表错误:this.labelBBox未定义线30(Highstock chart

2019-10-16 16:41发布

我有一个Web应用程序,以吨全功能Highchart图形。
我试图在图形中实现Highstock,但它是直接给我一个萤火误差在Highstock文件:

this.labelBBox is undefined line 30 of Highstock.js

我所有的库是最新(完全一样的演示版本在线)
我想不通,为什么我有这个错误,这里是我的代码:

function generateChart10(id, dataChart, currencies){
    // create the chart
    chart = new Highcharts.StockChart({
        chart : {
            renderTo : id,
            marginLeft: 15,
            borderColor: '#FFFFFF'
        },           
        rangeSelector : {
            enabled: false
        },
        navigator : {
            enabled: false
        },
        scrollbar : {
            enabled: false  
        },

        title : {
            text : ''
        },

        series : [{
            type : 'candlestick',
            name : currencies,
            data : dataChart
        }]
    });
}

我的数据图表有这个值:

[[1336507200000,0.9996,1.0063,0.9989,1.0022],[1336420800000,0.9924,1.0022,0.9924,0.9996],[1336334400000,0.9981,0.9986,0.9921,0.9926],[1336075200000,0.9879,0.9963,0.9861,0.9956],[ 1335988800000,0.9867,0.9892,0.9828,0.9879],[1335902400000,0.9856,0.9903,0.9849,0.9867],[1335816000000,0.9877,0.9897,0.9832,0.9857],[1335729600000,0.981,0.9894,0.9804,0.9877],[1335470400000, 0.9858,0.987,0.98,0.9801],[1335384000000,0.9826,0.9865,0.9805,0.9858]]

为什么我有这个错误会有人知道吗?

谢谢!

Answer 1:

问题是刚才那个时间戳的顺序是相反的(新老)。 所以,我只是颠倒了数组dataChart ,并且定了!



文章来源: Highstock charts error: this.labelBBox is undefined line 30