@hybridcore/ui 1.6.30 → 1.6.32
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/components/charts/_common/utils.js +50 -31
- package/dist/components/charts/candlestick/logic.js +83 -86
- package/dist/components/charts/column-line-mix/logic.js +66 -70
- package/dist/components/charts/donut-chart/logic.js +61 -64
- package/dist/components/charts/drill-down-treemap/logic.js +69 -69
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +75 -75
- package/dist/components/charts/forecast-cone/logic.js +110 -114
- package/dist/components/charts/heatmap/logic.js +115 -119
- package/dist/components/charts/highlighting-line-data/logic.js +65 -64
- package/dist/components/charts/histogram/logic.js +66 -70
- package/dist/components/charts/line/logic.js +95 -99
- package/dist/components/charts/logaritmic-scale/logic.js +79 -83
- package/dist/components/charts/multiple-value-axes/logic.js +65 -69
- package/dist/components/charts/nested-pie/logic.js +49 -53
- package/dist/components/charts/packed-circles/logic.js +139 -139
- package/dist/components/charts/pie-chart/logic.js +55 -59
- package/dist/components/charts/stacked-area-radar/logic.js +92 -96
- package/dist/components/charts/stacked-column-chart/logic.js +64 -68
- package/dist/components/charts/xy-chart/logic.js +82 -86
- package/dist/components/metric-card/MetricChart.js +6 -4
- package/dist/components/paginated-list/index.js +16 -15
- package/dist/components/paginated-list/styled.js +34 -17
- package/package.json +1 -1
|
@@ -4,19 +4,19 @@ import j from "lodash";
|
|
|
4
4
|
import { useId as E, useRef as Y, useEffect as z } from "react";
|
|
5
5
|
import { humanizeLabel as I } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as q } from "../_common/tooltip.js";
|
|
7
|
-
import {
|
|
8
|
-
import { m as R, q as Z, f as x, c as f } from "../../../Entity-BJCuhdq_.js";
|
|
7
|
+
import { applyInterfaceColors as H, colorSetFromPalette as U, applyDateAxisLabelFormat as W, applyValueFormat as Z } from "../_common/utils.js";
|
|
9
8
|
import { X as $, V as J } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
9
|
import { X as K } from "../../../XYCursor-CVUSpqb9.js";
|
|
11
|
-
import { A as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { A as R, a as Q } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
11
|
+
import { m as N, q as tt, f as v, c as A } from "../../../Entity-BJCuhdq_.js";
|
|
12
|
+
import { C as et } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
|
+
import { L as st } from "../../../LineSeries-D_IL2qGF.js";
|
|
14
|
+
import { D as it, G as rt } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
15
15
|
import { R as V } from "../../../RoundedRectangle-BKLX1LKM.js";
|
|
16
|
-
import { C, G as
|
|
17
|
-
import { B as
|
|
18
|
-
import { D as
|
|
19
|
-
class
|
|
16
|
+
import { C, G as at } from "../../../Tooltip-vyZRZWih.js";
|
|
17
|
+
import { B as nt } from "../../../Button-BLY4PVJC.js";
|
|
18
|
+
import { D as ot } from "../../../DateAxis-DEXKps1S.js";
|
|
19
|
+
class x extends C {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments), Object.defineProperty(this, "thumb", {
|
|
22
22
|
enumerable: !0,
|
|
@@ -61,14 +61,14 @@ class D extends C {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
_addOrientationClass() {
|
|
64
|
-
this._settings.themeTags =
|
|
65
|
-
themeTags:
|
|
64
|
+
this._settings.themeTags = N(this._settings.themeTags, ["scrollbar", this._settings.orientation]), this._settings.background || (this._settings.background = V.new(this._root, {
|
|
65
|
+
themeTags: N(this._settings.themeTags, ["main", "background"])
|
|
66
66
|
}));
|
|
67
67
|
}
|
|
68
68
|
_makeButton() {
|
|
69
|
-
return this.children.push(
|
|
69
|
+
return this.children.push(nt.new(this._root, {
|
|
70
70
|
themeTags: ["resize", "button", this.get("orientation")],
|
|
71
|
-
icon:
|
|
71
|
+
icon: at.new(this._root, {
|
|
72
72
|
themeTags: ["icon"]
|
|
73
73
|
})
|
|
74
74
|
}));
|
|
@@ -85,23 +85,23 @@ class D extends C {
|
|
|
85
85
|
}
|
|
86
86
|
_afterNew() {
|
|
87
87
|
this._addOrientationClass(), super._afterNew();
|
|
88
|
-
const t = this.startGrip, e = this.endGrip, i = this.thumb,
|
|
89
|
-
|
|
88
|
+
const t = this.startGrip, e = this.endGrip, i = this.thumb, n = this.get("background");
|
|
89
|
+
n && this._disposers.push(n.events.on("click", (s) => {
|
|
90
90
|
this.setPrivateRaw("isBusy", !0);
|
|
91
|
-
const
|
|
91
|
+
const a = this._display.toLocal(s.point), o = this.width(), l = this.height(), d = this.get("orientation");
|
|
92
92
|
let u;
|
|
93
|
-
d == "vertical" ? u = (
|
|
94
|
-
let
|
|
95
|
-
d == "vertical" ? (
|
|
93
|
+
d == "vertical" ? u = (a.y - i.height() / 2) / l : u = (a.x - i.width() / 2) / o;
|
|
94
|
+
let h, p;
|
|
95
|
+
d == "vertical" ? (h = u * l, p = "y") : (h = u * o, p = "x");
|
|
96
96
|
const m = this.get("animationDuration", 0);
|
|
97
|
-
m > 0 ? (this._thumbBusy = !0, this._handleAnimation(this.thumb.animate({ key: p, to:
|
|
97
|
+
m > 0 ? (this._thumbBusy = !0, this._handleAnimation(this.thumb.animate({ key: p, to: h, duration: m, easing: this.get("animationEasing") }))) : (this.thumb.set(p, h), this._root.events.once("frameended", () => {
|
|
98
98
|
this.setPrivateRaw("isBusy", !1);
|
|
99
99
|
}));
|
|
100
100
|
})), this._disposers.push(i.events.on("dblclick", (s) => {
|
|
101
|
-
if (!
|
|
101
|
+
if (!tt(s.originalEvent, this))
|
|
102
102
|
return;
|
|
103
|
-
const
|
|
104
|
-
this.animate({ key: "start", to: 0, duration:
|
|
103
|
+
const a = this.get("animationDuration", 0), o = this.get("animationEasing");
|
|
104
|
+
this.animate({ key: "start", to: 0, duration: a, easing: o }), this.animate({ key: "end", to: 1, duration: a, easing: o });
|
|
105
105
|
})), this._disposers.push(t.events.on("pointerdown", () => {
|
|
106
106
|
this.setPrivateRaw("isBusy", !0), this._startDown = !0, this._gripDown = "start";
|
|
107
107
|
})), this._disposers.push(e.events.on("pointerdown", () => {
|
|
@@ -143,67 +143,63 @@ class D extends C {
|
|
|
143
143
|
* @ignore
|
|
144
144
|
*/
|
|
145
145
|
updateGrips() {
|
|
146
|
-
const t = this.startGrip, e = this.endGrip, i = this.get("orientation"),
|
|
147
|
-
i == "vertical" ? (t.set("y",
|
|
148
|
-
const
|
|
146
|
+
const t = this.startGrip, e = this.endGrip, i = this.get("orientation"), n = this.height(), s = this.width();
|
|
147
|
+
i == "vertical" ? (t.set("y", n * this.get("start", 0)), e.set("y", n * this.get("end", 1))) : (t.set("x", s * this.get("start", 0)), e.set("x", s * this.get("end", 1)));
|
|
148
|
+
const a = this.getPrivate("positionTextFunction"), o = Math.round(this.get("start", 0) * 100), l = Math.round(this.get("end", 0) * 100);
|
|
149
149
|
let d, u;
|
|
150
|
-
|
|
150
|
+
a ? (d = a.call(this, this.get("start", 0)), u = a.call(this, this.get("end", 0))) : (d = o + "%", u = l + "%"), t.set("ariaLabel", this._t("From %1", void 0, d)), t.set("ariaValueNow", "" + o), t.set("ariaValueText", o + "%"), t.set("ariaValueMin", "0"), t.set("ariaValueMax", "100"), e.set("ariaLabel", this._t("To %1", void 0, u)), e.set("ariaValueNow", "" + l), e.set("ariaValueText", l + "%"), e.set("ariaValueMin", "0"), e.set("ariaValueMax", "100");
|
|
151
151
|
}
|
|
152
152
|
_updateThumb() {
|
|
153
|
-
const t = this.thumb, e = this.startGrip, i = this.endGrip,
|
|
154
|
-
let
|
|
155
|
-
this.get("orientation") == "vertical" ?
|
|
156
|
-
const p = this.getPrivate("positionTextFunction"), m = Math.round(this.get("start", 0) * 100),
|
|
157
|
-
let g,
|
|
158
|
-
p ? (g = p.call(this, this.get("start", 0)),
|
|
153
|
+
const t = this.thumb, e = this.startGrip, i = this.endGrip, n = this.height(), s = this.width();
|
|
154
|
+
let a = e.x(), o = i.x(), l = e.y(), d = i.y(), u = 0, h = 1;
|
|
155
|
+
this.get("orientation") == "vertical" ? v(l) && v(d) && (!this._thumbBusy && !t.isDragging() && (t.set("height", d - l), t.set("y", l)), u = l / n, h = d / n) : v(a) && v(o) && (!this._thumbBusy && !t.isDragging() && (t.set("width", o - a), t.set("x", a)), u = a / s, h = o / s), this.getPrivate("isBusy") && (this.get("start") != u || this.get("end") != h) && (this.set("start", u), this.set("end", h));
|
|
156
|
+
const p = this.getPrivate("positionTextFunction"), m = Math.round(this.get("start", 0) * 100), f = Math.round(this.get("end", 0) * 100);
|
|
157
|
+
let g, _;
|
|
158
|
+
p ? (g = p.call(this, this.get("start", 0)), _ = p.call(this, this.get("end", 0))) : (g = m + "%", _ = f + "%"), t.set("ariaLabel", this._t("From %1 to %2", void 0, g, _)), t.set("ariaValueNow", "" + m), t.set("ariaValueText", m + "%");
|
|
159
159
|
}
|
|
160
160
|
_updateGripsByThumb() {
|
|
161
161
|
const t = this.thumb, e = this.startGrip, i = this.endGrip;
|
|
162
162
|
if (this.get("orientation") == "vertical") {
|
|
163
|
-
const
|
|
164
|
-
e.set("y", t.y()), i.set("y", t.y() +
|
|
163
|
+
const n = t.height();
|
|
164
|
+
e.set("y", t.y()), i.set("y", t.y() + n);
|
|
165
165
|
} else {
|
|
166
|
-
const
|
|
167
|
-
e.set("x", t.x()), i.set("x", t.x() +
|
|
166
|
+
const n = t.width();
|
|
167
|
+
e.set("x", t.x()), i.set("x", t.x() + n);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
Object.defineProperty(
|
|
171
|
+
Object.defineProperty(x, "className", {
|
|
172
172
|
enumerable: !0,
|
|
173
173
|
configurable: !0,
|
|
174
174
|
writable: !0,
|
|
175
175
|
value: "Scrollbar"
|
|
176
176
|
});
|
|
177
|
-
Object.defineProperty(
|
|
177
|
+
Object.defineProperty(x, "classNames", {
|
|
178
178
|
enumerable: !0,
|
|
179
179
|
configurable: !0,
|
|
180
180
|
writable: !0,
|
|
181
|
-
value: C.classNames.concat([
|
|
181
|
+
value: C.classNames.concat([x.className])
|
|
182
182
|
});
|
|
183
|
-
const
|
|
183
|
+
const kt = (G) => {
|
|
184
184
|
const t = X({ props: G, name: "HCLogaritmicScale" }), {
|
|
185
185
|
dimensions: e,
|
|
186
186
|
values: i,
|
|
187
|
-
data:
|
|
187
|
+
data: n,
|
|
188
188
|
initDelay: s = 0,
|
|
189
|
-
baseInterval:
|
|
190
|
-
colors:
|
|
189
|
+
baseInterval: a,
|
|
190
|
+
colors: o,
|
|
191
191
|
skipEmptyDates: l = !1,
|
|
192
192
|
sx: d,
|
|
193
193
|
...u
|
|
194
|
-
} = t,
|
|
194
|
+
} = t, h = S(), m = `hc-logaritmic-scale-${E().replace(/:/g, "")}`, f = Y(null);
|
|
195
195
|
let g = null;
|
|
196
196
|
e.length < 1 ? g = "LogaritmicScale requires at least 1 dimension" : i.length < 1 && (g = "LogaritmicScale requires at least 1 value"), z(() => {
|
|
197
197
|
if (g) return;
|
|
198
|
-
let
|
|
199
|
-
return
|
|
198
|
+
let D;
|
|
199
|
+
return D = setTimeout(() => {
|
|
200
200
|
var P, B, M, F;
|
|
201
201
|
const r = O.new(m);
|
|
202
|
-
|
|
203
|
-
text: f(a.palette.text.primary),
|
|
204
|
-
grid: f(a.palette.divider),
|
|
205
|
-
stroke: f(a.palette.divider)
|
|
206
|
-
});
|
|
202
|
+
f.current = r, r.setThemes([L.new(r)]), H(r, h);
|
|
207
203
|
const c = r.container.children.push(
|
|
208
204
|
$.new(r, {
|
|
209
205
|
panX: !0,
|
|
@@ -214,36 +210,36 @@ const Gt = (G) => {
|
|
|
214
210
|
pinchZoomX: !0
|
|
215
211
|
})
|
|
216
212
|
);
|
|
217
|
-
c.set("colors",
|
|
213
|
+
c.set("colors", U(r, o)), c.set(
|
|
218
214
|
"cursor",
|
|
219
215
|
K.new(r, { behavior: "none" })
|
|
220
216
|
).lineY.set("visible", !1);
|
|
221
|
-
let b,
|
|
217
|
+
let b, T = n;
|
|
222
218
|
if (e[0].type === "date") {
|
|
223
|
-
|
|
224
|
-
const
|
|
219
|
+
T = j.orderBy(n, [e[0].value]);
|
|
220
|
+
const w = l ? rt : ot;
|
|
225
221
|
b = c.xAxes.push(
|
|
226
|
-
|
|
222
|
+
w.new(r, {
|
|
227
223
|
maxDeviation: 0.1,
|
|
228
224
|
groupData: !1,
|
|
229
|
-
baseInterval:
|
|
230
|
-
renderer:
|
|
225
|
+
baseInterval: a || { timeUnit: "day", count: 1 },
|
|
226
|
+
renderer: R.new(r, {})
|
|
231
227
|
})
|
|
232
228
|
), (P = b.get("renderer")) == null || P.grid.template.setAll({
|
|
233
|
-
stroke:
|
|
229
|
+
stroke: A(h.palette.divider),
|
|
234
230
|
strokeOpacity: 1
|
|
235
|
-
}),
|
|
231
|
+
}), W(b, e[0]);
|
|
236
232
|
} else
|
|
237
233
|
b = c.xAxes.push(
|
|
238
|
-
|
|
234
|
+
et.new(r, {
|
|
239
235
|
categoryField: e[0].value,
|
|
240
|
-
renderer:
|
|
236
|
+
renderer: R.new(r, {})
|
|
241
237
|
})
|
|
242
238
|
), r.numberFormatter.setAll({
|
|
243
239
|
numberFormat: "#",
|
|
244
240
|
numericFields: ["valueX"]
|
|
245
|
-
}), b.data.setAll(
|
|
246
|
-
stroke:
|
|
241
|
+
}), b.data.setAll(T), (B = b.get("renderer")) == null || B.grid.template.setAll({
|
|
242
|
+
stroke: A(h.palette.divider),
|
|
247
243
|
strokeOpacity: 1
|
|
248
244
|
});
|
|
249
245
|
const k = c.yAxes.push(
|
|
@@ -253,42 +249,42 @@ const Gt = (G) => {
|
|
|
253
249
|
})
|
|
254
250
|
);
|
|
255
251
|
(M = k.get("renderer")) == null || M.grid.template.setAll({
|
|
256
|
-
stroke:
|
|
252
|
+
stroke: A(h.palette.divider),
|
|
257
253
|
strokeOpacity: 1
|
|
258
|
-
}), i.forEach((
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
name:
|
|
254
|
+
}), i.forEach((w) => {
|
|
255
|
+
const y = c.series.push(
|
|
256
|
+
st.new(r, {
|
|
257
|
+
name: w.label ?? I(w.name),
|
|
262
258
|
xAxis: b,
|
|
263
259
|
yAxis: k,
|
|
264
|
-
valueYField:
|
|
260
|
+
valueYField: w.dataFieldName,
|
|
265
261
|
...e[0].type === "date" ? { valueXField: e[0].value } : { categoryXField: e[0].value }
|
|
266
262
|
})
|
|
267
263
|
);
|
|
268
|
-
|
|
264
|
+
y.strokes.template.setAll({ strokeWidth: 3 }), e[0].type === "date" && (y.data.processor = it.new(r, {
|
|
269
265
|
dateFormat: "i",
|
|
270
266
|
dateFields: [e[0].value]
|
|
271
|
-
})),
|
|
267
|
+
})), y.data.setAll(T), y.appear(1e3);
|
|
272
268
|
}), q({
|
|
273
269
|
root: r,
|
|
274
270
|
chart: c,
|
|
275
271
|
xAxis: b,
|
|
276
|
-
theme:
|
|
272
|
+
theme: h,
|
|
277
273
|
isDateAxis: e[0].type === "date",
|
|
278
|
-
baseInterval:
|
|
274
|
+
baseInterval: a,
|
|
279
275
|
follow: !0
|
|
280
276
|
}), c.set(
|
|
281
277
|
"scrollbarX",
|
|
282
|
-
|
|
283
|
-
),
|
|
278
|
+
x.new(r, { orientation: "horizontal" })
|
|
279
|
+
), Z(r, (F = i == null ? void 0 : i[0]) == null ? void 0 : F.format), c.appear(1e3, 100);
|
|
284
280
|
}, s), () => {
|
|
285
281
|
var r;
|
|
286
|
-
|
|
282
|
+
D && clearTimeout(D), (r = f.current) == null || r.dispose(), f.current = null;
|
|
287
283
|
};
|
|
288
|
-
}, [
|
|
289
|
-
const
|
|
290
|
-
return { chartId: m, ownerState:
|
|
284
|
+
}, [n, e, i, h.palette.mode, o, l]);
|
|
285
|
+
const _ = { ...t };
|
|
286
|
+
return { chartId: m, ownerState: _, sx: d, error: g, other: u };
|
|
291
287
|
};
|
|
292
288
|
export {
|
|
293
|
-
|
|
289
|
+
kt as useLogaritmicScaleLogic
|
|
294
290
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
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 Q, applyDateAxisLabelFormat as Z, applyValueFormat as ee } from "../_common/utils.js";
|
|
8
|
-
import { c as v, a as g } from "../../../Entity-BJCuhdq_.js";
|
|
1
|
+
import { R as M, A as j } from "../../../AnimatedTheme-ktdO3Bel.js";
|
|
2
|
+
import { useThemeProps as q, useTheme as z } from "@mui/material";
|
|
3
|
+
import F from "lodash";
|
|
4
|
+
import { useId as U, useRef as H, useEffect as $ } from "react";
|
|
5
|
+
import { humanizeLabel as N } from "../_common/format.js";
|
|
6
|
+
import { attachCombinedAxisTooltip as J } from "../_common/tooltip.js";
|
|
7
|
+
import { applyInterfaceColors as K, colorSetFromPalette as Q, applyDateAxisLabelFormat as Z, applyValueFormat as ee } from "../_common/utils.js";
|
|
9
8
|
import { X as te, V as re } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
9
|
import { L as se } from "../../../Legend-CFvQiIfn.js";
|
|
11
|
-
import {
|
|
10
|
+
import { a as f } from "../../../Entity-BJCuhdq_.js";
|
|
11
|
+
import { A as I, a as ae } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
12
12
|
import { C as ie } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
13
|
import { X as oe } from "../../../XYCursor-CVUSpqb9.js";
|
|
14
14
|
import { G as le, D as ne } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
15
15
|
import { D as ce } from "../../../DateAxis-DEXKps1S.js";
|
|
16
16
|
import { L as me } from "../../../LineSeries-D_IL2qGF.js";
|
|
17
|
-
import { G, R as
|
|
18
|
-
import { C as
|
|
19
|
-
import { B as
|
|
20
|
-
class
|
|
17
|
+
import { G as P, R as ue } from "../../../Tooltip-vyZRZWih.js";
|
|
18
|
+
import { C as pe } from "../../../Circle-BnfBNKBD.js";
|
|
19
|
+
import { B as he } from "../../../Bullet-Djj7Vs9T.js";
|
|
20
|
+
class A extends P {
|
|
21
21
|
_beforeChanged() {
|
|
22
22
|
super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
|
|
23
23
|
}
|
|
@@ -32,42 +32,38 @@ class x extends G {
|
|
|
32
32
|
this.markDirty(), this._clear = !0;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
Object.defineProperty(
|
|
35
|
+
Object.defineProperty(A, "className", {
|
|
36
36
|
enumerable: !0,
|
|
37
37
|
configurable: !0,
|
|
38
38
|
writable: !0,
|
|
39
39
|
value: "Triangle"
|
|
40
40
|
});
|
|
41
|
-
Object.defineProperty(
|
|
41
|
+
Object.defineProperty(A, "classNames", {
|
|
42
42
|
enumerable: !0,
|
|
43
43
|
configurable: !0,
|
|
44
44
|
writable: !0,
|
|
45
|
-
value:
|
|
45
|
+
value: P.classNames.concat([A.className])
|
|
46
46
|
});
|
|
47
|
-
const
|
|
48
|
-
const c =
|
|
47
|
+
const g = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Xe = (C) => {
|
|
48
|
+
const c = q({ props: C, name: "HCMultipleValueAxes" }), {
|
|
49
49
|
dimensions: s,
|
|
50
50
|
values: t,
|
|
51
|
-
data:
|
|
52
|
-
initDelay:
|
|
51
|
+
data: x,
|
|
52
|
+
initDelay: X = 0,
|
|
53
53
|
baseInterval: T,
|
|
54
|
-
colors:
|
|
55
|
-
skipEmptyDates:
|
|
56
|
-
sx:
|
|
57
|
-
...
|
|
58
|
-
} = c,
|
|
54
|
+
colors: v,
|
|
55
|
+
skipEmptyDates: L = !1,
|
|
56
|
+
sx: G,
|
|
57
|
+
...Y
|
|
58
|
+
} = c, y = z(), R = `hc-multiple-value-axes-${U().replace(/:/g, "")}`, w = H(null);
|
|
59
59
|
let u = null;
|
|
60
|
-
s.length < 1 ? u = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (u = "MultipleValueAxes requires at least 1 value"),
|
|
60
|
+
s.length < 1 ? u = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (u = "MultipleValueAxes requires at least 1 value"), $(() => {
|
|
61
61
|
if (u) return;
|
|
62
62
|
let b;
|
|
63
63
|
return b = setTimeout(() => {
|
|
64
|
-
var
|
|
65
|
-
const e =
|
|
66
|
-
w.current = e, e.setThemes([
|
|
67
|
-
text: v(p.palette.text.primary),
|
|
68
|
-
grid: v(p.palette.divider),
|
|
69
|
-
stroke: v(p.palette.divider)
|
|
70
|
-
});
|
|
64
|
+
var _;
|
|
65
|
+
const e = M.new(R);
|
|
66
|
+
w.current = e, e.setThemes([j.new(e)]), K(e, y);
|
|
71
67
|
const r = e.container.children.push(
|
|
72
68
|
te.new(e, {
|
|
73
69
|
panX: !1,
|
|
@@ -78,33 +74,33 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (C) => {
|
|
|
78
74
|
layout: e.verticalLayout
|
|
79
75
|
})
|
|
80
76
|
);
|
|
81
|
-
r.set("colors", Q(e,
|
|
82
|
-
const
|
|
83
|
-
se.new(e, { centerX:
|
|
77
|
+
r.set("colors", Q(e, v)), r.get("colors", {}).set("step", 3);
|
|
78
|
+
const O = r.children.push(
|
|
79
|
+
se.new(e, { centerX: f, x: f })
|
|
84
80
|
), o = s[0];
|
|
85
|
-
let l,
|
|
81
|
+
let l, p = x;
|
|
86
82
|
if (o.type === "date") {
|
|
87
|
-
const a =
|
|
83
|
+
const a = L ? le : ce;
|
|
88
84
|
l = r.xAxes.push(
|
|
89
85
|
a.new(e, {
|
|
90
86
|
maxDeviation: 0.1,
|
|
91
87
|
groupData: !1,
|
|
92
88
|
baseInterval: T || { timeUnit: "day", count: 1 },
|
|
93
|
-
renderer:
|
|
89
|
+
renderer: I.new(e, {})
|
|
94
90
|
})
|
|
95
|
-
), Z(l, o),
|
|
91
|
+
), Z(l, o), p = F.orderBy(x, [o.value]);
|
|
96
92
|
} else
|
|
97
93
|
l = r.xAxes.push(
|
|
98
94
|
ie.new(e, {
|
|
99
95
|
categoryField: o.value,
|
|
100
|
-
renderer:
|
|
96
|
+
renderer: I.new(e, {})
|
|
101
97
|
})
|
|
102
98
|
), e.numberFormatter.setAll({
|
|
103
99
|
numberFormat: "#",
|
|
104
100
|
numericFields: ["valueX"]
|
|
105
|
-
}), l.data.setAll(
|
|
106
|
-
function
|
|
107
|
-
const h = ae.new(e, { opposite:
|
|
101
|
+
}), l.data.setAll(p);
|
|
102
|
+
function E(a, n, m, S, B, D, W) {
|
|
103
|
+
const h = ae.new(e, { opposite: B }), k = r.yAxes.push(
|
|
108
104
|
re.new(e, { maxDeviation: 1, renderer: h })
|
|
109
105
|
);
|
|
110
106
|
r.yAxes.indexOf(k) > 0 && k.set("syncWithAxis", r.yAxes.getIndex(0));
|
|
@@ -113,7 +109,7 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (C) => {
|
|
|
113
109
|
name: n,
|
|
114
110
|
xAxis: l,
|
|
115
111
|
yAxis: k,
|
|
116
|
-
valueYField:
|
|
112
|
+
valueYField: S,
|
|
117
113
|
...o.type === "date" ? { valueXField: m } : { categoryXField: m }
|
|
118
114
|
})
|
|
119
115
|
);
|
|
@@ -121,77 +117,77 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (C) => {
|
|
|
121
117
|
stroke: i.get("fill"),
|
|
122
118
|
strokeOpacity: 1,
|
|
123
119
|
opacity: 1
|
|
124
|
-
}),
|
|
120
|
+
}), W === "date" && (i.data.processor = ne.new(e, {
|
|
125
121
|
dateFormat: "i",
|
|
126
122
|
dateFields: [m]
|
|
127
123
|
})), D !== void 0 && i.bullets.push(function() {
|
|
128
|
-
let
|
|
129
|
-
return D === "RECTANGLE" ?
|
|
124
|
+
let d;
|
|
125
|
+
return D === "RECTANGLE" ? d = ue.new(e, {
|
|
130
126
|
width: 10,
|
|
131
127
|
height: 10,
|
|
132
|
-
centerX:
|
|
133
|
-
centerY:
|
|
128
|
+
centerX: f,
|
|
129
|
+
centerY: f,
|
|
134
130
|
strokeWidth: 2,
|
|
135
131
|
stroke: i.get("stroke"),
|
|
136
132
|
fill: e.interfaceColors.get("background")
|
|
137
|
-
}) : D === "TRIANGLE" ?
|
|
133
|
+
}) : D === "TRIANGLE" ? d = A.new(e, {
|
|
138
134
|
width: 10,
|
|
139
135
|
height: 10,
|
|
140
136
|
strokeWidth: 2,
|
|
141
137
|
stroke: i.get("stroke"),
|
|
142
138
|
fill: e.interfaceColors.get("background")
|
|
143
|
-
}) :
|
|
139
|
+
}) : d = pe.new(e, {
|
|
144
140
|
strokeWidth: 2,
|
|
145
141
|
radius: 4,
|
|
146
142
|
stroke: i.get("stroke"),
|
|
147
143
|
fill: e.interfaceColors.get("background")
|
|
148
|
-
}),
|
|
144
|
+
}), he.new(e, { sprite: d });
|
|
149
145
|
}), i.data.setAll(a);
|
|
150
146
|
}
|
|
151
147
|
if (r.set(
|
|
152
148
|
"cursor",
|
|
153
149
|
oe.new(e, { xAxis: l, behavior: "none" })
|
|
154
|
-
).lineY.set("visible", !1),
|
|
150
|
+
).lineY.set("visible", !1), J({
|
|
155
151
|
root: e,
|
|
156
152
|
chart: r,
|
|
157
153
|
xAxis: l,
|
|
158
|
-
theme:
|
|
154
|
+
theme: y,
|
|
159
155
|
isDateAxis: o.type === "date",
|
|
160
156
|
baseInterval: T,
|
|
161
157
|
follow: !0
|
|
162
158
|
}), s.length > 1) {
|
|
163
|
-
const a =
|
|
159
|
+
const a = F.groupBy(p, s[1].value);
|
|
164
160
|
Object.keys(a).forEach((n, m) => {
|
|
165
|
-
|
|
161
|
+
E(
|
|
166
162
|
a[n],
|
|
167
|
-
|
|
163
|
+
N(n),
|
|
168
164
|
s[0].value,
|
|
169
165
|
t[0].dataFieldName,
|
|
170
166
|
m !== 0,
|
|
171
|
-
|
|
167
|
+
g[m % g.length]
|
|
172
168
|
);
|
|
173
169
|
});
|
|
174
170
|
} else
|
|
175
171
|
t.forEach((a, n) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
a.label ??
|
|
172
|
+
E(
|
|
173
|
+
p,
|
|
174
|
+
a.label ?? N(a.name),
|
|
179
175
|
o.value,
|
|
180
176
|
a.dataFieldName,
|
|
181
177
|
n !== 0,
|
|
182
|
-
|
|
178
|
+
g[n % g.length],
|
|
183
179
|
o.type
|
|
184
180
|
);
|
|
185
181
|
});
|
|
186
|
-
|
|
187
|
-
},
|
|
182
|
+
O.data.setAll(r.series.values), ee(e, (_ = t == null ? void 0 : t[0]) == null ? void 0 : _.format), r.appear(1e3, 100);
|
|
183
|
+
}, X), () => {
|
|
188
184
|
var e;
|
|
189
185
|
b && clearTimeout(b), (e = w.current) == null || e.dispose(), w.current = null;
|
|
190
186
|
};
|
|
191
|
-
}, [
|
|
192
|
-
const
|
|
193
|
-
return { chartId:
|
|
187
|
+
}, [x, s, t, y.palette.mode, v, L]);
|
|
188
|
+
const V = { ...c };
|
|
189
|
+
return { chartId: R, ownerState: V, sx: G, error: u, other: Y };
|
|
194
190
|
};
|
|
195
191
|
export {
|
|
196
|
-
|
|
192
|
+
Xe as useMultipleValueAxesLogic
|
|
197
193
|
};
|