-
Notifications
You must be signed in to change notification settings - Fork 286
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
Not too nice ticks for big domains #264
Comments
Not sure if we can do anything better here. Feel free to open a pull request if you have a suggestion for a change to the ticks algorithm. |
Yep, it's floating points issues.
It looks like using Big in the ticks method solve the issue. But maybe you don't prefer to use another dependencies to solve it ? I don't know.
The ticks method
|
JavaScript has native support for big integers now, so we could use that, but I don’t think I’d want to use big integers in the common path (since it’s rare that the domain is so big or so small). And it would need to be a new major version since it would reduce compatibility of d3-array with older JavaScript environments. So I probably don’t think this is worth it unless there is more evidence of demand. |
I am not sure if this is what
ticks
should return for these domains or not. Is there a limit for themax
andmin
? Or maybe I am missing something to return nicer ticks ? It looks like a floating points problem.The text was updated successfully, but these errors were encountered: