You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The victory-core package changed how text sizes are calculated -- see #2505. However, this appears to have inadvertently affected VictoryLegend. As a result, we can no longer use gutterRow={0} and the lineHeight label style for vertical legends. Unlike gutter={0}, there is always a minimum amount of space between legend rows, which appears based on font size.
Note that the gap between rows increases with larger font sizes. For example, gutterRow={0}and and lineHeight no longer produces the same gap for font size 14 Vs 20.
dlabrecq
changed the title
Text size calculation appears to break VictoryLegend rowGutter
Updated text size calculation breaks VictoryLegend
Jun 8, 2023
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.
Describe the bug
The victory-core package changed how text sizes are calculated -- see #2505. However, this appears to have inadvertently affected VictoryLegend. As a result, we can no longer use
gutterRow={0}
and thelineHeight
label style for vertical legends. Unlikegutter={0}
, there is always a minimum amount of space between legend rows, which appears based on font size.Note that the gap between rows increases with larger font sizes. For example,
gutterRow={0}
and andlineHeight
no longer produces the same gap for font size 14 Vs 20.Victory version
36.6.10
Code Sandbox link
Example with v36.6.8 (expected)
https://codesandbox.io/s/legend-row-gutter-example-1-19qsyb
Example with v36.6.10
https://codesandbox.io/s/legend-row-gutter-example-2-5yn1p4
Example with v36.6.10 and font size 20
https://codesandbox.io/s/legend-row-gutter-example-3-4inypx
To Reproduce
Steps to reproduce the behavior:
gutterRow={0}
Expected behavior
With
gutterRow={0}
andlineHeight: 0.275
, a minimal gap is expected between rows.Screenshots
Example with v36.6.8 (expected)
Example with v36.6.8 and font size 20 (expected)
Example with v36.6.10
Example with v36.6.10 and font size 20
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: