This repository was archived by the owner on Jun 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebsocket_test.html
More file actions
48 lines (44 loc) · 1.64 KB
/
websocket_test.html
File metadata and controls
48 lines (44 loc) · 1.64 KB
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
<!DOCTYPE HTML>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="js/highcharts/js/highcharts.js" type="text/javascript"></script>
<script>
var char1;
$(document).ready(function(){
$.ajax({
url: 'https://members.csh.rit.edu/drink/api/get_machine_temp/1',
success: function(data){
console.log(data);
if(data.status == true){
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line'
},
title: {
text: 'Big Drink'
},
yAxis: {
title: {
text: 'Temperature'
}
},
series: [
{
name: 'Big Drink',
data: data.temp
}
]
});
}
},
dataType: 'json'
});
});
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>