Skip to content

Grid mark doesn’t use its corresponding axis’ ticks #2378

@mwaibel-go

Description

@mwaibel-go

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to docs

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions