Auto-aggregating for bar chart