Skip to content
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

[Lens] color range rounds values in heatmap #172433

Closed
stratoula opened this issue Dec 4, 2023 · 2 comments · Fixed by #172602
Closed

[Lens] color range rounds values in heatmap #172433

stratoula opened this issue Dec 4, 2023 · 2 comments · Fixed by #172602
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@stratoula
Copy link
Contributor

Kibana version:
possibly from when color ranges were introduced

Describe the bug:
When you use color ranges in heatmap (possibly in other charts, I didnt check) and you want to create color rules from numbers with decimals, the numbers are rounded causing problems in the coloring of the heatmap.

An example is shown below with the 95th percentile. While I am creating rules with 3 decimals, the values in the legend are rounded

image

It is even more prominent with percentile ranks. Here I want to create a color rule based on 25.4 but it is rounded in 25 and the heatmap is colored wrongly

image
@stratoula stratoula added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Dec 4, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@stratoula
Copy link
Contributor Author

Adding the impact medium label as there is no workaround

@dej611 dej611 self-assigned this Dec 5, 2023
dej611 added a commit that referenced this issue Dec 12, 2023
## Summary

Fixes #172433
Fixes #172574
Fixes #170240

For #172433 the bands values are now passing thru the value formatter to
match users' expectations:

<img width="1227" alt="Screenshot 2023-12-05 at 16 52 39"
src="https://github.com/elastic/kibana/assets/924948/42d2c4ba-1b6b-4785-84e7-0ad73670ecdc">

When the default formatter is selected something complex happens there,
which might look wrong but it is still respecting Kibana's advanced
settings formatter pattern (in this example `0.[000]`):

<img width="1234" alt="Screenshot 2023-12-05 at 16 52 57"
src="https://github.com/elastic/kibana/assets/924948/7fe7dd1d-eff1-40fa-9e52-8a7ff20d0faf">

As for #170240 the problem was due to an unnecessary safe guard which
was forcing the first bucket to be `1` when it was open:

<img width="1227" alt="Screenshot 2023-12-05 at 16 52 11"
src="https://github.com/elastic/kibana/assets/924948/a3ac437d-7b04-489d-b0fc-6c2b456971de">

As for #172574 I just fixed at root level the problem...

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
sorenlouv pushed a commit to sorenlouv/kibana that referenced this issue Dec 12, 2023
## Summary

Fixes elastic#172433
Fixes elastic#172574
Fixes elastic#170240

For elastic#172433 the bands values are now passing thru the value formatter to
match users' expectations:

<img width="1227" alt="Screenshot 2023-12-05 at 16 52 39"
src="https://github.com/elastic/kibana/assets/924948/42d2c4ba-1b6b-4785-84e7-0ad73670ecdc">

When the default formatter is selected something complex happens there,
which might look wrong but it is still respecting Kibana's advanced
settings formatter pattern (in this example `0.[000]`):

<img width="1234" alt="Screenshot 2023-12-05 at 16 52 57"
src="https://github.com/elastic/kibana/assets/924948/7fe7dd1d-eff1-40fa-9e52-8a7ff20d0faf">

As for elastic#170240 the problem was due to an unnecessary safe guard which
was forcing the first bucket to be `1` when it was open:

<img width="1227" alt="Screenshot 2023-12-05 at 16 52 11"
src="https://github.com/elastic/kibana/assets/924948/a3ac437d-7b04-489d-b0fc-6c2b456971de">

As for elastic#172574 I just fixed at root level the problem...

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 9f4c220)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 12, 2023
## Summary

Fixes elastic#172433
Fixes elastic#172574
Fixes elastic#170240

For elastic#172433 the bands values are now passing thru the value formatter to
match users' expectations:

<img width="1227" alt="Screenshot 2023-12-05 at 16 52 39"
src="https://github.com/elastic/kibana/assets/924948/42d2c4ba-1b6b-4785-84e7-0ad73670ecdc">

When the default formatter is selected something complex happens there,
which might look wrong but it is still respecting Kibana's advanced
settings formatter pattern (in this example `0.[000]`):

<img width="1234" alt="Screenshot 2023-12-05 at 16 52 57"
src="https://github.com/elastic/kibana/assets/924948/7fe7dd1d-eff1-40fa-9e52-8a7ff20d0faf">

As for elastic#170240 the problem was due to an unnecessary safe guard which
was forcing the first bucket to be `1` when it was open:

<img width="1227" alt="Screenshot 2023-12-05 at 16 52 11"
src="https://github.com/elastic/kibana/assets/924948/a3ac437d-7b04-489d-b0fc-6c2b456971de">

