Kibana Pie chart with multiple segments and different aggregations


(Gunay) #1

Hi,
I have a Kibana pie chart with two segments as show in the image. As aggregation each segment has "sum" of a field called "duration.time". I would like have a different aggregation for each segment. For example, "sum" of a field called "duration.time1" for the first segment and "sum" of another field called "duration.time2" for the second segment. Is it possible to do this using the UI of Kibana or modifying the "visState" code of the pie chart. The "visState" for this graph is below. Thanks in advance.

{
"aggs": [
{
"id": "1",
"params": {
"field": "duration.time"
},
"schema": "metric",
"type": "sum"
},
{
"id": "2",
"params": {
"field": "level0.raw",
"order": "desc",
"orderBy": "1",
"size": 0
},
"schema": "segment",
"type": "terms"
},
{
"id": "3",
"params": {
"field": "level1.raw",
"order": "desc",
"orderBy": "1",
"size": 0
},
"schema": "segment",
"type": "terms"
}
],
"listeners": {},
"params": {
"addLegend": true,
"addTooltip": true,
"isDonut": false,
"shareYAxis": true
},
"type": "pie"
}


(Lee Drengenberg) #2

I can't see the rest of your settings as the screenshot clipped off the sub-bucket split slices, but I think you can do what you're asking.

In the screenshot I pasted below, my inner pie (the first bucket of split slices) is aggregated on the Sum of bytes (in your case it would be sum of duration.time1).
And the second outer pie slices are aggregated on the Sum of memory (in your case it would be sum of duration.time2).


(system) #3