[Lens] Restore dynamic colouring by value for Last value agg#209110
Merged
dej611 merged 10 commits intoelastic:mainfrom Feb 11, 2025
Merged
[Lens] Restore dynamic colouring by value for Last value agg#209110dej611 merged 10 commits intoelastic:mainfrom
dej611 merged 10 commits intoelastic:mainfrom
Conversation
nickofthyme
reviewed
Jan 31, 2025
Contributor
nickofthyme
left a comment
There was a problem hiding this comment.
This solves the issue you found but there is another issue I think we should fix here.
x-pack/platform/plugins/shared/lens/common/expressions/datatable/utils.ts
Show resolved
Hide resolved
Contributor
Author
|
/ci |
Contributor
Author
|
/ci |
Contributor
Author
|
/ci |
Contributor
Author
|
/ci |
Contributor
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
History
|
nickofthyme
approved these changes
Feb 11, 2025
Contributor
|
Be sure to add a release note to the PR description? |
Contributor
Author
|
thanks @nickofthyme |
Contributor
|
Starting backport for target branches: 8.16, 8.17, 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13290148704 |
nickofthyme
pushed a commit
to nickofthyme/kibana
that referenced
this pull request
Feb 12, 2025
…#209110) ## Summary Fixes elastic#208924 This PR improves the numeric check for the Last value agg within the Metric chart type avoiding completely to access the active data and rather rely on the datasource configuration. The new utility function in fact won't rely any more on active data rather on the Lens configuration itself, which is more robust, faster and flexible. <img width="2552" alt="Screenshot 2025-01-31 at 14 30 12" src="https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92" /> ### Notes for testing I've created a testing dashboard with all the possible combinations of colouring for metric and tables. [last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt) ### 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 ## Release note This fixes an issue where dynamic colouring has been disabled from Last value aggregation types. (cherry picked from commit abba667) # Conflicts: # x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx # x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx # x-pack/plugins/lens/public/visualizations/metric/helpers.ts
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 12, 2025
…#209110) ## Summary Fixes elastic#208924 This PR improves the numeric check for the Last value agg within the Metric chart type avoiding completely to access the active data and rather rely on the datasource configuration. The new utility function in fact won't rely any more on active data rather on the Lens configuration itself, which is more robust, faster and flexible. <img width="2552" alt="Screenshot 2025-01-31 at 14 30 12" src="https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92" /> ### Notes for testing I've created a testing dashboard with all the possible combinations of colouring for metric and tables. [last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt) ### 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 ## Release note This fixes an issue where dynamic colouring has been disabled from Last value aggregation types. (cherry picked from commit abba667)
nickofthyme
added a commit
that referenced
this pull request
Feb 12, 2025
…209110) (#210869) # Backport This will backport the following commits from `main` to `9.0`: - [[Lens] Restore dynamic colouring by value for Last value agg (#209110)](#209110) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:55:35Z","message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport missing","backport:prev-major","v9.1.0"],"title":"[Lens] Restore dynamic colouring by value for Last value agg","number":209110,"url":"https://github.com/elastic/kibana/pull/209110","mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209110","number":209110,"mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
nickofthyme
added a commit
that referenced
this pull request
Feb 12, 2025
…209110) (#210876) # Backport This will backport the following commits from `main` to `8.x`: - [[Lens] Restore dynamic colouring by value for Last value agg (#209110)](#209110) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:55:35Z","message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport missing","backport:prev-major","v9.1.0"],"title":"[Lens] Restore dynamic colouring by value for Last value agg","number":209110,"url":"https://github.com/elastic/kibana/pull/209110","mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209110","number":209110,"mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
nickofthyme
added a commit
that referenced
this pull request
Feb 12, 2025
…209110) (#210877) # Backport This will backport the following commits from `main` to `8.18`: - [[Lens] Restore dynamic colouring by value for Last value agg (#209110)](#209110) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:55:35Z","message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport missing","backport:prev-major","v9.1.0"],"title":"[Lens] Restore dynamic colouring by value for Last value agg","number":209110,"url":"https://github.com/elastic/kibana/pull/209110","mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209110","number":209110,"mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
nickofthyme
added a commit
that referenced
this pull request
Feb 12, 2025
…209110) (#210878) # Backport This will backport the following commits from `main` to `8.17`: - [[Lens] Restore dynamic colouring by value for Last value agg (#209110)](#209110) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:55:35Z","message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport missing","backport:prev-major","v9.1.0"],"title":"[Lens] Restore dynamic colouring by value for Last value agg","number":209110,"url":"https://github.com/elastic/kibana/pull/209110","mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209110","number":209110,"mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
nickofthyme
added a commit
that referenced
this pull request
Feb 12, 2025
…209110) (#210879) # Backport This will backport the following commits from `main` to `8.16`: - [[Lens] Restore dynamic colouring by value for Last value agg (#209110)](#209110) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:55:35Z","message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport missing","backport:prev-major","v9.1.0"],"title":"[Lens] Restore dynamic colouring by value for Last value agg","number":209110,"url":"https://github.com/elastic/kibana/pull/209110","mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209110","number":209110,"mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
kibanamachine
added a commit
that referenced
this pull request
Feb 12, 2025
…209110) (#210885) # Backport This will backport the following commits from `main` to `9.0`: - [[Lens] Restore dynamic colouring by value for Last value agg (#209110)](#209110) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:55:35Z","message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport missing","v9.0.0","backport:version","v8.17.0","v8.18.0","v9.1.0","v8.19.0","v8.16.5"],"title":"[Lens] Restore dynamic colouring by value for Last value agg","number":209110,"url":"https://github.com/elastic/kibana/pull/209110","mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210869","number":210869,"state":"OPEN"},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210878","number":210878,"state":"OPEN"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210877","number":210877,"state":"OPEN"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209110","number":209110,"mergeCommit":{"message":"[Lens] Restore dynamic colouring by value for Last value agg (#209110)\n\n## Summary\n\nFixes #208924\n\nThis PR improves the numeric check for the Last value agg within the\nMetric chart type avoiding completely to access the active data and\nrather rely on the datasource configuration.\nThe new utility function in fact won't rely any more on active data\nrather on the Lens configuration itself, which is more robust, faster\nand flexible.\n\n<img width=\"2552\" alt=\"Screenshot 2025-01-31 at 14 30 12\"\nsrc=\"https://github.com/user-attachments/assets/5f8792db-40ff-497b-8e2f-0737c2932f92\"\n/>\n\n\n### Notes for testing\n\nI've created a testing dashboard with all the possible combinations of\ncolouring for metric and tables.\n\n\n[last_value_dashboard.ndjson.txt](https://github.com/user-attachments/files/18618905/last_value_dashboard.ndjson.txt)\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n## Release note\n\nThis fixes an issue where dynamic colouring has been disabled from Last\nvalue aggregation types.","sha":"abba6675e29b28b91daea1f46d2ff48363ab78ab"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210876","number":210876,"state":"OPEN"},{"branch":"8.16","label":"v8.16.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210879","number":210879,"state":"OPEN"}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
This was referenced Mar 11, 2025
dej611
added a commit
that referenced
this pull request
Mar 18, 2025
## Summary Fixes the table side of #188263 The [fix used for `Metric`](#209110) has been generalized and re-used for the datatable visualization.  ### 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
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 18, 2025
…ic#213917) ## Summary Fixes the table side of elastic#188263 The [fix used for `Metric`](elastic#209110) has been generalized and re-used for the datatable visualization.  ### 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 0b9df09)
kibanamachine
added a commit
that referenced
this pull request
Mar 18, 2025
…213917) (#214919) # Backport This will backport the following commits from `main` to `9.0`: - [[Lens][Datatable] Fix color by value for Last value array mode (#213917)](#213917) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-18T09:09:03Z","message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Lens][Datatable] Fix color by value for Last value array mode","number":213917,"url":"https://github.com/elastic/kibana/pull/213917","mergeCommit":{"message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213917","number":213917,"mergeCommit":{"message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
clintandrewhall
pushed a commit
to clintandrewhall/kibana
that referenced
this pull request
Mar 20, 2025
…ic#213917) ## Summary Fixes the table side of elastic#188263 The [fix used for `Metric`](elastic#209110) has been generalized and re-used for the datatable visualization.  ### 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
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Mar 22, 2025
…ic#213917) ## Summary Fixes the table side of elastic#188263 The [fix used for `Metric`](elastic#209110) has been generalized and re-used for the datatable visualization.  ### 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
nickofthyme
pushed a commit
to nickofthyme/kibana
that referenced
this pull request
Mar 27, 2025
…ic#213917) ## Summary Fixes the table side of elastic#188263 The [fix used for `Metric`](elastic#209110) has been generalized and re-used for the datatable visualization.  ### 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 0b9df09) # Conflicts: # x-pack/platform/plugins/shared/lens/public/shared_components/coloring/utils.ts # x-pack/platform/plugins/shared/lens/public/visualizations/datatable/components/dimension_editor.test.tsx # x-pack/platform/plugins/shared/lens/public/visualizations/datatable/visualization.tsx # x-pack/platform/plugins/shared/lens/public/visualizations/metric/dimension_editor.tsx
nickofthyme
pushed a commit
to nickofthyme/kibana
that referenced
this pull request
Mar 27, 2025
…ic#213917) ## Summary Fixes the table side of elastic#188263 The [fix used for `Metric`](elastic#209110) has been generalized and re-used for the datatable visualization.  ### 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 0b9df09) # Conflicts: # x-pack/platform/plugins/shared/lens/public/shared_components/coloring/utils.ts # x-pack/platform/plugins/shared/lens/public/visualizations/datatable/components/dimension_editor.test.tsx # x-pack/platform/plugins/shared/lens/public/visualizations/datatable/visualization.tsx # x-pack/platform/plugins/shared/lens/public/visualizations/metric/dimension_editor.tsx
nickofthyme
added a commit
that referenced
this pull request
Mar 27, 2025
…#213917) (#216118) # Backport This will backport the following commits from `main` to `8.18`: - [[Lens][Datatable] Fix color by value for Last value array mode (#213917)](#213917) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-18T09:09:03Z","message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","v9.0.0","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Lens][Datatable] Fix color by value for Last value array mode","number":213917,"url":"https://github.com/elastic/kibana/pull/213917","mergeCommit":{"message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214919","number":214919,"state":"MERGED","mergeCommit":{"sha":"ce776eca54a3b56d07d2404486162d5050098d26","message":"[9.0] [Lens][Datatable] Fix color by value for Last value array mode (#213917) (#214919)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Lens][Datatable] Fix color by value for Last value array mode\n(#213917)](https://github.com/elastic/kibana/pull/213917)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Marco Liberati <dej611@users.noreply.github.com>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213917","number":213917,"mergeCommit":{"message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
nickofthyme
added a commit
that referenced
this pull request
Mar 28, 2025
…213917) (#216117) # Backport This will backport the following commits from `main` to `8.x`: - [[Lens][Datatable] Fix color by value for Last value array mode (#213917)](#213917) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-18T09:09:03Z","message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","v9.0.0","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Lens][Datatable] Fix color by value for Last value array mode","number":213917,"url":"https://github.com/elastic/kibana/pull/213917","mergeCommit":{"message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214919","number":214919,"state":"MERGED","mergeCommit":{"sha":"ce776eca54a3b56d07d2404486162d5050098d26","message":"[9.0] [Lens][Datatable] Fix color by value for Last value array mode (#213917) (#214919)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Lens][Datatable] Fix color by value for Last value array mode\n(#213917)](https://github.com/elastic/kibana/pull/213917)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Marco Liberati <dej611@users.noreply.github.com>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213917","number":213917,"mergeCommit":{"message":"[Lens][Datatable] Fix color by value for Last value array mode (#213917)\n\n## Summary\n\nFixes the table side of #188263 \n\nThe [fix used for\n`Metric`](#209110) has been\ngeneralized and re-used for the datatable visualization.\n\n\n\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"0b9df094d1770065f79c05272a41175396caa27b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
cqliu1
pushed a commit
to cqliu1/kibana
that referenced
this pull request
Mar 31, 2025
…ic#213917) ## Summary Fixes the table side of elastic#188263 The [fix used for `Metric`](elastic#209110) has been generalized and re-used for the datatable visualization.  ### 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #208924
This PR improves the numeric check for the Last value agg within the Metric chart type avoiding completely to access the active data and rather rely on the datasource configuration.
The new utility function in fact won't rely any more on active data rather on the Lens configuration itself, which is more robust, faster and flexible.
Notes for testing
I've created a testing dashboard with all the possible combinations of colouring for metric and tables.
last_value_dashboard.ndjson.txt
Checklist
Release note
This fixes an issue where dynamic colouring has been disabled from Last value aggregation types.