katucharts.js 0.2.2 → 0.2.4
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/README.md +1 -1
- package/dist/katucharts-bio.es.js +8 -2
- package/dist/katucharts-bio.umd.js +1 -1
- package/dist/katucharts.es.js +792 -784
- package/dist/katucharts.umd.js +4 -4
- package/package.json +1 -1
package/dist/katucharts.es.js
CHANGED
|
@@ -11,7 +11,7 @@ function ef(n, t) {
|
|
|
11
11
|
}
|
|
12
12
|
function Gr() {
|
|
13
13
|
}
|
|
14
|
-
var Rr = 0.7, $o = 1 / Rr, Di = "\\s*([+-]?\\d+)\\s*", Dr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
14
|
+
var Rr = 0.7, $o = 1 / Rr, Di = "\\s*([+-]?\\d+)\\s*", Dr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Mn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ip = /^#([0-9a-f]{3,8})$/, Fp = new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`), Rp = new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`), Dp = new RegExp(`^rgba\\(${Di},${Di},${Di},${Dr}\\)$`), zp = new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${Dr}\\)$`), Bp = new RegExp(`^hsl\\(${Dr},${Mn},${Mn}\\)$`), Op = new RegExp(`^hsla\\(${Dr},${Mn},${Mn},${Dr}\\)$`), vl = {
|
|
15
15
|
aliceblue: 15792383,
|
|
16
16
|
antiquewhite: 16444375,
|
|
17
17
|
aqua: 65535,
|
|
@@ -883,7 +883,7 @@ const cf = 20;
|
|
|
883
883
|
function Il(n) {
|
|
884
884
|
return typeof n == "object" && n !== null && !Array.isArray(n) && Object.getPrototypeOf(n) === Object.prototype;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function ue(n, ...t) {
|
|
887
887
|
return lf(n, t, 0);
|
|
888
888
|
}
|
|
889
889
|
function lf(n, t, e) {
|
|
@@ -1219,14 +1219,14 @@ class wg extends hg {
|
|
|
1219
1219
|
for (let v = 0; v < 16; v++, e += 4)
|
|
1220
1220
|
Xn[v] = t.getUint32(e), Un[v] = t.getUint32(e += 4);
|
|
1221
1221
|
for (let v = 16; v < 80; v++) {
|
|
1222
|
-
const b = Xn[v - 15] | 0, k = Un[v - 15] | 0, M = Si(b, k, 1) ^ Si(b, k, 8) ^ zl(b, k, 7), C = _i(b, k, 1) ^ _i(b, k, 8) ^ Bl(b, k, 7), L = Xn[v - 2] | 0, _ = Un[v - 2] | 0,
|
|
1222
|
+
const b = Xn[v - 15] | 0, k = Un[v - 15] | 0, M = Si(b, k, 1) ^ Si(b, k, 8) ^ zl(b, k, 7), C = _i(b, k, 1) ^ _i(b, k, 8) ^ Bl(b, k, 7), L = Xn[v - 2] | 0, _ = Un[v - 2] | 0, T = Si(L, _, 19) ^ no(L, _, 61) ^ zl(L, _, 6), I = _i(L, _, 19) ^ io(L, _, 61) ^ Bl(L, _, 6), E = gg(C, I, Un[v - 7], Un[v - 16]), P = mg(E, M, T, Xn[v - 7], Xn[v - 16]);
|
|
1223
1223
|
Xn[v] = P | 0, Un[v] = E | 0;
|
|
1224
1224
|
}
|
|
1225
1225
|
let { Ah: i, Al: r, Bh: o, Bl: s, Ch: a, Cl: l, Dh: c, Dl: h, Eh: f, El: u, Fh: d, Fl: p, Gh: y, Gl: g, Hh: m, Hl: x } = this;
|
|
1226
1226
|
for (let v = 0; v < 80; v++) {
|
|
1227
|
-
const b = Si(f, u, 14) ^ Si(f, u, 18) ^ no(f, u, 41), k = _i(f, u, 14) ^ _i(f, u, 18) ^ io(f, u, 41), M = f & d ^ ~f & y, C = u & p ^ ~u & g, L = yg(x, k, C, vg[v], Un[v]), _ = xg(L, m, b, M, bg[v], Xn[v]),
|
|
1228
|
-
m = y | 0, x = g | 0, y = d | 0, g = p | 0, d = f | 0, p = u | 0, { h: f, l: u } = En(c | 0, h | 0, _ | 0,
|
|
1229
|
-
const w = dg(
|
|
1227
|
+
const b = Si(f, u, 14) ^ Si(f, u, 18) ^ no(f, u, 41), k = _i(f, u, 14) ^ _i(f, u, 18) ^ io(f, u, 41), M = f & d ^ ~f & y, C = u & p ^ ~u & g, L = yg(x, k, C, vg[v], Un[v]), _ = xg(L, m, b, M, bg[v], Xn[v]), T = L | 0, I = Si(i, r, 28) ^ no(i, r, 34) ^ no(i, r, 39), E = _i(i, r, 28) ^ io(i, r, 34) ^ io(i, r, 39), P = i & o ^ i & a ^ o & a, S = r & s ^ r & l ^ s & l;
|
|
1228
|
+
m = y | 0, x = g | 0, y = d | 0, g = p | 0, d = f | 0, p = u | 0, { h: f, l: u } = En(c | 0, h | 0, _ | 0, T | 0), c = a | 0, h = l | 0, a = o | 0, l = s | 0, o = i | 0, s = r | 0;
|
|
1229
|
+
const w = dg(T, E, S);
|
|
1230
1230
|
i = pg(w, _, I, P), r = w | 0;
|
|
1231
1231
|
}
|
|
1232
1232
|
({ h: i, l: r } = En(this.Ah | 0, this.Al | 0, i | 0, r | 0)), { h: o, l: s } = En(this.Bh | 0, this.Bl | 0, o | 0, s | 0), { h: a, l } = En(this.Ch | 0, this.Cl | 0, a | 0, l | 0), { h: c, l: h } = En(this.Dh | 0, this.Dl | 0, c | 0, h | 0), { h: f, l: u } = En(this.Eh | 0, this.El | 0, f | 0, u | 0), { h: d, l: p } = En(this.Fh | 0, this.Fl | 0, d | 0, p | 0), { h: y, l: g } = En(this.Gh | 0, this.Gl | 0, y | 0, g | 0), { h: m, l: x } = En(this.Hh | 0, this.Hl | 0, m | 0, x | 0), this.set(i, r, o, s, a, l, c, h, f, u, d, p, y, g, m, x);
|
|
@@ -1361,14 +1361,14 @@ const Wl = () => {
|
|
|
1361
1361
|
throw new Error("not implemented");
|
|
1362
1362
|
};
|
|
1363
1363
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1364
|
-
const Se = /* @__PURE__ */ BigInt(0),
|
|
1364
|
+
const Se = /* @__PURE__ */ BigInt(0), ge = /* @__PURE__ */ BigInt(1), ai = /* @__PURE__ */ BigInt(2), yf = /* @__PURE__ */ BigInt(3), xf = /* @__PURE__ */ BigInt(4), bf = /* @__PURE__ */ BigInt(5), Fg = /* @__PURE__ */ BigInt(7), vf = /* @__PURE__ */ BigInt(8), Rg = /* @__PURE__ */ BigInt(9), wf = /* @__PURE__ */ BigInt(16);
|
|
1365
1365
|
function re(n, t) {
|
|
1366
1366
|
if (t <= Se)
|
|
1367
1367
|
throw new Error("mod: expected positive modulus, got " + t);
|
|
1368
1368
|
const e = n % t;
|
|
1369
1369
|
return e >= Se ? e : t + e;
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function bn(n, t, e) {
|
|
1372
1372
|
if (t < Se)
|
|
1373
1373
|
throw new Error("pow2: expected non-negative exponent, got " + t);
|
|
1374
1374
|
let i = n;
|
|
@@ -1381,12 +1381,12 @@ function Hl(n, t) {
|
|
|
1381
1381
|
throw new Error("invert: expected non-zero number");
|
|
1382
1382
|
if (t <= Se)
|
|
1383
1383
|
throw new Error("invert: expected positive modulus, got " + t);
|
|
1384
|
-
let e = re(n, t), i = t, r = Se, o =
|
|
1384
|
+
let e = re(n, t), i = t, r = Se, o = ge;
|
|
1385
1385
|
for (; e !== Se; ) {
|
|
1386
1386
|
const a = i / e, l = i - e * a, c = r - o * a;
|
|
1387
1387
|
i = e, e = l, r = o, o = c;
|
|
1388
1388
|
}
|
|
1389
|
-
if (i !==
|
|
1389
|
+
if (i !== ge)
|
|
1390
1390
|
throw new Error("invert: does not exist");
|
|
1391
1391
|
return re(r, t);
|
|
1392
1392
|
}
|
|
@@ -1396,7 +1396,7 @@ function kc(n, t, e) {
|
|
|
1396
1396
|
throw new Error("Cannot find square root");
|
|
1397
1397
|
}
|
|
1398
1398
|
function kf(n, t) {
|
|
1399
|
-
const e = n, i = (e.ORDER +
|
|
1399
|
+
const e = n, i = (e.ORDER + ge) / xf, r = e.pow(t, i);
|
|
1400
1400
|
return kc(e, r, t), r;
|
|
1401
1401
|
}
|
|
1402
1402
|
function Dg(n, t) {
|
|
@@ -1417,7 +1417,7 @@ function zg(n) {
|
|
|
1417
1417
|
function Mf(n) {
|
|
1418
1418
|
if (n < yf)
|
|
1419
1419
|
throw new Error("sqrt is not defined for small field");
|
|
1420
|
-
let t = n -
|
|
1420
|
+
let t = n - ge, e = 0;
|
|
1421
1421
|
for (; t % ai === Se; )
|
|
1422
1422
|
t /= ai, e++;
|
|
1423
1423
|
let i = ai;
|
|
@@ -1428,7 +1428,7 @@ function Mf(n) {
|
|
|
1428
1428
|
if (e === 1)
|
|
1429
1429
|
return kf;
|
|
1430
1430
|
let o = r.pow(i, t);
|
|
1431
|
-
const s = (t +
|
|
1431
|
+
const s = (t + ge) / ai;
|
|
1432
1432
|
return function(l, c) {
|
|
1433
1433
|
const h = l;
|
|
1434
1434
|
if (h.is0(c))
|
|
@@ -1443,7 +1443,7 @@ function Mf(n) {
|
|
|
1443
1443
|
for (; !h.eql(g, h.ONE); )
|
|
1444
1444
|
if (y++, g = h.sqr(g), y === f)
|
|
1445
1445
|
throw new Error("Cannot find square root");
|
|
1446
|
-
const m =
|
|
1446
|
+
const m = ge << BigInt(f - y - 1), x = h.pow(u, m);
|
|
1447
1447
|
f = y, u = h.sqr(x), d = h.mul(d, u), p = h.mul(p, x);
|
|
1448
1448
|
}
|
|
1449
1449
|
return p;
|
|
@@ -1452,7 +1452,7 @@ function Mf(n) {
|
|
|
1452
1452
|
function Bg(n) {
|
|
1453
1453
|
return n % xf === yf ? kf : n % vf === bf ? Dg : n % wf === Rg ? zg(n) : Mf(n);
|
|
1454
1454
|
}
|
|
1455
|
-
const ni = (n, t) => (re(n, t) &
|
|
1455
|
+
const ni = (n, t) => (re(n, t) & ge) === ge, Og = [
|
|
1456
1456
|
"create",
|
|
1457
1457
|
"isValid",
|
|
1458
1458
|
"is0",
|
|
@@ -1479,7 +1479,7 @@ function Ng(n) {
|
|
|
1479
1479
|
}, e = Og.reduce((i, r) => (i[r] = "function", i), t);
|
|
1480
1480
|
if (wc(n, e), Ma(n.BYTES, "BYTES"), Ma(n.BITS, "BITS"), n.BYTES < 1 || n.BITS < 1)
|
|
1481
1481
|
throw new Error("invalid field: expected BYTES/BITS > 0");
|
|
1482
|
-
if (n.ORDER <=
|
|
1482
|
+
if (n.ORDER <= ge)
|
|
1483
1483
|
throw new Error("invalid field: expected ORDER > 1, got " + n.ORDER);
|
|
1484
1484
|
return n;
|
|
1485
1485
|
}
|
|
@@ -1489,11 +1489,11 @@ function Wg(n, t, e) {
|
|
|
1489
1489
|
throw new Error("invalid exponent, negatives unsupported");
|
|
1490
1490
|
if (e === Se)
|
|
1491
1491
|
return i.ONE;
|
|
1492
|
-
if (e ===
|
|
1492
|
+
if (e === ge)
|
|
1493
1493
|
return t;
|
|
1494
1494
|
let r = i.ONE, o = t;
|
|
1495
1495
|
for (; e > Se; )
|
|
1496
|
-
e &
|
|
1496
|
+
e & ge && (r = i.mul(r, o)), o = i.sqr(o), e >>= ge;
|
|
1497
1497
|
return r;
|
|
1498
1498
|
}
|
|
1499
1499
|
function Af(n, t, e = !1) {
|
|
@@ -1501,7 +1501,7 @@ function Af(n, t, e = !1) {
|
|
|
1501
1501
|
return t.reduceRight((a, l, c) => i.is0(l) ? a : (r[c] = i.mul(a, r[c]), i.mul(a, l)), s), r;
|
|
1502
1502
|
}
|
|
1503
1503
|
function Vl(n, t) {
|
|
1504
|
-
const e = n, i = (e.ORDER -
|
|
1504
|
+
const e = n, i = (e.ORDER - ge) / ai, r = e.pow(t, i), o = e.eql(r, e.ONE), s = e.eql(r, e.ZERO), a = e.eql(r, e.neg(e.ONE));
|
|
1505
1505
|
if (!o && !s && !a)
|
|
1506
1506
|
throw new Error("invalid Legendre symbol result");
|
|
1507
1507
|
return o ? 1 : s ? 0 : -1;
|
|
@@ -1525,10 +1525,10 @@ class Sf {
|
|
|
1525
1525
|
xt(this, "BYTES");
|
|
1526
1526
|
xt(this, "isLE");
|
|
1527
1527
|
xt(this, "ZERO", Se);
|
|
1528
|
-
xt(this, "ONE",
|
|
1528
|
+
xt(this, "ONE", ge);
|
|
1529
1529
|
xt(this, "_lengths");
|
|
1530
1530
|
xt(this, "_mod");
|
|
1531
|
-
if (t <=
|
|
1531
|
+
if (t <= ge)
|
|
1532
1532
|
throw new Error("invalid field: expected ORDER > 1, got " + t);
|
|
1533
1533
|
let i;
|
|
1534
1534
|
this.isLE = !1, e != null && typeof e == "object" && (typeof e.BITS == "number" && (i = e.BITS), typeof e.sqrt == "function" && Object.defineProperty(this, "sqrt", { value: e.sqrt, enumerable: !0 }), typeof e.isLE == "boolean" && (this.isLE = e.isLE), e.allowedLengths && (this._lengths = Object.freeze(e.allowedLengths.slice())), typeof e.modFromBytes == "boolean" && (this._mod = e.modFromBytes));
|
|
@@ -1553,7 +1553,7 @@ class Sf {
|
|
|
1553
1553
|
return !this.is0(t) && this.isValid(t);
|
|
1554
1554
|
}
|
|
1555
1555
|
isOdd(t) {
|
|
1556
|
-
return (t &
|
|
1556
|
+
return (t & ge) === ge;
|
|
1557
1557
|
}
|
|
1558
1558
|
neg(t) {
|
|
1559
1559
|
return re(-t, this.ORDER);
|
|
@@ -1790,7 +1790,7 @@ function Yg(n, t) {
|
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
1792
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1793
|
-
const qn = /* @__PURE__ */ BigInt(0),
|
|
1793
|
+
const qn = /* @__PURE__ */ BigInt(0), he = /* @__PURE__ */ BigInt(1), Ns = /* @__PURE__ */ BigInt(2), Xg = /* @__PURE__ */ BigInt(8);
|
|
1794
1794
|
function Ug(n, t, e, i) {
|
|
1795
1795
|
const r = n.sqr(e), o = n.sqr(i), s = n.add(n.mul(t.a, r), o), a = n.add(n.ONE, n.mul(t.d, n.mul(r, o)));
|
|
1796
1796
|
return n.eql(s, a);
|
|
@@ -1800,7 +1800,7 @@ function qg(n, t = {}) {
|
|
|
1800
1800
|
let s = i.CURVE;
|
|
1801
1801
|
const { h: a } = s;
|
|
1802
1802
|
wc(e, {}, { uvRatio: "function" });
|
|
1803
|
-
const l = Ns << BigInt(o.BYTES * 8) -
|
|
1803
|
+
const l = Ns << BigInt(o.BYTES * 8) - he, c = (g) => r.create(g), h = e.uvRatio === void 0 ? (g, m) => {
|
|
1804
1804
|
try {
|
|
1805
1805
|
return { isValid: !0, value: r.sqrt(r.div(g, m)) };
|
|
1806
1806
|
} catch {
|
|
@@ -1810,7 +1810,7 @@ function qg(n, t = {}) {
|
|
|
1810
1810
|
if (!Ug(r, s, s.Gx, s.Gy))
|
|
1811
1811
|
throw new Error("bad curve params: generator point");
|
|
1812
1812
|
function f(g, m, x = !1) {
|
|
1813
|
-
const v = x ?
|
|
1813
|
+
const v = x ? he : qn;
|
|
1814
1814
|
return Nl("coordinate " + g, m, v, l), m;
|
|
1815
1815
|
}
|
|
1816
1816
|
function u(g) {
|
|
@@ -1837,7 +1837,7 @@ function qg(n, t = {}) {
|
|
|
1837
1837
|
if (m instanceof y)
|
|
1838
1838
|
throw new Error("extended point not allowed");
|
|
1839
1839
|
const { x, y: v } = m || {};
|
|
1840
|
-
return f("x", x), f("y", v), new y(x, v,
|
|
1840
|
+
return f("x", x), f("y", v), new y(x, v, he, c(x * v));
|
|
1841
1841
|
}
|
|
1842
1842
|
// Uses algo from RFC8032 5.1.3.
|
|
1843
1843
|
static fromBytes(m, x = !1) {
|
|
@@ -1847,11 +1847,11 @@ function qg(n, t = {}) {
|
|
|
1847
1847
|
M[v - 1] = C & -129;
|
|
1848
1848
|
const L = zr(M), _ = x ? l : r.ORDER;
|
|
1849
1849
|
Nl("point.y", L, qn, _);
|
|
1850
|
-
const
|
|
1850
|
+
const T = c(L * L), I = c(T - he), E = c(k * T - b);
|
|
1851
1851
|
let { isValid: P, value: S } = h(I, E);
|
|
1852
1852
|
if (!P)
|
|
1853
1853
|
throw new Error("bad point: invalid y coordinate");
|
|
1854
|
-
const w = (S &
|
|
1854
|
+
const w = (S & he) === he, A = (C & 128) !== 0;
|
|
1855
1855
|
if (!x && S === qn && A)
|
|
1856
1856
|
throw new Error("bad point: x=0 and x_0=1");
|
|
1857
1857
|
return A !== w && (S = c(-S)), y.fromAffine({ x: S, y: L });
|
|
@@ -1873,7 +1873,7 @@ function qg(n, t = {}) {
|
|
|
1873
1873
|
const m = this, { a: x, d: v } = s;
|
|
1874
1874
|
if (m.is0())
|
|
1875
1875
|
throw new Error("bad point: ZERO");
|
|
1876
|
-
const { X: b, Y: k, Z: M, T: C } = m, L = c(b * b), _ = c(k * k),
|
|
1876
|
+
const { X: b, Y: k, Z: M, T: C } = m, L = c(b * b), _ = c(k * k), T = c(M * M), I = c(T * T), E = c(L * x), P = c(T * c(E + _)), S = c(I + c(v * c(L * _)));
|
|
1877
1877
|
if (P !== S)
|
|
1878
1878
|
throw new Error("bad point: equation left != right (1)");
|
|
1879
1879
|
const w = c(b * k), A = c(M * C);
|
|
@@ -1883,8 +1883,8 @@ function qg(n, t = {}) {
|
|
|
1883
1883
|
// Compare one point to another.
|
|
1884
1884
|
equals(m) {
|
|
1885
1885
|
u(m);
|
|
1886
|
-
const { X: x, Y: v, Z: b } = this, { X: k, Y: M, Z: C } = m, L = c(x * C), _ = c(k * b),
|
|
1887
|
-
return L === _ &&
|
|
1886
|
+
const { X: x, Y: v, Z: b } = this, { X: k, Y: M, Z: C } = m, L = c(x * C), _ = c(k * b), T = c(v * C), I = c(M * b);
|
|
1887
|
+
return L === _ && T === I;
|
|
1888
1888
|
}
|
|
1889
1889
|
is0() {
|
|
1890
1890
|
return this.equals(y.ZERO);
|
|
@@ -1896,15 +1896,15 @@ function qg(n, t = {}) {
|
|
|
1896
1896
|
// https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
|
|
1897
1897
|
// Cost: 4M + 4S + 1*a + 6add + 1*2.
|
|
1898
1898
|
double() {
|
|
1899
|
-
const { a: m } = s, { X: x, Y: v, Z: b } = this, k = c(x * x), M = c(v * v), C = c(Ns * c(b * b)), L = c(m * k), _ = x + v,
|
|
1900
|
-
return new y(S, w,
|
|
1899
|
+
const { a: m } = s, { X: x, Y: v, Z: b } = this, k = c(x * x), M = c(v * v), C = c(Ns * c(b * b)), L = c(m * k), _ = x + v, T = c(c(_ * _) - k - M), I = L + M, E = I - C, P = L - M, S = c(T * E), w = c(I * P), A = c(T * P), $ = c(E * I);
|
|
1900
|
+
return new y(S, w, $, A);
|
|
1901
1901
|
}
|
|
1902
1902
|
// Fast algo for adding 2 Extended Points.
|
|
1903
1903
|
// https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd
|
|
1904
1904
|
// Cost: 9M + 1*a + 1*d + 7add.
|
|
1905
1905
|
add(m) {
|
|
1906
1906
|
u(m);
|
|
1907
|
-
const { a: x, d: v } = s, { X: b, Y: k, Z: M, T: C } = this, { X: L, Y: _, Z:
|
|
1907
|
+
const { a: x, d: v } = s, { X: b, Y: k, Z: M, T: C } = this, { X: L, Y: _, Z: T, T: I } = m, E = c(b * L), P = c(k * _), S = c(C * v * I), w = c(M * T), A = c((b + k) * (L + _) - E - P), $ = w - S, R = w + S, F = c(P - x * E), D = c(A * $), z = c(R * F), B = c(A * F), H = c($ * R);
|
|
1908
1908
|
return new y(D, z, H, B);
|
|
1909
1909
|
}
|
|
1910
1910
|
subtract(m) {
|
|
@@ -1925,7 +1925,7 @@ function qg(n, t = {}) {
|
|
|
1925
1925
|
multiplyUnsafe(m) {
|
|
1926
1926
|
if (!o.isValid(m))
|
|
1927
1927
|
throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");
|
|
1928
|
-
return m === qn ? y.ZERO : this.is0() || m ===
|
|
1928
|
+
return m === qn ? y.ZERO : this.is0() || m === he ? this : p.unsafe(this, m, (x) => Ds(y, x));
|
|
1929
1929
|
}
|
|
1930
1930
|
// Checks if point is of small order.
|
|
1931
1931
|
// If you add something to small order point, you will have "dirty"
|
|
@@ -1946,19 +1946,19 @@ function qg(n, t = {}) {
|
|
|
1946
1946
|
let v = m;
|
|
1947
1947
|
const { X: b, Y: k, Z: M } = x, C = x.is0();
|
|
1948
1948
|
v == null && (v = C ? Xg : r.inv(M));
|
|
1949
|
-
const L = c(b * v), _ = c(k * v),
|
|
1949
|
+
const L = c(b * v), _ = c(k * v), T = r.mul(M, v);
|
|
1950
1950
|
if (C)
|
|
1951
|
-
return { x: qn, y:
|
|
1952
|
-
if (
|
|
1951
|
+
return { x: qn, y: he };
|
|
1952
|
+
if (T !== he)
|
|
1953
1953
|
throw new Error("invZ was invalid");
|
|
1954
1954
|
return { x: L, y: _ };
|
|
1955
1955
|
}
|
|
1956
1956
|
clearCofactor() {
|
|
1957
|
-
return a ===
|
|
1957
|
+
return a === he ? this : this.multiplyUnsafe(a);
|
|
1958
1958
|
}
|
|
1959
1959
|
toBytes() {
|
|
1960
1960
|
const { x: m, y: x } = this.toAffine(), v = r.toBytes(x);
|
|
1961
|
-
return v[v.length - 1] |= m &
|
|
1961
|
+
return v[v.length - 1] |= m & he ? 128 : 0, v;
|
|
1962
1962
|
}
|
|
1963
1963
|
toHex() {
|
|
1964
1964
|
return pf(this.toBytes());
|
|
@@ -1968,8 +1968,8 @@ function qg(n, t = {}) {
|
|
|
1968
1968
|
}
|
|
1969
1969
|
};
|
|
1970
1970
|
// base / generator point
|
|
1971
|
-
xt(y, "BASE", new y(s.Gx, s.Gy,
|
|
1972
|
-
xt(y, "ZERO", new y(qn,
|
|
1971
|
+
xt(y, "BASE", new y(s.Gx, s.Gy, he, c(s.Gx * s.Gy))), // zero / infinity / identity point
|
|
1972
|
+
xt(y, "ZERO", new y(qn, he, he, qn)), // 0, 1, 1, 0
|
|
1973
1973
|
// math field
|
|
1974
1974
|
xt(y, "Fp", r), // scalar field
|
|
1975
1975
|
xt(y, "Fn", o);
|
|
@@ -2077,12 +2077,12 @@ function jg(n, t, e = {}) {
|
|
|
2077
2077
|
function y(E) {
|
|
2078
2078
|
const P = C.secretKey;
|
|
2079
2079
|
$e(E, C.secretKey, "secretKey");
|
|
2080
|
-
const S = $e(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P),
|
|
2081
|
-
return { head: w, prefix: A, scalar:
|
|
2080
|
+
const S = $e(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P), $ = p(w);
|
|
2081
|
+
return { head: w, prefix: A, scalar: $ };
|
|
2082
2082
|
}
|
|
2083
2083
|
function g(E) {
|
|
2084
|
-
const { head: P, prefix: S, scalar: w } = y(E), A = s.multiply(w),
|
|
2085
|
-
return { head: P, prefix: S, scalar: w, point: A, pointBytes:
|
|
2084
|
+
const { head: P, prefix: S, scalar: w } = y(E), A = s.multiply(w), $ = A.toBytes();
|
|
2085
|
+
return { head: P, prefix: S, scalar: w, point: A, pointBytes: $ };
|
|
2086
2086
|
}
|
|
2087
2087
|
function m(E) {
|
|
2088
2088
|
return g(E).pointBytes;
|
|
@@ -2093,7 +2093,7 @@ function jg(n, t, e = {}) {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
function v(E, P, S = {}) {
|
|
2095
2095
|
E = $e(E, void 0, "message"), o && (E = o(E));
|
|
2096
|
-
const { prefix: w, scalar: A, pointBytes:
|
|
2096
|
+
const { prefix: w, scalar: A, pointBytes: $ } = g(P), R = x(S.context, w, E), F = s.multiply(R).toBytes(), D = x(S.context, F, $, E), z = l.create(R + D * A);
|
|
2097
2097
|
if (!l.isValid(z))
|
|
2098
2098
|
throw new Error("sign failed: invalid s");
|
|
2099
2099
|
const B = Ol(F, l.toBytes(z));
|
|
@@ -2103,16 +2103,16 @@ function jg(n, t, e = {}) {
|
|
|
2103
2103
|
zip215: r.zip215
|
|
2104
2104
|
};
|
|
2105
2105
|
function k(E, P, S, w = b) {
|
|
2106
|
-
const { context: A } = w,
|
|
2107
|
-
E = $e(E, R, "signature"), P = $e(P, void 0, "message"), S = $e(S, C.publicKey, "publicKey"),
|
|
2106
|
+
const { context: A } = w, $ = w.zip215 === void 0 ? !!b.zip215 : w.zip215, R = C.signature;
|
|
2107
|
+
E = $e(E, R, "signature"), P = $e(P, void 0, "message"), S = $e(S, C.publicKey, "publicKey"), $ !== void 0 && Do($, "zip215"), o && (P = o(P));
|
|
2108
2108
|
const F = R / 2, D = E.subarray(0, F), z = zr(E.subarray(F, R));
|
|
2109
2109
|
let B, H, J;
|
|
2110
2110
|
try {
|
|
2111
|
-
B = n.fromBytes(S,
|
|
2111
|
+
B = n.fromBytes(S, $), H = n.fromBytes(D, $), J = s.multiplyUnsafe(z);
|
|
2112
2112
|
} catch {
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
}
|
|
2115
|
-
if (
|
|
2115
|
+
if (!$ && B.isSmallOrder())
|
|
2116
2116
|
return !1;
|
|
2117
2117
|
const X = x(A, D, S, P);
|
|
2118
2118
|
return H.add(B.multiplyUnsafe(X)).subtract(J).clearCofactor().is0();
|
|
@@ -2129,7 +2129,7 @@ function jg(n, t, e = {}) {
|
|
|
2129
2129
|
function _(E) {
|
|
2130
2130
|
return Sg(E) && E.length === C.secretKey;
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function T(E, P) {
|
|
2133
2133
|
try {
|
|
2134
2134
|
return !!n.fromBytes(E, P === void 0 ? b.zip215 : P);
|
|
2135
2135
|
} catch {
|
|
@@ -2140,7 +2140,7 @@ function jg(n, t, e = {}) {
|
|
|
2140
2140
|
getExtendedPublicKey: g,
|
|
2141
2141
|
randomSecretKey: L,
|
|
2142
2142
|
isValidSecretKey: _,
|
|
2143
|
-
isValidPublicKey:
|
|
2143
|
+
isValidPublicKey: T,
|
|
2144
2144
|
/**
|
|
2145
2145
|
* Converts ed public key to x public key. Uses formula:
|
|
2146
2146
|
* - ed25519:
|
|
@@ -2154,7 +2154,7 @@ function jg(n, t, e = {}) {
|
|
|
2154
2154
|
const { y: P } = n.fromBytes(E), S = C.publicKey, w = S === 32;
|
|
2155
2155
|
if (!w && S !== 57)
|
|
2156
2156
|
throw new Error("only defined for 25519 and 448");
|
|
2157
|
-
const A = w ? a.div(
|
|
2157
|
+
const A = w ? a.div(he + P, he - P) : a.div(P - he, P + he);
|
|
2158
2158
|
return a.toBytes(A);
|
|
2159
2159
|
},
|
|
2160
2160
|
toMontgomerySecret(E) {
|
|
@@ -2185,8 +2185,8 @@ const Zg = /* @__PURE__ */ BigInt(0), Cr = /* @__PURE__ */ BigInt(1), jl = /* @_
|
|
|
2185
2185
|
Gy: BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")
|
|
2186
2186
|
};
|
|
2187
2187
|
function Qg(n) {
|
|
2188
|
-
const t = BigInt(10), e = BigInt(20), i = BigInt(40), r = BigInt(80), o = Br, a = n * n % o * n % o, l =
|
|
2189
|
-
return { pow_p_5_8:
|
|
2188
|
+
const t = BigInt(10), e = BigInt(20), i = BigInt(40), r = BigInt(80), o = Br, a = n * n % o * n % o, l = bn(a, jl, o) * a % o, c = bn(l, Cr, o) * n % o, h = bn(c, Kg, o) * c % o, f = bn(h, t, o) * h % o, u = bn(f, e, o) * f % o, d = bn(u, i, o) * u % o, p = bn(d, r, o) * d % o, y = bn(p, r, o) * d % o, g = bn(y, t, o) * h % o;
|
|
2189
|
+
return { pow_p_5_8: bn(g, jl, o) * n % o, b2: a };
|
|
2190
2190
|
}
|
|
2191
2191
|
function t0(n) {
|
|
2192
2192
|
return n[0] &= 248, n[31] &= 127, n[31] |= 64, n;
|
|
@@ -2574,7 +2574,7 @@ function w0(n) {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
let Bo = {};
|
|
2576
2576
|
function nh(n) {
|
|
2577
|
-
Bo =
|
|
2577
|
+
Bo = ue(Bo, n);
|
|
2578
2578
|
}
|
|
2579
2579
|
function k0() {
|
|
2580
2580
|
return Bo;
|
|
@@ -2593,8 +2593,8 @@ const jn = class jn {
|
|
|
2593
2593
|
* directly still wins over it.
|
|
2594
2594
|
*/
|
|
2595
2595
|
mergeWithDefaults(t, e) {
|
|
2596
|
-
return
|
|
2597
|
-
|
|
2596
|
+
return ue(
|
|
2597
|
+
ue({}, Fs),
|
|
2598
2598
|
Bo,
|
|
2599
2599
|
e ?? {},
|
|
2600
2600
|
t
|
|
@@ -2603,7 +2603,7 @@ const jn = class jn {
|
|
|
2603
2603
|
normalize(t) {
|
|
2604
2604
|
var c, h, f;
|
|
2605
2605
|
const e = { ...t };
|
|
2606
|
-
e.xAxis && !Array.isArray(e.xAxis) && (e.xAxis = [e.xAxis]), e.yAxis && !Array.isArray(e.yAxis) && (e.yAxis = [e.yAxis]), e.colorAxis && !Array.isArray(e.colorAxis) && (e.colorAxis = [e.colorAxis]), (!e.xAxis || Array.isArray(e.xAxis) && e.xAxis.length === 0) && (e.xAxis = [
|
|
2606
|
+
e.xAxis && !Array.isArray(e.xAxis) && (e.xAxis = [e.xAxis]), e.yAxis && !Array.isArray(e.yAxis) && (e.yAxis = [e.yAxis]), e.colorAxis && !Array.isArray(e.colorAxis) && (e.colorAxis = [e.colorAxis]), (!e.xAxis || Array.isArray(e.xAxis) && e.xAxis.length === 0) && (e.xAxis = [ue({}, Fs.xAxis)]), (!e.yAxis || Array.isArray(e.yAxis) && e.yAxis.length === 0) && (e.yAxis = [ue({}, Fs.yAxis)]);
|
|
2607
2607
|
for (const u of [e.xAxis, e.yAxis])
|
|
2608
2608
|
if (Array.isArray(u))
|
|
2609
2609
|
for (const d of u)
|
|
@@ -2693,7 +2693,7 @@ const jn = class jn {
|
|
|
2693
2693
|
const i = Array.isArray(t) ? t : [t], r = Array.isArray(e) ? e : [e], o = Math.max(i.length, r.length), s = [];
|
|
2694
2694
|
for (let a = 0; a < o; a++) {
|
|
2695
2695
|
const l = i[a] ?? i[0] ?? {}, c = r[a] ?? r[0] ?? {};
|
|
2696
|
-
s.push(
|
|
2696
|
+
s.push(ue({}, l, c));
|
|
2697
2697
|
}
|
|
2698
2698
|
return s.length === 1 && !Array.isArray(t) && !Array.isArray(e) ? s[0] : s;
|
|
2699
2699
|
}
|
|
@@ -2703,7 +2703,7 @@ const jn = class jn {
|
|
|
2703
2703
|
const o = i.series || {}, s = i[r.type] || {}, a = r._polarSubType, l = a ? i[a] || {} : {}, c = jn.mergeDataLabels(
|
|
2704
2704
|
[o, l, s, r].map((h) => h.dataLabels)
|
|
2705
2705
|
);
|
|
2706
|
-
r =
|
|
2706
|
+
r = ue({}, o, l, s, r), c !== void 0 && (r.dataLabels = c);
|
|
2707
2707
|
}
|
|
2708
2708
|
if (Array.isArray(r.data)) {
|
|
2709
2709
|
const o = r.turboThreshold ?? 1e3;
|
|
@@ -3570,7 +3570,7 @@ class ry {
|
|
|
3570
3570
|
return this.config;
|
|
3571
3571
|
}
|
|
3572
3572
|
updateConfig(t) {
|
|
3573
|
-
this.config =
|
|
3573
|
+
this.config = ue(this.config, t), this.events.emit("state:configChanged", this.config);
|
|
3574
3574
|
}
|
|
3575
3575
|
getSeries() {
|
|
3576
3576
|
return this.config.series;
|
|
@@ -3590,7 +3590,7 @@ class ry {
|
|
|
3590
3590
|
}
|
|
3591
3591
|
updateSeries(t, e) {
|
|
3592
3592
|
const i = this.config.series[t];
|
|
3593
|
-
i && (this.config.series[t] =
|
|
3593
|
+
i && (this.config.series[t] = ue(i, e), this.events.emit("state:seriesUpdated", this.config.series[t], t));
|
|
3594
3594
|
}
|
|
3595
3595
|
getXAxes() {
|
|
3596
3596
|
return this.config.xAxis;
|
|
@@ -3600,7 +3600,7 @@ class ry {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
updateAxis(t, e, i) {
|
|
3602
3602
|
const r = t ? this.config.xAxis : this.config.yAxis;
|
|
3603
|
-
r[e] && (r[e] =
|
|
3603
|
+
r[e] && (r[e] = ue(r[e], i), this.events.emit("state:axisUpdated", { isX: t, index: e, config: r[e] }));
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
3606
|
class oy {
|
|
@@ -3650,10 +3650,10 @@ class cy {
|
|
|
3650
3650
|
const it = t.navigator;
|
|
3651
3651
|
s += (it.height ?? 40) + (it.margin ?? 20);
|
|
3652
3652
|
}
|
|
3653
|
-
const C = this.isNonCartesian(t), _ = !!t.chart.inverted ? { ...t, xAxis: t.yAxis, yAxis: t.xAxis } : t,
|
|
3653
|
+
const C = this.isNonCartesian(t), _ = !!t.chart.inverted ? { ...t, xAxis: t.yAxis, yAxis: t.xAxis } : t, T = C ? 0 : this.estimateAxisWidth(_, !0, i, e), I = C ? 0 : this.estimateAxisWidth(_, !1, i, e), E = C ? 0 : this.estimateAxisHeight(_);
|
|
3654
3654
|
let P = 0;
|
|
3655
3655
|
y && ((Y = t.colorAxis) == null ? void 0 : Y.length) > 0 && ((O = t.legend) == null ? void 0 : O.layout) === "vertical" && (P = 55);
|
|
3656
|
-
const S = a +
|
|
3656
|
+
const S = a + T + k, w = o, A = Math.max(0, e - a - l - T - I - P - k - M), $ = ((ct = t.chart) == null ? void 0 : ct.marginBottom) !== void 0, R = Math.max(0, i - o - s - ($ ? 0 : E));
|
|
3657
3657
|
return {
|
|
3658
3658
|
plotArea: { x: S, y: w, width: A, height: R },
|
|
3659
3659
|
titleArea: {
|
|
@@ -3699,7 +3699,7 @@ class cy {
|
|
|
3699
3699
|
left: a[3] ?? 10
|
|
3700
3700
|
};
|
|
3701
3701
|
}
|
|
3702
|
-
const i = e.spacing || [10, 10, 15, 10], o = ((s = t.exporting) == null ? void 0 : s.enabled) !== !1 ? 40 : i[1] ?? 10;
|
|
3702
|
+
const i = e.spacing || [10, 10, 15, 10], o = ((s = t.exporting) == null ? void 0 : s.enabled) !== !1 && !this.isNonCartesian(t) ? 40 : i[1] ?? 10;
|
|
3703
3703
|
return {
|
|
3704
3704
|
top: e.marginTop ?? e.spacingTop ?? i[0],
|
|
3705
3705
|
right: e.marginRight ?? e.spacingRight ?? o,
|
|
@@ -3785,15 +3785,15 @@ class cy {
|
|
|
3785
3785
|
const F = g + m + P + 8;
|
|
3786
3786
|
w = Math.max(1, Math.floor(b / F)), S = b / w;
|
|
3787
3787
|
}
|
|
3788
|
-
const
|
|
3789
|
-
return (R ? Math.min(
|
|
3788
|
+
const $ = Math.ceil(r / w) * d + y * 2, R = t.legend.maxHeight;
|
|
3789
|
+
return (R ? Math.min($, R) : $) + o;
|
|
3790
3790
|
}
|
|
3791
|
-
let _ = y,
|
|
3791
|
+
let _ = y, T = 1;
|
|
3792
3792
|
for (let P = 0; P < r; P++) {
|
|
3793
3793
|
const S = t.legend.itemWidth || tn(M[P], k), w = g + m + S;
|
|
3794
|
-
P > 0 && _ + w > b && (
|
|
3794
|
+
P > 0 && _ + w > b && (T++, _ = y), _ += w + x;
|
|
3795
3795
|
}
|
|
3796
|
-
const I =
|
|
3796
|
+
const I = T * d + y * 2, E = t.legend.maxHeight;
|
|
3797
3797
|
return (E ? Math.min(I, E) : I) + o;
|
|
3798
3798
|
}
|
|
3799
3799
|
return r * d + (t.legend.padding ?? 8) * 2 + o;
|
|
@@ -4301,10 +4301,10 @@ const Vy = function n(t, e, i) {
|
|
|
4301
4301
|
else {
|
|
4302
4302
|
var x = Math.sqrt(y), v = (u * u - c * c + i * y) / (2 * c * e * x), b = (u * u - c * c - i * y) / (2 * u * e * x), k = Math.log(Math.sqrt(v * v + 1) - v), M = Math.log(Math.sqrt(b * b + 1) - b);
|
|
4303
4303
|
m = (M - k) / t, g = function(C) {
|
|
4304
|
-
var L = C * m, _ = lh(k),
|
|
4304
|
+
var L = C * m, _ = lh(k), T = c / (e * x) * (_ * Hy(t * L + k) - Wy(k));
|
|
4305
4305
|
return [
|
|
4306
|
-
a +
|
|
4307
|
-
l +
|
|
4306
|
+
a + T * d,
|
|
4307
|
+
l + T * p,
|
|
4308
4308
|
c * _ / lh(t * L + k)
|
|
4309
4309
|
];
|
|
4310
4310
|
};
|
|
@@ -4493,19 +4493,19 @@ function ex(n) {
|
|
|
4493
4493
|
f = Or(f);
|
|
4494
4494
|
var d = f.fill, p = f.align, y = f.sign, g = f.symbol, m = f.zero, x = f.width, v = f.comma, b = f.precision, k = f.trim, M = f.type;
|
|
4495
4495
|
M === "n" ? (v = !0, M = "g") : fh[M] || (b === void 0 && (b = 12), k = !0, M = "g"), (m || d === "0" && p === "=") && (m = !0, d = "0", p = "=");
|
|
4496
|
-
var C = (u && u.prefix !== void 0 ? u.prefix : "") + (g === "$" ? e : g === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : ""), L = (g === "$" ? i : /[%p]/.test(M) ? s : "") + (u && u.suffix !== void 0 ? u.suffix : ""), _ = fh[M],
|
|
4496
|
+
var C = (u && u.prefix !== void 0 ? u.prefix : "") + (g === "$" ? e : g === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : ""), L = (g === "$" ? i : /[%p]/.test(M) ? s : "") + (u && u.suffix !== void 0 ? u.suffix : ""), _ = fh[M], T = /[defgprs%]/.test(M);
|
|
4497
4497
|
b = b === void 0 ? 6 : /[gprs]/.test(M) ? Math.max(1, Math.min(21, b)) : Math.max(0, Math.min(20, b));
|
|
4498
4498
|
function I(E) {
|
|
4499
|
-
var P = C, S = L, w, A,
|
|
4499
|
+
var P = C, S = L, w, A, $;
|
|
4500
4500
|
if (M === "c")
|
|
4501
4501
|
S = _(E) + S, E = "";
|
|
4502
4502
|
else {
|
|
4503
4503
|
E = +E;
|
|
4504
4504
|
var R = E < 0 || 1 / E < 0;
|
|
4505
|
-
if (E = isNaN(E) ? l : _(Math.abs(E), b), k && (E = Qy(E)), R && +E == 0 && y !== "+" && (R = !1), P = (R ? y === "(" ? y : a : y === "-" || y === "(" ? "" : y) + P, S = (M === "s" && !isNaN(E) && Ho !== void 0 ? gh[8 + Ho / 3] : "") + S + (R && y === "(" ? ")" : ""),
|
|
4505
|
+
if (E = isNaN(E) ? l : _(Math.abs(E), b), k && (E = Qy(E)), R && +E == 0 && y !== "+" && (R = !1), P = (R ? y === "(" ? y : a : y === "-" || y === "(" ? "" : y) + P, S = (M === "s" && !isNaN(E) && Ho !== void 0 ? gh[8 + Ho / 3] : "") + S + (R && y === "(" ? ")" : ""), T) {
|
|
4506
4506
|
for (w = -1, A = E.length; ++w < A; )
|
|
4507
|
-
if (
|
|
4508
|
-
S = (
|
|
4507
|
+
if ($ = E.charCodeAt(w), 48 > $ || $ > 57) {
|
|
4508
|
+
S = ($ === 46 ? r + E.slice(w + 1) : E.slice(w)) + S, E = E.slice(0, w);
|
|
4509
4509
|
break;
|
|
4510
4510
|
}
|
|
4511
4511
|
}
|
|
@@ -4932,7 +4932,7 @@ function cr(n, t, e) {
|
|
|
4932
4932
|
}
|
|
4933
4933
|
function Ex(n) {
|
|
4934
4934
|
var t = n.dateTime, e = n.date, i = n.time, r = n.periods, o = n.days, s = n.shortDays, a = n.months, l = n.shortMonths, c = lr(r), h = hr(r), f = lr(o), u = hr(o), d = lr(s), p = hr(s), y = lr(a), g = hr(a), m = lr(l), x = hr(l), v = {
|
|
4935
|
-
a:
|
|
4935
|
+
a: $,
|
|
4936
4936
|
A: R,
|
|
4937
4937
|
b: F,
|
|
4938
4938
|
B: D,
|
|
@@ -4998,7 +4998,7 @@ function Ex(n) {
|
|
|
4998
4998
|
Z: P1,
|
|
4999
4999
|
"%": Ph
|
|
5000
5000
|
}, k = {
|
|
5001
|
-
a:
|
|
5001
|
+
a: T,
|
|
5002
5002
|
A: I,
|
|
5003
5003
|
b: E,
|
|
5004
5004
|
B: P,
|
|
@@ -5067,7 +5067,7 @@ function Ex(n) {
|
|
|
5067
5067
|
var O = c.exec(N.slice(Y));
|
|
5068
5068
|
return O ? (G.p = h.get(O[0].toLowerCase()), Y + O[0].length) : -1;
|
|
5069
5069
|
}
|
|
5070
|
-
function
|
|
5070
|
+
function T(G, N, Y) {
|
|
5071
5071
|
var O = d.exec(N.slice(Y));
|
|
5072
5072
|
return O ? (G.w = p.get(O[0].toLowerCase()), Y + O[0].length) : -1;
|
|
5073
5073
|
}
|
|
@@ -5092,7 +5092,7 @@ function Ex(n) {
|
|
|
5092
5092
|
function A(G, N, Y) {
|
|
5093
5093
|
return L(G, i, N, Y);
|
|
5094
5094
|
}
|
|
5095
|
-
function
|
|
5095
|
+
function $(G) {
|
|
5096
5096
|
return s[G.getDay()];
|
|
5097
5097
|
}
|
|
5098
5098
|
function R(G) {
|
|
@@ -5155,7 +5155,7 @@ function Ex(n) {
|
|
|
5155
5155
|
}
|
|
5156
5156
|
};
|
|
5157
5157
|
}
|
|
5158
|
-
var wh = { "-": "", _: " ", 0: "0" },
|
|
5158
|
+
var wh = { "-": "", _: " ", 0: "0" }, de = /^\s*\d+/, Tx = /^%/, $x = /[\\^$*+?|[\]().{}]/g;
|
|
5159
5159
|
function Yt(n, t, e) {
|
|
5160
5160
|
var i = n < 0 ? "-" : "", r = (i ? -n : n) + "", o = r.length;
|
|
5161
5161
|
return i + (o < e ? new Array(e - o + 1).join(t) + r : r);
|
|
@@ -5170,31 +5170,31 @@ function hr(n) {
|
|
|
5170
5170
|
return new Map(n.map((t, e) => [t.toLowerCase(), e]));
|
|
5171
5171
|
}
|
|
5172
5172
|
function Ix(n, t, e) {
|
|
5173
|
-
var i =
|
|
5173
|
+
var i = de.exec(t.slice(e, e + 1));
|
|
5174
5174
|
return i ? (n.w = +i[0], e + i[0].length) : -1;
|
|
5175
5175
|
}
|
|
5176
5176
|
function Fx(n, t, e) {
|
|
5177
|
-
var i =
|
|
5177
|
+
var i = de.exec(t.slice(e, e + 1));
|
|
5178
5178
|
return i ? (n.u = +i[0], e + i[0].length) : -1;
|
|
5179
5179
|
}
|
|
5180
5180
|
function Rx(n, t, e) {
|
|
5181
|
-
var i =
|
|
5181
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5182
5182
|
return i ? (n.U = +i[0], e + i[0].length) : -1;
|
|
5183
5183
|
}
|
|
5184
5184
|
function Dx(n, t, e) {
|
|
5185
|
-
var i =
|
|
5185
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5186
5186
|
return i ? (n.V = +i[0], e + i[0].length) : -1;
|
|
5187
5187
|
}
|
|
5188
5188
|
function zx(n, t, e) {
|
|
5189
|
-
var i =
|
|
5189
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5190
5190
|
return i ? (n.W = +i[0], e + i[0].length) : -1;
|
|
5191
5191
|
}
|
|
5192
5192
|
function kh(n, t, e) {
|
|
5193
|
-
var i =
|
|
5193
|
+
var i = de.exec(t.slice(e, e + 4));
|
|
5194
5194
|
return i ? (n.y = +i[0], e + i[0].length) : -1;
|
|
5195
5195
|
}
|
|
5196
5196
|
function Mh(n, t, e) {
|
|
5197
|
-
var i =
|
|
5197
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5198
5198
|
return i ? (n.y = +i[0] + (+i[0] > 68 ? 1900 : 2e3), e + i[0].length) : -1;
|
|
5199
5199
|
}
|
|
5200
5200
|
function Bx(n, t, e) {
|
|
@@ -5202,39 +5202,39 @@ function Bx(n, t, e) {
|
|
|
5202
5202
|
return i ? (n.Z = i[1] ? 0 : -(i[2] + (i[3] || "00")), e + i[0].length) : -1;
|
|
5203
5203
|
}
|
|
5204
5204
|
function Ox(n, t, e) {
|
|
5205
|
-
var i =
|
|
5205
|
+
var i = de.exec(t.slice(e, e + 1));
|
|
5206
5206
|
return i ? (n.q = i[0] * 3 - 3, e + i[0].length) : -1;
|
|
5207
5207
|
}
|
|
5208
5208
|
function Nx(n, t, e) {
|
|
5209
|
-
var i =
|
|
5209
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5210
5210
|
return i ? (n.m = i[0] - 1, e + i[0].length) : -1;
|
|
5211
5211
|
}
|
|
5212
5212
|
function Ah(n, t, e) {
|
|
5213
|
-
var i =
|
|
5213
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5214
5214
|
return i ? (n.d = +i[0], e + i[0].length) : -1;
|
|
5215
5215
|
}
|
|
5216
5216
|
function Wx(n, t, e) {
|
|
5217
|
-
var i =
|
|
5217
|
+
var i = de.exec(t.slice(e, e + 3));
|
|
5218
5218
|
return i ? (n.m = 0, n.d = +i[0], e + i[0].length) : -1;
|
|
5219
5219
|
}
|
|
5220
5220
|
function Sh(n, t, e) {
|
|
5221
|
-
var i =
|
|
5221
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5222
5222
|
return i ? (n.H = +i[0], e + i[0].length) : -1;
|
|
5223
5223
|
}
|
|
5224
5224
|
function Hx(n, t, e) {
|
|
5225
|
-
var i =
|
|
5225
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5226
5226
|
return i ? (n.M = +i[0], e + i[0].length) : -1;
|
|
5227
5227
|
}
|
|
5228
5228
|
function Vx(n, t, e) {
|
|
5229
|
-
var i =
|
|
5229
|
+
var i = de.exec(t.slice(e, e + 2));
|
|
5230
5230
|
return i ? (n.S = +i[0], e + i[0].length) : -1;
|
|
5231
5231
|
}
|
|
5232
5232
|
function Gx(n, t, e) {
|
|
5233
|
-
var i =
|
|
5233
|
+
var i = de.exec(t.slice(e, e + 3));
|
|
5234
5234
|
return i ? (n.L = +i[0], e + i[0].length) : -1;
|
|
5235
5235
|
}
|
|
5236
5236
|
function Yx(n, t, e) {
|
|
5237
|
-
var i =
|
|
5237
|
+
var i = de.exec(t.slice(e, e + 6));
|
|
5238
5238
|
return i ? (n.L = Math.floor(i[0] / 1e3), e + i[0].length) : -1;
|
|
5239
5239
|
}
|
|
5240
5240
|
function Xx(n, t, e) {
|
|
@@ -5242,11 +5242,11 @@ function Xx(n, t, e) {
|
|
|
5242
5242
|
return i ? e + i[0].length : -1;
|
|
5243
5243
|
}
|
|
5244
5244
|
function Ux(n, t, e) {
|
|
5245
|
-
var i =
|
|
5245
|
+
var i = de.exec(t.slice(e));
|
|
5246
5246
|
return i ? (n.Q = +i[0], e + i[0].length) : -1;
|
|
5247
5247
|
}
|
|
5248
5248
|
function qx(n, t, e) {
|
|
5249
|
-
var i =
|
|
5249
|
+
var i = de.exec(t.slice(e));
|
|
5250
5250
|
return i ? (n.s = +i[0], e + i[0].length) : -1;
|
|
5251
5251
|
}
|
|
5252
5252
|
function _h(n, t) {
|
|
@@ -5487,15 +5487,15 @@ function W1() {
|
|
|
5487
5487
|
function bs(n, t) {
|
|
5488
5488
|
var e = [], i = null, r = null, o = 6, s = 6, a = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, c = n === vo || n === xr ? -1 : 1, h = n === xr || n === wo ? "x" : "y", f = n === vo || n === za ? z1 : B1;
|
|
5489
5489
|
function u(d) {
|
|
5490
|
-
var p = i ?? (t.ticks ? t.ticks.apply(t, e) : t.domain()), y = r ?? (t.tickFormat ? t.tickFormat.apply(t, e) : D1), g = Math.max(o, 0) + a, m = t.range(), x = +m[0] + l, v = +m[m.length - 1] + l, b = (t.bandwidth ? N1 : O1)(t.copy(), l), k = d.selection ? d.selection() : d, M = k.selectAll(".domain").data([null]), C = k.selectAll(".tick").data(p, t).order(), L = C.exit(), _ = C.enter().append("g").attr("class", "tick"),
|
|
5491
|
-
M = M.merge(M.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), C = C.merge(_),
|
|
5490
|
+
var p = i ?? (t.ticks ? t.ticks.apply(t, e) : t.domain()), y = r ?? (t.tickFormat ? t.tickFormat.apply(t, e) : D1), g = Math.max(o, 0) + a, m = t.range(), x = +m[0] + l, v = +m[m.length - 1] + l, b = (t.bandwidth ? N1 : O1)(t.copy(), l), k = d.selection ? d.selection() : d, M = k.selectAll(".domain").data([null]), C = k.selectAll(".tick").data(p, t).order(), L = C.exit(), _ = C.enter().append("g").attr("class", "tick"), T = C.select("line"), I = C.select("text");
|
|
5491
|
+
M = M.merge(M.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), C = C.merge(_), T = T.merge(_.append("line").attr("stroke", "currentColor").attr(h + "2", c * o)), I = I.merge(_.append("text").attr("fill", "currentColor").attr(h, c * g).attr("dy", n === vo ? "0em" : n === za ? "0.71em" : "0.32em")), d !== k && (M = M.transition(d), C = C.transition(d), T = T.transition(d), I = I.transition(d), L = L.transition(d).attr("opacity", $h).attr("transform", function(E) {
|
|
5492
5492
|
return isFinite(E = b(E)) ? f(E + l) : this.getAttribute("transform");
|
|
5493
5493
|
}), _.attr("opacity", $h).attr("transform", function(E) {
|
|
5494
5494
|
var P = this.parentNode.__axis;
|
|
5495
5495
|
return f((P && isFinite(P = P(E)) ? P : b(E)) + l);
|
|
5496
5496
|
})), L.remove(), M.attr("d", n === xr || n === wo ? s ? "M" + c * s + "," + x + "H" + l + "V" + v + "H" + c * s : "M" + l + "," + x + "V" + v : s ? "M" + x + "," + c * s + "V" + l + "H" + v + "V" + c * s : "M" + x + "," + l + "H" + v), C.attr("opacity", 1).attr("transform", function(E) {
|
|
5497
5497
|
return f(b(E) + l);
|
|
5498
|
-
}),
|
|
5498
|
+
}), T.attr(h + "2", c * o), I.attr(h, c * g).text(y), k.filter(W1).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", n === wo ? "start" : n === xr ? "end" : "middle"), k.each(function() {
|
|
5499
5499
|
this.__axis = b;
|
|
5500
5500
|
});
|
|
5501
5501
|
}
|
|
@@ -5682,7 +5682,7 @@ function Nc(n, t) {
|
|
|
5682
5682
|
if (e.state > ld) throw new Error("too late; already scheduled");
|
|
5683
5683
|
return e;
|
|
5684
5684
|
}
|
|
5685
|
-
function
|
|
5685
|
+
function An(n, t) {
|
|
5686
5686
|
var e = gn(n, t);
|
|
5687
5687
|
if (e.state > Mo) throw new Error("too late; already running");
|
|
5688
5688
|
return e;
|
|
@@ -5747,7 +5747,7 @@ function J1(n) {
|
|
|
5747
5747
|
function Q1(n, t) {
|
|
5748
5748
|
var e, i;
|
|
5749
5749
|
return function() {
|
|
5750
|
-
var r =
|
|
5750
|
+
var r = An(this, n), o = r.tween;
|
|
5751
5751
|
if (o !== e) {
|
|
5752
5752
|
i = e = o;
|
|
5753
5753
|
for (var s = 0, a = i.length; s < a; ++s)
|
|
@@ -5763,7 +5763,7 @@ function tb(n, t, e) {
|
|
|
5763
5763
|
var i, r;
|
|
5764
5764
|
if (typeof e != "function") throw new Error();
|
|
5765
5765
|
return function() {
|
|
5766
|
-
var o =
|
|
5766
|
+
var o = An(this, n), s = o.tween;
|
|
5767
5767
|
if (s !== i) {
|
|
5768
5768
|
r = (i = s).slice();
|
|
5769
5769
|
for (var a = { name: t, value: e }, l = 0, c = r.length; l < c; ++l)
|
|
@@ -5789,7 +5789,7 @@ function eb(n, t) {
|
|
|
5789
5789
|
function Wc(n, t, e) {
|
|
5790
5790
|
var i = n._id;
|
|
5791
5791
|
return n.each(function() {
|
|
5792
|
-
var r =
|
|
5792
|
+
var r = An(this, i);
|
|
5793
5793
|
(r.value || (r.value = {}))[t] = e.apply(this, arguments);
|
|
5794
5794
|
}), function(r) {
|
|
5795
5795
|
return gn(r, i).value[t];
|
|
@@ -5891,12 +5891,12 @@ function mb(n) {
|
|
|
5891
5891
|
}
|
|
5892
5892
|
function yb(n, t) {
|
|
5893
5893
|
return function() {
|
|
5894
|
-
|
|
5894
|
+
An(this, n).duration = +t.apply(this, arguments);
|
|
5895
5895
|
};
|
|
5896
5896
|
}
|
|
5897
5897
|
function xb(n, t) {
|
|
5898
5898
|
return t = +t, function() {
|
|
5899
|
-
|
|
5899
|
+
An(this, n).duration = t;
|
|
5900
5900
|
};
|
|
5901
5901
|
}
|
|
5902
5902
|
function bb(n) {
|
|
@@ -5906,7 +5906,7 @@ function bb(n) {
|
|
|
5906
5906
|
function vb(n, t) {
|
|
5907
5907
|
if (typeof t != "function") throw new Error();
|
|
5908
5908
|
return function() {
|
|
5909
|
-
|
|
5909
|
+
An(this, n).ease = t;
|
|
5910
5910
|
};
|
|
5911
5911
|
}
|
|
5912
5912
|
function wb(n) {
|
|
@@ -5917,7 +5917,7 @@ function kb(n, t) {
|
|
|
5917
5917
|
return function() {
|
|
5918
5918
|
var e = t.apply(this, arguments);
|
|
5919
5919
|
if (typeof e != "function") throw new Error();
|
|
5920
|
-
|
|
5920
|
+
An(this, n).ease = e;
|
|
5921
5921
|
};
|
|
5922
5922
|
}
|
|
5923
5923
|
function Mb(n) {
|
|
@@ -5947,7 +5947,7 @@ function _b(n) {
|
|
|
5947
5947
|
});
|
|
5948
5948
|
}
|
|
5949
5949
|
function Cb(n, t, e) {
|
|
5950
|
-
var i, r, o = _b(t) ? Nc :
|
|
5950
|
+
var i, r, o = _b(t) ? Nc : An;
|
|
5951
5951
|
return function() {
|
|
5952
5952
|
var s = o(this, n), a = s.on;
|
|
5953
5953
|
a !== i && (r = (i = a).copy()).on(t, e), s.on = r;
|
|
@@ -6020,7 +6020,7 @@ function zb(n, t, e) {
|
|
|
6020
6020
|
function Bb(n, t) {
|
|
6021
6021
|
var e, i, r, o = "style." + t, s = "end." + o, a;
|
|
6022
6022
|
return function() {
|
|
6023
|
-
var l =
|
|
6023
|
+
var l = An(this, n), c = l.on, h = l.value[o] == null ? a || (a = ud(t)) : void 0;
|
|
6024
6024
|
(c !== e || r !== h) && (i = (e = c).copy()).on(s, r = h), l.on = i;
|
|
6025
6025
|
};
|
|
6026
6026
|
}
|
|
@@ -6103,7 +6103,7 @@ function Zb() {
|
|
|
6103
6103
|
--r === 0 && o();
|
|
6104
6104
|
} };
|
|
6105
6105
|
e.each(function() {
|
|
6106
|
-
var c =
|
|
6106
|
+
var c = An(this, i), h = c.on;
|
|
6107
6107
|
h !== n && (t = (n = h).copy(), t._.cancel.push(a), t._.interrupt.push(a), t._.end.push(l)), c.on = t;
|
|
6108
6108
|
}), r === 0 && o();
|
|
6109
6109
|
});
|
|
@@ -6294,7 +6294,7 @@ function pd(n, t = "#333") {
|
|
|
6294
6294
|
return uv.test(e) ? e : t;
|
|
6295
6295
|
}
|
|
6296
6296
|
const fv = /<\/?[^>]+(>|$)/g, dv = /<br\s*\/?>/gi;
|
|
6297
|
-
function
|
|
6297
|
+
function fe(n) {
|
|
6298
6298
|
return n.replace(dv, " ").replace(fv, "").trim();
|
|
6299
6299
|
}
|
|
6300
6300
|
function Zs(n, t) {
|
|
@@ -6885,7 +6885,7 @@ class Gc {
|
|
|
6885
6885
|
x: l.x,
|
|
6886
6886
|
y: l.y,
|
|
6887
6887
|
percentage: l.percentage
|
|
6888
|
-
}) : i.format ? h =
|
|
6888
|
+
}) : i.format ? h = fe(Kt(i.format, {
|
|
6889
6889
|
point: l,
|
|
6890
6890
|
series: { name: s },
|
|
6891
6891
|
x: l.x,
|
|
@@ -7343,7 +7343,7 @@ class Yc {
|
|
|
7343
7343
|
index: t.config.index,
|
|
7344
7344
|
legendIndex: t.config.legendIndex
|
|
7345
7345
|
};
|
|
7346
|
-
i =
|
|
7346
|
+
i = fe(Kt(this.config.labelFormat, o));
|
|
7347
7347
|
} else
|
|
7348
7348
|
i = t.config.name || `Series ${t.config.index + 1}`;
|
|
7349
7349
|
if (this.config.valueSuffix && (i += ` ${this.config.valueSuffix}`), this.config.valueDecimals !== void 0 && this.config.valueDecimals >= 0) {
|
|
@@ -7384,29 +7384,29 @@ class Yc {
|
|
|
7384
7384
|
const ot = this.config.title.style || {};
|
|
7385
7385
|
this.group.append("text").attr("class", "katucharts-legend-title").attr("x", o).attr("y", o + 10).attr("font-size", ot.fontSize || Mt).attr("font-weight", ot.fontWeight || "bold").attr("fill", ot.color || "#333").text(this.config.title.text), k += 20;
|
|
7386
7386
|
}
|
|
7387
|
-
const C = k, L = m || e.width - o * 2, _ = y + p + d,
|
|
7387
|
+
const C = k, L = m || e.width - o * 2, _ = y + p + d, T = [];
|
|
7388
7388
|
for (const ot of i) {
|
|
7389
7389
|
const q = ot.getMultiLegendItems(), st = ["line", "spline", "area", "areaspline", "radar", "polar"].includes(ot.config._internalType);
|
|
7390
7390
|
if (q)
|
|
7391
7391
|
for (const wt of q)
|
|
7392
|
-
|
|
7392
|
+
T.push({ label: wt.label, color: wt.color, series: ot, isLine: st });
|
|
7393
7393
|
else
|
|
7394
|
-
|
|
7394
|
+
T.push({ label: this.resolveLabel(ot), color: ot.getColor(), series: ot, isLine: st });
|
|
7395
7395
|
}
|
|
7396
|
-
const I =
|
|
7396
|
+
const I = T.map((ot) => ot.label);
|
|
7397
7397
|
let E = 0;
|
|
7398
7398
|
if (r === "horizontal")
|
|
7399
7399
|
for (let ot = 0; ot < I.length; ot++) {
|
|
7400
7400
|
const q = s + l + this.estimateTextWidth(I[ot], v);
|
|
7401
7401
|
E += q + (ot < I.length - 1 ? f : 0);
|
|
7402
7402
|
}
|
|
7403
|
-
const P = r === "horizontal" &&
|
|
7403
|
+
const P = r === "horizontal" && T.length > 8 && E > L;
|
|
7404
7404
|
let S = 0, w = 0;
|
|
7405
7405
|
const A = 6;
|
|
7406
|
-
let
|
|
7406
|
+
let $ = 0, R = 0;
|
|
7407
7407
|
if (P) {
|
|
7408
7408
|
const ot = Yc.computeGridLayout(
|
|
7409
|
-
|
|
7409
|
+
T.length,
|
|
7410
7410
|
I,
|
|
7411
7411
|
L,
|
|
7412
7412
|
{
|
|
@@ -7418,15 +7418,15 @@ class Yc {
|
|
|
7418
7418
|
itemWidth: this.config.itemWidth
|
|
7419
7419
|
}
|
|
7420
7420
|
);
|
|
7421
|
-
S = ot.columns, w = ot.itemWidth, R = Math.ceil(
|
|
7421
|
+
S = ot.columns, w = ot.itemWidth, R = Math.ceil(T.length / S);
|
|
7422
7422
|
}
|
|
7423
7423
|
const F = [];
|
|
7424
|
-
|
|
7424
|
+
T.forEach((ot, q) => {
|
|
7425
7425
|
var ee;
|
|
7426
7426
|
const st = ot.series, wt = ot.color, Ct = ot.isLine, kt = ot.label;
|
|
7427
7427
|
let _t, Vt;
|
|
7428
7428
|
if (P) {
|
|
7429
|
-
const Tt = q % S, Zt = Math.floor(q / S),
|
|
7429
|
+
const Tt = q % S, Zt = Math.floor(q / S), ce = S * w, Ve = Math.max(0, (L - ce) / 2);
|
|
7430
7430
|
_t = o + Ve + Tt * w, Vt = C + Zt * _ + d;
|
|
7431
7431
|
} else if (r === "horizontal") {
|
|
7432
7432
|
const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Zt = s + l + Tt;
|
|
@@ -7439,19 +7439,19 @@ class Yc {
|
|
|
7439
7439
|
if (Ct)
|
|
7440
7440
|
Nt.append("line").attr("x1", 0).attr("x2", s).attr("y1", 6).attr("y2", 6).attr("stroke", wt).attr("stroke-width", 2), Nt.append("circle").attr("cx", s / 2).attr("cy", 6).attr("r", 3).attr("fill", wt);
|
|
7441
7441
|
else if (Ot) {
|
|
7442
|
-
const Tt = s / 2, Zt = a / 2,
|
|
7443
|
-
Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r",
|
|
7442
|
+
const Tt = s / 2, Zt = a / 2, ce = Math.min(s, a) / 2;
|
|
7443
|
+
Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r", ce).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${Zt} L ${Tt} ${a} L 0 ${Zt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${Tt} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Zt} L ${s} ${Zt} M ${Tt} 0 L ${Tt} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", Tt).attr("cy", Zt).attr("r", ce).attr("fill", wt);
|
|
7444
7444
|
} else h ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("rx", c).attr("fill", wt) : Nt.append("circle").attr("cx", s / 2).attr("cy", a / 2).attr("r", Math.min(s, a) / 2).attr("fill", wt);
|
|
7445
7445
|
const jt = Nt.append("text").attr("x", s + l).attr("y", 10).attr("fill", st.visible ? u.color || this.autoText() : ((ee = this.config.itemHiddenStyle) == null ? void 0 : ee.color) || "#cccccc").attr("font-size", v).attr("font-weight", u.fontWeight || "normal").text(kt);
|
|
7446
7446
|
this.config.rtl && (jt.attr("text-anchor", "end").attr("x", -l), Nt.select("rect, circle, line").attr("transform", `translate(${-(s + l)}, 0)`)), Nt.on("click", () => {
|
|
7447
|
-
var
|
|
7447
|
+
var ce, Ve, le;
|
|
7448
7448
|
const Tt = this.config.events;
|
|
7449
7449
|
if (Tt != null && Tt.itemClick && Tt.itemClick.call(st, new Event("legendItemClick")) === !1)
|
|
7450
7450
|
return;
|
|
7451
7451
|
st.toggleVisible(), jt.attr(
|
|
7452
7452
|
"fill",
|
|
7453
|
-
st.visible ? u.color || this.autoText() : ((
|
|
7454
|
-
), ((
|
|
7453
|
+
st.visible ? u.color || this.autoText() : ((ce = this.config.itemHiddenStyle) == null ? void 0 : ce.color) || "#cccccc"
|
|
7454
|
+
), ((le = (Ve = st.config.events) == null ? void 0 : Ve.legendItemClick) == null ? void 0 : le.call(st, new Event("legendItemClick"))) !== !1 && this.events.emit("legend:itemClick", st, q);
|
|
7455
7455
|
}), Nt.on("mouseover", () => {
|
|
7456
7456
|
var Tt;
|
|
7457
7457
|
jt.attr("fill", ((Tt = this.config.itemHoverStyle) == null ? void 0 : Tt.color) || this.autoText()), this.events.emit("legend:itemHover", st);
|
|
@@ -7467,10 +7467,10 @@ class Yc {
|
|
|
7467
7467
|
const J = (ft = this.config.bubbleLegend) != null && ft.enabled ? t.map((ot) => ot.getBubbleLegendInfo()).find((ot) => !!ot) : void 0;
|
|
7468
7468
|
if (J)
|
|
7469
7469
|
if (r === "horizontal" && ((dt = this.config.bubbleLegend) == null ? void 0 : dt.layout) === "separate") {
|
|
7470
|
-
H =
|
|
7470
|
+
H = T.length ? k + _ : C;
|
|
7471
7471
|
const q = this.renderBubbleLegend(J, 0, H);
|
|
7472
7472
|
D = q.width, z = q.height;
|
|
7473
|
-
const st =
|
|
7473
|
+
const st = T.length ? Math.max(0, M - o) : 0, wt = Math.max(st, D);
|
|
7474
7474
|
B = o + Math.max(0, (wt - D) / 2), this.group.select(".katucharts-bubble-legend").attr("transform", `translate(${B},0)`);
|
|
7475
7475
|
const Ct = Math.max(0, (wt - st) / 2);
|
|
7476
7476
|
if (Ct > 0)
|
|
@@ -7479,7 +7479,7 @@ class Yc {
|
|
|
7479
7479
|
_t && kt.attr("transform", `translate(${parseFloat(_t[1]) + Ct},${_t[2]})`);
|
|
7480
7480
|
}
|
|
7481
7481
|
} else {
|
|
7482
|
-
r === "horizontal" ? (B =
|
|
7482
|
+
r === "horizontal" ? (B = T.length ? M + f : o, H = C) : (B = o, H = T.length ? k + 6 : C);
|
|
7483
7483
|
const q = this.renderBubbleLegend(J, B, H);
|
|
7484
7484
|
D = q.width, z = q.height;
|
|
7485
7485
|
}
|
|
@@ -7513,9 +7513,9 @@ class Yc {
|
|
|
7513
7513
|
}), Vt.on("mouseout", function() {
|
|
7514
7514
|
Vt.select("rect").attr("fill", "#f0f0f0");
|
|
7515
7515
|
}), _t.on("click", () => {
|
|
7516
|
-
|
|
7516
|
+
$ > 0 && ($--, X($, !0), _t.style("opacity", $ === 0 ? "0.3" : "1"), Vt.style("opacity", $ >= q - 1 ? "0.3" : "1"));
|
|
7517
7517
|
}), Vt.on("click", () => {
|
|
7518
|
-
|
|
7518
|
+
$ < q - 1 && ($++, X($, !0), _t.style("opacity", $ === 0 ? "0.3" : "1"), Vt.style("opacity", $ >= q - 1 ? "0.3" : "1"));
|
|
7519
7519
|
});
|
|
7520
7520
|
}
|
|
7521
7521
|
} else r === "horizontal" ? (j = M + o, W = k + y + o) : (j = m || M + o || 150, W = k + y + o);
|
|
@@ -7567,15 +7567,15 @@ class Yc {
|
|
|
7567
7567
|
var b, k, M, C, L, _;
|
|
7568
7568
|
const r = this.config.bubbleLegend || {};
|
|
7569
7569
|
if (r.layout === "separate") return this.renderBubbleLegendSeparate(t, e, i);
|
|
7570
|
-
const o = [...t.ranges].sort((
|
|
7570
|
+
const o = [...t.ranges].sort((T, I) => I.radius - T.radius), s = o[0].radius;
|
|
7571
7571
|
if (!(s > 0)) return { width: 0, height: 0 };
|
|
7572
7572
|
const a = ((k = (b = r.labels) == null ? void 0 : b.style) == null ? void 0 : k.fontSize) || Mt, l = r.borderColor || t.color, c = r.borderWidth ?? 1.5, h = r.color || "rgba(0,0,0,0)", f = r.connectorColor || l, u = r.connectorWidth ?? 1, d = r.connectorDistance ?? 16, p = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.color) || Pe, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = e + s, m = i + 2 * s, x = e + 2 * s + d;
|
|
7573
7573
|
let v = 0;
|
|
7574
|
-
for (const
|
|
7575
|
-
const I = m - 2 *
|
|
7576
|
-
y.append("circle").attr("cx", g).attr("cy", m -
|
|
7574
|
+
for (const T of o) {
|
|
7575
|
+
const I = m - 2 * T.radius;
|
|
7576
|
+
y.append("circle").attr("cx", g).attr("cy", m - T.radius).attr("r", T.radius).attr("fill", h).attr("stroke", l).attr("stroke-width", c), y.append("line").attr("x1", g).attr("y1", I).attr("x2", x).attr("y2", I).attr("stroke", f).attr("stroke-width", u).attr("stroke-dasharray", "2,2");
|
|
7577
7577
|
let E;
|
|
7578
|
-
(L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value:
|
|
7578
|
+
(L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: T.value }) : (_ = r.labels) != null && _.format ? E = fe(Kt(r.labels.format, { value: T.value })) : E = String(T.value), y.append("text").attr("x", x + 4).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", p).text(E), v = Math.max(v, this.estimateTextWidth(E, a));
|
|
7579
7579
|
}
|
|
7580
7580
|
return {
|
|
7581
7581
|
width: 2 * s + d + v + 8,
|
|
@@ -7590,33 +7590,33 @@ class Yc {
|
|
|
7590
7590
|
*/
|
|
7591
7591
|
renderBubbleLegendSeparate(t, e, i) {
|
|
7592
7592
|
var M, C, L, _;
|
|
7593
|
-
const r = this.config.bubbleLegend || {}, o = [...t.ranges].sort((
|
|
7593
|
+
const r = this.config.bubbleLegend || {}, o = [...t.ranges].sort((T, I) => T.radius - I.radius), s = o[o.length - 1].radius;
|
|
7594
7594
|
if (!(s > 0)) return { width: 0, height: 0 };
|
|
7595
|
-
const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) || Pe, d = r.connectorDistance ?? 8, p = (
|
|
7595
|
+
const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) || Pe, d = r.connectorDistance ?? 8, p = (T) => {
|
|
7596
7596
|
var I, E;
|
|
7597
|
-
return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value:
|
|
7598
|
-
}, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = (
|
|
7597
|
+
return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: T }) : (E = r.labels) != null && E.format ? fe(Kt(r.labels.format, { value: T })) : String(T);
|
|
7598
|
+
}, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = (T, I, E) => y.append("circle").attr("cx", T).attr("cy", I).attr("r", E).attr("fill", f).attr("stroke", c).attr("stroke-width", h);
|
|
7599
7599
|
if (this.config.layout === "horizontal") {
|
|
7600
|
-
const
|
|
7600
|
+
const T = l + 6, I = i + T + 2 * s;
|
|
7601
7601
|
let E = e;
|
|
7602
7602
|
for (const P of o) {
|
|
7603
7603
|
const S = E + P.radius, w = I - 2 * P.radius;
|
|
7604
7604
|
g(S, I - P.radius, P.radius);
|
|
7605
7605
|
const A = p(P.value);
|
|
7606
7606
|
y.append("text").attr("x", S).attr("y", w - 4).attr("text-anchor", "middle").attr("font-size", a).attr("fill", u).text(A);
|
|
7607
|
-
const
|
|
7608
|
-
E +=
|
|
7607
|
+
const $ = Math.max(2 * P.radius, this.estimateTextWidth(A, a));
|
|
7608
|
+
E += $ + d + 6;
|
|
7609
7609
|
}
|
|
7610
|
-
return { width: Math.max(0, E - e - (d + 6)), height:
|
|
7610
|
+
return { width: Math.max(0, E - e - (d + 6)), height: T + 2 * s };
|
|
7611
7611
|
}
|
|
7612
7612
|
const m = e + s, x = e + 2 * s + d;
|
|
7613
7613
|
let v = i, b = 0;
|
|
7614
7614
|
const k = 10;
|
|
7615
|
-
for (const
|
|
7616
|
-
const I = v +
|
|
7617
|
-
g(m, I,
|
|
7618
|
-
const E = p(
|
|
7619
|
-
y.append("text").attr("x", x).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", u).text(E), b = Math.max(b, this.estimateTextWidth(E, a)), v += 2 *
|
|
7615
|
+
for (const T of o) {
|
|
7616
|
+
const I = v + T.radius;
|
|
7617
|
+
g(m, I, T.radius);
|
|
7618
|
+
const E = p(T.value);
|
|
7619
|
+
y.append("text").attr("x", x).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", u).text(E), b = Math.max(b, this.estimateTextWidth(E, a)), v += 2 * T.radius + k;
|
|
7620
7620
|
}
|
|
7621
7621
|
return { width: 2 * s + d + b + 8, height: Math.max(0, v - i - k) };
|
|
7622
7622
|
}
|
|
@@ -7868,14 +7868,14 @@ class Cv {
|
|
|
7868
7868
|
for (let C = 0; C < 3; C++)
|
|
7869
7869
|
this.gearGroup.append("line").attr("x1", k).attr("x2", M).attr("y1", Math.round(h * 0.27) + C * Math.round(h * 0.23)).attr("y2", Math.round(h * 0.27) + C * Math.round(h * 0.23)).attr("stroke", d).attr("stroke-width", p).attr("stroke-linecap", "round");
|
|
7870
7870
|
} else {
|
|
7871
|
-
const k = Math.min(c, h), M = c / 2, C = h / 2, L = 8, _ = k * 0.44,
|
|
7871
|
+
const k = Math.min(c, h), M = c / 2, C = h / 2, L = 8, _ = k * 0.44, T = k * 0.3, I = k * 0.12, E = Math.PI / (L * 1.6);
|
|
7872
7872
|
let P = "";
|
|
7873
7873
|
for (let F = 0; F < L; F++) {
|
|
7874
7874
|
const D = F / L * Math.PI * 2 - Math.PI / 2, z = [
|
|
7875
|
-
[
|
|
7875
|
+
[T, D - E * 1.2],
|
|
7876
7876
|
[_ + I, D - E],
|
|
7877
7877
|
[_ + I, D + E],
|
|
7878
|
-
[
|
|
7878
|
+
[T, D + E * 1.2]
|
|
7879
7879
|
];
|
|
7880
7880
|
for (const [B, H] of z) {
|
|
7881
7881
|
const J = M + Math.cos(H) * B, X = C + Math.sin(H) * B;
|
|
@@ -7887,8 +7887,8 @@ class Cv {
|
|
|
7887
7887
|
w.append("stop").attr("offset", "0%").attr("stop-color", "#aaa").attr("stop-opacity", "0.7"), w.append("stop").attr("offset", "45%").attr("stop-color", "#999").attr("stop-opacity", "0.45"), w.append("stop").attr("offset", "100%").attr("stop-color", "#888").attr("stop-opacity", "0.35");
|
|
7888
7888
|
const A = S.append("radialGradient").attr("id", "katu-gear-highlight").attr("cx", "0.35").attr("cy", "0.3").attr("r", "0.65");
|
|
7889
7889
|
A.append("stop").attr("offset", "0%").attr("stop-color", "#fff").attr("stop-opacity", "0.6"), A.append("stop").attr("offset", "50%").attr("stop-color", "#fff").attr("stop-opacity", "0.1"), A.append("stop").attr("offset", "100%").attr("stop-color", "#fff").attr("stop-opacity", "0"), this.gearGroup.append("path").attr("d", P).attr("fill", "url(#katu-gear-glass)").attr("stroke", "rgba(255,255,255,0.5)").attr("stroke-width", p * 0.4).attr("stroke-linejoin", "round").style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.15))"), this.gearGroup.append("path").attr("d", P).attr("fill", "url(#katu-gear-highlight)").attr("stroke", "none").style("pointer-events", "none"), this.gearGroup.append("circle").attr("cx", M).attr("cy", C).attr("r", k * 0.15).attr("fill", "rgba(255,255,255,0.6)").attr("stroke", "rgba(255,255,255,0.4)").attr("stroke-width", "0.5");
|
|
7890
|
-
const
|
|
7891
|
-
|
|
7890
|
+
const $ = S.append("radialGradient").attr("id", "katu-gear-hover-bg").attr("cx", "0.4").attr("cy", "0.35").attr("r", "0.65");
|
|
7891
|
+
$.append("stop").attr("offset", "0%").attr("stop-color", "#fff").attr("stop-opacity", "0.35"), $.append("stop").attr("offset", "50%").attr("stop-color", "#eef2ff").attr("stop-opacity", "0.15"), $.append("stop").attr("offset", "100%").attr("stop-color", "#dde6ff").attr("stop-opacity", "0.08");
|
|
7892
7892
|
const R = k * 0.85;
|
|
7893
7893
|
this.group.insert("circle", ".katucharts-gear-icon").attr("class", "katucharts-gear-hover-bg").attr("cx", c / 2).attr("cy", h / 2).attr("r", R).attr("fill", "url(#katu-gear-hover-bg)").attr("stroke", "rgba(255,255,255,0.6)").attr("stroke-width", "1.5").style("filter", "drop-shadow(0 0 10px rgba(200,225,255,0.5)) drop-shadow(0 2px 6px rgba(0,0,0,0.08))").style("opacity", "0").style("transition", "opacity 0.25s ease"), this.group.insert("circle", ".katucharts-gear-icon").attr("class", "katucharts-gear-hover-highlight").attr("cx", c / 2).attr("cy", h / 2).attr("r", R).attr("fill", "none").attr("stroke", "rgba(255,255,255,0.8)").attr("stroke-width", "1.5").style("filter", "drop-shadow(0 0 4px rgba(255,255,255,0.4))").style("opacity", "0").style("transition", "opacity 0.25s ease");
|
|
7894
7894
|
}
|
|
@@ -7933,7 +7933,7 @@ class Cv {
|
|
|
7933
7933
|
let c = 0;
|
|
7934
7934
|
const h = [];
|
|
7935
7935
|
for (let E = 0; E < l.length; E += 4) {
|
|
7936
|
-
const P = E / 4 % r, S = Math.floor(E / 4 / r), w = P / r - 0.5, A = S / r - 0.5,
|
|
7936
|
+
const P = E / 4 % r, S = Math.floor(E / 4 / r), w = P / r - 0.5, A = S / r - 0.5, $ = Math.sqrt(w * w + A * A), R = Math.max(0, Math.min(1, (0.48 - $) / 0.15)), F = R * R * (3 - 2 * R), D = w * F * r, z = A * F * r;
|
|
7937
7937
|
c = Math.max(c, Math.abs(D), Math.abs(z)), h.push(D, z);
|
|
7938
7938
|
}
|
|
7939
7939
|
c *= 0.5;
|
|
@@ -7949,9 +7949,9 @@ class Cv {
|
|
|
7949
7949
|
m.setAttributeNS("http://www.w3.org/1999/xlink", "href", u), m.setAttribute("width", "44"), m.setAttribute("height", "44"), m.setAttribute("result", "lens_map");
|
|
7950
7950
|
const x = document.createElementNS(d, "feDisplacementMap");
|
|
7951
7951
|
x.setAttribute("in", "SourceGraphic"), x.setAttribute("in2", "lens_map"), x.setAttribute("scale", String(Math.round(c / 1))), x.setAttribute("xChannelSelector", "R"), x.setAttribute("yChannelSelector", "G"), g.appendChild(m), g.appendChild(x), y.appendChild(g), p.appendChild(y), this.radialContainer.appendChild(p), document.body.appendChild(this.radialContainer);
|
|
7952
|
-
const v = this.container.getBoundingClientRect(), b = v.left + this.btnCenterX, k = v.top + this.btnCenterY, M = 76, C = i.length, L = 100 * (Math.PI / 180), _ = 280 * (Math.PI / 180),
|
|
7952
|
+
const v = this.container.getBoundingClientRect(), b = v.left + this.btnCenterX, k = v.top + this.btnCenterY, M = 76, C = i.length, L = 100 * (Math.PI / 180), _ = 280 * (Math.PI / 180), T = this.config.menuItemDefinitions || {};
|
|
7953
7953
|
i.forEach((E, P) => {
|
|
7954
|
-
const S = C > 1 ? L + (_ - L) * (P / (C - 1)) : Math.PI, w = b + Math.cos(S) * M, A = k + Math.sin(S) * M,
|
|
7954
|
+
const S = C > 1 ? L + (_ - L) * (P / (C - 1)) : Math.PI, w = b + Math.cos(S) * M, A = k + Math.sin(S) * M, $ = w - b, R = A - k, F = document.createElement("div");
|
|
7955
7955
|
F.className = "katucharts-radial-btn", Object.assign(F.style, {
|
|
7956
7956
|
position: "absolute",
|
|
7957
7957
|
left: `${b}px`,
|
|
@@ -7979,7 +7979,7 @@ class Cv {
|
|
|
7979
7979
|
willChange: "transform, opacity",
|
|
7980
7980
|
transition: `transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) ${P * 40}ms, opacity 0.2s ease ${P * 40}ms, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease`,
|
|
7981
7981
|
boxShadow: "0 4px 8px rgba(0,0,0,0.2), inset 0 -6px 12px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.4)"
|
|
7982
|
-
}), F.dataset.dx = String(
|
|
7982
|
+
}), F.dataset.dx = String($), F.dataset.dy = String(R);
|
|
7983
7983
|
const D = document.createElement("div");
|
|
7984
7984
|
Object.assign(D.style, {
|
|
7985
7985
|
position: "absolute",
|
|
@@ -8035,11 +8035,11 @@ class Cv {
|
|
|
8035
8035
|
F.style.background = "linear-gradient(160deg, rgba(255,255,255,0.72) 0%, rgba(240,240,255,0.45) 40%, rgba(255,255,255,0.35) 100%)", F.style.borderColor = "rgba(255, 255, 255, 0.4)", F.style.boxShadow = "0 4px 8px rgba(0,0,0,0.2), inset 0 -6px 12px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.4)", B.forEach((N) => N.setAttribute("stroke", "#333333")), H.forEach((N) => N.setAttribute("fill", "#333333")), X.style.opacity = "0", X.style.transform = G;
|
|
8036
8036
|
}), F.addEventListener("click", (N) => {
|
|
8037
8037
|
N.stopPropagation(), this.closeMenu();
|
|
8038
|
-
const Y =
|
|
8038
|
+
const Y = T[E.key];
|
|
8039
8039
|
Y != null && Y.onclick ? Y.onclick() : this.onExport(E.key);
|
|
8040
8040
|
}), this.radialContainer.appendChild(F), requestAnimationFrame(() => {
|
|
8041
8041
|
requestAnimationFrame(() => {
|
|
8042
|
-
F.style.transform = `translate(${
|
|
8042
|
+
F.style.transform = `translate(${$}px, ${R}px) scale(1)`, F.style.opacity = "1";
|
|
8043
8043
|
});
|
|
8044
8044
|
});
|
|
8045
8045
|
}), this.outsideClickHandler = (E) => {
|
|
@@ -8195,7 +8195,7 @@ function Tv(n) {
|
|
|
8195
8195
|
});
|
|
8196
8196
|
const x = "http://www.w3.org/2000/svg", v = l.offsetWidth - l.clientWidth, b = l.offsetHeight - l.clientHeight, k = c - v, M = h - b, C = document.createElementNS(x, "svg");
|
|
8197
8197
|
C.setAttribute("data-katu-fixed-overlay", "1"), C.setAttribute("width", k.toString()), C.setAttribute("height", M.toString()), C.style.position = "absolute", C.style.top = "0", C.style.left = "0", C.style.pointerEvents = "none", C.style.overflow = "visible";
|
|
8198
|
-
const L = i.chart.backgroundColor || "#ffffff",
|
|
8198
|
+
const L = i.chart.backgroundColor || "#ffffff", T = (r.attr("transform") || "").match(/translate\(([^,]+),\s*([^)]+)\)/), I = T ? parseFloat(T[1]) : 0, E = T ? parseFloat(T[2]) : 0, P = !!i.chart.inverted, S = P ? ".katucharts-axis-y" : ".katucharts-axis-x", w = P ? ".katucharts-axis-x" : ".katucharts-axis-y", A = document.createElementNS(x, "defs"), $ = `katucharts-fixed-grad-${Math.random().toString(36).slice(2, 8)}`, R = (N, Y, O, ct, it, ft) => {
|
|
8199
8199
|
const dt = document.createElementNS(x, "linearGradient");
|
|
8200
8200
|
dt.setAttribute("id", N), dt.setAttribute("x1", Y), dt.setAttribute("y1", O), dt.setAttribute("x2", ct), dt.setAttribute("y2", it), ft.forEach(([at, ot]) => {
|
|
8201
8201
|
const q = document.createElementNS(x, "stop");
|
|
@@ -8205,9 +8205,9 @@ function Tv(n) {
|
|
|
8205
8205
|
((F == null ? void 0 : F.y) ?? 0) + ((F == null ? void 0 : F.height) ?? 0),
|
|
8206
8206
|
((D == null ? void 0 : D.y) ?? 0) + ((D == null ? void 0 : D.height) ?? 0)
|
|
8207
8207
|
), H = Math.max(0, Math.min(z + 30, E)), J = H > 0 ? Math.max(0, Math.min(100, z / H * 100)) : 100;
|
|
8208
|
-
if (R(`${
|
|
8208
|
+
if (R(`${$}-top`, "0%", "0%", "0%", "100%", [["0%", "1"], [`${J}%`, "1"], ["100%", "0"]]), R(`${$}-bottom`, "0%", "0%", "0%", "100%", [["0%", "0"], ["30%", "1"], ["100%", "1"]]), R(`${$}-left`, "0%", "0%", "100%", "0%", [["0%", "1"], ["70%", "1"], ["100%", "0"]]), C.appendChild(A), f && H > 0) {
|
|
8209
8209
|
const N = document.createElementNS(x, "rect");
|
|
8210
|
-
N.setAttribute("x", "0"), N.setAttribute("y", "0"), N.setAttribute("width", k.toString()), N.setAttribute("height", H.toString()), N.setAttribute("fill", `url(#${
|
|
8210
|
+
N.setAttribute("x", "0"), N.setAttribute("y", "0"), N.setAttribute("width", k.toString()), N.setAttribute("height", H.toString()), N.setAttribute("fill", `url(#${$}-top)`), C.appendChild(N);
|
|
8211
8211
|
}
|
|
8212
8212
|
if (y.querySelectorAll(".katucharts-title-group").forEach((N) => {
|
|
8213
8213
|
N.style.visibility = "hidden";
|
|
@@ -8217,7 +8217,7 @@ function Tv(n) {
|
|
|
8217
8217
|
O !== 0 && Y.setAttribute("transform", `translate(${-O}, 0)`), C.appendChild(Y);
|
|
8218
8218
|
}), f) {
|
|
8219
8219
|
const N = E + o.plotArea.height, Y = a - N + 10, O = document.createElementNS(x, "rect");
|
|
8220
|
-
O.setAttribute("x", "0"), O.setAttribute("y", (M - Y).toString()), O.setAttribute("width", k.toString()), O.setAttribute("height", Y.toString()), O.setAttribute("fill", `url(#${
|
|
8220
|
+
O.setAttribute("x", "0"), O.setAttribute("y", (M - Y).toString()), O.setAttribute("width", k.toString()), O.setAttribute("height", Y.toString()), O.setAttribute("fill", `url(#${$}-bottom)`), C.appendChild(O), y.querySelectorAll(S).forEach((it) => {
|
|
8221
8221
|
it.style.visibility = "hidden";
|
|
8222
8222
|
const ft = document.createElementNS(x, "g"), dt = M - (a - N);
|
|
8223
8223
|
ft.setAttribute("transform", `translate(${I}, ${dt})`);
|
|
@@ -8227,7 +8227,7 @@ function Tv(n) {
|
|
|
8227
8227
|
}
|
|
8228
8228
|
if (u) {
|
|
8229
8229
|
const N = I + 5, Y = document.createElementNS(x, "rect");
|
|
8230
|
-
Y.setAttribute("x", "0"), Y.setAttribute("y", "0"), Y.setAttribute("width", N.toString()), Y.setAttribute("height", M.toString()), Y.setAttribute("fill", `url(#${
|
|
8230
|
+
Y.setAttribute("x", "0"), Y.setAttribute("y", "0"), Y.setAttribute("width", N.toString()), Y.setAttribute("height", M.toString()), Y.setAttribute("fill", `url(#${$}-left)`), C.appendChild(Y), y.querySelectorAll(w).forEach((ct) => {
|
|
8231
8231
|
ct.style.visibility = "hidden";
|
|
8232
8232
|
const it = document.createElementNS(x, "g");
|
|
8233
8233
|
it.setAttribute("transform", `translate(${I}, ${E})`);
|
|
@@ -9113,9 +9113,9 @@ function yd() {
|
|
|
9113
9113
|
}
|
|
9114
9114
|
function g(b, k) {
|
|
9115
9115
|
if (n.call(this, b, k)) {
|
|
9116
|
-
var M = b.changedTouches, C = t.call(this, b, k), L = M.length, _,
|
|
9116
|
+
var M = b.changedTouches, C = t.call(this, b, k), L = M.length, _, T;
|
|
9117
9117
|
for (_ = 0; _ < L; ++_)
|
|
9118
|
-
(
|
|
9118
|
+
(T = v(this, C, b, k, M[_].identifier, M[_])) && (Js(b), T("start", b, M[_]));
|
|
9119
9119
|
}
|
|
9120
9120
|
}
|
|
9121
9121
|
function m(b) {
|
|
@@ -9131,7 +9131,7 @@ function yd() {
|
|
|
9131
9131
|
(L = r[k[C].identifier]) && (Js(b), L("end", b, k[C]));
|
|
9132
9132
|
}
|
|
9133
9133
|
function v(b, k, M, C, L, _) {
|
|
9134
|
-
var
|
|
9134
|
+
var T = o.copy(), I = un(_ || M, k), E, P, S;
|
|
9135
9135
|
if ((S = e.call(b, new Ya("beforestart", {
|
|
9136
9136
|
sourceEvent: M,
|
|
9137
9137
|
target: u,
|
|
@@ -9141,9 +9141,9 @@ function yd() {
|
|
|
9141
9141
|
y: I[1],
|
|
9142
9142
|
dx: 0,
|
|
9143
9143
|
dy: 0,
|
|
9144
|
-
dispatch:
|
|
9144
|
+
dispatch: T
|
|
9145
9145
|
}), C)) != null)
|
|
9146
|
-
return E = S.x - I[0] || 0, P = S.y - I[1] || 0, function w(A,
|
|
9146
|
+
return E = S.x - I[0] || 0, P = S.y - I[1] || 0, function w(A, $, R) {
|
|
9147
9147
|
var F = I, D;
|
|
9148
9148
|
switch (A) {
|
|
9149
9149
|
case "start":
|
|
@@ -9152,14 +9152,14 @@ function yd() {
|
|
|
9152
9152
|
case "end":
|
|
9153
9153
|
delete r[L], --s;
|
|
9154
9154
|
case "drag":
|
|
9155
|
-
I = un(R ||
|
|
9155
|
+
I = un(R || $, k), D = s;
|
|
9156
9156
|
break;
|
|
9157
9157
|
}
|
|
9158
|
-
|
|
9158
|
+
T.call(
|
|
9159
9159
|
A,
|
|
9160
9160
|
b,
|
|
9161
9161
|
new Ya(A, {
|
|
9162
|
-
sourceEvent:
|
|
9162
|
+
sourceEvent: $,
|
|
9163
9163
|
subject: S,
|
|
9164
9164
|
target: u,
|
|
9165
9165
|
identifier: L,
|
|
@@ -9168,7 +9168,7 @@ function yd() {
|
|
|
9168
9168
|
y: I[1] + P,
|
|
9169
9169
|
dx: I[0] - F[0],
|
|
9170
9170
|
dy: I[1] - F[1],
|
|
9171
|
-
dispatch:
|
|
9171
|
+
dispatch: T
|
|
9172
9172
|
}),
|
|
9173
9173
|
C
|
|
9174
9174
|
);
|
|
@@ -9277,56 +9277,56 @@ function Gv(n, t, e) {
|
|
|
9277
9277
|
function xd() {
|
|
9278
9278
|
var n = Nv, t = Wv, e = Gv, i = Hv, r = Vv, o = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, l = Vy, c = Ki("start", "zoom", "end"), h, f, u, d = 500, p = 150, y = 0, g = 10;
|
|
9279
9279
|
function m(S) {
|
|
9280
|
-
S.property("__zoom", Uh).on("wheel.zoom", L, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom",
|
|
9280
|
+
S.property("__zoom", Uh).on("wheel.zoom", L, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom", T).filter(r).on("touchstart.zoom", I).on("touchmove.zoom", E).on("touchend.zoom touchcancel.zoom", P).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
9281
9281
|
}
|
|
9282
|
-
m.transform = function(S, w, A,
|
|
9282
|
+
m.transform = function(S, w, A, $) {
|
|
9283
9283
|
var R = S.selection ? S.selection() : S;
|
|
9284
|
-
R.property("__zoom", Uh), S !== R ? k(S, w, A,
|
|
9285
|
-
M(this, arguments).event(
|
|
9284
|
+
R.property("__zoom", Uh), S !== R ? k(S, w, A, $) : R.interrupt().each(function() {
|
|
9285
|
+
M(this, arguments).event($).start().zoom(null, typeof w == "function" ? w.apply(this, arguments) : w).end();
|
|
9286
9286
|
});
|
|
9287
|
-
}, m.scaleBy = function(S, w, A,
|
|
9287
|
+
}, m.scaleBy = function(S, w, A, $) {
|
|
9288
9288
|
m.scaleTo(S, function() {
|
|
9289
9289
|
var R = this.__zoom.k, F = typeof w == "function" ? w.apply(this, arguments) : w;
|
|
9290
9290
|
return R * F;
|
|
9291
|
-
}, A,
|
|
9292
|
-
}, m.scaleTo = function(S, w, A,
|
|
9291
|
+
}, A, $);
|
|
9292
|
+
}, m.scaleTo = function(S, w, A, $) {
|
|
9293
9293
|
m.transform(S, function() {
|
|
9294
9294
|
var R = t.apply(this, arguments), F = this.__zoom, D = A == null ? b(R) : typeof A == "function" ? A.apply(this, arguments) : A, z = F.invert(D), B = typeof w == "function" ? w.apply(this, arguments) : w;
|
|
9295
9295
|
return e(v(x(F, B), D, z), R, s);
|
|
9296
|
-
}, A,
|
|
9297
|
-
}, m.translateBy = function(S, w, A,
|
|
9296
|
+
}, A, $);
|
|
9297
|
+
}, m.translateBy = function(S, w, A, $) {
|
|
9298
9298
|
m.transform(S, function() {
|
|
9299
9299
|
return e(this.__zoom.translate(
|
|
9300
9300
|
typeof w == "function" ? w.apply(this, arguments) : w,
|
|
9301
9301
|
typeof A == "function" ? A.apply(this, arguments) : A
|
|
9302
9302
|
), t.apply(this, arguments), s);
|
|
9303
|
-
}, null,
|
|
9304
|
-
}, m.translateTo = function(S, w, A,
|
|
9303
|
+
}, null, $);
|
|
9304
|
+
}, m.translateTo = function(S, w, A, $, R) {
|
|
9305
9305
|
m.transform(S, function() {
|
|
9306
|
-
var F = t.apply(this, arguments), D = this.__zoom, z =
|
|
9306
|
+
var F = t.apply(this, arguments), D = this.__zoom, z = $ == null ? b(F) : typeof $ == "function" ? $.apply(this, arguments) : $;
|
|
9307
9307
|
return e(jo.translate(z[0], z[1]).scale(D.k).translate(
|
|
9308
9308
|
typeof w == "function" ? -w.apply(this, arguments) : -w,
|
|
9309
9309
|
typeof A == "function" ? -A.apply(this, arguments) : -A
|
|
9310
9310
|
), F, s);
|
|
9311
|
-
},
|
|
9311
|
+
}, $, R);
|
|
9312
9312
|
};
|
|
9313
9313
|
function x(S, w) {
|
|
9314
9314
|
return w = Math.max(o[0], Math.min(o[1], w)), w === S.k ? S : new Rn(w, S.x, S.y);
|
|
9315
9315
|
}
|
|
9316
9316
|
function v(S, w, A) {
|
|
9317
|
-
var
|
|
9318
|
-
return
|
|
9317
|
+
var $ = w[0] - A[0] * S.k, R = w[1] - A[1] * S.k;
|
|
9318
|
+
return $ === S.x && R === S.y ? S : new Rn(S.k, $, R);
|
|
9319
9319
|
}
|
|
9320
9320
|
function b(S) {
|
|
9321
9321
|
return [(+S[0][0] + +S[1][0]) / 2, (+S[0][1] + +S[1][1]) / 2];
|
|
9322
9322
|
}
|
|
9323
|
-
function k(S, w, A,
|
|
9323
|
+
function k(S, w, A, $) {
|
|
9324
9324
|
S.on("start.zoom", function() {
|
|
9325
|
-
M(this, arguments).event(
|
|
9325
|
+
M(this, arguments).event($).start();
|
|
9326
9326
|
}).on("interrupt.zoom end.zoom", function() {
|
|
9327
|
-
M(this, arguments).event(
|
|
9327
|
+
M(this, arguments).event($).end();
|
|
9328
9328
|
}).tween("zoom", function() {
|
|
9329
|
-
var R = this, F = arguments, D = M(R, F).event(
|
|
9329
|
+
var R = this, F = arguments, D = M(R, F).event($), z = t.apply(R, F), B = A == null ? b(z) : typeof A == "function" ? A.apply(R, F) : A, H = Math.max(z[1][0] - z[0][0], z[1][1] - z[0][1]), J = R.__zoom, X = typeof w == "function" ? w.apply(R, F) : w, j = l(J.invert(B).concat(H / J.k), X.invert(B).concat(H / X.k));
|
|
9330
9330
|
return function(W) {
|
|
9331
9331
|
if (W === 1) W = X;
|
|
9332
9332
|
else {
|
|
@@ -9373,43 +9373,43 @@ function xd() {
|
|
|
9373
9373
|
};
|
|
9374
9374
|
function L(S, ...w) {
|
|
9375
9375
|
if (!n.apply(this, arguments)) return;
|
|
9376
|
-
var A = M(this, w).event(S),
|
|
9376
|
+
var A = M(this, w).event(S), $ = this.__zoom, R = Math.max(o[0], Math.min(o[1], $.k * Math.pow(2, i.apply(this, arguments)))), F = un(S);
|
|
9377
9377
|
if (A.wheel)
|
|
9378
|
-
(A.mouse[0][0] !== F[0] || A.mouse[0][1] !== F[1]) && (A.mouse[1] =
|
|
9378
|
+
(A.mouse[0][0] !== F[0] || A.mouse[0][1] !== F[1]) && (A.mouse[1] = $.invert(A.mouse[0] = F)), clearTimeout(A.wheel);
|
|
9379
9379
|
else {
|
|
9380
|
-
if (
|
|
9381
|
-
A.mouse = [F,
|
|
9380
|
+
if ($.k === R) return;
|
|
9381
|
+
A.mouse = [F, $.invert(F)], Bi(this), A.start();
|
|
9382
9382
|
}
|
|
9383
|
-
dr(S), A.wheel = setTimeout(D, p), A.zoom("mouse", e(v(x(
|
|
9383
|
+
dr(S), A.wheel = setTimeout(D, p), A.zoom("mouse", e(v(x($, R), A.mouse[0], A.mouse[1]), A.extent, s));
|
|
9384
9384
|
function D() {
|
|
9385
9385
|
A.wheel = null, A.end();
|
|
9386
9386
|
}
|
|
9387
9387
|
}
|
|
9388
9388
|
function _(S, ...w) {
|
|
9389
9389
|
if (u || !n.apply(this, arguments)) return;
|
|
9390
|
-
var A = S.currentTarget,
|
|
9391
|
-
Xc(S.view), Qs(S),
|
|
9390
|
+
var A = S.currentTarget, $ = M(this, w, !0).event(S), R = rt(S.view).on("mousemove.zoom", B, !0).on("mouseup.zoom", H, !0), F = un(S, A), D = S.clientX, z = S.clientY;
|
|
9391
|
+
Xc(S.view), Qs(S), $.mouse = [F, this.__zoom.invert(F)], Bi(this), $.start();
|
|
9392
9392
|
function B(J) {
|
|
9393
|
-
if (dr(J),
|
|
9393
|
+
if (dr(J), !$.moved) {
|
|
9394
9394
|
var X = J.clientX - D, j = J.clientY - z;
|
|
9395
|
-
|
|
9395
|
+
$.moved = X * X + j * j > y;
|
|
9396
9396
|
}
|
|
9397
|
-
|
|
9397
|
+
$.event(J).zoom("mouse", e(v($.that.__zoom, $.mouse[0] = un(J, A), $.mouse[1]), $.extent, s));
|
|
9398
9398
|
}
|
|
9399
9399
|
function H(J) {
|
|
9400
|
-
R.on("mousemove.zoom mouseup.zoom", null), Uc(J.view,
|
|
9400
|
+
R.on("mousemove.zoom mouseup.zoom", null), Uc(J.view, $.moved), dr(J), $.event(J).end();
|
|
9401
9401
|
}
|
|
9402
9402
|
}
|
|
9403
|
-
function
|
|
9403
|
+
function T(S, ...w) {
|
|
9404
9404
|
if (n.apply(this, arguments)) {
|
|
9405
|
-
var A = this.__zoom,
|
|
9406
|
-
dr(S), a > 0 ? rt(this).transition().duration(a).call(k, D,
|
|
9405
|
+
var A = this.__zoom, $ = un(S.changedTouches ? S.changedTouches[0] : S, this), R = A.invert($), F = A.k * (S.shiftKey ? 0.5 : 2), D = e(v(x(A, F), $, R), t.apply(this, w), s);
|
|
9406
|
+
dr(S), a > 0 ? rt(this).transition().duration(a).call(k, D, $, S) : rt(this).call(m.transform, D, $, S);
|
|
9407
9407
|
}
|
|
9408
9408
|
}
|
|
9409
9409
|
function I(S, ...w) {
|
|
9410
9410
|
if (n.apply(this, arguments)) {
|
|
9411
|
-
var A = S.touches,
|
|
9412
|
-
for (Qs(S), D = 0; D <
|
|
9411
|
+
var A = S.touches, $ = A.length, R = M(this, w, S.changedTouches.length === $).event(S), F, D, z, B;
|
|
9412
|
+
for (Qs(S), D = 0; D < $; ++D)
|
|
9413
9413
|
z = A[D], B = un(z, this), B = [B, this.__zoom.invert(B), z.identifier], R.touch0 ? !R.touch1 && R.touch0[2] !== B[2] && (R.touch1 = B, R.taps = 0) : (R.touch0 = B, F = !0, R.taps = 1 + !!h);
|
|
9414
9414
|
h && (h = clearTimeout(h)), F && (R.taps < 2 && (f = B[0], h = setTimeout(function() {
|
|
9415
9415
|
h = null;
|
|
@@ -9418,9 +9418,9 @@ function xd() {
|
|
|
9418
9418
|
}
|
|
9419
9419
|
function E(S, ...w) {
|
|
9420
9420
|
if (this.__zooming) {
|
|
9421
|
-
var A = M(this, w).event(S),
|
|
9421
|
+
var A = M(this, w).event(S), $ = S.changedTouches, R = $.length, F, D, z, B;
|
|
9422
9422
|
for (dr(S), F = 0; F < R; ++F)
|
|
9423
|
-
D =
|
|
9423
|
+
D = $[F], z = un(D, this), A.touch0 && A.touch0[2] === D.identifier ? A.touch0[0] = z : A.touch1 && A.touch1[2] === D.identifier && (A.touch1[0] = z);
|
|
9424
9424
|
if (D = A.that.__zoom, A.touch1) {
|
|
9425
9425
|
var H = A.touch0[0], J = A.touch0[1], X = A.touch1[0], j = A.touch1[1], W = (W = X[0] - H[0]) * W + (W = X[1] - H[1]) * W, U = (U = j[0] - J[0]) * U + (U = j[1] - J[1]) * U;
|
|
9426
9426
|
D = x(D, Math.sqrt(W / U)), z = [(H[0] + X[0]) / 2, (H[1] + X[1]) / 2], B = [(J[0] + j[0]) / 2, (J[1] + j[1]) / 2];
|
|
@@ -9431,11 +9431,11 @@ function xd() {
|
|
|
9431
9431
|
}
|
|
9432
9432
|
function P(S, ...w) {
|
|
9433
9433
|
if (this.__zooming) {
|
|
9434
|
-
var A = M(this, w).event(S),
|
|
9434
|
+
var A = M(this, w).event(S), $ = S.changedTouches, R = $.length, F, D;
|
|
9435
9435
|
for (Qs(S), u && clearTimeout(u), u = setTimeout(function() {
|
|
9436
9436
|
u = null;
|
|
9437
9437
|
}, d), F = 0; F < R; ++F)
|
|
9438
|
-
D =
|
|
9438
|
+
D = $[F], A.touch0 && A.touch0[2] === D.identifier ? delete A.touch0 : A.touch1 && A.touch1[2] === D.identifier && delete A.touch1;
|
|
9439
9439
|
if (A.touch1 && !A.touch0 && (A.touch0 = A.touch1, delete A.touch1), A.touch0) A.touch0[1] = this.__zoom.invert(A.touch0[0]);
|
|
9440
9440
|
else if (A.end(), A.taps === 2 && (D = un(D, this), Math.hypot(f[0] - D[0], f[1] - D[1]) < g)) {
|
|
9441
9441
|
var z = rt(this).on("dblclick.zoom");
|
|
@@ -10011,8 +10011,8 @@ function i2(n) {
|
|
|
10011
10011
|
h(this, arguments).end(v);
|
|
10012
10012
|
}).tween("brush", function() {
|
|
10013
10013
|
var v = this, b = v.__brush, k = h(v, arguments), M = b.selection, C = n.input(typeof m == "function" ? m.apply(this, arguments) : m, b.extent), L = oe(M, C);
|
|
10014
|
-
function _(
|
|
10015
|
-
b.selection =
|
|
10014
|
+
function _(T) {
|
|
10015
|
+
b.selection = T === 1 && C === null ? null : L(T), c.call(v), k.brush();
|
|
10016
10016
|
}
|
|
10017
10017
|
return M !== null && C !== null ? _ : _(1);
|
|
10018
10018
|
}) : g.each(function() {
|
|
@@ -10072,7 +10072,7 @@ function i2(n) {
|
|
|
10072
10072
|
};
|
|
10073
10073
|
function u(g) {
|
|
10074
10074
|
if (a && !g.touches || !e.apply(this, arguments)) return;
|
|
10075
|
-
var m = this, x = g.target.__data__.type, v = (r && g.metaKey ? x = "overlay" : x) === "selection" ? qh : r && g.altKey ? Ti : Ei, b = n === ia ? null : Zv[x], k = n === _o ? null : Kv[x], M = ra(m), C = M.extent, L = M.selection, _ = C[0][0],
|
|
10075
|
+
var m = this, x = g.target.__data__.type, v = (r && g.metaKey ? x = "overlay" : x) === "selection" ? qh : r && g.altKey ? Ti : Ei, b = n === ia ? null : Zv[x], k = n === _o ? null : Kv[x], M = ra(m), C = M.extent, L = M.selection, _ = C[0][0], T, I, E = C[0][1], P, S, w = C[1][0], A, $, R = C[1][1], F, D, z = 0, B = 0, H, J = b && k && r && g.shiftKey, X, j, W = Array.from(g.touches || [g], (at) => {
|
|
10076
10076
|
const ot = at.identifier;
|
|
10077
10077
|
return at = un(at, m), at.point0 = at.slice(), at.identifier = ot, at;
|
|
10078
10078
|
});
|
|
@@ -10082,15 +10082,15 @@ function i2(n) {
|
|
|
10082
10082
|
L && (H = !0);
|
|
10083
10083
|
const at = [W[0], W[1] || W[0]];
|
|
10084
10084
|
M.selection = L = [[
|
|
10085
|
-
|
|
10085
|
+
T = n === ia ? _ : ve(at[0][0], at[1][0]),
|
|
10086
10086
|
P = n === _o ? E : ve(at[0][1], at[1][1])
|
|
10087
10087
|
], [
|
|
10088
10088
|
A = n === ia ? w : be(at[0][0], at[1][0]),
|
|
10089
10089
|
F = n === _o ? R : be(at[0][1], at[1][1])
|
|
10090
10090
|
]], W.length > 1 && ct(g);
|
|
10091
10091
|
} else
|
|
10092
|
-
|
|
10093
|
-
I =
|
|
10092
|
+
T = L[0][0], P = L[0][1], A = L[1][0], F = L[1][1];
|
|
10093
|
+
I = T, S = P, $ = A, D = F;
|
|
10094
10094
|
var G = rt(m).attr("pointer-events", "none"), N = G.selectAll(".overlay").attr("cursor", $n[x]);
|
|
10095
10095
|
if (g.touches)
|
|
10096
10096
|
U.moved = O, U.ended = it;
|
|
@@ -10117,19 +10117,19 @@ function i2(n) {
|
|
|
10117
10117
|
switch (z = ot[0] - q[0], B = ot[1] - q[1], v) {
|
|
10118
10118
|
case na:
|
|
10119
10119
|
case qh: {
|
|
10120
|
-
b && (z = be(_ -
|
|
10120
|
+
b && (z = be(_ - T, ve(w - A, z)), I = T + z, $ = A + z), k && (B = be(E - P, ve(R - F, B)), S = P + B, D = F + B);
|
|
10121
10121
|
break;
|
|
10122
10122
|
}
|
|
10123
10123
|
case Ei: {
|
|
10124
|
-
W[1] ? (b && (I = be(_, ve(w, W[0][0])),
|
|
10124
|
+
W[1] ? (b && (I = be(_, ve(w, W[0][0])), $ = be(_, ve(w, W[1][0])), b = 1), k && (S = be(E, ve(R, W[0][1])), D = be(E, ve(R, W[1][1])), k = 1)) : (b < 0 ? (z = be(_ - T, ve(w - T, z)), I = T + z, $ = A) : b > 0 && (z = be(_ - A, ve(w - A, z)), I = T, $ = A + z), k < 0 ? (B = be(E - P, ve(R - P, B)), S = P + B, D = F) : k > 0 && (B = be(E - F, ve(R - F, B)), S = P, D = F + B));
|
|
10125
10125
|
break;
|
|
10126
10126
|
}
|
|
10127
10127
|
case Ti: {
|
|
10128
|
-
b && (I = be(_, ve(w,
|
|
10128
|
+
b && (I = be(_, ve(w, T - z * b)), $ = be(_, ve(w, A + z * b))), k && (S = be(E, ve(R, P - B * k)), D = be(E, ve(R, F + B * k)));
|
|
10129
10129
|
break;
|
|
10130
10130
|
}
|
|
10131
10131
|
}
|
|
10132
|
-
|
|
10132
|
+
$ < I && (b *= -1, st = T, T = A, A = st, st = I, I = $, $ = st, x in Jh && N.attr("cursor", $n[x = Jh[x]])), D < S && (k *= -1, st = P, P = F, F = st, st = S, S = D, D = st, x in Qh && N.attr("cursor", $n[x = Qh[x]])), M.selection && (L = M.selection), X && (I = L[0][0], $ = L[1][0]), j && (S = L[0][1], D = L[1][1]), (L[0][0] !== I || L[0][1] !== S || L[1][0] !== $ || L[1][1] !== D) && (M.selection = [[I, S], [$, D]], c.call(m), U.brush(at, v.name));
|
|
10133
10133
|
}
|
|
10134
10134
|
function it(at) {
|
|
10135
10135
|
if (jv(at), at.touches) {
|
|
@@ -10148,11 +10148,11 @@ function i2(n) {
|
|
|
10148
10148
|
break;
|
|
10149
10149
|
}
|
|
10150
10150
|
case 18: {
|
|
10151
|
-
v === Ei && (b && (A =
|
|
10151
|
+
v === Ei && (b && (A = $ - z * b, T = I + z * b), k && (F = D - B * k, P = S + B * k), v = Ti, ct(at));
|
|
10152
10152
|
break;
|
|
10153
10153
|
}
|
|
10154
10154
|
case 32: {
|
|
10155
|
-
(v === Ei || v === Ti) && (b < 0 ? A =
|
|
10155
|
+
(v === Ei || v === Ti) && (b < 0 ? A = $ - z : b > 0 && (T = I - z), k < 0 ? F = D - B : k > 0 && (P = S - B), v = na, N.attr("cursor", $n.selection), ct(at));
|
|
10156
10156
|
break;
|
|
10157
10157
|
}
|
|
10158
10158
|
default:
|
|
@@ -10167,11 +10167,11 @@ function i2(n) {
|
|
|
10167
10167
|
break;
|
|
10168
10168
|
}
|
|
10169
10169
|
case 18: {
|
|
10170
|
-
v === Ti && (b < 0 ? A =
|
|
10170
|
+
v === Ti && (b < 0 ? A = $ : b > 0 && (T = I), k < 0 ? F = D : k > 0 && (P = S), v = Ei, ct(at));
|
|
10171
10171
|
break;
|
|
10172
10172
|
}
|
|
10173
10173
|
case 32: {
|
|
10174
|
-
v === na && (at.altKey ? (b && (A =
|
|
10174
|
+
v === na && (at.altKey ? (b && (A = $ - z * b, T = I + z * b), k && (F = D - B * k, P = S + B * k), v = Ti) : (b < 0 ? A = $ : b > 0 && (T = I), k < 0 ? F = D : k > 0 && (P = S), v = Ei), N.attr("cursor", $n[x]), ct(at));
|
|
10175
10175
|
break;
|
|
10176
10176
|
}
|
|
10177
10177
|
default:
|
|
@@ -10210,7 +10210,7 @@ function Rt(n) {
|
|
|
10210
10210
|
return n;
|
|
10211
10211
|
};
|
|
10212
10212
|
}
|
|
10213
|
-
const tu = Math.abs, we = Math.atan2, ei = Math.cos, r2 = Math.max, oa = Math.min,
|
|
10213
|
+
const tu = Math.abs, we = Math.atan2, ei = Math.cos, r2 = Math.max, oa = Math.min, vn = Math.sin, Fe = Math.sqrt, ke = 1e-12, Xi = Math.PI, Zo = Xi / 2, Pr = 2 * Xi;
|
|
10214
10214
|
function o2(n) {
|
|
10215
10215
|
return n > 1 ? 0 : n < -1 ? Xi : Math.acos(n);
|
|
10216
10216
|
}
|
|
@@ -10313,8 +10313,8 @@ function p2(n, t, e, i, r, o, s, a) {
|
|
|
10313
10313
|
return u = (h * (t - o) - f * (n - r)) / u, [n + u * l, t + u * c];
|
|
10314
10314
|
}
|
|
10315
10315
|
function lo(n, t, e, i, r, o, s) {
|
|
10316
|
-
var a = n - e, l = t - i, c = (s ? o : -o) / Fe(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * Fe(r2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b,
|
|
10317
|
-
return E * E + P * P > S * S + w * w && (L =
|
|
10316
|
+
var a = n - e, l = t - i, c = (s ? o : -o) / Fe(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * Fe(r2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b, T = (M * v + x * C) / b, I = (-M * x + v * C) / b, E = L - g, P = _ - m, S = T - g, w = I - m;
|
|
10317
|
+
return E * E + P * P > S * S + w * w && (L = T, _ = I), {
|
|
10318
10318
|
cx: L,
|
|
10319
10319
|
cy: _,
|
|
10320
10320
|
x01: -h,
|
|
@@ -10329,30 +10329,30 @@ function Ae() {
|
|
|
10329
10329
|
var h, f, u = +n.apply(this, arguments), d = +t.apply(this, arguments), p = r.apply(this, arguments) - Zo, y = o.apply(this, arguments) - Zo, g = tu(y - p), m = y > p;
|
|
10330
10330
|
if (a || (a = h = l()), d < u && (f = d, d = u, u = f), !(d > ke)) a.moveTo(0, 0);
|
|
10331
10331
|
else if (g > Pr - ke)
|
|
10332
|
-
a.moveTo(d * ei(p), d *
|
|
10332
|
+
a.moveTo(d * ei(p), d * vn(p)), a.arc(0, 0, d, p, y, !m), u > ke && (a.moveTo(u * ei(y), u * vn(y)), a.arc(0, 0, u, y, p, m));
|
|
10333
10333
|
else {
|
|
10334
|
-
var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > ke && (i ? +i.apply(this, arguments) : Fe(u * u + d * d)),
|
|
10334
|
+
var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > ke && (i ? +i.apply(this, arguments) : Fe(u * u + d * d)), T = oa(tu(d - u) / 2, +e.apply(this, arguments)), I = T, E = T, P, S;
|
|
10335
10335
|
if (_ > ke) {
|
|
10336
|
-
var w = eu(_ / u *
|
|
10336
|
+
var w = eu(_ / u * vn(L)), A = eu(_ / d * vn(L));
|
|
10337
10337
|
(M -= w * 2) > ke ? (w *= m ? 1 : -1, b += w, k -= w) : (M = 0, b = k = (p + y) / 2), (C -= A * 2) > ke ? (A *= m ? 1 : -1, x += A, v -= A) : (C = 0, x = v = (p + y) / 2);
|
|
10338
10338
|
}
|
|
10339
|
-
var
|
|
10340
|
-
if (
|
|
10341
|
-
var z = d * ei(v), B = d *
|
|
10339
|
+
var $ = d * ei(x), R = d * vn(x), F = u * ei(k), D = u * vn(k);
|
|
10340
|
+
if (T > ke) {
|
|
10341
|
+
var z = d * ei(v), B = d * vn(v), H = u * ei(b), J = u * vn(b), X;
|
|
10342
10342
|
if (g < Xi)
|
|
10343
|
-
if (X = p2(
|
|
10344
|
-
var j =
|
|
10345
|
-
I = oa(
|
|
10343
|
+
if (X = p2($, R, H, J, z, B, F, D)) {
|
|
10344
|
+
var j = $ - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(o2((j * U + W * G) / (Fe(j * j + W * W) * Fe(U * U + G * G))) / 2), Y = Fe(X[0] * X[0] + X[1] * X[1]);
|
|
10345
|
+
I = oa(T, (u - Y) / (N - 1)), E = oa(T, (d - Y) / (N + 1));
|
|
10346
10346
|
} else
|
|
10347
10347
|
I = E = 0;
|
|
10348
10348
|
}
|
|
10349
|
-
C > ke ? E > ke ? (P = lo(H, J,
|
|
10349
|
+
C > ke ? E > ke ? (P = lo(H, J, $, R, d, E, m), S = lo(z, B, F, D, d, E, m), a.moveTo(P.cx + P.x01, P.cy + P.y01), E < T ? a.arc(P.cx, P.cy, E, we(P.y01, P.x01), we(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, E, we(P.y01, P.x01), we(P.y11, P.x11), !m), a.arc(0, 0, d, we(P.cy + P.y11, P.cx + P.x11), we(S.cy + S.y11, S.cx + S.x11), !m), a.arc(S.cx, S.cy, E, we(S.y11, S.x11), we(S.y01, S.x01), !m))) : (a.moveTo($, R), a.arc(0, 0, d, x, v, !m)) : a.moveTo($, R), !(u > ke) || !(M > ke) ? a.lineTo(F, D) : I > ke ? (P = lo(F, D, z, B, u, -I, m), S = lo($, R, H, J, u, -I, m), a.lineTo(P.cx + P.x01, P.cy + P.y01), I < T ? a.arc(P.cx, P.cy, I, we(P.y01, P.x01), we(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, I, we(P.y01, P.x01), we(P.y11, P.x11), !m), a.arc(0, 0, u, we(P.cy + P.y11, P.cx + P.x11), we(S.cy + S.y11, S.cx + S.x11), m), a.arc(S.cx, S.cy, I, we(S.y11, S.x11), we(S.y01, S.x01), !m))) : a.arc(0, 0, u, k, b, m);
|
|
10350
10350
|
}
|
|
10351
10351
|
if (a.closePath(), h) return a = null, h + "" || null;
|
|
10352
10352
|
}
|
|
10353
10353
|
return c.centroid = function() {
|
|
10354
10354
|
var h = (+n.apply(this, arguments) + +t.apply(this, arguments)) / 2, f = (+r.apply(this, arguments) + +o.apply(this, arguments)) / 2 - Xi / 2;
|
|
10355
|
-
return [ei(f) * h,
|
|
10355
|
+
return [ei(f) * h, vn(f) * h];
|
|
10356
10356
|
}, c.innerRadius = function(h) {
|
|
10357
10357
|
return arguments.length ? (n = typeof h == "function" ? h : Rt(+h), c) : n;
|
|
10358
10358
|
}, c.outerRadius = function(h) {
|
|
@@ -11335,7 +11335,7 @@ class D2 {
|
|
|
11335
11335
|
this.updateAxesDomains(), this.updateTooltipCategories(), this.renderAxes(), this.renderSeriesInstances(), this.renderStackLabels(), this.raiseplotLineLabels(), this.renderLegend(), this.fireEvent("render");
|
|
11336
11336
|
}
|
|
11337
11337
|
formatStackLabel(t, e) {
|
|
11338
|
-
return e.formatter ? e.formatter.call({ total: t }) : e.format ?
|
|
11338
|
+
return e.formatter ? e.formatter.call({ total: t }) : e.format ? fe(Kt(e.format, { total: t })) : this.options.chart.numberFormatter ? this.options.chart.numberFormatter(t) : Ms(t, 0, ".", ",");
|
|
11339
11339
|
}
|
|
11340
11340
|
renderStackLabels() {
|
|
11341
11341
|
if (this.stackLabelsGroup) {
|
|
@@ -11540,7 +11540,7 @@ class D2 {
|
|
|
11540
11540
|
const e = this.responsiveEngine.getRules();
|
|
11541
11541
|
let i = to(this.originalUserOptions);
|
|
11542
11542
|
for (const o of t.matchingIndices)
|
|
11543
|
-
i =
|
|
11543
|
+
i = ue(i, e[o].chartOptions);
|
|
11544
11544
|
const r = new li();
|
|
11545
11545
|
this.options = r.parse(i), this.state.updateConfig(this.options);
|
|
11546
11546
|
}
|
|
@@ -11582,11 +11582,11 @@ class D2 {
|
|
|
11582
11582
|
}
|
|
11583
11583
|
update(t, e = !0) {
|
|
11584
11584
|
var a;
|
|
11585
|
-
this.isResponsiveUpdate || (this.originalUserOptions =
|
|
11585
|
+
this.isResponsiveUpdate || (this.originalUserOptions = ue(
|
|
11586
11586
|
to(this.originalUserOptions),
|
|
11587
11587
|
t
|
|
11588
11588
|
));
|
|
11589
|
-
const i = new li(), r =
|
|
11589
|
+
const i = new li(), r = ue(this.optionsToExternal(), t);
|
|
11590
11590
|
(a = t.chart) != null && a.type && Array.isArray(r.series) && r.series.forEach((l, c) => {
|
|
11591
11591
|
var f, u;
|
|
11592
11592
|
const h = Array.isArray(t.series) ? (f = t.series[c]) == null ? void 0 : f.type : void 0;
|
|
@@ -11657,7 +11657,7 @@ class D2 {
|
|
|
11657
11657
|
const s = this.responsiveEngine.getRules();
|
|
11658
11658
|
let a = to(this.originalUserOptions);
|
|
11659
11659
|
for (const l of o.matchingIndices)
|
|
11660
|
-
a =
|
|
11660
|
+
a = ue(a, s[l].chartOptions);
|
|
11661
11661
|
this.isResponsiveUpdate = !0, this.update(a, !1), this.isResponsiveUpdate = !1;
|
|
11662
11662
|
}
|
|
11663
11663
|
}
|
|
@@ -11690,7 +11690,7 @@ class D2 {
|
|
|
11690
11690
|
this.setSize(r, o), this.createFixedAxisOverlay();
|
|
11691
11691
|
}
|
|
11692
11692
|
setTitle(t, e) {
|
|
11693
|
-
t && (this.options.title =
|
|
11693
|
+
t && (this.options.title = ue(this.options.title, t), this.originalUserOptions.title = ue(this.originalUserOptions.title || {}, t)), e && (this.options.subtitle = ue(this.options.subtitle, e), this.originalUserOptions.subtitle = ue(this.originalUserOptions.subtitle || {}, e)), this.renderTitles();
|
|
11694
11694
|
}
|
|
11695
11695
|
addAxis(t, e = !0, i = !0) {
|
|
11696
11696
|
const r = e ? this.options.xAxis : this.options.yAxis, o = { ...t, index: r.length, isX: e };
|
|
@@ -12056,7 +12056,7 @@ class Xt {
|
|
|
12056
12056
|
x: s.x ?? a,
|
|
12057
12057
|
y: s.y,
|
|
12058
12058
|
percentage: s._percentage
|
|
12059
|
-
}) : c.format ? h =
|
|
12059
|
+
}) : c.format ? h = fe(Kt(c.format, {
|
|
12060
12060
|
point: s,
|
|
12061
12061
|
series: { name: this.config.name ?? "" },
|
|
12062
12062
|
x: s.x,
|
|
@@ -12654,7 +12654,7 @@ class Dd extends Xt {
|
|
|
12654
12654
|
a.forEach((g, m) => {
|
|
12655
12655
|
const x = i.getPixelForValue(g.x ?? 0), v = r.getPixelForValue(g.y ?? 0), b = o.append("circle").attr("cx", x).attr("cy", v).attr("r", 0).attr("fill", g.color || e).attr("opacity", 0).attr("class", "katucharts-halo"), k = o.append("circle").attr("cx", x).attr("cy", v).attr("r", 0).attr("fill", g.color || e).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1).attr("class", "katucharts-hover-marker");
|
|
12656
12656
|
o.append("circle").attr("cx", x).attr("cy", v).attr("r", 15).attr("fill", "transparent").style("cursor", this.config.cursor || "pointer").on("mouseover", (C) => {
|
|
12657
|
-
var L, _,
|
|
12657
|
+
var L, _, T, I, E;
|
|
12658
12658
|
b.transition().duration(K).ease(Z).attr("r", c).attr("opacity", h), k.transition().duration(K).ease(Z).attr("r", s), this.context.events.emit("point:mouseover", {
|
|
12659
12659
|
point: g,
|
|
12660
12660
|
index: m,
|
|
@@ -12662,13 +12662,13 @@ class Dd extends Xt {
|
|
|
12662
12662
|
event: C,
|
|
12663
12663
|
plotX: x,
|
|
12664
12664
|
plotY: v
|
|
12665
|
-
}), (_ = (L = g.events) == null ? void 0 : L.mouseOver) == null || _.call(g, C), (E = (I = (
|
|
12665
|
+
}), (_ = (L = g.events) == null ? void 0 : L.mouseOver) == null || _.call(g, C), (E = (I = (T = this.config.point) == null ? void 0 : T.events) == null ? void 0 : I.mouseOver) == null || E.call(g, C);
|
|
12666
12666
|
}).on("mouseout", (C) => {
|
|
12667
|
-
var L, _,
|
|
12668
|
-
b.transition().duration(K).ease(Z).attr("r", 0).attr("opacity", 0), k.transition().duration(K).ease(Z).attr("r", 0), this.context.events.emit("point:mouseout", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.mouseOut) == null || _.call(g, C), (E = (I = (
|
|
12667
|
+
var L, _, T, I, E;
|
|
12668
|
+
b.transition().duration(K).ease(Z).attr("r", 0).attr("opacity", 0), k.transition().duration(K).ease(Z).attr("r", 0), this.context.events.emit("point:mouseout", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.mouseOut) == null || _.call(g, C), (E = (I = (T = this.config.point) == null ? void 0 : T.events) == null ? void 0 : I.mouseOut) == null || E.call(g, C);
|
|
12669
12669
|
}).on("click", (C) => {
|
|
12670
|
-
var L, _,
|
|
12671
|
-
this.context.events.emit("point:click", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.click) == null || _.call(g, C), (E = (I = (
|
|
12670
|
+
var L, _, T, I, E, P, S;
|
|
12671
|
+
this.context.events.emit("point:click", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.click) == null || _.call(g, C), (E = (I = (T = this.config.point) == null ? void 0 : T.events) == null ? void 0 : I.click) == null || E.call(g, C), (S = (P = this.config.events) == null ? void 0 : P.click) == null || S.call(this, C), this.handlePointSelect(k, g, m, C);
|
|
12672
12672
|
});
|
|
12673
12673
|
});
|
|
12674
12674
|
}
|
|
@@ -12763,9 +12763,9 @@ class zd extends Xt {
|
|
|
12763
12763
|
t.each((x, v, b) => {
|
|
12764
12764
|
const k = rt(b[v]), M = this.computeStackedStartParams(x, e, i, r, s, c), C = this.computeStackedRectParams(x, e, i, r, o, s, c, l);
|
|
12765
12765
|
x._rectParams = C, k.attr("d", this.rectParamsToPath(M, g, p, y)).transition().duration(m).ease(pt).delay(Ce(v, 0, Wt, e.length)).attrTween("d", () => {
|
|
12766
|
-
const L = oe(M.x, C.x), _ = oe(M.y, C.y),
|
|
12766
|
+
const L = oe(M.x, C.x), _ = oe(M.y, C.y), T = oe(M.w, C.w), I = oe(M.h, C.h);
|
|
12767
12767
|
return (E) => this.rectParamsToPath(
|
|
12768
|
-
{ x: L(E), y: _(E), w:
|
|
12768
|
+
{ x: L(E), y: _(E), w: T(E), h: I(E) },
|
|
12769
12769
|
g,
|
|
12770
12770
|
p,
|
|
12771
12771
|
y
|
|
@@ -12823,45 +12823,45 @@ class zd extends Xt {
|
|
|
12823
12823
|
}
|
|
12824
12824
|
updateStackedBars(t) {
|
|
12825
12825
|
const { xAxis: e, yAxis: i, plotArea: r } = this.context, o = this.getColor(), s = this.data, { barWidth: a, barOffset: l, baseline: c } = this.computeBarGeometry(), h = this.config.stacking, f = this.context.stackOffsets, u = h === "percent", d = this.config.crisp !== !1, p = aa(this.config.borderRadius), y = this.config.minPointLength ?? 0, g = u ? this.context.stackTotals : void 0, m = (_) => {
|
|
12826
|
-
const
|
|
12826
|
+
const T = _.x ?? 0, I = (f == null ? void 0 : f.get(T)) || 0, E = _.y ?? 0;
|
|
12827
12827
|
if (u && g) {
|
|
12828
|
-
const P = g.get(
|
|
12828
|
+
const P = g.get(T) || 1;
|
|
12829
12829
|
return (I + E) / P * 100;
|
|
12830
12830
|
}
|
|
12831
12831
|
return I + E;
|
|
12832
12832
|
}, x = (_) => {
|
|
12833
|
-
const
|
|
12833
|
+
const T = _.x ?? 0, I = (f == null ? void 0 : f.get(T)) || 0;
|
|
12834
12834
|
if (u && g) {
|
|
12835
|
-
const E = g.get(
|
|
12835
|
+
const E = g.get(T) || 1;
|
|
12836
12836
|
return I / E * 100;
|
|
12837
12837
|
}
|
|
12838
12838
|
return I;
|
|
12839
12839
|
};
|
|
12840
12840
|
if (h) {
|
|
12841
12841
|
const _ = this.context.stackTotals;
|
|
12842
|
-
for (const
|
|
12843
|
-
const I =
|
|
12844
|
-
if (_ && (
|
|
12842
|
+
for (const T of s) {
|
|
12843
|
+
const I = T.x ?? 0;
|
|
12844
|
+
if (_ && (T.total = _.get(I) || 0, T.stackTotal = _.get(I) || 0), u && _) {
|
|
12845
12845
|
const E = _.get(I) || 1;
|
|
12846
|
-
|
|
12846
|
+
T.percentage = (T.y ?? 0) / E * 100;
|
|
12847
12847
|
}
|
|
12848
12848
|
}
|
|
12849
12849
|
}
|
|
12850
12850
|
const v = this.context.totalSeriesOfType || 1, b = this.context.indexInType || 0, k = b === v - 1, M = b === 0, C = p, L = this.group.selectAll(".katucharts-column").data(s);
|
|
12851
|
-
L.each((_,
|
|
12852
|
-
const E = rt(I[
|
|
12851
|
+
L.each((_, T, I) => {
|
|
12852
|
+
const E = rt(I[T]), P = this.computeStackedRectParams(_, s, a, l, m, x, d, y), S = _._rectParams || P;
|
|
12853
12853
|
_._rectParams = P, E.transition().duration(t).attrTween("d", () => {
|
|
12854
|
-
const w = oe(S.x, P.x), A = oe(S.y, P.y),
|
|
12854
|
+
const w = oe(S.x, P.x), A = oe(S.y, P.y), $ = oe(S.w, P.w), R = oe(S.h, P.h);
|
|
12855
12855
|
return (F) => this.rectParamsToPath(
|
|
12856
|
-
{ x: w(F), y: A(F), w:
|
|
12856
|
+
{ x: w(F), y: A(F), w: $(F), h: R(F) },
|
|
12857
12857
|
C,
|
|
12858
12858
|
k,
|
|
12859
12859
|
M
|
|
12860
12860
|
);
|
|
12861
|
-
}).attr("fill", this.getPointColor(_,
|
|
12862
|
-
}), L.enter().append("path").attr("class", "katucharts-column").attr("stroke", (_) => _.borderColor || this.config.borderColor || "none").attr("stroke-width", (_) => _.borderWidth ?? this.config.borderWidth ?? 0).attr("fill", (_,
|
|
12861
|
+
}).attr("fill", this.getPointColor(_, T, o));
|
|
12862
|
+
}), L.enter().append("path").attr("class", "katucharts-column").attr("stroke", (_) => _.borderColor || this.config.borderColor || "none").attr("stroke-width", (_) => _.borderWidth ?? this.config.borderWidth ?? 0).attr("fill", (_, T) => this.getPointColor(_, T, o)).each((_, T, I) => {
|
|
12863
12863
|
const E = this.computeStackedRectParams(_, s, a, l, m, x, d, y);
|
|
12864
|
-
_._rectParams = E, rt(I[
|
|
12864
|
+
_._rectParams = E, rt(I[T]).attr("d", this.rectParamsToPath(E, C, k, M));
|
|
12865
12865
|
}), L.exit().transition().duration(t).attr("opacity", 0).remove(), this.group.selectAll(".katucharts-data-labels").remove(), this.attachHoverEffects(this.group.selectAll(".katucharts-column"), s), this.renderColumnDataLabels(s, a, l, c, m, x);
|
|
12866
12866
|
}
|
|
12867
12867
|
computeBarGeometry() {
|
|
@@ -12922,7 +12922,7 @@ class zd extends Xt {
|
|
|
12922
12922
|
if (this.config.enableMouseTracking === !1) return;
|
|
12923
12923
|
const { xAxis: i, yAxis: r } = this.context, o = !!this.config.stacking, s = ((f = (h = this.config.states) == null ? void 0 : h.hover) == null ? void 0 : f.brightness) ?? (o ? 0.2 : 0.1), a = (d = (u = this.config.states) == null ? void 0 : u.hover) == null ? void 0 : d.color, l = (y = (p = this.config.states) == null ? void 0 : p.hover) == null ? void 0 : y.borderColor, c = (m = (g = this.config.states) == null ? void 0 : g.hover) == null ? void 0 : m.borderWidth;
|
|
12924
12924
|
t.style("cursor", this.config.cursor || "pointer").on("mouseover", (x, v) => {
|
|
12925
|
-
var E, P, S, w, A,
|
|
12925
|
+
var E, P, S, w, A, $, R;
|
|
12926
12926
|
const b = x.currentTarget, k = b.getAttribute("fill") || "";
|
|
12927
12927
|
b.setAttribute("data-orig-fill", k);
|
|
12928
12928
|
const C = rt(b).interrupt("hover").transition("hover").duration(K).ease(Z);
|
|
@@ -12935,23 +12935,23 @@ class zd extends Xt {
|
|
|
12935
12935
|
}).interrupt("stackDim").transition("stackDim").duration(Ko).ease(Z).attr("opacity", 0.3));
|
|
12936
12936
|
b.setAttribute("data-orig-stroke", b.getAttribute("stroke") || ""), b.setAttribute("data-orig-stroke-width", b.getAttribute("stroke-width") || ""), C.style("stroke", "#ffffff").style("stroke-width", "2");
|
|
12937
12937
|
}
|
|
12938
|
-
const L = e.indexOf(v), _ = i.getPixelForValue(v.x ?? 0),
|
|
12938
|
+
const L = e.indexOf(v), _ = i.getPixelForValue(v.x ?? 0), T = r.getPixelForValue(v.y ?? 0), I = this.context.inverted;
|
|
12939
12939
|
this.context.events.emit("point:mouseover", {
|
|
12940
12940
|
point: v,
|
|
12941
12941
|
index: L,
|
|
12942
12942
|
series: this,
|
|
12943
12943
|
event: x,
|
|
12944
|
-
plotX: I ?
|
|
12945
|
-
plotY: I ? _ :
|
|
12946
|
-
}), (w = (S = v.events) == null ? void 0 : S.mouseOver) == null || w.call(v, x), (R = (
|
|
12944
|
+
plotX: I ? T : _,
|
|
12945
|
+
plotY: I ? _ : T
|
|
12946
|
+
}), (w = (S = v.events) == null ? void 0 : S.mouseOver) == null || w.call(v, x), (R = ($ = (A = this.config.point) == null ? void 0 : A.events) == null ? void 0 : $.mouseOver) == null || R.call(v, x);
|
|
12947
12947
|
}).on("mouseout", (x, v) => {
|
|
12948
|
-
var _,
|
|
12948
|
+
var _, T, I, E, P, S, w;
|
|
12949
12949
|
const b = x.currentTarget, k = b.getAttribute("data-orig-fill") || "", C = rt(b).interrupt("hover").transition("hover").duration(K).ease(Z);
|
|
12950
12950
|
if (C.style("fill", k), b.style.filter = "", o) {
|
|
12951
12951
|
const A = this.context.allSeries;
|
|
12952
12952
|
if (A)
|
|
12953
|
-
for (const
|
|
12954
|
-
|
|
12953
|
+
for (const $ of A)
|
|
12954
|
+
$.visible && ((_ = $.config) != null && _.stacking) && ((T = $.group) == null || T.selectAll(".katucharts-column").interrupt("stackDim").transition("stackDim").duration(Ko).ease(Z).attr("opacity", 1));
|
|
12955
12955
|
C.style("stroke", b.getAttribute("data-orig-stroke") || "").style("stroke-width", b.getAttribute("data-orig-stroke-width") || "");
|
|
12956
12956
|
} else
|
|
12957
12957
|
C.style("stroke", "").style("stroke-width", "");
|
|
@@ -12961,9 +12961,9 @@ class zd extends Xt {
|
|
|
12961
12961
|
const L = e.indexOf(v);
|
|
12962
12962
|
this.context.events.emit("point:mouseout", { point: v, index: L, series: this, event: x }), (E = (I = v.events) == null ? void 0 : I.mouseOut) == null || E.call(v, x), (w = (S = (P = this.config.point) == null ? void 0 : P.events) == null ? void 0 : S.mouseOut) == null || w.call(v, x);
|
|
12963
12963
|
}).on("click", (x, v) => {
|
|
12964
|
-
var C, L, _,
|
|
12964
|
+
var C, L, _, T, I, E, P;
|
|
12965
12965
|
const b = e.indexOf(v);
|
|
12966
|
-
this.context.events.emit("point:click", { point: v, index: b, series: this, event: x }), (L = (C = v.events) == null ? void 0 : C.click) == null || L.call(v, x), (I = (
|
|
12966
|
+
this.context.events.emit("point:click", { point: v, index: b, series: this, event: x }), (L = (C = v.events) == null ? void 0 : C.click) == null || L.call(v, x), (I = (T = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : T.click) == null || I.call(v, x), (P = (E = this.config.events) == null ? void 0 : E.click) == null || P.call(this, x);
|
|
12967
12967
|
const k = x.currentTarget, M = rt(k);
|
|
12968
12968
|
this.handlePointSelect(M, v, b, x);
|
|
12969
12969
|
});
|
|
@@ -13033,7 +13033,10 @@ class q2 extends Xt {
|
|
|
13033
13033
|
}).attr("stroke-width", (p) => {
|
|
13034
13034
|
var y, g;
|
|
13035
13035
|
return ((y = p.marker) == null ? void 0 : y.lineWidth) ?? ((g = this.config.marker) == null ? void 0 : g.lineWidth) ?? 1;
|
|
13036
|
-
}).attr("opacity", this.config.opacity ?? 1).merge(u).
|
|
13036
|
+
}).attr("opacity", this.config.opacity ?? 1).merge(u).attr("fill", (p) => this.getPointFill(p, o)).attr("stroke", (p) => {
|
|
13037
|
+
var y, g;
|
|
13038
|
+
return ((y = p.marker) == null ? void 0 : y.lineColor) ?? ((g = this.config.marker) == null ? void 0 : g.lineColor) ?? o;
|
|
13039
|
+
}).transition().duration(t).attr("cx", (p, y) => this.cachedPositions[y].cx).attr("cy", (p, y) => this.cachedPositions[y].cy).attr("r", (p) => {
|
|
13037
13040
|
var y;
|
|
13038
13041
|
return ((y = p.marker) == null ? void 0 : y.radius) ?? a;
|
|
13039
13042
|
});
|
|
@@ -13045,7 +13048,10 @@ class q2 extends Xt {
|
|
|
13045
13048
|
}).attr("stroke-width", (y) => {
|
|
13046
13049
|
var g, m;
|
|
13047
13050
|
return ((g = y.marker) == null ? void 0 : g.lineWidth) ?? ((m = this.config.marker) == null ? void 0 : m.lineWidth) ?? 1;
|
|
13048
|
-
}).attr("opacity", this.config.opacity ?? 1).merge(d).
|
|
13051
|
+
}).attr("opacity", this.config.opacity ?? 1).merge(d).attr("fill", (y) => this.getPointFill(y, o)).attr("stroke", (y) => {
|
|
13052
|
+
var g, m;
|
|
13053
|
+
return ((g = y.marker) == null ? void 0 : g.lineColor) ?? ((m = this.config.marker) == null ? void 0 : m.lineColor) ?? o;
|
|
13054
|
+
}).transition().duration(t).attr(
|
|
13049
13055
|
"transform",
|
|
13050
13056
|
(y, g) => `translate(${this.cachedPositions[g].cx},${this.cachedPositions[g].cy})`
|
|
13051
13057
|
).attr("d", (y) => {
|
|
@@ -13113,10 +13119,10 @@ class q2 extends Xt {
|
|
|
13113
13119
|
return this.group.insert("circle", ".katucharts-scatter-point").attr("cx", this.cachedPositions[k].cx).attr("cy", this.cachedPositions[k].cy).attr("r", 0).attr("fill", b.color || ((M = this.config.marker) == null ? void 0 : M.fillColor) || o).attr("opacity", 0).attr("class", "katucharts-halo");
|
|
13114
13120
|
});
|
|
13115
13121
|
t.on("mouseover", (b, k) => {
|
|
13116
|
-
var E, P, S, w, A,
|
|
13122
|
+
var E, P, S, w, A, $, R, F, D, z, B, H, J, X;
|
|
13117
13123
|
const M = b.currentTarget, C = e.indexOf(k);
|
|
13118
13124
|
C >= 0 && p[C] && p[C].transition("halo").duration(K).ease(Z).attr("r", u).attr("opacity", d);
|
|
13119
|
-
const L = ((E = k.marker) == null ? void 0 : E.radius) ?? i, _ = ((w = (S = (P = k.marker) == null ? void 0 : P.states) == null ? void 0 : S.hover) == null ? void 0 : w.radius) ?? ((R = (
|
|
13125
|
+
const L = ((E = k.marker) == null ? void 0 : E.radius) ?? i, _ = ((w = (S = (P = k.marker) == null ? void 0 : P.states) == null ? void 0 : S.hover) == null ? void 0 : w.radius) ?? ((R = ($ = (A = this.config.marker) == null ? void 0 : A.states) == null ? void 0 : $.hover) == null ? void 0 : R.radius) ?? L + 3, I = rt(M).interrupt("hover").transition("hover").duration(K).ease(Z);
|
|
13120
13126
|
if (s === "circle")
|
|
13121
13127
|
I.attr("r", _);
|
|
13122
13128
|
else if (a) {
|
|
@@ -13135,18 +13141,18 @@ class q2 extends Xt {
|
|
|
13135
13141
|
var I, E, P, S, w, A;
|
|
13136
13142
|
const M = b.currentTarget, C = e.indexOf(k);
|
|
13137
13143
|
C >= 0 && p[C] && p[C].transition("halo").duration(K).ease(Z).attr("r", 0).attr("opacity", 0);
|
|
13138
|
-
const L = ((I = k.marker) == null ? void 0 : I.radius) ?? i,
|
|
13144
|
+
const L = ((I = k.marker) == null ? void 0 : I.radius) ?? i, T = rt(M).interrupt("hover").transition("hover").duration(K).ease(Z);
|
|
13139
13145
|
if (s === "circle")
|
|
13140
|
-
|
|
13146
|
+
T.attr("r", L);
|
|
13141
13147
|
else if (a) {
|
|
13142
|
-
const
|
|
13143
|
-
|
|
13148
|
+
const $ = Math.PI * L * L;
|
|
13149
|
+
T.attr("d", en().type(a).size($)());
|
|
13144
13150
|
}
|
|
13145
|
-
M.style.filter = "",
|
|
13151
|
+
M.style.filter = "", T.style("fill", null).style("stroke-width", null), this.context.events.emit("point:mouseout", { point: k, index: C, series: this, event: b }), (P = (E = k.events) == null ? void 0 : E.mouseOut) == null || P.call(k, b), (A = (w = (S = this.config.point) == null ? void 0 : S.events) == null ? void 0 : w.mouseOut) == null || A.call(k, b);
|
|
13146
13152
|
}).on("click", (b, k) => {
|
|
13147
|
-
var C, L, _,
|
|
13153
|
+
var C, L, _, T, I, E, P;
|
|
13148
13154
|
const M = e.indexOf(k);
|
|
13149
|
-
this.context.events.emit("point:click", { point: k, index: M, series: this, event: b }), (L = (C = k.events) == null ? void 0 : C.click) == null || L.call(k, b), (I = (
|
|
13155
|
+
this.context.events.emit("point:click", { point: k, index: M, series: this, event: b }), (L = (C = k.events) == null ? void 0 : C.click) == null || L.call(k, b), (I = (T = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : T.click) == null || I.call(k, b), (P = (E = this.config.events) == null ? void 0 : E.click) == null || P.call(this, b), this.handlePointSelect(rt(b.currentTarget), k, M, b);
|
|
13150
13156
|
});
|
|
13151
13157
|
}
|
|
13152
13158
|
}
|
|
@@ -13307,23 +13313,23 @@ class au extends Xt {
|
|
|
13307
13313
|
}
|
|
13308
13314
|
render() {
|
|
13309
13315
|
var G, N, Y, O, ct, it, ft, dt, at, ot;
|
|
13310
|
-
const { plotArea: t, colors: e } = this.context, i = this.config.ignoreHiddenPoint !== !1, r = this.data.filter((q) => q.y !== null && q.y !== void 0 && (q.y ?? 0) > 0), o = i ? r.filter((q) => q.visible !== !1) : r, s = this.context.animate, a = this.dataLabelConfigs().filter((q) => (q.distance ?? 30) >= 0), l = a.length > 0, c = l ? Math.max(...a.map((q) => (q.distance ?? 30) + 10)) : 0, h = this.config.center || ["50%", "50%"], f = this.resolvePercent(h[0], t.width), u = this.resolvePercent(h[1], t.height), d = t.width - c * 2, p = t.height - c, y = Math.min(d, p), g = Math.min(t.width, t.height), m = this.config.size !== void 0 && this.config.size !== null, x = m ? this.resolvePercent(this.config.size, g) : y, v = this.config.minSize ? this.resolvePercent(this.config.minSize, g) : 0, k = Math.max(l ? Math.min(x, y) : m ? x : g, v) / 2, M = this.resolvePercent(this.config.innerSize || 0, k * 2) / 2, C = this.config.depth ?? 0, L = (this.config.startAngle ?? 0) * Math.PI / 180, _ = this.config.endAngle !== void 0 ? this.config.endAngle * Math.PI / 180 : L + 2 * Math.PI,
|
|
13311
|
-
if (
|
|
13316
|
+
const { plotArea: t, colors: e } = this.context, i = this.config.ignoreHiddenPoint !== !1, r = this.data.filter((q) => q.y !== null && q.y !== void 0 && (q.y ?? 0) > 0), o = i ? r.filter((q) => q.visible !== !1) : r, s = this.context.animate, a = this.dataLabelConfigs().filter((q) => (q.distance ?? 30) >= 0), l = a.length > 0, c = l ? Math.max(...a.map((q) => (q.distance ?? 30) + 10)) : 0, h = this.config.center || ["50%", "50%"], f = this.resolvePercent(h[0], t.width), u = this.resolvePercent(h[1], t.height), d = t.width - c * 2, p = t.height - c, y = Math.min(d, p), g = Math.min(t.width, t.height), m = this.config.size !== void 0 && this.config.size !== null, x = m ? this.resolvePercent(this.config.size, g) : y, v = this.config.minSize ? this.resolvePercent(this.config.minSize, g) : 0, k = Math.max(l ? Math.min(x, y) : m ? x : g, v) / 2, M = this.resolvePercent(this.config.innerSize || 0, k * 2) / 2, C = this.config.depth ?? 0, L = (this.config.startAngle ?? 0) * Math.PI / 180, _ = this.config.endAngle !== void 0 ? this.config.endAngle * Math.PI / 180 : L + 2 * Math.PI, T = o.reduce((q, st) => q + (st.y ?? 0), 0), I = this.config.fillColor;
|
|
13317
|
+
if (T === 0 && I) {
|
|
13312
13318
|
const q = this.group.append("g").attr("transform", `translate(${f},${u})`), st = Ae().innerRadius(M).outerRadius(k).startAngle(L).endAngle(_);
|
|
13313
13319
|
q.append("path").attr("d", st({})).attr("fill", I);
|
|
13314
13320
|
return;
|
|
13315
13321
|
}
|
|
13316
|
-
const E = x2().value((q) => q.y ?? 0).sort(null).startAngle(L).endAngle(_), P = this.resolveBorderRadius(this.config.borderRadius), S = Ae().innerRadius(M).outerRadius(k).cornerRadius(P), w = this.config.slicedOffset ?? 10, A = Ae().innerRadius(M).outerRadius(k + w * 0.4).cornerRadius(P),
|
|
13317
|
-
for (const q of
|
|
13318
|
-
q.data.percentage = (q.endAngle - q.startAngle) / R * 100, q.data.total =
|
|
13322
|
+
const E = x2().value((q) => q.y ?? 0).sort(null).startAngle(L).endAngle(_), P = this.resolveBorderRadius(this.config.borderRadius), S = Ae().innerRadius(M).outerRadius(k).cornerRadius(P), w = this.config.slicedOffset ?? 10, A = Ae().innerRadius(M).outerRadius(k + w * 0.4).cornerRadius(P), $ = E(o), R = _ - L;
|
|
13323
|
+
for (const q of $)
|
|
13324
|
+
q.data.percentage = (q.endAngle - q.startAngle) / R * 100, q.data.total = T;
|
|
13319
13325
|
const F = this.group.append("g").attr("transform", `translate(${f},${u})`);
|
|
13320
|
-
C > 0 && this.render3DEffect(F,
|
|
13326
|
+
C > 0 && this.render3DEffect(F, $, M, k, C);
|
|
13321
13327
|
const D = this.config.allowPointSelect === !0;
|
|
13322
13328
|
(N = (G = this.config.states) == null ? void 0 : G.hover) == null || N.brightness;
|
|
13323
13329
|
const z = (O = (Y = this.config.states) == null ? void 0 : Y.select) == null ? void 0 : O.color, B = (it = (ct = this.config.states) == null ? void 0 : ct.select) == null ? void 0 : it.borderColor, H = (dt = (ft = this.config.states) == null ? void 0 : ft.select) == null ? void 0 : dt.borderWidth, J = ((ot = (at = this.config.states) == null ? void 0 : at.inactive) == null ? void 0 : ot.opacity) ?? 0.4, X = (q, st) => q.data.color ? q.data.color : this.config.colors ? this.config.colors[st % this.config.colors.length] : e[st % e.length], j = (q) => {
|
|
13324
13330
|
const st = (q.startAngle + q.endAngle) / 2, wt = w * Math.sin(st), Ct = -w * Math.cos(st);
|
|
13325
13331
|
return `translate(${wt},${Ct})`;
|
|
13326
|
-
}, W = this, U = F.selectAll(".katucharts-pie-slice").data(
|
|
13332
|
+
}, W = this, U = F.selectAll(".katucharts-pie-slice").data($).join("path").attr("class", "katucharts-pie-slice").attr("fill", (q, st) => X(q, st)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("opacity", this.config.opacity ?? 1).style("cursor", this.config.cursor || "pointer");
|
|
13327
13333
|
U.each(function(q, st) {
|
|
13328
13334
|
const wt = rt(this);
|
|
13329
13335
|
(q.data.sliced || W.selectedIndices.has(st)) && wt.attr("transform", j(q));
|
|
@@ -13332,7 +13338,7 @@ class au extends Xt {
|
|
|
13332
13338
|
wt.transition().duration(bt).ease(pt).delay(Ld + st * Wt).attrTween("d", () => (_t) => S(kt(_t)));
|
|
13333
13339
|
}) : U.attr("d", S), this.config.enableMouseTracking !== !1 && U.on("mouseover", function(q, st) {
|
|
13334
13340
|
var Vt, Nt, Ot, jt, ee;
|
|
13335
|
-
const wt = rt(this), Ct =
|
|
13341
|
+
const wt = rt(this), Ct = $.indexOf(st);
|
|
13336
13342
|
W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", A(st)), wt.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), U.interrupt("highlight"), U.attr("opacity", W.config.opacity ?? 1), U.filter((Tt) => Tt !== st).transition("highlight").duration(K).ease(Z).attr("opacity", J);
|
|
13337
13343
|
const _t = S.centroid(st);
|
|
13338
13344
|
W.context.events.emit("point:mouseover", {
|
|
@@ -13345,19 +13351,19 @@ class au extends Xt {
|
|
|
13345
13351
|
}), (Nt = (Vt = st.data.events) == null ? void 0 : Vt.mouseOver) == null || Nt.call(st.data, q), (ee = (jt = (Ot = W.config.point) == null ? void 0 : Ot.events) == null ? void 0 : jt.mouseOver) == null || ee.call(st.data, q);
|
|
13346
13352
|
}).on("mouseout", function(q, st) {
|
|
13347
13353
|
var _t, Vt, Nt, Ot, jt;
|
|
13348
|
-
const wt = rt(this), Ct =
|
|
13354
|
+
const wt = rt(this), Ct = $.indexOf(st);
|
|
13349
13355
|
W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Ct, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (jt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || jt.call(st.data, q);
|
|
13350
13356
|
}).on("click", function(q, st) {
|
|
13351
|
-
var Ct, kt, _t, Vt, Nt, Ot, jt, ee, Tt, Zt,
|
|
13352
|
-
const wt =
|
|
13357
|
+
var Ct, kt, _t, Vt, Nt, Ot, jt, ee, Tt, Zt, ce, Ve, le, mn;
|
|
13358
|
+
const wt = $.indexOf(st);
|
|
13353
13359
|
D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Ct = st.data.events) == null ? void 0 : Ct.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (jt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || jt.call(st.data, q), (Zt = (Tt = (ee = W.config.point) == null ? void 0 : ee.events) == null ? void 0 : Tt.select) == null || Zt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(De, ze) {
|
|
13354
13360
|
const Ze = rt(this);
|
|
13355
13361
|
W.selectedIndices.has(ze) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(De, ze)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
|
|
13356
|
-
})), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (
|
|
13362
|
+
})), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (ce = st.data.events) == null ? void 0 : ce.click) == null || Ve.call(st.data, q), (mn = (le = W.config.events) == null ? void 0 : le.click) == null || mn.call(W, q);
|
|
13357
13363
|
});
|
|
13358
13364
|
for (const q of this.dataLabelConfigs())
|
|
13359
|
-
this.renderPieLabels(F,
|
|
13360
|
-
s && this.emitAfterAnimate(bt +
|
|
13365
|
+
this.renderPieLabels(F, $, S, k, _ - L, q);
|
|
13366
|
+
s && this.emitAfterAnimate(bt + $.length * Wt);
|
|
13361
13367
|
}
|
|
13362
13368
|
renderPieLabels(t, e, i, r, o, s) {
|
|
13363
13369
|
var L, _;
|
|
@@ -13365,27 +13371,27 @@ class au extends Xt {
|
|
|
13365
13371
|
const a = this.context.plotArea.width, l = this.context.plotArea.height, c = a / 2, h = l / 2, f = s.distance ?? 30, u = s.connectorWidth ?? 1, d = s.connectorColor || "#999", p = s.connectorPadding ?? 5;
|
|
13366
13372
|
s.softConnector;
|
|
13367
13373
|
const y = ((L = s.style) == null ? void 0 : L.fontSize) || Mt, g = s.color || ((_ = s.style) == null ? void 0 : _.color) || Pe, m = s.alignTo, x = f < 0, v = Me(y), b = v * 1.4, k = [], { colors: M } = this.context;
|
|
13368
|
-
if (e.forEach((
|
|
13369
|
-
const E =
|
|
13370
|
-
let
|
|
13371
|
-
(m === "plotEdges" || m === "connectors") && (
|
|
13374
|
+
if (e.forEach((T, I) => {
|
|
13375
|
+
const E = T.data.percentage, P = i.centroid(T), S = (T.startAngle + T.endAngle) / 2, w = T.data.color || (this.config.colors ? this.config.colors[I % this.config.colors.length] : M[I % M.length]), A = r + f;
|
|
13376
|
+
let $ = A * Math.sin(S), R = -A * Math.cos(S);
|
|
13377
|
+
(m === "plotEdges" || m === "connectors") && ($ = S < Math.PI ? c - 5 : -(c - 5));
|
|
13372
13378
|
let F, D;
|
|
13373
|
-
const z = {
|
|
13379
|
+
const z = { ...T.data, color: w };
|
|
13374
13380
|
s.formatter ? F = s.formatter.call({
|
|
13375
13381
|
point: z,
|
|
13376
13382
|
series: { name: this.config.name },
|
|
13377
|
-
x:
|
|
13378
|
-
y:
|
|
13383
|
+
x: T.data.x,
|
|
13384
|
+
y: T.data.y,
|
|
13379
13385
|
percentage: E
|
|
13380
13386
|
}) : s.format ? F = Kt(s.format, {
|
|
13381
13387
|
point: z,
|
|
13382
13388
|
series: { name: this.config.name }
|
|
13383
|
-
}) : F =
|
|
13389
|
+
}) : F = T.data.name || String(T.data.y);
|
|
13384
13390
|
const B = /(?:^|[\s;"'])color\s*:\s*([^;"'>]+)/i.exec(F);
|
|
13385
|
-
B && (D = pd(B[1], w)), F =
|
|
13391
|
+
B && (D = pd(B[1], w)), F = fe(F), k.push({ lx: $, ly: R, text: F, midAngle: S, centroid: P, percentage: E, data: T.data, visible: !0, color: w, inlineColor: D });
|
|
13386
13392
|
}), !x && !s.allowOverlap) {
|
|
13387
|
-
const
|
|
13388
|
-
this.distribute(
|
|
13393
|
+
const T = k.filter((P) => P.midAngle < Math.PI), I = k.filter((P) => P.midAngle >= Math.PI);
|
|
13394
|
+
this.distribute(T, b, h, c, y), this.distribute(I, b, h, c, y);
|
|
13389
13395
|
const E = r + f;
|
|
13390
13396
|
for (const P of k) {
|
|
13391
13397
|
if (!P.visible) continue;
|
|
@@ -13393,20 +13399,20 @@ class au extends Xt {
|
|
|
13393
13399
|
P.lx = A ? Math.max(w, r * 0.3) : -Math.max(w, r * 0.3);
|
|
13394
13400
|
}
|
|
13395
13401
|
} else if (x && !s.allowOverlap) {
|
|
13396
|
-
const
|
|
13402
|
+
const T = [], I = k.filter((E) => E.visible).sort((E, P) => P.percentage - E.percentage);
|
|
13397
13403
|
for (const E of I) {
|
|
13398
|
-
const P = tn(E.text, v), S = v * 1.1, w = E.centroid[0], A = E.centroid[1],
|
|
13399
|
-
if (
|
|
13404
|
+
const P = tn(E.text, v), S = v * 1.1, w = E.centroid[0], A = E.centroid[1], $ = { l: w - P / 2, r: w + P / 2, t: A - S / 2, b: A + S / 2 };
|
|
13405
|
+
if (T.some((F) => $.l < F.r && $.r > F.l && $.t < F.b && $.b > F.t)) {
|
|
13400
13406
|
E.visible = !1;
|
|
13401
13407
|
continue;
|
|
13402
13408
|
}
|
|
13403
|
-
|
|
13409
|
+
T.push($);
|
|
13404
13410
|
}
|
|
13405
13411
|
}
|
|
13406
13412
|
const C = t.append("g").attr("class", "katucharts-pie-labels");
|
|
13407
|
-
k.forEach((
|
|
13408
|
-
if (
|
|
13409
|
-
const { lx: I, ly: E, text: P, midAngle: S, centroid: w, color: A, inlineColor:
|
|
13413
|
+
k.forEach((T) => {
|
|
13414
|
+
if (!T.visible) return;
|
|
13415
|
+
const { lx: I, ly: E, text: P, midAngle: S, centroid: w, color: A, inlineColor: $ } = T, R = S < Math.PI, F = A || d;
|
|
13410
13416
|
if (u > 0 && f >= 0) {
|
|
13411
13417
|
const B = r + p, H = B * Math.sin(S), J = -B * Math.cos(S), X = s.connectorShape || "fixedOffset";
|
|
13412
13418
|
if (X === "straight")
|
|
@@ -13426,7 +13432,7 @@ class au extends Xt {
|
|
|
13426
13432
|
C.append("path").attr("class", "katucharts-pie-connector").attr("d", `M${H},${J}L${W},${U}L${I},${E}`).attr("fill", "none").attr("stroke", F).attr("stroke-width", u);
|
|
13427
13433
|
}
|
|
13428
13434
|
}
|
|
13429
|
-
const D = C.append("text").attr("x", (x ? w[0] : I) + (s.x ?? 0)).attr("y", (x ? w[1] : E) + (s.y ?? 0)).attr("text-anchor", x ? "middle" : R ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", y).attr("fill",
|
|
13435
|
+
const D = C.append("text").attr("x", (x ? w[0] : I) + (s.x ?? 0)).attr("y", (x ? w[1] : E) + (s.y ?? 0)).attr("text-anchor", x ? "middle" : R ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", y).attr("fill", $ || g).style("pointer-events", "none").text(P), z = s.style || {};
|
|
13430
13436
|
z.fontWeight && D.attr("font-weight", z.fontWeight), z.fontFamily && D.attr("font-family", z.fontFamily), z.textOutline && D.style("text-shadow", z.textOutline);
|
|
13431
13437
|
});
|
|
13432
13438
|
}
|
|
@@ -13518,7 +13524,7 @@ class Bd extends Xt {
|
|
|
13518
13524
|
var p, y;
|
|
13519
13525
|
const { plotArea: t, colors: e } = this.context, i = this.data.filter((g) => g.y !== null && g.y !== void 0), r = this.context.animate, o = t.height * 0.8, s = o / i.length, a = Math.max(...i.map((g) => g.y ?? 0), 1), l = t.width / 2, c = t.width * 0.7, h = c * 0.15, f = (t.height - o) / 2, u = ((y = (p = this.config.states) == null ? void 0 : p.inactive) == null ? void 0 : y.opacity) ?? 0.4, d = [];
|
|
13520
13526
|
i.forEach((g, m) => {
|
|
13521
|
-
var
|
|
13527
|
+
var T, I, E;
|
|
13522
13528
|
const x = (g.y ?? 0) / a, v = m < i.length - 1 ? (i[m + 1].y ?? 0) / a : x * 0.5, b = h + (c - h) * x, k = h + (c - h) * v, M = f + m * s, C = [
|
|
13523
13529
|
`M ${l - b / 2} ${M}`,
|
|
13524
13530
|
`L ${l + b / 2} ${M}`,
|
|
@@ -13526,7 +13532,7 @@ class Bd extends Xt {
|
|
|
13526
13532
|
`L ${l - k / 2} ${M + s}`,
|
|
13527
13533
|
"Z"
|
|
13528
13534
|
].join(" "), L = g.color || e[m % e.length], _ = this.group.append("path").attr("d", C).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("class", "katucharts-funnel-segment").style("cursor", this.config.cursor || "pointer");
|
|
13529
|
-
if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(Ce(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), (
|
|
13535
|
+
if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(Ce(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), (T = this.config.dataLabels) != null && T.enabled) {
|
|
13530
13536
|
const P = this.config.dataLabels, S = ((I = P.style) == null ? void 0 : I.fontSize) || Mt, w = P.color || ((E = P.style) == null ? void 0 : E.color) || Pe;
|
|
13531
13537
|
let A;
|
|
13532
13538
|
P.formatter ? A = P.formatter.call({
|
|
@@ -13534,15 +13540,15 @@ class Bd extends Xt {
|
|
|
13534
13540
|
series: { name: this.config.name },
|
|
13535
13541
|
x: g.x,
|
|
13536
13542
|
y: g.y
|
|
13537
|
-
}) : P.format ? A =
|
|
13543
|
+
}) : P.format ? A = fe(Kt(P.format, {
|
|
13538
13544
|
point: g,
|
|
13539
13545
|
series: { name: this.config.name }
|
|
13540
13546
|
})) : A = g.name || String(g.y), this.group.append("text").attr("class", "katucharts-funnel-label").attr("x", l + (P.x ?? 0)).attr("y", M + s / 2 + (P.y ?? 0)).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-size", S).attr("fill", w).style("pointer-events", "none").text(A);
|
|
13541
13547
|
}
|
|
13542
13548
|
this.config.enableMouseTracking !== !1 && _.on("mouseover", (P) => {
|
|
13543
13549
|
var S, w;
|
|
13544
|
-
_.transition("move").duration(K).ease(Z).attr("transform", "translate(0, -3)").style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), d.forEach((A) => A.interrupt("highlight")), d.forEach((A) => A.attr("opacity", 1)), d.forEach((A,
|
|
13545
|
-
|
|
13550
|
+
_.transition("move").duration(K).ease(Z).attr("transform", "translate(0, -3)").style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), d.forEach((A) => A.interrupt("highlight")), d.forEach((A) => A.attr("opacity", 1)), d.forEach((A, $) => {
|
|
13551
|
+
$ !== m && A.transition("highlight").duration(K).ease(Z).attr("opacity", u);
|
|
13546
13552
|
}), this.context.events.emit("point:mouseover", {
|
|
13547
13553
|
point: g,
|
|
13548
13554
|
index: m,
|
|
@@ -13555,8 +13561,8 @@ class Bd extends Xt {
|
|
|
13555
13561
|
var S, w;
|
|
13556
13562
|
_.transition("move").duration(K).ease(Z).attr("transform", "").style("filter", ""), d.forEach((A) => A.interrupt("highlight")), d.forEach((A) => A.transition("highlight").duration(K).ease(Z).attr("opacity", 1)), this.context.events.emit("point:mouseout", { point: g, index: m, series: this, event: P }), (w = (S = g.events) == null ? void 0 : S.mouseOut) == null || w.call(g, P);
|
|
13557
13563
|
}).on("click", (P) => {
|
|
13558
|
-
var S, w, A,
|
|
13559
|
-
this.context.events.emit("point:click", { point: g, index: m, series: this, event: P }), (w = (S = g.events) == null ? void 0 : S.click) == null || w.call(g, P), (
|
|
13564
|
+
var S, w, A, $;
|
|
13565
|
+
this.context.events.emit("point:click", { point: g, index: m, series: this, event: P }), (w = (S = g.events) == null ? void 0 : S.click) == null || w.call(g, P), ($ = (A = this.config.events) == null ? void 0 : A.click) == null || $.call(this, P);
|
|
13560
13566
|
});
|
|
13561
13567
|
});
|
|
13562
13568
|
}
|
|
@@ -13686,37 +13692,37 @@ class yw extends Xt {
|
|
|
13686
13692
|
var S, w;
|
|
13687
13693
|
const { plotArea: t } = this.context, e = this.context.animate, i = this.data, r = this.config.colorAxis || {}, o = i.map((A) => A.value ?? A.z ?? A.y ?? 0).filter((A) => A != null), s = r.min ?? (o.length > 0 ? Math.min(...o) : 0), a = r.max ?? (o.length > 0 ? Math.max(...o) : 1), l = this.config.nullColor ?? "#e4e4e4", c = ((w = (S = this.config.states) == null ? void 0 : S.inactive) == null ? void 0 : w.opacity) ?? 0.4, h = this.buildColorScale(r, s, a), f = this.config.interpolation === !0, u = this.config.colsize ?? 1, d = this.config.rowsize ?? 1, p = this.config.pointPadding ?? 0, y = this.getUniqueValues("x"), g = this.getUniqueValues("yCategory"), m = y.length > 0 && g.length > 0, x = m ? t.width / y.length : t.width / Math.max(1, Math.ceil((Math.max(...i.map((A) => A.x ?? 0)) + u) / u)), v = m ? t.height / g.length : t.height / Math.max(1, Math.ceil((Math.max(...i.map((A) => A.y ?? 0)) + d) / d)), b = (A) => {
|
|
13688
13694
|
if (A.color) return A.color;
|
|
13689
|
-
const
|
|
13690
|
-
return
|
|
13691
|
-
}, k = (A) => m ? (typeof A.x == "number" ? A.x : 0) * x : (A.x ?? 0) / u * x, M = (A) => m ? (typeof A.yCategory == "number" ? A.yCategory : typeof A.y == "number" ? A.y : 0) * v : (A.y ?? 0) / d * v, C = p * x, L = p * v, _ = x * u - (this.config.borderWidth ?? 1),
|
|
13695
|
+
const $ = A.value ?? A.z ?? A.y;
|
|
13696
|
+
return $ == null ? l : h($);
|
|
13697
|
+
}, k = (A) => m ? (typeof A.x == "number" ? A.x : 0) * x : (A.x ?? 0) / u * x, M = (A) => m ? (typeof A.yCategory == "number" ? A.yCategory : typeof A.y == "number" ? A.y : 0) * v : (A.y ?? 0) / d * v, C = p * x, L = p * v, _ = x * u - (this.config.borderWidth ?? 1), T = v * d - (this.config.borderWidth ?? 1), I = Math.max(1, (m ? x - 1 : _) - C * 2), E = Math.max(1, (m ? v - 1 : T) - L * 2);
|
|
13692
13698
|
if (f) {
|
|
13693
13699
|
this.renderInterpolated(i, t, h, l, k, M, x, v, b), this.renderHeatmapLabels(i, k, M, x, v, b), this.renderColorAxis(h, s, a);
|
|
13694
13700
|
return;
|
|
13695
13701
|
}
|
|
13696
13702
|
const P = this.group.selectAll(".katucharts-heatmap-cell").data(i).join("rect").attr("class", "katucharts-heatmap-cell").attr("x", (A) => k(A) + C).attr("y", (A) => M(A) + L).attr("width", I).attr("height", E).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("rx", mw(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
|
|
13697
|
-
e ? P.attr("fill", "#fff").transition().duration(600).delay((A,
|
|
13703
|
+
e ? P.attr("fill", "#fff").transition().duration(600).delay((A, $) => $ * 8).attr("fill", (A) => b(A)) : P.attr("fill", (A) => b(A)), this.config.enableMouseTracking !== !1 && P.on("mouseover", (A, $) => {
|
|
13698
13704
|
var H, J, X, j;
|
|
13699
|
-
const R = rt(A.currentTarget), F = b(
|
|
13700
|
-
R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", D).attr("stroke", "#333").attr("stroke-width", 2), R.style("filter", "drop-shadow(0 1px 3px rgba(0,0,0,0.3))"), P.interrupt("highlight"), P.attr("opacity", 1), P.filter((W) => W !==
|
|
13701
|
-
const z = i.indexOf(
|
|
13705
|
+
const R = rt(A.currentTarget), F = b($), D = ((J = (H = se(F)) == null ? void 0 : H.brighter(0.4)) == null ? void 0 : J.toString()) || F;
|
|
13706
|
+
R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", D).attr("stroke", "#333").attr("stroke-width", 2), R.style("filter", "drop-shadow(0 1px 3px rgba(0,0,0,0.3))"), P.interrupt("highlight"), P.attr("opacity", 1), P.filter((W) => W !== $).transition("highlight").duration(K).ease(Z).attr("opacity", c);
|
|
13707
|
+
const z = i.indexOf($), B = $.value ?? $.z ?? $.y;
|
|
13702
13708
|
this.context.events.emit("point:mouseover", {
|
|
13703
|
-
point: {
|
|
13709
|
+
point: { ...$, value: B },
|
|
13704
13710
|
index: z,
|
|
13705
13711
|
series: this,
|
|
13706
13712
|
event: A,
|
|
13707
|
-
plotX: k(
|
|
13708
|
-
plotY: M(
|
|
13709
|
-
}), (j = (X =
|
|
13710
|
-
}).on("mouseout", (A,
|
|
13713
|
+
plotX: k($) + x / 2,
|
|
13714
|
+
plotY: M($) + v / 2
|
|
13715
|
+
}), (j = (X = $.events) == null ? void 0 : X.mouseOver) == null || j.call($, A);
|
|
13716
|
+
}).on("mouseout", (A, $) => {
|
|
13711
13717
|
var D, z;
|
|
13712
13718
|
const R = rt(A.currentTarget);
|
|
13713
|
-
R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", b(
|
|
13714
|
-
const F = i.indexOf(
|
|
13715
|
-
this.context.events.emit("point:mouseout", { point:
|
|
13716
|
-
}).on("click", (A,
|
|
13719
|
+
R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", b($)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1), R.style("filter", ""), P.interrupt("highlight"), P.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
|
|
13720
|
+
const F = i.indexOf($);
|
|
13721
|
+
this.context.events.emit("point:mouseout", { point: $, index: F, series: this, event: A }), (z = (D = $.events) == null ? void 0 : D.mouseOut) == null || z.call($, A);
|
|
13722
|
+
}).on("click", (A, $) => {
|
|
13717
13723
|
var F, D, z, B;
|
|
13718
|
-
const R = i.indexOf(
|
|
13719
|
-
this.context.events.emit("point:click", { point:
|
|
13724
|
+
const R = i.indexOf($);
|
|
13725
|
+
this.context.events.emit("point:click", { point: $, index: R, series: this, event: A }), (D = (F = $.events) == null ? void 0 : F.click) == null || D.call($, A), (B = (z = this.config.events) == null ? void 0 : z.click) == null || B.call(this, A);
|
|
13720
13726
|
}), this.renderHeatmapLabels(i, k, M, x, v, b), this.renderColorAxis(h, s, a);
|
|
13721
13727
|
}
|
|
13722
13728
|
renderInterpolated(t, e, i, r, o, s, a, l, c) {
|
|
@@ -13727,8 +13733,8 @@ class yw extends Xt {
|
|
|
13727
13733
|
if (p === 0 || y === 0) return;
|
|
13728
13734
|
const g = /* @__PURE__ */ new Map();
|
|
13729
13735
|
for (const L of t) {
|
|
13730
|
-
const _ = L.value ?? L.z ?? L.y,
|
|
13731
|
-
_ != null && g.set(`${
|
|
13736
|
+
const _ = L.value ?? L.z ?? L.y, T = u.indexOf(L.x ?? 0), I = d.indexOf(L.yCategory ?? L.y ?? 0);
|
|
13737
|
+
_ != null && g.set(`${T},${I}`, _);
|
|
13732
13738
|
}
|
|
13733
13739
|
const m = Math.round(e.width), x = Math.round(e.height), v = document.createElement("canvas");
|
|
13734
13740
|
v.width = m, v.height = x;
|
|
@@ -13737,13 +13743,13 @@ class yw extends Xt {
|
|
|
13737
13743
|
const k = b.createImageData(m, x), M = k.data;
|
|
13738
13744
|
for (let L = 0; L < x; L++)
|
|
13739
13745
|
for (let _ = 0; _ < m; _++) {
|
|
13740
|
-
const
|
|
13746
|
+
const T = _ / m * p - 0.5, I = L / x * y - 0.5, E = Math.floor(T), P = Math.floor(I), S = T - E, w = I - P, A = (W, U) => g.get(`${Math.max(0, Math.min(p - 1, W))},${Math.max(0, Math.min(y - 1, U))}`) ?? null, $ = A(E, P), R = A(E + 1, P), F = A(E, P + 1), D = A(E + 1, P + 1), z = [$, R, F, D].filter((W) => W !== null);
|
|
13741
13747
|
if (z.length === 0) {
|
|
13742
13748
|
const W = Xe(r), U = (L * m + _) * 4;
|
|
13743
13749
|
M[U] = W.r, M[U + 1] = W.g, M[U + 2] = W.b, M[U + 3] = 255;
|
|
13744
13750
|
continue;
|
|
13745
13751
|
}
|
|
13746
|
-
const B = (W) => W ?? z[0], H = B(
|
|
13752
|
+
const B = (W) => W ?? z[0], H = B($) * (1 - S) * (1 - w) + B(R) * S * (1 - w) + B(F) * (1 - S) * w + B(D) * S * w, J = i(H), X = Xe(J), j = (L * m + _) * 4;
|
|
13747
13753
|
M[j] = X.r, M[j + 1] = X.g, M[j + 2] = X.b, M[j + 3] = 255;
|
|
13748
13754
|
}
|
|
13749
13755
|
b.putImageData(k, 0, 0);
|
|
@@ -13794,17 +13800,17 @@ class yw extends Xt {
|
|
|
13794
13800
|
(x.length === 0 || x[0] > e) && x.unshift(e), x[x.length - 1] < i && x.push(i);
|
|
13795
13801
|
const v = g >= 1 ? 0 : g >= 0.1 ? 1 : 2;
|
|
13796
13802
|
if (r.dataClasses && r.dataClasses.length > 0) {
|
|
13797
|
-
const M = r.dataClasses, C = Math.min(o.width * 0.6, 300), L = 12, _ = (o.width - C) / 2,
|
|
13803
|
+
const M = r.dataClasses, C = Math.min(o.width * 0.6, 300), L = 12, _ = (o.width - C) / 2, T = o.height + 60, I = C / M.length;
|
|
13798
13804
|
for (let E = 0; E < M.length; E++) {
|
|
13799
13805
|
const P = M[E];
|
|
13800
|
-
c.append("rect").attr("x", _ + E * I).attr("y",
|
|
13806
|
+
c.append("rect").attr("x", _ + E * I).attr("y", T).attr("width", I).attr("height", L).attr("fill", P.color || "#ccc").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", E === 0 ? 2 : 0).attr("ry", E === 0 ? 2 : 0), P.name && c.append("text").attr("x", _ + E * I + I / 2).attr("y", T + L + 30).attr("font-size", f).attr("fill", u).attr("text-anchor", "middle").text(P.name);
|
|
13801
13807
|
}
|
|
13802
13808
|
return;
|
|
13803
13809
|
}
|
|
13804
13810
|
if (a) {
|
|
13805
|
-
const C = Math.min(o.height * 0.7, 200), L = o.width + 20, _ = (o.height - C) / 2,
|
|
13811
|
+
const C = Math.min(o.height * 0.7, 200), L = o.width + 20, _ = (o.height - C) / 2, T = c.append("defs"), I = x.length - 1, E = C / I;
|
|
13806
13812
|
for (let P = 0; P < I; P++) {
|
|
13807
|
-
const S = I - 1 - P, w = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, A =
|
|
13813
|
+
const S = I - 1 - P, w = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, A = T.append("linearGradient").attr("id", w).attr("x1", "0%").attr("y1", "0%").attr("x2", "0%").attr("y2", "100%");
|
|
13808
13814
|
A.append("stop").attr("offset", "0%").attr("stop-color", t(x[S + 1])), A.append("stop").attr("offset", "100%").attr("stop-color", t(x[S])), c.append("rect").attr("x", L).attr("y", _ + P * E).attr("width", 12).attr("height", E + 0.5).attr("fill", `url(#${w})`).attr("stroke", "none");
|
|
13809
13815
|
}
|
|
13810
13816
|
c.append("rect").attr("x", L).attr("y", _).attr("width", 12).attr("height", C).attr("fill", "none").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", 2);
|
|
@@ -13813,9 +13819,9 @@ class yw extends Xt {
|
|
|
13813
13819
|
c.append("line").attr("x1", L + 12).attr("y1", S).attr("x2", L + 12 + 4).attr("y2", S).attr("stroke", "#999").attr("stroke-width", 0.5), c.append("text").attr("x", L + 12 + 7).attr("y", S + 4).attr("font-size", f).attr("fill", u).attr("text-anchor", "start").text(x[P].toFixed(v));
|
|
13814
13820
|
}
|
|
13815
13821
|
} else {
|
|
13816
|
-
const C = Math.min(o.width * 0.6, 300), L = (o.width - C) / 2, _ = o.height + 60,
|
|
13822
|
+
const C = Math.min(o.width * 0.6, 300), L = (o.width - C) / 2, _ = o.height + 60, T = c.append("defs"), I = x.length - 1, E = C / I;
|
|
13817
13823
|
for (let P = 0; P < I; P++) {
|
|
13818
|
-
const S = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, w =
|
|
13824
|
+
const S = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, w = T.append("linearGradient").attr("id", S).attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
|
|
13819
13825
|
w.append("stop").attr("offset", "0%").attr("stop-color", t(x[P])), w.append("stop").attr("offset", "100%").attr("stop-color", t(x[P + 1])), c.append("rect").attr("x", L + P * E).attr("y", _).attr("width", E + 0.5).attr("height", 12).attr("fill", `url(#${S})`).attr("stroke", "none");
|
|
13820
13826
|
}
|
|
13821
13827
|
c.append("rect").attr("x", L).attr("y", _).attr("width", C).attr("height", 12).attr("fill", "none").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", 2);
|
|
@@ -13839,7 +13845,7 @@ class yw extends Xt {
|
|
|
13839
13845
|
series: { name: this.config.name },
|
|
13840
13846
|
x: d.x,
|
|
13841
13847
|
y: d.y
|
|
13842
|
-
}) : a.format ?
|
|
13848
|
+
}) : a.format ? fe(Kt(a.format, {
|
|
13843
13849
|
point: { ...d, value: p },
|
|
13844
13850
|
series: { name: this.config.name },
|
|
13845
13851
|
x: d.x,
|
|
@@ -13870,13 +13876,13 @@ class bw extends Xt {
|
|
|
13870
13876
|
render() {
|
|
13871
13877
|
const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.getColor(), o = this.data, s = this.context.animate, { boxWidth: a, boxOffset: l } = this.computeBoxGeometry(), c = this.config.medianColor || null, h = this.config.medianWidth ?? 2, f = sn(this.config.medianDashStyle), u = this.config.stemWidth ?? 1, d = sn(this.config.stemDashStyle), p = this.config.whiskerWidth ?? 2, y = sn(this.config.whiskerDashStyle), g = this.parseWhiskerLength(this.config.whiskerLength, a), m = sn(this.config.boxDashStyle), x = this.config.lineWidth ?? 1, b = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
|
|
13872
13878
|
for (let k = 0; k < o.length; k++) {
|
|
13873
|
-
const M = o[k], C = t.getPixelForValue(M.x ?? k) + l + a / 2, L = M.low ?? 0, _ = M.q1 ?? M.low ?? 0,
|
|
13879
|
+
const M = o[k], C = t.getPixelForValue(M.x ?? k) + l + a / 2, L = M.low ?? 0, _ = M.q1 ?? M.low ?? 0, T = M.median ?? M.y ?? 0, I = M.q3 ?? M.high ?? 0, E = M.high ?? 0, P = e.getPixelForValue((L + E) / 2), S = M.color || this.getPointColor(k, r), w = this.config.fillColor ?? "transparent", A = this.config.stemColor || S, $ = this.config.whiskerColor || S, R = this.group.append("g").attr("class", "katucharts-boxplot-point").style("cursor", this.config.cursor || "pointer"), F = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), D = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), z = R.append("rect").attr("x", C - a / 2).attr("width", a).attr("fill", w).attr("stroke", S).attr("stroke-width", x).attr("stroke-dasharray", m).attr("rx", xw(this.config.borderRadius)), B = R.append("line").attr("x1", C - a / 2).attr("x2", C + a / 2).attr("stroke", c || this.config.lineColor || S).attr("stroke-width", h).attr("stroke-dasharray", f), H = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y), J = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y);
|
|
13874
13880
|
if (s) {
|
|
13875
13881
|
const X = Ce(k, 0, Wt, o.length), j = b;
|
|
13876
|
-
F.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(pt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(
|
|
13882
|
+
F.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(pt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
|
|
13877
13883
|
} else
|
|
13878
|
-
F.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", e.getPixelForValue(
|
|
13879
|
-
this.attachBoxPointEvents(R, M, k, C, e.getPixelForValue(
|
|
13884
|
+
F.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
|
|
13885
|
+
this.attachBoxPointEvents(R, M, k, C, e.getPixelForValue(T), x);
|
|
13880
13886
|
}
|
|
13881
13887
|
this.renderDataLabels(
|
|
13882
13888
|
o,
|
|
@@ -13885,26 +13891,26 @@ class bw extends Xt {
|
|
|
13885
13891
|
), s && this.emitAfterAnimate(b + o.length * Wt);
|
|
13886
13892
|
}
|
|
13887
13893
|
animateUpdate(t) {
|
|
13888
|
-
const { xAxis: e, yAxis: i } = this.context, r = this.data, { boxWidth:
|
|
13889
|
-
if (
|
|
13894
|
+
const { xAxis: e, yAxis: i } = this.context, r = this.getColor(), o = this.data, { boxWidth: s, boxOffset: a } = this.computeBoxGeometry(), c = this.group.selectAll(".katucharts-boxplot-point").nodes();
|
|
13895
|
+
if (c.length !== o.length) {
|
|
13890
13896
|
this.group.selectAll("*").remove(), this.render();
|
|
13891
13897
|
return;
|
|
13892
13898
|
}
|
|
13893
|
-
for (let
|
|
13894
|
-
const
|
|
13895
|
-
if (
|
|
13896
|
-
const
|
|
13897
|
-
this.group.select(() =>
|
|
13899
|
+
for (let h = 0; h < Math.min(c.length, o.length); h++) {
|
|
13900
|
+
const f = o[h], u = c[h], d = e.getPixelForValue(f.x ?? h) + a + s / 2, p = f.low ?? 0, y = f.q1 ?? f.low ?? 0, g = f.median ?? f.y ?? 0, m = f.q3 ?? f.high ?? 0, x = f.high ?? 0, v = f.color || this.getPointColor(h, r), b = this.config.stemColor || v, k = this.config.whiskerColor || v, M = this.config.medianColor || this.config.lineColor || v, C = this.config.fillColor ?? "transparent", L = u.querySelectorAll("line"), _ = u.querySelector("rect");
|
|
13901
|
+
if (L[0] && this.group.select(() => L[0]).attr("stroke", b).transition().duration(t).attr("x1", d).attr("x2", d).attr("y1", i.getPixelForValue(p)).attr("y2", i.getPixelForValue(y)), L[1] && this.group.select(() => L[1]).attr("stroke", b).transition().duration(t).attr("x1", d).attr("x2", d).attr("y1", i.getPixelForValue(m)).attr("y2", i.getPixelForValue(x)), _ && this.group.select(() => _).attr("stroke", v).attr("fill", C).transition().duration(t).attr("x", d - s / 2).attr("y", i.getPixelForValue(m)).attr("height", Math.abs(i.getPixelForValue(y) - i.getPixelForValue(m))), L[2] && this.group.select(() => L[2]).attr("stroke", M).transition().duration(t).attr("x1", d - s / 2).attr("x2", d + s / 2).attr("y1", i.getPixelForValue(g)).attr("y2", i.getPixelForValue(g)), L[3]) {
|
|
13902
|
+
const T = this.parseWhiskerLength(this.config.whiskerLength, s);
|
|
13903
|
+
this.group.select(() => L[3]).attr("stroke", k).transition().duration(t).attr("x1", d - T / 2).attr("x2", d + T / 2).attr("y1", i.getPixelForValue(p)).attr("y2", i.getPixelForValue(p));
|
|
13898
13904
|
}
|
|
13899
|
-
if (
|
|
13900
|
-
const
|
|
13901
|
-
this.group.select(() =>
|
|
13905
|
+
if (L[4]) {
|
|
13906
|
+
const T = this.parseWhiskerLength(this.config.whiskerLength, s);
|
|
13907
|
+
this.group.select(() => L[4]).attr("stroke", k).transition().duration(t).attr("x1", d - T / 2).attr("x2", d + T / 2).attr("y1", i.getPixelForValue(x)).attr("y2", i.getPixelForValue(x));
|
|
13902
13908
|
}
|
|
13903
13909
|
}
|
|
13904
13910
|
this.group.selectAll(".katucharts-data-labels").remove(), this.renderDataLabels(
|
|
13905
|
-
|
|
13906
|
-
(
|
|
13907
|
-
(
|
|
13911
|
+
o,
|
|
13912
|
+
(h, f) => e.getPixelForValue(h.x ?? f) + a + s / 2,
|
|
13913
|
+
(h) => i.getPixelForValue(h.high ?? h.y ?? 0)
|
|
13908
13914
|
);
|
|
13909
13915
|
}
|
|
13910
13916
|
computeBoxGeometry() {
|
|
@@ -14509,8 +14515,8 @@ function ck(n, t, e, i, r) {
|
|
|
14509
14515
|
b - c[k - 1] < c[k] - b && f + 1 < k && --k;
|
|
14510
14516
|
var L = c[k] - v, _ = d - L;
|
|
14511
14517
|
if (g - p > m - y) {
|
|
14512
|
-
var
|
|
14513
|
-
h(f, k, L, p, y,
|
|
14518
|
+
var T = d ? (p * _ + g * L) / d : g;
|
|
14519
|
+
h(f, k, L, p, y, T, m), h(k, u, _, T, y, g, m);
|
|
14514
14520
|
} else {
|
|
14515
14521
|
var I = d ? (y * _ + m * L) / d : m;
|
|
14516
14522
|
h(f, k, L, p, y, g, I), h(k, u, _, p, I, g, m);
|
|
@@ -14526,10 +14532,10 @@ function lk(n, t, e) {
|
|
|
14526
14532
|
let a = 0, l;
|
|
14527
14533
|
for (; (l = s.exec(r)) !== null; ) {
|
|
14528
14534
|
if (l.index > a) {
|
|
14529
|
-
const d =
|
|
14535
|
+
const d = fe(r.slice(a, l.index));
|
|
14530
14536
|
d && o.push({ text: d, fontSize: t, fontWeight: e });
|
|
14531
14537
|
}
|
|
14532
|
-
const c = l[1] || "", h = c.match(/font-size\s*:\s*([^;"]+)/i), f = c.match(/font-weight\s*:\s*([^;"]+)/i), u =
|
|
14538
|
+
const c = l[1] || "", h = c.match(/font-size\s*:\s*([^;"]+)/i), f = c.match(/font-weight\s*:\s*([^;"]+)/i), u = fe(l[2]);
|
|
14533
14539
|
u && o.push({
|
|
14534
14540
|
text: u,
|
|
14535
14541
|
fontSize: h ? h[1].trim() : t,
|
|
@@ -14537,7 +14543,7 @@ function lk(n, t, e) {
|
|
|
14537
14543
|
}), a = l.index + l[0].length;
|
|
14538
14544
|
}
|
|
14539
14545
|
if (a < r.length) {
|
|
14540
|
-
const c =
|
|
14546
|
+
const c = fe(r.slice(a));
|
|
14541
14547
|
c && o.push({ text: c, fontSize: t, fontWeight: e });
|
|
14542
14548
|
}
|
|
14543
14549
|
return o;
|
|
@@ -14551,8 +14557,8 @@ class uk extends Xt {
|
|
|
14551
14557
|
super(t), this.currentRoot = null;
|
|
14552
14558
|
}
|
|
14553
14559
|
render() {
|
|
14554
|
-
var
|
|
14555
|
-
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = this.config.levels || [], s = this.config.colorByPoint !== !1, a = this.config.allowTraversingTree === !0 || this.config.allowDrillToNode === !0, l = this.config.interactByLeaf ?? !a, c = this.config.alternateStartingDirection === !0, h = ((I = (
|
|
14560
|
+
var T, I, E;
|
|
14561
|
+
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = this.config.levels || [], s = this.config.colorByPoint !== !1, a = this.config.allowTraversingTree === !0 || this.config.allowDrillToNode === !0, l = this.config.interactByLeaf ?? !a, c = this.config.alternateStartingDirection === !0, h = ((I = (T = this.config.states) == null ? void 0 : T.inactive) == null ? void 0 : I.opacity) ?? 0.4, f = this.buildHierarchy(r), u = a && this.currentRoot ? this.currentRoot : f, d = {
|
|
14556
14562
|
squarify: Po,
|
|
14557
14563
|
squarified: Po,
|
|
14558
14564
|
binary: ck,
|
|
@@ -14563,19 +14569,19 @@ class uk extends Xt {
|
|
|
14563
14569
|
strip: Er,
|
|
14564
14570
|
stripes: Er
|
|
14565
14571
|
}, p = this.config.layoutAlgorithm || "squarified", y = d[p] || Po, g = this.config.layoutStartingDirection || "vertical", m = this.config.opacity ?? 1, x = c || p === "sliceAndDice" || p === "sliceDice" ? mr : y, v = (P, S) => {
|
|
14566
|
-
var
|
|
14567
|
-
const w = ((
|
|
14572
|
+
var $, R;
|
|
14573
|
+
const w = (($ = P.data) == null ? void 0 : $.sortIndex) ?? 0, A = ((R = S.data) == null ? void 0 : R.sortIndex) ?? 0;
|
|
14568
14574
|
return w !== A ? w - A : (S.value || 0) - (P.value || 0);
|
|
14569
14575
|
};
|
|
14570
14576
|
u.sort(v), ak().size([t.width, t.height]).tile(x).padding(1)(u);
|
|
14571
14577
|
const b = a && !l && u.children || u.leaves(), k = (P) => o.find((S) => S.level === P), C = (((E = this.config.colorAxis) == null ? void 0 : E.dataClasses) || []).map((P) => P.color), L = (P, S) => {
|
|
14572
|
-
var A,
|
|
14578
|
+
var A, $, R, F, D;
|
|
14573
14579
|
if (P.data.color) return P.data.color;
|
|
14574
14580
|
const w = k(P.depth);
|
|
14575
14581
|
if (w != null && w.color) {
|
|
14576
14582
|
const z = w.colorVariation;
|
|
14577
14583
|
if ((z == null ? void 0 : z.key) === "brightness" && ((A = P.parent) != null && A.children)) {
|
|
14578
|
-
const B = P.parent.children, H = B.indexOf(P), J = B.length, X = J > 1 ? -0.5 + H / (J - 1) * (z.to ?? 0.5) : 0, j = di(((
|
|
14584
|
+
const B = P.parent.children, H = B.indexOf(P), J = B.length, X = J > 1 ? -0.5 + H / (J - 1) * (z.to ?? 0.5) : 0, j = di((($ = se(w.color)) == null ? void 0 : $.toString()) || w.color);
|
|
14579
14585
|
return j.l = Math.max(0.1, Math.min(0.95, j.l + X * 0.3)), j.toString();
|
|
14580
14586
|
}
|
|
14581
14587
|
return w.color;
|
|
@@ -14603,7 +14609,7 @@ class uk extends Xt {
|
|
|
14603
14609
|
}).attr("rx", hk(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
|
|
14604
14610
|
i ? _.attr("opacity", 0).transition().duration(bt).ease(pt).delay((P, S) => Ce(S, 0, Wt, b.length)).attr("opacity", m) : m !== 1 && _.attr("opacity", m), this.config.enableMouseTracking !== !1 && _.on("mouseover", (P, S) => {
|
|
14605
14611
|
var D, z, B, H, J, X;
|
|
14606
|
-
const w = rt(P.currentTarget), A = w.attr("fill"),
|
|
14612
|
+
const w = rt(P.currentTarget), A = w.attr("fill"), $ = ((z = (D = this.config.states) == null ? void 0 : D.hover) == null ? void 0 : z.brightness) ?? 0.3, R = ((H = (B = se(A)) == null ? void 0 : B.brighter($)) == null ? void 0 : H.toString()) || A;
|
|
14607
14613
|
w.transition("fill").duration(K).ease(Z).attr("fill", R), w.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), _.interrupt("highlight"), _.attr("opacity", 1), _.filter((j) => j !== S).transition("highlight").duration(K).ease(Z).attr("opacity", h);
|
|
14608
14614
|
const F = b.indexOf(S);
|
|
14609
14615
|
this.context.events.emit("point:mouseover", {
|
|
@@ -14616,16 +14622,16 @@ class uk extends Xt {
|
|
|
14616
14622
|
}), (X = (J = S.data.events) == null ? void 0 : J.mouseOver) == null || X.call(S.data, P);
|
|
14617
14623
|
}).on("mouseout", (P, S) => {
|
|
14618
14624
|
var R, F;
|
|
14619
|
-
const w = rt(P.currentTarget), A = b.indexOf(S),
|
|
14620
|
-
w.transition("fill").duration(K).ease(Z).attr("fill",
|
|
14625
|
+
const w = rt(P.currentTarget), A = b.indexOf(S), $ = L(S, A);
|
|
14626
|
+
w.transition("fill").duration(K).ease(Z).attr("fill", $), w.style("filter", ""), _.interrupt("highlight"), _.transition("highlight").duration(K).ease(Z).attr("opacity", 1), this.context.events.emit("point:mouseout", { point: S.data, index: A, series: this, event: P }), (F = (R = S.data.events) == null ? void 0 : R.mouseOut) == null || F.call(S.data, P);
|
|
14621
14627
|
}).on("click", (P, S) => {
|
|
14622
|
-
var A,
|
|
14628
|
+
var A, $, R, F;
|
|
14623
14629
|
const w = b.indexOf(S);
|
|
14624
14630
|
if (a && S.children) {
|
|
14625
14631
|
this.currentRoot = S, this.group.selectAll("*").remove(), this.render();
|
|
14626
14632
|
return;
|
|
14627
14633
|
}
|
|
14628
|
-
this.context.events.emit("point:click", { point: S.data, index: w, series: this, event: P }), (
|
|
14634
|
+
this.context.events.emit("point:click", { point: S.data, index: w, series: this, event: P }), ($ = (A = S.data.events) == null ? void 0 : A.click) == null || $.call(S.data, P), (F = (R = this.config.events) == null ? void 0 : R.click) == null || F.call(this, P);
|
|
14629
14635
|
}), a && this.currentRoot && this.currentRoot !== f && this.renderBreadcrumbs(t, f), this.renderLabels(b, k);
|
|
14630
14636
|
}
|
|
14631
14637
|
buildHierarchy(t) {
|
|
@@ -14691,21 +14697,21 @@ class uk extends Xt {
|
|
|
14691
14697
|
const L = l === "right" ? "end" : l === "center" ? "middle" : "start";
|
|
14692
14698
|
let _;
|
|
14693
14699
|
c === "bottom" ? _ = y.y1 - f : c === "middle" ? _ = (y.y0 + y.y1) / 2 : _ = y.y0 + f;
|
|
14694
|
-
const
|
|
14700
|
+
const T = this.group.append("text").attr("class", "katucharts-treemap-label").attr("x", C).attr("text-anchor", L).attr("fill", Dn(y._color, s)).style("pointer-events", "none");
|
|
14695
14701
|
let I = _;
|
|
14696
14702
|
M.forEach((P, S) => {
|
|
14697
14703
|
if (P.length === 0) return;
|
|
14698
|
-
const w = P.map((
|
|
14699
|
-
I += A, P.forEach((
|
|
14700
|
-
const F =
|
|
14704
|
+
const w = P.map(($) => Me($.fontSize)), A = Math.max(...w) * 1.15;
|
|
14705
|
+
I += A, P.forEach(($, R) => {
|
|
14706
|
+
const F = T.append("tspan").attr("font-size", $.fontSize).attr("font-weight", $.fontWeight).text($.text);
|
|
14701
14707
|
R === 0 && F.attr("x", C).attr("y", I);
|
|
14702
14708
|
});
|
|
14703
|
-
}), this.context.animate &&
|
|
14704
|
-
const E =
|
|
14709
|
+
}), this.context.animate && T.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Jn + g * Wt).attr("opacity", 1);
|
|
14710
|
+
const E = T.node();
|
|
14705
14711
|
if (E)
|
|
14706
14712
|
try {
|
|
14707
14713
|
const P = E.getBBox();
|
|
14708
|
-
(P.height + f > b || P.width + h > v) && P.height > b - f &&
|
|
14714
|
+
(P.height + f > b || P.width + h > v) && P.height > b - f && T.remove();
|
|
14709
14715
|
} catch {
|
|
14710
14716
|
}
|
|
14711
14717
|
});
|
|
@@ -14730,7 +14736,7 @@ class fk extends Xt {
|
|
|
14730
14736
|
});
|
|
14731
14737
|
const C = this.getMaxDepth(M), L = this.config.levelIsConstant !== !1, _ = this.computeRingWidths(d, C, r);
|
|
14732
14738
|
this.applyCustomRadii(M, _, L), this.assignColors(M, e, r);
|
|
14733
|
-
const
|
|
14739
|
+
const T = this.config.borderRadius !== void 0 ? this.resolveBorderRadius(this.config.borderRadius) : 0, I = Ae().startAngle((U) => U.x0).endAngle((U) => U.x1).innerRadius((U) => U._y0).outerRadius((U) => U._y1).padAngle(5e-3).cornerRadius(T), E = this.group.append("g").attr("transform", `translate(${c},${h})`), P = M.descendants(), S = P[0], w = P.filter((U) => U.depth > 0), A = S._y1 || S.y1, $ = S.data.color || this.getColor() || "#ffffff", R = di($), F = R && !isNaN(R.h) ? di(R.h, R.s * 0.4, 0.88).toString() : $, D = E.append("circle").attr("r", A).attr("fill", F).attr("stroke", "none").style("cursor", o ? "pointer" : "default");
|
|
14734
14740
|
if (o && this.currentRoot && this.currentRoot !== b && (E.select("circle").on("click", () => {
|
|
14735
14741
|
var U;
|
|
14736
14742
|
this.currentRoot = ((U = this.currentRoot) == null ? void 0 : U.parent) || null, this.group.selectAll("*").remove(), this.render();
|
|
@@ -14951,8 +14957,8 @@ class fk extends Xt {
|
|
|
14951
14957
|
return `rotate(${M}) translate(${k},0) rotate(${C ? 90 : -90})`;
|
|
14952
14958
|
if (v === "perpendicular")
|
|
14953
14959
|
return `rotate(${M}) translate(${k},0)${L ? " rotate(180)" : ""}`;
|
|
14954
|
-
const _ = m._y1 * (m.x1 - m.x0),
|
|
14955
|
-
return _ >
|
|
14960
|
+
const _ = m._y1 * (m.x1 - m.x0), T = m._y1 - m._y0;
|
|
14961
|
+
return _ > T * 2 ? `rotate(${M}) translate(${k},0) rotate(${C ? 90 : -90})` : `rotate(${M}) translate(${k},0)${L ? " rotate(180)" : ""}`;
|
|
14956
14962
|
}).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", (m) => {
|
|
14957
14963
|
var v, b;
|
|
14958
14964
|
const x = i.find((k) => k.level === m.depth);
|
|
@@ -14977,19 +14983,19 @@ class fk extends Xt {
|
|
|
14977
14983
|
if (b.operator === ">" && W <= b.value || b.operator === "<" && W >= b.value) return;
|
|
14978
14984
|
} else if (k < 16)
|
|
14979
14985
|
return;
|
|
14980
|
-
const L = m.data.name || "", _ = ((J = v == null ? void 0 : v.dataLabels) == null ? void 0 : J.rotationMode) || s,
|
|
14986
|
+
const L = m.data.name || "", _ = ((J = v == null ? void 0 : v.dataLabels) == null ? void 0 : J.rotationMode) || s, T = _ === "parallel" || _ === "auto" && k > C * 2, I = T ? (k + M) / 2 : C, E = T ? C : (k + M) / 2, P = parseFloat(((j = (X = v == null ? void 0 : v.dataLabels) == null ? void 0 : X.style) == null ? void 0 : j.fontSize) || l) || 11, S = P * 0.6, w = Math.max(3, Math.floor(I / S)), A = Math.max(1, Math.floor(E / (P * 1.2)));
|
|
14981
14987
|
if (L.length <= w) {
|
|
14982
14988
|
x.text(L);
|
|
14983
14989
|
return;
|
|
14984
14990
|
}
|
|
14985
|
-
const
|
|
14991
|
+
const $ = L.split(/[\s_-]+/), R = [];
|
|
14986
14992
|
let F = "";
|
|
14987
|
-
for (const W of
|
|
14993
|
+
for (const W of $) {
|
|
14988
14994
|
const U = F ? F + " " + W : W;
|
|
14989
14995
|
if (U.length <= w ? F = U : (F && R.push(F), F = W.length > w ? W.substring(0, w - 1) + "…" : W), R.length >= A) break;
|
|
14990
14996
|
}
|
|
14991
14997
|
if (F && R.length < A && R.push(F), R.length === 0) return;
|
|
14992
|
-
if (R.length > A && (R.length = A), R.length === A && F && !R[R.length - 1].endsWith("…") &&
|
|
14998
|
+
if (R.length > A && (R.length = A), R.length === A && F && !R[R.length - 1].endsWith("…") && $.slice(R.join(" ").split(/[\s]+/).length).length > 0) {
|
|
14993
14999
|
const U = R[R.length - 1];
|
|
14994
15000
|
U.length + 2 > w && (R[R.length - 1] = U.substring(0, w - 1) + "…");
|
|
14995
15001
|
}
|
|
@@ -15051,13 +15057,13 @@ class dk extends Xt {
|
|
|
15051
15057
|
this.renderPaneBackground(k, f, a, l, r);
|
|
15052
15058
|
const M = f * 0.15, C = Ae().innerRadius(f - M).outerRadius(f).startAngle(a).endAngle(l).cornerRadius(M / 2);
|
|
15053
15059
|
k.append("path").attr("d", C({})).attr("fill", "#ddd"), this.renderPlotBands(k, f, a, l, u, d, M), this.renderTickMarks(k, f, a, l, u, d, M);
|
|
15054
|
-
const L = this.config.dial || {}, _ = this.config.pivot || {},
|
|
15060
|
+
const L = this.config.dial || {}, _ = this.config.pivot || {}, T = L.backgroundColor || "#333", I = L.borderColor || "none", E = L.borderWidth ?? 0, P = L.baseWidth ?? 8, S = L.topWidth ?? 1, w = this.resolvePercent(L.radius ?? "80%", f), A = this.resolvePercent(L.rearLength ?? "15%", f), $ = b - Math.PI / 2, R = w * Math.cos($), F = w * Math.sin($), D = -A * Math.cos($), z = -A * Math.sin($), B = $ + Math.PI / 2, H = P / 2, J = S / 2, X = [
|
|
15055
15061
|
`M${D + H * Math.cos(B)},${z + H * Math.sin(B)}`,
|
|
15056
15062
|
`L${R + J * Math.cos(B)},${F + J * Math.sin(B)}`,
|
|
15057
15063
|
`L${R - J * Math.cos(B)},${F - J * Math.sin(B)}`,
|
|
15058
15064
|
`L${D - H * Math.cos(B)},${z - H * Math.sin(B)}`,
|
|
15059
15065
|
"Z"
|
|
15060
|
-
].join(" "), j = k.append("path").attr("fill",
|
|
15066
|
+
].join(" "), j = k.append("path").attr("fill", T).attr("stroke", I).attr("stroke-width", E).style("filter", "drop-shadow(0 1px 2px rgba(0,0,0,0.3))").style("cursor", "pointer");
|
|
15061
15067
|
if (e) {
|
|
15062
15068
|
const O = this.buildNeedlePath(a, w, A, P, S);
|
|
15063
15069
|
j.attr("d", O).transition().duration(bt).ease(pt).attrTween("d", () => {
|
|
@@ -15152,7 +15158,7 @@ class dk extends Xt {
|
|
|
15152
15158
|
series: { name: this.config.name },
|
|
15153
15159
|
x: (f = this.data[0]) == null ? void 0 : f.x,
|
|
15154
15160
|
y: i
|
|
15155
|
-
}) : r.format ? l =
|
|
15161
|
+
}) : r.format ? l = fe(Kt(r.format, {
|
|
15156
15162
|
point: this.data[0],
|
|
15157
15163
|
series: { name: this.config.name },
|
|
15158
15164
|
x: (u = this.data[0]) == null ? void 0 : u.x,
|
|
@@ -15174,9 +15180,9 @@ class pk extends Xt {
|
|
|
15174
15180
|
var k, M, C, L;
|
|
15175
15181
|
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = Math.min(t.width, t.height) / 2 - 10, o = t.width / 2, s = t.height / 2, a = ((k = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : k.min) ?? this.config.min ?? 0, l = ((M = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : M.max) ?? this.config.max ?? 100, c = this.data.length > 1, h = this.config.pane || {}, f = (h.startAngle ?? -135) * Math.PI / 180, u = (h.endAngle ?? 135) * Math.PI / 180, d = this.config.overshoot ?? 0, p = d * Math.PI / 180, y = this.group.append("g").attr("transform", `translate(${o},${s})`), g = this.config.innerRadius ?? 0.6, m = this.config.radius ?? 1, x = this.config.rounded ?? 5, v = this.config.linecap || "round", b = ((C = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : C.stops) || [];
|
|
15176
15182
|
if (c) {
|
|
15177
|
-
const _ = r / (this.data.length + 0.5),
|
|
15183
|
+
const _ = r / (this.data.length + 0.5), T = _ * 0.1;
|
|
15178
15184
|
this.renderPaneBackground(y, r, 0, f, u, h), this.data.forEach((I, E) => {
|
|
15179
|
-
const P = I.radius ? this.resolveRadiusValue(I.radius, r) : r - E * _, S = I.innerRadius ? this.resolveRadiusValue(I.innerRadius, r) : P - _ +
|
|
15185
|
+
const P = I.radius ? this.resolveRadiusValue(I.radius, r) : r - E * _, S = I.innerRadius ? this.resolveRadiusValue(I.innerRadius, r) : P - _ + T, w = I.color || e[E % e.length], A = this.config.color;
|
|
15180
15186
|
this.config.color = w, this.renderSingleArc(
|
|
15181
15187
|
y,
|
|
15182
15188
|
I,
|
|
@@ -15199,13 +15205,13 @@ class pk extends Xt {
|
|
|
15199
15205
|
), this.config.color = A;
|
|
15200
15206
|
});
|
|
15201
15207
|
} else {
|
|
15202
|
-
const _ = this.resolveRadiusValue(g, r),
|
|
15203
|
-
this.renderPaneBackground(y,
|
|
15208
|
+
const _ = this.resolveRadiusValue(g, r), T = this.resolveRadiusValue(m, r);
|
|
15209
|
+
this.renderPaneBackground(y, T, _, f, u, h), this.renderPlotBands(y, T, _, f, u, a, l), this.renderSingleArc(
|
|
15204
15210
|
y,
|
|
15205
15211
|
this.data[0],
|
|
15206
15212
|
0,
|
|
15207
15213
|
_,
|
|
15208
|
-
|
|
15214
|
+
T,
|
|
15209
15215
|
r,
|
|
15210
15216
|
f,
|
|
15211
15217
|
u,
|
|
@@ -15232,22 +15238,22 @@ class pk extends Xt {
|
|
|
15232
15238
|
}
|
|
15233
15239
|
const M = p === "round", C = Ae().innerRadius(r).outerRadius(o).startAngle(a).endAngle(l).cornerRadius(M ? (o - r) / 2 : d);
|
|
15234
15240
|
t.append("path").attr("d", C({})).attr("fill", "#e0e0e0");
|
|
15235
|
-
const L = M ? (o - r) / 2 : d, _ = Ae().innerRadius(r).outerRadius(o).cornerRadius(L),
|
|
15241
|
+
const L = M ? (o - r) / 2 : d, _ = Ae().innerRadius(r).outerRadius(o).cornerRadius(L), T = Ae().innerRadius(r).outerRadius(o + 5).cornerRadius(L), I = this.resolveArcColor(b, y, e), E = t.append("path").attr("fill", I).style("cursor", "pointer");
|
|
15236
15242
|
if (x) {
|
|
15237
15243
|
const P = oe(a, k), S = this;
|
|
15238
15244
|
E.transition().duration(bt).ease(pt).attrTween("d", () => (w) => {
|
|
15239
|
-
const A = P(w),
|
|
15245
|
+
const A = P(w), $ = _.startAngle(a).endAngle(A)({});
|
|
15240
15246
|
if (y.length > 0) {
|
|
15241
15247
|
const R = (A - a) / (l - a);
|
|
15242
15248
|
E.attr("fill", S.getStopColor(Math.min(1, R), y));
|
|
15243
15249
|
}
|
|
15244
|
-
return
|
|
15250
|
+
return $;
|
|
15245
15251
|
});
|
|
15246
15252
|
} else
|
|
15247
15253
|
E.attr("d", _.startAngle(a).endAngle(k)({}));
|
|
15248
15254
|
this.config.enableMouseTracking !== !1 && E.on("mouseover", (P) => {
|
|
15249
15255
|
var S, w;
|
|
15250
|
-
E.interrupt("hover").transition("hover").duration(K).ease(Z).attr("d",
|
|
15256
|
+
E.interrupt("hover").transition("hover").duration(K).ease(Z).attr("d", T.startAngle(a).endAngle(k)({})), E.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), this.context.events.emit("point:mouseover", {
|
|
15251
15257
|
point: e,
|
|
15252
15258
|
index: i,
|
|
15253
15259
|
series: this,
|
|
@@ -15259,8 +15265,8 @@ class pk extends Xt {
|
|
|
15259
15265
|
var S, w;
|
|
15260
15266
|
E.interrupt("hover").transition("hover").duration(K).ease(Z).attr("d", _.startAngle(a).endAngle(k)({})), E.style("filter", ""), this.context.events.emit("point:mouseout", { point: e, index: i, series: this, event: P }), (w = (S = e == null ? void 0 : e.events) == null ? void 0 : S.mouseOut) == null || w.call(e, P);
|
|
15261
15267
|
}).on("click", (P) => {
|
|
15262
|
-
var S, w, A,
|
|
15263
|
-
this.context.events.emit("point:click", { point: e, index: i, series: this, event: P }), (w = (S = e == null ? void 0 : e.events) == null ? void 0 : S.click) == null || w.call(e, P), (
|
|
15268
|
+
var S, w, A, $;
|
|
15269
|
+
this.context.events.emit("point:click", { point: e, index: i, series: this, event: P }), (w = (S = e == null ? void 0 : e.events) == null ? void 0 : S.click) == null || w.call(e, P), ($ = (A = this.config.events) == null ? void 0 : A.click) == null || $.call(this, P);
|
|
15264
15270
|
});
|
|
15265
15271
|
}
|
|
15266
15272
|
resolveArcColor(t, e, i) {
|
|
@@ -15325,7 +15331,7 @@ class pk extends Xt {
|
|
|
15325
15331
|
series: { name: this.config.name },
|
|
15326
15332
|
x: (h = this.data[0]) == null ? void 0 : h.x,
|
|
15327
15333
|
y: e
|
|
15328
|
-
}) : i.format ? a =
|
|
15334
|
+
}) : i.format ? a = fe(Kt(i.format, {
|
|
15329
15335
|
point: this.data[0],
|
|
15330
15336
|
series: { name: this.config.name },
|
|
15331
15337
|
x: (f = this.data[0]) == null ? void 0 : f.x,
|
|
@@ -15374,7 +15380,7 @@ class pu extends Xt {
|
|
|
15374
15380
|
return t === "column" || t === "bar" ? "column" : t === "line" ? "line" : "area";
|
|
15375
15381
|
}
|
|
15376
15382
|
renderLineAreaPolar(t) {
|
|
15377
|
-
var E, P, S, w, A,
|
|
15383
|
+
var E, P, S, w, A, $, R, F, D, z;
|
|
15378
15384
|
const { plotArea: e } = this.context, i = this.context.animate, r = this.data, o = this.getColor(), s = this.context.pane || this.config.pane, a = du(e.width, e.height, s), l = e.width / 2, c = e.height / 2, h = Math.max(...r.map((B) => B.y ?? 0), 1), { ticks: f, gridMax: u } = fu(h), d = _e().domain([0, u]).range([0, a]), p = ((E = this.config.marker) == null ? void 0 : E.radius) ?? 4, y = ((P = this.config.marker) == null ? void 0 : P.enabled) !== !1, g = this.config.pointPlacement, m = g === "on" ? 0 : g === "between" ? Math.PI / r.length : typeof g == "number" ? g * Math.PI / 180 : 0, x = 2 * Math.PI / r.length, v = this.config.connectEnds !== !1;
|
|
15379
15385
|
(w = (S = this.config.states) == null ? void 0 : S.inactive) == null || w.opacity;
|
|
15380
15386
|
const b = this.group.append("g").attr("transform", `translate(${l},${c})`);
|
|
@@ -15385,13 +15391,13 @@ class pu extends Xt {
|
|
|
15385
15391
|
}
|
|
15386
15392
|
const C = k * x - Math.PI / 2;
|
|
15387
15393
|
this.renderGrid(b, a, r.length, d, f, C);
|
|
15388
|
-
const L = v ? T2 : Ji, _ = b2().angle((B, H) => H * x + m).radius((B) => d(B.y ?? 0)).defined((B) => B.y !== null && B.y !== void 0).curve(L),
|
|
15394
|
+
const L = v ? T2 : Ji, _ = b2().angle((B, H) => H * x + m).radius((B) => d(B.y ?? 0)).defined((B) => B.y !== null && B.y !== void 0).curve(L), T = r.map((B) => ({ ...B, y: 0 })), I = b.append("path").datum(r).attr("fill", "none").attr("stroke", o).attr("stroke-width", this.config.lineWidth ?? 2);
|
|
15389
15395
|
if (t === "area") {
|
|
15390
15396
|
const B = v2().angle((J, X) => X * x + m).innerRadius(0).outerRadius((J) => d(J.y ?? 0)).defined((J) => J.y !== null && J.y !== void 0).curve(L), H = b.append("path").datum(r).attr("fill", this.config.fillColor || o).attr("fill-opacity", this.config.fillOpacity ?? 0.3);
|
|
15391
|
-
i ? H.attr("d", B(
|
|
15397
|
+
i ? H.attr("d", B(T) || "").transition().duration(bt).ease(pt).attr("d", B(r) || "") : H.attr("d", B);
|
|
15392
15398
|
}
|
|
15393
|
-
if (i ? I.attr("d", _(
|
|
15394
|
-
const H = Math.max(...r.map((X) => X.y ?? 0), 1) * 0.02, J = b.selectAll(".katucharts-polar-point").data(r).join("circle").attr("class", "katucharts-polar-point").attr("cx", (X, j) => d(X.y ?? 0) * Math.cos(j * x - Math.PI / 2 + m)).attr("cy", (X, j) => d(X.y ?? 0) * Math.sin(j * x - Math.PI / 2 + m)).attr("fill", ((A = this.config.marker) == null ? void 0 : A.fillColor) || o).attr("stroke", ((
|
|
15399
|
+
if (i ? I.attr("d", _(T) || "").transition().duration(bt).ease(pt).attr("d", _(r) || "") : I.attr("d", _), y) {
|
|
15400
|
+
const H = Math.max(...r.map((X) => X.y ?? 0), 1) * 0.02, J = b.selectAll(".katucharts-polar-point").data(r).join("circle").attr("class", "katucharts-polar-point").attr("cx", (X, j) => d(X.y ?? 0) * Math.cos(j * x - Math.PI / 2 + m)).attr("cy", (X, j) => d(X.y ?? 0) * Math.sin(j * x - Math.PI / 2 + m)).attr("fill", ((A = this.config.marker) == null ? void 0 : A.fillColor) || o).attr("stroke", (($ = this.config.marker) == null ? void 0 : $.lineColor) || this.autoBorderColor()).attr("stroke-width", ((R = this.config.marker) == null ? void 0 : R.lineWidth) ?? 1).style("display", (X) => (X.y ?? 0) < H ? "none" : null).style("cursor", this.config.cursor || "pointer");
|
|
15395
15401
|
if (i ? J.attr("r", 0).attr("opacity", 0).transition().duration(bt).ease(pt).delay((X, j) => j * Wt).attr("r", p).attr("opacity", 1) : J.attr("r", p), this.renderPolarDataLabels(b, r, d, x, m), this.config.enableMouseTracking !== !1) {
|
|
15396
15402
|
const X = ((z = (D = (F = this.config.marker) == null ? void 0 : F.states) == null ? void 0 : D.hover) == null ? void 0 : z.radius) ?? p + 3;
|
|
15397
15403
|
J.on("mouseover", (j, W) => {
|
|
@@ -15431,33 +15437,33 @@ class pu extends Xt {
|
|
|
15431
15437
|
}
|
|
15432
15438
|
const L = M * p - Math.PI / 2;
|
|
15433
15439
|
this.renderGrid(k, a, r.length, d, f, L);
|
|
15434
|
-
const _ = Ae().cornerRadius(2),
|
|
15440
|
+
const _ = Ae().cornerRadius(2), T = k.selectAll(".katucharts-polar-bar").data(r).join("path").attr("class", "katucharts-polar-bar").attr(
|
|
15435
15441
|
"fill",
|
|
15436
15442
|
(S, w) => S.color || (v ? e[w % e.length] : o)
|
|
15437
15443
|
).attr("stroke", this.config.borderColor || "none").attr("stroke-width", this.config.borderWidth ?? 0).style("cursor", this.config.cursor || "pointer"), I = this.context.stackOffsets;
|
|
15438
|
-
i ?
|
|
15439
|
-
const A = rt(this),
|
|
15440
|
-
A.attr("d", _({ innerRadius: F, outerRadius: F, startAngle:
|
|
15444
|
+
i ? T.each(function(S, w) {
|
|
15445
|
+
const A = rt(this), $ = w * p - Math.PI / 2 + g + m, R = (w + 1) * p - Math.PI / 2 + g - m, F = b && I ? d(I.get(w) ?? 0) : 0, D = F + d(S.y ?? 0);
|
|
15446
|
+
A.attr("d", _({ innerRadius: F, outerRadius: F, startAngle: $ + Math.PI / 2, endAngle: R + Math.PI / 2 }) || "").transition().duration(bt).ease(pt).delay(w * Wt).attrTween("d", () => (z) => _({
|
|
15441
15447
|
innerRadius: F,
|
|
15442
15448
|
outerRadius: F + (D - F) * z,
|
|
15443
|
-
startAngle:
|
|
15449
|
+
startAngle: $ + Math.PI / 2,
|
|
15444
15450
|
endAngle: R + Math.PI / 2
|
|
15445
15451
|
}) || ""), b && I && I.set(w, (I.get(w) ?? 0) + (S.y ?? 0));
|
|
15446
|
-
}) :
|
|
15447
|
-
const A = w * p - Math.PI / 2 + g + m,
|
|
15452
|
+
}) : T.attr("d", (S, w) => {
|
|
15453
|
+
const A = w * p - Math.PI / 2 + g + m, $ = (w + 1) * p - Math.PI / 2 + g - m, R = b && I ? d(I.get(w) ?? 0) : 0, F = R + d(S.y ?? 0);
|
|
15448
15454
|
return b && I && I.set(w, (I.get(w) ?? 0) + (S.y ?? 0)), _({
|
|
15449
15455
|
innerRadius: R,
|
|
15450
15456
|
outerRadius: F,
|
|
15451
15457
|
startAngle: A + Math.PI / 2,
|
|
15452
|
-
endAngle:
|
|
15458
|
+
endAngle: $ + Math.PI / 2
|
|
15453
15459
|
}) || "";
|
|
15454
|
-
}), this.config.enableMouseTracking !== !1 &&
|
|
15460
|
+
}), this.config.enableMouseTracking !== !1 && T.on("mouseover", (S, w) => {
|
|
15455
15461
|
var D, z;
|
|
15456
|
-
rt(S.currentTarget).style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"),
|
|
15457
|
-
const
|
|
15462
|
+
rt(S.currentTarget).style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), T.interrupt("highlight"), T.attr("opacity", 1), T.filter((B) => B !== w).transition("highlight").duration(K).ease(Z).attr("opacity", x);
|
|
15463
|
+
const $ = r.indexOf(w), R = $ * p + p / 2 - Math.PI / 2 + g, F = d(w.y ?? 0) / 2;
|
|
15458
15464
|
this.context.events.emit("point:mouseover", {
|
|
15459
15465
|
point: w,
|
|
15460
|
-
index:
|
|
15466
|
+
index: $,
|
|
15461
15467
|
series: this,
|
|
15462
15468
|
event: S,
|
|
15463
15469
|
plotX: l + F * Math.cos(R),
|
|
@@ -15465,13 +15471,13 @@ class pu extends Xt {
|
|
|
15465
15471
|
}), (z = (D = w.events) == null ? void 0 : D.mouseOver) == null || z.call(w, S);
|
|
15466
15472
|
}).on("mouseout", (S, w) => {
|
|
15467
15473
|
var R, F;
|
|
15468
|
-
rt(S.currentTarget).style("filter", ""),
|
|
15469
|
-
const
|
|
15470
|
-
this.context.events.emit("point:mouseout", { point: w, index:
|
|
15474
|
+
rt(S.currentTarget).style("filter", ""), T.interrupt("highlight"), T.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
|
|
15475
|
+
const $ = r.indexOf(w);
|
|
15476
|
+
this.context.events.emit("point:mouseout", { point: w, index: $, series: this, event: S }), (F = (R = w.events) == null ? void 0 : R.mouseOut) == null || F.call(w, S);
|
|
15471
15477
|
}).on("click", (S, w) => {
|
|
15472
|
-
var
|
|
15478
|
+
var $, R, F, D;
|
|
15473
15479
|
const A = r.indexOf(w);
|
|
15474
|
-
this.context.events.emit("point:click", { point: w, index: A, series: this, event: S }), (R = (
|
|
15480
|
+
this.context.events.emit("point:click", { point: w, index: A, series: this, event: S }), (R = ($ = w.events) == null ? void 0 : $.click) == null || R.call(w, S), (D = (F = this.config.events) == null ? void 0 : F.click) == null || D.call(this, S);
|
|
15475
15481
|
});
|
|
15476
15482
|
}
|
|
15477
15483
|
renderPolarDataLabels(t, e, i, r, o) {
|
|
@@ -15483,12 +15489,12 @@ class pu extends Xt {
|
|
|
15483
15489
|
const v = x.length > 0 ? x[0] : null, b = v ? [...m, v] : m;
|
|
15484
15490
|
b.sort((L, _) => L.i - _.i);
|
|
15485
15491
|
for (const { d: L, i: _ } of b) {
|
|
15486
|
-
const
|
|
15492
|
+
const T = _ * r - Math.PI / 2 + o, I = i(L.y ?? 0), E = I * Math.cos(T), P = I * Math.sin(T), S = ((T + Math.PI / 2) * 180 / Math.PI + 360) % 360;
|
|
15487
15493
|
let w;
|
|
15488
15494
|
S > 20 && S < 160 ? w = "start" : S > 200 && S < 340 ? w = "end" : w = "middle";
|
|
15489
15495
|
let A;
|
|
15490
15496
|
S < 45 || S > 315 ? A = "text-after-edge" : S > 135 && S < 225 ? A = "text-before-edge" : A = "middle";
|
|
15491
|
-
const
|
|
15497
|
+
const $ = Math.cos(T), R = Math.sin(T), F = E + $ * u, D = P + R * u;
|
|
15492
15498
|
let z = !1;
|
|
15493
15499
|
for (const B of h)
|
|
15494
15500
|
if ((B.x - F) ** 2 + (B.y - D) ** 2 < f * f) {
|
|
@@ -15545,15 +15551,15 @@ class xk extends Xt {
|
|
|
15545
15551
|
o.forEach((k, M) => {
|
|
15546
15552
|
const C = a + M * s, L = k.color || (h ? e[M % e.length] : r.color || e[0]), _ = this.group.append("circle").attr("cx", 20).attr("cy", C + s / 2).attr("fill", L).style("cursor", "pointer");
|
|
15547
15553
|
if (c && _.attr("stroke", c), i ? _.attr("r", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("r", l) : _.attr("r", l), M < o.length - 1) {
|
|
15548
|
-
const
|
|
15549
|
-
i &&
|
|
15554
|
+
const $ = this.group.append("line").attr("x1", 20).attr("x2", 20).attr("y1", C + s / 2 + l).attr("y2", C + s + s / 2 - l).attr("stroke", f).attr("stroke-width", u);
|
|
15555
|
+
i && $.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
|
|
15550
15556
|
}
|
|
15551
|
-
const
|
|
15557
|
+
const T = k.label || k.name || `Event ${M + 1}`, I = this.group.append("text").attr("x", 36).attr("y", C + s / 2).attr("dy", "0.35em").attr("font-size", p).attr("fill", y).style("cursor", "pointer").text(T);
|
|
15552
15558
|
i && I.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
|
|
15553
15559
|
let E = null;
|
|
15554
15560
|
const P = k.description;
|
|
15555
15561
|
P && (E = this.group.append("text").attr("x", 36).attr("y", C + s / 2 + 14).attr("dy", "0.35em").attr("font-size", "10px").attr("fill", "#777").style("pointer-events", "none").text(P), i && E.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1)), g.push({ circle: _, text: I, desc: E });
|
|
15556
|
-
const S = (
|
|
15562
|
+
const S = ($) => {
|
|
15557
15563
|
_.transition("size").duration(K).ease(Z).attr("r", l + 3), _.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), I.attr("font-weight", "bold"), g.forEach((R) => {
|
|
15558
15564
|
R.circle.interrupt("highlight"), R.text.interrupt("highlight"), R.circle.attr("opacity", 1), R.text.attr("opacity", 1), R.desc && (R.desc.interrupt("highlight"), R.desc.attr("opacity", 1));
|
|
15559
15565
|
}), g.forEach((R, F) => {
|
|
@@ -15562,16 +15568,16 @@ class xk extends Xt {
|
|
|
15562
15568
|
point: k,
|
|
15563
15569
|
index: M,
|
|
15564
15570
|
series: this,
|
|
15565
|
-
event:
|
|
15571
|
+
event: $,
|
|
15566
15572
|
plotX: 20,
|
|
15567
15573
|
plotY: C + s / 2
|
|
15568
15574
|
});
|
|
15569
|
-
}, w = (
|
|
15575
|
+
}, w = ($) => {
|
|
15570
15576
|
_.transition("size").duration(K).ease(Z).attr("r", l), _.style("filter", ""), I.attr("font-weight", "normal"), g.forEach((R) => {
|
|
15571
15577
|
R.circle.interrupt("highlight"), R.text.interrupt("highlight"), R.circle.transition("highlight").duration(K).ease(Z).attr("opacity", 1), R.text.transition("highlight").duration(K).ease(Z).attr("opacity", 1), R.desc && (R.desc.interrupt("highlight"), R.desc.transition("highlight").duration(K).ease(Z).attr("opacity", 1));
|
|
15572
|
-
}), this.context.events.emit("point:mouseout", { point: k, index: M, series: this, event:
|
|
15573
|
-
}, A = (
|
|
15574
|
-
this.context.events.emit("point:click", { point: k, index: M, series: this, event:
|
|
15578
|
+
}), this.context.events.emit("point:mouseout", { point: k, index: M, series: this, event: $ });
|
|
15579
|
+
}, A = ($) => {
|
|
15580
|
+
this.context.events.emit("point:click", { point: k, index: M, series: this, event: $ });
|
|
15575
15581
|
};
|
|
15576
15582
|
_.on("mouseover", S).on("mouseout", w).on("click", A), I.on("mouseover", S).on("mouseout", w).on("click", A);
|
|
15577
15583
|
});
|
|
@@ -15841,8 +15847,8 @@ function kk(n, t) {
|
|
|
15841
15847
|
for (var c = 0, h = n.length; c < h; ++c)
|
|
15842
15848
|
if (u = (f = n[c]).length)
|
|
15843
15849
|
for (var f, u, d = f[u - 1], p = pa(d), y = d[1] / 2 + gu, g = Pt(y), m = Dt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
|
|
15844
|
-
var v = f[x], b = pa(v), k = v[1] / 2 + gu, M = Pt(k), C = Dt(k), L = b - p, _ = L >= 0 ? 1 : -1,
|
|
15845
|
-
if (l.add(Wn(E * _ * Pt(
|
|
15850
|
+
var v = f[x], b = pa(v), k = v[1] / 2 + gu, M = Pt(k), C = Dt(k), L = b - p, _ = L >= 0 ? 1 : -1, T = _ * L, I = T > zt, E = g * M;
|
|
15851
|
+
if (l.add(Wn(E * _ * Pt(T), m * C + E * Dt(T))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
|
|
15846
15852
|
var P = ts(ji(d), ji(v));
|
|
15847
15853
|
Qa(P);
|
|
15848
15854
|
var S = ts(o, P);
|
|
@@ -15891,11 +15897,11 @@ function Zd(n, t, e, i) {
|
|
|
15891
15897
|
}
|
|
15892
15898
|
function v() {
|
|
15893
15899
|
m(f[0][0], f[0][1]), a.lineEnd();
|
|
15894
|
-
var b = a.clean(), k = s.result(), M, C = k.length, L, _,
|
|
15900
|
+
var b = a.clean(), k = s.result(), M, C = k.length, L, _, T;
|
|
15895
15901
|
if (f.pop(), c.push(f), f = null, !!C) {
|
|
15896
15902
|
if (b & 1) {
|
|
15897
15903
|
if (_ = k[0], (L = _.length - 1) > 0) {
|
|
15898
|
-
for (l || (r.polygonStart(), l = !0), r.lineStart(), M = 0; M < L; ++M) r.point((
|
|
15904
|
+
for (l || (r.polygonStart(), l = !0), r.lineStart(), M = 0; M < L; ++M) r.point((T = _[M])[0], T[1]);
|
|
15899
15905
|
r.lineEnd();
|
|
15900
15906
|
}
|
|
15901
15907
|
return;
|
|
@@ -15991,15 +15997,15 @@ function Pk(n) {
|
|
|
15991
15997
|
if (!v) return !u && h;
|
|
15992
15998
|
var b = t * m / v, k = -t * x / v, M = ts(y, g), C = fo(y, b), L = fo(g, k);
|
|
15993
15999
|
da(C, L);
|
|
15994
|
-
var _ = M,
|
|
16000
|
+
var _ = M, T = uo(C, _), I = uo(_, _), E = T * T - I * (uo(C, C) - 1);
|
|
15995
16001
|
if (!(E < 0)) {
|
|
15996
|
-
var P = He(E), S = fo(_, (
|
|
16002
|
+
var P = He(E), S = fo(_, (-T - P) / I);
|
|
15997
16003
|
if (da(S, C), S = Ja(S), !u) return S;
|
|
15998
|
-
var w = h[0], A = f[0],
|
|
16004
|
+
var w = h[0], A = f[0], $ = h[1], R = f[1], F;
|
|
15999
16005
|
A < w && (F = w, w = A, A = F);
|
|
16000
16006
|
var D = A - w, z = Gt(D - zt) < At, B = z || D < At;
|
|
16001
|
-
if (!z && R <
|
|
16002
|
-
var H = fo(_, (
|
|
16007
|
+
if (!z && R < $ && (F = $, $ = R, R = F), B ? z ? $ + R > 0 ^ S[1] < (Gt(S[0] - w) < At ? $ : R) : $ <= S[1] && S[1] <= R : D > zt ^ (w <= S[0] && S[0] <= A)) {
|
|
16008
|
+
var H = fo(_, (-T + P) / I);
|
|
16003
16009
|
return da(H, C), [S, Ja(H)];
|
|
16004
16010
|
}
|
|
16005
16011
|
}
|
|
@@ -16079,24 +16085,24 @@ function Tk(n, t, e, i) {
|
|
|
16079
16085
|
point: L,
|
|
16080
16086
|
lineStart: E,
|
|
16081
16087
|
lineEnd: P,
|
|
16082
|
-
polygonStart:
|
|
16088
|
+
polygonStart: T,
|
|
16083
16089
|
polygonEnd: I
|
|
16084
16090
|
};
|
|
16085
16091
|
function L(w, A) {
|
|
16086
16092
|
r(w, A) && h.point(w, A);
|
|
16087
16093
|
}
|
|
16088
16094
|
function _() {
|
|
16089
|
-
for (var w = 0, A = 0,
|
|
16095
|
+
for (var w = 0, A = 0, $ = d.length; A < $; ++A)
|
|
16090
16096
|
for (var R = d[A], F = 1, D = R.length, z = R[0], B, H, J = z[0], X = z[1]; F < D; ++F)
|
|
16091
16097
|
B = J, H = X, z = R[F], J = z[0], X = z[1], H <= i ? X > i && (J - B) * (i - H) > (X - H) * (n - B) && ++w : X <= i && (J - B) * (i - H) < (X - H) * (n - B) && --w;
|
|
16092
16098
|
return w;
|
|
16093
16099
|
}
|
|
16094
|
-
function
|
|
16100
|
+
function T() {
|
|
16095
16101
|
h = f, u = [], d = [], M = !0;
|
|
16096
16102
|
}
|
|
16097
16103
|
function I() {
|
|
16098
|
-
var w = _(), A = M && w,
|
|
16099
|
-
(A ||
|
|
16104
|
+
var w = _(), A = M && w, $ = (u = Hf(u)).length;
|
|
16105
|
+
(A || $) && (c.polygonStart(), A && (c.lineStart(), o(null, null, 1, c), c.lineEnd()), $ && jd(u, a, w, o, c), c.polygonEnd()), h = c, u = d = p = null;
|
|
16100
16106
|
}
|
|
16101
16107
|
function E() {
|
|
16102
16108
|
C.point = S, d && d.push(p = []), k = !0, b = !1, x = v = NaN;
|
|
@@ -16105,15 +16111,15 @@ function Tk(n, t, e, i) {
|
|
|
16105
16111
|
u && (S(y, g), m && b && f.rejoin(), u.push(f.result())), C.point = L, b && h.lineEnd();
|
|
16106
16112
|
}
|
|
16107
16113
|
function S(w, A) {
|
|
16108
|
-
var
|
|
16114
|
+
var $ = r(w, A);
|
|
16109
16115
|
if (d && p.push([w, A]), k)
|
|
16110
|
-
y = w, g = A, m =
|
|
16111
|
-
else if (
|
|
16116
|
+
y = w, g = A, m = $, k = !1, $ && (h.lineStart(), h.point(w, A));
|
|
16117
|
+
else if ($ && b) h.point(w, A);
|
|
16112
16118
|
else {
|
|
16113
16119
|
var R = [x = Math.max(go, Math.min(kr, x)), v = Math.max(go, Math.min(kr, v))], F = [w = Math.max(go, Math.min(kr, w)), A = Math.max(go, Math.min(kr, A))];
|
|
16114
|
-
Ek(R, F, n, t, e, i) ? (b || (h.lineStart(), h.point(R[0], R[1])), h.point(F[0], F[1]),
|
|
16120
|
+
Ek(R, F, n, t, e, i) ? (b || (h.lineStart(), h.point(R[0], R[1])), h.point(F[0], F[1]), $ || h.lineEnd(), M = !1) : $ && (h.lineStart(), h.point(w, A), M = !1);
|
|
16115
16121
|
}
|
|
16116
|
-
x = w, v = A, b =
|
|
16122
|
+
x = w, v = A, b = $;
|
|
16117
16123
|
}
|
|
16118
16124
|
return C;
|
|
16119
16125
|
};
|
|
@@ -16219,7 +16225,7 @@ var Zi = 1 / 0, es = Zi, Hr = -Zi, ns = Hr, is = {
|
|
|
16219
16225
|
function Rk(n, t) {
|
|
16220
16226
|
n < Zi && (Zi = n), n > Hr && (Hr = n), t < es && (es = t), t > ns && (ns = t);
|
|
16221
16227
|
}
|
|
16222
|
-
var sc = 0, ac = 0, Mr = 0, rs = 0, os = 0, Fi = 0, cc = 0, lc = 0, Ar = 0, tp, ep,
|
|
16228
|
+
var sc = 0, ac = 0, Mr = 0, rs = 0, os = 0, Fi = 0, cc = 0, lc = 0, Ar = 0, tp, ep, wn, kn, nn = {
|
|
16223
16229
|
point: bi,
|
|
16224
16230
|
lineStart: Cu,
|
|
16225
16231
|
lineEnd: Pu,
|
|
@@ -16241,11 +16247,11 @@ function Cu() {
|
|
|
16241
16247
|
nn.point = Dk;
|
|
16242
16248
|
}
|
|
16243
16249
|
function Dk(n, t) {
|
|
16244
|
-
nn.point = zk, bi(
|
|
16250
|
+
nn.point = zk, bi(wn = n, kn = t);
|
|
16245
16251
|
}
|
|
16246
16252
|
function zk(n, t) {
|
|
16247
|
-
var e = n -
|
|
16248
|
-
rs += r * (
|
|
16253
|
+
var e = n - wn, i = t - kn, r = He(e * e + i * i);
|
|
16254
|
+
rs += r * (wn + n) / 2, os += r * (kn + t) / 2, Fi += r, bi(wn = n, kn = t);
|
|
16249
16255
|
}
|
|
16250
16256
|
function Pu() {
|
|
16251
16257
|
nn.point = bi;
|
|
@@ -16257,11 +16263,11 @@ function Ok() {
|
|
|
16257
16263
|
np(tp, ep);
|
|
16258
16264
|
}
|
|
16259
16265
|
function Nk(n, t) {
|
|
16260
|
-
nn.point = np, bi(tp =
|
|
16266
|
+
nn.point = np, bi(tp = wn = n, ep = kn = t);
|
|
16261
16267
|
}
|
|
16262
16268
|
function np(n, t) {
|
|
16263
|
-
var e = n -
|
|
16264
|
-
rs += r * (
|
|
16269
|
+
var e = n - wn, i = t - kn, r = He(e * e + i * i);
|
|
16270
|
+
rs += r * (wn + n) / 2, os += r * (kn + t) / 2, Fi += r, r = kn * n - wn * t, cc += r * (wn + n), lc += r * (kn + t), Ar += r * 3, bi(wn = n, kn = t);
|
|
16265
16271
|
}
|
|
16266
16272
|
function ip(n) {
|
|
16267
16273
|
this._context = n;
|
|
@@ -16492,7 +16498,7 @@ function Xk(n, t) {
|
|
|
16492
16498
|
function e(i, r, o, s, a, l, c, h, f, u, d, p, y, g) {
|
|
16493
16499
|
var m = c - i, x = h - r, v = m * m + x * x;
|
|
16494
16500
|
if (v > 4 * t && y--) {
|
|
16495
|
-
var b = s + u, k = a + d, M = l + p, C = He(b * b + k * k + M * M), L = ln(M /= C), _ = Gt(Gt(M) - 1) < At || Gt(o - f) < At ? (o + f) / 2 : Wn(k, b),
|
|
16501
|
+
var b = s + u, k = a + d, M = l + p, C = He(b * b + k * k + M * M), L = ln(M /= C), _ = Gt(Gt(M) - 1) < At || Gt(o - f) < At ? (o + f) / 2 : Wn(k, b), T = n(_, L), I = T[0], E = T[1], P = I - i, S = E - r, w = x * P - m * S;
|
|
16496
16502
|
(w * w / v > t || Gt((m * P + x * S) / v - 0.5) > 0.3 || s * u + a * d + l * p < Gk) && (e(i, r, o, s, a, l, I, E, _, b /= C, k /= C, M, y, g), g.point(I, E), e(I, E, _, b, k, M, c, h, f, u, d, p, y, g));
|
|
16497
16503
|
}
|
|
16498
16504
|
}
|
|
@@ -16515,8 +16521,8 @@ function Xk(n, t) {
|
|
|
16515
16521
|
f = NaN, g.point = v, i.lineStart();
|
|
16516
16522
|
}
|
|
16517
16523
|
function v(L, _) {
|
|
16518
|
-
var
|
|
16519
|
-
e(f, u, h, d, p, y, f = I[0], u = I[1], h = L, d =
|
|
16524
|
+
var T = ji([L, _]), I = n(L, _);
|
|
16525
|
+
e(f, u, h, d, p, y, f = I[0], u = I[1], h = L, d = T[0], p = T[1], y = T[2], Iu, i), i.point(f, u);
|
|
16520
16526
|
}
|
|
16521
16527
|
function b() {
|
|
16522
16528
|
g.point = m, i.lineEnd();
|
|
@@ -16564,13 +16570,13 @@ function Ru(n, t, e, i, r, o) {
|
|
|
16564
16570
|
return [i * (h * y - f * g + u), r * (d - f * y - h * g)];
|
|
16565
16571
|
}, p;
|
|
16566
16572
|
}
|
|
16567
|
-
function
|
|
16573
|
+
function Sn(n) {
|
|
16568
16574
|
return up(function() {
|
|
16569
16575
|
return n;
|
|
16570
16576
|
})();
|
|
16571
16577
|
}
|
|
16572
16578
|
function up(n) {
|
|
16573
|
-
var t, e = 150, i = 480, r = 250, o = 0, s = 0, a = 0, l = 0, c = 0, h, f = 0, u = 1, d = 1, p = null, y = Au, g = null, m, x, v, b = nc, k = 0.5, M, C, L, _,
|
|
16579
|
+
var t, e = 150, i = 480, r = 250, o = 0, s = 0, a = 0, l = 0, c = 0, h, f = 0, u = 1, d = 1, p = null, y = Au, g = null, m, x, v, b = nc, k = 0.5, M, C, L, _, T;
|
|
16574
16580
|
function I(w) {
|
|
16575
16581
|
return L(w[0] * Qt, w[1] * Qt);
|
|
16576
16582
|
}
|
|
@@ -16578,7 +16584,7 @@ function up(n) {
|
|
|
16578
16584
|
return w = L.invert(w[0], w[1]), w && [w[0] * Le, w[1] * Le];
|
|
16579
16585
|
}
|
|
16580
16586
|
I.stream = function(w) {
|
|
16581
|
-
return _ &&
|
|
16587
|
+
return _ && T === w ? _ : _ = Uk(qk(h)(y(M(b(T = w)))));
|
|
16582
16588
|
}, I.preclip = function(w) {
|
|
16583
16589
|
return arguments.length ? (y = w, p = void 0, S()) : y;
|
|
16584
16590
|
}, I.postclip = function(w) {
|
|
@@ -16617,7 +16623,7 @@ function up(n) {
|
|
|
16617
16623
|
return h = Ud(a, l, c), C = tc(t, A), L = tc(h, C), M = Fu(C, k), S();
|
|
16618
16624
|
}
|
|
16619
16625
|
function S() {
|
|
16620
|
-
return _ =
|
|
16626
|
+
return _ = T = null, I;
|
|
16621
16627
|
}
|
|
16622
16628
|
return function() {
|
|
16623
16629
|
return t = n.apply(this, arguments), I.invert = t.invert && E, P();
|
|
@@ -16740,7 +16746,7 @@ pp.invert = jr(function(n) {
|
|
|
16740
16746
|
return 2 * ln(n / 2);
|
|
16741
16747
|
});
|
|
16742
16748
|
function tM() {
|
|
16743
|
-
return
|
|
16749
|
+
return Sn(pp).scale(124.75).clipAngle(180 - 1e-3);
|
|
16744
16750
|
}
|
|
16745
16751
|
var gp = dp(function(n) {
|
|
16746
16752
|
return (n = Xd(n)) && n / Pt(n);
|
|
@@ -16749,7 +16755,7 @@ gp.invert = jr(function(n) {
|
|
|
16749
16755
|
return n;
|
|
16750
16756
|
});
|
|
16751
16757
|
function eM() {
|
|
16752
|
-
return
|
|
16758
|
+
return Sn(gp).scale(79.4188).clipAngle(180 - 1e-3);
|
|
16753
16759
|
}
|
|
16754
16760
|
function Ps(n, t) {
|
|
16755
16761
|
return [n, Jo(rl((te + t) / 2))];
|
|
@@ -16761,7 +16767,7 @@ function Du() {
|
|
|
16761
16767
|
return mp(Ps).scale(961 / qe);
|
|
16762
16768
|
}
|
|
16763
16769
|
function mp(n) {
|
|
16764
|
-
var t =
|
|
16770
|
+
var t = Sn(n), e = t.center, i = t.scale, r = t.translate, o = t.clipExtent, s = null, a, l, c;
|
|
16765
16771
|
t.scale = function(f) {
|
|
16766
16772
|
return arguments.length ? (i(f), h()) : i();
|
|
16767
16773
|
}, t.translate = function(f) {
|
|
@@ -16801,7 +16807,7 @@ function cs(n, t) {
|
|
|
16801
16807
|
}
|
|
16802
16808
|
cs.invert = cs;
|
|
16803
16809
|
function rM() {
|
|
16804
|
-
return
|
|
16810
|
+
return Sn(cs).scale(152.63);
|
|
16805
16811
|
}
|
|
16806
16812
|
function oM(n, t) {
|
|
16807
16813
|
var e = Dt(n), i = n === t ? Pt(n) : (e - Dt(t)) / (t - n), r = e / i + n;
|
|
@@ -16835,7 +16841,7 @@ yp.invert = function(n, t) {
|
|
|
16835
16841
|
];
|
|
16836
16842
|
};
|
|
16837
16843
|
function zu() {
|
|
16838
|
-
return
|
|
16844
|
+
return Sn(yp).scale(177.158);
|
|
16839
16845
|
}
|
|
16840
16846
|
function xp(n, t) {
|
|
16841
16847
|
var e = Dt(t), i = Dt(n) * e;
|
|
@@ -16843,7 +16849,7 @@ function xp(n, t) {
|
|
|
16843
16849
|
}
|
|
16844
16850
|
xp.invert = jr(Qi);
|
|
16845
16851
|
function cM() {
|
|
16846
|
-
return
|
|
16852
|
+
return Sn(xp).scale(144.049).clipAngle(60);
|
|
16847
16853
|
}
|
|
16848
16854
|
function bp(n, t) {
|
|
16849
16855
|
var e = t * t, i = e * e;
|
|
@@ -16864,14 +16870,14 @@ bp.invert = function(n, t) {
|
|
|
16864
16870
|
];
|
|
16865
16871
|
};
|
|
16866
16872
|
function fc() {
|
|
16867
|
-
return
|
|
16873
|
+
return Sn(bp).scale(175.295);
|
|
16868
16874
|
}
|
|
16869
16875
|
function vp(n, t) {
|
|
16870
16876
|
return [Dt(t) * Pt(n), Pt(t)];
|
|
16871
16877
|
}
|
|
16872
16878
|
vp.invert = jr(ln);
|
|
16873
16879
|
function Bu() {
|
|
16874
|
-
return
|
|
16880
|
+
return Sn(vp).scale(249.5).clipAngle(90 + At);
|
|
16875
16881
|
}
|
|
16876
16882
|
function wp(n, t) {
|
|
16877
16883
|
var e = Dt(t), i = 1 + Dt(n) * e;
|
|
@@ -16881,7 +16887,7 @@ wp.invert = jr(function(n) {
|
|
|
16881
16887
|
return 2 * Qi(n);
|
|
16882
16888
|
});
|
|
16883
16889
|
function lM() {
|
|
16884
|
-
return
|
|
16890
|
+
return Sn(wp).scale(250).clipAngle(142);
|
|
16885
16891
|
}
|
|
16886
16892
|
function kp(n, t) {
|
|
16887
16893
|
return [Jo(rl((te + t) / 2)), -n];
|
|
@@ -16976,7 +16982,7 @@ function gM(n, t) {
|
|
|
16976
16982
|
}
|
|
16977
16983
|
const Mp = (n, t) => [n, 1.25 * Math.log(Math.tan(Math.PI / 4 + 0.4 * t))];
|
|
16978
16984
|
Mp.invert = (n, t) => [n, 2.5 * Math.atan(Math.exp(0.8 * t)) - 0.625 * Math.PI];
|
|
16979
|
-
const mM = () =>
|
|
16985
|
+
const mM = () => Sn(Mp).scale(108.318), yM = {
|
|
16980
16986
|
naturalEarth: fc,
|
|
16981
16987
|
naturalEarth1: fc,
|
|
16982
16988
|
mercator: Du,
|
|
@@ -17046,7 +17052,7 @@ class vM extends Xt {
|
|
|
17046
17052
|
this.autoRotateTimer && (this.autoRotateTimer.stop(), this.autoRotateTimer = null), super.destroy();
|
|
17047
17053
|
}
|
|
17048
17054
|
render() {
|
|
17049
|
-
var
|
|
17055
|
+
var T;
|
|
17050
17056
|
const { plotArea: t } = this.context, e = this.config, i = e.mapData;
|
|
17051
17057
|
if (!i) {
|
|
17052
17058
|
this.group.append("text").attr("x", t.width / 2).attr("y", t.height / 2).attr("text-anchor", "middle").attr("fill", "#999").text("Map data not provided");
|
|
@@ -17078,7 +17084,7 @@ class vM extends Xt {
|
|
|
17078
17084
|
const E = this.getFeatureKey(I, h);
|
|
17079
17085
|
return this.dataMap.has(E);
|
|
17080
17086
|
}), L = this.context.animate;
|
|
17081
|
-
this.featurePaths = this.mapGroup.selectAll(".katucharts-map-feature").data(C).join("path").attr("class", "katucharts-map-feature").attr("d", o).attr("stroke", x).attr("stroke-width", v).attr("stroke-linejoin", "round").style("cursor", "pointer"), L ? this.featurePaths.attr("fill", g).attr("fill-opacity", 0).transition().duration(bt).ease(pt).attr("fill-opacity", 1).attr("fill", (I) => this.getFeatureColor(I, h, g)) : this.featurePaths.attr("fill", (I) => this.getFeatureColor(I, h, g)), this.attachMapHover(h, x, v, g), this.renderMapLabels(o, C, h), u.enabled !== !1 && d.length > 0 && this.renderColorAxis(p, y, u), ll(a, e) ? this.setupGlobeMode(r, o, s, h, g, x, v, e) : ((
|
|
17087
|
+
this.featurePaths = this.mapGroup.selectAll(".katucharts-map-feature").data(C).join("path").attr("class", "katucharts-map-feature").attr("d", o).attr("stroke", x).attr("stroke-width", v).attr("stroke-linejoin", "round").style("cursor", "pointer"), L ? this.featurePaths.attr("fill", g).attr("fill-opacity", 0).transition().duration(bt).ease(pt).attr("fill-opacity", 1).attr("fill", (I) => this.getFeatureColor(I, h, g)) : this.featurePaths.attr("fill", (I) => this.getFeatureColor(I, h, g)), this.attachMapHover(h, x, v, g), this.renderMapLabels(o, C, h), u.enabled !== !1 && d.length > 0 && this.renderColorAxis(p, y, u), ll(a, e) ? this.setupGlobeMode(r, o, s, h, g, x, v, e) : ((T = e.mapNavigation) == null ? void 0 : T.enabled) !== !1 && this.setupMapNavigation(r, o);
|
|
17082
17088
|
}
|
|
17083
17089
|
/**
|
|
17084
17090
|
* Builds a 0‒1 value normalizer honoring `colorAxis.type`. A `'logarithmic'`
|
|
@@ -17121,14 +17127,14 @@ class vM extends Xt {
|
|
|
17121
17127
|
b.transition("hover").duration(K).ease(Z).attr("fill", S);
|
|
17122
17128
|
}
|
|
17123
17129
|
b.attr("stroke", a).attr("stroke-width", l), b.raise(), this.featurePaths.interrupt("highlight"), this.featurePaths.filter((S) => S !== v).transition("highlight").duration(K).ease(Z).attr("opacity", 0.7);
|
|
17124
|
-
const L = ((P = v.properties) == null ? void 0 : P.name) || k, _ = M ? { name: M.name ?? L, y: M.y ?? M.value, ...M } : { name: L },
|
|
17130
|
+
const L = ((P = v.properties) == null ? void 0 : P.name) || k, _ = M ? { name: M.name ?? L, y: M.y ?? M.value, ...M } : { name: L }, T = x.currentTarget.getBBox();
|
|
17125
17131
|
this.context.events.emit("point:mouseover", {
|
|
17126
17132
|
point: _,
|
|
17127
17133
|
index: 0,
|
|
17128
17134
|
series: this,
|
|
17129
17135
|
event: x,
|
|
17130
|
-
plotX:
|
|
17131
|
-
plotY:
|
|
17136
|
+
plotX: T.x + T.width / 2,
|
|
17137
|
+
plotY: T.y + T.height / 2
|
|
17132
17138
|
});
|
|
17133
17139
|
}).on("mouseout", (x, v) => {
|
|
17134
17140
|
var L;
|
|
@@ -17158,7 +17164,7 @@ class vM extends Xt {
|
|
|
17158
17164
|
series: { name: this.config.name },
|
|
17159
17165
|
x: (g = u.properties) == null ? void 0 : g.name,
|
|
17160
17166
|
y: (p == null ? void 0 : p.y) ?? (p == null ? void 0 : p.value)
|
|
17161
|
-
}) : r.format ?
|
|
17167
|
+
}) : r.format ? fe(Kt(r.format, {
|
|
17162
17168
|
point: p || { name: (m = u.properties) == null ? void 0 : m.name },
|
|
17163
17169
|
series: { name: this.config.name },
|
|
17164
17170
|
x: (x = u.properties) == null ? void 0 : x.name,
|
|
@@ -17212,9 +17218,9 @@ class vM extends Xt {
|
|
|
17212
17218
|
*/
|
|
17213
17219
|
renderNavButtons(t, e, i) {
|
|
17214
17220
|
var C, L;
|
|
17215
|
-
const { plotArea: r } = this.context, o = this.config.mapNavigation || {}, s = o.buttonOptions || {}, a = s.theme || {}, l = o.buttons || {}, c = 24, h = 4, f = 10, u = c * 2 + h, d = s.align || "left", p = s.verticalAlign || "top", y = (d === "right" ? r.width - c - f : f) + (s.x ?? 0), g = (p === "bottom" ? r.height - u - f : f) + (s.y ?? 0), m = a.fill || "#ffffff", x = a.stroke || "#e0e0e0", v = a.style && a.style.color || s.symbolStroke || "#3f3f46", b = this.group.append("g").attr("class", "katucharts-map-nav"), k = [e, i], M = (_,
|
|
17221
|
+
const { plotArea: r } = this.context, o = this.config.mapNavigation || {}, s = o.buttonOptions || {}, a = s.theme || {}, l = o.buttons || {}, c = 24, h = 4, f = 10, u = c * 2 + h, d = s.align || "left", p = s.verticalAlign || "top", y = (d === "right" ? r.width - c - f : f) + (s.x ?? 0), g = (p === "bottom" ? r.height - u - f : f) + (s.y ?? 0), m = a.fill || "#ffffff", x = a.stroke || "#e0e0e0", v = a.style && a.style.color || s.symbolStroke || "#3f3f46", b = this.group.append("g").attr("class", "katucharts-map-nav"), k = [e, i], M = (_, T, I) => {
|
|
17216
17222
|
const E = b.append("g").style("cursor", "pointer").on("click", I);
|
|
17217
|
-
return E.append("rect").attr("x", y).attr("y", _).attr("width", c).attr("height", c).attr("fill", m).attr("stroke", x).attr("stroke-width", 1).attr("rx", 4), E.append("text").attr("x", y + c / 2).attr("y", _ + c / 2 + 1).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "17px").attr("fill", v).style("user-select", "none").text(
|
|
17223
|
+
return E.append("rect").attr("x", y).attr("y", _).attr("width", c).attr("height", c).attr("fill", m).attr("stroke", x).attr("stroke-width", 1).attr("rx", 4), E.append("text").attr("x", y + c / 2).attr("y", _ + c / 2 + 1).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "17px").attr("fill", v).style("user-select", "none").text(T), E.on("mouseover", function() {
|
|
17218
17224
|
rt(this).select("rect").attr("fill", "#f5f5f5");
|
|
17219
17225
|
}).on("mouseout", function() {
|
|
17220
17226
|
rt(this).select("rect").attr("fill", m);
|
|
@@ -17235,8 +17241,8 @@ class vM extends Xt {
|
|
|
17235
17241
|
this.mapGroup.insert("path", ".katucharts-map-feature").datum(w()).attr("d", e).attr("fill", "none").attr("stroke", m).attr("stroke-width", 0.3).attr("stroke-opacity", x).attr("class", "katucharts-globe-graticule");
|
|
17236
17242
|
}
|
|
17237
17243
|
this.featurePaths.attr("d", e);
|
|
17238
|
-
const _ = `katucharts-globe-spec-${Math.random().toString(36).slice(2, 8)}`,
|
|
17239
|
-
|
|
17244
|
+
const _ = `katucharts-globe-spec-${Math.random().toString(36).slice(2, 8)}`, T = M.append("radialGradient").attr("id", _).attr("cx", "35%").attr("cy", "25%");
|
|
17245
|
+
T.append("stop").attr("offset", "0%").attr("stop-color", "rgba(255,255,255,0.35)"), T.append("stop").attr("offset", "50%").attr("stop-color", "rgba(255,255,255,0.05)"), T.append("stop").attr("offset", "100%").attr("stop-color", "rgba(255,255,255,0)"), this.mapGroup.append("circle").attr("cx", h).attr("cy", f).attr("r", u).attr("fill", `url(#${_})`).style("pointer-events", "none").attr("class", "katucharts-globe-specular");
|
|
17240
17246
|
const I = this;
|
|
17241
17247
|
let E = null, P = v;
|
|
17242
17248
|
const S = yd().on("start", (w) => {
|
|
@@ -17244,14 +17250,14 @@ class vM extends Xt {
|
|
|
17244
17250
|
E = [A[0], A[1], w.x], I.autoRotateTimer && (P = !0, I.autoRotateTimer.stop(), I.autoRotateTimer = null);
|
|
17245
17251
|
}).on("drag", (w) => {
|
|
17246
17252
|
if (!E) return;
|
|
17247
|
-
const A = 0.4,
|
|
17253
|
+
const A = 0.4, $ = (w.x - E[2]) * A, R = E[0] + $, F = Math.max(-90, Math.min(90, E[1] - (w.y - w.subject.y) * A));
|
|
17248
17254
|
t.rotate([R, F]), I.redrawGlobe();
|
|
17249
17255
|
}).on("end", () => {
|
|
17250
17256
|
E = null, P && v && I.startAutoRotate(t, b);
|
|
17251
17257
|
});
|
|
17252
17258
|
this.group.call(S), this.group.style("cursor", "grab"), this.group.on("wheel", (w) => {
|
|
17253
17259
|
w.preventDefault();
|
|
17254
|
-
const A = t.scale(),
|
|
17260
|
+
const A = t.scale(), $ = w.deltaY > 0 ? 0.95 : 1.05, R = Math.max(u * 0.5, Math.min(u * 8, A * $));
|
|
17255
17261
|
t.scale(R), I.redrawGlobe();
|
|
17256
17262
|
}), v && this.startAutoRotate(t, b);
|
|
17257
17263
|
}
|
|
@@ -17318,30 +17324,30 @@ class wM extends Xt {
|
|
|
17318
17324
|
if (!L) return;
|
|
17319
17325
|
const _ = r(L);
|
|
17320
17326
|
if (!_ || !isFinite(_[0]) || !isFinite(_[1])) return;
|
|
17321
|
-
const [
|
|
17327
|
+
const [T, I] = _, E = M.color || u, P = ((w = M.marker) == null ? void 0 : w.radius) ?? c, S = s.append("g").attr("class", "katucharts-mappoint");
|
|
17322
17328
|
if (l) {
|
|
17323
|
-
const A = S.append("circle").attr("class", "katucharts-mappoint-marker").attr("cx",
|
|
17324
|
-
d && A.transition().duration(bt).delay(C * 12).ease(pt).attr("r", P), A.on("mouseover", (
|
|
17329
|
+
const A = S.append("circle").attr("class", "katucharts-mappoint-marker").attr("cx", T).attr("cy", I).attr("fill", E).attr("stroke", h).attr("stroke-width", f).style("cursor", t.cursor || "pointer").attr("r", d ? 0 : P);
|
|
17330
|
+
d && A.transition().duration(bt).delay(C * 12).ease(pt).attr("r", P), A.on("mouseover", ($) => {
|
|
17325
17331
|
var R, F;
|
|
17326
|
-
rt(
|
|
17332
|
+
rt($.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P * 1.4), this.context.events.emit("point:mouseover", {
|
|
17327
17333
|
point: M,
|
|
17328
17334
|
index: C,
|
|
17329
17335
|
series: this,
|
|
17330
|
-
event:
|
|
17331
|
-
plotX:
|
|
17336
|
+
event: $,
|
|
17337
|
+
plotX: T,
|
|
17332
17338
|
plotY: I
|
|
17333
|
-
}), (F = (R = M.events) == null ? void 0 : R.mouseOver) == null || F.call(M,
|
|
17334
|
-
}).on("mouseout", (
|
|
17339
|
+
}), (F = (R = M.events) == null ? void 0 : R.mouseOver) == null || F.call(M, $);
|
|
17340
|
+
}).on("mouseout", ($) => {
|
|
17335
17341
|
var R, F;
|
|
17336
|
-
rt(
|
|
17337
|
-
}).on("click", (
|
|
17342
|
+
rt($.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P), this.context.events.emit("point:mouseout", { point: M, index: C, series: this, event: $ }), (F = (R = M.events) == null ? void 0 : R.mouseOut) == null || F.call(M, $);
|
|
17343
|
+
}).on("click", ($) => {
|
|
17338
17344
|
var R, F, D, z, B, H, J;
|
|
17339
|
-
this.context.events.emit("point:click", { point: M, index: C, series: this, event:
|
|
17345
|
+
this.context.events.emit("point:click", { point: M, index: C, series: this, event: $ }), (F = (R = M.events) == null ? void 0 : R.click) == null || F.call(M, $), (B = (z = (D = t.point) == null ? void 0 : D.events) == null ? void 0 : z.click) == null || B.call(M, $), (J = (H = t.events) == null ? void 0 : H.click) == null || J.call(this, $);
|
|
17340
17346
|
});
|
|
17341
17347
|
}
|
|
17342
17348
|
if (y) {
|
|
17343
17349
|
const A = this.formatLabel(M, C);
|
|
17344
|
-
A && s.append("text").attr("class", "katucharts-mappoint-label").attr("x",
|
|
17350
|
+
A && s.append("text").attr("class", "katucharts-mappoint-label").attr("x", T).attr("y", I - P - 3).attr("text-anchor", "middle").attr("dominant-baseline", "auto").attr("font-size", m).attr("font-weight", x).attr("fill", g).style("pointer-events", "none").style("text-shadow", this.labelHalo()).text(A);
|
|
17345
17351
|
}
|
|
17346
17352
|
});
|
|
17347
17353
|
}
|
|
@@ -17352,7 +17358,7 @@ class wM extends Xt {
|
|
|
17352
17358
|
x: t.id ?? t.name,
|
|
17353
17359
|
y: t.y ?? t.value
|
|
17354
17360
|
};
|
|
17355
|
-
return i != null && i.formatter ? i.formatter.call(r) : i != null && i.format ?
|
|
17361
|
+
return i != null && i.formatter ? i.formatter.call(r) : i != null && i.format ? fe(Kt(i.format, r)) : t.id || t.name || "";
|
|
17356
17362
|
}
|
|
17357
17363
|
getDataExtents() {
|
|
17358
17364
|
return { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
@@ -17398,13 +17404,13 @@ class kM extends Xt {
|
|
|
17398
17404
|
v.name == null && typeof v.from == "string" && typeof v.to == "string" && (v.name = `${v.from} → ${v.to}`);
|
|
17399
17405
|
const M = r(b), C = r(k);
|
|
17400
17406
|
if (!M || !C || !isFinite(M[0]) || !isFinite(C[0])) return;
|
|
17401
|
-
const L = v.weight ?? v.y ?? v.value ?? 1, _ = Math.max(2, y * (L / p)),
|
|
17407
|
+
const L = v.weight ?? v.y ?? v.value ?? 1, _ = Math.max(2, y * (L / p)), T = v.color || l, { d: I, mid: E, tip: P, tipAngle: S } = this.buildFlowPath(M, C, _, h), w = a.append("path").attr("class", "katucharts-flowmap-link").attr("d", I).attr("fill", T).attr("fill-opacity", u ? 0 : c).attr("stroke", "none").style("cursor", t.cursor || "pointer");
|
|
17402
17408
|
if (u && w.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c), f) {
|
|
17403
|
-
const A = _ * 1.1 + 3,
|
|
17404
|
-
u &&
|
|
17409
|
+
const A = _ * 1.1 + 3, $ = a.append("path").attr("class", "katucharts-flowmap-arrow").attr("d", this.arrowHead(P, S, A)).attr("fill", T).attr("fill-opacity", u ? 0 : c).style("pointer-events", "none");
|
|
17410
|
+
u && $.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c);
|
|
17405
17411
|
}
|
|
17406
17412
|
w.on("mouseover", (A) => {
|
|
17407
|
-
var
|
|
17413
|
+
var $, R;
|
|
17408
17414
|
rt(A.currentTarget).transition("hover").duration(K).ease(Z).attr("fill-opacity", Math.min(1, c + 0.3)), this.context.events.emit("point:mouseover", {
|
|
17409
17415
|
point: m,
|
|
17410
17416
|
index: x,
|
|
@@ -17412,13 +17418,13 @@ class kM extends Xt {
|
|
|
17412
17418
|
event: A,
|
|
17413
17419
|
plotX: E[0],
|
|
17414
17420
|
plotY: E[1]
|
|
17415
|
-
}), (R = (
|
|
17421
|
+
}), (R = ($ = v.events) == null ? void 0 : $.mouseOver) == null || R.call(m, A);
|
|
17416
17422
|
}).on("mouseout", (A) => {
|
|
17417
|
-
var
|
|
17418
|
-
rt(A.currentTarget).transition("hover").duration(K).ease(Z).attr("fill-opacity", c), this.context.events.emit("point:mouseout", { point: m, index: x, series: this, event: A }), (R = (
|
|
17423
|
+
var $, R;
|
|
17424
|
+
rt(A.currentTarget).transition("hover").duration(K).ease(Z).attr("fill-opacity", c), this.context.events.emit("point:mouseout", { point: m, index: x, series: this, event: A }), (R = ($ = v.events) == null ? void 0 : $.mouseOut) == null || R.call(m, A);
|
|
17419
17425
|
}).on("click", (A) => {
|
|
17420
|
-
var
|
|
17421
|
-
this.context.events.emit("point:click", { point: m, index: x, series: this, event: A }), (R = (
|
|
17426
|
+
var $, R, F, D, z, B, H;
|
|
17427
|
+
this.context.events.emit("point:click", { point: m, index: x, series: this, event: A }), (R = ($ = v.events) == null ? void 0 : $.click) == null || R.call(m, A), (z = (D = (F = t.point) == null ? void 0 : F.events) == null ? void 0 : D.click) == null || z.call(m, A), (H = (B = t.events) == null ? void 0 : B.click) == null || H.call(this, A);
|
|
17422
17428
|
});
|
|
17423
17429
|
});
|
|
17424
17430
|
}
|
|
@@ -17432,7 +17438,7 @@ class kM extends Xt {
|
|
|
17432
17438
|
const o = e[0] - t[0], s = e[1] - t[1], a = Math.hypot(o, s) || 1, l = -s / a, c = o / a, h = [(t[0] + e[0]) / 2 + l * r * a, (t[1] + e[1]) / 2 + c * r * a], f = 24, u = Math.max(0.6, i * 0.12), d = i / 2, p = [], y = [];
|
|
17433
17439
|
let g = t;
|
|
17434
17440
|
for (let k = 0; k <= f; k++) {
|
|
17435
|
-
const M = k / f, C = 1 - M, L = C * C * t[0] + 2 * C * M * h[0] + M * M * e[0], _ = C * C * t[1] + 2 * C * M * h[1] + M * M * e[1],
|
|
17441
|
+
const M = k / f, C = 1 - M, L = C * C * t[0] + 2 * C * M * h[0] + M * M * e[0], _ = C * C * t[1] + 2 * C * M * h[1] + M * M * e[1], T = L - g[0], I = _ - g[1], E = Math.hypot(T, I) || 1, P = -I / E, S = T / E, w = u + (d - u) * M;
|
|
17436
17442
|
p.push([L + P * w, _ + S * w]), y.push([L - P * w, _ - S * w]), g = [L, _];
|
|
17437
17443
|
}
|
|
17438
17444
|
const m = 0.25 * t[0] + 0.5 * h[0] + 0.25 * e[0], x = 0.25 * t[1] + 0.5 * h[1] + 0.25 * e[1], v = Math.atan2(e[1] - h[1], e[0] - h[0]);
|
|
@@ -17483,36 +17489,36 @@ class SM extends Xt {
|
|
|
17483
17489
|
render() {
|
|
17484
17490
|
var L;
|
|
17485
17491
|
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = r.filter((_) => {
|
|
17486
|
-
var
|
|
17487
|
-
return ((
|
|
17492
|
+
var T;
|
|
17493
|
+
return ((T = _.sets) == null ? void 0 : T.length) === 1;
|
|
17488
17494
|
}), s = r.filter((_) => {
|
|
17489
|
-
var
|
|
17490
|
-
return ((
|
|
17495
|
+
var T;
|
|
17496
|
+
return ((T = _.sets) == null ? void 0 : T.length) >= 2;
|
|
17491
17497
|
});
|
|
17492
17498
|
if (o.length === 0) return;
|
|
17493
17499
|
const a = t.width / 2, l = t.height / 2, c = t.height / 2 * 0.92, h = Math.max(...o.map((_) => _.value || _.y || 1)), f = this.config.opacity ?? 0.25, u = Math.min(1, f + 0.25), d = 0.4, p = this.config.borderColor, y = this.config.borderWidth ?? 0, g = this.resolveDashStyle(this.config.borderDashStyle), m = this.config.allowPointSelect === !0, x = /* @__PURE__ */ new Map();
|
|
17494
17500
|
this.layoutSets(o, s, x, a, l, c, h, e, t);
|
|
17495
17501
|
const v = Array.from(x.values()), b = [];
|
|
17496
17502
|
for (const _ of o) {
|
|
17497
|
-
const
|
|
17498
|
-
if (
|
|
17499
|
-
let I =
|
|
17500
|
-
const P = v.filter((S) => S.id !==
|
|
17503
|
+
const T = x.get(_.sets[0]);
|
|
17504
|
+
if (!T) continue;
|
|
17505
|
+
let I = T.cx, E = T.cy;
|
|
17506
|
+
const P = v.filter((S) => S.id !== T.id);
|
|
17501
17507
|
if (P.length > 0) {
|
|
17502
17508
|
let S = 0, w = 0;
|
|
17503
|
-
for (const
|
|
17504
|
-
const R =
|
|
17509
|
+
for (const $ of P) {
|
|
17510
|
+
const R = T.cx - $.cx, F = T.cy - $.cy, D = Math.sqrt(R * R + F * F) || 1;
|
|
17505
17511
|
S += R / D, w += F / D;
|
|
17506
17512
|
}
|
|
17507
17513
|
const A = Math.sqrt(S * S + w * w) || 1;
|
|
17508
|
-
I =
|
|
17514
|
+
I = T.cx + S / A * T.r * 0.7, E = T.cy + w / A * T.r * 0.7;
|
|
17509
17515
|
}
|
|
17510
17516
|
b.push({
|
|
17511
17517
|
sets: _.sets,
|
|
17512
17518
|
value: _.value || _.y || 0,
|
|
17513
17519
|
name: _.name || _.sets[0],
|
|
17514
|
-
color: _.color ||
|
|
17515
|
-
path: this.circlePath(
|
|
17520
|
+
color: _.color || T.color,
|
|
17521
|
+
path: this.circlePath(T.cx, T.cy, T.r),
|
|
17516
17522
|
labelX: I,
|
|
17517
17523
|
labelY: E,
|
|
17518
17524
|
data: _,
|
|
@@ -17522,11 +17528,11 @@ class SM extends Xt {
|
|
|
17522
17528
|
}
|
|
17523
17529
|
for (const _ of s) {
|
|
17524
17530
|
if (_.sets.length !== 2) continue;
|
|
17525
|
-
const
|
|
17526
|
-
if (
|
|
17527
|
-
const E = this.lensPath(
|
|
17531
|
+
const T = x.get(_.sets[0]), I = x.get(_.sets[1]);
|
|
17532
|
+
if (!T || !I) continue;
|
|
17533
|
+
const E = this.lensPath(T, I);
|
|
17528
17534
|
if (!E) continue;
|
|
17529
|
-
const P = _.color || this.blendColors(
|
|
17535
|
+
const P = _.color || this.blendColors(T.color, I.color);
|
|
17530
17536
|
b.push({
|
|
17531
17537
|
sets: _.sets,
|
|
17532
17538
|
value: _.value || _.y || 0,
|
|
@@ -17542,11 +17548,11 @@ class SM extends Xt {
|
|
|
17542
17548
|
}
|
|
17543
17549
|
for (const _ of s) {
|
|
17544
17550
|
if (_.sets.length !== 3) continue;
|
|
17545
|
-
const
|
|
17546
|
-
if (
|
|
17547
|
-
const I = this.triIntersectionPath(
|
|
17551
|
+
const T = _.sets.map((P) => x.get(P)).filter(Boolean);
|
|
17552
|
+
if (T.length < 3) continue;
|
|
17553
|
+
const I = this.triIntersectionPath(T[0], T[1], T[2]);
|
|
17548
17554
|
if (!I) continue;
|
|
17549
|
-
const E = _.color || this.blendColors(
|
|
17555
|
+
const E = _.color || this.blendColors(T[0].color, T[1].color, T[2].color);
|
|
17550
17556
|
b.push({
|
|
17551
17557
|
sets: _.sets,
|
|
17552
17558
|
value: _.value || _.y || 0,
|
|
@@ -17560,14 +17566,14 @@ class SM extends Xt {
|
|
|
17560
17566
|
key: [..._.sets].sort().join("_")
|
|
17561
17567
|
});
|
|
17562
17568
|
}
|
|
17563
|
-
b.sort((_,
|
|
17569
|
+
b.sort((_, T) => _.order - T.order);
|
|
17564
17570
|
const M = (((L = this.config.accessibility) == null ? void 0 : L.point) || {}).descriptionFormatter, C = this.group.selectAll(".katucharts-venn-area").data(b, (_) => _.key).join(
|
|
17565
17571
|
(_) => {
|
|
17566
|
-
const
|
|
17572
|
+
const T = _.append("g").attr(
|
|
17567
17573
|
"class",
|
|
17568
17574
|
(I) => `katucharts-venn-area katucharts-venn-${I.sets.length === 1 ? "circle-area" : "intersection-area"}`
|
|
17569
17575
|
).attr("data-venn-sets", (I) => I.sets.join("_"));
|
|
17570
|
-
return
|
|
17576
|
+
return T.append("path"), T;
|
|
17571
17577
|
},
|
|
17572
17578
|
(_) => _,
|
|
17573
17579
|
(_) => _.remove()
|
|
@@ -17578,7 +17584,7 @@ class SM extends Xt {
|
|
|
17578
17584
|
), C.select("path").attr("d", (_) => _.path).attr("fill", (_) => _.color).attr("fill-opacity", (_) => _.sets.length === 1 ? f : 0).attr(
|
|
17579
17585
|
"stroke",
|
|
17580
17586
|
(_) => _.sets.length === 1 ? p || _.color : "none"
|
|
17581
|
-
).attr("stroke-width", (_) => _.sets.length === 1 ? y : 0).attr("stroke-dasharray", g).attr("role", "img").attr("aria-label", (_) => M ? M({ name: _.name, value: _.value, sets: _.sets }) : `${_.name}: ${_.value}`).style("cursor", this.config.cursor || "pointer"), C.sort((_,
|
|
17587
|
+
).attr("stroke-width", (_) => _.sets.length === 1 ? y : 0).attr("stroke-dasharray", g).attr("role", "img").attr("aria-label", (_) => M ? M({ name: _.name, value: _.value, sets: _.sets }) : `${_.name}: ${_.value}`).style("cursor", this.config.cursor || "pointer"), C.sort((_, T) => _.order - T.order), C.each(function(_) {
|
|
17582
17588
|
if (_.sets.length >= 2) {
|
|
17583
17589
|
const I = this.querySelector("path");
|
|
17584
17590
|
if (I)
|
|
@@ -17588,7 +17594,7 @@ class SM extends Xt {
|
|
|
17588
17594
|
} catch {
|
|
17589
17595
|
}
|
|
17590
17596
|
}
|
|
17591
|
-
}), i && C.select("path").attr("opacity", 0).transition().duration(bt).ease(pt).delay((_,
|
|
17597
|
+
}), i && C.select("path").attr("opacity", 0).transition().duration(bt).ease(pt).delay((_, T) => T * Wt).attr("opacity", 1), this.config.enableMouseTracking !== !1 && this.attachEvents(C, b, f, u, d, m), this.renderLabels(b, i ?? !1);
|
|
17592
17598
|
}
|
|
17593
17599
|
resolveDashStyle(t) {
|
|
17594
17600
|
return t && AM[t] || "none";
|
|
@@ -17622,7 +17628,7 @@ class SM extends Xt {
|
|
|
17622
17628
|
event: h
|
|
17623
17629
|
}), (m = (g = (y = f.data) == null ? void 0 : y.events) == null ? void 0 : g.mouseOut) == null || m.call(f.data, h);
|
|
17624
17630
|
}).on("click", (h, f) => {
|
|
17625
|
-
var p, y, g, m, x, v, b, k, M, C, L, _,
|
|
17631
|
+
var p, y, g, m, x, v, b, k, M, C, L, _, T;
|
|
17626
17632
|
const u = e.indexOf(f);
|
|
17627
17633
|
s && (this.selectedIndices.has(u) ? (this.selectedIndices.delete(u), (g = (y = (p = f.data) == null ? void 0 : p.events) == null ? void 0 : y.unselect) == null || g.call(f.data, h)) : (this.selectedIndices.add(u), (v = (x = (m = f.data) == null ? void 0 : m.events) == null ? void 0 : x.select) == null || v.call(f.data, h))), this.context.events.emit("point:click", {
|
|
17628
17634
|
point: { name: f.name, y: f.value, value: f.value, sets: f.sets },
|
|
@@ -17630,7 +17636,7 @@ class SM extends Xt {
|
|
|
17630
17636
|
series: this,
|
|
17631
17637
|
event: h
|
|
17632
17638
|
}), (M = (k = (b = f.data) == null ? void 0 : b.events) == null ? void 0 : k.click) == null || M.call(f.data, h), (L = (C = this.config.events) == null ? void 0 : C.click) == null || L.call(this, h);
|
|
17633
|
-
const d = (
|
|
17639
|
+
const d = (T = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : T.click;
|
|
17634
17640
|
d && d.call(
|
|
17635
17641
|
{ ...f.data, sets: f.sets, name: f.name, value: f.value },
|
|
17636
17642
|
h
|
|
@@ -17675,7 +17681,7 @@ class SM extends Xt {
|
|
|
17675
17681
|
), d = /* @__PURE__ */ new Map();
|
|
17676
17682
|
for (const w of e) {
|
|
17677
17683
|
if (((P = w.sets) == null ? void 0 : P.length) !== 2) continue;
|
|
17678
|
-
const [A,
|
|
17684
|
+
const [A, $] = w.sets, R = f.indexOf(A), F = f.indexOf($);
|
|
17679
17685
|
if (R < 0 || F < 0) continue;
|
|
17680
17686
|
const D = w.value || w.y || 0;
|
|
17681
17687
|
if (D <= 0)
|
|
@@ -17689,8 +17695,8 @@ class SM extends Xt {
|
|
|
17689
17695
|
for (const w of e) {
|
|
17690
17696
|
if (((S = w.sets) == null ? void 0 : S.length) !== 2) continue;
|
|
17691
17697
|
const A = w.value || w.y || 0;
|
|
17692
|
-
for (const
|
|
17693
|
-
const R = f.indexOf(
|
|
17698
|
+
for (const $ of w.sets) {
|
|
17699
|
+
const R = f.indexOf($);
|
|
17694
17700
|
R >= 0 && (g[R] += A);
|
|
17695
17701
|
}
|
|
17696
17702
|
}
|
|
@@ -17698,7 +17704,7 @@ class SM extends Xt {
|
|
|
17698
17704
|
p[m[0]] = [0, 0], y.add(m[0]);
|
|
17699
17705
|
for (let w = 1; w < h; w++) {
|
|
17700
17706
|
const A = m[w];
|
|
17701
|
-
let
|
|
17707
|
+
let $ = [0, 0], R = 1 / 0;
|
|
17702
17708
|
const F = [];
|
|
17703
17709
|
for (const D of y) {
|
|
17704
17710
|
const z = D < A ? `${D}-${A}` : `${A}-${D}`, B = d.get(z) ?? (u[D] + u[A]) * 1.1, [H, J] = p[D];
|
|
@@ -17713,21 +17719,21 @@ class SM extends Xt {
|
|
|
17713
17719
|
const J = H < A ? `${H}-${A}` : `${A}-${H}`, X = d.get(J) ?? (u[H] + u[A]) * 1.1, j = Math.sqrt((D - p[H][0]) ** 2 + (z - p[H][1]) ** 2);
|
|
17714
17720
|
B += (j - X) ** 2;
|
|
17715
17721
|
}
|
|
17716
|
-
B < R && (R = B,
|
|
17722
|
+
B < R && (R = B, $ = [D, z]);
|
|
17717
17723
|
}
|
|
17718
|
-
p[A] =
|
|
17724
|
+
p[A] = $, y.add(A);
|
|
17719
17725
|
}
|
|
17720
17726
|
h >= 3 && this.optimizePositions(p, u, d, h);
|
|
17721
17727
|
let x = 1 / 0, v = -1 / 0, b = 1 / 0, k = -1 / 0;
|
|
17722
17728
|
for (let w = 0; w < h; w++)
|
|
17723
17729
|
x = Math.min(x, p[w][0] - u[w]), v = Math.max(v, p[w][0] + u[w]), b = Math.min(b, p[w][1] - u[w]), k = Math.max(k, p[w][1] + u[w]);
|
|
17724
|
-
const M = v - x || 1, C = k - b || 1, L = c ? c.width * 0.95 : s * 2, _ = c ? c.height * 0.95 : s * 2,
|
|
17730
|
+
const M = v - x || 1, C = k - b || 1, L = c ? c.width * 0.95 : s * 2, _ = c ? c.height * 0.95 : s * 2, T = Math.min(L / M, _ / C), I = (x + v) / 2, E = (b + k) / 2;
|
|
17725
17731
|
for (let w = 0; w < h; w++) {
|
|
17726
|
-
const A = r + (p[w][0] - I) *
|
|
17732
|
+
const A = r + (p[w][0] - I) * T, $ = o + (p[w][1] - E) * T, R = u[w] * T;
|
|
17727
17733
|
i.set(f[w], {
|
|
17728
17734
|
id: f[w],
|
|
17729
17735
|
cx: A,
|
|
17730
|
-
cy:
|
|
17736
|
+
cy: $,
|
|
17731
17737
|
r: R,
|
|
17732
17738
|
color: t[w].color || Nu[w % Nu.length]
|
|
17733
17739
|
});
|
|
@@ -17958,9 +17964,9 @@ class PM extends Xt {
|
|
|
17958
17964
|
k.append("rect").attr("height", m).attr("rx", a).attr("width", (L) => e ? 0 : Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), k.append("text").attr("class", "katucharts-race-label").attr("x", 6).attr("y", m / 2).attr("dy", "0.35em").attr("fill", "#fff").attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").text((L) => L.name), k.append("text").attr("class", "katucharts-race-value").attr("y", m / 2).attr("dy", "0.35em").attr("fill", Pe).attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").attr("data-value", (L) => L.value).attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).text((L) => L.value.toLocaleString());
|
|
17959
17965
|
const M = k.merge(b);
|
|
17960
17966
|
c > 0 ? (M.transition().duration(c).ease(fr).attr("transform", (L, _) => `translate(0,${_ * x})`).style("opacity", 1), M.select("rect").transition().duration(c).ease(fr).attr("width", (L) => Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), M.select(".katucharts-race-value").transition().duration(c).ease(fr).attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).tween("text", function(L) {
|
|
17961
|
-
const _ = this,
|
|
17967
|
+
const _ = this, T = parseFloat(_.getAttribute("data-value") || "0"), I = L.value;
|
|
17962
17968
|
return (E) => {
|
|
17963
|
-
const P = Math.round(
|
|
17969
|
+
const P = Math.round(T + (I - T) * E);
|
|
17964
17970
|
_.textContent = P.toLocaleString(), _.setAttribute("data-value", String(P));
|
|
17965
17971
|
};
|
|
17966
17972
|
})) : (M.attr("transform", (L, _) => `translate(0,${_ * x})`).style("opacity", 1), M.select("rect").attr("width", (L) => Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), M.select(".katucharts-race-value").attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).attr("data-value", (L) => L.value).text((L) => L.value.toLocaleString())), M.select(".katucharts-race-label").style(
|
|
@@ -18043,10 +18049,10 @@ class EM extends Xt {
|
|
|
18043
18049
|
super(t), t.clip = !1;
|
|
18044
18050
|
}
|
|
18045
18051
|
render() {
|
|
18046
|
-
var _,
|
|
18052
|
+
var _, T, I;
|
|
18047
18053
|
const { plotArea: t, colors: e } = this.context, i = this.data || [];
|
|
18048
18054
|
if (!i.length) return;
|
|
18049
|
-
const r = this.config.layout === "vertical" ? "vertical" : "horizontal", o = this.config.link || {}, s = ((_ = this.config.marker) == null ? void 0 : _.radius) ?? 6, a = o.color || "#cccccc", l = o.lineWidth ?? 1, c = this.config.layoutAlgorithm === "cluster", h = this.config.levels || [], f = this.config.dataLabels || {}, u = ((
|
|
18055
|
+
const r = this.config.layout === "vertical" ? "vertical" : "horizontal", o = this.config.link || {}, s = ((_ = this.config.marker) == null ? void 0 : _.radius) ?? 6, a = o.color || "#cccccc", l = o.lineWidth ?? 1, c = this.config.layoutAlgorithm === "cluster", h = this.config.levels || [], f = this.config.dataLabels || {}, u = ((T = f.style) == null ? void 0 : T.fontSize) || Mt, d = f.color || ((I = f.style) == null ? void 0 : I.color) || Pe, p = this.buildRoot(i);
|
|
18050
18056
|
if (!p) return;
|
|
18051
18057
|
const y = r === "horizontal" ? [t.height, t.width] : [t.width, t.height], g = c ? Ew() : rk();
|
|
18052
18058
|
g.size(y), g(p);
|
|
@@ -18093,23 +18099,23 @@ class TM extends Xt {
|
|
|
18093
18099
|
var b, k, M, C, L;
|
|
18094
18100
|
const { plotArea: t, colors: e } = this.context, i = this.data || [];
|
|
18095
18101
|
if (!i.length) return;
|
|
18096
|
-
const r = this.config.minFontSize ?? 8, o = this.config.maxFontSize ?? 50, s = this.config.rotation || {}, a = Array.isArray(s.orientations) ? s.orientations : s.from !== void 0 && s.to !== void 0 ? [s.from, s.to] : [0], l = ((k = (b = this.config.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.fontFamily) || "sans-serif", c = ((M = this.config.dataLabels) == null ? void 0 : M.color) || ((L = (C = this.config.dataLabels) == null ? void 0 : C.style) == null ? void 0 : L.color) || Pe, h = [...i].filter((_) => _ && _.name && typeof _.weight == "number" && _.weight > 0).sort((_,
|
|
18102
|
+
const r = this.config.minFontSize ?? 8, o = this.config.maxFontSize ?? 50, s = this.config.rotation || {}, a = Array.isArray(s.orientations) ? s.orientations : s.from !== void 0 && s.to !== void 0 ? [s.from, s.to] : [0], l = ((k = (b = this.config.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.fontFamily) || "sans-serif", c = ((M = this.config.dataLabels) == null ? void 0 : M.color) || ((L = (C = this.config.dataLabels) == null ? void 0 : C.style) == null ? void 0 : L.color) || Pe, h = [...i].filter((_) => _ && _.name && typeof _.weight == "number" && _.weight > 0).sort((_, T) => T.weight - _.weight);
|
|
18097
18103
|
if (!h.length) return;
|
|
18098
18104
|
const f = h[h.length - 1].weight, u = h[0].weight, d = (_) => {
|
|
18099
18105
|
if (u === f) return (r + o) / 2;
|
|
18100
|
-
const
|
|
18101
|
-
return r +
|
|
18106
|
+
const T = (_ - f) / (u - f);
|
|
18107
|
+
return r + T * (o - r);
|
|
18102
18108
|
}, p = t.width / 2, y = t.height / 2, g = [], m = this.group.append("g").attr("class", "katucharts-wordcloud"), { measure: x, dispose: v } = this.createMeasurer(m.node(), l);
|
|
18103
18109
|
try {
|
|
18104
|
-
h.forEach((_,
|
|
18105
|
-
const I = d(_.weight), E = a[
|
|
18110
|
+
h.forEach((_, T) => {
|
|
18111
|
+
const I = d(_.weight), E = a[T % a.length] ?? 0, P = x(_.name, I), S = P.width, w = P.height, A = this.findSpiralSpot(p, y, S, w, E, g, t.width, t.height);
|
|
18106
18112
|
A && g.push({ x: A.x, y: A.y, width: S, height: w, word: _, rotation: E, fontSize: I });
|
|
18107
18113
|
});
|
|
18108
18114
|
} finally {
|
|
18109
18115
|
v();
|
|
18110
18116
|
}
|
|
18111
|
-
g.forEach((_,
|
|
18112
|
-
const I = _.word.color || e[
|
|
18117
|
+
g.forEach((_, T) => {
|
|
18118
|
+
const I = _.word.color || e[T % Math.max(1, e.length)] || c;
|
|
18113
18119
|
m.append("text").attr("x", _.x).attr("y", _.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("transform", _.rotation ? `rotate(${_.rotation},${_.x},${_.y})` : null).attr("font-size", _.fontSize).attr("font-family", l).attr("fill", I).style("pointer-events", "none").text(_.word.name);
|
|
18114
18120
|
}), this.context.animate && m.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
|
|
18115
18121
|
}
|
|
@@ -18162,12 +18168,12 @@ class LM extends Xt {
|
|
|
18162
18168
|
return "katucharts-candlestick";
|
|
18163
18169
|
}
|
|
18164
18170
|
render() {
|
|
18165
|
-
var L, _,
|
|
18166
|
-
const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.context.animate, o = this.data, s = this.applyDataGrouping(o), a = this.config.pointRange, l = this.config.groupPadding ?? 0.2, c = this.config.pointPadding ?? 0.1, h = l + c, f = this.config.maxPointWidth ?? 1 / 0, u = a ? Math.max(1, Math.min(f, i.width / Math.max(1, ((L = t.domain) == null ? void 0 : L[1]) - ((_ = t.domain) == null ? void 0 : _[0]) || s.length) * a * (1 - h))) : Math.max(1, Math.min(f, i.width / s.length * (1 - h))), d = this.config.pointWidth ?? u, p = this.config.color || "#f45b5b", y = this.config.upColor || "#2f7ed8", g = this.config.lineColor || p, m = this.config.upLineColor || y, x = this.config.lineWidth ?? 1, v = ((I = (
|
|
18171
|
+
var L, _, T, I, E, P, S, w;
|
|
18172
|
+
const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.context.animate, o = this.data, s = this.applyDataGrouping(o), a = this.config.pointRange, l = this.config.groupPadding ?? 0.2, c = this.config.pointPadding ?? 0.1, h = l + c, f = this.config.maxPointWidth ?? 1 / 0, u = a ? Math.max(1, Math.min(f, i.width / Math.max(1, ((L = t.domain) == null ? void 0 : L[1]) - ((_ = t.domain) == null ? void 0 : _[0]) || s.length) * a * (1 - h))) : Math.max(1, Math.min(f, i.width / s.length * (1 - h))), d = this.config.pointWidth ?? u, p = this.config.color || "#f45b5b", y = this.config.upColor || "#2f7ed8", g = this.config.lineColor || p, m = this.config.upLineColor || y, x = this.config.lineWidth ?? 1, v = ((I = (T = this.config.states) == null ? void 0 : T.inactive) == null ? void 0 : I.opacity) ?? 0.4, b = this.config.allowPointSelect === !0, k = (P = (E = this.config.states) == null ? void 0 : E.select) == null ? void 0 : P.color, M = (w = (S = this.config.states) == null ? void 0 : S.select) == null ? void 0 : w.borderColor, C = [];
|
|
18167
18173
|
for (let A = 0; A < s.length; A++) {
|
|
18168
|
-
const
|
|
18169
|
-
if (
|
|
18170
|
-
const R =
|
|
18174
|
+
const $ = s[A];
|
|
18175
|
+
if ($.y === null && $.open === void 0) continue;
|
|
18176
|
+
const R = $.open ?? $.y ?? 0, F = $.high ?? R, D = $.low ?? R, z = $.close ?? R, B = t.getPixelForValue($.x ?? A), H = z >= R, J = this.getCandleStyle({
|
|
18171
18177
|
open: R,
|
|
18172
18178
|
high: F,
|
|
18173
18179
|
low: D,
|
|
@@ -18193,24 +18199,24 @@ class LM extends Xt {
|
|
|
18193
18199
|
W.select("rect").transition("size").duration(K).ease(Z).attr("x", B - d * 0.7).attr("width", d * 1.4), W.select("line").transition("size").duration(K).ease(Z).attr("stroke-width", x + ft), W.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), C.forEach((st) => st.interrupt("highlight")), C.forEach((st) => st.attr("opacity", 1)), C.forEach((st, wt) => {
|
|
18194
18200
|
wt !== A && st.transition("highlight").duration(K).ease(Z).attr("opacity", v);
|
|
18195
18201
|
}), this.context.events.emit("point:mouseover", {
|
|
18196
|
-
point: {
|
|
18202
|
+
point: { ...$, open: R, high: F, low: D, close: z },
|
|
18197
18203
|
index: A,
|
|
18198
18204
|
series: this,
|
|
18199
18205
|
event: it,
|
|
18200
18206
|
plotX: B,
|
|
18201
18207
|
plotY: e.getPixelForValue((F + D) / 2)
|
|
18202
|
-
}), (q = (ot =
|
|
18208
|
+
}), (q = (ot = $.events) == null ? void 0 : ot.mouseOver) == null || q.call($, it);
|
|
18203
18209
|
}).on("mouseout", (it) => {
|
|
18204
18210
|
var ft, dt;
|
|
18205
18211
|
W.select("rect").transition("size").duration(K).ease(Z).attr("x", B - d / 2).attr("width", d), W.select("line").transition("size").duration(K).ease(Z).attr("stroke-width", x), W.style("filter", ""), C.forEach((at) => at.interrupt("highlight")), C.forEach((at) => at.transition("highlight").duration(K).ease(Z).attr("opacity", 1)), this.context.events.emit("point:mouseout", {
|
|
18206
|
-
point:
|
|
18212
|
+
point: $,
|
|
18207
18213
|
index: A,
|
|
18208
18214
|
series: this,
|
|
18209
18215
|
event: it
|
|
18210
|
-
}), (dt = (ft =
|
|
18216
|
+
}), (dt = (ft = $.events) == null ? void 0 : ft.mouseOut) == null || dt.call($, it);
|
|
18211
18217
|
}).on("click", (it) => {
|
|
18212
18218
|
var ft, dt, at, ot, q, st, wt, Ct;
|
|
18213
|
-
b && (this.selectedIndices.has(A) ? (this.selectedIndices.delete(A), W.select("rect").attr("stroke-width", x), (dt = (ft =
|
|
18219
|
+
b && (this.selectedIndices.has(A) ? (this.selectedIndices.delete(A), W.select("rect").attr("stroke-width", x), (dt = (ft = $.events) == null ? void 0 : ft.unselect) == null || dt.call($, it)) : (this.selectedIndices.add(A), W.select("rect").attr("stroke", M || "#000").attr("stroke-width", k ? 2 : x + 1), k && W.select("rect").attr("fill", k), (ot = (at = $.events) == null ? void 0 : at.select) == null || ot.call($, it))), this.context.events.emit("point:click", { point: $, index: A, series: this, event: it }), (st = (q = $.events) == null ? void 0 : q.click) == null || st.call($, it), (Ct = (wt = this.config.events) == null ? void 0 : wt.click) == null || Ct.call(this, it);
|
|
18214
18220
|
});
|
|
18215
18221
|
}
|
|
18216
18222
|
this.renderCandlestickLabels(s, t, e);
|
|
@@ -18229,7 +18235,7 @@ class LM extends Xt {
|
|
|
18229
18235
|
series: { name: this.config.name },
|
|
18230
18236
|
x: c.x,
|
|
18231
18237
|
y: c.y
|
|
18232
|
-
}) : r.format ? p =
|
|
18238
|
+
}) : r.format ? p = fe(Kt(r.format, {
|
|
18233
18239
|
point: c,
|
|
18234
18240
|
series: { name: this.config.name },
|
|
18235
18241
|
x: c.x,
|
|
@@ -18290,8 +18296,8 @@ class IM extends Xt {
|
|
|
18290
18296
|
const y = p.open ?? p.y ?? 0, g = p.high ?? y, m = p.low ?? y, x = p.close ?? y, v = t.getPixelForValue(p.x ?? d), b = x >= y ? l : a, k = this.group.append("g").attr("class", "katucharts-ohlc").style("cursor", this.config.cursor || "pointer");
|
|
18291
18297
|
h.push(k), r && k.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Ce(d, 0, Wt, o.length)).attr("opacity", 1), k.append("line").attr("x1", v).attr("x2", v).attr("y1", e.getPixelForValue(g)).attr("y2", e.getPixelForValue(m)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v - s).attr("x2", v).attr("y1", e.getPixelForValue(y)).attr("y2", e.getPixelForValue(y)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v).attr("x2", v + s).attr("y1", e.getPixelForValue(x)).attr("y2", e.getPixelForValue(x)).attr("stroke", b).attr("stroke-width", 1.5), this.config.enableMouseTracking !== !1 && k.on("mouseover", (M) => {
|
|
18292
18298
|
var C, L;
|
|
18293
|
-
k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 3), k.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.attr("opacity", 1)), h.forEach((_,
|
|
18294
|
-
|
|
18299
|
+
k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 3), k.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.attr("opacity", 1)), h.forEach((_, T) => {
|
|
18300
|
+
T !== d && _.transition("highlight").duration(K).ease(Z).attr("opacity", c);
|
|
18295
18301
|
}), this.context.events.emit("point:mouseover", {
|
|
18296
18302
|
point: { ...p, open: y, high: g, low: m, close: x },
|
|
18297
18303
|
index: d,
|
|
@@ -18304,8 +18310,8 @@ class IM extends Xt {
|
|
|
18304
18310
|
var C, L;
|
|
18305
18311
|
k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 1.5), k.style("filter", ""), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.transition("highlight").duration(K).ease(Z).attr("opacity", 1)), this.context.events.emit("point:mouseout", { point: p, index: d, series: this, event: M }), (L = (C = p.events) == null ? void 0 : C.mouseOut) == null || L.call(p, M);
|
|
18306
18312
|
}).on("click", (M) => {
|
|
18307
|
-
var C, L, _,
|
|
18308
|
-
this.context.events.emit("point:click", { point: p, index: d, series: this, event: M }), (L = (C = p.events) == null ? void 0 : C.click) == null || L.call(p, M), (
|
|
18313
|
+
var C, L, _, T;
|
|
18314
|
+
this.context.events.emit("point:click", { point: p, index: d, series: this, event: M }), (L = (C = p.events) == null ? void 0 : C.click) == null || L.call(p, M), (T = (_ = this.config.events) == null ? void 0 : _.click) == null || T.call(this, M);
|
|
18309
18315
|
});
|
|
18310
18316
|
}
|
|
18311
18317
|
}
|
|
@@ -18439,11 +18445,11 @@ function NM() {
|
|
|
18439
18445
|
function y({ nodes: w, links: A }) {
|
|
18440
18446
|
for (const [R, F] of w.entries())
|
|
18441
18447
|
F.index = R, F.sourceLinks = [], F.targetLinks = [];
|
|
18442
|
-
const
|
|
18448
|
+
const $ = new Map(w.map((R, F) => [a(R, F, w), R]));
|
|
18443
18449
|
for (const [R, F] of A.entries()) {
|
|
18444
18450
|
F.index = R;
|
|
18445
18451
|
let { source: D, target: z } = F;
|
|
18446
|
-
typeof D != "object" && (D = F.source = Xu(
|
|
18452
|
+
typeof D != "object" && (D = F.source = Xu($, D)), typeof z != "object" && (z = F.target = Xu($, z)), D.sourceLinks.push(F), z.targetLinks.push(F);
|
|
18447
18453
|
}
|
|
18448
18454
|
if (h != null)
|
|
18449
18455
|
for (const { sourceLinks: R, targetLinks: F } of w)
|
|
@@ -18455,66 +18461,66 @@ function NM() {
|
|
|
18455
18461
|
}
|
|
18456
18462
|
function m({ nodes: w }) {
|
|
18457
18463
|
const A = w.length;
|
|
18458
|
-
let
|
|
18459
|
-
for (;
|
|
18460
|
-
for (const D of
|
|
18464
|
+
let $ = new Set(w), R = /* @__PURE__ */ new Set(), F = 0;
|
|
18465
|
+
for (; $.size; ) {
|
|
18466
|
+
for (const D of $) {
|
|
18461
18467
|
D.depth = F;
|
|
18462
18468
|
for (const { target: z } of D.sourceLinks)
|
|
18463
18469
|
R.add(z);
|
|
18464
18470
|
}
|
|
18465
18471
|
if (++F > A) throw new Error("circular link");
|
|
18466
|
-
|
|
18472
|
+
$ = R, R = /* @__PURE__ */ new Set();
|
|
18467
18473
|
}
|
|
18468
18474
|
}
|
|
18469
18475
|
function x({ nodes: w }) {
|
|
18470
18476
|
const A = w.length;
|
|
18471
|
-
let
|
|
18472
|
-
for (;
|
|
18473
|
-
for (const D of
|
|
18477
|
+
let $ = new Set(w), R = /* @__PURE__ */ new Set(), F = 0;
|
|
18478
|
+
for (; $.size; ) {
|
|
18479
|
+
for (const D of $) {
|
|
18474
18480
|
D.height = F;
|
|
18475
18481
|
for (const { source: z } of D.targetLinks)
|
|
18476
18482
|
R.add(z);
|
|
18477
18483
|
}
|
|
18478
18484
|
if (++F > A) throw new Error("circular link");
|
|
18479
|
-
|
|
18485
|
+
$ = R, R = /* @__PURE__ */ new Set();
|
|
18480
18486
|
}
|
|
18481
18487
|
}
|
|
18482
18488
|
function v({ nodes: w }) {
|
|
18483
|
-
const A = Vu(w, (F) => F.depth) + 1,
|
|
18489
|
+
const A = Vu(w, (F) => F.depth) + 1, $ = (e - n - r) / (A - 1), R = new Array(A);
|
|
18484
18490
|
for (const F of w) {
|
|
18485
18491
|
const D = Math.max(0, Math.min(A - 1, Math.floor(l.call(null, F, A))));
|
|
18486
|
-
F.layer = D, F.x0 = n + D *
|
|
18492
|
+
F.layer = D, F.x0 = n + D * $, F.x1 = F.x0 + r, R[D] ? R[D].push(F) : R[D] = [F];
|
|
18487
18493
|
}
|
|
18488
18494
|
if (c) for (const F of R)
|
|
18489
18495
|
F.sort(c);
|
|
18490
18496
|
return R;
|
|
18491
18497
|
}
|
|
18492
18498
|
function b(w) {
|
|
18493
|
-
const A = RM(w, (
|
|
18494
|
-
for (const
|
|
18499
|
+
const A = RM(w, ($) => (i - t - ($.length - 1) * s) / ya($, xa));
|
|
18500
|
+
for (const $ of w) {
|
|
18495
18501
|
let R = t;
|
|
18496
|
-
for (const F of
|
|
18502
|
+
for (const F of $) {
|
|
18497
18503
|
F.y0 = R, F.y1 = R + F.value * A, R = F.y1 + s;
|
|
18498
18504
|
for (const D of F.sourceLinks)
|
|
18499
18505
|
D.width = D.value * A;
|
|
18500
18506
|
}
|
|
18501
|
-
R = (i - R + s) / (
|
|
18502
|
-
for (let F = 0; F <
|
|
18503
|
-
const D =
|
|
18507
|
+
R = (i - R + s) / ($.length + 1);
|
|
18508
|
+
for (let F = 0; F < $.length; ++F) {
|
|
18509
|
+
const D = $[F];
|
|
18504
18510
|
D.y0 += R * (F + 1), D.y1 += R * (F + 1);
|
|
18505
18511
|
}
|
|
18506
|
-
E(
|
|
18512
|
+
E($);
|
|
18507
18513
|
}
|
|
18508
18514
|
}
|
|
18509
18515
|
function k(w) {
|
|
18510
18516
|
const A = v(w);
|
|
18511
|
-
s = Math.min(o, (i - t) / (Vu(A, (
|
|
18512
|
-
for (let
|
|
18513
|
-
const R = Math.pow(0.99,
|
|
18517
|
+
s = Math.min(o, (i - t) / (Vu(A, ($) => $.length) - 1)), b(A);
|
|
18518
|
+
for (let $ = 0; $ < d; ++$) {
|
|
18519
|
+
const R = Math.pow(0.99, $), F = Math.max(1 - R, ($ + 1) / d);
|
|
18514
18520
|
C(A, R, F), M(A, R, F);
|
|
18515
18521
|
}
|
|
18516
18522
|
}
|
|
18517
|
-
function M(w, A,
|
|
18523
|
+
function M(w, A, $) {
|
|
18518
18524
|
for (let R = 1, F = w.length; R < F; ++R) {
|
|
18519
18525
|
const D = w[R];
|
|
18520
18526
|
for (const z of D) {
|
|
@@ -18527,10 +18533,10 @@ function NM() {
|
|
|
18527
18533
|
let J = (B / H - z.y0) * A;
|
|
18528
18534
|
z.y0 += J, z.y1 += J, I(z);
|
|
18529
18535
|
}
|
|
18530
|
-
c === void 0 && D.sort(hs), L(D,
|
|
18536
|
+
c === void 0 && D.sort(hs), L(D, $);
|
|
18531
18537
|
}
|
|
18532
18538
|
}
|
|
18533
|
-
function C(w, A,
|
|
18539
|
+
function C(w, A, $) {
|
|
18534
18540
|
for (let R = w.length, F = R - 2; F >= 0; --F) {
|
|
18535
18541
|
const D = w[F];
|
|
18536
18542
|
for (const z of D) {
|
|
@@ -18543,61 +18549,61 @@ function NM() {
|
|
|
18543
18549
|
let J = (B / H - z.y0) * A;
|
|
18544
18550
|
z.y0 += J, z.y1 += J, I(z);
|
|
18545
18551
|
}
|
|
18546
|
-
c === void 0 && D.sort(hs), L(D,
|
|
18552
|
+
c === void 0 && D.sort(hs), L(D, $);
|
|
18547
18553
|
}
|
|
18548
18554
|
}
|
|
18549
18555
|
function L(w, A) {
|
|
18550
|
-
const
|
|
18551
|
-
|
|
18556
|
+
const $ = w.length >> 1, R = w[$];
|
|
18557
|
+
T(w, R.y0 - s, $ - 1, A), _(w, R.y1 + s, $ + 1, A), T(w, i, w.length - 1, A), _(w, t, 0, A);
|
|
18552
18558
|
}
|
|
18553
|
-
function _(w, A,
|
|
18554
|
-
for (;
|
|
18555
|
-
const F = w[
|
|
18559
|
+
function _(w, A, $, R) {
|
|
18560
|
+
for (; $ < w.length; ++$) {
|
|
18561
|
+
const F = w[$], D = (A - F.y0) * R;
|
|
18556
18562
|
D > 1e-6 && (F.y0 += D, F.y1 += D), A = F.y1 + s;
|
|
18557
18563
|
}
|
|
18558
18564
|
}
|
|
18559
|
-
function
|
|
18560
|
-
for (;
|
|
18561
|
-
const F = w[
|
|
18565
|
+
function T(w, A, $, R) {
|
|
18566
|
+
for (; $ >= 0; --$) {
|
|
18567
|
+
const F = w[$], D = (F.y1 - A) * R;
|
|
18562
18568
|
D > 1e-6 && (F.y0 -= D, F.y1 -= D), A = F.y0 - s;
|
|
18563
18569
|
}
|
|
18564
18570
|
}
|
|
18565
18571
|
function I({ sourceLinks: w, targetLinks: A }) {
|
|
18566
18572
|
if (h === void 0) {
|
|
18567
|
-
for (const { source: { sourceLinks:
|
|
18568
|
-
|
|
18569
|
-
for (const { target: { targetLinks:
|
|
18570
|
-
|
|
18573
|
+
for (const { source: { sourceLinks: $ } } of A)
|
|
18574
|
+
$.sort(Yu);
|
|
18575
|
+
for (const { target: { targetLinks: $ } } of w)
|
|
18576
|
+
$.sort(Gu);
|
|
18571
18577
|
}
|
|
18572
18578
|
}
|
|
18573
18579
|
function E(w) {
|
|
18574
18580
|
if (h === void 0)
|
|
18575
|
-
for (const { sourceLinks: A, targetLinks:
|
|
18576
|
-
A.sort(Yu),
|
|
18581
|
+
for (const { sourceLinks: A, targetLinks: $ } of w)
|
|
18582
|
+
A.sort(Yu), $.sort(Gu);
|
|
18577
18583
|
}
|
|
18578
18584
|
function P(w, A) {
|
|
18579
|
-
let
|
|
18585
|
+
let $ = w.y0 - (w.sourceLinks.length - 1) * s / 2;
|
|
18580
18586
|
for (const { target: R, width: F } of w.sourceLinks) {
|
|
18581
18587
|
if (R === A) break;
|
|
18582
|
-
|
|
18588
|
+
$ += F + s;
|
|
18583
18589
|
}
|
|
18584
18590
|
for (const { source: R, width: F } of A.targetLinks) {
|
|
18585
18591
|
if (R === w) break;
|
|
18586
|
-
|
|
18592
|
+
$ -= F;
|
|
18587
18593
|
}
|
|
18588
|
-
return
|
|
18594
|
+
return $;
|
|
18589
18595
|
}
|
|
18590
18596
|
function S(w, A) {
|
|
18591
|
-
let
|
|
18597
|
+
let $ = A.y0 - (A.targetLinks.length - 1) * s / 2;
|
|
18592
18598
|
for (const { source: R, width: F } of A.targetLinks) {
|
|
18593
18599
|
if (R === w) break;
|
|
18594
|
-
|
|
18600
|
+
$ += F + s;
|
|
18595
18601
|
}
|
|
18596
18602
|
for (const { target: R, width: F } of w.sourceLinks) {
|
|
18597
18603
|
if (R === A) break;
|
|
18598
|
-
|
|
18604
|
+
$ -= F;
|
|
18599
18605
|
}
|
|
18600
|
-
return
|
|
18606
|
+
return $;
|
|
18601
18607
|
}
|
|
18602
18608
|
return p;
|
|
18603
18609
|
}
|
|
@@ -18726,22 +18732,22 @@ class iA extends Xt {
|
|
|
18726
18732
|
this.group.selectAll("rect, path, text").interrupt("enter").interrupt("highlight");
|
|
18727
18733
|
const { nodes: s, links: a } = this.buildGraph();
|
|
18728
18734
|
if (s.length === 0) return;
|
|
18729
|
-
const l = t.width < QM, c = t.width < tA, h = t.width < eA, f = r.nodeWidth, u = f === "auto", d = s.map((V) => typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : null).filter((V) => V !== null), p = d.length > 0, y = p ? Math.max(...d) : 0, g = typeof r.nodePadding == "number" ? r.nodePadding : l ? Math.max(4, Math.min(10, t.height / 40)) : 10, m = r.linkOpacity ?? 0.4, x = r.colorByPoint !== !1, v = r.minLinkWidth ?? 1, b = r.borderWidth ?? 0, k = r.borderColor ?? "none", M = r.levels || [], C = this.config.dataLabels || {}, L = C.enabled !== !1, _ = ((me = C.style) == null ? void 0 : me.fontSize) || Mt,
|
|
18735
|
+
const l = t.width < QM, c = t.width < tA, h = t.width < eA, f = r.nodeWidth, u = f === "auto", d = s.map((V) => typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : null).filter((V) => V !== null), p = d.length > 0, y = p ? Math.max(...d) : 0, g = typeof r.nodePadding == "number" ? r.nodePadding : l ? Math.max(4, Math.min(10, t.height / 40)) : 10, m = r.linkOpacity ?? 0.4, x = r.colorByPoint !== !1, v = r.minLinkWidth ?? 1, b = r.borderWidth ?? 0, k = r.borderColor ?? "none", M = r.levels || [], C = this.config.dataLabels || {}, L = C.enabled !== !1, _ = ((me = C.style) == null ? void 0 : me.fontSize) || Mt, T = nA(_), I = c ? Math.min(T, 10) : l ? Math.min(T, 12) : T, E = `${I}px`, P = C.color || ((Je = C.style) == null ? void 0 : Je.color) || this.autoLabelColor(), S = I * 0.62, w = (V) => C.formatter ? String(C.formatter.call({
|
|
18730
18736
|
point: { name: V.name || V.id, y: V.value },
|
|
18731
18737
|
series: { name: this.config.name },
|
|
18732
18738
|
x: V.name || V.id,
|
|
18733
18739
|
y: V.value
|
|
18734
|
-
}) ?? "") : String(V.name || V.id || ""), A = (V) => V.length * S,
|
|
18740
|
+
}) ?? "") : String(V.name || V.id || ""), A = (V) => V.length * S, $ = (V, tt, lt = 2) => {
|
|
18735
18741
|
if (tt <= 0) return "";
|
|
18736
18742
|
if (A(V) <= tt) return V;
|
|
18737
18743
|
const Lt = Math.floor(tt / S) - 1;
|
|
18738
18744
|
return Lt < lt ? "" : Lt >= V.length ? V : V.slice(0, Lt) + "…";
|
|
18739
18745
|
}, R = r.nodeAlignment === "left" ? DM : Ap, D = h ? 5 : c ? 8 : l ? 10 : 14, z = typeof f == "number" ? f : 20, B = (V, tt, lt, St) => {
|
|
18740
|
-
const Lt = Math.max(tt + St + 20, t.width - lt), Te = NM().nodeId((
|
|
18741
|
-
for (const
|
|
18742
|
-
if (
|
|
18743
|
-
const
|
|
18744
|
-
|
|
18746
|
+
const Lt = Math.max(tt + St + 20, t.width - lt), Te = NM().nodeId((pe) => pe.id).nodeAlign(R).nodeWidth(St).nodePadding(V).extent([[tt, 0], [Lt, t.height]]), ye = Te({ nodes: [...s], links: [...a] });
|
|
18747
|
+
for (const pe of ye.nodes)
|
|
18748
|
+
if (pe.x0 < tt) {
|
|
18749
|
+
const yn = pe.x1 - pe.x0;
|
|
18750
|
+
pe.x0 = tt, pe.x1 = tt + yn;
|
|
18745
18751
|
}
|
|
18746
18752
|
return { gen: Te, graph: ye };
|
|
18747
18753
|
};
|
|
@@ -18793,42 +18799,42 @@ class iA extends Xt {
|
|
|
18793
18799
|
const tt = X(V.source);
|
|
18794
18800
|
Vt.has(tt) || Vt.set(tt, []), Vt.get(tt).push(V);
|
|
18795
18801
|
}
|
|
18796
|
-
const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), jt = Ot, ee = jt, Tt = Nt * ee + Ot + jt, Zt = r.centerNodes === !0,
|
|
18797
|
-
(Zt ||
|
|
18802
|
+
const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), jt = Ot, ee = jt, Tt = Nt * ee + Ot + jt, Zt = r.centerNodes === !0, ce = r.spreadFactor ?? 1;
|
|
18803
|
+
(Zt || ce !== 1) && this.centerAndSpreadNodes(q, ot, t.height, ce, Ct);
|
|
18798
18804
|
const Ve = /* @__PURE__ */ new Map();
|
|
18799
18805
|
for (const V of M)
|
|
18800
18806
|
V.level !== void 0 && Ve.set(V.level, V);
|
|
18801
|
-
const
|
|
18807
|
+
const le = (V) => {
|
|
18802
18808
|
const tt = V.source ? X(V.source) : void 0, lt = tt !== void 0 ? Ve.get(tt) : void 0;
|
|
18803
18809
|
return (lt == null ? void 0 : lt.linkOpacity) ?? m;
|
|
18804
|
-
},
|
|
18805
|
-
if (!c) return
|
|
18810
|
+
}, mn = JM(), Vn = (V) => {
|
|
18811
|
+
if (!c) return mn(V);
|
|
18806
18812
|
const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, Te = lt - tt;
|
|
18807
18813
|
if (!Number.isFinite(Te) || !Number.isFinite(St) || !Number.isFinite(Lt))
|
|
18808
|
-
return
|
|
18814
|
+
return mn(V);
|
|
18809
18815
|
if (Te <= 14)
|
|
18810
18816
|
return `M${tt},${St}L${lt},${Lt}`;
|
|
18811
18817
|
if (Te < 28) {
|
|
18812
18818
|
const ye = Math.max(2, Te * 0.35);
|
|
18813
18819
|
return `M${tt},${St}C${tt + ye},${St} ${lt - ye},${Lt} ${lt},${Lt}`;
|
|
18814
18820
|
}
|
|
18815
|
-
return
|
|
18821
|
+
return mn(V);
|
|
18816
18822
|
}, De = c, Ze = De ? (V) => {
|
|
18817
18823
|
const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, Te = lt - tt, ye = Math.max(v, V.width) / 2;
|
|
18818
18824
|
if (!Number.isFinite(Te) || !Number.isFinite(St) || !Number.isFinite(Lt))
|
|
18819
18825
|
return Vn(V);
|
|
18820
|
-
const
|
|
18826
|
+
const pe = St - ye, yn = St + ye, rr = Lt - ye, Gn = Lt + ye, Cn = Math.max(1, Te * 0.42);
|
|
18821
18827
|
return Te <= 2 ? [
|
|
18822
|
-
`M${tt},${
|
|
18828
|
+
`M${tt},${pe}`,
|
|
18823
18829
|
`L${lt},${rr}`,
|
|
18824
18830
|
`L${lt},${Gn}`,
|
|
18825
|
-
`L${tt},${
|
|
18831
|
+
`L${tt},${yn}`,
|
|
18826
18832
|
"Z"
|
|
18827
18833
|
].join("") : [
|
|
18828
|
-
`M${tt},${
|
|
18829
|
-
`C${tt + Cn},${
|
|
18834
|
+
`M${tt},${pe}`,
|
|
18835
|
+
`C${tt + Cn},${pe} ${lt - Cn},${rr} ${lt},${rr}`,
|
|
18830
18836
|
`L${lt},${Gn}`,
|
|
18831
|
-
`C${lt - Cn},${Gn} ${tt + Cn},${
|
|
18837
|
+
`C${lt - Cn},${Gn} ${tt + Cn},${yn} ${tt},${yn}`,
|
|
18832
18838
|
"Z"
|
|
18833
18839
|
].join("");
|
|
18834
18840
|
} : Vn, Ge = De ? "fill-opacity" : "stroke-opacity", Ye = r.linkColorMode ?? "from", tr = (V) => V.source.color || e[q.nodes.indexOf(V.source) % e.length] || "#aaa", er = (V) => V.target.color || e[q.nodes.indexOf(V.target) % e.length] || "#aaa", nr = this.group.append("defs"), et = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -18846,17 +18852,17 @@ class iA extends Xt {
|
|
|
18846
18852
|
]).join("stop").attr("offset", (St) => St.offset).attr("stop-color", (St) => St.color), rt(this).attr(De ? "fill" : "stroke", `url(#${lt})`);
|
|
18847
18853
|
}) : Ye === "to" ? yt.attr(De ? "fill" : "stroke", (V) => er(V)) : yt.attr(De ? "fill" : "stroke", (V) => tr(V)), i && !h ? l ? yt.attr(Ge, 0).each(function(V) {
|
|
18848
18854
|
const tt = X(V.source), St = (Vt.get(tt) || []).indexOf(V), Lt = tt * ee + Ot - 60 + Math.min(St * 12, 60);
|
|
18849
|
-
rt(this).transition("enter").duration(jt).delay(Lt).ease(pt).attr(Ge,
|
|
18850
|
-
}) : yt.attr(Ge, (V) =>
|
|
18851
|
-
var
|
|
18852
|
-
const tt = this, lt = ((
|
|
18855
|
+
rt(this).transition("enter").duration(jt).delay(Lt).ease(pt).attr(Ge, le(V));
|
|
18856
|
+
}) : yt.attr(Ge, (V) => le(V)).each(function(V) {
|
|
18857
|
+
var yn;
|
|
18858
|
+
const tt = this, lt = ((yn = tt.getTotalLength) == null ? void 0 : yn.call(tt)) || 0;
|
|
18853
18859
|
if (lt === 0) return;
|
|
18854
|
-
const St = X(V.source), Te = (Vt.get(St) || []).indexOf(V),
|
|
18855
|
-
rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(jt).delay(
|
|
18860
|
+
const St = X(V.source), Te = (Vt.get(St) || []).indexOf(V), pe = St * ee + Ot - 60 + Math.min(Te * 12, 60);
|
|
18861
|
+
rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(jt).delay(pe).ease(pt).attr("stroke-dashoffset", 0).on("end", function() {
|
|
18856
18862
|
rt(this).attr("stroke-dasharray", null).attr("stroke-dashoffset", null);
|
|
18857
18863
|
});
|
|
18858
|
-
}) : yt.attr(Ge, (V) =>
|
|
18859
|
-
const
|
|
18864
|
+
}) : yt.attr(Ge, (V) => le(V));
|
|
18865
|
+
const qt = (V, tt, lt) => {
|
|
18860
18866
|
const St = {
|
|
18861
18867
|
name: `${lt.source.name} → ${lt.target.name}`,
|
|
18862
18868
|
from: lt.source.name,
|
|
@@ -18893,14 +18899,14 @@ class iA extends Xt {
|
|
|
18893
18899
|
event: tt
|
|
18894
18900
|
});
|
|
18895
18901
|
}, Bt = (V, tt) => {
|
|
18896
|
-
const lt =
|
|
18897
|
-
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) :
|
|
18898
|
-
},
|
|
18899
|
-
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) =>
|
|
18902
|
+
const lt = le(tt);
|
|
18903
|
+
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : le(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ft), qt("mouseover", V, tt);
|
|
18904
|
+
}, Ut = (V, tt) => {
|
|
18905
|
+
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => le(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), qt("mouseout", V, tt);
|
|
18900
18906
|
}, Jt = (V, tt) => {
|
|
18901
|
-
|
|
18907
|
+
qt("click", V, tt);
|
|
18902
18908
|
};
|
|
18903
|
-
yt.on("mouseover", Bt).on("mouseout",
|
|
18909
|
+
yt.on("mouseover", Bt).on("mouseout", Ut).on("click", Jt);
|
|
18904
18910
|
const Ht = vt.selectAll(".katucharts-sankey-node").data(q.nodes).join("rect").attr("class", "katucharts-sankey-node").attr("x", (V) => V.x0).attr("y", (V) => V.y0).attr("width", (V) => V.x1 - V.x0).attr("height", (V) => Math.max(1, V.y1 - V.y0)).attr("fill", (V, tt) => {
|
|
18905
18911
|
if (V.color) return V.color;
|
|
18906
18912
|
const lt = Ve.get(X(V));
|
|
@@ -18917,7 +18923,7 @@ class iA extends Xt {
|
|
|
18917
18923
|
Lt.source === tt ? lt.add(Lt.target) : Lt.target === tt && lt.add(Lt.source);
|
|
18918
18924
|
Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Ft), yt.transition("highlight").duration(K).ease(Z).attr(
|
|
18919
18925
|
Ge,
|
|
18920
|
-
(Lt) => Lt.source === tt || Lt.target === tt ? Math.min(
|
|
18926
|
+
(Lt) => Lt.source === tt || Lt.target === tt ? Math.min(le(Lt) + 0.3, 1) : le(Lt) * 0.375
|
|
18921
18927
|
);
|
|
18922
18928
|
const St = { name: tt.name || tt.id, y: tt.value, sum: tt.value };
|
|
18923
18929
|
this.context.events.emit("point:mouseover", {
|
|
@@ -18929,7 +18935,7 @@ class iA extends Xt {
|
|
|
18929
18935
|
plotY: (tt.y0 + tt.y1) / 2
|
|
18930
18936
|
});
|
|
18931
18937
|
}, Ee = (V, tt) => {
|
|
18932
|
-
Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) =>
|
|
18938
|
+
Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => le(lt)), this.context.events.emit("point:mouseout", {
|
|
18933
18939
|
point: { name: tt.name || tt.id, y: tt.value, sum: tt.value },
|
|
18934
18940
|
index: q.nodes.indexOf(tt),
|
|
18935
18941
|
series: this,
|
|
@@ -18943,18 +18949,18 @@ class iA extends Xt {
|
|
|
18943
18949
|
event: V
|
|
18944
18950
|
});
|
|
18945
18951
|
};
|
|
18946
|
-
if (Ht.on("mouseover", Ke).on("mouseout", Ee).on("click", Be), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout",
|
|
18947
|
-
const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, Te = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, ye = (ut) => Y && Lt(ut) || Te(ut),
|
|
18952
|
+
if (Ht.on("mouseover", Ke).on("mouseout", Ee).on("click", Be), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", Ut).on("click", Jt), L) {
|
|
18953
|
+
const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, Te = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, ye = (ut) => Y && Lt(ut) || Te(ut), pe = /* @__PURE__ */ new Map();
|
|
18948
18954
|
for (const ut of q.nodes) {
|
|
18949
18955
|
const Et = ut.y1 - ut.y0;
|
|
18950
18956
|
if (!ye(ut) && Et < tt) {
|
|
18951
|
-
|
|
18957
|
+
pe.set(ut, "");
|
|
18952
18958
|
continue;
|
|
18953
18959
|
}
|
|
18954
|
-
|
|
18960
|
+
pe.set(ut, w(ut));
|
|
18955
18961
|
}
|
|
18956
|
-
const
|
|
18957
|
-
Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", rr).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor",
|
|
18962
|
+
const yn = (ut) => ye(ut) ? Lt(ut) ? "end" : "start" : "middle", rr = (ut) => ye(ut) ? Lt(ut) ? ut.x0 - 4 + (C.x ?? 0) : ut.x1 + 4 + (C.x ?? 0) : (ut.x0 + ut.x1) / 2 + (C.x ?? 0);
|
|
18963
|
+
Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", rr).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (ir = C.style) != null && ir.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", Ee).on("click", Be).text((ut) => pe.get(ut) ?? "");
|
|
18958
18964
|
const Gn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
|
|
18959
18965
|
for (const ut of q.nodes) {
|
|
18960
18966
|
const Et = X(ut);
|
|
@@ -18964,7 +18970,7 @@ class iA extends Xt {
|
|
|
18964
18970
|
const Et = this;
|
|
18965
18971
|
let ne = Et.textContent;
|
|
18966
18972
|
if (!ne) return;
|
|
18967
|
-
const
|
|
18973
|
+
const xn = A(ne);
|
|
18968
18974
|
if (ye(ut)) {
|
|
18969
18975
|
const yl = X(ut), xl = I * 0.75;
|
|
18970
18976
|
let sr;
|
|
@@ -18979,18 +18985,18 @@ class iA extends Xt {
|
|
|
18979
18985
|
Et.textContent = "";
|
|
18980
18986
|
return;
|
|
18981
18987
|
}
|
|
18982
|
-
|
|
18988
|
+
xn > sr && (ne = $(ne, sr, 1), Et.textContent = ne);
|
|
18983
18989
|
return;
|
|
18984
18990
|
}
|
|
18985
|
-
const ti = (ut.x0 + ut.x1) / 2, Yn = ti -
|
|
18991
|
+
const ti = (ut.x0 + ut.x1) / 2, Yn = ti - xn / 2, Ai = ti + xn / 2;
|
|
18986
18992
|
if (Ai <= t.width && Yn >= 0) return;
|
|
18987
18993
|
const or = X(ut), Ep = Gn.get(or + 1) ?? t.width, Tp = Cn.get(or - 1) ?? 0, Es = Ep - ut.x1 - 4, Ts = ut.x0 - Tp - 4;
|
|
18988
18994
|
if (Yn < 0 && Es > I * 1.5) {
|
|
18989
|
-
Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)),
|
|
18995
|
+
Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Es && (Et.textContent = $(ne, Es));
|
|
18990
18996
|
return;
|
|
18991
18997
|
}
|
|
18992
18998
|
if (Ai > t.width && Ts > I * 1.5) {
|
|
18993
|
-
Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)),
|
|
18999
|
+
Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > Ts && (Et.textContent = $(ne, Ts));
|
|
18994
19000
|
return;
|
|
18995
19001
|
}
|
|
18996
19002
|
const ml = 2 * Math.min(ti, t.width - ti) - 4;
|
|
@@ -18998,7 +19004,7 @@ class iA extends Xt {
|
|
|
18998
19004
|
Et.textContent = "";
|
|
18999
19005
|
return;
|
|
19000
19006
|
}
|
|
19001
|
-
Et.textContent =
|
|
19007
|
+
Et.textContent = $(ne, ml);
|
|
19002
19008
|
});
|
|
19003
19009
|
const pl = [], Cp = [...q.nodes].sort((ut, Et) => (Et.value ?? 0) - (ut.value ?? 0)), gl = /* @__PURE__ */ new Map();
|
|
19004
19010
|
Q.each(function(ut) {
|
|
@@ -19022,20 +19028,20 @@ class iA extends Xt {
|
|
|
19022
19028
|
};
|
|
19023
19029
|
}
|
|
19024
19030
|
if (ne.width === 0 && ne.height === 0) continue;
|
|
19025
|
-
const
|
|
19031
|
+
const xn = {
|
|
19026
19032
|
left: ne.x,
|
|
19027
19033
|
right: ne.x + ne.width,
|
|
19028
19034
|
top: ne.y,
|
|
19029
19035
|
bottom: ne.y + ne.height
|
|
19030
19036
|
};
|
|
19031
|
-
if (pl.some((Yn) => Pp(Yn,
|
|
19037
|
+
if (pl.some((Yn) => Pp(Yn, xn)) && C.overflow !== "allow") {
|
|
19032
19038
|
Et.textContent = "";
|
|
19033
19039
|
continue;
|
|
19034
19040
|
}
|
|
19035
|
-
pl.push(
|
|
19041
|
+
pl.push(xn);
|
|
19036
19042
|
}
|
|
19037
19043
|
i && !h && Q.attr("opacity", 0).each(function(ut) {
|
|
19038
|
-
const Et = X(ut),
|
|
19044
|
+
const Et = X(ut), xn = (_t.get(Et) || []).indexOf(ut), ti = Et * ee + Ot - 80 + Math.min(xn * 20, 80);
|
|
19039
19045
|
rt(this).transition("enter").duration(Ot).delay(ti).ease(pt).attr("opacity", 1);
|
|
19040
19046
|
});
|
|
19041
19047
|
}
|
|
@@ -19054,13 +19060,13 @@ class iA extends Xt {
|
|
|
19054
19060
|
})) : 1, g = r > 0 ? (s - o - c) / r : 0;
|
|
19055
19061
|
for (const [v, b] of f) {
|
|
19056
19062
|
const k = b.some((_) => typeof _.offset == "number");
|
|
19057
|
-
b.sort((_,
|
|
19058
|
-
const M = b.reduce((_,
|
|
19063
|
+
b.sort((_, T) => k ? (_.offset ?? 0) - (T.offset ?? 0) || (_.y0 ?? 0) - (T.y0 ?? 0) || String(_.name ?? _.id).localeCompare(String(T.name ?? T.id)) : (T.value ?? 0) - (_.value ?? 0) || String(_.name ?? _.id).localeCompare(String(T.name ?? T.id)));
|
|
19064
|
+
const M = b.reduce((_, T) => _ + Math.max(1, (T.value ?? 0) * y), 0) + Math.max(0, b.length - 1) * d;
|
|
19059
19065
|
let C = Math.max(0, (a - M) / 2);
|
|
19060
19066
|
const L = o + v * g;
|
|
19061
19067
|
for (const _ of b) {
|
|
19062
|
-
const
|
|
19063
|
-
_.x0 = L, _.x1 = L + c, _.y0 = C, _.y1 = C +
|
|
19068
|
+
const T = Math.max(1, (_.value ?? 0) * y);
|
|
19069
|
+
_.x0 = L, _.x1 = L + c, _.y0 = C, _.y1 = C + T, C = _.y1 + d;
|
|
19064
19070
|
}
|
|
19065
19071
|
}
|
|
19066
19072
|
for (const v of t.links)
|
|
@@ -19362,15 +19368,15 @@ function MA(n) {
|
|
|
19362
19368
|
for (f = fl(t, wA, kA).visitAfter(a), c = 0; c < h; ++c)
|
|
19363
19369
|
u = t[c], y = e[u.index], g = y * y, d = u.x + u.vx, p = u.y + u.vy, f.visit(x);
|
|
19364
19370
|
function x(v, b, k, M, C) {
|
|
19365
|
-
var L = v.data, _ = v.r,
|
|
19371
|
+
var L = v.data, _ = v.r, T = y + _;
|
|
19366
19372
|
if (L) {
|
|
19367
19373
|
if (L.index > u.index) {
|
|
19368
19374
|
var I = d - L.x - L.vx, E = p - L.y - L.vy, P = I * I + E * E;
|
|
19369
|
-
P <
|
|
19375
|
+
P < T * T && (I === 0 && (I = Zn(i), P += I * I), E === 0 && (E = Zn(i), P += E * E), P = (T - (P = Math.sqrt(P))) / P * r, u.vx += (I *= P) * (T = (_ *= _) / (g + _)), u.vy += (E *= P) * T, L.vx -= I * (T = 1 - T), L.vy -= E * T);
|
|
19370
19376
|
}
|
|
19371
19377
|
return;
|
|
19372
19378
|
}
|
|
19373
|
-
return b > d +
|
|
19379
|
+
return b > d + T || M < d - T || k > p + T || C < p - T;
|
|
19374
19380
|
}
|
|
19375
19381
|
}
|
|
19376
19382
|
function a(c) {
|
|
@@ -19410,8 +19416,8 @@ function SA(n) {
|
|
|
19410
19416
|
}
|
|
19411
19417
|
function u(g) {
|
|
19412
19418
|
for (var m = 0, x = n.length; m < h; ++m)
|
|
19413
|
-
for (var v = 0, b, k, M, C, L, _,
|
|
19414
|
-
b = n[v], k = b.source, M = b.target, C = M.x + M.vx - k.x - k.vx || Zn(c), L = M.y + M.vy - k.y - k.vy || Zn(c), _ = Math.sqrt(C * C + L * L), _ = (_ - o[v]) / _ * g * i[v], C *= _, L *= _, M.vx -= C * (
|
|
19419
|
+
for (var v = 0, b, k, M, C, L, _, T; v < x; ++v)
|
|
19420
|
+
b = n[v], k = b.source, M = b.target, C = M.x + M.vx - k.x - k.vx || Zn(c), L = M.y + M.vy - k.y - k.vy || Zn(c), _ = Math.sqrt(C * C + L * L), _ = (_ - o[v]) / _ * g * i[v], C *= _, L *= _, M.vx -= C * (T = l[v]), M.vy -= L * T, k.vx += C * (T = 1 - T), k.vy += L * T;
|
|
19415
19421
|
}
|
|
19416
19422
|
function d() {
|
|
19417
19423
|
if (s) {
|
|
@@ -19589,10 +19595,10 @@ class RA extends Xt {
|
|
|
19589
19595
|
if (o.length === 0) return;
|
|
19590
19596
|
const a = r.link || {}, l = r.layoutAlgorithm || {}, c = r.draggable !== !1, h = l.linkLength ?? a.distance ?? 80, f = a.color ?? "#999", u = a.width, d = a.dashStyle, p = l.maxIterations ?? 300, y = l.gravitationalConstant ?? -200, g = l.friction ?? 0.9, m = l.maxSpeed ?? 10, x = l.initialPositions, v = l.attractiveForce, b = l.repulsiveForce;
|
|
19591
19597
|
if (x === "circle") {
|
|
19592
|
-
const w = t.width / 2, A = t.height / 2,
|
|
19598
|
+
const w = t.width / 2, A = t.height / 2, $ = Math.min(t.width, t.height) / 3;
|
|
19593
19599
|
o.forEach((R, F) => {
|
|
19594
19600
|
const D = 2 * Math.PI * F / o.length;
|
|
19595
|
-
R.x = w +
|
|
19601
|
+
R.x = w + $ * Math.cos(D), R.y = A + $ * Math.sin(D);
|
|
19596
19602
|
});
|
|
19597
19603
|
} else x === "random" ? o.forEach((w) => {
|
|
19598
19604
|
w.x = Math.random() * t.width, w.y = Math.random() * t.height;
|
|
@@ -19608,43 +19614,43 @@ class RA extends Xt {
|
|
|
19608
19614
|
b ? C.strength((w) => -b(1, k)) : C.strength(y), this.simulation = IA(o).force("link", M).force("charge", C).force("center", rA(t.width / 2, t.height / 2)).force("collide", MA(20)).velocityDecay(1 - g).alphaDecay(1 - Math.pow(1e-3, 1 / p)).stop();
|
|
19609
19615
|
for (let w = 0; w < p; w++)
|
|
19610
19616
|
this.simulation.tick(), o.forEach((A) => {
|
|
19611
|
-
const
|
|
19612
|
-
|
|
19617
|
+
const $ = Math.abs(A.vx || 0), R = Math.abs(A.vy || 0);
|
|
19618
|
+
$ > m && (A.vx = Math.sign(A.vx) * m), R > m && (A.vy = Math.sign(A.vy) * m);
|
|
19613
19619
|
});
|
|
19614
19620
|
o.forEach((w) => {
|
|
19615
|
-
var
|
|
19616
|
-
const A = ((
|
|
19621
|
+
var $;
|
|
19622
|
+
const A = (($ = w.marker) == null ? void 0 : $.radius) || 10;
|
|
19617
19623
|
w.x = Math.max(A + 30, Math.min(t.width - A - 30, w.x ?? 0)), w.y = Math.max(A + 18, Math.min(t.height - A - 6, w.y ?? 0));
|
|
19618
19624
|
});
|
|
19619
19625
|
const L = this.getDashArray(d), _ = this.group.selectAll(".katucharts-network-link").data(s).join("line").attr("class", "katucharts-network-link").attr("x1", (w) => w.source.x).attr("y1", (w) => w.source.y).attr("x2", (w) => w.target.x).attr("y2", (w) => w.target.y).attr("stroke", f).attr("stroke-width", (w) => u ?? Math.sqrt(w.value || 1)).attr("stroke-dasharray", L);
|
|
19620
19626
|
i ? _.attr("stroke-opacity", 0).transition().duration(bt).ease(pt).attr("stroke-opacity", 0.6) : _.attr("stroke-opacity", 0.6);
|
|
19621
|
-
const
|
|
19622
|
-
if (i ?
|
|
19627
|
+
const T = this.group.selectAll(".katucharts-network-node").data(o).join("circle").attr("class", "katucharts-network-node").attr("cx", (w) => w.x).attr("cy", (w) => w.y).attr("fill", (w, A) => w.color || e[A % e.length]).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1.5).style("cursor", c ? "grab" : "pointer");
|
|
19628
|
+
if (i ? T.attr("r", 0).transition().duration(bt).ease(pt).attr("r", (w) => {
|
|
19623
19629
|
var A;
|
|
19624
19630
|
return ((A = w.marker) == null ? void 0 : A.radius) || 10;
|
|
19625
|
-
}) :
|
|
19631
|
+
}) : T.attr("r", (w) => {
|
|
19626
19632
|
var A;
|
|
19627
19633
|
return ((A = w.marker) == null ? void 0 : A.radius) || 10;
|
|
19628
19634
|
}), c) {
|
|
19629
|
-
const w = yd().on("start", (A,
|
|
19630
|
-
rt(A.sourceEvent.target).style("cursor", "grabbing"), this.simulation && this.simulation.alphaTarget(0.3).restart(),
|
|
19631
|
-
}).on("drag", (A,
|
|
19632
|
-
|
|
19633
|
-
}).on("end", (A,
|
|
19634
|
-
rt(A.sourceEvent.target).style("cursor", "grab"), this.simulation && this.simulation.alphaTarget(0),
|
|
19635
|
+
const w = yd().on("start", (A, $) => {
|
|
19636
|
+
rt(A.sourceEvent.target).style("cursor", "grabbing"), this.simulation && this.simulation.alphaTarget(0.3).restart(), $.fx = $.x, $.fy = $.y;
|
|
19637
|
+
}).on("drag", (A, $) => {
|
|
19638
|
+
$.fx = A.x, $.fy = A.y, $.x = A.x, $.y = A.y, this.updatePositions(T, _, I);
|
|
19639
|
+
}).on("end", (A, $) => {
|
|
19640
|
+
rt(A.sourceEvent.target).style("cursor", "grab"), this.simulation && this.simulation.alphaTarget(0), $.fx = null, $.fy = null;
|
|
19635
19641
|
});
|
|
19636
|
-
|
|
19642
|
+
T.call(w);
|
|
19637
19643
|
}
|
|
19638
|
-
|
|
19644
|
+
T.on("mouseover", (w, A) => {
|
|
19639
19645
|
var D;
|
|
19640
|
-
const
|
|
19641
|
-
|
|
19646
|
+
const $ = rt(w.currentTarget), R = ((D = A.marker) == null ? void 0 : D.radius) || 10;
|
|
19647
|
+
$.transition("size").duration(K).ease(Z).attr("r", R + 4), $.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.3))"), T.interrupt("highlight"), _.interrupt("highlight"), T.attr("opacity", 1), _.transition("highlight").duration(K).ease(Z).attr(
|
|
19642
19648
|
"stroke-opacity",
|
|
19643
19649
|
(z) => z.source === A || z.target === A ? 0.9 : 0.1
|
|
19644
19650
|
).attr(
|
|
19645
19651
|
"stroke-width",
|
|
19646
19652
|
(z) => z.source === A || z.target === A ? 3 : u ?? Math.sqrt(z.value || 1)
|
|
19647
|
-
),
|
|
19653
|
+
), T.filter((z) => z !== A).transition("highlight").duration(K).ease(Z).attr("opacity", (z) => s.some(
|
|
19648
19654
|
(H) => H.source === A && H.target === z || H.target === A && H.source === z
|
|
19649
19655
|
) ? 1 : 0.3);
|
|
19650
19656
|
const F = o.indexOf(A);
|
|
@@ -19658,8 +19664,8 @@ class RA extends Xt {
|
|
|
19658
19664
|
});
|
|
19659
19665
|
}).on("mouseout", (w, A) => {
|
|
19660
19666
|
var F;
|
|
19661
|
-
const
|
|
19662
|
-
|
|
19667
|
+
const $ = rt(w.currentTarget);
|
|
19668
|
+
$.transition("size").duration(K).ease(Z).attr("r", ((F = A.marker) == null ? void 0 : F.radius) || 10), $.style("filter", ""), T.interrupt("highlight"), _.interrupt("highlight"), _.transition("highlight").duration(K).ease(Z).attr("stroke-opacity", 0.6).attr("stroke-width", (D) => u ?? Math.sqrt(D.value || 1)), T.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
|
|
19663
19669
|
const R = o.indexOf(A);
|
|
19664
19670
|
this.context.events.emit("point:mouseout", {
|
|
19665
19671
|
point: { name: A.name || A.id },
|
|
@@ -19668,10 +19674,10 @@ class RA extends Xt {
|
|
|
19668
19674
|
event: w
|
|
19669
19675
|
});
|
|
19670
19676
|
}).on("click", (w, A) => {
|
|
19671
|
-
const
|
|
19677
|
+
const $ = o.indexOf(A);
|
|
19672
19678
|
this.context.events.emit("point:click", {
|
|
19673
19679
|
point: { name: A.name || A.id },
|
|
19674
|
-
index:
|
|
19680
|
+
index: $,
|
|
19675
19681
|
series: this,
|
|
19676
19682
|
event: w
|
|
19677
19683
|
});
|
|
@@ -19788,24 +19794,24 @@ class NA extends Xt {
|
|
|
19788
19794
|
const m = r.center || ["50%", "50%"], x = this.resolvePercent(m[0], t.width), v = this.resolvePercent(m[1], t.height), b = r.size, k = o === "small" ? 34 : 70, M = o === "small" ? 34 : 24, C = Math.max(
|
|
19789
19795
|
80,
|
|
19790
19796
|
Math.min(t.width - 2 * k, t.height - 2 * M)
|
|
19791
|
-
), L = b ? this.resolvePercent(b, C) : C, _ = Math.max(40, L / 2 - 2),
|
|
19797
|
+
), L = b ? this.resolvePercent(b, C) : C, _ = Math.max(40, L / 2 - 2), T = _ - u, { matrix: I, names: E, nodeColors: P } = this.buildMatrix();
|
|
19792
19798
|
if (E.length === 0) return;
|
|
19793
|
-
const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1),
|
|
19794
|
-
this.normalizeChordWidths(
|
|
19795
|
-
const R = Ae().innerRadius(
|
|
19796
|
-
const nt =
|
|
19799
|
+
const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), $ = BA().padAngle(w).sortSubgroups(null)(I);
|
|
19800
|
+
this.normalizeChordWidths($), this.sortChordEndpoints($);
|
|
19801
|
+
const R = Ae().innerRadius(T).outerRadius(_).cornerRadius(3), F = Ae().innerRadius(T).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
|
|
19802
|
+
const nt = T, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Jt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
|
|
19797
19803
|
let Ee = Math.abs(mt - vt);
|
|
19798
19804
|
Ee > Math.PI && (Ee = 2 * Math.PI - Ee);
|
|
19799
19805
|
const Be = Ee / Math.PI, me = nt * Math.max(D, (1 - Be) * (1 - Be) * (1 - Be));
|
|
19800
19806
|
let Je = Math.abs(ht - gt);
|
|
19801
19807
|
Je > Math.PI && (Je = 2 * Math.PI - Je);
|
|
19802
19808
|
const hn = Je / Math.PI, _n = nt * Math.max(D, (1 - hn) * (1 - hn) * (1 - hn));
|
|
19803
|
-
return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${me * Math.cos(vt)},${me * Math.sin(vt)},${me * Math.cos(mt)},${me * Math.sin(mt)},${
|
|
19809
|
+
return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${me * Math.cos(vt)},${me * Math.sin(vt)},${me * Math.cos(mt)},${me * Math.sin(mt)},${qt},${Bt}A${nt},${nt},0,${Ke},1,${Ut},${Jt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${$t}Z`;
|
|
19804
19810
|
}, B = this.group.append("g").attr("transform", `translate(${x},${v})`), H = (et) => P[et] || e[et % e.length], J = r.linkColorMode ?? "from", X = B.append("defs");
|
|
19805
19811
|
let j = null;
|
|
19806
19812
|
J === "gradient" && (j = X);
|
|
19807
19813
|
const W = (et) => H(J === "to" ? et.target.index : et.source.index), U = u * 2, G = (et, nt, ht, vt) => {
|
|
19808
|
-
const mt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, gt =
|
|
19814
|
+
const mt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, gt = T * Math.cos(et), Q = T * Math.sin(et), $t = (T - U) * Math.cos(et), Ft = (T - U) * Math.sin(et);
|
|
19809
19815
|
return X.append("linearGradient").attr("id", mt).attr("gradientUnits", "userSpaceOnUse").attr("x1", gt).attr("y1", Q).attr("x2", $t).attr("y2", Ft).selectAll("stop").data([
|
|
19810
19816
|
{ offset: "0%", opacity: 0.7 },
|
|
19811
19817
|
{ offset: "25%", opacity: 0.2 },
|
|
@@ -19816,7 +19822,7 @@ class NA extends Xt {
|
|
|
19816
19822
|
let Y, O;
|
|
19817
19823
|
if (N) {
|
|
19818
19824
|
const et = /* @__PURE__ */ new Map();
|
|
19819
|
-
for (const vt of
|
|
19825
|
+
for (const vt of $) {
|
|
19820
19826
|
const mt = W(vt);
|
|
19821
19827
|
et.has(mt) || et.set(mt, []), et.get(mt).push(vt);
|
|
19822
19828
|
}
|
|
@@ -19825,28 +19831,28 @@ class NA extends Xt {
|
|
|
19825
19831
|
nt.append("g").attr("class", "katucharts-chord-group").attr("opacity", d).selectAll(".katucharts-chord").data(mt).join("path").attr("class", "katucharts-chord").attr("d", (Q) => z(Q)).attr("fill", vt).attr("fill-opacity", 1).attr("stroke", "none").style("cursor", "pointer");
|
|
19826
19832
|
Y = nt.selectAll(".katucharts-chord"), O = nt.selectAll(".katucharts-chord-group");
|
|
19827
19833
|
const ht = B.append("g").attr("class", "katucharts-chord-edges").attr("opacity", d);
|
|
19828
|
-
if (
|
|
19834
|
+
if ($.forEach((vt, mt) => {
|
|
19829
19835
|
const gt = H(vt.source.index), Q = H(vt.target.index);
|
|
19830
19836
|
if (gt === Q) return;
|
|
19831
19837
|
const $t = z(vt), Ft = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, yt = G(Ft, Q, mt, "tgt");
|
|
19832
19838
|
ht.append("path").attr("d", $t).attr("fill", `url(#${yt})`).attr("stroke", "none").style("pointer-events", "none");
|
|
19833
|
-
const
|
|
19839
|
+
const qt = (vt.source.startAngle + vt.source.endAngle) / 2 + p - Math.PI / 2, Bt = G(qt, gt, mt, "src");
|
|
19834
19840
|
ht.append("path").attr("d", $t).attr("fill", `url(#${Bt})`).attr("stroke", "none").style("pointer-events", "none");
|
|
19835
19841
|
}), i) {
|
|
19836
19842
|
ht.attr("opacity", 0);
|
|
19837
19843
|
const vt = B.append("defs"), mt = Math.round(s * 0.62);
|
|
19838
19844
|
Y.each(function(Q, $t) {
|
|
19839
|
-
const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`,
|
|
19845
|
+
const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2, Jt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Jt) / 2, Ee = T * Math.cos(Ht), Be = T * Math.sin(Ht), me = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Be, me - Ee) * 180 / Math.PI, _n = Math.sqrt((me - Ee) ** 2 + (Je - Be) ** 2) + _ * 2, ir = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = ir.append("rect").attr("transform", `translate(${Ee},${Be}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
|
|
19840
19846
|
tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Ft).ease(pt).attr("width", _n).on("end", function() {
|
|
19841
19847
|
tt.attr("clip-path", null), ir.remove();
|
|
19842
19848
|
});
|
|
19843
19849
|
});
|
|
19844
|
-
const gt = f + (
|
|
19850
|
+
const gt = f + ($.length - 1) * a + mt;
|
|
19845
19851
|
ht.transition("enter").duration(300).delay(gt).ease(pt).attr("opacity", d);
|
|
19846
19852
|
}
|
|
19847
|
-
} else if (Y = B.selectAll(".katucharts-chord").data(
|
|
19853
|
+
} else if (Y = B.selectAll(".katucharts-chord").data($).join("path").attr("class", "katucharts-chord").attr("d", (et) => z(et)).attr("stroke", "none").style("cursor", "pointer"), Y.each(function(et, nt) {
|
|
19848
19854
|
const ht = `katucharts-dw-grad-${nt}-${Math.random().toString(36).slice(2, 6)}`, vt = (et.source.startAngle + et.source.endAngle) / 2 + p - Math.PI / 2, mt = (et.target.startAngle + et.target.endAngle) / 2 + p - Math.PI / 2;
|
|
19849
|
-
j.append("linearGradient").attr("id", ht).attr("gradientUnits", "userSpaceOnUse").attr("x1",
|
|
19855
|
+
j.append("linearGradient").attr("id", ht).attr("gradientUnits", "userSpaceOnUse").attr("x1", T * Math.cos(vt)).attr("y1", T * Math.sin(vt)).attr("x2", T * Math.cos(mt)).attr("y2", T * Math.sin(mt)).selectAll("stop").data([
|
|
19850
19856
|
{ offset: "0%", color: H(et.source.index) },
|
|
19851
19857
|
{ offset: "100%", color: H(et.target.index) }
|
|
19852
19858
|
]).join("stop").attr("offset", (gt) => gt.offset).attr("stop-color", (gt) => gt.color), rt(this).attr("fill", `url(#${ht})`);
|
|
@@ -19854,7 +19860,7 @@ class NA extends Xt {
|
|
|
19854
19860
|
Y.attr("fill-opacity", d);
|
|
19855
19861
|
const et = B.append("defs"), nt = Math.round(s * 0.62);
|
|
19856
19862
|
Y.each(function(ht, vt) {
|
|
19857
|
-
const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2,
|
|
19863
|
+
const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + $t) / 2, Bt = (Ft + yt) / 2, Ut = T * Math.cos(qt), Jt = T * Math.sin(qt), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), Ee = Math.atan2(Ke - Jt, Ht - Ut) * 180 / Math.PI, Be = Math.sqrt((Ht - Ut) ** 2 + (Ke - Jt) ** 2) + _ * 2, me = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = me.append("rect").attr("transform", `translate(${Ut},${Jt}) rotate(${Ee})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
|
|
19858
19864
|
hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width", Be).on("end", function() {
|
|
19859
19865
|
hn.attr("clip-path", null), me.remove();
|
|
19860
19866
|
});
|
|
@@ -19874,7 +19880,7 @@ class NA extends Xt {
|
|
|
19874
19880
|
if (et === "mouseover") {
|
|
19875
19881
|
this.context.events.emit("point:mouseover", {
|
|
19876
19882
|
point: gt,
|
|
19877
|
-
index:
|
|
19883
|
+
index: $.indexOf(ht),
|
|
19878
19884
|
series: this,
|
|
19879
19885
|
event: nt,
|
|
19880
19886
|
plotX: nt.offsetX - this.context.plotArea.x,
|
|
@@ -19885,7 +19891,7 @@ class NA extends Xt {
|
|
|
19885
19891
|
if (et === "mouseout") {
|
|
19886
19892
|
this.context.events.emit("point:mouseout", {
|
|
19887
19893
|
point: gt,
|
|
19888
|
-
index:
|
|
19894
|
+
index: $.indexOf(ht),
|
|
19889
19895
|
series: this,
|
|
19890
19896
|
event: nt
|
|
19891
19897
|
});
|
|
@@ -19893,7 +19899,7 @@ class NA extends Xt {
|
|
|
19893
19899
|
}
|
|
19894
19900
|
this.context.events.emit("point:click", {
|
|
19895
19901
|
point: gt,
|
|
19896
|
-
index:
|
|
19902
|
+
index: $.indexOf(ht),
|
|
19897
19903
|
series: this,
|
|
19898
19904
|
event: nt
|
|
19899
19905
|
});
|
|
@@ -19908,7 +19914,7 @@ class NA extends Xt {
|
|
|
19908
19914
|
ct("click", et, nt);
|
|
19909
19915
|
};
|
|
19910
19916
|
Y.on("mouseover", it).on("mouseout", ft).on("click", dt);
|
|
19911
|
-
const at =
|
|
19917
|
+
const at = $.groups.map((et) => ({
|
|
19912
19918
|
...et,
|
|
19913
19919
|
startAngle: et.startAngle + p,
|
|
19914
19920
|
endAngle: et.endAngle + p
|
|
@@ -19917,20 +19923,20 @@ class NA extends Xt {
|
|
|
19917
19923
|
let ht = et % nt;
|
|
19918
19924
|
return ht < 0 && (ht += nt), ht;
|
|
19919
19925
|
}, q = (et, nt) => {
|
|
19920
|
-
const ht = et.offsetX - this.context.plotArea.x - x, vt = et.offsetY - this.context.plotArea.y - v, mt = ot(Math.atan2(vt, ht) + Math.PI / 2), gt =
|
|
19926
|
+
const ht = et.offsetX - this.context.plotArea.x - x, vt = et.offsetY - this.context.plotArea.y - v, mt = ot(Math.atan2(vt, ht) + Math.PI / 2), gt = $.filter(
|
|
19921
19927
|
(Bt) => Bt.source.index === nt.index || Bt.target.index === nt.index
|
|
19922
19928
|
);
|
|
19923
19929
|
if (gt.length === 0) return null;
|
|
19924
19930
|
const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, $t = (Bt) => {
|
|
19925
|
-
const
|
|
19931
|
+
const Ut = Q(Bt), Jt = ot(Ut.startAngle + p), Ht = ot(Ut.endAngle + p);
|
|
19926
19932
|
return Jt <= Ht ? mt >= Jt && mt <= Ht : mt >= Jt || mt <= Ht;
|
|
19927
19933
|
}, Ft = gt.find($t);
|
|
19928
19934
|
if (Ft) return Ft;
|
|
19929
|
-
let yt = gt[0],
|
|
19935
|
+
let yt = gt[0], qt = 1 / 0;
|
|
19930
19936
|
for (const Bt of gt) {
|
|
19931
|
-
const
|
|
19937
|
+
const Ut = Q(Bt), Jt = ot((Ut.startAngle + Ut.endAngle) / 2 + p);
|
|
19932
19938
|
let Ht = Math.abs(mt - Jt);
|
|
19933
|
-
Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht <
|
|
19939
|
+
Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht < qt && (qt = Ht, yt = Bt);
|
|
19934
19940
|
}
|
|
19935
19941
|
return yt;
|
|
19936
19942
|
}, st = (et) => {
|
|
@@ -19952,7 +19958,7 @@ class NA extends Xt {
|
|
|
19952
19958
|
rt(et.currentTarget).transition("arc").duration(K).ease(Z).attr("d", F(nt)), Y.interrupt("highlight"), kt.interrupt("highlight"), O && O.interrupt("highlight").attr("opacity", 1), Y.transition("highlight").duration(K).ease(Z).attr(
|
|
19953
19959
|
"fill-opacity",
|
|
19954
19960
|
(mt) => mt.source.index === nt.index || mt.target.index === nt.index ? Math.min(d + 0.35, 1) : 0.05
|
|
19955
|
-
), kt.attr("opacity", 1), kt.filter((mt) => mt !== nt).transition("highlight").duration(K).ease(Z).attr("opacity", (mt) =>
|
|
19961
|
+
), kt.attr("opacity", 1), kt.filter((mt) => mt !== nt).transition("highlight").duration(K).ease(Z).attr("opacity", (mt) => $.some(
|
|
19956
19962
|
(Q) => Q.source.index === nt.index && Q.target.index === mt.index || Q.target.index === nt.index && Q.source.index === mt.index
|
|
19957
19963
|
) ? 1 : 0.3), Ye.filter((mt) => mt.index === nt.index).transition("label").duration(K).ease(Z).attr("opacity", 1);
|
|
19958
19964
|
const vt = q(et, nt);
|
|
@@ -19981,17 +19987,17 @@ class NA extends Xt {
|
|
|
19981
19987
|
series: this,
|
|
19982
19988
|
event: et
|
|
19983
19989
|
});
|
|
19984
|
-
}), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data(
|
|
19985
|
-
const _t = this.config.dataLabels || {}, Vt = _t.color || ((er = _t.style) == null ? void 0 : er.color) || Pe, Nt = ((nr = _t.style) == null ? void 0 : nr.fontSize) || Mt, Ot = Me(Nt), jt = 22, ee = _ + jt, Tt = Math.max(Ot * 1.6, 17), Zt = "…",
|
|
19986
|
-
if (!et || nt <=
|
|
19990
|
+
}), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data($).join("path").attr("class", "katucharts-chord-hitarea").attr("d", (et) => z(et)).attr("fill", "#ffffff").attr("fill-opacity", 0).attr("stroke", "#ffffff").attr("stroke-opacity", 0).attr("stroke-width", 12).attr("stroke-linejoin", "round").style("cursor", "pointer").style("pointer-events", "all").on("mouseover", it).on("mouseout", ft).on("click", dt);
|
|
19991
|
+
const _t = this.config.dataLabels || {}, Vt = _t.color || ((er = _t.style) == null ? void 0 : er.color) || Pe, Nt = ((nr = _t.style) == null ? void 0 : nr.fontSize) || Mt, Ot = Me(Nt), jt = 22, ee = _ + jt, Tt = Math.max(Ot * 1.6, 17), Zt = "…", ce = tn(Zt, Ot, "bold"), Ve = (et, nt) => {
|
|
19992
|
+
if (!et || nt <= ce) return "";
|
|
19987
19993
|
if (tn(et, Ot, "bold") <= nt) return et;
|
|
19988
19994
|
let ht = "";
|
|
19989
19995
|
for (const vt of et) {
|
|
19990
|
-
if (tn(ht + vt, Ot, "bold") +
|
|
19996
|
+
if (tn(ht + vt, Ot, "bold") + ce > nt) break;
|
|
19991
19997
|
ht += vt;
|
|
19992
19998
|
}
|
|
19993
19999
|
return ht = ht.trimEnd(), (ht || et[0]) + Zt;
|
|
19994
|
-
},
|
|
20000
|
+
}, le = t.width - x, mn = x, Vn = v, De = t.height - v, ze = at.map((et) => {
|
|
19995
20001
|
const nt = (et.startAngle + et.endAngle) / 2, ht = Math.sin(nt) >= 0;
|
|
19996
20002
|
return {
|
|
19997
20003
|
index: et.index,
|
|
@@ -20026,11 +20032,11 @@ class NA extends Xt {
|
|
|
20026
20032
|
Ft.text(null);
|
|
20027
20033
|
const yt = vt(E[gt.index] || "", gt.span);
|
|
20028
20034
|
if (!yt) return;
|
|
20029
|
-
const
|
|
20035
|
+
const qt = (gt.mid % et + et) % et, Bt = qt > Math.PI / 2 && qt < Math.PI * 3 / 2, Ut = gt.span / 2, [Jt, Ht] = ht(Bt ? gt.mid + Ut : gt.mid - Ut), [Ke, Ee] = ht(Bt ? gt.mid - Ut : gt.mid + Ut), Be = Bt ? 0 : 1, me = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
|
|
20030
20036
|
mt.append("path").attr("id", me).attr("fill", "none").attr("d", `M${Jt},${Ht}A${nt},${nt},0,0,${Be},${Ke},${Ee}`), Ft.append("textPath").attr("href", `#${me}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
|
|
20031
20037
|
}), i) {
|
|
20032
20038
|
Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 1);
|
|
20033
|
-
const gt = Math.round(s * 0.62), Q =
|
|
20039
|
+
const gt = Math.round(s * 0.62), Q = $.length, $t = f + Q * a + gt;
|
|
20034
20040
|
this.emitAfterAnimate($t + 100);
|
|
20035
20041
|
} else
|
|
20036
20042
|
Ye.attr("opacity", 1);
|
|
@@ -20040,24 +20046,24 @@ class NA extends Xt {
|
|
|
20040
20046
|
const Q = Math.max(1, Math.min(10, Math.floor(et / (Tt * 1.2))));
|
|
20041
20047
|
for (const $t of [!0, !1]) {
|
|
20042
20048
|
const Ft = ze.filter((yt) => yt.visible && yt.isRight === $t);
|
|
20043
|
-
Ft.length > Q && (Ft.sort((yt,
|
|
20049
|
+
Ft.length > Q && (Ft.sort((yt, qt) => qt.rank - yt.rank), Ft.slice(Q).forEach((yt) => {
|
|
20044
20050
|
yt.visible = !1;
|
|
20045
20051
|
}));
|
|
20046
20052
|
}
|
|
20047
20053
|
}
|
|
20048
20054
|
this.distributeChordLabels(ze.filter((Q) => Q.visible && Q.isRight), Tt, Vn, De), this.distributeChordLabels(ze.filter((Q) => Q.visible && !Q.isRight), Tt, Vn, De);
|
|
20049
20055
|
const nt = Math.max(Ot * 1.4, 16), ht = (Q) => {
|
|
20050
|
-
const $t = Q.filter((Bt) => Bt.visible).sort((Bt,
|
|
20056
|
+
const $t = Q.filter((Bt) => Bt.visible).sort((Bt, Ut) => Bt.ly - Ut.ly), Ft = $t.length * Tt / et;
|
|
20051
20057
|
let yt = 1;
|
|
20052
20058
|
$t.length >= 8 && Ft > 0.5 && (yt = 2), $t.length >= 14 && Ft > 0.75 && (yt = 3);
|
|
20053
|
-
const
|
|
20054
|
-
$t.forEach((Bt,
|
|
20059
|
+
const qt = Math.max(1, yt * 2 - 2);
|
|
20060
|
+
$t.forEach((Bt, Ut) => {
|
|
20055
20061
|
if (yt <= 1) {
|
|
20056
20062
|
Bt.col = 0;
|
|
20057
20063
|
return;
|
|
20058
20064
|
}
|
|
20059
|
-
const Jt =
|
|
20060
|
-
Bt.col = Jt < yt ? Jt :
|
|
20065
|
+
const Jt = Ut % qt;
|
|
20066
|
+
Bt.col = Jt < yt ? Jt : qt - Jt;
|
|
20061
20067
|
});
|
|
20062
20068
|
};
|
|
20063
20069
|
if (o === "medium")
|
|
@@ -20066,16 +20072,18 @@ class NA extends Xt {
|
|
|
20066
20072
|
ht(ze.filter((Q) => Q.isRight)), ht(ze.filter((Q) => !Q.isRight));
|
|
20067
20073
|
for (const Q of ze) {
|
|
20068
20074
|
if (!Q.visible) continue;
|
|
20069
|
-
const $t = (Q.col || 0) * nt, Ft = ee + $t, yt = Math.max(-Ft, Math.min(Ft, Q.ly)),
|
|
20070
|
-
Q.lx = Q.isRight ? Math.max(
|
|
20075
|
+
const $t = (Q.col || 0) * nt, Ft = ee + $t, yt = Math.max(-Ft, Math.min(Ft, Q.ly)), qt = Math.sqrt(Math.max(0, Ft * Ft - yt * yt)), Bt = _ * 0.4 + $t;
|
|
20076
|
+
Q.lx = Q.isRight ? Math.max(qt, Bt) : -Math.max(qt, Bt);
|
|
20077
|
+
const Ut = (Q.isRight ? le : mn) - ce - 4;
|
|
20078
|
+
Q.lx = Q.isRight ? Math.min(Q.lx, Ut) : Math.max(Q.lx, -Ut);
|
|
20071
20079
|
}
|
|
20072
|
-
const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => (Q.isRight ?
|
|
20080
|
+
const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => Math.max(0, (Q.isRight ? le - vt(Q) : vt(Q) + mn) - 6), gt = Ge.selectAll(".katucharts-chord-connector").data(ze.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
|
|
20073
20081
|
const $t = _ + jt * 0.55, Ft = $t * Math.sin(Q.mid), yt = -$t * Math.cos(Q.mid);
|
|
20074
20082
|
return `M${Q.ax},${Q.ay}L${Ft},${yt}L${Q.lx},${Q.ly}`;
|
|
20075
20083
|
});
|
|
20076
|
-
if (Ye = Ge.selectAll(".katucharts-chord-label").data(ze).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
|
|
20084
|
+
if (Ye = Ge.selectAll(".katucharts-chord-label").data(ze).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible && mt(Q) >= ce ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
|
|
20077
20085
|
gt.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 0.8), Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", (yt) => Ze(yt) ? 1 : 0);
|
|
20078
|
-
const Q = Math.round(s * 0.62), $t =
|
|
20086
|
+
const Q = Math.round(s * 0.62), $t = $.length, Ft = f + $t * a + Q;
|
|
20079
20087
|
this.emitAfterAnimate(Ft + 100);
|
|
20080
20088
|
} else
|
|
20081
20089
|
gt.attr("opacity", 0.8), Ye.attr("opacity", (Q) => Ze(Q) ? 1 : 0);
|
|
@@ -20461,7 +20469,7 @@ const VA = {
|
|
|
20461
20469
|
dateFormat: Ha,
|
|
20462
20470
|
numberFormat: Ms,
|
|
20463
20471
|
templateFormat: Kt,
|
|
20464
|
-
stripHtmlTags:
|
|
20472
|
+
stripHtmlTags: fe,
|
|
20465
20473
|
color(n) {
|
|
20466
20474
|
return ba(n);
|
|
20467
20475
|
},
|