Skip to content

Smarter formatting for year number channels? #768

Open
@mbostock

Description

@mbostock

In a case like this (data), it’d be nice to avoid the commas for the year axis:

Screen Shot 2022-02-19 at 12 54 12 PM

Plot.plot({
  width,
  color: { legend: true },
  marks: [
    Plot.rectY(overview, { x: "Year", y: "Value", fill: "Type", interval: 1 })
  ]
})

Of course, you can do it with x: {tickFormat: ""}, but could Plot figure this out automatically?

Similarly when you do something like title: "Year", it’s a bummer that the automatic formatting for numbers shows a comma. I think we could maybe track a hint that looks for (case-insensitive) “year” and avoids the comma.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions