-
Notifications
You must be signed in to change notification settings - Fork 0
/
googleChart.html
60 lines (32 loc) · 1.3 KB
/
googleChart.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
// Define the chart to be drawn.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Choice');
data.addColumn('number', 'Answers');
data.addRows([
['svaret', 17],
['ikke besvaret', 39],
]);
var options = {'title':'Fordeling af besvarelser',
'width':800,
'height':600,
'is3D':true,
colors: ['#336699', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'],
sliceVisibilityThreshold:0
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div"/>
</body>
</html>