observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.16k stars 171 forks source link

The default tickFormat with a collapsed domain lacks sufficient precision #2076

Open mbostock opened 1 month ago

mbostock commented 1 month ago

untitled - 2024-06-09T163705 855

Plot.ruleX([5.5]).plot()

We should probably fallback to formatAuto when there is a collapsed domain.

mbostock commented 1 month ago

Really a D3 bug…

d3.scaleLinear().domain([5.5, 5.5]).tickFormat(7.5)(5.5) // "6"

We don’t handle the tick step being zero well.

Fil commented 1 month ago

moved to https://github.com/d3/d3-scale/issues/286