I have created a line chart with a date histogram on the x-axis in Kibana. On the y-axis I have put a count aggregation that is split using a terms aggregation. The terms aggregation gives the ability to select the top n by some aggregation (count in my case). However, this top n seems to be selected per time interval instead of globally.
As a result, setting the limit to 5 in the terms aggregation can result in many more lines in the graph (not every term occurs in every time interval). Is there a way to limit the total number of lines in the graph? Preferably I would select the top n ordered by the count over all time intervals instead of per time interval.
Note: I am using Kibana 4.4.2 and Elasticsearch 2.3.3.