You might just have left it out of the post, but your code is missing the 
google.load call that loads the Visualization API, so make sure you have 
that.  If that's not the problem, post a copy of the JSON output by the 
"dataTableViewDaily.php" script so I can verify that it is in the correct 
format.  Also, open the page in Chrome or Firefox and check the developer's 
console to see if there are any error messages displayed.

On Sunday, August 11, 2013 6:22:26 AM UTC-4, Razee Hussein-Jamal wrote:
>
> 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.


Reply via email to