iobroker.sbfspot 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/admin/i18n/de/translations.json +18 -0
- package/admin/i18n/en/translations.json +18 -0
- package/admin/i18n/es/translations.json +18 -0
- package/admin/i18n/fr/translations.json +18 -0
- package/admin/i18n/it/translations.json +18 -0
- package/admin/i18n/nl/translations.json +18 -0
- package/admin/i18n/pl/translations.json +18 -0
- package/admin/i18n/pt/translations.json +18 -0
- package/admin/i18n/ru/translations.json +18 -0
- package/admin/i18n/uk/translations.json +18 -0
- package/admin/i18n/zh-cn/translations.json +18 -0
- package/io-package.json +29 -29
- package/package.json +28 -24
- package/.eslintrc.json +0 -35
- package/.github/FUNDING.yml +0 -16
- package/.github/ISSUE_TEMPLATE/BugReport.md +0 -36
- package/.github/ISSUE_TEMPLATE/Enhancement.md +0 -19
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
- package/.github/dependabot.yml +0 -13
- package/.github/workflows/npmpublish.yml +0 -30
- package/.github/workflows/test-and-release.yml +0 -166
- package/.releaseconfig.json +0 -3
- package/docs/en/install_arm.md +0 -65
- package/widgets/sbfspot/img/Prev_tplSbfspot.png +0 -0
- package/widgets/sbfspot/lib/js/flot/jquery.canvaswrapper.js +0 -549
- package/widgets/sbfspot/lib/js/flot/jquery.colorhelpers.js +0 -199
- package/widgets/sbfspot/lib/js/flot/jquery.flot.axislabels.js +0 -212
- package/widgets/sbfspot/lib/js/flot/jquery.flot.browser.js +0 -98
- package/widgets/sbfspot/lib/js/flot/jquery.flot.categories.js +0 -202
- package/widgets/sbfspot/lib/js/flot/jquery.flot.composeImages.js +0 -330
- package/widgets/sbfspot/lib/js/flot/jquery.flot.crosshair.js +0 -202
- package/widgets/sbfspot/lib/js/flot/jquery.flot.drawSeries.js +0 -662
- package/widgets/sbfspot/lib/js/flot/jquery.flot.errorbars.js +0 -375
- package/widgets/sbfspot/lib/js/flot/jquery.flot.fillbetween.js +0 -254
- package/widgets/sbfspot/lib/js/flot/jquery.flot.flatdata.js +0 -47
- package/widgets/sbfspot/lib/js/flot/jquery.flot.hover.js +0 -361
- package/widgets/sbfspot/lib/js/flot/jquery.flot.image.js +0 -249
- package/widgets/sbfspot/lib/js/flot/jquery.flot.js +0 -2953
- package/widgets/sbfspot/lib/js/flot/jquery.flot.legend.js +0 -437
- package/widgets/sbfspot/lib/js/flot/jquery.flot.logaxis.js +0 -298
- package/widgets/sbfspot/lib/js/flot/jquery.flot.navigate.js +0 -834
- package/widgets/sbfspot/lib/js/flot/jquery.flot.pie.js +0 -794
- package/widgets/sbfspot/lib/js/flot/jquery.flot.resize.js +0 -60
- package/widgets/sbfspot/lib/js/flot/jquery.flot.saturated.js +0 -43
- package/widgets/sbfspot/lib/js/flot/jquery.flot.selection.js +0 -527
- package/widgets/sbfspot/lib/js/flot/jquery.flot.stack.js +0 -220
- package/widgets/sbfspot/lib/js/flot/jquery.flot.symbol.js +0 -98
- package/widgets/sbfspot/lib/js/flot/jquery.flot.threshold.js +0 -143
- package/widgets/sbfspot/lib/js/flot/jquery.flot.time.js +0 -586
- package/widgets/sbfspot/lib/js/flot/jquery.flot.touch.js +0 -320
- package/widgets/sbfspot/lib/js/flot/jquery.flot.touchNavigate.js +0 -360
- package/widgets/sbfspot/lib/js/flot/jquery.flot.uiConstants.js +0 -10
- package/widgets/sbfspot/lib/js/flot/jquery.js +0 -9473
- package/widgets/sbfspot/lib/js/lib/globalize.culture.en-US.js +0 -33
- package/widgets/sbfspot/lib/js/lib/globalize.js +0 -1601
- package/widgets/sbfspot/lib/js/lib/jquery.event.drag.js +0 -145
- package/widgets/sbfspot/lib/js/lib/jquery.mousewheel.js +0 -86
- package/widgets/sbfspot.html +0 -1597
package/widgets/sbfspot.html
DELETED
|
@@ -1,1597 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
ioBroker.vis sbfspot Widget-Set
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Copyright 10.2015-2017 René G. <info@rg-engineering.eu>
|
|
6
|
-
-->
|
|
7
|
-
<!--
|
|
8
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.js"></script>
|
|
9
|
-
-->
|
|
10
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/lib/jquery.event.drag.js"></script>
|
|
11
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/lib/jquery.mousewheel.js"></script>
|
|
12
|
-
|
|
13
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.canvaswrapper.js"></script>
|
|
14
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.colorhelpers.js"></script>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.js"></script>
|
|
18
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.saturated.js"></script>
|
|
19
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.browser.js"></script>
|
|
20
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.drawSeries.js"></script>
|
|
21
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.uiConstants.js"></script>
|
|
22
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.time.js"></script>
|
|
23
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.legend.js"></script>
|
|
24
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.navigate.js"></script>
|
|
25
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.touchNavigate.js"></script>
|
|
26
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.hover.js"></script>
|
|
27
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.touch.js"></script>
|
|
28
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.selection.js"></script>
|
|
29
|
-
|
|
30
|
-
<script language="javascript" type="text/javascript" src="widgets/sbfspot/lib/js/flot/jquery.flot.axislabels.js"></script>
|
|
31
|
-
|
|
32
|
-
<!-- doku for flot : -->
|
|
33
|
-
<!-- https://github.com/flot/flot/blob/master/API.md -->
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.chart-placeholder {
|
|
37
|
-
width: 100%;
|
|
38
|
-
height: 100%;
|
|
39
|
-
font-size: 14px;
|
|
40
|
-
line-height: 1.2em;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.legendLayer .background {
|
|
44
|
-
fill: rgba(255, 255, 255, 0.85);
|
|
45
|
-
stroke: rgba(0, 0, 0, 0.85);
|
|
46
|
-
stroke-width: 1;
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<script type="text/javascript">
|
|
52
|
-
'use strict';
|
|
53
|
-
|
|
54
|
-
var MarkingColor = "eaebe5";
|
|
55
|
-
|
|
56
|
-
if (vis.editMode) {
|
|
57
|
-
// Add words for basic widgets
|
|
58
|
-
$.extend(true, systemDictionary, {
|
|
59
|
-
|
|
60
|
-
"sbfspot": {
|
|
61
|
-
"en": "sbfspot",
|
|
62
|
-
"de": "sbfspot",
|
|
63
|
-
"ru": "sbfspot",
|
|
64
|
-
"pt": "sbfspot",
|
|
65
|
-
"nl": "sbfspot",
|
|
66
|
-
"fr": "sbfspot",
|
|
67
|
-
"it": "sbfspot",
|
|
68
|
-
"es": "sbfspot",
|
|
69
|
-
"pl": "sbfspot",
|
|
70
|
-
"zh-cn": "sbfspot"
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
"1 second": {
|
|
74
|
-
"en": "1 second",
|
|
75
|
-
"de": "1 Sekunde",
|
|
76
|
-
"ru": "1 секунда",
|
|
77
|
-
"pt": "1 segundo",
|
|
78
|
-
"nl": "1 seconde",
|
|
79
|
-
"fr": "1 seconde",
|
|
80
|
-
"it": "1 secondo",
|
|
81
|
-
"es": "1 segundo",
|
|
82
|
-
"pl": "1 sekunda",
|
|
83
|
-
"zh-cn": "1秒"
|
|
84
|
-
},
|
|
85
|
-
"10 seconds": {
|
|
86
|
-
"en": "10 seconds",
|
|
87
|
-
"de": "10 Sekunden",
|
|
88
|
-
"ru": "10 секунд",
|
|
89
|
-
"pt": "10 segundos",
|
|
90
|
-
"nl": "10 seconden",
|
|
91
|
-
"fr": "10 secondes",
|
|
92
|
-
"it": "10 secondi",
|
|
93
|
-
"es": "10 segundos",
|
|
94
|
-
"pl": "10 sekund",
|
|
95
|
-
"zh-cn": "10秒"
|
|
96
|
-
},
|
|
97
|
-
"30 seconds": {
|
|
98
|
-
"en": "30 seconds",
|
|
99
|
-
"de": "30 Sekunden",
|
|
100
|
-
"ru": "30 секунд",
|
|
101
|
-
"pt": "30 segundos",
|
|
102
|
-
"nl": "30 seconden",
|
|
103
|
-
"fr": "30 secondes",
|
|
104
|
-
"it": "30 secondi",
|
|
105
|
-
"es": "30 segundos",
|
|
106
|
-
"pl": "30 sekund",
|
|
107
|
-
"zh-cn": "30秒"
|
|
108
|
-
},
|
|
109
|
-
"1 minute": {
|
|
110
|
-
"en": "1 minute",
|
|
111
|
-
"de": "1 Minute",
|
|
112
|
-
"ru": "1 минута",
|
|
113
|
-
"pt": "1 minuto",
|
|
114
|
-
"nl": "1 minuut",
|
|
115
|
-
"fr": "1 minute",
|
|
116
|
-
"it": "1 minuto",
|
|
117
|
-
"es": "1 minuto",
|
|
118
|
-
"pl": "1 minuta",
|
|
119
|
-
"zh-cn": "1分钟"
|
|
120
|
-
},
|
|
121
|
-
"2 minutes": {
|
|
122
|
-
"en": "2 minutes",
|
|
123
|
-
"de": "2 Minuten",
|
|
124
|
-
"ru": "2 минуты",
|
|
125
|
-
"pt": "2 minutos",
|
|
126
|
-
"nl": "2 minuten",
|
|
127
|
-
"fr": "2 minutes",
|
|
128
|
-
"it": "2 minuti",
|
|
129
|
-
"es": "2 minutos",
|
|
130
|
-
"pl": "2 minuty",
|
|
131
|
-
"zh-cn": "2分钟"
|
|
132
|
-
},
|
|
133
|
-
"5 minutes": {
|
|
134
|
-
"en": "5 minutes",
|
|
135
|
-
"de": "5 Minuten",
|
|
136
|
-
"ru": "5 минут",
|
|
137
|
-
"pt": "5 minutos",
|
|
138
|
-
"nl": "5 minuten",
|
|
139
|
-
"fr": "5 minutes",
|
|
140
|
-
"it": "5 minuti",
|
|
141
|
-
"es": "5 minutos",
|
|
142
|
-
"pl": "5 minut",
|
|
143
|
-
"zh-cn": "5分钟"
|
|
144
|
-
},
|
|
145
|
-
"10 minutes": {
|
|
146
|
-
"en": "10 minutes",
|
|
147
|
-
"de": "10 Minuten",
|
|
148
|
-
"ru": "10 минут",
|
|
149
|
-
"pt": "10 minutos",
|
|
150
|
-
"nl": "10 minuten",
|
|
151
|
-
"fr": "10 minutes",
|
|
152
|
-
"it": "10 minuti",
|
|
153
|
-
"es": "10 minutos",
|
|
154
|
-
"pl": "10 minut",
|
|
155
|
-
"zh-cn": "10分钟"
|
|
156
|
-
},
|
|
157
|
-
"30 minutes": {
|
|
158
|
-
"en": "30 minutes",
|
|
159
|
-
"de": "30 Minuten",
|
|
160
|
-
"ru": "30 минут",
|
|
161
|
-
"pt": "30 minutos",
|
|
162
|
-
"nl": "30 minuten",
|
|
163
|
-
"fr": "30 minutes",
|
|
164
|
-
"it": "30 minuti",
|
|
165
|
-
"es": "30 minutos",
|
|
166
|
-
"pl": "30 minut",
|
|
167
|
-
"zh-cn": "30分钟"
|
|
168
|
-
},
|
|
169
|
-
"1 hour": {
|
|
170
|
-
"en": "1 hour",
|
|
171
|
-
"de": "1 Stunde",
|
|
172
|
-
"ru": "1 час",
|
|
173
|
-
"pt": "1 hora",
|
|
174
|
-
"nl": "1 uur",
|
|
175
|
-
"fr": "1 heure",
|
|
176
|
-
"it": "1 ora",
|
|
177
|
-
"es": "1 hora",
|
|
178
|
-
"pl": "1 godzina",
|
|
179
|
-
"zh-cn": "1小时"
|
|
180
|
-
},
|
|
181
|
-
"2 hours": {
|
|
182
|
-
"en": "2 hours",
|
|
183
|
-
"de": "2 Stunden",
|
|
184
|
-
"ru": "два часа",
|
|
185
|
-
"pt": "2 horas",
|
|
186
|
-
"nl": "twee uur",
|
|
187
|
-
"fr": "2 heures",
|
|
188
|
-
"it": "2 ore",
|
|
189
|
-
"es": "2 horas",
|
|
190
|
-
"pl": "2 godziny",
|
|
191
|
-
"zh-cn": "2小时"
|
|
192
|
-
},
|
|
193
|
-
"4 hours": {
|
|
194
|
-
"en": "4 hours",
|
|
195
|
-
"de": "4 Stunden",
|
|
196
|
-
"ru": "4 часа",
|
|
197
|
-
"pt": "4 horas",
|
|
198
|
-
"nl": "4 uur",
|
|
199
|
-
"fr": "4 heures",
|
|
200
|
-
"it": "4 ore",
|
|
201
|
-
"es": "4 horas",
|
|
202
|
-
"pl": "4 godziny",
|
|
203
|
-
"zh-cn": "4个小时"
|
|
204
|
-
},
|
|
205
|
-
"8 hours": {
|
|
206
|
-
"en": "8 hours",
|
|
207
|
-
"de": "8 Stunden",
|
|
208
|
-
"ru": "8 часов",
|
|
209
|
-
"pt": "8 horas",
|
|
210
|
-
"nl": "8 uur",
|
|
211
|
-
"fr": "8 heures",
|
|
212
|
-
"it": "8 ore",
|
|
213
|
-
"es": "8 horas",
|
|
214
|
-
"pl": "8 godzin",
|
|
215
|
-
"zh-cn": "8小时"
|
|
216
|
-
},
|
|
217
|
-
"12 hours": {
|
|
218
|
-
"en": "12 hours",
|
|
219
|
-
"de": "12 Stunden",
|
|
220
|
-
"ru": "12 часов",
|
|
221
|
-
"pt": "12 horas",
|
|
222
|
-
"nl": "12 uren",
|
|
223
|
-
"fr": "12 heures",
|
|
224
|
-
"it": "12 ore",
|
|
225
|
-
"es": "12 horas",
|
|
226
|
-
"pl": "12 godzin",
|
|
227
|
-
"zh-cn": "12小时"
|
|
228
|
-
},
|
|
229
|
-
"24 hours": {
|
|
230
|
-
"en": "24 hours",
|
|
231
|
-
"de": "24 Stunden",
|
|
232
|
-
"ru": "24 часа",
|
|
233
|
-
"pt": "24 horas",
|
|
234
|
-
"nl": "24 uur",
|
|
235
|
-
"fr": "24 heures",
|
|
236
|
-
"it": "24 ore",
|
|
237
|
-
"es": "24 horas",
|
|
238
|
-
"pl": "24 godziny",
|
|
239
|
-
"zh-cn": "24小时"
|
|
240
|
-
},
|
|
241
|
-
"sbfspotinstance": {
|
|
242
|
-
"en": "sbfspot instance",
|
|
243
|
-
"de": "sbfspot-Instanz",
|
|
244
|
-
"ru": "экземпляр sbfspot",
|
|
245
|
-
"pt": "instância sbfspot",
|
|
246
|
-
"nl": "sbfspot-instantie",
|
|
247
|
-
"fr": "instance de sbfspot",
|
|
248
|
-
"it": "istanza sbfspot",
|
|
249
|
-
"es": "instancia de sbfspot",
|
|
250
|
-
"pl": "instancja sbfspot",
|
|
251
|
-
"zh-cn": "sbfspot实例"
|
|
252
|
-
},
|
|
253
|
-
"time_interval": {
|
|
254
|
-
"en": "Time interval",
|
|
255
|
-
"de": "Zeitintervall",
|
|
256
|
-
"ru": "Интервал времени",
|
|
257
|
-
"pt": "Intervalo de tempo",
|
|
258
|
-
"nl": "Tijdsinterval",
|
|
259
|
-
"fr": "Intervalle de temps",
|
|
260
|
-
"it": "Intervallo di tempo",
|
|
261
|
-
"es": "Intervalo de tiempo",
|
|
262
|
-
"pl": "Przedział czasowy",
|
|
263
|
-
"zh-cn": "时间间隔"
|
|
264
|
-
},
|
|
265
|
-
"withxaxix": {
|
|
266
|
-
"en": "show X axis",
|
|
267
|
-
"de": "X-Achse anzeigen",
|
|
268
|
-
"ru": "показать ось X",
|
|
269
|
-
"pt": "mostre o eixo X",
|
|
270
|
-
"nl": "X-as weergeven",
|
|
271
|
-
"fr": "afficher l'axe X",
|
|
272
|
-
"it": "mostra l'asse X.",
|
|
273
|
-
"es": "mostrar eje X",
|
|
274
|
-
"pl": "pokaż oś X.",
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
"sel_today": {
|
|
278
|
-
"en": "today",
|
|
279
|
-
"de": "heute",
|
|
280
|
-
"ru": "Cегодня",
|
|
281
|
-
"pt": "hoje",
|
|
282
|
-
"nl": "vandaag",
|
|
283
|
-
"fr": "aujourd'hui",
|
|
284
|
-
"it": "oggi",
|
|
285
|
-
"es": "hoy",
|
|
286
|
-
"pl": "dzisiaj",
|
|
287
|
-
"zh-cn": "今天"
|
|
288
|
-
},
|
|
289
|
-
"sel_last30days": {
|
|
290
|
-
"en": "last 30 days",
|
|
291
|
-
"de": "letzte 30 Tage",
|
|
292
|
-
"ru": "последние 30 дней",
|
|
293
|
-
"pt": "últimos 30 dias",
|
|
294
|
-
"nl": "laatste 30 dagen",
|
|
295
|
-
"fr": "les 30 derniers jours",
|
|
296
|
-
"it": "ultimi 30 giorni",
|
|
297
|
-
"es": "últimos 30 días",
|
|
298
|
-
"pl": "ostatnie 30 dni",
|
|
299
|
-
"zh-cn": "最近30天"
|
|
300
|
-
},
|
|
301
|
-
"sel_last12months": {
|
|
302
|
-
"en": "last 12 months",
|
|
303
|
-
"de": "letzten 12 Monate",
|
|
304
|
-
"ru": "последние 12 месяцев",
|
|
305
|
-
"pt": "últimos 12 meses",
|
|
306
|
-
"nl": "laatste 12 maanden",
|
|
307
|
-
"fr": "12 derniers mois",
|
|
308
|
-
"it": "ultimi 12 mesi",
|
|
309
|
-
"es": "últimos 12 meses",
|
|
310
|
-
"pl": "ostatnie 12 miesięcy",
|
|
311
|
-
"zh-cn": "最近12个月"
|
|
312
|
-
},
|
|
313
|
-
"sel_years": {
|
|
314
|
-
"en": "years",
|
|
315
|
-
"de": "Jahre",
|
|
316
|
-
"ru": "лет",
|
|
317
|
-
"pt": "anos",
|
|
318
|
-
"nl": "jaar",
|
|
319
|
-
"fr": "ans",
|
|
320
|
-
"it": "anni",
|
|
321
|
-
"es": "años",
|
|
322
|
-
"pl": "lat",
|
|
323
|
-
"zh-cn": "年份"
|
|
324
|
-
},
|
|
325
|
-
"serial": {
|
|
326
|
-
"en": "inverter serial No.",
|
|
327
|
-
"de": "Seriennummer des Wechselrichters",
|
|
328
|
-
"ru": "серийный номер инвертора",
|
|
329
|
-
"pt": "número de série do inversor",
|
|
330
|
-
"nl": "serienummer van de omvormer",
|
|
331
|
-
"fr": "n ° de série de l'onduleur",
|
|
332
|
-
"it": "numero di serie dell'inverter",
|
|
333
|
-
"es": "número de serie del inversor",
|
|
334
|
-
"pl": "numer seryjny falownika",
|
|
335
|
-
"zh-cn": "变频器序列号"
|
|
336
|
-
},
|
|
337
|
-
"valueselect": {
|
|
338
|
-
"en": "select",
|
|
339
|
-
"de": "wählen",
|
|
340
|
-
"ru": "Выбрать",
|
|
341
|
-
"pt": "selecionar",
|
|
342
|
-
"nl": "kiezen",
|
|
343
|
-
"fr": "sélectionner",
|
|
344
|
-
"it": "selezionare",
|
|
345
|
-
"es": "seleccionar",
|
|
346
|
-
"pl": "Wybierz",
|
|
347
|
-
"zh-cn": "选择"
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
"axislabelcolor": {
|
|
352
|
-
"en": "color of axis label",
|
|
353
|
-
"de": "Farbe der Achsenbeschriftung",
|
|
354
|
-
"ru": "цвет метки оси",
|
|
355
|
-
"pt": "cor do rótulo do eixo",
|
|
356
|
-
"nl": "kleur van aslabel",
|
|
357
|
-
"fr": "couleur de l'étiquette de l'axe",
|
|
358
|
-
"it": "colore dell'etichetta dell'asse",
|
|
359
|
-
"es": "color de la etiqueta del eje",
|
|
360
|
-
"pl": "kolor etykiety osi",
|
|
361
|
-
"zh-cn": "轴标颜色"
|
|
362
|
-
},
|
|
363
|
-
"tickscolor": {
|
|
364
|
-
"en": "color of axis ticks",
|
|
365
|
-
"de": "Farbe der Achsenstriche",
|
|
366
|
-
"ru": "цвет отметок оси",
|
|
367
|
-
"pt": "cor dos tiques do eixo",
|
|
368
|
-
"nl": "kleur van as tikken",
|
|
369
|
-
"fr": "couleur des tiques des axes",
|
|
370
|
-
"it": "colore delle zecche degli assi",
|
|
371
|
-
"es": "color de las garrapatas del eje",
|
|
372
|
-
"pl": "kolor znaczników osi",
|
|
373
|
-
"zh-cn": "轴刻度的颜色"
|
|
374
|
-
},
|
|
375
|
-
"graphcolor": {
|
|
376
|
-
"en": "color",
|
|
377
|
-
"de": "Farbe",
|
|
378
|
-
"ru": "цвет",
|
|
379
|
-
"pt": "cor",
|
|
380
|
-
"nl": "kleur",
|
|
381
|
-
"fr": "Couleur",
|
|
382
|
-
"it": "colore",
|
|
383
|
-
"es": "color",
|
|
384
|
-
"pl": "kolor",
|
|
385
|
-
"zh-cn": "颜色"
|
|
386
|
-
},
|
|
387
|
-
"nobgcolor": {
|
|
388
|
-
"en": "no background color on grid",
|
|
389
|
-
"de": "Keine Hintergrundfarbe im Raster",
|
|
390
|
-
"ru": "нет цвета фона на сетке",
|
|
391
|
-
"pt": "sem cor de fundo na grade",
|
|
392
|
-
"nl": "geen achtergrondkleur op het raster",
|
|
393
|
-
"fr": "pas de couleur d'arrière-plan sur la grille",
|
|
394
|
-
"it": "nessun colore di sfondo sulla griglia",
|
|
395
|
-
"es": "sin color de fondo en la cuadrícula",
|
|
396
|
-
"pl": "brak koloru tła na siatce",
|
|
397
|
-
"zh-cn": "网格上没有背景色"
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
"bgcolor": {
|
|
401
|
-
"en": "background color on grid",
|
|
402
|
-
"de": "Hintergrundfarbe auf Raster",
|
|
403
|
-
"ru": "цвет фона на сетке",
|
|
404
|
-
"pt": "cor de fundo na grade",
|
|
405
|
-
"nl": "achtergrondkleur op het raster",
|
|
406
|
-
"fr": "couleur de fond sur la grille",
|
|
407
|
-
"it": "colore di sfondo sulla griglia",
|
|
408
|
-
"es": "color de fondo en la cuadrícula",
|
|
409
|
-
"pl": "kolor tła na siatce",
|
|
410
|
-
"zh-cn": "网格上的背景色"
|
|
411
|
-
},
|
|
412
|
-
|
|
413
|
-
"bordercolor": {
|
|
414
|
-
"en": "color of grid border",
|
|
415
|
-
"de": "Farbe des Gitterrandes",
|
|
416
|
-
"ru": "цвет границы сетки",
|
|
417
|
-
"pt": "cor da borda da grade",
|
|
418
|
-
"nl": "kleur van de rasterrand",
|
|
419
|
-
"fr": "couleur de la bordure de la grille",
|
|
420
|
-
"it": "colore del bordo della griglia",
|
|
421
|
-
"es": "color del borde de la cuadrícula",
|
|
422
|
-
"pl": "kolor obramowania siatki",
|
|
423
|
-
"zh-cn": "网格边框的颜色"
|
|
424
|
-
},
|
|
425
|
-
"borderWidth": {
|
|
426
|
-
"en": "width of grid border",
|
|
427
|
-
"de": "Breite des Gitterrandes",
|
|
428
|
-
"ru": "ширина границы сетки",
|
|
429
|
-
"pt": "largura da borda da grade",
|
|
430
|
-
"nl": "breedte van de rasterrand",
|
|
431
|
-
"fr": "largeur de la bordure de la grille",
|
|
432
|
-
"it": "larghezza del bordo della griglia",
|
|
433
|
-
"es": "ancho del borde de la cuadrícula",
|
|
434
|
-
"pl": "szerokość granicy siatki",
|
|
435
|
-
"zh-cn": "网格边框的宽度"
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
"withyaxix": {
|
|
439
|
-
"en": "show y axis",
|
|
440
|
-
"de": "y-Achse anzeigen",
|
|
441
|
-
"ru": "показать ось у",
|
|
442
|
-
"pt": "mostre o eixo y",
|
|
443
|
-
"nl": "y-as weergeven",
|
|
444
|
-
"fr": "afficher l'axe y",
|
|
445
|
-
"it": "mostra l'asse y",
|
|
446
|
-
"es": "mostrar eje y",
|
|
447
|
-
"pl": "pokaż oś y",
|
|
448
|
-
"zh-cn": "显示y轴"
|
|
449
|
-
},
|
|
450
|
-
"graphDateFormat": {
|
|
451
|
-
"en": "Date Format for X axis",
|
|
452
|
-
"de": "Datumsformat für die X-Achse",
|
|
453
|
-
"ru": "Формат даты для оси X",
|
|
454
|
-
"pt": "Formato de data para o eixo X",
|
|
455
|
-
"nl": "Datumnotatie voor X-as",
|
|
456
|
-
"fr": "Format de date pour l'axe X",
|
|
457
|
-
"it": "Formato data per asse X.",
|
|
458
|
-
"es": "Formato de fecha para el eje X",
|
|
459
|
-
"pl": "Format daty dla osi X.",
|
|
460
|
-
"zh-cn": "X轴的日期格式"
|
|
461
|
-
},
|
|
462
|
-
"group_graph": {
|
|
463
|
-
"en": "graph",
|
|
464
|
-
"de": "Graph",
|
|
465
|
-
"ru": "график",
|
|
466
|
-
"pt": "gráfico",
|
|
467
|
-
"nl": "diagram",
|
|
468
|
-
"fr": "graphique",
|
|
469
|
-
"it": "grafico",
|
|
470
|
-
"es": "grafico",
|
|
471
|
-
"pl": "wykres",
|
|
472
|
-
"zh-cn": "图形"
|
|
473
|
-
},
|
|
474
|
-
"group_oids": {
|
|
475
|
-
"en": "OID's",
|
|
476
|
-
"de": "OID's",
|
|
477
|
-
"ru": "OID-х",
|
|
478
|
-
"pt": "OID's",
|
|
479
|
-
"nl": "OID's",
|
|
480
|
-
"fr": "OID",
|
|
481
|
-
"it": "di OID",
|
|
482
|
-
"es": "OID",
|
|
483
|
-
"pl": "OID",
|
|
484
|
-
"zh-cn": "OID的"
|
|
485
|
-
},
|
|
486
|
-
"oid_value": {
|
|
487
|
-
"en": "OID values",
|
|
488
|
-
"de": "OID-Werte",
|
|
489
|
-
"ru": "Значения OID",
|
|
490
|
-
"pt": "Valores OID",
|
|
491
|
-
"nl": "OID-waarden",
|
|
492
|
-
"fr": "Valeurs OID",
|
|
493
|
-
"it": "Valori OID",
|
|
494
|
-
"es": "Valores OID",
|
|
495
|
-
"pl": "Wartości OID",
|
|
496
|
-
"zh-cn": "OID值"
|
|
497
|
-
},
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
"markingcolor": {
|
|
501
|
-
"en": "color of marking",
|
|
502
|
-
"de": "Farbe der Markierung",
|
|
503
|
-
"ru": "цвет маркировки",
|
|
504
|
-
"pt": "cor da marcação",
|
|
505
|
-
"nl": "kleur van markering",
|
|
506
|
-
"fr": "couleur de marquage",
|
|
507
|
-
"it": "colore della marcatura",
|
|
508
|
-
"es": "color de marcado",
|
|
509
|
-
"pl": "kolor oznakowania",
|
|
510
|
-
"zh-cn": "标记颜色"
|
|
511
|
-
},
|
|
512
|
-
"withmarking": {
|
|
513
|
-
"en": "with marking",
|
|
514
|
-
"de": "mit Markierung",
|
|
515
|
-
"ru": "с маркировкой",
|
|
516
|
-
"pt": "com marcação",
|
|
517
|
-
"nl": "met markering",
|
|
518
|
-
"fr": "avec marquage",
|
|
519
|
-
"it": "con marcatura",
|
|
520
|
-
"es": "con marcado",
|
|
521
|
-
"pl": "z oznaczeniem",
|
|
522
|
-
"zh-cn": "带标记"
|
|
523
|
-
},
|
|
524
|
-
|
|
525
|
-
"graphName": {
|
|
526
|
-
"en": "name on legend",
|
|
527
|
-
"de": "Name auf Legende",
|
|
528
|
-
"ru": "имя по легенде",
|
|
529
|
-
"pt": "nome na legenda",
|
|
530
|
-
"nl": "naam op legende",
|
|
531
|
-
"fr": "nom sur la légende",
|
|
532
|
-
"it": "nome sulla leggenda",
|
|
533
|
-
"es": "nombre en la leyenda",
|
|
534
|
-
"pl": "imię na legendzie",
|
|
535
|
-
"zh-cn": "传说中的名字"
|
|
536
|
-
},
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
"LabelFontSize": {
|
|
540
|
-
"en": "size of Label Font",
|
|
541
|
-
"de": "Größe der Beschriftungsschrift",
|
|
542
|
-
"ru": "размер шрифта метки",
|
|
543
|
-
"pt": "tamanho da fonte da etiqueta",
|
|
544
|
-
"nl": "grootte van het lettertype",
|
|
545
|
-
"fr": "taille de la police d'étiquette",
|
|
546
|
-
"it": "dimensione del carattere dell'etichetta",
|
|
547
|
-
"es": "tamaño de la fuente de la etiqueta",
|
|
548
|
-
"pl": "rozmiar czcionki etykiety",
|
|
549
|
-
"zh-cn": "标签字体的大小"
|
|
550
|
-
},
|
|
551
|
-
"LabelFontFamily": {
|
|
552
|
-
"en": "family of label font",
|
|
553
|
-
"de": "Schriftfamilie",
|
|
554
|
-
"ru": "семейство меток шрифта",
|
|
555
|
-
"pt": "família de fontes de rótulo",
|
|
556
|
-
"nl": "familie van lettertype",
|
|
557
|
-
"fr": "famille de polices d'étiquettes",
|
|
558
|
-
"it": "famiglia di caratteri etichetta",
|
|
559
|
-
"es": "familia de fuente de etiquetas",
|
|
560
|
-
"pl": "rodzina czcionek etykiet",
|
|
561
|
-
"zh-cn": "标签字体家族"
|
|
562
|
-
},
|
|
563
|
-
"tickLength": {
|
|
564
|
-
"en": "length of tick",
|
|
565
|
-
"de": "Länge des Ticks",
|
|
566
|
-
"ru": "длина тика",
|
|
567
|
-
"pt": "comprimento do carrapato",
|
|
568
|
-
"nl": "lengte van de teek",
|
|
569
|
-
"fr": "longueur de tique",
|
|
570
|
-
"it": "lunghezza del segno di spunta",
|
|
571
|
-
"es": "longitud de la garrapata",
|
|
572
|
-
"pl": "długość kleszcza",
|
|
573
|
-
"zh-cn": "tick的长度"
|
|
574
|
-
},
|
|
575
|
-
"showMinorTicks": {
|
|
576
|
-
"en": "show minor tick",
|
|
577
|
-
"de": "zeige kleine Ticks",
|
|
578
|
-
"ru": "показать небольшую галочку",
|
|
579
|
-
"pt": "mostre carrapato menor",
|
|
580
|
-
"nl": "toon kleine vinkjes",
|
|
581
|
-
"fr": "montrer une tique mineure",
|
|
582
|
-
"it": "mostra segno di spunta minore",
|
|
583
|
-
"es": "mostrar marca menor",
|
|
584
|
-
"pl": "pokaż drobne kleszcze",
|
|
585
|
-
"zh-cn": "显示小勾"
|
|
586
|
-
},
|
|
587
|
-
"showTicks": {
|
|
588
|
-
"en": "show tick",
|
|
589
|
-
"de": "zeige ticks",
|
|
590
|
-
"ru": "показать галочку",
|
|
591
|
-
"pt": "show tick",
|
|
592
|
-
"nl": "vinkje tonen",
|
|
593
|
-
"fr": "montrer tique",
|
|
594
|
-
"it": "mostra tick",
|
|
595
|
-
"es": "mostrar marca",
|
|
596
|
-
"pl": "pokaż tik",
|
|
597
|
-
"zh-cn": "显示刻度"
|
|
598
|
-
},
|
|
599
|
-
"tickDecimals": {
|
|
600
|
-
"en": "decimals",
|
|
601
|
-
"de": "Dezimalstellen",
|
|
602
|
-
"ru": "десятичные",
|
|
603
|
-
"pt": "decimais",
|
|
604
|
-
"nl": "decimalen",
|
|
605
|
-
"fr": "décimales",
|
|
606
|
-
"it": "decimali",
|
|
607
|
-
"es": "decimales",
|
|
608
|
-
"pl": "miejsca po przecinku",
|
|
609
|
-
"zh-cn": "小数点"
|
|
610
|
-
},
|
|
611
|
-
"tickSize": {
|
|
612
|
-
"en": "tick size",
|
|
613
|
-
"de": "Tick-Größe",
|
|
614
|
-
"ru": "размер галочки",
|
|
615
|
-
"pt": "tamanho do carrapato",
|
|
616
|
-
"nl": "teken grootte",
|
|
617
|
-
"fr": "taille de la tique",
|
|
618
|
-
"it": "dimensione tick",
|
|
619
|
-
"es": "tamaño de la garrapata",
|
|
620
|
-
"pl": "rozmiar kleszcza",
|
|
621
|
-
"zh-cn": "刻度大小"
|
|
622
|
-
},
|
|
623
|
-
"minTickSize": {
|
|
624
|
-
"en": "min. tick size",
|
|
625
|
-
"de": "Mindest. Tick-Größe",
|
|
626
|
-
"ru": "минимум размер галочки",
|
|
627
|
-
"pt": "min. tamanho do carrapato",
|
|
628
|
-
"nl": "min. teken grootte",
|
|
629
|
-
"fr": "min. taille de la tique",
|
|
630
|
-
"it": "min. dimensione tick",
|
|
631
|
-
"es": "min. tamaño de la garrapata",
|
|
632
|
-
"pl": "min. rozmiar kleszcza",
|
|
633
|
-
"zh-cn": "分钟刻度大小"
|
|
634
|
-
},
|
|
635
|
-
"labelwidth": {
|
|
636
|
-
"en": "label width",
|
|
637
|
-
"de": "Labelbreite",
|
|
638
|
-
"ru": "ширина этикетки",
|
|
639
|
-
"pt": "largura da etiqueta",
|
|
640
|
-
"nl": "labelbreedte",
|
|
641
|
-
"fr": "largeur d'étiquette",
|
|
642
|
-
"it": "larghezza dell'etichetta",
|
|
643
|
-
"es": "ancho de etiqueta",
|
|
644
|
-
"pl": "szerokość etykiety",
|
|
645
|
-
"zh-cn": "标签宽度"
|
|
646
|
-
},
|
|
647
|
-
|
|
648
|
-
"coloraxis": {
|
|
649
|
-
"en": "color of axis",
|
|
650
|
-
"de": "Farbe der Achse",
|
|
651
|
-
"ru": "цвет оси",
|
|
652
|
-
"pt": "cor do eixo",
|
|
653
|
-
"nl": "kleur van de as",
|
|
654
|
-
"fr": "couleur de l'axe",
|
|
655
|
-
"it": "colore dell'asse",
|
|
656
|
-
"es": "color del eje",
|
|
657
|
-
"pl": "kolor osi",
|
|
658
|
-
"zh-cn": "轴的颜色"
|
|
659
|
-
},
|
|
660
|
-
"colorticklabel": {
|
|
661
|
-
"en": "color tick label",
|
|
662
|
-
"de": "Farbe Tick Label",
|
|
663
|
-
"ru": "цветная метка",
|
|
664
|
-
"pt": "etiqueta de escala de cores",
|
|
665
|
-
"nl": "kleur maatlabel",
|
|
666
|
-
"fr": "étiquette de couleur tique",
|
|
667
|
-
"it": "etichetta con segno di spunta di colore",
|
|
668
|
-
"es": "etiqueta de marca de color",
|
|
669
|
-
"pl": "kolorowa etykieta kleszczowa",
|
|
670
|
-
"zh-cn": "彩色刻度标签"
|
|
671
|
-
},
|
|
672
|
-
"withlegend": {
|
|
673
|
-
"en": "show legend",
|
|
674
|
-
"de": "Legende anzeigen",
|
|
675
|
-
"ru": "показать легенду",
|
|
676
|
-
"pt": "mostrar legenda",
|
|
677
|
-
"nl": "toon legende",
|
|
678
|
-
"fr": "montrer la légende",
|
|
679
|
-
"it": "mostra legenda",
|
|
680
|
-
"es": "Mostrar leyenda",
|
|
681
|
-
"pl": "pokaż legendę",
|
|
682
|
-
"zh-cn": "显示传奇"
|
|
683
|
-
},
|
|
684
|
-
"legendposition": {
|
|
685
|
-
"en": "legend position",
|
|
686
|
-
"de": "Legendenposition",
|
|
687
|
-
"ru": "положение легенды",
|
|
688
|
-
"pt": "posição da legenda",
|
|
689
|
-
"nl": "legende positie",
|
|
690
|
-
"fr": "position de la légende",
|
|
691
|
-
"it": "posizione della legenda",
|
|
692
|
-
"es": "posición de leyenda",
|
|
693
|
-
"pl": "pozycja legendy",
|
|
694
|
-
"zh-cn": "图例位置"
|
|
695
|
-
},
|
|
696
|
-
"WithHOver": {
|
|
697
|
-
"en": "With Value box",
|
|
698
|
-
"de": "Mit Wertbox",
|
|
699
|
-
"ru": "С коробкой ценности",
|
|
700
|
-
"pt": "Com caixa de valor",
|
|
701
|
-
"nl": "Met Value box",
|
|
702
|
-
"fr": "Avec boîte de valeur",
|
|
703
|
-
"it": "Con Valore",
|
|
704
|
-
"es": "Con caja de valor",
|
|
705
|
-
"pl": "Wagon z Value",
|
|
706
|
-
"zh-cn": "价值箱"
|
|
707
|
-
},
|
|
708
|
-
"WithPoints": {
|
|
709
|
-
"en": "with points",
|
|
710
|
-
"de": "mit Punkten",
|
|
711
|
-
"ru": "с точками",
|
|
712
|
-
"pt": "com pontos",
|
|
713
|
-
"nl": "met punten",
|
|
714
|
-
"fr": "avec points",
|
|
715
|
-
"it": "con punti",
|
|
716
|
-
"es": "con puntos",
|
|
717
|
-
"pl": "punkty",
|
|
718
|
-
"zh-cn": "要点"
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
vis.binds.sbfspot = {
|
|
727
|
-
version: "4.0.7",
|
|
728
|
-
showVersion: function () {
|
|
729
|
-
if (vis.binds.sbfspot.version) {
|
|
730
|
-
console.log('Version vis-sbfspot: ' + vis.binds.sbfspot.version);
|
|
731
|
-
vis.binds.sbfspot.version = null;
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
|
|
735
|
-
setup: {
|
|
736
|
-
intervals: {
|
|
737
|
-
'1 second': 1000,
|
|
738
|
-
'10 seconds': 10000,
|
|
739
|
-
'30 seconds': 30000,
|
|
740
|
-
'1 minute': 60000,
|
|
741
|
-
'2 minutes': 120000,
|
|
742
|
-
'5 minutes': 300000,
|
|
743
|
-
'10 minutes': 600000,
|
|
744
|
-
'30 minutes': 1800000,
|
|
745
|
-
'1 hour': 3600000,
|
|
746
|
-
'2 hours': 7200000,
|
|
747
|
-
'4 hours': 14400000,
|
|
748
|
-
'8 hours': 28800000,
|
|
749
|
-
'12 hours': 43200000,
|
|
750
|
-
'24 hours': 86400000
|
|
751
|
-
},
|
|
752
|
-
datasel: {
|
|
753
|
-
'sel_today': 1,
|
|
754
|
-
'sel_last30days': 2,
|
|
755
|
-
'sel_last12months': 3,
|
|
756
|
-
'sel_years': 4
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
},
|
|
760
|
-
history: {
|
|
761
|
-
|
|
762
|
-
init: function (widgetID, view, data1, style) {
|
|
763
|
-
var $div = $('#' + widgetID);
|
|
764
|
-
console.log("sbfspot history (" + widgetID + ")");
|
|
765
|
-
var data = {};
|
|
766
|
-
for (var s in data1) {
|
|
767
|
-
if (s[0] !== '_' && data1.hasOwnProperty(s) && typeof data1[s] !== 'object' && typeof data1[s] !== 'function') {
|
|
768
|
-
data[s] = data1[s];
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
//****************************************************************************************
|
|
774
|
-
//hover
|
|
775
|
-
|
|
776
|
-
if (data.WithHOver) {
|
|
777
|
-
//das muss in's init...
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
$("<div id='sbfspottooltip'></div>").css({
|
|
782
|
-
position: "absolute",
|
|
783
|
-
display: "none",
|
|
784
|
-
border: "1px solid #fdd",
|
|
785
|
-
padding: "2px",
|
|
786
|
-
"background-color": "#fee",
|
|
787
|
-
opacity: 1
|
|
788
|
-
}).appendTo("body");
|
|
789
|
-
//****************************************************************************************
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
function SetMarkingColor(color) {
|
|
793
|
-
MarkingColor = color;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
function xwhFormatter(val, axis) {
|
|
797
|
-
|
|
798
|
-
let myval;
|
|
799
|
-
if (typeof val == "string") {
|
|
800
|
-
console.log('xwhFormatter convert to number ');
|
|
801
|
-
myval = Number(val);
|
|
802
|
-
}
|
|
803
|
-
else {
|
|
804
|
-
myval = val;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
console.log('xwhFormatter for ' + val + " " + typeof val);
|
|
808
|
-
|
|
809
|
-
if (myval > 1000000)
|
|
810
|
-
return (myval / 1000000).toFixed(axis.tickDecimals) + " MWh";
|
|
811
|
-
else if (myval > 1000)
|
|
812
|
-
return (myval / 1000).toFixed(axis.tickDecimals) + " kWh";
|
|
813
|
-
else
|
|
814
|
-
return (myval*1).toFixed(axis.tickDecimals) + " Wh";
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
function legendformater(label, series) {
|
|
818
|
-
|
|
819
|
-
//wenn keine Daten, dann ausblenden -> (return null)
|
|
820
|
-
if (series.data == null || typeof series.data == "undefined" || typeof series.data[0] == "undefined") {
|
|
821
|
-
|
|
822
|
-
console.log('legendformater no label because no data ');
|
|
823
|
-
return null;
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
console.log('legendformater label ' + label);
|
|
827
|
-
return label;
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
//===============================================================
|
|
834
|
-
//Attention: this is different to sbfspot and vis-weather!!! we have much longer time periods here
|
|
835
|
-
function GridMarkings(axes) {
|
|
836
|
-
|
|
837
|
-
var markings = [];
|
|
838
|
-
var minDate = new Date(axes.xaxis.min);
|
|
839
|
-
|
|
840
|
-
const dayDiff = (axes.xaxis.max - axes.xaxis.min) / 1000 / 60 / 60 / 24;
|
|
841
|
-
console.log('GridMarkings: DayDiff ' + dayDiff + ' (' + axes.xaxis.max + ' ' + axes.xaxis.min + ')');
|
|
842
|
-
|
|
843
|
-
var i = minDate.getTime();
|
|
844
|
-
|
|
845
|
-
if (dayDiff > 400) { //in years
|
|
846
|
-
|
|
847
|
-
console.log('for year');
|
|
848
|
-
|
|
849
|
-
minDate.setHours(0);
|
|
850
|
-
minDate.setMinutes(0);
|
|
851
|
-
minDate.setDate(1);
|
|
852
|
-
minDate.setMonth(0);
|
|
853
|
-
var i = minDate.getTime();
|
|
854
|
-
var curDate;
|
|
855
|
-
let limit = 0;
|
|
856
|
-
do {
|
|
857
|
-
markings.push({ xaxis: { from: i, to: i + 12 * 30 * 24 * 60 * 60 * 1000 }, color: MarkingColor });
|
|
858
|
-
|
|
859
|
-
i += 2 * 12 * 31 * 24 * 60 * 60 * 1000; //plus two year
|
|
860
|
-
|
|
861
|
-
curDate = new Date(i);
|
|
862
|
-
minDate = curDate;
|
|
863
|
-
minDate.setHours(0);
|
|
864
|
-
minDate.setMinutes(0);
|
|
865
|
-
minDate.setDate(1);
|
|
866
|
-
minDate.setMonth(0);
|
|
867
|
-
|
|
868
|
-
console.log('GridMarkings (1): ' + minDate.toLocaleString());
|
|
869
|
-
|
|
870
|
-
i = minDate.getTime();
|
|
871
|
-
limit++;
|
|
872
|
-
|
|
873
|
-
} while (i < axes.xaxis.max || limit > 200);
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
else if (dayDiff > 30) { // in months
|
|
877
|
-
|
|
878
|
-
console.log('for months');
|
|
879
|
-
|
|
880
|
-
minDate.setHours(0);
|
|
881
|
-
minDate.setMinutes(0);
|
|
882
|
-
minDate.setDate(1);
|
|
883
|
-
var i = minDate.getTime();
|
|
884
|
-
var curDate;
|
|
885
|
-
let limit = 0;
|
|
886
|
-
do {
|
|
887
|
-
markings.push({ xaxis: { from: i, to: i + 30 * 24 * 60 * 60 * 1000 }, color: MarkingColor });
|
|
888
|
-
|
|
889
|
-
i += 2 * 31 * 24 * 60 * 60 * 1000; //plus one month
|
|
890
|
-
|
|
891
|
-
curDate = new Date(i);
|
|
892
|
-
minDate = curDate;
|
|
893
|
-
minDate.setHours(0);
|
|
894
|
-
minDate.setMinutes(0);
|
|
895
|
-
minDate.setDate(1);
|
|
896
|
-
|
|
897
|
-
console.log('GridMarkings (2): ' + minDate.toLocaleString());
|
|
898
|
-
|
|
899
|
-
i = minDate.getTime();
|
|
900
|
-
limit++;
|
|
901
|
-
} while (i < axes.xaxis.max || limit > 200);
|
|
902
|
-
}
|
|
903
|
-
else if (dayDiff > 10) {
|
|
904
|
-
|
|
905
|
-
console.log('for more than days');
|
|
906
|
-
|
|
907
|
-
//if (dayDiff > 2) {
|
|
908
|
-
minDate.setHours(12);
|
|
909
|
-
minDate.setMinutes(0);
|
|
910
|
-
var i = minDate.getTime();
|
|
911
|
-
let limit = 0;
|
|
912
|
-
do {
|
|
913
|
-
markings.push({ xaxis: { from: i, to: i + 5 * 24 * 60 * 60 * 1000 }, color: MarkingColor });
|
|
914
|
-
i += 2 * 5 * 24 * 60 * 60 * 1000; //plus 5 days
|
|
915
|
-
limit++;
|
|
916
|
-
} while (i < axes.xaxis.max || limit > 200);
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
//if we only few hours then we need markings per hour otherwise per day
|
|
920
|
-
else if (dayDiff > 2) {
|
|
921
|
-
console.log('for more than 2 days');
|
|
922
|
-
let limit = 0;
|
|
923
|
-
do {
|
|
924
|
-
markings.push({ xaxis: { from: i, to: i + 24 * 60 * 60 * 1000 }, color: MarkingColor });
|
|
925
|
-
i += 2 * 24 * 60 * 60 * 1000;
|
|
926
|
-
limit++;
|
|
927
|
-
} while (i < axes.xaxis.max || limit > 200);
|
|
928
|
-
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
|
|
932
|
-
console.log('for hours');
|
|
933
|
-
let limit = 0;
|
|
934
|
-
do {
|
|
935
|
-
markings.push({ xaxis: { from: i, to: i + 60 * 60 * 1000 }, color: MarkingColor });
|
|
936
|
-
i += 2 * 60 * 60 * 1000;
|
|
937
|
-
limit++;
|
|
938
|
-
} while (i < axes.xaxis.max || limit > 200);
|
|
939
|
-
}
|
|
940
|
-
return markings;
|
|
941
|
-
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
//===============================================================
|
|
947
|
-
//Attention: this is different to sbfspot and vis-weather!!! we have much longer time periods here
|
|
948
|
-
function CalcTicks4X(axis) {
|
|
949
|
-
|
|
950
|
-
var ticks = [];
|
|
951
|
-
|
|
952
|
-
var minDate = new Date(axis.min);
|
|
953
|
-
|
|
954
|
-
const dayDiff = (axis.max - axis.min) / 1000 / 60 / 60 / 24;
|
|
955
|
-
|
|
956
|
-
console.log('CalcTicks4X: DayDiff ' + dayDiff + ' (' + axis.max + ' ' + axis.min + ')');
|
|
957
|
-
|
|
958
|
-
if (dayDiff > 400) { //in years
|
|
959
|
-
minDate.setHours(12);
|
|
960
|
-
minDate.setMinutes(0);
|
|
961
|
-
minDate.setDate(15);
|
|
962
|
-
minDate.setMonth(5);
|
|
963
|
-
var i = minDate.getTime();
|
|
964
|
-
var curDate;
|
|
965
|
-
let limit = 0;
|
|
966
|
-
do {
|
|
967
|
-
ticks.push([i]);
|
|
968
|
-
|
|
969
|
-
i += 12 * 30 * 24 * 60 * 60 * 1000; //plus one year
|
|
970
|
-
|
|
971
|
-
curDate = new Date(i);
|
|
972
|
-
minDate = curDate;
|
|
973
|
-
minDate.setHours(12);
|
|
974
|
-
minDate.setMinutes(0);
|
|
975
|
-
minDate.setDate(15);
|
|
976
|
-
minDate.setMonth(5);
|
|
977
|
-
|
|
978
|
-
//console.log('CalcTicks4X (1): ' + minDate.toLocaleString());
|
|
979
|
-
|
|
980
|
-
i = minDate.getTime();
|
|
981
|
-
limit++;
|
|
982
|
-
|
|
983
|
-
} while (i < axis.max || limit > 200);
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
else if (dayDiff > 30) { // in months
|
|
987
|
-
minDate.setHours(12);
|
|
988
|
-
minDate.setMinutes(0);
|
|
989
|
-
minDate.setDate(15);
|
|
990
|
-
var i = minDate.getTime();
|
|
991
|
-
var curDate;
|
|
992
|
-
let limit = 0;
|
|
993
|
-
do {
|
|
994
|
-
ticks.push([i]);
|
|
995
|
-
i += 30 * 24 * 60 * 60 * 1000; //plus one month
|
|
996
|
-
|
|
997
|
-
curDate = new Date(i);
|
|
998
|
-
minDate = curDate;
|
|
999
|
-
minDate.setHours(12);
|
|
1000
|
-
minDate.setMinutes(0);
|
|
1001
|
-
minDate.setDate(15);
|
|
1002
|
-
|
|
1003
|
-
//console.log('CalcTicks4X (2): ' + minDate.toLocaleString());
|
|
1004
|
-
|
|
1005
|
-
i = minDate.getTime();
|
|
1006
|
-
limit++;
|
|
1007
|
-
} while (i < axis.max || limit > 200);
|
|
1008
|
-
}
|
|
1009
|
-
else if (dayDiff > 10) {
|
|
1010
|
-
//if (dayDiff > 2) {
|
|
1011
|
-
minDate.setHours(12);
|
|
1012
|
-
minDate.setMinutes(0);
|
|
1013
|
-
var i = minDate.getTime();
|
|
1014
|
-
let limit = 0;
|
|
1015
|
-
do {
|
|
1016
|
-
ticks.push([i]);
|
|
1017
|
-
i += 5 * 24 * 60 * 60 * 1000; //plus 5 days
|
|
1018
|
-
limit++;
|
|
1019
|
-
} while (i < axis.max || limit > 200);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
else if (dayDiff > 2) {
|
|
1023
|
-
//if (dayDiff > 2) {
|
|
1024
|
-
minDate.setHours(12);
|
|
1025
|
-
minDate.setMinutes(0);
|
|
1026
|
-
var i = minDate.getTime();
|
|
1027
|
-
let limit = 0;
|
|
1028
|
-
do {
|
|
1029
|
-
ticks.push([i]);
|
|
1030
|
-
i += 24 * 60 * 60 * 1000; //plus a day
|
|
1031
|
-
limit++;
|
|
1032
|
-
} while (i < axis.max || limit > 200);
|
|
1033
|
-
}
|
|
1034
|
-
else {
|
|
1035
|
-
minDate.setHours(0);
|
|
1036
|
-
minDate.setMinutes(0);
|
|
1037
|
-
var i = minDate.getTime();
|
|
1038
|
-
let limit = 0;
|
|
1039
|
-
do {
|
|
1040
|
-
ticks.push([i]);
|
|
1041
|
-
i += 6 * 60 * 60 * 1000; //plus 6 hours
|
|
1042
|
-
limit++;
|
|
1043
|
-
} while (i < axis.max || limit > 200);
|
|
1044
|
-
}
|
|
1045
|
-
return ticks;
|
|
1046
|
-
}
|
|
1047
|
-
//should avoid endles loops
|
|
1048
|
-
let UpdateRetryCounter = 0;
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
function update() {
|
|
1052
|
-
|
|
1053
|
-
console.log("ShowChart sbfspot (" + widgetID + ") retry counter " + UpdateRetryCounter);
|
|
1054
|
-
|
|
1055
|
-
var $div = $('#' + widgetID);
|
|
1056
|
-
// if nothing found => wait
|
|
1057
|
-
if (!$div.length) {
|
|
1058
|
-
return setTimeout(function () {
|
|
1059
|
-
console.log("need to wait... (" + widgetID + ")");
|
|
1060
|
-
if (UpdateRetryCounter < 5) {
|
|
1061
|
-
UpdateRetryCounter++;
|
|
1062
|
-
update();
|
|
1063
|
-
}
|
|
1064
|
-
}, 1000);
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
UpdateRetryCounter = 0;
|
|
1068
|
-
console.log("ShowChart sbfspot begin (" + widgetID + ")");
|
|
1069
|
-
|
|
1070
|
-
if (!data || !data.sbfspotinstance) {
|
|
1071
|
-
console.log("keine instanz (" + widgetID + ")");
|
|
1072
|
-
$div.html("<br> <center> <font color='red'> no instance for sbfspot specified </font> </center></br>");
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
else if (!data.serial) {
|
|
1076
|
-
console.log("keine seriennummer (" + widgetID + ")");
|
|
1077
|
-
$div.html("<br> <center> <font color='red'> no inverter serial number for sbfspot specified </font> </center></br>");
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
if ($div[0].clientHeight < 50 || $div[0].clientWidth < 50) {
|
|
1081
|
-
console.log("widget too small (" + widgetID + ")");
|
|
1082
|
-
$div.html("<br> <center> <font color='red'> widget too small, please increase size (heigth or width) </font> </center></br>");
|
|
1083
|
-
|
|
1084
|
-
if ($div[0].clientHeight < 50) {
|
|
1085
|
-
$div[0].style.height = "50px";
|
|
1086
|
-
}
|
|
1087
|
-
if ($div[0].clientWidth < 50) {
|
|
1088
|
-
$div[0].style.width = "50px";
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
else {
|
|
1095
|
-
|
|
1096
|
-
SetMarkingColor(data.markingcolor);
|
|
1097
|
-
|
|
1098
|
-
var dateMin = -1;
|
|
1099
|
-
var dateMax = -1;
|
|
1100
|
-
|
|
1101
|
-
var values = [];
|
|
1102
|
-
var maxY = -9999;
|
|
1103
|
-
var minY = 9999;
|
|
1104
|
-
|
|
1105
|
-
try {
|
|
1106
|
-
var oid_value = data.oid_value;
|
|
1107
|
-
var oData = JSON.parse(vis.states[oid_value + '.val']);
|
|
1108
|
-
|
|
1109
|
-
if (oData === null || typeof oData == "undefined" || oData.length < 1) {
|
|
1110
|
-
$div.html("<br> <center> <font color='red'>no data available yet for sbfspot</font> </center></br>");
|
|
1111
|
-
return;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
//console.log("oData " + oData.length);
|
|
1116
|
-
//console.log(JSON.stringify(oData));
|
|
1117
|
-
|
|
1118
|
-
var $sel = vis.binds.sbfspot.setup.datasel[data.valueselect];
|
|
1119
|
-
|
|
1120
|
-
console.log("sel " + $sel);
|
|
1121
|
-
|
|
1122
|
-
var oldValue = 0;
|
|
1123
|
-
for (var i = 0; i < oData.length; i++) {
|
|
1124
|
-
//[{"time":"06:08","value":0},{"time":"07:08","value":60},{"time":"08:08","value":181},{"time":"09:08","value":401},{"time":"10:08","value":1917},{"time":"11:08","value":3839},{"time":"12:08","value":5905},{"time":"13:08","value":8025},{"time":"14:08","value":10052},{"time":"15:08","value":11844},{"time":"16:08","value":13159},{"time":"17:08","value":13773},{"time":"18:08","value":13875},{"time":"19:08","value":13911},{"time":"20:08","value":13911}] kW
|
|
1125
|
-
//[{ "date": "2017-07-27", "value": 4045 }, { "date": "2017-07-28", "value": 10050 }, { "date": "2017-07-29", "value": 10442 }, { "date": "2017-07-30", "value": 13448 }, { "date": "2017-07-31", "value": 13476 }, { "date": "2017-08-01", "value": 12294 }, { "date": "2017-08-02", "value": 9084 }, { "date": "2017-08-03", "value": 3626 }, { "date": "2017-08-04", "value": 8504 }, { "date": "2017-08-05", "value": 12037 }, { "date": "2017-08-06", "value": 9725 }, { "date": "2017-08-07", "value": 13577 }, { "date": "2017-08-08", "value": 13310 }, { "date": "2017-08-09", "value": 12120 }, { "date": "2017-08-10", "value": 1391 }, { "date": "2017-08-11", "value": 2447 }, { "date": "2017-08-12", "value": 5659 }, { "date": "2017-08-13", "value": 5388 }, { "date": "2017-08-14", "value": 11364 }, { "date": "2017-08-15", "value": 12985 }, { "date": "2017-08-16", "value": 7504 }, { "date": "2017-08-17", "value": 9294 }, { "date": "2017-08-18", "value": 8594 }, { "date": "2017-08-19", "value": 10459 }, { "date": "2017-08-20", "value": 7991 }, { "date": "2017-08-21", "value": 10881 }, { "date": "2017-08-22", "value": 9715 }, { "date": "2017-08-23", "value": 13911 }, { "date": "2017-08-24", "value": 9016 }, { "date": "2017-08-25", "value": 11051 }, { "date": "2017-08-26", "value": 155 }]
|
|
1126
|
-
//[{"month":"2016-09","value":17886174},{"month":"2016-10","value":17973503},{"month":"2016-11","value":18020416},{"month":"2016-12","value":18052202},{"month":"2017-01","value":18077080},{"month":"2017-02","value":18171050},{"month":"2017-03","value":18384397},{"month":"2017-04","value":18602474},{"month":"2017-05","value":18909431},{"month":"2017-06","value":19236280},{"month":"2017-07","value":19522862},{"month":"2017-08","value":19754944}]
|
|
1127
|
-
//[{"year":"2016","value":18052202},{"year":"2017","value":19754944}]
|
|
1128
|
-
|
|
1129
|
-
if ($sel == 1) {
|
|
1130
|
-
var oVals = oData[i];
|
|
1131
|
-
var sDate = oVals["time"];
|
|
1132
|
-
var value = parseInt(oVals["value"], 10);
|
|
1133
|
-
|
|
1134
|
-
var diff = value - oldValue;
|
|
1135
|
-
oldValue = value;
|
|
1136
|
-
|
|
1137
|
-
var DateArray = sDate.split(":");
|
|
1138
|
-
var minute = parseInt(DateArray[1], 10);
|
|
1139
|
-
var hour = parseInt(DateArray[0], 10);
|
|
1140
|
-
|
|
1141
|
-
var oDate = new Date();
|
|
1142
|
-
oDate.setHours(hour);
|
|
1143
|
-
oDate.setMinutes(minute);
|
|
1144
|
-
|
|
1145
|
-
if (diff < minY) minY = diff;
|
|
1146
|
-
if (diff > maxY) maxY = diff;
|
|
1147
|
-
|
|
1148
|
-
//console.log(oDate.toString() + " : " + diff);
|
|
1149
|
-
|
|
1150
|
-
var date = oDate.getTime();
|
|
1151
|
-
|
|
1152
|
-
if (dateMin === -1) {
|
|
1153
|
-
dateMin = date;
|
|
1154
|
-
}
|
|
1155
|
-
dateMax = date;
|
|
1156
|
-
|
|
1157
|
-
values.push([oDate, diff]);
|
|
1158
|
-
}
|
|
1159
|
-
else if ($sel == 2) {
|
|
1160
|
-
var oVals = oData[i];
|
|
1161
|
-
var sDate = oVals["date"];
|
|
1162
|
-
var value = parseInt(oVals["value"]);
|
|
1163
|
-
var value = value;
|
|
1164
|
-
//2017-08-12
|
|
1165
|
-
|
|
1166
|
-
var DateArray = sDate.split("-");
|
|
1167
|
-
var day = parseInt(DateArray[2], 10);
|
|
1168
|
-
var month = parseInt(DateArray[1], 10);
|
|
1169
|
-
var year = parseInt(DateArray[0], 10);
|
|
1170
|
-
|
|
1171
|
-
month--;
|
|
1172
|
-
|
|
1173
|
-
var oDate = new Date(year, month, day, 12, 0, 0, 0);
|
|
1174
|
-
|
|
1175
|
-
if (value < minY) minY = value;
|
|
1176
|
-
if (value > maxY) maxY = value;
|
|
1177
|
-
|
|
1178
|
-
//console.log(oDate.toDateString() + " : " + value);
|
|
1179
|
-
var date = oDate.getTime();
|
|
1180
|
-
|
|
1181
|
-
if (dateMin === -1) {
|
|
1182
|
-
dateMin = date;
|
|
1183
|
-
}
|
|
1184
|
-
dateMax = date;
|
|
1185
|
-
values.push([oDate, value]);
|
|
1186
|
-
}
|
|
1187
|
-
else if ($sel == 3) {
|
|
1188
|
-
var oVals = oData[i];
|
|
1189
|
-
var sDate = oVals["month"];
|
|
1190
|
-
var value = parseInt(oVals["value"], 10);
|
|
1191
|
-
var value = value;
|
|
1192
|
-
//2016-09
|
|
1193
|
-
|
|
1194
|
-
//console.log(sDate);
|
|
1195
|
-
//on new android app this goas fail; don't know why...
|
|
1196
|
-
//var month = parseInt(sDate.substring(5, 7));
|
|
1197
|
-
//var year = parseInt(sDate.substring(0, 4));
|
|
1198
|
-
|
|
1199
|
-
var DateArray = sDate.split("-");
|
|
1200
|
-
var month = parseInt(DateArray[1], 10);
|
|
1201
|
-
var year = parseInt(DateArray[0], 10);
|
|
1202
|
-
|
|
1203
|
-
console.log("array " + DateArray[0] + " / " + DateArray[1]);
|
|
1204
|
-
|
|
1205
|
-
month--;
|
|
1206
|
-
|
|
1207
|
-
//mid of month
|
|
1208
|
-
var oDate = new Date(year, month, 15, 12, 0, 0, 0);
|
|
1209
|
-
|
|
1210
|
-
var diff = value - oldValue;
|
|
1211
|
-
|
|
1212
|
-
if (oldValue > 0) {
|
|
1213
|
-
if (diff < minY) minY = diff;
|
|
1214
|
-
if (diff > maxY) maxY = diff;
|
|
1215
|
-
|
|
1216
|
-
console.log(oDate.toDateString() + " : " + diff + " (" + year + "," + month + ")");
|
|
1217
|
-
|
|
1218
|
-
var date = oDate.getTime();
|
|
1219
|
-
|
|
1220
|
-
if (dateMin === -1) {
|
|
1221
|
-
dateMin = date;
|
|
1222
|
-
}
|
|
1223
|
-
dateMax = date;
|
|
1224
|
-
|
|
1225
|
-
values.push([oDate, diff]);
|
|
1226
|
-
}
|
|
1227
|
-
oldValue = value;
|
|
1228
|
-
|
|
1229
|
-
}
|
|
1230
|
-
else if ($sel == 4) {
|
|
1231
|
-
var oVals = oData[i];
|
|
1232
|
-
var year = parseInt(oVals["year"], 10);
|
|
1233
|
-
var value = parseInt(oVals["value"], 10);
|
|
1234
|
-
var value = value;
|
|
1235
|
-
//2016
|
|
1236
|
-
|
|
1237
|
-
// mid of year
|
|
1238
|
-
var oDate = new Date(year, 5, 30, 12, 0, 0, 0);
|
|
1239
|
-
|
|
1240
|
-
var diff = value - oldValue;
|
|
1241
|
-
|
|
1242
|
-
if (oldValue > 0) {
|
|
1243
|
-
if (diff < minY) minY = diff;
|
|
1244
|
-
if (diff > maxY) maxY = diff;
|
|
1245
|
-
|
|
1246
|
-
console.log(oDate.toDateString() + " : " + diff);
|
|
1247
|
-
var date = oDate.getTime();
|
|
1248
|
-
|
|
1249
|
-
if (dateMin === -1) {
|
|
1250
|
-
dateMin = date;
|
|
1251
|
-
}
|
|
1252
|
-
dateMax = date;
|
|
1253
|
-
|
|
1254
|
-
values.push([oDate, diff]);
|
|
1255
|
-
}
|
|
1256
|
-
else {
|
|
1257
|
-
console.log(oDate.toDateString() + " : " + value);
|
|
1258
|
-
var date = oDate.getTime();
|
|
1259
|
-
if (dateMin === -1) {
|
|
1260
|
-
dateMin = date;
|
|
1261
|
-
}
|
|
1262
|
-
dateMax = date;
|
|
1263
|
-
|
|
1264
|
-
values.push([oDate, value]);
|
|
1265
|
-
}
|
|
1266
|
-
oldValue = value;
|
|
1267
|
-
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
} catch (e) {
|
|
1271
|
-
console.log('exception catch in parse data [' + e + ']');
|
|
1272
|
-
}
|
|
1273
|
-
var barwidth = 0;
|
|
1274
|
-
if ($sel == 1) {
|
|
1275
|
-
barwidth = 1000 * 60 * 60 * 0.25; //0,25 h
|
|
1276
|
-
}
|
|
1277
|
-
else if ($sel == 2) {
|
|
1278
|
-
barwidth = 1000 * 60 * 60 * 12; //12 h
|
|
1279
|
-
}
|
|
1280
|
-
else if ($sel == 3) {
|
|
1281
|
-
barwidth = 1000 * 60 * 60 * 24 * 15; //15 days
|
|
1282
|
-
}
|
|
1283
|
-
else if ($sel == 4) {
|
|
1284
|
-
barwidth = 1000 * 60 * 60 * 24 * 182; //365/2=182 days
|
|
1285
|
-
}
|
|
1286
|
-
console.log("barwidth = " + barwidth); // in ms
|
|
1287
|
-
//sbfspot.0.2000562095.history.last30Days
|
|
1288
|
-
|
|
1289
|
-
/*
|
|
1290
|
-
var ticksX = data.ticksonxaxix > 0 ? parseInt(data.ticksonxaxix, 10) : 5;
|
|
1291
|
-
|
|
1292
|
-
if (ticksX > values.length) {
|
|
1293
|
-
ticksX = values.length;
|
|
1294
|
-
console.log('reduce ticks on X to ' + ticksX);
|
|
1295
|
-
}
|
|
1296
|
-
*/
|
|
1297
|
-
$.plot($div,
|
|
1298
|
-
[{
|
|
1299
|
-
data: values,
|
|
1300
|
-
color: data.graphcolor,
|
|
1301
|
-
label: data.graphName,
|
|
1302
|
-
xaxis: 1,
|
|
1303
|
-
yaxis: 1,
|
|
1304
|
-
lines: { show: false },
|
|
1305
|
-
points: { show: data.WithPoints },
|
|
1306
|
-
bars:
|
|
1307
|
-
{
|
|
1308
|
-
show: true,
|
|
1309
|
-
barWidth: [barwidth, true],
|
|
1310
|
-
align: "center",
|
|
1311
|
-
horizontal: false
|
|
1312
|
-
}
|
|
1313
|
-
},
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
],
|
|
1317
|
-
{
|
|
1318
|
-
|
|
1319
|
-
xaxes:
|
|
1320
|
-
[{
|
|
1321
|
-
axisLabelUseCanvas: true,
|
|
1322
|
-
axisLabelColour: 'orange',
|
|
1323
|
-
|
|
1324
|
-
show: data.withxaxix,
|
|
1325
|
-
mode: "time",
|
|
1326
|
-
timeBase: "milliseconds",
|
|
1327
|
-
tickLength: 5,
|
|
1328
|
-
|
|
1329
|
-
min: dateMin,
|
|
1330
|
-
max: dateMax,
|
|
1331
|
-
//ticks: data.ticksonxaxix > 0 ? parseInt(data.ticksonxaxix, 10) : 5,
|
|
1332
|
-
ticks: CalcTicks4X,
|
|
1333
|
-
|
|
1334
|
-
autoScale: "none",
|
|
1335
|
-
timeformat: data.graphDateFormat,
|
|
1336
|
-
monthNames: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
|
|
1337
|
-
color: data.tickscolor,
|
|
1338
|
-
tickColor: data.tickscolor,
|
|
1339
|
-
font: {
|
|
1340
|
-
|
|
1341
|
-
size: data.LabelFontSize,
|
|
1342
|
-
lineHeight: 13,
|
|
1343
|
-
style: "normal", //"italic",
|
|
1344
|
-
weight: "bold",
|
|
1345
|
-
family: data.LabelFontFamily,
|
|
1346
|
-
variant: "small-caps",
|
|
1347
|
-
color: data.axislabelcolor,
|
|
1348
|
-
},
|
|
1349
|
-
timezone: "browser"
|
|
1350
|
-
},
|
|
1351
|
-
|
|
1352
|
-
],
|
|
1353
|
-
yaxes:
|
|
1354
|
-
[{
|
|
1355
|
-
axisLabelUseCanvas: true,
|
|
1356
|
-
axisLabelColour: 'orange',
|
|
1357
|
-
|
|
1358
|
-
show: data.withyaxix,
|
|
1359
|
-
max: maxY,
|
|
1360
|
-
min: minY,
|
|
1361
|
-
autoScale: "none", // Available modes: "none", "loose", "exact"
|
|
1362
|
-
showTickLabels: "major",
|
|
1363
|
-
alignTicksWithAxis: 1,
|
|
1364
|
-
position: 'left',
|
|
1365
|
-
//ticks: 3,
|
|
1366
|
-
|
|
1367
|
-
tickLength: parseFloat(data.tickLength), //20, // size in pixels of major tick marks
|
|
1368
|
-
showMinorTicks: data.showMinorTicks, //false, // true = show minor tick marks, false = hide minor tick marks
|
|
1369
|
-
showTicks: data.showTicks, //true, // true = show tick marks, false = hide all tick marks
|
|
1370
|
-
tickDecimals: data.tickDecimals, //1, // no. of decimals, null means auto
|
|
1371
|
-
tickSize: data.tickSize, //3, // number or [number, "unit"]
|
|
1372
|
-
minTickSize: data.minTickSize, //1, // number or [number, "unit"]
|
|
1373
|
-
|
|
1374
|
-
color: data.coloraxis,
|
|
1375
|
-
tickColor: data.coloraxis,
|
|
1376
|
-
|
|
1377
|
-
labelWidth: parseFloat(data.labelwidth),
|
|
1378
|
-
font: {
|
|
1379
|
-
size: data.LabelFontSize,
|
|
1380
|
-
lineHeight: 13,
|
|
1381
|
-
style: "normal", //"italic",
|
|
1382
|
-
weight: "bold",
|
|
1383
|
-
family: data.LabelFontFamily,
|
|
1384
|
-
variant: "small-caps",
|
|
1385
|
-
color: data.colorticklabel,
|
|
1386
|
-
|
|
1387
|
-
},
|
|
1388
|
-
tickFormatter: xwhFormatter
|
|
1389
|
-
},
|
|
1390
|
-
|
|
1391
|
-
],
|
|
1392
|
-
grid:
|
|
1393
|
-
{
|
|
1394
|
-
//hover
|
|
1395
|
-
hoverable: true, //to trigger plothover event on mouse hover or tap on a point
|
|
1396
|
-
clickable: true, //to trigger plotclick event on mouse hover
|
|
1397
|
-
|
|
1398
|
-
markings: data.withmarking ? GridMarkings : null,
|
|
1399
|
-
|
|
1400
|
-
// backgroundColor: data.nobgcolor ? null : { colors: ["#fff", "#eee"] },
|
|
1401
|
-
backgroundColor: data.nobgcolor ? null : data.bgcolor,
|
|
1402
|
-
borderWidth: parseFloat(data.borderWidth), //data.withborder,
|
|
1403
|
-
borderColor: data.bordercolor,
|
|
1404
|
-
margin: 1,
|
|
1405
|
-
/*
|
|
1406
|
-
borderWidth: {
|
|
1407
|
-
top: data.withborder ? 1 : 0,
|
|
1408
|
-
right: data.withborder ? 1 : 0,
|
|
1409
|
-
bottom: data.withborder ? 2 : 0,
|
|
1410
|
-
left: data.withborder ? 2 : 0
|
|
1411
|
-
},*/
|
|
1412
|
-
|
|
1413
|
-
},
|
|
1414
|
-
legend: {
|
|
1415
|
-
show: data.withlegend,
|
|
1416
|
-
labelFormatter: legendformater,
|
|
1417
|
-
//labelBoxBorderColor: color,
|
|
1418
|
-
//noColumns: number,
|
|
1419
|
-
position: data.legendposition,
|
|
1420
|
-
//margin: number of pixels or [x margin, y margin]
|
|
1421
|
-
backgroundColor: null,
|
|
1422
|
-
backgroundOpacity: 0,
|
|
1423
|
-
container: null,
|
|
1424
|
-
sorted: false
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
);
|
|
1428
|
-
|
|
1429
|
-
//****************************************************************************************
|
|
1430
|
-
//hover
|
|
1431
|
-
|
|
1432
|
-
console.log("hover start " + widgetID + " " + data.WithHOver);
|
|
1433
|
-
if (data.WithHOver) {
|
|
1434
|
-
console.log("hover start " + widgetID);
|
|
1435
|
-
$('#' + widgetID).bind("plotclick", function (event, pos, item) {
|
|
1436
|
-
console.log("clicked at " + pos.x + ", " + pos.y);
|
|
1437
|
-
// axis coordinates for other axes, if present, are in pos.x2, pos.x3, ...
|
|
1438
|
-
// if you need global screen coordinates, they are pos.pageX, pos.pageY
|
|
1439
|
-
|
|
1440
|
-
if (item) {
|
|
1441
|
-
|
|
1442
|
-
let x = item.datapoint[0];
|
|
1443
|
-
let y = item.datapoint[1].toFixed(2);
|
|
1444
|
-
|
|
1445
|
-
var xDate = new Date(x);
|
|
1446
|
-
|
|
1447
|
-
console.log("clicked a point!" + item.series.label + " " + y + " on " + xDate.toLocaleString() + " = " + $.plot.formatDate(xDate, data.graphDateFormat));
|
|
1448
|
-
|
|
1449
|
-
let zindex = $div.css("z-index");
|
|
1450
|
-
zindex++;
|
|
1451
|
-
console.log("z-index " + zindex);
|
|
1452
|
-
//damit Tooltip in Vordergrund erscheind, muss z-index vom widget kleiner sein...
|
|
1453
|
-
|
|
1454
|
-
$("#sbfspottooltip").html($.plot.formatDate(xDate, data.graphDateFormat) + "<br> " + item.series.yaxis.tickFormatter(y, item.series.yaxis))
|
|
1455
|
-
.css({ top: item.pageY + 5, left: item.pageX + 5, "z-index": zindex })
|
|
1456
|
-
.fadeIn(200);
|
|
1457
|
-
|
|
1458
|
-
}
|
|
1459
|
-
else {
|
|
1460
|
-
$("#sbfspottooltip").stop().hide();
|
|
1461
|
-
}
|
|
1462
|
-
});
|
|
1463
|
-
}
|
|
1464
|
-
//****************************************************************************************
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}
|
|
1469
|
-
};
|
|
1470
|
-
|
|
1471
|
-
if (data.sbfspotinstance) {
|
|
1472
|
-
|
|
1473
|
-
var oid_value = data.oid_value;
|
|
1474
|
-
console.log("bind " + oid_value);
|
|
1475
|
-
vis.states.bind(oid_value + '.val', function () {
|
|
1476
|
-
update();
|
|
1477
|
-
});
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
// update every x seconds
|
|
1482
|
-
if (!vis.editMode) {
|
|
1483
|
-
console.log("interval " + vis.binds.sbfspot.setup.intervals[data.time_interval]);
|
|
1484
|
-
$div.data('timer', setInterval(function () {
|
|
1485
|
-
update();
|
|
1486
|
-
}, parseInt(vis.binds.sbfspot.setup.intervals[data.time_interval] / (parseInt(data.points, 10) || 10), 10)));
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
else {
|
|
1490
|
-
console.log("instance not set ");
|
|
1491
|
-
}
|
|
1492
|
-
update();
|
|
1493
|
-
|
|
1494
|
-
if (vis.editMode) {
|
|
1495
|
-
console.log("flot version " + $.plot.version + " for sbfspot");
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
},
|
|
1499
|
-
};
|
|
1500
|
-
|
|
1501
|
-
if (vis.editMode) {
|
|
1502
|
-
vis.binds.sbfspot.onInstanceChanged = function (widgetID, view, newId, fields) {
|
|
1503
|
-
console.log('---------: ' + widgetID + ' - ' + view + ' - ' + newId + ' - ' + fields);
|
|
1504
|
-
|
|
1505
|
-
var changed = [];
|
|
1506
|
-
//delete all oid's
|
|
1507
|
-
vis.views[view].widgets[widgetID].data.oid_value = "";
|
|
1508
|
-
vis.widgets[widgetID].data.oid_value = "";
|
|
1509
|
-
|
|
1510
|
-
//sbfspot.0.2000562095.history.last30Days
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
//then copy new values into oid
|
|
1514
|
-
if ((fields.indexOf("serial") > -1) || (fields.indexOf("sbfspotinstance") > -1) || fields.indexOf("valueselect") > -1) {
|
|
1515
|
-
|
|
1516
|
-
var sSerial = vis.widgets[widgetID].data.serial;
|
|
1517
|
-
var sInstance = vis.widgets[widgetID].data.sbfspotinstance;
|
|
1518
|
-
var sValueSet = "today";
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
var $sel = vis.widgets[widgetID].data.valueselect;
|
|
1523
|
-
|
|
1524
|
-
console.log("+++++++ " + $sel + " " + vis.binds.sbfspot.setup.datasel[$sel]);
|
|
1525
|
-
|
|
1526
|
-
switch (vis.binds.sbfspot.setup.datasel[$sel]) {
|
|
1527
|
-
case 1:
|
|
1528
|
-
vis.views[view].widgets[widgetID].data.graphDateFormat = "%H:%M";
|
|
1529
|
-
vis.widgets[widgetID].data.graphDateFormat = "%H:%M";
|
|
1530
|
-
sValueSet = "today";
|
|
1531
|
-
break;
|
|
1532
|
-
case 2:
|
|
1533
|
-
vis.views[view].widgets[widgetID].data.graphDateFormat = "%d.%b";
|
|
1534
|
-
vis.widgets[widgetID].data.graphDateFormat = "%d.%b";
|
|
1535
|
-
sValueSet = "last30Days";
|
|
1536
|
-
break;
|
|
1537
|
-
case 3:
|
|
1538
|
-
vis.views[view].widgets[widgetID].data.graphDateFormat = "%b %Y";
|
|
1539
|
-
vis.widgets[widgetID].data.graphDateFormat = "%b %Y";
|
|
1540
|
-
sValueSet = "last12Months";
|
|
1541
|
-
break;
|
|
1542
|
-
case 4:
|
|
1543
|
-
vis.views[view].widgets[widgetID].data.graphDateFormat = "%Y";
|
|
1544
|
-
vis.widgets[widgetID].data.graphDateFormat = "%Y";
|
|
1545
|
-
sValueSet = "years";
|
|
1546
|
-
break;
|
|
1547
|
-
default: break;
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
console.log('calc new oids with serial ' + sSerial + " Instance " + sInstance + " " + sValueSet);
|
|
1551
|
-
|
|
1552
|
-
vis.views[view].widgets[widgetID].data.oid_value = sInstance + "." + sSerial + ".history." + sValueSet;
|
|
1553
|
-
vis.widgets[widgetID].data.oid_value = sInstance + "." + sSerial + ".history." + sValueSet;
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
return changed;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
vis.binds.sbfspot.showVersion();
|
|
1569
|
-
|
|
1570
|
-
</script>
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
<script id="tplSbfspotShowInstance"
|
|
1575
|
-
type="text/ejs"
|
|
1576
|
-
class="vis-tpl"
|
|
1577
|
-
data-vis-set="sbfspot"
|
|
1578
|
-
data-vis-name="sbfspot"
|
|
1579
|
-
data-vis-type="sbfspot"
|
|
1580
|
-
data-vis-update-style="true"
|
|
1581
|
-
data-vis-prev='<img src="widgets/sbfspot/img/Prev_tplSbfspot.png"></img>'
|
|
1582
|
-
data-vis-attrs="sbfspotinstance/sbfspot/onInstanceChanged;time_interval[30 minutes]/select,1 second,10 seconds,30 seconds,1 minute,2 minutes,5 minutes,10 minutes,30 minutes,1 hour,2 hours,4 hours,8 hours,12 hours,24 hours;serial//onInstanceChanged;valueselect[sel_today]/select,sel_today,sel_last30days,sel_last12months,sel_years/onInstanceChanged;WithHOver[true]/checkbox;WithPoints[true]/checkbox;"
|
|
1583
|
-
data-vis-attrs0="withxaxix[true]/checkbox;axislabelcolor[#f1f113]/color;tickscolor[#f1f113]/color;LabelFontSize[8];LabelFontFamily[Arial]/fontname;withmarking[true]/checkbox;markingcolor[#eaebe5]/color;"
|
|
1584
|
-
data-vis-attrs1="borderWidth[1];bordercolor[#000000]/color;nobgcolor[true]/checkbox;bgcolor[#FFFFFF]/color;withlegend[false]/checkbox;legendposition[ne]/select,ne,nw,se,sw;"
|
|
1585
|
-
data-vis-attrs2="group.graph;graphName;graphcolor[#f1f113]/color;coloraxis[#f1f113]/color;colorticklabel[#f1f113]/color;withyaxix[true]/checkbox;graphDateFormat[%H:%M];tickLength[5];showMinorTicks[true]/checkbox;showTicks[true]/checkbox;tickDecimals[1];tickSize[3];minTickSize[2];labelwidth[30];"
|
|
1586
|
-
data-vis-attrs3="group.oids;oid_value/id;">
|
|
1587
|
-
|
|
1588
|
-
<div class="vis-widget <%== this.data.attr('class') %>" style="overflow: hidden;" id="<%= this.data.attr('wid') %>">
|
|
1589
|
-
<div class="vis-sbfspot-widget-body"
|
|
1590
|
-
<%= vis.binds.sbfspot.history.init(this.data.wid, this.view, this.data, this.style) %>>
|
|
1591
|
-
</div>
|
|
1592
|
-
</div>
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
</script>
|
|
1597
|
-
|