Hello,

I have a lot of json-files with different data from my database and want to 
populate my datatables with them. Currently I'm using the method described 
here: https://developers.google.com/chart/interactive/docs/php_example

Basically I do this:

var jsonData = $.ajax({
   url: "getData.php",
   dataType:"json",
   async: false
    }).responseText;
var data = new google.visualization.DataTable(jsonData);

In getData.php there are just these 2 lines:
$string = file_get_contents("results.json");
echo $string;

The problem here is, with one .php-file I can only get one JSON. So if i have 
for example 10 different charts with 10 different datatables created from 
different JSONS I need 10 .php-files. Isn't there a better solution for this?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/dYd3oTqafwUJ.
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.

Reply via email to