@hybridcore/ui 1.6.30 → 1.6.31
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/components/charts/_common/utils.js +53 -31
- package/dist/components/charts/candlestick/logic.js +83 -86
- package/dist/components/charts/column-line-mix/logic.js +66 -70
- package/dist/components/charts/donut-chart/logic.js +65 -64
- package/dist/components/charts/drill-down-treemap/logic.js +69 -69
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +75 -75
- package/dist/components/charts/forecast-cone/logic.js +110 -114
- package/dist/components/charts/heatmap/logic.js +117 -119
- package/dist/components/charts/highlighting-line-data/logic.js +65 -64
- package/dist/components/charts/histogram/logic.js +66 -70
- package/dist/components/charts/line/logic.js +95 -99
- package/dist/components/charts/logaritmic-scale/logic.js +79 -83
- package/dist/components/charts/multiple-value-axes/logic.js +65 -69
- package/dist/components/charts/nested-pie/logic.js +49 -53
- package/dist/components/charts/packed-circles/logic.js +139 -139
- package/dist/components/charts/pie-chart/logic.js +59 -59
- package/dist/components/charts/stacked-area-radar/logic.js +95 -97
- package/dist/components/charts/stacked-column-chart/logic.js +69 -69
- package/dist/components/charts/xy-chart/logic.js +82 -86
- package/dist/components/metric-card/MetricChart.js +6 -4
- package/package.json +1 -1
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
1
|
+
import { R as V, A as B } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
|
+
import { useThemeProps as E, useTheme as X } from "@mui/material";
|
|
3
|
+
import j from "dayjs";
|
|
4
4
|
import { useId as z, useRef as H, useEffect as $ } from "react";
|
|
5
|
-
import { formatDateValue as
|
|
6
|
-
import { applyValueFormat as G, colorSetFromPalette as J, buildSliceText as
|
|
5
|
+
import { formatDateValue as k } from "../_common/format.js";
|
|
6
|
+
import { applyValueFormat as q, applyInterfaceColors as G, colorSetFromPalette as J, buildSliceText as D, applyLegendPercentFormat as K, readSharePercent as O } from "../_common/utils.js";
|
|
7
7
|
import { P as Q, a as U } from "../../../PieSeries-CMH0Z7pz.js";
|
|
8
|
-
import { c as u, p as f } from "../../../Entity-BJCuhdq_.js";
|
|
9
8
|
import { L as W } from "../../../Legend-CFvQiIfn.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { p as d, c as Z } from "../../../Entity-BJCuhdq_.js";
|
|
10
|
+
import { L as _ } from "../../../Tooltip-vyZRZWih.js";
|
|
11
|
+
const pe = (b) => {
|
|
12
|
+
const x = E({ props: b, name: "HCPieChart" }), {
|
|
13
13
|
dimensions: t,
|
|
14
14
|
values: o,
|
|
15
|
-
data:
|
|
15
|
+
data: l,
|
|
16
16
|
initDelay: C = 0,
|
|
17
17
|
colors: T,
|
|
18
18
|
showDimensionLabel: Y = !1,
|
|
19
|
-
showValueText:
|
|
20
|
-
percentDecimals:
|
|
21
|
-
sx:
|
|
19
|
+
showValueText: u = !0,
|
|
20
|
+
percentDecimals: c = 2,
|
|
21
|
+
sx: A,
|
|
22
22
|
...I
|
|
23
|
-
} =
|
|
24
|
-
let
|
|
25
|
-
o.length < 1 ?
|
|
26
|
-
if (
|
|
27
|
-
let
|
|
28
|
-
return
|
|
29
|
-
var
|
|
30
|
-
const e =
|
|
31
|
-
|
|
23
|
+
} = x, f = X(), v = `hc-pie-chart-${z().replace(/:/g, "")}`, h = H(null), n = o.length > 1;
|
|
24
|
+
let m = null;
|
|
25
|
+
o.length < 1 ? m = "Missing values config!" : !n && t.length < 1 && (m = "Missing dimensions config!"), $(() => {
|
|
26
|
+
if (m) return;
|
|
27
|
+
let g;
|
|
28
|
+
return g = setTimeout(() => {
|
|
29
|
+
var P, F;
|
|
30
|
+
const e = V.new(v);
|
|
31
|
+
h.current = e, q(e, (P = o == null ? void 0 : o[0]) == null ? void 0 : P.format), e.setThemes([B.new(e)]);
|
|
32
32
|
const y = e.container.children.push(
|
|
33
33
|
Q.new(e, {
|
|
34
34
|
layout: e.verticalLayout
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
|
-
e
|
|
38
|
-
|
|
39
|
-
grid: u(c.palette.divider),
|
|
40
|
-
stroke: u(c.palette.divider)
|
|
41
|
-
});
|
|
42
|
-
const V = i ? o.map((a) => {
|
|
37
|
+
G(e, f);
|
|
38
|
+
const N = n ? o.map((a) => {
|
|
43
39
|
var s;
|
|
44
40
|
return {
|
|
45
41
|
category: a.label || a.name || a.fieldName,
|
|
46
|
-
value: (s =
|
|
42
|
+
value: (s = l[0]) == null ? void 0 : s[a.dataFieldName]
|
|
47
43
|
};
|
|
48
|
-
}) :
|
|
44
|
+
}) : l, r = y.series.push(
|
|
49
45
|
U.new(e, {
|
|
50
|
-
valueField:
|
|
51
|
-
categoryField:
|
|
46
|
+
valueField: n ? "value" : o[0].dataFieldName,
|
|
47
|
+
categoryField: n ? "category" : t[0].value
|
|
52
48
|
})
|
|
53
49
|
);
|
|
54
50
|
r.set("colors", J(e, T));
|
|
55
|
-
const
|
|
56
|
-
r.slices.template.set("tooltipText",
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
return
|
|
51
|
+
const w = D({ percentDecimals: c, showValueText: u });
|
|
52
|
+
r.slices.template.set("tooltipText", w), r.labels.template.set("text", w);
|
|
53
|
+
const L = (a, s) => {
|
|
54
|
+
const S = O(s);
|
|
55
|
+
return S === void 0 ? a : D({ percentDecimals: c, showValueText: u, percent: S });
|
|
60
56
|
};
|
|
61
|
-
r.slices.template.adapters.add("tooltipText",
|
|
57
|
+
r.slices.template.adapters.add("tooltipText", L), r.labels.template.adapters.add("text", L), !n && t[0].type === "date" && l.forEach((a) => {
|
|
62
58
|
let s = "YYYY";
|
|
63
|
-
t[0].value.includes("month") ? s = "MMM YYYY" : t[0].value.includes("day") && (s = "DD MMM YYYY"), a[t[0].value] =
|
|
59
|
+
t[0].value.includes("month") ? s = "MMM YYYY" : t[0].value.includes("day") && (s = "DD MMM YYYY"), a[t[0].value] = j(a[t[0].value]).format(
|
|
64
60
|
s
|
|
65
61
|
);
|
|
66
|
-
}), r.data.setAll(
|
|
67
|
-
const
|
|
62
|
+
}), r.data.setAll(N);
|
|
63
|
+
const M = y.children.push(
|
|
68
64
|
W.new(e, {
|
|
69
|
-
centerX:
|
|
70
|
-
x:
|
|
65
|
+
centerX: d(50),
|
|
66
|
+
x: d(50),
|
|
71
67
|
marginTop: 15,
|
|
72
68
|
marginBottom: 15
|
|
73
69
|
})
|
|
74
70
|
);
|
|
75
|
-
K(
|
|
76
|
-
const
|
|
77
|
-
Y &&
|
|
78
|
-
|
|
79
|
-
text:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
K(M, c), M.data.setAll(r.dataItems);
|
|
72
|
+
const i = t[0], p = i ? (F = l[0]) == null ? void 0 : F[i.value] : void 0;
|
|
73
|
+
Y && n && i && p != null && p !== "" && y.children.push(
|
|
74
|
+
_.new(e, {
|
|
75
|
+
text: i.type === "date" ? k(
|
|
76
|
+
p,
|
|
77
|
+
i.dateFormat,
|
|
78
|
+
i.value
|
|
79
|
+
) : String(p),
|
|
80
|
+
centerX: d(50),
|
|
81
|
+
x: d(50),
|
|
82
|
+
fill: Z(f.palette.text.secondary),
|
|
83
83
|
fontSize: 12,
|
|
84
84
|
paddingBottom: 8
|
|
85
85
|
})
|
|
86
86
|
), r.appear(1e3, 100);
|
|
87
87
|
}, C), () => {
|
|
88
88
|
var e;
|
|
89
|
-
|
|
89
|
+
g && clearTimeout(g), (e = h.current) == null || e.dispose(), h.current = null;
|
|
90
90
|
};
|
|
91
91
|
}, [
|
|
92
|
-
|
|
92
|
+
l,
|
|
93
93
|
t,
|
|
94
94
|
o,
|
|
95
|
-
|
|
95
|
+
f.palette.mode,
|
|
96
96
|
T,
|
|
97
97
|
Y,
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
u,
|
|
99
|
+
c
|
|
100
100
|
]);
|
|
101
|
-
const
|
|
102
|
-
return { chartId:
|
|
101
|
+
const R = { ...x };
|
|
102
|
+
return { chartId: v, ownerState: R, sx: A, error: m, other: I };
|
|
103
103
|
};
|
|
104
104
|
export {
|
|
105
|
-
|
|
105
|
+
pe as usePieChartLogic
|
|
106
106
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { T as me, s as
|
|
1
|
+
import { T as me, s as ie, R as Ae, A as pe } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as xe, useTheme as ve } from "@mui/material";
|
|
3
3
|
import ye from "dayjs";
|
|
4
|
-
import
|
|
4
|
+
import H from "lodash";
|
|
5
5
|
import { useId as be, useRef as Pe, useEffect as Re } from "react";
|
|
6
6
|
import { humanizeLabel as _e } from "../_common/format.js";
|
|
7
7
|
import { attachCombinedAxisTooltip as we } from "../_common/tooltip.js";
|
|
8
|
-
import { applyValueFormat as Te,
|
|
9
|
-
import { m as M, t as R, b as
|
|
10
|
-
import { a as
|
|
11
|
-
import { a as
|
|
12
|
-
import { R as de, S as
|
|
8
|
+
import { applyValueFormat as Te, applyInterfaceColors as Ce, colorSetFromPalette as Le } from "../_common/utils.js";
|
|
9
|
+
import { m as M, t as R, b as $, f as m, p as w, a as Y, P as Me, c as ae } from "../../../Entity-BJCuhdq_.js";
|
|
10
|
+
import { a as F, X as ue, V as De } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
11
|
+
import { a as U, b as W, h as c, c as h, s as g, C as Ye, G as q, g as re, m as Ne, n as D, D as L, f as ne, i as le } from "../../../Tooltip-vyZRZWih.js";
|
|
12
|
+
import { R as de, S as Oe, a as I } from "../../../Slice-BUncQh1B.js";
|
|
13
13
|
import { X as he } from "../../../XYCursor-CVUSpqb9.js";
|
|
14
14
|
import { C as oe } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
15
15
|
import { L as ge } from "../../../LineSeries-D_IL2qGF.js";
|
|
16
|
-
import { L as
|
|
17
|
-
class
|
|
16
|
+
import { L as Se } from "../../../Legend-CFvQiIfn.js";
|
|
17
|
+
class N extends de {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), Object.defineProperty(this, "_tickPoints", {
|
|
20
20
|
enumerable: !0,
|
|
@@ -24,32 +24,32 @@ class O extends de {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
Object.defineProperty(
|
|
27
|
+
Object.defineProperty(N, "className", {
|
|
28
28
|
enumerable: !0,
|
|
29
29
|
configurable: !0,
|
|
30
30
|
writable: !0,
|
|
31
31
|
value: "AxisLabelRadial"
|
|
32
32
|
});
|
|
33
|
-
Object.defineProperty(
|
|
33
|
+
Object.defineProperty(N, "classNames", {
|
|
34
34
|
enumerable: !0,
|
|
35
35
|
configurable: !0,
|
|
36
36
|
writable: !0,
|
|
37
|
-
value: de.classNames.concat([
|
|
37
|
+
value: de.classNames.concat([N.className])
|
|
38
38
|
});
|
|
39
|
-
class
|
|
39
|
+
class X extends F {
|
|
40
40
|
constructor() {
|
|
41
41
|
super(...arguments), Object.defineProperty(this, "labels", {
|
|
42
42
|
enumerable: !0,
|
|
43
43
|
configurable: !0,
|
|
44
44
|
writable: !0,
|
|
45
|
-
value: this.addDisposer(new W
|
|
45
|
+
value: this.addDisposer(new U(W.new({}), () => N._new(this._root, {
|
|
46
46
|
themeTags: M(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
47
47
|
}, [this.labels.template])))
|
|
48
48
|
}), Object.defineProperty(this, "axisFills", {
|
|
49
49
|
enumerable: !0,
|
|
50
50
|
configurable: !0,
|
|
51
51
|
writable: !0,
|
|
52
|
-
value: this.addDisposer(new W
|
|
52
|
+
value: this.addDisposer(new U(W.new({}), () => Oe._new(this._root, {
|
|
53
53
|
themeTags: M(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
|
|
54
54
|
}, [this.axisFills.template])))
|
|
55
55
|
}), Object.defineProperty(this, "_fillGenerator", {
|
|
@@ -78,7 +78,7 @@ class G extends E {
|
|
|
78
78
|
const e = this.chart;
|
|
79
79
|
if (e) {
|
|
80
80
|
const t = e.getPrivate("radius", 0);
|
|
81
|
-
let s = R(this.get("radius",
|
|
81
|
+
let s = R(this.get("radius", $), t);
|
|
82
82
|
s < 0 && (s = t + s), this.setPrivate("radius", s);
|
|
83
83
|
let i = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t) * e.getPrivate("irModifyer", 1);
|
|
84
84
|
i < 0 && (i = s + i), this.setPrivate("innerRadius", i);
|
|
@@ -219,19 +219,19 @@ class G extends E {
|
|
|
219
219
|
updateTooltipBounds(e) {
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
Object.defineProperty(
|
|
222
|
+
Object.defineProperty(X, "className", {
|
|
223
223
|
enumerable: !0,
|
|
224
224
|
configurable: !0,
|
|
225
225
|
writable: !0,
|
|
226
226
|
value: "AxisRendererCircular"
|
|
227
227
|
});
|
|
228
|
-
Object.defineProperty(
|
|
228
|
+
Object.defineProperty(X, "classNames", {
|
|
229
229
|
enumerable: !0,
|
|
230
230
|
configurable: !0,
|
|
231
231
|
writable: !0,
|
|
232
|
-
value:
|
|
232
|
+
value: F.classNames.concat([X.className])
|
|
233
233
|
});
|
|
234
|
-
class
|
|
234
|
+
class G extends F {
|
|
235
235
|
constructor() {
|
|
236
236
|
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
237
237
|
enumerable: !0,
|
|
@@ -242,7 +242,7 @@ class j extends E {
|
|
|
242
242
|
enumerable: !0,
|
|
243
243
|
configurable: !0,
|
|
244
244
|
writable: !0,
|
|
245
|
-
value: this.addDisposer(new W
|
|
245
|
+
value: this.addDisposer(new U(W.new({}), () => N._new(this._root, {
|
|
246
246
|
themeTags: M(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
247
247
|
}, [this.labels.template])))
|
|
248
248
|
});
|
|
@@ -266,7 +266,7 @@ class j extends E {
|
|
|
266
266
|
const e = this.chart;
|
|
267
267
|
if (e) {
|
|
268
268
|
const t = e.getPrivate("radius", 0);
|
|
269
|
-
let s = R(this.get("radius",
|
|
269
|
+
let s = R(this.get("radius", $), t), i = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t) * e.getPrivate("irModifyer", 1);
|
|
270
270
|
i < 0 && (i = s + i), this.setPrivate("radius", s), this.setPrivate("innerRadius", i);
|
|
271
271
|
let a = this.get("startAngle", e.get("startAngle", -90)), r = this.get("endAngle", e.get("endAngle", 270));
|
|
272
272
|
this.setPrivate("startAngle", a), this.setPrivate("endAngle", r);
|
|
@@ -399,19 +399,19 @@ class j extends E {
|
|
|
399
399
|
this._positionTooltip(e, { x: s * h(i), y: s * g(i) });
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
Object.defineProperty(
|
|
402
|
+
Object.defineProperty(G, "className", {
|
|
403
403
|
enumerable: !0,
|
|
404
404
|
configurable: !0,
|
|
405
405
|
writable: !0,
|
|
406
406
|
value: "AxisRendererRadial"
|
|
407
407
|
});
|
|
408
|
-
Object.defineProperty(
|
|
408
|
+
Object.defineProperty(G, "classNames", {
|
|
409
409
|
enumerable: !0,
|
|
410
410
|
configurable: !0,
|
|
411
411
|
writable: !0,
|
|
412
|
-
value:
|
|
412
|
+
value: F.classNames.concat([G.className])
|
|
413
413
|
});
|
|
414
|
-
class
|
|
414
|
+
class Xe extends me {
|
|
415
415
|
setupDefaultRules() {
|
|
416
416
|
super.setupDefaultRules();
|
|
417
417
|
const e = this.rule.bind(this), t = this._root.interfaceColors;
|
|
@@ -470,23 +470,23 @@ class Se extends me {
|
|
|
470
470
|
const s = e("Graphics", ["clock", "hand"]);
|
|
471
471
|
s.setAll({
|
|
472
472
|
fillOpacity: 1
|
|
473
|
-
}),
|
|
473
|
+
}), ie(s, "fill", t, "alternativeBackground");
|
|
474
474
|
}
|
|
475
475
|
{
|
|
476
476
|
const s = e("Graphics", ["clock", "pin"]);
|
|
477
477
|
s.setAll({
|
|
478
478
|
fillOpacity: 1
|
|
479
|
-
}),
|
|
479
|
+
}), ie(s, "fill", t, "alternativeBackground");
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
class
|
|
483
|
+
class j extends ue {
|
|
484
484
|
constructor() {
|
|
485
485
|
super(...arguments), Object.defineProperty(this, "radarContainer", {
|
|
486
486
|
enumerable: !0,
|
|
487
487
|
configurable: !0,
|
|
488
488
|
writable: !0,
|
|
489
|
-
value: this.plotContainer.children.push(
|
|
489
|
+
value: this.plotContainer.children.push(Ye.new(this._root, { x: Y, y: Y }))
|
|
490
490
|
}), Object.defineProperty(this, "_arcGenerator", {
|
|
491
491
|
enumerable: !0,
|
|
492
492
|
configurable: !0,
|
|
@@ -500,9 +500,9 @@ class k extends ue {
|
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
502
|
_afterNew() {
|
|
503
|
-
this._defaultThemes.push(
|
|
503
|
+
this._defaultThemes.push(Xe.new(this._root)), super._afterNew();
|
|
504
504
|
const e = this.radarContainer, t = this.gridContainer, s = this.topGridContainer, i = this.seriesContainer, a = this.bulletsContainer;
|
|
505
|
-
e.children.pushAll([t, i, s, a]), i.set("mask",
|
|
505
|
+
e.children.pushAll([t, i, s, a]), i.set("mask", q.new(this._root, {})), t.set("mask", q.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
506
506
|
this._updateRadius();
|
|
507
507
|
}));
|
|
508
508
|
}
|
|
@@ -514,11 +514,11 @@ class k extends ue {
|
|
|
514
514
|
let n = re(0, 0, i, a, 1);
|
|
515
515
|
const l = t / (n.right - n.left), u = s / (n.bottom - n.top);
|
|
516
516
|
let o = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
517
|
-
if (r instanceof
|
|
517
|
+
if (r instanceof Me) {
|
|
518
518
|
let f = r.value, T = Math.min(l, u);
|
|
519
519
|
f = Math.max(T * f, T - Math.min(s, t)) / T, o = re(0, 0, i, a, f), this.setPrivateRaw("irModifyer", f / r.value);
|
|
520
520
|
}
|
|
521
|
-
n =
|
|
521
|
+
n = Ne([n, o]), this._maxRadius = Math.max(0, Math.min(l, u));
|
|
522
522
|
const y = R(this.get("radius", 0), this._maxRadius);
|
|
523
523
|
this.radarContainer.setAll({
|
|
524
524
|
dy: -y * (n.bottom + n.top) / 2,
|
|
@@ -576,19 +576,19 @@ class k extends ue {
|
|
|
576
576
|
_handlePinch() {
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
Object.defineProperty(
|
|
579
|
+
Object.defineProperty(j, "className", {
|
|
580
580
|
enumerable: !0,
|
|
581
581
|
configurable: !0,
|
|
582
582
|
writable: !0,
|
|
583
583
|
value: "RadarChart"
|
|
584
584
|
});
|
|
585
|
-
Object.defineProperty(
|
|
585
|
+
Object.defineProperty(j, "classNames", {
|
|
586
586
|
enumerable: !0,
|
|
587
587
|
configurable: !0,
|
|
588
588
|
writable: !0,
|
|
589
|
-
value: ue.classNames.concat([
|
|
589
|
+
value: ue.classNames.concat([j.className])
|
|
590
590
|
});
|
|
591
|
-
class
|
|
591
|
+
class k extends he {
|
|
592
592
|
constructor() {
|
|
593
593
|
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
594
594
|
enumerable: !0,
|
|
@@ -624,7 +624,7 @@ class B extends he {
|
|
|
624
624
|
const e = this.chart;
|
|
625
625
|
if (e) {
|
|
626
626
|
const t = e.getPrivate("radius", 0);
|
|
627
|
-
this.setPrivate("radius", R(this.get("radius",
|
|
627
|
+
this.setPrivate("radius", R(this.get("radius", $), t));
|
|
628
628
|
let s = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t);
|
|
629
629
|
s < 0 && (s = t + s), this.setPrivate("innerRadius", s);
|
|
630
630
|
let i = this.get("startAngle", e.get("startAngle", -90)), a = this.get("endAngle", e.get("endAngle", 270));
|
|
@@ -668,21 +668,21 @@ class B extends he {
|
|
|
668
668
|
});
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
|
-
Object.defineProperty(
|
|
671
|
+
Object.defineProperty(k, "className", {
|
|
672
672
|
enumerable: !0,
|
|
673
673
|
configurable: !0,
|
|
674
674
|
writable: !0,
|
|
675
675
|
value: "RadarCursor"
|
|
676
676
|
});
|
|
677
|
-
Object.defineProperty(
|
|
677
|
+
Object.defineProperty(k, "classNames", {
|
|
678
678
|
enumerable: !0,
|
|
679
679
|
configurable: !0,
|
|
680
680
|
writable: !0,
|
|
681
|
-
value: he.classNames.concat([
|
|
681
|
+
value: he.classNames.concat([k.className])
|
|
682
682
|
});
|
|
683
|
-
class
|
|
683
|
+
class B extends ge {
|
|
684
684
|
_afterNew() {
|
|
685
|
-
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask",
|
|
685
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", q.new(this._root, {}));
|
|
686
686
|
}
|
|
687
687
|
_handleMaskBullets() {
|
|
688
688
|
}
|
|
@@ -711,19 +711,19 @@ class F extends ge {
|
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
Object.defineProperty(
|
|
714
|
+
Object.defineProperty(B, "className", {
|
|
715
715
|
enumerable: !0,
|
|
716
716
|
configurable: !0,
|
|
717
717
|
writable: !0,
|
|
718
718
|
value: "RadarLineSeries"
|
|
719
719
|
});
|
|
720
|
-
Object.defineProperty(
|
|
720
|
+
Object.defineProperty(B, "classNames", {
|
|
721
721
|
enumerable: !0,
|
|
722
722
|
configurable: !0,
|
|
723
723
|
writable: !0,
|
|
724
|
-
value: ge.classNames.concat([
|
|
724
|
+
value: ge.classNames.concat([B.className])
|
|
725
725
|
});
|
|
726
|
-
const
|
|
726
|
+
const et = (_) => {
|
|
727
727
|
const e = xe({ props: _, name: "HCStackedAreaRadar" }), {
|
|
728
728
|
dimensions: t,
|
|
729
729
|
values: s,
|
|
@@ -734,20 +734,16 @@ const Ze = (_) => {
|
|
|
734
734
|
sx: l,
|
|
735
735
|
...u
|
|
736
736
|
} = e, o = ve(), f = `hc-stacked-area-radar-${be().replace(/:/g, "")}`, T = Pe(null);
|
|
737
|
-
let
|
|
738
|
-
t.length < 2 ?
|
|
739
|
-
if (
|
|
740
|
-
let
|
|
741
|
-
return
|
|
742
|
-
var te, se
|
|
737
|
+
let O = null;
|
|
738
|
+
t.length < 2 ? O = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (O = "StackedAreaRadar requires at least 1 value"), Re(() => {
|
|
739
|
+
if (O) return;
|
|
740
|
+
let E;
|
|
741
|
+
return E = setTimeout(() => {
|
|
742
|
+
var ee, te, se;
|
|
743
743
|
const d = Ae.new(f);
|
|
744
|
-
T.current = d, Te(d, (
|
|
745
|
-
text: Y(o.palette.text.primary),
|
|
746
|
-
grid: Y(o.palette.divider),
|
|
747
|
-
stroke: Y(o.palette.divider)
|
|
748
|
-
});
|
|
744
|
+
T.current = d, Te(d, (ee = s == null ? void 0 : s[0]) == null ? void 0 : ee.format), d.setThemes([pe.new(d)]), Ce(d, o);
|
|
749
745
|
const p = d.container.children.push(
|
|
750
|
-
|
|
746
|
+
j.new(d, {
|
|
751
747
|
panX: !1,
|
|
752
748
|
panY: !1,
|
|
753
749
|
wheelX: "none",
|
|
@@ -758,36 +754,36 @@ const Ze = (_) => {
|
|
|
758
754
|
maxTooltipDistance: -1
|
|
759
755
|
})
|
|
760
756
|
);
|
|
761
|
-
p.set("colors",
|
|
757
|
+
p.set("colors", Le(d, n)), p.get("colors", {}).set("step", 2), p.set(
|
|
762
758
|
"cursor",
|
|
763
|
-
|
|
759
|
+
k.new(d, { behavior: "zoomX" })
|
|
764
760
|
).lineY.set("visible", !1);
|
|
765
761
|
const x = t[0], fe = t[1];
|
|
766
762
|
let v = [];
|
|
767
|
-
const
|
|
768
|
-
Object.keys(
|
|
769
|
-
|
|
770
|
-
const A = P[x.value],
|
|
771
|
-
|
|
763
|
+
const V = H.groupBy(i, fe.value);
|
|
764
|
+
Object.keys(V).forEach((b) => {
|
|
765
|
+
V[b].forEach((P) => {
|
|
766
|
+
const A = P[x.value], z = H.findIndex(v, { [x.value]: A });
|
|
767
|
+
z === -1 ? v.push({
|
|
772
768
|
[x.value]: A,
|
|
773
769
|
[b]: P[s[0].dataFieldName]
|
|
774
|
-
}) : v[
|
|
775
|
-
...v[
|
|
770
|
+
}) : v[z] = {
|
|
771
|
+
...v[z],
|
|
776
772
|
[b]: P[s[0].dataFieldName]
|
|
777
773
|
};
|
|
778
774
|
});
|
|
779
775
|
});
|
|
780
|
-
const
|
|
776
|
+
const S = X.new(d, {
|
|
781
777
|
minGridDistance: 30
|
|
782
778
|
});
|
|
783
|
-
|
|
779
|
+
S.labels.template.setAll({
|
|
784
780
|
textType: "radial",
|
|
785
781
|
radius: 10,
|
|
786
782
|
paddingTop: 0,
|
|
787
783
|
paddingBottom: 0,
|
|
788
|
-
centerY:
|
|
784
|
+
centerY: Y,
|
|
789
785
|
fontSize: "0.8em"
|
|
790
|
-
}),
|
|
786
|
+
}), S.grid.template.setAll({
|
|
791
787
|
location: 0.5,
|
|
792
788
|
strokeDasharray: [2, 2]
|
|
793
789
|
});
|
|
@@ -799,47 +795,49 @@ const Ze = (_) => {
|
|
|
799
795
|
oe.new(d, {
|
|
800
796
|
maxDeviation: 0,
|
|
801
797
|
categoryField: x.value,
|
|
802
|
-
renderer:
|
|
798
|
+
renderer: S
|
|
803
799
|
})
|
|
804
|
-
), v =
|
|
800
|
+
), v = H.orderBy(v, [x.value]), v = v.map((A) => ({
|
|
805
801
|
...A,
|
|
806
|
-
[x.value]: ye(A[x.value]).format(
|
|
802
|
+
[x.value]: ye(A[x.value]).format(
|
|
803
|
+
P
|
|
804
|
+
)
|
|
807
805
|
}));
|
|
808
806
|
} else
|
|
809
807
|
C = p.xAxes.push(
|
|
810
808
|
oe.new(d, {
|
|
811
809
|
maxDeviation: 0,
|
|
812
810
|
categoryField: x.value,
|
|
813
|
-
renderer:
|
|
811
|
+
renderer: S
|
|
814
812
|
})
|
|
815
813
|
);
|
|
816
|
-
const
|
|
814
|
+
const J = G.new(d, {
|
|
817
815
|
minGridDistance: 30
|
|
818
|
-
}),
|
|
819
|
-
|
|
816
|
+
}), K = p.yAxes.push(
|
|
817
|
+
De.new(d, { renderer: J })
|
|
820
818
|
);
|
|
821
|
-
|
|
822
|
-
stroke:
|
|
819
|
+
J.grid.template.setAll({ strokeDasharray: [2, 2] }), (te = C.get("renderer")) == null || te.grid.template.setAll({
|
|
820
|
+
stroke: ae(o.palette.divider),
|
|
823
821
|
strokeOpacity: 1
|
|
824
|
-
}), (
|
|
825
|
-
stroke:
|
|
822
|
+
}), (se = K.get("renderer")) == null || se.grid.template.setAll({
|
|
823
|
+
stroke: ae(o.palette.divider),
|
|
826
824
|
strokeOpacity: 1
|
|
827
825
|
});
|
|
828
|
-
const
|
|
829
|
-
|
|
826
|
+
const Q = [], Z = Object.keys(V);
|
|
827
|
+
Z.forEach((b, P) => {
|
|
830
828
|
const A = p.series.push(
|
|
831
|
-
|
|
829
|
+
B.new(d, {
|
|
832
830
|
name: _e(b),
|
|
833
831
|
xAxis: C,
|
|
834
|
-
yAxis:
|
|
832
|
+
yAxis: K,
|
|
835
833
|
valueYField: b,
|
|
836
834
|
categoryXField: x.value,
|
|
837
|
-
...P ===
|
|
835
|
+
...P === Z.length - 1 && {
|
|
838
836
|
stacked: !0
|
|
839
837
|
}
|
|
840
838
|
})
|
|
841
839
|
);
|
|
842
|
-
A.strokes.template.setAll({ strokeOpacity: 0 }), A.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), A.data.setAll(v), A.appear(1e3),
|
|
840
|
+
A.strokes.template.setAll({ strokeOpacity: 0 }), A.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), A.data.setAll(v), A.appear(1e3), Q.push(A);
|
|
843
841
|
}), we({
|
|
844
842
|
root: d,
|
|
845
843
|
chart: p,
|
|
@@ -848,20 +846,20 @@ const Ze = (_) => {
|
|
|
848
846
|
isDateAxis: !1,
|
|
849
847
|
follow: !0
|
|
850
848
|
}), p.radarContainer.children.push(
|
|
851
|
-
|
|
849
|
+
Se.new(d, {
|
|
852
850
|
width: 150,
|
|
853
|
-
centerX:
|
|
854
|
-
centerY:
|
|
851
|
+
centerX: Y,
|
|
852
|
+
centerY: Y
|
|
855
853
|
})
|
|
856
|
-
).data.setAll(
|
|
854
|
+
).data.setAll(Q), C.data.setAll(v), p.appear(1e3, 100);
|
|
857
855
|
}, a), () => {
|
|
858
856
|
var d;
|
|
859
|
-
|
|
857
|
+
E && clearTimeout(E), (d = T.current) == null || d.dispose(), T.current = null;
|
|
860
858
|
};
|
|
861
859
|
}, [i, t, s, o.palette.mode, n]);
|
|
862
860
|
const ce = { ...e };
|
|
863
|
-
return { chartId: f, ownerState: ce, sx: l, error:
|
|
861
|
+
return { chartId: f, ownerState: ce, sx: l, error: O, other: u };
|
|
864
862
|
};
|
|
865
863
|
export {
|
|
866
|
-
|
|
864
|
+
et as useStackedAreaRadarLogic
|
|
867
865
|
};
|