Sets the rangeChanging Event handler for StockChart. rangeChanging is triggered before the range of StockChart is changed / updated upon zooming / panning through slider or through charts or by selecting the range buttons or by changing the value in the inputfields of range selector.
When event is triggered, a parameter that contains event related data is passed to the assigned event handler. Parameter includes source, minimum and maximum value corresponding to the event.
var stockChart = new CanvasJS.StockChart("container",
{
.
.
rangeChanging: function(e) {
console.log("Source: "+ e.source + ,
"Minimum: "+ e.minimum,
"Maximum: "+ e.maximum )
},
.
.
});
stockChart.render();
Event Object
e: {
source, // "chart", "buttons" , "inputFields", "navigator"
index, // sets only if source is chart or buttons else null
minimum,
maximum,
stockChart
}
Also See: