-
Notifications
You must be signed in to change notification settings - Fork 185
include margins in the label translate #402
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
71ed111
to
2bf5776
Compare
2bf5776
to
bcecaef
Compare
rebased |
A little explainer would be nice here… I’m finding it hard to follow what the logic was vs. what it should be. I feel like the current behavior was intentional (put the x-axis label as far right as possible to give it space); now I’m trying to decide what the new behavior should be, if the current one is not desirable. |
But what is the default label margin of 20? |
That was to match (most of) the existing plots.
… |
Because normally there isn’t a second axis? It’s matching the 20 from here, I presume. Lines 118 to 121 in 07cf90b
|
I see now that this branch works only in a few cases, and is far from working in general. I've made an interactive here https://observablehq.com/d/79d3d39812dd3441 ; it seems to me that the behavior of the two first charts is desirable, i.e. that the label should be tied to the tip of the axis. But it would need to work in the four faceting possibilities (no faceting, x, y, x+y), for labelAnchor=left, and also for the vertical axis (which I haven't touched here either). Maybe an alternative would be to have a configurable label.shift? (label.offset is for the orthogonal direction). I'm closing this for the time being. |
Nice notebook. That helps! 👍 It’s definitely tricky and I expect we do want some tweaks to the default behavior as well as likely new options. |
fixes #375