react-native-responsive-linechart icon indicating copy to clipboard operation
react-native-responsive-linechart copied to clipboard

How to do a paged swipe?

Open mohzameer opened this issue 3 years ago • 4 comments

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?

mohzameer avatar Nov 03 '21 14:11 mohzameer

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.

bekir-arkulpa avatar Nov 12 '21 20:11 bekir-arkulpa

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

mohzameer avatar Nov 13 '21 11:11 mohzameer

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.

bekir-arkulpa avatar Nov 13 '21 11:11 bekir-arkulpa

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

SaeedZhiany avatar Nov 13 '21 11:11 SaeedZhiany