-
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
Pie chart sub-agg slices show incorrect percentage in relation to parent bucket total #7451
Comments
This behavior is actually intentional: #2981 I can see how "percent of the whole" could also be a useful metric though. Perhaps we could create an option to add "percent of the whole" to the tooltip in addition to "percent of the slice"? |
#2981 seems to fix #2972, which was about wrong percentage calculations (like 192% as shown in the screenshot). I guess that #2981 was more about fixing the percentage calculation itself and not about the base used for the calculation. So, I wonder if it is really "intentional". Having an option is always nice. 😉 From my point of view, the tooltip is not the important problem here. It is more about the slices of the pie chart itself. Pie charts are about showing percentage values and the inner ring defines which absolute value is 100%. In contrast, the current implementation switches to differenet absolute values for 100% for each bucket. That seems to be a perfect behaviour for a "split chart". Then you get one circle per sub-aggregation and each is using its own absolute value for 100%. But if all aggregations are shown in one pie chart, the outer rings should be expressed in percentage of the innermost ring. |
I see exactly what you mean now. I agree, the current representation could be misleading. I don't think there's any harm in providing an option for a "percent of the whole" view. I'll follow up on your PR. |
I agree with FlorianLiers opinion. Multilevel pie chart is used to visualize hierarchical data otherwize you put them next to each other. Best is to avoid pie at all and use bar charts, plots etc. |
Tooltip should be used to show details on one particular segment, not explain any own invented definition of mlevel piechart. |
If you have three rings, the outermost ring should have the 2nd ring in the middle as base. Hierarchical like parents and childs, i guess bucket and sub-bucket. Sorry for misunderstanding. |
Missing and other buckets are now supported in pie charts as of 6.2. Closing this out. Please feel free to re-open if it does not meet the customer requirements. |
The percentage value of sub-aggregation buckets relate to the sum of the buckets of the sub-aggregation. For drawing the pie chart, the percentage should relate to the value of the bucket of the parent aggregation.
The following example shows a pie chart summing up the durations for jobs. The jobs are clustered with two term aggretaions. For the biggest bucket of the first aggregation, the sum is about 3,6M seconds. One bucket of the sub-aggregation has a sum of 446k seconds. Kibana shows that this 446k are 32.98% of 3,6M, which is not useful. 446k are only 32.98% of the sum of all buckets of the sub-aggregation and not of the parent bucket.
I would expect Kibana to show the bucket of the sub-aggregation with 12%. The "missing percentages" should either be filled-up with a bucket called "Others" (as in more general dicussed in #1961) or just be "blank" (like for the last bucket of the first aggregation in the example picture).
Please note: The issue applies only to the sub-aggregations (the outer rings) and not to the first aggregation, since the first aggregation does not have a "parent" value.
Kibana versions: Tested with 4.5 and 5
The text was updated successfully, but these errors were encountered: