Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (29 sloc) 1.14 KB
<!--Load the AJAX API-->
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="//"></script>
<script type="text/javascript">
// Load the Visualization API.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
function drawChart() {
var jsonData = $.ajax({
url: "getData.php",
async: false
// Create our data table out of JSON data loaded from server.
var data = new google.visualization.DataTable(jsonData);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, {width: 800, height: 400});
<!--Div that will hold the column chart-->
<div id="chart_div"></div>