-
Notifications
You must be signed in to change notification settings - Fork 103
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
formatPrefix will sometimes not perform rounding #132
Comments
This appears to be a problem with Chrome's This seems to require an update to the So for the above case it would be: And in the generalised sense: |
I'm seeing the same behavior with Firefox and Safari. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed, which has a detailed explanation (for 2.55). |
Working as intended. |
Well, |
I made a local branch to submit a PR but I don't have write access. The needed change is to formatTypes.js.
My earlier comment had |
For example:
d3.formatPrefix(',.2', 1e3)(1555)
produces1.55
, should be1.56
.This is likely a simple fix, but unfortunately I'm not adept enough to figure out the source code and submit a PR, sorry.
The text was updated successfully, but these errors were encountered: