@silurus/ooxml 0.79.1 → 0.80.1
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 +22 -15
- package/dist/assets/render-worker-BC6Wez97.js +7 -0
- package/dist/assets/render-worker-DidI5svV.js +21 -0
- package/dist/assets/render-worker-n3fNJ5XR.js +8 -0
- package/dist/{canvas-viewer-mechanics-DJ9yfiLN.js → canvas-viewer-mechanics-BdMdqj1R.js} +1 -1
- package/dist/{document-pull-client-DYoybVCn.js → document-pull-client-Dk2EnTL7.js} +2246 -2253
- package/dist/{docx-CSk_-kj_.js → docx-Dw1kxR2M.js} +107 -105
- package/dist/docx.mjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/line-distribute-vYf5DWek.js +1002 -0
- package/dist/{line-metrics-A77J_KRx.js → line-metrics-BY-aNaLO.js} +2064 -1925
- package/dist/math.mjs +34 -24
- package/dist/node.mjs +186 -186
- package/dist/{pptx-CO1Ut97p.js → pptx-CE7xARJ_.js} +128 -126
- package/dist/pptx.mjs +5 -5
- package/dist/region-map.mjs +75 -74
- package/dist/{render-C5m7Ddwx.js → render-C4IiRZiF.js} +1 -1
- package/dist/render-worker-host-1VHH_HQk.js +9 -0
- package/dist/render-worker-host-BVOjz-oV.js +9 -0
- package/dist/render-worker-host-D9mO9qMj.js +9 -0
- package/dist/renderer-module-contract-BNGz8HvO.js +30 -0
- package/dist/{resource-measurement-COxqtfGk.js → resource-measurement-DOQetcWm.js} +7 -7
- package/dist/{session-CJwZaquG.js → session-BYh13Iu2.js} +9 -9
- package/dist/{slide-pull-client-CFHNk0ek.js → slide-pull-client-v6Feibq1.js} +847 -861
- package/dist/three-d.mjs +339 -325
- package/dist/types/docx.d.ts +7 -7
- package/dist/types/index.d.ts +9 -9
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +2 -2
- package/dist/types/pptx.d.ts +7 -7
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/xlsx.d.ts +7 -7
- package/dist/{worksheet-pull-client-CziyJf24.js → worksheet-pull-client-Nk7nbD3-.js} +13 -13
- package/dist/{xlsx-DHQmjAfh.js → xlsx-zy51yoRg.js} +1206 -1216
- package/dist/xlsx.mjs +5 -5
- package/package.json +4 -1
- package/dist/line-distribute-CU7vu7XS.js +0 -1002
- package/dist/render-worker-host-BhMT5U73.js +0 -27
- package/dist/render-worker-host-DNMxGh5s.js +0 -27
- package/dist/render-worker-host-DWyg7wio.js +0 -27
- /package/dist/{highlight-rect-cCvVU-MW.js → highlight-rect-BuX5rWP4.js} +0 -0
- /package/dist/{mathjax-Dqo857oC.js → mathjax-DgAl7Yi5.js} +0 -0
- /package/dist/{transfer-3QEJrsJa.js → transfer-CKZ79zFw.js} +0 -0
- /package/dist/{visible-index-CKvgpUrf.js → visible-index-BjesVGhg.js} +0 -0
package/dist/three-d.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { S as e, b as t, c as n, d as r, g as i, h as a, l as o, m as s, r as c, t as l, u, v as d, x as f } from "./chart-number-format-tjYUR9eS.js";
|
|
2
2
|
import { A as p, S as m, T as h, b as g, c as _, d as v, f as y, l as b, n as x, p as S, s as C, u as w } from "./dash-CMzZIDz_.js";
|
|
3
|
+
import { t as T } from "./renderer-module-contract-BNGz8HvO.js";
|
|
3
4
|
//#region packages/core/src/chart/three-d.ts
|
|
4
|
-
function
|
|
5
|
-
let a = Number.isFinite(e) && e > 0 ? e : 0, o = Number.isFinite(t) ?
|
|
5
|
+
function E(e, t, n, r, i) {
|
|
6
|
+
let a = Number.isFinite(e) && e > 0 ? e : 0, o = Number.isFinite(t) ? A(t, 0, 500) : 150, s = Math.max(1, Math.trunc(r)), c = A(Math.trunc(n), 0, s - 1), l = i ? 1 : s, u = a / (l + o / 100);
|
|
6
7
|
return {
|
|
7
8
|
offset: (a - u * l) / 2 + (i ? 0 : c * u),
|
|
8
9
|
size: u
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function D(e, t, n) {
|
|
12
13
|
if (![
|
|
13
14
|
e,
|
|
14
15
|
t,
|
|
@@ -17,7 +18,7 @@ function E(e, t, n) {
|
|
|
17
18
|
let r = e >= 0 ? n : t;
|
|
18
19
|
return 1 - Math.min(1, Math.abs(e) / Math.max(Number.MIN_VALUE, Math.abs(r)));
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function O(e, t, n, r = .06) {
|
|
21
22
|
if (!t.length || t.length > 1e5 || ![
|
|
22
23
|
n.x,
|
|
23
24
|
n.y,
|
|
@@ -30,7 +31,7 @@ function D(e, t, n, r = .06) {
|
|
|
30
31
|
for (let e of i) a = Math.min(a, e.x), o = Math.max(o, e.x), s = Math.min(s, e.y), c = Math.max(c, e.y);
|
|
31
32
|
let l = o - a, u = c - s;
|
|
32
33
|
if (!(l > 2 ** -52) || !(u > 2 ** -52)) return e;
|
|
33
|
-
let d = k(
|
|
34
|
+
let d = A(k(r, .06), 0, .45), f = n.w * (1 - 2 * d), p = n.h * (1 - 2 * d), m = Math.min(f / l, p / u);
|
|
34
35
|
if (!(m > 0) || !Number.isFinite(m)) return e;
|
|
35
36
|
let h = {
|
|
36
37
|
x: (a + o) / 2,
|
|
@@ -52,15 +53,15 @@ function D(e, t, n, r = .06) {
|
|
|
52
53
|
depthY: e.depthY * m
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
|
-
var
|
|
56
|
-
function
|
|
56
|
+
var k = (e, t) => typeof e == "number" && Number.isFinite(e) ? e : t, A = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
57
|
+
function j(e, t, n = {}) {
|
|
57
58
|
if (![
|
|
58
59
|
t.x,
|
|
59
60
|
t.y,
|
|
60
61
|
t.w,
|
|
61
62
|
t.h
|
|
62
63
|
].every(Number.isFinite) || t.w <= 0 || t.h <= 0) return null;
|
|
63
|
-
let r = k(
|
|
64
|
+
let r = A(k(e.rotationX, 15), -90, 90), i = (A(k(e.rotationY, 20), 0, 360) + 180) % 360 - 180, a = A(k(e.depthPercent, 100), 20, 2e3), o = A(k(e.perspective, 30), 0, 240), s = A(k(e.gapDepthPercent, 150), 0, 500), c = e.heightPercent != null && Number.isFinite(e.heightPercent) ? A(e.heightPercent, 5, 500) : null, l = n.sceneHeightScale != null && Number.isFinite(n.sceneHeightScale) ? A(n.sceneHeightScale * 100, 5, 500) : null, u = c ?? l, d = t;
|
|
64
65
|
if (u != null) {
|
|
65
66
|
let e = u / 100, n = Math.min(t.w, t.h / e), r = n * e;
|
|
66
67
|
d = {
|
|
@@ -70,8 +71,8 @@ function A(e, t, n = {}) {
|
|
|
70
71
|
h: r
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
let f = Math.PI / 180, p = k(
|
|
74
|
-
let r = e - h, i = g - t, a = (.5 -
|
|
74
|
+
let f = Math.PI / 180, p = A(k(n.sceneDepthScale, .1), .01, 2), m = d.w * p * (a / 100), h = d.x + d.w / 2, g = d.y + d.h / 2, _ = -i * f, v = r * f, y = Math.cos(_), b = Math.sin(_), x = Math.cos(v), S = Math.sin(v), C = e.rightAngleAxes !== !0 && o > 0, w = A(o * .25, .25, 60) * f, T = A(k(n.perspectiveTangentGain, 2), .25, 4), E = Math.atan(T * Math.tan(w)), D = Math.hypot(d.w, d.h, m), O = C ? D * .5 / Math.tan(E) : Infinity, j = (e, t, n) => {
|
|
75
|
+
let r = e - h, i = g - t, a = (.5 - A(Number.isFinite(n) ? n : 0, 0, 1)) * m, o = y * r + b * a, s = -b * r + y * a;
|
|
75
76
|
return {
|
|
76
77
|
x: o,
|
|
77
78
|
y: x * i - S * s,
|
|
@@ -117,7 +118,7 @@ function A(e, t, n = {}) {
|
|
|
117
118
|
} : null;
|
|
118
119
|
}, N = -Infinity;
|
|
119
120
|
for (let e of [d.x, d.x + d.w]) for (let t of [d.y, d.y + d.h]) for (let n of [0, 1]) N = Math.max(N, j(e, t, n).z);
|
|
120
|
-
let P = C ? Math.max(
|
|
121
|
+
let P = C ? Math.max(O, N + D * .01) : Infinity, F = (e, t, n) => {
|
|
121
122
|
let r = j(e, t, n);
|
|
122
123
|
if (!C) return {
|
|
123
124
|
x: r.x,
|
|
@@ -130,28 +131,28 @@ function A(e, t, n = {}) {
|
|
|
130
131
|
};
|
|
131
132
|
}, I = [];
|
|
132
133
|
for (let e of [d.x, d.x + d.w]) for (let t of [d.y, d.y + d.h]) for (let n of [0, 1]) I.push(F(e, t, n));
|
|
133
|
-
let L = Math.min(...I.map((e) => e.x)),
|
|
134
|
+
let L = Math.min(...I.map((e) => e.x)), R = Math.max(...I.map((e) => e.x)), z = Math.min(...I.map((e) => e.y)), B = Math.max(...I.map((e) => e.y)), V = Math.max(Number.MIN_VALUE, R - L), H = Math.max(Number.MIN_VALUE, B - z), U = Math.min(t.w / V, t.h / H) * .94, W = t.x + (t.w - V * U) / 2 - L * U, G = t.y + (t.h - H * U) / 2 - z * U, K = (e, t, n) => {
|
|
134
135
|
let r = F(e, t, n);
|
|
135
136
|
return {
|
|
136
|
-
x:
|
|
137
|
-
y:
|
|
137
|
+
x: W + r.x * U,
|
|
138
|
+
y: G + r.y * U
|
|
138
139
|
};
|
|
139
|
-
},
|
|
140
|
-
let t = e === "min" ? d.x : d.x + d.w, n =
|
|
140
|
+
}, q = { ...d }, J = K(h, g, 0), ee = K(h, g, 1), te = ee.x - J.x, Y = ee.y - J.y, ne = (e, t) => j(e === "x" ? t === "min" ? d.x : d.x + d.w : h, e === "y" ? t === "min" ? d.y : d.y + d.h : g, e === "depth" ? t === "min" ? 0 : 1 : .5).z, re = ne("x", "min") <= ne("x", "max") ? "min" : "max", ie = ne("y", "min") <= ne("y", "max") ? "min" : "max", ae = ne("depth", "min") >= ne("depth", "max") ? 0 : 1, oe = +(ae === 0), se = (e) => {
|
|
141
|
+
let t = e === "min" ? d.x : d.x + d.w, n = K(t, d.y, ae), r = K(t, d.y + d.h, ae);
|
|
141
142
|
return (n.x + r.x) / 2;
|
|
142
143
|
}, ce = (e) => {
|
|
143
|
-
let t = e === "min" ? d.y : d.y + d.h, n =
|
|
144
|
+
let t = e === "min" ? d.y : d.y + d.h, n = K(d.x, t, ae), r = K(d.x + d.w, t, ae);
|
|
144
145
|
return (n.y + r.y) / 2;
|
|
145
|
-
}, le = se("min") <= se("max") ? "min" : "max", ue = ce("min") >= ce("max") ? "min" : "max", de = (e) => 1 / Math.max(1, Math.trunc(e)) / (1 + s / 100), fe = (e, t, n = !1) => n || t <= 1 ? .5 : (
|
|
146
|
+
}, le = se("min") <= se("max") ? "min" : "max", ue = ce("min") >= ce("max") ? "min" : "max", de = (e) => 1 / Math.max(1, Math.trunc(e)) / (1 + s / 100), fe = (e, t, n = !1) => n || t <= 1 ? .5 : (A(Math.trunc(e), 0, Math.max(0, t - 1)) + .5) / t;
|
|
146
147
|
return {
|
|
147
148
|
scene: d,
|
|
148
|
-
front:
|
|
149
|
-
depthX:
|
|
150
|
-
depthY:
|
|
149
|
+
front: q,
|
|
150
|
+
depthX: te,
|
|
151
|
+
depthY: Y,
|
|
151
152
|
modelDepth: m,
|
|
152
|
-
pieScaleY:
|
|
153
|
+
pieScaleY: A(Math.sin(Math.max(1, Math.abs(r)) * f) ** 1.15, .2, 1),
|
|
153
154
|
pieThicknessFraction: .3 * Math.max(0, Math.cos(Math.abs(r) * f)),
|
|
154
|
-
project:
|
|
155
|
+
project: K,
|
|
155
156
|
cameraDepth(e, t, n) {
|
|
156
157
|
return j(e, t, n).z;
|
|
157
158
|
},
|
|
@@ -190,13 +191,13 @@ function A(e, t, n = {}) {
|
|
|
190
191
|
prismInterval(e, t, n = !1) {
|
|
191
192
|
let r = fe(e, t, n), i = de(n ? 1 : t) / 2;
|
|
192
193
|
return {
|
|
193
|
-
near:
|
|
194
|
-
far:
|
|
194
|
+
near: A(r - i, 0, 1),
|
|
195
|
+
far: A(r + i, 0, 1)
|
|
195
196
|
};
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
+
function M(e) {
|
|
200
201
|
switch (e) {
|
|
201
202
|
case "cylinder":
|
|
202
203
|
case "cone":
|
|
@@ -206,8 +207,8 @@ function j(e) {
|
|
|
206
207
|
default: return "box";
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
|
-
var
|
|
210
|
-
function
|
|
210
|
+
var N = (e) => Math.max(0, Math.min(1, e));
|
|
211
|
+
function P(e, t) {
|
|
211
212
|
if (t.length < 3) return null;
|
|
212
213
|
let n = e[t[0]];
|
|
213
214
|
for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
|
|
@@ -232,7 +233,7 @@ function N(e, t) {
|
|
|
232
233
|
}
|
|
233
234
|
return null;
|
|
234
235
|
}
|
|
235
|
-
function
|
|
236
|
+
function F(e, t) {
|
|
236
237
|
let n = e.reduce((t, n) => ({
|
|
237
238
|
x: t.x + n.x / e.length,
|
|
238
239
|
y: t.y + n.y / e.length,
|
|
@@ -243,7 +244,7 @@ function P(e, t) {
|
|
|
243
244
|
depth: 0
|
|
244
245
|
});
|
|
245
246
|
return t.map((t) => {
|
|
246
|
-
let r =
|
|
247
|
+
let r = P(e, t.indices);
|
|
247
248
|
if (!r) return t;
|
|
248
249
|
let i = t.indices.reduce((n, r) => ({
|
|
249
250
|
x: n.x + e[r].x / t.indices.length,
|
|
@@ -264,7 +265,7 @@ function P(e, t) {
|
|
|
264
265
|
};
|
|
265
266
|
});
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function I(e) {
|
|
268
269
|
let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
|
|
269
270
|
if (![
|
|
270
271
|
n,
|
|
@@ -274,7 +275,7 @@ function F(e) {
|
|
|
274
275
|
o,
|
|
275
276
|
s
|
|
276
277
|
].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
|
|
277
|
-
let c =
|
|
278
|
+
let c = M(e.shape), l = c === "cylinder" || c === "cone" || c === "coneToMax", u = c !== "box" && c !== "cylinder", d = c === "coneToMax" || c === "pyramidToMax", f = l ? Math.max(8, Math.min(64, Math.trunc(e.roundSegments ?? 32))) : 4, p = N(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = N(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
|
|
278
279
|
if (p === 0 && m === 0) return null;
|
|
279
280
|
let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
|
|
280
281
|
if (n === 0) {
|
|
@@ -341,11 +342,11 @@ function F(e) {
|
|
|
341
342
|
return {
|
|
342
343
|
shape: c,
|
|
343
344
|
vertices: y,
|
|
344
|
-
faces:
|
|
345
|
+
faces: F(y, w),
|
|
345
346
|
silhouetteEdges: T
|
|
346
347
|
};
|
|
347
348
|
}
|
|
348
|
-
function
|
|
349
|
+
function L(e) {
|
|
349
350
|
let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
|
|
350
351
|
if (![
|
|
351
352
|
t,
|
|
@@ -405,7 +406,7 @@ function I(e) {
|
|
|
405
406
|
return {
|
|
406
407
|
shape: "areaStrip",
|
|
407
408
|
vertices: _,
|
|
408
|
-
faces:
|
|
409
|
+
faces: F(_, [
|
|
409
410
|
{
|
|
410
411
|
indices: [
|
|
411
412
|
0,
|
|
@@ -470,17 +471,17 @@ function I(e) {
|
|
|
470
471
|
silhouetteEdges: []
|
|
471
472
|
};
|
|
472
473
|
}
|
|
473
|
-
function
|
|
474
|
+
function R(e) {
|
|
474
475
|
let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
|
|
475
476
|
if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
|
|
476
477
|
let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
|
|
477
|
-
return [
|
|
478
|
+
return [L({
|
|
478
479
|
...e,
|
|
479
480
|
x1: i,
|
|
480
481
|
lower1: a,
|
|
481
482
|
upper1: a,
|
|
482
483
|
capEnd: !1
|
|
483
|
-
}),
|
|
484
|
+
}), L({
|
|
484
485
|
...e,
|
|
485
486
|
x0: i,
|
|
486
487
|
lower0: a,
|
|
@@ -488,10 +489,10 @@ function L(e) {
|
|
|
488
489
|
capStart: !1
|
|
489
490
|
})].filter((e) => e != null);
|
|
490
491
|
}
|
|
491
|
-
let r =
|
|
492
|
+
let r = L(e);
|
|
492
493
|
return r ? [r] : [];
|
|
493
494
|
}
|
|
494
|
-
function
|
|
495
|
+
function z(e) {
|
|
495
496
|
let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
|
|
496
497
|
if (![
|
|
497
498
|
t,
|
|
@@ -583,13 +584,13 @@ function ee(e) {
|
|
|
583
584
|
return {
|
|
584
585
|
shape: "pieSector",
|
|
585
586
|
vertices: m,
|
|
586
|
-
faces:
|
|
587
|
+
faces: F(m, v),
|
|
587
588
|
silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
|
|
588
589
|
};
|
|
589
590
|
}
|
|
590
591
|
//#endregion
|
|
591
592
|
//#region packages/core/src/chart/three-d-scene.ts
|
|
592
|
-
function
|
|
593
|
+
function B(e, t) {
|
|
593
594
|
if (![e, t].every(Number.isFinite)) return null;
|
|
594
595
|
let n = t - e;
|
|
595
596
|
if (n === 0) return e >= 0 && e <= 1 ? {
|
|
@@ -602,7 +603,7 @@ function R(e, t) {
|
|
|
602
603
|
endT: o
|
|
603
604
|
} : null;
|
|
604
605
|
}
|
|
605
|
-
function
|
|
606
|
+
function V(e, t, n, r) {
|
|
606
607
|
if (![
|
|
607
608
|
e,
|
|
608
609
|
t,
|
|
@@ -631,12 +632,12 @@ function z(e, t, n, r) {
|
|
|
631
632
|
}
|
|
632
633
|
return l;
|
|
633
634
|
}
|
|
634
|
-
var
|
|
635
|
+
var H = (e) => ({
|
|
635
636
|
minX: Math.min(...e.map((e) => e.x)),
|
|
636
637
|
maxX: Math.max(...e.map((e) => e.x)),
|
|
637
638
|
minY: Math.min(...e.map((e) => e.y)),
|
|
638
639
|
maxY: Math.max(...e.map((e) => e.y))
|
|
639
|
-
}),
|
|
640
|
+
}), U = (e, t) => {
|
|
640
641
|
let n = !1;
|
|
641
642
|
for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
|
|
642
643
|
let a = e[r], o = e[i], s = (a.x - t.x) * (o.y - t.y) - (a.y - t.y) * (o.x - t.x), c = Math.max(1, Math.abs(a.x), Math.abs(a.y), Math.abs(o.x), Math.abs(o.y));
|
|
@@ -644,7 +645,7 @@ var B = (e) => ({
|
|
|
644
645
|
a.y > t.y != o.y > t.y && t.x < (o.x - a.x) * (t.y - a.y) / (o.y - a.y) + a.x && (n = !n);
|
|
645
646
|
}
|
|
646
647
|
return n;
|
|
647
|
-
},
|
|
648
|
+
}, W = (e, t, n, r) => {
|
|
648
649
|
let i = {
|
|
649
650
|
x: t.x - e.x,
|
|
650
651
|
y: t.y - e.y
|
|
@@ -662,23 +663,23 @@ var B = (e) => ({
|
|
|
662
663
|
y: e.y + i.y * c
|
|
663
664
|
};
|
|
664
665
|
};
|
|
665
|
-
function
|
|
666
|
+
function G(e, t, n, r) {
|
|
666
667
|
let i = [], a = (e) => {
|
|
667
668
|
i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
|
|
668
669
|
}, o = {
|
|
669
670
|
x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
|
|
670
671
|
y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
|
|
671
672
|
};
|
|
672
|
-
|
|
673
|
-
for (let n of e)
|
|
674
|
-
for (let n of t)
|
|
673
|
+
U(e, o) && U(t, o) && a(o);
|
|
674
|
+
for (let n of e) U(t, n) && a(n);
|
|
675
|
+
for (let n of t) U(e, n) && a(n);
|
|
675
676
|
for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
|
|
676
|
-
let i =
|
|
677
|
+
let i = W(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
|
|
677
678
|
i && a(i);
|
|
678
679
|
}
|
|
679
680
|
return i;
|
|
680
681
|
}
|
|
681
|
-
function
|
|
682
|
+
function K(e, t) {
|
|
682
683
|
let n = e.cameraDepths;
|
|
683
684
|
if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
|
|
684
685
|
let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
|
|
@@ -692,17 +693,17 @@ function W(e, t) {
|
|
|
692
693
|
}
|
|
693
694
|
return e.cameraDepth;
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
+
function q(e) {
|
|
696
697
|
if (e.length < 2) return [...e];
|
|
697
|
-
let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) =>
|
|
698
|
+
let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => H(e.points)), r = [...e.keys()].sort((e, t) => n[e].minX - n[t].minX || e - t), i = e.map(() => /* @__PURE__ */ new Set()), a = e.map(() => 0), o = [], s = 0;
|
|
698
699
|
for (let c of r) {
|
|
699
700
|
for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
|
|
700
701
|
for (let r of o) {
|
|
701
702
|
if (++s > 2e5) return t.map((t) => e[t]);
|
|
702
703
|
if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
|
|
703
|
-
let o =
|
|
704
|
+
let o = G(e[r].points, e[c].points, n[r], n[c]), l = 0;
|
|
704
705
|
for (let t of o) {
|
|
705
|
-
let n =
|
|
706
|
+
let n = K(e[r], t) - K(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
|
|
706
707
|
if (Math.abs(n) <= i) continue;
|
|
707
708
|
let a = n < 0 ? -1 : 1;
|
|
708
709
|
if (l !== 0 && l !== a) {
|
|
@@ -728,29 +729,29 @@ function G(e) {
|
|
|
728
729
|
}
|
|
729
730
|
//#endregion
|
|
730
731
|
//#region packages/core/src/chart/three-d-stroke.ts
|
|
731
|
-
var
|
|
732
|
+
var J = 1e-9, ee = 1e4, te = (e, t, n) => ({
|
|
732
733
|
x: e.x + (t.x - e.x) * n,
|
|
733
734
|
y: e.y + (t.y - e.y) * n,
|
|
734
735
|
cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
|
|
735
736
|
cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
|
|
736
|
-
}),
|
|
737
|
+
}), Y = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= J;
|
|
737
738
|
function ne(e, t, n = 0) {
|
|
738
|
-
let r = t.filter((e) => Number.isFinite(e) && e >
|
|
739
|
+
let r = t.filter((e) => Number.isFinite(e) && e > J);
|
|
739
740
|
if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
|
|
740
741
|
r.length % 2 == 1 && r.push(...r);
|
|
741
|
-
let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c >
|
|
742
|
-
for (; l >
|
|
742
|
+
let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > J && Number.isFinite(n) ? (n % c + c) % c : 0;
|
|
743
|
+
for (; l > J;) {
|
|
743
744
|
let e = Math.min(l, o);
|
|
744
|
-
l -= e, o -= e, o <=
|
|
745
|
+
l -= e, o -= e, o <= J && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
|
|
745
746
|
}
|
|
746
747
|
let u = null;
|
|
747
748
|
for (let t = 0; t + 1 < e.length; t++) {
|
|
748
749
|
let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
|
|
749
|
-
if (!(l >
|
|
750
|
+
if (!(l > J)) continue;
|
|
750
751
|
let d = 0;
|
|
751
|
-
for (; d < l -
|
|
752
|
-
let e = Math.min(o, l - d), t =
|
|
753
|
-
if (s && (u ??= [], (u.length === 0 || !
|
|
752
|
+
for (; d < l - J;) {
|
|
753
|
+
let e = Math.min(o, l - d), t = te(n, c, d / l), f = te(n, c, (d + e) / l);
|
|
754
|
+
if (s && (u ??= [], (u.length === 0 || !Y(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= J) {
|
|
754
755
|
if (s && u && u.length >= 2) {
|
|
755
756
|
if (i.length >= 1e4) return null;
|
|
756
757
|
i.push(u);
|
|
@@ -763,13 +764,13 @@ function ne(e, t, n = 0) {
|
|
|
763
764
|
if (i.length >= 1e4) return null;
|
|
764
765
|
i.push(u);
|
|
765
766
|
}
|
|
766
|
-
if (i.length > 1 &&
|
|
767
|
+
if (i.length > 1 && Y(e[0], e.at(-1)) && Y(i[0][0], e[0]) && Y(i.at(-1).at(-1), e.at(-1))) {
|
|
767
768
|
let e = i.shift(), t = i.pop();
|
|
768
769
|
i.unshift([...t, ...e.slice(1)]);
|
|
769
770
|
}
|
|
770
771
|
return i;
|
|
771
772
|
}
|
|
772
|
-
var
|
|
773
|
+
var re = (e, t) => ({
|
|
773
774
|
kind: e,
|
|
774
775
|
points: t.map(({ x: e, y: t }) => ({
|
|
775
776
|
x: e,
|
|
@@ -778,7 +779,7 @@ var Y = (e, t) => ({
|
|
|
778
779
|
cameraDepths: t.map((e) => e.cameraDepth),
|
|
779
780
|
cameraWeights: t.map((e) => e.cameraWeight ?? 1),
|
|
780
781
|
cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
|
|
781
|
-
}),
|
|
782
|
+
}), ie = (e, t, n) => {
|
|
782
783
|
let r = [];
|
|
783
784
|
for (let n = 0; n < 12; n++) {
|
|
784
785
|
let i = Math.PI * 2 * n / 12;
|
|
@@ -788,17 +789,17 @@ var Y = (e, t) => ({
|
|
|
788
789
|
y: e.y + Math.sin(i) * t
|
|
789
790
|
});
|
|
790
791
|
}
|
|
791
|
-
return
|
|
792
|
+
return re(n, r);
|
|
792
793
|
};
|
|
793
|
-
function
|
|
794
|
+
function ae(e, t, n) {
|
|
794
795
|
let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
|
|
795
|
-
if (!(r >
|
|
796
|
+
if (!(r > J) || t.length < 3) return null;
|
|
796
797
|
let i = r / 2;
|
|
797
|
-
if ((n.lineJoin ?? "miter") === "round") return
|
|
798
|
+
if ((n.lineJoin ?? "miter") === "round") return ie(e, i, "join");
|
|
798
799
|
let a = [];
|
|
799
800
|
for (let n of t) {
|
|
800
801
|
let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
|
|
801
|
-
if (!(o >
|
|
802
|
+
if (!(o > J)) continue;
|
|
802
803
|
let s = -r / o * i, c = t / o * i;
|
|
803
804
|
a.push({
|
|
804
805
|
...e,
|
|
@@ -814,20 +815,20 @@ function ie(e, t, n) {
|
|
|
814
815
|
a.sort((e, t) => e.x - t.x || e.y - t.y);
|
|
815
816
|
let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
|
|
816
817
|
for (let e of a) {
|
|
817
|
-
for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <=
|
|
818
|
+
for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= J;) s.pop();
|
|
818
819
|
s.push(e);
|
|
819
820
|
}
|
|
820
821
|
let c = [];
|
|
821
822
|
for (let e of [...a].reverse()) {
|
|
822
|
-
for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <=
|
|
823
|
+
for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= J;) c.pop();
|
|
823
824
|
c.push(e);
|
|
824
825
|
}
|
|
825
826
|
let l = [...s.slice(0, -1), ...c.slice(0, -1)];
|
|
826
|
-
return l.length >= 3 ?
|
|
827
|
+
return l.length >= 3 ? re("join", l) : null;
|
|
827
828
|
}
|
|
828
|
-
var
|
|
829
|
+
var oe = (e, t, n, r) => {
|
|
829
830
|
let i = t.x * r.y - t.y * r.x;
|
|
830
|
-
if (Math.abs(i) <=
|
|
831
|
+
if (Math.abs(i) <= J) return null;
|
|
831
832
|
let a = {
|
|
832
833
|
x: n.x - e.x,
|
|
833
834
|
y: n.y - e.y
|
|
@@ -837,17 +838,17 @@ var ae = (e, t, n, r) => {
|
|
|
837
838
|
y: e.y + t.y * o
|
|
838
839
|
};
|
|
839
840
|
};
|
|
840
|
-
function
|
|
841
|
+
function se(e, t) {
|
|
841
842
|
let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
|
|
842
|
-
if (!(n >
|
|
843
|
+
if (!(n > J) || e.length < 2) return [];
|
|
843
844
|
let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = ne(e, t.dash ?? [], t.dashOffset);
|
|
844
845
|
if (c == null) return null;
|
|
845
846
|
let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
|
|
846
847
|
for (let n = 0; n < c.length; n++) {
|
|
847
|
-
let s = c[n], u = s.length > 2 &&
|
|
848
|
+
let s = c[n], u = s.length > 2 && Y(s[0], s.at(-1)), d = n === 0 && Y(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && Y(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
|
|
848
849
|
for (let e = 0; e + 1 < s.length; e++) {
|
|
849
850
|
let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
|
|
850
|
-
p.push(r >
|
|
851
|
+
p.push(r > J ? {
|
|
851
852
|
x: (n.x - t.x) / r,
|
|
852
853
|
y: (n.y - t.y) / r
|
|
853
854
|
} : null);
|
|
@@ -867,7 +868,7 @@ function oe(e, t) {
|
|
|
867
868
|
x: s[e + 1].x + n.x * _,
|
|
868
869
|
y: s[e + 1].y + n.y * _
|
|
869
870
|
};
|
|
870
|
-
if (!l(
|
|
871
|
+
if (!l(re("segment", [
|
|
871
872
|
{
|
|
872
873
|
...v,
|
|
873
874
|
x: v.x + i.x,
|
|
@@ -890,12 +891,12 @@ function oe(e, t) {
|
|
|
890
891
|
}
|
|
891
892
|
]))) return null;
|
|
892
893
|
}
|
|
893
|
-
if (!u && d === "round" && !l(
|
|
894
|
+
if (!u && d === "round" && !l(ie(s[0], r, "cap")) || !u && f === "round" && !l(ie(s.at(-1), r, "cap"))) return null;
|
|
894
895
|
let m = (e, t, n) => {
|
|
895
896
|
if (!t || !n) return !0;
|
|
896
897
|
let i = t.x * n.y - t.y * n.x;
|
|
897
|
-
if (Math.abs(i) <=
|
|
898
|
-
if (a === "round") return l(
|
|
898
|
+
if (Math.abs(i) <= J) return !0;
|
|
899
|
+
if (a === "round") return l(ie(e, r, "join"));
|
|
899
900
|
let s = i > 0 ? -1 : 1, c = {
|
|
900
901
|
...e,
|
|
901
902
|
x: e.x + -t.y * r * s,
|
|
@@ -906,8 +907,8 @@ function oe(e, t) {
|
|
|
906
907
|
y: e.y + n.x * r * s
|
|
907
908
|
};
|
|
908
909
|
if (a === "miter") {
|
|
909
|
-
let i =
|
|
910
|
-
if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(
|
|
910
|
+
let i = oe(c, t, u, n);
|
|
911
|
+
if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(re("join", [
|
|
911
912
|
c,
|
|
912
913
|
{
|
|
913
914
|
...e,
|
|
@@ -916,7 +917,7 @@ function oe(e, t) {
|
|
|
916
917
|
u
|
|
917
918
|
]));
|
|
918
919
|
}
|
|
919
|
-
return l(
|
|
920
|
+
return l(re("join", [
|
|
920
921
|
c,
|
|
921
922
|
e,
|
|
922
923
|
u
|
|
@@ -929,30 +930,30 @@ function oe(e, t) {
|
|
|
929
930
|
}
|
|
930
931
|
//#endregion
|
|
931
932
|
//#region packages/core/src/chart/three-d-outline.ts
|
|
932
|
-
var
|
|
933
|
+
var ce = 1e-9, le = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= ce, ue = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, de = (e, t) => {
|
|
933
934
|
let n = Math.min(e.length, t.length);
|
|
934
935
|
for (let r = 0; r < n; r++) {
|
|
935
|
-
let n =
|
|
936
|
+
let n = ue(e[r], t[r]);
|
|
936
937
|
if (n !== 0) return n;
|
|
937
938
|
}
|
|
938
939
|
return e.length - t.length;
|
|
939
940
|
};
|
|
940
|
-
function
|
|
941
|
+
function fe(e) {
|
|
941
942
|
let t = [...e].reverse();
|
|
942
|
-
return
|
|
943
|
+
return de(e, t) <= 0 ? e : t;
|
|
943
944
|
}
|
|
944
|
-
function
|
|
945
|
-
let t =
|
|
945
|
+
function pe(e) {
|
|
946
|
+
let t = le(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
|
|
946
947
|
if (t.length === 0) return [];
|
|
947
948
|
let n = 0;
|
|
948
|
-
for (let e = 1; e < t.length; e++)
|
|
949
|
-
let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a =
|
|
949
|
+
for (let e = 1; e < t.length; e++) ue(t[e], t[n]) < 0 && (n = e);
|
|
950
|
+
let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = de(r, i) <= 0 ? r : i;
|
|
950
951
|
return [...a, a[0]];
|
|
951
952
|
}
|
|
952
|
-
function
|
|
953
|
+
function me(e) {
|
|
953
954
|
let t = [], n = (e) => {
|
|
954
|
-
let n = t.find((t) =>
|
|
955
|
-
if (n) return
|
|
955
|
+
let n = t.find((t) => le(t.point, e));
|
|
956
|
+
if (n) return ue(e, n.point) < 0 && (n.point = e), n;
|
|
956
957
|
let r = {
|
|
957
958
|
point: e,
|
|
958
959
|
edges: [],
|
|
@@ -961,11 +962,11 @@ function pe(e) {
|
|
|
961
962
|
return t.push(r), r;
|
|
962
963
|
}, r = [];
|
|
963
964
|
for (let [t, i] of e) {
|
|
964
|
-
if (
|
|
965
|
+
if (le(t, i)) continue;
|
|
965
966
|
let e = n(t), a = n(i);
|
|
966
967
|
e !== a && r.push([e, a]);
|
|
967
968
|
}
|
|
968
|
-
t.sort((e, t) =>
|
|
969
|
+
t.sort((e, t) => ue(e.point, t.point)), t.forEach((e, t) => {
|
|
969
970
|
e.order = t;
|
|
970
971
|
});
|
|
971
972
|
let i = [], a = /* @__PURE__ */ new Set();
|
|
@@ -993,34 +994,34 @@ function pe(e) {
|
|
|
993
994
|
}
|
|
994
995
|
return n;
|
|
995
996
|
}, c = [];
|
|
996
|
-
for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(
|
|
997
|
+
for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(fe(s(e, t)));
|
|
997
998
|
for (let e = 0; e < i.length; e++) {
|
|
998
999
|
if (o.has(e)) continue;
|
|
999
1000
|
let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
|
|
1000
|
-
c.push(
|
|
1001
|
+
c.push(pe(s(n, e)));
|
|
1001
1002
|
}
|
|
1002
1003
|
let l = t.filter((e) => e.edges.length > 2).map((e) => ({
|
|
1003
1004
|
point: e.point,
|
|
1004
1005
|
neighbours: e.edges.map((t) => {
|
|
1005
1006
|
let n = i[t];
|
|
1006
1007
|
return n.first === e ? n.second.point : n.first.point;
|
|
1007
|
-
}).sort(
|
|
1008
|
+
}).sort(ue)
|
|
1008
1009
|
}));
|
|
1009
1010
|
return {
|
|
1010
|
-
paths: c.sort(
|
|
1011
|
+
paths: c.sort(de),
|
|
1011
1012
|
junctions: l
|
|
1012
1013
|
};
|
|
1013
1014
|
}
|
|
1014
1015
|
//#endregion
|
|
1015
1016
|
//#region packages/core/src/chart/three-d-renderer.ts
|
|
1016
|
-
var
|
|
1017
|
+
var he = [
|
|
1017
1018
|
"4472C4",
|
|
1018
1019
|
"ED7D31",
|
|
1019
1020
|
"70AD47",
|
|
1020
1021
|
"A5A5A5",
|
|
1021
1022
|
"FFC000",
|
|
1022
1023
|
"5B9BD5"
|
|
1023
|
-
],
|
|
1024
|
+
], ge = new Set([
|
|
1024
1025
|
"line",
|
|
1025
1026
|
"stackedLine",
|
|
1026
1027
|
"stackedLinePct",
|
|
@@ -1034,11 +1035,11 @@ var me = [
|
|
|
1034
1035
|
"stackedBarPct",
|
|
1035
1036
|
"stackedBarHPct"
|
|
1036
1037
|
]);
|
|
1037
|
-
function
|
|
1038
|
+
function _e(e, t) {
|
|
1038
1039
|
let n = Number.isFinite(t) && t > 0 ? t / m : 1, r = Number.isFinite(e) && e >= 0 ? e / g : 0;
|
|
1039
1040
|
return Math.max(.25, r) * n;
|
|
1040
1041
|
}
|
|
1041
|
-
function
|
|
1042
|
+
function ve(e, t) {
|
|
1042
1043
|
let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
|
|
1043
1044
|
for (let t of e) {
|
|
1044
1045
|
let e = t.categoryIndex;
|
|
@@ -1046,19 +1047,19 @@ function _e(e, t) {
|
|
|
1046
1047
|
}
|
|
1047
1048
|
return r;
|
|
1048
1049
|
}
|
|
1049
|
-
var
|
|
1050
|
-
function
|
|
1050
|
+
var ye = (e, t) => `#${t?.color ?? he[e % he.length]}`;
|
|
1051
|
+
function be(e, t) {
|
|
1051
1052
|
if (t?.lineHidden != null || t?.lineColor != null || t?.lineWidthEmu != null || t?.lineDash != null) return t.lineHidden !== !0;
|
|
1052
1053
|
let n = e.chartexStyle;
|
|
1053
1054
|
return (e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || n?.lineHidden != null || n?.lineNoStyle != null || n?.lineColors != null || n?.lineWidthEmu != null || n?.lineDash != null || n?.lineCap != null || n?.lineJoin != null) && e.lineHidden !== !0 && n?.lineHidden !== !0;
|
|
1054
1055
|
}
|
|
1055
|
-
function
|
|
1056
|
+
function xe(e, t) {
|
|
1056
1057
|
let n = e.replace(/^#/, "");
|
|
1057
1058
|
if (!/^[0-9a-f]{6}$/i.test(n)) return e;
|
|
1058
1059
|
let r = (e) => Math.max(0, Math.min(255, Math.round(parseInt(n.slice(e, e + 2), 16) * t))).toString(16).padStart(2, "0");
|
|
1059
1060
|
return `#${r(0)}${r(2)}${r(4)}`;
|
|
1060
1061
|
}
|
|
1061
|
-
function
|
|
1062
|
+
function Se(e, t) {
|
|
1062
1063
|
let n = e.cameraNormal(t);
|
|
1063
1064
|
if (!n) return 1;
|
|
1064
1065
|
let r = {
|
|
@@ -1068,20 +1069,20 @@ function xe(e, t) {
|
|
|
1068
1069
|
}, i = Math.hypot(r.x, r.y, r.z), a = Math.max(0, (n.x * r.x + n.y * r.y + n.z * r.z) / i);
|
|
1069
1070
|
return Math.max(.78, Math.min(1, .78 + .24 * a));
|
|
1070
1071
|
}
|
|
1071
|
-
var
|
|
1072
|
-
function
|
|
1072
|
+
var Ce = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, X = (e, t, n = "minor") => Ce((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
|
|
1073
|
+
function we(e, t) {
|
|
1073
1074
|
if (t.length) {
|
|
1074
1075
|
e.beginPath(), e.moveTo(t[0].x, t[0].y);
|
|
1075
1076
|
for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
|
|
1076
1077
|
e.closePath();
|
|
1077
1078
|
}
|
|
1078
1079
|
}
|
|
1079
|
-
var
|
|
1080
|
-
function
|
|
1081
|
-
|
|
1080
|
+
var Te = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
|
|
1081
|
+
function Ee(e, t, n, r) {
|
|
1082
|
+
Te(n) || (we(e, t), e.fillStyle = n, e.fill(), r > 0 && (we(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
|
|
1082
1083
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return
|
|
1084
|
+
function De(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
1085
|
+
return R({
|
|
1085
1086
|
x0: t,
|
|
1086
1087
|
x1: n,
|
|
1087
1088
|
lower0: r,
|
|
@@ -1092,13 +1093,13 @@ function Ee(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
|
1092
1093
|
farDepth: c,
|
|
1093
1094
|
capStart: u,
|
|
1094
1095
|
capEnd: d
|
|
1095
|
-
}).flatMap((t) =>
|
|
1096
|
+
}).flatMap((t) => ke(e, t, l).map((e) => ({
|
|
1096
1097
|
...e,
|
|
1097
1098
|
outline: !1,
|
|
1098
1099
|
outlineSegments: void 0
|
|
1099
1100
|
})));
|
|
1100
1101
|
}
|
|
1101
|
-
function
|
|
1102
|
+
function Oe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
1102
1103
|
if (![
|
|
1103
1104
|
r,
|
|
1104
1105
|
i,
|
|
@@ -1109,7 +1110,7 @@ function De(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
|
1109
1110
|
l,
|
|
1110
1111
|
u
|
|
1111
1112
|
].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
|
|
1112
|
-
let v =
|
|
1113
|
+
let v = I({
|
|
1113
1114
|
shape: t,
|
|
1114
1115
|
horizontal: n,
|
|
1115
1116
|
crossStart: n ? i : r,
|
|
@@ -1123,9 +1124,9 @@ function De(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
|
1123
1124
|
omitBaseCap: m,
|
|
1124
1125
|
omitEndCap: h
|
|
1125
1126
|
});
|
|
1126
|
-
return v ?
|
|
1127
|
+
return v ? ke(e, v, d, g, _) : [];
|
|
1127
1128
|
}
|
|
1128
|
-
function
|
|
1129
|
+
function ke(e, t, n, r, i, a = !1) {
|
|
1129
1130
|
if (i?.exceeded) return [];
|
|
1130
1131
|
let o = t.faces.map((r) => {
|
|
1131
1132
|
let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
|
|
@@ -1147,7 +1148,7 @@ function Oe(e, t, n, r, i, a = !1) {
|
|
|
1147
1148
|
facing: a,
|
|
1148
1149
|
face: {
|
|
1149
1150
|
points: o,
|
|
1150
|
-
color:
|
|
1151
|
+
color: xe(n, Se(e, i)),
|
|
1151
1152
|
shade: 0,
|
|
1152
1153
|
cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
|
|
1153
1154
|
cameraDepths: i.map((t) => e.cameraDepth(t.x, t.y, t.depth)),
|
|
@@ -1183,11 +1184,11 @@ function Oe(e, t, n, r, i, a = !1) {
|
|
|
1183
1184
|
let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
|
|
1184
1185
|
for (let [e, n] of t) l(e, n);
|
|
1185
1186
|
}
|
|
1186
|
-
let p =
|
|
1187
|
+
let p = me([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
|
|
1187
1188
|
if (!r) return s;
|
|
1188
1189
|
let m = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= 1e-9, h = (e) => p.junctions.some((t) => m(t.point, e));
|
|
1189
1190
|
for (let t of p.paths) {
|
|
1190
|
-
let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), o = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c =
|
|
1191
|
+
let n = t.map((t) => e.project(t.x, t.y, t.depth)), a = t.map((t) => e.cameraDepth(t.x, t.y, t.depth)), o = t.map((t) => e.cameraProjectionWeight(t.x, t.y, t.depth)), c = se(n.map((e, t) => ({
|
|
1191
1192
|
...e,
|
|
1192
1193
|
cameraDepth: a[t],
|
|
1193
1194
|
cameraWeight: o[t]
|
|
@@ -1216,7 +1217,7 @@ function Oe(e, t, n, r, i, a = !1) {
|
|
|
1216
1217
|
}));
|
|
1217
1218
|
}
|
|
1218
1219
|
for (let t of p.junctions) {
|
|
1219
|
-
let n =
|
|
1220
|
+
let n = ae({
|
|
1220
1221
|
...e.project(t.point.x, t.point.y, t.point.depth),
|
|
1221
1222
|
cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
|
|
1222
1223
|
cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
|
|
@@ -1244,7 +1245,7 @@ function Oe(e, t, n, r, i, a = !1) {
|
|
|
1244
1245
|
}
|
|
1245
1246
|
return s;
|
|
1246
1247
|
}
|
|
1247
|
-
function
|
|
1248
|
+
function Ae(e, t, n, r, i, a, o) {
|
|
1248
1249
|
if (!t.length || o.exceeded) return [];
|
|
1249
1250
|
let s = [...t].sort((e, t) => e.start - t.start), c = n - i / 2, l = n + i / 2, u = s[0], d = e.cameraDepth(u.centerX, c, u.centerDepth) >= e.cameraDepth(u.centerX, l, u.centerDepth) ? c : l, f = d === c ? l : c, p = (t, n, i) => ({
|
|
1250
1251
|
x: t.centerX + Math.cos(n) * r,
|
|
@@ -1256,7 +1257,7 @@ function ke(e, t, n, r, i, a, o) {
|
|
|
1256
1257
|
depth: e.centerDepth
|
|
1257
1258
|
}), h = [], g = (t, n = !1) => {
|
|
1258
1259
|
if (t.length < 2 || o.exceeded) return;
|
|
1259
|
-
let r = t[0], i = t.at(-1), s = Math.hypot(r.x - i.x, r.y - i.y, r.depth - i.depth) <= 1e-9, c =
|
|
1260
|
+
let r = t[0], i = t.at(-1), s = Math.hypot(r.x - i.x, r.y - i.y, r.depth - i.depth) <= 1e-9, c = se((n && !s ? [...t, r] : [...t]).map((t) => ({
|
|
1260
1261
|
...e.project(t.x, t.y, t.depth),
|
|
1261
1262
|
cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
|
|
1262
1263
|
cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
|
|
@@ -1335,31 +1336,31 @@ function ke(e, t, n, r, i, a, o) {
|
|
|
1335
1336
|
for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
|
|
1336
1337
|
return h;
|
|
1337
1338
|
}
|
|
1338
|
-
function
|
|
1339
|
-
|
|
1339
|
+
function je(e, t) {
|
|
1340
|
+
Ee(e, t.points, t.color, t.shade), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(x(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (we(e, t.points), e.stroke()), e.setLineDash([]));
|
|
1340
1341
|
}
|
|
1341
|
-
function
|
|
1342
|
-
t.points.length < 3 ||
|
|
1342
|
+
function Me(e, t, n) {
|
|
1343
|
+
t.points.length < 3 || Te(n) || (we(e, t.points), e.fillStyle = n, e.fill());
|
|
1343
1344
|
}
|
|
1344
|
-
function
|
|
1345
|
+
function Ne(e, t) {
|
|
1345
1346
|
e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(too many data points)", t.x + t.w / 2, t.y + t.h / 2);
|
|
1346
1347
|
}
|
|
1347
1348
|
function Z(e, t, n, r = !1) {
|
|
1348
1349
|
let i = Math.max(0, t - 1), a = Number.isFinite(e) ? Math.max(0, Math.min(i, e)) : 0, o = n ? (a + .5) / Math.max(1, t) : t === 1 ? .5 : a / i;
|
|
1349
1350
|
return r ? 1 - o : o;
|
|
1350
1351
|
}
|
|
1351
|
-
function
|
|
1352
|
+
function Pe(e) {
|
|
1352
1353
|
let t = e.catAxisLabelRotation;
|
|
1353
1354
|
return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
|
|
1354
1355
|
}
|
|
1355
|
-
function
|
|
1356
|
+
function Fe(e, t, n, r, i, a = 1, o = 6) {
|
|
1356
1357
|
if (i || r === 0) {
|
|
1357
|
-
e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", e.fillText(t, n.x + (i ? -
|
|
1358
|
+
e.textAlign = i ? "right" : "center", e.textBaseline = i ? "middle" : a < 0 ? "bottom" : "top", e.fillText(t, n.x + (i ? -o : 0), n.y + (i ? 0 : a * o));
|
|
1358
1359
|
return;
|
|
1359
1360
|
}
|
|
1360
|
-
e.save(), e.translate(n.x, n.y + a *
|
|
1361
|
+
e.save(), e.translate(n.x, n.y + a * o), e.rotate(r), e.textAlign = a < 0 ? "left" : "right", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
|
|
1361
1362
|
}
|
|
1362
|
-
function
|
|
1363
|
+
function Ie(e, t, n, r, i, a, o) {
|
|
1363
1364
|
if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
|
|
1364
1365
|
let s = r / 2;
|
|
1365
1366
|
switch (e.beginPath(), n) {
|
|
@@ -1400,7 +1401,7 @@ function Fe(e, t, n, r, i, a, o) {
|
|
|
1400
1401
|
}
|
|
1401
1402
|
i !== "transparent" && (e.fillStyle = i, e.fill()), e.strokeStyle = a, e.lineWidth = o, e.stroke();
|
|
1402
1403
|
}
|
|
1403
|
-
function
|
|
1404
|
+
function Le(e, t, n, r, i, a, o, s, c, l = 0, u, f, p = "t", m = o, h = !0, b) {
|
|
1404
1405
|
let x = f;
|
|
1405
1406
|
if (x?.deleted) return;
|
|
1406
1407
|
let S = n.seriesDataLabels, T = x?.showVal ?? S?.showVal ?? t.showDataLabels, E = x?.showCatName ?? S?.showCatName ?? !1, D = x?.showSerName ?? S?.showSerName ?? !1, O = x?.showPercent ?? S?.showPercent ?? !1, k = x?.text, A = w({
|
|
@@ -1430,7 +1431,7 @@ function Ie(e, t, n, r, i, a, o, s, c, l = 0, u, f, p = "t", m = o, h = !0, b) {
|
|
|
1430
1431
|
fontFamilyForFace: (e) => X(t, e)
|
|
1431
1432
|
}, j, P) : null, I = F ? [] : C(A, Math.max(j, s.w * .45), Math.max(j * 1.2, s.h * .35), j * 1.2, (t) => e.measureText(t).width);
|
|
1432
1433
|
if (!F && !I.length) return;
|
|
1433
|
-
let L = F?.width ?? Math.max(...I.map((t) => e.measureText(t).width)),
|
|
1434
|
+
let L = F?.width ?? Math.max(...I.map((t) => e.measureText(t).width)), R = F?.height ?? I.length * j * 1.2, z = _({
|
|
1434
1435
|
kind: "point",
|
|
1435
1436
|
x: o.x,
|
|
1436
1437
|
y: o.y,
|
|
@@ -1438,28 +1439,28 @@ function Ie(e, t, n, r, i, a, o, s, c, l = 0, u, f, p = "t", m = o, h = !0, b) {
|
|
|
1438
1439
|
markerGap: l
|
|
1439
1440
|
}, s, {
|
|
1440
1441
|
w: L,
|
|
1441
|
-
h:
|
|
1442
|
+
h: R
|
|
1442
1443
|
}, j, x?.manualLayout, s);
|
|
1443
|
-
if (!
|
|
1444
|
-
let
|
|
1445
|
-
if (S?.showLeaderLines && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(
|
|
1446
|
-
v(e, F,
|
|
1444
|
+
if (!z) return;
|
|
1445
|
+
let B = x?.labelBox ?? S?.labelBox;
|
|
1446
|
+
if (S?.showLeaderLines && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(z.rect.x, Math.min(m.x, z.rect.x + z.rect.w)), Math.max(z.rect.y, Math.min(m.y, z.rect.y + z.rect.h))), e.strokeStyle = `#${S.leaderLineColor ?? "808080"}`, e.lineWidth = S.leaderLineWidthEmu == null ? .75 * c : Math.max(.25, S.leaderLineWidthEmu / g * c), e.stroke()), B && (B.fill && (e.fillStyle = `#${B.fill}`, e.fillRect(z.rect.x, z.rect.y, z.rect.w, z.rect.h)), B.borderColor && (e.strokeStyle = `#${B.borderColor}`, e.lineWidth = B.borderWidthEmu == null ? .75 * c : Math.max(.25, B.borderWidthEmu / g * c), e.strokeRect(z.rect.x, z.rect.y, z.rect.w, z.rect.h))), e.save(), e.beginPath(), e.rect(z.clip.x, z.clip.y, z.clip.w, z.clip.h), e.clip(), F) {
|
|
1447
|
+
v(e, F, z.x, z.y, z.textAlign, z.textBaseline), e.restore();
|
|
1447
1448
|
return;
|
|
1448
1449
|
}
|
|
1449
|
-
e.fillStyle = P, e.textAlign =
|
|
1450
|
-
let
|
|
1451
|
-
I.forEach((t, n) => e.fillText(t,
|
|
1450
|
+
e.fillStyle = P, e.textAlign = z.textAlign, e.textBaseline = "middle";
|
|
1451
|
+
let V = j * 1.2, H = z.y - (I.length - 1) * V / 2;
|
|
1452
|
+
I.forEach((t, n) => e.fillText(t, z.x, H + n * V)), e.restore();
|
|
1452
1453
|
}
|
|
1453
|
-
function
|
|
1454
|
+
function Re(e, t, n) {
|
|
1454
1455
|
if (n?.deleted) return !1;
|
|
1455
1456
|
if (n?.text) return !0;
|
|
1456
1457
|
let r = t.seriesDataLabels;
|
|
1457
1458
|
return (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
|
|
1458
1459
|
}
|
|
1459
|
-
function
|
|
1460
|
+
function ze(n, c, l, u, f) {
|
|
1460
1461
|
let p = r(c, l.h, u);
|
|
1461
1462
|
if (c.title) {
|
|
1462
|
-
n.font = `${c.titleFontBold === !1 ? "" : "bold "}${p.fontPx}px ${
|
|
1463
|
+
n.font = `${c.titleFontBold === !1 ? "" : "bold "}${p.fontPx}px ${Ce(c.titleFontFace)}`, n.fillStyle = c.titleFontColor ? `#${c.titleFontColor}` : "#111111", n.textAlign = "center", n.textBaseline = "top";
|
|
1463
1464
|
let t = n.measureText(c.title).width, r = {
|
|
1464
1465
|
x: l.x + (l.w - t) / 2,
|
|
1465
1466
|
y: l.y + p.topPad,
|
|
@@ -1473,7 +1474,7 @@ function Re(n, c, l, u, f) {
|
|
|
1473
1474
|
n.fillText(c.title, i ? i.x + i.w / 2 : l.x + l.w / 2, i?.y ?? r.y);
|
|
1474
1475
|
}
|
|
1475
1476
|
let m = d(c.legendFontSizeHpt, u) ?? 9 * u;
|
|
1476
|
-
n.save(), n.font = `${c.legendFontBold ? "bold " : ""}${m}px ${
|
|
1477
|
+
n.save(), n.font = `${c.legendFontBold ? "bold " : ""}${m}px ${Ce(c.legendFontFace)}`;
|
|
1477
1478
|
let h = c.chartType === "pie" ? c.series[0]?.categories?.length ? c.series[0].categories : c.categories : c.series.map((e, t) => e.name || `Series ${t + 1}`), g = i(c, l.w, l.h, .23, {
|
|
1478
1479
|
itemWidths: h.map((e) => 7 * u + 4 + n.measureText(e).width),
|
|
1479
1480
|
rowHeight: Math.max(m * 1.45, 12),
|
|
@@ -1530,7 +1531,7 @@ function Re(n, c, l, u, f) {
|
|
|
1530
1531
|
legend: (C && c.legendManualLayout ? e(c.legendManualLayout, l, C) : null) ?? C
|
|
1531
1532
|
};
|
|
1532
1533
|
}
|
|
1533
|
-
function
|
|
1534
|
+
function Be(t, n, r, i, a, o, s, c, l, d, f, p, m, h) {
|
|
1534
1535
|
t.save(), t.font = `${d ? "italic " : ""}${l ? "bold " : ""}${o}px ${s}`, t.fillStyle = c ? `#${c}` : "#555";
|
|
1535
1536
|
let g = m ? n : S(t, n, h), _ = u(a, f, p), v = i;
|
|
1536
1537
|
if (m) {
|
|
@@ -1551,10 +1552,10 @@ function ze(t, n, r, i, a, o, s, c, l, d, f, p, m, h) {
|
|
|
1551
1552
|
}
|
|
1552
1553
|
t.translate(v.x, v.y), _ && t.rotate(_), t.textAlign = "center", t.textBaseline = "middle", t.fillText(g, 0, 0), t.restore();
|
|
1553
1554
|
}
|
|
1554
|
-
function
|
|
1555
|
+
function Ve(e, t, r, i, a, s) {
|
|
1555
1556
|
if (t.valAxisTitle) {
|
|
1556
1557
|
let c = n(t.valAxisTitleFontSizeHpt, s), l = a ? "horizontal" : "left";
|
|
1557
|
-
|
|
1558
|
+
Be(e, t.valAxisTitle, r, a ? {
|
|
1558
1559
|
x: i.x + i.w / 2,
|
|
1559
1560
|
y: i.y + i.h + o(r.h) + c / 2
|
|
1560
1561
|
} : {
|
|
@@ -1564,7 +1565,7 @@ function Be(e, t, r, i, a, s) {
|
|
|
1564
1565
|
}
|
|
1565
1566
|
if (t.catAxisTitle) {
|
|
1566
1567
|
let c = n(t.catAxisTitleFontSizeHpt, s), l = a ? "left" : "horizontal";
|
|
1567
|
-
|
|
1568
|
+
Be(e, t.catAxisTitle, r, a ? {
|
|
1568
1569
|
x: i.x - o(r.w) - c / 2,
|
|
1569
1570
|
y: i.y + i.h / 2
|
|
1570
1571
|
} : {
|
|
@@ -1573,10 +1574,10 @@ function Be(e, t, r, i, a, s) {
|
|
|
1573
1574
|
}, l, c, X(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, a ? i.h : i.w);
|
|
1574
1575
|
}
|
|
1575
1576
|
}
|
|
1576
|
-
function
|
|
1577
|
+
function He(e, t, r, i, a, o, s, c, l, u) {
|
|
1577
1578
|
let f = t.threeD?.seriesAxis;
|
|
1578
1579
|
if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
|
|
1579
|
-
let p =
|
|
1580
|
+
let p = et(t, i, a, o, s, c, l), m = Ke(i), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === i.front.y ? i.front.y + i.front.h : i.front.y : m.floorY, _ = i.project(h, g, i.topology.nearDepth), v = i.project(h, g, i.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
|
|
1580
1581
|
if (!(y > 1e-6)) return;
|
|
1581
1582
|
let b = {
|
|
1582
1583
|
x: (v.x - _.x) / y,
|
|
@@ -1607,30 +1608,30 @@ function Ve(e, t, r, i, a, o, s, c, l, u) {
|
|
|
1607
1608
|
}
|
|
1608
1609
|
if (e.setLineDash([]), f.title) {
|
|
1609
1610
|
let a = n(f.titleFontSizeHpt, u);
|
|
1610
|
-
|
|
1611
|
+
Be(e, f.title, r, {
|
|
1611
1612
|
x: C.x + x.x * (D + a + 12),
|
|
1612
1613
|
y: C.y + x.y * (D + a + 12)
|
|
1613
1614
|
}, "horizontal", a, X(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(i.front.w, i.front.h));
|
|
1614
1615
|
}
|
|
1615
1616
|
}
|
|
1616
|
-
function
|
|
1617
|
+
function Ue(e, t, n, r, i = !1) {
|
|
1617
1618
|
if (!n) return;
|
|
1618
1619
|
b(e, t, n, r);
|
|
1619
1620
|
let a = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), o = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
|
|
1620
1621
|
let r = t.series[0]?.dataPointColors?.[n];
|
|
1621
1622
|
return {
|
|
1622
1623
|
label: e,
|
|
1623
|
-
color: r === "00000000" ? "transparent" : r ? `#${r}` :
|
|
1624
|
+
color: r === "00000000" ? "transparent" : r ? `#${r}` : ye(n),
|
|
1624
1625
|
series: t.series[0],
|
|
1625
1626
|
point: a.get(n)
|
|
1626
1627
|
};
|
|
1627
1628
|
}) : t.series.map((e, t) => ({
|
|
1628
1629
|
label: e.name || `Series ${t + 1}`,
|
|
1629
|
-
color:
|
|
1630
|
+
color: ye(t, e),
|
|
1630
1631
|
series: e,
|
|
1631
1632
|
point: void 0
|
|
1632
1633
|
})), s = d(t.legendFontSizeHpt, r) ?? 9 * r;
|
|
1633
|
-
e.font = `${t.legendFontBold ? "bold " : ""}${s}px ${
|
|
1634
|
+
e.font = `${t.legendFontBold ? "bold " : ""}${s}px ${Ce(t.legendFontFace)}`, e.textAlign = "left", e.textBaseline = "middle";
|
|
1634
1635
|
let c = Math.max(s * 1.45, 12), l = Math.min(7 * r, c * .7);
|
|
1635
1636
|
if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
|
|
1636
1637
|
let a = o.map((t) => l + 4 + e.measureText(t.label).width), s = f(a, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / c))), u = n.y + 2 + c / 2;
|
|
@@ -1640,7 +1641,7 @@ function He(e, t, n, r, i = !1) {
|
|
|
1640
1641
|
let a = o[d[n]], c = Math.max(0, s[n] - l - 4);
|
|
1641
1642
|
if (!i && t.chartType.toLowerCase().includes("line") && a.series?.lineHidden !== !0) {
|
|
1642
1643
|
let t = a.series?.lineWidthEmu == null ? Math.max(1, 2 * r) : Math.max(.5, a.series.lineWidthEmu / g * r);
|
|
1643
|
-
e.beginPath(), e.moveTo(p, u), e.lineTo(p + l, u), e.strokeStyle = a.series?.lineColor ? `#${a.series.lineColor}` :
|
|
1644
|
+
e.beginPath(), e.moveTo(p, u), e.lineTo(p + l, u), e.strokeStyle = a.series?.lineColor ? `#${a.series.lineColor}` : xe(a.color, .7), e.lineWidth = t, e.setLineDash(x(a.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]);
|
|
1644
1645
|
} else {
|
|
1645
1646
|
a.color !== "transparent" && (e.fillStyle = a.color, e.fillRect(p, u - l / 2, l, l));
|
|
1646
1647
|
let t = a.point?.lineHidden ?? a.series?.lineHidden, n = a.point?.lineColor ?? a.series?.lineColor;
|
|
@@ -1661,7 +1662,7 @@ function He(e, t, n, r, i = !1) {
|
|
|
1661
1662
|
let v = u + _ / 2;
|
|
1662
1663
|
if (!i && t.chartType.toLowerCase().includes("line")) {
|
|
1663
1664
|
let t = d.series?.lineWidthEmu == null ? Math.max(1, 2 * r) : Math.max(.5, d.series.lineWidthEmu / g * r);
|
|
1664
|
-
d.series?.lineHidden !== !0 && (e.beginPath(), e.moveTo(n.x + 4, v), e.lineTo(n.x + 4 + l, v), e.strokeStyle = d.series?.lineColor ? `#${d.series.lineColor}` :
|
|
1665
|
+
d.series?.lineHidden !== !0 && (e.beginPath(), e.moveTo(n.x + 4, v), e.lineTo(n.x + 4 + l, v), e.strokeStyle = d.series?.lineColor ? `#${d.series.lineColor}` : xe(d.color, .7), e.lineWidth = t, e.setLineDash(x(d.series?.chartexStyle?.lineDash ?? "solid", t)), e.stroke(), e.setLineDash([]));
|
|
1665
1666
|
} else {
|
|
1666
1667
|
d.color !== "transparent" && (e.fillStyle = d.color, e.fillRect(n.x + 4, v - l / 2, l, l));
|
|
1667
1668
|
let t = d.point?.lineHidden ?? d.series?.lineHidden, i = d.point?.lineColor ?? d.series?.lineColor;
|
|
@@ -1672,7 +1673,7 @@ function He(e, t, n, r, i = !1) {
|
|
|
1672
1673
|
h.forEach((t, n) => e.fillText(t, f, y + n * m)), u += _;
|
|
1673
1674
|
}
|
|
1674
1675
|
}
|
|
1675
|
-
function
|
|
1676
|
+
function We(e, t, n, r, i, a) {
|
|
1676
1677
|
let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "cross";
|
|
1677
1678
|
return p({
|
|
1678
1679
|
dataMin: t,
|
|
@@ -1688,7 +1689,7 @@ function Ue(e, t, n, r, i, a) {
|
|
|
1688
1689
|
needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
|
|
1689
1690
|
});
|
|
1690
1691
|
}
|
|
1691
|
-
function
|
|
1692
|
+
function Ge(e, t, n) {
|
|
1692
1693
|
let r = e != null && Number.isFinite(e) ? (e % 360 + 360) % 360 : 0, i = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 0, a = Number.isFinite(n) ? Math.max(0, Math.min(1 - i, n)) : 0, o = Math.PI / 2 - (r * Math.PI / 180 + i * Math.PI * 2), s = o - a * Math.PI * 2;
|
|
1693
1694
|
return {
|
|
1694
1695
|
start: Math.min(o, s),
|
|
@@ -1697,7 +1698,7 @@ function We(e, t, n) {
|
|
|
1697
1698
|
leading: o
|
|
1698
1699
|
};
|
|
1699
1700
|
}
|
|
1700
|
-
function
|
|
1701
|
+
function Ke(e) {
|
|
1701
1702
|
let { front: t } = e, n = t.x, r = t.x + t.w, i = e.topology.farX === "min" ? n : r, a = i === n ? r : n, o = e.topology.axisY === "min" ? t.y : t.y + t.h, s = o === t.y ? t.y + t.h : t.y, { nearDepth: c, farDepth: l } = e.topology, u = e.project(n, o, c), d = e.project(r, o, c), f = e.project(r, o, l), p = e.project(n, o, l), m = e.project(n, s, l), h = e.project(r, s, l), g = e.project(i, o, c), _ = e.project(i, o, l), v = e.project(i, s, l), y = e.project(i, s, c);
|
|
1702
1703
|
return {
|
|
1703
1704
|
floor: [
|
|
@@ -1737,9 +1738,9 @@ function Q(e, t, n, r, i = "A6A6A6", a = .75) {
|
|
|
1737
1738
|
function $(e, t) {
|
|
1738
1739
|
e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
|
|
1739
1740
|
}
|
|
1740
|
-
function
|
|
1741
|
-
let { front: l } = n, u = l.x, d = l.x + l.w, f =
|
|
1742
|
-
n?.fillHidden === !0 || !n?.fillColor ||
|
|
1741
|
+
function qe(e, t, n, r, i, a, o, s, c) {
|
|
1742
|
+
let { front: l } = n, u = l.x, d = l.x + l.w, f = Ke(n), { sideX: p, floorY: m, oppositeFloorY: h, nearDepth: g, farDepth: _ } = f, v = (t, n) => {
|
|
1743
|
+
n?.fillHidden === !0 || !n?.fillColor || Ee(e, t, `#${n.fillColor}`, 0);
|
|
1743
1744
|
};
|
|
1744
1745
|
v(f.floor, t.threeD?.floor), v(f.sideWall, t.threeD?.sideWall), v(f.backWall, t.threeD?.backWall);
|
|
1745
1746
|
let y = (t, a) => {
|
|
@@ -1769,11 +1770,11 @@ function Ke(e, t, n, r, i, a, o, s, c) {
|
|
|
1769
1770
|
};
|
|
1770
1771
|
b(f.floor, t.threeD?.floor), b(f.sideWall, t.threeD?.sideWall), b(f.backWall, t.threeD?.backWall), e.setLineDash([]);
|
|
1771
1772
|
}
|
|
1772
|
-
function
|
|
1773
|
-
let l =
|
|
1773
|
+
function Je(e, t, n, r, i, a, o, s, c) {
|
|
1774
|
+
let l = et(t, n, r, i, a, o, c), u = c === "vertical" ? !t.catAxisHidden && !t.catAxisLineHidden : !t.valAxisHidden && !t.valAxisLineHidden, d = c === "vertical" ? !t.valAxisHidden && !t.valAxisLineHidden : !t.catAxisHidden && !t.catAxisLineHidden;
|
|
1774
1775
|
u && ($(e, Q(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && ($(e, Q(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, null, s, "898989", 1)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
|
|
1775
1776
|
}
|
|
1776
|
-
function
|
|
1777
|
+
function Ye(e, t, n, r) {
|
|
1777
1778
|
let i = {
|
|
1778
1779
|
x: (e.x + t.x) / 2,
|
|
1779
1780
|
y: (e.y + t.y) / 2
|
|
@@ -1786,12 +1787,25 @@ function Je(e, t, n, r) {
|
|
|
1786
1787
|
y: i.y <= n.y ? -1 : 1
|
|
1787
1788
|
};
|
|
1788
1789
|
}
|
|
1789
|
-
function
|
|
1790
|
+
function Xe(e, t, n, r, i, a, o, s, c) {
|
|
1790
1791
|
if (!t || t === "none") return;
|
|
1791
|
-
let l =
|
|
1792
|
+
let l = Ye(r, i, a, o), u = Ze(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
|
|
1792
1793
|
e.beginPath(), e.moveTo(n.x + l.x * f, n.y + l.y * f), e.lineTo(n.x - l.x * p, n.y - l.y * p), e.stroke();
|
|
1793
1794
|
}
|
|
1794
|
-
function
|
|
1795
|
+
function Ze(e, t) {
|
|
1796
|
+
return (e === "minor" ? 4 : 6) * t;
|
|
1797
|
+
}
|
|
1798
|
+
function Qe(e, t, n) {
|
|
1799
|
+
if (e !== "out" && e !== "cross") return 0;
|
|
1800
|
+
let r = Ze(t, n);
|
|
1801
|
+
return e === "cross" ? r / 2 : r;
|
|
1802
|
+
}
|
|
1803
|
+
function $e(e, t, n, r) {
|
|
1804
|
+
if (t) return r;
|
|
1805
|
+
let i = Qe(e, "major", n);
|
|
1806
|
+
return Math.max(r, i + 3 * n);
|
|
1807
|
+
}
|
|
1808
|
+
function et(e, t, n, r, i, a, o) {
|
|
1795
1809
|
let { front: s } = t, c = (e) => Math.max(0, Math.min(1, e)), l = t.topology.axisX === "min" ? s.x : s.x + s.w, u = t.topology.axisY === "min" ? s.y : s.y + s.h, d = () => {
|
|
1796
1810
|
if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
|
|
1797
1811
|
let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
|
|
@@ -1817,20 +1831,20 @@ function Xe(e, t, n, r, i, a, o) {
|
|
|
1817
1831
|
verticalEnd: t.project(h, s.y, _)
|
|
1818
1832
|
};
|
|
1819
1833
|
}
|
|
1820
|
-
function
|
|
1821
|
-
let { front: l } = n, u =
|
|
1834
|
+
function tt(e, t, n, r, i, a, o, s, c) {
|
|
1835
|
+
let { front: l } = n, u = et(t, n, r, i, a, o, s), { axisX: d, axisY: f, depth: p } = u, m = n.project(l.x + l.w / 2, l.y + l.h / 2, p), h = t.valAxisMinorTickMark ?? "cross";
|
|
1822
1836
|
if (!t.valAxisHidden && !t.valAxisLineHidden) {
|
|
1823
1837
|
$(e, Q(t.valAxisLineColor, t.valAxisLineWidthEmu, null, c, "898989", 1));
|
|
1824
1838
|
let i = (e) => s === "horizontal" ? n.project(l.x + r.fraction(e) * l.w, f, p) : n.project(d, l.y + l.h - r.fraction(e) * l.h, p), a = s === "horizontal" ? u.horizontalStart : u.verticalStart, o = s === "horizontal" ? u.horizontalEnd : u.verticalEnd;
|
|
1825
|
-
for (let n of r.majorTicks)
|
|
1826
|
-
for (let t of r.minorTicks)
|
|
1839
|
+
for (let n of r.majorTicks) Xe(e, t.valAxisMajorTickMark, i(n), a, o, m, s === "vertical" ? "horizontal" : "vertical", "major", c);
|
|
1840
|
+
for (let t of r.minorTicks) Xe(e, h, i(t), a, o, m, s === "vertical" ? "horizontal" : "vertical", "minor", c);
|
|
1827
1841
|
}
|
|
1828
1842
|
if (!t.catAxisHidden && !t.catAxisLineHidden) {
|
|
1829
1843
|
$(e, Q(t.catAxisLineColor, t.catAxisLineWidthEmu, null, c, "898989", 1));
|
|
1830
1844
|
let r = s === "vertical" ? u.horizontalStart : u.verticalStart, h = s === "vertical" ? u.horizontalEnd : u.verticalEnd, g = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1));
|
|
1831
1845
|
for (let u = 0; u < i; u += g) {
|
|
1832
1846
|
let g = Z(u, i, a, o), _ = s === "vertical" ? n.project(l.x + g * l.w, f, p) : n.project(d, l.y + g * l.h, p);
|
|
1833
|
-
|
|
1847
|
+
Xe(e, t.catAxisMajorTickMark, _, r, h, m, s === "vertical" ? "vertical" : "horizontal", "major", c);
|
|
1834
1848
|
}
|
|
1835
1849
|
let _ = t.catAxisMinorUnit;
|
|
1836
1850
|
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && _ != null && Number.isFinite(_) && _ > 0) {
|
|
@@ -1840,20 +1854,20 @@ function Ze(e, t, n, r, i, a, o, s, c) {
|
|
|
1840
1854
|
if (!(v < i)) break;
|
|
1841
1855
|
if (Math.abs(v / u - Math.round(v / u)) < 1e-9) continue;
|
|
1842
1856
|
let y = Z(v, i, a, o), b = s === "vertical" ? n.project(l.x + y * l.w, f, p) : n.project(d, l.y + y * l.h, p);
|
|
1843
|
-
|
|
1857
|
+
Xe(e, t.catAxisMinorTickMark, b, r, h, m, s === "vertical" ? "vertical" : "horizontal", "minor", c);
|
|
1844
1858
|
}
|
|
1845
1859
|
}
|
|
1846
1860
|
}
|
|
1847
1861
|
e.setLineDash([]);
|
|
1848
1862
|
}
|
|
1849
|
-
function
|
|
1863
|
+
function nt(e, t, n, r) {
|
|
1850
1864
|
if (!t.threeD) return !1;
|
|
1851
|
-
let i = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), a = t.chartType.endsWith("H") || t.chartType.includes("BarH"), o = t.chartType.startsWith("stacked"), s = i && !o && t.threeD.barGrouping === "standard", { plot: u, legend: f } =
|
|
1865
|
+
let i = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), a = t.chartType.endsWith("H") || t.chartType.includes("BarH"), o = t.chartType.startsWith("stacked"), s = i && !o && t.threeD.barGrouping === "standard", { plot: u, legend: f } = ze(e, t, n, r, a ? "horizontal" : "vertical"), p = j(t.threeD, u, {
|
|
1852
1866
|
sceneDepthScale: i ? s ? .65 : .1 : .4,
|
|
1853
1867
|
perspectiveTangentGain: s ? 1 : 2
|
|
1854
1868
|
});
|
|
1855
1869
|
if (!p) return !0;
|
|
1856
|
-
let _ = t.chartType.endsWith("Pct"), v = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, y = Math.max(1, v.length, ...t.series.map((e) => e.values.length)), b = t.catAxisOrientation === "maxMin", S = t.catAxisCrossBetween === "between", C = t.dispBlanksAs ?? "gap", w = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2,
|
|
1870
|
+
let _ = t.chartType.endsWith("Pct"), v = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, y = Math.max(1, v.length, ...t.series.map((e) => e.values.length)), b = t.catAxisOrientation === "maxMin", S = t.catAxisCrossBetween === "between", C = t.dispBlanksAs ?? "gap", w = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, T = (e, n) => {
|
|
1857
1871
|
let r = t.series[e]?.values[n];
|
|
1858
1872
|
return r != null && Number.isFinite(r) && (!w || r > 0) || r == null && (o || C === "zero");
|
|
1859
1873
|
}, O = (e, n) => {
|
|
@@ -1875,7 +1889,7 @@ function Qe(e, t, n, r) {
|
|
|
1875
1889
|
}, k = (e, t) => {
|
|
1876
1890
|
let n = e + t;
|
|
1877
1891
|
return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
|
|
1878
|
-
},
|
|
1892
|
+
}, A = 0, M = 0;
|
|
1879
1893
|
if (o) {
|
|
1880
1894
|
for (let e = 0; e < y; e++) {
|
|
1881
1895
|
let n = 0, r = 0;
|
|
@@ -1883,9 +1897,9 @@ function Qe(e, t, n, r) {
|
|
|
1883
1897
|
let t = O(i, e);
|
|
1884
1898
|
t >= 0 ? n = k(n, t) : r = k(r, t);
|
|
1885
1899
|
}
|
|
1886
|
-
|
|
1900
|
+
A = Math.min(A, r), M = Math.max(M, n);
|
|
1887
1901
|
}
|
|
1888
|
-
_ && (
|
|
1902
|
+
_ && (A = A < 0 ? -100 : 0, M = M > 0 ? 100 : 0, A === 0 && M === 0 && (M = 1));
|
|
1889
1903
|
} else {
|
|
1890
1904
|
let e = h(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!w || e > 0)), w ? {
|
|
1891
1905
|
min: 1,
|
|
@@ -1894,34 +1908,34 @@ function Qe(e, t, n, r) {
|
|
|
1894
1908
|
min: 0,
|
|
1895
1909
|
max: 1
|
|
1896
1910
|
});
|
|
1897
|
-
|
|
1911
|
+
A = w ? e.min : Math.min(0, e.min), M = w ? e.max : Math.max(0, e.max);
|
|
1898
1912
|
}
|
|
1899
|
-
let N =
|
|
1900
|
-
|
|
1901
|
-
let { front: F } = p, I = Math.max(1, t.series.length), L = [],
|
|
1913
|
+
let N = We(t, A, M, (a ? p.front.w : p.front.h) / r, _, a ? "horizontal" : "vertical"), P = (e) => Number.isFinite(e) ? Math.max(N.min, Math.min(N.max, e)) : N.min;
|
|
1914
|
+
qe(e, t, p, N, a ? "horizontal" : "vertical", y, S, b, r);
|
|
1915
|
+
let { front: F } = p, I = Math.max(1, t.series.length), L = [], R = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), z = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
|
|
1902
1916
|
if (i) {
|
|
1903
1917
|
let i = p.prismInterval(0, 1, !0), c = [], l = Array(y).fill(0), u = Array(y).fill(0), d = (a ? F.h : F.w) / y, f = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
|
|
1904
1918
|
for (let e = 0; e < t.series.length; e++) {
|
|
1905
|
-
let n = t.series[e], h = s ? p.prismInterval(e, I, !1) : i, g =
|
|
1919
|
+
let n = t.series[e], h = s ? p.prismInterval(e, I, !1) : i, g = E(d, f, s ? 0 : e, s ? 1 : I, o || s);
|
|
1906
1920
|
for (let i = 0; i < y; i++) {
|
|
1907
|
-
if (!
|
|
1908
|
-
let s = O(e, i), f =
|
|
1921
|
+
if (!T(e, i)) continue;
|
|
1922
|
+
let s = O(e, i), f = R[e].get(i), p = f?.fillHidden === !0 ? "transparent" : f?.color ?? n.dataPointColors?.[i], v = p === "00000000" ? "transparent" : p ? `#${p}` : n.color === "00000000" ? "transparent" : ye(e, n), x = be(n, f), S = f?.lineColor ?? n.lineColor, C = f?.lineWidthEmu ?? n.lineWidthEmu, E = f?.lineDash ?? n.chartexStyle?.lineDash ?? "solid", A = n.chartexStyle?.lineCap === "rnd" ? "round" : n.chartexStyle?.lineCap === "sq" ? "square" : "butt", j = n.chartexStyle?.lineJoin === "round" || n.chartexStyle?.lineJoin === "bevel" ? n.chartexStyle.lineJoin : "miter", M = o ? s >= 0 ? l[i] : u[i] : 0, I = k(M, s);
|
|
1909
1923
|
o && (s >= 0 ? l[i] = I : u[i] = I);
|
|
1910
|
-
let L = P(M),
|
|
1911
|
-
if (!
|
|
1924
|
+
let L = P(M), z = P(I), B = n.threeDShape ?? t.threeD.shape ?? "box", V = B === "cone" || B === "pyramid", H = B === "coneToMax" || B === "pyramidToMax", U = (e) => {
|
|
1925
|
+
if (!V) return 1;
|
|
1912
1926
|
let t = w && !(M > 0) ? N.min : M, n = N.fraction(t), r = N.fraction(I), i = N.fraction(e), a = r - n;
|
|
1913
1927
|
return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
|
|
1914
|
-
},
|
|
1915
|
-
if (!
|
|
1928
|
+
}, W = (e) => {
|
|
1929
|
+
if (!H) return 1;
|
|
1916
1930
|
let t = I >= M ? N.max : N.min, n = w ? N.min : 0, r = N.fraction(t), i = N.fraction(n), a = N.fraction(e), o = Math.abs(r - i);
|
|
1917
1931
|
return !(o > 0) || ![
|
|
1918
1932
|
r,
|
|
1919
1933
|
i,
|
|
1920
1934
|
a
|
|
1921
|
-
].every(Number.isFinite) ?
|
|
1922
|
-
},
|
|
1935
|
+
].every(Number.isFinite) ? D(e, N.min, N.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
|
|
1936
|
+
}, G = H ? W(L) : U(L), K = H ? W(z) : U(z);
|
|
1923
1937
|
if (a) {
|
|
1924
|
-
let t = F.x + N.fraction(L) * F.w, n = F.x + N.fraction(
|
|
1938
|
+
let t = F.x + N.fraction(L) * F.w, n = F.x + N.fraction(z) * F.w, a = b ? y - 1 - i : i, o = F.y + a * d + g.offset;
|
|
1925
1939
|
c.push({
|
|
1926
1940
|
x: Math.min(t, n),
|
|
1927
1941
|
y: o,
|
|
@@ -1932,23 +1946,23 @@ function Qe(e, t, n, r) {
|
|
|
1932
1946
|
categoryIndex: i,
|
|
1933
1947
|
seriesIndex: e,
|
|
1934
1948
|
color: v,
|
|
1935
|
-
shape:
|
|
1949
|
+
shape: B,
|
|
1936
1950
|
baseCoord: t,
|
|
1937
1951
|
endCoord: n,
|
|
1938
|
-
baseScale:
|
|
1939
|
-
endScale:
|
|
1952
|
+
baseScale: G,
|
|
1953
|
+
endScale: K,
|
|
1940
1954
|
omitBaseCap: !1,
|
|
1941
1955
|
omitEndCap: !1,
|
|
1942
1956
|
outline: x,
|
|
1943
1957
|
outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
|
|
1944
|
-
outlineWidth: C == null ? .75 * r / m :
|
|
1945
|
-
outlineDash:
|
|
1958
|
+
outlineWidth: C == null ? .75 * r / m : _e(C, r),
|
|
1959
|
+
outlineDash: E,
|
|
1946
1960
|
outlineCap: A,
|
|
1947
1961
|
outlineJoin: j,
|
|
1948
1962
|
labelValue: _ ? s / 100 : s
|
|
1949
1963
|
});
|
|
1950
1964
|
} else {
|
|
1951
|
-
let t = F.y + F.h - N.fraction(L) * F.h, n = F.y + F.h - N.fraction(
|
|
1965
|
+
let t = F.y + F.h - N.fraction(L) * F.h, n = F.y + F.h - N.fraction(z) * F.h, a = b ? y - 1 - i : i, o = F.x + a * d + g.offset;
|
|
1952
1966
|
c.push({
|
|
1953
1967
|
x: o,
|
|
1954
1968
|
y: Math.min(t, n),
|
|
@@ -1959,17 +1973,17 @@ function Qe(e, t, n, r) {
|
|
|
1959
1973
|
categoryIndex: i,
|
|
1960
1974
|
seriesIndex: e,
|
|
1961
1975
|
color: v,
|
|
1962
|
-
shape:
|
|
1976
|
+
shape: B,
|
|
1963
1977
|
baseCoord: t,
|
|
1964
1978
|
endCoord: n,
|
|
1965
|
-
baseScale:
|
|
1966
|
-
endScale:
|
|
1979
|
+
baseScale: G,
|
|
1980
|
+
endScale: K,
|
|
1967
1981
|
omitBaseCap: !1,
|
|
1968
1982
|
omitEndCap: !1,
|
|
1969
1983
|
outline: x,
|
|
1970
1984
|
outlineColor: S ? `#${S}` : "rgba(0,0,0,0.42)",
|
|
1971
|
-
outlineWidth: C == null ? .75 * r / m :
|
|
1972
|
-
outlineDash:
|
|
1985
|
+
outlineWidth: C == null ? .75 * r / m : _e(C, r),
|
|
1986
|
+
outlineDash: E,
|
|
1973
1987
|
outlineCap: A,
|
|
1974
1988
|
outlineJoin: j,
|
|
1975
1989
|
labelValue: _ ? s / 100 : s
|
|
@@ -1978,17 +1992,17 @@ function Qe(e, t, n, r) {
|
|
|
1978
1992
|
}
|
|
1979
1993
|
}
|
|
1980
1994
|
if (o) {
|
|
1981
|
-
let e =
|
|
1995
|
+
let e = ve(c, y);
|
|
1982
1996
|
for (let t = 0; t < y; t++) {
|
|
1983
1997
|
let n = e[t];
|
|
1984
1998
|
for (let e of [-1, 1]) {
|
|
1985
|
-
let t = n.filter((t) => Math.sign(t.labelValue) === e && !
|
|
1999
|
+
let t = n.filter((t) => Math.sign(t.labelValue) === e && !Te(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
|
|
1986
2000
|
for (let e = 0; e + 1 < t.length; e++) {
|
|
1987
2001
|
let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
|
|
1988
2002
|
n.shape !== r.shape || Math.abs(n.endCoord - r.baseCoord) > i || Math.abs(n.endScale - r.baseScale) > 1e-9 || n.nearDepth !== r.nearDepth || n.farDepth !== r.farDepth || (n.omitEndCap = !0, r.omitBaseCap = !0);
|
|
1989
2003
|
}
|
|
1990
2004
|
}
|
|
1991
|
-
let r = n.find((e) => e.labelValue > 0 && !
|
|
2005
|
+
let r = n.find((e) => e.labelValue > 0 && !Te(e.color)), i = n.find((e) => e.labelValue < 0 && !Te(e.color));
|
|
1992
2006
|
if (r && i) {
|
|
1993
2007
|
let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
|
|
1994
2008
|
r.shape === i.shape && Math.abs(r.baseCoord - i.baseCoord) <= e && Math.abs(r.baseScale - i.baseScale) <= 1e-9 && r.nearDepth === i.nearDepth && r.farDepth === i.farDepth && (r.omitBaseCap = !0, i.omitBaseCap = !0);
|
|
@@ -1996,20 +2010,20 @@ function Qe(e, t, n, r) {
|
|
|
1996
2010
|
}
|
|
1997
2011
|
}
|
|
1998
2012
|
let h = {
|
|
1999
|
-
remaining:
|
|
2013
|
+
remaining: ee,
|
|
2000
2014
|
exceeded: !1
|
|
2001
|
-
}, g = c.flatMap((e) =>
|
|
2015
|
+
}, g = c.flatMap((e) => Oe(p, e.shape, a, e.x, e.y, e.width, e.height, e.baseCoord, e.endCoord, e.nearDepth, e.farDepth, e.color, e.baseScale, e.endScale, e.omitBaseCap, e.omitEndCap, e.outline && e.outlineColor ? {
|
|
2002
2016
|
color: e.outlineColor,
|
|
2003
2017
|
width: e.outlineWidth,
|
|
2004
2018
|
dash: x(e.outlineDash, e.outlineWidth),
|
|
2005
2019
|
cap: e.outlineCap,
|
|
2006
2020
|
join: e.outlineJoin
|
|
2007
2021
|
} : void 0, h));
|
|
2008
|
-
if (h.exceeded) return
|
|
2009
|
-
for (let t of
|
|
2022
|
+
if (h.exceeded) return Ne(e, n), !0;
|
|
2023
|
+
for (let t of q(g)) je(e, t);
|
|
2010
2024
|
for (let i of c) {
|
|
2011
|
-
let o = t.series[i.seriesIndex], s = a ? p.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : p.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), c =
|
|
2012
|
-
|
|
2025
|
+
let o = t.series[i.seriesIndex], s = a ? p.project(i.endCoord, i.y + i.height / 2, (i.nearDepth + i.farDepth) / 2) : p.project(i.x + i.width / 2, i.endCoord, (i.nearDepth + i.farDepth) / 2), c = z[i.seriesIndex].get(i.categoryIndex);
|
|
2026
|
+
Re(t, o, c) && L.push(() => Le(e, t, o, i.seriesIndex, i.categoryIndex, i.labelValue, s, n, r, 0, void 0, c, "t", s, !0, t.valAxisDisplayUnits));
|
|
2013
2027
|
}
|
|
2014
2028
|
} else {
|
|
2015
2029
|
let i = t.series.map(() => Array(y).fill(0)), a = t.series.map(() => Array(y).fill(0));
|
|
@@ -2023,7 +2037,7 @@ function Qe(e, t, n, r) {
|
|
|
2023
2037
|
let s = (e) => {
|
|
2024
2038
|
let t = p.seriesDepth(e, I, o), n = 0, r = 0;
|
|
2025
2039
|
for (let i = 0; i < y; i++) {
|
|
2026
|
-
if (!
|
|
2040
|
+
if (!T(e, i)) continue;
|
|
2027
2041
|
let s = o ? a[e][i] : O(e, i), c = F.x + Z(i, y, S, b) * F.w, l = F.y + F.h - N.fraction(P(s)) * F.h;
|
|
2028
2042
|
n += p.cameraDepth(c, l, t), r++;
|
|
2029
2043
|
}
|
|
@@ -2031,23 +2045,23 @@ function Qe(e, t, n, r) {
|
|
|
2031
2045
|
}, c = t.series.map((e, t) => t).sort((e, t) => s(e) - s(t) || t - e), l = [], u = [], d = !1;
|
|
2032
2046
|
for (let s of c) {
|
|
2033
2047
|
if (d) break;
|
|
2034
|
-
let c = t.series[s], f =
|
|
2048
|
+
let c = t.series[s], f = ye(s, c), m = o ? p.prismInterval(0, 1, !0) : p.prismInterval(s, I, !1), h = F.x + F.w / 2, v = F.y + F.h / 2, w = p.cameraDepth(h, v, m.near) >= p.cameraDepth(h, v, m.far) ? m.near : m.far, E = [], D = [], k = [], A = [], j = [], M = [], P = [], H = [], U = [], W = [];
|
|
2035
2049
|
for (let e = 0; e < y; e++) {
|
|
2036
|
-
if (!
|
|
2037
|
-
|
|
2050
|
+
if (!T(s, e)) {
|
|
2051
|
+
E.push(null), D.push(null), k.push(null), A.push(null), j.push(null), M.push(null), P.push(null), H.push(null), U.push(null), W.push(null);
|
|
2038
2052
|
continue;
|
|
2039
2053
|
}
|
|
2040
2054
|
let n = o ? a[s][e] : O(s, e), r = o ? i[s][e] : 0, c = F.x + Z(e, y, S, b) * F.w, l = N.fraction(n), u = N.fraction(r), d = Number.isFinite(u) ? u : r <= N.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= N.min ? 0 : 1, h = F.y + F.h - m * F.h, g = F.y + F.h - Math.max(0, Math.min(1, d)) * F.h;
|
|
2041
|
-
|
|
2055
|
+
E.push(t.chartType.toLowerCase().includes("area") || f ? p.project(c, h, w) : null), D.push(p.project(c, g, w)), k.push(f ? p.cameraDepth(c, h, w) : null), A.push(p.cameraDepth(c, g, w)), j.push(n), M.push(c), P.push(h), H.push(g), U.push(l), W.push(d);
|
|
2042
2056
|
}
|
|
2043
|
-
let
|
|
2044
|
-
for (let e = 0; e <
|
|
2045
|
-
let t =
|
|
2057
|
+
let G = [], K = null;
|
|
2058
|
+
for (let e = 0; e < E.length; e++) {
|
|
2059
|
+
let t = E[e], n = D[e];
|
|
2046
2060
|
if (!t || !n) {
|
|
2047
|
-
C === "gap" && (
|
|
2061
|
+
C === "gap" && (K && G.push(K), K = null);
|
|
2048
2062
|
continue;
|
|
2049
2063
|
}
|
|
2050
|
-
|
|
2064
|
+
K ??= {
|
|
2051
2065
|
upper: [],
|
|
2052
2066
|
lower: [],
|
|
2053
2067
|
upperDepths: [],
|
|
@@ -2058,14 +2072,14 @@ function Qe(e, t, n, r) {
|
|
|
2058
2072
|
lowerYs: [],
|
|
2059
2073
|
upperFractions: [],
|
|
2060
2074
|
lowerFractions: []
|
|
2061
|
-
},
|
|
2075
|
+
}, K.upper.push(t), K.lower.push(n), K.upperDepths.push(k[e] ?? 0), K.lowerDepths.push(A[e] ?? 0), K.indices.push(e), K.sceneXs.push(M[e] ?? 0), K.upperYs.push(P[e] ?? 0), K.lowerYs.push(H[e] ?? 0), K.upperFractions.push(U[e] ?? 0), K.lowerFractions.push(W[e] ?? 0);
|
|
2062
2076
|
}
|
|
2063
|
-
|
|
2064
|
-
let
|
|
2065
|
-
if (t.chartType.toLowerCase().includes("area")) for (let t of
|
|
2077
|
+
K && G.push(K);
|
|
2078
|
+
let q = [];
|
|
2079
|
+
if (t.chartType.toLowerCase().includes("area")) for (let t of G) {
|
|
2066
2080
|
let n = null;
|
|
2067
2081
|
for (let r = 0; r + 1 < t.upper.length; r++) {
|
|
2068
|
-
let i =
|
|
2082
|
+
let i = V(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
|
|
2069
2083
|
for (let a = 0; a < i.length; a++) {
|
|
2070
2084
|
let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, u = F.y + F.h - o.lowerStart * F.h, h = F.y + F.h - o.lowerEnd * F.h, g = F.y + F.h - o.upperStart * F.h, _ = F.y + F.h - o.upperEnd * F.h, v = {
|
|
2071
2085
|
...p.project(s, g, w),
|
|
@@ -2076,8 +2090,8 @@ function Qe(e, t, n, r) {
|
|
|
2076
2090
|
cameraDepth: p.cameraDepth(c, _, w),
|
|
2077
2091
|
cameraWeight: p.cameraProjectionWeight(c, _, w)
|
|
2078
2092
|
};
|
|
2079
|
-
n != null && Math.hypot(n.at(-1).x - v.x, n.at(-1).y - v.y) <= 1e-8 ? n.push(y) : (n && n.length >= 2 &&
|
|
2080
|
-
let b =
|
|
2093
|
+
n != null && Math.hypot(n.at(-1).x - v.x, n.at(-1).y - v.y) <= 1e-8 ? n.push(y) : (n && n.length >= 2 && q.push(n), n = [v, y]);
|
|
2094
|
+
let b = De(p, s, c, u, h, g, _, m.near, m.far, f, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
|
|
2081
2095
|
for (let t of b) {
|
|
2082
2096
|
if (l.length >= 1e4) {
|
|
2083
2097
|
d = !0;
|
|
@@ -2089,16 +2103,16 @@ function Qe(e, t, n, r) {
|
|
|
2089
2103
|
cameraDepths: t.cameraDepths,
|
|
2090
2104
|
cameraWeights: t.cameraWeights,
|
|
2091
2105
|
layer: 0,
|
|
2092
|
-
paint: () =>
|
|
2106
|
+
paint: () => je(e, t)
|
|
2093
2107
|
});
|
|
2094
2108
|
}
|
|
2095
2109
|
if (d) break;
|
|
2096
2110
|
}
|
|
2097
2111
|
if (d) break;
|
|
2098
2112
|
}
|
|
2099
|
-
if (n && n.length >= 2 &&
|
|
2113
|
+
if (n && n.length >= 2 && q.push(n), d) break;
|
|
2100
2114
|
}
|
|
2101
|
-
let
|
|
2115
|
+
let J = [];
|
|
2102
2116
|
if (!t.chartType.toLowerCase().includes("area")) {
|
|
2103
2117
|
let e = [], t = null;
|
|
2104
2118
|
for (let n = 0; n < y; n++) {
|
|
@@ -2121,7 +2135,7 @@ function Qe(e, t, n, r) {
|
|
|
2121
2135
|
cameraWeight: p.cameraProjectionWeight(e.x, n, w)
|
|
2122
2136
|
};
|
|
2123
2137
|
}, r = (e) => {
|
|
2124
|
-
e && e.path.length >= 2 &&
|
|
2138
|
+
e && e.path.length >= 2 && J.push(e);
|
|
2125
2139
|
};
|
|
2126
2140
|
for (let t of e) {
|
|
2127
2141
|
if (t.length < 2) continue;
|
|
@@ -2149,7 +2163,7 @@ function Qe(e, t, n, r) {
|
|
|
2149
2163
|
}
|
|
2150
2164
|
let i = null, a = 0;
|
|
2151
2165
|
for (let t = 0; t + 1 < e.length; t++) {
|
|
2152
|
-
let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, F.y + F.h - e.fraction * F.h, w), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * F.h), m =
|
|
2166
|
+
let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, F.y + F.h - e.fraction * F.h, w), l = c(o), u = c(s), d = Math.hypot(u.x - l.x, u.y - l.y), f = Number.isFinite(d) ? d : Math.hypot(s.x - o.x, (s.fraction - o.fraction) * F.h), m = B(o.fraction, s.fraction);
|
|
2153
2167
|
if (!m || m.endT - m.startT <= 1e-12) {
|
|
2154
2168
|
r(i), i = null, a += f;
|
|
2155
2169
|
continue;
|
|
@@ -2168,10 +2182,10 @@ function Qe(e, t, n, r) {
|
|
|
2168
2182
|
r(i);
|
|
2169
2183
|
}
|
|
2170
2184
|
}
|
|
2171
|
-
let
|
|
2172
|
-
if (c.lineHidden !== !0 && (!
|
|
2173
|
-
let t = c.lineColor ? `#${c.lineColor}` :
|
|
2174
|
-
let f =
|
|
2185
|
+
let ee = t.chartType.toLowerCase().includes("area"), te = c.lineHidden != null || c.lineColor != null || c.lineWidthEmu != null || c.chartexStyle?.lineHidden != null || c.chartexStyle?.lineColors?.some(Boolean) || c.chartexStyle?.lineWidthEmu != null || c.chartexStyle?.lineDash != null || c.chartexStyle?.lineCap != null || c.chartexStyle?.lineJoin != null;
|
|
2186
|
+
if (c.lineHidden !== !0 && (!ee || te)) {
|
|
2187
|
+
let t = c.lineColor ? `#${c.lineColor}` : xe(f, .7), n = c.lineWidthEmu ? Math.max(.5, c.lineWidthEmu / g) * r : ee ? .75 * r : Math.max(1, 2 * r), i = x(c.chartexStyle?.lineDash ?? "solid", n), a = c.chartexStyle?.lineCap === "rnd" ? "round" : c.chartexStyle?.lineCap === "sq" ? "square" : "butt", o = c.chartexStyle?.lineJoin === "round" || c.chartexStyle?.lineJoin === "bevel" ? c.chartexStyle.lineJoin : "miter", s = (r, s, c = s, u = 0) => {
|
|
2188
|
+
let f = se(r, {
|
|
2175
2189
|
width: n,
|
|
2176
2190
|
dash: i,
|
|
2177
2191
|
dashOffset: u,
|
|
@@ -2194,36 +2208,36 @@ function Qe(e, t, n, r) {
|
|
|
2194
2208
|
cameraDepths: n.cameraDepths,
|
|
2195
2209
|
cameraWeights: n.cameraWeights,
|
|
2196
2210
|
layer: 1,
|
|
2197
|
-
paint: () =>
|
|
2211
|
+
paint: () => Me(e, n, t)
|
|
2198
2212
|
});
|
|
2199
2213
|
};
|
|
2200
|
-
if (
|
|
2201
|
-
else for (let e of
|
|
2214
|
+
if (ee) for (let e of q) s(e, a);
|
|
2215
|
+
else for (let e of J) s(e.path, e.startClipped ? "butt" : a, e.endClipped ? "butt" : a, e.dashOffset);
|
|
2202
2216
|
}
|
|
2203
|
-
let
|
|
2204
|
-
if (t.chartType.toLowerCase().includes("line") && (c.showMarker === !0 ||
|
|
2205
|
-
let n =
|
|
2217
|
+
let Y = c.dataPointOverrides?.some((e) => e.markerSymbol != null && e.markerSymbol !== "none") === !0;
|
|
2218
|
+
if (t.chartType.toLowerCase().includes("line") && (c.showMarker === !0 || Y)) for (let t = 0; t < E.length; t++) {
|
|
2219
|
+
let n = E[t];
|
|
2206
2220
|
if (!n) continue;
|
|
2207
|
-
let i =
|
|
2221
|
+
let i = R[s].get(t), a = i?.markerSymbol ?? (c.showMarker === !0 ? c.markerSymbol ?? "circle" : "none");
|
|
2208
2222
|
if (a === "none") continue;
|
|
2209
|
-
let o = i?.markerSize ?? c.markerSize ?? 5, l = i?.markerFill ?? c.markerFill ?? c.color ??
|
|
2210
|
-
u.push(() =>
|
|
2223
|
+
let o = i?.markerSize ?? c.markerSize ?? 5, l = i?.markerFill ?? c.markerFill ?? c.color ?? he[s % he.length], d = i?.markerLine ?? c.markerLine ?? c.lineColor ?? c.color ?? he[s % he.length], f = (i?.markerLineWidthEmu ?? c.markerLineWidthEmu) == null ? Math.max(.75, c.lineWidthEmu == null ? r : c.lineWidthEmu / g * r) : Math.max(.25, (i?.markerLineWidthEmu ?? c.markerLineWidthEmu ?? 0) / g * r);
|
|
2224
|
+
u.push(() => Ie(e, n, a, Math.max(2, o) * r, l === "00000000" ? "transparent" : `#${l}`, `#${d}`, f));
|
|
2211
2225
|
}
|
|
2212
|
-
for (let i = 0; i <
|
|
2213
|
-
let a =
|
|
2226
|
+
for (let i = 0; i < E.length; i++) {
|
|
2227
|
+
let a = E[i];
|
|
2214
2228
|
if (!a) continue;
|
|
2215
|
-
let o = O(s, i), l =
|
|
2216
|
-
|
|
2229
|
+
let o = O(s, i), l = R[s].get(i), u = l?.markerSize ?? c.markerSize ?? 5, d = z[s].get(i);
|
|
2230
|
+
Re(t, c, d) && L.push(() => Le(e, t, c, s, i, _ ? o / 100 : o, a, n, r, c.showMarker === !0 || l?.markerSymbol != null ? u * r / 2 : 0, void 0, d, "t", a, !0, t.valAxisDisplayUnits));
|
|
2217
2231
|
}
|
|
2218
2232
|
}
|
|
2219
|
-
if (d) return
|
|
2220
|
-
for (let e of
|
|
2233
|
+
if (d) return Ne(e, n), !0;
|
|
2234
|
+
for (let e of q(l)) e.paint();
|
|
2221
2235
|
for (let e of u) e();
|
|
2222
2236
|
}
|
|
2223
|
-
|
|
2224
|
-
let
|
|
2225
|
-
if (t !== "low" && t !== "high") return
|
|
2226
|
-
let n = p.topology.nearDepth, r =
|
|
2237
|
+
Je(e, t, p, N, y, S, b, r, a ? "horizontal" : "vertical"), tt(e, t, p, N, y, S, b, a ? "horizontal" : "vertical", r), He(e, t, n, p, N, y, S, b, a ? "horizontal" : "vertical", r);
|
|
2238
|
+
let H = et(t, p, N, y, S, b, a ? "horizontal" : "vertical"), U = (e, t) => {
|
|
2239
|
+
if (t !== "low" && t !== "high") return H;
|
|
2240
|
+
let n = p.topology.nearDepth, r = H.axisX, i = H.axisY;
|
|
2227
2241
|
if (e === "value" === a) {
|
|
2228
2242
|
let e = F.y, r = F.y + F.h, a = p.project(F.x + F.w / 2, e, n), o = p.project(F.x + F.w / 2, r, n), s = a.y >= o.y ? e : r;
|
|
2229
2243
|
i = t === "low" ? s : s === e ? r : e;
|
|
@@ -2240,44 +2254,44 @@ function Qe(e, t, n, r) {
|
|
|
2240
2254
|
verticalStart: p.project(r, F.y + F.h, n),
|
|
2241
2255
|
verticalEnd: p.project(r, F.y, n)
|
|
2242
2256
|
};
|
|
2243
|
-
},
|
|
2244
|
-
if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${K}px ${
|
|
2245
|
-
let { axisX: n, axisY:
|
|
2246
|
-
e.textAlign = Math.abs(
|
|
2247
|
-
let
|
|
2248
|
-
for (let
|
|
2249
|
-
let
|
|
2250
|
-
e.fillText(c(_ ?
|
|
2257
|
+
}, W = U("value", t.valAxisTickLabelPos), G = U("category", t.catAxisTickLabelPos), K = d(t.valAxisFontSizeHpt, r) ?? 9 * r;
|
|
2258
|
+
if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${K}px ${Ce(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = a ? "center" : "right", e.textBaseline = a ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
|
|
2259
|
+
let { axisX: n, axisY: i, depth: o } = W, s = p.project(F.x + F.w / 2, F.y + F.h / 2, o), l = Ye(a ? W.horizontalStart : W.verticalStart, a ? W.horizontalEnd : W.verticalEnd, s, a ? "vertical" : "horizontal");
|
|
2260
|
+
e.textAlign = Math.abs(l.x) < .2 ? "center" : l.x < 0 ? "right" : "left", e.textBaseline = Math.abs(l.y) < .2 ? "middle" : l.y < 0 ? "bottom" : "top";
|
|
2261
|
+
let u = $e(t.valAxisMajorTickMark, t.valAxisLineHidden, r, 5), d = t.valAxisDisplayUnits?.divisor;
|
|
2262
|
+
for (let r of N.majorTicks) {
|
|
2263
|
+
let s = a ? p.project(F.x + N.fraction(r) * F.w, i, o) : p.project(n, F.y + F.h - N.fraction(r) * F.h, o);
|
|
2264
|
+
e.fillText(c(_ ? r / 100 : d != null && Number.isFinite(d) && d > 0 ? r / d : r, _ ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + l.x * u, s.y + l.y * u);
|
|
2251
2265
|
}
|
|
2252
2266
|
}
|
|
2253
|
-
let
|
|
2254
|
-
if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${
|
|
2255
|
-
let n = Array.from({ length: y }, (e, n) => l(String(v[n] ?? n + 1), t.catAxisFormatCode, t.date1904)),
|
|
2256
|
-
if (
|
|
2257
|
-
let t = Infinity,
|
|
2267
|
+
let J = d(t.catAxisFontSizeHpt, r) ?? 9 * r;
|
|
2268
|
+
if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${J}px ${Ce(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
|
|
2269
|
+
let n = $e(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), i = Array.from({ length: y }, (e, n) => l(String(v[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), o = Pe(t);
|
|
2270
|
+
if (o == null && (o = 0, !a && y > 1)) {
|
|
2271
|
+
let t = Infinity, n = null, r = G.axisY;
|
|
2258
2272
|
for (let e = 0; e < y; e++) {
|
|
2259
|
-
let
|
|
2260
|
-
|
|
2273
|
+
let i = Z(e, y, S, b), a = p.project(F.x + i * F.w, r, p.topology.nearDepth);
|
|
2274
|
+
n && (t = Math.min(t, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
|
|
2261
2275
|
}
|
|
2262
|
-
Math.max(0, ...
|
|
2276
|
+
Math.max(0, ...i.map((t) => e.measureText(t).width)) > t * .9 && (o = -Math.PI / 4);
|
|
2263
2277
|
}
|
|
2264
|
-
let
|
|
2265
|
-
for (let t = 0; t < y; t +=
|
|
2266
|
-
let
|
|
2278
|
+
let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
|
|
2279
|
+
for (let t = 0; t < y; t += s) {
|
|
2280
|
+
let r = Z(t, y, S, b), { axisX: s, axisY: c, depth: l } = G, u = a ? p.project(s, F.y + Z(t, y, S, b) * F.h, l) : p.project(F.x + r * F.w, c, l);
|
|
2267
2281
|
if (a) {
|
|
2268
|
-
let r = p.project(
|
|
2269
|
-
e.textAlign =
|
|
2282
|
+
let r = p.project(s, F.y + F.h / 2, l), a = p.project(F.x + F.w / 2, F.y + F.h / 2, l), o = r.x <= a.x;
|
|
2283
|
+
e.textAlign = o ? "right" : "left", e.textBaseline = "middle", e.fillText(i[t], u.x + (o ? -n : n), u.y);
|
|
2270
2284
|
} else {
|
|
2271
|
-
let
|
|
2272
|
-
|
|
2285
|
+
let r = p.project(F.x + F.w / 2, F.y + F.h / 2, l), s = Ye(G.horizontalStart, G.horizontalEnd, r, "vertical");
|
|
2286
|
+
Fe(e, i[t], u, o, a, s.y < 0 ? -1 : 1, n);
|
|
2273
2287
|
}
|
|
2274
2288
|
}
|
|
2275
2289
|
}
|
|
2276
|
-
|
|
2290
|
+
Ve(e, t, n, u, a, r);
|
|
2277
2291
|
for (let e of L) e();
|
|
2278
|
-
return
|
|
2292
|
+
return Ue(e, t, f, r), !0;
|
|
2279
2293
|
}
|
|
2280
|
-
function
|
|
2294
|
+
function rt(e, t, n, r) {
|
|
2281
2295
|
if (!t.threeD || t.chartType !== "pie") return !1;
|
|
2282
2296
|
let i = t.series[0];
|
|
2283
2297
|
if (!i) return !0;
|
|
@@ -2289,7 +2303,7 @@ function $e(e, t, n, r) {
|
|
|
2289
2303
|
if (!(o > 0)) return !0;
|
|
2290
2304
|
let s = a.reduce((e, t) => e + t.value / o, 0);
|
|
2291
2305
|
if (!(s > 0) || !Number.isFinite(s)) return !0;
|
|
2292
|
-
let { plot: c, legend: l } =
|
|
2306
|
+
let { plot: c, legend: l } = ze(e, t, n, r, "radial"), u = j({
|
|
2293
2307
|
...t.threeD,
|
|
2294
2308
|
rotationY: t.threeD.rotationY ?? 0,
|
|
2295
2309
|
depthPercent: 100
|
|
@@ -2302,9 +2316,9 @@ function $e(e, t, n, r) {
|
|
|
2302
2316
|
for (let e of f.values()) e.explosion != null && Number.isFinite(e.explosion) && (p = Math.max(p, Math.max(0, Math.min(100, e.explosion)) / 100));
|
|
2303
2317
|
let { scene: m } = u, h = Math.min(m.w * .45 / (1 + p), u.modelDepth * .45 / (1 + p), m.h / .45);
|
|
2304
2318
|
if (!(h > 0)) return !0;
|
|
2305
|
-
let _ = m.x + m.w / 2, v = m.y + m.h / 2, b = .5, S = h * .3, C = 0, T = [], E = new Map(i.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []),
|
|
2319
|
+
let _ = m.x + m.w / 2, v = m.y + m.h / 2, b = .5, S = h * .3, C = 0, T = [], E = new Map(i.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), D = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * h / 4)));
|
|
2306
2320
|
for (let e of a) {
|
|
2307
|
-
let n = e.value / o / s, r =
|
|
2321
|
+
let n = e.value / o / s, r = Ge(t.firstSliceAngle, C, n), a = f.get(e.index), c = a?.fillHidden === !0 ? "00000000" : a?.color ?? i.dataPointColors?.[e.index] ?? i.color, l = r.middle, d = a?.explosion != null && Number.isFinite(a.explosion) ? Math.max(0, Math.min(100, a.explosion)) / 100 : 0, p = _ + Math.cos(l) * h * d, m = b + Math.sin(l) * h * d / u.modelDepth, g = Math.max(2, Math.ceil(D * n)), y = z({
|
|
2308
2322
|
centerX: p,
|
|
2309
2323
|
centerY: v,
|
|
2310
2324
|
centerDepth: m,
|
|
@@ -2323,7 +2337,7 @@ function $e(e, t, n, r) {
|
|
|
2323
2337
|
index: e.index,
|
|
2324
2338
|
start: r.start,
|
|
2325
2339
|
end: r.end,
|
|
2326
|
-
color: c === "00000000" ? "transparent" : c ? `#${c}` :
|
|
2340
|
+
color: c === "00000000" ? "transparent" : c ? `#${c}` : ye(e.index),
|
|
2327
2341
|
value: e.value,
|
|
2328
2342
|
percentValue: n,
|
|
2329
2343
|
centerX: p,
|
|
@@ -2338,9 +2352,9 @@ function $e(e, t, n, r) {
|
|
|
2338
2352
|
lineJoin: i.chartexStyle?.lineJoin === "round" || i.chartexStyle?.lineJoin === "bevel" ? i.chartexStyle.lineJoin : "miter"
|
|
2339
2353
|
}), C += n;
|
|
2340
2354
|
}
|
|
2341
|
-
u =
|
|
2342
|
-
let k = [],
|
|
2343
|
-
remaining:
|
|
2355
|
+
u = O(u, T.flatMap((e) => e.mesh.vertices), c, .08);
|
|
2356
|
+
let k = [], A = {
|
|
2357
|
+
remaining: ee,
|
|
2344
2358
|
exceeded: !1
|
|
2345
2359
|
}, M = (e) => {
|
|
2346
2360
|
let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / g * r);
|
|
@@ -2351,26 +2365,26 @@ function $e(e, t, n, r) {
|
|
|
2351
2365
|
cap: e.lineCap,
|
|
2352
2366
|
join: e.lineJoin
|
|
2353
2367
|
} : void 0;
|
|
2354
|
-
}, N = T.flatMap((e) =>
|
|
2368
|
+
}, N = T.flatMap((e) => ke(u, e.mesh, e.color, void 0, A)), P = [], F = T.map(M), I = F[0], L = (e) => e == null ? null : [
|
|
2355
2369
|
e.color,
|
|
2356
2370
|
e.width,
|
|
2357
2371
|
e.dash.join(","),
|
|
2358
2372
|
e.cap,
|
|
2359
2373
|
e.join
|
|
2360
2374
|
].join("|"), R = I != null && F.every((e) => L(e) === L(I)) && T.every((e) => Math.abs(e.centerX - _) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
|
|
2361
|
-
if (R) P.push(...
|
|
2375
|
+
if (R) P.push(...Ae(u, T, v, h, S, I, A));
|
|
2362
2376
|
else for (let e = 0; e < T.length; e++) {
|
|
2363
2377
|
let t = F[e];
|
|
2364
|
-
t && P.push(...
|
|
2378
|
+
t && P.push(...ke(u, T[e].mesh, "transparent", t, A, !0));
|
|
2365
2379
|
}
|
|
2366
|
-
if (
|
|
2380
|
+
if (A.exceeded) return Ne(e, n), !0;
|
|
2367
2381
|
if (R) {
|
|
2368
|
-
for (let t of
|
|
2369
|
-
for (let t of
|
|
2370
|
-
} else for (let t of
|
|
2382
|
+
for (let t of q(N)) je(e, t);
|
|
2383
|
+
for (let t of q(P)) je(e, t);
|
|
2384
|
+
} else for (let t of q([...N, ...P])) je(e, t);
|
|
2371
2385
|
for (let n of T) {
|
|
2372
2386
|
let a = (n.start + n.end) / 2, o = E.get(n.index);
|
|
2373
|
-
if (
|
|
2387
|
+
if (Re(t, i, o)) {
|
|
2374
2388
|
let s = i.seriesDataLabels, l = d(o?.fontSizeHpt ?? s?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
|
|
2375
2389
|
e.font = `${o?.fontBold ?? s?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${l}px ${X(t, o?.fontFace ?? s?.fontFace ?? t.dataLabelFontFace)}`;
|
|
2376
2390
|
let f = w({
|
|
@@ -2398,29 +2412,29 @@ function $e(e, t, n, r) {
|
|
|
2398
2412
|
T && (C += Math.hypot(r.x - T.x, r.y - T.y)), T = r;
|
|
2399
2413
|
}
|
|
2400
2414
|
let E = (g == null || g === "bestFit") && (n.percentValue === 0 || C < (m?.width ?? e.measureText(f).width)) || g === "outEnd", D = h * (E ? 1.12 : .64), O = u.project(n.centerX + Math.cos(a) * D, x, n.centerDepth + Math.sin(a) * D / u.modelDepth), A = u.project(n.centerX + Math.cos(a) * h, x, n.centerDepth + Math.sin(a) * h / u.modelDepth);
|
|
2401
|
-
k.push(() =>
|
|
2415
|
+
k.push(() => Le(e, t, i, 0, n.index, n.value, O, c, r, 0, n.percentValue, o, "ctr", A, E));
|
|
2402
2416
|
}
|
|
2403
2417
|
}
|
|
2404
2418
|
for (let e of k) e();
|
|
2405
|
-
let
|
|
2419
|
+
let B = i.categories?.length ? i.categories : t.categories, V = Array.from({ length: B.length }, (e, t) => {
|
|
2406
2420
|
let n = f.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? i.dataPointColors?.[t] ?? i.color;
|
|
2407
|
-
return r === "00000000" ? "00000000" :
|
|
2421
|
+
return r === "00000000" ? "00000000" : xe(r ? `#${r}` : ye(t), .8).replace(/^#/, "");
|
|
2408
2422
|
});
|
|
2409
|
-
return
|
|
2423
|
+
return Ue(e, {
|
|
2410
2424
|
...t,
|
|
2411
|
-
categories:
|
|
2425
|
+
categories: B,
|
|
2412
2426
|
series: [{
|
|
2413
2427
|
...i,
|
|
2414
|
-
categories:
|
|
2415
|
-
dataPointColors:
|
|
2428
|
+
categories: B,
|
|
2429
|
+
dataPointColors: V
|
|
2416
2430
|
}]
|
|
2417
2431
|
}, l, r, !0), !0;
|
|
2418
2432
|
}
|
|
2419
|
-
function
|
|
2420
|
-
return t.threeD ?
|
|
2433
|
+
function it(e, t, n, r) {
|
|
2434
|
+
return t.threeD ? rt(e, t, n, r) ? !0 : ge.has(t.chartType) ? nt(e, t, n, r) : !1 : !1;
|
|
2421
2435
|
}
|
|
2422
2436
|
//#endregion
|
|
2423
2437
|
//#region src/three-d.ts
|
|
2424
|
-
var
|
|
2438
|
+
var at = T({ render: it }, "threeD");
|
|
2425
2439
|
//#endregion
|
|
2426
|
-
export {
|
|
2440
|
+
export { at as threeD };
|