Reputation: 1800
I have a google bar chart here:
http://jsfiddle.net/jeag1gva/1/
What I want to do is group the costs for each month, so the chart would be:
January: Sum of all costs in january, Februray: Sum of all costs in february .. you get the idea
I figured the query:
query.setQuery("select A, sum(C) group by A ");
would add up all the numbers in C the C column, and return them, but that doesn't work.
I haven't had any luck with formatters either.
Has anyone done this before?
The resulting chart would look something similar to this:
except it'd only have one bar on the horizontal axis.
Upvotes: 2
Views: 1380
Reputation: 14550
Changing the query to query.setQuery("select min(A), sum(C) group by month(A)");
aggregates the costs per month.
The formatter seems to be being applied. What's the issue you're seeing with it?
Upvotes: 2