Is it possible to aggregate close by data points?

Hi, I’m trying to reproduce the log level graph we get in the explorer.

I have the follow query:

sum by(level) (count_over_time({foo="...", bar="..."} [10m]))

The problem is that I have a ton of logs, so a ton of data points and the bar chart looks cluttered with tons of little bar.

I was wondering if it was possible to skip or average every 5 points together?

Not sure if this is related Grafana or LogQL related.