From 2013.igem.org
(Difference between revisions)
|
|
Line 3: |
Line 3: |
| {{:Team:TU-Delft/Templates/Frog}} | | {{:Team:TU-Delft/Templates/Frog}} |
| {{:Team:TU-Delft/Templates/Logo}} | | {{:Team:TU-Delft/Templates/Logo}} |
- |
| |
- | <html>
| |
- | <head>
| |
- | <script type="text/javascript" src="https://www.google.com/jsapi"></script>
| |
- | <script type="text/javascript">
| |
- | google.load("visualization", "1", {packages:["columnchart"]});
| |
- | google.setOnLoadCallback(drawChart);
| |
- | function drawChart() {
| |
- | var data = google.visualization.arrayToDataTable([
| |
- | ['Year', 'Scientists', 'Students', 'Public', 'Other'],
| |
- | ['', 26, 4, 22, 13]
| |
- | ]);
| |
- |
| |
- |
| |
- | var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
| |
- | var options = {
| |
- | vAxis: { format:'#%'}, // Makes gridlines have percentages (correct)
| |
- | format: '#%' // Does nothing
| |
- | };
| |
- | chart.draw(data,options);
| |
- |
| |
- | }
| |
- | </script>
| |
- | </head>
| |
- |
| |
- | <body>
| |
- | <div id="chart_div"></div>
| |
- | </body>
| |
- | </html>
| |
| | | |
| | | |
Revision as of 09:43, 6 September 2013
Google Visualization API Sample