@hybridcore/ui 1.6.4 → 1.6.6
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/IconX-C2wmVYSK.js +11 -0
- package/dist/components/charts/_common/format.js +49 -0
- package/dist/components/charts/_common/utils.js +12 -7
- package/dist/components/charts/chart-wrapper/index.js +36 -34
- package/dist/components/charts/column-line-mix/logic.js +78 -78
- package/dist/components/charts/donut-chart/index.js +11 -0
- package/dist/components/charts/donut-chart/logic.js +67 -0
- package/dist/components/charts/donut-chart/styled.js +12 -0
- package/dist/components/charts/drill-down-treemap/logic.js +123 -123
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
- package/dist/components/charts/heatmap/logic.js +73 -73
- package/dist/components/charts/line/logic.js +66 -66
- package/dist/components/charts/logaritmic-scale/logic.js +65 -65
- package/dist/components/charts/multiple-value-axes/logic.js +75 -74
- package/dist/components/charts/nested-pie/logic.js +43 -42
- package/dist/components/charts/packed-circles/logic.js +111 -110
- package/dist/components/charts/pie-chart/logic.js +40 -39
- package/dist/components/charts/stacked-area-radar/logic.js +51 -51
- package/dist/components/charts/stacked-column-chart/logic.js +79 -79
- package/dist/components/charts/xy-chart/logic.js +71 -71
- package/dist/components/color-picker/index.js +1645 -1602
- package/dist/components/color-picker/logic.js +21 -12
- package/dist/components/color-picker/styled.js +4 -2
- package/dist/components/date-range-picker/index.js +359 -365
- package/dist/components/metric-card/helpers.js +12 -5
- package/dist/components/metric-card/logic.js +65 -57
- package/dist/components/metric-card/styled.js +55 -47
- package/dist/components/simple-pivot-table/index.js +129 -54
- package/dist/components/simple-pivot-table/logic.js +111 -45
- package/dist/components/simple-pivot-table/styled.js +31 -11
- package/dist/main.d.ts +128 -8
- package/dist/main.js +163 -157
- package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { k as $, l as J, x as c, m as h, s as g, a as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
1
|
+
import { k as $, l as J, x as c, m as h, s as g, a as pe, n as ne, C as xe, G as K, o as le, q as ve, t as L, y as C, j as oe, z as ue, R as ye, A as be, T as U } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as Pe, useTheme as Re } from "@mui/material";
|
|
3
|
+
import _e from "dayjs";
|
|
4
4
|
import W from "lodash";
|
|
5
|
-
import { useId as
|
|
6
|
-
import { colorSetFromPalette as
|
|
7
|
-
import { m as M, x as R, b as Q, f as m, p as w, a as N, P as
|
|
8
|
-
import { a as I, X as
|
|
9
|
-
import { R as
|
|
10
|
-
import { X as
|
|
11
|
-
import { C as
|
|
12
|
-
import { L as
|
|
13
|
-
import { L as
|
|
14
|
-
class O extends
|
|
5
|
+
import { useId as we, useRef as Te, useEffect as Ce } from "react";
|
|
6
|
+
import { applyValueFormat as Le, colorSetFromPalette as Me } from "../_common/utils.js";
|
|
7
|
+
import { m as M, x as R, b as Q, f as m, p as w, a as N, P as De, c as Y } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { a as I, X as he, V as Ye } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { R as ge, S as Ne, a as V } from "../../../Slice-B19rbYDZ.js";
|
|
10
|
+
import { X as ce } from "../../../XYCursor-C8WktvKM.js";
|
|
11
|
+
import { C as de } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
12
|
+
import { L as fe } from "../../../LineSeries-Uiv5o56b.js";
|
|
13
|
+
import { L as Oe } from "../../../Legend-Dp_MKfS4.js";
|
|
14
|
+
class O extends ge {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments), Object.defineProperty(this, "_tickPoints", {
|
|
17
17
|
enumerable: !0,
|
|
@@ -31,7 +31,7 @@ Object.defineProperty(O, "classNames", {
|
|
|
31
31
|
enumerable: !0,
|
|
32
32
|
configurable: !0,
|
|
33
33
|
writable: !0,
|
|
34
|
-
value:
|
|
34
|
+
value: ge.classNames.concat([O.className])
|
|
35
35
|
});
|
|
36
36
|
class G extends I {
|
|
37
37
|
constructor() {
|
|
@@ -46,7 +46,7 @@ class G extends I {
|
|
|
46
46
|
enumerable: !0,
|
|
47
47
|
configurable: !0,
|
|
48
48
|
writable: !0,
|
|
49
|
-
value: this.addDisposer(new $(J.new({}), () =>
|
|
49
|
+
value: this.addDisposer(new $(J.new({}), () => Ne._new(this._root, {
|
|
50
50
|
themeTags: M(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
|
|
51
51
|
}, [this.axisFills.template])))
|
|
52
52
|
}), Object.defineProperty(this, "_fillGenerator", {
|
|
@@ -408,7 +408,7 @@ Object.defineProperty(k, "classNames", {
|
|
|
408
408
|
writable: !0,
|
|
409
409
|
value: I.classNames.concat([k.className])
|
|
410
410
|
});
|
|
411
|
-
class
|
|
411
|
+
class Se extends pe {
|
|
412
412
|
setupDefaultRules() {
|
|
413
413
|
super.setupDefaultRules();
|
|
414
414
|
const e = this.rule.bind(this), t = this._root.interfaceColors;
|
|
@@ -467,23 +467,23 @@ class Ne extends Ae {
|
|
|
467
467
|
const s = e("Graphics", ["clock", "hand"]);
|
|
468
468
|
s.setAll({
|
|
469
469
|
fillOpacity: 1
|
|
470
|
-
}),
|
|
470
|
+
}), ne(s, "fill", t, "alternativeBackground");
|
|
471
471
|
}
|
|
472
472
|
{
|
|
473
473
|
const s = e("Graphics", ["clock", "pin"]);
|
|
474
474
|
s.setAll({
|
|
475
475
|
fillOpacity: 1
|
|
476
|
-
}),
|
|
476
|
+
}), ne(s, "fill", t, "alternativeBackground");
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
class B extends
|
|
480
|
+
class B extends he {
|
|
481
481
|
constructor() {
|
|
482
482
|
super(...arguments), Object.defineProperty(this, "radarContainer", {
|
|
483
483
|
enumerable: !0,
|
|
484
484
|
configurable: !0,
|
|
485
485
|
writable: !0,
|
|
486
|
-
value: this.plotContainer.children.push(
|
|
486
|
+
value: this.plotContainer.children.push(xe.new(this._root, { x: N, y: N }))
|
|
487
487
|
}), Object.defineProperty(this, "_arcGenerator", {
|
|
488
488
|
enumerable: !0,
|
|
489
489
|
configurable: !0,
|
|
@@ -497,7 +497,7 @@ class B extends de {
|
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
499
|
_afterNew() {
|
|
500
|
-
this._defaultThemes.push(
|
|
500
|
+
this._defaultThemes.push(Se.new(this._root)), super._afterNew();
|
|
501
501
|
const e = this.radarContainer, t = this.gridContainer, s = this.topGridContainer, i = this.seriesContainer, a = this.bulletsContainer;
|
|
502
502
|
e.children.pushAll([t, i, s, a]), i.set("mask", K.new(this._root, {})), t.set("mask", K.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
503
503
|
this._updateRadius();
|
|
@@ -508,14 +508,14 @@ class B extends de {
|
|
|
508
508
|
_prepareChildren() {
|
|
509
509
|
if (super._prepareChildren(), this._sizeDirty || this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) {
|
|
510
510
|
const e = this.chartContainer, t = e.innerWidth(), s = e.innerHeight(), i = this.get("startAngle", 0), a = this.get("endAngle", 0), r = this.get("innerRadius");
|
|
511
|
-
let n =
|
|
511
|
+
let n = le(0, 0, i, a, 1);
|
|
512
512
|
const l = t / (n.right - n.left), u = s / (n.bottom - n.top);
|
|
513
513
|
let o = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
514
|
-
if (r instanceof
|
|
514
|
+
if (r instanceof De) {
|
|
515
515
|
let f = r.value, T = Math.min(l, u);
|
|
516
|
-
f = Math.max(T * f, T - Math.min(s, t)) / T, o =
|
|
516
|
+
f = Math.max(T * f, T - Math.min(s, t)) / T, o = le(0, 0, i, a, f), this.setPrivateRaw("irModifyer", f / r.value);
|
|
517
517
|
}
|
|
518
|
-
n =
|
|
518
|
+
n = ve([n, o]), this._maxRadius = Math.max(0, Math.min(l, u));
|
|
519
519
|
const y = R(this.get("radius", 0), this._maxRadius);
|
|
520
520
|
this.radarContainer.setAll({
|
|
521
521
|
dy: -y * (n.bottom + n.top) / 2,
|
|
@@ -583,9 +583,9 @@ Object.defineProperty(B, "classNames", {
|
|
|
583
583
|
enumerable: !0,
|
|
584
584
|
configurable: !0,
|
|
585
585
|
writable: !0,
|
|
586
|
-
value:
|
|
586
|
+
value: he.classNames.concat([B.className])
|
|
587
587
|
});
|
|
588
|
-
class F extends
|
|
588
|
+
class F extends ce {
|
|
589
589
|
constructor() {
|
|
590
590
|
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
591
591
|
enumerable: !0,
|
|
@@ -661,7 +661,7 @@ class F extends ge {
|
|
|
661
661
|
let n = this.getPrivate("radius"), l = this.getPrivate("innerRadius");
|
|
662
662
|
n < l && ([n, l] = [l, n]);
|
|
663
663
|
let u = a, o = r, y = n, f = l;
|
|
664
|
-
i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C, 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) * C, o = Math.atan2(e.y, e.x) * C) : (s == "zoomY" || s == "selectY") && (f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y))), f =
|
|
664
|
+
i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C, 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) * C, o = Math.atan2(e.y, e.x) * C) : (s == "zoomY" || s == "selectY") && (f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y))), f = oe(f, l, n), y = oe(y, l, n), u = ue(u, a, r), o = ue(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 });
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
667
|
}
|
|
@@ -675,9 +675,9 @@ Object.defineProperty(F, "classNames", {
|
|
|
675
675
|
enumerable: !0,
|
|
676
676
|
configurable: !0,
|
|
677
677
|
writable: !0,
|
|
678
|
-
value:
|
|
678
|
+
value: ce.classNames.concat([F.className])
|
|
679
679
|
});
|
|
680
|
-
class E extends
|
|
680
|
+
class E extends fe {
|
|
681
681
|
_afterNew() {
|
|
682
682
|
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", K.new(this._root, {}));
|
|
683
683
|
}
|
|
@@ -718,10 +718,10 @@ Object.defineProperty(E, "classNames", {
|
|
|
718
718
|
enumerable: !0,
|
|
719
719
|
configurable: !0,
|
|
720
720
|
writable: !0,
|
|
721
|
-
value:
|
|
721
|
+
value: fe.classNames.concat([E.className])
|
|
722
722
|
});
|
|
723
|
-
const
|
|
724
|
-
const e =
|
|
723
|
+
const Je = (_) => {
|
|
724
|
+
const e = Pe({ props: _, name: "HCStackedAreaRadar" }), {
|
|
725
725
|
dimensions: t,
|
|
726
726
|
values: s,
|
|
727
727
|
data: i,
|
|
@@ -730,15 +730,15 @@ const We = (_) => {
|
|
|
730
730
|
colors: n,
|
|
731
731
|
sx: l,
|
|
732
732
|
...u
|
|
733
|
-
} = e, o =
|
|
733
|
+
} = e, o = Re(), f = `hc-stacked-area-radar-${we().replace(/:/g, "")}`, T = Te(null);
|
|
734
734
|
let S = null;
|
|
735
|
-
t.length < 2 ? S = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (S = "StackedAreaRadar requires at least 1 value"),
|
|
735
|
+
t.length < 2 ? S = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (S = "StackedAreaRadar requires at least 1 value"), Ce(() => {
|
|
736
736
|
if (S) return;
|
|
737
737
|
let z;
|
|
738
738
|
return z = setTimeout(() => {
|
|
739
|
-
var ie, ae;
|
|
740
|
-
const d =
|
|
741
|
-
T.current = d, d.setThemes([
|
|
739
|
+
var ie, ae, re;
|
|
740
|
+
const d = ye.new(f);
|
|
741
|
+
T.current = d, Le(d, (ie = s == null ? void 0 : s[0]) == null ? void 0 : ie.format), d.setThemes([be.new(d)]), d.interfaceColors.setAll({
|
|
742
742
|
text: Y(o.palette.text.primary),
|
|
743
743
|
grid: Y(o.palette.divider),
|
|
744
744
|
stroke: Y(o.palette.divider)
|
|
@@ -754,13 +754,13 @@ const We = (_) => {
|
|
|
754
754
|
arrangeTooltips: !1
|
|
755
755
|
})
|
|
756
756
|
);
|
|
757
|
-
b.set("colors",
|
|
757
|
+
b.set("colors", Me(d, n)), b.get("colors", {}).set("step", 2), b.set(
|
|
758
758
|
"cursor",
|
|
759
759
|
F.new(d, { behavior: "zoomX" })
|
|
760
760
|
).lineY.set("visible", !1);
|
|
761
|
-
const x = t[0],
|
|
761
|
+
const x = t[0], Ae = t[1];
|
|
762
762
|
let v = [];
|
|
763
|
-
const q = W.groupBy(i,
|
|
763
|
+
const q = W.groupBy(i, Ae.value);
|
|
764
764
|
Object.keys(q).forEach((A) => {
|
|
765
765
|
q[A].forEach((P) => {
|
|
766
766
|
const p = P[x.value], H = W.findIndex(v, { [x.value]: p });
|
|
@@ -792,7 +792,7 @@ const We = (_) => {
|
|
|
792
792
|
const A = (r == null ? void 0 : r.timeUnit) || "day";
|
|
793
793
|
let P = "DD/MM/YYYY";
|
|
794
794
|
A === "month" ? P = "MM YYYY" : A === "year" && (P = "YYYY"), D = b.xAxes.push(
|
|
795
|
-
|
|
795
|
+
de.new(d, {
|
|
796
796
|
maxDeviation: 0,
|
|
797
797
|
categoryField: x.value,
|
|
798
798
|
renderer: X,
|
|
@@ -800,11 +800,11 @@ const We = (_) => {
|
|
|
800
800
|
})
|
|
801
801
|
), v = W.orderBy(v, [x.value]), v = v.map((p) => ({
|
|
802
802
|
...p,
|
|
803
|
-
[x.value]:
|
|
803
|
+
[x.value]: _e(p[x.value]).format(P)
|
|
804
804
|
}));
|
|
805
805
|
} else
|
|
806
806
|
D = b.xAxes.push(
|
|
807
|
-
|
|
807
|
+
de.new(d, {
|
|
808
808
|
maxDeviation: 0,
|
|
809
809
|
categoryField: x.value,
|
|
810
810
|
renderer: X,
|
|
@@ -814,12 +814,12 @@ const We = (_) => {
|
|
|
814
814
|
const Z = k.new(d, {
|
|
815
815
|
minGridDistance: 30
|
|
816
816
|
}), ee = b.yAxes.push(
|
|
817
|
-
|
|
817
|
+
Ye.new(d, { renderer: Z })
|
|
818
818
|
);
|
|
819
|
-
Z.grid.template.setAll({ strokeDasharray: [2, 2] }), (
|
|
819
|
+
Z.grid.template.setAll({ strokeDasharray: [2, 2] }), (ae = D.get("renderer")) == null || ae.grid.template.setAll({
|
|
820
820
|
stroke: Y(o.palette.divider),
|
|
821
821
|
strokeOpacity: 1
|
|
822
|
-
}), (
|
|
822
|
+
}), (re = ee.get("renderer")) == null || re.grid.template.setAll({
|
|
823
823
|
stroke: Y(o.palette.divider),
|
|
824
824
|
strokeOpacity: 1
|
|
825
825
|
});
|
|
@@ -844,7 +844,7 @@ const We = (_) => {
|
|
|
844
844
|
);
|
|
845
845
|
p.strokes.template.setAll({ strokeOpacity: 0 }), p.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), p.data.setAll(v), p.appear(1e3), te.push(p);
|
|
846
846
|
}), b.radarContainer.children.push(
|
|
847
|
-
|
|
847
|
+
Oe.new(d, {
|
|
848
848
|
width: 150,
|
|
849
849
|
centerX: N,
|
|
850
850
|
centerY: N
|
|
@@ -855,9 +855,9 @@ const We = (_) => {
|
|
|
855
855
|
z && clearTimeout(z), (d = T.current) == null || d.dispose(), T.current = null;
|
|
856
856
|
};
|
|
857
857
|
}, [i, t, s, o.palette.mode, n]);
|
|
858
|
-
const
|
|
859
|
-
return { chartId: f, ownerState:
|
|
858
|
+
const me = { ...e };
|
|
859
|
+
return { chartId: f, ownerState: me, sx: l, error: S, other: u };
|
|
860
860
|
};
|
|
861
861
|
export {
|
|
862
|
-
|
|
862
|
+
Je as useStackedAreaRadarLogic
|
|
863
863
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { R as q, A as I, T as
|
|
2
|
-
import { useThemeProps as P, useTheme as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useId as
|
|
6
|
-
import { colorSetFromPalette as
|
|
7
|
-
import { c as
|
|
8
|
-
import { X as
|
|
9
|
-
import { A as
|
|
10
|
-
import { C as
|
|
11
|
-
import { L as
|
|
12
|
-
import { C as
|
|
13
|
-
import { B as
|
|
14
|
-
const
|
|
1
|
+
import { R as q, A as I, T as L, L as N } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as P, useTheme as H } from "@mui/material";
|
|
3
|
+
import _ from "dayjs";
|
|
4
|
+
import v from "lodash";
|
|
5
|
+
import { useId as $, useRef as z, useEffect as G } from "react";
|
|
6
|
+
import { applyValueFormat as J, colorSetFromPalette as K } from "../_common/utils.js";
|
|
7
|
+
import { c as m, a as f, p as Q } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { X as W, V as Z } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { A as ee, a as te } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
10
|
+
import { C as D } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
11
|
+
import { L as re } from "../../../Legend-Dp_MKfS4.js";
|
|
12
|
+
import { C as oe } from "../../../ColumnSeries-CjgdJ2QL.js";
|
|
13
|
+
import { B as ae } from "../../../Bullet-DVczI2TD.js";
|
|
14
|
+
const ge = (O) => {
|
|
15
15
|
const w = P({
|
|
16
|
-
props:
|
|
16
|
+
props: O,
|
|
17
17
|
name: "HCStackedColumnChart"
|
|
18
18
|
}), {
|
|
19
|
-
dimensions:
|
|
20
|
-
values:
|
|
19
|
+
dimensions: d,
|
|
20
|
+
values: n,
|
|
21
21
|
data: C,
|
|
22
|
-
initDelay:
|
|
22
|
+
initDelay: B = 0,
|
|
23
23
|
baseInterval: h,
|
|
24
24
|
colors: k,
|
|
25
|
-
sx:
|
|
26
|
-
...
|
|
27
|
-
} = w,
|
|
25
|
+
sx: E,
|
|
26
|
+
...M
|
|
27
|
+
} = w, l = H(), T = `hc-stacked-column-chart-${$().replace(/:/g, "")}`, x = z(null);
|
|
28
28
|
let u = null;
|
|
29
|
-
|
|
29
|
+
d.length < 2 ? u = "StackedColumnChart requires at least 2 dimensions" : n.length < 1 && (u = "StackedColumnChart requires at least 1 value"), G(() => {
|
|
30
30
|
if (u) return;
|
|
31
|
-
let
|
|
32
|
-
return
|
|
33
|
-
var
|
|
31
|
+
let y;
|
|
32
|
+
return y = setTimeout(() => {
|
|
33
|
+
var X, S, R;
|
|
34
34
|
const e = q.new(T);
|
|
35
|
-
x.current = e, e.setThemes([I.new(e)]), e.interfaceColors.setAll({
|
|
36
|
-
text:
|
|
37
|
-
grid:
|
|
38
|
-
stroke:
|
|
35
|
+
x.current = e, J(e, (X = n == null ? void 0 : n[0]) == null ? void 0 : X.format), e.setThemes([I.new(e)]), e.interfaceColors.setAll({
|
|
36
|
+
text: m(l.palette.text.primary),
|
|
37
|
+
grid: m(l.palette.divider),
|
|
38
|
+
stroke: m(l.palette.divider)
|
|
39
39
|
});
|
|
40
40
|
const s = e.container.children.push(
|
|
41
|
-
|
|
41
|
+
W.new(e, {
|
|
42
42
|
panX: !1,
|
|
43
43
|
panY: !1,
|
|
44
44
|
wheelX: "none",
|
|
@@ -46,79 +46,79 @@ const Ye = (D) => {
|
|
|
46
46
|
layout: e.verticalLayout
|
|
47
47
|
})
|
|
48
48
|
);
|
|
49
|
-
s.set("colors",
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
const o =
|
|
53
|
-
let
|
|
49
|
+
s.set("colors", K(e, k)), s.get("colors", {}).set("step", 2);
|
|
50
|
+
const Y = ee.new(e, {});
|
|
51
|
+
Y.grid.template.setAll({ location: 1 });
|
|
52
|
+
const o = d[0], j = d[1];
|
|
53
|
+
let c, p = C;
|
|
54
54
|
if (o.type === "date") {
|
|
55
55
|
const t = (h == null ? void 0 : h.timeUnit) || "day";
|
|
56
56
|
let a = "DD/MM/YYYY";
|
|
57
|
-
t === "month" ? a = "MM YYYY" : t === "year" && (a = "YYYY"),
|
|
58
|
-
|
|
57
|
+
t === "month" ? a = "MM YYYY" : t === "year" && (a = "YYYY"), c = s.xAxes.push(
|
|
58
|
+
D.new(e, {
|
|
59
59
|
categoryField: o.value,
|
|
60
|
-
renderer:
|
|
61
|
-
tooltip:
|
|
60
|
+
renderer: Y,
|
|
61
|
+
tooltip: L.new(e, {})
|
|
62
62
|
})
|
|
63
|
-
),
|
|
63
|
+
), p = v.orderBy(p, [o.value]), p = p.map((r) => ({
|
|
64
64
|
...r,
|
|
65
|
-
[o.value]:
|
|
65
|
+
[o.value]: _(r[o.value]).format(a)
|
|
66
66
|
}));
|
|
67
67
|
} else
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
c = s.xAxes.push(
|
|
69
|
+
D.new(e, {
|
|
70
70
|
categoryField: o.value,
|
|
71
|
-
renderer:
|
|
72
|
-
tooltip:
|
|
71
|
+
renderer: Y,
|
|
72
|
+
tooltip: L.new(e, {})
|
|
73
73
|
})
|
|
74
74
|
);
|
|
75
|
-
const
|
|
76
|
-
Object.keys(
|
|
77
|
-
|
|
78
|
-
const r = a[o.value],
|
|
79
|
-
|
|
75
|
+
const i = [], g = v.groupBy(p, j.value);
|
|
76
|
+
Object.keys(g).forEach((t) => {
|
|
77
|
+
g[t].forEach((a) => {
|
|
78
|
+
const r = a[o.value], A = v.findIndex(i, { [o.value]: r });
|
|
79
|
+
A === -1 ? i.push({
|
|
80
80
|
[o.value]: r,
|
|
81
|
-
[t]: a[
|
|
82
|
-
}) :
|
|
83
|
-
...
|
|
84
|
-
[t]: a[
|
|
81
|
+
[t]: a[n[0].dataFieldName]
|
|
82
|
+
}) : i[A] = {
|
|
83
|
+
...i[A],
|
|
84
|
+
[t]: a[n[0].dataFieldName]
|
|
85
85
|
};
|
|
86
86
|
});
|
|
87
|
-
}),
|
|
88
|
-
const
|
|
89
|
-
|
|
87
|
+
}), c.data.setAll(i);
|
|
88
|
+
const F = s.yAxes.push(
|
|
89
|
+
Z.new(e, {
|
|
90
90
|
min: 0,
|
|
91
|
-
renderer:
|
|
91
|
+
renderer: te.new(e, { strokeOpacity: 0.1 })
|
|
92
92
|
})
|
|
93
|
-
),
|
|
94
|
-
|
|
93
|
+
), U = s.children.push(
|
|
94
|
+
re.new(e, {
|
|
95
95
|
centerX: f,
|
|
96
96
|
x: f
|
|
97
97
|
})
|
|
98
98
|
);
|
|
99
|
-
(
|
|
100
|
-
stroke:
|
|
99
|
+
(S = c.get("renderer")) == null || S.grid.template.setAll({
|
|
100
|
+
stroke: m(l.palette.divider),
|
|
101
101
|
strokeOpacity: 1
|
|
102
|
-
}), (
|
|
103
|
-
stroke:
|
|
102
|
+
}), (R = F.get("renderer")) == null || R.grid.template.setAll({
|
|
103
|
+
stroke: m(l.palette.divider),
|
|
104
104
|
strokeOpacity: 1
|
|
105
105
|
});
|
|
106
|
-
function
|
|
106
|
+
function V(t, a) {
|
|
107
107
|
const r = s.series.push(
|
|
108
|
-
|
|
108
|
+
oe.new(e, {
|
|
109
109
|
name: t,
|
|
110
110
|
stacked: !0,
|
|
111
|
-
xAxis:
|
|
112
|
-
yAxis:
|
|
111
|
+
xAxis: c,
|
|
112
|
+
yAxis: F,
|
|
113
113
|
valueYField: a,
|
|
114
114
|
categoryXField: o.value
|
|
115
115
|
})
|
|
116
116
|
);
|
|
117
117
|
r.columns.template.setAll({
|
|
118
118
|
tooltipText: "{name}, {categoryX}: {valueY}",
|
|
119
|
-
tooltipY:
|
|
120
|
-
}), r.data.setAll(
|
|
121
|
-
return
|
|
119
|
+
tooltipY: Q(10)
|
|
120
|
+
}), r.data.setAll(i), r.appear(), r.bullets.push(function() {
|
|
121
|
+
return ae.new(e, {
|
|
122
122
|
sprite: N.new(e, {
|
|
123
123
|
fill: e.interfaceColors.get("alternativeText"),
|
|
124
124
|
centerY: f,
|
|
@@ -126,17 +126,17 @@ const Ye = (D) => {
|
|
|
126
126
|
populateText: !0
|
|
127
127
|
})
|
|
128
128
|
});
|
|
129
|
-
}),
|
|
129
|
+
}), U.data.push(r);
|
|
130
130
|
}
|
|
131
|
-
Object.keys(
|
|
132
|
-
},
|
|
131
|
+
Object.keys(g).forEach((t) => V(t, t)), s.appear(1e3, 100);
|
|
132
|
+
}, B), () => {
|
|
133
133
|
var e;
|
|
134
|
-
|
|
134
|
+
y && clearTimeout(y), (e = x.current) == null || e.dispose(), x.current = null;
|
|
135
135
|
};
|
|
136
|
-
}, [C,
|
|
137
|
-
const
|
|
138
|
-
return { chartId: T, ownerState:
|
|
136
|
+
}, [C, d, n, l.palette.mode, k]);
|
|
137
|
+
const b = { ...w };
|
|
138
|
+
return { chartId: T, ownerState: b, sx: E, error: u, other: M };
|
|
139
139
|
};
|
|
140
140
|
export {
|
|
141
|
-
|
|
141
|
+
ge as useStackedColumnChartLogic
|
|
142
142
|
};
|