pixelRound by Fil · Pull Request #2371 · observablehq/plot

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

Given a continuous scale, returns a rounding function that snaps values to the coarsest precision that still distinguishes neighboring pixels. For temporal scales, this means utc or time intervals; for numeric scales, “nice” values = 10^x * {1, 2, 5}. For non-linear scales (log, pow, symlog, etc.) we compute precision locally.

This is a separate branch needed by both the dataless brush and the dataless crosshair

This was referenced

Feb 24, 2026

@Fil Fil marked this pull request as ready for review

February 24, 2026 13:53

mbostock