Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
What it wrong when Kendo UI chart zooming event.
I debug in zoom event when I mousewheel in KendoChart e.delta is not working and always return 0 value.
Sample from Telerik can zoom in & zoom out e.delta return -3,-2,-1 or 1,2,3.
Anyone can suggest how to get e.delta value the same with following sample.

Kendo UI Pan and Zoom Example:
http://demos.telerik.com/kendo-ui/bar-charts/pan-and-zoom

My debug at dojo
http://dojo.telerik.com/oZAT

Thanks.
Posted

1 solution

I got the solution. Thanks James

JavaScript
function onZoom(e) {
        var delta = 0;
        if (e.originalEvent) {
            if (e.originalEvent.wheelDelta) e.delta = e.originalEvent.wheelDelta / -40;
            if (e.originalEvent.deltaY) e.delta = e.originalEvent.deltaY;
            if (e.originalEvent.detail) e.delta = e.originalEvent.detail;
        }
        delta = e.delta;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900