@devgateway/dvz-ui-react 1.6.0 → 1.6.2
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/common.css +1 -1
- package/dist/cjs/embeddable/chart/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/Line.js +1 -1
- package/dist/cjs/embeddable/chart/Pie.js +1 -1
- package/dist/cjs/embeddable/filtered-posts/index.js +1 -1
- package/dist/cjs/layout/Header.js +2 -2
- package/dist/cjs/styles.css +1 -1
- package/dist/esm/common.css +1 -1
- package/dist/esm/embeddable/chart/Bar.js +401 -359
- package/dist/esm/embeddable/chart/Line.js +126 -122
- package/dist/esm/embeddable/chart/Pie.js +101 -100
- package/dist/esm/embeddable/filtered-posts/index.js +85 -83
- package/dist/esm/layout/Header.js +1 -1
- package/dist/esm/styles.css +1 -1
- package/package.json +2 -2
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as B, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { ResponsiveBar as
|
|
5
|
-
import { injectIntl as
|
|
1
|
+
import { jsx as r, jsxs as x, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
+
import { useState as B, useEffect as ge, Fragment as je } from "react";
|
|
3
|
+
import Ht from "./Tooltip.js";
|
|
4
|
+
import { ResponsiveBar as Tt } from "@nivo/bar";
|
|
5
|
+
import { injectIntl as At } from "react-intl";
|
|
6
6
|
import { useTheme as _t } from "@nivo/theming";
|
|
7
|
-
import { line as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import { line as Re } from "d3-shape";
|
|
8
|
+
import Ye from "./LineLayer.js";
|
|
9
|
+
import be from "papaparse";
|
|
10
10
|
import St from "../../layout/FlexWrapDetector.js";
|
|
11
11
|
import ve from "../../utils/deviceType.js";
|
|
12
|
-
const jt = "middle", Rt = "top",
|
|
12
|
+
const jt = "middle", Rt = "top", W = "#66676d", Ke = "#dddddd", Yt = "none", Q = "_Color", Kt = ({
|
|
13
13
|
editing: y,
|
|
14
|
-
legends:
|
|
15
|
-
marginLeft:
|
|
16
|
-
marginTop:
|
|
17
|
-
marginRight:
|
|
18
|
-
marginBottom:
|
|
14
|
+
legends: X,
|
|
15
|
+
marginLeft: Pe,
|
|
16
|
+
marginTop: j,
|
|
17
|
+
marginRight: Xe,
|
|
18
|
+
marginBottom: R,
|
|
19
19
|
options: u,
|
|
20
|
-
intl:
|
|
21
|
-
format:
|
|
20
|
+
intl: b,
|
|
21
|
+
format: g,
|
|
22
22
|
colors: H,
|
|
23
23
|
groupMode: O,
|
|
24
|
-
height:
|
|
24
|
+
height: Ce,
|
|
25
25
|
showLegends: G,
|
|
26
26
|
legendPosition: v,
|
|
27
|
-
tickRotation:
|
|
27
|
+
tickRotation: z,
|
|
28
28
|
offsetText: ee,
|
|
29
29
|
tickColor: te,
|
|
30
30
|
layout: o,
|
|
31
|
-
reverse:
|
|
32
|
-
offsetY:
|
|
31
|
+
reverse: T,
|
|
32
|
+
offsetY: qe,
|
|
33
33
|
csvLineLayerData: Ne,
|
|
34
34
|
tooltip: ae,
|
|
35
35
|
lineLayerEnabled: ne,
|
|
36
36
|
overlays: A,
|
|
37
|
-
maxValue:
|
|
38
|
-
valueScale:
|
|
37
|
+
maxValue: le,
|
|
38
|
+
valueScale: Ze,
|
|
39
39
|
colorGenerator: N,
|
|
40
40
|
legendLabel: Ie,
|
|
41
|
-
overrideTickColor:
|
|
42
|
-
fixedMinValue:
|
|
41
|
+
overrideTickColor: Je,
|
|
42
|
+
fixedMinValue: re,
|
|
43
43
|
fixedMaxValue: se,
|
|
44
|
-
barPadding:
|
|
45
|
-
barLabelPosition:
|
|
46
|
-
barInnerPadding:
|
|
47
|
-
tooltipEnabled:
|
|
44
|
+
barPadding: Ue,
|
|
45
|
+
barLabelPosition: ke,
|
|
46
|
+
barInnerPadding: Qe,
|
|
47
|
+
tooltipEnabled: Ge,
|
|
48
48
|
xLabelColor: D,
|
|
49
|
-
barLabelColor:
|
|
50
|
-
legendCheckBack:
|
|
49
|
+
barLabelColor: C,
|
|
50
|
+
legendCheckBack: k,
|
|
51
51
|
legendLabelBack: ie,
|
|
52
52
|
legendLabelColor: ce,
|
|
53
|
-
highlightXAxisLine:
|
|
54
|
-
showTickLine:
|
|
55
|
-
showRightAxis:
|
|
56
|
-
offsetRight:
|
|
57
|
-
offsetBottom:
|
|
53
|
+
highlightXAxisLine: et,
|
|
54
|
+
showTickLine: Y,
|
|
55
|
+
showRightAxis: tt,
|
|
56
|
+
offsetRight: at,
|
|
57
|
+
offsetBottom: Le,
|
|
58
58
|
confidenceIntervals: de,
|
|
59
|
-
showGroupTotal:
|
|
59
|
+
showGroupTotal: nt,
|
|
60
60
|
groupTotalLabel: we,
|
|
61
61
|
groupTotalFormat: De,
|
|
62
62
|
groupTotalMeasure: Fe,
|
|
63
|
-
groupTotalOffset:
|
|
64
|
-
groupTotalFixedPosition:
|
|
65
|
-
tooltipEnableMarkdown:
|
|
63
|
+
groupTotalOffset: E,
|
|
64
|
+
groupTotalFixedPosition: q,
|
|
65
|
+
tooltipEnableMarkdown: lt,
|
|
66
66
|
xAxisTickValues: rt,
|
|
67
|
-
yAxisTickValues:
|
|
68
|
-
mobileCustomization:
|
|
67
|
+
yAxisTickValues: st,
|
|
68
|
+
mobileCustomization: it,
|
|
69
69
|
minMaxClamp: Pt,
|
|
70
|
-
reverseLegend:
|
|
71
|
-
enableGridY:
|
|
72
|
-
enableGridX:
|
|
70
|
+
reverseLegend: ct,
|
|
71
|
+
enableGridY: dt,
|
|
72
|
+
enableGridX: ht,
|
|
73
73
|
customAxisFormat: F,
|
|
74
|
-
previewMode:
|
|
74
|
+
previewMode: $,
|
|
75
75
|
showLegendsInColumns: Xt = !1,
|
|
76
76
|
numberOfLegendColumns: Ct = 4
|
|
77
77
|
}) => {
|
|
78
|
-
var
|
|
79
|
-
const
|
|
78
|
+
var Se;
|
|
79
|
+
const Me = ["mobile", "tablet", "midTablet"].includes(
|
|
80
80
|
ve()
|
|
81
|
-
),
|
|
82
|
-
decodeURIComponent(
|
|
83
|
-
),
|
|
81
|
+
), Z = ["tablet", "midTablet"].includes(ve()), J = ve() === "mobile", he = 30, me = 15, m = JSON.parse(
|
|
82
|
+
decodeURIComponent(it)
|
|
83
|
+
), Oe = Me && ((m == null ? void 0 : m.showCustomization) ?? !1), _ = Oe && $ !== "Desktop", S = !y && Oe, ue = () => C === "null" || C === null || !C ? "#000000" : C, [L, mt] = B([]), { colorBy: K } = H, ze = {};
|
|
84
84
|
A.forEach((e, t) => {
|
|
85
|
-
|
|
85
|
+
ze[t] = !0;
|
|
86
86
|
});
|
|
87
|
-
const [I, ut] = B(
|
|
88
|
-
|
|
87
|
+
const [I, ut] = B(ze), [Ee, ft] = B(50), [qt, $e] = B(j), [Zt, Ve] = B(0), [Be, We] = B(R), [He, ot] = B(!1);
|
|
88
|
+
ge(() => {
|
|
89
89
|
let e, t;
|
|
90
90
|
return e = requestAnimationFrame(() => {
|
|
91
91
|
e = requestAnimationFrame(() => {
|
|
@@ -97,51 +97,51 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
97
97
|
cancelAnimationFrame(e), clearTimeout(t);
|
|
98
98
|
};
|
|
99
99
|
}, []);
|
|
100
|
-
const
|
|
101
|
-
let
|
|
102
|
-
return e.data && (
|
|
103
|
-
let
|
|
104
|
-
return
|
|
105
|
-
enabled:
|
|
106
|
-
color:
|
|
107
|
-
id:
|
|
108
|
-
label:
|
|
100
|
+
const P = ((e, t, s, i, a) => {
|
|
101
|
+
let c = [];
|
|
102
|
+
return e.data && (c = t.colorBy === "index" ? e.data.map((l) => {
|
|
103
|
+
let n, d = !0;
|
|
104
|
+
return s.indexOf(l[e.indexBy]) > -1 ? (d = !1, n = i) : n = l[Q] ? l[Q] : a.getColor(l.id, l), {
|
|
105
|
+
enabled: d,
|
|
106
|
+
color: n,
|
|
107
|
+
id: l[e.indexBy],
|
|
108
|
+
label: l[e.indexBy]
|
|
109
109
|
};
|
|
110
|
-
}) : e.keys.map((
|
|
111
|
-
let
|
|
112
|
-
return
|
|
113
|
-
enabled:
|
|
114
|
-
color:
|
|
115
|
-
id:
|
|
116
|
-
label:
|
|
110
|
+
}) : e.keys.map((l) => {
|
|
111
|
+
let n, d = !0;
|
|
112
|
+
return s.indexOf(l) > -1 ? (d = !1, n = i) : n = a.getColorByKey(l), {
|
|
113
|
+
enabled: d,
|
|
114
|
+
color: n,
|
|
115
|
+
id: l,
|
|
116
|
+
label: l
|
|
117
117
|
};
|
|
118
|
-
})),
|
|
118
|
+
})), c;
|
|
119
119
|
})(
|
|
120
120
|
u,
|
|
121
121
|
H,
|
|
122
|
-
|
|
122
|
+
L,
|
|
123
123
|
Yt,
|
|
124
124
|
N
|
|
125
|
-
),
|
|
126
|
-
G &&
|
|
125
|
+
), Te = () => (ct && P.reverse(), /* @__PURE__ */ x(pe, { children: [
|
|
126
|
+
G && P.map((e) => /* @__PURE__ */ x(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
129
|
className: `legend item ${e.enabled ? "" : "ignore"}`,
|
|
130
|
-
onClick: () =>
|
|
130
|
+
onClick: () => Lt(e.id),
|
|
131
131
|
children: [
|
|
132
|
-
|
|
132
|
+
k && /* @__PURE__ */ r(
|
|
133
133
|
"input",
|
|
134
134
|
{
|
|
135
135
|
className: e.enabled ? "" : "ignore",
|
|
136
136
|
type: "checkbox",
|
|
137
137
|
checked: e.enabled,
|
|
138
138
|
style: {
|
|
139
|
-
backgroundColor:
|
|
139
|
+
backgroundColor: k ? K === "values" ? te : e.color : "none",
|
|
140
140
|
color: "#000"
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
!
|
|
144
|
+
!k && /* @__PURE__ */ r(
|
|
145
145
|
"input",
|
|
146
146
|
{
|
|
147
147
|
type: "checkbox",
|
|
@@ -151,26 +151,26 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
|
|
154
|
+
k && /* @__PURE__ */ r(
|
|
155
155
|
"span",
|
|
156
156
|
{
|
|
157
157
|
className: "checkmark-with-bg",
|
|
158
158
|
style: { backgroundColor: e.color }
|
|
159
159
|
}
|
|
160
160
|
),
|
|
161
|
-
!
|
|
162
|
-
ie && /* @__PURE__ */
|
|
161
|
+
!k && /* @__PURE__ */ r("span", { className: "checkmark" }),
|
|
162
|
+
ie && /* @__PURE__ */ r(
|
|
163
163
|
"label",
|
|
164
164
|
{
|
|
165
165
|
className: e.enabled ? "" : "ignore",
|
|
166
166
|
style: {
|
|
167
|
-
backgroundColor:
|
|
167
|
+
backgroundColor: K === "values" ? te : e.color,
|
|
168
168
|
color: ce
|
|
169
169
|
},
|
|
170
170
|
children: e.label
|
|
171
171
|
}
|
|
172
172
|
),
|
|
173
|
-
!ie && /* @__PURE__ */
|
|
173
|
+
!ie && /* @__PURE__ */ r(
|
|
174
174
|
"label",
|
|
175
175
|
{
|
|
176
176
|
className: e.enabled ? "" : "ignore",
|
|
@@ -183,8 +183,8 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
183
183
|
]
|
|
184
184
|
}
|
|
185
185
|
)),
|
|
186
|
-
|
|
187
|
-
/* @__PURE__ */
|
|
186
|
+
K === "values" && /* @__PURE__ */ x("div", { className: "legend item", children: [
|
|
187
|
+
/* @__PURE__ */ r(
|
|
188
188
|
"label",
|
|
189
189
|
{
|
|
190
190
|
className: "range min",
|
|
@@ -196,16 +196,16 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
199
|
+
/* @__PURE__ */ r("label", { children: b.formatNumber(
|
|
200
|
+
g.style === "percent" ? N.minValue / 100 : N.minValue,
|
|
201
201
|
{
|
|
202
|
-
...
|
|
202
|
+
...g,
|
|
203
203
|
minimumFractionDigits: 0
|
|
204
204
|
}
|
|
205
205
|
) })
|
|
206
206
|
] }),
|
|
207
|
-
|
|
208
|
-
/* @__PURE__ */
|
|
207
|
+
K === "values" && /* @__PURE__ */ x("div", { className: "legend item", children: [
|
|
208
|
+
/* @__PURE__ */ r(
|
|
209
209
|
"label",
|
|
210
210
|
{
|
|
211
211
|
className: "range max",
|
|
@@ -218,37 +218,37 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
218
218
|
children: " "
|
|
219
219
|
}
|
|
220
220
|
),
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
|
|
221
|
+
/* @__PURE__ */ r("label", { children: b.formatNumber(
|
|
222
|
+
g.style === "percent" ? N.maxValue / 100 : N.maxValue,
|
|
223
223
|
{
|
|
224
|
-
...
|
|
224
|
+
...g,
|
|
225
225
|
minimumFractionDigits: 0
|
|
226
226
|
}
|
|
227
227
|
) })
|
|
228
228
|
] }),
|
|
229
|
-
G && ne && A.map((e, t) => /* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
229
|
+
G && ne && A.map((e, t) => /* @__PURE__ */ x("div", { className: "legend item", onClick: () => wt(t), children: [
|
|
230
|
+
/* @__PURE__ */ r(
|
|
231
231
|
"input",
|
|
232
232
|
{
|
|
233
|
-
className:
|
|
233
|
+
className: k && I[t] ? "" : "ignore",
|
|
234
234
|
type: "checkbox",
|
|
235
235
|
checked: I[t],
|
|
236
236
|
style: {
|
|
237
|
-
backgroundColor: I[t] &&
|
|
237
|
+
backgroundColor: I[t] && k === !0 ? e.lineColor : "none",
|
|
238
238
|
color: "#000"
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ r(
|
|
243
243
|
"span",
|
|
244
244
|
{
|
|
245
|
-
className:
|
|
245
|
+
className: k ? "checkmark-with-bg" : "checkmark",
|
|
246
246
|
style: {
|
|
247
|
-
backgroundColor: I[t] &&
|
|
247
|
+
backgroundColor: I[t] && k === !0 ? e.lineColor : "none"
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ r(
|
|
252
252
|
"label",
|
|
253
253
|
{
|
|
254
254
|
className: I[t] ? "" : "ignore",
|
|
@@ -261,115 +261,153 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
261
261
|
)
|
|
262
262
|
] }))
|
|
263
263
|
] }));
|
|
264
|
-
|
|
264
|
+
ge(() => {
|
|
265
265
|
(() => {
|
|
266
|
-
const
|
|
267
|
-
ft(
|
|
266
|
+
const s = 5 * Math.max(P.length - 5, 0);
|
|
267
|
+
ft(s);
|
|
268
268
|
})();
|
|
269
|
-
}, [
|
|
270
|
-
$e(
|
|
271
|
-
}, [v,
|
|
269
|
+
}, [P]), ge(() => {
|
|
270
|
+
$e(j), We(R);
|
|
271
|
+
}, [v, j, R]);
|
|
272
272
|
const yt = {
|
|
273
273
|
bottom: `-${Ee}px`
|
|
274
274
|
}, xt = {
|
|
275
275
|
bottom: `-${Ee}px`,
|
|
276
276
|
gap: "0px"
|
|
277
277
|
// top: "0px",
|
|
278
|
-
}, pt = (e) => fe(e, "1 0",
|
|
279
|
-
const t =
|
|
278
|
+
}, pt = (e) => fe(e, "1 0", Ke, "Y"), gt = (e) => fe(e, "4 4", W, "X"), bt = (e) => fe(e, "1 0", Ke, "X"), vt = (e) => {
|
|
279
|
+
const t = P.find((s) => s.id === e.value);
|
|
280
280
|
return t ? t.color : "#FFFFFF";
|
|
281
281
|
}, Nt = (e) => {
|
|
282
|
-
const { yScale: t, bars: i } = e;
|
|
283
|
-
return /* @__PURE__ */
|
|
284
|
-
let
|
|
285
|
-
u.dimensionsMetadata && u.dimensionsMetadata.size > 1 && (
|
|
286
|
-
const
|
|
287
|
-
(
|
|
282
|
+
const { yScale: t, xScale: s, bars: i } = e;
|
|
283
|
+
return /* @__PURE__ */ r(je, { children: i.filter((a) => a.data.value != null).map((a) => {
|
|
284
|
+
let c = a.data.indexValue;
|
|
285
|
+
u.dimensionsMetadata && u.dimensionsMetadata.size > 1 && (c = a.data.id);
|
|
286
|
+
const l = de.filter(
|
|
287
|
+
(n) => n.serieLabel == c
|
|
288
288
|
)[0];
|
|
289
|
-
if (
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
289
|
+
if (l && l.low && l.high)
|
|
290
|
+
if (o === "horizontal") {
|
|
291
|
+
const n = s(parseFloat(l.low)), d = s(parseFloat(l.high));
|
|
292
|
+
return /* @__PURE__ */ x("g", { children: [
|
|
293
|
+
/* @__PURE__ */ r(
|
|
294
|
+
"line",
|
|
295
|
+
{
|
|
296
|
+
x1: n,
|
|
297
|
+
x2: d,
|
|
298
|
+
y1: a.y + a.height / 2,
|
|
299
|
+
y2: a.y + a.height / 2,
|
|
300
|
+
strokeWidth: 1,
|
|
301
|
+
stroke: W
|
|
302
|
+
}
|
|
303
|
+
),
|
|
304
|
+
/* @__PURE__ */ r(
|
|
305
|
+
"line",
|
|
306
|
+
{
|
|
307
|
+
x1: n,
|
|
308
|
+
x2: n,
|
|
309
|
+
y1: a.y + a.height / 2 - 3,
|
|
310
|
+
y2: a.y + a.height / 2 + 3,
|
|
311
|
+
strokeWidth: 1,
|
|
312
|
+
stroke: W
|
|
313
|
+
}
|
|
314
|
+
),
|
|
315
|
+
/* @__PURE__ */ r(
|
|
316
|
+
"line",
|
|
317
|
+
{
|
|
318
|
+
x1: d,
|
|
319
|
+
x2: d,
|
|
320
|
+
y1: a.y + a.height / 2 - 3,
|
|
321
|
+
y2: a.y + a.height / 2 + 3,
|
|
322
|
+
strokeWidth: 1,
|
|
323
|
+
stroke: W
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
] });
|
|
327
|
+
} else {
|
|
328
|
+
const n = t(parseFloat(l.low)), d = t(parseFloat(l.high));
|
|
329
|
+
return /* @__PURE__ */ x("g", { children: [
|
|
330
|
+
/* @__PURE__ */ r(
|
|
331
|
+
"line",
|
|
332
|
+
{
|
|
333
|
+
y1: n,
|
|
334
|
+
y2: d,
|
|
335
|
+
x1: a.x + a.width / 2,
|
|
336
|
+
x2: a.x + a.width / 2,
|
|
337
|
+
strokeWidth: 1,
|
|
338
|
+
stroke: W
|
|
339
|
+
}
|
|
340
|
+
),
|
|
341
|
+
/* @__PURE__ */ r(
|
|
342
|
+
"line",
|
|
343
|
+
{
|
|
344
|
+
y1: n,
|
|
345
|
+
y2: n,
|
|
346
|
+
x1: a.x + a.width / 2 - 3,
|
|
347
|
+
x2: a.x + a.width / 2 + 3,
|
|
348
|
+
strokeWidth: 1,
|
|
349
|
+
stroke: W
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
/* @__PURE__ */ r(
|
|
353
|
+
"line",
|
|
354
|
+
{
|
|
355
|
+
y1: d,
|
|
356
|
+
y2: d,
|
|
357
|
+
x1: a.x + a.width / 2 - 3,
|
|
358
|
+
x2: a.x + a.width / 2 + 3,
|
|
359
|
+
strokeWidth: 1,
|
|
360
|
+
stroke: W
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
327
365
|
}) });
|
|
328
|
-
}, fe = (e, t,
|
|
329
|
-
const { yScale:
|
|
330
|
-
let
|
|
331
|
-
return
|
|
366
|
+
}, fe = (e, t, s, i) => {
|
|
367
|
+
const { yScale: a, innerWidth: c, innerHeight: l } = e;
|
|
368
|
+
let n, d;
|
|
369
|
+
return i == "X" ? (n = [0, c], d = Re().x((f, V) => V === 0 ? -10 : f).y(() => a(0))) : (n = [0, l], d = Re().x(() => 0).y((f) => f)), /* @__PURE__ */ r(je, { children: /* @__PURE__ */ r(
|
|
332
370
|
"path",
|
|
333
371
|
{
|
|
334
|
-
d:
|
|
372
|
+
d: d(n),
|
|
335
373
|
fill: "none",
|
|
336
|
-
stroke:
|
|
374
|
+
stroke: s,
|
|
337
375
|
style: { pointerEvents: "none", strokeDasharray: t }
|
|
338
376
|
}
|
|
339
377
|
) });
|
|
340
|
-
}, M = (e, t) =>
|
|
378
|
+
}, M = (e, t) => L ? (H.colorBy === "index" || H.colorBy === "id" || H.colorBy === "values") && !t ? e.filter((s) => L.indexOf(s[u.indexBy]) === -1) : e ? e.filter((s) => L.indexOf(s) === -1) : [] : e, It = (e) => {
|
|
341
379
|
const t = _t();
|
|
342
380
|
if (!e.value) return "";
|
|
343
|
-
const
|
|
344
|
-
(
|
|
345
|
-
let
|
|
346
|
-
|
|
347
|
-
let
|
|
348
|
-
if (
|
|
349
|
-
const
|
|
350
|
-
let
|
|
351
|
-
y &&
|
|
352
|
-
|
|
353
|
-
}),
|
|
381
|
+
const s = Object.assign({}, e);
|
|
382
|
+
(S || _) && xe.includes(String(s.value)) && (s.value = "");
|
|
383
|
+
let i;
|
|
384
|
+
Je ? i = te : i = vt(e);
|
|
385
|
+
let a = [], c = "";
|
|
386
|
+
if (_ || S) {
|
|
387
|
+
const n = String(s.value).split(" ");
|
|
388
|
+
let d = 25;
|
|
389
|
+
y && $ === "Mobile" || J && !y ? d = (m == null ? void 0 : m.mobileMaxTickLength) ?? 25 : y && $ === "Tablet" || Z && !y ? d = (m == null ? void 0 : m.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (d = 15), n.forEach((f) => {
|
|
390
|
+
c.length + String(f).length <= d ? c += (c ? " " : "") + f : (a.push(c), c = f);
|
|
391
|
+
}), c && a.push(c);
|
|
354
392
|
} else
|
|
355
|
-
|
|
356
|
-
let
|
|
357
|
-
return
|
|
358
|
-
|
|
393
|
+
a = [s.value];
|
|
394
|
+
let l = 12;
|
|
395
|
+
return J ? l = (m == null ? void 0 : m.mobileYAxisLineHeight) ?? 12 : Z && (l = (m == null ? void 0 : m.tabletYAxisLineHeight) ?? 12), z > 0 && z < 180 ? /* @__PURE__ */ x("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
|
|
396
|
+
Y && /* @__PURE__ */ r(
|
|
359
397
|
"line",
|
|
360
398
|
{
|
|
361
|
-
stroke:
|
|
399
|
+
stroke: i,
|
|
362
400
|
strokeWidth: 1.5,
|
|
363
401
|
y1: -32,
|
|
364
402
|
y2: -12
|
|
365
403
|
}
|
|
366
404
|
),
|
|
367
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ r("g", { transform: `translate(0, ${e.y + ee})`, children: a.map((n, d) => /* @__PURE__ */ r(
|
|
368
406
|
"text",
|
|
369
407
|
{
|
|
370
|
-
transform: `rotate(${
|
|
408
|
+
transform: `rotate(${z})`,
|
|
371
409
|
textAnchor: "start",
|
|
372
|
-
y: typeof e.value == "number" ? 0 :
|
|
410
|
+
y: typeof e.value == "number" ? 0 : d * l,
|
|
373
411
|
dominantBaseline: "middle",
|
|
374
412
|
style: {
|
|
375
413
|
...t.axis.ticks.text,
|
|
@@ -377,26 +415,26 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
377
415
|
fontSize: "12px",
|
|
378
416
|
fontFamily: "sans-serif"
|
|
379
417
|
},
|
|
380
|
-
children:
|
|
418
|
+
children: n
|
|
381
419
|
},
|
|
382
|
-
|
|
420
|
+
n
|
|
383
421
|
)) })
|
|
384
|
-
] }) :
|
|
385
|
-
|
|
422
|
+
] }) : z > 180 && z < 360 ? /* @__PURE__ */ x("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
|
|
423
|
+
Y && /* @__PURE__ */ r(
|
|
386
424
|
"line",
|
|
387
425
|
{
|
|
388
|
-
stroke:
|
|
426
|
+
stroke: i,
|
|
389
427
|
strokeWidth: 1.5,
|
|
390
428
|
y1: -32,
|
|
391
429
|
y2: -12
|
|
392
430
|
}
|
|
393
431
|
),
|
|
394
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ r("g", { transform: `translate(0, ${e.y + ee})`, children: a.map((n, d) => /* @__PURE__ */ r(
|
|
395
433
|
"text",
|
|
396
434
|
{
|
|
397
|
-
transform: `rotate(${
|
|
435
|
+
transform: `rotate(${z})`,
|
|
398
436
|
textAnchor: "end",
|
|
399
|
-
y: typeof e.value == "number" ? 0 :
|
|
437
|
+
y: typeof e.value == "number" ? 0 : d * l,
|
|
400
438
|
dominantBaseline: "middle",
|
|
401
439
|
style: {
|
|
402
440
|
...t.axis.ticks.text,
|
|
@@ -404,26 +442,26 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
404
442
|
fontSize: "12px",
|
|
405
443
|
fontFamily: "sans-serif"
|
|
406
444
|
},
|
|
407
|
-
children:
|
|
445
|
+
children: n
|
|
408
446
|
},
|
|
409
|
-
|
|
447
|
+
d
|
|
410
448
|
)) })
|
|
411
|
-
] }) : /* @__PURE__ */
|
|
412
|
-
|
|
449
|
+
] }) : /* @__PURE__ */ x("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
|
|
450
|
+
Y && /* @__PURE__ */ r(
|
|
413
451
|
"line",
|
|
414
452
|
{
|
|
415
|
-
stroke:
|
|
453
|
+
stroke: i,
|
|
416
454
|
strokeWidth: 1.5,
|
|
417
455
|
y1: -32,
|
|
418
456
|
y2: -12
|
|
419
457
|
}
|
|
420
458
|
),
|
|
421
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ r("g", { transform: `translate(0, ${e.y + ee})`, children: a.map((n, d) => /* @__PURE__ */ r(
|
|
422
460
|
"text",
|
|
423
461
|
{
|
|
424
|
-
transform: `rotate(${
|
|
462
|
+
transform: `rotate(${z})`,
|
|
425
463
|
textAnchor: "middle",
|
|
426
|
-
y: typeof e.value == "number" ? 0 :
|
|
464
|
+
y: typeof e.value == "number" ? 0 : d * l,
|
|
427
465
|
dominantBaseline: "middle",
|
|
428
466
|
style: {
|
|
429
467
|
...t.axis.ticks.text,
|
|
@@ -431,39 +469,39 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
431
469
|
fontSize: "12px",
|
|
432
470
|
fontFamily: "sans-serif"
|
|
433
471
|
},
|
|
434
|
-
children:
|
|
472
|
+
children: n
|
|
435
473
|
},
|
|
436
|
-
|
|
474
|
+
d
|
|
437
475
|
)) })
|
|
438
476
|
] });
|
|
439
|
-
},
|
|
440
|
-
if (!e.value || (
|
|
477
|
+
}, kt = (e) => {
|
|
478
|
+
if (!e.value || (_ || S) && xe.includes(String(e.value)))
|
|
441
479
|
return "";
|
|
442
480
|
let t = e.value;
|
|
443
481
|
if (o === "vertical") {
|
|
444
|
-
const
|
|
445
|
-
t =
|
|
446
|
-
|
|
482
|
+
const n = F || g;
|
|
483
|
+
t = b.formatNumber(
|
|
484
|
+
n.style === "percent" ? t / 100 : t,
|
|
447
485
|
{
|
|
448
|
-
...
|
|
486
|
+
...n
|
|
449
487
|
}
|
|
450
488
|
);
|
|
451
489
|
}
|
|
452
|
-
let
|
|
453
|
-
y &&
|
|
454
|
-
const
|
|
455
|
-
let
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}),
|
|
459
|
-
let
|
|
460
|
-
return y &&
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
|
|
490
|
+
let s = 25;
|
|
491
|
+
y && $ === "Mobile" || J && !y ? s = (m == null ? void 0 : m.mobileMaxTickLength) ?? 25 : y && $ === "Tablet" || Z && !y ? s = (m == null ? void 0 : m.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (s = 15);
|
|
492
|
+
const i = typeof t == "string" ? t.split(" ") : [t], a = [];
|
|
493
|
+
let c = "";
|
|
494
|
+
i.forEach((n) => {
|
|
495
|
+
c.length + String(n).length <= s ? c += (c ? " " : "") + n : (a.push(c), c = n);
|
|
496
|
+
}), c && a.push(c);
|
|
497
|
+
let l = 12;
|
|
498
|
+
return y && $ === "Mobile" || J && !y ? l = (m == null ? void 0 : m.mobileYAxisLineHeight) ?? 12 : (y && $ === "Tablet" || Z && !y) && (l = (m == null ? void 0 : m.tabletYAxisLineHeight) ?? 12), /* @__PURE__ */ x("g", { transform: `translate(${e.x},${e.y})`, children: [
|
|
499
|
+
/* @__PURE__ */ r("line", { x1: -5, x2: 0, y1: 0, y2: 0, stroke: "#000", strokeWidth: 1 }),
|
|
500
|
+
a.map((n, d) => /* @__PURE__ */ r(
|
|
463
501
|
"text",
|
|
464
502
|
{
|
|
465
503
|
x: -10,
|
|
466
|
-
y: typeof t == "number" ? 0 :
|
|
504
|
+
y: typeof t == "number" ? 0 : d * l,
|
|
467
505
|
textAnchor: "end",
|
|
468
506
|
dominantBaseline: "middle",
|
|
469
507
|
style: {
|
|
@@ -471,89 +509,89 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
471
509
|
fontSize: "12px",
|
|
472
510
|
fontFamily: "sans-serif"
|
|
473
511
|
},
|
|
474
|
-
children:
|
|
512
|
+
children: n
|
|
475
513
|
},
|
|
476
|
-
|
|
514
|
+
n
|
|
477
515
|
))
|
|
478
516
|
] });
|
|
479
|
-
},
|
|
480
|
-
const t =
|
|
517
|
+
}, Lt = (e) => {
|
|
518
|
+
const t = L.slice();
|
|
481
519
|
if (t.indexOf(e) > -1) {
|
|
482
|
-
const
|
|
483
|
-
t.splice(
|
|
520
|
+
const s = t.indexOf(e);
|
|
521
|
+
t.splice(s, 1);
|
|
484
522
|
} else
|
|
485
523
|
t.push(e);
|
|
486
524
|
mt(t);
|
|
487
525
|
}, wt = (e) => {
|
|
488
526
|
const t = Object.assign({}, I);
|
|
489
527
|
t[e] = !t[e], ut(t);
|
|
490
|
-
}, Dt = ({ bars: e }) => /* @__PURE__ */
|
|
491
|
-
const { width:
|
|
492
|
-
if (o === "horizontal" &&
|
|
528
|
+
}, Dt = ({ bars: e }) => /* @__PURE__ */ r("g", { children: e.map((t) => {
|
|
529
|
+
const { width: s, height: i, y: a, x: c, data: l } = t;
|
|
530
|
+
if (o === "horizontal" && i <= me || o === "vertical" && s <= he)
|
|
493
531
|
return;
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
) : "",
|
|
532
|
+
const n = l.value ? b.formatNumber(
|
|
533
|
+
g.style === "percent" ? l.value / 100 : l.value,
|
|
534
|
+
g
|
|
535
|
+
) : "", d = n.length;
|
|
498
536
|
let f, V;
|
|
499
|
-
if (o === "vertical" &&
|
|
500
|
-
return o === "vertical" ? (f =
|
|
537
|
+
if (o === "vertical" && s >= he || o === "horizontal" && i >= me)
|
|
538
|
+
return o === "vertical" ? (f = a - 6, V = c + s / 2 - d * 3.5) : (f = a + i / 2 + 4, V = c + s + 5), /* @__PURE__ */ r(
|
|
501
539
|
"text",
|
|
502
540
|
{
|
|
503
541
|
y: f,
|
|
504
542
|
x: V,
|
|
505
543
|
style: { fill: ue() },
|
|
506
|
-
children: `${
|
|
544
|
+
children: `${n}`
|
|
507
545
|
}
|
|
508
546
|
);
|
|
509
547
|
}) }), Ft = (e) => {
|
|
510
|
-
const t = u.data.filter((
|
|
511
|
-
return /* @__PURE__ */
|
|
512
|
-
(
|
|
513
|
-
).map((
|
|
514
|
-
var
|
|
515
|
-
const
|
|
516
|
-
let
|
|
548
|
+
const t = u.data.filter((i) => L.indexOf(i[u.indexBy]) == -1).map((i) => i[u.indexBy]), { bars: s } = e;
|
|
549
|
+
return /* @__PURE__ */ r("g", { children: t.filter(
|
|
550
|
+
(i) => s.filter((a) => a.data.indexValue == i).length > 0
|
|
551
|
+
).map((i) => {
|
|
552
|
+
var U;
|
|
553
|
+
const a = s.filter((h) => h.data.indexValue == i);
|
|
554
|
+
let c = "right", l = 0, n = 0;
|
|
517
555
|
if (o == "horizontal")
|
|
518
|
-
O === "stacked" ? (
|
|
519
|
-
else if (
|
|
520
|
-
|
|
521
|
-
else if (
|
|
522
|
-
|
|
556
|
+
O === "stacked" ? (q ? l = e.innerWidth - 20 : (l = a.map((h) => h.width).reduce((h, p) => h + p), T && (l = e.innerWidth - l)), n = e.yScale(i) + a[0].height / 2) : (q ? l = e.innerWidth : (l = a.map((h) => h.width).reduce((h, p) => h > p ? h : p), T && (l = e.innerWidth - l)), n = e.yScale(i) + a.map((h) => h.height).reduce((h, p) => h + p) / 2), l = l + parseInt(E) + 5;
|
|
557
|
+
else if (c = "middle", O === "stacked")
|
|
558
|
+
l = e.xScale(i) + a[0].width / 2, q ? n = n - parseInt(E) : T ? n = parseInt(E) + a.map((h) => h.height).reduce((h, p) => h + p) + 14 : n = e.innerHeight - parseInt(E) - a.map((h) => h.height).reduce((h, p) => h + p) - 5;
|
|
559
|
+
else if (l = e.xScale(i) + a.map((h) => h.width).reduce((h, p) => h + p) / 2, T && (n = e.innerHeight), q)
|
|
560
|
+
n = n - parseInt(E);
|
|
523
561
|
else {
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
|
|
562
|
+
if (a.length % 2 == 1) {
|
|
563
|
+
const h = Math.floor(a.length / 2);
|
|
564
|
+
n = a[h].height;
|
|
527
565
|
} else {
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
566
|
+
const h = a.length / 2;
|
|
567
|
+
n = Math.max(
|
|
568
|
+
a[h].height,
|
|
569
|
+
a[h - 1].height
|
|
532
570
|
);
|
|
533
571
|
}
|
|
534
|
-
|
|
572
|
+
T ? n = n + 14 + parseInt(E) : n = e.innerHeight - n - parseInt(E) - 5;
|
|
535
573
|
}
|
|
536
|
-
const
|
|
537
|
-
(
|
|
574
|
+
const d = u.data.filter(
|
|
575
|
+
(h) => h[u.indexBy] === i
|
|
538
576
|
)[0];
|
|
539
|
-
let f =
|
|
540
|
-
const V =
|
|
541
|
-
return f -= V, /* @__PURE__ */
|
|
577
|
+
let f = d.parent_variables ? d.parent_variables[Fe] : d[Fe];
|
|
578
|
+
const V = K !== "index" ? (U = L == null ? void 0 : L.map((h) => d[h])) == null ? void 0 : U.reduce((h, p) => h + p, 0) : 0;
|
|
579
|
+
return f -= V, /* @__PURE__ */ r("text", { y: n, x: l, style: { fill: ue() }, children: /* @__PURE__ */ x("tspan", { textAnchor: c, children: [
|
|
542
580
|
we ? we + " " : "",
|
|
543
|
-
|
|
581
|
+
b.formatNumber(
|
|
544
582
|
De.style === "percent" ? f / 100 : f,
|
|
545
583
|
De
|
|
546
584
|
)
|
|
547
585
|
] }) });
|
|
548
586
|
}) });
|
|
549
587
|
}, Mt = {
|
|
550
|
-
top:
|
|
551
|
-
right:
|
|
552
|
-
bottom:
|
|
553
|
-
left:
|
|
588
|
+
top: j,
|
|
589
|
+
right: Xe,
|
|
590
|
+
bottom: R,
|
|
591
|
+
left: Pe
|
|
554
592
|
};
|
|
555
593
|
let oe;
|
|
556
|
-
Ne && (oe =
|
|
594
|
+
Ne && (oe = be.parse(Ne, {
|
|
557
595
|
header: !1,
|
|
558
596
|
dynamicTyping: !0
|
|
559
597
|
}), Math.max(...oe.data.map((e) => e[1])), Math.min(...oe.data.map((e) => e[1])));
|
|
@@ -562,106 +600,106 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
562
600
|
if (de && de.forEach((t) => {
|
|
563
601
|
t.low && e.push(parseFloat(t.low)), t.high && e.push(parseFloat(t.high));
|
|
564
602
|
}), u.data) {
|
|
565
|
-
const t = M(u.data, !1),
|
|
566
|
-
t.forEach((
|
|
567
|
-
|
|
568
|
-
|
|
603
|
+
const t = M(u.data, !1), s = M(u.keys, !0);
|
|
604
|
+
t.forEach((i) => {
|
|
605
|
+
s.forEach((a) => {
|
|
606
|
+
i[a] && e.push(i[a]);
|
|
569
607
|
});
|
|
570
608
|
});
|
|
571
609
|
}
|
|
572
|
-
return ne && A && A.forEach((t,
|
|
573
|
-
if (I[
|
|
610
|
+
return ne && A && A.forEach((t, s) => {
|
|
611
|
+
if (I[s] !== !1)
|
|
574
612
|
if (t.app === "csv" && t.csvLineLayerData) {
|
|
575
|
-
const
|
|
613
|
+
const i = be.parse(t.csvLineLayerData, {
|
|
576
614
|
header: !1,
|
|
577
615
|
dynamicTyping: !0
|
|
578
616
|
});
|
|
579
|
-
|
|
580
|
-
} else t.measure[0] && u.data && u.data.forEach((
|
|
581
|
-
var
|
|
582
|
-
const
|
|
583
|
-
|
|
617
|
+
i.data && i.data.filter((a) => a[1] !== null && typeof a[1] == "number").forEach((a) => e.push(a[1]));
|
|
618
|
+
} else t.measure[0] && u.data && u.data.forEach((i) => {
|
|
619
|
+
var c;
|
|
620
|
+
const a = (c = i.variables) == null ? void 0 : c[t.measure[0]];
|
|
621
|
+
a !== null && typeof a == "number" && e.push(a);
|
|
584
622
|
});
|
|
585
623
|
}), e;
|
|
586
624
|
}, Ot = () => {
|
|
587
625
|
const e = Ae(), t = e.length > 0 ? Math.max(...e) : 0;
|
|
588
|
-
if (
|
|
626
|
+
if (le === "fixed" && se !== null && se !== "")
|
|
589
627
|
return Number(se);
|
|
590
|
-
if (O === "stacked" &&
|
|
591
|
-
const
|
|
592
|
-
let
|
|
593
|
-
const
|
|
594
|
-
...
|
|
628
|
+
if (O === "stacked" && le !== "fixed") {
|
|
629
|
+
const s = M(u.data, !1), i = M(u.keys, !0);
|
|
630
|
+
let a = i.length > 0 ? i : u.keys;
|
|
631
|
+
const c = Math.max(
|
|
632
|
+
...s.map((l) => a.map((n) => l[n] ? l[n] : 0)).map((l) => l.length > 0 ? l.reduce((n, d) => n + d, 0) : 0)
|
|
595
633
|
);
|
|
596
|
-
return Math.max(
|
|
634
|
+
return Math.max(c, t) * 1.1;
|
|
597
635
|
}
|
|
598
636
|
return t * 1.05;
|
|
599
|
-
},
|
|
637
|
+
}, zt = () => {
|
|
600
638
|
const e = Ae(), t = e.length > 0 ? Math.min(...e) : 0;
|
|
601
|
-
return
|
|
602
|
-
},
|
|
603
|
-
|
|
639
|
+
return le === "fixed" && re !== null && String(re) !== "" ? Number(re) : t > 0 ? t * 0.9 : t * 1.1;
|
|
640
|
+
}, Et = Number(Ot()), $t = Number(zt()), Vt = Math.min(0, $t), Bt = Math.max(0, Et), w = ["grid", "axes", "bars"];
|
|
641
|
+
nt && w.push(Ft), w.push(pt), w.push(bt), ne && A && A.forEach((e, t) => {
|
|
604
642
|
if (I[t] == !0 || I[t] == null) {
|
|
605
|
-
const { csvLineLayerData:
|
|
643
|
+
const { csvLineLayerData: s, lineColor: i, tooltip: a } = e;
|
|
606
644
|
if (e.app == "csv") {
|
|
607
|
-
const
|
|
645
|
+
const c = be.parse(s, {
|
|
608
646
|
header: !1,
|
|
609
647
|
dynamicTyping: !0
|
|
610
648
|
});
|
|
611
|
-
if (
|
|
612
|
-
|
|
613
|
-
(
|
|
649
|
+
if (c.data && c.data.filter((l) => l[1] !== null).length > 0) {
|
|
650
|
+
c.data = c.data.filter(
|
|
651
|
+
(n) => n[1] !== null
|
|
614
652
|
);
|
|
615
|
-
const
|
|
616
|
-
|
|
617
|
-
|
|
653
|
+
const l = Ye(
|
|
654
|
+
c,
|
|
655
|
+
i,
|
|
618
656
|
o,
|
|
619
657
|
O,
|
|
620
658
|
M(u.keys, !0),
|
|
621
|
-
|
|
659
|
+
a,
|
|
622
660
|
e.title,
|
|
623
661
|
""
|
|
624
662
|
);
|
|
625
|
-
w.push(
|
|
663
|
+
w.push(l);
|
|
626
664
|
}
|
|
627
665
|
} else if (e.measure[0]) {
|
|
628
|
-
const
|
|
666
|
+
const c = {}, l = u.data.map((f) => [
|
|
629
667
|
f[u.indexBy],
|
|
630
668
|
f.variables[e.measure[0]]
|
|
631
|
-
]),
|
|
632
|
-
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
669
|
+
]), n = u.metadata.measures ? u.metadata.measures.filter((f) => f.value == e.measure[0]) : [];
|
|
670
|
+
c.data = l;
|
|
671
|
+
const d = Ye(
|
|
672
|
+
c,
|
|
673
|
+
i,
|
|
636
674
|
o,
|
|
637
675
|
O,
|
|
638
676
|
M(u.keys, !0),
|
|
639
|
-
|
|
677
|
+
a,
|
|
640
678
|
e.title,
|
|
641
|
-
|
|
679
|
+
n.length > 0 ? n[0].label : ""
|
|
642
680
|
);
|
|
643
|
-
w.push(
|
|
681
|
+
w.push(d);
|
|
644
682
|
}
|
|
645
683
|
}
|
|
646
|
-
}),
|
|
647
|
-
let ye = parseInt(
|
|
648
|
-
const
|
|
649
|
-
if (
|
|
684
|
+
}), ke === Rt && w.push(Dt), et && w.push(gt), w.push(Nt);
|
|
685
|
+
let ye = parseInt(st);
|
|
686
|
+
const _e = () => /* @__PURE__ */ r(pe, { children: G && Ie && /* @__PURE__ */ r("div", { className: "legend item", children: /* @__PURE__ */ r("label", { className: "legend-title", children: Ie }) }) }), xe = [];
|
|
687
|
+
if (S || _) {
|
|
650
688
|
ye = Number.parseInt(m.yAxisTickValues);
|
|
651
689
|
const e = new Map(
|
|
652
|
-
Object.entries(((
|
|
690
|
+
Object.entries(((Se = m == null ? void 0 : m.labels) == null ? void 0 : Se.xAxis) ?? {})
|
|
653
691
|
);
|
|
654
|
-
for (const [t,
|
|
655
|
-
|
|
692
|
+
for (const [t, s] of e)
|
|
693
|
+
s || xe.push(t);
|
|
656
694
|
}
|
|
657
|
-
let
|
|
658
|
-
return /* @__PURE__ */
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
|
|
695
|
+
let Wt = parseInt(Ce + "") - Be;
|
|
696
|
+
return /* @__PURE__ */ r("div", { style: { height: Wt + "px" }, className: "bar-chart", children: (u == null ? void 0 : u.data) && u.data.length > 0 && /* @__PURE__ */ x(pe, { children: [
|
|
697
|
+
/* @__PURE__ */ r(
|
|
698
|
+
Tt,
|
|
661
699
|
{
|
|
662
700
|
colorBy: H.colorBy,
|
|
663
701
|
animate: !0,
|
|
664
|
-
enableLabel:
|
|
702
|
+
enableLabel: ke == jt,
|
|
665
703
|
...u,
|
|
666
704
|
maxValue: Bt,
|
|
667
705
|
minValue: Vt,
|
|
@@ -669,25 +707,25 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
669
707
|
data: M(u.data, !1),
|
|
670
708
|
groupMode: O || "grouped",
|
|
671
709
|
margin: Mt,
|
|
672
|
-
innerPadding:
|
|
673
|
-
valueScale: { type:
|
|
710
|
+
innerPadding: Qe,
|
|
711
|
+
valueScale: { type: Ze, clamp: !0 },
|
|
674
712
|
colors: (e) => e && e.data[Q] ? e.data[Q] : N.getColor(e.id, e.data),
|
|
675
713
|
borderColor: "#000",
|
|
676
|
-
reverse:
|
|
714
|
+
reverse: T,
|
|
677
715
|
axisTop: null,
|
|
678
|
-
axisRight:
|
|
679
|
-
tickSize: o == "horizontal" &&
|
|
716
|
+
axisRight: tt ? {
|
|
717
|
+
tickSize: o == "horizontal" && Y || o === "vertical" ? 5 : 0,
|
|
680
718
|
tickPadding: 5,
|
|
681
719
|
tickRotation: 0,
|
|
682
720
|
tickValues: ye,
|
|
683
|
-
legend:
|
|
721
|
+
legend: X.right,
|
|
684
722
|
legendPosition: "middle",
|
|
685
|
-
legendOffset: parseInt(
|
|
723
|
+
legendOffset: parseInt(at),
|
|
686
724
|
format: (e) => {
|
|
687
725
|
if (!e) return "";
|
|
688
726
|
if (o == "vertical") {
|
|
689
|
-
const t = F ||
|
|
690
|
-
return
|
|
727
|
+
const t = F || g;
|
|
728
|
+
return b.formatNumber(
|
|
691
729
|
t.style === "percent" ? e / 100 : e,
|
|
692
730
|
{
|
|
693
731
|
...t
|
|
@@ -697,18 +735,18 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
697
735
|
return e;
|
|
698
736
|
}
|
|
699
737
|
} : null,
|
|
700
|
-
axisBottom: (
|
|
701
|
-
legend:
|
|
738
|
+
axisBottom: (_ || S) && (m == null ? void 0 : m.xAxisDisabled) === !0 ? null : o === "horizontal" ? {
|
|
739
|
+
legend: X.bottom,
|
|
702
740
|
legendPosition: "middle",
|
|
703
|
-
legendOffset: parseInt(
|
|
741
|
+
legendOffset: parseInt(Le),
|
|
704
742
|
tickPadding: 5,
|
|
705
743
|
tickRotation: 0,
|
|
706
744
|
tickValues: parseInt(rt),
|
|
707
745
|
format: (e) => {
|
|
708
746
|
if (!e) return "";
|
|
709
747
|
if (o == "horizontal") {
|
|
710
|
-
const t = F ||
|
|
711
|
-
return
|
|
748
|
+
const t = F || g;
|
|
749
|
+
return b.formatNumber(
|
|
712
750
|
t.style === "percent" ? e / 100 : e,
|
|
713
751
|
{
|
|
714
752
|
...t
|
|
@@ -718,25 +756,25 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
718
756
|
return e;
|
|
719
757
|
}
|
|
720
758
|
} : {
|
|
721
|
-
legend:
|
|
759
|
+
legend: X.bottom,
|
|
722
760
|
legendPosition: "middle",
|
|
723
|
-
legendOffset: parseInt(
|
|
761
|
+
legendOffset: parseInt(Le),
|
|
724
762
|
renderTick: It
|
|
725
763
|
},
|
|
726
764
|
axisLeft: {
|
|
727
|
-
tickSize: o === "horizontal" &&
|
|
765
|
+
tickSize: o === "horizontal" && Y || o === "vertical" ? 5 : 0,
|
|
728
766
|
tickPadding: 5,
|
|
729
767
|
tickRotation: 0,
|
|
730
768
|
tickValues: ye,
|
|
731
|
-
legend:
|
|
769
|
+
legend: X.left,
|
|
732
770
|
legendPosition: "middle",
|
|
733
|
-
legendOffset: Number.parseInt(
|
|
734
|
-
...
|
|
771
|
+
legendOffset: Number.parseInt(qe),
|
|
772
|
+
..._ || S ? { renderTick: kt } : {
|
|
735
773
|
format: (e) => {
|
|
736
774
|
if (!e) return "";
|
|
737
775
|
if (o === "vertical") {
|
|
738
|
-
const t = F ||
|
|
739
|
-
return
|
|
776
|
+
const t = F || g;
|
|
777
|
+
return b.formatNumber(
|
|
740
778
|
t.style === "percent" ? e / 100 : e,
|
|
741
779
|
{
|
|
742
780
|
...t
|
|
@@ -747,16 +785,16 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
747
785
|
}
|
|
748
786
|
}
|
|
749
787
|
},
|
|
750
|
-
enableGridY:
|
|
751
|
-
enableGridX:
|
|
788
|
+
enableGridY: dt,
|
|
789
|
+
enableGridX: ht,
|
|
752
790
|
layout: o,
|
|
753
791
|
labelSkipWidth: he,
|
|
754
792
|
labelSkipHeight: me,
|
|
755
|
-
padding:
|
|
793
|
+
padding: Ue,
|
|
756
794
|
labelTextColor: ue(),
|
|
757
|
-
label: (e) =>
|
|
758
|
-
|
|
759
|
-
|
|
795
|
+
label: (e) => b.formatNumber(
|
|
796
|
+
g.style === "percent" && e.value ? e.value / 100 : e.value,
|
|
797
|
+
g
|
|
760
798
|
),
|
|
761
799
|
layers: w,
|
|
762
800
|
onMouseEnter: (e) => {
|
|
@@ -765,14 +803,14 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
765
803
|
},
|
|
766
804
|
motionStiffness: 130,
|
|
767
805
|
motionDamping: 15,
|
|
768
|
-
tooltip: (e) =>
|
|
769
|
-
|
|
806
|
+
tooltip: (e) => Ge && ae && ae.trim().length > 0 ? /* @__PURE__ */ r(
|
|
807
|
+
Ht,
|
|
770
808
|
{
|
|
771
|
-
intl:
|
|
772
|
-
format:
|
|
809
|
+
intl: b,
|
|
810
|
+
format: g,
|
|
773
811
|
d: e,
|
|
774
812
|
tooltip: ae,
|
|
775
|
-
tooltipEnableMarkdown:
|
|
813
|
+
tooltipEnableMarkdown: lt
|
|
776
814
|
}
|
|
777
815
|
) : null,
|
|
778
816
|
theme: {
|
|
@@ -792,39 +830,43 @@ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q =
|
|
|
792
830
|
}
|
|
793
831
|
}
|
|
794
832
|
),
|
|
795
|
-
(v === "top" || v === "bottom") && He && /* @__PURE__ */
|
|
833
|
+
(v === "top" || v === "bottom") && He && /* @__PURE__ */ r(
|
|
796
834
|
"div",
|
|
797
835
|
{
|
|
798
836
|
className: `legends container has-standard-12-font-size ${v}`,
|
|
799
|
-
style: v === "bottom" ? { marginBottom: `${
|
|
800
|
-
children: /* @__PURE__ */
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
837
|
+
style: v === "bottom" ? { marginBottom: `${Be}px` } : {},
|
|
838
|
+
children: /* @__PURE__ */ x("div", { className: "legend-sections", children: [
|
|
839
|
+
/* @__PURE__ */ r("div", { className: "title-section", children: _e() }),
|
|
840
|
+
/* @__PURE__ */ r(
|
|
803
841
|
St,
|
|
804
842
|
{
|
|
805
843
|
onWrapChange: (e) => {
|
|
806
|
-
v === "top"
|
|
844
|
+
if (v === "top" && Me) {
|
|
845
|
+
const t = j + e / 2 * 40;
|
|
846
|
+
$e(t), Ve(e);
|
|
847
|
+
} else
|
|
848
|
+
We(R + e / 2 * 25), Ve(e);
|
|
807
849
|
},
|
|
808
850
|
className: "legends container has-standard-12-font-size items-section",
|
|
809
|
-
children:
|
|
851
|
+
children: Te()
|
|
810
852
|
}
|
|
811
853
|
)
|
|
812
854
|
] })
|
|
813
855
|
}
|
|
814
856
|
),
|
|
815
|
-
(v === "right" || v === "left") && He && /* @__PURE__ */
|
|
857
|
+
(v === "right" || v === "left") && He && /* @__PURE__ */ x(
|
|
816
858
|
"div",
|
|
817
859
|
{
|
|
818
860
|
className: `legends container has-standard-12-font-size ${v}`,
|
|
819
861
|
style: v === "right" ? yt : xt,
|
|
820
862
|
children: [
|
|
821
|
-
|
|
822
|
-
|
|
863
|
+
_e(),
|
|
864
|
+
Te()
|
|
823
865
|
]
|
|
824
866
|
}
|
|
825
867
|
)
|
|
826
868
|
] }) });
|
|
827
|
-
}, ca =
|
|
869
|
+
}, ca = At(Kt);
|
|
828
870
|
export {
|
|
829
871
|
ca as default
|
|
830
872
|
};
|