research800
unread,Apr 19, 2012, 1:57:56 PM4/19/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
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?