ivan.trickovic
Posts: 3
Joined: Mon Oct 03, 2022 12:14 pm

Zone color change on finger move on mobile

I'm trying to implement zone color change and series line color change on finger move on mobile. But it's laggy, for example, if the movement starts from the line series it won't change color or move from a point. If movement starts below or above the series line everything works as expected. Is this expected behavior?

I'm posting a live example just switch to responsive mode on the browser:
https://angular-ivy-xbwzsj.stackblitz.io/

And implementation:
https://stackblitz.com/edit/angular-ivy ... mponent.ts
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Zone color change on finger move on mobile

Hello,

Welcome to our forum and thanks for contacting us with your question!
Is this expected behavior?
This is because when updating zones on the chart and on mobile devices, the touch (reference to the point) is lost and the touch tracking is disabled. I managed to get around this and instead of updating zones while mouseOver modifies the attributes of the SVG element and when it stops hovering over the series, zones is updated.

Demo: https://jsfiddle.net/BlackLabel/qmxarsy2/

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
ivan.trickovic
Posts: 3
Joined: Mon Oct 03, 2022 12:14 pm

Re: Zone color change on finger move on mobile

Thanks, this solved my issue
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Zone color change on finger move on mobile

That's great to hear! In case of any further questions, feel free to contact us again.

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Stock”