Last active
August 29, 2015 14:24
-
-
Save danharr/18eeeb904529a6b91eee to your computer and use it in GitHub Desktop.
Google Table
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
<html> | |
<head> | |
<style> | |
#google-visualization-table-td { | |
font-size:30px; | |
} | |
</style> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1.1", {packages:["table"]}); | |
google.setOnLoadCallback(drawTable); | |
function drawTable() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'Name'); | |
data.addColumn('number', 'Salary'); | |
data.addColumn('boolean', 'Full Time Employee'); | |
data.addRows([ | |
['Mike', {v: 10000, f: '$10,000'}, true], | |
['Jim', {v:8000, f: '$8,000'}, false], | |
['Alice', {v: 12500, f: '$12,500'}, true], | |
['Bob', {v: 7000, f: '$7,000'}, true] | |
]); | |
var table = new google.visualization.Table(document.getElementById('table_div')); | |
table.draw(data, {showRowNumber: true, width: '100%', height: '100%'}); | |
} | |
</script> | |
</head> | |
<body> | |
<div id="table_div"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment