Plotting the result of nested aggregations in kibana

Unfortunately it's not possible to use the pie chart for this - but you should be able to get it to work using vega: Vega | Kibana Guide [7.15] | Elastic

It basically allows you to use your existing query, then define a vega spec to render the chart. This is an example of a pie chart in vega, you should be able to combine it with your query: Pie chart in vega