-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Lens][Table] Add color by terms with color mappings #189895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 44 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
6c9ff96
[Lens][Table] Add color by terms with color mappings
nickofthyme 4dfb857
Merge branch 'main' into color-mapping-tables
nickofthyme 1737e6d
fix: cell style updates
nickofthyme 160d3dd
fix initial palette when adding new dimension
nickofthyme b81bb4e
Add color mapping to row dimensions
nickofthyme 5471c2a
Style & copy tweaks to align with mockups
nickofthyme 1c0c53a
derive categories across all matching transposed columns
nickofthyme 8dd3c34
Merge branch 'main' into color-mapping-tables
nickofthyme 5c2a577
fix i18n issues
nickofthyme 3c555cf
Merge remote-tracking branch 'origin/color-mapping-tables' into color…
nickofthyme 82bc97e
Merge branch 'main' into color-mapping-tables
nickofthyme 020dd91
fix type errors in datatable expression
nickofthyme 3613870
fix types and test errors
nickofthyme ca97848
Merge branch 'main' into color-mapping-tables
nickofthyme 369e020
style: remove empty color when color is applied
nickofthyme fd5a754
fix legacy color sync on table palettes
nickofthyme eb2cf04
test: add and fix unit tests
nickofthyme f3814f9
Merge branch 'main' into color-mapping-tables
nickofthyme f4c1ab5
cleanup cell value merged logic
nickofthyme a3ed882
fix i18n error
nickofthyme c27f325
Merge branch 'main' into color-mapping-tables
nickofthyme 01a70e3
chore: simplify `color_categories.ts` logic
nickofthyme 8517989
chore: color all bucketed columns by terms
nickofthyme 3401c34
chore: set default palette based on color type
nickofthyme d01d4c3
fix: color bucketed numerics by term
nickofthyme c9dcb25
chore: update tests for new by terms logic
nickofthyme 75d583b
Merge branch 'main' into color-mapping-tables
nickofthyme afda04d
test: fix flaky color sync tests
nickofthyme c4ad8ad
test: fix jest tests due to changes
nickofthyme 46abc0a
test: move getColorStops to lens utils, fix color stops for custom pa…
nickofthyme 70a1939
fix: jest test/type error
nickofthyme 1a8b94d
fix: bad search predicate
nickofthyme ebdec6f
Merge branch 'main' into color-mapping-tables
nickofthyme aead73b
chore: remove old nick
nickofthyme c059e28
fix: range column formatting
nickofthyme 320f160
fix: setting switch font size
nickofthyme 60d44bc
style: revert text style on EuiButtonEmpty
nickofthyme b6f4754
chore: remove unneeded flex group
nickofthyme 0fb22f6
style: minor UI tweaks
nickofthyme a94a571
update limits due to increased size of `@kbn/coloring`
nickofthyme df48141
chore: add `colorMapping` telemetry
nickofthyme 3be2d4f
Merge branch 'main' into color-mapping-tables
nickofthyme 5f0b622
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine dee8b55
Merge branch 'main' into color-mapping-tables
mbondyra 034334a
chore: apply code review changes
nickofthyme f0f0f47
chore: fix linting errors
nickofthyme 77cd409
fix: palette issue on datasource update
nickofthyme fed3089
fix: design styles for padding and icon coloring
nickofthyme 5a873fa
Merge branch 'main' into color-mapping-tables
nickofthyme 472dd0f
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
|
nickofthyme marked this conversation as resolved.
nickofthyme marked this conversation as resolved.
nickofthyme marked this conversation as resolved.
nickofthyme marked this conversation as resolved.
nickofthyme marked this conversation as resolved.
nickofthyme marked this conversation as resolved.
nickofthyme marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,22 +15,26 @@ import { Container } from './components/container/container'; | |
| import { ColorMapping } from './config'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I observed this small bug when switching between categorical/numerical color palettes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, fixed this in 77cd409 |
||
| import { uiReducer } from './state/ui'; | ||
|
|
||
| export interface ColorMappingInputCategoricalData { | ||
| type: 'categories'; | ||
| /** an ORDERED array of categories rendered in the visualization */ | ||
| categories: Array<string | string[]>; | ||
| } | ||
|
|
||
| export interface ColorMappingInputContinuousData { | ||
| type: 'ranges'; | ||
| min: number; | ||
| max: number; | ||
| bins: number; | ||
| } | ||
|
|
||
| /** | ||
| * A configuration object that is required to populate correctly the visible categories | ||
| * or the ranges in the CategoricalColorMapping component | ||
| */ | ||
| export type ColorMappingInputData = | ||
| | { | ||
| type: 'categories'; | ||
| /** an ORDERED array of categories rendered in the visualization */ | ||
| categories: Array<string | string[]>; | ||
| } | ||
| | { | ||
| type: 'ranges'; | ||
| min: number; | ||
| max: number; | ||
| bins: number; | ||
| }; | ||
| | ColorMappingInputCategoricalData | ||
| | ColorMappingInputContinuousData; | ||
|
|
||
| /** | ||
| * The props of the CategoricalColorMapping component | ||
|
|
||
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
|
nickofthyme marked this conversation as resolved.
|
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.