Home Forums Chart Support Programmatically panning chart while zoomed in

Programmatically panning chart while zoomed in

Viewing 2 posts - 1 through 2 (of 2 total)
  • #23265

    Can I programmatically pan the chart when the user has zoomed into a segment of the graph?

    I want to set it so if the user is panned to the latest part of the graph and then another data element gets added to the graph, that the viewport window automatically pans rightward.

    #23276

    @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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.