drag
Fires as long as the user is dragging the chart using the mouse or swipe gestures.
Example - subscribe to the "drag" event during initialization
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: new Date("2023/1/1"), open: 100, high: 110, low: 95, close: 105 },
{ date: new Date("2023/1/2"), open: 105, high: 115, low: 100, close: 110 }
]
},
dateField: "date",
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}],
drag: function(e) {
console.log("Dragging", e.axisRanges);
}
});
</script>
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.originalEvent Object
The original user event that triggered the drag action.
e.sender kendo.dataviz.ui.StockChart
The widget instance which fired the event.
In this article