-
Notifications
You must be signed in to change notification settings - Fork 28
/
graph.html
38 lines (34 loc) · 931 Bytes
/
graph.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
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['line']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
<%HEADER%>
data.addRows([
<%DATA%>
]);
var options = {
chart: {
title: 'Sample Sensor Data Graph by Kyuho Kim',
subtitle: 'Please enjoy making your own grpah!'
},
width: 1024,
height: 512,
axes: {
x: {
0: {side: 'bottom'}
}
}
};
var chart = new google.charts.Line(document.getElementById('line_top_x'));
chart.draw(data, google.charts.Line.convertOptions(options));
}
</script>
</head>
<body>
<div id="line_top_x"></div>
</body>
</html>