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

pointerLabelComponent Rendering Issues: Overlaps with Bars in Bar Graph and Lacks z-index Adjustment #900

Open
rohan-bigstep opened this issue Nov 8, 2024 · 1 comment

Comments

@rohan-bigstep
Copy link

rohan-bigstep commented Nov 8, 2024

Description

The pointerLabelComponent in the react-native-gifter-chart library has two rendering issues that impact its visibility and customization options:

Overlapping with Bars: When there are a high number of bars in a bar graph, the pointerLabelComponent can sometimes appear behind the bars, making it difficult to read.
Lack of z-index Control: There is currently no way to adjust the z-index of the pointerLabelComponent. This makes it challenging to control the component’s layering when additional elements like average lines are added. For instance, if an average line is placed in the graph, it may be rendered on top of the pointerLabelComponent, obscuring it.

Steps to reproduce

For Issue 1: Overlapping with Bars

  1. Create a bar graph with a large number of bars (e.g., 30 or more).
  2. Use the pointerLabelComponent prop to add labels on the pointer.
  3. Observe that the pointerLabelComponent may render behind the bars when the bar count is high.
Screenshot 2024-11-08 at 12 45 22 PM

For Issue 2: Lack of z-index Control

  1. Add an average line to the graph
  2. Use the pointerLabelComponent prop to customize the pointer labels.
  3. Notice that the average line renders on top of the pointerLabelComponent, with no way to adjust layering so that the labels appear above the line.
Screenshot 2024-11-08 at 2 58 44 PM

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.47

React Native version

0.74.3

Platforms

Android, iOS

Workflow

React Native

@namikarif
Copy link

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

No branches or pull requests

2 participants