The problem is that I have code like that:
$(function(){
data = [
[1315522800001, 9],
[1317596400000, 3],
];
// Create the chart
window.chart = new Highcharts.StockChart({
chart : {
renderTo : 'container'
},
rangeSelector : {
selected : 1
},
title : {
text : 'AAPL Stock Price'
},
series : [{
name : 'AAPL',
data : data,
type : 'column',
tooltip: {
yDecimals: 2
},
dataGrouping: {
units: ['day', [1]]
}
}]
});
});
Which works fine. Displays nice two columns. Problem is that if I duplicate second line of data, so I will have:
[1315522800001, 9],
[1315522800001, 9],
[1317596400000, 3],
I don’t get expected result. What’s even worse browser eats all my RAM (tested on Opera and Firefox on Linux and Safari on Mac) and displays almost nothing.
My question is what am I doing wrong here? What I don’t know?
All more complex examples from website work, but I cannot seem to find any particular problem with my code.
The first value in the array is the time. You cannot have two values at the same time.
Look at this: http://jsfiddle.net/ndkKz/4/