@hybridcore/ui 1.5.73 → 1.5.74
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as we, jsx as W } from "react/jsx-runtime";
|
|
2
|
-
import { S as oe, L as $, T as F, C as te, m as P, R as ie, k as se, X as ue, G as S, e as N, i as ne, l as Te, j as he, n as Pe, a as le, b as Fe, A as Le, c as
|
|
3
|
-
import { useRef as ae, useLayoutEffect as Me
|
|
2
|
+
import { S as oe, L as $, T as F, C as te, m as P, R as ie, k as se, X as ue, G as S, e as N, i as ne, l as Te, j as he, n as Pe, a as le, b as Fe, A as Le, c as De, d as Ae, D as Ce, f as Oe, V as Xe, h as $e, o as Ye, g as Se, p as re } from "../../../AxisRendererY-CFo972D5.js";
|
|
3
|
+
import { useRef as ae, useLayoutEffect as Me } from "react";
|
|
4
4
|
class V extends oe {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments), Object.defineProperty(this, "itemContainers", {
|
|
@@ -87,35 +87,35 @@ class V extends oe {
|
|
|
87
87
|
super.processDataItem(e);
|
|
88
88
|
const t = this.makeItemContainer(e), i = this.get("nameField"), r = this.get("fillField"), h = this.get("strokeField");
|
|
89
89
|
if (t) {
|
|
90
|
-
const d = this.get("clickTarget", "itemContainer"),
|
|
91
|
-
|
|
90
|
+
const d = this.get("clickTarget", "itemContainer"), l = e.dataContext;
|
|
91
|
+
l && l.set && l.set("legendDataItem", e), t._setDataItem(e), e.set("itemContainer", t);
|
|
92
92
|
const c = this.makeMarker();
|
|
93
93
|
if (c) {
|
|
94
94
|
t.children.push(c), c._setDataItem(e), e.set("marker", c);
|
|
95
95
|
const s = this.get("useDefaultMarker"), o = c.children.push(this.makeMarkerRectangle());
|
|
96
96
|
let f = e.get("fill"), p = e.get("stroke");
|
|
97
|
-
e.set("markerRectangle", o),
|
|
98
|
-
o.set("fill",
|
|
99
|
-
}),
|
|
100
|
-
o.set("stroke",
|
|
101
|
-
})) :
|
|
102
|
-
const m =
|
|
103
|
-
m && m.updateLegendMarker && m.updateLegendMarker(
|
|
97
|
+
e.set("markerRectangle", o), l && l.get && (f = l.get(r, f), p = l.get(h, p)), p || (p = f), s ? l.on && (l.on(r, () => {
|
|
98
|
+
o.set("fill", l.get(r));
|
|
99
|
+
}), l.on(h, () => {
|
|
100
|
+
o.set("stroke", l.get(h));
|
|
101
|
+
})) : l && l.createLegendMarker && l.createLegendMarker(), o.setAll({ fill: f, stroke: p });
|
|
102
|
+
const m = l.component;
|
|
103
|
+
m && m.updateLegendMarker && m.updateLegendMarker(l);
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
t.children.push(
|
|
108
|
-
t.setRaw("ariaLabel",
|
|
109
|
-
}),
|
|
105
|
+
const n = this.makeLabel();
|
|
106
|
+
if (n) {
|
|
107
|
+
t.children.push(n), n._setDataItem(e), e.set("label", n), n.text.on("text", () => {
|
|
108
|
+
t.setRaw("ariaLabel", n.text._getText() + (this.get("clickTarget") !== "none" ? "; " + this._t("Press ENTER to toggle") : "")), t.markDirtyAccessibility();
|
|
109
|
+
}), l && l.get && e.set("name", l.get(i));
|
|
110
110
|
let s = e.get("name");
|
|
111
|
-
s &&
|
|
111
|
+
s && n.set("text", s);
|
|
112
112
|
}
|
|
113
113
|
const a = this.makeValueLabel();
|
|
114
|
-
if (a && (t.children.push(a), a._setDataItem(e), e.set("valueLabel", a)),
|
|
114
|
+
if (a && (t.children.push(a), a._setDataItem(e), e.set("valueLabel", a)), l && l.show && (l.on("visible", (s) => {
|
|
115
115
|
t.set("disabled", !s);
|
|
116
|
-
}),
|
|
116
|
+
}), l.get("visible") || t.set("disabled", !0), d != "none")) {
|
|
117
117
|
let s = t;
|
|
118
|
-
d == "marker" && (s = c), this._addClickEvents(s,
|
|
118
|
+
d == "marker" && (s = c), this._addClickEvents(s, l, e);
|
|
119
119
|
}
|
|
120
120
|
this.children.values.sort((s, o) => {
|
|
121
121
|
const f = s.dataItem.dataContext, p = o.dataItem.dataContext;
|
|
@@ -127,7 +127,7 @@ class V extends oe {
|
|
|
127
127
|
return -1;
|
|
128
128
|
}
|
|
129
129
|
return 0;
|
|
130
|
-
}),
|
|
130
|
+
}), l && l.updateLegendValue && l.updateLegendValue();
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
_addClickEvents(e, t, i) {
|
|
@@ -157,8 +157,8 @@ class V extends oe {
|
|
|
157
157
|
h && (this.markerRectangles.removeValue(h), h.dispose());
|
|
158
158
|
let d = e.get("label");
|
|
159
159
|
d && (this.labels.removeValue(d), d.dispose());
|
|
160
|
-
let
|
|
161
|
-
|
|
160
|
+
let l = e.get("valueLabel");
|
|
161
|
+
l && (this.valueLabels.removeValue(l), l.dispose());
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
Object.defineProperty(V, "className", {
|
|
@@ -178,13 +178,13 @@ function v(u) {
|
|
|
178
178
|
return u;
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
const q = Math.PI, Z = 2 * q, M = 1e-6,
|
|
181
|
+
const q = Math.PI, Z = 2 * q, M = 1e-6, je = Z - M;
|
|
182
182
|
function ce(u) {
|
|
183
183
|
this._ += u[0];
|
|
184
184
|
for (let e = 1, t = u.length; e < t; ++e)
|
|
185
185
|
this._ += arguments[e] + u[e];
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Re(u) {
|
|
188
188
|
let e = Math.floor(u);
|
|
189
189
|
if (!(e >= 0)) throw new Error(`invalid digits: ${u}`);
|
|
190
190
|
if (e > 15) return ce;
|
|
@@ -195,10 +195,10 @@ function Ee(u) {
|
|
|
195
195
|
this._ += Math.round(arguments[r] * t) / t + i[r];
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
class
|
|
198
|
+
class Ee {
|
|
199
199
|
constructor(e) {
|
|
200
200
|
this._x0 = this._y0 = // start of current subpath
|
|
201
|
-
this._x1 = this._y1 = null, this._ = "", this._append = e == null ? ce :
|
|
201
|
+
this._x1 = this._y1 = null, this._ = "", this._append = e == null ? ce : Re(e);
|
|
202
202
|
}
|
|
203
203
|
moveTo(e, t) {
|
|
204
204
|
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
|
|
@@ -217,20 +217,20 @@ class Ge {
|
|
|
217
217
|
}
|
|
218
218
|
arcTo(e, t, i, r, h) {
|
|
219
219
|
if (e = +e, t = +t, i = +i, r = +r, h = +h, h < 0) throw new Error(`negative radius: ${h}`);
|
|
220
|
-
let d = this._x1,
|
|
220
|
+
let d = this._x1, l = this._y1, c = i - e, n = r - t, a = d - e, s = l - t, o = a * a + s * s;
|
|
221
221
|
if (this._x1 === null)
|
|
222
222
|
this._append`M${this._x1 = e},${this._y1 = t}`;
|
|
223
|
-
else if (o > M) if (!(Math.abs(s * c -
|
|
223
|
+
else if (o > M) if (!(Math.abs(s * c - n * a) > M) || !h)
|
|
224
224
|
this._append`L${this._x1 = e},${this._y1 = t}`;
|
|
225
225
|
else {
|
|
226
|
-
let f = i - d, p = r -
|
|
227
|
-
Math.abs(_ - 1) > M && this._append`L${e + _ * a},${t + _ * s}`, this._append`A${h},${h},0,0,${+(s * f > a * p)},${this._x1 = e + w * c},${this._y1 = t + w *
|
|
226
|
+
let f = i - d, p = r - l, m = c * c + n * n, b = f * f + p * p, k = Math.sqrt(m), x = Math.sqrt(o), y = h * Math.tan((q - Math.acos((m + o - b) / (2 * k * x))) / 2), _ = y / x, w = y / k;
|
|
227
|
+
Math.abs(_ - 1) > M && this._append`L${e + _ * a},${t + _ * s}`, this._append`A${h},${h},0,0,${+(s * f > a * p)},${this._x1 = e + w * c},${this._y1 = t + w * n}`;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
arc(e, t, i, r, h, d) {
|
|
231
231
|
if (e = +e, t = +t, i = +i, d = !!d, i < 0) throw new Error(`negative radius: ${i}`);
|
|
232
|
-
let
|
|
233
|
-
this._x1 === null ? this._append`M${
|
|
232
|
+
let l = i * Math.cos(r), c = i * Math.sin(r), n = e + l, a = t + c, s = 1 ^ d, o = d ? r - h : h - r;
|
|
233
|
+
this._x1 === null ? this._append`M${n},${a}` : (Math.abs(this._x1 - n) > M || Math.abs(this._y1 - a) > M) && this._append`L${n},${a}`, i && (o < 0 && (o = o % Z + Z), o > je ? this._append`A${i},${i},0,1,${s},${e - l},${t - c}A${i},${i},0,1,${s},${this._x1 = n},${this._y1 = a}` : o > M && this._append`A${i},${i},0,${+(o >= q)},${s},${this._x1 = e + i * Math.cos(h)},${this._y1 = t + i * Math.sin(h)}`);
|
|
234
234
|
}
|
|
235
235
|
rect(e, t, i, r) {
|
|
236
236
|
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${i = +i}v${+r}h${-i}Z`;
|
|
@@ -251,7 +251,7 @@ function fe(u) {
|
|
|
251
251
|
e = i;
|
|
252
252
|
}
|
|
253
253
|
return u;
|
|
254
|
-
}, () => new
|
|
254
|
+
}, () => new Ee(e);
|
|
255
255
|
}
|
|
256
256
|
function de(u) {
|
|
257
257
|
return typeof u == "object" && "length" in u ? u : Array.from(u);
|
|
@@ -295,72 +295,72 @@ function be(u) {
|
|
|
295
295
|
return u[1];
|
|
296
296
|
}
|
|
297
297
|
function ke(u, e) {
|
|
298
|
-
var t = v(!0), i = null, r = me, h = null, d = fe(
|
|
298
|
+
var t = v(!0), i = null, r = me, h = null, d = fe(l);
|
|
299
299
|
u = typeof u == "function" ? u : u === void 0 ? ge : v(u), e = typeof e == "function" ? e : e === void 0 ? be : v(e);
|
|
300
|
-
function
|
|
301
|
-
var
|
|
302
|
-
for (i == null && (h = r(f = d())),
|
|
303
|
-
!(
|
|
300
|
+
function l(c) {
|
|
301
|
+
var n, a = (c = de(c)).length, s, o = !1, f;
|
|
302
|
+
for (i == null && (h = r(f = d())), n = 0; n <= a; ++n)
|
|
303
|
+
!(n < a && t(s = c[n], n, c)) === o && ((o = !o) ? h.lineStart() : h.lineEnd()), o && h.point(+u(s, n, c), +e(s, n, c));
|
|
304
304
|
if (f) return h = null, f + "" || null;
|
|
305
305
|
}
|
|
306
|
-
return
|
|
307
|
-
return arguments.length ? (u = typeof c == "function" ? c : v(+c),
|
|
308
|
-
},
|
|
309
|
-
return arguments.length ? (e = typeof c == "function" ? c : v(+c),
|
|
310
|
-
},
|
|
311
|
-
return arguments.length ? (t = typeof c == "function" ? c : v(!!c),
|
|
312
|
-
},
|
|
313
|
-
return arguments.length ? (r = c, i != null && (h = r(i)),
|
|
314
|
-
},
|
|
315
|
-
return arguments.length ? (c == null ? i = h = null : h = r(i = c),
|
|
316
|
-
},
|
|
306
|
+
return l.x = function(c) {
|
|
307
|
+
return arguments.length ? (u = typeof c == "function" ? c : v(+c), l) : u;
|
|
308
|
+
}, l.y = function(c) {
|
|
309
|
+
return arguments.length ? (e = typeof c == "function" ? c : v(+c), l) : e;
|
|
310
|
+
}, l.defined = function(c) {
|
|
311
|
+
return arguments.length ? (t = typeof c == "function" ? c : v(!!c), l) : t;
|
|
312
|
+
}, l.curve = function(c) {
|
|
313
|
+
return arguments.length ? (r = c, i != null && (h = r(i)), l) : r;
|
|
314
|
+
}, l.context = function(c) {
|
|
315
|
+
return arguments.length ? (c == null ? i = h = null : h = r(i = c), l) : i;
|
|
316
|
+
}, l;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
var i = null, r = v(!0), h = null, d = me,
|
|
318
|
+
function Ge(u, e, t) {
|
|
319
|
+
var i = null, r = v(!0), h = null, d = me, l = null, c = fe(n);
|
|
320
320
|
u = typeof u == "function" ? u : u === void 0 ? ge : v(+u), e = typeof e == "function" ? e : v(e === void 0 ? 0 : +e), t = typeof t == "function" ? t : t === void 0 ? be : v(+t);
|
|
321
|
-
function
|
|
321
|
+
function n(s) {
|
|
322
322
|
var o, f, p, m = (s = de(s)).length, b, k = !1, x, y = new Array(m), _ = new Array(m);
|
|
323
|
-
for (h == null && (
|
|
323
|
+
for (h == null && (l = d(x = c())), o = 0; o <= m; ++o) {
|
|
324
324
|
if (!(o < m && r(b = s[o], o, s)) === k)
|
|
325
325
|
if (k = !k)
|
|
326
|
-
f = o,
|
|
326
|
+
f = o, l.areaStart(), l.lineStart();
|
|
327
327
|
else {
|
|
328
|
-
for (
|
|
329
|
-
|
|
330
|
-
|
|
328
|
+
for (l.lineEnd(), l.lineStart(), p = o - 1; p >= f; --p)
|
|
329
|
+
l.point(y[p], _[p]);
|
|
330
|
+
l.lineEnd(), l.areaEnd();
|
|
331
331
|
}
|
|
332
|
-
k && (y[o] = +u(b, o, s), _[o] = +e(b, o, s),
|
|
332
|
+
k && (y[o] = +u(b, o, s), _[o] = +e(b, o, s), l.point(i ? +i(b, o, s) : y[o], t ? +t(b, o, s) : _[o]));
|
|
333
333
|
}
|
|
334
|
-
if (x) return
|
|
334
|
+
if (x) return l = null, x + "" || null;
|
|
335
335
|
}
|
|
336
336
|
function a() {
|
|
337
337
|
return ke().defined(r).curve(d).context(h);
|
|
338
338
|
}
|
|
339
|
-
return
|
|
340
|
-
return arguments.length ? (u = typeof s == "function" ? s : v(+s), i = null,
|
|
341
|
-
},
|
|
342
|
-
return arguments.length ? (u = typeof s == "function" ? s : v(+s),
|
|
343
|
-
},
|
|
344
|
-
return arguments.length ? (i = s == null ? null : typeof s == "function" ? s : v(+s),
|
|
345
|
-
},
|
|
346
|
-
return arguments.length ? (e = typeof s == "function" ? s : v(+s), t = null,
|
|
347
|
-
},
|
|
348
|
-
return arguments.length ? (e = typeof s == "function" ? s : v(+s),
|
|
349
|
-
},
|
|
350
|
-
return arguments.length ? (t = s == null ? null : typeof s == "function" ? s : v(+s),
|
|
351
|
-
},
|
|
339
|
+
return n.x = function(s) {
|
|
340
|
+
return arguments.length ? (u = typeof s == "function" ? s : v(+s), i = null, n) : u;
|
|
341
|
+
}, n.x0 = function(s) {
|
|
342
|
+
return arguments.length ? (u = typeof s == "function" ? s : v(+s), n) : u;
|
|
343
|
+
}, n.x1 = function(s) {
|
|
344
|
+
return arguments.length ? (i = s == null ? null : typeof s == "function" ? s : v(+s), n) : i;
|
|
345
|
+
}, n.y = function(s) {
|
|
346
|
+
return arguments.length ? (e = typeof s == "function" ? s : v(+s), t = null, n) : e;
|
|
347
|
+
}, n.y0 = function(s) {
|
|
348
|
+
return arguments.length ? (e = typeof s == "function" ? s : v(+s), n) : e;
|
|
349
|
+
}, n.y1 = function(s) {
|
|
350
|
+
return arguments.length ? (t = s == null ? null : typeof s == "function" ? s : v(+s), n) : t;
|
|
351
|
+
}, n.lineX0 = n.lineY0 = function() {
|
|
352
352
|
return a().x(u).y(e);
|
|
353
|
-
},
|
|
353
|
+
}, n.lineY1 = function() {
|
|
354
354
|
return a().x(u).y(t);
|
|
355
|
-
},
|
|
355
|
+
}, n.lineX1 = function() {
|
|
356
356
|
return a().x(i).y(e);
|
|
357
|
-
},
|
|
358
|
-
return arguments.length ? (r = typeof s == "function" ? s : v(!!s),
|
|
359
|
-
},
|
|
360
|
-
return arguments.length ? (d = s, h != null && (
|
|
361
|
-
},
|
|
362
|
-
return arguments.length ? (s == null ? h =
|
|
363
|
-
},
|
|
357
|
+
}, n.defined = function(s) {
|
|
358
|
+
return arguments.length ? (r = typeof s == "function" ? s : v(!!s), n) : r;
|
|
359
|
+
}, n.curve = function(s) {
|
|
360
|
+
return arguments.length ? (d = s, h != null && (l = d(h)), n) : d;
|
|
361
|
+
}, n.context = function(s) {
|
|
362
|
+
return arguments.length ? (s == null ? h = l = null : l = d(h = s), n) : h;
|
|
363
|
+
}, n;
|
|
364
364
|
}
|
|
365
365
|
class I extends ue {
|
|
366
366
|
constructor() {
|
|
@@ -378,7 +378,7 @@ class I extends ue {
|
|
|
378
378
|
enumerable: !0,
|
|
379
379
|
configurable: !0,
|
|
380
380
|
writable: !0,
|
|
381
|
-
value:
|
|
381
|
+
value: Ge()
|
|
382
382
|
}), Object.defineProperty(this, "_legendStroke", {
|
|
383
383
|
enumerable: !0,
|
|
384
384
|
configurable: !0,
|
|
@@ -496,34 +496,34 @@ class I extends ue {
|
|
|
496
496
|
f.setPrivate("visible", !1);
|
|
497
497
|
});
|
|
498
498
|
});
|
|
499
|
-
let i = this.startIndex(), r = this.strokes.template.get("templateField"), h = this.fills.template.get("templateField"), d = !0,
|
|
500
|
-
r && (d = !1), h && (
|
|
499
|
+
let i = this.startIndex(), r = this.strokes.template.get("templateField"), h = this.fills.template.get("templateField"), d = !0, l = !0;
|
|
500
|
+
r && (d = !1), h && (l = !1);
|
|
501
501
|
for (let a = i - 1; a >= 0; a--) {
|
|
502
502
|
let s = this.dataItems[a], o = !0, f = s.dataContext;
|
|
503
|
-
if (r && f[r] && (d = !0), h && f[h] && (
|
|
503
|
+
if (r && f[r] && (d = !0), h && f[h] && (l = !0), N(this._valueFields, (p) => {
|
|
504
504
|
le(s.get(p)) || (o = !1);
|
|
505
|
-
}), o && d &&
|
|
505
|
+
}), o && d && l) {
|
|
506
506
|
i = a;
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
let c = this.dataItems.length,
|
|
511
|
-
if (
|
|
512
|
-
|
|
513
|
-
for (let a =
|
|
510
|
+
let c = this.dataItems.length, n = this.endIndex();
|
|
511
|
+
if (n < c) {
|
|
512
|
+
n++;
|
|
513
|
+
for (let a = n; a < c; a++) {
|
|
514
514
|
let s = this.dataItems[a], o = !0;
|
|
515
515
|
if (N(this._valueFields, (f) => {
|
|
516
516
|
le(s.get(f)) || (o = !1);
|
|
517
517
|
}), o) {
|
|
518
|
-
|
|
518
|
+
n = a + 1;
|
|
519
519
|
break;
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
if (i > 0 && i--, this._endIndex =
|
|
523
|
+
if (i > 0 && i--, this._endIndex = n, this._clearGraphics(), this._sindex = 0, this._dindex = i, this.dataItems.length == 1)
|
|
524
524
|
this._startSegment(0);
|
|
525
525
|
else
|
|
526
|
-
for (; this._dindex <
|
|
526
|
+
for (; this._dindex < n - 1; )
|
|
527
527
|
this._startSegment(this._dindex), this._sindex++;
|
|
528
528
|
}
|
|
529
529
|
} else
|
|
@@ -537,16 +537,16 @@ class I extends ue {
|
|
|
537
537
|
}
|
|
538
538
|
_startSegment(e) {
|
|
539
539
|
let t = this._endIndex, i = t;
|
|
540
|
-
const r = this.get("autoGapCount"), h = this.get("connect"), d = this.makeFill(this.fills),
|
|
541
|
-
|
|
542
|
-
const
|
|
543
|
-
a && a != this.strokes.template && (
|
|
540
|
+
const r = this.get("autoGapCount"), h = this.get("connect"), d = this.makeFill(this.fills), l = this._fillTemplate, c = this.fills.template;
|
|
541
|
+
l && l != c && (d.template = l), d.setPrivate("visible", !0);
|
|
542
|
+
const n = this.makeStroke(this.strokes), a = this._strokeTemplate;
|
|
543
|
+
a && a != this.strokes.template && (n.template = a), n.setPrivate("visible", !0);
|
|
544
544
|
let s = this.get("xAxis"), o = this.get("yAxis"), f = this.get("baseAxis"), p = this.get("vcx", 1), m = this.get("vcy", 1), b = this._xField, k = this._yField, x = this._xOpenField, y = this._yOpenField;
|
|
545
545
|
const _ = this.get("openValueXField"), w = this.get("openValueYField");
|
|
546
546
|
_ || (x = this._xField), w || (y = this._yField);
|
|
547
|
-
const Y = this.get("stacked"),
|
|
548
|
-
let
|
|
549
|
-
f === o ?
|
|
547
|
+
const Y = this.get("stacked"), D = s.basePosition(), L = o.basePosition();
|
|
548
|
+
let A;
|
|
549
|
+
f === o ? A = this._yField : A = this._xField;
|
|
550
550
|
const O = [];
|
|
551
551
|
let X = [];
|
|
552
552
|
O.push(X);
|
|
@@ -562,7 +562,7 @@ class I extends ue {
|
|
|
562
562
|
segments: O,
|
|
563
563
|
stacked: Y,
|
|
564
564
|
getOpen: ee,
|
|
565
|
-
basePosX:
|
|
565
|
+
basePosX: D,
|
|
566
566
|
basePosY: L,
|
|
567
567
|
fillVisible: K,
|
|
568
568
|
xField: b,
|
|
@@ -592,7 +592,7 @@ class I extends ue {
|
|
|
592
592
|
i = T;
|
|
593
593
|
break;
|
|
594
594
|
} else
|
|
595
|
-
E = g,
|
|
595
|
+
E = g, n.template = g;
|
|
596
596
|
}
|
|
597
597
|
if (Q) {
|
|
598
598
|
let g = C.dataContext[Q];
|
|
@@ -605,10 +605,10 @@ class I extends ue {
|
|
|
605
605
|
}
|
|
606
606
|
if (!h) {
|
|
607
607
|
let g = this.dataItems[T + 1];
|
|
608
|
-
g && f.shouldGap(C, g, r,
|
|
608
|
+
g && f.shouldGap(C, g, r, A) && (X = [], O.push(X), z.points = X);
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
d.setRaw("userData", [e, T]),
|
|
611
|
+
d.setRaw("userData", [e, T]), n.setRaw("userData", [e, T]), T === t && this._endLine(X, O[0][0]), n && this._drawStroke(n, O), d && this._drawFill(d, O), this.axisRanges.each((C) => {
|
|
612
612
|
const j = C.container, H = C.fills, g = this.makeFill(H);
|
|
613
613
|
j && j.children.push(g), g.setPrivate("visible", !0), this._drawFill(g, O);
|
|
614
614
|
const ye = C.strokes, R = this.makeStroke(ye);
|
|
@@ -617,21 +617,21 @@ class I extends ue {
|
|
|
617
617
|
}
|
|
618
618
|
_getPoints(e, t) {
|
|
619
619
|
let i = t.points, r = e.get("locationX", t.locationX), h = e.get("locationY", t.locationY);
|
|
620
|
-
const d = this.get("exactLocationX", !1),
|
|
621
|
-
let c = t.xAxis.getDataItemPositionX(e, t.xField, r, t.vcx, d),
|
|
620
|
+
const d = this.get("exactLocationX", !1), l = this.get("exactLocationY", !1);
|
|
621
|
+
let c = t.xAxis.getDataItemPositionX(e, t.xField, r, t.vcx, d), n = t.yAxis.getDataItemPositionY(e, t.yField, h, t.vcy, l);
|
|
622
622
|
if (this._shouldInclude(c)) {
|
|
623
|
-
const a = this.getPoint(c,
|
|
623
|
+
const a = this.getPoint(c, n), s = [a.x, a.y];
|
|
624
624
|
if (a.x += this._x, a.y += this._y, e.set("point", a), t.fillVisible) {
|
|
625
|
-
let o = c, f =
|
|
625
|
+
let o = c, f = n;
|
|
626
626
|
if (t.baseAxis === t.xAxis ? f = t.basePosY : t.baseAxis === t.yAxis && (o = t.basePosX), t.getOpen) {
|
|
627
627
|
let m = e.get(t.xOpenField), b = e.get(t.yOpenField);
|
|
628
628
|
if (m != null && b != null) {
|
|
629
629
|
let k = e.get("openLocationX", t.openLocationX), x = e.get("openLocationY", t.openLocationY);
|
|
630
630
|
if (t.stacked) {
|
|
631
631
|
let y = e.get("stackToItemX"), _ = e.get("stackToItemY");
|
|
632
|
-
y ? (o = t.xAxis.getDataItemPositionX(y, t.xField, k, y.component.get("vcx"), d), ne(o) && (o = t.basePosX)) : t.yAxis === t.baseAxis ? o = t.basePosX : o = t.xAxis.getDataItemPositionX(e, t.xOpenField, k, t.vcx, d), _ ? (f = t.yAxis.getDataItemPositionY(_, t.yField, x, _.component.get("vcy"),
|
|
632
|
+
y ? (o = t.xAxis.getDataItemPositionX(y, t.xField, k, y.component.get("vcx"), d), ne(o) && (o = t.basePosX)) : t.yAxis === t.baseAxis ? o = t.basePosX : o = t.xAxis.getDataItemPositionX(e, t.xOpenField, k, t.vcx, d), _ ? (f = t.yAxis.getDataItemPositionY(_, t.yField, x, _.component.get("vcy"), l), ne(f) && (f = t.basePosY)) : t.xAxis === t.baseAxis ? f = t.basePosY : f = t.yAxis.getDataItemPositionY(e, t.yOpenField, x, t.vcy, l);
|
|
633
633
|
} else
|
|
634
|
-
o = t.xAxis.getDataItemPositionX(e, t.xOpenField, k, t.vcx, d), f = t.yAxis.getDataItemPositionY(e, t.yOpenField, x, t.vcy,
|
|
634
|
+
o = t.xAxis.getDataItemPositionX(e, t.xOpenField, k, t.vcx, d), f = t.yAxis.getDataItemPositionY(e, t.yOpenField, x, t.vcy, l);
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
let p = this.getPoint(o, f);
|
|
@@ -684,14 +684,14 @@ class I extends ue {
|
|
|
684
684
|
themeTags: ["line", "series", "legend", "marker", "fill"]
|
|
685
685
|
}, [this.fills.template]));
|
|
686
686
|
this._legendFill = d;
|
|
687
|
-
const
|
|
688
|
-
if (h.states.create("disabled", { fill:
|
|
687
|
+
const l = this._root.interfaceColors.get("disabled");
|
|
688
|
+
if (h.states.create("disabled", { fill: l, stroke: l }), d.states.create("disabled", { fill: l, stroke: l }), this.bullets.length > 0) {
|
|
689
689
|
const c = this.bullets.getIndex(0);
|
|
690
690
|
if (c) {
|
|
691
|
-
const
|
|
692
|
-
if (
|
|
693
|
-
const a =
|
|
694
|
-
a instanceof S && a.states.create("disabled", { fill:
|
|
691
|
+
const n = c(i._root, this, new Pe(this, { legend: !0 }, {}));
|
|
692
|
+
if (n) {
|
|
693
|
+
const a = n.get("sprite");
|
|
694
|
+
a instanceof S && a.states.create("disabled", { fill: l, stroke: l }), a && (a.setAll({
|
|
695
695
|
tooltipText: void 0,
|
|
696
696
|
tooltipHTML: void 0,
|
|
697
697
|
focusable: void 0,
|
|
@@ -718,7 +718,7 @@ Object.defineProperty(I, "classNames", {
|
|
|
718
718
|
writable: !0,
|
|
719
719
|
value: ue.classNames.concat([I.className])
|
|
720
720
|
});
|
|
721
|
-
function
|
|
721
|
+
function ze({
|
|
722
722
|
seriesData: u,
|
|
723
723
|
height: e = "500px",
|
|
724
724
|
width: t = "100%",
|
|
@@ -727,12 +727,12 @@ function He({
|
|
|
727
727
|
loading: h = !1,
|
|
728
728
|
emptyMessage: d = "No data available"
|
|
729
729
|
}) {
|
|
730
|
-
const
|
|
730
|
+
const l = ae(null), c = ae(null);
|
|
731
731
|
return Me(() => {
|
|
732
|
-
const
|
|
733
|
-
c.current =
|
|
734
|
-
const a =
|
|
735
|
-
|
|
732
|
+
const n = Fe.new(i);
|
|
733
|
+
c.current = n, n.setThemes([Le.new(n)]);
|
|
734
|
+
const a = n.container.children.push(
|
|
735
|
+
De.new(n, {
|
|
736
736
|
panX: !0,
|
|
737
737
|
panY: !0,
|
|
738
738
|
wheelX: "panX",
|
|
@@ -740,37 +740,36 @@ function He({
|
|
|
740
740
|
pinchZoomX: !0
|
|
741
741
|
})
|
|
742
742
|
);
|
|
743
|
-
|
|
743
|
+
l.current = a, a.set(
|
|
744
744
|
"cursor",
|
|
745
|
-
|
|
745
|
+
Ae.new(n, {
|
|
746
746
|
behavior: "zoomX"
|
|
747
747
|
})
|
|
748
748
|
).lineY.set("visible", !1);
|
|
749
749
|
const s = a.xAxes.push(
|
|
750
|
-
Ce.new(
|
|
750
|
+
Ce.new(n, {
|
|
751
751
|
maxDeviation: 0.3,
|
|
752
752
|
baseInterval: { timeUnit: "day", count: 1 },
|
|
753
|
-
renderer: Oe.new(
|
|
753
|
+
renderer: Oe.new(n, {
|
|
754
754
|
minorGridEnabled: !0
|
|
755
755
|
})
|
|
756
756
|
})
|
|
757
757
|
), o = a.yAxes.push(
|
|
758
|
-
Xe.new(
|
|
759
|
-
renderer: $e.new(
|
|
758
|
+
Xe.new(n, {
|
|
759
|
+
renderer: $e.new(n, {})
|
|
760
760
|
})
|
|
761
|
-
), f = [], p = Ye.new(
|
|
761
|
+
), f = [], p = Ye.new(n, {});
|
|
762
762
|
u.forEach((w, Y) => {
|
|
763
|
-
const
|
|
764
|
-
I.new(
|
|
763
|
+
const D = w.color ? he(w.color) : p.getIndex(Y), L = a.series.push(
|
|
764
|
+
I.new(n, {
|
|
765
765
|
name: w.name,
|
|
766
766
|
xAxis: s,
|
|
767
767
|
yAxis: o,
|
|
768
768
|
valueYField: "value",
|
|
769
769
|
valueXField: "date",
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
tooltip: Se.new(l, {
|
|
770
|
+
stroke: D,
|
|
771
|
+
fill: D,
|
|
772
|
+
tooltip: Se.new(n, {
|
|
774
773
|
labelText: "{name}: {valueY}"
|
|
775
774
|
})
|
|
776
775
|
})
|
|
@@ -781,37 +780,30 @@ function He({
|
|
|
781
780
|
});
|
|
782
781
|
let m = null;
|
|
783
782
|
r && (m = a.children.push(
|
|
784
|
-
V.new(
|
|
783
|
+
V.new(n, {
|
|
785
784
|
centerX: re(50),
|
|
786
785
|
x: re(50),
|
|
787
|
-
layout:
|
|
786
|
+
layout: n.horizontalLayout
|
|
788
787
|
})
|
|
789
788
|
), m.data.setAll(a.series.values));
|
|
790
789
|
const b = 1, k = 0.2, x = 4, y = (w) => {
|
|
791
790
|
var L;
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
|
|
791
|
+
const D = (L = w.target.dataItem) == null ? void 0 : L.dataContext;
|
|
792
|
+
D && (D.strokes.template.set("strokeOpacity", 1), D.strokes.template.set("strokeWidth", x), f.forEach((A) => {
|
|
793
|
+
A !== D && (A.strokes.template.set("strokeOpacity", k), A.strokes.template.set("strokeWidth", 1));
|
|
795
794
|
}));
|
|
796
795
|
}, _ = (w) => {
|
|
797
796
|
var L;
|
|
798
|
-
((L = w.target.dataItem) == null ? void 0 : L.dataContext) && f.forEach((
|
|
799
|
-
|
|
797
|
+
((L = w.target.dataItem) == null ? void 0 : L.dataContext) && f.forEach((A) => {
|
|
798
|
+
A.strokes.template.set("strokeOpacity", b), A.strokes.template.set("strokeWidth", 2);
|
|
800
799
|
});
|
|
801
800
|
};
|
|
802
801
|
return m && (m.markers.template.events.on("pointerover", y), m.markers.template.events.on("pointerout", _)), a.appear(1e3, 100), f.forEach((w, Y) => {
|
|
803
802
|
w.appear(1e3, 100 * (Y + 1));
|
|
804
803
|
}), () => {
|
|
805
|
-
|
|
804
|
+
n.dispose();
|
|
806
805
|
};
|
|
807
|
-
}, []),
|
|
808
|
-
n.current && c.current && (n.current.series.clear(), u.forEach((l, a) => {
|
|
809
|
-
const s = n.current.series.getIndex(
|
|
810
|
-
a
|
|
811
|
-
);
|
|
812
|
-
s && s.data.setAll(l.data);
|
|
813
|
-
}));
|
|
814
|
-
}, [u]), /* @__PURE__ */ we("div", { style: { position: "relative", width: t, height: e }, children: [
|
|
806
|
+
}, [i, u, r]), /* @__PURE__ */ we("div", { style: { position: "relative", width: t, height: e }, children: [
|
|
815
807
|
/* @__PURE__ */ W("div", { id: i, style: { width: "100%", height: "100%" } }),
|
|
816
808
|
h && /* @__PURE__ */ W(
|
|
817
809
|
"div",
|
|
@@ -847,5 +839,5 @@ function He({
|
|
|
847
839
|
] });
|
|
848
840
|
}
|
|
849
841
|
export {
|
|
850
|
-
|
|
842
|
+
ze as HighlightLineChart
|
|
851
843
|
};
|