-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Support scientific notation for very small numbers #5811
Comments
We are currently using numeral.js to format our numeric values, which does not offer scientific notation currently. The only work around would be to increase the default precision in advanced config of specify a different field formatter for that field with a larger precision. |
have the same issue. I have numeric values in float. 0.001 0.002 I am trying to do statistic of my events using input filter elapsed. the default format of elapsed is in Seconds. All my events occurs in miliseconds or less. Interval is numeric integer. so the histogram create only 1 bar from 0 to 1. I have to use range chart to specify the range. I want automatic range 😄 By the way. your work is awesome. Thank you so much. |
I will rewrite my request because maybe is not clear in my previous post 😄 Description: Interval in histogram (Vertical bar chart) is an integer value. Use Case: Create histogram easily when your data is always between 0 and 1. or between 2 numbers. DataSet example: 0.001, 0.002, 0.003, 0.004 Expected behaviour with Interval float: I hope you understand my use case. I am not creating a new issue because is in topic of small numbers. Thank you very much for this awesome application 😄 👍 |
We have numeric values that we would ideally want to display in scientific notation. For example..
When viewed in Discover in the table tab:
And when using Visualize Data Table, this will only display the min(probability) as The numeral.js format pattern does not give sufficient precision. |
Interesting that the standard JSON representation is sufficient, I hadn't considered that as an option. In that case, using the |
|
Is this still something that could be worked on? I am currently working with values in the 10e-6 range, and while scaling them up is a possibility, it does not seem possible to scale them down for displaying them. @spalger numeral-js now does support exponential notation, however, visualizations still show everything as |
Sorry @TheNeikos, but the other breaking changes in Numeral prevent us from upgrading without breaking everyone's saved field formats. Have you tried using the string formatter? |
I did try the one for fields in the Settings, but that did not work. Is there another place I could try it out? |
Nope, that's it, how small is the number? |
The numbers are around 10^-8. |
This might fix the problem, but I kind of doubt it: #15309 If anyone here cares to check, it should be going into 5.6.5 and 6.0.1 or newer. |
See this ML issue for another example of where providing support for scientific format in the fork of numeral.js would add benefit, in the formatting of very small |
Numeral.js appears to have support but Kibana does not yet (due to our fork...) http://numeraljs.com/#format |
we can use custom format for that in 8.14 |
To overcome the limitation of integer-only intervals on aggs{histogram} queries, I have been using aggs{range} to construct histograms where my fields contain numbers less than one. This works great, but when Kibana 4.3.0 draws the histogram chart, it displays any bin "from:to" values that are less than 0.001 as '0'... see attached pic.

I checked the response body and ElasticSearch v2.1 passes these "from:to" values correctly in scientific format - e.g.
"buckets": {
"0.0-1.0E-4": {
"from": 0,
"from_as_string": "0.0",
"to": 0.0001,
"to_as_string": "1.0E-4",
"doc_count": 104
},
"1.0E-4-2.0E-4": {
"from": 0.0001,
"from_as_string": "1.0E-4",
"to": 0.0002,
"to_as_string": "2.0E-4",
"doc_count": 19
},
...so Kibana is rounding down values it uses on the x-axis.
Would it be possible to preserve the scientific notation, say for numbers less than 0.01?
Full text of request and response follows...
request_body.txt
response_body.txt
The text was updated successfully, but these errors were encountered: