observablehq / observablehq/plot
Grid mark doesn’t use its corresponding axis’ ticks
Open
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(),
],
})
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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