-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
30 lines (25 loc) · 969 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['table']});
</script>
<script type="text/javascript">
var visualization;
function drawVisualization() {
var query = new google.visualization.Query(
'https://spreadsheets.google.com/a/isf.uts.edu.au/tq?key=182UzxMOkk59ssRqTSPViYScGTsPCUY2OAFsq4h9EF8U&hl=en_GB');
query.setQuery('SELECT E, B, C order by E asc label E "Publisher", B "Title", C "Description"');
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
return;
}
var data = response.getDataTable();
visualization = new google.visualization.Table(document.getElementById('table'));
visualization.draw(data, {legend: 'bottom'});
}
google.setOnLoadCallback(drawVisualization);
</script>
<div id="table"></div>
</div>