@hybridcore/ui 1.6.16 → 1.6.17
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/CATALOG.md +1 -0
- package/dist/IconCircle-HcgE1lHy.js +11 -0
- package/dist/IconMinus-B6OPYVyo.js +11 -0
- package/dist/IconPlus-7KPPhzOb.js +11 -0
- package/dist/IconTrendingUp-CW4SFYmc.js +27 -0
- package/dist/components/charts/_common/utils.js +21 -11
- package/dist/components/charts/column-line-mix/logic.js +59 -59
- package/dist/components/charts/line/logic.js +55 -55
- package/dist/components/charts/logaritmic-scale/logic.js +27 -27
- package/dist/components/charts/multiple-value-axes/logic.js +70 -70
- package/dist/components/charts/xy-chart/logic.js +31 -31
- package/dist/components/color-picker/index.js +1393 -1399
- package/dist/components/data-map/components/controls/index.js +7 -6
- package/dist/components/heat-map/components/controls/index.js +7 -6
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8738 -8753
- package/dist/components/metric-card/logic.js +57 -77
- package/dist/components/prr-map/components/controls/index.js +7 -6
- package/dist/components/raster-grid-map/components/controls/index.js +7 -6
- package/dist/components/status-indicator/index.js +44 -0
- package/dist/components/status-indicator/logic.js +105 -0
- package/dist/components/status-indicator/styled.js +114 -0
- package/dist/main.d.ts +76 -0
- package/dist/main.js +65 -63
- package/package.json +1 -1
- package/dist/IconPlus-yPkff_Vj.js +0 -19
|
@@ -4,27 +4,27 @@ import F from "lodash";
|
|
|
4
4
|
import { useId as G, useRef as O, useEffect as P } from "react";
|
|
5
5
|
import { humanizeLabel as V } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as q } from "../_common/tooltip.js";
|
|
7
|
-
import { colorSetFromPalette as z,
|
|
7
|
+
import { colorSetFromPalette as z, applyDateAxisLabelFormat as B, applyValueFormat as H } from "../_common/utils.js";
|
|
8
8
|
import { c as i } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
-
import { X as
|
|
10
|
-
import { X as
|
|
11
|
-
import { A as X, a as
|
|
12
|
-
import { C as
|
|
13
|
-
import { L as
|
|
14
|
-
import { D as
|
|
15
|
-
import { S as
|
|
16
|
-
import { D as
|
|
17
|
-
const
|
|
9
|
+
import { X as N, V as U } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { X as W } from "../../../XYCursor-CVUSpqb9.js";
|
|
11
|
+
import { A as X, a as Z } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
12
|
+
import { C as _ } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
|
+
import { L as $ } from "../../../LineSeries-D_IL2qGF.js";
|
|
14
|
+
import { D as j, G as J } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
15
|
+
import { S as K } from "../../../Scrollbar-CTI7_8Qw.js";
|
|
16
|
+
import { D as M } from "../../../DateAxis-DEXKps1S.js";
|
|
17
|
+
const xe = (k) => {
|
|
18
18
|
const f = E({ props: k, name: "HCLogaritmicScale" }), {
|
|
19
19
|
dimensions: t,
|
|
20
20
|
values: s,
|
|
21
21
|
data: n,
|
|
22
|
-
initDelay:
|
|
22
|
+
initDelay: L = 0,
|
|
23
23
|
baseInterval: h,
|
|
24
24
|
colors: A,
|
|
25
25
|
skipEmptyDates: x = !1,
|
|
26
|
-
sx:
|
|
27
|
-
...
|
|
26
|
+
sx: S,
|
|
27
|
+
...C
|
|
28
28
|
} = f, a = I(), g = `hc-logaritmic-scale-${G().replace(/:/g, "")}`, d = O(null);
|
|
29
29
|
let m = null;
|
|
30
30
|
t.length < 1 ? m = "LogaritmicScale requires at least 1 dimension" : s.length < 1 && (m = "LogaritmicScale requires at least 1 value"), P(() => {
|
|
@@ -39,7 +39,7 @@ const Ae = (k) => {
|
|
|
39
39
|
stroke: i(a.palette.divider)
|
|
40
40
|
});
|
|
41
41
|
const r = e.container.children.push(
|
|
42
|
-
|
|
42
|
+
N.new(e, {
|
|
43
43
|
panX: !0,
|
|
44
44
|
panY: !0,
|
|
45
45
|
wheelX: "none",
|
|
@@ -50,12 +50,12 @@ const Ae = (k) => {
|
|
|
50
50
|
);
|
|
51
51
|
r.set("colors", z(e, A)), r.set(
|
|
52
52
|
"cursor",
|
|
53
|
-
|
|
53
|
+
W.new(e, { behavior: "none" })
|
|
54
54
|
).lineY.set("visible", !1);
|
|
55
55
|
let o, p = n;
|
|
56
56
|
if (t[0].type === "date") {
|
|
57
57
|
p = F.orderBy(n, [t[0].value]);
|
|
58
|
-
const l = x ?
|
|
58
|
+
const l = x ? J : M;
|
|
59
59
|
o = r.xAxes.push(
|
|
60
60
|
l.new(e, {
|
|
61
61
|
maxDeviation: 0.1,
|
|
@@ -66,10 +66,10 @@ const Ae = (k) => {
|
|
|
66
66
|
), (v = o.get("renderer")) == null || v.grid.template.setAll({
|
|
67
67
|
stroke: i(a.palette.divider),
|
|
68
68
|
strokeOpacity: 1
|
|
69
|
-
});
|
|
69
|
+
}), B(o, t[0]);
|
|
70
70
|
} else
|
|
71
71
|
o = r.xAxes.push(
|
|
72
|
-
|
|
72
|
+
_.new(e, {
|
|
73
73
|
categoryField: t[0].value,
|
|
74
74
|
renderer: X.new(e, {})
|
|
75
75
|
})
|
|
@@ -81,9 +81,9 @@ const Ae = (k) => {
|
|
|
81
81
|
strokeOpacity: 1
|
|
82
82
|
});
|
|
83
83
|
const y = r.yAxes.push(
|
|
84
|
-
|
|
84
|
+
U.new(e, {
|
|
85
85
|
logarithmic: !0,
|
|
86
|
-
renderer:
|
|
86
|
+
renderer: Z.new(e, { minorGridEnabled: !0 })
|
|
87
87
|
})
|
|
88
88
|
);
|
|
89
89
|
(D = y.get("renderer")) == null || D.grid.template.setAll({
|
|
@@ -91,7 +91,7 @@ const Ae = (k) => {
|
|
|
91
91
|
strokeOpacity: 1
|
|
92
92
|
}), s.forEach((l) => {
|
|
93
93
|
const c = r.series.push(
|
|
94
|
-
|
|
94
|
+
$.new(e, {
|
|
95
95
|
name: l.label ?? V(l.name),
|
|
96
96
|
xAxis: o,
|
|
97
97
|
yAxis: y,
|
|
@@ -99,7 +99,7 @@ const Ae = (k) => {
|
|
|
99
99
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
100
100
|
})
|
|
101
101
|
);
|
|
102
|
-
c.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (c.data.processor =
|
|
102
|
+
c.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (c.data.processor = j.new(e, {
|
|
103
103
|
dateFormat: "i",
|
|
104
104
|
dateFields: [t[0].value]
|
|
105
105
|
})), c.data.setAll(p), c.appear(1e3);
|
|
@@ -113,16 +113,16 @@ const Ae = (k) => {
|
|
|
113
113
|
follow: !0
|
|
114
114
|
}), r.set(
|
|
115
115
|
"scrollbarX",
|
|
116
|
-
|
|
117
|
-
),
|
|
118
|
-
},
|
|
116
|
+
K.new(e, { orientation: "horizontal" })
|
|
117
|
+
), H(e, (b = s == null ? void 0 : s[0]) == null ? void 0 : b.format), r.appear(1e3, 100);
|
|
118
|
+
}, L), () => {
|
|
119
119
|
var e;
|
|
120
120
|
u && clearTimeout(u), (e = d.current) == null || e.dispose(), d.current = null;
|
|
121
121
|
};
|
|
122
122
|
}, [n, t, s, a.palette.mode, A, x]);
|
|
123
123
|
const T = { ...f };
|
|
124
|
-
return { chartId: g, ownerState: T, sx:
|
|
124
|
+
return { chartId: g, ownerState: T, sx: S, error: m, other: C };
|
|
125
125
|
};
|
|
126
126
|
export {
|
|
127
|
-
|
|
127
|
+
xe as useLogaritmicScaleLogic
|
|
128
128
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { R as j, A as q } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
2
|
import { useThemeProps as z, useTheme as U } from "@mui/material";
|
|
3
|
-
import
|
|
3
|
+
import v from "lodash";
|
|
4
4
|
import { useId as H, useRef as $, useEffect as J } from "react";
|
|
5
5
|
import { humanizeLabel as P } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as K } from "../_common/tooltip.js";
|
|
7
|
-
import { colorSetFromPalette as Q,
|
|
7
|
+
import { colorSetFromPalette as Q, applyDateAxisLabelFormat as Z, applyValueFormat as ee } from "../_common/utils.js";
|
|
8
8
|
import { c as C, a as A } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
-
import { X as
|
|
10
|
-
import { L as
|
|
11
|
-
import { A as X, a as
|
|
12
|
-
import { C as
|
|
13
|
-
import { X as
|
|
14
|
-
import { G as
|
|
15
|
-
import { D as
|
|
16
|
-
import { L as
|
|
17
|
-
import { G, R as
|
|
18
|
-
import { C as
|
|
19
|
-
import { B as
|
|
9
|
+
import { X as te, V as re } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { L as se } from "../../../Legend-CFvQiIfn.js";
|
|
11
|
+
import { A as X, a as ae } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
12
|
+
import { C as ie } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
|
+
import { X as oe } from "../../../XYCursor-CVUSpqb9.js";
|
|
14
|
+
import { G as le, D as ne } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
15
|
+
import { D as ce } from "../../../DateAxis-DEXKps1S.js";
|
|
16
|
+
import { L as me } from "../../../LineSeries-D_IL2qGF.js";
|
|
17
|
+
import { G, R as ue } from "../../../Tooltip-vyZRZWih.js";
|
|
18
|
+
import { C as pe } from "../../../Circle-BnfBNKBD.js";
|
|
19
|
+
import { B as de } from "../../../Bullet-Djj7Vs9T.js";
|
|
20
20
|
class y extends G {
|
|
21
21
|
_beforeChanged() {
|
|
22
22
|
super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
|
|
@@ -25,8 +25,8 @@ class y extends G {
|
|
|
25
25
|
super._changed(), this._clear && !this.get("draw") && this._draw();
|
|
26
26
|
}
|
|
27
27
|
_draw() {
|
|
28
|
-
const
|
|
29
|
-
t.moveTo(-
|
|
28
|
+
const c = this.width(), s = this.height(), t = this._display;
|
|
29
|
+
t.moveTo(-c / 2, s / 2), t.lineTo(0, -s / 2), t.lineTo(c / 2, s / 2), t.lineTo(-c / 2, s / 2), t.closePath();
|
|
30
30
|
}
|
|
31
31
|
_updateSize() {
|
|
32
32
|
this.markDirty(), this._clear = !0;
|
|
@@ -44,8 +44,8 @@ Object.defineProperty(y, "classNames", {
|
|
|
44
44
|
writable: !0,
|
|
45
45
|
value: G.classNames.concat([y.className])
|
|
46
46
|
});
|
|
47
|
-
const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"],
|
|
48
|
-
const
|
|
47
|
+
const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (T) => {
|
|
48
|
+
const c = z({ props: T, name: "HCMultipleValueAxes" }), {
|
|
49
49
|
dimensions: s,
|
|
50
50
|
values: t,
|
|
51
51
|
data: d,
|
|
@@ -55,13 +55,13 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Xe = (T) => {
|
|
|
55
55
|
skipEmptyDates: E = !1,
|
|
56
56
|
sx: Y,
|
|
57
57
|
...V
|
|
58
|
-
} =
|
|
58
|
+
} = c, u = U(), _ = `hc-multiple-value-axes-${H().replace(/:/g, "")}`, w = $(null);
|
|
59
59
|
let h = null;
|
|
60
60
|
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), J(() => {
|
|
61
61
|
if (h) return;
|
|
62
62
|
let b;
|
|
63
63
|
return b = setTimeout(() => {
|
|
64
|
-
var
|
|
64
|
+
var N;
|
|
65
65
|
const e = j.new(_);
|
|
66
66
|
w.current = e, e.setThemes([q.new(e)]), e.interfaceColors.setAll({
|
|
67
67
|
text: C(u.palette.text.primary),
|
|
@@ -69,7 +69,7 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Xe = (T) => {
|
|
|
69
69
|
stroke: C(u.palette.divider)
|
|
70
70
|
});
|
|
71
71
|
const r = e.container.children.push(
|
|
72
|
-
|
|
72
|
+
te.new(e, {
|
|
73
73
|
panX: !1,
|
|
74
74
|
panY: !1,
|
|
75
75
|
wheelX: "none",
|
|
@@ -80,91 +80,91 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Xe = (T) => {
|
|
|
80
80
|
);
|
|
81
81
|
r.set("colors", Q(e, R)), r.get("colors", {}).set("step", 3);
|
|
82
82
|
const O = r.children.push(
|
|
83
|
-
|
|
84
|
-
),
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
const a = E ?
|
|
88
|
-
|
|
83
|
+
se.new(e, { centerX: A, x: A })
|
|
84
|
+
), i = s[0];
|
|
85
|
+
let l, p = d;
|
|
86
|
+
if (i.type === "date") {
|
|
87
|
+
const a = E ? le : ce;
|
|
88
|
+
l = r.xAxes.push(
|
|
89
89
|
a.new(e, {
|
|
90
90
|
maxDeviation: 0.1,
|
|
91
91
|
groupData: !1,
|
|
92
92
|
baseInterval: L || { timeUnit: "day", count: 1 },
|
|
93
93
|
renderer: X.new(e, {})
|
|
94
94
|
})
|
|
95
|
-
), p =
|
|
95
|
+
), Z(l, i), p = v.orderBy(d, [i.value]);
|
|
96
96
|
} else
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
categoryField:
|
|
97
|
+
l = r.xAxes.push(
|
|
98
|
+
ie.new(e, {
|
|
99
|
+
categoryField: i.value,
|
|
100
100
|
renderer: X.new(e, {})
|
|
101
101
|
})
|
|
102
102
|
), e.numberFormatter.setAll({
|
|
103
103
|
numberFormat: "#",
|
|
104
104
|
numericFields: ["valueX"]
|
|
105
|
-
}), p =
|
|
106
|
-
function
|
|
107
|
-
const f =
|
|
108
|
-
|
|
105
|
+
}), p = v.orderBy(d, [i.value]), l.data.setAll(p);
|
|
106
|
+
function F(a, n, m, S, W, D, M) {
|
|
107
|
+
const f = ae.new(e, { opposite: W }), k = r.yAxes.push(
|
|
108
|
+
re.new(e, { maxDeviation: 1, renderer: f })
|
|
109
109
|
);
|
|
110
|
-
r.yAxes.indexOf(
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
name:
|
|
114
|
-
xAxis:
|
|
115
|
-
yAxis:
|
|
110
|
+
r.yAxes.indexOf(k) > 0 && k.set("syncWithAxis", r.yAxes.getIndex(0));
|
|
111
|
+
const o = r.series.push(
|
|
112
|
+
me.new(e, {
|
|
113
|
+
name: n,
|
|
114
|
+
xAxis: l,
|
|
115
|
+
yAxis: k,
|
|
116
116
|
valueYField: S,
|
|
117
|
-
...
|
|
117
|
+
...i.type === "date" ? { valueXField: m } : { categoryXField: m }
|
|
118
118
|
})
|
|
119
119
|
);
|
|
120
|
-
|
|
121
|
-
stroke:
|
|
120
|
+
o.strokes.template.setAll({ strokeWidth: 2 }), f.grid.template.set("strokeOpacity", 0.05), f.labels.template.set("fill", o.get("fill")), f.setAll({
|
|
121
|
+
stroke: o.get("fill"),
|
|
122
122
|
strokeOpacity: 1,
|
|
123
123
|
opacity: 1
|
|
124
|
-
}), M === "date" && (
|
|
124
|
+
}), M === "date" && (o.data.processor = ne.new(e, {
|
|
125
125
|
dateFormat: "i",
|
|
126
126
|
dateFields: [m]
|
|
127
|
-
})),
|
|
127
|
+
})), D !== void 0 && o.bullets.push(function() {
|
|
128
128
|
let g;
|
|
129
|
-
return
|
|
129
|
+
return D === "RECTANGLE" ? g = ue.new(e, {
|
|
130
130
|
width: 10,
|
|
131
131
|
height: 10,
|
|
132
132
|
centerX: A,
|
|
133
133
|
centerY: A,
|
|
134
134
|
strokeWidth: 2,
|
|
135
|
-
stroke:
|
|
135
|
+
stroke: o.get("stroke"),
|
|
136
136
|
fill: e.interfaceColors.get("background")
|
|
137
|
-
}) :
|
|
137
|
+
}) : D === "TRIANGLE" ? g = y.new(e, {
|
|
138
138
|
width: 10,
|
|
139
139
|
height: 10,
|
|
140
140
|
strokeWidth: 2,
|
|
141
|
-
stroke:
|
|
141
|
+
stroke: o.get("stroke"),
|
|
142
142
|
fill: e.interfaceColors.get("background")
|
|
143
|
-
}) : g =
|
|
143
|
+
}) : g = pe.new(e, {
|
|
144
144
|
strokeWidth: 2,
|
|
145
145
|
radius: 4,
|
|
146
|
-
stroke:
|
|
146
|
+
stroke: o.get("stroke"),
|
|
147
147
|
fill: e.interfaceColors.get("background")
|
|
148
|
-
}),
|
|
149
|
-
}),
|
|
148
|
+
}), de.new(e, { sprite: g });
|
|
149
|
+
}), o.data.setAll(a);
|
|
150
150
|
}
|
|
151
151
|
if (r.set(
|
|
152
152
|
"cursor",
|
|
153
|
-
|
|
153
|
+
oe.new(e, { xAxis: l, behavior: "none" })
|
|
154
154
|
).lineY.set("visible", !1), K({
|
|
155
155
|
root: e,
|
|
156
156
|
chart: r,
|
|
157
|
-
xAxis:
|
|
157
|
+
xAxis: l,
|
|
158
158
|
theme: u,
|
|
159
|
-
isDateAxis:
|
|
159
|
+
isDateAxis: i.type === "date",
|
|
160
160
|
baseInterval: L,
|
|
161
161
|
follow: !0
|
|
162
162
|
}), s.length > 1) {
|
|
163
|
-
const a =
|
|
164
|
-
Object.keys(a).forEach((
|
|
165
|
-
|
|
166
|
-
a[
|
|
167
|
-
P(
|
|
163
|
+
const a = v.groupBy(p, s[1].value);
|
|
164
|
+
Object.keys(a).forEach((n, m) => {
|
|
165
|
+
F(
|
|
166
|
+
a[n],
|
|
167
|
+
P(n),
|
|
168
168
|
s[0].value,
|
|
169
169
|
t[0].dataFieldName,
|
|
170
170
|
m !== 0,
|
|
@@ -172,26 +172,26 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Xe = (T) => {
|
|
|
172
172
|
);
|
|
173
173
|
});
|
|
174
174
|
} else
|
|
175
|
-
t.forEach((a,
|
|
176
|
-
|
|
175
|
+
t.forEach((a, n) => {
|
|
176
|
+
F(
|
|
177
177
|
p,
|
|
178
178
|
a.label ?? P(a.name),
|
|
179
|
-
|
|
179
|
+
i.value,
|
|
180
180
|
a.dataFieldName,
|
|
181
|
-
|
|
182
|
-
x[
|
|
183
|
-
|
|
181
|
+
n !== 0,
|
|
182
|
+
x[n % x.length],
|
|
183
|
+
i.type
|
|
184
184
|
);
|
|
185
185
|
});
|
|
186
|
-
O.data.setAll(r.series.values),
|
|
186
|
+
O.data.setAll(r.series.values), ee(e, (N = t == null ? void 0 : t[0]) == null ? void 0 : N.format), r.appear(1e3, 100);
|
|
187
187
|
}, I), () => {
|
|
188
188
|
var e;
|
|
189
189
|
b && clearTimeout(b), (e = w.current) == null || e.dispose(), w.current = null;
|
|
190
190
|
};
|
|
191
191
|
}, [d, s, t, u.palette.mode, R, E]);
|
|
192
|
-
const B = { ...
|
|
192
|
+
const B = { ...c };
|
|
193
193
|
return { chartId: _, ownerState: B, sx: Y, error: h, other: V };
|
|
194
194
|
};
|
|
195
195
|
export {
|
|
196
|
-
|
|
196
|
+
Ge as useMultipleValueAxesLogic
|
|
197
197
|
};
|
|
@@ -4,18 +4,18 @@ import y from "lodash";
|
|
|
4
4
|
import { useId as te, useRef as re, useEffect as oe } from "react";
|
|
5
5
|
import { humanizeLabel as E } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as ae } from "../_common/tooltip.js";
|
|
7
|
-
import { colorSetFromPalette as se,
|
|
7
|
+
import { colorSetFromPalette as se, applyDateAxisLabelFormat as ie, applyValueFormat as ne } from "../_common/utils.js";
|
|
8
8
|
import { c as p, a as S, p as z } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
-
import { X as
|
|
10
|
-
import { L as
|
|
11
|
-
import { C as
|
|
12
|
-
import { T as
|
|
13
|
-
import { X as
|
|
9
|
+
import { X as le, V as ce } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { L as me } from "../../../Legend-CFvQiIfn.js";
|
|
11
|
+
import { C as pe } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
12
|
+
import { T as de, R as ue } from "../../../Tooltip-vyZRZWih.js";
|
|
13
|
+
import { X as fe } from "../../../XYCursor-CVUSpqb9.js";
|
|
14
14
|
import { a as B, A as G } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
15
|
-
import { G as
|
|
16
|
-
import { D as
|
|
17
|
-
import { C as
|
|
18
|
-
const
|
|
15
|
+
import { G as he, D as xe } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
16
|
+
import { D as Ae } from "../../../DateAxis-DEXKps1S.js";
|
|
17
|
+
import { C as ye } from "../../../ColumnSeries-CtRTsn-E.js";
|
|
18
|
+
const Be = (I) => {
|
|
19
19
|
const g = Z({ props: I, name: "HCXYChart" }), {
|
|
20
20
|
dimensions: l,
|
|
21
21
|
values: c,
|
|
@@ -40,7 +40,7 @@ const ze = (I) => {
|
|
|
40
40
|
stroke: p(n.palette.divider)
|
|
41
41
|
});
|
|
42
42
|
const a = e.container.children.push(
|
|
43
|
-
|
|
43
|
+
le.new(e, {
|
|
44
44
|
panX: !1,
|
|
45
45
|
panY: !1,
|
|
46
46
|
wheelX: "none",
|
|
@@ -52,35 +52,35 @@ const ze = (I) => {
|
|
|
52
52
|
);
|
|
53
53
|
a.set("colors", se(e, w));
|
|
54
54
|
const q = a.children.push(
|
|
55
|
-
|
|
55
|
+
me.new(e, {
|
|
56
56
|
centerX: S,
|
|
57
57
|
x: S
|
|
58
58
|
})
|
|
59
|
-
), s = l[0],
|
|
59
|
+
), s = l[0], F = t ? B : G, H = t ? G : B, R = t ? a.yAxes : a.xAxes, M = t ? a.xAxes : a.yAxes;
|
|
60
60
|
let o, d = f;
|
|
61
61
|
if (s.type === "date") {
|
|
62
|
-
const r = b ?
|
|
63
|
-
o =
|
|
62
|
+
const r = b ? he : Ae;
|
|
63
|
+
o = R.push(
|
|
64
64
|
r.new(e, {
|
|
65
65
|
maxDeviation: 0,
|
|
66
66
|
baseInterval: v || { timeUnit: "day", count: 1 },
|
|
67
|
-
renderer:
|
|
67
|
+
renderer: F.new(e, { minGridDistance: 60 })
|
|
68
68
|
})
|
|
69
|
-
), d = y.orderBy(f, [s.value]);
|
|
69
|
+
), ie(o, s), d = y.orderBy(f, [s.value]);
|
|
70
70
|
} else {
|
|
71
|
-
const r =
|
|
71
|
+
const r = F.new(e, {
|
|
72
72
|
cellStartLocation: 0.1,
|
|
73
73
|
cellEndLocation: 0.9,
|
|
74
74
|
minGridDistance: 30
|
|
75
75
|
});
|
|
76
|
-
o =
|
|
77
|
-
|
|
76
|
+
o = R.push(
|
|
77
|
+
pe.new(e, {
|
|
78
78
|
categoryField: s.value,
|
|
79
79
|
renderer: r
|
|
80
80
|
})
|
|
81
81
|
), r.grid.template.setAll({ location: 1 }), o.labelsContainer.set(
|
|
82
82
|
"tooltip",
|
|
83
|
-
|
|
83
|
+
de.new(e, {
|
|
84
84
|
pointerOrientation: t ? "right" : "down"
|
|
85
85
|
})
|
|
86
86
|
), r.labels.template.setAll({
|
|
@@ -90,7 +90,7 @@ const ze = (I) => {
|
|
|
90
90
|
}), r.labels.template.setup = function(i) {
|
|
91
91
|
i.set(
|
|
92
92
|
"background",
|
|
93
|
-
|
|
93
|
+
ue.new(e, {
|
|
94
94
|
fill: p(0),
|
|
95
95
|
fillOpacity: 0
|
|
96
96
|
})
|
|
@@ -105,7 +105,7 @@ const ze = (I) => {
|
|
|
105
105
|
o.data.setAll(m);
|
|
106
106
|
}
|
|
107
107
|
const A = M.push(
|
|
108
|
-
|
|
108
|
+
ce.new(e, {
|
|
109
109
|
renderer: H.new(e, { strokeOpacity: 0.1 }),
|
|
110
110
|
// Horizontal bars must grow from a zero baseline; otherwise the auto
|
|
111
111
|
// min crops the axis (e.g. starting at 100) and distorts bar lengths.
|
|
@@ -119,9 +119,9 @@ const ze = (I) => {
|
|
|
119
119
|
stroke: p(n.palette.divider),
|
|
120
120
|
strokeOpacity: 1
|
|
121
121
|
});
|
|
122
|
-
function
|
|
122
|
+
function Y(r, m, i, P) {
|
|
123
123
|
const $ = t ? { valueXField: P } : { valueYField: P }, J = s.type === "date" ? t ? { valueYField: i } : { valueXField: i } : t ? { categoryYField: i } : { categoryXField: i }, u = a.series.push(
|
|
124
|
-
|
|
124
|
+
ye.new(e, {
|
|
125
125
|
name: r,
|
|
126
126
|
xAxis: U,
|
|
127
127
|
yAxis: _,
|
|
@@ -132,14 +132,14 @@ const ze = (I) => {
|
|
|
132
132
|
u.columns.template.setAll({
|
|
133
133
|
...t ? { height: z(90) } : { width: z(90) },
|
|
134
134
|
strokeOpacity: 0
|
|
135
|
-
}), s.type === "date" && (u.data.processor =
|
|
135
|
+
}), s.type === "date" && (u.data.processor = xe.new(e, {
|
|
136
136
|
dateFormat: "i",
|
|
137
137
|
dateFields: [i]
|
|
138
138
|
})), u.data.setAll(m), u.appear(), q.data.push(u);
|
|
139
139
|
}
|
|
140
140
|
if (l.length === 1)
|
|
141
141
|
c.forEach((r) => {
|
|
142
|
-
|
|
142
|
+
Y(
|
|
143
143
|
r.label ?? E(r.name),
|
|
144
144
|
d,
|
|
145
145
|
s.value,
|
|
@@ -149,7 +149,7 @@ const ze = (I) => {
|
|
|
149
149
|
else {
|
|
150
150
|
const r = y.groupBy(d, l[1].value);
|
|
151
151
|
Object.keys(r).forEach((m) => {
|
|
152
|
-
|
|
152
|
+
Y(
|
|
153
153
|
E(m),
|
|
154
154
|
r[m],
|
|
155
155
|
s.value,
|
|
@@ -159,7 +159,7 @@ const ze = (I) => {
|
|
|
159
159
|
}
|
|
160
160
|
const T = a.set(
|
|
161
161
|
"cursor",
|
|
162
|
-
|
|
162
|
+
fe.new(
|
|
163
163
|
e,
|
|
164
164
|
t ? { yAxis: o, behavior: "none" } : { xAxis: o, behavior: "none" }
|
|
165
165
|
)
|
|
@@ -173,7 +173,7 @@ const ze = (I) => {
|
|
|
173
173
|
baseInterval: v,
|
|
174
174
|
follow: !0,
|
|
175
175
|
horizontal: t
|
|
176
|
-
}),
|
|
176
|
+
}), ne(e, (O = c == null ? void 0 : c[0]) == null ? void 0 : O.format), a.appear(1e3, 100);
|
|
177
177
|
}, V), () => {
|
|
178
178
|
var t;
|
|
179
179
|
x && clearTimeout(x), (t = h.current) == null || t.dispose(), h.current = null;
|
|
@@ -183,5 +183,5 @@ const ze = (I) => {
|
|
|
183
183
|
return { chartId: X, ownerState: j, sx: W, error: C, other: N };
|
|
184
184
|
};
|
|
185
185
|
export {
|
|
186
|
-
|
|
186
|
+
Be as useXYChartLogic
|
|
187
187
|
};
|