Advertisement
DiegoWilson

codigo chart

Dec 20th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.  
  3.       // Load the Visualization API and the piechart package.
  4.       google.load('visualization', '1.0', {'packages':['corechart']});
  5.  
  6.       // Set a callback to run when the Google Visualization API is loaded.
  7.       google.setOnLoadCallback(drawChart);
  8.  
  9.       // Callback that creates and populates a data table,
  10.       // instantiates the pie chart, passes in the data and
  11.       // draws it.
  12.       function drawChart() {
  13.  
  14.         // Create the data table.
  15.         var data = new google.visualization.DataTable(<?php $jsonTable; ?>)
  16.        
  17.         // Set chart options
  18.         var options = {
  19.                         'title':'Cantidad de Exito en el curso ',
  20.                        'width':550,
  21.                        'height':400,
  22.                         pieHole: 0.4,
  23.                        
  24.                        };
  25.  
  26.         // Instantiate and draw our chart, passing in some options.
  27.         var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
  28.         chart.draw(data, options);
  29.       }
  30.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement