Ok, I get what you want to do now. I don't think the query language can
help you there, as the column labels are never returned as data points in a
column when pivoting. Query to get the sum of all columns, and pivot
manually after you get your data back:
// assume data1 is a dataTable object with the data returned from your
query, data2 is a dataTable set up however you like, and cols is the number
of columns in data1:
for (i = 0; i < cols; i++) {
data2.addRow([data1.getColumnLabel(i), data1.getValue(0, i)]);
}
then draw your chart with data2.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/q3lYmhxJk4QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.