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

Hovering line excluded from tooltip triggers hover for other lines #256

Open
olsonjb opened this issue Apr 18, 2024 · 1 comment
Open

Hovering line excluded from tooltip triggers hover for other lines #256

olsonjb opened this issue Apr 18, 2024 · 1 comment
Labels
bug Something isn't working needs grooming Issue is pending grooming by the core team

Comments

@olsonjb
Copy link
Contributor

olsonjb commented Apr 18, 2024

Provide a general summary of the issue here

Hovering a line that is excluded from the tooltip via excludeDataKeys will trigger hover on the nearest non-excluded line. This issue was surfaced by @c-lamoureux in this thread

🤔 Expected Behavior?

Do not trigger hover from disabled line

😯 Current Behavior

disabledLineHover.mov

💁 Possible Solution

Reason for the bug:

To disable the tooltip interaction, the disabled line is excluded from the voronoi calculation
image

If the disabled line was still included in the voronoi calculation, we could end up with weird "dead" areas. None of the areas around the gray line below would trigger a hover - this could be problematic if lines or points overlap.
image

There may not be a good solution for this - just documenting the issue around Connor's comment in case we decide to investigate it more thoroughly in the future.

🔦 Context

No response

🖥️ Steps to Reproduce

Hover the disabled line in the rsc-charttooltip--disabled-series-line-chart story.

Version

1.6.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS

🧢 Your Company/Team

None

🕷 Tracking Issue

No response

@olsonjb olsonjb added the bug Something isn't working label Apr 18, 2024
@marshallpete
Copy link
Member

I don't totally agree that this is a bug and think we should discuss further. The points have been excluded from the tooltip and since chart types like line and scatter use voronoi to highlight the nearest point, if a point is excluded I think it should be excluded from the voronoi calculation.
I'm open to other opinions on what the expected behavior should be though.

@matthewdeutsch matthewdeutsch added the needs grooming Issue is pending grooming by the core team label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs grooming Issue is pending grooming by the core team
Projects
None yet
Development

No branches or pull requests

3 participants