-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Tooltip value display incorrent #6926
Comments
Interesting, thanks @hatienloi! I suspect this is due to the fact that with JS floating point, 171.95 actually IS closer to 171.9 than to 172.0: > 171.95-171
0.9499999999999886 And if so it's going to be tough to fix without breaking numbers that are just a little bit lower, like 171.949999, so really SHOULD round down. If anyone is interested in taking a crack at this, it will be crucial to add good unit tests |
@alexcjohnson Yes, so weird. Could we have a fix for it |
Thanks for the report. |
@archmoj Updated the description with codesandbox link. Thanks! |
@archmoj With |
Hi @archmoj Any update for it? Do we have a patch fix for it? |
Step
x: [1,2,3,4,5], y: [2.02825,1.63728,171.96,4.8485,4.73463],
and hovertemplate:'<i>Price</i>: $%{y:.1f}',
Codesandbox
https://codesandbox.io/p/sandbox/plotlyjs-issue-9zd9rk?file=%2Findex.html
Screenshots
With 171..95 => Incorrect
With 171.96 => Correct
The text was updated successfully, but these errors were encountered: