-
Notifications
You must be signed in to change notification settings - Fork 525
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
Safari Tooltip Incorrect Size Scaling in VictoryBar with VictoryTooltip #2835
Comments
Thanks for the bug report @ledei, I am able to reproduce this. One thing to note is that
|
Dev notes: In testing, it looks like our measurement utils are affected by this outstanding bug which causes Safari to return the bounds of the containing |
Thank you so much for your quick response @carbonrobot! It's greatly appreciated.
It looks like I'm facing a similar issue when I send an array instead of a string with /n. Is there anything that I can do to move forward on this? |
I'm encountering a similar issue with You can reproduce the issue with the existing voronoiDimension example. As you add more data sets, the tooltip grows exponentially. I'm using 4 |
Are there any updates on this? I am also encountering this issue |
I think I might be experiencing this behaviour - I am struggling meaningfully to debug it.
The In chrome I get expected behaviour: If you have any workarounds to suggest I would be super grateful. |
Update, just in case it helps others. ...
labelComponent={
<VictoryTooltip
data-testid='tooltip'
constrainToVisibleArea
backgroundPadding={5}
pointerLength={5}
cornerRadius={0}
flyoutHeight={(datum) => {
const numberOfLines = datum.text.length;
return numberOfLines * 18; // 18 is the line height
}}
flyoutStyle={{
...styles.toolTipFlyout,
}}
style={{...styles.toolTipMain}}
/>
}
... |
Is there an existing issue for this?
Code of Conduct
Victory version
"victory": "^37.0.0"
Code Sandbox link
Codesandbox
Bug report
Using the
join("\n")
method within thelabels
prop onVictoryBar
incorrectly scales the displayed tooltip upon hovering, increasing significantly in size, to a much larger degree than expected. To the best of my findings this only seems to happen in Safari, when utilizing theVictoryBar
component in conjunction withVictoryTooltip
as itslabelComponent.
Steps to reproduce
Expected behavior
The tooltip (VictoryTooltip) should maintain a consistent and appropriate size when hovered, similar to its behavior in other browsers, and should not excessively enlarge regardless of the amount of new lines in the label.
Google chrome:
Actual behavior
Upon hover, the size of the tooltip (VictoryTooltip) expands disproportionately, far beyond the expected degree of enlargement. This issue has been noted in Safari, while not manifesting in Google Chrome, the only other browser tested thus far. However, it's important to acknowledge that this behavior may extend to other browsers that have not yet been examined.
Safari:
Environment
The text was updated successfully, but these errors were encountered: