Loop through an array of data, after creating an array from the
database.

var data = new google.visualization.DataTable();
length = stateArray.length
data.addRows(length);
data.addColumn('string', 'State');
data.addColumn('number', 'State Rank');
for( var i=0; i<length; i++)
{
        data.setValue(i, 0, stateArray[i]);
        data.setValue(i, 1, stateArray[i][stateRank]);
}

Thats how I do it. There are probably easier ways to do it.

-- 
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