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 "Top Values" legend appears in ascending order #111873

Closed
PhaedrusTheGreek opened this issue Sep 10, 2021 · 6 comments
Closed

Lens "Top Values" legend appears in ascending order #111873

PhaedrusTheGreek opened this issue Sep 10, 2021 · 6 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@PhaedrusTheGreek
Copy link
Contributor

Kibana version:
7.14.0
Elasticsearch version:
7.14.0
Server OS version:
Elastic Cloud
Browser version:
Chrome
Browser OS version:
MacOS

Describe the bug:
Items in Legend appear in top values ascending order even though setting indicates descending

Screenshots (if relevant):
Screen Shot 2021-09-10 at 11 17 52 AM

@PhaedrusTheGreek PhaedrusTheGreek added bug Fixes for quality problems that affect the customer experience Feature:Lens labels Sep 10, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 10, 2021
@PhaedrusTheGreek
Copy link
Contributor Author

Also just noticed that if changed to a line chart, the display is descending as expected.

@timroes timroes added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Sep 13, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors (Team:VisEditors)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 13, 2021
@ghudgins
Copy link

this is one of those things that's a "feature" not a bug and relates to the vis itself. If you stack your visualization the largest value, by the vis' design, is actually on the bottom. I do fully agree that it can feel like a bug because it's not what you expect...but the legend does match the structure of the visualization (on stacked visualizations the "first" value is on the bottom). One way it's particularly frustrating is when building a dashboard with both stacked & non-stacked visualizations as the legends aren't consistent. (CC @elastic/datavis ) but right now, beyond some of the longer features outlined on the legends meta in the charts repo (elastic/elastic-charts#580), i'm not sure we can just change this as it's a compromise to the single stacked visualization's readability / design.

What do others think? I see why it is what it is and have personally felt the "this is a bug" feeling on my dashboards because of this behavior...but don't think we should change it because we'd be compromising the optimal vis design for stacked.

@flash1293
Copy link
Contributor

We track the general feature of granting more control over sorting in general here: #86184

I almost want to close this in favor of the general issue, but if there's a quick fix to get this specific problem (stacked vs. non-stacked legends) under control in the short term, that would be cool as well. @markov00 do you have an idea how to make behavior more consistent for now without changing the whole approach or pushing this decision to the user?

@flash1293
Copy link
Contributor

Closing in favor of #86184

@ghudgins
Copy link

ghudgins commented Nov 3, 2021

@flash1293 I was talking about this with @mfinkle and are we sure that client side sorting is the same as legend-sorting and they shouldn't be separate issues? This might just be me but:

i'm using top values
when i'm using top values sorted on the data descending
I need to specify a separate sort for just the legend
so I can have sorted bars (top values) and a legend that is in a more readable order (at the cost of "matching the vis" which is what it does today)

i'm using filters
when i'm using a bunch of filters or several independent series defined differently
I need to specify a client sort (#86184) for just the bars
and (maybe) a special sort on my independent series / filter that's alphabetical
So I can have organized bars (#86184)
and so I don't have to re-order my independent series myself in the UI
in the case of using top values the client side sort is not needed (the bars are sorted based on the settings of top values) but the setting we need is separate

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

5 participants