How can I disable the zoom function of the StockChart mouse wheel

1 Answer 431 Views
Charts
Steve
Top achievements
Rank 1
Iron
Iron
Steve asked on 04 Aug 2022, 10:17 AM
When using StockChart, when I want to use the mouse wheel to slide down the page, it will automatically adjust the range of the navigator. and I can't find how to disable this feature.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vessy
Telerik team
answered on 08 Aug 2022, 09:43 AM

Hello Steve,

By design, when the mouse is positioned above the chart, the scrolling is used to change the range of the navigator. You will need to place the mouse pointer outside the chart in order to be able to scroll the page. You can see a video demonstrating this behavior here: 

In case you want to disable the navigator-range-changing functionality at all, you can do it by setting the `mousewheel` prop of the Navigator:

Regards,
Vessy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Steve
Top achievements
Rank 1
Iron
Iron
commented on 10 Aug 2022, 02:15 AM

Hi Vessy,

I also found the property in the documentation and use it in my project, but the chart is still controllable with the mouse wheel.
I added mousewheel={false} to ChartNavigatorSelect in this demo(jolly-platform-4y2uu3 - CodeSandbox), you can find that he can still change the range through wheel. so I'm confuse about how to disable `mousewheel` in StockChart.

Thanks
Steve

Vessy
Telerik team
commented on 11 Aug 2022, 07:52 PM

Hi Steve, 

Thank you for the provided sample - I will discuss this behavior with the KendoReact developers and will get back to you with a possible workaround (if any).

Vessy
Telerik team
commented on 17 Aug 2022, 08:11 AM

Thank you for your patience, Steve.

In order to disable the Navigator selection fully, you will need to cancel the `ZoomStart` event of the whole chart as well, along with the disabled ChartNavigatorSelect `mousewheel` prop.

You can see a sample demonstrating that here:

https://codesandbox.io/s/happy-shadow-5mgsku?file=/app/main.tsx

Steve
Top achievements
Rank 1
Iron
Iron
commented on 17 Aug 2022, 08:42 AM

woo, It‘s useful, thanks for your help. have a good day!
Vessy
Telerik team
commented on 17 Aug 2022, 10:28 AM

You are welcome, Steve - have a good day too! :)
Tags
Charts
Asked by
Steve
Top achievements
Rank 1
Iron
Iron
Answers by
Vessy
Telerik team
Share this question
or