Created
November 7, 2014 21:44
-
-
Save pnc89/dfd7581ec6d825c25ecd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// Load the Visualization API and the piechart package. | |
google.load('visualization', '1.0', {'packages':['corechart']}); | |
// Set a callback to run when the Google Visualization API is loaded. | |
google.setOnLoadCallback(drawChart); | |
// Callback that creates and populates a data table, | |
// instantiates the pie chart, passes in the data and | |
// draws it. | |
function drawChart() { | |
// Create the data table. | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'Standing'); | |
data.addColumn('number', 'Students'); | |
data.addRows([ | |
["Graduate Interdisciplinary Programs", "24"], | |
]); | |
// Set chart options | |
var options = {'title':'Student Enrollment by College', | |
'width':400, | |
'height':300}; | |
// Instantiate and draw our chart, passing in some options. | |
var chart = new google.visualization.PieChart(document.getElementById('chart_div')); | |
chart.draw(data, options); | |
} | |
</script><script src="https://www.google.com/uds/?file=visualization&v=1.0&packages=corechart" type="text/javascript"></script><link href="https://www.google.com/uds/api/visualization/1.0/c9097717526543127df14ac5b7413d43/ui+en.css" type="text/css" rel="stylesheet"><script src="https://www.google.com/uds/api/visualization/1.0/c9097717526543127df14ac5b7413d43/format+en,default+en,ui+en,corechart+en.I.js" type="text/javascript"></script> | |
<!--Div that will hold the pie chart--> | |
<div id="chart_div"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment