I\'m trying to combine lazy loading with dynamically updated data in Highstock. The idea is to have a large historical down-to-the-minute chart (with millions of data points) wh
I had this problem too, and after trying many solutions, I got one that really worked for me.
I used a global variable that contains the max value of xAxis
and when I update the chart I verify if the new xAxis
value is bigger then the maxX
variable.
If it's true then I update the maxX
with the new point and then I use the chart.xAxis.setExtremes (chart.xAxis.min, maxX);
and after this I redraw the chart.
With these two things the chart will simulate the lazy loading with dynamic data, but another problem came through: the range selector and the navigator weren't updating. The solution was:
chart.rangeSelector.buttons[0].setState(2);
chart.rangeSelector.clickButton(0,0,true);
These two lines enable the range selector again and everything became ok.