@hybridcore/ui 1.6.7 → 1.6.9
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 +7708 -0
- package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-lUbezuh7.js} +51 -49
- package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-DbSiyb45.js} +3 -3
- package/dist/{Bullet-DVczI2TD.js → Bullet-PgoNb3Jv.js} +1 -1
- package/dist/{Button-CcsPEIDh.js → Button-XBf4Mwz-.js} +3 -3
- package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B8KQp1pE.js} +3 -3
- package/dist/{Circle-Cy5s-pVc.js → Circle-BWRdiMpG.js} +1 -1
- package/dist/ColorSet-DDmFoKtZ.js +77 -0
- package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-rgnGm-Bg.js} +4 -4
- package/dist/{DataProcessor-CHDO51q4.js → DataProcessor-CvIe9BVn.js} +1 -1
- package/dist/{DateAxis-YX3QNIB-.js → DateAxis-zNtbSVjW.js} +8 -7
- package/dist/{ColorSet-C7vpNXhM.js → Entity-CCUIdRAr.js} +638 -712
- package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CCvGsF1A.js} +25 -23
- package/dist/{Legend-Dp_MKfS4.js → Legend-kbCFjJAW.js} +11 -10
- package/dist/{LineSeries-Uiv5o56b.js → LineSeries-BLFvwrLT.js} +13 -12
- package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-C7rnipF7.js} +11 -11
- package/dist/{PieSeries-B2fW3z0s.js → PieSeries-3iLRbqFv.js} +34 -32
- package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-CqMMmPM0.js} +4 -4
- package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-BzSBcIUt.js} +4 -4
- package/dist/{Slice-B19rbYDZ.js → Slice-CS23iLiS.js} +2 -2
- package/dist/{Tick-2bcLyHpF.js → Tick-BADQ8QeT.js} +15 -15
- package/dist/Tooltip-A_HlttXp.js +3606 -0
- package/dist/{XYCursor-C8WktvKM.js → XYCursor-gHAo40xC.js} +3 -3
- package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Brs1wHM1.js} +9 -9
- package/dist/components/charts/_common/tooltip.js +73 -0
- package/dist/components/charts/_common/utils.js +10 -9
- package/dist/components/charts/candlestick/logic.js +181 -156
- package/dist/components/charts/column-line-mix/logic.js +80 -77
- package/dist/components/charts/donut-chart/logic.js +36 -34
- package/dist/components/charts/drill-down-treemap/logic.js +49 -48
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +102 -101
- package/dist/components/charts/heatmap/logic.js +33 -32
- package/dist/components/charts/highlighting-line-data/logic.js +26 -24
- package/dist/components/charts/line/logic.js +123 -174
- package/dist/components/charts/logaritmic-scale/logic.js +69 -60
- package/dist/components/charts/multiple-value-axes/logic.js +93 -88
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +28 -27
- package/dist/components/charts/pie-chart/logic.js +43 -41
- package/dist/components/charts/stacked-area-radar/logic.js +124 -121
- package/dist/components/charts/stacked-column-chart/logic.js +107 -95
- package/dist/components/charts/xy-chart/logic.js +103 -91
- package/dist/components/metric-card/MetricChart.js +29 -28
- package/dist/components/metric-card/index.js +1 -1
- package/dist/components/metric-card/logic.js +74 -67
- package/dist/components/metric-card/styled.js +55 -46
- package/package.json +1 -1
- package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useId as
|
|
6
|
-
import { humanizeLabel as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
import { T as me, s as ae, R as Ae, A as pe } from "../../../AnimatedTheme-BOKdw2Oy.js";
|
|
2
|
+
import { useThemeProps as xe, useTheme as ve } from "@mui/material";
|
|
3
|
+
import ye from "dayjs";
|
|
4
|
+
import U from "lodash";
|
|
5
|
+
import { useId as be, useRef as Pe, useEffect as Re } from "react";
|
|
6
|
+
import { humanizeLabel as _e } from "../_common/format.js";
|
|
7
|
+
import { attachCombinedAxisTooltip as we } from "../_common/tooltip.js";
|
|
8
|
+
import { applyValueFormat as Te, colorSetFromPalette as Ce } from "../_common/utils.js";
|
|
9
|
+
import { m as M, w as R, b as J, f as m, p as w, a as N, P as Le, c as Y } from "../../../Entity-CCUIdRAr.js";
|
|
10
|
+
import { a as E, X as ue, V as Me } from "../../../AxisRenderer-lUbezuh7.js";
|
|
11
|
+
import { a as W, b as q, h as c, c as h, s as g, C as De, G as $, g as re, m as Ye, n as D, D as L, f as ne, i as le } from "../../../Tooltip-A_HlttXp.js";
|
|
12
|
+
import { R as de, S as Ne, a as I } from "../../../Slice-CS23iLiS.js";
|
|
13
|
+
import { X as he } from "../../../XYCursor-gHAo40xC.js";
|
|
14
|
+
import { C as oe } from "../../../CategoryAxis-B8KQp1pE.js";
|
|
15
|
+
import { L as ge } from "../../../LineSeries-BLFvwrLT.js";
|
|
16
|
+
import { L as Oe } from "../../../Legend-kbCFjJAW.js";
|
|
17
|
+
class O extends de {
|
|
16
18
|
constructor() {
|
|
17
19
|
super(...arguments), Object.defineProperty(this, "_tickPoints", {
|
|
18
20
|
enumerable: !0,
|
|
@@ -32,29 +34,29 @@ Object.defineProperty(O, "classNames", {
|
|
|
32
34
|
enumerable: !0,
|
|
33
35
|
configurable: !0,
|
|
34
36
|
writable: !0,
|
|
35
|
-
value:
|
|
37
|
+
value: de.classNames.concat([O.className])
|
|
36
38
|
});
|
|
37
|
-
class G extends
|
|
39
|
+
class G extends E {
|
|
38
40
|
constructor() {
|
|
39
41
|
super(...arguments), Object.defineProperty(this, "labels", {
|
|
40
42
|
enumerable: !0,
|
|
41
43
|
configurable: !0,
|
|
42
44
|
writable: !0,
|
|
43
|
-
value: this.addDisposer(new
|
|
45
|
+
value: this.addDisposer(new W(q.new({}), () => O._new(this._root, {
|
|
44
46
|
themeTags: M(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
45
47
|
}, [this.labels.template])))
|
|
46
48
|
}), Object.defineProperty(this, "axisFills", {
|
|
47
49
|
enumerable: !0,
|
|
48
50
|
configurable: !0,
|
|
49
51
|
writable: !0,
|
|
50
|
-
value: this.addDisposer(new
|
|
52
|
+
value: this.addDisposer(new W(q.new({}), () => Ne._new(this._root, {
|
|
51
53
|
themeTags: M(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
|
|
52
54
|
}, [this.axisFills.template])))
|
|
53
55
|
}), Object.defineProperty(this, "_fillGenerator", {
|
|
54
56
|
enumerable: !0,
|
|
55
57
|
configurable: !0,
|
|
56
58
|
writable: !0,
|
|
57
|
-
value:
|
|
59
|
+
value: I()
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
_afterNew() {
|
|
@@ -76,7 +78,7 @@ class G extends I {
|
|
|
76
78
|
const e = this.chart;
|
|
77
79
|
if (e) {
|
|
78
80
|
const t = e.getPrivate("radius", 0);
|
|
79
|
-
let s = R(this.get("radius",
|
|
81
|
+
let s = R(this.get("radius", J), t);
|
|
80
82
|
s < 0 && (s = t + s), this.setPrivate("radius", s);
|
|
81
83
|
let i = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t) * e.getPrivate("irModifyer", 1);
|
|
82
84
|
i < 0 && (i = s + i), this.setPrivate("innerRadius", i);
|
|
@@ -227,20 +229,20 @@ Object.defineProperty(G, "classNames", {
|
|
|
227
229
|
enumerable: !0,
|
|
228
230
|
configurable: !0,
|
|
229
231
|
writable: !0,
|
|
230
|
-
value:
|
|
232
|
+
value: E.classNames.concat([G.className])
|
|
231
233
|
});
|
|
232
|
-
class
|
|
234
|
+
class j extends E {
|
|
233
235
|
constructor() {
|
|
234
236
|
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
235
237
|
enumerable: !0,
|
|
236
238
|
configurable: !0,
|
|
237
239
|
writable: !0,
|
|
238
|
-
value:
|
|
240
|
+
value: I()
|
|
239
241
|
}), Object.defineProperty(this, "labels", {
|
|
240
242
|
enumerable: !0,
|
|
241
243
|
configurable: !0,
|
|
242
244
|
writable: !0,
|
|
243
|
-
value: this.addDisposer(new
|
|
245
|
+
value: this.addDisposer(new W(q.new({}), () => O._new(this._root, {
|
|
244
246
|
themeTags: M(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
245
247
|
}, [this.labels.template])))
|
|
246
248
|
});
|
|
@@ -264,7 +266,7 @@ class k extends I {
|
|
|
264
266
|
const e = this.chart;
|
|
265
267
|
if (e) {
|
|
266
268
|
const t = e.getPrivate("radius", 0);
|
|
267
|
-
let s = R(this.get("radius",
|
|
269
|
+
let s = R(this.get("radius", J), t), i = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t) * e.getPrivate("irModifyer", 1);
|
|
268
270
|
i < 0 && (i = s + i), this.setPrivate("radius", s), this.setPrivate("innerRadius", i);
|
|
269
271
|
let a = this.get("startAngle", e.get("startAngle", -90)), r = this.get("endAngle", e.get("endAngle", 270));
|
|
270
272
|
this.setPrivate("startAngle", a), this.setPrivate("endAngle", r);
|
|
@@ -397,19 +399,19 @@ class k extends I {
|
|
|
397
399
|
this._positionTooltip(e, { x: s * h(i), y: s * g(i) });
|
|
398
400
|
}
|
|
399
401
|
}
|
|
400
|
-
Object.defineProperty(
|
|
402
|
+
Object.defineProperty(j, "className", {
|
|
401
403
|
enumerable: !0,
|
|
402
404
|
configurable: !0,
|
|
403
405
|
writable: !0,
|
|
404
406
|
value: "AxisRendererRadial"
|
|
405
407
|
});
|
|
406
|
-
Object.defineProperty(
|
|
408
|
+
Object.defineProperty(j, "classNames", {
|
|
407
409
|
enumerable: !0,
|
|
408
410
|
configurable: !0,
|
|
409
411
|
writable: !0,
|
|
410
|
-
value:
|
|
412
|
+
value: E.classNames.concat([j.className])
|
|
411
413
|
});
|
|
412
|
-
class
|
|
414
|
+
class Se extends me {
|
|
413
415
|
setupDefaultRules() {
|
|
414
416
|
super.setupDefaultRules();
|
|
415
417
|
const e = this.rule.bind(this), t = this._root.interfaceColors;
|
|
@@ -468,28 +470,28 @@ class Xe extends xe {
|
|
|
468
470
|
const s = e("Graphics", ["clock", "hand"]);
|
|
469
471
|
s.setAll({
|
|
470
472
|
fillOpacity: 1
|
|
471
|
-
}),
|
|
473
|
+
}), ae(s, "fill", t, "alternativeBackground");
|
|
472
474
|
}
|
|
473
475
|
{
|
|
474
476
|
const s = e("Graphics", ["clock", "pin"]);
|
|
475
477
|
s.setAll({
|
|
476
478
|
fillOpacity: 1
|
|
477
|
-
}),
|
|
479
|
+
}), ae(s, "fill", t, "alternativeBackground");
|
|
478
480
|
}
|
|
479
481
|
}
|
|
480
482
|
}
|
|
481
|
-
class
|
|
483
|
+
class k extends ue {
|
|
482
484
|
constructor() {
|
|
483
485
|
super(...arguments), Object.defineProperty(this, "radarContainer", {
|
|
484
486
|
enumerable: !0,
|
|
485
487
|
configurable: !0,
|
|
486
488
|
writable: !0,
|
|
487
|
-
value: this.plotContainer.children.push(
|
|
489
|
+
value: this.plotContainer.children.push(De.new(this._root, { x: N, y: N }))
|
|
488
490
|
}), Object.defineProperty(this, "_arcGenerator", {
|
|
489
491
|
enumerable: !0,
|
|
490
492
|
configurable: !0,
|
|
491
493
|
writable: !0,
|
|
492
|
-
value:
|
|
494
|
+
value: I()
|
|
493
495
|
}), Object.defineProperty(this, "_maxRadius", {
|
|
494
496
|
enumerable: !0,
|
|
495
497
|
configurable: !0,
|
|
@@ -498,9 +500,9 @@ class B extends ge {
|
|
|
498
500
|
});
|
|
499
501
|
}
|
|
500
502
|
_afterNew() {
|
|
501
|
-
this._defaultThemes.push(
|
|
503
|
+
this._defaultThemes.push(Se.new(this._root)), super._afterNew();
|
|
502
504
|
const e = this.radarContainer, t = this.gridContainer, s = this.topGridContainer, i = this.seriesContainer, a = this.bulletsContainer;
|
|
503
|
-
e.children.pushAll([t, i, s, a]), i.set("mask",
|
|
505
|
+
e.children.pushAll([t, i, s, a]), i.set("mask", $.new(this._root, {})), t.set("mask", $.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
504
506
|
this._updateRadius();
|
|
505
507
|
}));
|
|
506
508
|
}
|
|
@@ -509,14 +511,14 @@ class B extends ge {
|
|
|
509
511
|
_prepareChildren() {
|
|
510
512
|
if (super._prepareChildren(), this._sizeDirty || this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) {
|
|
511
513
|
const e = this.chartContainer, t = e.innerWidth(), s = e.innerHeight(), i = this.get("startAngle", 0), a = this.get("endAngle", 0), r = this.get("innerRadius");
|
|
512
|
-
let n =
|
|
514
|
+
let n = re(0, 0, i, a, 1);
|
|
513
515
|
const l = t / (n.right - n.left), u = s / (n.bottom - n.top);
|
|
514
516
|
let o = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
515
|
-
if (r instanceof
|
|
517
|
+
if (r instanceof Le) {
|
|
516
518
|
let f = r.value, T = Math.min(l, u);
|
|
517
|
-
f = Math.max(T * f, T - Math.min(s, t)) / T, o =
|
|
519
|
+
f = Math.max(T * f, T - Math.min(s, t)) / T, o = re(0, 0, i, a, f), this.setPrivateRaw("irModifyer", f / r.value);
|
|
518
520
|
}
|
|
519
|
-
n =
|
|
521
|
+
n = Ye([n, o]), this._maxRadius = Math.max(0, Math.min(l, u));
|
|
520
522
|
const y = R(this.get("radius", 0), this._maxRadius);
|
|
521
523
|
this.radarContainer.setAll({
|
|
522
524
|
dy: -y * (n.bottom + n.top) / 2,
|
|
@@ -564,8 +566,8 @@ class B extends ge {
|
|
|
564
566
|
* @ignore
|
|
565
567
|
*/
|
|
566
568
|
inPlot(e, t, s) {
|
|
567
|
-
const i = Math.hypot(e.x, e.y), a =
|
|
568
|
-
let r =
|
|
569
|
+
const i = Math.hypot(e.x, e.y), a = D(Math.atan2(e.y, e.x) * L);
|
|
570
|
+
let r = D(this.get("startAngle", 0)), n = D(this.get("endAngle", 0)), l = !1;
|
|
569
571
|
return r < n && r < a && a < n && (l = !0), r > n && (a > r && (l = !0), a < n && (l = !0)), r == n && (l = !0), l ? (t == null && (t = this.getPrivate("radius", 0)), s == null && (s = this.getPrivate("innerRadius", 0)), s > t && ([s, t] = [t, s]), i <= t + 0.5 && i >= s - 0.5) : !1;
|
|
570
572
|
}
|
|
571
573
|
_tooltipToLocal(e) {
|
|
@@ -574,25 +576,25 @@ class B extends ge {
|
|
|
574
576
|
_handlePinch() {
|
|
575
577
|
}
|
|
576
578
|
}
|
|
577
|
-
Object.defineProperty(
|
|
579
|
+
Object.defineProperty(k, "className", {
|
|
578
580
|
enumerable: !0,
|
|
579
581
|
configurable: !0,
|
|
580
582
|
writable: !0,
|
|
581
583
|
value: "RadarChart"
|
|
582
584
|
});
|
|
583
|
-
Object.defineProperty(
|
|
585
|
+
Object.defineProperty(k, "classNames", {
|
|
584
586
|
enumerable: !0,
|
|
585
587
|
configurable: !0,
|
|
586
588
|
writable: !0,
|
|
587
|
-
value:
|
|
589
|
+
value: ue.classNames.concat([k.className])
|
|
588
590
|
});
|
|
589
|
-
class
|
|
591
|
+
class B extends he {
|
|
590
592
|
constructor() {
|
|
591
593
|
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
592
594
|
enumerable: !0,
|
|
593
595
|
configurable: !0,
|
|
594
596
|
writable: !0,
|
|
595
|
-
value:
|
|
597
|
+
value: I()
|
|
596
598
|
});
|
|
597
599
|
}
|
|
598
600
|
_afterNew() {
|
|
@@ -604,9 +606,9 @@ class F extends fe {
|
|
|
604
606
|
}
|
|
605
607
|
_getPosition(e) {
|
|
606
608
|
const t = Math.hypot(e.x, e.y);
|
|
607
|
-
let s =
|
|
609
|
+
let s = D(Math.atan2(e.y, e.x) * L);
|
|
608
610
|
const i = this.getPrivate("innerRadius");
|
|
609
|
-
let a =
|
|
611
|
+
let a = D(this.getPrivate("startAngle")), r = D(this.getPrivate("endAngle"));
|
|
610
612
|
(r < a || r == a) && (s < a && (s += 360), r = r + 360);
|
|
611
613
|
let n = (s - a) / (r - a);
|
|
612
614
|
return n < 0 && (n = 1 + n), n < 3e-3 && (n = 0), n > 0.997 && (n = 1), { x: n, y: (t - i) / (this.getPrivate("radius") - i) };
|
|
@@ -622,7 +624,7 @@ class F extends fe {
|
|
|
622
624
|
const e = this.chart;
|
|
623
625
|
if (e) {
|
|
624
626
|
const t = e.getPrivate("radius", 0);
|
|
625
|
-
this.setPrivate("radius", R(this.get("radius",
|
|
627
|
+
this.setPrivate("radius", R(this.get("radius", J), t));
|
|
626
628
|
let s = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t);
|
|
627
629
|
s < 0 && (s = t + s), this.setPrivate("innerRadius", s);
|
|
628
630
|
let i = this.get("startAngle", e.get("startAngle", -90)), a = this.get("endAngle", e.get("endAngle", 270));
|
|
@@ -662,25 +664,25 @@ class F extends fe {
|
|
|
662
664
|
let n = this.getPrivate("radius"), l = this.getPrivate("innerRadius");
|
|
663
665
|
n < l && ([n, l] = [l, n]);
|
|
664
666
|
let u = a, o = r, y = n, f = l;
|
|
665
|
-
i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) *
|
|
667
|
+
i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) * L, o = Math.atan2(e.y, e.x) * L, f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y)) : s == "zoomX" || s == "selectX" ? (u = Math.atan2(i.y, i.x) * L, o = Math.atan2(e.y, e.x) * L) : (s == "zoomY" || s == "selectY") && (f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y))), f = ne(f, l, n), y = ne(y, l, n), u = le(u, a, r), o = le(o, a, r), u == o && (o = u + 360), u *= c, o *= c, this._fillGenerator.context(t), this._fillGenerator({ innerRadius: f, outerRadius: y, startAngle: u + Math.PI / 2, endAngle: o + Math.PI / 2 });
|
|
666
668
|
});
|
|
667
669
|
}
|
|
668
670
|
}
|
|
669
|
-
Object.defineProperty(
|
|
671
|
+
Object.defineProperty(B, "className", {
|
|
670
672
|
enumerable: !0,
|
|
671
673
|
configurable: !0,
|
|
672
674
|
writable: !0,
|
|
673
675
|
value: "RadarCursor"
|
|
674
676
|
});
|
|
675
|
-
Object.defineProperty(
|
|
677
|
+
Object.defineProperty(B, "classNames", {
|
|
676
678
|
enumerable: !0,
|
|
677
679
|
configurable: !0,
|
|
678
680
|
writable: !0,
|
|
679
|
-
value:
|
|
681
|
+
value: he.classNames.concat([B.className])
|
|
680
682
|
});
|
|
681
|
-
class
|
|
683
|
+
class F extends ge {
|
|
682
684
|
_afterNew() {
|
|
683
|
-
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask",
|
|
685
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", $.new(this._root, {}));
|
|
684
686
|
}
|
|
685
687
|
_handleMaskBullets() {
|
|
686
688
|
}
|
|
@@ -709,20 +711,20 @@ class E extends me {
|
|
|
709
711
|
}
|
|
710
712
|
}
|
|
711
713
|
}
|
|
712
|
-
Object.defineProperty(
|
|
714
|
+
Object.defineProperty(F, "className", {
|
|
713
715
|
enumerable: !0,
|
|
714
716
|
configurable: !0,
|
|
715
717
|
writable: !0,
|
|
716
718
|
value: "RadarLineSeries"
|
|
717
719
|
});
|
|
718
|
-
Object.defineProperty(
|
|
720
|
+
Object.defineProperty(F, "classNames", {
|
|
719
721
|
enumerable: !0,
|
|
720
722
|
configurable: !0,
|
|
721
723
|
writable: !0,
|
|
722
|
-
value:
|
|
724
|
+
value: ge.classNames.concat([F.className])
|
|
723
725
|
});
|
|
724
|
-
const
|
|
725
|
-
const e =
|
|
726
|
+
const Ze = (_) => {
|
|
727
|
+
const e = xe({ props: _, name: "HCStackedAreaRadar" }), {
|
|
726
728
|
dimensions: t,
|
|
727
729
|
values: s,
|
|
728
730
|
data: i,
|
|
@@ -731,46 +733,47 @@ const Qe = (_) => {
|
|
|
731
733
|
colors: n,
|
|
732
734
|
sx: l,
|
|
733
735
|
...u
|
|
734
|
-
} = e, o =
|
|
736
|
+
} = e, o = ve(), f = `hc-stacked-area-radar-${be().replace(/:/g, "")}`, T = Pe(null);
|
|
735
737
|
let S = null;
|
|
736
|
-
t.length < 2 ? S = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (S = "StackedAreaRadar requires at least 1 value"),
|
|
738
|
+
t.length < 2 ? S = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (S = "StackedAreaRadar requires at least 1 value"), Re(() => {
|
|
737
739
|
if (S) return;
|
|
738
|
-
let
|
|
739
|
-
return
|
|
740
|
-
var
|
|
741
|
-
const d =
|
|
742
|
-
T.current = d,
|
|
740
|
+
let V;
|
|
741
|
+
return V = setTimeout(() => {
|
|
742
|
+
var te, se, ie;
|
|
743
|
+
const d = Ae.new(f);
|
|
744
|
+
T.current = d, Te(d, (te = s == null ? void 0 : s[0]) == null ? void 0 : te.format), d.setThemes([pe.new(d)]), d.interfaceColors.setAll({
|
|
743
745
|
text: Y(o.palette.text.primary),
|
|
744
746
|
grid: Y(o.palette.divider),
|
|
745
747
|
stroke: Y(o.palette.divider)
|
|
746
748
|
});
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
+
const p = d.container.children.push(
|
|
750
|
+
k.new(d, {
|
|
749
751
|
panX: !1,
|
|
750
752
|
panY: !1,
|
|
751
753
|
wheelX: "none",
|
|
752
754
|
wheelY: "none",
|
|
753
755
|
innerRadius: w(40),
|
|
754
756
|
radius: w(70),
|
|
755
|
-
arrangeTooltips: !1
|
|
757
|
+
arrangeTooltips: !1,
|
|
758
|
+
maxTooltipDistance: -1
|
|
756
759
|
})
|
|
757
760
|
);
|
|
758
|
-
|
|
761
|
+
p.set("colors", Ce(d, n)), p.get("colors", {}).set("step", 2), p.set(
|
|
759
762
|
"cursor",
|
|
760
|
-
|
|
763
|
+
B.new(d, { behavior: "zoomX" })
|
|
761
764
|
).lineY.set("visible", !1);
|
|
762
|
-
const x = t[0],
|
|
765
|
+
const x = t[0], fe = t[1];
|
|
763
766
|
let v = [];
|
|
764
|
-
const
|
|
765
|
-
Object.keys(
|
|
766
|
-
|
|
767
|
-
const A = P[x.value], H =
|
|
767
|
+
const z = U.groupBy(i, fe.value);
|
|
768
|
+
Object.keys(z).forEach((b) => {
|
|
769
|
+
z[b].forEach((P) => {
|
|
770
|
+
const A = P[x.value], H = U.findIndex(v, { [x.value]: A });
|
|
768
771
|
H === -1 ? v.push({
|
|
769
772
|
[x.value]: A,
|
|
770
|
-
[
|
|
773
|
+
[b]: P[s[0].dataFieldName]
|
|
771
774
|
}) : v[H] = {
|
|
772
775
|
...v[H],
|
|
773
|
-
[
|
|
776
|
+
[b]: P[s[0].dataFieldName]
|
|
774
777
|
};
|
|
775
778
|
});
|
|
776
779
|
});
|
|
@@ -788,77 +791,77 @@ const Qe = (_) => {
|
|
|
788
791
|
location: 0.5,
|
|
789
792
|
strokeDasharray: [2, 2]
|
|
790
793
|
});
|
|
791
|
-
let
|
|
794
|
+
let C;
|
|
792
795
|
if (x.type === "date") {
|
|
793
|
-
const
|
|
796
|
+
const b = (r == null ? void 0 : r.timeUnit) || "day";
|
|
794
797
|
let P = "DD/MM/YYYY";
|
|
795
|
-
|
|
796
|
-
|
|
798
|
+
b === "month" ? P = "MM YYYY" : b === "year" && (P = "YYYY"), C = p.xAxes.push(
|
|
799
|
+
oe.new(d, {
|
|
797
800
|
maxDeviation: 0,
|
|
798
801
|
categoryField: x.value,
|
|
799
|
-
renderer: X
|
|
800
|
-
tooltip: U.new(d, {})
|
|
802
|
+
renderer: X
|
|
801
803
|
})
|
|
802
|
-
), v =
|
|
804
|
+
), v = U.orderBy(v, [x.value]), v = v.map((A) => ({
|
|
803
805
|
...A,
|
|
804
|
-
[x.value]:
|
|
806
|
+
[x.value]: ye(A[x.value]).format(P)
|
|
805
807
|
}));
|
|
806
808
|
} else
|
|
807
|
-
|
|
808
|
-
|
|
809
|
+
C = p.xAxes.push(
|
|
810
|
+
oe.new(d, {
|
|
809
811
|
maxDeviation: 0,
|
|
810
812
|
categoryField: x.value,
|
|
811
|
-
renderer: X
|
|
812
|
-
tooltip: U.new(d, {})
|
|
813
|
+
renderer: X
|
|
813
814
|
})
|
|
814
815
|
);
|
|
815
|
-
const
|
|
816
|
+
const K = j.new(d, {
|
|
816
817
|
minGridDistance: 30
|
|
817
|
-
}),
|
|
818
|
-
|
|
818
|
+
}), Q = p.yAxes.push(
|
|
819
|
+
Me.new(d, { renderer: K })
|
|
819
820
|
);
|
|
820
|
-
|
|
821
|
+
K.grid.template.setAll({ strokeDasharray: [2, 2] }), (se = C.get("renderer")) == null || se.grid.template.setAll({
|
|
821
822
|
stroke: Y(o.palette.divider),
|
|
822
823
|
strokeOpacity: 1
|
|
823
|
-
}), (
|
|
824
|
+
}), (ie = Q.get("renderer")) == null || ie.grid.template.setAll({
|
|
824
825
|
stroke: Y(o.palette.divider),
|
|
825
826
|
strokeOpacity: 1
|
|
826
827
|
});
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
name: de(p),
|
|
836
|
-
xAxis: D,
|
|
837
|
-
yAxis: ee,
|
|
838
|
-
valueYField: p,
|
|
828
|
+
const Z = [], ee = Object.keys(z);
|
|
829
|
+
ee.forEach((b, P) => {
|
|
830
|
+
const A = p.series.push(
|
|
831
|
+
F.new(d, {
|
|
832
|
+
name: _e(b),
|
|
833
|
+
xAxis: C,
|
|
834
|
+
yAxis: Q,
|
|
835
|
+
valueYField: b,
|
|
839
836
|
categoryXField: x.value,
|
|
840
|
-
...P ===
|
|
841
|
-
stacked: !0
|
|
842
|
-
tooltip: U.new(d, { labelText: j })
|
|
837
|
+
...P === ee.length - 1 && {
|
|
838
|
+
stacked: !0
|
|
843
839
|
}
|
|
844
840
|
})
|
|
845
841
|
);
|
|
846
|
-
A.strokes.template.setAll({ strokeOpacity: 0 }), A.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), A.data.setAll(v), A.appear(1e3),
|
|
847
|
-
}),
|
|
848
|
-
|
|
842
|
+
A.strokes.template.setAll({ strokeOpacity: 0 }), A.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), A.data.setAll(v), A.appear(1e3), Z.push(A);
|
|
843
|
+
}), we({
|
|
844
|
+
root: d,
|
|
845
|
+
chart: p,
|
|
846
|
+
xAxis: C,
|
|
847
|
+
theme: o,
|
|
848
|
+
isDateAxis: !1,
|
|
849
|
+
follow: !0
|
|
850
|
+
}), p.radarContainer.children.push(
|
|
851
|
+
Oe.new(d, {
|
|
849
852
|
width: 150,
|
|
850
853
|
centerX: N,
|
|
851
854
|
centerY: N
|
|
852
855
|
})
|
|
853
|
-
).data.setAll(
|
|
856
|
+
).data.setAll(Z), C.data.setAll(v), p.appear(1e3, 100);
|
|
854
857
|
}, a), () => {
|
|
855
858
|
var d;
|
|
856
|
-
|
|
859
|
+
V && clearTimeout(V), (d = T.current) == null || d.dispose(), T.current = null;
|
|
857
860
|
};
|
|
858
861
|
}, [i, t, s, o.palette.mode, n]);
|
|
859
|
-
const
|
|
860
|
-
return { chartId: f, ownerState:
|
|
862
|
+
const ce = { ...e };
|
|
863
|
+
return { chartId: f, ownerState: ce, sx: l, error: S, other: u };
|
|
861
864
|
};
|
|
862
865
|
export {
|
|
863
|
-
|
|
866
|
+
Ze as useStackedAreaRadarLogic
|
|
864
867
|
};
|