Home forums Using CanvasJS Programmatically panning chart while zoomed in Reply To: Programmatically panning chart while zoomed in

#23276

Vishwas R
Keymaster

@robertlight,

You can programmatically zoom / pan to a region by setting viewportMinimum and viewportMaximum. In your case, you can set viewportMaximum to null (which resets the viewportMaximum) when user has zoomed / panned towards the latest dataPoint (latest part of the chart) using rangeChanged event. Please take a look at this JSFiddle.


Vishwas R
Team CanvasJS