Skip to content
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

Legend is truncated too hard with short series name and current displayed value #2322

Open
markov00 opened this issue Jan 31, 2024 · 0 comments
Labels
bug Something isn't working :interactions Interactions related issue :legend Legend related issue :xy Bar/Line/Area chart related

Comments

@markov00
Copy link
Member

Describe the issue
The legend gets shortened and truncated when displaying the current series value if the series name is pretty short and there isn't a valid last value in the series.
Screenshot 2024-01-31 at 18 35 06
Screenshot 2024-01-31 at 18 34 59

This happens due to the following causes:

  • the automatically computed legend size depends on both the series name size and the legend extra value
  • if the default legend extra value (the last value in the series) is not available, then the size of the extra value is zero
  • with a short series name and a zero default extra value size, the overall legend size is pretty short too, causing any current hovered value to be displayed on top of the current series name

To Reproduce
Steps to reproduce the behavior:

  1. Go to codesandbox

Expected behaviour
A bit of buffer should always be present

@markov00 markov00 added bug Something isn't working :interactions Interactions related issue :legend Legend related issue :xy Bar/Line/Area chart related labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :interactions Interactions related issue :legend Legend related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

No branches or pull requests

1 participant