Home forums Using CanvasJS avoid zoom during swipe

This topic contains 5 replies, has 2 voices, and was last updated by  blacktek 3 months, 4 weeks ago.

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

    blacktek
    Member

    Hello,
    I’ve a canvas with width=100%. Very often when I try to scroll the page on mobile by doing a vertical swipe then the chart zooms (because sometimes the swipe is not perfectly vertical).

    Would id be possible to avoid zooming while doing vertical swiping? to zoom usualy we make horizontal swiping.

    in graph option I’ve:

    zoomEnabled: true,
    zoomType: “x”,

    #19710

    blacktek
    Member

    sorry, please close this post. This issue seems to not happen with latest 2.01 GA release

    #19711

    Vishwas R
    Keymaster

    @blacktek,

    Whenever you move finger / pointer on the chart, the chart has to know if you are trying to scroll or interact with the chart. Hence we have implemented a behavior where if you hold the finger for a while on the chart, it captures the event and doesn’t scroll. On the other hand, if you move pointer / finger quickly without pausing, it allows you to scroll the page and chart won’t zoom / pan. Can you try as mentioned above and let us know your feedback!?


    Vishwas R
    Team CanvasJS

    #19715

    blacktek
    Member

    Hi Vishwas,
    yes it works as expected. Did you put some fix in the last version? in the past I remember it was working less well.

    Thank you!

    #19731

    Vishwas R
    Keymaster

    @blacktek,

    Yes, we have improved this behavior in v2.0.1.


    Vishwas R
    Team CanvasJS

    #19737

    blacktek
    Member

    The problem for me persists only with horizontal swipe that has the same gesture of x-zoom

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

You must be logged in to reply to this topic.