Tooltip line height not correctly applied to both flyout and text elements #2908
Labels
Issue: Accepted
The submitted issue has been confirmed by the Victory core team
Type: Bug 🐛
Oh no! A bug or unintentional behavior
Is there an existing issue for this?
Code of Conduct
Victory version
37.1.1
Code Sandbox link
https://codesandbox.io/p/sandbox/victory-starter-forked-4kq4n4?file=%2Fsrc%2FApp.tsx
Bug report
When specifying
Theme.tooltip.style.lineHeight
the value is used to calculate the height of the tooltip flyout but not the positioning of text elements inside. This causes a visual mismatch, especially on multiline tooltips.It seems the only workaround is to also supply line height to the tooltip label via props, but this means the value now has to be maintained across two separate places in the code:
Ideally we'd only need to maintain line height in one place, the theme.
Steps to reproduce
Expected behavior
Actual behavior
Environment
The text was updated successfully, but these errors were encountered: