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

stock chart wheel zoom option

we are using shiftKey for panning.. and its working nice. but is there a way we can use same key for mouse wheel zoom as well ? like while zooming with mouse wheel you need to hold down the shift Key ..

is there a way to do this ?

Thanks
jakub.j
Posts: 1084
Joined: Tue Jan 24, 2023 11:14 am

Re: stock chart wheel zoom option

Thanks for contacting us with your question!

Unfortunately, it is not possible to do that in Highcharts, but I prepared a custom solution for you, where you can do it using any key (in this case 'z' key). You can't do it with shift or ctrl because it may interrupt some of the default browser behaviors. Just remember, before you try it, click with mouse on the white window with the chart, unless it won't catch the keydown event.

Demo: https://jsfiddle.net/BlackLabel/4nhao85k/

Let me know if that was what you were looking for!
Best regards
Jakub
Jakub
Highcharts Developer
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: stock chart wheel zoom option

Thanks a lot for reply..

Return to “Highcharts Stock”