Created
September 18, 2012 09:41
-
-
Save RCura/3742279 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<html> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
var gAxesTable = null ; | |
var gMembersTable = null ; | |
google.load("visualization", "1"); | |
// Set callback to run when API is loaded | |
google.setOnLoadCallback(init); | |
function init() | |
{ | |
gAxesTable = new google.visualization.DataTable(); | |
gAxesTable.addColumn('string', 'id', 'id'); | |
gAxesTable.addColumn('string', 'text', 'text'); | |
gAxesTable.addColumn('string', 'title', 'title'); | |
gAxesTable.addColumn('string', 'type', 'type'); | |
gAxesTable.addRows([ | |
['axe1', 'Axe 1', '??', 'axe'], | |
['axe2', 'Axe 2', '??', 'axe'], | |
['axe3', 'Axe 3', '??', 'axe'], | |
]); | |
}; | |
// Called when the Visualization API is loaded. | |
function test() | |
{ | |
init(); | |
//alert('test'); | |
//alert(gAxesTable.toJSON()); | |
alert(gAxesTable); | |
document.getElementById('result').innerHTML = gAxesTable.toJSON(); | |
}; | |
</script> | |
<body> | |
<form id="testform"> | |
<input type="submit" value="TEST" onclick="test();"> | |
</form> | |
<div id="result">ABC</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment