Irregular behaviour between "Count", "Sum" and "Unique Count" aggregations

I have a bar chart where I plot the Count of documents, with a fixed interval of one minute. I have noticed that when the interval is scaled due to too many buckets, it keeps the x-axis label "timestamp per minute", and that it behind the scenes divides the count by the number of minutes in the new interval. This also happens with a Sum aggregation.

When doing the same with Unique Count, this does not happen, and the x axis label changes to the new interval, e.g "timestamp per 3 hours". I find this unintuitive and undocumented.

I think that this feature should be enabled/disabled with a checkbox, both for Count, Sum and Unique Count. It's a great feature. My use case is that I use Unique Count to plot concurrent sessions. This breaks when the interval scales up, since the bars show the total of the entire interval, and not the average. It would be great if it could calculate an average as with Sum and Count.

This would probably be better off as an issue on GH, the dev team may otherwise miss it here :slight_smile:

Yes, it turned out more like an issue than a question, but actually I wanted to know if this is intentional and what the thoughts behind it is. I'll put it up at GH as well.

Awesome, thanks for that :slight_smile: