-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathebra_201505_201508.html
executable file
·208 lines (178 loc) · 6.96 KB
/
ebra_201505_201508.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://dygraphs.com/dist/dygraph.css">
<script type="text/javascript" src="http://dygraphs.com/dygraph-combined.js"></script>
<script type="text/javascript" src="https://jakehosen.github.io/ms/synchronizer.js"></script>
<script type="text/javascript" src="https://jakehosen.github.io/ms/interaction.js"></script>
</head>
<body>
<input type="checkbox" id="chk-sync" onchange="update()"><label for="chk-sync">Sync</label>
<div id="g1a" style="width:825px; height:225px;"></div>
<div id="g2a" style="width:825px; height:225px;"></div>
<div id="g3a" style="width:825px; height:250px;"></div>
<script type="text/javascript">
var sync;
var gs;
window.update = function() {
var chk = document.getElementById('chk-sync').checked;
if(chk) {
sync = Dygraph.synchronize(gs,{range:false});
}
else {
sync.detach();
for (i = 0; i < 3; ++i) {
gs[i].updateOptions({
dateWindow: null,
valueRange: null
});
}
}
}
document.addEventListener("mousewheel", function() {
lastClickedGraph = null;
}, false);
document.addEventListener("click", function() { lastClickedGraph = null; }, false);
gs = [
aa = new Dygraph(document.getElementById("g1a"), "ebra_201505_201508_2.csv",{errorBars : true, drawPoints : true, interactionModel : {
'mousedown' : downV4,
'mousemove' : moveV4,
'mouseup' : upV4,
'dblclick' : dblClickV4,
},underlayCallback:captureCanvas,
visibility:[true,true,false,false,false,false,false,false,false], drawXGrid:false, drawYGrid:false, strokeWidth:0, pointSize:1.75, showRangeSelector:true}),
bb = new Dygraph(document.getElementById("g2a"), "ebra_201601_201604.csv",{visibility:[true,true,true,true,true,true,true,true,true], drawXGrid:false, drawYGrid:false, drawPoints:true, strokeWidth:0, pointSize:1.75}),
cc = new Dygraph(document.getElementById("g3a"), "ebra_201601_201604.csv",{visibility:[true,true,true,true,true,true,true,true,true], drawXGrid:false, drawYGrid:false, drawPoints:true, strokeWidth:0, pointSize:1.75, showRangeSelector:true, interactionModel:Dygraph.defaultInteractionModel})
];
setStatus();
function setStatus() {
document.getElementById("visibility").innerHTML =
aa.visibility().toString();
}
function change(el) {
aa.setVisibility(parseInt(el.id), el.checked);
setStatus();
}
function setStatus1() {
document.getElementById("visibility").innerHTML =
bb.visibility().toString();
}
function change1(el) {
bb.setVisibility(parseInt(el.id), el.checked);
setStatus1();
}
function setStatus2() {
document.getElementById("visibility").innerHTML =
cc.visibility().toString();
}
function change2(el) {
cc.setVisibility(parseInt(el.id), el.checked);
setStatus2();
}
function myFunction() {
var minValue = document.getElementById("min").value;
var maxValue = document.getElementById("max").value;
aa.updateOptions({
valueRange: [minValue, maxValue]
});
showYDimensions(aa.yAxisRanges());
}
function myFunction1() {
var minValue = document.getElementById("min").value;
var maxValue = document.getElementById("max").value;
bb.updateOptions({
valueRange: [minValue, maxValue]
});
showYDimensions(bb.yAxisRanges());
}
function myFunction2() {
var minValue = document.getElementById("min").value;
var maxValue = document.getElementById("max").value;
cc.updateOptions({
valueRange: [minValue, maxValue]
});
showYDimensions(cc.yAxisRanges());
}
</script>
<div id="set_range">
Y-Min: <input type="text" id="min" value=0>
Y-Max: <input type="text" id="max" value=1000>
<button onclick="myFunction()">Set 1</button>
<button onclick="myFunction1()">Set 2</button>
<button onclick="myFunction2()">Set 3</button>
</div>
<div id="wrap">
<div id="left_col">
<p><b>Select First Graph Variables:</b></p>
<p>
<input type=checkbox id="0"checked onClick="change(this)">
<label for="0"> Temperature</label><br/>
<input type=checkbox id="1"checked onClick="change(this)">
<label for="1"> pH</label><br/>
<input type=checkbox id="2"checked onClick="change(this)">
<label for="2"> Conductivity</label><br/>
<input type=checkbox id="3"checked onClick="change(this)">
<label for="3"> DO</label><br/>
<input type=checkbox id="4"checked onClick="change(this)">
<label for="4"> Turbidity</label><br/>
<input type=checkbox id="5"checked onClick="change(this)">
<label for="5"> Temp-Cor fDOM (QSU)</label><br/>
<input type=checkbox id="6"checked onClick="change(this)">
<label for="6"> Full-Cor fDOM (QSU)</label><br/>
<input type=checkbox id="7"checked onClick="change(this)">
<label for="7"> fDOM (QSU)</label><br/>
<input type=checkbox id="8"checked onClick="change(this)">
<label for="8"> Discharge (CFS)</label><br/>
</p>
</p>
</div>
<div id="right_col">
<p><b>Select Second Graph Variables:</b></p>
<p>
<input type=checkbox id="0"checked onClick="change1(this)">
<label for="0"> Temperature</label><br/>
<input type=checkbox id="1"checked onClick="change1(this)">
<label for="1"> pH</label><br/>
<input type=checkbox id="2"checked onClick="change1(this)">
<label for="2"> Conductivity</label><br/>
<input type=checkbox id="3"checked onClick="change1(this)">
<label for="3"> DO</label><br/>
<input type=checkbox id="4"checked onClick="change1(this)">
<label for="4"> Turbidity</label><br/>
<input type=checkbox id="5"checked onClick="change1(this)">
<label for="5"> Temp-Cor fDOM (QSU)</label><br/>
<input type=checkbox id="6"checked onClick="change1(this)">
<label for="6"> Full-Cor fDOM (QSU)</label><br/>
<input type=checkbox id="7"checked onClick="change1(this)">
<label for="7"> fDOM (QSU)</label><br/>
<input type=checkbox id="8"checked onClick="change1(this)">
<label for="8"> Discharge (CFS)</label><br/>
</p>
</p>
</div>
<div id="center_col">
<p>
<p><b>Select Third Graph Variables:</b></p>
<input type=checkbox id="0"checked onClick="change2(this)">
<label for="0"> Temperature</label><br/>
<input type=checkbox id="1"checked onClick="change2(this)">
<label for="1"> pH</label><br/>
<input type=checkbox id="2"checked onClick="change2(this)">
<label for="2"> Conductivity</label><br/>
<input type=checkbox id="3"checked onClick="change2(this)">
<label for="3"> DO</label><br/>
<input type=checkbox id="4"checked onClick="change2(this)">
<label for="4"> Turbidity</label><br/>
<input type=checkbox id="5"checked onClick="change2(this)">
<label for="5"> Temp-Cor fDOM (QSU)</label><br/>
<input type=checkbox id="6"checked onClick="change2(this)">
<label for="6"> Full-Cor fDOM (QSU)</label><br/>
<input type=checkbox id="7"checked onClick="change2(this)">
<label for="7"> fDOM (QSU)</label><br/>
<input type=checkbox id="8"checked onClick="change2(this)">
<label for="8"> Discharge (CFS)</label><br/>
</p>
</div>
</div>
</body>
</html>