@hybridcore/ui 1.6.9 → 1.6.10
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-ktdO3Bel.js} +2 -2
- package/dist/{AxisRenderer-lUbezuh7.js → AxisRenderer-BCQoUJw6.js} +6 -6
- package/dist/{AxisRendererY-DbSiyb45.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-PgoNb3Jv.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-XBf4Mwz-.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-B8KQp1pE.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-BWRdiMpG.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/{ColorSet-DDmFoKtZ.js → ColorSet-cyPmWGwh.js} +1 -1
- package/dist/{ColumnSeries-rgnGm-Bg.js → ColumnSeries-CtRTsn-E.js} +4 -4
- package/dist/{DateAxis-zNtbSVjW.js → DateAxis-DEXKps1S.js} +4 -4
- package/dist/{Entity-CCUIdRAr.js → Entity-BJCuhdq_.js} +62 -62
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-CCvGsF1A.js → Hierarchy-CEOK8Gzh.js} +8 -8
- package/dist/{Legend-kbCFjJAW.js → Legend-CFvQiIfn.js} +4 -4
- package/dist/{LineSeries-BLFvwrLT.js → LineSeries-D_IL2qGF.js} +4 -4
- package/dist/{LinearGradient-C7rnipF7.js → LinearGradient-CxQyCSEB.js} +2 -2
- package/dist/{PieSeries-3iLRbqFv.js → PieSeries-CMH0Z7pz.js} +6 -6
- package/dist/{RoundedRectangle-CqMMmPM0.js → RoundedRectangle-BKLX1LKM.js} +2 -2
- package/dist/{Scrollbar-BzSBcIUt.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-CS23iLiS.js → Slice-BUncQh1B.js} +2 -2
- package/dist/{Tick-BADQ8QeT.js → Tick--VhF0xlz.js} +2 -2
- package/dist/{Tooltip-A_HlttXp.js → Tooltip-vyZRZWih.js} +13 -13
- package/dist/{XYCursor-gHAo40xC.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-Brs1wHM1.js → ZoomableContainer-Ca_pDVYQ.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 +175 -173
- package/dist/components/charts/column-line-mix/logic.js +89 -83
- 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/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +99 -86
- package/dist/components/charts/logaritmic-scale/logic.js +78 -72
- package/dist/components/charts/multiple-value-axes/logic.js +100 -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 +66 -64
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/main.d.ts +13 -0
- package/package.json +1 -1
- package/dist/DataProcessor-CvIe9BVn.js +0 -83
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { R as P, A as V } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as P, A as V } from "../../../AnimatedTheme-ktdO3Bel.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 { B as
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
dimensions:
|
|
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, a as x, p as $ } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
+
import { X as q, V as J } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { L as K } from "../../../Legend-CFvQiIfn.js";
|
|
11
|
+
import { A as L, a as Q } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
12
|
+
import { C as Z } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
|
+
import { T as ee, R as te, L as re } from "../../../Tooltip-vyZRZWih.js";
|
|
14
|
+
import { X as oe } from "../../../XYCursor-CVUSpqb9.js";
|
|
15
|
+
import { G as ae, D as se } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
16
|
+
import { D as ie } from "../../../DateAxis-DEXKps1S.js";
|
|
17
|
+
import { C as ne } from "../../../ColumnSeries-CtRTsn-E.js";
|
|
18
|
+
import { B as le } from "../../../Bullet-Djj7Vs9T.js";
|
|
19
|
+
const Fe = (R) => {
|
|
20
|
+
const A = W({ props: R, name: "HCXYChart" }), {
|
|
21
|
+
dimensions: p,
|
|
22
22
|
values: n,
|
|
23
23
|
data: d,
|
|
24
|
-
initDelay:
|
|
25
|
-
baseInterval:
|
|
24
|
+
initDelay: O = 0,
|
|
25
|
+
baseInterval: y,
|
|
26
26
|
colors: g,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
skipEmptyDates: w = !1,
|
|
28
|
+
sx: B,
|
|
29
|
+
...E
|
|
30
|
+
} = A, i = z(), b = `hc-xy-chart-${N().replace(/:/g, "")}`, u = j(null), v = p.length < 1 ? "Missing dimensions config!" : null;
|
|
31
|
+
H(() => {
|
|
32
|
+
if (v) return;
|
|
32
33
|
let f;
|
|
33
34
|
return f = setTimeout(() => {
|
|
34
|
-
var T,
|
|
35
|
-
const e = P.new(
|
|
35
|
+
var T, X, Y;
|
|
36
|
+
const e = P.new(b);
|
|
36
37
|
u.current = e, e.setThemes([V.new(e)]), e.interfaceColors.setAll({
|
|
37
38
|
text: c(i.palette.text.primary),
|
|
38
39
|
grid: c(i.palette.divider),
|
|
39
40
|
stroke: c(i.palette.divider)
|
|
40
41
|
});
|
|
41
42
|
const r = e.container.children.push(
|
|
42
|
-
|
|
43
|
+
q.new(e, {
|
|
43
44
|
panX: !1,
|
|
44
45
|
panY: !1,
|
|
45
46
|
wheelX: "none",
|
|
@@ -49,24 +50,25 @@ const Ye = (L) => {
|
|
|
49
50
|
layout: e.verticalLayout
|
|
50
51
|
})
|
|
51
52
|
);
|
|
52
|
-
r.set("colors",
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
r.set("colors", U(e, g));
|
|
54
|
+
const G = r.children.push(
|
|
55
|
+
K.new(e, {
|
|
55
56
|
centerX: x,
|
|
56
57
|
x
|
|
57
58
|
})
|
|
58
|
-
), a =
|
|
59
|
-
let o,
|
|
60
|
-
if (a.type === "date")
|
|
59
|
+
), a = p[0];
|
|
60
|
+
let o, m = d;
|
|
61
|
+
if (a.type === "date") {
|
|
62
|
+
const t = w ? ae : ie;
|
|
61
63
|
o = r.xAxes.push(
|
|
62
|
-
|
|
64
|
+
t.new(e, {
|
|
63
65
|
maxDeviation: 0,
|
|
64
|
-
baseInterval:
|
|
65
|
-
renderer:
|
|
66
|
+
baseInterval: y || { timeUnit: "day", count: 1 },
|
|
67
|
+
renderer: L.new(e, { minGridDistance: 60 })
|
|
66
68
|
})
|
|
67
|
-
),
|
|
68
|
-
else {
|
|
69
|
-
const t =
|
|
69
|
+
), m = k.orderBy(d, [a.value]);
|
|
70
|
+
} else {
|
|
71
|
+
const t = L.new(e, {
|
|
70
72
|
cellStartLocation: 0.1,
|
|
71
73
|
cellEndLocation: 0.9,
|
|
72
74
|
minGridDistance: 30
|
|
@@ -96,38 +98,38 @@ const Ye = (L) => {
|
|
|
96
98
|
}), e.numberFormatter.setAll({
|
|
97
99
|
numberFormat: "#",
|
|
98
100
|
numericFields: ["valueX"]
|
|
99
|
-
}), o.data.setAll(
|
|
101
|
+
}), o.data.setAll(m);
|
|
100
102
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
+
const D = r.yAxes.push(
|
|
104
|
+
J.new(e, {
|
|
103
105
|
renderer: Q.new(e, { strokeOpacity: 0.1 })
|
|
104
106
|
})
|
|
105
107
|
);
|
|
106
108
|
(T = o.get("renderer")) == null || T.grid.template.setAll({
|
|
107
109
|
stroke: c(i.palette.divider),
|
|
108
110
|
strokeOpacity: 1
|
|
109
|
-
}), (
|
|
111
|
+
}), (X = D.get("renderer")) == null || X.grid.template.setAll({
|
|
110
112
|
stroke: c(i.palette.divider),
|
|
111
113
|
strokeOpacity: 1
|
|
112
114
|
});
|
|
113
115
|
function C(t, s, h, I) {
|
|
114
116
|
const l = r.series.push(
|
|
115
|
-
|
|
117
|
+
ne.new(e, {
|
|
116
118
|
name: t,
|
|
117
119
|
xAxis: o,
|
|
118
|
-
yAxis:
|
|
120
|
+
yAxis: D,
|
|
119
121
|
valueYField: I,
|
|
120
122
|
...a.type === "date" ? { valueXField: h } : { categoryXField: h }
|
|
121
123
|
})
|
|
122
124
|
);
|
|
123
125
|
l.columns.template.setAll({
|
|
124
|
-
width:
|
|
126
|
+
width: $(90),
|
|
125
127
|
strokeOpacity: 0
|
|
126
128
|
}), a.type === "date" && (l.data.processor = se.new(e, {
|
|
127
129
|
dateFormat: "i",
|
|
128
130
|
dateFields: [h]
|
|
129
131
|
})), l.data.setAll(s), l.appear(), l.bullets.push(function() {
|
|
130
|
-
return
|
|
132
|
+
return le.new(e, {
|
|
131
133
|
locationY: 0,
|
|
132
134
|
sprite: re.new(e, {
|
|
133
135
|
text: "{valueY}",
|
|
@@ -137,22 +139,22 @@ const Ye = (L) => {
|
|
|
137
139
|
populateText: !0
|
|
138
140
|
})
|
|
139
141
|
});
|
|
140
|
-
}),
|
|
142
|
+
}), G.data.push(l);
|
|
141
143
|
}
|
|
142
|
-
if (
|
|
144
|
+
if (p.length === 1)
|
|
143
145
|
n.forEach((t) => {
|
|
144
146
|
C(
|
|
145
|
-
t.label ??
|
|
146
|
-
|
|
147
|
+
t.label ?? F(t.name),
|
|
148
|
+
m,
|
|
147
149
|
a.value,
|
|
148
150
|
t.dataFieldName
|
|
149
151
|
);
|
|
150
152
|
});
|
|
151
153
|
else {
|
|
152
|
-
const t =
|
|
154
|
+
const t = k.groupBy(m, p[1].value);
|
|
153
155
|
Object.keys(t).forEach((s) => {
|
|
154
156
|
C(
|
|
155
|
-
|
|
157
|
+
F(s),
|
|
156
158
|
t[s],
|
|
157
159
|
a.value,
|
|
158
160
|
n[0].dataFieldName
|
|
@@ -162,23 +164,23 @@ const Ye = (L) => {
|
|
|
162
164
|
r.set(
|
|
163
165
|
"cursor",
|
|
164
166
|
oe.new(e, { xAxis: o, behavior: "none" })
|
|
165
|
-
).lineY.set("visible", !1),
|
|
167
|
+
).lineY.set("visible", !1), M({
|
|
166
168
|
root: e,
|
|
167
169
|
chart: r,
|
|
168
170
|
xAxis: o,
|
|
169
171
|
theme: i,
|
|
170
172
|
isDateAxis: a.type === "date",
|
|
171
|
-
baseInterval:
|
|
173
|
+
baseInterval: y,
|
|
172
174
|
follow: !0
|
|
173
|
-
}),
|
|
174
|
-
},
|
|
175
|
+
}), _(e, (Y = n == null ? void 0 : n[0]) == null ? void 0 : Y.format), r.appear(1e3, 100);
|
|
176
|
+
}, O), () => {
|
|
175
177
|
var e;
|
|
176
178
|
f && clearTimeout(f), (e = u.current) == null || e.dispose(), u.current = null;
|
|
177
179
|
};
|
|
178
|
-
}, [d,
|
|
179
|
-
const S = { ...
|
|
180
|
-
return { chartId:
|
|
180
|
+
}, [d, p, n, i.palette.mode, g, w]);
|
|
181
|
+
const S = { ...A };
|
|
182
|
+
return { chartId: b, ownerState: S, sx: B, error: v, other: E };
|
|
181
183
|
};
|
|
182
184
|
export {
|
|
183
|
-
|
|
185
|
+
Fe as useXYChartLogic
|
|
184
186
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
-
import { R as u, A } from "../../AnimatedTheme-
|
|
2
|
+
import { R as u, A } from "../../AnimatedTheme-ktdO3Bel.js";
|
|
3
3
|
import { useTheme as g, alpha as v } from "@mui/material";
|
|
4
4
|
import { useRef as w, useLayoutEffect as x } from "react";
|
|
5
|
-
import { X as y, V as R } from "../../AxisRenderer-
|
|
6
|
-
import { C as L } from "../../CategoryAxis-
|
|
7
|
-
import { A as T, a as b } from "../../AxisRendererY-
|
|
8
|
-
import { T as X } from "../../Tooltip-
|
|
9
|
-
import { C } from "../../ColumnSeries-
|
|
10
|
-
import { c as a } from "../../Entity-
|
|
11
|
-
import { L as Y } from "../../LineSeries-
|
|
12
|
-
import { L as F } from "../../LinearGradient-
|
|
5
|
+
import { X as y, V as R } from "../../AxisRenderer-BCQoUJw6.js";
|
|
6
|
+
import { C as L } from "../../CategoryAxis-B6NqW8qd.js";
|
|
7
|
+
import { A as T, a as b } from "../../AxisRendererY-AXWvGU6r.js";
|
|
8
|
+
import { T as X } from "../../Tooltip-vyZRZWih.js";
|
|
9
|
+
import { C } from "../../ColumnSeries-CtRTsn-E.js";
|
|
10
|
+
import { c as a } from "../../Entity-BJCuhdq_.js";
|
|
11
|
+
import { L as Y } from "../../LineSeries-D_IL2qGF.js";
|
|
12
|
+
import { L as F } from "../../LinearGradient-CxQyCSEB.js";
|
|
13
13
|
const z = ({
|
|
14
14
|
data: o,
|
|
15
15
|
type: p,
|
package/dist/main.d.ts
CHANGED
|
@@ -144,6 +144,12 @@ export declare interface CandlestickChartProps {
|
|
|
144
144
|
loading?: boolean;
|
|
145
145
|
emptyMessage?: string;
|
|
146
146
|
seriesName?: string;
|
|
147
|
+
/**
|
|
148
|
+
* When `true`, the date axis drops intervals with no data (am5
|
|
149
|
+
* `GaplessDateAxis`) — e.g. skipping weekends/holidays so bars sit
|
|
150
|
+
* contiguously. Default `false` keeps the continuous calendar timeline.
|
|
151
|
+
*/
|
|
152
|
+
skipEmptyDates?: boolean;
|
|
147
153
|
sx?: SxProps<Theme>;
|
|
148
154
|
}
|
|
149
155
|
|
|
@@ -269,6 +275,13 @@ export declare interface ChartProps {
|
|
|
269
275
|
* charts only.
|
|
270
276
|
*/
|
|
271
277
|
connectMissingData?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* When `true`, a date axis drops intervals that have no data (uses am5's
|
|
280
|
+
* `GaplessDateAxis`), so only dates with values are shown, equidistant — e.g.
|
|
281
|
+
* skipping weekends/holidays. Default `false` keeps the continuous, real-time
|
|
282
|
+
* timeline. Date-dimension charts only.
|
|
283
|
+
*/
|
|
284
|
+
skipEmptyDates?: boolean;
|
|
272
285
|
sx?: SxProps<Theme>;
|
|
273
286
|
}
|
|
274
287
|
|
package/package.json
CHANGED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { E as c, e as h, q as a, r as l, t as o, C as u, u as n } from "./Entity-CCUIdRAr.js";
|
|
2
|
-
class p extends c {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments), Object.defineProperty(this, "_checkDates", {
|
|
5
|
-
enumerable: !0,
|
|
6
|
-
configurable: !0,
|
|
7
|
-
writable: !0,
|
|
8
|
-
value: !1
|
|
9
|
-
}), Object.defineProperty(this, "_checkNumbers", {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
configurable: !0,
|
|
12
|
-
writable: !0,
|
|
13
|
-
value: !1
|
|
14
|
-
}), Object.defineProperty(this, "_checkColors", {
|
|
15
|
-
enumerable: !0,
|
|
16
|
-
configurable: !0,
|
|
17
|
-
writable: !0,
|
|
18
|
-
value: !1
|
|
19
|
-
}), Object.defineProperty(this, "_checkEmpty", {
|
|
20
|
-
enumerable: !0,
|
|
21
|
-
configurable: !0,
|
|
22
|
-
writable: !0,
|
|
23
|
-
value: !1
|
|
24
|
-
}), Object.defineProperty(this, "_checkDeep", {
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
configurable: !0,
|
|
27
|
-
writable: !0,
|
|
28
|
-
value: !1
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
_afterNew() {
|
|
32
|
-
super._afterNew(), this._checkFeatures(), this.on("dateFields", () => this._checkFeatures()), this.on("dateFormat", () => this._checkFeatures()), this.on("numericFields", () => this._checkFeatures()), this.on("colorFields", () => this._checkFeatures()), this.on("emptyAs", () => this._checkFeatures());
|
|
33
|
-
}
|
|
34
|
-
_checkFeatures() {
|
|
35
|
-
(this.isDirty("dateFields") || this.isDirty("dateFormat")) && (this._checkDates = this.get("dateFields") && this.get("dateFields").length > 0), this.isDirty("numericFields") && (this._checkNumbers = this.get("numericFields") && this.get("numericFields").length > 0), this.isDirty("colorFields") && (this._checkColors = this.get("colorFields") && this.get("colorFields").length > 0), this.isDirty("emptyAs") && (this._checkEmpty = this.get("emptyAs") != null), this._checkDeepFeatures();
|
|
36
|
-
}
|
|
37
|
-
_checkDeepFeatures() {
|
|
38
|
-
const e = [];
|
|
39
|
-
h(["dateFields", "numericFields", "colorFields"], (t) => {
|
|
40
|
-
h(this.get(t, []), (s) => {
|
|
41
|
-
const i = s.split(".");
|
|
42
|
-
for (i.pop(); i.length > 0; )
|
|
43
|
-
e.push(i.join(".")), i.pop();
|
|
44
|
-
});
|
|
45
|
-
}), this._checkDeep = e.length > 0, this.setPrivate("deepFields", e);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Processess entire array of data.
|
|
49
|
-
*
|
|
50
|
-
* NOTE: calling this will modify original array!
|
|
51
|
-
*/
|
|
52
|
-
processMany(e) {
|
|
53
|
-
a(e) && (this._checkDates || this._checkNumbers || this._checkColors || this._checkEmpty) && h(e, (t) => {
|
|
54
|
-
this.processRow(t);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Processes a row (object) of data.
|
|
59
|
-
*
|
|
60
|
-
* NOTE: calling this will modify values of the original object!
|
|
61
|
-
*/
|
|
62
|
-
processRow(e, t = "") {
|
|
63
|
-
l(e, (s, i) => {
|
|
64
|
-
const r = t + s;
|
|
65
|
-
this._checkEmpty && (e[s] = this._maybeToEmpty(e[s])), this._checkNumbers && (e[s] = this._maybeToNumber(r, e[s])), this._checkDates && (e[s] = this._maybeToDate(r, e[s])), this._checkColors && (e[s] = this._maybeToColor(r, e[s])), this._checkDeep && this.getPrivate("deepFields", []).indexOf(r) !== -1 && n(e[s]) && this.processRow(e[s], r + ".");
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
_maybeToNumber(e, t) {
|
|
69
|
-
return this.get("numericFields").indexOf(e) !== -1 ? o(t) : t;
|
|
70
|
-
}
|
|
71
|
-
_maybeToDate(e, t) {
|
|
72
|
-
return this.get("dateFields").indexOf(e) !== -1 ? this._root.dateFormatter.parse(t, this.get("dateFormat", "")).getTime() : t;
|
|
73
|
-
}
|
|
74
|
-
_maybeToEmpty(e) {
|
|
75
|
-
return (e == null || e == "") && this.get("emptyAs") != null ? this.get("emptyAs") : e;
|
|
76
|
-
}
|
|
77
|
-
_maybeToColor(e, t) {
|
|
78
|
-
return this.get("colorFields").indexOf(e) !== -1 ? u.fromAny(t) : t;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
p as D
|
|
83
|
-
};
|