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] It displays empty legends values with filtered metrics #101585

Closed
shahzad31 opened this issue Jun 8, 2021 · 3 comments
Closed

[Lens] It displays empty legends values with filtered metrics #101585

shahzad31 opened this issue Jun 8, 2021 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@shahzad31
Copy link
Contributor

In lens, if you do filtering (filtered metric) and breakdown on same field in lens, it displays legends values only for filtered metrics but in legends it displays all legends values from breakdown field

example screenshot
image

@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 8, 2021
@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed needs-team Issues missing a team label labels Jun 8, 2021
@elasticmachine
Copy link
Contributor

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

@flash1293
Copy link
Contributor

This is happening because the "top values" function doesn't "know" about the applied filter and is determining terms by looking at the full set of documents.

I don't see a straight-forward fix here:

  • Filtering terms as well doesn't always work as there might be other metrics which are not filtered / filtered by something else
  • Having a filter on the terms agg itself instead of the individual metric seems confusing
  • Filtering the legend in the chart is brittle - e.g. for the count or sum metrics, the values are 0 instead of null. Not sure whether "filter all series which are always 0 or null/undefined" would work in all situations

@flash1293
Copy link
Contributor

We discussed this and decided to not implement a quick-fix for this scenario because it's an edge case and adding a new high level concept / setting will add more complexity than justified. Once we implement #86190 , this can be solved in a nice way.

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 Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants