-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix handling of horizontal legendgroup #3609
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
Conversation
Can you tell us how |
@etpinard I don't know if this behavior was intentional but the current PR preserves it. |
I think we need to introduce a new legend attribute to control the spacing between trace items independently of the spacing between grouped items. The new attribute could be named cc @nicolaskruchten @plotly/plotly_js |
I don't mind in principle, but can't we get away without it? It seems to me that horizontal legends are just like vertical ones, no? |
Yes we can get away without it if we're happy with solely controlling the spacing between groups of items and NOT have control over the spacing between items.
In vertical legends, grouped items are stacked vertically. In horizontal legends, they are also stacked vertically. One may argue that they should be stacked horizontally (as done in the current PR). I personally don't have a preference. If we want to keep them stacked vertically even in horizontal legends, the following community PR #3628 is more appropriate. |
This is the current behaviour? |
Yes it is. This is how horizontal legends with groups are rendered on
actually controls the horizontal spacing between all items if there is at least one group in the legend. |
Well, if we currently stack them vertically then we can't change it, right? I think PR #3628 makes sense to me: keep vertically-aligned groups and wrap whole groups, honouring |
I agree PR #3628 is less of a breaking change. The only downside I can think of is that vertically-aligned groups will take up more space than they would if stacked horizontally. Closing in favor of PR #3628 |
Fixes #1913
See #1913 (comment) for details.