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] Allow setting custom colours to collapsed by slices pie's multiple metrics #159808

Closed
MichaelKatsoulis opened this issue Jun 15, 2023 · 3 comments · Fixed by #160592
Closed
Assignees
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

@MichaelKatsoulis
Copy link
Contributor

After this #143966 PR was merged we can now use Pie charts with multiple metrics. The problem is that we cannot adjust the colour of each metric.
This is a problem because it can end up using colours that don't make a lot of sense for specific metrics.
An example is if we are showing pods not running or pods running. For that it would be best to use green for running and red for not running.
But we end up in this that is not ideal:

multiple-metrics
@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 15, 2023
@MichaelKatsoulis MichaelKatsoulis added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jun 15, 2023
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jun 15, 2023
@stratoula
Copy link
Contributor

This happens when the collapse by is selected. It must be an easy one!

@stratoula stratoula added 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. labels Jun 15, 2023
@mbondyra mbondyra self-assigned this Jun 26, 2023
@drewdaemon
Copy link
Contributor

It looks like I missed this case in #143966. I guess we need to switch into the multi-metric color mode when all the slice-by dimensions have been collapsed (not just removed).

This check will probably also need to be expanded to enable the color picker:

const disabledMessage = currentLayer.primaryGroups.length

etc. etc. :)

@mbondyra mbondyra changed the title [Lens] Allow setting custom colours to to pie's multiple metrics [Lens] Allow setting custom colours to collapsed by slices pie's multiple metrics Jun 27, 2023
mbondyra added a commit that referenced this issue Jun 29, 2023
…iple metrics (#160592)

Fixes #159808 

It was working before, the only missing point was you couldn't color
when all groups were collaped by.


1. Moved dimension editor code to separate file.
2. Removed StaticColorValue component and used `ColorPicker` that we use
for other places in the code
3. Fixed the issue for pie (hopefully tested everything now)
4. Fixed the issue for xy chart. To reproduce - create a date histogram
xy chart, assign color to the Count of records. Then create a breakdown
dimension and collapse it. Open dimension panel for count of records -
the displayed color is the default one, not the one we assigned.
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