-
Notifications
You must be signed in to change notification settings - Fork 524
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
VictoryVoronoiContainer with VictoryBar inside VictoryGroup gives inconsistent grouping in tooltip depending on bar values #2847
Comments
It seems related to #1925 |
Adding |
The Voronoi container is designed to group the tooltips. Would it work for you to just use simple tooltips? https://codesandbox.io/p/sandbox/victory-starter-forked-6mv73c |
Thanks for the reply! The workaround of using simple VictoryTooltip on the individual bars makes it consistent but we loose the ability to trigger the tooltips by hovering on the x-axis labels. Also the target area is smaller you have to be directly on a bar to open the tooltip where before we could hover even on the white space above and around the bars and it would open the tooltips. Also in the case of some groups of bars having small values like 1 and zeros, it's hard to trigger the tooltip (and impossible in the case of the value zero). The target areas of VictoryVoronoiContainer was much better. I think the best would be a new boolean prop on VictoryVoronoiContainer to dictate the grouping behavior. Also note in my sandbox example the bottom padding needed to be adjusted from 10 => 30 for the x-axis labels to show. I made it too small. I corrected it. |
A few details which are important here... The Voronoi container uses an x-y coordinate and radius to determine the match. That it triggers on the X axis is purely coincidental. It's only occurring because the values are so low that the Here is a diagram that helps visualize this better. We take the cursor position and draw bounds of a circle with radius For the case of the 4.0 x value bars, two of the values fall within the same radius bounds, so they are shown in the same label. It's unclear how we could handle this differently.
I will try to explore some other options |
Is there an existing issue for this?
Code of Conduct
Victory version
36.6.8
Code Sandbox link
https://codesandbox.io/p/sandbox/victory-starter-forked-xczy4h?file=%2Fsrc%2FApp.tsx
Bug report
I've been trying to workaround this but to no avail so I'm reaching out for an improvement request or help.
Steps to reproduce
Expected behavior
Actual behavior
Environment
The text was updated successfully, but these errors were encountered: