[9.0] [Lens][Datatable] Fix color mapping of transposed datatables (#208623)#209924
Merged
nickofthyme merged 2 commits intoelastic:9.0from Feb 10, 2025
Merged
[9.0] [Lens][Datatable] Fix color mapping of transposed datatables (#208623)#209924nickofthyme merged 2 commits intoelastic:9.0from
nickofthyme merged 2 commits intoelastic:9.0from
Conversation
…#208623) ## Summary In elastic#189895 we added logic to the `getColorCategories` util function to handle transpose columns. This mistakenly assumed the first row of the datatable would include all transposed column ids (i.e. `${value}---${columnId}`). After closer analysis this case is only present the in datatable rendering (i.e. `table_basic.tsx`), but in this context we also have the original non-transposed datatable. So to simplify this we revert this logic to not care about transposed datatables. Now the color mappings are correctly assigned across **split by** columns. <img width="720" alt="image" src="https://github.com/user-attachments/assets/c588930e-53b9-409f-a257-2c5be35aaa38" /> Fixes elastic#208555 ### 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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ## Release note Fixes an issue in Lens (elastic#208555) Table where a split-by metric on a terms rendered incorrect colors in table cells. --------- Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com> (cherry picked from commit a93aaee)
2 tasks
Contributor
Author
|
@elasticmachine merge upstream |
mbondyra
approved these changes
Feb 10, 2025
Contributor
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
|
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.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation