-
Notifications
You must be signed in to change notification settings - Fork 1
/
testing-web-page.html
203 lines (187 loc) · 5.42 KB
/
testing-web-page.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
<!-- START PRINT 1 -->
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Motor Control - Dashboard</title>
</head>
<body onload="/*setTimeout(function(){location.reload()}, 100);*/">
<h1>Dashboard a motor control</h1>
<div class="box">
<h2 class="box-title">Actual and Requested Motor Position</h2>
<p class="box-description">absolute value</p>
<div class="box-graph">
<svg
version="1.2"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="graph"
aria-labelledby="title"
role="img"
>
<title id="title">Actual and Requested Motor Position</title>
<g class="grid x-grid" id="xGrid">
<line x1="90" x2="90" y1="5" y2="371"></line>
</g>
<g class="grid y-grid" id="yGrid">
<line x1="90" x2="705" y1="370" y2="370"></line>
</g>
<g class="labels x-labels">
<text x="100" y="392">-2000</text>
<text x="250" y="392">-1500</text>
<text x="400" y="392">-1000</text>
<text x="550" y="392">-500</text>
<text x="700" y="392">0</text>
<text x="400" y="430" class="label-title">time [ms]</text>
</g>
<g class="labels y-labels">
<!-- END PRINT 1 -->
<!-- START PRINT 2 -->
<text x="80" y="15">400</text>
<text x="80" y="95">300</text>
<text x="80" y="189">200</text>
<text x="80" y="273">100</text>
<text x="80" y="380">0</text>
<text x="-115" y="40" class="label-title" transform="rotate(-90)">
motor position [step]
</text>
</g>
<!-- END PRINT 2 -->
<!-- START PRINT 4 -->
<polyline
fill="none"
stroke="#0074d9"
stroke-width="2"
points="
90,150.5
700, 0
"
/>
<polyline
fill="none"
stroke="#ff0000"
stroke-width="2"
points="
90,370.5
700, 200
"
/>
<g>
<circle
cx="80"
cy="416"
data-value="7.2"
r="4"
class="red"
></circle>
<circle
cx="80"
cy="436"
data-value="7.2"
r="4"
class="blue"
></circle>
<text x="90" y="420" class="label-title">actual position</text>
<text x="90" y="440" class="label-title">requested position</text>
</g>
<!-- END PRINT 4 -->
<!-- START PRINT 5 -->
</svg>
</div>
</div>
<div class="box">
<h2 class="box-title">Current PWM duty cycle</h2>
<p class="box-description">in range –100%, +100%</p>
<div class="box-graph">
<svg
version="1.2"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="graph"
aria-labelledby="title"
role="img"
>
<title id="title">Current PWM duty cycle</title>
<g class="grid x-grid" id="xGrid">
<line x1="90" x2="90" y1="5" y2="371"></line>
</g>
<g class="grid y-grid" id="yGrid">
<line x1="90" x2="705" y1="370" y2="370"></line>
</g>
<g class="labels x-labels">
<text x="100" y="392">-2000</text>
<text x="250" y="392">-1500</text>
<text x="400" y="392">-1000</text>
<text x="550" y="392">-500</text>
<text x="700" y="392">0</text>
<text x="400" y="430" class="label-title">time [ms]</text>
</g>
<!-- END PRINT 5 -->
<!-- START PRINT 6 -->
<g class="labels y-labels">
<text x="80" y="14">+100</text>
<text x="80" y="96.5">+50</text>
<text x="80" y="189">0</text>
<text x="80" y="273">-50</text>
<text x="80" y="380">-100</text>
<text x="-115" y="40" class="label-title" transform="rotate(-90)">
PWM duty cycle [%]
</text>
</g>
<!-- END PRINT 6 -->
<!-- START PRINT 7 -->
<circle cx="90" cy="185" data-value="7.2" r="4"></circle>
<!-- END PRINT 7 -->
<!-- START PRINT 8 -->
</svg>
</div>
</div>
</body>
<style>
body {
font-family: "Open Sans", sans-serif;
}
.graph .labels.x-labels {
text-anchor: middle;
}
.graph .labels.y-labels {
text-anchor: end;
}
.graph {
height: 500px;
width: 800px;
}
.graph .grid {
stroke: #ccc;
stroke-dasharray: 0;
stroke-width: 1;
}
.labels {
font-size: 14px;
}
.label-title {
font-weight: bold;
/* text-transform: uppercase; */
font-size: 12px;
fill: #000;
}
.data {
fill: red;
stroke-width: 1;
}
.box-title {
margin-bottom: 0;
}
.box-description {
margin-top: 0.2rem;
}
.red {
fill: #ff0000;
}
.blue {
fill: #0074d9;
}
</style>
</html>
<!-- reources: https://css-tricks.com/how-to-make-charts-with-svg/ -->