Hovering line excluded from tooltip triggers hover for other lines
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
https://github.com/adobe/react-spectrum-charts/assets/43940026/25958704-e05b-46a8-980a-88212b3fcbbb
๐ Possible Solution
Reason for the bug:
To disable the tooltip interaction, the disabled line is excluded from the voronoi calculation
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.
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
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.