-
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
Added option to display 'Others' buckets in the pie chart #7464
Conversation
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
This is a good effort, but unfortunately it doesn't address the two major blockers mentioned in #1961:
We really need elastic/elasticsearch#12411 to fix this issue properly. |
You are right, the pull request does not resolve #1961. So maybe my first sentence was a bit too optimistic. I added a general command to #1961. The following comment is more specific for this pull request. The proposed change just uses the information already returned by ES and enhances the visualisation with that. The three options are:
What do you think? Maybe I have to change the names of the options?
|
Is there a compelling reason not to fill up the outer ring? It seems like we should either fill them all up, or leave them all empty so that the "other" bucket is always visually consistent across parent and sub-aggregations. I'll try to play around with this some more and get you more detailed feedback. I'd also like someone a bit more familiar with the vislib to take a look, @panda01 maybe? |
Since there is no real sub-aggregation for the "others" bucket, the outer ring just repeats the information already present in the parent bucket. If it is not filled up, it is a visual sign that the information is not present. I think that there are good arguments for both and it depends on the use case. |
@FlorianLiers sorry for the lag time on this, we've been busy the last couple weeks trying to get the 5.0 alpha4 release out the door. I spent some more time with the PR today and I have a few concerns.
I'm torn on this because I totally get how useful this feature is for a particular use case. But an implementation without any changes in Elasticsearch comes with a lot of caveats. I'd love to get some thoughts from another dev who's more familiar with the Viz lib. @rashidkpc or @panda01 do you guys have any thoughts on this? |
I agree with @Bargs, the implementation here solves a single problem in the pie chart, but creates other problems. If we were going to patch the bug in Elasticsearch on the UI side, it would be done on the level of the terms agg. That said, I don't think we should solve this in Kibana at all. "Other" should be a real bucket in Elasticsearch, faking it on the UI side will only lead to confusion. |
@rashidkpc following the trail of issues this boils down to an issue that is marked as "explore" and "high hanging fruit" elastic/elasticsearch#12316 (if i am not wrong) the result is that Kibana 4 has this major gaping hole at the moment How about indeed considering the compromise with the fix at term agg level? please consider that elasticsearch SEVERAL TIMES returns incomplete/incorrect results and its just after a lot of investigation that one finds out that that is the case (E.g. distinct values). Nobody has warned the users there. I would say this would not be worse thanks for considering |
Can one of the admins verify this patch? |
I'd take a patch adding notes to the aggregations to explain the approximate nature of them, that absolutely seems reasonable. The proper place to so solve this is in Elasticsearch. I encourage you to make a note on elastic/elasticsearch#12411 |
Thank you for the analysis, @Bargs. If the option should be located the aggregation option, that would be fine for me. If that is the only blocking issue, I would be glad to do this change. The difference between the count and non-count results seems to be a natural one. How to show a 100% sum, if there is some input missing. I would formulate it the other way round: If a user knows that the results are not showing 100% of the counts, Kibana 4 does not provide any means to show that in the pie chart. And the comments in #1961 indicate that there are a lot of power user that require this feature. Which “other problems” do you see, @rashidkpc? Are you referring to the same issues @Bargs mentioned or do you see others? I do not see any attempt of ES to fix this issue. The solution I propose is like a browser polyfill for ES: Use a future feature of ES now. :-) As I mentioned in #1961, even if ES is fixing this, it might not the result that the users require. Just as a note: elastic/elasticsearch#12411 is not about a other bucket (it states that “term aggregation now provides other bucket”). It is about the sub-aggregation done within the other bucket. So, as long as you do not require a sub-aggregation in the other bucket, ES will not provide you any other solution as already provided today. |
That's exactly the problem though, a normal user won't realize that some of the input is missing. If we expose an option on the terms agg called "Show Others" most users will expect it to work for all metrics. If it only works for Count, users will either be disappointed (if they understand the issues) or misled (if they don't). elastic/elasticsearch#12411 should provide what we need because metrics are simply sub-aggregations. Clint does mention a potential workaround on that ticket though. A "Show Others" option could issue two requests, one for the "Top N terms" and a second for "everything except the Top N terms". Such an implementation should work across all viz types and all metrics. I don't necessarily know what all the ramifications of such an implementation would be off the top of my head, but if it could be accomplished without adding a huge amount of complexity to the existing code, I would be receptive to it. |
Hmm ... this already has a discuss label on it but just as a note ...
What I feel really strongly about is that we should not just wait for es to solve this for us (specially when it seems this might take a while). Of course for a perfect solution we depend on them, but that doesn't mean we can't offer a big improvement and much better experience to our users before. |
Can one of the admins verify this patch? |
I totally agree, but at least it's consistent. This PR introduces inconsistency and as a result, even more confusion. All of the metrics need to work the same way.
We extract the data from the response but we rarely (if ever?) crunch the data in any way. That's not an argument against additional data processing, just a word of caution that we'll be creating new precedents if we do.
If there's a pressing need for this, we should talk to the ES team directly and explain why it's important to us before writing any hacks of our own. |
Per discussion above, marking this as stalled on Elasticsearch for now. We should discuss with them the likelyhood of elastic/elasticsearch#12411 happening, because that is also marked as "stalled". |
This has been stuck for months, but there are many users out there who need accurate accounting of the full results set within visualizations, even if there are limitations on the sub aggregations within that "other" block. Living with that limitation is better than the current results that end up being at best incomplete and at worst misleading. |
We seem to be blocked here. I'm going to close this PR for now, since it's not really clear if/when elastic/elasticsearch#12411 is solved, this change would be still the starting point. Thanks for the contribution @FlorianLiers! |
after talking to @tbragin, reopening this. We will confirm with ES team first before making a call here. |
Can one of the admins verify this patch? |
we decided we will tackle this in another way, but might take a while to happen as we are blocked on few other changes. What we need to do is issue two (or more) requests to elastic search to get all the data that we need and this is currently not possible in visualize. |
Is there a new issue or pull request those of us who desperately need this functionality can follow? |
the old issues are still relevant. |
The "Group other values in separate bucket" still not working. Neither for line charts, nor for bar charts. There's a box to tick, but it does nothing, no "other" bucket is created and no "other" bucket adds up to final result. You should remove the checkbox if it doesn't work. |
`v92.1.1`⏩`v92.2.1` --- ## [`v92.2.1`](https://github.com/elastic/eui/releases/v92.2.1) **Bug fixes** - Removed unintentional i18n tokens in prior release that should not have been exported ## [`v92.2.0`](https://github.com/elastic/eui/releases/v92.2.0) - Updated `EuiFlyoutResizable` with new optional `onResize` callback ([#7464](elastic/eui#7464)) **Bug fixes** - Fixed an issue in `EuiResizableContainer` where `onResizeEnd` could become a stale closure when renders occured between resize start and end, resulting in an outdated version of a consumer's `onResizeEnd` callback being called ([#7468](elastic/eui#7468)) - Fixed `EuiTextArea` to correctly fire `onChange` callbacks on clear button click ([#7473](elastic/eui#7473)) - Fixed `EuiContextMenu`'s panel titles & items to not show underlines on hover for non-interactive elements ([#7474](elastic/eui#7474)) **Deprecations** - Remove unused public `EuiHue` and `EuiSaturation` subcomponent exports. Use the parent `EuiColorPicker` component instead ([#7460](elastic/eui#7460)) - Remove unused public `EuiCommentTimeline` subcomponent export. Use the parent `EuiComment` or `EuiCommentList` components instead. ([#7467](elastic/eui#7467))
`v92.1.1`⏩`v92.2.1` --- ## [`v92.2.1`](https://github.com/elastic/eui/releases/v92.2.1) **Bug fixes** - Removed unintentional i18n tokens in prior release that should not have been exported ## [`v92.2.0`](https://github.com/elastic/eui/releases/v92.2.0) - Updated `EuiFlyoutResizable` with new optional `onResize` callback ([elastic#7464](elastic/eui#7464)) **Bug fixes** - Fixed an issue in `EuiResizableContainer` where `onResizeEnd` could become a stale closure when renders occured between resize start and end, resulting in an outdated version of a consumer's `onResizeEnd` callback being called ([elastic#7468](elastic/eui#7468)) - Fixed `EuiTextArea` to correctly fire `onChange` callbacks on clear button click ([elastic#7473](elastic/eui#7473)) - Fixed `EuiContextMenu`'s panel titles & items to not show underlines on hover for non-interactive elements ([elastic#7474](elastic/eui#7474)) **Deprecations** - Remove unused public `EuiHue` and `EuiSaturation` subcomponent exports. Use the parent `EuiColorPicker` component instead ([elastic#7460](elastic/eui#7460)) - Remove unused public `EuiCommentTimeline` subcomponent export. Use the parent `EuiComment` or `EuiCommentList` components instead. ([elastic#7467](elastic/eui#7467))
`v92.1.1`⏩`v92.2.1` --- ## [`v92.2.1`](https://github.com/elastic/eui/releases/v92.2.1) **Bug fixes** - Removed unintentional i18n tokens in prior release that should not have been exported ## [`v92.2.0`](https://github.com/elastic/eui/releases/v92.2.0) - Updated `EuiFlyoutResizable` with new optional `onResize` callback ([elastic#7464](elastic/eui#7464)) **Bug fixes** - Fixed an issue in `EuiResizableContainer` where `onResizeEnd` could become a stale closure when renders occured between resize start and end, resulting in an outdated version of a consumer's `onResizeEnd` callback being called ([elastic#7468](elastic/eui#7468)) - Fixed `EuiTextArea` to correctly fire `onChange` callbacks on clear button click ([elastic#7473](elastic/eui#7473)) - Fixed `EuiContextMenu`'s panel titles & items to not show underlines on hover for non-interactive elements ([elastic#7474](elastic/eui#7474)) **Deprecations** - Remove unused public `EuiHue` and `EuiSaturation` subcomponent exports. Use the parent `EuiColorPicker` component instead ([elastic#7460](elastic/eui#7460)) - Remove unused public `EuiCommentTimeline` subcomponent export. Use the parent `EuiComment` or `EuiCommentList` components instead. ([elastic#7467](elastic/eui#7467))
The change implements the "Others" bucket for the pie chart as discussed in #1961 or #3817. Moreover, it provides a work-around for #7451 by showing the "Others" buckets.
The implementation may be a base for "Others" buckets for other charts as well. It is backwards compatible, since it is turned off by default. Original implemented for Kibana 4.5 (with ES 2.3.1) but works for 5 as well.
The implementation modifies the results from ES and adds "Others" buckets, if possible. In particular, it can not add such buckets in the very first aggregation for non-count metrics. For sub-aggregations, the parent buckets is used as reference for 100%.
The new feature looks like this:
![kibana - other buckets](https://cloud.githubusercontent.com/assets/2843045/16077086/f2ac2692-32f6-11e6-91e7-668ba480c4ad.png)