-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 client-side sorting of dimensions and legends at datasource level for all chart types #86184
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
I ran into this use-case today when doing a bar visualization with filter buckets on resulting counts. An option to sort(client/render side is fine) would be nice. As a user, I'd expect this as an option under 'panel'. Note the Legend options already include an "order buckets by sum"; a similar type of option could be offered for the actual visualization display itself. |
cc @MichaelMarcialis I wonder whether this would also handle the table use case you had in mind |
Got another use case example from discuss: the use case is to take the "largest 20 values, but display them in ascending order". This can only be done by applying the sort order after we receive the data from Elasticsearch. |
Forgive the potentially silly question on my part, but how does this differ from the current Regarding the table row/column sorting options I was playing around with, I think that scenario is unique as there may be multiple row/column dimension items present, which then increases the complexity of the opposite dimension group's sorting options. But if I'm oversimplifying, let's plan to chat further after the holidays. |
@MichaelMarcialis The "top values" aggregation is doing sorting in a unique way, which is documented by Elasticsearch. It's not meeting our user's needs though, as shown in the 5 examples that I've listed in the issue description. That's why I've proposed a sort override feature which would let us provide what users are asking for. |
Related discuss issue: https://discuss.elastic.co/t/sorting-in-kibana-data-table-visualization/274200/1 |
might want to consider this option on table even though you can use the column sorting options today
|
Related issue #17532 |
There are any deadline for this issues? |
Primary capabilities we expect from this feature
User story
Sort order affects the understanding of the data, but not all charts allow custom sorting. This is a frequently-requested feature when users run into one of the aggregation limits of Elasticsearch. Here are some example use cases and limitations:
Sorting data by metrics / methods underlying API does not offer
Sorting the legend separately from visualization
Example before and after
This visualization is using math to calculate the "max - min" value per bar. The natural sort order is not helpful, so we actually want to apply client-side sorting based on the number displayed:
Proposed functionality
Each dimension will offer an advanced setting that does client-side sorting, visible in the flyout editor. This setting would be called "Sort override" and have the options "No override", "Ascending" and "Descending". Numbers and dates would be sorted based on the raw value, and all other types would be sorted based on the formatted value.
The text was updated successfully, but these errors were encountered: