Populating Data Using Server-Side Code : missing MySQL example

52 views
Skip to first unread message

Webmaster Trendlinedata

unread,
Feb 9, 2019, 2:01:49 PM2/9/19
to Google Visualization API
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?


madhukar korakandla

unread,
Mar 4, 2019, 10:48:38 AM3/4/19
to Google Visualization API

Hi Proraso,

i have also same requirement, get the data from database and display the combochart, do you have any example how to configure, beacsue i am new to google charts.

Thanks
Madhu

Heywood Buzzfuddle

unread,
Mar 13, 2019, 5:49:10 PM3/13/19
to Google Visualization API


On Saturday, February 9, 2019 at 1:01:49 PM UTC-6, Proraso wrote:
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:

   
Reply all
Reply to author
Forward
0 new messages