jahnvi25
Posts: 292
Joined: Thu Oct 04, 2012 12:16 pm

chart zoom and panKey

Basically we want 'click + pan' default which can be done without any special button.. and zoomkey should be on 'shift' .. but it seems to be not working..
https://jsfiddle.net/iVestBl/vbd03noh/4/

we are looking for shift+ click (select the area) to zoom.. .and then click to do panning..
how can this possible ?

Thanks
jedrzej.r
Site Moderator
Posts: 761
Joined: Tue Jan 24, 2023 11:21 am

Re: chart zoom and panKey

Hi!

Unfortunately, for now it's not possible to achieve such behaviour, because when zooming and panning are both enabled, the zooming takes precedence over mouse actions, resulting in panning disabled by default. It can of course be enabled with panKey assigned and pressed, but it seems impossible to activate it without the key binding. There is an open issue on GitHub regarding this particular case, if you upvote and leave your feedback there, it might get implemented in the future: https://github.com/highcharts/highcharts/issues/16583. There you will also find a temporary workaround, that allows zooming only with a shift key pressed.

In case of any other questions, feel free to ask anytime.
Best regards!
Jędrzej Ruta
Highcharts Developer
jahnvi25
Posts: 292
Joined: Thu Oct 04, 2012 12:16 pm

Re: chart zoom and panKey

with latest version since zoomKey is deprecated.. can we use custom key to zoom and default should be panning ?

Thanks
andrzej.b
Site Moderator
Posts: 509
Joined: Mon Jul 15, 2024 12:34 pm

Re: chart zoom and panKey

Hi,

Nothing has changed, it's still not supported natively, and zoom takes precedence when enabled by default.

You can add a comment to the feature request to revive the discussion.

Kind regards,
Andrzej
Highcharts Developer

Return to “Highcharts Stock”