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