@perses-dev/core 0.39.0 → 0.40.1
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/dist/cjs/constants/dashboard-defaults.js +6 -2
- package/dist/cjs/constants/dialog.js +3 -1
- package/dist/cjs/constants/index.js +11 -9
- package/dist/cjs/index.js +12 -10
- package/dist/cjs/model/calculations.js +61 -49
- package/dist/cjs/model/index.js +28 -26
- package/dist/cjs/model/legend.js +39 -19
- package/dist/cjs/model/resource.js +9 -0
- package/dist/cjs/model/time-series-queries.js +3 -1
- package/dist/cjs/model/time.js +147 -64
- package/dist/cjs/model/units/bytes.js +26 -20
- package/dist/cjs/model/units/constants.js +3 -1
- package/dist/cjs/model/units/decimal.js +20 -14
- package/dist/cjs/model/units/index.js +13 -11
- package/dist/cjs/model/units/percent.js +21 -15
- package/dist/cjs/model/units/time.js +68 -60
- package/dist/cjs/model/units/types.js +3 -1
- package/dist/cjs/model/units/units.js +67 -43
- package/dist/cjs/model/units/utils.js +13 -7
- package/dist/cjs/model/variables.js +16 -3
- package/dist/cjs/utils/event.js +3 -1
- package/dist/cjs/utils/fetch.js +12 -4
- package/dist/cjs/utils/index.js +17 -14
- package/dist/cjs/utils/is-empty-object.js +3 -1
- package/dist/cjs/utils/mathjs.js +3 -1
- package/dist/cjs/utils/memo.js +10 -6
- package/dist/cjs/utils/panel-refs.js +9 -3
- package/dist/cjs/utils/text.js +33 -21
- package/dist/cjs/utils/time-series-data.js +21 -11
- package/dist/cjs/utils/types.js +16 -0
- package/dist/constants/dashboard-defaults.js.map +1 -1
- package/dist/constants/dialog.js.map +1 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/calculations.d.ts +9 -8
- package/dist/model/calculations.d.ts.map +1 -1
- package/dist/model/calculations.js +46 -45
- package/dist/model/calculations.js.map +1 -1
- package/dist/model/datasource.d.ts +19 -3
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/display.d.ts +1 -1
- package/dist/model/display.d.ts.map +1 -1
- package/dist/model/display.js.map +1 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/legend.d.ts +6 -6
- package/dist/model/legend.js +9 -9
- package/dist/model/legend.js.map +1 -1
- package/dist/model/panels.d.ts +5 -2
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/resource.d.ts +3 -2
- package/dist/model/resource.d.ts.map +1 -1
- package/dist/model/resource.js +3 -1
- package/dist/model/resource.js.map +1 -1
- package/dist/model/thresholds.d.ts +2 -2
- package/dist/model/thresholds.d.ts.map +1 -1
- package/dist/model/thresholds.js.map +1 -1
- package/dist/model/time-series-queries.js.map +1 -1
- package/dist/model/time.d.ts +3 -0
- package/dist/model/time.d.ts.map +1 -1
- package/dist/model/time.js +115 -55
- package/dist/model/time.js.map +1 -1
- package/dist/model/units/bytes.d.ts +8 -8
- package/dist/model/units/bytes.d.ts.map +1 -1
- package/dist/model/units/bytes.js +16 -16
- package/dist/model/units/bytes.js.map +1 -1
- package/dist/model/units/constants.js.map +1 -1
- package/dist/model/units/decimal.d.ts +8 -8
- package/dist/model/units/decimal.d.ts.map +1 -1
- package/dist/model/units/decimal.js +12 -12
- package/dist/model/units/decimal.js.map +1 -1
- package/dist/model/units/index.js.map +1 -1
- package/dist/model/units/percent.d.ts +7 -7
- package/dist/model/units/percent.d.ts.map +1 -1
- package/dist/model/units/percent.js +12 -12
- package/dist/model/units/percent.js.map +1 -1
- package/dist/model/units/time.d.ts +15 -15
- package/dist/model/units/time.d.ts.map +1 -1
- package/dist/model/units/time.js +56 -56
- package/dist/model/units/time.js.map +1 -1
- package/dist/model/units/types.d.ts +14 -5
- package/dist/model/units/types.d.ts.map +1 -1
- package/dist/model/units/types.js.map +1 -1
- package/dist/model/units/units.d.ts +30 -30
- package/dist/model/units/units.d.ts.map +1 -1
- package/dist/model/units/units.js +31 -31
- package/dist/model/units/units.js.map +1 -1
- package/dist/model/units/utils.d.ts +2 -2
- package/dist/model/units/utils.d.ts.map +1 -1
- package/dist/model/units/utils.js +4 -4
- package/dist/model/units/utils.js.map +1 -1
- package/dist/model/variables.d.ts +25 -7
- package/dist/model/variables.d.ts.map +1 -1
- package/dist/model/variables.js +3 -0
- package/dist/model/variables.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/is-empty-object.js.map +1 -1
- package/dist/utils/mathjs.js.map +1 -1
- package/dist/utils/memo.js +2 -2
- package/dist/utils/memo.js.map +1 -1
- package/dist/utils/panel-refs.js.map +1 -1
- package/dist/utils/text.d.ts +5 -5
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/utils/text.js +17 -17
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/time-series-data.js +6 -6
- package/dist/utils/time-series-data.js.map +1 -1
- package/dist/utils/types.d.ts +2 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +15 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +5 -4
|
@@ -21,8 +21,12 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
DEFAULT_DASHBOARD_DURATION: ()
|
|
25
|
-
|
|
24
|
+
DEFAULT_DASHBOARD_DURATION: function() {
|
|
25
|
+
return DEFAULT_DASHBOARD_DURATION;
|
|
26
|
+
},
|
|
27
|
+
DEFAULT_REFRESH_INTERVAL: function() {
|
|
28
|
+
return DEFAULT_REFRESH_INTERVAL;
|
|
29
|
+
}
|
|
26
30
|
});
|
|
27
31
|
const DEFAULT_DASHBOARD_DURATION = '1h';
|
|
28
32
|
const DEFAULT_REFRESH_INTERVAL = '0s';
|
|
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "SAVE_DEFAULTS_DIALOG_TEXT", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return SAVE_DEFAULTS_DIALOG_TEXT;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const SAVE_DEFAULTS_DIALOG_TEXT = 'You have made changes to the time range or the variables values. Would you like to save these as defaults?';
|
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
17
|
+
_export_star(require("./dashboard-defaults"), exports);
|
|
18
|
+
_export_star(require("./dialog"), exports);
|
|
19
|
+
function _export_star(from, to) {
|
|
20
20
|
Object.keys(from).forEach(function(k) {
|
|
21
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
22
|
+
Object.defineProperty(to, k, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return from[k];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
27
29
|
});
|
|
28
30
|
return from;
|
|
29
31
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function
|
|
17
|
+
_export_star(require("./constants"), exports);
|
|
18
|
+
_export_star(require("./model"), exports);
|
|
19
|
+
_export_star(require("./utils"), exports);
|
|
20
|
+
function _export_star(from, to) {
|
|
21
21
|
Object.keys(from).forEach(function(k) {
|
|
22
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
23
|
+
Object.defineProperty(to, k, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return from[k];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
});
|
|
29
31
|
return from;
|
|
30
32
|
}
|
|
@@ -21,51 +21,63 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
DEFAULT_CALCULATION: function() {
|
|
25
|
+
return DEFAULT_CALCULATION;
|
|
26
|
+
},
|
|
27
|
+
CalculationsMap: function() {
|
|
28
|
+
return CalculationsMap;
|
|
29
|
+
},
|
|
30
|
+
CALCULATIONS_CONFIG: function() {
|
|
31
|
+
return CALCULATIONS_CONFIG;
|
|
32
|
+
},
|
|
33
|
+
getCalculations: function() {
|
|
34
|
+
return getCalculations;
|
|
35
|
+
},
|
|
36
|
+
getCalculation: function() {
|
|
37
|
+
return getCalculation;
|
|
38
|
+
}
|
|
28
39
|
});
|
|
40
|
+
const DEFAULT_CALCULATION = 'last-number';
|
|
29
41
|
const CalculationsMap = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
first: first,
|
|
43
|
+
last: last,
|
|
44
|
+
'first-number': firstNumber,
|
|
45
|
+
'last-number': lastNumber,
|
|
46
|
+
mean: mean,
|
|
47
|
+
sum: sum,
|
|
48
|
+
min: min,
|
|
49
|
+
max: max
|
|
38
50
|
};
|
|
39
51
|
const CALCULATIONS_CONFIG = {
|
|
40
|
-
|
|
52
|
+
first: {
|
|
41
53
|
label: 'First',
|
|
42
54
|
description: 'First value'
|
|
43
55
|
},
|
|
44
|
-
|
|
56
|
+
last: {
|
|
45
57
|
label: 'Last',
|
|
46
58
|
description: 'Last value'
|
|
47
59
|
},
|
|
48
|
-
|
|
60
|
+
'first-number': {
|
|
49
61
|
label: 'First *',
|
|
50
62
|
description: 'First numeric value'
|
|
51
63
|
},
|
|
52
|
-
|
|
64
|
+
'last-number': {
|
|
53
65
|
label: 'Last *',
|
|
54
66
|
description: 'Last numeric value'
|
|
55
67
|
},
|
|
56
|
-
|
|
68
|
+
mean: {
|
|
57
69
|
label: 'Avg',
|
|
58
70
|
description: 'Average value excluding nulls'
|
|
59
71
|
},
|
|
60
|
-
|
|
72
|
+
sum: {
|
|
61
73
|
label: 'Sum',
|
|
62
74
|
description: 'The sum of all values'
|
|
63
75
|
},
|
|
64
|
-
|
|
76
|
+
min: {
|
|
65
77
|
label: 'Min',
|
|
66
78
|
description: 'Minimum value'
|
|
67
79
|
},
|
|
68
|
-
|
|
80
|
+
max: {
|
|
69
81
|
label: 'Max',
|
|
70
82
|
description: 'Maximum value'
|
|
71
83
|
}
|
|
@@ -83,55 +95,55 @@ function getCalculations(values, includeCalculations) {
|
|
|
83
95
|
// in a single iteration of the data to minimize the performance impact of
|
|
84
96
|
// generating multiple calculations for large timeseries values. This is
|
|
85
97
|
// less optimized for certain single calculations when done in isolation (e.g.
|
|
86
|
-
// `
|
|
98
|
+
// `last`), but will be more performant in the more expensive cases where
|
|
87
99
|
// multiple values are being used (e.g. table legend).
|
|
88
100
|
values.forEach((tuple, i)=>{
|
|
89
101
|
const value = tuple[1];
|
|
90
|
-
if (i === 0 && '
|
|
91
|
-
calculations.
|
|
102
|
+
if (i === 0 && 'first' in calculations) {
|
|
103
|
+
calculations.first = value;
|
|
92
104
|
}
|
|
93
|
-
if (i === values.length - 1 && '
|
|
94
|
-
calculations.
|
|
105
|
+
if (i === values.length - 1 && 'last' in calculations) {
|
|
106
|
+
calculations.last = value;
|
|
95
107
|
}
|
|
96
108
|
// Handling specific to non-null values.
|
|
97
109
|
if (typeof value === 'number') {
|
|
98
110
|
nonNullCount += 1;
|
|
99
111
|
sum += value;
|
|
100
|
-
if ('
|
|
112
|
+
if ('first-number' in calculations && calculations['first-number'] === undefined) {
|
|
101
113
|
// Save the first number we see.
|
|
102
|
-
calculations
|
|
114
|
+
calculations['first-number'] = value;
|
|
103
115
|
}
|
|
104
|
-
if ('
|
|
116
|
+
if ('last-number' in calculations) {
|
|
105
117
|
// Keep setting the numbers we see, which will eventually be set to the
|
|
106
118
|
// last number when finished iterating.
|
|
107
|
-
calculations
|
|
119
|
+
calculations['last-number'] = value;
|
|
108
120
|
}
|
|
109
|
-
if ('
|
|
110
|
-
if (typeof calculations.
|
|
121
|
+
if ('min' in calculations) {
|
|
122
|
+
if (typeof calculations.min !== 'number') {
|
|
111
123
|
// Init the first time we see a number
|
|
112
|
-
calculations.
|
|
124
|
+
calculations.min = value;
|
|
113
125
|
} else {
|
|
114
126
|
// Use lowest value once initialized
|
|
115
|
-
calculations.
|
|
127
|
+
calculations.min = Math.min(calculations.min, value);
|
|
116
128
|
}
|
|
117
129
|
}
|
|
118
|
-
if ('
|
|
119
|
-
if (typeof calculations.
|
|
130
|
+
if ('max' in calculations) {
|
|
131
|
+
if (typeof calculations.max !== 'number') {
|
|
120
132
|
// Init the first time we see a number
|
|
121
|
-
calculations.
|
|
133
|
+
calculations.max = value;
|
|
122
134
|
} else {
|
|
123
135
|
// Use highest value once initialized
|
|
124
|
-
calculations.
|
|
136
|
+
calculations.max = Math.max(calculations.max, value);
|
|
125
137
|
}
|
|
126
138
|
}
|
|
127
139
|
}
|
|
128
140
|
});
|
|
129
141
|
// Set calculations that require iterating over all values.
|
|
130
|
-
if (nonNullCount > 0 && '
|
|
131
|
-
calculations.
|
|
142
|
+
if (nonNullCount > 0 && 'sum' in calculations) {
|
|
143
|
+
calculations.sum = sum;
|
|
132
144
|
}
|
|
133
|
-
if (nonNullCount > 0 && '
|
|
134
|
-
calculations.
|
|
145
|
+
if (nonNullCount > 0 && 'mean' in calculations) {
|
|
146
|
+
calculations.mean = sum / nonNullCount;
|
|
135
147
|
}
|
|
136
148
|
return calculations;
|
|
137
149
|
}
|
|
@@ -141,26 +153,26 @@ function getCalculation(values, calculation) {
|
|
|
141
153
|
])[calculation];
|
|
142
154
|
}
|
|
143
155
|
function first(values) {
|
|
144
|
-
return getCalculation(values, '
|
|
156
|
+
return getCalculation(values, 'first');
|
|
145
157
|
}
|
|
146
158
|
function last(values) {
|
|
147
|
-
return getCalculation(values, '
|
|
159
|
+
return getCalculation(values, 'last');
|
|
148
160
|
}
|
|
149
161
|
function firstNumber(values) {
|
|
150
|
-
return getCalculation(values, '
|
|
162
|
+
return getCalculation(values, 'first-number');
|
|
151
163
|
}
|
|
152
164
|
function lastNumber(values) {
|
|
153
|
-
return getCalculation(values, '
|
|
165
|
+
return getCalculation(values, 'last-number');
|
|
154
166
|
}
|
|
155
167
|
function mean(values) {
|
|
156
|
-
return getCalculation(values, '
|
|
168
|
+
return getCalculation(values, 'mean');
|
|
157
169
|
}
|
|
158
170
|
function sum(values) {
|
|
159
|
-
return getCalculation(values, '
|
|
171
|
+
return getCalculation(values, 'sum');
|
|
160
172
|
}
|
|
161
173
|
function min(values) {
|
|
162
|
-
return getCalculation(values, '
|
|
174
|
+
return getCalculation(values, 'min');
|
|
163
175
|
}
|
|
164
176
|
function max(values) {
|
|
165
|
-
return getCalculation(values, '
|
|
177
|
+
return getCalculation(values, 'max');
|
|
166
178
|
}
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -14,33 +14,35 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
function
|
|
17
|
+
_export_star(require("./calculations"), exports);
|
|
18
|
+
_export_star(require("./dashboard"), exports);
|
|
19
|
+
_export_star(require("./datasource"), exports);
|
|
20
|
+
_export_star(require("./definitions"), exports);
|
|
21
|
+
_export_star(require("./display"), exports);
|
|
22
|
+
_export_star(require("./http"), exports);
|
|
23
|
+
_export_star(require("./layout"), exports);
|
|
24
|
+
_export_star(require("./legend"), exports);
|
|
25
|
+
_export_star(require("./notice"), exports);
|
|
26
|
+
_export_star(require("./panels"), exports);
|
|
27
|
+
_export_star(require("./project"), exports);
|
|
28
|
+
_export_star(require("./query"), exports);
|
|
29
|
+
_export_star(require("./resource"), exports);
|
|
30
|
+
_export_star(require("./thresholds"), exports);
|
|
31
|
+
_export_star(require("./time"), exports);
|
|
32
|
+
_export_star(require("./time-series-data"), exports);
|
|
33
|
+
_export_star(require("./time-series-queries"), exports);
|
|
34
|
+
_export_star(require("./units"), exports);
|
|
35
|
+
_export_star(require("./variables"), exports);
|
|
36
|
+
function _export_star(from, to) {
|
|
37
37
|
Object.keys(from).forEach(function(k) {
|
|
38
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
39
|
+
Object.defineProperty(to, k, {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function() {
|
|
42
|
+
return from[k];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
44
46
|
});
|
|
45
47
|
return from;
|
|
46
48
|
}
|
package/dist/cjs/model/legend.js
CHANGED
|
@@ -25,28 +25,48 @@ function _export(target, all) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
_export(exports, {
|
|
28
|
-
legendPositions: ()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
legendPositions: function() {
|
|
29
|
+
return legendPositions;
|
|
30
|
+
},
|
|
31
|
+
legendModes: function() {
|
|
32
|
+
return legendModes;
|
|
33
|
+
},
|
|
34
|
+
legendSizes: function() {
|
|
35
|
+
return legendSizes;
|
|
36
|
+
},
|
|
37
|
+
isValidLegendPosition: function() {
|
|
38
|
+
return isValidLegendPosition;
|
|
39
|
+
},
|
|
40
|
+
isValidLegendMode: function() {
|
|
41
|
+
return isValidLegendMode;
|
|
42
|
+
},
|
|
43
|
+
isValidLegendSize: function() {
|
|
44
|
+
return isValidLegendSize;
|
|
45
|
+
},
|
|
46
|
+
DEFAULT_LEGEND: function() {
|
|
47
|
+
return DEFAULT_LEGEND;
|
|
48
|
+
},
|
|
49
|
+
getLegendPosition: function() {
|
|
50
|
+
return getLegendPosition;
|
|
51
|
+
},
|
|
52
|
+
getLegendMode: function() {
|
|
53
|
+
return getLegendMode;
|
|
54
|
+
},
|
|
55
|
+
getLegendSize: function() {
|
|
56
|
+
return getLegendSize;
|
|
57
|
+
}
|
|
38
58
|
});
|
|
39
59
|
const legendPositions = [
|
|
40
|
-
'
|
|
41
|
-
'
|
|
60
|
+
'bottom',
|
|
61
|
+
'right'
|
|
42
62
|
];
|
|
43
63
|
const legendModes = [
|
|
44
|
-
'
|
|
45
|
-
'
|
|
64
|
+
'list',
|
|
65
|
+
'table'
|
|
46
66
|
];
|
|
47
67
|
const legendSizes = [
|
|
48
|
-
'
|
|
49
|
-
'
|
|
68
|
+
'small',
|
|
69
|
+
'medium'
|
|
50
70
|
];
|
|
51
71
|
function isValidLegendPosition(position) {
|
|
52
72
|
return legendPositions.includes(position);
|
|
@@ -58,9 +78,9 @@ function isValidLegendSize(size) {
|
|
|
58
78
|
return legendSizes.includes(size);
|
|
59
79
|
}
|
|
60
80
|
const DEFAULT_LEGEND = {
|
|
61
|
-
position: '
|
|
62
|
-
mode: '
|
|
63
|
-
size: '
|
|
81
|
+
position: 'bottom',
|
|
82
|
+
mode: 'list',
|
|
83
|
+
size: 'medium'
|
|
64
84
|
};
|
|
65
85
|
function getLegendPosition(position) {
|
|
66
86
|
if (position === undefined) {
|
|
@@ -14,3 +14,12 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
+
Object.defineProperty(exports, "getMetadataProject", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return getMetadataProject;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function getMetadataProject(metadata) {
|
|
24
|
+
return 'project' in metadata ? metadata.project : undefined;
|
|
25
|
+
}
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "isTimeSeriesValueTuple", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return isTimeSeriesValueTuple;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
function isTimeSeriesValueTuple(data) {
|
|
22
24
|
if (data.length !== 2) return false;
|