I'm using arrayToDataTable to convert set of rows & columns to Table
format.
I need to build a pie chart using two columns of the table but pie
chart should be a after performing an aggregation function on the rows
of the "table".

Ex: Table1
        var data = google.visualization.arrayToDataTable([
          ['YEAR','Country','State','Population'],
          ['2011','USA','CA',2.5],
          ['2011','USA','NY',3.4],
          ['2011','USA','PA',1.2],
          ['2011','CANADA','ONTARIO',0.4],
          ['2011','CANADA','QUEBEC',0.2],
        ]);

I want pie chart to be drawn for Country & Population using this data
(Table2):
Country, Population
USA, 7.1
CANADA, 0.6

Could someone explain how to create Table2 from Table1 dynamically for
the pie chart?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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.

Reply via email to