zoom
Fires as long as the user is zooming the chart using the mousewheel.
Event Data
e.axisRanges Object
A hastable containing the suggested current range (min and max values) of named axes. The axis name is used as a key.
Note that the axis ranges are not updated automatically. You need to call set_options with either the suggested or custom min/max values for them to take effect.
e.delta Number
A number that indicates the zoom amount and direction.
A negative delta indicates "zoom in", while a positive "zoom out".
e.originalEvent Object
The original user event that triggered the zoom action.
This event can be used to prevent the default mousewheel action (scroll).
Example
js
function onZoom(e) {
// Prevent window scroll
e.originalEvent.preventDefault();
}
e.sender kendo.dataviz.ui.StockChart
The widget instance which fired the event.
The original user event that triggered the zoom action.
e.sender kendo.dataviz.ui.StockChart
The widget instance which fired the event.
Example
<div id="stockChart"></div>
<script>
$("#stockChart").kendoStockChart({
dateField: "date",
series: [{
field: "value",
data: [
{ date: new Date("2022/1/1"), value: 10 },
{ date: new Date("2022/1/2"), value: 15 },
{ date: new Date("2022/1/3"), value: 20 }
]
}],
zoomEnd: function(e) {
console.log("Zoom ended - final axis ranges:", e.axisRanges);
}
});
</script>
In this article