Home forums Chart Support Detect when hit the left side on pan

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32357

    Hi good day!

    It’s actually possible to detect when we hit the left side on panning?

    For example, i have my chart with x values from 0 to 100, i made zoom in 50 to 70 range, imm panning to left side, its posible show an alert when i cannot pan more to the left?

    #32374

    @davidaxel121,

    You can determine the left extreme of axis by comparing the minimum with viewportMinimum of axisX. Please take a look at this JSFiddle for an example.

    ___________
    Indranil Deo
    Team CanvasJS

    #32375

    Thanks Indranil! This is what i was looking for

    #32376

    How to apply this if i have more than one chart?

    #32377

    And how to apply this if we have dates in axis X?

    #32387

    @davidaxel121,

    How to apply this if i have more than one chart?

    As shown in the shared JSFiddle, comparing viewportMinimum & minimum within rangeChanging event of the chart works for particular chart. Passing rangeChanging within options of all the charts where you like to check this logic should work fine.

    And how to apply this if we have dates in axis X?

    Comparing viewportMinimum & minimum within rangeChanging works fine irrespective of numeric or date-time axis.

    ___________
    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.