Skip to content

Multi-line date labels can collide with scale label #1859

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

Open
tophtucker opened this issue Sep 13, 2023 · 2 comments · May be fixed by #1722
Open

Multi-line date labels can collide with scale label #1859

tophtucker opened this issue Sep 13, 2023 · 2 comments · May be fixed by #1722
Labels
bug Something isn’t working enhancement New feature or request

Comments

@tophtucker
Copy link
Contributor

If the date axis is not named one of the special names we suppress, the axis label may collide with the tick labels. (I see why this happens and auto margins are very tricky but I wanted an issue to track this.)

untitled (65)

Plot.plot({
  marks: [
    Plot.rectY(pizza, Plot.binX({ y: "count" }, { x: "order_date", tip: true })),
    Plot.ruleY([0])
  ]
})
@tophtucker tophtucker added the enhancement New feature or request label Sep 13, 2023
@Fil
Copy link
Contributor

Fil commented Sep 13, 2023

Wouldn't you want to leave the margin as is, and remove 2023?

@tophtucker
Copy link
Contributor Author

In this specific case, I’d really probably just want to remove the label “order_date”. But I can imagine wanting a label on a date axis and wanting it to adjust automatically if it’s multi-line. Though I know it may not be easy to infer if it’s multi-line! So maybe this is more similar to #383.

@Fil Fil added the bug Something isn’t working label Sep 26, 2023
Fil added a commit that referenced this issue Oct 3, 2023
fix a bug with inferred labels, which can be empty ("Date", "Year"… are filtered out).
observe marginLeft and marginRight when specified in the axis mark (this wasn't tested and had lead to a regression)
@Fil Fil linked a pull request Oct 3, 2023 that will close this issue
6 tasks
Fil added a commit that referenced this issue Oct 12, 2023
fix a bug with inferred labels, which can be empty ("Date", "Year"… are filtered out).
observe marginLeft and marginRight when specified in the axis mark (this wasn't tested and had lead to a regression)
Fil added a commit that referenced this issue Jul 29, 2024
fix a bug with inferred labels, which can be empty ("Date", "Year"… are filtered out).
observe marginLeft and marginRight when specified in the axis mark (this wasn't tested and had lead to a regression)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants