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

chart zoom and panKey

Tue Jul 18, 2023 7:17 pm

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
Posts: 519
Joined: Tue Jan 24, 2023 11:21 am

Re: chart zoom and panKey

Wed Jul 19, 2023 1:21 pm

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

Return to “Highcharts Stock”