xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
202 stars 46 forks source link

How to do a paged swipe? #129

Open mohzameer opened 2 years ago

mohzameer commented 2 years ago

How to set a paged swipe, so that dragging/swiping only scrolls for a week/month at a time? Reason for the Paged swipe is to have control of the values on the x-axis at the start and end of viewport to show like 'March 7 - 14'. In the absence of paged swipe, Is there an event that enables us to get the current viewport values based on the scrolled part of graph?

bekir-arkulpa commented 2 years ago

We build something similar, buttons to make a scrollable chart that has options for 1 day, 1 week and 1 month timeframe for one page/width. If you want i can send you a sample, at the end we did not use it and switched to native charting libraries because the performance was horrible with swiping.

mohzameer commented 2 years ago

Oh ok, thanks for the input. Native chart libraries, which ones?

bekir-arkulpa commented 2 years ago

For IOS https://github.com/danielgindi/Charts And for Android we used MPAndroidCharts. But we have Native Android and IOS Developers that helped us with the Native implementation. There is a tutorial in React Native docs to communicate and implement Native components.

SaeedZhiany commented 2 years ago

I guess react-native-charts-wrapper is the only native chart solution for RN projects. it wraps libraries mentioned in the above comment.