-
Notifications
You must be signed in to change notification settings - Fork 13
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
Incorrect formatting on very small numbers #19
Comments
Hello, this is pretty annoying bug and I run into it just now. I have reproduced the same issue with following configuration: Kibana version: 7.9.2 Elasticsearch version: 7.9.2 Server OS version: Docker Browser version: Safari 14.0 Browser OS version: Macos 10.15.7 Original install method (e.g. download page, yum, from source, etc.): Docker images Reproduction: Create two documents in test index:
Create index pattern for this index with default parameters and create table visualization with split rows terms aggregation by variable. You should get something like this: Change the formatting of Refresh the table visualization to pickup updated format from index pattern. You should see this: As you can see, bottom number got correctly displayed with single digit behind decimal separator, however the top number hasn't changed, it's still shown as |
FYI: v3.0.0 doesn't seem to have the same issue anymore, as it formats small numbers such as https://codepen.io/sakurai-youhei/pen/ExRVpzN
|
I can also confirm that v3.0.0 works
Will v3.0.0 be tagged as a release soon? |
I found this repo while searching for a fork that fixed the Numeral JS bug "NaN returned if value < 1e-6"
I see that this fork fixes that issue somewhat; it doesn't return
NaN
anymore, but the formatting of the output string has problems.If I use format
0,0
on a number like4.8439166267322474e-8
, the formatted string looks like this:Note there are commas in the mantissa after the decimal point. I'd expect an output of
0
here, actually.Format
0,0.00
returns the same string as above, where I'd expect0.00
or4.84e-8
or something.Here's a codepen that shows the strangeness:
https://codepen.io/foundryspatial-duncan/pen/YzqWxgK
The text was updated successfully, but these errors were encountered: