@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,16 +1,16 @@
|
|
|
1
|
-
import { C as L, L as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import
|
|
1
|
+
import { C as L, L as E, k as J, l as K, T as W, R as Q, A as Z } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as ee, useTheme as te } from "@mui/material";
|
|
3
|
+
import re from "dayjs";
|
|
4
4
|
import T from "lodash";
|
|
5
|
-
import { useId as
|
|
6
|
-
import { colorSetFromPalette as
|
|
7
|
-
import { m as
|
|
8
|
-
import { X as
|
|
9
|
-
import { A as
|
|
5
|
+
import { useId as ae, useRef as ie, useEffect as se } from "react";
|
|
6
|
+
import { applyValueFormat as oe, colorSetFromPalette as ne } from "../_common/utils.js";
|
|
7
|
+
import { m as S, f as le, u as U, b as u, p as P, c as Y } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { X as he } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { A as ce, a as ue } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
10
10
|
import { C as R } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
11
|
-
import { R as
|
|
12
|
-
import { L as
|
|
13
|
-
import { C as
|
|
11
|
+
import { R as de } from "../../../RoundedRectangle-CWLi2PXn.js";
|
|
12
|
+
import { L as me } from "../../../LinearGradient-DiRq5YcI.js";
|
|
13
|
+
import { C as pe } from "../../../ColumnSeries-CjgdJ2QL.js";
|
|
14
14
|
class _ extends L {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments), Object.defineProperty(this, "labelContainer", {
|
|
@@ -27,23 +27,23 @@ class _ extends L {
|
|
|
27
27
|
enumerable: !0,
|
|
28
28
|
configurable: !0,
|
|
29
29
|
writable: !0,
|
|
30
|
-
value: this.labelContainer.children.push(
|
|
30
|
+
value: this.labelContainer.children.push(E.new(this._root, { themeTags: ["start"] }))
|
|
31
31
|
}), Object.defineProperty(this, "endLabel", {
|
|
32
32
|
enumerable: !0,
|
|
33
33
|
configurable: !0,
|
|
34
34
|
writable: !0,
|
|
35
|
-
value: this.labelContainer.children.push(
|
|
35
|
+
value: this.labelContainer.children.push(E.new(this._root, { themeTags: ["end"] }))
|
|
36
36
|
}), Object.defineProperty(this, "markers", {
|
|
37
37
|
enumerable: !0,
|
|
38
38
|
configurable: !0,
|
|
39
39
|
writable: !0,
|
|
40
|
-
value: this.addDisposer(new
|
|
41
|
-
themeTags:
|
|
40
|
+
value: this.addDisposer(new J(K.new({}), () => de._new(this._root, {
|
|
41
|
+
themeTags: S(this.markers.template.get("themeTags", []), [this.get("orientation"), "heatlegend", "marker"])
|
|
42
42
|
}, [this.markers.template])))
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
_afterNew() {
|
|
46
|
-
this._settings.themeTags =
|
|
46
|
+
this._settings.themeTags = S(this._settings.themeTags, ["heatlegend", this._settings.orientation]), super._afterNew(), this.set("tooltip", W.new(this._root, {
|
|
47
47
|
themeTags: ["heatlegend"]
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
@@ -63,55 +63,55 @@ class _ extends L {
|
|
|
63
63
|
* @param text Text
|
|
64
64
|
* @param color Color
|
|
65
65
|
*/
|
|
66
|
-
showValue(s,
|
|
66
|
+
showValue(s, a, t) {
|
|
67
67
|
const i = this.getTooltip();
|
|
68
|
-
if (i &&
|
|
68
|
+
if (i && le(s)) {
|
|
69
69
|
const d = this.get("startValue", 0), o = this.get("endValue", 1);
|
|
70
|
-
let
|
|
71
|
-
(
|
|
70
|
+
let r = (s - d) / (o - d);
|
|
71
|
+
(r == 1 / 0 || r == -1 / 0 || isNaN(r)) && (r = 0.5);
|
|
72
72
|
const f = this.get("startColor"), y = this.get("endColor");
|
|
73
|
-
|
|
73
|
+
a || (a = this.getNumberFormatter().format(s)), t || (t = U.interpolate(r, f, y)), i.label.set("text", a);
|
|
74
74
|
let n;
|
|
75
|
-
this.get("orientation") == "vertical" ? n = this.markerContainer.toGlobal({ x: 0, y: this.innerHeight() * (1 -
|
|
75
|
+
this.get("orientation") == "vertical" ? n = this.markerContainer.toGlobal({ x: 0, y: this.innerHeight() * (1 - r) }) : n = this.markerContainer.toGlobal({ x: this.innerWidth() * r, y: 0 });
|
|
76
76
|
let l = i.get("background");
|
|
77
|
-
l && l.set("fill",
|
|
77
|
+
l && l.set("fill", t), i.set("pointTo", n), i.show();
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
_prepareChildren() {
|
|
81
81
|
super._prepareChildren();
|
|
82
|
-
const s = this.labelContainer,
|
|
83
|
-
if (this.isDirty("orientation") && (
|
|
84
|
-
const o = this.get("stepCount", 1),
|
|
82
|
+
const s = this.labelContainer, a = this.get("orientation"), t = this.startLabel, i = this.endLabel, d = this.getTooltip();
|
|
83
|
+
if (this.isDirty("orientation") && (a == "vertical" ? (this.markerContainer.setAll({ layout: this._root.verticalLayout, height: u }), this.set("layout", this._root.horizontalLayout), t.setAll({ y: u, x: void 0, centerY: u, centerX: u }), i.setAll({ y: 0, x: void 0, centerY: 0, centerX: u }), s.setAll({ height: u, width: void 0 }), d && d.set("pointerOrientation", "horizontal")) : (this.markerContainer.setAll({ layout: this._root.horizontalLayout, width: u }), this.set("layout", this._root.verticalLayout), t.setAll({ x: 0, y: void 0, centerX: 0, centerY: 0 }), i.setAll({ x: u, y: void 0, centerX: u, centerY: 0 }), s.setAll({ width: u, height: void 0 }), d && d.set("pointerOrientation", "vertical"))), this.isDirty("stepCount")) {
|
|
84
|
+
const o = this.get("stepCount", 1), r = this.get("startColor"), f = this.get("endColor"), y = this.get("startOpacity", 1), n = this.get("endOpacity", 1);
|
|
85
85
|
if (this.markerContainer.children.clear(), o > 1)
|
|
86
86
|
for (let l = 0; l < o; l++) {
|
|
87
87
|
const h = this.makeMarker();
|
|
88
|
-
|
|
89
|
-
fill:
|
|
88
|
+
a == "vertical" ? this.markerContainer.children.moveValue(h, 0) : this.markerContainer.children.push(h), r && f && h.setAll({
|
|
89
|
+
fill: U.interpolate(l / o, r, f),
|
|
90
90
|
fillOpacity: P(l / o * 100).interpolate(y, n)
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
else if (o == 1) {
|
|
94
94
|
const l = this.makeMarker();
|
|
95
95
|
this.markerContainer.children.push(l);
|
|
96
|
-
const h =
|
|
96
|
+
const h = me.new(this._root, {
|
|
97
97
|
stops: [{
|
|
98
|
-
color:
|
|
98
|
+
color: r,
|
|
99
99
|
opacity: y
|
|
100
100
|
}, {
|
|
101
101
|
color: f,
|
|
102
102
|
opacity: n
|
|
103
103
|
}]
|
|
104
104
|
});
|
|
105
|
-
if (
|
|
105
|
+
if (a == "vertical") {
|
|
106
106
|
h.set("rotation", 90);
|
|
107
107
|
let b = h.get("stops");
|
|
108
108
|
b && b.reverse();
|
|
109
109
|
} else
|
|
110
110
|
h.set("rotation", 0);
|
|
111
|
-
|
|
111
|
+
r && f && l.set("fillGradient", h);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
(this.isDirty("startText") || this.isDirty("startValue")) &&
|
|
114
|
+
(this.isDirty("startText") || this.isDirty("startValue")) && t.set("text", this.get("startText", this.getNumberFormatter().format(this.get("startValue", 0)))), (this.isDirty("endText") || this.isDirty("endValue")) && i.set("text", this.get("endText", this.getNumberFormatter().format(this.get("endValue", 1))));
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
Object.defineProperty(_, "className", {
|
|
@@ -126,31 +126,31 @@ Object.defineProperty(_, "classNames", {
|
|
|
126
126
|
writable: !0,
|
|
127
127
|
value: L.classNames.concat([_.className])
|
|
128
128
|
});
|
|
129
|
-
const
|
|
130
|
-
const s =
|
|
131
|
-
dimensions:
|
|
132
|
-
values:
|
|
129
|
+
const _e = (X) => {
|
|
130
|
+
const s = ee({ props: X, name: "HCHeatmap" }), {
|
|
131
|
+
dimensions: a,
|
|
132
|
+
values: t,
|
|
133
133
|
data: i,
|
|
134
134
|
initDelay: d = 0,
|
|
135
135
|
baseInterval: o,
|
|
136
|
-
colors:
|
|
136
|
+
colors: r,
|
|
137
137
|
sx: f,
|
|
138
138
|
...y
|
|
139
|
-
} = s, n =
|
|
139
|
+
} = s, n = te(), h = `hc-heatmap-${ae().replace(/:/g, "")}`, b = ie(null);
|
|
140
140
|
let x = null;
|
|
141
|
-
|
|
141
|
+
a.length < 2 ? x = "Heatmap requires at least 2 dimensions" : t.length < 1 && (x = "Heatmap requires at least 1 value"), se(() => {
|
|
142
142
|
if (x) return;
|
|
143
143
|
let D;
|
|
144
144
|
return D = setTimeout(() => {
|
|
145
|
-
var j, M;
|
|
146
|
-
const e =
|
|
147
|
-
b.current = e, e.setThemes([
|
|
145
|
+
var j, M, G;
|
|
146
|
+
const e = Q.new(h);
|
|
147
|
+
b.current = e, oe(e, (j = t == null ? void 0 : t[0]) == null ? void 0 : j.format), e.setThemes([Z.new(e)]), e.interfaceColors.setAll({
|
|
148
148
|
text: Y(n.palette.text.primary),
|
|
149
149
|
grid: Y(n.palette.divider),
|
|
150
150
|
stroke: Y(n.palette.divider)
|
|
151
151
|
});
|
|
152
152
|
const m = e.container.children.push(
|
|
153
|
-
|
|
153
|
+
he.new(e, {
|
|
154
154
|
panX: !1,
|
|
155
155
|
panY: !1,
|
|
156
156
|
wheelX: "none",
|
|
@@ -158,13 +158,13 @@ const Ye = (X) => {
|
|
|
158
158
|
layout: e.verticalLayout
|
|
159
159
|
})
|
|
160
160
|
);
|
|
161
|
-
m.set("colors",
|
|
162
|
-
const O =
|
|
161
|
+
m.set("colors", ne(e, r));
|
|
162
|
+
const O = ce.new(e, {
|
|
163
163
|
visible: !1,
|
|
164
164
|
minGridDistance: 30
|
|
165
165
|
});
|
|
166
166
|
O.grid.template.set("visible", !1);
|
|
167
|
-
const c =
|
|
167
|
+
const c = a[0];
|
|
168
168
|
let k, v = i;
|
|
169
169
|
if (c.type === "date") {
|
|
170
170
|
const p = (o == null ? void 0 : o.timeUnit) || "day";
|
|
@@ -176,19 +176,19 @@ const Ye = (X) => {
|
|
|
176
176
|
})
|
|
177
177
|
), v = T.orderBy(i, [c.value]), v = v.map((w) => ({
|
|
178
178
|
...w,
|
|
179
|
-
[c.value]:
|
|
179
|
+
[c.value]: re(w[c.value]).format(C)
|
|
180
180
|
}));
|
|
181
181
|
} else
|
|
182
182
|
k = m.xAxes.push(
|
|
183
183
|
R.new(e, {
|
|
184
184
|
categoryField: c.value,
|
|
185
185
|
renderer: O,
|
|
186
|
-
tooltip:
|
|
186
|
+
tooltip: W.new(e, {})
|
|
187
187
|
})
|
|
188
188
|
);
|
|
189
189
|
const H = T.uniqBy(v, c.value);
|
|
190
|
-
if (k.data.setAll(H),
|
|
191
|
-
const p =
|
|
190
|
+
if (k.data.setAll(H), t.length === 1 && a.length > 1) {
|
|
191
|
+
const p = a[1].value, C = ue.new(e, {
|
|
192
192
|
visible: !1,
|
|
193
193
|
minGridDistance: 20,
|
|
194
194
|
inversed: !0
|
|
@@ -200,16 +200,16 @@ const Ye = (X) => {
|
|
|
200
200
|
renderer: C,
|
|
201
201
|
categoryField: p
|
|
202
202
|
})
|
|
203
|
-
),
|
|
203
|
+
), I = e.interfaceColors.get("background"), F = m.bottomAxesContainer.children.push(
|
|
204
204
|
_.new(e, {
|
|
205
205
|
orientation: "horizontal",
|
|
206
|
-
startColor:
|
|
207
|
-
endColor: (
|
|
206
|
+
startColor: I,
|
|
207
|
+
endColor: (M = m.get("colors")) == null ? void 0 : M.getIndex(0),
|
|
208
208
|
startOpacity: 1,
|
|
209
209
|
endOpacity: 1
|
|
210
210
|
})
|
|
211
211
|
), g = m.series.push(
|
|
212
|
-
|
|
212
|
+
pe.new(e, {
|
|
213
213
|
calculateAggregates: !0,
|
|
214
214
|
stroke: Y(16777215),
|
|
215
215
|
clustered: !1,
|
|
@@ -217,7 +217,7 @@ const Ye = (X) => {
|
|
|
217
217
|
yAxis: w,
|
|
218
218
|
categoryXField: c.value,
|
|
219
219
|
categoryYField: p,
|
|
220
|
-
valueField:
|
|
220
|
+
valueField: t[0].dataFieldName
|
|
221
221
|
})
|
|
222
222
|
);
|
|
223
223
|
g.columns.template.setAll({
|
|
@@ -228,41 +228,41 @@ const Ye = (X) => {
|
|
|
228
228
|
height: P(100)
|
|
229
229
|
}), g.columns.template.events.on("pointerover", function(V) {
|
|
230
230
|
const A = V.target.dataItem;
|
|
231
|
-
A &&
|
|
231
|
+
A && F.showValue(A.get(p, 0));
|
|
232
232
|
}), g.events.on("datavalidated", function() {
|
|
233
|
-
|
|
233
|
+
F.set("startValue", g.getPrivate("valueLow")), F.set("endValue", g.getPrivate("valueHigh"));
|
|
234
234
|
}), g.set("heatRules", [
|
|
235
235
|
{
|
|
236
236
|
target: g.columns.template,
|
|
237
|
-
min:
|
|
238
|
-
max: (
|
|
237
|
+
min: I,
|
|
238
|
+
max: (G = m.get("colors")) == null ? void 0 : G.getIndex(0),
|
|
239
239
|
dataField: "value",
|
|
240
240
|
key: "fill"
|
|
241
241
|
}
|
|
242
242
|
]);
|
|
243
|
-
const
|
|
243
|
+
const q = T.uniqBy(v, p), N = [];
|
|
244
244
|
H.forEach((V) => {
|
|
245
|
-
|
|
246
|
-
const
|
|
245
|
+
q.forEach((A) => {
|
|
246
|
+
const z = {
|
|
247
247
|
[c.value]: V[c.value],
|
|
248
248
|
[p]: A[p]
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
...
|
|
252
|
-
[
|
|
253
|
-
}) :
|
|
249
|
+
}, B = T.find(v, z);
|
|
250
|
+
B === void 0 ? N.push({
|
|
251
|
+
...z,
|
|
252
|
+
[t[0].dataFieldName]: 0
|
|
253
|
+
}) : N.push(B);
|
|
254
254
|
});
|
|
255
|
-
}), w.data.setAll(
|
|
255
|
+
}), w.data.setAll(q), g.data.setAll(N);
|
|
256
256
|
}
|
|
257
257
|
m.appear(1e3, 100);
|
|
258
258
|
}, d), () => {
|
|
259
259
|
var e;
|
|
260
260
|
D && clearTimeout(D), (e = b.current) == null || e.dispose(), b.current = null;
|
|
261
261
|
};
|
|
262
|
-
}, [i,
|
|
263
|
-
const
|
|
264
|
-
return { chartId: h, ownerState:
|
|
262
|
+
}, [i, a, t, n.palette.mode, r]);
|
|
263
|
+
const $ = { ...s };
|
|
264
|
+
return { chartId: h, ownerState: $, sx: f, error: x, other: y };
|
|
265
265
|
};
|
|
266
266
|
export {
|
|
267
|
-
|
|
267
|
+
_e as useHeatmapLogic
|
|
268
268
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { R as E, a as M, A as
|
|
2
|
-
import { useThemeProps as
|
|
1
|
+
import { R as E, a as M, A as z, T as A } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as H, useTheme as N } from "@mui/material";
|
|
3
3
|
import b from "lodash";
|
|
4
|
-
import { useId as
|
|
5
|
-
import { colorSetFromPalette as
|
|
6
|
-
import { c as
|
|
7
|
-
import { X as
|
|
8
|
-
import { D as
|
|
9
|
-
import { A as
|
|
10
|
-
import { C as
|
|
11
|
-
import { L as
|
|
12
|
-
import { D as
|
|
13
|
-
import { X as
|
|
14
|
-
import { L as
|
|
15
|
-
const
|
|
16
|
-
const v =
|
|
4
|
+
import { useId as S, useRef as U, useEffect as Z } from "react";
|
|
5
|
+
import { colorSetFromPalette as _, applyValueFormat as $ } from "../_common/utils.js";
|
|
6
|
+
import { c as l, p as g, b as D } from "../../../ColorSet-C7vpNXhM.js";
|
|
7
|
+
import { X as j, V as q } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
8
|
+
import { D as G } from "../../../DateAxis-YX3QNIB-.js";
|
|
9
|
+
import { A as L, a as J } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
10
|
+
import { C as K } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
11
|
+
import { L as Q } from "../../../LineSeries-Uiv5o56b.js";
|
|
12
|
+
import { D as ee } from "../../../DataProcessor-CHDO51q4.js";
|
|
13
|
+
import { X as te } from "../../../XYCursor-C8WktvKM.js";
|
|
14
|
+
import { L as re } from "../../../Legend-Dp_MKfS4.js";
|
|
15
|
+
const xe = (Y) => {
|
|
16
|
+
const v = H({ props: Y, name: "HCLineChart" }), {
|
|
17
17
|
dimensions: t,
|
|
18
|
-
values:
|
|
19
|
-
data:
|
|
20
|
-
initDelay:
|
|
21
|
-
baseInterval:
|
|
18
|
+
values: a,
|
|
19
|
+
data: m,
|
|
20
|
+
initDelay: R = 0,
|
|
21
|
+
baseInterval: I,
|
|
22
22
|
colors: x,
|
|
23
|
-
sx:
|
|
24
|
-
...
|
|
25
|
-
} = v,
|
|
26
|
-
let
|
|
27
|
-
t.length < 1 ?
|
|
28
|
-
if (
|
|
23
|
+
sx: O,
|
|
24
|
+
...P
|
|
25
|
+
} = v, n = N(), w = `hc-line-chart-${S().replace(/:/g, "")}`, u = U(null);
|
|
26
|
+
let d = null;
|
|
27
|
+
t.length < 1 ? d = "Missing dimensions config!" : a.length < 1 && (d = "Missing values config!"), Z(() => {
|
|
28
|
+
if (d) return;
|
|
29
29
|
let h;
|
|
30
30
|
return h = setTimeout(() => {
|
|
31
|
-
var k, T, C;
|
|
31
|
+
var k, T, C, F;
|
|
32
32
|
const e = E.new(w);
|
|
33
33
|
u.current = e;
|
|
34
34
|
const W = M.new(e);
|
|
35
|
-
e.setThemes([
|
|
36
|
-
text:
|
|
37
|
-
grid:
|
|
38
|
-
stroke:
|
|
35
|
+
e.setThemes([z.new(e), W]), e.interfaceColors.setAll({
|
|
36
|
+
text: l(n.palette.text.primary),
|
|
37
|
+
grid: l(n.palette.divider),
|
|
38
|
+
stroke: l(n.palette.divider)
|
|
39
39
|
});
|
|
40
40
|
const r = e.container.children.push(
|
|
41
|
-
|
|
41
|
+
j.new(e, {
|
|
42
42
|
panX: !0,
|
|
43
43
|
panY: !0,
|
|
44
44
|
wheelX: "none",
|
|
@@ -47,42 +47,42 @@ const ge = (L) => {
|
|
|
47
47
|
pinchZoomX: !0
|
|
48
48
|
})
|
|
49
49
|
);
|
|
50
|
-
r.set("colors",
|
|
51
|
-
let
|
|
52
|
-
t[0].type === "date" ? (
|
|
53
|
-
|
|
50
|
+
r.set("colors", _(e, x));
|
|
51
|
+
let i, c = m;
|
|
52
|
+
t[0].type === "date" ? (i = r.xAxes.push(
|
|
53
|
+
G.new(e, {
|
|
54
54
|
maxDeviation: 0.1,
|
|
55
55
|
groupData: !1,
|
|
56
|
-
baseInterval:
|
|
57
|
-
renderer:
|
|
56
|
+
baseInterval: I || { timeUnit: "day", count: 1 },
|
|
57
|
+
renderer: L.new(e, {}),
|
|
58
58
|
tooltip: A.new(e, {})
|
|
59
59
|
})
|
|
60
|
-
),
|
|
61
|
-
|
|
60
|
+
), c = b.orderBy(m, [t[0].value])) : (i = r.xAxes.push(
|
|
61
|
+
K.new(e, {
|
|
62
62
|
categoryField: t[0].value,
|
|
63
|
-
renderer:
|
|
63
|
+
renderer: L.new(e, {}),
|
|
64
64
|
tooltip: A.new(e, {})
|
|
65
65
|
})
|
|
66
66
|
), e.numberFormatter.setAll({
|
|
67
67
|
numberFormat: "#",
|
|
68
68
|
numericFields: ["valueX"]
|
|
69
|
-
}),
|
|
69
|
+
}), c = b.orderBy(m, [t[0].value]), i.data.setAll(c));
|
|
70
70
|
const y = r.yAxes.push(
|
|
71
|
-
|
|
72
|
-
renderer:
|
|
71
|
+
q.new(e, {
|
|
72
|
+
renderer: J.new(e, {})
|
|
73
73
|
})
|
|
74
74
|
);
|
|
75
|
-
(k =
|
|
76
|
-
stroke:
|
|
75
|
+
(k = i.get("renderer")) == null || k.grid.template.setAll({
|
|
76
|
+
stroke: l(n.palette.divider),
|
|
77
77
|
strokeOpacity: 1
|
|
78
|
-
}), (T =
|
|
79
|
-
stroke:
|
|
78
|
+
}), (T = i.get("renderer")) == null || T.labels.template.setAll({ paddingTop: 12 }), (C = y.get("renderer")) == null || C.grid.template.setAll({
|
|
79
|
+
stroke: l(n.palette.divider),
|
|
80
80
|
strokeOpacity: 1
|
|
81
|
-
}),
|
|
81
|
+
}), a.forEach((s) => {
|
|
82
82
|
const o = r.series.push(
|
|
83
|
-
|
|
83
|
+
Q.new(e, {
|
|
84
84
|
name: s.name,
|
|
85
|
-
xAxis:
|
|
85
|
+
xAxis: i,
|
|
86
86
|
yAxis: y,
|
|
87
87
|
valueYField: s.dataFieldName,
|
|
88
88
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
|
|
@@ -92,16 +92,16 @@ const ge = (L) => {
|
|
|
92
92
|
})
|
|
93
93
|
})
|
|
94
94
|
);
|
|
95
|
-
t[0].type === "date" && (o.data.processor =
|
|
95
|
+
t[0].type === "date" && (o.data.processor = ee.new(e, {
|
|
96
96
|
dateFormat: "i",
|
|
97
97
|
dateFields: [t[0].value]
|
|
98
|
-
})), o.data.setAll(
|
|
98
|
+
})), o.data.setAll(c), o.strokes.template.setAll({ strokeWidth: 2 }), o.appear();
|
|
99
99
|
}), r.set(
|
|
100
100
|
"cursor",
|
|
101
|
-
|
|
101
|
+
te.new(e, { behavior: "none" })
|
|
102
102
|
).lineY.set("visible", !1);
|
|
103
|
-
const
|
|
104
|
-
|
|
103
|
+
const p = r.bottomAxesContainer.children.push(
|
|
104
|
+
re.new(e, {
|
|
105
105
|
width: g(100),
|
|
106
106
|
paddingTop: 10,
|
|
107
107
|
centerX: g(50),
|
|
@@ -109,16 +109,16 @@ const ge = (L) => {
|
|
|
109
109
|
layout: e.gridLayout
|
|
110
110
|
})
|
|
111
111
|
);
|
|
112
|
-
|
|
112
|
+
p.itemContainers.template.events.on("pointerover", function(s) {
|
|
113
113
|
var X;
|
|
114
114
|
const o = s.target, B = (X = o == null ? void 0 : o.dataItem) == null ? void 0 : X.dataContext;
|
|
115
115
|
r.series.each(function(f) {
|
|
116
116
|
f !== B ? f.strokes.template.setAll({
|
|
117
117
|
strokeOpacity: 0.15,
|
|
118
|
-
stroke:
|
|
118
|
+
stroke: l(0)
|
|
119
119
|
}) : f.strokes.template.setAll({ strokeWidth: 3 });
|
|
120
120
|
});
|
|
121
|
-
}),
|
|
121
|
+
}), p.itemContainers.template.events.on("pointerout", function() {
|
|
122
122
|
r.series.each(function(s) {
|
|
123
123
|
s.strokes.template.setAll({
|
|
124
124
|
strokeOpacity: 1,
|
|
@@ -126,18 +126,18 @@ const ge = (L) => {
|
|
|
126
126
|
stroke: s.get("fill")
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
|
-
}),
|
|
130
|
-
width:
|
|
129
|
+
}), p.itemContainers.template.set("width", D), p.valueLabels.template.setAll({
|
|
130
|
+
width: D,
|
|
131
131
|
textAlign: "right"
|
|
132
|
-
}),
|
|
133
|
-
},
|
|
132
|
+
}), p.data.setAll(r.series.values), $(e, (F = a == null ? void 0 : a[0]) == null ? void 0 : F.format), r.appear(1e3, 100);
|
|
133
|
+
}, R), () => {
|
|
134
134
|
var e;
|
|
135
135
|
h && clearTimeout(h), (e = u.current) == null || e.dispose(), u.current = null;
|
|
136
136
|
};
|
|
137
|
-
}, [
|
|
138
|
-
const
|
|
139
|
-
return { chartId: w, ownerState:
|
|
137
|
+
}, [m, t, a, n.palette.mode, x]);
|
|
138
|
+
const V = { ...v };
|
|
139
|
+
return { chartId: w, ownerState: V, sx: O, error: d, other: P };
|
|
140
140
|
};
|
|
141
141
|
export {
|
|
142
|
-
|
|
142
|
+
xe as useLineChartLogic
|
|
143
143
|
};
|