iobroker.ebus 3.2.4 → 3.2.6

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.
Files changed (47) hide show
  1. package/.eslintrc.json +34 -34
  2. package/.releaseconfig.json +3 -0
  3. package/LICENSE +20 -20
  4. package/README.md +147 -130
  5. package/admin/index_m.html +419 -419
  6. package/admin/style.css +18 -18
  7. package/admin/words.js +27 -27
  8. package/io-package.json +218 -192
  9. package/lib/support_tools.js +370 -370
  10. package/lib/tools.js +99 -99
  11. package/main.js +1232 -1232
  12. package/package.json +13 -11
  13. package/widgets/ebus/lib/js/flot/jquery.canvaswrapper.js +549 -549
  14. package/widgets/ebus/lib/js/flot/jquery.colorhelpers.js +199 -199
  15. package/widgets/ebus/lib/js/flot/jquery.flot.axislabels.js +212 -212
  16. package/widgets/ebus/lib/js/flot/jquery.flot.browser.js +98 -98
  17. package/widgets/ebus/lib/js/flot/jquery.flot.categories.js +202 -202
  18. package/widgets/ebus/lib/js/flot/jquery.flot.composeImages.js +330 -330
  19. package/widgets/ebus/lib/js/flot/jquery.flot.crosshair.js +202 -202
  20. package/widgets/ebus/lib/js/flot/jquery.flot.drawSeries.js +662 -662
  21. package/widgets/ebus/lib/js/flot/jquery.flot.errorbars.js +375 -375
  22. package/widgets/ebus/lib/js/flot/jquery.flot.fillbetween.js +254 -254
  23. package/widgets/ebus/lib/js/flot/jquery.flot.flatdata.js +47 -47
  24. package/widgets/ebus/lib/js/flot/jquery.flot.hover.js +361 -361
  25. package/widgets/ebus/lib/js/flot/jquery.flot.image.js +249 -249
  26. package/widgets/ebus/lib/js/flot/jquery.flot.js +2953 -2953
  27. package/widgets/ebus/lib/js/flot/jquery.flot.legend.js +437 -437
  28. package/widgets/ebus/lib/js/flot/jquery.flot.logaxis.js +298 -298
  29. package/widgets/ebus/lib/js/flot/jquery.flot.navigate.js +834 -834
  30. package/widgets/ebus/lib/js/flot/jquery.flot.pie.js +794 -794
  31. package/widgets/ebus/lib/js/flot/jquery.flot.resize.js +60 -60
  32. package/widgets/ebus/lib/js/flot/jquery.flot.saturated.js +43 -43
  33. package/widgets/ebus/lib/js/flot/jquery.flot.selection.js +527 -527
  34. package/widgets/ebus/lib/js/flot/jquery.flot.stack.js +220 -220
  35. package/widgets/ebus/lib/js/flot/jquery.flot.symbol.js +98 -98
  36. package/widgets/ebus/lib/js/flot/jquery.flot.threshold.js +143 -143
  37. package/widgets/ebus/lib/js/flot/jquery.flot.time.js +586 -586
  38. package/widgets/ebus/lib/js/flot/jquery.flot.touch.js +320 -320
  39. package/widgets/ebus/lib/js/flot/jquery.flot.touchNavigate.js +360 -360
  40. package/widgets/ebus/lib/js/flot/jquery.flot.uiConstants.js +10 -10
  41. package/widgets/ebus/lib/js/flot/jquery.js +9473 -9473
  42. package/widgets/ebus/lib/js/lib/globalize.culture.en-US.js +33 -33
  43. package/widgets/ebus/lib/js/lib/globalize.js +1601 -1601
  44. package/widgets/ebus/lib/js/lib/jquery.event.drag.js +145 -145
  45. package/widgets/ebus/lib/js/lib/jquery.mousewheel.js +86 -86
  46. package/widgets/ebus.html +2395 -2395
  47. package/readme.txt +0 -297
