-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathchart-test.html
43 lines (36 loc) · 957 Bytes
/
chart-test.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
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={
'modules':[{
'name':'visualization',
'version':'1.1',
'packages':['corechart']
}]
}"></script>
<script type="text/javascript">
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Week', 'Effectiveness', 'Activity'],
['12/1', 4.3, 5],
['12/8', 4.9, 6],
['12/15', 6.7, 3],
['12/22', 2.3, 8]
]);
var options = {
theme: 'material',
title: 'Trends',
curveType: 'function',
legend: {
position: 'bottom'
}
};
var chart = new google.visualization.LineChart(document.getElementById('trend-chart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="trend-chart"></div>
</body>
</html>