You must be logged in to post your query.
Home › Forums › Chart Support › Detect when hit the left side on pan
Tagged: Pan, zoom
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?
@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
Thanks Indranil! This is what i was looking for
How to apply this if i have more than one chart?
And how to apply this if we have dates in axis X?
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.
Comparing viewportMinimum & minimum within rangeChanging works fine irrespective of numeric or date-time axis.
You must be logged in to reply to this topic. Login/Register