@hybridcore/ui 1.6.6 → 1.6.7
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/format.js +29 -23
- package/dist/components/charts/chart-wrapper/helpers.js +46 -21
- package/dist/components/charts/chart-wrapper/logic.js +57 -40
- package/dist/components/charts/column-line-mix/logic.js +71 -70
- package/dist/components/charts/line/logic.js +201 -103
- package/dist/components/charts/multiple-value-axes/logic.js +77 -76
- package/dist/components/charts/stacked-area-radar/logic.js +58 -57
- package/dist/components/charts/stacked-column-chart/logic.js +45 -44
- package/dist/components/charts/xy-chart/logic.js +76 -70
- package/dist/components/metric-card/index.js +58 -54
- package/dist/components/metric-card/logic.js +62 -53
- package/dist/components/metric-card/styled.js +53 -43
- package/dist/components/simple-pivot-table/index.js +13 -13
- package/dist/main.d.ts +27 -4
- package/package.json +1 -1
|
@@ -1,143 +1,241 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
4
|
-
import { useId as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { R as Z, a as q, A as J, T as K } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as Q, useTheme as ee } from "@mui/material";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
import { useId as te, useRef as oe, useEffect as re } from "react";
|
|
5
|
+
import { humanizeLabel as ae } from "../_common/format.js";
|
|
6
|
+
import { colorSetFromPalette as se, applyValueFormat as ne } from "../_common/utils.js";
|
|
7
|
+
import { c, p as k, b as U } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { X as ie, V as le } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { D as me } from "../../../DateAxis-YX3QNIB-.js";
|
|
10
|
+
import { A as V, a as de } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
11
|
+
import { C as pe } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
12
|
+
import { L as ce } from "../../../LineSeries-Uiv5o56b.js";
|
|
13
|
+
import { D as ue } from "../../../DataProcessor-CHDO51q4.js";
|
|
14
|
+
import { B as ye } from "../../../Bullet-DVczI2TD.js";
|
|
15
|
+
import { C as fe } from "../../../Circle-Cy5s-pVc.js";
|
|
16
|
+
import { X as he } from "../../../XYCursor-C8WktvKM.js";
|
|
17
|
+
import { L as ge } from "../../../Legend-Dp_MKfS4.js";
|
|
18
|
+
const R = 1.1, Ae = {
|
|
19
|
+
millisecond: 1,
|
|
20
|
+
second: 1e3,
|
|
21
|
+
minute: 6e4,
|
|
22
|
+
hour: 36e5,
|
|
23
|
+
day: 864e5,
|
|
24
|
+
week: 6048e5,
|
|
25
|
+
month: 2592e6,
|
|
26
|
+
year: 31536e6
|
|
27
|
+
}, xe = {
|
|
28
|
+
millisecond: "d MMM, yyyy HH:mm:ss.SSS",
|
|
29
|
+
second: "d MMM, yyyy HH:mm:ss",
|
|
30
|
+
minute: "d MMM, yyyy HH:mm",
|
|
31
|
+
hour: "d MMM, yyyy HH:mm",
|
|
32
|
+
day: "d MMM, yyyy",
|
|
33
|
+
week: "d MMM, yyyy",
|
|
34
|
+
month: "MMM yyyy",
|
|
35
|
+
year: "yyyy"
|
|
36
|
+
}, Ue = (B) => {
|
|
37
|
+
const b = Q({ props: B, name: "HCLineChart" }), {
|
|
38
|
+
dimensions: r,
|
|
39
|
+
values: y,
|
|
40
|
+
data: w,
|
|
41
|
+
initDelay: E = 0,
|
|
42
|
+
baseInterval: l,
|
|
43
|
+
colors: X,
|
|
44
|
+
connectMissingData: T = !0,
|
|
45
|
+
sx: G,
|
|
46
|
+
...I
|
|
47
|
+
} = b, m = ee(), H = `hc-line-chart-${te().replace(/:/g, "")}`, F = oe(null);
|
|
48
|
+
let v = null;
|
|
49
|
+
r.length < 1 ? v = "Missing dimensions config!" : y.length < 1 && (v = "Missing values config!"), re(() => {
|
|
50
|
+
if (v) return;
|
|
51
|
+
let C;
|
|
52
|
+
return C = setTimeout(() => {
|
|
53
|
+
var $, O, S, Y, P;
|
|
54
|
+
const e = Z.new(H);
|
|
55
|
+
F.current = e;
|
|
56
|
+
const j = q.new(e);
|
|
57
|
+
e.setThemes([J.new(e), j]), e.interfaceColors.setAll({
|
|
58
|
+
text: c(m.palette.text.primary),
|
|
59
|
+
grid: c(m.palette.divider),
|
|
60
|
+
stroke: c(m.palette.divider)
|
|
39
61
|
});
|
|
40
|
-
const
|
|
41
|
-
|
|
62
|
+
const n = e.container.children.push(
|
|
63
|
+
ie.new(e, {
|
|
42
64
|
panX: !0,
|
|
43
65
|
panY: !0,
|
|
44
66
|
wheelX: "none",
|
|
45
67
|
wheelY: "none",
|
|
46
|
-
|
|
68
|
+
// -1 = show the tooltip from the cursor's x-position anywhere in the
|
|
69
|
+
// plot, not only when the pointer is on a data point / line.
|
|
70
|
+
maxTooltipDistance: -1,
|
|
47
71
|
pinchZoomX: !0
|
|
48
72
|
})
|
|
49
73
|
);
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
n.set("colors", se(e, X));
|
|
75
|
+
let d, f = w;
|
|
76
|
+
r[0].type === "date" ? (d = n.xAxes.push(
|
|
77
|
+
me.new(e, {
|
|
54
78
|
maxDeviation: 0.1,
|
|
55
79
|
groupData: !1,
|
|
56
|
-
baseInterval:
|
|
57
|
-
renderer:
|
|
58
|
-
tooltip: A.new(e, {})
|
|
80
|
+
baseInterval: l || { timeUnit: "day", count: 1 },
|
|
81
|
+
renderer: V.new(e, {})
|
|
59
82
|
})
|
|
60
|
-
),
|
|
61
|
-
|
|
62
|
-
categoryField:
|
|
63
|
-
renderer:
|
|
64
|
-
tooltip: A.new(e, {})
|
|
83
|
+
), f = _.orderBy(w, [r[0].value])) : (d = n.xAxes.push(
|
|
84
|
+
pe.new(e, {
|
|
85
|
+
categoryField: r[0].value,
|
|
86
|
+
renderer: V.new(e, {})
|
|
65
87
|
})
|
|
66
88
|
), e.numberFormatter.setAll({
|
|
67
89
|
numberFormat: "#",
|
|
68
90
|
numericFields: ["valueX"]
|
|
69
|
-
}),
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
renderer:
|
|
91
|
+
}), f = _.orderBy(w, [r[0].value]), d.data.setAll(f));
|
|
92
|
+
const N = n.yAxes.push(
|
|
93
|
+
le.new(e, {
|
|
94
|
+
renderer: de.new(e, {})
|
|
73
95
|
})
|
|
74
96
|
);
|
|
75
|
-
(
|
|
76
|
-
stroke:
|
|
97
|
+
($ = d.get("renderer")) == null || $.grid.template.setAll({
|
|
98
|
+
stroke: c(m.palette.divider),
|
|
77
99
|
strokeOpacity: 1
|
|
78
|
-
}), (
|
|
79
|
-
stroke:
|
|
100
|
+
}), (O = d.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (S = N.get("renderer")) == null || S.grid.template.setAll({
|
|
101
|
+
stroke: c(m.palette.divider),
|
|
80
102
|
strokeOpacity: 1
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
103
|
+
});
|
|
104
|
+
const M = K.new(e, {
|
|
105
|
+
getFillFromSprite: !1
|
|
106
|
+
});
|
|
107
|
+
(Y = M.get("background")) == null || Y.setAll({
|
|
108
|
+
fill: c(m.palette.background.paper),
|
|
109
|
+
stroke: c(m.palette.divider),
|
|
110
|
+
fillOpacity: 1
|
|
111
|
+
}), M.label.setAll({
|
|
112
|
+
fill: c(m.palette.text.primary),
|
|
113
|
+
textAlign: "left",
|
|
114
|
+
lineHeight: k(160)
|
|
115
|
+
});
|
|
116
|
+
const L = xe[(l == null ? void 0 : l.timeUnit) ?? "day"], z = c(m.palette.text.secondary).toCSSHex();
|
|
117
|
+
M.label.adapters.add("text", () => {
|
|
118
|
+
let t = "";
|
|
119
|
+
const a = [];
|
|
120
|
+
if (n.series.each((i) => {
|
|
121
|
+
const s = i.get("tooltipDataItem"), p = s == null ? void 0 : s.get("valueY");
|
|
122
|
+
if (s === void 0 || p === void 0 || p === null)
|
|
123
|
+
return;
|
|
124
|
+
if (!t)
|
|
125
|
+
if (r[0].type === "date") {
|
|
126
|
+
const o = s.get("valueX");
|
|
127
|
+
typeof o == "number" && (t = e.dateFormatter.format(
|
|
128
|
+
new Date(o),
|
|
129
|
+
L
|
|
130
|
+
));
|
|
131
|
+
} else
|
|
132
|
+
t = `${s.get("categoryX") ?? ""}`;
|
|
133
|
+
const u = i.get("stroke"), g = u ? `[${u.toCSSHex()}]●[/] ` : "";
|
|
134
|
+
a.push(
|
|
135
|
+
`${g}${i.get("name")}: ${e.numberFormatter.format(
|
|
136
|
+
p
|
|
137
|
+
)}`
|
|
138
|
+
);
|
|
139
|
+
}), a.length === 0) {
|
|
140
|
+
if (r[0].type === "date") {
|
|
141
|
+
const s = d.positionToValue(
|
|
142
|
+
d.getPrivate("tooltipPosition", 0)
|
|
143
|
+
);
|
|
144
|
+
typeof s == "number" && !Number.isNaN(s) && (t = e.dateFormatter.format(new Date(s), L));
|
|
145
|
+
}
|
|
146
|
+
const i = `[${z}]No data[/]`;
|
|
147
|
+
return t ? `[bold]${t}[/]
|
|
148
|
+
${i}` : i;
|
|
149
|
+
}
|
|
150
|
+
return t ? `[bold]${t}[/]
|
|
151
|
+
${a.join(`
|
|
152
|
+
`)}` : a.join(`
|
|
153
|
+
`);
|
|
154
|
+
}), d.set("tooltip", M), y.forEach((t) => {
|
|
155
|
+
const a = n.series.push(
|
|
156
|
+
ce.new(e, {
|
|
157
|
+
// Legend/tooltip label: explicit override, else humanize the raw
|
|
158
|
+
// backend field (snake_case / lowercase → Title Case).
|
|
159
|
+
name: t.label ?? ae(t.name),
|
|
160
|
+
xAxis: d,
|
|
161
|
+
yAxis: N,
|
|
162
|
+
valueYField: t.dataFieldName,
|
|
163
|
+
// When false, the line breaks at missing points. On a date axis the
|
|
164
|
+
// break is auto-detected when adjacent points are spaced more than
|
|
165
|
+
// `autoGapCount` (default 1.1) base intervals apart, so absent dates
|
|
166
|
+
// surface as gaps instead of being bridged by a straight segment.
|
|
167
|
+
connect: T,
|
|
168
|
+
autoGapCount: R,
|
|
169
|
+
...r[0].type === "date" ? { valueXField: r[0].value } : { categoryXField: r[0].value }
|
|
93
170
|
})
|
|
94
171
|
);
|
|
95
|
-
|
|
172
|
+
if (r[0].type === "date" && (a.data.processor = ue.new(e, {
|
|
96
173
|
dateFormat: "i",
|
|
97
|
-
dateFields: [
|
|
98
|
-
})),
|
|
99
|
-
|
|
174
|
+
dateFields: [r[0].value]
|
|
175
|
+
})), r[0].type === "date") {
|
|
176
|
+
const i = r[0].value, s = Ae[(l == null ? void 0 : l.timeUnit) ?? "day"] * ((l == null ? void 0 : l.count) ?? 1), p = T ? 1 / 0 : s * R, u = f.map((o) => ({
|
|
177
|
+
t: new Date(o[i]).getTime(),
|
|
178
|
+
hasValue: o[t.dataFieldName] !== null && o[t.dataFieldName] !== void 0
|
|
179
|
+
})).filter((o) => o.hasValue && !Number.isNaN(o.t)), g = /* @__PURE__ */ new Set();
|
|
180
|
+
u.forEach((o, A) => {
|
|
181
|
+
const D = A > 0 ? o.t - u[A - 1].t : 1 / 0, x = A < u.length - 1 ? u[A + 1].t - o.t : 1 / 0;
|
|
182
|
+
D > p && x > p && g.add(o.t);
|
|
183
|
+
}), g.size > 0 && a.bullets.push((o, A, D) => {
|
|
184
|
+
const x = D.dataContext;
|
|
185
|
+
if (g.has(new Date(x == null ? void 0 : x[i]).getTime()))
|
|
186
|
+
return ye.new(o, {
|
|
187
|
+
sprite: fe.new(o, {
|
|
188
|
+
radius: 3,
|
|
189
|
+
fill: a.get("fill"),
|
|
190
|
+
stroke: o.interfaceColors.get("background"),
|
|
191
|
+
strokeWidth: 1
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
a.data.setAll(f), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
|
|
197
|
+
}), n.set(
|
|
100
198
|
"cursor",
|
|
101
|
-
|
|
199
|
+
he.new(e, { xAxis: d, behavior: "none" })
|
|
102
200
|
).lineY.set("visible", !1);
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
width:
|
|
201
|
+
const h = n.bottomAxesContainer.children.push(
|
|
202
|
+
ge.new(e, {
|
|
203
|
+
width: k(100),
|
|
106
204
|
paddingTop: 10,
|
|
107
|
-
centerX:
|
|
108
|
-
x:
|
|
205
|
+
centerX: k(50),
|
|
206
|
+
x: k(50),
|
|
109
207
|
layout: e.gridLayout
|
|
110
208
|
})
|
|
111
209
|
);
|
|
112
|
-
|
|
113
|
-
var
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
210
|
+
h.itemContainers.template.events.on("pointerover", function(t) {
|
|
211
|
+
var s;
|
|
212
|
+
const a = t.target, i = (s = a == null ? void 0 : a.dataItem) == null ? void 0 : s.dataContext;
|
|
213
|
+
n.series.each(function(p) {
|
|
214
|
+
p !== i ? p.strokes.template.setAll({
|
|
117
215
|
strokeOpacity: 0.15,
|
|
118
|
-
stroke:
|
|
119
|
-
}) :
|
|
216
|
+
stroke: c(0)
|
|
217
|
+
}) : p.strokes.template.setAll({ strokeWidth: 3 });
|
|
120
218
|
});
|
|
121
|
-
}),
|
|
122
|
-
|
|
123
|
-
|
|
219
|
+
}), h.itemContainers.template.events.on("pointerout", function() {
|
|
220
|
+
n.series.each(function(t) {
|
|
221
|
+
t.strokes.template.setAll({
|
|
124
222
|
strokeOpacity: 1,
|
|
125
223
|
strokeWidth: 2,
|
|
126
|
-
stroke:
|
|
224
|
+
stroke: t.get("fill")
|
|
127
225
|
});
|
|
128
226
|
});
|
|
129
|
-
}),
|
|
130
|
-
width:
|
|
227
|
+
}), h.itemContainers.template.set("width", U), h.valueLabels.template.setAll({
|
|
228
|
+
width: U,
|
|
131
229
|
textAlign: "right"
|
|
132
|
-
}),
|
|
133
|
-
},
|
|
230
|
+
}), h.data.setAll(n.series.values), ne(e, (P = y == null ? void 0 : y[0]) == null ? void 0 : P.format), n.appear(1e3, 100);
|
|
231
|
+
}, E), () => {
|
|
134
232
|
var e;
|
|
135
|
-
|
|
233
|
+
C && clearTimeout(C), (e = F.current) == null || e.dispose(), F.current = null;
|
|
136
234
|
};
|
|
137
|
-
}, [
|
|
138
|
-
const
|
|
139
|
-
return { chartId:
|
|
235
|
+
}, [w, r, y, m.palette.mode, X, T]);
|
|
236
|
+
const W = { ...b };
|
|
237
|
+
return { chartId: H, ownerState: W, sx: G, error: v, other: I };
|
|
140
238
|
};
|
|
141
239
|
export {
|
|
142
|
-
|
|
240
|
+
Ue as useLineChartLogic
|
|
143
241
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import { useThemeProps as
|
|
1
|
+
import { G as X, R as j, A as z, T, b as q } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as U, useTheme as $ } from "@mui/material";
|
|
3
3
|
import C from "lodash";
|
|
4
|
-
import { useId as
|
|
5
|
-
import {
|
|
4
|
+
import { useId as H, useRef as J, useEffect as K } from "react";
|
|
5
|
+
import { humanizeLabel as F } from "../_common/format.js";
|
|
6
|
+
import { colorSetFromPalette as Q, applyValueFormat as Z } from "../_common/utils.js";
|
|
6
7
|
import { c as D, a as w } from "../../../ColorSet-C7vpNXhM.js";
|
|
7
|
-
import { X as
|
|
8
|
-
import { L as
|
|
9
|
-
import { D as
|
|
10
|
-
import { A as
|
|
11
|
-
import { C as
|
|
12
|
-
import { X as
|
|
13
|
-
import { L as
|
|
14
|
-
import { D as
|
|
15
|
-
import { C as
|
|
16
|
-
import { B as
|
|
17
|
-
class x extends
|
|
8
|
+
import { X as ee, V as te } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { L as re } from "../../../Legend-Dp_MKfS4.js";
|
|
10
|
+
import { D as se } from "../../../DateAxis-YX3QNIB-.js";
|
|
11
|
+
import { A as P, a as ae } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
12
|
+
import { C as ie } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
13
|
+
import { X as oe } from "../../../XYCursor-C8WktvKM.js";
|
|
14
|
+
import { L as le } from "../../../LineSeries-Uiv5o56b.js";
|
|
15
|
+
import { D as ne } from "../../../DataProcessor-CHDO51q4.js";
|
|
16
|
+
import { C as ce } from "../../../Circle-Cy5s-pVc.js";
|
|
17
|
+
import { B as ue } from "../../../Bullet-DVczI2TD.js";
|
|
18
|
+
class x extends X {
|
|
18
19
|
_beforeChanged() {
|
|
19
20
|
super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
|
|
20
21
|
}
|
|
@@ -39,33 +40,33 @@ Object.defineProperty(x, "classNames", {
|
|
|
39
40
|
enumerable: !0,
|
|
40
41
|
configurable: !0,
|
|
41
42
|
writable: !0,
|
|
42
|
-
value:
|
|
43
|
+
value: X.classNames.concat([x.className])
|
|
43
44
|
});
|
|
44
|
-
const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"],
|
|
45
|
-
const n =
|
|
45
|
+
const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ee = (L) => {
|
|
46
|
+
const n = U({ props: L, name: "HCMultipleValueAxes" }), {
|
|
46
47
|
dimensions: s,
|
|
47
48
|
values: t,
|
|
48
|
-
data:
|
|
49
|
-
initDelay:
|
|
50
|
-
baseInterval:
|
|
49
|
+
data: p,
|
|
50
|
+
initDelay: Y = 0,
|
|
51
|
+
baseInterval: I,
|
|
51
52
|
colors: R,
|
|
52
|
-
sx:
|
|
53
|
-
...
|
|
54
|
-
} = n,
|
|
53
|
+
sx: O,
|
|
54
|
+
...V
|
|
55
|
+
} = n, d = $(), _ = `hc-multiple-value-axes-${H().replace(/:/g, "")}`, y = J(null);
|
|
55
56
|
let h = null;
|
|
56
|
-
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"),
|
|
57
|
+
s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), K(() => {
|
|
57
58
|
if (h) return;
|
|
58
59
|
let b;
|
|
59
60
|
return b = setTimeout(() => {
|
|
60
61
|
var N;
|
|
61
|
-
const e =
|
|
62
|
-
y.current = e, e.setThemes([
|
|
63
|
-
text: D(
|
|
64
|
-
grid: D(
|
|
65
|
-
stroke: D(
|
|
62
|
+
const e = j.new(_);
|
|
63
|
+
y.current = e, e.setThemes([z.new(e)]), e.interfaceColors.setAll({
|
|
64
|
+
text: D(d.palette.text.primary),
|
|
65
|
+
grid: D(d.palette.divider),
|
|
66
|
+
stroke: D(d.palette.divider)
|
|
66
67
|
});
|
|
67
68
|
const r = e.container.children.push(
|
|
68
|
-
|
|
69
|
+
ee.new(e, {
|
|
69
70
|
panX: !1,
|
|
70
71
|
panY: !1,
|
|
71
72
|
wheelX: "none",
|
|
@@ -73,44 +74,44 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Re = (L) => {
|
|
|
73
74
|
layout: e.verticalLayout
|
|
74
75
|
})
|
|
75
76
|
);
|
|
76
|
-
r.set("colors",
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
),
|
|
80
|
-
let u,
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
r.set("colors", Q(e, R)), r.get("colors", {}).set("step", 3);
|
|
78
|
+
const G = r.children.push(
|
|
79
|
+
re.new(e, { centerX: w, x: w })
|
|
80
|
+
), l = s[0];
|
|
81
|
+
let u, m = p;
|
|
82
|
+
l.type === "date" ? (u = r.xAxes.push(
|
|
83
|
+
se.new(e, {
|
|
83
84
|
maxDeviation: 0.1,
|
|
84
85
|
groupData: !1,
|
|
85
|
-
baseInterval:
|
|
86
|
-
renderer:
|
|
86
|
+
baseInterval: I || { timeUnit: "day", count: 1 },
|
|
87
|
+
renderer: P.new(e, {}),
|
|
87
88
|
tooltip: T.new(e, {})
|
|
88
89
|
})
|
|
89
|
-
),
|
|
90
|
-
|
|
91
|
-
categoryField:
|
|
92
|
-
renderer:
|
|
90
|
+
), m = C.orderBy(p, [l.value])) : (u = r.xAxes.push(
|
|
91
|
+
ie.new(e, {
|
|
92
|
+
categoryField: l.value,
|
|
93
|
+
renderer: P.new(e, {}),
|
|
93
94
|
tooltip: T.new(e, {})
|
|
94
95
|
})
|
|
95
96
|
), e.numberFormatter.setAll({
|
|
96
97
|
numberFormat: "#",
|
|
97
98
|
numericFields: ["valueX"]
|
|
98
|
-
}),
|
|
99
|
-
function E(
|
|
100
|
-
const f =
|
|
101
|
-
|
|
99
|
+
}), m = C.orderBy(p, [l.value]), u.data.setAll(m));
|
|
100
|
+
function E(i, o, c, S, W, v, M) {
|
|
101
|
+
const f = ae.new(e, { opposite: W }), k = r.yAxes.push(
|
|
102
|
+
te.new(e, { maxDeviation: 1, renderer: f })
|
|
102
103
|
);
|
|
103
104
|
r.yAxes.indexOf(k) > 0 && k.set("syncWithAxis", r.yAxes.getIndex(0));
|
|
104
105
|
const a = r.series.push(
|
|
105
|
-
|
|
106
|
-
name:
|
|
106
|
+
le.new(e, {
|
|
107
|
+
name: o,
|
|
107
108
|
xAxis: u,
|
|
108
109
|
yAxis: k,
|
|
109
|
-
valueYField:
|
|
110
|
-
...
|
|
110
|
+
valueYField: S,
|
|
111
|
+
...l.type === "date" ? { valueXField: c } : { categoryXField: c },
|
|
111
112
|
tooltip: T.new(e, {
|
|
112
113
|
pointerOrientation: "horizontal",
|
|
113
|
-
labelText: `${
|
|
114
|
+
labelText: `${o}: {valueY}`
|
|
114
115
|
})
|
|
115
116
|
})
|
|
116
117
|
);
|
|
@@ -118,7 +119,7 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Re = (L) => {
|
|
|
118
119
|
stroke: a.get("fill"),
|
|
119
120
|
strokeOpacity: 1,
|
|
120
121
|
opacity: 1
|
|
121
|
-
}),
|
|
122
|
+
}), M === "date" && (a.data.processor = ne.new(e, {
|
|
122
123
|
dateFormat: "i",
|
|
123
124
|
dateFields: [c]
|
|
124
125
|
})), v !== void 0 && a.bullets.push(function() {
|
|
@@ -137,23 +138,23 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Re = (L) => {
|
|
|
137
138
|
strokeWidth: 2,
|
|
138
139
|
stroke: a.get("stroke"),
|
|
139
140
|
fill: e.interfaceColors.get("background")
|
|
140
|
-
}) : g =
|
|
141
|
+
}) : g = ce.new(e, {
|
|
141
142
|
strokeWidth: 2,
|
|
142
143
|
radius: 4,
|
|
143
144
|
stroke: a.get("stroke"),
|
|
144
145
|
fill: e.interfaceColors.get("background")
|
|
145
|
-
}),
|
|
146
|
-
}), a.data.setAll(
|
|
146
|
+
}), ue.new(e, { sprite: g });
|
|
147
|
+
}), a.data.setAll(i);
|
|
147
148
|
}
|
|
148
149
|
if (r.set(
|
|
149
150
|
"cursor",
|
|
150
|
-
|
|
151
|
+
oe.new(e, { xAxis: u, behavior: "none" })
|
|
151
152
|
).lineY.set("visible", !1), s.length > 1) {
|
|
152
|
-
const
|
|
153
|
-
Object.keys(
|
|
153
|
+
const i = C.groupBy(m, s[1].value);
|
|
154
|
+
Object.keys(i).forEach((o, c) => {
|
|
154
155
|
E(
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
i[o],
|
|
157
|
+
F(o),
|
|
157
158
|
s[0].value,
|
|
158
159
|
t[0].dataFieldName,
|
|
159
160
|
c !== 0,
|
|
@@ -161,26 +162,26 @@ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Re = (L) => {
|
|
|
161
162
|
);
|
|
162
163
|
});
|
|
163
164
|
} else
|
|
164
|
-
t.forEach((
|
|
165
|
+
t.forEach((i, o) => {
|
|
165
166
|
E(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
A[
|
|
172
|
-
|
|
167
|
+
m,
|
|
168
|
+
i.label ?? F(i.name),
|
|
169
|
+
l.value,
|
|
170
|
+
i.dataFieldName,
|
|
171
|
+
o !== 0,
|
|
172
|
+
A[o % A.length],
|
|
173
|
+
l.type
|
|
173
174
|
);
|
|
174
175
|
});
|
|
175
|
-
|
|
176
|
-
},
|
|
176
|
+
G.data.setAll(r.series.values), Z(e, (N = t == null ? void 0 : t[0]) == null ? void 0 : N.format), r.appear(1e3, 100);
|
|
177
|
+
}, Y), () => {
|
|
177
178
|
var e;
|
|
178
179
|
b && clearTimeout(b), (e = y.current) == null || e.dispose(), y.current = null;
|
|
179
180
|
};
|
|
180
|
-
}, [
|
|
181
|
-
const
|
|
182
|
-
return { chartId: _, ownerState:
|
|
181
|
+
}, [p, s, t, d.palette.mode, R]);
|
|
182
|
+
const B = { ...n };
|
|
183
|
+
return { chartId: _, ownerState: B, sx: O, error: h, other: V };
|
|
183
184
|
};
|
|
184
185
|
export {
|
|
185
|
-
|
|
186
|
+
Ee as useMultipleValueAxesLogic
|
|
186
187
|
};
|