-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (55 loc) · 1.07 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
47
48
49
50
51
52
53
54
55
<script type="text/javascript" src="https://pubnub.github.io/eon/v/eon/1.0.0/eon.js"></script>
<link type="text/css" rel="stylesheet" href="https://pubnub.github.io/eon/v/eon/1.0.0/eon.css" />
<div id="chart"></div>
<script type="text/javascript">
var __eon_pubnub = new PubNub({
subscribeKey: "sub-c-dd166120-9434-11e8-8ad6-9a5d6aeb6012"
});
var __eon_cols = ["temperature"];
var __eon_labels = {};
chart = eon.chart({
pubnub: __eon_pubnub,
channels: ["temperature-ruuvi"],
history: true,
flow: true,
rate: 1000,
limit: 5,
generate: {
bindto: "#chart",
data: {
colors: {"temperature":"#D70060"},
type: "spline"
},
transition: {
duration: 250
},
axis: {
x: {
label: ""
},
y: {
label: ""
}
},
grid: {
x: {
show: false
},
y: {
show: false
}
},
tooltip: {
show: true
},
point: {
show: true
}
},
transform: function(message) {
return { eon: {
temperature: message.temperature
}}
}
});
</script>