2

I am doing something similar to the HighCharts Lazy Loader example. It works, except that when I zoom into a region, I fetch higher resolution data and update via

chart.series[1].setData(data);

This resets the navigator range (extremes?) to the range of new incoming data. I am using almost everything that the lazy load example talks about, but no use.

navigator:{adaptToUpdatedData:false},
scrollbar:{liveRedraw:false}

Thanks.

3
  • 1
    Could you replicate your example as live demo ? Dec 31, 2014 at 10:59
  • The backend api returning async data is not public. Jan 2, 2015 at 3:09
  • Can't you just set the range again after you load?
    – Waxi
    Jan 2, 2015 at 3:11

3 Answers 3

2

Why do you use:

chart.series[1].setData(data);

I'm pretty sure there should be:

chart.series[0].setData(data);

Simply, if you have just one series on a chart, then series[0] -> your series, and series[1] is series in navigator. That's most probably reason why you get navigator updated, but you want to update series.

2
  • no, i have multiple series. that is not an issue. no matter which series I update, navigator extremes will always try to match the maximum xaxis length Jan 3, 2015 at 6:07
  • How do you add your series? Using addSeries() or when initializing chart? Anyway, as you have comment above, without live demo we can only guess what is wrong. Just make sure you didn't make any mistakes, when using this example.
    – Paweł Fus
    Jan 5, 2015 at 11:47
1

Try using setExtreme function in the callback of the lazyload. http://api.highcharts.com/highstock#xAxis.events.setExtremes

1
  • i have a callback at afterSetExtremes, but how to SET the new extremes. This is a callback, not a method to set extremes. Jan 7, 2015 at 7:32
1

I guess the only way to do this is to make the new data array match to the required range with empty values.

http://forums.highcharts.com/highstock-usage/any-way-to-force-x-axis-extremes-to-match-selected-timeframe-t31154/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.