klhebs
Posts: 16
Joined: Thu Apr 01, 2021 8:24 am

panning will cause the chart empty

hi, i am having trouble on dealing with some setExtreme due to panning , the min and the max of the setExtreme is NaN causing the chart become out of range and point range to be NaN
how to prevent the setExtreme call trigger by the library to not have a min max value to be NaN
Capture.PNG
Capture.PNG (84.8 KiB) Viewed 443 times
image.png
image.png (6.77 KiB) Viewed 443 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: panning will cause the chart empty

Hello klhebs,

Thanks for contacting us with your question.

Please try to reproduce your issue in a form of a simplified live demo. You can start here:
https://jsfiddle.net/BlackLabel/qtrsf8jg/

Best regards!
Mateusz Bernacik
Highcharts Developer
klhebs
Posts: 16
Joined: Thu Apr 01, 2021 8:24 am

Re: panning will cause the chart empty

mateusz.b wrote: Wed Oct 06, 2021 11:34 am Hello klhebs,

Thanks for contacting us with your question.

Please try to reproduce your issue in a form of a simplified live demo. You can start here:
https://jsfiddle.net/BlackLabel/qtrsf8jg/

Best regards!
hi, I will try to repo the problem, however, my project is quite complicated. So while I trying to make a repo, I can briefly talk about when this will happen.
my chart will show different times of data of a stock like 1 min 3 min and year. The data is from the API call so each time I update the data I will change the range of the chart by setting the x-axis to ordinal and the chart allows users to pan to view the data. the problem here is when pending to the right-hand side( on mobile view) suppose the setExtremes event will not trigger but it does and setting the min and max to NaN. is there a quick work around or what should i return on the setExtremes event to make it ignore the NaN and remain the same
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: panning will cause the chart empty

Hi klhebs,

While you description has many details and for sure is helpful I need a reproduction of that issue. It can be simplified and you don't need to make any API calls, you can use static data. When it comes to calling setExtremes event on panning, you can't prevent it because that's basically what panning does - setting new extremes.

Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”