The ChartWrapper supports Charts data source URLs - https://developers.google.com/chart/interactive/docs/queries If you can't make your data available via a URL then you can fetch the data to your client and create a google.visualization.DataTable. Once you have the data table you can create a google.visualization.ChartWrapper and assign it's "dataTable" field. Controls would now accept your ChartWrapper and should operate normally.
HTH ChartMan On Sun, May 20, 2012 at 9:15 AM, Geneocide <[email protected]> wrote: > sorry post was breaking. Here's the link to the demo I tried to post. > > https://code.google.com/apis/ajax/playground/?type=visualization#chartwrapper_with_remote_data > > Also, the data is just strings and numbers > > On May 19, 10:56 pm, ChartMan <[email protected]> wrote: > > You can definitely use controls regardless of where or how your data is > > queried to the client. > > what type of data (column types) are you using and what is failing? > > On May 20, 2012 7:42 AM, "Geneocide" <[email protected]> wrote: > > > > > > > > > > > > > > > > > First, I apologize for being a newb, but I am. > > > > > I have a mysql database that I've been querying with PHP and drawing > > > charts from the results after I format the results to JSON. It looks > > > something like this.... > > > > > function drawYearlyChart() { > > > var jsonData = $.ajax({ > > > url: "getYearlyData.php", > > > dataType:"json", > > > async: false > > > }).responseText; > > > > > //create data table out of JSON data > from > > > server > > > var data = new > > > google.visualization.DataTable(jsonData); > > > > > //instantiate and draw chart > > > var chart = new > > > > > > google.visualization.SteppedAreaChart(document.getElementById('yearlyChart' > )); > > > chart.draw(data); > > > } > > > Is there a way to use controls with this sort of data source? I've > > > been looking at the documentation and I can't see a way to do it. When > > > I play around with what I got I don't get any helpful errors or > > > anything. Tips would be appreciated. > > > > > -- > > > 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. > > -- 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.
