I have a web application, with tons of fully functional Highchart graphs.
I am trying to implement Highstock in a graph, but it is giving me a firebug error directly in the Highstock file:
this.labelBBox is undefined line 30 of Highstock.js
All my libraries are up to date (exactly the same as the demo versions online)
I cannot figure out why I am having this error, here is my code:
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
}]
});
}
My dataChart has this value:
[[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]]
Would anyone know why I am having this error ?
Thank you!
The problem was just that the order of the timestamps were in reverse (new to old). So I just reversed the array
dataChart
and that fixed it!