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

Fix vertical spacing of legend items in horizontal mode #6094

Merged
merged 3 commits into from Feb 1, 2022

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jan 25, 2022

Fixes #6089.

@plotly/plotly_js

@archmoj archmoj added this to the v2.9.0 milestone Jan 25, 2022
Copy link
Contributor

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 This looks great as far as the situation where each group winds up on a separate line, so I think this solves the immediate need.

There is still some behavior that strikes me as odd though when some groups share a line. I would have expected us to end up with a consistent column width so that (a) the nth group on the first line is horizontally aligned with the nth group on subsequent lines, and (b) all the groups on one line are evenly spaced. I guess the current behavior makes sense without legend groups - it's like you're just writing out the legend as a paragraph - but when you have groups involved it creates some weird effects like this:
Screen Shot 2022-01-31 at 5 55 55 PM
That I think would look much better with consistent horizontal spacing. Not exactly sure if we should consider this a bug or just a feature request for a new mode that does what I'm suggesting, but can you make an issue where we can follow up on this?

@archmoj archmoj merged commit 6b2c637 into master Feb 1, 2022
@archmoj archmoj deleted the fix6089-group-height-in-row branch February 1, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Legend groups should size individually when stacked vertically
2 participants