Skip to content
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

[Lens] Filtering a breakdown value resets colors #96044

Closed
ghudgins opened this issue Apr 1, 2021 · 4 comments · Fixed by #162389
Closed

[Lens] Filtering a breakdown value resets colors #96044

ghudgins opened this issue Apr 1, 2021 · 4 comments · Fixed by #162389
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@ghudgins
Copy link
Contributor

ghudgins commented Apr 1, 2021

Describe the feature:
This is a feature-ish bug. Breaks a sort of "object permanence" expectation with the user

  • Create a bar chart with a break down
  • Left click and filter to the value of the break down (in the below screenshot, the user selects "UI" as the filter)
    image

Expected: only see bars of the color you selected (so, for the screenshot, this would be red)

Actual: ramp resets and you always get the first color (green)

Describe a specific use case for the feature:
Users, when picking values to filter down, expect they're looking at a subdivision of the previous chart and not a new chart. Where possible, preserve styling // object permanence

@ghudgins ghudgins added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Apr 1, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293 flash1293 added the enhancement New value added to drive a business result label Apr 1, 2021
@wylieconlon
Copy link
Contributor

I think this is a deceptively complex set of interactions to think through, and we've previously had issues with this in the Visualize app. We could take advantage of the Color Service to handle the name:color assignment in Lens, but probably need to define a trigger that would reset the color assignment. For example, we might want to reset the color assignment every time you add/remove/update the query that powers a dimension, or every time you switch charts. By tying the color service to datasource updates, but not external changes, we might get closer to what users expect.

@ghudgins
Copy link
Contributor Author

a +1 quote:

For example bar chart with a value of “green” with a color assignment of green, but when the dashboard is filtered for a “yellow” value, the yellow colored bars change to a color of green.

@stratoula
Copy link
Contributor

This will be solved by the color by terms project. #101942

@stratoula stratoula added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Feb 15, 2023
markov00 added a commit that referenced this issue Sep 28, 2023
## 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](https://github.com/elastic/kibana/blob/ddd216457d66912de43c7688ae99044c2c34bbd2/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 #155037
close #6480
fix #28618
fix #96044
fix #101942
fix #112839
fix #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](https://github.com/elastic/kibana/assets/1421091/d03e59f8-4a6f-4761-ab4c-c53a57c1723a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants