observablehq / observablehq/plot

Grid mark doesn’t use its corresponding axis’ ticks

Open
#2,378 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The documentation for the grid mark states:

The optional data is an array of tick values — it defaults to the scale’s ticks.

The following example reproduces a case in which the grid mark ignores the scale’s ticks and instead produces its own:

Plot.plot({
  x: {
    domain: [new Date(2026, 2, 9).valueOf(), new Date(2026, 2, 11).valueOf()],
    ticks: ['2026-03-09','2026-03-10','2026-03-11']
      .map(d => new Date(d).valueOf()),
  },
  marks: [
    Plot.gridX(),
  ],
})
Image

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

Start with the Plot.gridX() entry point and the grid mark documentation linked in the issue. Run the provided date-axis example and trace how the corresponding axis ticks are selected. Done means the grid mark uses the axis’s configured ticks in this case while preserving explicit grid data behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.