Highstock图表错误:this.labelBBox未定义第30行
我有一个Web应用程序,有大量function齐全的Highchart图表。
我试图在图表中实现Highstock,但它直接在Highstock文件中给我一个firebug错误:
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 }] }); }
我的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]]
有谁知道为什么我有这个错误?
谢谢!
问题只是时间戳的顺序是反向的(新旧)。 所以我只是颠倒了数组dataChart
并修复了它!