-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
46 lines (37 loc) · 1.85 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<html>
<head>
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="http://word-cumulus-goog-vis.googlecode.com/svn/trunk/wordcumulus.js"></script>
<script type="text/javascript" src="http://word-cumulus-goog-vis.googlecode.com/svn/trunk/swfobject.js"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
function drawChart() {
var jsonData = $.ajax({
url: "proxy.php?v=tagcumulusfull",
dataType:"json",
async: false
}).responseText;
// // Create our data table out of JSON data loaded from server.
var data = new google.visualization.DataTable(jsonData);
var vis = new gviz_word_cumulus.WordCumulus(document.getElementById('chart_div'));
vis.draw(data, {text_color: '#00ff00', speed: 50, width:600, height:600});
// // Instantiate and draw our chart, passing in some options.
// // var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
// // chart.draw(data, {width: 400, height: 240});
// //
// // var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
// var chart = new google.visualization.Graph(document.getElementById('chart_div'));
// chart.draw(data, {width: 400, height: 240});
}
</script>
</head>
<body>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
</body>
</html>