NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Scrolling chart on mobile devices

Hi.

Faced with such a problem as the chart scroll on mobile devices.
When scrolling the chart, it behaves strangely. Can not make it smooth, it jumps in chunks and is not convenient.

Is there any way to make scrolling like https://trade.metatrader5.com/terminal/ ?
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

Hi,

Thanks for the question.

1. What do you mean by "behaves strangely"?

2. I would have to open a trading account on this platform to see.

Could you please provide me with gifs showing:
- how your chart behaves during scroll currently
- how do you want your chart to behave during scroll (like in the link you've sent)

Then I'll look into it & try to help!

Best regards,
Jakub
Jakub
Highcharts Developer
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Hi.
Thanks for the reply.

This is how my chart is scrolling right now.
https://drive.google.com/file/d/1Tv8cDn ... share_link


And so it scrolls by example
https://drive.google.com/file/d/1mj_ux1 ... share_link
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

You're right!

It seems that it could be an issue with Highstock.

Could you please send me a short demo of your code?

It'll point us in the right direction to solve your problem.

Regards,
Jakub
Jakub
Highcharts Developer
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Here's a sample code like mine
https://jsfiddle.net/NeBox/s8rt13nL/10/

I've tried different settings - nothing works.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

Thanks!

Unfortunately, it seems to be a bug. I reported it here: https://github.com/highcharts/highcharts/issues/18498 where you can track its progress.

In the meantime, let me know if there's anything else I can help you with.

Regards,
Jakub
Jakub
Highcharts Developer
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Thanks.

If "ordinal: false" (as recommended on the githab)
dcsdv.png
dcsdv.png (16.62 KiB) Viewed 1355 times
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Ok, I checked with the ordinal option turned off - still the chart does not work correctly.
At the moment, stockchart for a mobile device - very important.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

Github issue:
Zoom problem is caused by ordinal option and can be prevented by simply setting ordinal to false: https://jsfiddle.net/BlackLabel/evnf3pa9/

Zoom problem is caused by the ordinal option, not the lagging panning. Unsmooth panning is a bug which needs to be fixed by our developers.

Regards,
Jakub
Jakub
Highcharts Developer
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Hi.

Is it possible to make a normal scrolling and zooming like here? https://jsfiddle.net/NeBox/c2fny68L/1/

There is a very smooth way to zoom and scroll with the mouse wheel.

It also works well on mobile.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

Hi,

Thanks!

You're right, this works very smoothly. That's what we're aiming for with Highcharts as well.

We've prioritized this and we're currently working on it.

In the meantime, did you try using a workaround presented by pawelfus on GitHub: https://github.com/highcharts/highcharts/issues/18498?

Maybe it'll help you for now.

Best regards,
Jakub
Jakub
Highcharts Developer
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Hi.

Yes, the workaround works, thank you. But sometimes it doesn't work correctly. I couldn't catch it to record the video.

What is the best solution for zooming on mobile and desktop? Not to press buttons, but to use touch and mouse?
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

Hi,

Unfortunately, this just needs to be solved in Highcharts Stock code. If this workaround does not work for you I don't think there's much right now that I could help with.

I can only tell you that our developers have prioritized this bug and are working on it.

Hopefully in the next release of Highcharts everything will work smoothly.

Best regards,
Jakub
Jakub
Highcharts Developer
NeBox
Posts: 41
Joined: Sun Feb 05, 2023 4:12 am

Re: Scrolling chart on mobile devices

Thank you, I'll be waiting)
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Scrolling chart on mobile devices

Great!

In the meantime do not hesitate to ask if you have any more questions.
Jakub
Highcharts Developer

Return to “Highcharts Stock”