Sets the rangeChanged Event handler for StockChart which is triggered after 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", { . . rangeChanged: function(e) { console.log("Source: "+ e.source + , "Minimum: "+ e.minimum, "Maximum: "+ e.maximum ) }, . . }); stockChart.render();
Event Object
e: { type, // event type - "rangeChanging" or "rangeChanged" source, // "chart", "buttons" , "inputFields", "navigator" index, // sets only if source is chart or buttons else null minimum, maximum, stockChart }