Skip to content

[Lens] Restore dynamic colouring by value for Last value agg#209110

Merged
dej611 merged 10 commits intoelastic:mainfrom
dej611:fix/208924
Feb 11, 2025
Merged

[Lens] Restore dynamic colouring by value for Last value agg#209110
dej611 merged 10 commits intoelastic:mainfrom
dej611:fix/208924

Conversation

@dej611
Copy link
Contributor

@dej611 dej611 commented Jan 31, 2025

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.

Screenshot 2025-01-31 at 14 30 12

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.

@dej611 dej611 added release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens backport:prev-major labels Jan 31, 2025
nickofthyme

This comment was marked as duplicate.

Copy link
Contributor

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the issue you found but there is another issue I think we should fix here.

@dej611
Copy link
Contributor Author

dej611 commented Jan 31, 2025

/ci

@dej611
Copy link
Contributor Author

dej611 commented Feb 4, 2025

/ci

@dej611
Copy link
Contributor Author

dej611 commented Feb 4, 2025

/ci

@dej611
Copy link
Contributor Author

dej611 commented Feb 5, 2025

/ci

@dej611 dej611 marked this pull request as ready for review February 5, 2025 12:35
@dej611 dej611 requested a review from a team as a code owner February 5, 2025 12:35
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1816 1817 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
lens 548 549 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.6MB 1.6MB +130.0B
Unknown metric groups

API count

id before after diff
lens 647 648 +1

History

@dej611 dej611 requested a review from nickofthyme February 10, 2025 13:29
@nickofthyme
Copy link
Contributor

Be sure to add a release note to the PR description?

@dej611 dej611 merged commit abba667 into elastic:main Feb 11, 2025
9 checks passed
@dej611
Copy link
Contributor Author

dej611 commented Feb 12, 2025

thanks @nickofthyme

@kibanamachine
Copy link
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)
@elastic elastic deleted a comment from kibanamachine Feb 12, 2025
@nickofthyme nickofthyme removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 12, 2025
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>
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.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### 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.

![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)

### 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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### 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.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### 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.

![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)

### 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.

![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)

### 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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)\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.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Lens release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.16.5 v8.17.3 v8.18.0 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens] Dynamic coloring option for last_value disappears when using filter

4 participants