@hybridcore/ui 1.6.7 → 1.6.9
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/AnimatedTheme-BOKdw2Oy.js +7708 -0
- package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-lUbezuh7.js} +51 -49
- package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-DbSiyb45.js} +3 -3
- package/dist/{Bullet-DVczI2TD.js → Bullet-PgoNb3Jv.js} +1 -1
- package/dist/{Button-CcsPEIDh.js → Button-XBf4Mwz-.js} +3 -3
- package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B8KQp1pE.js} +3 -3
- package/dist/{Circle-Cy5s-pVc.js → Circle-BWRdiMpG.js} +1 -1
- package/dist/ColorSet-DDmFoKtZ.js +77 -0
- package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-rgnGm-Bg.js} +4 -4
- package/dist/{DataProcessor-CHDO51q4.js → DataProcessor-CvIe9BVn.js} +1 -1
- package/dist/{DateAxis-YX3QNIB-.js → DateAxis-zNtbSVjW.js} +8 -7
- package/dist/{ColorSet-C7vpNXhM.js → Entity-CCUIdRAr.js} +638 -712
- package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CCvGsF1A.js} +25 -23
- package/dist/{Legend-Dp_MKfS4.js → Legend-kbCFjJAW.js} +11 -10
- package/dist/{LineSeries-Uiv5o56b.js → LineSeries-BLFvwrLT.js} +13 -12
- package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-C7rnipF7.js} +11 -11
- package/dist/{PieSeries-B2fW3z0s.js → PieSeries-3iLRbqFv.js} +34 -32
- package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-CqMMmPM0.js} +4 -4
- package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-BzSBcIUt.js} +4 -4
- package/dist/{Slice-B19rbYDZ.js → Slice-CS23iLiS.js} +2 -2
- package/dist/{Tick-2bcLyHpF.js → Tick-BADQ8QeT.js} +15 -15
- package/dist/Tooltip-A_HlttXp.js +3606 -0
- package/dist/{XYCursor-C8WktvKM.js → XYCursor-gHAo40xC.js} +3 -3
- package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Brs1wHM1.js} +9 -9
- package/dist/components/charts/_common/tooltip.js +73 -0
- package/dist/components/charts/_common/utils.js +10 -9
- package/dist/components/charts/candlestick/logic.js +181 -156
- package/dist/components/charts/column-line-mix/logic.js +80 -77
- package/dist/components/charts/donut-chart/logic.js +36 -34
- package/dist/components/charts/drill-down-treemap/logic.js +49 -48
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +102 -101
- package/dist/components/charts/heatmap/logic.js +33 -32
- package/dist/components/charts/highlighting-line-data/logic.js +26 -24
- package/dist/components/charts/line/logic.js +123 -174
- package/dist/components/charts/logaritmic-scale/logic.js +69 -60
- package/dist/components/charts/multiple-value-axes/logic.js +93 -88
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +28 -27
- package/dist/components/charts/pie-chart/logic.js +43 -41
- package/dist/components/charts/stacked-area-radar/logic.js +124 -121
- package/dist/components/charts/stacked-column-chart/logic.js +107 -95
- package/dist/components/charts/xy-chart/logic.js +103 -91
- package/dist/components/metric-card/MetricChart.js +29 -28
- package/dist/components/metric-card/index.js +1 -1
- package/dist/components/metric-card/logic.js +74 -67
- package/dist/components/metric-card/styled.js +55 -46
- package/package.json +1 -1
- package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useThemeProps as
|
|
1
|
+
import { R as M, A as j } from "../../../AnimatedTheme-BOKdw2Oy.js";
|
|
2
|
+
import { useThemeProps as q, useTheme as z } from "@mui/material";
|
|
3
3
|
import C from "lodash";
|
|
4
|
-
import { useId as
|
|
4
|
+
import { useId as U, useRef as H, useEffect as $ } from "react";
|
|
5
5
|
import { humanizeLabel as F } from "../_common/format.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
6
|
+
import { attachCombinedAxisTooltip as J } from "../_common/tooltip.js";
|
|
7
|
+
import { colorSetFromPalette as K, applyValueFormat as Q } from "../_common/utils.js";
|
|
8
|
+
import { c as T, a as A } from "../../../Entity-CCUIdRAr.js";
|
|
9
|
+
import { X as Z, V as ee } from "../../../AxisRenderer-lUbezuh7.js";
|
|
10
|
+
import { L as te } from "../../../Legend-kbCFjJAW.js";
|
|
11
|
+
import { D as re } from "../../../DateAxis-zNtbSVjW.js";
|
|
12
|
+
import { A as P, a as se } from "../../../AxisRendererY-DbSiyb45.js";
|
|
13
|
+
import { C as ae } from "../../../CategoryAxis-B8KQp1pE.js";
|
|
14
|
+
import { X as ie } from "../../../XYCursor-gHAo40xC.js";
|
|
15
|
+
import { L as oe } from "../../../LineSeries-BLFvwrLT.js";
|
|
16
|
+
import { D as le } from "../../../DataProcessor-CvIe9BVn.js";
|
|
17
|
+
import { G as X, R as ne } from "../../../Tooltip-A_HlttXp.js";
|
|
18
|
+
import { C as ce } from "../../../Circle-BWRdiMpG.js";
|
|
19
|
+
import { B as me } from "../../../Bullet-PgoNb3Jv.js";
|
|
20
|
+
class w extends X {
|
|
19
21
|
_beforeChanged() {
|
|
20
22
|
super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
|
|
21
23
|
}
|
|
@@ -30,109 +32,104 @@ class x extends X {
|
|
|
30
32
|
this.markDirty(), this._clear = !0;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
|
-
Object.defineProperty(
|
|
35
|
+
Object.defineProperty(w, "className", {
|
|
34
36
|
enumerable: !0,
|
|
35
37
|
configurable: !0,
|
|
36
38
|
writable: !0,
|
|
37
39
|
value: "Triangle"
|
|
38
40
|
});
|
|
39
|
-
Object.defineProperty(
|
|
41
|
+
Object.defineProperty(w, "classNames", {
|
|
40
42
|
enumerable: !0,
|
|
41
43
|
configurable: !0,
|
|
42
44
|
writable: !0,
|
|
43
|
-
value: X.classNames.concat([
|
|
45
|
+
value: X.classNames.concat([w.className])
|
|
44
46
|
});
|
|
45
|
-
const
|
|
46
|
-
const n =
|
|
47
|
+
const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Fe = (D) => {
|
|
48
|
+
const n = q({ props: D, name: "HCMultipleValueAxes" }), {
|
|
47
49
|
dimensions: s,
|
|
48
50
|
values: t,
|
|
49
51
|
data: p,
|
|
50
|
-
initDelay:
|
|
51
|
-
baseInterval:
|
|
52
|
+
initDelay: I = 0,
|
|
53
|
+
baseInterval: L,
|
|
52
54
|
colors: R,
|
|
53
|
-
sx:
|
|
55
|
+
sx: Y,
|
|
54
56
|
...V
|
|
55
|
-
} = n,
|
|
57
|
+
} = n, u = z(), _ = `hc-multiple-value-axes-${U().replace(/:/g, "")}`, y = H(null);
|
|
56
58
|
let h = null;
|
|
57
|
-
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"),
|
|
59
|
+
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), $(() => {
|
|
58
60
|
if (h) return;
|
|
59
61
|
let b;
|
|
60
62
|
return b = setTimeout(() => {
|
|
61
63
|
var N;
|
|
62
|
-
const e =
|
|
63
|
-
y.current = e, e.setThemes([
|
|
64
|
-
text:
|
|
65
|
-
grid:
|
|
66
|
-
stroke:
|
|
64
|
+
const e = M.new(_);
|
|
65
|
+
y.current = e, e.setThemes([j.new(e)]), e.interfaceColors.setAll({
|
|
66
|
+
text: T(u.palette.text.primary),
|
|
67
|
+
grid: T(u.palette.divider),
|
|
68
|
+
stroke: T(u.palette.divider)
|
|
67
69
|
});
|
|
68
70
|
const r = e.container.children.push(
|
|
69
|
-
|
|
71
|
+
Z.new(e, {
|
|
70
72
|
panX: !1,
|
|
71
73
|
panY: !1,
|
|
72
74
|
wheelX: "none",
|
|
73
75
|
wheelY: "none",
|
|
76
|
+
maxTooltipDistance: -1,
|
|
74
77
|
layout: e.verticalLayout
|
|
75
78
|
})
|
|
76
79
|
);
|
|
77
|
-
r.set("colors",
|
|
80
|
+
r.set("colors", K(e, R)), r.get("colors", {}).set("step", 3);
|
|
78
81
|
const G = r.children.push(
|
|
79
|
-
|
|
80
|
-
),
|
|
81
|
-
let
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
te.new(e, { centerX: A, x: A })
|
|
83
|
+
), i = s[0];
|
|
84
|
+
let c, d = p;
|
|
85
|
+
i.type === "date" ? (c = r.xAxes.push(
|
|
86
|
+
re.new(e, {
|
|
84
87
|
maxDeviation: 0.1,
|
|
85
88
|
groupData: !1,
|
|
86
|
-
baseInterval:
|
|
87
|
-
renderer: P.new(e, {})
|
|
88
|
-
tooltip: T.new(e, {})
|
|
89
|
+
baseInterval: L || { timeUnit: "day", count: 1 },
|
|
90
|
+
renderer: P.new(e, {})
|
|
89
91
|
})
|
|
90
|
-
),
|
|
91
|
-
|
|
92
|
-
categoryField:
|
|
93
|
-
renderer: P.new(e, {})
|
|
94
|
-
tooltip: T.new(e, {})
|
|
92
|
+
), d = C.orderBy(p, [i.value])) : (c = r.xAxes.push(
|
|
93
|
+
ae.new(e, {
|
|
94
|
+
categoryField: i.value,
|
|
95
|
+
renderer: P.new(e, {})
|
|
95
96
|
})
|
|
96
97
|
), e.numberFormatter.setAll({
|
|
97
98
|
numberFormat: "#",
|
|
98
99
|
numericFields: ["valueX"]
|
|
99
|
-
}),
|
|
100
|
-
function E(
|
|
101
|
-
const f =
|
|
102
|
-
|
|
100
|
+
}), d = C.orderBy(p, [i.value]), c.data.setAll(d));
|
|
101
|
+
function E(o, l, m, O, S, v, W) {
|
|
102
|
+
const f = se.new(e, { opposite: S }), k = r.yAxes.push(
|
|
103
|
+
ee.new(e, { maxDeviation: 1, renderer: f })
|
|
103
104
|
);
|
|
104
105
|
r.yAxes.indexOf(k) > 0 && k.set("syncWithAxis", r.yAxes.getIndex(0));
|
|
105
106
|
const a = r.series.push(
|
|
106
|
-
|
|
107
|
-
name:
|
|
108
|
-
xAxis:
|
|
107
|
+
oe.new(e, {
|
|
108
|
+
name: l,
|
|
109
|
+
xAxis: c,
|
|
109
110
|
yAxis: k,
|
|
110
|
-
valueYField:
|
|
111
|
-
...
|
|
112
|
-
tooltip: T.new(e, {
|
|
113
|
-
pointerOrientation: "horizontal",
|
|
114
|
-
labelText: `${o}: {valueY}`
|
|
115
|
-
})
|
|
111
|
+
valueYField: O,
|
|
112
|
+
...i.type === "date" ? { valueXField: m } : { categoryXField: m }
|
|
116
113
|
})
|
|
117
114
|
);
|
|
118
115
|
a.strokes.template.setAll({ strokeWidth: 2 }), f.grid.template.set("strokeOpacity", 0.05), f.labels.template.set("fill", a.get("fill")), f.setAll({
|
|
119
116
|
stroke: a.get("fill"),
|
|
120
117
|
strokeOpacity: 1,
|
|
121
118
|
opacity: 1
|
|
122
|
-
}),
|
|
119
|
+
}), W === "date" && (a.data.processor = le.new(e, {
|
|
123
120
|
dateFormat: "i",
|
|
124
|
-
dateFields: [
|
|
121
|
+
dateFields: [m]
|
|
125
122
|
})), v !== void 0 && a.bullets.push(function() {
|
|
126
123
|
let g;
|
|
127
|
-
return v === "RECTANGLE" ? g =
|
|
124
|
+
return v === "RECTANGLE" ? g = ne.new(e, {
|
|
128
125
|
width: 10,
|
|
129
126
|
height: 10,
|
|
130
|
-
centerX:
|
|
131
|
-
centerY:
|
|
127
|
+
centerX: A,
|
|
128
|
+
centerY: A,
|
|
132
129
|
strokeWidth: 2,
|
|
133
130
|
stroke: a.get("stroke"),
|
|
134
131
|
fill: e.interfaceColors.get("background")
|
|
135
|
-
}) : v === "TRIANGLE" ? g =
|
|
132
|
+
}) : v === "TRIANGLE" ? g = w.new(e, {
|
|
136
133
|
width: 10,
|
|
137
134
|
height: 10,
|
|
138
135
|
strokeWidth: 2,
|
|
@@ -143,45 +140,53 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ee = (L) => {
|
|
|
143
140
|
radius: 4,
|
|
144
141
|
stroke: a.get("stroke"),
|
|
145
142
|
fill: e.interfaceColors.get("background")
|
|
146
|
-
}),
|
|
147
|
-
}), a.data.setAll(
|
|
143
|
+
}), me.new(e, { sprite: g });
|
|
144
|
+
}), a.data.setAll(o);
|
|
148
145
|
}
|
|
149
146
|
if (r.set(
|
|
150
147
|
"cursor",
|
|
151
|
-
|
|
152
|
-
).lineY.set("visible", !1),
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
ie.new(e, { xAxis: c, behavior: "none" })
|
|
149
|
+
).lineY.set("visible", !1), J({
|
|
150
|
+
root: e,
|
|
151
|
+
chart: r,
|
|
152
|
+
xAxis: c,
|
|
153
|
+
theme: u,
|
|
154
|
+
isDateAxis: i.type === "date",
|
|
155
|
+
baseInterval: L,
|
|
156
|
+
follow: !0
|
|
157
|
+
}), s.length > 1) {
|
|
158
|
+
const o = C.groupBy(d, s[1].value);
|
|
159
|
+
Object.keys(o).forEach((l, m) => {
|
|
155
160
|
E(
|
|
156
|
-
|
|
157
|
-
F(
|
|
161
|
+
o[l],
|
|
162
|
+
F(l),
|
|
158
163
|
s[0].value,
|
|
159
164
|
t[0].dataFieldName,
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
m !== 0,
|
|
166
|
+
x[m % x.length]
|
|
162
167
|
);
|
|
163
168
|
});
|
|
164
169
|
} else
|
|
165
|
-
t.forEach((
|
|
170
|
+
t.forEach((o, l) => {
|
|
166
171
|
E(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
d,
|
|
173
|
+
o.label ?? F(o.name),
|
|
174
|
+
i.value,
|
|
175
|
+
o.dataFieldName,
|
|
176
|
+
l !== 0,
|
|
177
|
+
x[l % x.length],
|
|
178
|
+
i.type
|
|
174
179
|
);
|
|
175
180
|
});
|
|
176
|
-
G.data.setAll(r.series.values),
|
|
177
|
-
},
|
|
181
|
+
G.data.setAll(r.series.values), Q(e, (N = t == null ? void 0 : t[0]) == null ? void 0 : N.format), r.appear(1e3, 100);
|
|
182
|
+
}, I), () => {
|
|
178
183
|
var e;
|
|
179
184
|
b && clearTimeout(b), (e = y.current) == null || e.dispose(), y.current = null;
|
|
180
185
|
};
|
|
181
|
-
}, [p, s, t,
|
|
186
|
+
}, [p, s, t, u.palette.mode, R]);
|
|
182
187
|
const B = { ...n };
|
|
183
|
-
return { chartId: _, ownerState: B, sx:
|
|
188
|
+
return { chartId: _, ownerState: B, sx: Y, error: h, other: V };
|
|
184
189
|
};
|
|
185
190
|
export {
|
|
186
|
-
|
|
191
|
+
Fe as useMultipleValueAxesLogic
|
|
187
192
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as S, A as E } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as S, A as E } from "../../../AnimatedTheme-BOKdw2Oy.js";
|
|
2
2
|
import { useThemeProps as L, useTheme as j } from "@mui/material";
|
|
3
3
|
import q from "dayjs";
|
|
4
4
|
import T from "lodash";
|
|
5
5
|
import { useId as B, useRef as H, useEffect as I } from "react";
|
|
6
6
|
import { applyValueFormat as W, colorSetFromPalette as O } from "../_common/utils.js";
|
|
7
|
-
import { c as n, p as o } from "../../../
|
|
8
|
-
import { P as V, a as N } from "../../../PieSeries-
|
|
7
|
+
import { c as n, p as o } from "../../../Entity-CCUIdRAr.js";
|
|
8
|
+
import { P as V, a as N } from "../../../PieSeries-3iLRbqFv.js";
|
|
9
9
|
const Z = (b) => {
|
|
10
10
|
const g = L({ props: b, name: "HCNestedPie" }), {
|
|
11
11
|
dimensions: a,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import { applyValueFormat as
|
|
6
|
-
import { Z as
|
|
7
|
-
import { M as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { R as X, A as I } from "../../../AnimatedTheme-BOKdw2Oy.js";
|
|
2
|
+
import { useThemeProps as ee } from "@mui/material";
|
|
3
|
+
import te from "dayjs";
|
|
4
|
+
import { useId as re, useRef as ne, useEffect as ie } from "react";
|
|
5
|
+
import { applyValueFormat as se, colorSetFromPalette as oe } from "../_common/utils.js";
|
|
6
|
+
import { Z as U } from "../../../ZoomableContainer-Brs1wHM1.js";
|
|
7
|
+
import { M as ae, m as ue, e as le, b as q } from "../../../Entity-CCUIdRAr.js";
|
|
8
|
+
import { C as $, G as A, a as ce, b as he } from "../../../Tooltip-A_HlttXp.js";
|
|
9
|
+
import { B as O } from "../../../Button-XBf4Mwz-.js";
|
|
10
|
+
import { H as J } from "../../../Hierarchy-CCvGsF1A.js";
|
|
11
|
+
import { C as fe } from "../../../Circle-BWRdiMpG.js";
|
|
11
12
|
import { o as de, c as z, a as me } from "../../../constant-BiOGvlZc.js";
|
|
12
|
-
class j extends
|
|
13
|
+
class j extends $ {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments), Object.defineProperty(this, "homeButton", {
|
|
15
16
|
enumerable: !0,
|
|
@@ -53,11 +54,11 @@ class j extends U {
|
|
|
53
54
|
_prepareChildren() {
|
|
54
55
|
if (super._prepareChildren(), this.isDirty("target")) {
|
|
55
56
|
const r = this.get("target"), e = this._prevSettings.target;
|
|
56
|
-
r && (r instanceof
|
|
57
|
+
r && (r instanceof U && (this._targetDisposer = this.addDisposer(r.contents.on("scale", (n) => {
|
|
57
58
|
n == r.get("minZoomLevel") ? this.minusButton.set("disabled", !0) : this.minusButton.set("disabled", !1), n == r.get("maxZoomLevel") ? this.plusButton.set("disabled", !0) : this.plusButton.set("disabled", !1);
|
|
58
59
|
})), this.root.events.once("frameended", () => {
|
|
59
60
|
r.get("scale") == r.get("minZoomLevel") && this.minusButton.set("disabled", !0);
|
|
60
|
-
})), this._disposer = new
|
|
61
|
+
})), this._disposer = new ae([
|
|
61
62
|
this.plusButton.events.on("click", () => {
|
|
62
63
|
r.zoomIn();
|
|
63
64
|
}),
|
|
@@ -81,7 +82,7 @@ Object.defineProperty(j, "classNames", {
|
|
|
81
82
|
enumerable: !0,
|
|
82
83
|
configurable: !0,
|
|
83
84
|
writable: !0,
|
|
84
|
-
value:
|
|
85
|
+
value: $.classNames.concat([j.className])
|
|
85
86
|
});
|
|
86
87
|
const pe = 1664525, ge = 1013904223, E = 4294967296;
|
|
87
88
|
function ye() {
|
|
@@ -266,8 +267,8 @@ class R extends J {
|
|
|
266
267
|
enumerable: !0,
|
|
267
268
|
configurable: !0,
|
|
268
269
|
writable: !0,
|
|
269
|
-
value: this.addDisposer(new
|
|
270
|
-
themeTags:
|
|
270
|
+
value: this.addDisposer(new ce(he.new({}), () => fe._new(this._root, {
|
|
271
|
+
themeTags: ue(this.circles.template.get("themeTags", []), [this._tag, "shape"])
|
|
271
272
|
}, [this.circles.template])))
|
|
272
273
|
});
|
|
273
274
|
}
|
|
@@ -297,7 +298,7 @@ class R extends J {
|
|
|
297
298
|
const n = e.get("node"), i = e.get("circle"), s = this.getPrivate("scaleR", 1), a = r.x * s, l = r.y * s, o = r.r * s;
|
|
298
299
|
n.setAll({ x: a, y: l }), i.set("radius", o);
|
|
299
300
|
const u = r.children;
|
|
300
|
-
u &&
|
|
301
|
+
u && le(u, (c) => {
|
|
301
302
|
this._updateNodesScale(c);
|
|
302
303
|
});
|
|
303
304
|
}
|
|
@@ -337,7 +338,7 @@ Object.defineProperty(R, "classNames", {
|
|
|
337
338
|
value: J.classNames.concat([R.className])
|
|
338
339
|
});
|
|
339
340
|
function Ce(t, r) {
|
|
340
|
-
const e =
|
|
341
|
+
const e = te(t);
|
|
341
342
|
switch (r) {
|
|
342
343
|
case "millisecond":
|
|
343
344
|
return e.format("HH:mm:ss.SSS");
|
|
@@ -359,8 +360,8 @@ function Ce(t, r) {
|
|
|
359
360
|
return e.format();
|
|
360
361
|
}
|
|
361
362
|
}
|
|
362
|
-
const
|
|
363
|
-
const r =
|
|
363
|
+
const ze = (t) => {
|
|
364
|
+
const r = ee({ props: t, name: "HCPackedCircles" }), {
|
|
364
365
|
dimensions: e,
|
|
365
366
|
values: n,
|
|
366
367
|
data: i,
|
|
@@ -369,17 +370,17 @@ const qe = (t) => {
|
|
|
369
370
|
colors: l,
|
|
370
371
|
sx: o,
|
|
371
372
|
...u
|
|
372
|
-
} = r, h = `hc-packed-circles-${
|
|
373
|
+
} = r, h = `hc-packed-circles-${re().replace(/:/g, "")}`, d = ne(null);
|
|
373
374
|
let m = null;
|
|
374
|
-
e.length < 1 ? m = "PackedCircles requires at least 1 dimension" : n.length < 1 && (m = "PackedCircles requires at least 1 value"),
|
|
375
|
+
e.length < 1 ? m = "PackedCircles requires at least 1 dimension" : n.length < 1 && (m = "PackedCircles requires at least 1 value"), ie(() => {
|
|
375
376
|
if (m) return;
|
|
376
377
|
let p;
|
|
377
378
|
return p = setTimeout(() => {
|
|
378
379
|
var v;
|
|
379
|
-
const f =
|
|
380
|
-
d.current = f,
|
|
380
|
+
const f = X.new(h);
|
|
381
|
+
d.current = f, se(f, (v = n == null ? void 0 : n[0]) == null ? void 0 : v.format), f.setThemes([I.new(f)]);
|
|
381
382
|
const y = f.container.children.push(
|
|
382
|
-
|
|
383
|
+
U.new(f, {
|
|
383
384
|
width: q,
|
|
384
385
|
height: q,
|
|
385
386
|
wheelable: !0,
|
|
@@ -397,7 +398,7 @@ const qe = (t) => {
|
|
|
397
398
|
categoryField: e[0].value,
|
|
398
399
|
childDataField: "children"
|
|
399
400
|
})
|
|
400
|
-
), w =
|
|
401
|
+
), w = oe(f, l);
|
|
401
402
|
x.set("colors", w), e[0].type === "date" && i.forEach((g) => {
|
|
402
403
|
g[e[0].value] = Ce(
|
|
403
404
|
g[e[0].value],
|
|
@@ -414,5 +415,5 @@ const qe = (t) => {
|
|
|
414
415
|
};
|
|
415
416
|
export {
|
|
416
417
|
Ce as formatTimeLabel,
|
|
417
|
-
|
|
418
|
+
ze as usePackedCirclesLogic
|
|
418
419
|
};
|
|
@@ -1,66 +1,68 @@
|
|
|
1
|
-
import { R as w, A
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import { applyValueFormat as
|
|
6
|
-
import { P as E, a as
|
|
7
|
-
import { c as m, p as
|
|
8
|
-
import { L as
|
|
9
|
-
const
|
|
10
|
-
const p =
|
|
1
|
+
import { R as w, A } from "../../../AnimatedTheme-BOKdw2Oy.js";
|
|
2
|
+
import { useThemeProps as C, useTheme as F } from "@mui/material";
|
|
3
|
+
import L from "dayjs";
|
|
4
|
+
import { useId as R, useRef as D, useEffect as I } from "react";
|
|
5
|
+
import { applyValueFormat as S, colorSetFromPalette as b } from "../_common/utils.js";
|
|
6
|
+
import { P as E, a as N } from "../../../PieSeries-3iLRbqFv.js";
|
|
7
|
+
import { c as m, p as v } from "../../../Entity-CCUIdRAr.js";
|
|
8
|
+
import { L as j } from "../../../Legend-kbCFjJAW.js";
|
|
9
|
+
const K = (y) => {
|
|
10
|
+
const p = C({ props: y, name: "HCPieChart" }), {
|
|
11
11
|
dimensions: t,
|
|
12
|
-
values:
|
|
12
|
+
values: o,
|
|
13
13
|
data: i,
|
|
14
|
-
initDelay:
|
|
15
|
-
colors:
|
|
16
|
-
sx:
|
|
17
|
-
...
|
|
18
|
-
} = p,
|
|
14
|
+
initDelay: T = 0,
|
|
15
|
+
colors: u,
|
|
16
|
+
sx: x,
|
|
17
|
+
...M
|
|
18
|
+
} = p, a = F(), d = `hc-pie-chart-${R().replace(/:/g, "")}`, l = D(null);
|
|
19
19
|
let s = null;
|
|
20
|
-
t.length < 1 ? s = "Missing dimensions config!" :
|
|
20
|
+
t.length < 1 ? s = "Missing dimensions config!" : o.length < 1 && (s = "Missing values config!"), I(() => {
|
|
21
21
|
if (s) return;
|
|
22
|
-
let
|
|
23
|
-
return
|
|
24
|
-
var
|
|
25
|
-
const e = w.new(
|
|
26
|
-
|
|
22
|
+
let n;
|
|
23
|
+
return n = setTimeout(() => {
|
|
24
|
+
var g;
|
|
25
|
+
const e = w.new(d);
|
|
26
|
+
l.current = e, S(e, (g = o == null ? void 0 : o[0]) == null ? void 0 : g.format), e.setThemes([A.new(e)]);
|
|
27
27
|
const f = e.container.children.push(
|
|
28
28
|
E.new(e, {
|
|
29
29
|
layout: e.verticalLayout
|
|
30
30
|
})
|
|
31
31
|
);
|
|
32
32
|
e.interfaceColors.setAll({
|
|
33
|
-
text: m(
|
|
34
|
-
grid: m(
|
|
35
|
-
stroke: m(
|
|
33
|
+
text: m(a.palette.text.primary),
|
|
34
|
+
grid: m(a.palette.divider),
|
|
35
|
+
stroke: m(a.palette.divider)
|
|
36
36
|
});
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
valueField:
|
|
37
|
+
const r = f.series.push(
|
|
38
|
+
N.new(e, {
|
|
39
|
+
valueField: o[0].dataFieldName,
|
|
40
40
|
categoryField: t[0].value
|
|
41
41
|
})
|
|
42
42
|
);
|
|
43
|
-
|
|
43
|
+
r.set("colors", b(e, u));
|
|
44
|
+
const h = "{category}: {valuePercentTotal.formatNumber('0.00')}% ({value})";
|
|
45
|
+
r.slices.template.set("tooltipText", h), r.labels.template.set("text", h), t[0].type === "date" && i.forEach((Y) => {
|
|
44
46
|
let c = "YYYY";
|
|
45
|
-
t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"),
|
|
47
|
+
t[0].value.includes("month") ? c = "MMM YYYY" : t[0].value.includes("day") && (c = "DD MMM YYYY"), Y[t[0].value] = L(Y[t[0].value]).format(
|
|
46
48
|
c
|
|
47
49
|
);
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
centerX:
|
|
51
|
-
x:
|
|
50
|
+
}), r.data.setAll(i), f.children.push(
|
|
51
|
+
j.new(e, {
|
|
52
|
+
centerX: v(50),
|
|
53
|
+
x: v(50),
|
|
52
54
|
marginTop: 15,
|
|
53
55
|
marginBottom: 15
|
|
54
56
|
})
|
|
55
|
-
).data.setAll(
|
|
56
|
-
},
|
|
57
|
+
).data.setAll(r.dataItems), r.appear(1e3, 100);
|
|
58
|
+
}, T), () => {
|
|
57
59
|
var e;
|
|
58
|
-
|
|
60
|
+
n && clearTimeout(n), (e = l.current) == null || e.dispose(), l.current = null;
|
|
59
61
|
};
|
|
60
|
-
}, [i, t,
|
|
61
|
-
const
|
|
62
|
-
return { chartId:
|
|
62
|
+
}, [i, t, o, a.palette.mode, u]);
|
|
63
|
+
const P = { ...p };
|
|
64
|
+
return { chartId: d, ownerState: P, sx: x, error: s, other: M };
|
|
63
65
|
};
|
|
64
66
|
export {
|
|
65
|
-
|
|
67
|
+
K as usePieChartLogic
|
|
66
68
|
};
|