In a normal Kibana PieChart(and many other views) you typically do a top N bucketizing. You have the option to show the percentage of missing and the number of results that fall outside the top N.
How do I do that with PIE charts in Canvas, using SQL. If I use LIMIT it will just give me the top N results?
In the below query I exclude the missing and only get the top 5 results.
I care less about the missing but I would like to group the missing ones in an "other" group.
The Pie chart does not support that. But maybe Elastic SQL does?
SELECT Count(identifier) as count,
from document.CountryName.keyword as Country
FROM "ourlogs-*"
WHERE Country is not null
group by Country
order by count DESC limit 5
Anyone has a suggestion on how to do that?