-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Introduce horizontal colorbars #6024
Conversation
Looks good to me! Automargins on the right and left side don't work the way I would expect, but other than that it looks great! |
Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Alex Johnson <[email protected]>
Also, isn't there too much space below the colorbar when the title is on the side and the labels are below, as in the second screenshot in the comment above? |
This part was addressed in 8a137e3. |
- when there is a border line or different background
This part is addressed in 2f09b6e by adjusting the position of first and last tick labels. |
OK, but it's way too easy to break and the breaking cases I noted above are just the tip of the iceberg - this would be a huge pain to fix. How about this then: as long as there will be at least 2 labels left, remove the ones that would need moving; if removing would result in 0 or 1 labels, we move them instead. |
8a137e3 adjusted the horizontal alignment - I was talking about vertical |
Applied in 07cd536 |
The vertical alignment based on the height of colorbar title could be an option later on the road. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent - let's add one or two mocks that exactly match existing mocks but with no border or bg for the colorbar, showing that the labels are all visible and unmoved. Then I'd say this is ready to merge and release! 💃
Good call. Done in a0901bd. |
Great feature! Well done @archmoj !! |
Resolves #1244 by adding
orientation
attribute tocolorbar
with the option 'h'.@plotly/plotly_js