You can create a structured datatable, dataset or even use Linq and structured objects to render a google datatable so that the charts will know how to use them. I, for instance use a webservice that renders a JavaScript object (JSON) and just eval it in my JavaScript. After that I can do whatever I want.
On 12 בדצמ 2011, at 02:48, Bluestreak2k5 <[email protected]> wrote: 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. -- 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.
