help this the output of my getData.php

[{"country_name":"United Arab Emirates 
","tAmount":107182.5,"tWeight":14026.6},{"country_name":"Philippines 
","tAmount":7110.24,"tWeight":968.5},{"country_name":"Singapore 
","tAmount":71399.35,"tWeight":11805.7},{"country_name":"Greece 
","tAmount":34015.84,"tWeight":8300.5},{"country_name":"Saudi Arabia 
","tAmount":88105.14,"tWeight":16280},{"country_name":"United Kingdom 
","tAmount":165579.85,"tWeight":35875.2},{"country_name":"New Zealand 
","tAmount":105381.22,"tWeight":21392.86},{"country_name":"Nigeria 
","tAmount":80995.6,"tWeight":18576},{"country_name":"Israel 
","tAmount":168051.2,"tWeight":41937.5},{"country_name":"Japan 
","tAmount":25794,"tWeight":6220},{"country_name":"Hong Kong 
","tAmount":209.61,"tWeight":304.23},{"country_name":"Qatar 
","tAmount":218443.23,"tWeight":44471.8},{"country_name":"Canada 
","tAmount":875020.93,"tWeight":208311.14},{"country_name":"AUSTRALIA 
","tAmount":69417.15,"tWeight":14605.9},{"country_name":"USA 
","tAmount":7807676.41,"tWeight":2134912.16},{"country_name":"Guam 
","tAmount":50795.98,"tWeight":8046.2}] 

can you help me to load it from my chart.html

this the code :


<html>
<head>
<!--Load the AJAX API -->
<script type="text/javascript" src="http://www.google.com/jsapi";></script>
<script 
src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"; 
type="text/javascript"></script>
<script type="text/javascript">
function drawChart () {
var jsonData = $.ajax({
          url: "getData.php",
          dataType:"json",
          async: false
          }).responseText;

//Create our data table out of JSON data loaded from server
var data = new google.visualization.DataTable(jsonData);
 //PieCharts expects 2 columns of data: a label and a value, so we need to 
use a DataView to restrict to 2 columns
var view = new google.visualization.DataView(data);
view.setColumns([0, 3]);

//Instantiate and draw our chart, passing in some options
var chart = new 
google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(view, {width:400, height:240});
}

//Load the visualization API and the piechart package
google.load('visualization', '1', {'packages': ['corechart']});

//Set a callback to run when the google visualization API is loaded
google.setOnLoadCallback(drawChart);
</script>
</head>

<body>
<!--Div that will hold the pie chart -->
<div id="chart_div"></div>
</body>
</html>


please help me thanks..... 


Noong Miyerkules, Agosto 14 2013 19:44:44 UTC+8, si beginner.. ay sumulat:
>
> please help on how to load query data to create google chart i want to 
> using my ms sql server 
>
> please help.. thanks...
>

-- 
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