Currently developing a website where I query data from a mysql database and
encode it to JSON string, I want to view the data using the google charts
and tables.
At the moment I can't view the data in the tables but the JSON string
output seems to be correct.
Here is the javascript code:
<script type="text/javascript">
function drawVisualization() {
var jsonData = $.ajax({
url: "dataTableViewDaily.php", // make this url point to the data
file
dataType: "json",
async: false
}).responseText;
var data = new google.visualization.DataTable(jsonData);
// Create and draw the visualization.
visualization = new
google.visualization.Table(document.getElementById('table'));
visualization.draw(data, null);
}
google.setOnLoadCallback(drawVisualization);
</script>
dataTableViewDaily.php echo the json string.
Would appreciate any help, thank you
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.