Yes, you are right, I don't really need to load it using a CSV file. I can use native array format. The reason I was using CSV is because I intent to dynamically load charts into the page. Because of this, the chart is not yet created when you load the page. Only after the user select some specific data file, the chart is created using that data. So I thought about loading the desired data form a php file, in CSV (or array) format, like: www.domain.com/generate_array_page.php?data_id=10 Then save it in a variable, and then load it. After I read the answers to my post, I'm thinking about loading it to a variable using Ajax, then converting using the google.visualization.arrayToDataTable() mentioned before. Any thoughts about that? Better idea?
Thanks all On Jan 25, 4:11 am, rio <[email protected]> wrote: > Im not sure you actually need to make a csv file.. just pass the data > from the database directly into the google dataArray format (ie you > just build the javascript using PHP.) > > I read data from a query and store data into an Array[].. Then > transposed the data out into the googleformat, also putting 0 in where > there was no data. But i think your suppose to use _ (not tested) -- 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.
