Home Forums Chart Support Trigger reset zooming on wheel zooming Reply To: Trigger reset zooming on wheel zooming



You can reset the chart range programmatically by setting the viewportMinimum and viewportMaximum of x-axis to null inside the rangeChanged event handler as shown in the code snippet below –

rangeChanged: function(e) {
  if(e.trigger === "reset"){
    e.chart.options.axisX[0].viewportMinimum = null;
    e.chart.options.axisX[0].viewportMaximum = null;

Please take a look at this JSFiddle for complete working code.

Resetting zoom on click of reset button

Indranil Deo
Team CanvasJS