elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.81k stars 8.2k forks source link

[Lens] Static value: extends support for floating point number edge cases #118048

Open dej611 opened 2 years ago

dej611 commented 2 years ago

Describe the bug:

Integer numbers written as "floating point numbers" without decimals are still valid numbers:

1. => 1

Currently that is not supported in Formula, leading to some gentle error message:

Screenshot 2021-11-09 at 17 56 59 Screenshot 2021-11-09 at 17 57 04

But for Static value, which uses Formula underneath, this gets a little bit more confusing:

Screenshot 2021-11-09 at 17 57 14

I guess this can be seen as both an enhancement from the Formula side and a bug from the Static value point of view. I'll focus the issue on the latter as this leads to the more confusing result, but having a better support in Formula would be much better.

elasticmachine commented 2 years ago

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

dej611 commented 2 years ago

Noticed the same problem can be reproduced also with a double 0:

Screenshot 2021-11-09 at 18 16 06