@hybridcore/ui 1.6.9 → 1.6.11
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 → AnimatedTheme-D3VZKKNV.js} +6 -6
- package/dist/{AxisRenderer-lUbezuh7.js → AxisRenderer-Doyw-FTI.js} +6 -6
- package/dist/{AxisRendererY-DbSiyb45.js → AxisRendererY-BylCU67e.js} +3 -3
- package/dist/{Bullet-PgoNb3Jv.js → Bullet-C6357hTv.js} +1 -1
- package/dist/{Button-XBf4Mwz-.js → Button-DGOT8RcT.js} +3 -3
- package/dist/{CategoryAxis-B8KQp1pE.js → CategoryAxis-B5uTZjhL.js} +3 -3
- package/dist/{Circle-BWRdiMpG.js → Circle-DhzVdFBd.js} +1 -1
- package/dist/{ColorSet-DDmFoKtZ.js → ColorSet-DGLMpbL3.js} +1 -1
- package/dist/{ColumnSeries-rgnGm-Bg.js → ColumnSeries-CqJ-563p.js} +28 -28
- package/dist/{DataProcessor-CvIe9BVn.js → DataProcessor-WXzhvIg6.js} +1 -1
- package/dist/{DateAxis-zNtbSVjW.js → DateAxis-lJZjbAS-.js} +4 -4
- package/dist/{Entity-CCUIdRAr.js → Entity-4Lr2piVN.js} +66 -66
- package/dist/GaplessDateAxis-DowssQ6y.js +296 -0
- package/dist/{Hierarchy-CCvGsF1A.js → Hierarchy-DPEcTr0v.js} +8 -8
- package/dist/{Legend-kbCFjJAW.js → Legend-CTb6rZz_.js} +4 -4
- package/dist/{LineSeries-BLFvwrLT.js → LineSeries-Dg1aytHA.js} +4 -4
- package/dist/{LinearGradient-C7rnipF7.js → LinearGradient-D1hzMjaW.js} +2 -2
- package/dist/{PieSeries-3iLRbqFv.js → PieSeries-C9YUWMnA.js} +8 -8
- package/dist/{RoundedRectangle-CqMMmPM0.js → RoundedRectangle-B23Oh_r6.js} +2 -2
- package/dist/{Scrollbar-BzSBcIUt.js → Scrollbar-CSoXoZSe.js} +4 -4
- package/dist/{Slice-CS23iLiS.js → Slice-CIP7Vmzu.js} +11 -11
- package/dist/{Tick-BADQ8QeT.js → Tick-CRu6rQQy.js} +2 -2
- package/dist/{Tooltip-A_HlttXp.js → Tooltip-RhAldW7s.js} +13 -13
- package/dist/{XYCursor-gHAo40xC.js → XYCursor-Z-Ral42q.js} +3 -3
- package/dist/{ZoomableContainer-Brs1wHM1.js → ZoomableContainer-D1laxHnA.js} +4 -4
- package/dist/components/charts/_common/tooltip.js +2 -2
- package/dist/components/charts/_common/utils.js +2 -2
- package/dist/components/charts/candlestick/logic.js +176 -173
- package/dist/components/charts/chart-wrapper/index.js +36 -34
- package/dist/components/charts/column-line-mix/logic.js +72 -65
- package/dist/components/charts/donut-chart/logic.js +4 -4
- package/dist/components/charts/drill-down-treemap/logic.js +5 -5
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
- package/dist/components/charts/forecast-cone/index.js +52 -0
- package/dist/components/charts/forecast-cone/logic.js +331 -0
- package/dist/components/charts/forecast-cone/styled.js +12 -0
- package/dist/components/charts/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +96 -82
- package/dist/components/charts/logaritmic-scale/logic.js +71 -64
- package/dist/components/charts/multiple-value-axes/logic.js +101 -95
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +7 -7
- package/dist/components/charts/pie-chart/logic.js +4 -4
- package/dist/components/charts/stacked-area-radar/logic.js +9 -9
- package/dist/components/charts/stacked-column-chart/logic.js +10 -10
- package/dist/components/charts/xy-chart/logic.js +74 -71
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/main.d.ts +82 -1
- package/dist/main.js +167 -165
- package/package.json +1 -1
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import { humanizeLabel as
|
|
6
|
-
import { attachCombinedAxisTooltip as
|
|
7
|
-
import { colorSetFromPalette as
|
|
8
|
-
import { c as
|
|
9
|
-
import { X as
|
|
10
|
-
import { L as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
1
|
+
import { R as j, A as q } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
|
+
import { useThemeProps as z, useTheme as U } from "@mui/material";
|
|
3
|
+
import D from "lodash";
|
|
4
|
+
import { useId as H, useRef as $, useEffect as J } from "react";
|
|
5
|
+
import { humanizeLabel as P } from "../_common/format.js";
|
|
6
|
+
import { attachCombinedAxisTooltip as K } from "../_common/tooltip.js";
|
|
7
|
+
import { colorSetFromPalette as Q, applyValueFormat as Z } from "../_common/utils.js";
|
|
8
|
+
import { c as C, a as A } from "../../../Entity-4Lr2piVN.js";
|
|
9
|
+
import { X as ee, V as te } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
10
|
+
import { L as re } from "../../../Legend-CTb6rZz_.js";
|
|
11
|
+
import { A as X, a as se } from "../../../AxisRendererY-BylCU67e.js";
|
|
12
|
+
import { C as ae } from "../../../CategoryAxis-B5uTZjhL.js";
|
|
13
|
+
import { X as ie } from "../../../XYCursor-Z-Ral42q.js";
|
|
14
|
+
import { G as oe } from "../../../GaplessDateAxis-DowssQ6y.js";
|
|
15
|
+
import { D as le } from "../../../DateAxis-lJZjbAS-.js";
|
|
16
|
+
import { L as ne } from "../../../LineSeries-Dg1aytHA.js";
|
|
17
|
+
import { D as ce } from "../../../DataProcessor-WXzhvIg6.js";
|
|
18
|
+
import { G, R as me } from "../../../Tooltip-RhAldW7s.js";
|
|
19
|
+
import { C as ue } from "../../../Circle-DhzVdFBd.js";
|
|
20
|
+
import { B as pe } from "../../../Bullet-C6357hTv.js";
|
|
21
|
+
class y extends G {
|
|
21
22
|
_beforeChanged() {
|
|
22
23
|
super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
|
|
23
24
|
}
|
|
@@ -32,43 +33,44 @@ class w extends X {
|
|
|
32
33
|
this.markDirty(), this._clear = !0;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
Object.defineProperty(
|
|
36
|
+
Object.defineProperty(y, "className", {
|
|
36
37
|
enumerable: !0,
|
|
37
38
|
configurable: !0,
|
|
38
39
|
writable: !0,
|
|
39
40
|
value: "Triangle"
|
|
40
41
|
});
|
|
41
|
-
Object.defineProperty(
|
|
42
|
+
Object.defineProperty(y, "classNames", {
|
|
42
43
|
enumerable: !0,
|
|
43
44
|
configurable: !0,
|
|
44
45
|
writable: !0,
|
|
45
|
-
value:
|
|
46
|
+
value: G.classNames.concat([y.className])
|
|
46
47
|
});
|
|
47
|
-
const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"],
|
|
48
|
-
const n =
|
|
48
|
+
const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (T) => {
|
|
49
|
+
const n = z({ props: T, name: "HCMultipleValueAxes" }), {
|
|
49
50
|
dimensions: s,
|
|
50
51
|
values: t,
|
|
51
|
-
data:
|
|
52
|
+
data: d,
|
|
52
53
|
initDelay: I = 0,
|
|
53
54
|
baseInterval: L,
|
|
54
55
|
colors: R,
|
|
56
|
+
skipEmptyDates: E = !1,
|
|
55
57
|
sx: Y,
|
|
56
58
|
...V
|
|
57
|
-
} = n, u =
|
|
59
|
+
} = n, u = U(), _ = `hc-multiple-value-axes-${H().replace(/:/g, "")}`, w = $(null);
|
|
58
60
|
let h = null;
|
|
59
|
-
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"),
|
|
61
|
+
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), J(() => {
|
|
60
62
|
if (h) return;
|
|
61
63
|
let b;
|
|
62
64
|
return b = setTimeout(() => {
|
|
63
|
-
var
|
|
64
|
-
const e =
|
|
65
|
-
|
|
66
|
-
text:
|
|
67
|
-
grid:
|
|
68
|
-
stroke:
|
|
65
|
+
var F;
|
|
66
|
+
const e = j.new(_);
|
|
67
|
+
w.current = e, e.setThemes([q.new(e)]), e.interfaceColors.setAll({
|
|
68
|
+
text: C(u.palette.text.primary),
|
|
69
|
+
grid: C(u.palette.divider),
|
|
70
|
+
stroke: C(u.palette.divider)
|
|
69
71
|
});
|
|
70
72
|
const r = e.container.children.push(
|
|
71
|
-
|
|
73
|
+
ee.new(e, {
|
|
72
74
|
panX: !1,
|
|
73
75
|
panY: !1,
|
|
74
76
|
wheelX: "none",
|
|
@@ -77,89 +79,93 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Fe = (D) => {
|
|
|
77
79
|
layout: e.verticalLayout
|
|
78
80
|
})
|
|
79
81
|
);
|
|
80
|
-
r.set("colors",
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
),
|
|
84
|
-
let c,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
82
|
+
r.set("colors", Q(e, R)), r.get("colors", {}).set("step", 3);
|
|
83
|
+
const O = r.children.push(
|
|
84
|
+
re.new(e, { centerX: A, x: A })
|
|
85
|
+
), o = s[0];
|
|
86
|
+
let c, p = d;
|
|
87
|
+
if (o.type === "date") {
|
|
88
|
+
const a = E ? oe : le;
|
|
89
|
+
c = r.xAxes.push(
|
|
90
|
+
a.new(e, {
|
|
91
|
+
maxDeviation: 0.1,
|
|
92
|
+
groupData: !1,
|
|
93
|
+
baseInterval: L || { timeUnit: "day", count: 1 },
|
|
94
|
+
renderer: X.new(e, {})
|
|
95
|
+
})
|
|
96
|
+
), p = D.orderBy(d, [o.value]);
|
|
97
|
+
} else
|
|
98
|
+
c = r.xAxes.push(
|
|
99
|
+
ae.new(e, {
|
|
100
|
+
categoryField: o.value,
|
|
101
|
+
renderer: X.new(e, {})
|
|
102
|
+
})
|
|
103
|
+
), e.numberFormatter.setAll({
|
|
104
|
+
numberFormat: "#",
|
|
105
|
+
numericFields: ["valueX"]
|
|
106
|
+
}), p = D.orderBy(d, [o.value]), c.data.setAll(p);
|
|
107
|
+
function N(a, l, m, S, W, k, M) {
|
|
108
|
+
const f = se.new(e, { opposite: W }), v = r.yAxes.push(
|
|
109
|
+
te.new(e, { maxDeviation: 1, renderer: f })
|
|
104
110
|
);
|
|
105
|
-
r.yAxes.indexOf(
|
|
106
|
-
const
|
|
107
|
-
|
|
111
|
+
r.yAxes.indexOf(v) > 0 && v.set("syncWithAxis", r.yAxes.getIndex(0));
|
|
112
|
+
const i = r.series.push(
|
|
113
|
+
ne.new(e, {
|
|
108
114
|
name: l,
|
|
109
115
|
xAxis: c,
|
|
110
|
-
yAxis:
|
|
111
|
-
valueYField:
|
|
112
|
-
...
|
|
116
|
+
yAxis: v,
|
|
117
|
+
valueYField: S,
|
|
118
|
+
...o.type === "date" ? { valueXField: m } : { categoryXField: m }
|
|
113
119
|
})
|
|
114
120
|
);
|
|
115
|
-
|
|
116
|
-
stroke:
|
|
121
|
+
i.strokes.template.setAll({ strokeWidth: 2 }), f.grid.template.set("strokeOpacity", 0.05), f.labels.template.set("fill", i.get("fill")), f.setAll({
|
|
122
|
+
stroke: i.get("fill"),
|
|
117
123
|
strokeOpacity: 1,
|
|
118
124
|
opacity: 1
|
|
119
|
-
}),
|
|
125
|
+
}), M === "date" && (i.data.processor = ce.new(e, {
|
|
120
126
|
dateFormat: "i",
|
|
121
127
|
dateFields: [m]
|
|
122
|
-
})),
|
|
128
|
+
})), k !== void 0 && i.bullets.push(function() {
|
|
123
129
|
let g;
|
|
124
|
-
return
|
|
130
|
+
return k === "RECTANGLE" ? g = me.new(e, {
|
|
125
131
|
width: 10,
|
|
126
132
|
height: 10,
|
|
127
133
|
centerX: A,
|
|
128
134
|
centerY: A,
|
|
129
135
|
strokeWidth: 2,
|
|
130
|
-
stroke:
|
|
136
|
+
stroke: i.get("stroke"),
|
|
131
137
|
fill: e.interfaceColors.get("background")
|
|
132
|
-
}) :
|
|
138
|
+
}) : k === "TRIANGLE" ? g = y.new(e, {
|
|
133
139
|
width: 10,
|
|
134
140
|
height: 10,
|
|
135
141
|
strokeWidth: 2,
|
|
136
|
-
stroke:
|
|
142
|
+
stroke: i.get("stroke"),
|
|
137
143
|
fill: e.interfaceColors.get("background")
|
|
138
|
-
}) : g =
|
|
144
|
+
}) : g = ue.new(e, {
|
|
139
145
|
strokeWidth: 2,
|
|
140
146
|
radius: 4,
|
|
141
|
-
stroke:
|
|
147
|
+
stroke: i.get("stroke"),
|
|
142
148
|
fill: e.interfaceColors.get("background")
|
|
143
|
-
}),
|
|
144
|
-
}),
|
|
149
|
+
}), pe.new(e, { sprite: g });
|
|
150
|
+
}), i.data.setAll(a);
|
|
145
151
|
}
|
|
146
152
|
if (r.set(
|
|
147
153
|
"cursor",
|
|
148
154
|
ie.new(e, { xAxis: c, behavior: "none" })
|
|
149
|
-
).lineY.set("visible", !1),
|
|
155
|
+
).lineY.set("visible", !1), K({
|
|
150
156
|
root: e,
|
|
151
157
|
chart: r,
|
|
152
158
|
xAxis: c,
|
|
153
159
|
theme: u,
|
|
154
|
-
isDateAxis:
|
|
160
|
+
isDateAxis: o.type === "date",
|
|
155
161
|
baseInterval: L,
|
|
156
162
|
follow: !0
|
|
157
163
|
}), s.length > 1) {
|
|
158
|
-
const
|
|
159
|
-
Object.keys(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
const a = D.groupBy(p, s[1].value);
|
|
165
|
+
Object.keys(a).forEach((l, m) => {
|
|
166
|
+
N(
|
|
167
|
+
a[l],
|
|
168
|
+
P(l),
|
|
163
169
|
s[0].value,
|
|
164
170
|
t[0].dataFieldName,
|
|
165
171
|
m !== 0,
|
|
@@ -167,26 +173,26 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Fe = (D) => {
|
|
|
167
173
|
);
|
|
168
174
|
});
|
|
169
175
|
} else
|
|
170
|
-
t.forEach((
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
t.forEach((a, l) => {
|
|
177
|
+
N(
|
|
178
|
+
p,
|
|
179
|
+
a.label ?? P(a.name),
|
|
180
|
+
o.value,
|
|
181
|
+
a.dataFieldName,
|
|
176
182
|
l !== 0,
|
|
177
183
|
x[l % x.length],
|
|
178
|
-
|
|
184
|
+
o.type
|
|
179
185
|
);
|
|
180
186
|
});
|
|
181
|
-
|
|
187
|
+
O.data.setAll(r.series.values), Z(e, (F = t == null ? void 0 : t[0]) == null ? void 0 : F.format), r.appear(1e3, 100);
|
|
182
188
|
}, I), () => {
|
|
183
189
|
var e;
|
|
184
|
-
b && clearTimeout(b), (e =
|
|
190
|
+
b && clearTimeout(b), (e = w.current) == null || e.dispose(), w.current = null;
|
|
185
191
|
};
|
|
186
|
-
}, [
|
|
192
|
+
}, [d, s, t, u.palette.mode, R, E]);
|
|
187
193
|
const B = { ...n };
|
|
188
194
|
return { chartId: _, ownerState: B, sx: Y, error: h, other: V };
|
|
189
195
|
};
|
|
190
196
|
export {
|
|
191
|
-
|
|
197
|
+
Ge as useMultipleValueAxesLogic
|
|
192
198
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as S, A as E } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as S, A as E } from "../../../AnimatedTheme-D3VZKKNV.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 "../../../Entity-
|
|
8
|
-
import { P as V, a as N } from "../../../PieSeries-
|
|
7
|
+
import { c as n, p as o } from "../../../Entity-4Lr2piVN.js";
|
|
8
|
+
import { P as V, a as N } from "../../../PieSeries-C9YUWMnA.js";
|
|
9
9
|
const Z = (b) => {
|
|
10
10
|
const g = L({ props: b, name: "HCNestedPie" }), {
|
|
11
11
|
dimensions: a,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { R as X, A as I } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as X, A as I } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
2
|
import { useThemeProps as ee } from "@mui/material";
|
|
3
3
|
import te from "dayjs";
|
|
4
4
|
import { useId as re, useRef as ne, useEffect as ie } from "react";
|
|
5
5
|
import { applyValueFormat as se, colorSetFromPalette as oe } from "../_common/utils.js";
|
|
6
|
-
import { Z as U } from "../../../ZoomableContainer-
|
|
7
|
-
import { M as ae, m as ue, e as le, b as q } from "../../../Entity-
|
|
8
|
-
import { C as $, G as A, a as ce, b as he } from "../../../Tooltip-
|
|
9
|
-
import { B as O } from "../../../Button-
|
|
10
|
-
import { H as J } from "../../../Hierarchy-
|
|
11
|
-
import { C as fe } from "../../../Circle-
|
|
6
|
+
import { Z as U } from "../../../ZoomableContainer-D1laxHnA.js";
|
|
7
|
+
import { M as ae, m as ue, e as le, b as q } from "../../../Entity-4Lr2piVN.js";
|
|
8
|
+
import { C as $, G as A, a as ce, b as he } from "../../../Tooltip-RhAldW7s.js";
|
|
9
|
+
import { B as O } from "../../../Button-DGOT8RcT.js";
|
|
10
|
+
import { H as J } from "../../../Hierarchy-DPEcTr0v.js";
|
|
11
|
+
import { C as fe } from "../../../Circle-DhzVdFBd.js";
|
|
12
12
|
import { o as de, c as z, a as me } from "../../../constant-BiOGvlZc.js";
|
|
13
13
|
class j extends $ {
|
|
14
14
|
constructor() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as w, A } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as w, A } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
2
|
import { useThemeProps as C, useTheme as F } from "@mui/material";
|
|
3
3
|
import L from "dayjs";
|
|
4
4
|
import { useId as R, useRef as D, useEffect as I } from "react";
|
|
5
5
|
import { applyValueFormat as S, colorSetFromPalette as b } from "../_common/utils.js";
|
|
6
|
-
import { P as E, a as N } from "../../../PieSeries-
|
|
7
|
-
import { c as m, p as v } from "../../../Entity-
|
|
8
|
-
import { L as j } from "../../../Legend-
|
|
6
|
+
import { P as E, a as N } from "../../../PieSeries-C9YUWMnA.js";
|
|
7
|
+
import { c as m, p as v } from "../../../Entity-4Lr2piVN.js";
|
|
8
|
+
import { L as j } from "../../../Legend-CTb6rZz_.js";
|
|
9
9
|
const K = (y) => {
|
|
10
10
|
const p = C({ props: y, name: "HCPieChart" }), {
|
|
11
11
|
dimensions: t,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as me, s as ae, R as Ae, A as pe } from "../../../AnimatedTheme-
|
|
1
|
+
import { T as me, s as ae, R as Ae, A as pe } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
2
|
import { useThemeProps as xe, useTheme as ve } from "@mui/material";
|
|
3
3
|
import ye from "dayjs";
|
|
4
4
|
import U from "lodash";
|
|
@@ -6,14 +6,14 @@ 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
8
|
import { applyValueFormat as Te, colorSetFromPalette as Ce } from "../_common/utils.js";
|
|
9
|
-
import { m as M,
|
|
10
|
-
import { a as E, X as ue, V as Me } from "../../../AxisRenderer-
|
|
11
|
-
import { a as W, b as q, h as c, c as h, s as g, C as De, G as $, g as re, m as Ye, n as D, D as L, f as ne, i as le } from "../../../Tooltip-
|
|
12
|
-
import { R as de, S as Ne, a as I } from "../../../Slice-
|
|
13
|
-
import { X as he } from "../../../XYCursor-
|
|
14
|
-
import { C as oe } from "../../../CategoryAxis-
|
|
15
|
-
import { L as ge } from "../../../LineSeries-
|
|
16
|
-
import { L as Oe } from "../../../Legend-
|
|
9
|
+
import { m as M, z as R, b as J, f as m, p as w, a as N, P as Le, c as Y } from "../../../Entity-4Lr2piVN.js";
|
|
10
|
+
import { a as E, X as ue, V as Me } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
11
|
+
import { a as W, b as q, h as c, c as h, s as g, C as De, G as $, g as re, m as Ye, n as D, D as L, f as ne, i as le } from "../../../Tooltip-RhAldW7s.js";
|
|
12
|
+
import { R as de, S as Ne, a as I } from "../../../Slice-CIP7Vmzu.js";
|
|
13
|
+
import { X as he } from "../../../XYCursor-Z-Ral42q.js";
|
|
14
|
+
import { C as oe } from "../../../CategoryAxis-B5uTZjhL.js";
|
|
15
|
+
import { L as ge } from "../../../LineSeries-Dg1aytHA.js";
|
|
16
|
+
import { L as Oe } from "../../../Legend-CTb6rZz_.js";
|
|
17
17
|
class O extends de {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), Object.defineProperty(this, "_tickPoints", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as V, A as q } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as V, A as q } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
2
|
import { useThemeProps as I, useTheme as N } from "@mui/material";
|
|
3
3
|
import P from "dayjs";
|
|
4
4
|
import v from "lodash";
|
|
@@ -6,15 +6,15 @@ import { useId as z, useRef as H, useEffect as _ } from "react";
|
|
|
6
6
|
import { humanizeLabel as $ } from "../_common/format.js";
|
|
7
7
|
import { attachCombinedAxisTooltip as G } from "../_common/tooltip.js";
|
|
8
8
|
import { applyValueFormat as J, colorSetFromPalette as K } from "../_common/utils.js";
|
|
9
|
-
import { c as p, a as h, p as Q } from "../../../Entity-
|
|
10
|
-
import { X as W, V as Z } from "../../../AxisRenderer-
|
|
11
|
-
import { A as ee, a as te } from "../../../AxisRendererY-
|
|
12
|
-
import { C as D } from "../../../CategoryAxis-
|
|
13
|
-
import { L as re } from "../../../Legend-
|
|
14
|
-
import { X as oe } from "../../../XYCursor-
|
|
15
|
-
import { C as ae } from "../../../ColumnSeries-
|
|
16
|
-
import { B as se } from "../../../Bullet-
|
|
17
|
-
import { L as ne } from "../../../Tooltip-
|
|
9
|
+
import { c as p, a as h, p as Q } from "../../../Entity-4Lr2piVN.js";
|
|
10
|
+
import { X as W, V as Z } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
11
|
+
import { A as ee, a as te } from "../../../AxisRendererY-BylCU67e.js";
|
|
12
|
+
import { C as D } from "../../../CategoryAxis-B5uTZjhL.js";
|
|
13
|
+
import { L as re } from "../../../Legend-CTb6rZz_.js";
|
|
14
|
+
import { X as oe } from "../../../XYCursor-Z-Ral42q.js";
|
|
15
|
+
import { C as ae } from "../../../ColumnSeries-CqJ-563p.js";
|
|
16
|
+
import { B as se } from "../../../Bullet-C6357hTv.js";
|
|
17
|
+
import { L as ne } from "../../../Tooltip-RhAldW7s.js";
|
|
18
18
|
const Xe = (L) => {
|
|
19
19
|
const C = I({
|
|
20
20
|
props: L,
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { R as P, A as V } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as P, A as V } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
2
|
import { useThemeProps as W, useTheme as z } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import { humanizeLabel as
|
|
6
|
-
import { attachCombinedAxisTooltip as
|
|
7
|
-
import { colorSetFromPalette as
|
|
8
|
-
import { c, a as x, p as
|
|
9
|
-
import { X as
|
|
10
|
-
import { L as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import k from "lodash";
|
|
4
|
+
import { useId as N, useRef as j, useEffect as H } from "react";
|
|
5
|
+
import { humanizeLabel as F } from "../_common/format.js";
|
|
6
|
+
import { attachCombinedAxisTooltip as M } from "../_common/tooltip.js";
|
|
7
|
+
import { colorSetFromPalette as U, applyValueFormat as _ } from "../_common/utils.js";
|
|
8
|
+
import { c as m, a as x, p as $ } from "../../../Entity-4Lr2piVN.js";
|
|
9
|
+
import { X as q, V as J } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
10
|
+
import { L as K } from "../../../Legend-CTb6rZz_.js";
|
|
11
|
+
import { A as L, a as Q } from "../../../AxisRendererY-BylCU67e.js";
|
|
12
|
+
import { C as Z } from "../../../CategoryAxis-B5uTZjhL.js";
|
|
13
|
+
import { T as ee, R as te, L as re } from "../../../Tooltip-RhAldW7s.js";
|
|
14
|
+
import { X as oe } from "../../../XYCursor-Z-Ral42q.js";
|
|
15
|
+
import { G as ae } from "../../../GaplessDateAxis-DowssQ6y.js";
|
|
16
|
+
import { D as se } from "../../../DateAxis-lJZjbAS-.js";
|
|
17
|
+
import { C as ie } from "../../../ColumnSeries-CqJ-563p.js";
|
|
18
|
+
import { D as ne } from "../../../DataProcessor-WXzhvIg6.js";
|
|
19
|
+
import { B as le } from "../../../Bullet-C6357hTv.js";
|
|
20
|
+
const Le = (R) => {
|
|
21
|
+
const A = W({ props: R, name: "HCXYChart" }), {
|
|
22
|
+
dimensions: p,
|
|
22
23
|
values: n,
|
|
23
24
|
data: d,
|
|
24
|
-
initDelay:
|
|
25
|
-
baseInterval:
|
|
25
|
+
initDelay: O = 0,
|
|
26
|
+
baseInterval: y,
|
|
26
27
|
colors: g,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
skipEmptyDates: w = !1,
|
|
29
|
+
sx: B,
|
|
30
|
+
...E
|
|
31
|
+
} = A, i = z(), b = `hc-xy-chart-${N().replace(/:/g, "")}`, u = j(null), v = p.length < 1 ? "Missing dimensions config!" : null;
|
|
32
|
+
H(() => {
|
|
33
|
+
if (v) return;
|
|
32
34
|
let f;
|
|
33
35
|
return f = setTimeout(() => {
|
|
34
|
-
var T,
|
|
35
|
-
const e = P.new(
|
|
36
|
+
var T, X, Y;
|
|
37
|
+
const e = P.new(b);
|
|
36
38
|
u.current = e, e.setThemes([V.new(e)]), e.interfaceColors.setAll({
|
|
37
|
-
text:
|
|
38
|
-
grid:
|
|
39
|
-
stroke:
|
|
39
|
+
text: m(i.palette.text.primary),
|
|
40
|
+
grid: m(i.palette.divider),
|
|
41
|
+
stroke: m(i.palette.divider)
|
|
40
42
|
});
|
|
41
43
|
const r = e.container.children.push(
|
|
42
|
-
|
|
44
|
+
q.new(e, {
|
|
43
45
|
panX: !1,
|
|
44
46
|
panY: !1,
|
|
45
47
|
wheelX: "none",
|
|
@@ -49,24 +51,25 @@ const Ye = (L) => {
|
|
|
49
51
|
layout: e.verticalLayout
|
|
50
52
|
})
|
|
51
53
|
);
|
|
52
|
-
r.set("colors",
|
|
53
|
-
const
|
|
54
|
-
|
|
54
|
+
r.set("colors", U(e, g));
|
|
55
|
+
const G = r.children.push(
|
|
56
|
+
K.new(e, {
|
|
55
57
|
centerX: x,
|
|
56
58
|
x
|
|
57
59
|
})
|
|
58
|
-
), a =
|
|
59
|
-
let o,
|
|
60
|
-
if (a.type === "date")
|
|
60
|
+
), a = p[0];
|
|
61
|
+
let o, c = d;
|
|
62
|
+
if (a.type === "date") {
|
|
63
|
+
const t = w ? ae : se;
|
|
61
64
|
o = r.xAxes.push(
|
|
62
|
-
|
|
65
|
+
t.new(e, {
|
|
63
66
|
maxDeviation: 0,
|
|
64
|
-
baseInterval:
|
|
65
|
-
renderer:
|
|
67
|
+
baseInterval: y || { timeUnit: "day", count: 1 },
|
|
68
|
+
renderer: L.new(e, { minGridDistance: 60 })
|
|
66
69
|
})
|
|
67
|
-
),
|
|
68
|
-
else {
|
|
69
|
-
const t =
|
|
70
|
+
), c = k.orderBy(d, [a.value]);
|
|
71
|
+
} else {
|
|
72
|
+
const t = L.new(e, {
|
|
70
73
|
cellStartLocation: 0.1,
|
|
71
74
|
cellEndLocation: 0.9,
|
|
72
75
|
minGridDistance: 30
|
|
@@ -87,7 +90,7 @@ const Ye = (L) => {
|
|
|
87
90
|
s.set(
|
|
88
91
|
"background",
|
|
89
92
|
te.new(e, {
|
|
90
|
-
fill:
|
|
93
|
+
fill: m(0),
|
|
91
94
|
fillOpacity: 0
|
|
92
95
|
})
|
|
93
96
|
);
|
|
@@ -96,38 +99,38 @@ const Ye = (L) => {
|
|
|
96
99
|
}), e.numberFormatter.setAll({
|
|
97
100
|
numberFormat: "#",
|
|
98
101
|
numericFields: ["valueX"]
|
|
99
|
-
}), o.data.setAll(
|
|
102
|
+
}), o.data.setAll(c);
|
|
100
103
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
104
|
+
const D = r.yAxes.push(
|
|
105
|
+
J.new(e, {
|
|
103
106
|
renderer: Q.new(e, { strokeOpacity: 0.1 })
|
|
104
107
|
})
|
|
105
108
|
);
|
|
106
109
|
(T = o.get("renderer")) == null || T.grid.template.setAll({
|
|
107
|
-
stroke:
|
|
110
|
+
stroke: m(i.palette.divider),
|
|
108
111
|
strokeOpacity: 1
|
|
109
|
-
}), (
|
|
110
|
-
stroke:
|
|
112
|
+
}), (X = D.get("renderer")) == null || X.grid.template.setAll({
|
|
113
|
+
stroke: m(i.palette.divider),
|
|
111
114
|
strokeOpacity: 1
|
|
112
115
|
});
|
|
113
116
|
function C(t, s, h, I) {
|
|
114
117
|
const l = r.series.push(
|
|
115
|
-
|
|
118
|
+
ie.new(e, {
|
|
116
119
|
name: t,
|
|
117
120
|
xAxis: o,
|
|
118
|
-
yAxis:
|
|
121
|
+
yAxis: D,
|
|
119
122
|
valueYField: I,
|
|
120
123
|
...a.type === "date" ? { valueXField: h } : { categoryXField: h }
|
|
121
124
|
})
|
|
122
125
|
);
|
|
123
126
|
l.columns.template.setAll({
|
|
124
|
-
width:
|
|
127
|
+
width: $(90),
|
|
125
128
|
strokeOpacity: 0
|
|
126
|
-
}), a.type === "date" && (l.data.processor =
|
|
129
|
+
}), a.type === "date" && (l.data.processor = ne.new(e, {
|
|
127
130
|
dateFormat: "i",
|
|
128
131
|
dateFields: [h]
|
|
129
132
|
})), l.data.setAll(s), l.appear(), l.bullets.push(function() {
|
|
130
|
-
return
|
|
133
|
+
return le.new(e, {
|
|
131
134
|
locationY: 0,
|
|
132
135
|
sprite: re.new(e, {
|
|
133
136
|
text: "{valueY}",
|
|
@@ -137,22 +140,22 @@ const Ye = (L) => {
|
|
|
137
140
|
populateText: !0
|
|
138
141
|
})
|
|
139
142
|
});
|
|
140
|
-
}),
|
|
143
|
+
}), G.data.push(l);
|
|
141
144
|
}
|
|
142
|
-
if (
|
|
145
|
+
if (p.length === 1)
|
|
143
146
|
n.forEach((t) => {
|
|
144
147
|
C(
|
|
145
|
-
t.label ??
|
|
146
|
-
|
|
148
|
+
t.label ?? F(t.name),
|
|
149
|
+
c,
|
|
147
150
|
a.value,
|
|
148
151
|
t.dataFieldName
|
|
149
152
|
);
|
|
150
153
|
});
|
|
151
154
|
else {
|
|
152
|
-
const t =
|
|
155
|
+
const t = k.groupBy(c, p[1].value);
|
|
153
156
|
Object.keys(t).forEach((s) => {
|
|
154
157
|
C(
|
|
155
|
-
|
|
158
|
+
F(s),
|
|
156
159
|
t[s],
|
|
157
160
|
a.value,
|
|
158
161
|
n[0].dataFieldName
|
|
@@ -162,23 +165,23 @@ const Ye = (L) => {
|
|
|
162
165
|
r.set(
|
|
163
166
|
"cursor",
|
|
164
167
|
oe.new(e, { xAxis: o, behavior: "none" })
|
|
165
|
-
).lineY.set("visible", !1),
|
|
168
|
+
).lineY.set("visible", !1), M({
|
|
166
169
|
root: e,
|
|
167
170
|
chart: r,
|
|
168
171
|
xAxis: o,
|
|
169
172
|
theme: i,
|
|
170
173
|
isDateAxis: a.type === "date",
|
|
171
|
-
baseInterval:
|
|
174
|
+
baseInterval: y,
|
|
172
175
|
follow: !0
|
|
173
|
-
}),
|
|
174
|
-
},
|
|
176
|
+
}), _(e, (Y = n == null ? void 0 : n[0]) == null ? void 0 : Y.format), r.appear(1e3, 100);
|
|
177
|
+
}, O), () => {
|
|
175
178
|
var e;
|
|
176
179
|
f && clearTimeout(f), (e = u.current) == null || e.dispose(), u.current = null;
|
|
177
180
|
};
|
|
178
|
-
}, [d,
|
|
179
|
-
const S = { ...
|
|
180
|
-
return { chartId:
|
|
181
|
+
}, [d, p, n, i.palette.mode, g, w]);
|
|
182
|
+
const S = { ...A };
|
|
183
|
+
return { chartId: b, ownerState: S, sx: B, error: v, other: E };
|
|
181
184
|
};
|
|
182
185
|
export {
|
|
183
|
-
|
|
186
|
+
Le as useXYChartLogic
|
|
184
187
|
};
|