supershwa
Posts: 2
Joined: Tue Jan 18, 2022 7:35 pm

Stock chart zoom/pinch bug with ordinal true and flags series

Tue Jan 18, 2022 7:56 pm

Hello,

I've discovered a bit of a bug that is frustrating me. I've been able to troubleshoot and recreate a (not) working example.

With the stock chart, the zoomType: 'x' feature behaves erratically when the xAxis ordinal is set to true, and I include a 'flags' series. This behavior gets even worse the more flags series I include in the chart. When I try to zoom in (in this example, try zooming more than once), the zoom will eventually only go to the last point in the series even though I've selected a range of 1 month or so.

To reproduce the issue, use this Fiddle: https://jsfiddle.net/59nsbe0a/

Zoom a few time by dragging a range on the x axis - select a range of about a week or two, and eventually it will only display one OHLC bar. If I click the "6m" zoom button, then try to select ANY range within 6 months, the problem persists and it only shows 1 bar.

If I remove the flag series completely, there is no issue: https://jsfiddle.net/59nsbe0a/2/

If I leave the flag series, and set the xAxis ordinal to false, there is no issue except for the gaps from weekends/holidays: https://jsfiddle.net/59nsbe0a/3/

If I add another 'flags' series, the zooming issue gets even worse: https://jsfiddle.net/59nsbe0a/4/

So somewhere there is an issue between the xAxis ordinal and the 'flags' series type causing the click-and-drag or pinch (on mobile) zoom to fail.

Any thoughts as to how I can fix this? Thanks in advance.

magdalena
Posts: 514
Joined: Tue Aug 24, 2021 1:32 pm

Re: Stock chart zoom/pinch bug with ordinal true and flags series

Thu Jan 20, 2022 12:38 pm

Hi supershwa,

Welcome to our forum and thanks for contacting us with your question!

It seems to be a bug related with the fixes panning with ordinal axis at 9.1.2 version
https://www.highcharts.com/blog/changel ... ock-v9.1.2

At this moment you can use the working 9.1.1 version:
https://jsfiddle.net/BlackLabel/52ad9pmu/

I'm about to report this on our GitHub issues tracker, I'll edit this post soon with a GitHub ticket URL.

EDIT: reported bug: https://github.com/highcharts/highcharts/issues/16912

Let me know if you have any further questions,
Regards!
Magdalena Gut
Highcharts support engineer

supershwa
Posts: 2
Joined: Tue Jan 18, 2022 7:35 pm

Re: Stock chart zoom/pinch bug with ordinal true and flags series

Thu Jan 20, 2022 3:55 pm

Thank you - I rolled back from 9.3.1 to 9.1.1 and everything is working smoothly now!

magdalena
Posts: 514
Joined: Tue Aug 24, 2021 1:32 pm

Re: Stock chart zoom/pinch bug with ordinal true and flags series

Mon Jan 24, 2022 11:15 am

You're welcome!

I've reported a bug, which you can track here: https://github.com/highcharts/highcharts/issues/16912

In case of any further questions, feel free to contact us again,
Regards!
Magdalena Gut
Highcharts support engineer

Return to “Highcharts Stock”