Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
84 lines (78 loc) · 2.38 KB
/
Copy pathscript.js
File metadata and controls
84 lines (78 loc) · 2.38 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
window.onload = function () {
var arrayOfObjects = [],
options = {
series: {
points: {show: false},
lines: {show: true}
},
xaxis: {
show: true,
mode: "time",
timeformat: "%a %I%p",
minTickSize: [3, "hour"],
font: {
size: 20,
color: "#000000"
},
timezone: "browser"
},
yaxes: [{position: "left",
ticks: [ [30, "30\xB0"], [40, "40" + "\xB0"], [50, "50" + "\xB0"], [60, "60" + "\xB0"], [70, "70" + "\xB0"], [80, "80" + "\xB0"] ],
font: {
size: 20,
color: "#000000"
}
}],
legend: {
show: true
},
grid: {
clickable: false,
hoverable: false
}
};
var series;
for (series in collectedData) {
arrayOfObjects.push({data: collectedData[series], label: series, yaxis: 1});
}
// plot measurements
$.plot($("#placeholder"), arrayOfObjects, options);
$("#box").click(function() {
if (this.checked) {
for (let element of $("tr")) {
if (element.hasAttribute('class')) {
if (($(element).attr('class') == 'hide')) {
$(element).attr('style', 'display:table-row');
}
}
}
} else {
for (let element of $("tr")) {
if (element.hasAttribute('class')) {
if (($(element).attr('class') == 'hide')) {
$(element).attr('style', 'display:none');
}
}
}
}
});
};
var count = 0;
setInterval(function () {
var index,
element;
for (index = 0; index < 10; index += 1) {
element = document.getElementById("frame" + index);
if (element != null) {
if (index === count) {
element.setAttribute('style', 'display: block');
} else {
element.setAttribute('style', 'display: none');
}
}
}
count += 1;
if (count > 9) {
count = 0;
}
}, 1000);