-
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
Bar in a bar charts are getting unsorted when adding a sub-bucket aggregation #17532
Comments
Thanks for the report. I am able to reproduce this with
There could be a possible workaround for you. Can you try switching the "Order By" of the "Split Series" to "Term" (or whatever the third option is) instead of using "metric: Count". Since you have all possible 3 sentiment values within each of the author buckets, this might work. |
Believe we have this issue as well (ES + Kibana both 6.2.3) - I lodged at https://discuss.elastic.co/t/sub-aggregation-graph-ordering-off-first-bucket-not-overall-data-set/132216 and was pointed at this existing request. What appears to be happening is that the sorting (for the legend and each bar graph) is based on the popularity of the sub-aggs in the first bar graph. The same ordering is then applied to every single bar graph - if your data sample for the first bucket is an outlier (as I do in the screenshot below) then this leads to a pretty illogical UX for the rest of the graph. This assumption seems to be consistent across all the samples other users have provided. The expected output (in my opinion) is that the all sub-aggregations should be considered in the whole displayed time period and then the sorting of the legend and within each bar graph should reflect all data points, not just the first buckets sub-aggs. Some may expect that each bar in the graph is ordered based off it's own sub-aggs - maybe this is a user selectable option as I feel if you ask 100 people for their opinion, you'd get 150 different answers. CCM |
Hey, this is still an open issue in 6.4.2. Anyone know if any progress has been made on this? This is seriously impacting our users. #25687 |
An exploratory PR (#27723) was opened to investigate this, and here are our findings after much discussion (some of which is captured in the PR comments). There are really two things that are causing confusion:
I'm not sure if @melvynator intended for this issue to address item 1, item 2, or both, but for the time being I opened #31534 to track item 1 separately. (A solution for that issue is already in progress) As for item 2, there are a lot of things to consider:
Since this change would be a team effort that requires overhauling large portions of vislib, I'm going to keep this issue open for now in order to keep tabs on item 2 until we can set aside some time to tackle it properly. The good news is that item 1 should be fixed any day now, and we have a much clearer picture of the effort that would be involved to make item 2 happen. |
Any update on when this issue will be addressed and which version can we expect this to be fixed? |
Hello, This is to also 👍 and follow up from another discussion and it's conclusions on this subject made here. To summarize: issue can be reproduced with the Kibana demo here As @lukeelmers pointed out:
Nested buckets allow for 'groping' the data by some criteria, the most-inner bucket being a 'sort-of' result meant to present / make sense of the data. Currently it is possible to:
I think that if 'Order by' that is set against a particular bucket is not applied within this bucket,
When it is possible to control and apply the 'SortBy' to a selected bucket - this 'Size' related issue will also get addressed. When someone really depends on a deterministic behaviour, being able to control aggregation results in regards to sorting is something that is really needed. Sorry if I sound sarcastic - this is not the intention, really - I'm just trying to point out that I really care, and know it could be done better. I can even spare my time to help if possible / needed - just let me know! Thanks! |
Closing this because the 6.x version is not anymore under maintenance. Please upgrade to the latest 8 version |
Kibana version: 6.2.2
Elasticsearch version: 6.2.2
Server OS version: Mac OS
Browser version: Google chrome Version 65.0.3325.162 (Official Build) (64-bit)
Browser OS version: Chrome 65 on Mac OS X 10
Original install method (e.g. download page, yum, from source, etc.): Download page
Description of the problem including expected versus actual behavior:
The problem appears when adding a sub-bucket to a bar chart. If I have this bar chart:
It's a simple terms aggregation on a specific field.
If I want to split the series using another terms aggregation the sorting will be messed up:
This visualisation is not in accordance with the elasticsearch response:
It may be because of the polarity of certain bucket, but I have no mean to confirm this hypothesis.
Steps to reproduce:
@thomasneirynck I would provide a dataset ASAP
The text was updated successfully, but these errors were encountered: