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

When all the values are integers, skip fractional ticks? #355

Open
Fil opened this issue May 3, 2021 · 3 comments
Open

When all the values are integers, skip fractional ticks? #355

Fil opened this issue May 3, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented May 3, 2021

Capture d’écran 2021-05-03 à 11 13 59

the axis should show 1, 2, instead of 1.0, 1.5, 2.0

@Fil Fil self-assigned this May 3, 2021
@Fil Fil added the enhancement New feature or request label May 3, 2021
@Fil
Copy link
Contributor Author

Fil commented Feb 7, 2022

Auto-detecting when this situation happens is more difficult than it seems at first glance.

And it could be argued it's a type of scale (type="integer"), rather than a type of ticks. The difference would show in an example where, say, data covers the years 2019, 2020 and 2021. The color legend would become ordinal rather than continuous. 🤔

@mbostock
Copy link
Member

mbostock commented Feb 7, 2022

Feels related to ordinal intervals #513?

@mbostock
Copy link
Member

#1790 handles some of these cases. I think the remaining case is covered by #1013 (which is generalizable beyond integers, such as time intervals). Maybe we can close this issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants