@hybridcore/ui 1.5.80 → 1.5.82
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/{AxisRendererY-CFo972D5.js → AxisRendererY-kADUad00.js} +2464 -3363
- package/dist/ColumnSeries-BTcqshjB.js +399 -0
- package/dist/DateAxis-CMum47iz.js +924 -0
- package/dist/LineSeries-CfcpoYla.js +549 -0
- package/dist/components/charts/candlestick/logic.js +133 -526
- package/dist/components/charts/highlighting-line-data/logic.js +152 -695
- package/dist/components/metric-card/MetricChart.js +525 -0
- package/dist/components/metric-card/index.js +88 -45
- package/dist/components/metric-card/logic.js +82 -37
- package/dist/components/metric-card/styled.js +109 -90
- package/dist/components/paginated-list/styled.js +3 -3
- package/dist/main.d.ts +33 -14
- package/package.json +1 -1
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import { useThemeProps as
|
|
3
|
-
import { useRef as
|
|
4
|
-
|
|
1
|
+
import { S as V, L as C, T, C as A, m as f, R as O, a as X, b as W, A as z, X as B, c as G, V as I, d as U, e as Z, f as q, g as J, p as M } from "../../../AxisRendererY-kADUad00.js";
|
|
2
|
+
import { useThemeProps as K } from "@mui/material";
|
|
3
|
+
import { useRef as R, useLayoutEffect as Q } from "react";
|
|
4
|
+
import { X as $, D as ee } from "../../../DateAxis-CMum47iz.js";
|
|
5
|
+
import { L as te } from "../../../LineSeries-CfcpoYla.js";
|
|
6
|
+
class D extends V {
|
|
5
7
|
constructor() {
|
|
6
8
|
super(...arguments), Object.defineProperty(this, "itemContainers", {
|
|
7
9
|
enumerable: !0,
|
|
8
10
|
configurable: !0,
|
|
9
11
|
writable: !0,
|
|
10
|
-
value: this.addDisposer(new
|
|
11
|
-
themeTags:
|
|
12
|
-
themeTagsSelf:
|
|
13
|
-
background:
|
|
14
|
-
themeTags:
|
|
15
|
-
themeTagsSelf:
|
|
12
|
+
value: this.addDisposer(new C(T.new({}), () => A._new(this._root, {
|
|
13
|
+
themeTags: f(this.itemContainers.template.get("themeTags", []), ["legend", "item"]),
|
|
14
|
+
themeTagsSelf: f(this.itemContainers.template.get("themeTagsSelf", []), ["itemcontainer"]),
|
|
15
|
+
background: O.new(this._root, {
|
|
16
|
+
themeTags: f(this.itemContainers.template.get("themeTags", []), ["legend", "item", "background"]),
|
|
17
|
+
themeTagsSelf: f(this.itemContainers.template.get("themeTagsSelf", []), ["itemcontainer"])
|
|
16
18
|
})
|
|
17
19
|
}, [this.itemContainers.template])))
|
|
18
20
|
}), Object.defineProperty(this, "markers", {
|
|
19
21
|
enumerable: !0,
|
|
20
22
|
configurable: !0,
|
|
21
23
|
writable: !0,
|
|
22
|
-
value: this.addDisposer(new
|
|
23
|
-
themeTags:
|
|
24
|
+
value: this.addDisposer(new C(T.new({}), () => A._new(this._root, {
|
|
25
|
+
themeTags: f(this.markers.template.get("themeTags", []), ["legend", "marker"])
|
|
24
26
|
}, [this.markers.template])))
|
|
25
27
|
}), Object.defineProperty(this, "labels", {
|
|
26
28
|
enumerable: !0,
|
|
27
29
|
configurable: !0,
|
|
28
30
|
writable: !0,
|
|
29
|
-
value: this.addDisposer(new
|
|
30
|
-
themeTags:
|
|
31
|
+
value: this.addDisposer(new C(T.new({}), () => X._new(this._root, {
|
|
32
|
+
themeTags: f(this.labels.template.get("themeTags", []), ["legend", "label"])
|
|
31
33
|
}, [this.labels.template])))
|
|
32
34
|
}), Object.defineProperty(this, "valueLabels", {
|
|
33
35
|
enumerable: !0,
|
|
34
36
|
configurable: !0,
|
|
35
37
|
writable: !0,
|
|
36
|
-
value: this.addDisposer(new
|
|
37
|
-
themeTags:
|
|
38
|
+
value: this.addDisposer(new C(T.new({}), () => X._new(this._root, {
|
|
39
|
+
themeTags: f(this.valueLabels.template.get("themeTags", []), ["legend", "label", "value"])
|
|
38
40
|
}, [this.valueLabels.template])))
|
|
39
41
|
}), Object.defineProperty(this, "markerRectangles", {
|
|
40
42
|
enumerable: !0,
|
|
41
43
|
configurable: !0,
|
|
42
44
|
writable: !0,
|
|
43
|
-
value: this.addDisposer(new
|
|
44
|
-
themeTags:
|
|
45
|
+
value: this.addDisposer(new C(T.new({}), () => O._new(this._root, {
|
|
46
|
+
themeTags: f(this.markerRectangles.template.get("themeTags", []), ["legend", "marker", "rectangle"])
|
|
45
47
|
}, [this.markerRectangles.template])))
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
_afterNew() {
|
|
49
|
-
this._settings.themeTags =
|
|
51
|
+
this._settings.themeTags = f(this._settings.themeTags, ["legend"]), this.fields.push("name", "stroke", "fill"), super._afterNew();
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
* @ignore
|
|
@@ -85,61 +87,61 @@ class H extends ae {
|
|
|
85
87
|
}
|
|
86
88
|
processDataItem(e) {
|
|
87
89
|
super.processDataItem(e);
|
|
88
|
-
const t = this.makeItemContainer(e),
|
|
90
|
+
const t = this.makeItemContainer(e), c = this.get("nameField"), r = this.get("fillField"), l = this.get("strokeField");
|
|
89
91
|
if (t) {
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
t.children.push(
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
e.set("markerRectangle",
|
|
98
|
-
|
|
99
|
-
}),
|
|
100
|
-
|
|
101
|
-
})) :
|
|
102
|
-
const
|
|
103
|
-
|
|
92
|
+
const o = this.get("clickTarget", "itemContainer"), s = e.dataContext;
|
|
93
|
+
s && s.set && s.set("legendDataItem", e), t._setDataItem(e), e.set("itemContainer", t);
|
|
94
|
+
const m = this.makeMarker();
|
|
95
|
+
if (m) {
|
|
96
|
+
t.children.push(m), m._setDataItem(e), e.set("marker", m);
|
|
97
|
+
const i = this.get("useDefaultMarker"), k = m.children.push(this.makeMarkerRectangle());
|
|
98
|
+
let g = e.get("fill"), n = e.get("stroke");
|
|
99
|
+
e.set("markerRectangle", k), s && s.get && (g = s.get(r, g), n = s.get(l, n)), n || (n = g), i ? s.on && (s.on(r, () => {
|
|
100
|
+
k.set("fill", s.get(r));
|
|
101
|
+
}), s.on(l, () => {
|
|
102
|
+
k.set("stroke", s.get(l));
|
|
103
|
+
})) : s && s.createLegendMarker && s.createLegendMarker(), k.setAll({ fill: g, stroke: n });
|
|
104
|
+
const a = s.component;
|
|
105
|
+
a && a.updateLegendMarker && a.updateLegendMarker(s);
|
|
104
106
|
}
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
t.children.push(
|
|
108
|
-
t.setRaw("ariaLabel",
|
|
109
|
-
}),
|
|
110
|
-
let
|
|
111
|
-
|
|
107
|
+
const d = this.makeLabel();
|
|
108
|
+
if (d) {
|
|
109
|
+
t.children.push(d), d._setDataItem(e), e.set("label", d), d.text.on("text", () => {
|
|
110
|
+
t.setRaw("ariaLabel", d.text._getText() + (this.get("clickTarget") !== "none" ? "; " + this._t("Press ENTER to toggle") : "")), t.markDirtyAccessibility();
|
|
111
|
+
}), s && s.get && e.set("name", s.get(c));
|
|
112
|
+
let i = e.get("name");
|
|
113
|
+
i && d.set("text", i);
|
|
112
114
|
}
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
t.set("disabled", !
|
|
116
|
-
}),
|
|
117
|
-
let
|
|
118
|
-
|
|
115
|
+
const v = this.makeValueLabel();
|
|
116
|
+
if (v && (t.children.push(v), v._setDataItem(e), e.set("valueLabel", v)), s && s.show && (s.on("visible", (i) => {
|
|
117
|
+
t.set("disabled", !i);
|
|
118
|
+
}), s.get("visible") || t.set("disabled", !0), o != "none")) {
|
|
119
|
+
let i = t;
|
|
120
|
+
o == "marker" && (i = m), this._addClickEvents(i, s, e);
|
|
119
121
|
}
|
|
120
|
-
this.children.values.sort((
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
122
|
+
this.children.values.sort((i, k) => {
|
|
123
|
+
const g = i.dataItem.dataContext, n = k.dataItem.dataContext;
|
|
124
|
+
if (g && n) {
|
|
125
|
+
const a = this.data.indexOf(g), h = this.data.indexOf(n);
|
|
126
|
+
if (a > h)
|
|
125
127
|
return 1;
|
|
126
|
-
if (
|
|
128
|
+
if (a < h)
|
|
127
129
|
return -1;
|
|
128
130
|
}
|
|
129
131
|
return 0;
|
|
130
|
-
}),
|
|
132
|
+
}), s && s.updateLegendValue && s.updateLegendValue();
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
|
-
_addClickEvents(e, t,
|
|
135
|
+
_addClickEvents(e, t, c) {
|
|
134
136
|
e.set("cursorOverStyle", "pointer"), e.events.on("pointerover", () => {
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
+
const r = t.component;
|
|
138
|
+
r && r.hoverDataItem && r.hoverDataItem(t);
|
|
137
139
|
}), e.events.on("pointerout", () => {
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
+
const r = t.component;
|
|
141
|
+
r && r.hoverDataItem && r.unhoverDataItem(t);
|
|
140
142
|
}), e.events.on("click", () => {
|
|
141
|
-
const
|
|
142
|
-
t.show && t.isHidden && (t.isHidden() || t.get("visible") === !1) ? (t.show(), e.set("disabled", !1), this._root.readerAlert(this._t("%1 shown", this._root.locale,
|
|
143
|
+
const r = c.get("label").text._getText();
|
|
144
|
+
t.show && t.isHidden && (t.isHidden() || t.get("visible") === !1) ? (t.show(), e.set("disabled", !1), this._root.readerAlert(this._t("%1 shown", this._root.locale, r))) : t.hide && (t.hide(), e.set("disabled", !0), this._root.readerAlert(this._t("%1 hidden", this._root.locale, r)));
|
|
143
145
|
});
|
|
144
146
|
}
|
|
145
147
|
/**
|
|
@@ -149,604 +151,59 @@ class H extends ae {
|
|
|
149
151
|
super.disposeDataItem(e);
|
|
150
152
|
const t = e.dataContext;
|
|
151
153
|
t && t.get && t.get("legendDataItem") == e && t.set("legendDataItem", void 0);
|
|
152
|
-
let
|
|
153
|
-
|
|
154
|
-
let
|
|
155
|
-
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
let
|
|
159
|
-
|
|
160
|
-
let
|
|
161
|
-
|
|
154
|
+
let c = e.get("itemContainer");
|
|
155
|
+
c && (this.itemContainers.removeValue(c), c.dispose());
|
|
156
|
+
let r = e.get("marker");
|
|
157
|
+
r && (this.markers.removeValue(r), r.dispose());
|
|
158
|
+
let l = e.get("markerRectangle");
|
|
159
|
+
l && (this.markerRectangles.removeValue(l), l.dispose());
|
|
160
|
+
let o = e.get("label");
|
|
161
|
+
o && (this.labels.removeValue(o), o.dispose());
|
|
162
|
+
let s = e.get("valueLabel");
|
|
163
|
+
s && (this.valueLabels.removeValue(s), s.dispose());
|
|
162
164
|
}
|
|
163
165
|
}
|
|
164
|
-
Object.defineProperty(
|
|
166
|
+
Object.defineProperty(D, "className", {
|
|
165
167
|
enumerable: !0,
|
|
166
168
|
configurable: !0,
|
|
167
169
|
writable: !0,
|
|
168
170
|
value: "Legend"
|
|
169
171
|
});
|
|
170
|
-
Object.defineProperty(
|
|
172
|
+
Object.defineProperty(D, "classNames", {
|
|
171
173
|
enumerable: !0,
|
|
172
174
|
configurable: !0,
|
|
173
175
|
writable: !0,
|
|
174
|
-
value:
|
|
176
|
+
value: V.classNames.concat([D.className])
|
|
175
177
|
});
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
const U = Math.PI, J = 2 * U, S = 1e-6, Se = J - S;
|
|
182
|
-
function ue(u) {
|
|
183
|
-
this._ += u[0];
|
|
184
|
-
for (let e = 1, t = u.length; e < t; ++e)
|
|
185
|
-
this._ += arguments[e] + u[e];
|
|
186
|
-
}
|
|
187
|
-
function Re(u) {
|
|
188
|
-
let e = Math.floor(u);
|
|
189
|
-
if (!(e >= 0)) throw new Error(`invalid digits: ${u}`);
|
|
190
|
-
if (e > 15) return ue;
|
|
191
|
-
const t = 10 ** e;
|
|
192
|
-
return function(i) {
|
|
193
|
-
this._ += i[0];
|
|
194
|
-
for (let l = 1, h = i.length; l < h; ++l)
|
|
195
|
-
this._ += Math.round(arguments[l] * t) / t + i[l];
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
class je {
|
|
199
|
-
constructor(e) {
|
|
200
|
-
this._x0 = this._y0 = // start of current subpath
|
|
201
|
-
this._x1 = this._y1 = null, this._ = "", this._append = e == null ? ue : Re(e);
|
|
202
|
-
}
|
|
203
|
-
moveTo(e, t) {
|
|
204
|
-
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
|
|
205
|
-
}
|
|
206
|
-
closePath() {
|
|
207
|
-
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
208
|
-
}
|
|
209
|
-
lineTo(e, t) {
|
|
210
|
-
this._append`L${this._x1 = +e},${this._y1 = +t}`;
|
|
211
|
-
}
|
|
212
|
-
quadraticCurveTo(e, t, i, l) {
|
|
213
|
-
this._append`Q${+e},${+t},${this._x1 = +i},${this._y1 = +l}`;
|
|
214
|
-
}
|
|
215
|
-
bezierCurveTo(e, t, i, l, h, f) {
|
|
216
|
-
this._append`C${+e},${+t},${+i},${+l},${this._x1 = +h},${this._y1 = +f}`;
|
|
217
|
-
}
|
|
218
|
-
arcTo(e, t, i, l, h) {
|
|
219
|
-
if (e = +e, t = +t, i = +i, l = +l, h = +h, h < 0) throw new Error(`negative radius: ${h}`);
|
|
220
|
-
let f = this._x1, n = this._y1, c = i - e, r = l - t, o = f - e, s = n - t, a = o * o + s * s;
|
|
221
|
-
if (this._x1 === null)
|
|
222
|
-
this._append`M${this._x1 = e},${this._y1 = t}`;
|
|
223
|
-
else if (a > S) if (!(Math.abs(s * c - r * o) > S) || !h)
|
|
224
|
-
this._append`L${this._x1 = e},${this._y1 = t}`;
|
|
225
|
-
else {
|
|
226
|
-
let d = i - f, m = l - n, p = c * c + r * r, g = d * d + m * m, v = Math.sqrt(p), y = Math.sqrt(a), _ = h * Math.tan((U - Math.acos((p + a - g) / (2 * v * y))) / 2), x = _ / y, D = _ / v;
|
|
227
|
-
Math.abs(x - 1) > S && this._append`L${e + x * o},${t + x * s}`, this._append`A${h},${h},0,0,${+(s * d > o * m)},${this._x1 = e + D * c},${this._y1 = t + D * r}`;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
arc(e, t, i, l, h, f) {
|
|
231
|
-
if (e = +e, t = +t, i = +i, f = !!f, i < 0) throw new Error(`negative radius: ${i}`);
|
|
232
|
-
let n = i * Math.cos(l), c = i * Math.sin(l), r = e + n, o = t + c, s = 1 ^ f, a = f ? l - h : h - l;
|
|
233
|
-
this._x1 === null ? this._append`M${r},${o}` : (Math.abs(this._x1 - r) > S || Math.abs(this._y1 - o) > S) && this._append`L${r},${o}`, i && (a < 0 && (a = a % J + J), a > Se ? this._append`A${i},${i},0,1,${s},${e - n},${t - c}A${i},${i},0,1,${s},${this._x1 = r},${this._y1 = o}` : a > S && this._append`A${i},${i},0,${+(a >= U)},${s},${this._x1 = e + i * Math.cos(h)},${this._y1 = t + i * Math.sin(h)}`);
|
|
234
|
-
}
|
|
235
|
-
rect(e, t, i, l) {
|
|
236
|
-
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${i = +i}v${+l}h${-i}Z`;
|
|
237
|
-
}
|
|
238
|
-
toString() {
|
|
239
|
-
return this._;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
function ce(u) {
|
|
243
|
-
let e = 3;
|
|
244
|
-
return u.digits = function(t) {
|
|
245
|
-
if (!arguments.length) return e;
|
|
246
|
-
if (t == null)
|
|
247
|
-
e = null;
|
|
248
|
-
else {
|
|
249
|
-
const i = Math.floor(t);
|
|
250
|
-
if (!(i >= 0)) throw new RangeError(`invalid digits: ${t}`);
|
|
251
|
-
e = i;
|
|
252
|
-
}
|
|
253
|
-
return u;
|
|
254
|
-
}, () => new je(e);
|
|
255
|
-
}
|
|
256
|
-
function fe(u) {
|
|
257
|
-
return typeof u == "object" && "length" in u ? u : Array.from(u);
|
|
258
|
-
}
|
|
259
|
-
function de(u) {
|
|
260
|
-
this._context = u;
|
|
261
|
-
}
|
|
262
|
-
de.prototype = {
|
|
263
|
-
areaStart: function() {
|
|
264
|
-
this._line = 0;
|
|
265
|
-
},
|
|
266
|
-
areaEnd: function() {
|
|
267
|
-
this._line = NaN;
|
|
268
|
-
},
|
|
269
|
-
lineStart: function() {
|
|
270
|
-
this._point = 0;
|
|
271
|
-
},
|
|
272
|
-
lineEnd: function() {
|
|
273
|
-
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
274
|
-
},
|
|
275
|
-
point: function(u, e) {
|
|
276
|
-
switch (u = +u, e = +e, this._point) {
|
|
277
|
-
case 0:
|
|
278
|
-
this._point = 1, this._line ? this._context.lineTo(u, e) : this._context.moveTo(u, e);
|
|
279
|
-
break;
|
|
280
|
-
case 1:
|
|
281
|
-
this._point = 2;
|
|
282
|
-
default:
|
|
283
|
-
this._context.lineTo(u, e);
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
function pe(u) {
|
|
289
|
-
return new de(u);
|
|
290
|
-
}
|
|
291
|
-
function me(u) {
|
|
292
|
-
return u[0];
|
|
293
|
-
}
|
|
294
|
-
function ge(u) {
|
|
295
|
-
return u[1];
|
|
296
|
-
}
|
|
297
|
-
function be(u, e) {
|
|
298
|
-
var t = w(!0), i = null, l = pe, h = null, f = ce(n);
|
|
299
|
-
u = typeof u == "function" ? u : u === void 0 ? me : w(u), e = typeof e == "function" ? e : e === void 0 ? ge : w(e);
|
|
300
|
-
function n(c) {
|
|
301
|
-
var r, o = (c = fe(c)).length, s, a = !1, d;
|
|
302
|
-
for (i == null && (h = l(d = f())), r = 0; r <= o; ++r)
|
|
303
|
-
!(r < o && t(s = c[r], r, c)) === a && ((a = !a) ? h.lineStart() : h.lineEnd()), a && h.point(+u(s, r, c), +e(s, r, c));
|
|
304
|
-
if (d) return h = null, d + "" || null;
|
|
305
|
-
}
|
|
306
|
-
return n.x = function(c) {
|
|
307
|
-
return arguments.length ? (u = typeof c == "function" ? c : w(+c), n) : u;
|
|
308
|
-
}, n.y = function(c) {
|
|
309
|
-
return arguments.length ? (e = typeof c == "function" ? c : w(+c), n) : e;
|
|
310
|
-
}, n.defined = function(c) {
|
|
311
|
-
return arguments.length ? (t = typeof c == "function" ? c : w(!!c), n) : t;
|
|
312
|
-
}, n.curve = function(c) {
|
|
313
|
-
return arguments.length ? (l = c, i != null && (h = l(i)), n) : l;
|
|
314
|
-
}, n.context = function(c) {
|
|
315
|
-
return arguments.length ? (c == null ? i = h = null : h = l(i = c), n) : i;
|
|
316
|
-
}, n;
|
|
317
|
-
}
|
|
318
|
-
function Ee(u, e, t) {
|
|
319
|
-
var i = null, l = w(!0), h = null, f = pe, n = null, c = ce(r);
|
|
320
|
-
u = typeof u == "function" ? u : u === void 0 ? me : w(+u), e = typeof e == "function" ? e : w(e === void 0 ? 0 : +e), t = typeof t == "function" ? t : t === void 0 ? ge : w(+t);
|
|
321
|
-
function r(s) {
|
|
322
|
-
var a, d, m, p = (s = fe(s)).length, g, v = !1, y, _ = new Array(p), x = new Array(p);
|
|
323
|
-
for (h == null && (n = f(y = c())), a = 0; a <= p; ++a) {
|
|
324
|
-
if (!(a < p && l(g = s[a], a, s)) === v)
|
|
325
|
-
if (v = !v)
|
|
326
|
-
d = a, n.areaStart(), n.lineStart();
|
|
327
|
-
else {
|
|
328
|
-
for (n.lineEnd(), n.lineStart(), m = a - 1; m >= d; --m)
|
|
329
|
-
n.point(_[m], x[m]);
|
|
330
|
-
n.lineEnd(), n.areaEnd();
|
|
331
|
-
}
|
|
332
|
-
v && (_[a] = +u(g, a, s), x[a] = +e(g, a, s), n.point(i ? +i(g, a, s) : _[a], t ? +t(g, a, s) : x[a]));
|
|
333
|
-
}
|
|
334
|
-
if (y) return n = null, y + "" || null;
|
|
335
|
-
}
|
|
336
|
-
function o() {
|
|
337
|
-
return be().defined(l).curve(f).context(h);
|
|
338
|
-
}
|
|
339
|
-
return r.x = function(s) {
|
|
340
|
-
return arguments.length ? (u = typeof s == "function" ? s : w(+s), i = null, r) : u;
|
|
341
|
-
}, r.x0 = function(s) {
|
|
342
|
-
return arguments.length ? (u = typeof s == "function" ? s : w(+s), r) : u;
|
|
343
|
-
}, r.x1 = function(s) {
|
|
344
|
-
return arguments.length ? (i = s == null ? null : typeof s == "function" ? s : w(+s), r) : i;
|
|
345
|
-
}, r.y = function(s) {
|
|
346
|
-
return arguments.length ? (e = typeof s == "function" ? s : w(+s), t = null, r) : e;
|
|
347
|
-
}, r.y0 = function(s) {
|
|
348
|
-
return arguments.length ? (e = typeof s == "function" ? s : w(+s), r) : e;
|
|
349
|
-
}, r.y1 = function(s) {
|
|
350
|
-
return arguments.length ? (t = s == null ? null : typeof s == "function" ? s : w(+s), r) : t;
|
|
351
|
-
}, r.lineX0 = r.lineY0 = function() {
|
|
352
|
-
return o().x(u).y(e);
|
|
353
|
-
}, r.lineY1 = function() {
|
|
354
|
-
return o().x(u).y(t);
|
|
355
|
-
}, r.lineX1 = function() {
|
|
356
|
-
return o().x(i).y(e);
|
|
357
|
-
}, r.defined = function(s) {
|
|
358
|
-
return arguments.length ? (l = typeof s == "function" ? s : w(!!s), r) : l;
|
|
359
|
-
}, r.curve = function(s) {
|
|
360
|
-
return arguments.length ? (f = s, h != null && (n = f(h)), r) : f;
|
|
361
|
-
}, r.context = function(s) {
|
|
362
|
-
return arguments.length ? (s == null ? h = n = null : n = f(h = s), r) : h;
|
|
363
|
-
}, r;
|
|
364
|
-
}
|
|
365
|
-
class z extends oe {
|
|
366
|
-
constructor() {
|
|
367
|
-
super(...arguments), Object.defineProperty(this, "_endIndex", {
|
|
368
|
-
enumerable: !0,
|
|
369
|
-
configurable: !0,
|
|
370
|
-
writable: !0,
|
|
371
|
-
value: void 0
|
|
372
|
-
}), Object.defineProperty(this, "_strokeGenerator", {
|
|
373
|
-
enumerable: !0,
|
|
374
|
-
configurable: !0,
|
|
375
|
-
writable: !0,
|
|
376
|
-
value: be()
|
|
377
|
-
}), Object.defineProperty(this, "_fillGenerator", {
|
|
378
|
-
enumerable: !0,
|
|
379
|
-
configurable: !0,
|
|
380
|
-
writable: !0,
|
|
381
|
-
value: Ee()
|
|
382
|
-
}), Object.defineProperty(this, "_legendStroke", {
|
|
383
|
-
enumerable: !0,
|
|
384
|
-
configurable: !0,
|
|
385
|
-
writable: !0,
|
|
386
|
-
value: void 0
|
|
387
|
-
}), Object.defineProperty(this, "_legendFill", {
|
|
388
|
-
enumerable: !0,
|
|
389
|
-
configurable: !0,
|
|
390
|
-
writable: !0,
|
|
391
|
-
value: void 0
|
|
392
|
-
}), Object.defineProperty(this, "strokes", {
|
|
393
|
-
enumerable: !0,
|
|
394
|
-
configurable: !0,
|
|
395
|
-
writable: !0,
|
|
396
|
-
value: this.addDisposer(new $(F.new({}), () => Y._new(this._root, {
|
|
397
|
-
themeTags: P(this.strokes.template.get("themeTags", []), ["line", "series", "stroke"])
|
|
398
|
-
}, [this.strokes.template])))
|
|
399
|
-
}), Object.defineProperty(this, "fills", {
|
|
400
|
-
enumerable: !0,
|
|
401
|
-
configurable: !0,
|
|
402
|
-
writable: !0,
|
|
403
|
-
value: this.addDisposer(new $(F.new({}), () => Y._new(this._root, {
|
|
404
|
-
themeTags: P(this.strokes.template.get("themeTags", []), ["line", "series", "fill"])
|
|
405
|
-
}, [this.fills.template])))
|
|
406
|
-
}), Object.defineProperty(this, "_fillTemplate", {
|
|
407
|
-
enumerable: !0,
|
|
408
|
-
configurable: !0,
|
|
409
|
-
writable: !0,
|
|
410
|
-
value: void 0
|
|
411
|
-
}), Object.defineProperty(this, "_strokeTemplate", {
|
|
412
|
-
enumerable: !0,
|
|
413
|
-
configurable: !0,
|
|
414
|
-
writable: !0,
|
|
415
|
-
value: void 0
|
|
416
|
-
}), Object.defineProperty(this, "_previousPoint", {
|
|
417
|
-
enumerable: !0,
|
|
418
|
-
configurable: !0,
|
|
419
|
-
writable: !0,
|
|
420
|
-
value: [0, 0, 0, 0]
|
|
421
|
-
}), Object.defineProperty(this, "_dindex", {
|
|
422
|
-
enumerable: !0,
|
|
423
|
-
configurable: !0,
|
|
424
|
-
writable: !0,
|
|
425
|
-
value: 0
|
|
426
|
-
}), Object.defineProperty(this, "_sindex", {
|
|
427
|
-
enumerable: !0,
|
|
428
|
-
configurable: !0,
|
|
429
|
-
writable: !0,
|
|
430
|
-
value: 0
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
_afterNew() {
|
|
434
|
-
this._fillGenerator.y0(function(e) {
|
|
435
|
-
return e[3];
|
|
436
|
-
}), this._fillGenerator.x0(function(e) {
|
|
437
|
-
return e[2];
|
|
438
|
-
}), this._fillGenerator.y1(function(e) {
|
|
439
|
-
return e[1];
|
|
440
|
-
}), this._fillGenerator.x1(function(e) {
|
|
441
|
-
return e[0];
|
|
442
|
-
}), super._afterNew();
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* @ignore
|
|
446
|
-
*/
|
|
447
|
-
makeStroke(e) {
|
|
448
|
-
const t = this.mainContainer.children.push(e.make());
|
|
449
|
-
return e.push(t), t;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* @ignore
|
|
453
|
-
*/
|
|
454
|
-
makeFill(e) {
|
|
455
|
-
const t = this.mainContainer.children.push(e.make());
|
|
456
|
-
return e.push(t), t;
|
|
457
|
-
}
|
|
458
|
-
_updateChildren() {
|
|
459
|
-
this._strokeTemplate = void 0, this._fillTemplate = void 0;
|
|
460
|
-
let e = this.get("xAxis"), t = this.get("yAxis");
|
|
461
|
-
if (this.isDirty("stroke")) {
|
|
462
|
-
const i = this.get("stroke");
|
|
463
|
-
this.strokes.template.set("stroke", i);
|
|
464
|
-
const l = this._legendStroke;
|
|
465
|
-
l && l.states.lookup("default").set("stroke", i);
|
|
466
|
-
}
|
|
467
|
-
if (this.isDirty("fill")) {
|
|
468
|
-
const i = this.get("fill");
|
|
469
|
-
this.fills.template.set("fill", i);
|
|
470
|
-
const l = this._legendFill;
|
|
471
|
-
l && l.states.lookup("default").set("fill", i);
|
|
472
|
-
}
|
|
473
|
-
if (this.isDirty("fillPattern")) {
|
|
474
|
-
const i = this.get("fillPattern");
|
|
475
|
-
this.fills.template.set("fillPattern", i);
|
|
476
|
-
const l = this._legendFill;
|
|
477
|
-
l && l.states.lookup("default").set("fillPattern", i);
|
|
478
|
-
}
|
|
479
|
-
if (this.isDirty("curveFactory")) {
|
|
480
|
-
const i = this.get("curveFactory");
|
|
481
|
-
i && (this._strokeGenerator.curve(i), this._fillGenerator.curve(i));
|
|
482
|
-
}
|
|
483
|
-
if (e.inited && t.inited) {
|
|
484
|
-
if (this._axesDirty || this._valuesDirty || this._stackDirty || this.isDirty("vcx") || this.isDirty("vcy") || this._sizeDirty || this.isDirty("connect") || this.isDirty("curveFactory")) {
|
|
485
|
-
this.fills.each((o) => {
|
|
486
|
-
o.setPrivate("visible", !1);
|
|
487
|
-
}), this.strokes.each((o) => {
|
|
488
|
-
o.setPrivate("visible", !1);
|
|
489
|
-
}), this.axisRanges.each((o) => {
|
|
490
|
-
let s = o.fills;
|
|
491
|
-
s && s.each((d) => {
|
|
492
|
-
d.setPrivate("visible", !1);
|
|
493
|
-
});
|
|
494
|
-
let a = o.strokes;
|
|
495
|
-
a && a.each((d) => {
|
|
496
|
-
d.setPrivate("visible", !1);
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
let i = this.startIndex(), l = this.strokes.template.get("templateField"), h = this.fills.template.get("templateField"), f = !0, n = !0;
|
|
500
|
-
l && (f = !1), h && (n = !1);
|
|
501
|
-
for (let o = i - 1; o >= 0; o--) {
|
|
502
|
-
let s = this.dataItems[o], a = !0, d = s.dataContext;
|
|
503
|
-
if (l && d[l] && (f = !0), h && d[h] && (n = !0), I(this._valueFields, (m) => {
|
|
504
|
-
le(s.get(m)) || (a = !1);
|
|
505
|
-
}), a && f && n) {
|
|
506
|
-
i = o;
|
|
507
|
-
break;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
let c = this.dataItems.length, r = this.endIndex();
|
|
511
|
-
if (r < c) {
|
|
512
|
-
r++;
|
|
513
|
-
for (let o = r; o < c; o++) {
|
|
514
|
-
let s = this.dataItems[o], a = !0;
|
|
515
|
-
if (I(this._valueFields, (d) => {
|
|
516
|
-
le(s.get(d)) || (a = !1);
|
|
517
|
-
}), a) {
|
|
518
|
-
r = o + 1;
|
|
519
|
-
break;
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
if (i > 0 && i--, this._endIndex = r, this._clearGraphics(), this._sindex = 0, this._dindex = i, this.dataItems.length == 1)
|
|
524
|
-
this._startSegment(0);
|
|
525
|
-
else
|
|
526
|
-
for (; this._dindex < r - 1; )
|
|
527
|
-
this._startSegment(this._dindex), this._sindex++;
|
|
528
|
-
}
|
|
529
|
-
} else
|
|
530
|
-
this._skipped = !0;
|
|
531
|
-
super._updateChildren();
|
|
532
|
-
}
|
|
533
|
-
_clearGraphics() {
|
|
534
|
-
this.strokes.clear(), this.fills.clear(), this.axisRanges.each((e) => {
|
|
535
|
-
e.fills.clear(), e.strokes.clear();
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
_startSegment(e) {
|
|
539
|
-
let t = this._endIndex, i = t;
|
|
540
|
-
const l = this.get("autoGapCount"), h = this.get("connect"), f = this.makeFill(this.fills), n = this._fillTemplate, c = this.fills.template;
|
|
541
|
-
n && n != c && (f.template = n), f.setPrivate("visible", !0);
|
|
542
|
-
const r = this.makeStroke(this.strokes), o = this._strokeTemplate;
|
|
543
|
-
o && o != this.strokes.template && (r.template = o), r.setPrivate("visible", !0);
|
|
544
|
-
let s = this.get("xAxis"), a = this.get("yAxis"), d = this.get("baseAxis"), m = this.get("vcx", 1), p = this.get("vcy", 1), g = this._xField, v = this._yField, y = this._xOpenField, _ = this._yOpenField;
|
|
545
|
-
const x = this.get("openValueXField"), D = this.get("openValueYField");
|
|
546
|
-
x || (y = this._xField), D || (_ = this._yField);
|
|
547
|
-
const G = this.get("stacked"), W = s.basePosition(), q = a.basePosition();
|
|
548
|
-
let j;
|
|
549
|
-
d === a ? j = this._yField : j = this._xField;
|
|
550
|
-
const A = [];
|
|
551
|
-
let k = [];
|
|
552
|
-
A.push(k);
|
|
553
|
-
const M = this.strokes.template.get("templateField"), C = this.fills.template.get("templateField");
|
|
554
|
-
let L = this.get("locationX", 0.5), X = this.get("locationY", 0.5), _e = this.get("openLocationX", L), ke = this.get("openLocationY", X);
|
|
555
|
-
const ve = this.get("minDistance", 0);
|
|
556
|
-
let T, K = this.fills.template.get("visible");
|
|
557
|
-
this.axisRanges.length > 0 && (K = !0);
|
|
558
|
-
let ee = !1;
|
|
559
|
-
(G || x || D) && (ee = !0);
|
|
560
|
-
const Z = {
|
|
561
|
-
points: k,
|
|
562
|
-
segments: A,
|
|
563
|
-
stacked: G,
|
|
564
|
-
getOpen: ee,
|
|
565
|
-
basePosX: W,
|
|
566
|
-
basePosY: q,
|
|
567
|
-
fillVisible: K,
|
|
568
|
-
xField: g,
|
|
569
|
-
yField: v,
|
|
570
|
-
xOpenField: y,
|
|
571
|
-
yOpenField: _,
|
|
572
|
-
vcx: m,
|
|
573
|
-
vcy: p,
|
|
574
|
-
baseAxis: d,
|
|
575
|
-
xAxis: s,
|
|
576
|
-
yAxis: a,
|
|
577
|
-
locationX: L,
|
|
578
|
-
locationY: X,
|
|
579
|
-
openLocationX: _e,
|
|
580
|
-
openLocationY: ke,
|
|
581
|
-
minDistance: ve
|
|
582
|
-
};
|
|
583
|
-
let N = this._strokeTemplate, V = this._fillTemplate;
|
|
584
|
-
for (T = e; T < i; T++) {
|
|
585
|
-
this._dindex = T;
|
|
586
|
-
const O = this._dataItems[T];
|
|
587
|
-
let R = O.get(g), B = O.get(v);
|
|
588
|
-
if (R == null || B == null ? h || (k = [], A.push(k), Z.points = k) : this._getPoints(O, Z), M) {
|
|
589
|
-
let b = O.dataContext[M];
|
|
590
|
-
if (b)
|
|
591
|
-
if (b instanceof F || (b = F.new(b)), this._strokeTemplate = b, T > e) {
|
|
592
|
-
i = T;
|
|
593
|
-
break;
|
|
594
|
-
} else
|
|
595
|
-
N = b, r.template = b;
|
|
596
|
-
}
|
|
597
|
-
if (C) {
|
|
598
|
-
let b = O.dataContext[C];
|
|
599
|
-
if (b)
|
|
600
|
-
if (b instanceof F || (b = F.new(b)), this._fillTemplate = b, T > e) {
|
|
601
|
-
i = T;
|
|
602
|
-
break;
|
|
603
|
-
} else
|
|
604
|
-
V = b, f.template = b;
|
|
605
|
-
}
|
|
606
|
-
if (!h) {
|
|
607
|
-
let b = this.dataItems[T + 1];
|
|
608
|
-
b && d.shouldGap(O, b, l, j) && (k = [], A.push(k), Z.points = k);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
f.setRaw("userData", [e, T]), r.setRaw("userData", [e, T]), T === t && this._endLine(k, A[0][0]), r && this._drawStroke(r, A), f && this._drawFill(f, A), this.axisRanges.each((O) => {
|
|
612
|
-
const R = O.container, B = O.fills, b = this.makeFill(B);
|
|
613
|
-
R && R.children.push(b), b.setPrivate("visible", !0), this._drawFill(b, A);
|
|
614
|
-
const xe = O.strokes, E = this.makeStroke(xe);
|
|
615
|
-
R && R.children.push(E), N && N != this.strokes.template && (E.template = N), V && V != this.fills.template && (b.template = V), E.setPrivate("visible", !0), this._drawStroke(E, A), b.setRaw("userData", [e, T]), E.setRaw("userData", [e, T]);
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
_getPoints(e, t) {
|
|
619
|
-
let i = t.points, l = e.get("locationX", t.locationX), h = e.get("locationY", t.locationY);
|
|
620
|
-
const f = this.get("exactLocationX", !1), n = this.get("exactLocationY", !1);
|
|
621
|
-
let c = t.xAxis.getDataItemPositionX(e, t.xField, l, t.vcx, f), r = t.yAxis.getDataItemPositionY(e, t.yField, h, t.vcy, n);
|
|
622
|
-
if (this._shouldInclude(c)) {
|
|
623
|
-
const o = this.getPoint(c, r), s = [o.x, o.y];
|
|
624
|
-
if (o.x += this._x, o.y += this._y, e.set("point", o), t.fillVisible) {
|
|
625
|
-
let a = c, d = r;
|
|
626
|
-
if (t.baseAxis === t.xAxis ? d = t.basePosY : t.baseAxis === t.yAxis && (a = t.basePosX), t.getOpen) {
|
|
627
|
-
let p = e.get(t.xOpenField), g = e.get(t.yOpenField);
|
|
628
|
-
if (p != null && g != null) {
|
|
629
|
-
let v = e.get("openLocationX", t.openLocationX), y = e.get("openLocationY", t.openLocationY);
|
|
630
|
-
if (t.stacked) {
|
|
631
|
-
let _ = e.get("stackToItemX"), x = e.get("stackToItemY");
|
|
632
|
-
_ ? (a = t.xAxis.getDataItemPositionX(_, t.xField, v, _.component.get("vcx"), f), ne(a) && (a = t.basePosX)) : t.yAxis === t.baseAxis ? a = t.basePosX : a = t.xAxis.getDataItemPositionX(e, t.xOpenField, v, t.vcx, f), x ? (d = t.yAxis.getDataItemPositionY(x, t.yField, y, x.component.get("vcy"), n), ne(d) && (d = t.basePosY)) : t.xAxis === t.baseAxis ? d = t.basePosY : d = t.yAxis.getDataItemPositionY(e, t.yOpenField, y, t.vcy, n);
|
|
633
|
-
} else
|
|
634
|
-
a = t.xAxis.getDataItemPositionX(e, t.xOpenField, v, t.vcx, f), d = t.yAxis.getDataItemPositionY(e, t.yOpenField, y, t.vcy, n);
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
let m = this.getPoint(a, d);
|
|
638
|
-
s[2] = m.x, s[3] = m.y;
|
|
639
|
-
}
|
|
640
|
-
if (t.minDistance > 0) {
|
|
641
|
-
const a = s[0], d = s[1], m = s[2], p = s[3], g = this._previousPoint, v = g[0], y = g[1], _ = g[2], x = g[3];
|
|
642
|
-
(Math.hypot(a - v, d - y) > t.minDistance || m && p && Math.hypot(m - _, p - x) > t.minDistance) && (i.push(s), this._previousPoint = s);
|
|
643
|
-
} else
|
|
644
|
-
i.push(s);
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
_endLine(e, t) {
|
|
648
|
-
}
|
|
649
|
-
_drawStroke(e, t) {
|
|
650
|
-
e.get("visible") && !e.get("forceHidden") && e.set("draw", (i) => {
|
|
651
|
-
I(t, (l) => {
|
|
652
|
-
this._strokeGenerator.context(i), this._strokeGenerator(l);
|
|
653
|
-
});
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
_drawFill(e, t) {
|
|
657
|
-
e.get("visible") && !e.get("forceHidden") && e.set("draw", (i) => {
|
|
658
|
-
I(t, (l) => {
|
|
659
|
-
this._fillGenerator.context(i), this._fillGenerator(l);
|
|
660
|
-
});
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
_processAxisRange(e) {
|
|
664
|
-
super._processAxisRange(e), e.fills = new $(F.new({}), () => Y._new(this._root, {
|
|
665
|
-
themeTags: P(e.fills.template.get("themeTags", []), ["line", "series", "fill"])
|
|
666
|
-
}, [this.fills.template, e.fills.template])), e.strokes = new $(F.new({}), () => Y._new(this._root, {
|
|
667
|
-
themeTags: P(e.strokes.template.get("themeTags", []), ["line", "series", "stroke"])
|
|
668
|
-
}, [this.strokes.template, e.strokes.template]));
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* @ignore
|
|
672
|
-
*/
|
|
673
|
-
createLegendMarker(e) {
|
|
674
|
-
const t = this.get("legendDataItem");
|
|
675
|
-
if (t) {
|
|
676
|
-
const i = t.get("marker"), l = t.get("markerRectangle");
|
|
677
|
-
l && l.setPrivate("visible", !1), i.set("background", we.new(i._root, { fillOpacity: 0, fill: he(0) }));
|
|
678
|
-
const h = i.children.push(Y._new(i._root, {
|
|
679
|
-
themeTags: ["line", "series", "legend", "marker", "stroke"],
|
|
680
|
-
interactive: !1
|
|
681
|
-
}, [this.strokes.template]));
|
|
682
|
-
this._legendStroke = h;
|
|
683
|
-
const f = i.children.push(Y._new(i._root, {
|
|
684
|
-
themeTags: ["line", "series", "legend", "marker", "fill"]
|
|
685
|
-
}, [this.fills.template]));
|
|
686
|
-
this._legendFill = f;
|
|
687
|
-
const n = this._root.interfaceColors.get("disabled");
|
|
688
|
-
if (h.states.create("disabled", { fill: n, stroke: n }), f.states.create("disabled", { fill: n, stroke: n }), this.bullets.length > 0) {
|
|
689
|
-
const c = this.bullets.getIndex(0);
|
|
690
|
-
if (c) {
|
|
691
|
-
const r = c(i._root, this, new ye(this, { legend: !0 }, {}));
|
|
692
|
-
if (r) {
|
|
693
|
-
const o = r.get("sprite");
|
|
694
|
-
o instanceof Y && o.states.create("disabled", { fill: n, stroke: n }), o && (o.setAll({
|
|
695
|
-
tooltipText: void 0,
|
|
696
|
-
tooltipHTML: void 0,
|
|
697
|
-
focusable: void 0,
|
|
698
|
-
focusableGroup: void 0,
|
|
699
|
-
ariaLabel: void 0
|
|
700
|
-
}), i.children.push(o), o.setAll({ x: i.width() / 2, y: i.height() / 2 }), i.events.on("boundschanged", () => {
|
|
701
|
-
o.setAll({ x: i.width() / 2, y: i.height() / 2 });
|
|
702
|
-
}));
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
Object.defineProperty(z, "className", {
|
|
710
|
-
enumerable: !0,
|
|
711
|
-
configurable: !0,
|
|
712
|
-
writable: !0,
|
|
713
|
-
value: "LineSeries"
|
|
714
|
-
});
|
|
715
|
-
Object.defineProperty(z, "classNames", {
|
|
716
|
-
enumerable: !0,
|
|
717
|
-
configurable: !0,
|
|
718
|
-
writable: !0,
|
|
719
|
-
value: oe.classNames.concat([z.className])
|
|
720
|
-
});
|
|
721
|
-
const Ie = (u) => {
|
|
722
|
-
const e = Me({
|
|
723
|
-
props: u,
|
|
178
|
+
const le = (y) => {
|
|
179
|
+
const e = K({
|
|
180
|
+
props: y,
|
|
724
181
|
name: "MuiHighlightLineChart"
|
|
725
182
|
}), {
|
|
726
183
|
seriesData: t,
|
|
727
|
-
height:
|
|
728
|
-
width:
|
|
729
|
-
chartId:
|
|
730
|
-
showLegend:
|
|
731
|
-
loading:
|
|
732
|
-
emptyMessage:
|
|
733
|
-
sx:
|
|
734
|
-
...
|
|
735
|
-
} = e,
|
|
184
|
+
height: c = "500px",
|
|
185
|
+
width: r = "100%",
|
|
186
|
+
chartId: l = "highlight-line-chart",
|
|
187
|
+
showLegend: o = !0,
|
|
188
|
+
loading: s = !1,
|
|
189
|
+
emptyMessage: m = "No data available",
|
|
190
|
+
sx: d,
|
|
191
|
+
...v
|
|
192
|
+
} = e, i = {
|
|
736
193
|
...e,
|
|
737
|
-
height:
|
|
738
|
-
width:
|
|
739
|
-
chartId:
|
|
740
|
-
showLegend:
|
|
741
|
-
loading:
|
|
742
|
-
emptyMessage:
|
|
743
|
-
},
|
|
744
|
-
return
|
|
745
|
-
if (!
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
const
|
|
749
|
-
|
|
194
|
+
height: c,
|
|
195
|
+
width: r,
|
|
196
|
+
chartId: l,
|
|
197
|
+
showLegend: o,
|
|
198
|
+
loading: s,
|
|
199
|
+
emptyMessage: m
|
|
200
|
+
}, k = R(null), g = R(null), n = R(null);
|
|
201
|
+
return Q(() => {
|
|
202
|
+
if (!n.current) return;
|
|
203
|
+
const a = W.new(n.current);
|
|
204
|
+
g.current = a, a.setThemes([z.new(a)]);
|
|
205
|
+
const h = a.container.children.push(
|
|
206
|
+
B.new(a, {
|
|
750
207
|
panX: !0,
|
|
751
208
|
panY: !0,
|
|
752
209
|
wheelX: "panX",
|
|
@@ -754,83 +211,83 @@ const Ie = (u) => {
|
|
|
754
211
|
pinchZoomX: !0
|
|
755
212
|
})
|
|
756
213
|
);
|
|
757
|
-
|
|
214
|
+
k.current = h, h.set(
|
|
758
215
|
"cursor",
|
|
759
|
-
|
|
216
|
+
$.new(a, {
|
|
760
217
|
behavior: "zoomX"
|
|
761
218
|
})
|
|
762
219
|
).lineY.set("visible", !1);
|
|
763
|
-
const
|
|
764
|
-
|
|
220
|
+
const E = h.xAxes.push(
|
|
221
|
+
ee.new(a, {
|
|
765
222
|
maxDeviation: 0.3,
|
|
766
223
|
baseInterval: { timeUnit: "day", count: 1 },
|
|
767
|
-
renderer:
|
|
224
|
+
renderer: G.new(a, {
|
|
768
225
|
minorGridEnabled: !0
|
|
769
226
|
})
|
|
770
227
|
})
|
|
771
|
-
),
|
|
772
|
-
|
|
773
|
-
renderer:
|
|
228
|
+
), S = h.yAxes.push(
|
|
229
|
+
I.new(a, {
|
|
230
|
+
renderer: U.new(a, {})
|
|
774
231
|
})
|
|
775
|
-
), _ = [],
|
|
776
|
-
t.forEach((
|
|
777
|
-
const
|
|
778
|
-
|
|
779
|
-
name:
|
|
780
|
-
xAxis:
|
|
781
|
-
yAxis:
|
|
232
|
+
), _ = [], P = Z.new(a, {});
|
|
233
|
+
t.forEach((u, L) => {
|
|
234
|
+
const b = u.color ? q(u.color) : P.getIndex(L), p = h.series.push(
|
|
235
|
+
te.new(a, {
|
|
236
|
+
name: u.name,
|
|
237
|
+
xAxis: E,
|
|
238
|
+
yAxis: S,
|
|
782
239
|
valueYField: "value",
|
|
783
240
|
valueXField: "date",
|
|
784
|
-
stroke:
|
|
785
|
-
fill:
|
|
786
|
-
tooltip:
|
|
241
|
+
stroke: b,
|
|
242
|
+
fill: b,
|
|
243
|
+
tooltip: J.new(a, {
|
|
787
244
|
labelText: "{name}: {valueY}"
|
|
788
245
|
})
|
|
789
246
|
})
|
|
790
247
|
);
|
|
791
|
-
|
|
248
|
+
p.strokes.template.setAll({
|
|
792
249
|
strokeWidth: 2
|
|
793
|
-
}),
|
|
250
|
+
}), p.data.setAll(u.data), _.push(p);
|
|
794
251
|
});
|
|
795
|
-
let
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
centerX:
|
|
799
|
-
x:
|
|
800
|
-
layout:
|
|
252
|
+
let x = null;
|
|
253
|
+
o && (x = h.children.push(
|
|
254
|
+
D.new(a, {
|
|
255
|
+
centerX: M(50),
|
|
256
|
+
x: M(50),
|
|
257
|
+
layout: a.horizontalLayout
|
|
801
258
|
})
|
|
802
|
-
),
|
|
803
|
-
const
|
|
804
|
-
var
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
|
|
259
|
+
), x.data.setAll(h.series.values));
|
|
260
|
+
const F = 1, N = 0.2, Y = 4, j = (u) => {
|
|
261
|
+
var p;
|
|
262
|
+
const b = (p = u.target.dataItem) == null ? void 0 : p.dataContext;
|
|
263
|
+
b && (b.strokes.template.set("strokeOpacity", 1), b.strokes.template.set("strokeWidth", Y), _.forEach((w) => {
|
|
264
|
+
w !== b && (w.strokes.template.set("strokeOpacity", N), w.strokes.template.set("strokeWidth", 1));
|
|
808
265
|
}));
|
|
809
|
-
},
|
|
810
|
-
var
|
|
811
|
-
((
|
|
812
|
-
|
|
266
|
+
}, H = (u) => {
|
|
267
|
+
var p;
|
|
268
|
+
((p = u.target.dataItem) == null ? void 0 : p.dataContext) && _.forEach((w) => {
|
|
269
|
+
w.strokes.template.set("strokeOpacity", F), w.strokes.template.set("strokeWidth", 2);
|
|
813
270
|
});
|
|
814
271
|
};
|
|
815
|
-
return
|
|
816
|
-
|
|
272
|
+
return x && (x.markers.template.events.on("pointerover", j), x.markers.template.events.on("pointerout", H)), h.appear(1e3, 100), _.forEach((u, L) => {
|
|
273
|
+
u.appear(1e3, 100 * (L + 1));
|
|
817
274
|
}), () => {
|
|
818
|
-
|
|
275
|
+
a.dispose();
|
|
819
276
|
};
|
|
820
|
-
}, [
|
|
821
|
-
chartDivRef:
|
|
277
|
+
}, [l, t, o]), {
|
|
278
|
+
chartDivRef: n,
|
|
822
279
|
seriesData: t,
|
|
823
|
-
height:
|
|
824
|
-
width:
|
|
825
|
-
chartId:
|
|
826
|
-
showLegend:
|
|
827
|
-
loading:
|
|
828
|
-
emptyMessage:
|
|
829
|
-
sx:
|
|
830
|
-
other:
|
|
831
|
-
ownerState:
|
|
280
|
+
height: c,
|
|
281
|
+
width: r,
|
|
282
|
+
chartId: l,
|
|
283
|
+
showLegend: o,
|
|
284
|
+
loading: s,
|
|
285
|
+
emptyMessage: m,
|
|
286
|
+
sx: d,
|
|
287
|
+
other: v,
|
|
288
|
+
ownerState: i
|
|
832
289
|
};
|
|
833
290
|
};
|
|
834
291
|
export {
|
|
835
|
-
|
|
292
|
+
le as useHighlightLineChartLogic
|
|
836
293
|
};
|