PHP Classes

File: index.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Nikhil Patil  >  Google Charts  >  index.html  >  Download  
File: index.html
Role: Auxiliary data
Content type: text/plain
Description: index
Class: Google Charts
Generate Google Charts data in JSON format
Author: By
Last change:
Date: 2 years ago
Size: 1,220 bytes


Class file image Download
    <!--Load the AJAX API-->
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
    // Load the Visualization API and the piechart package.
    google.load('visualization', '1', {'packages':["geochart"]});
    // Set a callback to run when the Google Visualization API is loaded.
    function drawChart() {
      var jsonData = $.ajax({
          url: "json_data.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.GeoChart(document.getElementById('chart_div'));
      chart.draw(data, {width: 400, height: 240});

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