-
-
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
Implement ticklabelposition for cartesian subplots and colorbars #5275
Conversation
To check:
|
recapping conversation in slack: it's pretty much a core part of the intention of this feature that we take into account the bounding boxes of the labels, rather than hardcoding multiples of the font-height. |
96685b3
to
8a34a95
Compare
- and resolve conflict in src/plots/cartesian/constraints.js
Looking great! Nice job with the extra autorange, and with removing labels that extend outside the plot. A few things I notice playing with the demo:
|
Co-authored-by: Alex Johnson <[email protected]>
Good catch. Fixed by 999f877. |
a9691a7
to
999f877
Compare
Good call. Addressed in 445eee4. |
else if(bb.top + (ax.tickangle ? 0 : d.fontSize / 4) < min) hide = true; | ||
} | ||
if(hide) thisLabel.select('text').style({ opacity: 0 }); | ||
} // TODO: hide mathjax? |
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.
heh inside labels and MathJax hopefully have rather disjoint user sets... So yes we should test this at some point, but not necessary for this PR
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.
Fantastic! Nice job including colorbars and improving various other aspects of rotated tick label positioning. 💃
Resolves #5186 by implement
ticklabelposition
for cartesian subplots as well ascolorbars
.and fixes #5262 (in c7a23b4)
and fixes #5301 (in 6e80dc9, 8efa7bd and 6f575a3)
ticklabelposition
determines where tick labels are drawn with respect to the axis.Options are
outside
,inside
,outside top
,inside top
,outside left
,inside left
,outside right
,inside right
,outside bottom
,inside bottom
.It Has no effect on multicategory axes or when
tickson
is set boundaries.Please note that
top or bottom has no effect on x axes or when
ticklabelmode
is set to period.Similarly,
left or right has no effect on y axes or when
ticklabelmode
is set to period.Demo
@plotly/plotly_js