Monday, March 19, 2012

Swipe and pinch now work with Dygraphs!

Check it! Swipe and pinch now work with Dygraphs!


Dan, inspired by his new iPad 3, did some weekend hacking and made pinch and zoom work in Dygraphs. This also worked on my Samsung Galaxy Nexus, although the new Chrome browser is much more responsive than the default one.

You can see this for yourself at http://dygraphs.com/tests/demo.html

10 comments:

  1. Really beautiful! very useful feature!
    Can you also use the slide from the desktop browser?
    I mean without using zoom, just slide.

    ReplyDelete
  2. Are you asking if you can just use the mouse to pan (swipe) without having to press the shift-key? The interactionModel option does that. See http://dygraphs.com/tests/interaction.html

    ReplyDelete
  3. How do you reset the zoom with the touch gestures? I tried to double tap, but that had no effect. It would be great to add the double click zoom reset for touch devices. Thanks for a great library!

    ReplyDelete
  4. What about completely disabling pan and zoom features. How do I do that?

    ReplyDelete
  5. =sasha= see the example at http://dygraphs.com/tests/interaction.html

    ReplyDelete
  6. I checked examples in interaction. I know now how to disable zoom and enable pan. Is it possible to pan only along x axis, and what I need to pass to Dygraph.movePan to achieve that?

    ReplyDelete
  7. Can we move this to the mailing list, please?

    ReplyDelete
  8. Although pinch pan zoom work in mobile view but selecting a specific data point on chart by touching it doesn't work with it in mobile view.

    If anyone has any work around or solution for selecting a specific data point on chart with pinch pan zoom for mobile browser please share.

    Thanks !

    ReplyDelete
    Replies
    1. Geekcoder, at this point stack overflow is your best place to go to get that answer.

      Delete