Skip to content
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

LineChart 1st data point does not show pointer label if initialSpacing={0} #925

Closed
pakerwreah opened this issue Dec 13, 2024 · 1 comment · Fixed by #940
Closed

LineChart 1st data point does not show pointer label if initialSpacing={0} #925

pakerwreah opened this issue Dec 13, 2024 · 1 comment · Fixed by #940

Comments

@pakerwreah
Copy link

pakerwreah commented Dec 13, 2024

Description

When I set initialSpacing={0} to LineChart, every other data point shows my pointerLabelComponent just fine, but not the first one.

I'm working around it by adding a width to yAxisLabelContainerStyle bigger than yAxisLabelWidth (to hide the initial spacing), shifting vertical lines, subtracting this offset from the chart width and rules length. It's a nightmare.

I wonder why I can't "hover" the first data point.

My code is now completely poisoned with my workaround, but I can try to clean it up and post it here if necessary.

Steps to reproduce

  1. Create a LineChart with initialSpacing={0}
  2. Set a custom pointerLabelComponent
  3. Verify that you are unable to show the component on the 1st data point
  4. Remove initialSpacing or set a high enough value and see that now everything works fine

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

@Abhinandan-Kushwaha
Copy link
Owner

Hi @pakerwreah Thanks for reporting this issue. This has been fixed from versions 1.4.49 onwards.

Please use the latest version of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants