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] Set colors for y-axis series #53660

Closed
AlonaNadler opened this issue Dec 19, 2019 · 8 comments · Fixed by #70311
Closed

[Lens] Set colors for y-axis series #53660

AlonaNadler opened this issue Dec 19, 2019 · 8 comments · Fixed by #70311
Assignees
Labels
Feature:Lens Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.

Comments

@AlonaNadler
Copy link

AlonaNadler commented Dec 19, 2019

ability to set a custom color to y-axis series, currently, all series are in the default color. We would like to allow users to customize and define the color
image

cc: @cchaos

@TinaHeiligers TinaHeiligers added the Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. label Dec 26, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-design (Team:Design)

@wylieconlon
Copy link
Contributor

Because we want to support both Y-axis coloring and Break down coloring, we need to decide how the two settings will interact.

I propose that whenever there is a Break Down by set, the Y axis color option will disappear. This is because the Break Down by creates multiple series that will have different colors, so for example Kibana Airways and Logstash Airways should have different colors even though both are on the Y axis.

@AlonaNadler
Copy link
Author

I propose that whenever there is a Break Down by set, the Y axis color option will disappear.

Sounds good @wylieconlon

@cchaos
Copy link
Contributor

cchaos commented Feb 10, 2020

I had worked on some mocks of this concept as well. Here's how it could be handled in the layers panel.

Screen Shot 2020-02-10 at 14 47 59 PM

@flash1293
Copy link
Contributor

@wylieconlon We talked offline about it being difficult to show the colors in the configurator because they are a runtime thing, but if it's just about colors for individual series as long as no split dimension is defined, I think we can do it by using the same round-robin logic as in the renderer.

@flash1293
Copy link
Contributor

Synced with @wylieconlon and @mbondyra about this and as a first version to get the functionality in quickly, we will just provide the color picker in the dimension popover, without the extra indicator in the config panel itself.

Some details about how it works:

  • To use this, we need to handle the round-robin color assignment ourselves (currently elastic-charts is doing it based on the theme) - in the color accessor function we can hook into overwritten color
  • This will be xy-chart only for now (because no other chart type can use a metric color in a meaningful way). Later it might get helpful to keep metric-level colors when switching chart types, this can be solved once [Lens] Allow users to select chart level categorical color palette #68404 is implemented putting the foundations for shared state in place
  • To reduce technical complexity, there are two modes - "auto-assign color" (the current behavior) which will reliably pick colors for the metrics based on their rank and "overwrite" color, overwriting the auto assigned color for the current metric but keeping colors for all other metrics the same

@AlonaNadler We will prioritize this work over #68404 for now.

@AlonaNadler
Copy link
Author

That make sense to me. Thanks for the details @flash1293

@cchaos
Copy link
Contributor

cchaos commented Jun 26, 2020

To reduce technical complexity, there are two modes - "auto-assign color" (the current behavior) which will reliably pick colors for the metrics based on their rank and "overwrite" color, overwriting the auto assigned color for the current metric but keeping colors for all other metrics the same

I'm mostly fine with this if we can try to keep it as a single control. I don't want to have to introduce a toggle or something for users to have to first switch into manual mode in order to change colors. Happy to talk options about what EUI has in order to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants