-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getPointerProps starts from 0 index, regardless of where you press and drag on the LineChart #937
Comments
Thanks @ThomasLVermeersch for reporting it quickly. I will fix it and release a new version today. |
@ThomasLVermeersch, Can you log the value of |
@Abhinandan-Kushwaha sure thing, thanks for the quick response. Truncated due to logging limitation, but most of the data is:
|
@ThomasLVermeersch I just tested it and found that the issue occurs only on I have started fixing it, will update here once done. |
Description
I am trying to enable functionality similar to Robinhood's press and drag to view price functionality.
I made a request here - #934 that was fulfilled. However, I'm now facing an issue, where
getPointerProps
starts at 0, no matter where I begin the drag from.For example, if I start my press at index 50, it shows data for index 50, but when I drag to the right, it jumps to 0, say I were to drag to 60, the data at the 10th index would show. Here is the experience:
Screen.Recording.2024-12-25.at.10.59.35.PM.mov
I was actually attempting to get this to work using
focusEnabled
prop before the latest gifted update, and was experiencing this issue, which made me think it was not possible at the time and is why I raised the request in the first place, so I suspect there might be some re-used logic infocusEnabled
that is causing this in the latest update, although just a hunch.My lineChart code is here:
The logic in getPointerProps just manages which values to use in a different component and should not play into the chart rendering at all. I have removed all of it and still face the same issue.
Any help would be greatly appreciated, thanks!
Steps to reproduce
Code and Video repro are above
Snack or a link to a repository
No response
version of react-native-gifted-charts
1.4.47
React Native version
0.76.5
Platforms
iOS
Workflow
Expo Go
The text was updated successfully, but these errors were encountered: