observablehq / observablehq/plot

Multi-line date labels can collide with scale label

Open
#1,859 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

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])
  ]
})

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by running the supplied Plot.plot reproduction and trace the date-axis label, tick-label, and auto-margin handling; done means the multi-line date label no longer collides with scale tick labels without breaking the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.