react-native-gifted-charts
react-native-gifted-charts copied to clipboard
Scroll the chart with fixed pointer in the middle
Hello,
Is it possible to do this behavior using gifted-charts ??
The chart is scrollable and a pointer that is fixed in the middle of the chart shows the data that is pointed to it.
The chart start like this:
and when scrolling goes like this:
Please any tips! been trying libraries for 3 days and so far gifted charts is the best in term of UX
Hello @Abhinandan-Kushwaha Can you please give me tips on how to do this behavior. I have integrate the library locally and start making changes to do this but its a little bit complicated for me.
java.lang.Double cannot be cast to com.facebook.react.bridge.readableMap
After 2 weeks of hard work i was able to do this behavior using your library I had to eliminate a lot of code to understand how it works. Just one thing still missing is making the height of pointer smooth cause now it only update on scroll and in the middle
pointerHeight = containerHeight - dataPointsHeight/4 - (currentValue * containerHeight) / maxValue)
I have the scroll offset that i can use to calculate a more precise height. its need someone smarter than me to figure out the equation. let me know if you need any help regarding this.
BTW the colors are dynamic i am using only one dataset
Here is a video
https://user-images.githubusercontent.com/10091953/196725309-fd40f910-354e-4c09-b488-0e865a8d703a.mp4