As for elastic#172574 I just fixed at root level the problem...

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 9f4c220)
kibanamachine added a commit that referenced this issue Dec 12, 2023
# Backport

This will backport the following commits from `main` to `8.12`:
- [[Lens] Various fixes for Heatmap
(#172602)](#172602)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-12T09:23:24Z","message":"[Lens]
Various fixes for Heatmap (#172602)\n\n## Summary\r\n\r\nFixes
#172433\r\nFixes #172574\r\nFixes #170240\r\n\r\nFor #172433 the bands
values are now passing thru the value formatter to\r\nmatch users'
expectations:\r\n\r\n<img width=\"1227\" alt=\"Screenshot 2023-12-05 at
16 52
39\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/42d2c4ba-1b6b-4785-84e7-0ad73670ecdc\">\r\n\r\nWhen
the default formatter is selected something complex happens
there,\r\nwhich might look wrong but it is still respecting Kibana's
advanced\r\nsettings formatter pattern (in this example
`0.[000]`):\r\n\r\n<img width=\"1234\" alt=\"Screenshot 2023-12-05 at 16
52
57\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/7fe7dd1d-eff1-40fa-9e52-8a7ff20d0faf\">\r\n\r\nAs
for #170240 the problem was due to an unnecessary safe guard
which\r\nwas forcing the first bucket to be `1` when it was
open:\r\n\r\n<img width=\"1227\" alt=\"Screenshot 2023-12-05 at 16 52
11\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/a3ac437d-7b04-489d-b0fc-6c2b456971de\">\r\n\r\nAs
for #172574 I just fixed at root level the problem...\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9f4c220ad8599f4bd98e78d4e5abc9147cc5920f","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.13.0"],"number":172602,"url":"https://github.com/elastic/kibana/pull/172602","mergeCommit":{"message":"[Lens]
Various fixes for Heatmap (#172602)\n\n## Summary\r\n\r\nFixes
#172433\r\nFixes #172574\r\nFixes #170240\r\n\r\nFor #172433 the bands
values are now passing thru the value formatter to\r\nmatch users'
expectations:\r\n\r\n<img width=\"1227\" alt=\"Screenshot 2023-12-05 at
16 52
39\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/42d2c4ba-1b6b-4785-84e7-0ad73670ecdc\">\r\n\r\nWhen
the default formatter is selected something complex happens
there,\r\nwhich might look wrong but it is still respecting Kibana's
advanced\r\nsettings formatter pattern (in this example
`0.[000]`):\r\n\r\n<img width=\"1234\" alt=\"Screenshot 2023-12-05 at 16
52
57\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/7fe7dd1d-eff1-40fa-9e52-8a7ff20d0faf\">\r\n\r\nAs
for #170240 the problem was due to an unnecessary safe guard
which\r\nwas forcing the first bucket to be `1` when it was
open:\r\n\r\n<img width=\"1227\" alt=\"Screenshot 2023-12-05 at 16 52
11\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/a3ac437d-7b04-489d-b0fc-6c2b456971de\">\r\n\r\nAs
for #172574 I just fixed at root level the problem...\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9f4c220ad8599f4bd98e78d4e5abc9147cc5920f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172602","number":172602,"mergeCommit":{"message":"[Lens]
Various fixes for Heatmap (#172602)\n\n## Summary\r\n\r\nFixes
#172433\r\nFixes #172574\r\nFixes #170240\r\n\r\nFor #172433 the bands
values are now passing thru the value formatter to\r\nmatch users'
expectations:\r\n\r\n<img width=\"1227\" alt=\"Screenshot 2023-12-05 at
16 52
39\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/42d2c4ba-1b6b-4785-84e7-0ad73670ecdc\">\r\n\r\nWhen
the default formatter is selected something complex happens
there,\r\nwhich might look wrong but it is still respecting Kibana's
advanced\r\nsettings formatter pattern (in this example
`0.[000]`):\r\n\r\n<img width=\"1234\" alt=\"Screenshot 2023-12-05 at 16
52
57\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/7fe7dd1d-eff1-40fa-9e52-8a7ff20d0faf\">\r\n\r\nAs
for #170240 the problem was due to an unnecessary safe guard
which\r\nwas forcing the first bucket to be `1` when it was
open:\r\n\r\n<img width=\"1227\" alt=\"Screenshot 2023-12-05 at 16 52
11\"\r\nsrc=\"https://github.com/elastic/kibana/assets/924948/a3ac437d-7b04-489d-b0fc-6c2b456971de\">\r\n\r\nAs
for #172574 I just fixed at root level the problem...\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9f4c220ad8599f4bd98e78d4e5abc9147cc5920f"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants