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] Regular bar chart stacked on histogram x axis when using multiple layers #72243

Closed
flash1293 opened this issue Jul 17, 2020 · 5 comments
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens good first issue low hanging fruit Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@flash1293
Copy link
Contributor

flash1293 commented Jul 17, 2020

Kibana version: master

Describe the bug: When a Lens chart has more than one layer with a histogram x axis, then bars are stacked even if non-stacked bar chart is selected. This is happening because enableHistogramMode is set to true.

Steps to reproduce:
Screenshot 2020-07-17 at 10 44 54

Expected behavior:
The bars should not be stacked

Any additional context:
Our logic for enabling histogram mode is this: isHistogram && (seriesType.includes('stacked') || !splitAccessor):
https://github.com/flash1293/kibana/blob/bbda3f99ef0d9780bcf1b9af88d26e3cc04e316e/x-pack/plugins/lens/public/xy_visualization/xy_expression.tsx#L448

If series has histogram x axis and is either of a stacked type or doesn't have a "break down" dimension, use histogram mode

This logic is missing the multiple layer case and the multiple metric case - in both cases we can't use histogram mode. The logic should be extended.

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience good first issue low hanging fruit Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jul 17, 2020
@elasticmachine
Copy link
Contributor

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

@PavithraCP
Copy link
Contributor

Hello @flash1293, I'm interested in picking this issue. Please let me know if this is still available.

@flash1293
Copy link
Contributor Author

@PavithraCP I assigned you to the issue, let me know when you have questions

@PavithraCP
Copy link
Contributor

@flash1293 I've raised a PR https://github.com/elastic/kibana/pull/78525/files for this issue. I've added the logic to not enable histogram mode for multiple layer case. The issue description states that we need to disable histogram mode for multiple metrics case too. However, I couldn't quite understand what multiple metrics would translate to in the code. My initial guess is that it's related to the xScaleType parameter, please lmk if this sounds right.

@wylieconlon
Copy link
Contributor

Closed by #78525

Lens automation moved this from Minor bugs to Done Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens good first issue low hanging fruit Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Done
Development

No branches or pull requests

4 participants