Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A nice default bin domain. #174

Merged
merged 1 commit into from
Sep 22, 2020
Merged

A nice default bin domain. #174

merged 1 commit into from
Sep 22, 2020

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Sep 22, 2020

This changes the default behavior of d3.bin to nice the domain such that the bins are uniform width. The previous behavior often resulted in thinner first and last bins, which was confusing. #46 To make this easier, I’ve also added d3.nice which implements iterative nicing strategy now used by d3-scale (and d3-scale can be upgraded to use d3.nice in the future, if desired).

Copy link
Member

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a very welcome change!

will need to update https://observablehq.com/@d3/d3-bin##last%20bucket

@mbostock mbostock force-pushed the nice-bin-domain branch 2 times, most recently from ece6786 to b32d2d1 Compare September 22, 2020 19:36
@mbostock mbostock merged commit a2bc90a into master Sep 22, 2020
@mbostock mbostock deleted the nice-bin-domain branch September 22, 2020 19:41
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.

2 participants