kibana/packages/kbn-coloring
Marco Vettorello b12a42261b
[Lens] Color mapping for categorical dimensions (#162389)
## Summary

This PR introduces the new color mapping feature into Lens.

The color mapping feature is introduced as a standalone sharable
component available from `@kbn/coloring`. The
[README.md](ddd216457d/packages/kbn-coloring/src/shared_components/color_mapping/README.md)
file describes the components and the logic behind it.

The Color Mapping component is also connected to Lens and is available
in the following charts:
- XY (you can specify the mappings from a breakdown dimension
- Partition (you can specify the mappings from the main slice/group by
dimension)
- Tag cloud (you can specify the mappings from the tags dimension)

This MVP feature will be released under the Tech Preview flag.
This PR needs to prove the user experience and the ease of use. UI
styles, design improvements and embellishments will be released in
subsequent PRs.

The current MVP-provided palettes are just a placeholder. I'm
coordinating with @gvnmagni for a final set of palettes.

close https://github.com/elastic/kibana/issues/155037
close https://github.com/elastic/kibana/issues/6480
fix https://github.com/elastic/kibana/issues/28618
fix https://github.com/elastic/kibana/issues/96044
fix https://github.com/elastic/kibana/issues/101942
fix https://github.com/elastic/kibana/issues/112839
fix https://github.com/elastic/kibana/issues/116634


## Release note

This feature introduces the ability to change and map colors to break
down dimensions in Lens. The feature provides an improved way to specify
colors and their association with categories by giving the user a
predefined set of color choices
or customized one that drives the user toward a correct color selection.
It provides ways to pick new colors and generate gradients. 
This feature is in Tech Preview and is enabled by default on every new
visualization but can be turned off at will.

![image](d03e59f8-4a6f-4761-ab4c-c53a57c1723a)
2023-09-28 14:14:58 +02:00
..
.storybook [Step 1] Move CustomizablePalette from Lens into @kbn/coloring package (#129291) 2022-04-07 14:49:36 +05:00
src [Lens] Color mapping for categorical dimensions (#162389) 2023-09-28 14:14:58 +02:00
index.ts [Lens] Visualization UI package refactoring (#156185) 2023-05-04 14:12:10 +02:00
jest.config.js [Step 1] Move CustomizablePalette from Lens into @kbn/coloring package (#129291) 2022-04-07 14:49:36 +05:00
kibana.jsonc Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
package.json [Lens][Event annotations] Move logic into packages (#161500) 2023-07-19 09:46:57 -05:00
README.md [Step 1] Move CustomizablePalette from Lens into @kbn/coloring package (#129291) 2022-04-07 14:49:36 +05:00
tsconfig.json [Lens] Color mapping for categorical dimensions (#162389) 2023-09-28 14:14:58 +02:00

@kbn/coloring

This package contains the types, utility methods, and components needed to make Color Palette work.