On Saturday, February 9, 2019 at 1:01:49 PM UTC-6, Proraso wrote: > > I'm trying to create a *Google Line Chart* with *data from MySQL* and > found this documentation: > "Populating Data Using Server-Side Code" ( > https://developers.google.com/chart/interactive/docs/php_example) > > The example shows how JSON data (sampleData.json File) should look like, > but I am missing a *MySQL Data Table* example here. > How should the database table look like and how to get the data from > database in JSON format? >
I think in that example the chart is being created with the returned JSON from getData.php. I don't know what your server side language is but I think you would replace getdata.php with a a file in your server language (maybe my_file_to_get_some_data.aspx). You file would need to query your mySQL database, get the data you want, and return it to the function in JSON format. You might look here: https://stackoverflow.com/questions/41758870/how-to-convert-result-table-to-json-array-in-mysql -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/384d6a6e-b084-4056-9fc7-9e801a235041%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.