@@ -1,143 +1,143 @@
1
- /* Flot plugin for thresholding data.
2
-
3
- Copyright (c) 2007-2014 IOLA and Ole Laursen.
4
- Licensed under the MIT license.
5
-
6
- The plugin supports these options:
7
-
8
- series: {
9
- threshold: {
10
- below: number
11
- color: colorspec
12
- }
13
- }
14
-
15
- It can also be applied to a single series, like this:
16
-
17
- $.plot( $("#placeholder"), [{
18
- data: [ ... ],
19
- threshold: { ... }
20
- }])
21
-
22
- An array can be passed for multiple thresholding, like this:
23
-
24
- threshold: [{
25
- below: number1
26
- color: color1
27
- },{
28
- below: number2
29
- color: color2
30
- }]
31
-
32
- These multiple threshold objects can be passed in any order since they are
33
- sorted by the processing function.
34
-
35
- The data points below "below" are drawn with the specified color. This makes
36
- it easy to mark points below 0, e.g. for budget data.
37
-
38
- Internally, the plugin works by splitting the data into two series, above and
39
- below the threshold. The extra series below the threshold will have its label
40
- cleared and the special "originSeries" attribute set to the original series.
41
- You may need to check for this in hover events.
42
-
43
- */
44
-
45
- (function ($) {
46
- var options = {
47
- series: { threshold: null } // or { below: number, color: color spec}
48
- };
49
-
50
- function init(plot) {
51
- function thresholdData(plot, s, datapoints, below, color) {
52
- var ps = datapoints.pointsize, i, x, y, p, prevp,
53
- thresholded = $.extend({}, s); // note: shallow copy
54
-
55
- thresholded.datapoints = { points: [], pointsize: ps, format: datapoints.format };
56
- thresholded.label = null;
57
- thresholded.color = color;
58
- thresholded.threshold = null;
59
- thresholded.originSeries = s;
60
- thresholded.data = [];
61
-
62
- var origpoints = datapoints.points,
63
- addCrossingPoints = s.lines.show;
64
-
65
- var threspoints = [];
66
- var newpoints = [];
67
- var m;
68
-
69
- for (i = 0; i < origpoints.length; i += ps) {
70
- x = origpoints[i];
71
- y = origpoints[i + 1];
72
-
73
- prevp = p;
74
- if (y < below) p = threspoints;
75
- else p = newpoints;
76
-
77
- if (addCrossingPoints && prevp !== p &&
78
- x !== null && i > 0 &&
79
- origpoints[i - ps] != null) {
80
- var interx = x + (below - y) * (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]);
81
- prevp.push(interx);
82
- prevp.push(below);
83
- for (m = 2; m < ps; ++m) {
84
- prevp.push(origpoints[i + m]);
85
- }
86
-
87
- p.push(null); // start new segment
88
- p.push(null);
89
- for (m = 2; m < ps; ++m) {
90
- p.push(origpoints[i + m]);
91
- }
92
-
93
- p.push(interx);
94
- p.push(below);
95
- for (m = 2; m < ps; ++m) {
96
- p.push(origpoints[i + m]);
97
- }
98
- }
99
-
100
- p.push(x);
101
- p.push(y);
102
- for (m = 2; m < ps; ++m) {
103
- p.push(origpoints[i + m]);
104
- }
105
- }
106
-
107
- datapoints.points = newpoints;
108
- thresholded.datapoints.points = threspoints;
109
-
110
- if (thresholded.datapoints.points.length > 0) {
111
- var origIndex = $.inArray(s, plot.getData());
112
- // Insert newly-generated series right after original one (to prevent it from becoming top-most)
113
- plot.getData().splice(origIndex + 1, 0, thresholded);
114
- }
115
-
116
- // FIXME: there are probably some edge cases left in bars
117
- }
118
-
119
- function processThresholds(plot, s, datapoints) {
120
- if (!s.threshold) return;
121
- if (s.threshold instanceof Array) {
122
- s.threshold.sort(function(a, b) {
123
- return a.below - b.below;
124
- });
125
-
126
- $(s.threshold).each(function(i, th) {
127
- thresholdData(plot, s, datapoints, th.below, th.color);
128
- });
129
- } else {
130
- thresholdData(plot, s, datapoints, s.threshold.below, s.threshold.color);
131
- }
132
- }
133
-
134
- plot.hooks.processDatapoints.push(processThresholds);
135
- }
136
-
137
- $.plot.plugins.push({
138
- init: init,
139
- options: options,
140
- name: 'threshold',
141
- version: '1.2'
142
- });
143
- })(jQuery);
1
+ /* Flot plugin for thresholding data.
2
+
3
+ Copyright (c) 2007-2014 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ The plugin supports these options:
7
+
8
+ series: {
9
+ threshold: {
10
+ below: number
11
+ color: colorspec
12
+ }
13
+ }
14
+
15
+ It can also be applied to a single series, like this:
16
+
17
+ $.plot( $("#placeholder"), [{
18
+ data: [ ... ],
19
+ threshold: { ... }
20
+ }])
21
+
22
+ An array can be passed for multiple thresholding, like this:
23
+
24
+ threshold: [{
25
+ below: number1
26
+ color: color1
27
+ },{
28
+ below: number2
29
+ color: color2
30
+ }]
31
+
32
+ These multiple threshold objects can be passed in any order since they are
33
+ sorted by the processing function.
34
+
35
+ The data points below "below" are drawn with the specified color. This makes
36
+ it easy to mark points below 0, e.g. for budget data.
37
+
38
+ Internally, the plugin works by splitting the data into two series, above and
39
+ below the threshold. The extra series below the threshold will have its label
40
+ cleared and the special "originSeries" attribute set to the original series.
41
+ You may need to check for this in hover events.
42
+
43
+ */
44
+
45
+ (function ($) {
46
+ var options = {
47
+ series: { threshold: null } // or { below: number, color: color spec}
48
+ };
49
+
50
+ function init(plot) {
51
+ function thresholdData(plot, s, datapoints, below, color) {
52
+ var ps = datapoints.pointsize, i, x, y, p, prevp,
53
+ thresholded = $.extend({}, s); // note: shallow copy
54
+
55
+ thresholded.datapoints = { points: [], pointsize: ps, format: datapoints.format };
56
+ thresholded.label = null;
57
+ thresholded.color = color;
58
+ thresholded.threshold = null;
59
+ thresholded.originSeries = s;
60
+ thresholded.data = [];
61
+
62
+ var origpoints = datapoints.points,
63
+ addCrossingPoints = s.lines.show;
64
+
65
+ var threspoints = [];
66
+ var newpoints = [];
67
+ var m;
68
+
69
+ for (i = 0; i < origpoints.length; i += ps) {
70
+ x = origpoints[i];
71
+ y = origpoints[i + 1];
72
+
73
+ prevp = p;
74
+ if (y < below) p = threspoints;
75
+ else p = newpoints;
76
+
77
+ if (addCrossingPoints && prevp !== p &&
78
+ x !== null && i > 0 &&
79
+ origpoints[i - ps] != null) {
80
+ var interx = x + (below - y) * (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]);
81
+ prevp.push(interx);
82
+ prevp.push(below);
83
+ for (m = 2; m < ps; ++m) {
84
+ prevp.push(origpoints[i + m]);
85
+ }
86
+
87
+ p.push(null); // start new segment
88
+ p.push(null);
89
+ for (m = 2; m < ps; ++m) {
90
+ p.push(origpoints[i + m]);
91
+ }
92
+
93
+ p.push(interx);
94
+ p.push(below);
95
+ for (m = 2; m < ps; ++m) {
96
+ p.push(origpoints[i + m]);
97
+ }
98
+ }
99
+
100
+ p.push(x);
101
+ p.push(y);
102
+ for (m = 2; m < ps; ++m) {
103
+ p.push(origpoints[i + m]);
104
+ }
105
+ }
106
+
107
+ datapoints.points = newpoints;
108
+ thresholded.datapoints.points = threspoints;
109
+
110
+ if (thresholded.datapoints.points.length > 0) {
111
+ var origIndex = $.inArray(s, plot.getData());
112
+ // Insert newly-generated series right after original one (to prevent it from becoming top-most)
113
+ plot.getData().splice(origIndex + 1, 0, thresholded);
114
+ }
115
+
116
+ // FIXME: there are probably some edge cases left in bars
117
+ }
118
+
119
+ function processThresholds(plot, s, datapoints) {
120
+ if (!s.threshold) return;
121
+ if (s.threshold instanceof Array) {
122
+ s.threshold.sort(function(a, b) {
123
+ return a.below - b.below;
124
+ });
125
+
126
+ $(s.threshold).each(function(i, th) {
127
+ thresholdData(plot, s, datapoints, th.below, th.color);
128
+ });
129
+ } else {
130
+ thresholdData(plot, s, datapoints, s.threshold.below, s.threshold.color);
131
+ }
132
+ }
133
+
134
+ plot.hooks.processDatapoints.push(processThresholds);
135
+ }
136
+
137
+ $.plot.plugins.push({
138
+ init: init,
139
+ options: options,
140
+ name: 'threshold',
141
+ version: '1.2'
142
+ });
143
+ })(jQuery);