Skip to content

adopt d3.nice - #295

Open
Fil wants to merge 2 commits into
mainfrom
fil/adopt-nice
Open

Fil wants to merge 2 commits into
mainfrom
fil/adopt-nice

Conversation

@Fil

@Fil Fil commented Nov 9, 2026

Copy link
Copy Markdown
Member

linear.nice now calls d3-array's nice.

This fixes its rounding error: scaleLinear().domain([1.1, 1.1 + 0.3]).nice() returned [1.1, 1.4].

Together with d3/d3-array#299, it also nices domains crossing zero with a small count: scaleLinear().domain([-1, 5]).nice(1) was left unchanged, and is now [-10, 10].

Fixes #223.

@Fil
Fil requested a review from mbostock November 9, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Adopt d3.nice

1 participant