Skip to content

band scale - can't hide ticks #1047

@ebeling

Description

@ebeling

I'm using plot in an Angular (Typescript) - project. I like to hide ticks in a plot with band scale on x-axis. The label must be visible.

const data = this.initTestData();
const svg = Plot.plot({
        height: this.height,
        width: this.width,       
        grid: false,
        marks: [
          Plot.barY(data, {
                      x: (d: ISpiritData) => {
                        return this.getXValue(d);
                      },
                      y: (d: ISpiritData) => {
                        return this.getYValue(d);
                      },
                      rx: 1,
                      fill: (d: ISpiritData) => {
                               return this.getColor(d);
                            }
          }),
      x: {
          type: 'band',
          ticks: 0,
          tickSize: 0,         
          line: false,
           label: 'my label',
            },
        y: {
            axis: null
           }
    });
....

The ticks on x-scale are visible. What is wrong?
using Angular 14.2.1, d3 7.6.1, @observablehq/plot 0.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions