@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,41 +1,42 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as V, useRef as z, useEffect as
|
|
5
|
-
import { humanizeLabel as
|
|
1
|
+
import { R as M, A as O } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
|
+
import { useThemeProps as E, useTheme as P } from "@mui/material";
|
|
3
|
+
import C from "lodash";
|
|
4
|
+
import { useId as V, useRef as z, useEffect as G } from "react";
|
|
5
|
+
import { humanizeLabel as b } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as N } from "../_common/tooltip.js";
|
|
7
7
|
import { colorSetFromPalette as W, applyValueFormat as q } from "../_common/utils.js";
|
|
8
|
-
import { c as l, p as H, a as
|
|
9
|
-
import { X as U, V as _ } from "../../../AxisRenderer-
|
|
10
|
-
import { S as $ } from "../../../Scrollbar-
|
|
11
|
-
import { D as j } from "../../../
|
|
12
|
-
import {
|
|
13
|
-
import { C as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
const
|
|
22
|
-
const f =
|
|
8
|
+
import { c as l, p as H, a as X } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
+
import { X as U, V as _ } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { S as $ } from "../../../Scrollbar-CTI7_8Qw.js";
|
|
11
|
+
import { A as D, a as j } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
12
|
+
import { C as J } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
|
+
import { C as K } from "../../../ColumnSeries-CtRTsn-E.js";
|
|
14
|
+
import { D as L, G as Q } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
15
|
+
import { L as Z } from "../../../LineSeries-D_IL2qGF.js";
|
|
16
|
+
import { B as ee } from "../../../Bullet-Djj7Vs9T.js";
|
|
17
|
+
import { C as te } from "../../../Circle-BnfBNKBD.js";
|
|
18
|
+
import { X as re } from "../../../XYCursor-CVUSpqb9.js";
|
|
19
|
+
import { L as ae } from "../../../Legend-CFvQiIfn.js";
|
|
20
|
+
import { D as oe } from "../../../DateAxis-DEXKps1S.js";
|
|
21
|
+
const Le = (Y) => {
|
|
22
|
+
const f = E({ props: Y, name: "HCColumnLineMix" }), {
|
|
23
23
|
dimensions: t,
|
|
24
24
|
values: n,
|
|
25
25
|
data: p,
|
|
26
|
-
initDelay:
|
|
26
|
+
initDelay: S = 0,
|
|
27
27
|
baseInterval: h,
|
|
28
28
|
colors: x,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
skipEmptyDates: A = !1,
|
|
30
|
+
sx: T,
|
|
31
|
+
...R
|
|
32
|
+
} = f, s = P(), g = `hc-column-line-mix-${V().replace(/:/g, "")}`, d = z(null), y = t.length < 1 ? "ColumnLineMix requires at least 1 dimension" : null;
|
|
33
|
+
G(() => {
|
|
34
|
+
if (y) return;
|
|
34
35
|
let c;
|
|
35
36
|
return c = setTimeout(() => {
|
|
36
|
-
var
|
|
37
|
-
const e =
|
|
38
|
-
d.current = e, e.setThemes([
|
|
37
|
+
var w, v, F, k;
|
|
38
|
+
const e = M.new(g);
|
|
39
|
+
d.current = e, e.setThemes([O.new(e)]), e.interfaceColors.setAll({
|
|
39
40
|
text: l(s.palette.text.primary),
|
|
40
41
|
grid: l(s.palette.divider),
|
|
41
42
|
stroke: l(s.palette.divider)
|
|
@@ -55,78 +56,83 @@ const Xe = (D) => {
|
|
|
55
56
|
"scrollbarX",
|
|
56
57
|
$.new(e, { orientation: "horizontal" })
|
|
57
58
|
);
|
|
58
|
-
let
|
|
59
|
-
t[0].type === "date"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
59
|
+
let o, m = p;
|
|
60
|
+
if (t[0].type === "date") {
|
|
61
|
+
m = C.orderBy(p, [t[0].value]);
|
|
62
|
+
const i = A ? Q : oe;
|
|
63
|
+
o = r.xAxes.push(
|
|
64
|
+
i.new(e, {
|
|
65
|
+
maxDeviation: 0.1,
|
|
66
|
+
groupData: !1,
|
|
67
|
+
baseInterval: h || { timeUnit: "day", count: 1 },
|
|
68
|
+
renderer: D.new(e, {})
|
|
69
|
+
})
|
|
70
|
+
), (w = o.get("renderer")) == null || w.grid.template.setAll({
|
|
71
|
+
stroke: l(s.palette.divider),
|
|
72
|
+
strokeOpacity: 1
|
|
73
|
+
});
|
|
74
|
+
} else
|
|
75
|
+
o = r.xAxes.push(
|
|
76
|
+
J.new(e, {
|
|
77
|
+
categoryField: t[0].value,
|
|
78
|
+
renderer: D.new(e, {})
|
|
79
|
+
})
|
|
80
|
+
), (v = o.get("renderer")) == null || v.grid.template.setAll({
|
|
81
|
+
stroke: l(s.palette.divider),
|
|
82
|
+
strokeOpacity: 1
|
|
83
|
+
}), e.numberFormatter.setAll({
|
|
84
|
+
numberFormat: "#",
|
|
85
|
+
numericFields: ["valueX"]
|
|
86
|
+
}), m = C.orderBy(p, [t[0].value]), o.data.setAll(m);
|
|
81
87
|
const u = r.yAxes.push(
|
|
82
88
|
_.new(e, {
|
|
83
89
|
min: 0,
|
|
84
90
|
extraMax: 0.1,
|
|
85
|
-
renderer:
|
|
91
|
+
renderer: j.new(e, { strokeOpacity: 0.1 })
|
|
86
92
|
})
|
|
87
93
|
);
|
|
88
|
-
(
|
|
94
|
+
(F = u.get("renderer")) == null || F.grid.template.setAll({
|
|
89
95
|
stroke: l(s.palette.divider),
|
|
90
96
|
strokeOpacity: 1
|
|
91
|
-
}), n.forEach((i,
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
97
|
+
}), n.forEach((i, I) => {
|
|
98
|
+
if (I === 0) {
|
|
99
|
+
const a = r.series.push(
|
|
94
100
|
K.new(e, {
|
|
95
|
-
name: i.label ??
|
|
96
|
-
xAxis:
|
|
101
|
+
name: i.label ?? b(i.name),
|
|
102
|
+
xAxis: o,
|
|
97
103
|
yAxis: u,
|
|
98
104
|
valueYField: i.dataFieldName,
|
|
99
105
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
100
106
|
})
|
|
101
107
|
);
|
|
102
|
-
|
|
108
|
+
a.columns.template.setAll({
|
|
103
109
|
tooltipY: H(10),
|
|
104
110
|
templateField: "columnSettings"
|
|
105
|
-
}), t[0].type === "date" && (
|
|
111
|
+
}), t[0].type === "date" && (a.data.processor = L.new(e, {
|
|
106
112
|
dateFormat: "i",
|
|
107
113
|
dateFields: [t[0].value]
|
|
108
|
-
})),
|
|
114
|
+
})), a.data.setAll(m), a.appear();
|
|
109
115
|
} else {
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
name: i.label ??
|
|
113
|
-
xAxis:
|
|
116
|
+
const a = r.series.push(
|
|
117
|
+
Z.new(e, {
|
|
118
|
+
name: i.label ?? b(i.name),
|
|
119
|
+
xAxis: o,
|
|
114
120
|
yAxis: u,
|
|
115
121
|
valueYField: i.dataFieldName,
|
|
116
122
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
117
123
|
})
|
|
118
124
|
);
|
|
119
|
-
|
|
125
|
+
a.strokes.template.setAll({
|
|
120
126
|
strokeWidth: 3,
|
|
121
127
|
templateField: "strokeSettings"
|
|
122
|
-
}), t[0].type === "date" && (
|
|
128
|
+
}), t[0].type === "date" && (a.data.processor = L.new(e, {
|
|
123
129
|
dateFormat: "i",
|
|
124
130
|
dateFields: [t[0].value]
|
|
125
|
-
})),
|
|
126
|
-
return
|
|
127
|
-
sprite:
|
|
131
|
+
})), a.data.setAll(m), a.bullets.push(function() {
|
|
132
|
+
return ee.new(e, {
|
|
133
|
+
sprite: te.new(e, {
|
|
128
134
|
strokeWidth: 3,
|
|
129
|
-
stroke:
|
|
135
|
+
stroke: a.get("stroke"),
|
|
130
136
|
radius: 5,
|
|
131
137
|
fill: e.interfaceColors.get("background")
|
|
132
138
|
})
|
|
@@ -135,29 +141,29 @@ const Xe = (D) => {
|
|
|
135
141
|
}
|
|
136
142
|
}), r.set(
|
|
137
143
|
"cursor",
|
|
138
|
-
|
|
144
|
+
re.new(e, { xAxis: o, behavior: "none" })
|
|
139
145
|
).lineY.set("visible", !1), N({
|
|
140
146
|
root: e,
|
|
141
147
|
chart: r,
|
|
142
|
-
xAxis:
|
|
148
|
+
xAxis: o,
|
|
143
149
|
theme: s,
|
|
144
150
|
isDateAxis: t[0].type === "date",
|
|
145
151
|
baseInterval: h,
|
|
146
152
|
follow: !0
|
|
147
153
|
}), r.children.push(
|
|
148
|
-
|
|
149
|
-
centerX:
|
|
150
|
-
x:
|
|
154
|
+
ae.new(e, {
|
|
155
|
+
centerX: X,
|
|
156
|
+
x: X
|
|
151
157
|
})
|
|
152
|
-
).data.setAll(r.series.values), q(e, (
|
|
153
|
-
},
|
|
158
|
+
).data.setAll(r.series.values), q(e, (k = n == null ? void 0 : n[0]) == null ? void 0 : k.format), r.appear(1e3, 100);
|
|
159
|
+
}, S), () => {
|
|
154
160
|
var e;
|
|
155
161
|
c && clearTimeout(c), (e = d.current) == null || e.dispose(), d.current = null;
|
|
156
162
|
};
|
|
157
|
-
}, [p, t, n, s.palette.mode, x]);
|
|
158
|
-
const
|
|
159
|
-
return { chartId:
|
|
163
|
+
}, [p, t, n, s.palette.mode, x, A]);
|
|
164
|
+
const B = { ...f };
|
|
165
|
+
return { chartId: g, ownerState: B, sx: T, error: y, other: R };
|
|
160
166
|
};
|
|
161
167
|
export {
|
|
162
|
-
|
|
168
|
+
Le as useColumnLineMixLogic
|
|
163
169
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as P, A } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as P, A } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as C, useTheme as D } from "@mui/material";
|
|
3
3
|
import F from "dayjs";
|
|
4
4
|
import { useId as R, useRef as L, 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 { p as m, c as u } from "../../../Entity-
|
|
8
|
-
import { L as j } from "../../../Legend-
|
|
6
|
+
import { P as E, a as N } from "../../../PieSeries-CMH0Z7pz.js";
|
|
7
|
+
import { p as m, c as u } from "../../../Entity-BJCuhdq_.js";
|
|
8
|
+
import { L as j } from "../../../Legend-CFvQiIfn.js";
|
|
9
9
|
const K = (y) => {
|
|
10
10
|
const p = C({ props: y, name: "HCDonutChart" }), {
|
|
11
11
|
dimensions: t,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as W, T as E, A as Z } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as W, T as E, A as Z } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as $, useTheme as G } from "@mui/material";
|
|
3
3
|
import J from "dayjs";
|
|
4
4
|
import K from "lodash";
|
|
5
5
|
import { useId as Q, useRef as U, useEffect as ee } from "react";
|
|
6
6
|
import { applyValueFormat as te, colorSetFromPalette as ie } from "../_common/utils.js";
|
|
7
|
-
import { C as x, a as F, b as I, L as ae } from "../../../Tooltip-
|
|
8
|
-
import { m as M, f as O, e as j, p as C } from "../../../Entity-
|
|
9
|
-
import { a as ne, H as X } from "../../../Hierarchy-
|
|
10
|
-
import { R as z } from "../../../RoundedRectangle-
|
|
7
|
+
import { C as x, a as F, b as I, L as ae } from "../../../Tooltip-vyZRZWih.js";
|
|
8
|
+
import { m as M, f as O, e as j, p as C } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
+
import { a as ne, H as X } from "../../../Hierarchy-CEOK8Gzh.js";
|
|
10
|
+
import { R as z } from "../../../RoundedRectangle-BKLX1LKM.js";
|
|
11
11
|
import { r as se, c as R, a as L } from "../../../constant-BiOGvlZc.js";
|
|
12
12
|
class Y extends x {
|
|
13
13
|
constructor() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as ve, T as de, A as xe } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as ve, T as de, A as xe } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as we, useTheme as me } from "@mui/material";
|
|
3
3
|
import ye from "dayjs";
|
|
4
4
|
import be from "lodash";
|
|
5
5
|
import { useId as Ce, useRef as Ae, useEffect as Pe } from "react";
|
|
6
6
|
import { applyValueFormat as _e, colorSetFromPalette as ze } from "../_common/utils.js";
|
|
7
|
-
import { e as Zt,
|
|
8
|
-
import { Z as Ee } from "../../../ZoomableContainer-
|
|
9
|
-
import { H as Kt } from "../../../Hierarchy-
|
|
10
|
-
import { G as Jt, a as Te, b as Ne } from "../../../Tooltip-
|
|
7
|
+
import { e as Zt, B as ht, m as De, a as lt, c as Ht, b as Vt } from "../../../Entity-BJCuhdq_.js";
|
|
8
|
+
import { Z as Ee } from "../../../ZoomableContainer-Ca_pDVYQ.js";
|
|
9
|
+
import { H as Kt } from "../../../Hierarchy-CEOK8Gzh.js";
|
|
10
|
+
import { G as Jt, a as Te, b as Ne } from "../../../Tooltip-vyZRZWih.js";
|
|
11
11
|
import { c as K, g as ke, a as Ie } from "../../../_commonjsHelpers-BVfed4GL.js";
|
|
12
12
|
class pt extends Jt {
|
|
13
13
|
constructor() {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { R as J, A as K } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as J, A as K } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as Q, useTheme as Z } from "@mui/material";
|
|
3
3
|
import ee from "dayjs";
|
|
4
4
|
import T from "lodash";
|
|
5
5
|
import { useId as te, useRef as re, useEffect as ae } from "react";
|
|
6
6
|
import { applyValueFormat as ie, colorSetFromPalette as se } from "../_common/utils.js";
|
|
7
|
-
import { m as E, f as oe, C as S, b as u, p as P, c as Y } from "../../../Entity-
|
|
8
|
-
import { X as ne } from "../../../AxisRenderer-
|
|
9
|
-
import { A as le, a as he } from "../../../AxisRendererY-
|
|
10
|
-
import { C as R } from "../../../CategoryAxis-
|
|
11
|
-
import { C as L, L as U, a as ce, b as ue, T as W } from "../../../Tooltip-
|
|
12
|
-
import { R as de } from "../../../RoundedRectangle-
|
|
13
|
-
import { L as me } from "../../../LinearGradient-
|
|
14
|
-
import { C as pe } from "../../../ColumnSeries-
|
|
7
|
+
import { m as E, f as oe, C as S, b as u, p as P, c as Y } from "../../../Entity-BJCuhdq_.js";
|
|
8
|
+
import { X as ne } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
9
|
+
import { A as le, a as he } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
10
|
+
import { C as R } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
11
|
+
import { C as L, L as U, a as ce, b as ue, T as W } from "../../../Tooltip-vyZRZWih.js";
|
|
12
|
+
import { R as de } from "../../../RoundedRectangle-BKLX1LKM.js";
|
|
13
|
+
import { L as me } from "../../../LinearGradient-CxQyCSEB.js";
|
|
14
|
+
import { C as pe } from "../../../ColumnSeries-CtRTsn-E.js";
|
|
15
15
|
class _ extends L {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), Object.defineProperty(this, "labelContainer", {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { R as I, A as W } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as I, A as W } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as z } from "@mui/material";
|
|
3
3
|
import { useRef as d, useLayoutEffect as S } from "react";
|
|
4
|
-
import { X as F, V } from "../../../AxisRenderer-
|
|
5
|
-
import { X as G } from "../../../XYCursor-
|
|
6
|
-
import { D as M } from "../../../DateAxis-
|
|
7
|
-
import { A as N, a as P } from "../../../AxisRendererY-
|
|
8
|
-
import { C as U } from "../../../ColorSet-
|
|
9
|
-
import { c as Z, p as w } from "../../../Entity-
|
|
10
|
-
import { L as j } from "../../../LineSeries-
|
|
11
|
-
import { T as q } from "../../../Tooltip-
|
|
12
|
-
import { L as B } from "../../../Legend-
|
|
4
|
+
import { X as F, V } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
5
|
+
import { X as G } from "../../../XYCursor-CVUSpqb9.js";
|
|
6
|
+
import { D as M } from "../../../DateAxis-DEXKps1S.js";
|
|
7
|
+
import { A as N, a as P } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
8
|
+
import { C as U } from "../../../ColorSet-cyPmWGwh.js";
|
|
9
|
+
import { c as Z, p as w } from "../../../Entity-BJCuhdq_.js";
|
|
10
|
+
import { L as j } from "../../../LineSeries-D_IL2qGF.js";
|
|
11
|
+
import { T as q } from "../../../Tooltip-vyZRZWih.js";
|
|
12
|
+
import { L as B } from "../../../Legend-CFvQiIfn.js";
|
|
13
13
|
const ie = (v) => {
|
|
14
14
|
const u = z({
|
|
15
15
|
props: v,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
1
|
+
import { R as H, T as Z, A as $ } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
|
+
import { useThemeProps as j, useTheme as q } from "@mui/material";
|
|
3
3
|
import U from "lodash";
|
|
4
|
-
import { useId as
|
|
5
|
-
import { humanizeLabel as
|
|
6
|
-
import { attachCombinedAxisTooltip as
|
|
7
|
-
import { colorSetFromPalette as
|
|
8
|
-
import { c as p, p as
|
|
9
|
-
import { X as oe, V as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
const B = 1.1,
|
|
4
|
+
import { useId as J, useRef as K, useEffect as Q } from "react";
|
|
5
|
+
import { humanizeLabel as ee } from "../_common/format.js";
|
|
6
|
+
import { attachCombinedAxisTooltip as te } from "../_common/tooltip.js";
|
|
7
|
+
import { colorSetFromPalette as re, applyValueFormat as se } from "../_common/utils.js";
|
|
8
|
+
import { c as p, p as X, b as V } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
+
import { X as oe, V as ae } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { A as _, a as ie } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
11
|
+
import { C as ne } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
12
|
+
import { L as le } from "../../../LineSeries-D_IL2qGF.js";
|
|
13
|
+
import { D as me, G as de } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
14
|
+
import { B as pe } from "../../../Bullet-Djj7Vs9T.js";
|
|
15
|
+
import { C as ce } from "../../../Circle-BnfBNKBD.js";
|
|
16
|
+
import { X as ue } from "../../../XYCursor-CVUSpqb9.js";
|
|
17
|
+
import { L as fe } from "../../../Legend-CFvQiIfn.js";
|
|
18
|
+
import { D as he } from "../../../DateAxis-DEXKps1S.js";
|
|
19
|
+
const B = 1.1, ge = {
|
|
20
20
|
millisecond: 1,
|
|
21
21
|
second: 1e3,
|
|
22
22
|
minute: 6e4,
|
|
@@ -25,33 +25,34 @@ const B = 1.1, fe = {
|
|
|
25
25
|
week: 6048e5,
|
|
26
26
|
month: 2592e6,
|
|
27
27
|
year: 31536e6
|
|
28
|
-
},
|
|
29
|
-
const
|
|
28
|
+
}, Ve = (E) => {
|
|
29
|
+
const b = j({ props: E, name: "HCLineChart" }), {
|
|
30
30
|
dimensions: t,
|
|
31
31
|
values: m,
|
|
32
32
|
data: g,
|
|
33
33
|
initDelay: P = 0,
|
|
34
34
|
baseInterval: i,
|
|
35
|
-
colors:
|
|
35
|
+
colors: L,
|
|
36
36
|
connectMissingData: k = !0,
|
|
37
|
+
skipEmptyDates: v = !1,
|
|
37
38
|
sx: R,
|
|
38
39
|
...W
|
|
39
|
-
} =
|
|
40
|
+
} = b, l = q(), N = `hc-line-chart-${J().replace(/:/g, "")}`, C = K(null);
|
|
40
41
|
let A = null;
|
|
41
|
-
t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"),
|
|
42
|
+
t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"), Q(() => {
|
|
42
43
|
if (A) return;
|
|
43
|
-
let
|
|
44
|
-
return
|
|
45
|
-
var
|
|
46
|
-
const e =
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
e.setThemes([
|
|
44
|
+
let T;
|
|
45
|
+
return T = setTimeout(() => {
|
|
46
|
+
var G, O, I, M;
|
|
47
|
+
const e = H.new(N);
|
|
48
|
+
C.current = e;
|
|
49
|
+
const z = Z.new(e);
|
|
50
|
+
e.setThemes([$.new(e), z]), e.interfaceColors.setAll({
|
|
50
51
|
text: p(l.palette.text.primary),
|
|
51
52
|
grid: p(l.palette.divider),
|
|
52
53
|
stroke: p(l.palette.divider)
|
|
53
54
|
});
|
|
54
|
-
const
|
|
55
|
+
const s = e.container.children.push(
|
|
55
56
|
oe.new(e, {
|
|
56
57
|
panX: !0,
|
|
57
58
|
panY: !0,
|
|
@@ -63,44 +64,48 @@ const B = 1.1, fe = {
|
|
|
63
64
|
pinchZoomX: !0
|
|
64
65
|
})
|
|
65
66
|
);
|
|
66
|
-
|
|
67
|
+
s.set("colors", re(e, L));
|
|
67
68
|
let n, c = g;
|
|
68
|
-
t[0].type === "date"
|
|
69
|
+
if (t[0].type === "date") {
|
|
70
|
+
const o = v ? de : he;
|
|
71
|
+
n = s.xAxes.push(
|
|
72
|
+
o.new(e, {
|
|
73
|
+
maxDeviation: 0.1,
|
|
74
|
+
groupData: !1,
|
|
75
|
+
baseInterval: i || { timeUnit: "day", count: 1 },
|
|
76
|
+
renderer: _.new(e, {})
|
|
77
|
+
})
|
|
78
|
+
), c = U.orderBy(g, [t[0].value]);
|
|
79
|
+
} else
|
|
80
|
+
n = s.xAxes.push(
|
|
81
|
+
ne.new(e, {
|
|
82
|
+
categoryField: t[0].value,
|
|
83
|
+
renderer: _.new(e, {})
|
|
84
|
+
})
|
|
85
|
+
), e.numberFormatter.setAll({
|
|
86
|
+
numberFormat: "#",
|
|
87
|
+
numericFields: ["valueX"]
|
|
88
|
+
}), c = U.orderBy(g, [t[0].value]), n.data.setAll(c);
|
|
89
|
+
const Y = s.yAxes.push(
|
|
69
90
|
ae.new(e, {
|
|
70
|
-
maxDeviation: 0.1,
|
|
71
|
-
groupData: !1,
|
|
72
|
-
baseInterval: i || { timeUnit: "day", count: 1 },
|
|
73
|
-
renderer: _.new(e, {})
|
|
74
|
-
})
|
|
75
|
-
), c = U.orderBy(g, [t[0].value])) : (n = o.xAxes.push(
|
|
76
|
-
ne.new(e, {
|
|
77
|
-
categoryField: t[0].value,
|
|
78
|
-
renderer: _.new(e, {})
|
|
79
|
-
})
|
|
80
|
-
), e.numberFormatter.setAll({
|
|
81
|
-
numberFormat: "#",
|
|
82
|
-
numericFields: ["valueX"]
|
|
83
|
-
}), c = U.orderBy(g, [t[0].value]), n.data.setAll(c));
|
|
84
|
-
const N = o.yAxes.push(
|
|
85
|
-
se.new(e, {
|
|
86
91
|
renderer: ie.new(e, {})
|
|
87
92
|
})
|
|
88
93
|
);
|
|
89
|
-
(
|
|
94
|
+
(G = n.get("renderer")) == null || G.grid.template.setAll({
|
|
90
95
|
stroke: p(l.palette.divider),
|
|
91
96
|
strokeOpacity: 1
|
|
92
|
-
}), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I =
|
|
97
|
+
}), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I = Y.get("renderer")) == null || I.grid.template.setAll({
|
|
93
98
|
stroke: p(l.palette.divider),
|
|
94
99
|
strokeOpacity: 1
|
|
95
|
-
}), m.forEach((
|
|
96
|
-
const a =
|
|
100
|
+
}), m.forEach((o) => {
|
|
101
|
+
const a = s.series.push(
|
|
97
102
|
le.new(e, {
|
|
98
103
|
// Legend/tooltip label: explicit override, else humanize the raw
|
|
99
104
|
// backend field (snake_case / lowercase → Title Case).
|
|
100
|
-
name:
|
|
105
|
+
name: o.label ?? ee(o.name),
|
|
101
106
|
xAxis: n,
|
|
102
|
-
yAxis:
|
|
103
|
-
valueYField:
|
|
107
|
+
yAxis: Y,
|
|
108
|
+
valueYField: o.dataFieldName,
|
|
104
109
|
// When false, the line breaks at missing points. On a date axis the
|
|
105
110
|
// break is auto-detected when adjacent points are spaced more than
|
|
106
111
|
// `autoGapCount` (default 1.1) base intervals apart, so absent dates
|
|
@@ -113,19 +118,19 @@ const B = 1.1, fe = {
|
|
|
113
118
|
if (t[0].type === "date" && (a.data.processor = me.new(e, {
|
|
114
119
|
dateFormat: "i",
|
|
115
120
|
dateFields: [t[0].value]
|
|
116
|
-
})), t[0].type === "date") {
|
|
117
|
-
const y = t[0].value, x =
|
|
121
|
+
})), t[0].type === "date" && !v) {
|
|
122
|
+
const y = t[0].value, x = ge[(i == null ? void 0 : i.timeUnit) ?? "day"] * ((i == null ? void 0 : i.count) ?? 1), d = k ? 1 / 0 : x * B, w = c.map((r) => ({
|
|
118
123
|
t: new Date(r[y]).getTime(),
|
|
119
|
-
hasValue: r[
|
|
120
|
-
})).filter((r) => r.hasValue && !Number.isNaN(r.t)),
|
|
124
|
+
hasValue: r[o.dataFieldName] !== null && r[o.dataFieldName] !== void 0
|
|
125
|
+
})).filter((r) => r.hasValue && !Number.isNaN(r.t)), D = /* @__PURE__ */ new Set();
|
|
121
126
|
w.forEach((r, f) => {
|
|
122
127
|
const F = f > 0 ? r.t - w[f - 1].t : 1 / 0, h = f < w.length - 1 ? w[f + 1].t - r.t : 1 / 0;
|
|
123
|
-
F > d && h > d &&
|
|
124
|
-
}),
|
|
128
|
+
F > d && h > d && D.add(r.t);
|
|
129
|
+
}), D.size > 0 && a.bullets.push((r, f, F) => {
|
|
125
130
|
const h = F.dataContext;
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
128
|
-
sprite:
|
|
131
|
+
if (D.has(new Date(h == null ? void 0 : h[y]).getTime()))
|
|
132
|
+
return pe.new(r, {
|
|
133
|
+
sprite: ce.new(r, {
|
|
129
134
|
radius: 3,
|
|
130
135
|
fill: a.get("fill"),
|
|
131
136
|
stroke: r.interfaceColors.get("background"),
|
|
@@ -135,56 +140,64 @@ const B = 1.1, fe = {
|
|
|
135
140
|
});
|
|
136
141
|
}
|
|
137
142
|
a.data.setAll(c), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
|
|
138
|
-
}),
|
|
143
|
+
}), s.set(
|
|
139
144
|
"cursor",
|
|
140
|
-
|
|
141
|
-
).lineY.set("visible", !1),
|
|
145
|
+
ue.new(e, { xAxis: n, behavior: "none" })
|
|
146
|
+
).lineY.set("visible", !1), te({
|
|
142
147
|
root: e,
|
|
143
|
-
chart:
|
|
148
|
+
chart: s,
|
|
144
149
|
xAxis: n,
|
|
145
150
|
theme: l,
|
|
146
151
|
isDateAxis: t[0].type === "date",
|
|
147
152
|
baseInterval: i,
|
|
148
153
|
follow: !0
|
|
149
154
|
});
|
|
150
|
-
const u =
|
|
151
|
-
|
|
152
|
-
width:
|
|
155
|
+
const u = s.bottomAxesContainer.children.push(
|
|
156
|
+
fe.new(e, {
|
|
157
|
+
width: X(100),
|
|
153
158
|
paddingTop: 10,
|
|
154
|
-
centerX:
|
|
155
|
-
x:
|
|
159
|
+
centerX: X(50),
|
|
160
|
+
x: X(50),
|
|
156
161
|
layout: e.gridLayout
|
|
157
162
|
})
|
|
158
163
|
);
|
|
159
|
-
u.itemContainers.template.events.on("pointerover", function(
|
|
164
|
+
u.itemContainers.template.events.on("pointerover", function(o) {
|
|
160
165
|
var x;
|
|
161
|
-
const a =
|
|
162
|
-
|
|
166
|
+
const a = o.target, y = (x = a == null ? void 0 : a.dataItem) == null ? void 0 : x.dataContext;
|
|
167
|
+
s.series.each(function(d) {
|
|
163
168
|
d !== y ? d.strokes.template.setAll({
|
|
164
169
|
strokeOpacity: 0.15,
|
|
165
170
|
stroke: p(0)
|
|
166
171
|
}) : d.strokes.template.setAll({ strokeWidth: 3 });
|
|
167
172
|
});
|
|
168
173
|
}), u.itemContainers.template.events.on("pointerout", function() {
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
s.series.each(function(o) {
|
|
175
|
+
o.strokes.template.setAll({
|
|
171
176
|
strokeOpacity: 1,
|
|
172
177
|
strokeWidth: 2,
|
|
173
|
-
stroke:
|
|
178
|
+
stroke: o.get("fill")
|
|
174
179
|
});
|
|
175
180
|
});
|
|
176
181
|
}), u.itemContainers.template.set("width", V), u.valueLabels.template.setAll({
|
|
177
182
|
width: V,
|
|
178
183
|
textAlign: "right"
|
|
179
|
-
}), u.data.setAll(
|
|
184
|
+
}), u.data.setAll(s.series.values), se(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), s.appear(1e3, 100);
|
|
180
185
|
}, P), () => {
|
|
181
186
|
var e;
|
|
182
|
-
|
|
187
|
+
T && clearTimeout(T), (e = C.current) == null || e.dispose(), C.current = null;
|
|
183
188
|
};
|
|
184
|
-
}, [
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
}, [
|
|
190
|
+
g,
|
|
191
|
+
t,
|
|
192
|
+
m,
|
|
193
|
+
l.palette.mode,
|
|
194
|
+
L,
|
|
195
|
+
k,
|
|
196
|
+
v
|
|
197
|
+
]);
|
|
198
|
+
const S = { ...b };
|
|
199
|
+
return { chartId: N, ownerState: S, sx: R, error: A, other: W };
|
|
187
200
|
};
|
|
188
201
|
export {
|
|
189
|
-
|
|
202
|
+
Ve as useLineChartLogic
|
|
190
203
|
};
|