esnet / esnet/react-timeseries-charts

Added touch event support for graph panning

Open
#142 5 comments 4 reactions 1 assignee Claimed by @JulesAU View on GitHub
:sparkles: enhancement
Dominant language
JavaScript
Stars
876
Forks
279
PR merge metrics
No merged PRs in 30d

Description

Issue tracker probably not the best place for this; which is really just a discussion for some functionality I added to make these charts play nicely on touch devices and whether I should package them as a PR for inclusion in master.

I added [handlers for touchMove and touchEnd events](https://github.com/JulesAU/react-timeseries-charts/commit/8ae2ddd6a3c10cbbae6b8b21f9c4b8331a66a919) and disabled scroll wheel zoom to make the UX more intuitive on touch devices.

Also a hook for performance improvements with the [addition of a "onPanZoomEnd" event](https://github.com/JulesAU/react-timeseries-charts/commit/20531f75b8eca93ad036ea33f4d0e6b6e1b43100).

You can view a production demo of the code here:
https://fx.sycuse.com/visa-mastercard/

It's quite instructive to check it out both on desktop and a mobile device noting the difference in pan behaviour and absence of a mouse-hover tracker on mobile.

Feedback / opinions / comments?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.