@silurus/ooxml 0.86.1 → 0.88.0
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 +42 -2
- package/dist/assets/render-worker-1uPAxMZr.js +31 -0
- package/dist/assets/render-worker-BlvJybji.js +10 -0
- package/dist/assets/render-worker-CzmiJfFL.js +11 -0
- package/dist/{canvas-viewer-mechanics-DN5SqWGS.js → canvas-viewer-mechanics-DbLz0rYW.js} +75 -66
- package/dist/chart-ex.mjs +581 -616
- package/dist/cjk-fallback-bLI3z70h.js +46 -0
- package/dist/comment-ui-runtime-BsK8pmUT.js +2 -0
- package/dist/{comment-ui-runtime-lXwVOgjW.js → comment-ui-runtime-CWGqn5Vr.js} +5 -5
- package/dist/{comment-ui-runtime-DEtgcmj7.js → comment-ui-runtime-DcJOYlw-.js} +5 -5
- package/dist/{comments-CAn2A_Xh.js → comments-Diid5ujN.js} +1 -1
- package/dist/{document-pull-client-uopDjRde.js → document-pull-client-B9PTM-pL.js} +4693 -4621
- package/dist/{docx-wPzeF76A.js → docx-BF9WXrYH.js} +503 -388
- package/dist/docx.mjs +6 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-CswB9Tzi.js → dom-interaction-boundary-Cnm8DSBN.js} +22 -19
- package/dist/{hyperlink-BR1NCO7S.js → hyperlink-Cxzhet30.js} +842 -829
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-IsUGfHXm.js → line-distribute-D1WNHKz_.js} +2 -2
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +356 -352
- package/dist/plot-area-frame-DLTYKHNP.js +4354 -0
- package/dist/{pptx-BxJ_RBSY.js → pptx-DkyYBYoL.js} +444 -435
- package/dist/pptx.mjs +7 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +5 -5
- package/dist/{render-DEiun_AH.js → render-D3iqVKCo.js} +31 -29
- package/dist/{render-worker-host-Ba6Fchqr.js → render-worker-host-B5wQfB7U.js} +1 -1
- package/dist/{render-worker-host-BEfLZvSL.js → render-worker-host-D4123J27.js} +1 -1
- package/dist/{render-worker-host-C3xwtHnv.js → render-worker-host-Di3LxLc0.js} +1 -1
- package/dist/renderer-B4GZb5We.js +6492 -0
- package/dist/{resource-measurement-CclArDRs.js → resource-measurement-SHQCbkh2.js} +3 -3
- package/dist/{session-BuJL_xcp.js → session-BGq81gRQ.js} +98 -98
- package/dist/{slide-pull-client-Ck8wfRT_.js → slide-pull-client-DiPnm240.js} +767 -738
- package/dist/{three-d-YYghQndN.js → three-d-DJBl8g8M.js} +251 -435
- package/dist/three-d.mjs +998 -906
- package/dist/tiff.mjs +2 -2
- package/dist/types/chart-ex.d.ts +142 -4
- package/dist/types/docx.d.ts +155 -13
- package/dist/types/index.d.ts +131 -19
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +120 -8
- package/dist/types/pptx.d.ts +123 -13
- package/dist/types/region-map.d.ts +142 -4
- package/dist/types/three-d.d.ts +142 -4
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +155 -13
- package/dist/{worksheet-pull-client-CAvuf22q.js → worksheet-pull-client-BM8ywvbu.js} +51 -51
- package/dist/{xlsx-Bblm5r1h.js → xlsx-C9NVjgaV.js} +1592 -1564
- package/dist/xlsx.mjs +6 -6
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-D21h5TGR.js +0 -10
- package/dist/assets/render-worker-Dsfekaht.js +0 -11
- package/dist/assets/render-worker-DxU7IrKo.js +0 -31
- package/dist/comment-ui-runtime-TLHustXJ.js +0 -2
- package/dist/plot-area-frame-D5hEOgkJ.js +0 -2903
- package/dist/renderer-XFSCOT6m.js +0 -5857
- /package/dist/{bounded-raw-part-cache-BfbSxRIL.js → bounded-raw-part-cache-Cg1BsSZQ.js} +0 -0
- /package/dist/{comment-occurrence-CqejEuts.js → comment-occurrence-C8Y2uoVr.js} +0 -0
- /package/dist/{delimited-text-worker-host-DcHj_JZt.js → delimited-text-worker-host-BVY-Ecni.js} +0 -0
- /package/dist/{highlight-rect-FuUSmL3a.js → highlight-rect-C5hkRqUr.js} +0 -0
- /package/dist/{line-metrics-CBbw80Ko.js → line-metrics-B60C86uh.js} +0 -0
- /package/dist/{mathjax-DS69BmJd.js → mathjax-DoyWZbSp.js} +0 -0
- /package/dist/{pixel-budget-Dgjw269h.js → pixel-budget-9P63Bsk5.js} +0 -0
- /package/dist/{read-only-comment-decoration-BTnWEeo5.js → read-only-comment-decoration-Dz7eTQ4d.js} +0 -0
- /package/dist/{read-only-comment-margin-plStyGfE.js → read-only-comment-margin-DkgzASAl.js} +0 -0
- /package/dist/{renderer-module-contract-Cu-GKuPd.js → renderer-module-contract-D91rkYHH.js} +0 -0
- /package/dist/{source-key-Ktb1GRE5.js → source-key-DIJG8BA0.js} +0 -0
- /package/dist/{transfer-mIj7E7NB.js → transfer-p6iCC2R7.js} +0 -0
- /package/dist/{units-EJdC96r6.js → units-BzZ0gAxs.js} +0 -0
- /package/dist/{visible-index-DPoQYSDt.js → visible-index-BgiHEc1z.js} +0 -0
package/dist/three-d.mjs
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
|
|
1
|
+
import { $ as e, $n as t, $t as n, An as r, B as i, Bn as a, Cn as o, D as s, Dn as c, En as l, Gt as u, H as d, Hn as f, In as p, Kt as m, Ln as h, Mn as g, O as _, Pn as v, Qn as y, Rn as b, Tn as x, Un as S, V as C, W as w, Wn as T, Xn as E, Yt as D, Zn as O, _n as k, ar as A, bn as j, dn as M, dr as N, er as P, et as F, fn as I, gn as L, gt as R, hn as z, i as B, ir as V, jn as H, m as ee, mn as U, pn as te, pr as W, qt as G, rr as K, sr as q, t as J, tt as ne, u as Y, ur as re, vn as ie, vt as ae, wn as oe, xn as se, yt as ce, z as le } from "./plot-area-frame-DLTYKHNP.js";
|
|
2
|
+
import { a as ue, r as X } from "./units-BzZ0gAxs.js";
|
|
3
|
+
import { T as de, a as fe, c as pe, h as me, i as he, m as ge, n as _e, o as ve, p as ye, r as be, s as xe, t as Se, u as Ce, w as we, y as Te } from "./three-d-DJBl8g8M.js";
|
|
4
|
+
import { t as Ee } from "./renderer-module-contract-D91rkYHH.js";
|
|
5
|
+
//#region packages/core/src/chart/three-d-datum-style.ts
|
|
6
|
+
function De(e, t, n, r) {
|
|
7
|
+
return re(e, r) ? n : t.chartexFormatIdx ?? r;
|
|
8
|
+
}
|
|
9
|
+
function Oe(e, t, n, r, i) {
|
|
10
|
+
let a = De(e, t, r, i), o = q(e, "dataPoint3D", i), s = W(e, "dataPoint3D"), c = E(n?.chartexStyle, s, r);
|
|
11
|
+
if (c !== void 0) return c;
|
|
12
|
+
if (n?.fillHidden === !0) {
|
|
13
|
+
let e = y(s);
|
|
14
|
+
if (e !== void 0) return e;
|
|
15
|
+
}
|
|
16
|
+
if (n?.color === "00000000") return null;
|
|
17
|
+
if (n?.color) return {
|
|
18
|
+
fillType: "solid",
|
|
19
|
+
color: n.color
|
|
20
|
+
};
|
|
21
|
+
let l = E(t.chartexStyle, s, a);
|
|
22
|
+
return l === void 0 ? P(o, s, a, n?.chartexStyle, t.chartexStyle) : l;
|
|
23
|
+
}
|
|
24
|
+
function ke(e) {
|
|
6
25
|
switch (e) {
|
|
7
26
|
case "cylinder":
|
|
8
27
|
case "cone":
|
|
@@ -12,8 +31,8 @@ function be(e) {
|
|
|
12
31
|
default: return "box";
|
|
13
32
|
}
|
|
14
33
|
}
|
|
15
|
-
var
|
|
16
|
-
function
|
|
34
|
+
var Ae = (e) => Math.max(0, Math.min(1, e));
|
|
35
|
+
function je(e, t) {
|
|
17
36
|
if (t.length < 3) return null;
|
|
18
37
|
let n = e[t[0]];
|
|
19
38
|
for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
|
|
@@ -38,7 +57,7 @@ function Se(e, t) {
|
|
|
38
57
|
}
|
|
39
58
|
return null;
|
|
40
59
|
}
|
|
41
|
-
function
|
|
60
|
+
function Me(e, t) {
|
|
42
61
|
let n = e.reduce((t, n) => ({
|
|
43
62
|
x: t.x + n.x / e.length,
|
|
44
63
|
y: t.y + n.y / e.length,
|
|
@@ -49,7 +68,7 @@ function Ce(e, t) {
|
|
|
49
68
|
depth: 0
|
|
50
69
|
});
|
|
51
70
|
return t.map((t) => {
|
|
52
|
-
let r =
|
|
71
|
+
let r = je(e, t.indices);
|
|
53
72
|
if (!r) return t;
|
|
54
73
|
let i = t.indices.reduce((n, r) => ({
|
|
55
74
|
x: n.x + e[r].x / t.indices.length,
|
|
@@ -70,7 +89,7 @@ function Ce(e, t) {
|
|
|
70
89
|
};
|
|
71
90
|
});
|
|
72
91
|
}
|
|
73
|
-
function
|
|
92
|
+
function Ne(e) {
|
|
74
93
|
let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
|
|
75
94
|
if (![
|
|
76
95
|
n,
|
|
@@ -80,7 +99,7 @@ function we(e) {
|
|
|
80
99
|
o,
|
|
81
100
|
s
|
|
82
101
|
].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
|
|
83
|
-
let c =
|
|
102
|
+
let c = ke(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 = Ae(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = Ae(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
|
|
84
103
|
if (p === 0 && m === 0) return null;
|
|
85
104
|
let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
|
|
86
105
|
if (n === 0) {
|
|
@@ -147,11 +166,11 @@ function we(e) {
|
|
|
147
166
|
return {
|
|
148
167
|
shape: c,
|
|
149
168
|
vertices: y,
|
|
150
|
-
faces:
|
|
169
|
+
faces: Me(y, w),
|
|
151
170
|
silhouetteEdges: T
|
|
152
171
|
};
|
|
153
172
|
}
|
|
154
|
-
function
|
|
173
|
+
function Pe(e) {
|
|
155
174
|
let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
|
|
156
175
|
if (![
|
|
157
176
|
t,
|
|
@@ -211,7 +230,7 @@ function Te(e) {
|
|
|
211
230
|
return {
|
|
212
231
|
shape: "areaStrip",
|
|
213
232
|
vertices: _,
|
|
214
|
-
faces:
|
|
233
|
+
faces: Me(_, [
|
|
215
234
|
{
|
|
216
235
|
indices: [
|
|
217
236
|
0,
|
|
@@ -276,17 +295,17 @@ function Te(e) {
|
|
|
276
295
|
silhouetteEdges: []
|
|
277
296
|
};
|
|
278
297
|
}
|
|
279
|
-
function
|
|
298
|
+
function Fe(e) {
|
|
280
299
|
let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
|
|
281
300
|
if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
|
|
282
301
|
let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
|
|
283
|
-
return [
|
|
302
|
+
return [Pe({
|
|
284
303
|
...e,
|
|
285
304
|
x1: i,
|
|
286
305
|
lower1: a,
|
|
287
306
|
upper1: a,
|
|
288
307
|
capEnd: !1
|
|
289
|
-
}),
|
|
308
|
+
}), Pe({
|
|
290
309
|
...e,
|
|
291
310
|
x0: i,
|
|
292
311
|
lower0: a,
|
|
@@ -294,10 +313,10 @@ function Ee(e) {
|
|
|
294
313
|
capStart: !1
|
|
295
314
|
})].filter((e) => e != null);
|
|
296
315
|
}
|
|
297
|
-
let r =
|
|
316
|
+
let r = Pe(e);
|
|
298
317
|
return r ? [r] : [];
|
|
299
318
|
}
|
|
300
|
-
function
|
|
319
|
+
function Ie(e) {
|
|
301
320
|
let t = e.outline;
|
|
302
321
|
if (t.length < 3 || t.length > 64 || ![e.nearDepth, e.farDepth].every(Number.isFinite) || Math.abs(e.nearDepth - e.farDepth) < 1e-9 || !t.every((e) => Number.isFinite(e.x) && Number.isFinite(e.y))) return null;
|
|
303
322
|
let n = Math.min(e.nearDepth, e.farDepth), r = Math.max(e.nearDepth, e.farDepth), i = t.length, a = [...t.map((e) => ({
|
|
@@ -310,7 +329,7 @@ function De(e) {
|
|
|
310
329
|
return {
|
|
311
330
|
shape: "lineRibbon",
|
|
312
331
|
vertices: a,
|
|
313
|
-
faces:
|
|
332
|
+
faces: Me(a, [
|
|
314
333
|
{
|
|
315
334
|
indices: o,
|
|
316
335
|
role: "side",
|
|
@@ -338,7 +357,7 @@ function De(e) {
|
|
|
338
357
|
silhouetteEdges: []
|
|
339
358
|
};
|
|
340
359
|
}
|
|
341
|
-
function
|
|
360
|
+
function Le(e) {
|
|
342
361
|
let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
|
|
343
362
|
if (![
|
|
344
363
|
t,
|
|
@@ -430,13 +449,13 @@ function Oe(e) {
|
|
|
430
449
|
return {
|
|
431
450
|
shape: "pieSector",
|
|
432
451
|
vertices: m,
|
|
433
|
-
faces:
|
|
452
|
+
faces: Me(m, v),
|
|
434
453
|
silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
|
|
435
454
|
};
|
|
436
455
|
}
|
|
437
456
|
//#endregion
|
|
438
457
|
//#region packages/core/src/chart/three-d-scene.ts
|
|
439
|
-
function
|
|
458
|
+
function Re(e, t) {
|
|
440
459
|
if (![e, t].every(Number.isFinite)) return null;
|
|
441
460
|
let n = t - e;
|
|
442
461
|
if (n === 0) return e >= 0 && e <= 1 ? {
|
|
@@ -449,7 +468,7 @@ function ke(e, t) {
|
|
|
449
468
|
endT: o
|
|
450
469
|
} : null;
|
|
451
470
|
}
|
|
452
|
-
function
|
|
471
|
+
function ze(e, t, n, r) {
|
|
453
472
|
if (![
|
|
454
473
|
e,
|
|
455
474
|
t,
|
|
@@ -478,12 +497,12 @@ function Ae(e, t, n, r) {
|
|
|
478
497
|
}
|
|
479
498
|
return l;
|
|
480
499
|
}
|
|
481
|
-
var
|
|
500
|
+
var Be = (e) => ({
|
|
482
501
|
minX: Math.min(...e.map((e) => e.x)),
|
|
483
502
|
maxX: Math.max(...e.map((e) => e.x)),
|
|
484
503
|
minY: Math.min(...e.map((e) => e.y)),
|
|
485
504
|
maxY: Math.max(...e.map((e) => e.y))
|
|
486
|
-
}),
|
|
505
|
+
}), Ve = (e, t) => {
|
|
487
506
|
let n = !1;
|
|
488
507
|
for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
|
|
489
508
|
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));
|
|
@@ -491,7 +510,7 @@ var je = (e) => ({
|
|
|
491
510
|
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);
|
|
492
511
|
}
|
|
493
512
|
return n;
|
|
494
|
-
},
|
|
513
|
+
}, He = (e, t, n, r) => {
|
|
495
514
|
let i = {
|
|
496
515
|
x: t.x - e.x,
|
|
497
516
|
y: t.y - e.y
|
|
@@ -509,23 +528,23 @@ var je = (e) => ({
|
|
|
509
528
|
y: e.y + i.y * c
|
|
510
529
|
};
|
|
511
530
|
};
|
|
512
|
-
function
|
|
531
|
+
function Ue(e, t, n, r) {
|
|
513
532
|
let i = [], a = (e) => {
|
|
514
533
|
i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
|
|
515
534
|
}, o = {
|
|
516
535
|
x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
|
|
517
536
|
y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
|
|
518
537
|
};
|
|
519
|
-
|
|
520
|
-
for (let n of e)
|
|
521
|
-
for (let n of t)
|
|
538
|
+
Ve(e, o) && Ve(t, o) && a(o);
|
|
539
|
+
for (let n of e) Ve(t, n) && a(n);
|
|
540
|
+
for (let n of t) Ve(e, n) && a(n);
|
|
522
541
|
for (let n = 0; n < e.length && i.length < 12; n++) for (let r = 0; r < t.length && i.length < 12; r++) {
|
|
523
|
-
let i =
|
|
542
|
+
let i = He(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
|
|
524
543
|
i && a(i);
|
|
525
544
|
}
|
|
526
545
|
return i;
|
|
527
546
|
}
|
|
528
|
-
function
|
|
547
|
+
function We(e, t) {
|
|
529
548
|
let n = e.cameraDepths;
|
|
530
549
|
if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
|
|
531
550
|
let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
|
|
@@ -539,17 +558,17 @@ function Fe(e, t) {
|
|
|
539
558
|
}
|
|
540
559
|
return e.cameraDepth;
|
|
541
560
|
}
|
|
542
|
-
function
|
|
561
|
+
function Ge(e) {
|
|
543
562
|
if (e.length < 2) return [...e];
|
|
544
|
-
let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) =>
|
|
563
|
+
let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => Be(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;
|
|
545
564
|
for (let c of r) {
|
|
546
565
|
for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
|
|
547
566
|
for (let r of o) {
|
|
548
567
|
if (++s > 2e5) return t.map((t) => e[t]);
|
|
549
568
|
if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
|
|
550
|
-
let o =
|
|
569
|
+
let o = Ue(e[r].points, e[c].points, n[r], n[c]), l = 0;
|
|
551
570
|
for (let t of o) {
|
|
552
|
-
let n =
|
|
571
|
+
let n = We(e[r], t) - We(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
|
|
553
572
|
if (Math.abs(n) <= i) continue;
|
|
554
573
|
let a = n < 0 ? -1 : 1;
|
|
555
574
|
if (l !== 0 && l !== a) {
|
|
@@ -575,29 +594,29 @@ function Ie(e) {
|
|
|
575
594
|
}
|
|
576
595
|
//#endregion
|
|
577
596
|
//#region packages/core/src/chart/three-d-stroke.ts
|
|
578
|
-
var
|
|
597
|
+
var Z = 1e-9, Ke = 1e4, qe = (e, t, n) => ({
|
|
579
598
|
x: e.x + (t.x - e.x) * n,
|
|
580
599
|
y: e.y + (t.y - e.y) * n,
|
|
581
600
|
cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
|
|
582
601
|
cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
|
|
583
|
-
}),
|
|
584
|
-
function
|
|
585
|
-
let r = t.filter((e) => Number.isFinite(e) && e >
|
|
602
|
+
}), Je = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Z;
|
|
603
|
+
function Ye(e, t, n = 0) {
|
|
604
|
+
let r = t.filter((e) => Number.isFinite(e) && e > Z);
|
|
586
605
|
if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
|
|
587
606
|
r.length % 2 == 1 && r.push(...r);
|
|
588
|
-
let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c >
|
|
589
|
-
for (; l >
|
|
607
|
+
let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > Z && Number.isFinite(n) ? (n % c + c) % c : 0;
|
|
608
|
+
for (; l > Z;) {
|
|
590
609
|
let e = Math.min(l, o);
|
|
591
|
-
l -= e, o -= e, o <=
|
|
610
|
+
l -= e, o -= e, o <= Z && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
|
|
592
611
|
}
|
|
593
612
|
let u = null;
|
|
594
613
|
for (let t = 0; t + 1 < e.length; t++) {
|
|
595
614
|
let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
|
|
596
|
-
if (!(l >
|
|
615
|
+
if (!(l > Z)) continue;
|
|
597
616
|
let d = 0;
|
|
598
|
-
for (; d < l -
|
|
599
|
-
let e = Math.min(o, l - d), t =
|
|
600
|
-
if (s && (u ??= [], (u.length === 0 || !
|
|
617
|
+
for (; d < l - Z;) {
|
|
618
|
+
let e = Math.min(o, l - d), t = qe(n, c, d / l), f = qe(n, c, (d + e) / l);
|
|
619
|
+
if (s && (u ??= [], (u.length === 0 || !Je(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Z) {
|
|
601
620
|
if (s && u && u.length >= 2) {
|
|
602
621
|
if (i.length >= 1e4) return null;
|
|
603
622
|
i.push(u);
|
|
@@ -610,13 +629,13 @@ function Be(e, t, n = 0) {
|
|
|
610
629
|
if (i.length >= 1e4) return null;
|
|
611
630
|
i.push(u);
|
|
612
631
|
}
|
|
613
|
-
if (i.length > 1 &&
|
|
632
|
+
if (i.length > 1 && Je(e[0], e.at(-1)) && Je(i[0][0], e[0]) && Je(i.at(-1).at(-1), e.at(-1))) {
|
|
614
633
|
let e = i.shift(), t = i.pop();
|
|
615
634
|
i.unshift([...t, ...e.slice(1)]);
|
|
616
635
|
}
|
|
617
636
|
return i;
|
|
618
637
|
}
|
|
619
|
-
var
|
|
638
|
+
var Xe = (e, t) => ({
|
|
620
639
|
kind: e,
|
|
621
640
|
points: t.map(({ x: e, y: t }) => ({
|
|
622
641
|
x: e,
|
|
@@ -625,7 +644,7 @@ var Ve = (e, t) => ({
|
|
|
625
644
|
cameraDepths: t.map((e) => e.cameraDepth),
|
|
626
645
|
cameraWeights: t.map((e) => e.cameraWeight ?? 1),
|
|
627
646
|
cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
|
|
628
|
-
}),
|
|
647
|
+
}), Ze = (e, t, n) => {
|
|
629
648
|
let r = [];
|
|
630
649
|
for (let n = 0; n < 12; n++) {
|
|
631
650
|
let i = Math.PI * 2 * n / 12;
|
|
@@ -635,17 +654,17 @@ var Ve = (e, t) => ({
|
|
|
635
654
|
y: e.y + Math.sin(i) * t
|
|
636
655
|
});
|
|
637
656
|
}
|
|
638
|
-
return
|
|
657
|
+
return Xe(n, r);
|
|
639
658
|
};
|
|
640
|
-
function
|
|
659
|
+
function Qe(e, t, n) {
|
|
641
660
|
let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
|
|
642
|
-
if (!(r >
|
|
661
|
+
if (!(r > Z) || t.length < 3) return null;
|
|
643
662
|
let i = r / 2;
|
|
644
|
-
if ((n.lineJoin ?? "miter") === "round") return
|
|
663
|
+
if ((n.lineJoin ?? "miter") === "round") return Ze(e, i, "join");
|
|
645
664
|
let a = [];
|
|
646
665
|
for (let n of t) {
|
|
647
666
|
let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
|
|
648
|
-
if (!(o >
|
|
667
|
+
if (!(o > Z)) continue;
|
|
649
668
|
let s = -r / o * i, c = t / o * i;
|
|
650
669
|
a.push({
|
|
651
670
|
...e,
|
|
@@ -661,20 +680,20 @@ function Ue(e, t, n) {
|
|
|
661
680
|
a.sort((e, t) => e.x - t.x || e.y - t.y);
|
|
662
681
|
let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
|
|
663
682
|
for (let e of a) {
|
|
664
|
-
for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <=
|
|
683
|
+
for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Z;) s.pop();
|
|
665
684
|
s.push(e);
|
|
666
685
|
}
|
|
667
686
|
let c = [];
|
|
668
687
|
for (let e of [...a].reverse()) {
|
|
669
|
-
for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <=
|
|
688
|
+
for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Z;) c.pop();
|
|
670
689
|
c.push(e);
|
|
671
690
|
}
|
|
672
691
|
let l = [...s.slice(0, -1), ...c.slice(0, -1)];
|
|
673
|
-
return l.length >= 3 ?
|
|
692
|
+
return l.length >= 3 ? Xe("join", l) : null;
|
|
674
693
|
}
|
|
675
|
-
var
|
|
694
|
+
var $e = (e, t, n, r) => {
|
|
676
695
|
let i = t.x * r.y - t.y * r.x;
|
|
677
|
-
if (Math.abs(i) <=
|
|
696
|
+
if (Math.abs(i) <= Z) return null;
|
|
678
697
|
let a = {
|
|
679
698
|
x: n.x - e.x,
|
|
680
699
|
y: n.y - e.y
|
|
@@ -684,17 +703,17 @@ var We = (e, t, n, r) => {
|
|
|
684
703
|
y: e.y + t.y * o
|
|
685
704
|
};
|
|
686
705
|
};
|
|
687
|
-
function
|
|
706
|
+
function et(e, t) {
|
|
688
707
|
let n = Number.isFinite(t.width) ? Math.max(0, t.width) : 0;
|
|
689
|
-
if (!(n >
|
|
690
|
-
let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c =
|
|
708
|
+
if (!(n > Z) || e.length < 2) return [];
|
|
709
|
+
let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = Ye(e, t.dash ?? [], t.dashOffset);
|
|
691
710
|
if (c == null) return null;
|
|
692
711
|
let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
|
|
693
712
|
for (let n = 0; n < c.length; n++) {
|
|
694
|
-
let s = c[n], u = s.length > 2 &&
|
|
713
|
+
let s = c[n], u = s.length > 2 && Je(s[0], s.at(-1)), d = n === 0 && Je(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && Je(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
|
|
695
714
|
for (let e = 0; e + 1 < s.length; e++) {
|
|
696
715
|
let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
|
|
697
|
-
p.push(r >
|
|
716
|
+
p.push(r > Z ? {
|
|
698
717
|
x: (n.x - t.x) / r,
|
|
699
718
|
y: (n.y - t.y) / r
|
|
700
719
|
} : null);
|
|
@@ -714,7 +733,7 @@ function Ge(e, t) {
|
|
|
714
733
|
x: s[e + 1].x + n.x * _,
|
|
715
734
|
y: s[e + 1].y + n.y * _
|
|
716
735
|
};
|
|
717
|
-
if (!l(
|
|
736
|
+
if (!l(Xe("segment", [
|
|
718
737
|
{
|
|
719
738
|
...v,
|
|
720
739
|
x: v.x + i.x,
|
|
@@ -737,12 +756,12 @@ function Ge(e, t) {
|
|
|
737
756
|
}
|
|
738
757
|
]))) return null;
|
|
739
758
|
}
|
|
740
|
-
if (!u && d === "round" && !l(
|
|
759
|
+
if (!u && d === "round" && !l(Ze(s[0], r, "cap")) || !u && f === "round" && !l(Ze(s.at(-1), r, "cap"))) return null;
|
|
741
760
|
let m = (e, t, n) => {
|
|
742
761
|
if (!t || !n) return !0;
|
|
743
762
|
let i = t.x * n.y - t.y * n.x;
|
|
744
|
-
if (Math.abs(i) <=
|
|
745
|
-
if (a === "round") return l(
|
|
763
|
+
if (Math.abs(i) <= Z) return !0;
|
|
764
|
+
if (a === "round") return l(Ze(e, r, "join"));
|
|
746
765
|
let s = i > 0 ? -1 : 1, c = {
|
|
747
766
|
...e,
|
|
748
767
|
x: e.x + -t.y * r * s,
|
|
@@ -753,8 +772,8 @@ function Ge(e, t) {
|
|
|
753
772
|
y: e.y + n.x * r * s
|
|
754
773
|
};
|
|
755
774
|
if (a === "miter") {
|
|
756
|
-
let i =
|
|
757
|
-
if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(
|
|
775
|
+
let i = $e(c, t, u, n);
|
|
776
|
+
if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Xe("join", [
|
|
758
777
|
c,
|
|
759
778
|
{
|
|
760
779
|
...e,
|
|
@@ -763,7 +782,7 @@ function Ge(e, t) {
|
|
|
763
782
|
u
|
|
764
783
|
]));
|
|
765
784
|
}
|
|
766
|
-
return l(
|
|
785
|
+
return l(Xe("join", [
|
|
767
786
|
c,
|
|
768
787
|
e,
|
|
769
788
|
u
|
|
@@ -776,30 +795,30 @@ function Ge(e, t) {
|
|
|
776
795
|
}
|
|
777
796
|
//#endregion
|
|
778
797
|
//#region packages/core/src/chart/three-d-outline.ts
|
|
779
|
-
var
|
|
798
|
+
var tt = 1e-9, nt = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= tt, rt = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, it = (e, t) => {
|
|
780
799
|
let n = Math.min(e.length, t.length);
|
|
781
800
|
for (let r = 0; r < n; r++) {
|
|
782
|
-
let n =
|
|
801
|
+
let n = rt(e[r], t[r]);
|
|
783
802
|
if (n !== 0) return n;
|
|
784
803
|
}
|
|
785
804
|
return e.length - t.length;
|
|
786
805
|
};
|
|
787
|
-
function
|
|
806
|
+
function at(e) {
|
|
788
807
|
let t = [...e].reverse();
|
|
789
|
-
return
|
|
808
|
+
return it(e, t) <= 0 ? e : t;
|
|
790
809
|
}
|
|
791
|
-
function
|
|
792
|
-
let t =
|
|
810
|
+
function ot(e) {
|
|
811
|
+
let t = nt(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
|
|
793
812
|
if (t.length === 0) return [];
|
|
794
813
|
let n = 0;
|
|
795
|
-
for (let e = 1; e < t.length; e++)
|
|
796
|
-
let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a =
|
|
814
|
+
for (let e = 1; e < t.length; e++) rt(t[e], t[n]) < 0 && (n = e);
|
|
815
|
+
let r = t.map((e, r) => t[(n + r) % t.length]), i = t.map((e, r) => t[(n - r + t.length) % t.length]), a = it(r, i) <= 0 ? r : i;
|
|
797
816
|
return [...a, a[0]];
|
|
798
817
|
}
|
|
799
|
-
function
|
|
818
|
+
function st(e) {
|
|
800
819
|
let t = [], n = (e) => {
|
|
801
|
-
let n = t.find((t) =>
|
|
802
|
-
if (n) return
|
|
820
|
+
let n = t.find((t) => nt(t.point, e));
|
|
821
|
+
if (n) return rt(e, n.point) < 0 && (n.point = e), n;
|
|
803
822
|
let r = {
|
|
804
823
|
point: e,
|
|
805
824
|
edges: [],
|
|
@@ -808,11 +827,11 @@ function Qe(e) {
|
|
|
808
827
|
return t.push(r), r;
|
|
809
828
|
}, r = [];
|
|
810
829
|
for (let [t, i] of e) {
|
|
811
|
-
if (
|
|
830
|
+
if (nt(t, i)) continue;
|
|
812
831
|
let e = n(t), a = n(i);
|
|
813
832
|
e !== a && r.push([e, a]);
|
|
814
833
|
}
|
|
815
|
-
t.sort((e, t) =>
|
|
834
|
+
t.sort((e, t) => rt(e.point, t.point)), t.forEach((e, t) => {
|
|
816
835
|
e.order = t;
|
|
817
836
|
});
|
|
818
837
|
let i = [], a = /* @__PURE__ */ new Set();
|
|
@@ -840,47 +859,47 @@ function Qe(e) {
|
|
|
840
859
|
}
|
|
841
860
|
return n;
|
|
842
861
|
}, c = [];
|
|
843
|
-
for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(
|
|
862
|
+
for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(at(s(e, t)));
|
|
844
863
|
for (let e = 0; e < i.length; e++) {
|
|
845
864
|
if (o.has(e)) continue;
|
|
846
865
|
let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
|
|
847
|
-
c.push(
|
|
866
|
+
c.push(ot(s(n, e)));
|
|
848
867
|
}
|
|
849
868
|
let l = t.filter((e) => e.edges.length > 2).map((e) => ({
|
|
850
869
|
point: e.point,
|
|
851
870
|
neighbours: e.edges.map((t) => {
|
|
852
871
|
let n = i[t];
|
|
853
872
|
return n.first === e ? n.second.point : n.first.point;
|
|
854
|
-
}).sort(
|
|
873
|
+
}).sort(rt)
|
|
855
874
|
}));
|
|
856
875
|
return {
|
|
857
|
-
paths: c.sort(
|
|
876
|
+
paths: c.sort(it),
|
|
858
877
|
junctions: l
|
|
859
878
|
};
|
|
860
879
|
}
|
|
861
880
|
//#endregion
|
|
862
881
|
//#region packages/core/src/chart/three-d-renderer.ts
|
|
863
|
-
function
|
|
882
|
+
function ct(e) {
|
|
864
883
|
let t = /* @__PURE__ */ new Map();
|
|
865
884
|
for (let n of e.legendEntries ?? []) t.set(n.idx, n);
|
|
866
885
|
return t;
|
|
867
886
|
}
|
|
868
|
-
function
|
|
869
|
-
let r =
|
|
887
|
+
function lt(e, t, n) {
|
|
888
|
+
let r = v(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace, a = t?.fontBold ?? e.legendFontBold ?? !1;
|
|
870
889
|
return {
|
|
871
890
|
fontPx: r,
|
|
872
|
-
font: `${t?.
|
|
891
|
+
font: `${t?.fontItalic ?? e.legendFontItalic ?? !1 ? "italic " : ""}${a ? "bold " : ""}${r}px ${Tt(i)}`,
|
|
873
892
|
color: t?.fontColor ? `#${t.fontColor}` : e.legendFontColor ? `#${e.legendFontColor}` : "#595959"
|
|
874
893
|
};
|
|
875
894
|
}
|
|
876
|
-
var
|
|
895
|
+
var ut = [
|
|
877
896
|
"4472C4",
|
|
878
897
|
"ED7D31",
|
|
879
898
|
"70AD47",
|
|
880
899
|
"A5A5A5",
|
|
881
900
|
"FFC000",
|
|
882
901
|
"5B9BD5"
|
|
883
|
-
],
|
|
902
|
+
], dt = _, ft = s, pt = new Set([
|
|
884
903
|
"line",
|
|
885
904
|
"stackedLine",
|
|
886
905
|
"stackedLinePct",
|
|
@@ -894,11 +913,11 @@ var tt = [
|
|
|
894
913
|
"stackedBarPct",
|
|
895
914
|
"stackedBarHPct"
|
|
896
915
|
]);
|
|
897
|
-
function
|
|
898
|
-
let n = Number.isFinite(t) && t > 0 ? t /
|
|
916
|
+
function mt(e, t) {
|
|
917
|
+
let n = Number.isFinite(t) && t > 0 ? t / ue : 1, r = Number.isFinite(e) && e >= 0 ? e / X : 0;
|
|
899
918
|
return Math.max(.25, r) * n;
|
|
900
919
|
}
|
|
901
|
-
function
|
|
920
|
+
function ht(e, t) {
|
|
902
921
|
let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
|
|
903
922
|
for (let t of e) {
|
|
904
923
|
let e = t.categoryIndex;
|
|
@@ -906,18 +925,18 @@ function ot(e, t) {
|
|
|
906
925
|
}
|
|
907
926
|
return r;
|
|
908
927
|
}
|
|
909
|
-
var
|
|
910
|
-
function
|
|
928
|
+
var gt = (e, t) => `#${t?.color ?? ut[e % ut.length]}`;
|
|
929
|
+
function _t(e, t, n) {
|
|
911
930
|
let r = 0;
|
|
912
931
|
for (let i of e) for (let e of [t(i), n(i)]) {
|
|
913
932
|
if (e == null) continue;
|
|
914
|
-
let t =
|
|
915
|
-
if (e.fillType === "gradient" && t >
|
|
933
|
+
let t = D(e);
|
|
934
|
+
if (e.fillType === "gradient" && t > dt || t > ft - r) return !1;
|
|
916
935
|
r += t;
|
|
917
936
|
}
|
|
918
937
|
return !0;
|
|
919
938
|
}
|
|
920
|
-
function
|
|
939
|
+
function vt(e, t) {
|
|
921
940
|
let n = Array.from({ length: t }, () => ({
|
|
922
941
|
maxMagnitude: 0,
|
|
923
942
|
scaledTotal: 0
|
|
@@ -932,7 +951,7 @@ function lt(e, t) {
|
|
|
932
951
|
}
|
|
933
952
|
return n;
|
|
934
953
|
}
|
|
935
|
-
function
|
|
954
|
+
function yt(e, t, n, r) {
|
|
936
955
|
let i = e.series[t]?.values[n] ?? 0;
|
|
937
956
|
if (!Number.isFinite(i)) return 0;
|
|
938
957
|
if (!r) return i;
|
|
@@ -942,18 +961,18 @@ function ut(e, t, n, r) {
|
|
|
942
961
|
};
|
|
943
962
|
return a > 0 && o > 0 ? i / a / o * 100 : 0;
|
|
944
963
|
}
|
|
945
|
-
function
|
|
964
|
+
function bt(e, t) {
|
|
946
965
|
let n = e + t;
|
|
947
966
|
return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
|
|
948
967
|
}
|
|
949
|
-
function
|
|
968
|
+
function xt(e) {
|
|
950
969
|
let t = [];
|
|
951
970
|
for (let [n, r] of [
|
|
952
971
|
[e.threeD?.floor, "floor"],
|
|
953
972
|
[e.threeD?.sideWall, "wall"],
|
|
954
973
|
[e.threeD?.backWall, "wall"]
|
|
955
974
|
]) {
|
|
956
|
-
let i =
|
|
975
|
+
let i = A(e, n, r);
|
|
957
976
|
t.push({
|
|
958
977
|
fill: i.fill,
|
|
959
978
|
line: i.line
|
|
@@ -966,7 +985,7 @@ function dt(e) {
|
|
|
966
985
|
for (let i = 0; i < n.values.length; i++) {
|
|
967
986
|
let a = n.values[i];
|
|
968
987
|
if (a == null || !Number.isFinite(a) || Math.abs(a) <= 0) continue;
|
|
969
|
-
let o =
|
|
988
|
+
let o = Q(e, n, r.get(i), i, 0);
|
|
970
989
|
t.push({
|
|
971
990
|
fill: o.fill,
|
|
972
991
|
line: o.lineFill
|
|
@@ -974,7 +993,7 @@ function dt(e) {
|
|
|
974
993
|
}
|
|
975
994
|
}
|
|
976
995
|
} else if (e.chartType === "clusteredBar" || e.chartType === "clusteredBarH" || e.chartType.startsWith("stackedBar")) {
|
|
977
|
-
let n = e.chartType.startsWith("stacked"), r = e.chartType.endsWith("Pct"), i = n || e.dispBlanksAs === "zero", a = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, o = Math.max(1, e.categories.length, ...e.series.map((e) => Math.max(e.values.length, e.categories?.length ?? 0))), s = r ?
|
|
996
|
+
let n = e.chartType.startsWith("stacked"), r = e.chartType.endsWith("Pct"), i = n || e.dispBlanksAs === "zero", a = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, o = Math.max(1, e.categories.length, ...e.series.map((e) => Math.max(e.values.length, e.categories?.length ?? 0))), s = r ? vt(e, o) : void 0, c = (t, n) => {
|
|
978
997
|
if (t === n) return !1;
|
|
979
998
|
let r = Math.min(t, n), i = Math.max(t, n), o = e.valMin, s = e.valMax;
|
|
980
999
|
return o != null && Number.isFinite(o) && i <= o || s != null && Number.isFinite(s) && r >= s ? !1 : !a || i > 0;
|
|
@@ -984,9 +1003,9 @@ function dt(e) {
|
|
|
984
1003
|
for (let p = 0; p < o; p++) {
|
|
985
1004
|
let o = d.values[p];
|
|
986
1005
|
if (!(o != null && Number.isFinite(o) && (!a || o > 0) || o == null && i)) continue;
|
|
987
|
-
let m =
|
|
1006
|
+
let m = yt(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = bt(h, m);
|
|
988
1007
|
if (n && (m >= 0 ? l[p] = g : u[p] = g), !c(h, g)) continue;
|
|
989
|
-
let _ =
|
|
1008
|
+
let _ = Q(e, d, f.get(p), p, r);
|
|
990
1009
|
t.push({
|
|
991
1010
|
fill: _.fill,
|
|
992
1011
|
line: _.lineFill
|
|
@@ -994,11 +1013,11 @@ function dt(e) {
|
|
|
994
1013
|
}
|
|
995
1014
|
}
|
|
996
1015
|
} else {
|
|
997
|
-
let n = e.chartType.toLowerCase().includes("area"), r = e.chartType.startsWith("stacked"), i = e.chartType.endsWith("Pct"), a = r || e.dispBlanksAs === "zero", o = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, s = Math.max(e.categories.length, ...e.series.map((e) => Math.max(e.categories?.length ?? 0, e.values.length))), c = i ?
|
|
1016
|
+
let n = e.chartType.toLowerCase().includes("area"), r = e.chartType.startsWith("stacked"), i = e.chartType.endsWith("Pct"), a = r || e.dispBlanksAs === "zero", o = e.valAxisLogBase != null && Number.isFinite(e.valAxisLogBase) && e.valAxisLogBase >= 2, s = Math.max(e.categories.length, ...e.series.map((e) => Math.max(e.categories?.length ?? 0, e.values.length))), c = i ? vt(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
|
|
998
1017
|
if (r) {
|
|
999
1018
|
let t = Array(s).fill(0), n = Array(s).fill(0);
|
|
1000
1019
|
for (let r = 0; r < e.series.length; r++) for (let i = 0; i < s; i++) {
|
|
1001
|
-
let a =
|
|
1020
|
+
let a = yt(e, r, i, c), o = bt(a >= 0 ? t[i] : n[i], a);
|
|
1002
1021
|
l[r][i] = o, a >= 0 ? t[i] = o : n[i] = o;
|
|
1003
1022
|
}
|
|
1004
1023
|
}
|
|
@@ -1008,12 +1027,12 @@ function dt(e) {
|
|
|
1008
1027
|
let f = u.values[s];
|
|
1009
1028
|
if (f != null && Number.isFinite(f) && (!o || f > 0) || f == null && a) {
|
|
1010
1029
|
p++;
|
|
1011
|
-
let a = r ? l[i][s] :
|
|
1030
|
+
let a = r ? l[i][s] : yt(e, i, s, c), o = m == null ? a : Math.min(m, a), f = m == null ? a : Math.max(m, a), _ = e.valMin != null && Number.isFinite(e.valMin) && f <= e.valMin || e.valMax != null && Number.isFinite(e.valMax) && o >= e.valMax;
|
|
1012
1031
|
if (p >= 2 && (n || u.smooth === !0 || !_)) {
|
|
1013
1032
|
if (h = !0, n) break;
|
|
1014
1033
|
let r = d.get(s);
|
|
1015
|
-
if (
|
|
1016
|
-
let n =
|
|
1034
|
+
if (Ct(r)) {
|
|
1035
|
+
let n = Q(e, u, r, s, i);
|
|
1017
1036
|
t.push({
|
|
1018
1037
|
fill: void 0,
|
|
1019
1038
|
line: n.lineFill
|
|
@@ -1024,7 +1043,7 @@ function dt(e) {
|
|
|
1024
1043
|
} else (e.dispBlanksAs ?? "gap") === "gap" && (p = 0, m = null);
|
|
1025
1044
|
}
|
|
1026
1045
|
if (!h) continue;
|
|
1027
|
-
let _ =
|
|
1046
|
+
let _ = Q(e, u, void 0, i, i);
|
|
1028
1047
|
n ? t.push({
|
|
1029
1048
|
fill: _.fill,
|
|
1030
1049
|
line: _.lineFill
|
|
@@ -1034,9 +1053,9 @@ function dt(e) {
|
|
|
1034
1053
|
});
|
|
1035
1054
|
}
|
|
1036
1055
|
}
|
|
1037
|
-
return
|
|
1056
|
+
return _t(t, (e) => e.fill, (e) => e.line);
|
|
1038
1057
|
}
|
|
1039
|
-
function
|
|
1058
|
+
function St(e, t) {
|
|
1040
1059
|
return e?.fillType === "solid" ? {
|
|
1041
1060
|
color: `#${e.color}`,
|
|
1042
1061
|
fill: void 0
|
|
@@ -1045,52 +1064,44 @@ function ft(e, t) {
|
|
|
1045
1064
|
fill: e
|
|
1046
1065
|
};
|
|
1047
1066
|
}
|
|
1048
|
-
function
|
|
1049
|
-
let
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1067
|
+
function Q(e, n, r, i, a, o = !0) {
|
|
1068
|
+
let s = o && n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : gt(a, n), c = re(e, a) ? i : n.chartexFormatIdx ?? a, l = n.seriesType ?? e.chartType, u = l === "line" || l === "stackedLine" || l === "stackedLinePct", d = q(e, "dataPoint3D", a), f = W(e, "dataPoint3D"), p, m = s, h = Oe(e, n, r, i, a);
|
|
1069
|
+
h !== void 0 && ({color: m, fill: p} = St(h, m));
|
|
1070
|
+
let g, _ = null, v = O(r?.chartexStyle, f, i);
|
|
1071
|
+
if (v === void 0 && r?.lineHidden === !0 && (v = t(f)), v !== void 0) v?.fillType === "solid" ? _ = `#${v.color}` : g = v;
|
|
1072
|
+
else if (r?.lineColor) _ = `#${r.lineColor}`;
|
|
1053
1073
|
else {
|
|
1054
|
-
let
|
|
1055
|
-
if (
|
|
1074
|
+
let e = O(n.chartexStyle, f, c);
|
|
1075
|
+
if (e === void 0 && n.lineHidden === !0 && (e = t(f)), e !== void 0) e?.fillType === "solid" ? _ = `#${e.color}` : g = e;
|
|
1076
|
+
else if (n.lineColor) _ = `#${n.lineColor}`;
|
|
1077
|
+
else if (u) g = p === null ? null : p;
|
|
1056
1078
|
else {
|
|
1057
|
-
let
|
|
1058
|
-
|
|
1079
|
+
let e = K(d, f, c, r?.chartexStyle, n.chartexStyle);
|
|
1080
|
+
e !== void 0 && (e?.fillType === "solid" ? _ = `#${e.color}` : g = e);
|
|
1059
1081
|
}
|
|
1060
1082
|
}
|
|
1061
|
-
let
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
else {
|
|
1066
|
-
let e = s(n.chartexStyle, c);
|
|
1067
|
-
if (e !== void 0) e?.fillType === "solid" ? p = `#${e.color}` : f = e;
|
|
1068
|
-
else if (n.lineHidden === !0) f = null;
|
|
1069
|
-
else if (n.lineColor) p = `#${n.lineColor}`;
|
|
1070
|
-
else {
|
|
1071
|
-
let e = s(t.chartStyleRoles?.dataPoint3D, c);
|
|
1072
|
-
e !== void 0 && (e?.fillType === "solid" ? p = `#${e.color}` : f = e);
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
let h = t.chartStyleRoles?.dataPoint3D?.lineNoStyle === !0 ? void 0 : t.chartStyleRoles?.dataPoint3D, g = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? h?.lineCap, _ = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? h?.lineJoin;
|
|
1083
|
+
let y = u ? void 0 : d, b = r?.chartexStyle?.lineCap ?? n.chartexStyle?.lineCap ?? y?.lineCap, x = r?.chartexStyle?.lineJoin ?? n.chartexStyle?.lineJoin ?? y?.lineJoin, S = N(r?.lineDash == null ? r?.chartexStyle : {
|
|
1084
|
+
lineDash: r.lineDash,
|
|
1085
|
+
lineDashAuthored: !0
|
|
1086
|
+
}, n.chartexStyle, y);
|
|
1076
1087
|
return {
|
|
1077
|
-
color:
|
|
1078
|
-
fill:
|
|
1079
|
-
lineColor:
|
|
1080
|
-
lineFill:
|
|
1081
|
-
lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ??
|
|
1082
|
-
lineDash:
|
|
1083
|
-
lineCustomDash:
|
|
1084
|
-
lineCap:
|
|
1085
|
-
lineJoin:
|
|
1088
|
+
color: m,
|
|
1089
|
+
fill: p,
|
|
1090
|
+
lineColor: _,
|
|
1091
|
+
lineFill: g,
|
|
1092
|
+
lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? y?.lineWidthEmu,
|
|
1093
|
+
lineDash: S?.lineDash,
|
|
1094
|
+
lineCustomDash: S?.lineCustomDash,
|
|
1095
|
+
lineCap: b === "rnd" ? "round" : b === "sq" ? "square" : "butt",
|
|
1096
|
+
lineJoin: x === "round" || x === "bevel" ? x : "miter"
|
|
1086
1097
|
};
|
|
1087
1098
|
}
|
|
1088
|
-
function
|
|
1099
|
+
function Ct(e) {
|
|
1089
1100
|
if (!e) return !1;
|
|
1090
1101
|
let t = e.chartexStyle;
|
|
1091
1102
|
return e.lineHidden != null || e.lineColor != null || e.lineWidthEmu != null || e.lineDash != null || t?.linePaintAuthored === !0 || t?.lineHidden != null || t?.lineNoStyle === !0 || t?.lineColors?.some((e) => e != null) === !0 || t?.linePaints?.some((e) => e != null) === !0 || t?.lineWidthEmu != null || t?.lineDash != null || t?.lineCustomDash != null || t?.lineCap != null || t?.lineJoin != null;
|
|
1092
1103
|
}
|
|
1093
|
-
function
|
|
1104
|
+
function wt(e, t) {
|
|
1094
1105
|
let n = e.cameraNormal(t);
|
|
1095
1106
|
if (!n) return 1;
|
|
1096
1107
|
let r = {
|
|
@@ -1100,20 +1111,20 @@ function mt(e, t) {
|
|
|
1100
1111
|
}, 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);
|
|
1101
1112
|
return Math.max(.78, Math.min(1, .78 + .24 * a));
|
|
1102
1113
|
}
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1114
|
+
var Tt = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, $ = (e, t, n = "minor") => Tt((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
|
|
1115
|
+
function Et(e, t) {
|
|
1105
1116
|
if (t.length) {
|
|
1106
1117
|
e.beginPath(), e.moveTo(t[0].x, t[0].y);
|
|
1107
1118
|
for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
|
|
1108
1119
|
e.closePath();
|
|
1109
1120
|
}
|
|
1110
1121
|
}
|
|
1111
|
-
var
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1122
|
+
var Dt = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
|
|
1123
|
+
function Ot(e, t, n, r) {
|
|
1124
|
+
Dt(n) || (Et(e, t), e.fillStyle = n, e.fill(), r > 0 && (Et(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
|
|
1114
1125
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return
|
|
1126
|
+
function kt(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
1127
|
+
return Fe({
|
|
1117
1128
|
x0: t,
|
|
1118
1129
|
x1: n,
|
|
1119
1130
|
lower0: r,
|
|
@@ -1124,13 +1135,13 @@ function yt(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
|
1124
1135
|
farDepth: c,
|
|
1125
1136
|
capStart: u,
|
|
1126
1137
|
capEnd: d
|
|
1127
|
-
}).flatMap((t) =>
|
|
1138
|
+
}).flatMap((t) => jt(e, t, l).map((e) => ({
|
|
1128
1139
|
...e,
|
|
1129
1140
|
outline: !1,
|
|
1130
1141
|
outlineSegments: void 0
|
|
1131
1142
|
})));
|
|
1132
1143
|
}
|
|
1133
|
-
function
|
|
1144
|
+
function At(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
1134
1145
|
if (![
|
|
1135
1146
|
r,
|
|
1136
1147
|
i,
|
|
@@ -1141,7 +1152,7 @@ function bt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
|
1141
1152
|
l,
|
|
1142
1153
|
u
|
|
1143
1154
|
].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
|
|
1144
|
-
let v =
|
|
1155
|
+
let v = Ne({
|
|
1145
1156
|
shape: t,
|
|
1146
1157
|
horizontal: n,
|
|
1147
1158
|
crossStart: n ? i : r,
|
|
@@ -1155,9 +1166,9 @@ function bt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
|
1155
1166
|
omitBaseCap: m,
|
|
1156
1167
|
omitEndCap: h
|
|
1157
1168
|
});
|
|
1158
|
-
return v ?
|
|
1169
|
+
return v ? jt(e, v, d, g, _) : [];
|
|
1159
1170
|
}
|
|
1160
|
-
function
|
|
1171
|
+
function jt(e, t, n, r, i, a = !1) {
|
|
1161
1172
|
if (i?.exceeded) return [];
|
|
1162
1173
|
let o = t.faces.map((r) => {
|
|
1163
1174
|
let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
|
|
@@ -1179,7 +1190,7 @@ function xt(e, t, n, r, i, a = !1) {
|
|
|
1179
1190
|
facing: a,
|
|
1180
1191
|
face: {
|
|
1181
1192
|
points: o,
|
|
1182
|
-
color:
|
|
1193
|
+
color: Ce(n, wt(e, i)),
|
|
1183
1194
|
paintRole: "fill",
|
|
1184
1195
|
shade: 0,
|
|
1185
1196
|
cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
|
|
@@ -1216,11 +1227,11 @@ function xt(e, t, n, r, i, a = !1) {
|
|
|
1216
1227
|
let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
|
|
1217
1228
|
for (let [e, n] of t) l(e, n);
|
|
1218
1229
|
}
|
|
1219
|
-
let p =
|
|
1230
|
+
let p = st([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
|
|
1220
1231
|
if (!r) return s;
|
|
1221
1232
|
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));
|
|
1222
1233
|
for (let t of p.paths) {
|
|
1223
|
-
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 =
|
|
1234
|
+
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 = et(n.map((e, t) => ({
|
|
1224
1235
|
...e,
|
|
1225
1236
|
cameraDepth: a[t],
|
|
1226
1237
|
cameraWeight: o[t]
|
|
@@ -1250,7 +1261,7 @@ function xt(e, t, n, r, i, a = !1) {
|
|
|
1250
1261
|
}));
|
|
1251
1262
|
}
|
|
1252
1263
|
for (let t of p.junctions) {
|
|
1253
|
-
let n =
|
|
1264
|
+
let n = Qe({
|
|
1254
1265
|
...e.project(t.point.x, t.point.y, t.point.depth),
|
|
1255
1266
|
cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
|
|
1256
1267
|
cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
|
|
@@ -1279,7 +1290,7 @@ function xt(e, t, n, r, i, a = !1) {
|
|
|
1279
1290
|
}
|
|
1280
1291
|
return s;
|
|
1281
1292
|
}
|
|
1282
|
-
function
|
|
1293
|
+
function Mt(e, t, n, r, i, a, o) {
|
|
1283
1294
|
if (!t.length || o.exceeded) return [];
|
|
1284
1295
|
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) => ({
|
|
1285
1296
|
x: t.centerX + Math.cos(n) * r,
|
|
@@ -1291,7 +1302,7 @@ function St(e, t, n, r, i, a, o) {
|
|
|
1291
1302
|
depth: e.centerDepth
|
|
1292
1303
|
}), h = [], g = (t, n = !1) => {
|
|
1293
1304
|
if (t.length < 2 || o.exceeded) return;
|
|
1294
|
-
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 =
|
|
1305
|
+
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 = et((n && !s ? [...t, r] : [...t]).map((t) => ({
|
|
1295
1306
|
...e.project(t.x, t.y, t.depth),
|
|
1296
1307
|
cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
|
|
1297
1308
|
cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
|
|
@@ -1371,10 +1382,22 @@ function St(e, t, n, r, i, a, o) {
|
|
|
1371
1382
|
for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
|
|
1372
1383
|
return h;
|
|
1373
1384
|
}
|
|
1374
|
-
function
|
|
1375
|
-
t.paint !== null && (t.paint === void 0 ?
|
|
1385
|
+
function Nt(e, t) {
|
|
1386
|
+
t.paint !== null && (t.paint === void 0 ? Ot(e, t.points, t.color, t.shade) : (Et(e, t.points), e.fillStyle = t.paint, e.fill()), t.outline && (e.strokeStyle = t.outlineColor ?? "rgba(0,0,0,0.42)", e.lineWidth = t.outlineWidth ?? .75, e.setLineDash(ce(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (Et(e, t.points), e.stroke()), e.setLineDash([])));
|
|
1387
|
+
}
|
|
1388
|
+
function Pt(e, t) {
|
|
1389
|
+
let n = t.filter((e) => e.paint !== null && e.points.length >= 3);
|
|
1390
|
+
if (n.length) {
|
|
1391
|
+
e.beginPath();
|
|
1392
|
+
for (let t of n) {
|
|
1393
|
+
e.moveTo(t.points[0].x, t.points[0].y);
|
|
1394
|
+
for (let n = 1; n < t.points.length; n++) e.lineTo(t.points[n].x, t.points[n].y);
|
|
1395
|
+
e.closePath();
|
|
1396
|
+
}
|
|
1397
|
+
e.fillStyle = "#000000", e.fill();
|
|
1398
|
+
}
|
|
1376
1399
|
}
|
|
1377
|
-
function
|
|
1400
|
+
function Ft(e, t, n, r, i) {
|
|
1378
1401
|
if (r === void 0) return;
|
|
1379
1402
|
let a = t.filter((e) => e.paintRole === n);
|
|
1380
1403
|
if (!a.length) return;
|
|
@@ -1382,48 +1405,59 @@ function wt(e, t, n, r, i) {
|
|
|
1382
1405
|
for (let e of a) e.paint = null;
|
|
1383
1406
|
return;
|
|
1384
1407
|
}
|
|
1385
|
-
let o = a.flatMap((e) => e.points), s = Math.min(...o.map((e) => e.x)), c = Math.max(...o.map((e) => e.x)), l = Math.min(...o.map((e) => e.y)), u = Math.max(...o.map((e) => e.y)), d =
|
|
1408
|
+
let o = a.flatMap((e) => e.points), s = Math.min(...o.map((e) => e.x)), c = Math.max(...o.map((e) => e.x)), l = Math.min(...o.map((e) => e.y)), u = Math.max(...o.map((e) => e.y)), d = R(r, e, s, l, c - s, u - l, i);
|
|
1386
1409
|
for (let e of a) e.paint = d;
|
|
1387
1410
|
}
|
|
1388
|
-
function
|
|
1411
|
+
function It(e, t) {
|
|
1389
1412
|
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);
|
|
1390
1413
|
}
|
|
1391
|
-
function
|
|
1414
|
+
function Lt(e) {
|
|
1392
1415
|
let t = e.catAxisLabelRotation;
|
|
1393
1416
|
return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
|
|
1394
1417
|
}
|
|
1395
|
-
function
|
|
1418
|
+
function Rt(e, t, n, r, i, a = 1, o = 6) {
|
|
1396
1419
|
if (i || r === 0) {
|
|
1397
1420
|
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));
|
|
1398
1421
|
return;
|
|
1399
1422
|
}
|
|
1400
1423
|
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();
|
|
1401
1424
|
}
|
|
1402
|
-
function
|
|
1425
|
+
function zt(e, t, n, r, i, a, o, s = void 0, c = 0, l = ue, u = void 0, d = void 0, f = 0, p = f, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0) {
|
|
1403
1426
|
if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
|
|
1404
|
-
let
|
|
1405
|
-
|
|
1427
|
+
let y = r / 2;
|
|
1428
|
+
if (u !== void 0 || d !== void 0) {
|
|
1429
|
+
F(e, u, d, f, {
|
|
1430
|
+
x: t.x - y,
|
|
1431
|
+
y: t.y - y,
|
|
1432
|
+
w: r,
|
|
1433
|
+
h: r
|
|
1434
|
+
}, l, (e) => zt(e, t, n, r, i, a, o, s, c, l, void 0, void 0, 0, 0, m, h, g, _, v), p);
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1437
|
+
e.beginPath();
|
|
1438
|
+
let b = m === void 0 ? a : m == null ? null : m.fillType === "solid" ? `#${m.color}` : R(m, e, t.x - y, t.y - y, r, r, c);
|
|
1439
|
+
switch (b && (e.strokeStyle = b, e.lineWidth = o, e.setLineDash(ae(g, h, o)), e.lineCap = _ === "rnd" ? "round" : _ === "sq" ? "square" : "butt", e.lineJoin = v === "round" || v === "bevel" ? v : "miter"), n) {
|
|
1406
1440
|
case "square":
|
|
1407
|
-
e.rect(t.x -
|
|
1441
|
+
e.rect(t.x - y, t.y - y, r, r);
|
|
1408
1442
|
break;
|
|
1409
1443
|
case "diamond":
|
|
1410
|
-
e.moveTo(t.x, t.y -
|
|
1444
|
+
e.moveTo(t.x, t.y - y), e.lineTo(t.x + y, t.y), e.lineTo(t.x, t.y + y), e.lineTo(t.x - y, t.y), e.closePath();
|
|
1411
1445
|
break;
|
|
1412
1446
|
case "triangle":
|
|
1413
|
-
e.moveTo(t.x, t.y -
|
|
1447
|
+
e.moveTo(t.x, t.y - y), e.lineTo(t.x + y, t.y + y), e.lineTo(t.x - y, t.y + y), e.closePath();
|
|
1414
1448
|
break;
|
|
1415
1449
|
case "x":
|
|
1416
1450
|
case "plus": {
|
|
1417
1451
|
let r = n === "x";
|
|
1418
|
-
e.moveTo(t.x -
|
|
1452
|
+
e.moveTo(t.x - y, t.y + (r ? -y : 0)), e.lineTo(t.x + y, t.y + (r ? y : 0)), e.moveTo(t.x + (r ? -y : 0), t.y + y), e.lineTo(t.x + (r ? y : 0), t.y - y), b && e.stroke();
|
|
1419
1453
|
return;
|
|
1420
1454
|
}
|
|
1421
1455
|
case "dash":
|
|
1422
|
-
e.rect(t.x -
|
|
1456
|
+
e.rect(t.x - y, t.y - r * .1, r, r * .2);
|
|
1423
1457
|
break;
|
|
1424
1458
|
case "star":
|
|
1425
1459
|
for (let n = 0; n < 10; n++) {
|
|
1426
|
-
let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ?
|
|
1460
|
+
let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? y : y * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
|
|
1427
1461
|
n ? e.lineTo(a, o) : e.moveTo(a, o);
|
|
1428
1462
|
}
|
|
1429
1463
|
e.closePath();
|
|
@@ -1432,327 +1466,369 @@ function Ot(e, t, n, r, i, a, o, s = void 0, c = 0, l = H) {
|
|
|
1432
1466
|
e.ellipse(t.x, t.y, r * .25, r * .1, 0, 0, Math.PI * 2);
|
|
1433
1467
|
break;
|
|
1434
1468
|
case "picture":
|
|
1435
|
-
s?.fillType === "image" &&
|
|
1469
|
+
s?.fillType === "image" && Y(e, s, t.x - y, t.y - y, r, r, l, c), b && e.strokeRect(t.x - y, t.y - y, r, r);
|
|
1436
1470
|
return;
|
|
1437
1471
|
default:
|
|
1438
|
-
e.arc(t.x, t.y,
|
|
1472
|
+
e.arc(t.x, t.y, y, 0, Math.PI * 2);
|
|
1439
1473
|
break;
|
|
1440
1474
|
}
|
|
1441
|
-
let
|
|
1442
|
-
|
|
1443
|
-
}
|
|
1444
|
-
function
|
|
1445
|
-
let
|
|
1446
|
-
if (
|
|
1447
|
-
let
|
|
1448
|
-
customText:
|
|
1449
|
-
showCategory:
|
|
1450
|
-
showSeries:
|
|
1451
|
-
showValue:
|
|
1452
|
-
showPercent:
|
|
1453
|
-
category:
|
|
1454
|
-
seriesName:
|
|
1455
|
-
sourceValue:
|
|
1456
|
-
valueDivisor:
|
|
1457
|
-
percentRatio:
|
|
1458
|
-
formatCode:
|
|
1459
|
-
percentFormatCode:
|
|
1475
|
+
let x = s?.fillType === "image" ? s : void 0, S = x ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : R(s, e, t.x - y, t.y - y, r, r, c);
|
|
1476
|
+
S == null ? x && (e.save(), e.clip(), Y(e, x, t.x - y, t.y - y, r, r, l, c), e.restore()) : (e.fillStyle = S, e.fill()), b && e.stroke();
|
|
1477
|
+
}
|
|
1478
|
+
function Bt(e, t, n, r, a, o, s, c, l, u = 0, d, f, p = "t", m = s, h = !0, g, _, y = o, b = 0) {
|
|
1479
|
+
let x = f, S = n.seriesDataLabels;
|
|
1480
|
+
if (U(S, x) || t.showDataLabelsOverMax !== !0 && _ != null && Number.isFinite(_) && y > _) return;
|
|
1481
|
+
let w = x?.showVal ?? S?.showVal ?? t.showDataLabels, T = x?.showCatName ?? S?.showCatName ?? !1, E = x?.showSerName ?? S?.showSerName ?? !1, D = x?.showPercent ?? S?.showPercent ?? !1, O = x?.text, A = C({
|
|
1482
|
+
customText: O,
|
|
1483
|
+
showCategory: T,
|
|
1484
|
+
showSeries: E,
|
|
1485
|
+
showValue: w,
|
|
1486
|
+
showPercent: D,
|
|
1487
|
+
category: n.categories?.[a] ?? t.categories[a] ?? `${a + 1}`,
|
|
1488
|
+
seriesName: n.name || `Series ${r + 1}`,
|
|
1489
|
+
sourceValue: o,
|
|
1490
|
+
valueDivisor: g?.divisor,
|
|
1491
|
+
percentRatio: d != null && Number.isFinite(d) ? d : void 0,
|
|
1492
|
+
formatCode: x?.formatCode ?? S?.formatCode ?? t.dataLabelFormatCode ?? n.valFormatCode,
|
|
1493
|
+
percentFormatCode: x?.formatCode ?? S?.formatCode ?? t.dataLabelFormatCode ?? "0%",
|
|
1460
1494
|
date1904: t.date1904,
|
|
1461
|
-
separator:
|
|
1495
|
+
separator: x?.separator ?? S?.separator
|
|
1462
1496
|
});
|
|
1463
|
-
if (!
|
|
1464
|
-
let
|
|
1465
|
-
e.font = `${
|
|
1466
|
-
let
|
|
1467
|
-
runs:
|
|
1468
|
-
ptToPx:
|
|
1469
|
-
fontFamily:
|
|
1470
|
-
fallbackBold:
|
|
1471
|
-
fallbackItalic:
|
|
1472
|
-
fallbackBaseline:
|
|
1473
|
-
fallbackColorHidden:
|
|
1474
|
-
fontFamilyForFace: (e) =>
|
|
1475
|
-
},
|
|
1476
|
-
if (!
|
|
1477
|
-
let
|
|
1497
|
+
if (!A) return;
|
|
1498
|
+
let j = v(x?.fontSizeHpt ?? S?.fontSizeHpt ?? t.dataLabelFontSizeHpt, l) ?? 9 * l, N = x?.fontBold ?? S?.fontBold ?? t.dataLabelFontBold ?? !1, P = z(x, S), F = $(t, x?.fontFace ?? S?.fontFace ?? t.dataLabelFontFace);
|
|
1499
|
+
e.font = `${P.fontItalic ? "italic " : ""}${N ? "bold " : ""}${j}px ${F}`;
|
|
1500
|
+
let R = `#${x?.fontColor ?? S?.fontColor ?? n.labelColor ?? t.dataLabelFontColor ?? "111111"}`, B = O && x?.richRuns?.length ? ge(e, {
|
|
1501
|
+
runs: x.richRuns,
|
|
1502
|
+
ptToPx: l,
|
|
1503
|
+
fontFamily: F,
|
|
1504
|
+
fallbackBold: N,
|
|
1505
|
+
fallbackItalic: P.fontItalic,
|
|
1506
|
+
fallbackBaseline: P.fontBaseline,
|
|
1507
|
+
fallbackColorHidden: P.fontPaintAuthored === !0 && (P.fontHidden === !0 || P.fontColor == null),
|
|
1508
|
+
fontFamilyForFace: (e) => $(t, e)
|
|
1509
|
+
}, j, R) : null, V = B ? [] : L(A, Math.max(j, c.w * .45), Math.max(j * 1.2, c.h * .35), j * 1.2, (t) => e.measureText(t).width, P);
|
|
1510
|
+
if (!B && !V.length) return;
|
|
1511
|
+
let H = B?.width ?? Math.max(...V.map((t) => e.measureText(t).width)), ee = B?.height ?? V.length * j * 1.2, W = te(P, l), G = k(H + W.left + W.right, ee + W.top + W.bottom, P.textRotation, P.textVerticalMode), K = se({
|
|
1478
1512
|
kind: "point",
|
|
1479
|
-
x:
|
|
1480
|
-
y:
|
|
1481
|
-
position:
|
|
1482
|
-
markerGap:
|
|
1483
|
-
},
|
|
1484
|
-
w:
|
|
1485
|
-
h:
|
|
1486
|
-
},
|
|
1487
|
-
if (!
|
|
1488
|
-
let
|
|
1489
|
-
|
|
1490
|
-
let
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1513
|
+
x: s.x,
|
|
1514
|
+
y: s.y,
|
|
1515
|
+
position: x?.position ?? S?.position ?? t.dataLabelPosition ?? p,
|
|
1516
|
+
markerGap: u
|
|
1517
|
+
}, c, {
|
|
1518
|
+
w: G.w,
|
|
1519
|
+
h: G.h
|
|
1520
|
+
}, j, x?.manualLayout, c);
|
|
1521
|
+
if (!K) return;
|
|
1522
|
+
let q = le(x?.labelBox, S?.labelBox);
|
|
1523
|
+
S?.showLeaderLines && S.leaderLineHidden !== !0 && h && (e.beginPath(), e.moveTo(m.x, m.y), e.lineTo(Math.max(K.rect.x, Math.min(m.x, K.rect.x + K.rect.w)), Math.max(K.rect.y, Math.min(m.y, K.rect.y + K.rect.h))), e.strokeStyle = `#${S.leaderLineColor ?? "808080"}`, e.lineWidth = S.leaderLineWidthEmu == null ? .75 * l : Math.max(.25, S.leaderLineWidthEmu / X * l), e.setLineDash(ce(S.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), i(e, q, K.rect, l, b), e.save(), e.beginPath(), e.rect(K.clip.x, K.clip.y, K.clip.w, K.clip.h), e.clip();
|
|
1524
|
+
let J = I(P, K.textAlign), ne = M(K.x, K.y, K.rect, ee + W.top + W.bottom, P, x?.manualLayout != null, J, K.textAlign, H + W.left + W.right, G.radians), Y = ie(e, ne.x, ne.y, G.radians, J, K.textBaseline, W);
|
|
1525
|
+
if (B) {
|
|
1526
|
+
ye(e, B, Y.x, Y.y, J, K.textBaseline, x?.manualLayout ? Math.max(0, K.rect.w - W.left - W.right) : B.width), e.restore();
|
|
1493
1527
|
return;
|
|
1494
1528
|
}
|
|
1495
|
-
if (!(
|
|
1496
|
-
e.fillStyle =
|
|
1497
|
-
let t =
|
|
1498
|
-
|
|
1529
|
+
if (!(P.fontPaintAuthored === !0 && (P.fontHidden === !0 || P.fontColor == null))) {
|
|
1530
|
+
e.fillStyle = R, e.textAlign = J, e.textBaseline = "middle";
|
|
1531
|
+
let t = j * 1.2, n = (P.fontBaseline ?? 0) * j, r = Y.y - (V.length - 1) * t / 2 - n;
|
|
1532
|
+
V.forEach((n, i) => e.fillText(n, Y.x, r + i * t));
|
|
1499
1533
|
}
|
|
1500
1534
|
e.restore();
|
|
1501
1535
|
}
|
|
1502
|
-
function
|
|
1536
|
+
function Vt(e, t, n) {
|
|
1503
1537
|
let r = t.seriesDataLabels;
|
|
1504
|
-
return
|
|
1505
|
-
}
|
|
1506
|
-
function
|
|
1507
|
-
let
|
|
1508
|
-
if (
|
|
1509
|
-
e.font = `${
|
|
1510
|
-
let
|
|
1511
|
-
x:
|
|
1512
|
-
y:
|
|
1513
|
-
w:
|
|
1514
|
-
h: Math.max(1,
|
|
1515
|
-
}, a =
|
|
1516
|
-
...
|
|
1538
|
+
return U(r, n) ? !1 : n?.text ? !0 : (n?.showVal ?? r?.showVal ?? e.showDataLabels) || (n?.showCatName ?? r?.showCatName ?? !1) || (n?.showSerName ?? r?.showSerName ?? !1) || (n?.showPercent ?? r?.showPercent ?? !1);
|
|
1539
|
+
}
|
|
1540
|
+
function Ht(e, t, n, i, a, o) {
|
|
1541
|
+
let s = c(t, n.h, i);
|
|
1542
|
+
if (t.title) {
|
|
1543
|
+
e.font = `${t.titleFontBold === !1 ? "" : "bold "}${s.fontPx}px ${Tt(t.titleFontFace)}`, e.fillStyle = t.titleFontColor ? `#${t.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
|
|
1544
|
+
let r = e.measureText(t.title).width, i = {
|
|
1545
|
+
x: n.x + (n.w - r) / 2,
|
|
1546
|
+
y: n.y + s.topPad,
|
|
1547
|
+
w: r,
|
|
1548
|
+
h: Math.max(1, s.fontPx)
|
|
1549
|
+
}, a = t.titleManualLayout ? b({
|
|
1550
|
+
...t.titleManualLayout,
|
|
1517
1551
|
w: void 0,
|
|
1518
1552
|
h: void 0
|
|
1519
|
-
},
|
|
1520
|
-
e.fillText(
|
|
1553
|
+
}, n, i) : null;
|
|
1554
|
+
e.fillText(t.title, a ? a.x + a.w / 2 : n.x + n.w / 2, a?.y ?? i.y);
|
|
1521
1555
|
}
|
|
1522
|
-
let
|
|
1556
|
+
let u = ct(t);
|
|
1523
1557
|
e.save();
|
|
1524
|
-
let d = (
|
|
1558
|
+
let d = (t.chartType === "pie" ? t.series[0]?.categories?.length ? t.series[0].categories : t.categories : t.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => u.get(t)?.deleted === !0 ? [] : [{
|
|
1525
1559
|
label: e,
|
|
1526
1560
|
index: t
|
|
1527
|
-
}]),
|
|
1528
|
-
itemWidths:
|
|
1561
|
+
}]), f = d.map((e) => lt(t, u.get(e.index), i)), m = Math.max(0, ...f.map((e) => e.fontPx)), h = d.map((t, n) => (e.font = f[n].font, 7 * i + 4 + e.measureText(t.label).width)), _ = g(t, n.w, n.h, .23, {
|
|
1562
|
+
itemWidths: h,
|
|
1529
1563
|
rowHeight: Math.max(m * 1.45, 12),
|
|
1530
1564
|
itemGap: 12,
|
|
1531
1565
|
horizontalPadding: 8,
|
|
1532
1566
|
verticalPadding: 4
|
|
1533
1567
|
});
|
|
1534
1568
|
e.restore();
|
|
1535
|
-
let
|
|
1536
|
-
titleBand:
|
|
1569
|
+
let v = H(_, t.legendOverlay === !0), y = r(t, n.w, n.h, i), x = l(t.catAxisTitleTextVerticalInsetEmu, i), S = l(t.valAxisTitleTextVerticalInsetEmu, i), C = a === "horizontal" ? t.catAxisTitle ? y.catFontPx + x + oe(n.w) + 4 : 0 : a === "vertical" ? y.valBandW : 0, w = a === "horizontal" ? t.valAxisTitle ? y.valFontPx + S + oe(n.h) + 4 : 0 : a === "vertical" ? y.catBandH : 0, T = p(t, n.x, n.y, n.w, n.h, i, {
|
|
1570
|
+
titleBand: s,
|
|
1537
1571
|
legendSideReserveFrac: .23,
|
|
1538
|
-
legendReserve:
|
|
1572
|
+
legendReserve: _,
|
|
1539
1573
|
pad: {
|
|
1540
|
-
t:
|
|
1541
|
-
r:
|
|
1542
|
-
b:
|
|
1543
|
-
l:
|
|
1574
|
+
t: s.bandH + v.legTopH + n.h * .04,
|
|
1575
|
+
r: v.legRightW + n.w * .05,
|
|
1576
|
+
b: v.legBottomH + n.h * .19 + w,
|
|
1577
|
+
l: v.legLeftW + n.w * .13 + C
|
|
1544
1578
|
},
|
|
1545
1579
|
honorPlotAreaManualLayout: !0,
|
|
1546
1580
|
manualOuterInsets: {
|
|
1547
|
-
t:
|
|
1548
|
-
r:
|
|
1549
|
-
b:
|
|
1550
|
-
l:
|
|
1581
|
+
t: s.bandH,
|
|
1582
|
+
r: v.legRightW,
|
|
1583
|
+
b: v.legBottomH + w,
|
|
1584
|
+
l: v.legLeftW + C
|
|
1551
1585
|
}
|
|
1552
|
-
}),
|
|
1553
|
-
x:
|
|
1554
|
-
y:
|
|
1555
|
-
w: Math.max(1,
|
|
1556
|
-
h: Math.max(1,
|
|
1586
|
+
}), E = {
|
|
1587
|
+
x: T.plotRect.px0,
|
|
1588
|
+
y: T.plotRect.py0,
|
|
1589
|
+
w: Math.max(1, T.plotRect.pw),
|
|
1590
|
+
h: Math.max(1, T.plotRect.ph)
|
|
1557
1591
|
};
|
|
1558
|
-
|
|
1559
|
-
let
|
|
1560
|
-
x:
|
|
1561
|
-
y:
|
|
1562
|
-
w:
|
|
1563
|
-
h:
|
|
1564
|
-
} :
|
|
1565
|
-
x:
|
|
1566
|
-
y:
|
|
1567
|
-
w:
|
|
1568
|
-
h:
|
|
1569
|
-
} :
|
|
1570
|
-
x:
|
|
1571
|
-
y:
|
|
1572
|
-
w: Math.max(1,
|
|
1573
|
-
h:
|
|
1592
|
+
J(e, t, E.x, E.y, E.w, E.h, i, o);
|
|
1593
|
+
let D = _ ? _.side === "r" ? {
|
|
1594
|
+
x: n.x + n.w - _.reserveW,
|
|
1595
|
+
y: E.y,
|
|
1596
|
+
w: _.reserveW,
|
|
1597
|
+
h: E.h
|
|
1598
|
+
} : _.side === "l" ? {
|
|
1599
|
+
x: n.x,
|
|
1600
|
+
y: E.y,
|
|
1601
|
+
w: _.reserveW,
|
|
1602
|
+
h: E.h
|
|
1603
|
+
} : _.side === "t" ? {
|
|
1604
|
+
x: n.x + 4,
|
|
1605
|
+
y: n.y + s.bandH,
|
|
1606
|
+
w: Math.max(1, n.w - 8),
|
|
1607
|
+
h: _.reserveH
|
|
1574
1608
|
} : {
|
|
1575
|
-
x:
|
|
1576
|
-
y:
|
|
1577
|
-
w: Math.max(1,
|
|
1578
|
-
h:
|
|
1609
|
+
x: n.x + 4,
|
|
1610
|
+
y: n.y + n.h - _.reserveH,
|
|
1611
|
+
w: Math.max(1, n.w - 8),
|
|
1612
|
+
h: _.reserveH
|
|
1579
1613
|
} : null;
|
|
1580
1614
|
return {
|
|
1581
|
-
plot:
|
|
1582
|
-
legend: (
|
|
1615
|
+
plot: E,
|
|
1616
|
+
legend: (D && t.legendManualLayout ? b(t.legendManualLayout, n, D) : null) ?? D,
|
|
1583
1617
|
legendMeasure: {
|
|
1584
1618
|
labels: d.map((e) => e.label),
|
|
1585
|
-
styles:
|
|
1586
|
-
itemWidths:
|
|
1619
|
+
styles: f,
|
|
1620
|
+
itemWidths: h
|
|
1587
1621
|
}
|
|
1588
1622
|
};
|
|
1589
1623
|
}
|
|
1590
|
-
function
|
|
1624
|
+
function Ut(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
|
|
1591
1625
|
e.save(), e.font = `${l ? "italic " : ""}${c ? "bold " : ""}${a}px ${o}`, e.fillStyle = s ? `#${s}` : "#555";
|
|
1592
|
-
let
|
|
1593
|
-
if (
|
|
1594
|
-
let t = e.measureText(
|
|
1626
|
+
let m = f ? t : me(e, t, p), h = x(i, u, d), g = r;
|
|
1627
|
+
if (f) {
|
|
1628
|
+
let t = e.measureText(m).width, i = Math.abs(Math.cos(h)), o = Math.abs(Math.sin(h)), s = {
|
|
1595
1629
|
x: r.x - (t * i + a * o) / 2,
|
|
1596
1630
|
y: r.y - (t * o + a * i) / 2,
|
|
1597
1631
|
w: t * i + a * o,
|
|
1598
1632
|
h: t * o + a * i
|
|
1599
|
-
}, c =
|
|
1600
|
-
...
|
|
1633
|
+
}, c = b({
|
|
1634
|
+
...f,
|
|
1601
1635
|
w: void 0,
|
|
1602
1636
|
h: void 0
|
|
1603
1637
|
}, n, s);
|
|
1604
|
-
c && (
|
|
1638
|
+
c && (g = {
|
|
1605
1639
|
x: c.x + c.w / 2,
|
|
1606
1640
|
y: c.y + c.h / 2
|
|
1607
1641
|
});
|
|
1608
1642
|
}
|
|
1609
|
-
e.translate(
|
|
1643
|
+
e.translate(g.x, g.y), h && e.rotate(h), e.textAlign = "center", e.textBaseline = "middle", e.fillText(m, 0, 0), e.restore();
|
|
1610
1644
|
}
|
|
1611
|
-
function
|
|
1645
|
+
function Wt(e, t, n, r, i, a) {
|
|
1612
1646
|
if (t.valAxisTitle) {
|
|
1613
|
-
let
|
|
1614
|
-
|
|
1647
|
+
let s = o(t.valAxisTitleFontSizeHpt, a), c = i ? "horizontal" : "left";
|
|
1648
|
+
Ut(e, t.valAxisTitle, n, i ? {
|
|
1615
1649
|
x: r.x + r.w / 2,
|
|
1616
|
-
y: r.y + r.h +
|
|
1650
|
+
y: r.y + r.h + oe(n.h) + s / 2
|
|
1617
1651
|
} : {
|
|
1618
|
-
x: r.x -
|
|
1652
|
+
x: r.x - oe(n.w) - s / 2,
|
|
1619
1653
|
y: r.y + r.h / 2
|
|
1620
|
-
},
|
|
1654
|
+
}, c, s, $(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
|
|
1621
1655
|
}
|
|
1622
1656
|
if (t.catAxisTitle) {
|
|
1623
|
-
let
|
|
1624
|
-
|
|
1625
|
-
x: r.x -
|
|
1657
|
+
let s = o(t.catAxisTitleFontSizeHpt, a), c = i ? "left" : "horizontal";
|
|
1658
|
+
Ut(e, t.catAxisTitle, n, i ? {
|
|
1659
|
+
x: r.x - oe(n.w) - s / 2,
|
|
1626
1660
|
y: r.y + r.h / 2
|
|
1627
1661
|
} : {
|
|
1628
1662
|
x: r.x + r.w / 2,
|
|
1629
|
-
y: r.y + r.h +
|
|
1630
|
-
},
|
|
1663
|
+
y: r.y + r.h + oe(n.h) + s / 2
|
|
1664
|
+
}, c, s, $(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
|
|
1631
1665
|
}
|
|
1632
1666
|
}
|
|
1633
|
-
function
|
|
1667
|
+
function Gt(e, t, n, r, i, a, s, c, l, u, d) {
|
|
1634
1668
|
let f = t.threeD?.seriesAxis;
|
|
1635
1669
|
if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
|
|
1636
|
-
let p =
|
|
1637
|
-
if (!(
|
|
1638
|
-
let
|
|
1639
|
-
x: (
|
|
1640
|
-
y: (
|
|
1641
|
-
},
|
|
1642
|
-
x: -
|
|
1643
|
-
y:
|
|
1644
|
-
},
|
|
1645
|
-
x: (_.x +
|
|
1646
|
-
y: (_.y +
|
|
1670
|
+
let p = dn(t, r, i, a, s, c, l), m = Qt(r), h = l === "vertical" ? m.seriesAxisX : p.axisX, g = l === "horizontal" ? m.floorY === r.front.y ? r.front.y + r.front.h : r.front.y : m.floorY, _ = r.project(h, g, r.topology.nearDepth), y = r.project(h, g, r.topology.farDepth), b = Math.hypot(y.x - _.x, y.y - _.y);
|
|
1671
|
+
if (!(b > 1e-6)) return;
|
|
1672
|
+
let x = {
|
|
1673
|
+
x: (y.x - _.x) / b,
|
|
1674
|
+
y: (y.y - _.y) / b
|
|
1675
|
+
}, S = {
|
|
1676
|
+
x: -x.y,
|
|
1677
|
+
y: x.x
|
|
1678
|
+
}, C = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), w = {
|
|
1679
|
+
x: (_.x + y.x) / 2,
|
|
1680
|
+
y: (_.y + y.y) / 2
|
|
1647
1681
|
};
|
|
1648
|
-
(
|
|
1649
|
-
x: -
|
|
1650
|
-
y: -
|
|
1651
|
-
}), (f.tickLabelPos === "low" &&
|
|
1652
|
-
x: -
|
|
1653
|
-
y: -
|
|
1654
|
-
}), f.lineHidden || (
|
|
1655
|
-
let
|
|
1656
|
-
if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${
|
|
1657
|
-
|
|
1682
|
+
(w.x - C.x) * S.x + (w.y - C.y) * S.y < 0 && (S = {
|
|
1683
|
+
x: -S.x,
|
|
1684
|
+
y: -S.y
|
|
1685
|
+
}), (f.tickLabelPos === "low" && S.y < 0 || f.tickLabelPos === "high" && S.y > 0) && (S = {
|
|
1686
|
+
x: -S.x,
|
|
1687
|
+
y: -S.y
|
|
1688
|
+
}), f.lineHidden || (nn(e, en(f.lineColor, f.lineWidthEmu, f.lineDash, d)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(y.x, y.y), e.stroke());
|
|
1689
|
+
let T = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), E = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), D = f.majorTickMark ?? "out", O = v(f.fontSizeHpt, d) ?? 9 * d;
|
|
1690
|
+
if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${O}px ${$(t, f.fontFace)}`, e.fillStyle = f.fontColor ? `#${f.fontColor}` : "#595959", e.textAlign = Math.abs(S.x) < .2 ? "center" : S.x < 0 ? "right" : "left", e.textBaseline = Math.abs(S.y) < .2 ? "middle" : S.y < 0 ? "bottom" : "top", u && !f.lineHidden && D !== "none") {
|
|
1691
|
+
nn(e, tn(f.lineColor, f.lineWidthEmu, f.lineDash, d));
|
|
1658
1692
|
let n = t.series.length;
|
|
1659
|
-
for (let t = 0; t <= n; t +=
|
|
1660
|
-
let i = t / n, a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a), s = 6 * d, c =
|
|
1661
|
-
e.beginPath(), e.moveTo(o.x +
|
|
1693
|
+
for (let t = 0; t <= n; t += T) {
|
|
1694
|
+
let i = t / n, a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a), s = 6 * d, c = D === "cross" ? s / 2 : D === "out" ? s : 0, l = D === "cross" ? s / 2 : D === "in" ? s : 0;
|
|
1695
|
+
e.beginPath(), e.moveTo(o.x + S.x * c, o.y + S.y * c), e.lineTo(o.x - S.x * l, o.y - S.y * l), e.stroke();
|
|
1662
1696
|
}
|
|
1663
1697
|
}
|
|
1664
1698
|
for (let n = 0; n < t.series.length; n++) {
|
|
1665
1699
|
let i = r.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a);
|
|
1666
|
-
if (!u && !f.lineHidden && n %
|
|
1667
|
-
let t = 6 * d, n =
|
|
1668
|
-
e.beginPath(), e.moveTo(o.x +
|
|
1700
|
+
if (!u && !f.lineHidden && n % T === 0 && D !== "none") {
|
|
1701
|
+
let t = 6 * d, n = D === "cross" ? t / 2 : D === "out" ? t : 0, r = D === "cross" ? t / 2 : D === "in" ? t : 0;
|
|
1702
|
+
e.beginPath(), e.moveTo(o.x + S.x * n, o.y + S.y * n), e.lineTo(o.x - S.x * r, o.y - S.y * r), e.stroke();
|
|
1669
1703
|
}
|
|
1670
|
-
f.tickLabelPos !== "none" && n %
|
|
1704
|
+
f.tickLabelPos !== "none" && n % E === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + S.x * (6 * d + 3), o.y + S.y * (6 * d + 3));
|
|
1671
1705
|
}
|
|
1672
1706
|
if (e.setLineDash([]), f.title) {
|
|
1673
|
-
let i =
|
|
1674
|
-
|
|
1675
|
-
x:
|
|
1676
|
-
y:
|
|
1677
|
-
}, "horizontal", i,
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
function
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1707
|
+
let i = o(f.titleFontSizeHpt, d);
|
|
1708
|
+
Ut(e, f.title, n, {
|
|
1709
|
+
x: w.x + S.x * (O + i + 12),
|
|
1710
|
+
y: w.y + S.y * (O + i + 12)
|
|
1711
|
+
}, "horizontal", i, $(t, f.titleFontFace, "major"), f.titleFontColor, f.titleFontBold ?? !0, f.titleFontItalic ?? !1, f.titleRotation, f.titleVerticalMode, f.titleManualLayout, Math.max(r.front.w, r.front.h));
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
function Kt(t, n, r, i, a, o, s) {
|
|
1715
|
+
let c = q(t, "dataPointMarker", a), l = W(t, "dataPointMarker"), u = n.chartexFormatIdx ?? a, d = E(r?.markerStyle, l, i), f = E(n.markerStyle, l, u), p = d !== void 0 || r?.markerFillPaint !== void 0 || r?.markerFill != null || r?.color != null || r?.markerFillPaintAuthored === !0 && r.markerStyle?.fillHidden !== !0, m = f !== void 0 || n.markerFillPaint !== void 0 || n.markerFill != null || n.markerFillPaintAuthored === !0 && n.markerStyle?.fillHidden !== !0, h = P(c, l, u), g = p ? d ?? r?.markerFillPaint : m ? f ?? n.markerFillPaint : h, _ = G(n, r, i, o), v = g;
|
|
1716
|
+
g?.fillType === "solid" ? (_ = g.color, v = void 0) : g === null && (_ = "00000000");
|
|
1717
|
+
let y = O(r?.markerStyle, l, i), b = O(n.markerStyle, l, u), x = y !== void 0 || r?.markerLine != null || r?.markerLinePaintAuthored === !0 && r.markerStyle?.lineHidden !== !0, S = b !== void 0 || n.markerLine != null || n.markerLinePaintAuthored === !0 && n.markerStyle?.lineHidden !== !0, C = V(c, u), w = x ? y ?? (r?.markerLinePaintAuthored === !0 ? null : void 0) : S ? b ?? (n.markerLinePaintAuthored === !0 ? null : void 0) : C, T = r?.markerLine ?? n.markerLine ?? n.lineColor ?? o, D = w;
|
|
1718
|
+
w?.fillType === "solid" ? (T = w.color, D = void 0) : w === null && (T = "00000000");
|
|
1719
|
+
let k = r?.markerStyle ?? n.markerStyle ?? c, A = N(r?.markerStyle, n.markerStyle, c);
|
|
1720
|
+
return {
|
|
1721
|
+
fill: _,
|
|
1722
|
+
fillPaint: v,
|
|
1723
|
+
line: T,
|
|
1724
|
+
linePaint: D,
|
|
1725
|
+
lineWidth: (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? k?.lineWidthEmu) == null ? Math.max(.75, s) : Math.max(.25, (r?.markerLineWidthEmu ?? n.markerLineWidthEmu ?? k?.lineWidthEmu ?? 0) / X * s),
|
|
1726
|
+
lineDash: A?.lineDash,
|
|
1727
|
+
lineCustomDash: A?.lineCustomDash,
|
|
1728
|
+
lineCap: k?.lineCap,
|
|
1729
|
+
lineJoin: k?.lineJoin,
|
|
1730
|
+
effectDirect: e(r?.markerStyle, r?.chartexStyle, n.markerStyle),
|
|
1731
|
+
effectFallback: c,
|
|
1732
|
+
effectIndex: r?.markerStyle || r?.chartexStyle ? i : u,
|
|
1733
|
+
effectFallbackIndex: u
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
function qt(t, n, r, i, a, o, s, c, l, u, d, f) {
|
|
1737
|
+
let p = Q(n, r, i, a, o, f), m = De(n, r, a, o), h = {
|
|
1738
|
+
x: s,
|
|
1739
|
+
y: c - l / 2,
|
|
1740
|
+
w: l,
|
|
1741
|
+
h: l
|
|
1742
|
+
}, g = (e) => {
|
|
1743
|
+
if (p.fill !== null) {
|
|
1744
|
+
let t = p.fill === void 0 ? p.color : p.fill.fillType === "image" ? null : R(p.fill, e, h.x, h.y, h.w, h.h, d);
|
|
1745
|
+
t && (e.fillStyle = t, e.fillRect(h.x, h.y, h.w, h.h));
|
|
1746
|
+
}
|
|
1747
|
+
let t = p.lineFill === void 0 ? p.lineColor : p.lineFill == null || p.lineFill.fillType === "image" ? null : R(p.lineFill, e, h.x, h.y, h.w, h.h, d);
|
|
1748
|
+
t && (e.strokeStyle = t, e.lineWidth = p.lineWidthEmu == null ? .75 * u : Math.max(.25, p.lineWidthEmu / X * u), e.setLineDash(ae(p.lineCustomDash, p.lineDash, e.lineWidth)), e.lineCap = p.lineCap, e.lineJoin = p.lineJoin, e.strokeRect(h.x, h.y, h.w, h.h), e.setLineDash([]));
|
|
1749
|
+
}, _ = e(i?.chartexStyle, r.chartexStyle);
|
|
1750
|
+
F(t, _, q(n, "dataPoint3D", o), _ === i?.chartexStyle ? a : m, h, u, g, m);
|
|
1751
|
+
}
|
|
1752
|
+
function Jt(t, n, r, i, a, o, s, c, l, u) {
|
|
1753
|
+
let d = Q(n, r, void 0, i, i, !1), f = d.lineFill === void 0 ? d.lineColor == null ? d.fill : {
|
|
1754
|
+
fillType: "solid",
|
|
1755
|
+
color: d.lineColor.replace(/^#/, "")
|
|
1756
|
+
} : d.lineFill;
|
|
1757
|
+
if (f !== null) {
|
|
1758
|
+
let a = d.lineWidthEmu == null ? Math.max(1, 2 * l) : Math.max(.5, d.lineWidthEmu / X * l), p = {
|
|
1759
|
+
x: o,
|
|
1760
|
+
y: s - a / 2,
|
|
1761
|
+
w: c,
|
|
1762
|
+
h: a
|
|
1763
|
+
}, m = f === void 0 ? d.color : f.fillType === "image" ? null : f.fillType === "solid" ? `#${f.color}` : R(f, t, o, s - a / 2, c, a, u);
|
|
1764
|
+
if (m) {
|
|
1765
|
+
let h = (e) => {
|
|
1766
|
+
e.beginPath(), e.moveTo(o, s), e.lineTo(o + c, s), e.strokeStyle = e === t ? m : f === void 0 ? d.color : f.fillType === "image" ? "rgba(0,0,0,0)" : f.fillType === "solid" ? `#${f.color}` : R(f, e, o, s - a / 2, c, a, u) ?? "rgba(0,0,0,0)", e.lineWidth = a, e.setLineDash(ae(d.lineCustomDash, d.lineDash, a)), e.stroke(), e.setLineDash([]);
|
|
1767
|
+
}, g = De(n, r, i, i);
|
|
1768
|
+
F(t, e(r.chartexStyle), q(n, "dataPoint3D", i), g, p, l, h, g);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
if (r.showMarker !== !0 || r.markerSymbol === "none") return;
|
|
1772
|
+
let p = r.markerSymbol ?? "circle", m = Kt(n, r, void 0, i, i, a.replace(/^#/, ""), l);
|
|
1773
|
+
zt(t, {
|
|
1774
|
+
x: o + c / 2,
|
|
1775
|
+
y: s
|
|
1776
|
+
}, p, Math.min(c, Math.max(2, (r.markerSize ?? 5) * l)), m.fill === "00000000" ? "transparent" : `#${m.fill.replace(/^#/, "")}`, m.line === "00000000" ? "rgba(0,0,0,0)" : `#${m.line.replace(/^#/, "")}`, m.lineWidth, m.fillPaint, u, l, m.effectDirect, m.effectFallback, m.effectIndex, m.effectFallbackIndex, m.linePaint, m.lineDash, m.lineCustomDash, m.lineCap, m.lineJoin);
|
|
1777
|
+
}
|
|
1778
|
+
function Yt(e, t, n, r, i = !1, a, o = 0) {
|
|
1693
1779
|
if (!n) return;
|
|
1694
|
-
|
|
1695
|
-
let
|
|
1780
|
+
ee(e, t, n, r, o);
|
|
1781
|
+
let s = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), c = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
|
|
1696
1782
|
let r = t.series[0]?.dataPointColors?.[n];
|
|
1697
1783
|
return {
|
|
1698
1784
|
label: e,
|
|
1699
|
-
color: r === "00000000" ? "transparent" : r ? `#${r}` :
|
|
1785
|
+
color: r === "00000000" ? "transparent" : r ? `#${r}` : gt(n),
|
|
1700
1786
|
series: t.series[0],
|
|
1701
|
-
point:
|
|
1702
|
-
sourceIndex: n
|
|
1787
|
+
point: s.get(n),
|
|
1788
|
+
sourceIndex: n,
|
|
1789
|
+
seriesIndex: 0
|
|
1703
1790
|
};
|
|
1704
1791
|
}) : t.series.map((e, t) => ({
|
|
1705
1792
|
label: e.name || `Series ${t + 1}`,
|
|
1706
|
-
color:
|
|
1793
|
+
color: gt(t, e),
|
|
1707
1794
|
series: e,
|
|
1708
1795
|
point: void 0,
|
|
1709
|
-
sourceIndex: t
|
|
1710
|
-
|
|
1796
|
+
sourceIndex: t,
|
|
1797
|
+
seriesIndex: t
|
|
1798
|
+
})), l = ct(t), u = c.filter((e) => l.get(e.sourceIndex)?.deleted !== !0), d = a != null && a.labels.length === u.length && a.labels.every((e, t) => e === u[t].label), f = d ? a.styles : u.map((e) => lt(t, l.get(e.sourceIndex), r));
|
|
1711
1799
|
e.textAlign = "left", e.textBaseline = "middle";
|
|
1712
|
-
let
|
|
1800
|
+
let p = Math.max(Math.max(0, ...f.map((e) => e.fontPx)) * 1.45, 12), m = Math.min(7 * r, p * .7);
|
|
1713
1801
|
if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
|
|
1714
|
-
let
|
|
1715
|
-
for (let a of
|
|
1716
|
-
let
|
|
1802
|
+
let s = d ? a.itemWidths : u.map((t, n) => (e.font = f[n].font, m + 4 + e.measureText(t.label).width)), c = h(s, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / p))), l = n.y + 2 + p / 2;
|
|
1803
|
+
for (let a of c) {
|
|
1804
|
+
let c = a.map((e) => Math.min(n.w, s[e])), d = c.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, h = n.x + Math.max(4, (n.w - d) / 2);
|
|
1717
1805
|
for (let n = 0; n < a.length; n++) {
|
|
1718
|
-
let
|
|
1719
|
-
e.font =
|
|
1720
|
-
let
|
|
1721
|
-
|
|
1722
|
-
else {
|
|
1723
|
-
l.color !== "transparent" && (e.fillStyle = l.color, e.fillRect(f, u - g / 2, g, g));
|
|
1724
|
-
let t = l.point?.lineHidden ?? l.series?.lineHidden, n = l.point?.lineColor ?? l.series?.lineColor;
|
|
1725
|
-
t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (l.point?.lineWidthEmu ?? l.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (l.point?.lineWidthEmu ?? l.series?.lineWidthEmu ?? 0) / U * r), e.setLineDash(B(l.point?.lineDash ?? l.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(f, u - g / 2, g, g), e.setLineDash([]));
|
|
1726
|
-
}
|
|
1727
|
-
e.fillStyle = m.color, e.fillText(K(e, l.label, h), f + g + 4, u), f += o[n] + 12;
|
|
1806
|
+
let s = a[n], d = u[s], p = f[s];
|
|
1807
|
+
e.font = p.font;
|
|
1808
|
+
let g = Math.max(0, c[n] - m - 4);
|
|
1809
|
+
!i && t.chartType.toLowerCase().includes("line") && d.series ? Jt(e, t, d.series, d.seriesIndex, d.color, h, l, m, r, o) : d.series && qt(e, t, d.series, d.point, d.sourceIndex, d.seriesIndex, h, l, m, r, o, i), e.fillStyle = p.color, e.fillText(me(e, d.label, g), h + m + 4, l), h += c[n] + 12;
|
|
1728
1810
|
}
|
|
1729
|
-
|
|
1811
|
+
l += p;
|
|
1730
1812
|
}
|
|
1731
1813
|
return;
|
|
1732
1814
|
}
|
|
1733
|
-
let
|
|
1734
|
-
for (let a = 0; a <
|
|
1735
|
-
let
|
|
1815
|
+
let g = n.y;
|
|
1816
|
+
for (let a = 0; a < u.length; a++) {
|
|
1817
|
+
let s = u[a], c = f[a];
|
|
1736
1818
|
e.font = c.font;
|
|
1737
|
-
let l = n.x + 8 +
|
|
1738
|
-
if (
|
|
1739
|
-
let
|
|
1740
|
-
if (
|
|
1741
|
-
let
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
let t = o.point?.lineHidden ?? o.series?.lineHidden, i = o.point?.lineColor ?? o.series?.lineColor;
|
|
1746
|
-
t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu) == null ? .75 * r : Math.max(.25, (o.point?.lineWidthEmu ?? o.series?.lineWidthEmu ?? 0) / U * r), e.setLineDash(B(o.point?.lineDash ?? o.series?.chartexStyle?.lineDash ?? "solid", e.lineWidth)), e.strokeRect(n.x + 4, b - g / 2, g, g), e.setLineDash([]));
|
|
1747
|
-
}
|
|
1748
|
-
e.fillStyle = c.color;
|
|
1749
|
-
let x = b - (v.length - 1) * f / 2;
|
|
1750
|
-
v.forEach((t, n) => e.fillText(t, l, x + n * f)), _ += y;
|
|
1819
|
+
let l = n.x + 8 + m, d = Math.max(0, n.x + n.w - 4 - l), h = Math.max(c.fontPx * 1.2, 10), _ = j(s.label, d, h * (i ? 1 : 2), h, (t) => e.measureText(t).width);
|
|
1820
|
+
if (_.length === 0) continue;
|
|
1821
|
+
let v = Math.max(p, _.length * h + 2);
|
|
1822
|
+
if (g + v > n.y + n.h + 1e-6) break;
|
|
1823
|
+
let y = g + v / 2;
|
|
1824
|
+
!i && t.chartType.toLowerCase().includes("line") && s.series ? Jt(e, t, s.series, s.seriesIndex, s.color, n.x + 4, y, m, r, o) : s.series && qt(e, t, s.series, s.point, s.sourceIndex, s.seriesIndex, n.x + 4, y, m, r, o, i), e.fillStyle = c.color;
|
|
1825
|
+
let b = y - (_.length - 1) * h / 2;
|
|
1826
|
+
_.forEach((t, n) => e.fillText(t, l, b + n * h)), g += v;
|
|
1751
1827
|
}
|
|
1752
1828
|
}
|
|
1753
|
-
function
|
|
1829
|
+
function Xt(e, t, n, r, i, a) {
|
|
1754
1830
|
let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
|
|
1755
|
-
return
|
|
1831
|
+
return we({
|
|
1756
1832
|
dataMin: t,
|
|
1757
1833
|
dataMax: n,
|
|
1758
1834
|
explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
|
|
@@ -1766,7 +1842,7 @@ function Lt(e, t, n, r, i, a) {
|
|
|
1766
1842
|
needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
|
|
1767
1843
|
});
|
|
1768
1844
|
}
|
|
1769
|
-
function
|
|
1845
|
+
function Zt(e, t, n) {
|
|
1770
1846
|
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;
|
|
1771
1847
|
return {
|
|
1772
1848
|
start: Math.min(o, s),
|
|
@@ -1775,7 +1851,7 @@ function Rt(e, t, n) {
|
|
|
1775
1851
|
leading: o
|
|
1776
1852
|
};
|
|
1777
1853
|
}
|
|
1778
|
-
function
|
|
1854
|
+
function Qt(e) {
|
|
1779
1855
|
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);
|
|
1780
1856
|
return {
|
|
1781
1857
|
floor: [
|
|
@@ -1804,42 +1880,42 @@ function zt(e) {
|
|
|
1804
1880
|
farDepth: l
|
|
1805
1881
|
};
|
|
1806
1882
|
}
|
|
1807
|
-
function
|
|
1808
|
-
let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t /
|
|
1883
|
+
function $t(e, t, n, r, i = "A6A6A6", a = .75) {
|
|
1884
|
+
let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / X * r) : a * r;
|
|
1809
1885
|
return {
|
|
1810
1886
|
color: `#${e ?? i}`,
|
|
1811
1887
|
width: o,
|
|
1812
|
-
dash:
|
|
1888
|
+
dash: ce(n ?? "solid", o)
|
|
1813
1889
|
};
|
|
1814
1890
|
}
|
|
1815
|
-
function
|
|
1816
|
-
let i =
|
|
1891
|
+
function en(e, t, n, r) {
|
|
1892
|
+
let i = $t(e, t, n, r, "898989", 1);
|
|
1817
1893
|
if (t == null || !Number.isFinite(t) || t < 0) return i;
|
|
1818
|
-
let a = t /
|
|
1894
|
+
let a = t / X * r;
|
|
1819
1895
|
if (!(a > 0)) return i;
|
|
1820
1896
|
let o = a;
|
|
1821
1897
|
return {
|
|
1822
1898
|
...i,
|
|
1823
1899
|
width: o,
|
|
1824
|
-
dash:
|
|
1900
|
+
dash: ce(n ?? "solid", o)
|
|
1825
1901
|
};
|
|
1826
1902
|
}
|
|
1827
|
-
function
|
|
1828
|
-
return
|
|
1903
|
+
function tn(e, t, n, r) {
|
|
1904
|
+
return en(e, t, n, r);
|
|
1829
1905
|
}
|
|
1830
|
-
function
|
|
1906
|
+
function nn(e, t) {
|
|
1831
1907
|
e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
|
|
1832
1908
|
}
|
|
1833
|
-
function
|
|
1834
|
-
let { front:
|
|
1835
|
-
|
|
1836
|
-
let
|
|
1837
|
-
if (
|
|
1838
|
-
let e =
|
|
1839
|
-
|
|
1909
|
+
function rn(e, t, n, r, i, o, s, c, l) {
|
|
1910
|
+
let { front: u } = n, d = u.x, f = u.x + u.w, p = Qt(n), { sideX: m, floorY: h, oppositeFloorY: g, nearDepth: _, farDepth: v } = p, y = dn(t, n, r, o, s, c, i), b = [], x = t.catAxisLinePaintAuthored === !0, C = t.valAxisLinePaintAuthored === !0, w = i === "vertical" ? x && !t.catAxisHidden && !t.catAxisLineHidden : C && !t.valAxisHidden && !t.valAxisLineHidden, T = i === "vertical" ? C && !t.valAxisHidden && !t.valAxisLineHidden : x && !t.catAxisHidden && !t.catAxisLineHidden;
|
|
1911
|
+
w && b.push([y.horizontalStart, y.horizontalEnd]), T && b.push([y.verticalStart, y.verticalEnd]);
|
|
1912
|
+
let E = t.threeD?.seriesAxis, D = E?.linePaintAuthored === !0;
|
|
1913
|
+
if (E && !E.hidden && !E.lineHidden && D && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
|
|
1914
|
+
let e = i === "vertical" ? p.seriesAxisX : y.axisX, t = i === "horizontal" ? h === n.front.y ? n.front.y + n.front.h : n.front.y : h;
|
|
1915
|
+
b.push([n.project(e, t, _), n.project(e, t, v)]);
|
|
1840
1916
|
}
|
|
1841
|
-
let
|
|
1842
|
-
let r =
|
|
1917
|
+
let O = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, k = (e, t) => b.some(([n, r]) => O(e, n) && O(t, r) || O(e, r) && O(t, n)), j = (e, t) => {
|
|
1918
|
+
let r = fe(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
|
|
1843
1919
|
scenePoints: e,
|
|
1844
1920
|
faceIndex: t
|
|
1845
1921
|
})).filter(({ scenePoints: e }) => r.thickness === 0 || n.cameraFacing(e)).map(({ scenePoints: e, faceIndex: t }) => ({
|
|
@@ -1853,67 +1929,67 @@ function Ut(e, t, n, i, a, o, s, c, u) {
|
|
|
1853
1929
|
faces: i,
|
|
1854
1930
|
visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
|
|
1855
1931
|
};
|
|
1856
|
-
},
|
|
1857
|
-
let
|
|
1858
|
-
if (!
|
|
1859
|
-
if (
|
|
1860
|
-
let t =
|
|
1932
|
+
}, M = j("floor", t.threeD?.floor), N = j("sideWall", t.threeD?.sideWall), P = j("backWall", t.threeD?.backWall), F = M.faces, I = N.faces, L = P.faces, z = (i, a, o, s) => {
|
|
1933
|
+
let c = A(t, a, o), l = i.faces;
|
|
1934
|
+
if (!c.fill || !l.length) return;
|
|
1935
|
+
if (c.fill.fillType === "image") {
|
|
1936
|
+
let t = B(c.fill);
|
|
1861
1937
|
if (!t) return;
|
|
1862
|
-
de(e,
|
|
1938
|
+
de(e, c.fill, t, a, s, i.slab, i.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), r.max - r.min);
|
|
1863
1939
|
return;
|
|
1864
1940
|
}
|
|
1865
|
-
let
|
|
1866
|
-
if (
|
|
1941
|
+
let u = l.flatMap((e) => e.points), d = Math.min(...u.map((e) => e.x)), f = Math.max(...u.map((e) => e.x)), p = Math.min(...u.map((e) => e.y)), m = Math.max(...u.map((e) => e.y)), h = c.fill.fillType === "solid" ? `#${c.fill.color}` : R(c.fill, e, d, p, f - d, m - p);
|
|
1942
|
+
if (h) for (let t of l) t.points.length < 3 || (Et(e, t.points), e.fillStyle = h, e.fill());
|
|
1867
1943
|
};
|
|
1868
|
-
|
|
1869
|
-
let
|
|
1870
|
-
for (let s of
|
|
1944
|
+
z(M, t.threeD?.floor, "floor", "floor"), z(N, t.threeD?.sideWall, "wall", "sideWall"), z(P, t.threeD?.backWall, "wall", "backWall");
|
|
1945
|
+
let V = (t, r, i, a, o = !0) => {
|
|
1946
|
+
for (let s of ve(t.slab, r, i, a)) {
|
|
1871
1947
|
if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
|
|
1872
1948
|
let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
|
|
1873
1949
|
e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
|
|
1874
1950
|
}
|
|
1875
|
-
},
|
|
1876
|
-
|
|
1877
|
-
for (let
|
|
1878
|
-
let t =
|
|
1951
|
+
}, H = (t, a, o) => {
|
|
1952
|
+
nn(e, a);
|
|
1953
|
+
for (let a of t) {
|
|
1954
|
+
let t = r.fraction(a);
|
|
1879
1955
|
if (o) {
|
|
1880
|
-
|
|
1956
|
+
i === "horizontal" ? (V(M, "floor", "x", t), V(P, "backWall", "x", t)) : (V(N, "sideWall", "y", t), V(P, "backWall", "y", t));
|
|
1881
1957
|
continue;
|
|
1882
1958
|
}
|
|
1883
|
-
if (
|
|
1884
|
-
let r =
|
|
1959
|
+
if (i === "horizontal") {
|
|
1960
|
+
let r = u.x + t * u.w, i = n.project(r, h, v), a = n.project(r, g, v);
|
|
1885
1961
|
e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
|
|
1886
1962
|
} else {
|
|
1887
|
-
let r =
|
|
1963
|
+
let r = u.y + u.h - t * u.h, i = n.project(m, r, _), a = n.project(m, r, v), o = n.project(m === d ? f : d, r, v);
|
|
1888
1964
|
e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke(), e.beginPath(), e.moveTo(a.x, a.y), e.lineTo(o.x, o.y), e.stroke();
|
|
1889
1965
|
}
|
|
1890
1966
|
}
|
|
1891
1967
|
};
|
|
1892
|
-
t.valAxisMinorGridlines === !0 &&
|
|
1893
|
-
let
|
|
1894
|
-
|
|
1895
|
-
for (let e of t)
|
|
1968
|
+
t.valAxisMinorGridlines === !0 && H(r.minorTicks, $t(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, l, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && H(r.majorTicks, $t(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, l, "898989", 1), !0);
|
|
1969
|
+
let ee = (t, n) => {
|
|
1970
|
+
nn(e, n);
|
|
1971
|
+
for (let e of t) i === "vertical" ? (V(M, "floor", "x", e), V(P, "backWall", "x", e)) : (V(N, "sideWall", "y", e), V(P, "backWall", "y", e));
|
|
1896
1972
|
};
|
|
1897
|
-
t.catAxisMinorGridlines === !0 &&
|
|
1898
|
-
let
|
|
1973
|
+
t.catAxisMinorGridlines === !0 && ee(S(o, s), $t(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, l, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && ee(a(o, s), $t(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, l, "E0E0E0", .5));
|
|
1974
|
+
let U = (n, r, i) => {
|
|
1899
1975
|
if (!n.length) return;
|
|
1900
|
-
let a =
|
|
1976
|
+
let a = A(t, r, i);
|
|
1901
1977
|
if (a.line === null) return;
|
|
1902
1978
|
let o = a.line ?? {
|
|
1903
1979
|
fillType: "solid",
|
|
1904
1980
|
color: "898989"
|
|
1905
|
-
}, s = n.flatMap((e) => e.points), c = Math.min(...s.map((e) => e.x)),
|
|
1981
|
+
}, s = n.flatMap((e) => e.points), c = Math.min(...s.map((e) => e.x)), u = Math.max(...s.map((e) => e.x)), d = Math.min(...s.map((e) => e.y)), f = Math.max(...s.map((e) => e.y)), p = o.fillType === "solid" ? `#${o.color}` : R(o, e, c, d, u - c, f - d);
|
|
1906
1982
|
if (!p) return;
|
|
1907
|
-
let m = a.lineWidthEmu == null ?
|
|
1908
|
-
e.strokeStyle = p, e.lineWidth = m, e.setLineDash(
|
|
1983
|
+
let m = a.lineWidthEmu == null ? l : Math.max(.25, a.lineWidthEmu / X * l);
|
|
1984
|
+
e.strokeStyle = p, e.lineWidth = m, e.setLineDash(ae(a.lineCustomDash, a.lineDash, m)), e.lineCap = a.lineCap === "rnd" ? "round" : a.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.lineJoin === "round" || a.lineJoin === "bevel" ? a.lineJoin : "miter";
|
|
1909
1985
|
for (let t of n) {
|
|
1910
1986
|
if (t.points.length < 2) continue;
|
|
1911
1987
|
let n = t.points.map((e, n) => ({
|
|
1912
1988
|
start: e,
|
|
1913
1989
|
end: t.points[(n + 1) % t.points.length]
|
|
1914
1990
|
}));
|
|
1915
|
-
if (n.some((e) =>
|
|
1916
|
-
for (let t of n)
|
|
1991
|
+
if (n.some((e) => k(e.start, e.end))) {
|
|
1992
|
+
for (let t of n) k(t.start, t.end) || (e.beginPath(), e.moveTo(t.start.x, t.start.y), e.lineTo(t.end.x, t.end.y), e.stroke());
|
|
1917
1993
|
continue;
|
|
1918
1994
|
}
|
|
1919
1995
|
e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y);
|
|
@@ -1921,13 +1997,13 @@ function Ut(e, t, n, i, a, o, s, c, u) {
|
|
|
1921
1997
|
e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
|
|
1922
1998
|
}
|
|
1923
1999
|
};
|
|
1924
|
-
|
|
2000
|
+
U(F, t.threeD?.floor, "floor"), U(I, t.threeD?.sideWall, "wall"), U(L, t.threeD?.backWall, "wall"), e.setLineDash([]);
|
|
1925
2001
|
}
|
|
1926
|
-
function
|
|
1927
|
-
let l =
|
|
1928
|
-
u && (
|
|
2002
|
+
function an(e, t, n, r, i, a, o, s, c) {
|
|
2003
|
+
let l = dn(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;
|
|
2004
|
+
u && (nn(e, en(c === "vertical" ? t.catAxisLineColor : t.valAxisLineColor, c === "vertical" ? t.catAxisLineWidthEmu : t.valAxisLineWidthEmu, c === "vertical" ? t.catAxisLineDash : t.valAxisLineDash, s)), e.beginPath(), e.moveTo(l.horizontalStart.x, l.horizontalStart.y), e.lineTo(l.horizontalEnd.x, l.horizontalEnd.y), e.stroke()), d && (nn(e, en(c === "vertical" ? t.valAxisLineColor : t.catAxisLineColor, c === "vertical" ? t.valAxisLineWidthEmu : t.catAxisLineWidthEmu, c === "vertical" ? t.valAxisLineDash : t.catAxisLineDash, s)), e.beginPath(), e.moveTo(l.verticalStart.x, l.verticalStart.y), e.lineTo(l.verticalEnd.x, l.verticalEnd.y), e.stroke()), e.setLineDash([]);
|
|
1929
2005
|
}
|
|
1930
|
-
function
|
|
2006
|
+
function on(e, t, n, r) {
|
|
1931
2007
|
let i = {
|
|
1932
2008
|
x: (e.x + t.x) / 2,
|
|
1933
2009
|
y: (e.y + t.y) / 2
|
|
@@ -1940,25 +2016,25 @@ function Gt(e, t, n, r) {
|
|
|
1940
2016
|
y: i.y <= n.y ? -1 : 1
|
|
1941
2017
|
};
|
|
1942
2018
|
}
|
|
1943
|
-
function
|
|
2019
|
+
function sn(e, t, n, r, i, a, o, s, c) {
|
|
1944
2020
|
if (!t || t === "none") return;
|
|
1945
|
-
let l =
|
|
2021
|
+
let l = on(r, i, a, o), u = cn(s, c), d = t === "cross" ? u / 2 : u, f = t === "out" || t === "cross" ? d : 0, p = t === "in" || t === "cross" ? d : 0;
|
|
1946
2022
|
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();
|
|
1947
2023
|
}
|
|
1948
|
-
function
|
|
2024
|
+
function cn(e, t) {
|
|
1949
2025
|
return (e === "minor" ? 4 : 6) * t;
|
|
1950
2026
|
}
|
|
1951
|
-
function
|
|
2027
|
+
function ln(e, t, n) {
|
|
1952
2028
|
if (e !== "out" && e !== "cross") return 0;
|
|
1953
|
-
let r =
|
|
2029
|
+
let r = cn(t, n);
|
|
1954
2030
|
return e === "cross" ? r / 2 : r;
|
|
1955
2031
|
}
|
|
1956
|
-
function
|
|
2032
|
+
function un(e, t, n, r) {
|
|
1957
2033
|
if (t) return r;
|
|
1958
|
-
let i =
|
|
2034
|
+
let i = ln(e, "major", n);
|
|
1959
2035
|
return Math.max(r, i + 3 * n);
|
|
1960
2036
|
}
|
|
1961
|
-
function
|
|
2037
|
+
function dn(e, t, n, r, i, a, o) {
|
|
1962
2038
|
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 = () => {
|
|
1963
2039
|
if (e.catAxisCrossesAt != null && Number.isFinite(e.catAxisCrossesAt)) {
|
|
1964
2040
|
let t = e.chartType.endsWith("Pct") ? e.catAxisCrossesAt * 100 : e.catAxisCrossesAt;
|
|
@@ -1968,251 +2044,258 @@ function Xt(e, t, n, r, i, a, o) {
|
|
|
1968
2044
|
return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
|
|
1969
2045
|
}, f = () => {
|
|
1970
2046
|
let t = e.valAxisCrossesAt;
|
|
1971
|
-
if (t != null && Number.isFinite(t)) return
|
|
2047
|
+
if (t != null && Number.isFinite(t)) return T(t - 1, r, i, a);
|
|
1972
2048
|
let n = e.valAxisCrosses;
|
|
1973
2049
|
if (n !== "min" && n !== "max") return null;
|
|
1974
2050
|
let o = +(n === "max");
|
|
1975
2051
|
return a ? 1 - o : o;
|
|
1976
|
-
}, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w,
|
|
2052
|
+
}, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, g = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, _ = t.topology.nearDepth;
|
|
1977
2053
|
return {
|
|
1978
2054
|
axisX: h,
|
|
1979
|
-
axisY:
|
|
1980
|
-
depth:
|
|
1981
|
-
horizontalStart: t.project(s.x,
|
|
1982
|
-
horizontalEnd: t.project(s.x + s.w,
|
|
1983
|
-
verticalStart: t.project(h, s.y + s.h,
|
|
1984
|
-
verticalEnd: t.project(h, s.y,
|
|
2055
|
+
axisY: g,
|
|
2056
|
+
depth: _,
|
|
2057
|
+
horizontalStart: t.project(s.x, g, _),
|
|
2058
|
+
horizontalEnd: t.project(s.x + s.w, g, _),
|
|
2059
|
+
verticalStart: t.project(h, s.y + s.h, _),
|
|
2060
|
+
verticalEnd: t.project(h, s.y, _)
|
|
1985
2061
|
};
|
|
1986
2062
|
}
|
|
1987
|
-
function
|
|
1988
|
-
let { front: d } = n, f =
|
|
2063
|
+
function fn(e, t, n, r, i, o, s, c, l, u) {
|
|
2064
|
+
let { front: d } = n, f = dn(t, n, r, i, o, s, c), { axisX: p, axisY: m, depth: h } = f, g = n.project(d.x + d.w / 2, d.y + d.h / 2, h), _ = t.valAxisMinorTickMark ?? "none", v = l ? tn : en;
|
|
1989
2065
|
if (!t.valAxisHidden && !t.valAxisLineHidden) {
|
|
1990
|
-
|
|
1991
|
-
let i = (e) =>
|
|
1992
|
-
for (let n of r.majorTicks)
|
|
1993
|
-
for (let t of r.minorTicks)
|
|
2066
|
+
nn(e, v(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, u));
|
|
2067
|
+
let i = (e) => c === "horizontal" ? n.project(d.x + r.fraction(e) * d.w, m, h) : n.project(p, d.y + d.h - r.fraction(e) * d.h, h), a = c === "horizontal" ? f.horizontalStart : f.verticalStart, o = c === "horizontal" ? f.horizontalEnd : f.verticalEnd;
|
|
2068
|
+
for (let n of r.majorTicks) sn(e, t.valAxisMajorTickMark, i(n), a, o, g, c === "vertical" ? "horizontal" : "vertical", "major", u);
|
|
2069
|
+
for (let t of r.minorTicks) sn(e, _, i(t), a, o, g, c === "vertical" ? "horizontal" : "vertical", "minor", u);
|
|
1994
2070
|
}
|
|
1995
2071
|
if (!t.catAxisHidden && !t.catAxisLineHidden) {
|
|
1996
|
-
|
|
1997
|
-
let r =
|
|
1998
|
-
let a =
|
|
1999
|
-
|
|
2072
|
+
nn(e, v(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, u));
|
|
2073
|
+
let r = c === "vertical" ? f.horizontalStart : f.verticalStart, _ = c === "vertical" ? f.horizontalEnd : f.verticalEnd, y = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), b = (i) => {
|
|
2074
|
+
let a = c === "vertical" ? n.project(d.x + i * d.w, m, h) : n.project(p, d.y + i * d.h, h);
|
|
2075
|
+
sn(e, t.catAxisMajorTickMark, a, r, _, g, c === "vertical" ? "vertical" : "horizontal", "major", u);
|
|
2000
2076
|
};
|
|
2001
|
-
if (
|
|
2002
|
-
let e =
|
|
2003
|
-
for (let t = 0; t < e.length; t +=
|
|
2004
|
-
} else for (let e = 0; e < i; e +=
|
|
2005
|
-
let
|
|
2006
|
-
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" &&
|
|
2007
|
-
let
|
|
2077
|
+
if (l) {
|
|
2078
|
+
let e = a(i, o);
|
|
2079
|
+
for (let t = 0; t < e.length; t += y) b(s ? 1 - e[t] : e[t]);
|
|
2080
|
+
} else for (let e = 0; e < i; e += y) b(T(e, i, o, s));
|
|
2081
|
+
let x = t.catAxisMinorUnit;
|
|
2082
|
+
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && x != null && Number.isFinite(x) && x > 0) {
|
|
2083
|
+
let a = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : y, l = Math.min(512, Math.ceil(i / x));
|
|
2008
2084
|
for (let f = 1; f < l; f++) {
|
|
2009
|
-
let l = f *
|
|
2085
|
+
let l = f * x;
|
|
2010
2086
|
if (!(l < i)) break;
|
|
2011
|
-
if (Math.abs(l /
|
|
2012
|
-
let
|
|
2013
|
-
|
|
2087
|
+
if (Math.abs(l / a - Math.round(l / a)) < 1e-9) continue;
|
|
2088
|
+
let v = T(l, i, o, s), y = c === "vertical" ? n.project(d.x + v * d.w, m, h) : n.project(p, d.y + v * d.h, h);
|
|
2089
|
+
sn(e, t.catAxisMinorTickMark, y, r, _, g, c === "vertical" ? "vertical" : "horizontal", "minor", u);
|
|
2014
2090
|
}
|
|
2015
2091
|
}
|
|
2016
2092
|
}
|
|
2017
2093
|
e.setLineDash([]);
|
|
2018
2094
|
}
|
|
2019
|
-
function
|
|
2020
|
-
if (!
|
|
2021
|
-
let
|
|
2022
|
-
sceneDepthScale:
|
|
2023
|
-
perspectiveTangentGain:
|
|
2024
|
-
sceneHeightScale: !
|
|
2095
|
+
function pn(t, r, i, a, o) {
|
|
2096
|
+
if (!r.threeD) return !1;
|
|
2097
|
+
let s = r.chartType === "clusteredBar" || r.chartType === "clusteredBarH" || r.chartType.startsWith("stackedBar"), c = r.chartType.endsWith("H") || r.chartType.includes("BarH"), l = r.chartType.startsWith("stacked"), p = s && !l && r.threeD.barGrouping === "standard", { plot: h, legend: g, legendMeasure: _ } = Ht(t, r, i, a, c ? "horizontal" : "vertical", o), y = he(r.threeD, h, {
|
|
2098
|
+
sceneDepthScale: s ? p ? .65 : .1 : .4,
|
|
2099
|
+
perspectiveTangentGain: p ? 1 : 2,
|
|
2100
|
+
sceneHeightScale: !s && !(r.threeD.heightPercentAuthored ?? r.threeD.heightPercent != null) ? 1 / 3 : void 0
|
|
2025
2101
|
});
|
|
2026
|
-
if (!
|
|
2027
|
-
|
|
2028
|
-
let
|
|
2029
|
-
let
|
|
2030
|
-
return
|
|
2031
|
-
},
|
|
2032
|
-
if (
|
|
2033
|
-
for (let e = 0; e <
|
|
2034
|
-
let
|
|
2035
|
-
for (let i = 0; i <
|
|
2036
|
-
let
|
|
2037
|
-
|
|
2102
|
+
if (!y) return !0;
|
|
2103
|
+
y = _e(y, r.threeD, h);
|
|
2104
|
+
let b = r.chartType.endsWith("Pct"), x = r.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? r.categories, S = Math.max(1, x.length, ...r.series.map((e) => e.values.length)), C = b ? vt(r, S) : void 0, E = r.catAxisOrientation === "maxMin", D = r.catAxisCrossBetween === "between", O = r.dispBlanksAs ?? "gap", k = r.valAxisLogBase != null && Number.isFinite(r.valAxisLogBase) && r.valAxisLogBase >= 2, A = (e, t) => {
|
|
2105
|
+
let n = r.series[e]?.values[t];
|
|
2106
|
+
return n != null && Number.isFinite(n) && (!k || n > 0) || n == null && (l || O === "zero");
|
|
2107
|
+
}, j = (e, t) => yt(r, e, t, C), M = 0, N = 0;
|
|
2108
|
+
if (l) {
|
|
2109
|
+
for (let e = 0; e < S; e++) {
|
|
2110
|
+
let t = 0, n = 0;
|
|
2111
|
+
for (let i = 0; i < r.series.length; i++) {
|
|
2112
|
+
let r = j(i, e);
|
|
2113
|
+
r >= 0 ? t = bt(t, r) : n = bt(n, r);
|
|
2038
2114
|
}
|
|
2039
|
-
|
|
2115
|
+
M = Math.min(M, n), N = Math.max(N, t);
|
|
2040
2116
|
}
|
|
2041
|
-
|
|
2117
|
+
b && (M = M < 0 ? -100 : 0, N = N > 0 ? 100 : 0, M === 0 && N === 0 && (N = 1));
|
|
2042
2118
|
} else {
|
|
2043
|
-
let e =
|
|
2119
|
+
let e = Te(r.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!k || e > 0)), k ? {
|
|
2044
2120
|
min: 1,
|
|
2045
2121
|
max: 10
|
|
2046
2122
|
} : {
|
|
2047
2123
|
min: 0,
|
|
2048
2124
|
max: 1
|
|
2049
2125
|
});
|
|
2050
|
-
|
|
2051
|
-
}
|
|
2052
|
-
let
|
|
2053
|
-
|
|
2054
|
-
let { front:
|
|
2055
|
-
if (
|
|
2056
|
-
let
|
|
2057
|
-
for (let e = 0; e <
|
|
2058
|
-
let
|
|
2059
|
-
for (let
|
|
2060
|
-
if (!
|
|
2061
|
-
let
|
|
2062
|
-
|
|
2063
|
-
let
|
|
2064
|
-
if (!
|
|
2065
|
-
let t =
|
|
2126
|
+
M = k ? e.min : Math.min(0, e.min), N = k ? e.max : Math.max(0, e.max);
|
|
2127
|
+
}
|
|
2128
|
+
let P = c ? y.project(y.front.x, y.topology.axisY === "min" ? y.front.y : y.front.y + y.front.h, y.topology.nearDepth) : y.project(y.topology.axisX === "min" ? y.front.x : y.front.x + y.front.w, y.front.y, y.topology.nearDepth), F = c ? y.project(y.front.x + y.front.w, y.topology.axisY === "min" ? y.front.y : y.front.y + y.front.h, y.topology.nearDepth) : y.project(y.topology.axisX === "min" ? y.front.x : y.front.x + y.front.w, y.front.y + y.front.h, y.topology.nearDepth), I = Math.hypot(F.x - P.x, F.y - P.y) / a, L = Xt(r, M, N, I, b, c ? "horizontal" : "vertical"), R = (e) => Number.isFinite(e) ? Math.max(L.min, Math.min(L.max, e)) : L.min;
|
|
2129
|
+
s || rn(t, r, y, L, c ? "horizontal" : "vertical", S, D, E, a);
|
|
2130
|
+
let { front: z } = y, B = Math.max(1, r.series.length), V = [], H = r.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), ee = r.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
|
|
2131
|
+
if (s) {
|
|
2132
|
+
let n = y.prismInterval(0, 1, !0), s = [], u = Array(S).fill(0), d = Array(S).fill(0), f = (c ? z.h : z.w) / S, m = r.barGapWidth != null && Number.isFinite(r.barGapWidth) && r.barGapWidth >= 0 ? r.barGapWidth : 150;
|
|
2133
|
+
for (let e = 0; e < r.series.length; e++) {
|
|
2134
|
+
let t = r.series[e], i = p ? y.prismInterval(e, B, !1) : n, o = xe(f, m, p ? 0 : e, p ? 1 : B, l || p);
|
|
2135
|
+
for (let n = 0; n < S; n++) {
|
|
2136
|
+
if (!A(e, n)) continue;
|
|
2137
|
+
let p = j(e, n), m = Q(r, t, H[e].get(n), n, e), h = m.fill === null ? "transparent" : m.color, g = m.lineFill !== null && (m.lineColor != null || m.lineFill !== void 0), _ = l ? p >= 0 ? u[n] : d[n] : 0, v = bt(_, p);
|
|
2138
|
+
l && (p >= 0 ? u[n] = v : d[n] = v);
|
|
2139
|
+
let y = R(_), x = R(v), C = t.threeDShape ?? r.threeD.shape ?? "box", w = C === "cone" || C === "pyramid", T = C === "coneToMax" || C === "pyramidToMax", D = (e) => {
|
|
2140
|
+
if (!w) return 1;
|
|
2141
|
+
let t = k && !(_ > 0) ? L.min : _, n = L.fraction(t), r = L.fraction(v), i = L.fraction(e), a = r - n;
|
|
2066
2142
|
return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
|
|
2067
|
-
},
|
|
2068
|
-
if (!
|
|
2069
|
-
let t =
|
|
2143
|
+
}, O = (e) => {
|
|
2144
|
+
if (!T) return 1;
|
|
2145
|
+
let t = v >= _ ? L.max : L.min, n = k ? L.min : 0, r = L.fraction(t), i = L.fraction(n), a = L.fraction(e), o = Math.abs(r - i);
|
|
2070
2146
|
return !(o > 0) || ![
|
|
2071
2147
|
r,
|
|
2072
2148
|
i,
|
|
2073
2149
|
a
|
|
2074
|
-
].every(Number.isFinite) ?
|
|
2075
|
-
},
|
|
2076
|
-
if (
|
|
2077
|
-
let t =
|
|
2078
|
-
|
|
2079
|
-
x: Math.min(t,
|
|
2080
|
-
y:
|
|
2081
|
-
width: Math.abs(
|
|
2082
|
-
height:
|
|
2150
|
+
].every(Number.isFinite) ? pe(e, L.min, L.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
|
|
2151
|
+
}, M = T ? O(y) : D(y), N = T ? O(x) : D(x);
|
|
2152
|
+
if (c) {
|
|
2153
|
+
let t = z.x + L.fraction(y) * z.w, r = z.x + L.fraction(x) * z.w, c = E ? S - 1 - n : n, l = z.y + c * f + o.offset;
|
|
2154
|
+
s.push({
|
|
2155
|
+
x: Math.min(t, r),
|
|
2156
|
+
y: l,
|
|
2157
|
+
width: Math.abs(r - t),
|
|
2158
|
+
height: o.size,
|
|
2083
2159
|
nearDepth: i.near,
|
|
2084
2160
|
farDepth: i.far,
|
|
2085
|
-
categoryIndex:
|
|
2161
|
+
categoryIndex: n,
|
|
2086
2162
|
seriesIndex: e,
|
|
2087
2163
|
color: h,
|
|
2088
|
-
fillPaint:
|
|
2089
|
-
lineFill:
|
|
2090
|
-
shape:
|
|
2164
|
+
fillPaint: m.fill,
|
|
2165
|
+
lineFill: m.lineFill,
|
|
2166
|
+
shape: C,
|
|
2091
2167
|
baseCoord: t,
|
|
2092
|
-
endCoord:
|
|
2093
|
-
baseScale:
|
|
2094
|
-
endScale:
|
|
2168
|
+
endCoord: r,
|
|
2169
|
+
baseScale: M,
|
|
2170
|
+
endScale: N,
|
|
2095
2171
|
omitBaseCap: !1,
|
|
2096
2172
|
omitEndCap: !1,
|
|
2097
|
-
outline:
|
|
2098
|
-
outlineColor:
|
|
2099
|
-
outlineWidth:
|
|
2100
|
-
outlineDash:
|
|
2101
|
-
outlineCustomDash:
|
|
2102
|
-
outlineCap:
|
|
2103
|
-
outlineJoin:
|
|
2104
|
-
labelValue:
|
|
2105
|
-
plottedLabelValue:
|
|
2173
|
+
outline: g,
|
|
2174
|
+
outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
|
|
2175
|
+
outlineWidth: m.lineWidthEmu == null ? .75 * a / ue : mt(m.lineWidthEmu, a),
|
|
2176
|
+
outlineDash: m.lineDash ?? "solid",
|
|
2177
|
+
outlineCustomDash: m.lineCustomDash,
|
|
2178
|
+
outlineCap: m.lineCap,
|
|
2179
|
+
outlineJoin: m.lineJoin,
|
|
2180
|
+
labelValue: b ? p / 100 : p,
|
|
2181
|
+
plottedLabelValue: v
|
|
2106
2182
|
});
|
|
2107
2183
|
} else {
|
|
2108
|
-
let t =
|
|
2109
|
-
|
|
2110
|
-
x:
|
|
2111
|
-
y: Math.min(t,
|
|
2112
|
-
width:
|
|
2113
|
-
height: Math.abs(
|
|
2184
|
+
let t = z.y + z.h - L.fraction(y) * z.h, r = z.y + z.h - L.fraction(x) * z.h, c = E ? S - 1 - n : n, l = z.x + c * f + o.offset;
|
|
2185
|
+
s.push({
|
|
2186
|
+
x: l,
|
|
2187
|
+
y: Math.min(t, r),
|
|
2188
|
+
width: o.size,
|
|
2189
|
+
height: Math.abs(r - t),
|
|
2114
2190
|
nearDepth: i.near,
|
|
2115
2191
|
farDepth: i.far,
|
|
2116
|
-
categoryIndex:
|
|
2192
|
+
categoryIndex: n,
|
|
2117
2193
|
seriesIndex: e,
|
|
2118
2194
|
color: h,
|
|
2119
|
-
fillPaint:
|
|
2120
|
-
lineFill:
|
|
2121
|
-
shape:
|
|
2195
|
+
fillPaint: m.fill,
|
|
2196
|
+
lineFill: m.lineFill,
|
|
2197
|
+
shape: C,
|
|
2122
2198
|
baseCoord: t,
|
|
2123
|
-
endCoord:
|
|
2124
|
-
baseScale:
|
|
2125
|
-
endScale:
|
|
2199
|
+
endCoord: r,
|
|
2200
|
+
baseScale: M,
|
|
2201
|
+
endScale: N,
|
|
2126
2202
|
omitBaseCap: !1,
|
|
2127
2203
|
omitEndCap: !1,
|
|
2128
|
-
outline:
|
|
2129
|
-
outlineColor:
|
|
2130
|
-
outlineWidth:
|
|
2131
|
-
outlineDash:
|
|
2132
|
-
outlineCustomDash:
|
|
2133
|
-
outlineCap:
|
|
2134
|
-
outlineJoin:
|
|
2135
|
-
labelValue:
|
|
2136
|
-
plottedLabelValue:
|
|
2204
|
+
outline: g,
|
|
2205
|
+
outlineColor: m.lineColor ?? "rgba(0,0,0,0.42)",
|
|
2206
|
+
outlineWidth: m.lineWidthEmu == null ? .75 * a / ue : mt(m.lineWidthEmu, a),
|
|
2207
|
+
outlineDash: m.lineDash ?? "solid",
|
|
2208
|
+
outlineCustomDash: m.lineCustomDash,
|
|
2209
|
+
outlineCap: m.lineCap,
|
|
2210
|
+
outlineJoin: m.lineJoin,
|
|
2211
|
+
labelValue: b ? p / 100 : p,
|
|
2212
|
+
plottedLabelValue: v
|
|
2137
2213
|
});
|
|
2138
2214
|
}
|
|
2139
2215
|
}
|
|
2140
2216
|
}
|
|
2141
|
-
if (
|
|
2142
|
-
let e =
|
|
2143
|
-
for (let t = 0; t <
|
|
2217
|
+
if (l) {
|
|
2218
|
+
let e = ht(s, S);
|
|
2219
|
+
for (let t = 0; t < S; t++) {
|
|
2144
2220
|
let n = e[t];
|
|
2145
2221
|
for (let e of [-1, 1]) {
|
|
2146
|
-
let t = n.filter((t) => Math.sign(t.labelValue) === e && !
|
|
2222
|
+
let t = n.filter((t) => Math.sign(t.labelValue) === e && !Dt(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
|
|
2147
2223
|
for (let e = 0; e + 1 < t.length; e++) {
|
|
2148
2224
|
let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
|
|
2149
2225
|
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);
|
|
2150
2226
|
}
|
|
2151
2227
|
}
|
|
2152
|
-
let r = n.find((e) => e.labelValue > 0 && !
|
|
2228
|
+
let r = n.find((e) => e.labelValue > 0 && !Dt(e.color)), i = n.find((e) => e.labelValue < 0 && !Dt(e.color));
|
|
2153
2229
|
if (r && i) {
|
|
2154
2230
|
let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
|
|
2155
2231
|
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);
|
|
2156
2232
|
}
|
|
2157
2233
|
}
|
|
2158
2234
|
}
|
|
2159
|
-
|
|
2160
|
-
let
|
|
2161
|
-
remaining:
|
|
2235
|
+
rn(t, r, y, L, c ? "horizontal" : "vertical", S, D, E, a);
|
|
2236
|
+
let h = {
|
|
2237
|
+
remaining: Ke,
|
|
2162
2238
|
exceeded: !1
|
|
2163
|
-
},
|
|
2164
|
-
let n =
|
|
2165
|
-
color:
|
|
2166
|
-
width:
|
|
2167
|
-
dash:
|
|
2168
|
-
cap:
|
|
2169
|
-
join:
|
|
2170
|
-
} : void 0,
|
|
2171
|
-
return
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2239
|
+
}, g = s.map((e) => {
|
|
2240
|
+
let n = At(y, e.shape, c, 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 ? {
|
|
2241
|
+
color: e.outlineColor,
|
|
2242
|
+
width: e.outlineWidth,
|
|
2243
|
+
dash: ae(e.outlineCustomDash, e.outlineDash, e.outlineWidth),
|
|
2244
|
+
cap: e.outlineCap,
|
|
2245
|
+
join: e.outlineJoin
|
|
2246
|
+
} : void 0, h);
|
|
2247
|
+
return Ft(t, n, "fill", e.fillPaint, o), Ft(t, n, "outline", e.lineFill, o), {
|
|
2248
|
+
item: e,
|
|
2249
|
+
faces: n
|
|
2250
|
+
};
|
|
2251
|
+
}), _ = g.flatMap((e) => e.faces);
|
|
2252
|
+
if (h.exceeded) return It(t, i), !0;
|
|
2253
|
+
for (let e of Ge(_)) Nt(t, e);
|
|
2254
|
+
for (let { item: n, faces: i } of g) {
|
|
2255
|
+
let o = r.series[n.seriesIndex], s = H[n.seriesIndex].get(n.categoryIndex), c = De(r, o, n.categoryIndex, n.seriesIndex), l = e(s?.chartexStyle), u = e(o.chartexStyle);
|
|
2256
|
+
ne(t, l ?? u, q(r, "dataPoint3D", n.seriesIndex), l ? n.categoryIndex : c, a, (e) => Pt(e, i), c);
|
|
2257
|
+
}
|
|
2258
|
+
for (let e of s) {
|
|
2259
|
+
let n = r.series[e.seriesIndex], s = c ? y.project(e.endCoord, e.y + e.height / 2, (e.nearDepth + e.farDepth) / 2) : y.project(e.x + e.width / 2, e.endCoord, (e.nearDepth + e.farDepth) / 2), l = ee[e.seriesIndex].get(e.categoryIndex);
|
|
2260
|
+
Vt(r, n, l) && V.push(() => Bt(t, r, n, e.seriesIndex, e.categoryIndex, e.labelValue, s, i, a, 0, void 0, l, "t", s, !0, r.valAxisDisplayUnits, L.max, e.plottedLabelValue, o));
|
|
2178
2261
|
}
|
|
2179
2262
|
} else {
|
|
2180
|
-
let
|
|
2181
|
-
if (
|
|
2182
|
-
let
|
|
2183
|
-
for (let
|
|
2184
|
-
let
|
|
2185
|
-
|
|
2263
|
+
let e = r.series.map(() => Array(S).fill(0)), s = r.series.map(() => Array(S).fill(0));
|
|
2264
|
+
if (l) {
|
|
2265
|
+
let t = Array(S).fill(0), n = Array(S).fill(0);
|
|
2266
|
+
for (let i = 0; i < r.series.length; i++) for (let r = 0; r < S; r++) {
|
|
2267
|
+
let a = j(i, r), o = a >= 0 ? t[r] : n[r];
|
|
2268
|
+
e[i][r] = o, s[i][r] = bt(o, a), a >= 0 ? t[r] = bt(t[r], a) : n[r] = bt(n[r], a);
|
|
2186
2269
|
}
|
|
2187
2270
|
}
|
|
2188
2271
|
let c = (e) => {
|
|
2189
|
-
let t =
|
|
2190
|
-
for (let i = 0; i <
|
|
2191
|
-
if (!
|
|
2192
|
-
let a =
|
|
2193
|
-
n +=
|
|
2272
|
+
let t = y.seriesDepth(e, B, l), n = 0, r = 0;
|
|
2273
|
+
for (let i = 0; i < S; i++) {
|
|
2274
|
+
if (!A(e, i)) continue;
|
|
2275
|
+
let a = l ? s[e][i] : j(e, i), o = z.x + T(i, S, D, E) * z.w, c = z.y + z.h - L.fraction(R(a)) * z.h;
|
|
2276
|
+
n += y.cameraDepth(o, c, t), r++;
|
|
2194
2277
|
}
|
|
2195
2278
|
return r > 0 ? n / r : -Infinity;
|
|
2196
|
-
},
|
|
2197
|
-
for (let c of
|
|
2198
|
-
if (
|
|
2199
|
-
let
|
|
2200
|
-
for (let
|
|
2201
|
-
if (!
|
|
2202
|
-
|
|
2279
|
+
}, d = r.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), f = r.series.map((e, t) => Q(r, e, void 0, t, t)), p = [], h = [], g = !1;
|
|
2280
|
+
for (let c of d) {
|
|
2281
|
+
if (g) break;
|
|
2282
|
+
let d = r.series[c], _ = f[c], v = _.fill === null ? "transparent" : _.color, x = l ? y.prismInterval(0, 1, !0) : y.prismInterval(c, B, !1), C = z.x + z.w / 2, w = z.y + z.h / 2, k = y.cameraDepth(C, w, x.near) >= y.cameraDepth(C, w, x.far) ? x.near : x.far, M = [], N = [], P = [], F = [], I = [], R = [], U = [], te = [], W = [], G = [];
|
|
2283
|
+
for (let t = 0; t < S; t++) {
|
|
2284
|
+
if (!A(c, t)) {
|
|
2285
|
+
M.push(null), N.push(null), P.push(null), F.push(null), I.push(null), R.push(null), U.push(null), te.push(null), W.push(null), G.push(null);
|
|
2203
2286
|
continue;
|
|
2204
2287
|
}
|
|
2205
|
-
let n =
|
|
2206
|
-
|
|
2288
|
+
let n = l ? s[c][t] : j(c, t), i = l ? e[c][t] : 0, a = z.x + T(t, S, D, E) * z.w, o = L.fraction(n), u = L.fraction(i), d = Number.isFinite(u) ? u : i <= L.min ? 0 : 1, f = Number.isFinite(o) && o >= 0 && o <= 1, p = Number.isFinite(o) ? Math.max(0, Math.min(1, o)) : n <= L.min ? 0 : 1, m = z.y + z.h - p * z.h, h = z.y + z.h - Math.max(0, Math.min(1, d)) * z.h;
|
|
2289
|
+
M.push(r.chartType.toLowerCase().includes("area") || f ? y.project(a, m, k) : null), N.push(y.project(a, h, k)), P.push(f ? y.cameraDepth(a, m, k) : null), F.push(y.cameraDepth(a, h, k)), I.push(n), R.push(a), U.push(m), te.push(h), W.push(o), G.push(d);
|
|
2207
2290
|
}
|
|
2208
|
-
let
|
|
2209
|
-
for (let e = 0; e <
|
|
2210
|
-
let t =
|
|
2291
|
+
let K = [], q = null;
|
|
2292
|
+
for (let e = 0; e < M.length; e++) {
|
|
2293
|
+
let t = M[e], n = N[e];
|
|
2211
2294
|
if (!t || !n) {
|
|
2212
|
-
|
|
2295
|
+
O === "gap" && (q && K.push(q), q = null);
|
|
2213
2296
|
continue;
|
|
2214
2297
|
}
|
|
2215
|
-
|
|
2298
|
+
q ??= {
|
|
2216
2299
|
upper: [],
|
|
2217
2300
|
lower: [],
|
|
2218
2301
|
upperDepths: [],
|
|
@@ -2223,81 +2306,81 @@ function Qt(e, t, n, r, i) {
|
|
|
2223
2306
|
lowerYs: [],
|
|
2224
2307
|
upperFractions: [],
|
|
2225
2308
|
lowerFractions: []
|
|
2226
|
-
},
|
|
2309
|
+
}, q.upper.push(t), q.lower.push(n), q.upperDepths.push(P[e] ?? 0), q.lowerDepths.push(F[e] ?? 0), q.indices.push(e), q.sceneXs.push(R[e] ?? 0), q.upperYs.push(U[e] ?? 0), q.lowerYs.push(te[e] ?? 0), q.upperFractions.push(W[e] ?? 0), q.lowerFractions.push(G[e] ?? 0);
|
|
2227
2310
|
}
|
|
2228
|
-
|
|
2229
|
-
let
|
|
2230
|
-
if (
|
|
2231
|
-
for (let
|
|
2311
|
+
q && K.push(q);
|
|
2312
|
+
let J = [], ne = [];
|
|
2313
|
+
if (r.chartType.toLowerCase().includes("area")) {
|
|
2314
|
+
for (let e of K) {
|
|
2232
2315
|
let n = null;
|
|
2233
|
-
for (let r = 0; r + 1 <
|
|
2234
|
-
let i =
|
|
2316
|
+
for (let r = 0; r + 1 < e.upper.length; r++) {
|
|
2317
|
+
let i = ze(e.lowerFractions[r], e.lowerFractions[r + 1], e.upperFractions[r], e.upperFractions[r + 1]);
|
|
2235
2318
|
for (let a = 0; a < i.length; a++) {
|
|
2236
|
-
let o = i[a], s =
|
|
2237
|
-
...
|
|
2238
|
-
cameraDepth:
|
|
2239
|
-
cameraWeight:
|
|
2240
|
-
},
|
|
2241
|
-
...
|
|
2242
|
-
cameraDepth:
|
|
2243
|
-
cameraWeight:
|
|
2319
|
+
let o = i[a], s = e.sceneXs[r] + (e.sceneXs[r + 1] - e.sceneXs[r]) * o.startT, c = e.sceneXs[r] + (e.sceneXs[r + 1] - e.sceneXs[r]) * o.endT, l = z.y + z.h - o.lowerStart * z.h, u = z.y + z.h - o.lowerEnd * z.h, d = z.y + z.h - o.upperStart * z.h, f = z.y + z.h - o.upperEnd * z.h, m = {
|
|
2320
|
+
...y.project(s, d, k),
|
|
2321
|
+
cameraDepth: y.cameraDepth(s, d, k),
|
|
2322
|
+
cameraWeight: y.cameraProjectionWeight(s, d, k)
|
|
2323
|
+
}, h = {
|
|
2324
|
+
...y.project(c, f, k),
|
|
2325
|
+
cameraDepth: y.cameraDepth(c, f, k),
|
|
2326
|
+
cameraWeight: y.cameraProjectionWeight(c, f, k)
|
|
2244
2327
|
};
|
|
2245
|
-
n != null && Math.hypot(n.at(-1).x -
|
|
2246
|
-
let
|
|
2247
|
-
for (let
|
|
2248
|
-
if (
|
|
2249
|
-
|
|
2328
|
+
n != null && Math.hypot(n.at(-1).x - m.x, n.at(-1).y - m.y) <= 1e-8 ? n.push(h) : (n && n.length >= 2 && J.push(n), n = [m, h]);
|
|
2329
|
+
let _ = kt(y, s, c, l, u, d, f, x.near, x.far, v, r === 0 && a === 0 && o.startT === 0, r + 2 === e.upper.length && a + 1 === i.length && o.endT === 1);
|
|
2330
|
+
for (let e of _) {
|
|
2331
|
+
if (p.length >= 1e4) {
|
|
2332
|
+
g = !0;
|
|
2250
2333
|
break;
|
|
2251
2334
|
}
|
|
2252
|
-
|
|
2253
|
-
points:
|
|
2254
|
-
cameraDepth:
|
|
2255
|
-
cameraDepths:
|
|
2256
|
-
cameraWeights:
|
|
2335
|
+
p.push({
|
|
2336
|
+
points: e.points,
|
|
2337
|
+
cameraDepth: e.cameraDepth,
|
|
2338
|
+
cameraDepths: e.cameraDepths,
|
|
2339
|
+
cameraWeights: e.cameraWeights,
|
|
2257
2340
|
layer: 0,
|
|
2258
|
-
paint: () =>
|
|
2259
|
-
}),
|
|
2341
|
+
paint: () => Nt(t, e)
|
|
2342
|
+
}), ne.push(e);
|
|
2260
2343
|
}
|
|
2261
|
-
if (
|
|
2344
|
+
if (g) break;
|
|
2262
2345
|
}
|
|
2263
|
-
if (
|
|
2346
|
+
if (g) break;
|
|
2264
2347
|
}
|
|
2265
|
-
if (n && n.length >= 2 &&
|
|
2348
|
+
if (n && n.length >= 2 && J.push(n), g) break;
|
|
2266
2349
|
}
|
|
2267
|
-
|
|
2350
|
+
Ft(t, ne, "fill", _.fill, o);
|
|
2268
2351
|
}
|
|
2269
|
-
let
|
|
2270
|
-
if (!
|
|
2352
|
+
let Y = [];
|
|
2353
|
+
if (!r.chartType.toLowerCase().includes("area")) {
|
|
2271
2354
|
let e = [], t = null;
|
|
2272
|
-
for (let n = 0; n <
|
|
2273
|
-
let r =
|
|
2355
|
+
for (let n = 0; n < S; n++) {
|
|
2356
|
+
let r = I[n], i = r == null ? NaN : L.fraction(r);
|
|
2274
2357
|
if (r == null || !Number.isFinite(i)) {
|
|
2275
|
-
|
|
2358
|
+
O === "gap" && t && (e.push(t), t = null);
|
|
2276
2359
|
continue;
|
|
2277
2360
|
}
|
|
2278
2361
|
t ??= [], t.push({
|
|
2279
|
-
x:
|
|
2362
|
+
x: z.x + T(n, S, D, E) * z.w,
|
|
2280
2363
|
fraction: i,
|
|
2281
2364
|
ownerIndex: n
|
|
2282
2365
|
});
|
|
2283
2366
|
}
|
|
2284
2367
|
t && e.push(t);
|
|
2285
2368
|
let n = (e) => {
|
|
2286
|
-
let t = Math.max(0, Math.min(1, e.fraction)), n =
|
|
2369
|
+
let t = Math.max(0, Math.min(1, e.fraction)), n = z.y + z.h - t * z.h;
|
|
2287
2370
|
return {
|
|
2288
|
-
...
|
|
2289
|
-
cameraDepth:
|
|
2290
|
-
cameraWeight:
|
|
2371
|
+
...y.project(e.x, n, k),
|
|
2372
|
+
cameraDepth: y.cameraDepth(e.x, n, k),
|
|
2373
|
+
cameraWeight: y.cameraProjectionWeight(e.x, n, k)
|
|
2291
2374
|
};
|
|
2292
2375
|
}, r = (e) => {
|
|
2293
|
-
e && e.path.length >= 2 &&
|
|
2376
|
+
e && e.path.length >= 2 && Y.push(e);
|
|
2294
2377
|
};
|
|
2295
2378
|
for (let t of e) {
|
|
2296
2379
|
if (t.length < 2) continue;
|
|
2297
2380
|
let e = [t[0]];
|
|
2298
2381
|
for (let n = 0; n + 1 < t.length; n++) {
|
|
2299
2382
|
let r = t[n - 1] ?? t[n], i = t[n], a = t[n + 1], o = t[n + 2] ?? a;
|
|
2300
|
-
if (
|
|
2383
|
+
if (d.smooth !== !0 || t.length < 3) {
|
|
2301
2384
|
e.push(a);
|
|
2302
2385
|
continue;
|
|
2303
2386
|
}
|
|
@@ -2319,220 +2402,220 @@ function Qt(e, t, n, r, i) {
|
|
|
2319
2402
|
}
|
|
2320
2403
|
let i = null, a = 0;
|
|
2321
2404
|
for (let t = 0; t + 1 < e.length; t++) {
|
|
2322
|
-
let o = e[t], s = e[t + 1], c = (e) =>
|
|
2323
|
-
if (!
|
|
2405
|
+
let o = e[t], s = e[t + 1], c = (e) => y.project(e.x, z.y + z.h - e.fraction * z.h, k), 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) * z.h), p = Re(o.fraction, s.fraction);
|
|
2406
|
+
if (!p || p.endT - p.startT <= 1e-12) {
|
|
2324
2407
|
r(i), i = null, a += f;
|
|
2325
2408
|
continue;
|
|
2326
2409
|
}
|
|
2327
|
-
let
|
|
2410
|
+
let m = (e) => ({
|
|
2328
2411
|
x: o.x + (s.x - o.x) * e,
|
|
2329
2412
|
fraction: o.fraction + (s.fraction - o.fraction) * e,
|
|
2330
2413
|
ownerIndex: s.ownerIndex
|
|
2331
|
-
}),
|
|
2414
|
+
}), h = c(m(p.startT)), g = Math.hypot(h.x - l.x, h.y - l.y), _ = n(m(p.startT)), v = n(m(p.endT)), b = m(p.startT), x = m(p.endT), S = (e) => ({
|
|
2332
2415
|
x: e.x,
|
|
2333
|
-
y:
|
|
2416
|
+
y: z.y + z.h - Math.max(0, Math.min(1, e.fraction)) * z.h
|
|
2334
2417
|
});
|
|
2335
|
-
i != null && Math.hypot(i.path.at(-1).x -
|
|
2336
|
-
path: [
|
|
2418
|
+
i != null && Math.hypot(i.path.at(-1).x - _.x, i.path.at(-1).y - _.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(v), i.modelPath.push(S(x)), i.endClipped = t + 1 < e.length - 1 || p.endT < 1) : (r(i), i = {
|
|
2419
|
+
path: [_, v],
|
|
2337
2420
|
modelPath: [S(b), S(x)],
|
|
2338
2421
|
ownerIndex: s.ownerIndex,
|
|
2339
|
-
startClipped: t > 0 ||
|
|
2340
|
-
endClipped: t + 1 < e.length - 1 ||
|
|
2341
|
-
dashOffset: a + (Number.isFinite(
|
|
2422
|
+
startClipped: t > 0 || p.startT > 0,
|
|
2423
|
+
endClipped: t + 1 < e.length - 1 || p.endT < 1,
|
|
2424
|
+
dashOffset: a + (Number.isFinite(g) ? g : f * p.startT)
|
|
2342
2425
|
}), a += f;
|
|
2343
2426
|
}
|
|
2344
2427
|
r(i);
|
|
2345
2428
|
}
|
|
2346
2429
|
}
|
|
2347
|
-
let
|
|
2348
|
-
if (!
|
|
2349
|
-
let
|
|
2350
|
-
let
|
|
2351
|
-
if (!
|
|
2352
|
-
let i =
|
|
2353
|
-
return i || (i =
|
|
2354
|
-
},
|
|
2355
|
-
remaining:
|
|
2430
|
+
let re = r.chartType.toLowerCase().includes("area"), ie = d.lineHidden != null || d.lineColor != null || d.lineWidthEmu != null || d.chartexStyle?.lineHidden != null || d.chartexStyle?.lineColors?.some(Boolean) || d.chartexStyle?.lineWidthEmu != null || d.chartexStyle?.lineDash != null || d.chartexStyle?.lineCap != null || d.chartexStyle?.lineJoin != null || _.lineColor != null || _.lineFill !== void 0;
|
|
2431
|
+
if (!re || _.lineFill !== null && ie) {
|
|
2432
|
+
let e = /* @__PURE__ */ new Map(), n = (t) => {
|
|
2433
|
+
let n = H[c].get(t);
|
|
2434
|
+
if (!Ct(n)) return _;
|
|
2435
|
+
let i = e.get(t);
|
|
2436
|
+
return i || (i = Q(r, d, n, t, c), e.set(t, i)), i;
|
|
2437
|
+
}, i = /* @__PURE__ */ new Map(), s = {
|
|
2438
|
+
remaining: Ke,
|
|
2356
2439
|
exceeded: !1
|
|
2357
|
-
},
|
|
2440
|
+
}, l = (e, n, r, o = r, c = 0, l) => {
|
|
2358
2441
|
if (n.lineFill === null) return;
|
|
2359
|
-
let u = n ===
|
|
2360
|
-
width:
|
|
2361
|
-
dash:
|
|
2442
|
+
let u = n === _ ? v : n.color, d = n.lineColor ?? Ce(u, .7), f = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / X) * a : re ? .75 * a : Math.max(1, 2 * a), m = {
|
|
2443
|
+
width: f,
|
|
2444
|
+
dash: ae(n.lineCustomDash, n.lineDash, f),
|
|
2362
2445
|
dashOffset: c,
|
|
2363
2446
|
lineCap: n.lineCap,
|
|
2364
|
-
startCap:
|
|
2365
|
-
endCap:
|
|
2447
|
+
startCap: r,
|
|
2448
|
+
endCap: o,
|
|
2366
2449
|
lineJoin: n.lineJoin
|
|
2367
2450
|
};
|
|
2368
|
-
if (!
|
|
2369
|
-
let
|
|
2451
|
+
if (!re && l && l.length >= 2) {
|
|
2452
|
+
let e = et(l.map((e) => ({
|
|
2370
2453
|
...e,
|
|
2371
2454
|
cameraDepth: 0,
|
|
2372
2455
|
cameraWeight: 1
|
|
2373
|
-
})),
|
|
2374
|
-
if (
|
|
2375
|
-
|
|
2456
|
+
})), m);
|
|
2457
|
+
if (e == null) {
|
|
2458
|
+
g = !0;
|
|
2376
2459
|
return;
|
|
2377
2460
|
}
|
|
2378
|
-
let r =
|
|
2379
|
-
for (let n of
|
|
2380
|
-
let
|
|
2461
|
+
let r = i.get(n) ?? [];
|
|
2462
|
+
for (let n of e) {
|
|
2463
|
+
let e = Ie({
|
|
2381
2464
|
outline: n.points,
|
|
2382
|
-
nearDepth:
|
|
2383
|
-
farDepth:
|
|
2465
|
+
nearDepth: x.near,
|
|
2466
|
+
farDepth: x.far
|
|
2384
2467
|
});
|
|
2385
|
-
if (!
|
|
2386
|
-
let i =
|
|
2468
|
+
if (!e) continue;
|
|
2469
|
+
let i = jt(y, e, d, void 0, s).map((e) => ({
|
|
2387
2470
|
...e,
|
|
2388
2471
|
paintRole: "outline"
|
|
2389
2472
|
}));
|
|
2390
2473
|
if (s.exceeded) {
|
|
2391
|
-
|
|
2474
|
+
g = !0;
|
|
2392
2475
|
return;
|
|
2393
2476
|
}
|
|
2394
2477
|
r.push(...i);
|
|
2395
|
-
for (let
|
|
2396
|
-
points:
|
|
2397
|
-
cameraDepth:
|
|
2398
|
-
cameraDepths:
|
|
2399
|
-
cameraWeights:
|
|
2478
|
+
for (let e of i) p.push({
|
|
2479
|
+
points: e.points,
|
|
2480
|
+
cameraDepth: e.cameraDepth,
|
|
2481
|
+
cameraDepths: e.cameraDepths,
|
|
2482
|
+
cameraWeights: e.cameraWeights,
|
|
2400
2483
|
layer: 1,
|
|
2401
|
-
paint: () =>
|
|
2484
|
+
paint: () => Nt(t, e)
|
|
2402
2485
|
});
|
|
2403
2486
|
}
|
|
2404
|
-
|
|
2487
|
+
i.set(n, r);
|
|
2405
2488
|
return;
|
|
2406
2489
|
}
|
|
2407
|
-
let
|
|
2408
|
-
if (
|
|
2409
|
-
|
|
2490
|
+
let h = et(e, m);
|
|
2491
|
+
if (h == null) {
|
|
2492
|
+
g = !0;
|
|
2410
2493
|
return;
|
|
2411
2494
|
}
|
|
2412
|
-
if (
|
|
2413
|
-
|
|
2495
|
+
if (p.length + h.length > 1e4) {
|
|
2496
|
+
g = !0;
|
|
2414
2497
|
return;
|
|
2415
2498
|
}
|
|
2416
|
-
for (let
|
|
2499
|
+
for (let e of h) {
|
|
2417
2500
|
let r = {
|
|
2418
|
-
points:
|
|
2419
|
-
color:
|
|
2501
|
+
points: e.points,
|
|
2502
|
+
color: d,
|
|
2420
2503
|
paintRole: "outline",
|
|
2421
2504
|
shade: 0,
|
|
2422
|
-
cameraDepth:
|
|
2423
|
-
cameraDepths:
|
|
2424
|
-
cameraWeights:
|
|
2505
|
+
cameraDepth: e.cameraDepth,
|
|
2506
|
+
cameraDepths: e.cameraDepths,
|
|
2507
|
+
cameraWeights: e.cameraWeights,
|
|
2425
2508
|
outline: !1
|
|
2426
|
-
},
|
|
2427
|
-
|
|
2428
|
-
points:
|
|
2429
|
-
cameraDepth:
|
|
2430
|
-
cameraDepths:
|
|
2431
|
-
cameraWeights:
|
|
2509
|
+
}, a = i.get(n) ?? [];
|
|
2510
|
+
a.push(r), i.set(n, a), p.push({
|
|
2511
|
+
points: e.points,
|
|
2512
|
+
cameraDepth: e.cameraDepth,
|
|
2513
|
+
cameraDepths: e.cameraDepths,
|
|
2514
|
+
cameraWeights: e.cameraWeights,
|
|
2432
2515
|
layer: 1,
|
|
2433
|
-
paint: () =>
|
|
2516
|
+
paint: () => Nt(t, r)
|
|
2434
2517
|
});
|
|
2435
2518
|
}
|
|
2436
2519
|
};
|
|
2437
|
-
if (
|
|
2438
|
-
else for (let e of
|
|
2439
|
-
let t =
|
|
2440
|
-
|
|
2520
|
+
if (re) for (let e of J) l(e, _, _.lineCap);
|
|
2521
|
+
else for (let e of Y) {
|
|
2522
|
+
let t = n(e.ownerIndex);
|
|
2523
|
+
l(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
|
|
2441
2524
|
}
|
|
2442
|
-
for (let [
|
|
2525
|
+
for (let [e, n] of i) Ft(t, n, "outline", e.lineFill, o);
|
|
2443
2526
|
}
|
|
2444
|
-
let
|
|
2445
|
-
if ((
|
|
2446
|
-
let n =
|
|
2527
|
+
let oe = (re ? d.showMarker === !0 || n(d) : d.showMarker === !0) && d.markerSymbol !== "none";
|
|
2528
|
+
if ((r.chartType.toLowerCase().includes("line") || re) && (oe || m(d))) for (let e = 0; e < M.length; e++) {
|
|
2529
|
+
let n = M[e];
|
|
2447
2530
|
if (!n) continue;
|
|
2448
|
-
let
|
|
2449
|
-
if (
|
|
2450
|
-
let
|
|
2451
|
-
|
|
2531
|
+
let i = H[c].get(e), s = u(d, i, "circle", oe);
|
|
2532
|
+
if (s === "none") continue;
|
|
2533
|
+
let l = i?.markerSize ?? d.markerSize ?? 5, f = Kt(r, d, i, e, c, d.color ?? ut[c % ut.length], a);
|
|
2534
|
+
h.push(() => zt(t, n, s, Math.max(2, l) * a, f.fill === "00000000" ? "transparent" : `#${f.fill.replace(/^#/, "")}`, f.line === "00000000" ? "rgba(0,0,0,0)" : `#${f.line.replace(/^#/, "")}`, f.lineWidth, f.fillPaint, o, a, f.effectDirect, f.effectFallback, f.effectIndex, f.effectFallbackIndex, f.linePaint, f.lineDash, f.lineCustomDash, f.lineCap, f.lineJoin));
|
|
2452
2535
|
}
|
|
2453
|
-
for (let
|
|
2454
|
-
let
|
|
2455
|
-
if (!
|
|
2456
|
-
let
|
|
2457
|
-
|
|
2536
|
+
for (let e = 0; e < M.length; e++) {
|
|
2537
|
+
let n = M[e];
|
|
2538
|
+
if (!n) continue;
|
|
2539
|
+
let u = j(c, e), f = H[c].get(e), p = f?.markerSize ?? d.markerSize ?? 5, m = ee[c].get(e);
|
|
2540
|
+
Vt(r, d, m) && V.push(() => Bt(t, r, d, c, e, b ? u / 100 : u, n, i, a, d.showMarker === !0 || f?.markerSymbol != null ? p * a / 2 : 0, void 0, m, "t", n, !0, r.valAxisDisplayUnits, L.max, l ? s[c][e] : u, o));
|
|
2458
2541
|
}
|
|
2459
2542
|
}
|
|
2460
|
-
if (
|
|
2461
|
-
for (let e of
|
|
2462
|
-
for (let e of
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
let
|
|
2466
|
-
if (t !== "low" && t !== "high") return
|
|
2467
|
-
let n =
|
|
2468
|
-
if (e === "value" ===
|
|
2469
|
-
let e =
|
|
2543
|
+
if (g) return It(t, i), !0;
|
|
2544
|
+
for (let e of Ge(p)) e.paint();
|
|
2545
|
+
for (let e of h) e();
|
|
2546
|
+
}
|
|
2547
|
+
an(t, r, y, L, S, D, E, a, c ? "horizontal" : "vertical"), fn(t, r, y, L, S, D, E, c ? "horizontal" : "vertical", s, a), Gt(t, r, i, y, L, S, D, E, c ? "horizontal" : "vertical", s, a);
|
|
2548
|
+
let U = dn(r, y, L, S, D, E, c ? "horizontal" : "vertical"), te = (e, t) => {
|
|
2549
|
+
if (t !== "low" && t !== "high") return U;
|
|
2550
|
+
let n = y.topology.nearDepth, r = U.axisX, i = U.axisY;
|
|
2551
|
+
if (e === "value" === c) {
|
|
2552
|
+
let e = z.y, r = z.y + z.h, a = y.project(z.x + z.w / 2, e, n), o = y.project(z.x + z.w / 2, r, n), s = a.y >= o.y ? e : r;
|
|
2470
2553
|
i = t === "low" ? s : s === e ? r : e;
|
|
2471
2554
|
} else {
|
|
2472
|
-
let e =
|
|
2555
|
+
let e = z.x, i = z.x + z.w, a = y.project(e, z.y + z.h / 2, n), o = y.project(i, z.y + z.h / 2, n), s = a.x <= o.x ? e : i;
|
|
2473
2556
|
r = t === "low" ? s : s === e ? i : e;
|
|
2474
2557
|
}
|
|
2475
2558
|
return {
|
|
2476
2559
|
axisX: r,
|
|
2477
2560
|
axisY: i,
|
|
2478
2561
|
depth: n,
|
|
2479
|
-
horizontalStart:
|
|
2480
|
-
horizontalEnd:
|
|
2481
|
-
verticalStart:
|
|
2482
|
-
verticalEnd:
|
|
2562
|
+
horizontalStart: y.project(z.x, i, n),
|
|
2563
|
+
horizontalEnd: y.project(z.x + z.w, i, n),
|
|
2564
|
+
verticalStart: y.project(r, z.y + z.h, n),
|
|
2565
|
+
verticalEnd: y.project(r, z.y, n)
|
|
2483
2566
|
};
|
|
2484
|
-
}, W =
|
|
2485
|
-
if (
|
|
2486
|
-
let { axisX:
|
|
2487
|
-
|
|
2488
|
-
let l =
|
|
2489
|
-
for (let
|
|
2490
|
-
let
|
|
2491
|
-
|
|
2567
|
+
}, W = te("value", r.valAxisTickLabelPos), G = te("category", r.catAxisTickLabelPos), K = v(r.valAxisFontSizeHpt, a) ?? 9 * a;
|
|
2568
|
+
if (t.font = `${r.valAxisFontItalic ? "italic " : ""}${r.valAxisFontBold ? "bold " : ""}${K}px ${Tt(r.valAxisFontFace)}`, t.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", t.textAlign = c ? "center" : "right", t.textBaseline = c ? "top" : "middle", !r.valAxisHidden && r.valAxisTickLabelPos !== "none") {
|
|
2569
|
+
let { axisX: e, axisY: n, depth: i } = W, o = y.project(z.x + z.w / 2, z.y + z.h / 2, i), s = on(c ? W.horizontalStart : W.verticalStart, c ? W.horizontalEnd : W.verticalEnd, o, c ? "vertical" : "horizontal");
|
|
2570
|
+
t.textAlign = Math.abs(s.x) < .2 ? "center" : s.x < 0 ? "right" : "left", t.textBaseline = Math.abs(s.y) < .2 ? "middle" : s.y < 0 ? "bottom" : "top";
|
|
2571
|
+
let l = un(r.valAxisMajorTickMark, r.valAxisLineHidden, a, 5), u = r.valAxisDisplayUnits?.divisor;
|
|
2572
|
+
for (let a of L.majorTicks) {
|
|
2573
|
+
let o = c ? y.project(z.x + L.fraction(a) * z.w, n, i) : y.project(e, z.y + z.h - L.fraction(a) * z.h, i);
|
|
2574
|
+
t.fillText(w(b ? a / 100 : u != null && Number.isFinite(u) && u > 0 ? a / u : a, b ? r.valAxisFormatCode ?? "0%" : r.valAxisFormatCode, r.date1904), o.x + s.x * l, o.y + s.y * l);
|
|
2492
2575
|
}
|
|
2493
2576
|
}
|
|
2494
|
-
let
|
|
2495
|
-
if (
|
|
2496
|
-
let
|
|
2497
|
-
if (
|
|
2498
|
-
let
|
|
2499
|
-
for (let
|
|
2500
|
-
let
|
|
2501
|
-
|
|
2577
|
+
let J = v(r.catAxisFontSizeHpt, a) ?? 9 * a;
|
|
2578
|
+
if (t.font = `${r.catAxisFontItalic ? "italic " : ""}${r.catAxisFontBold ? "bold " : ""}${J}px ${Tt(r.catAxisFontFace)}`, t.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", !r.catAxisHidden && r.catAxisTickLabelPos !== "none") {
|
|
2579
|
+
let e = f(un(r.catAxisMajorTickMark, r.catAxisLineHidden, a, 6), r.catAxisLabelOffsetPercent), n = Array.from({ length: S }, (e, t) => d(String(x[t] ?? t + 1), r.catAxisFormatCode, r.date1904)), i = Lt(r);
|
|
2580
|
+
if (i == null && (i = 0, !c && S > 1)) {
|
|
2581
|
+
let e = Infinity, r = null, a = G.axisY;
|
|
2582
|
+
for (let t = 0; t < S; t++) {
|
|
2583
|
+
let n = T(t, S, D, E), i = y.project(z.x + n * z.w, a, y.topology.nearDepth);
|
|
2584
|
+
r && (e = Math.min(e, Math.hypot(i.x - r.x, i.y - r.y))), r = i;
|
|
2502
2585
|
}
|
|
2503
|
-
Math.max(0, ...
|
|
2586
|
+
Math.max(0, ...n.map((e) => t.measureText(e).width)) > e * .9 && (i = -Math.PI / 4);
|
|
2504
2587
|
}
|
|
2505
|
-
let
|
|
2506
|
-
for (let
|
|
2507
|
-
let
|
|
2508
|
-
if (
|
|
2509
|
-
let
|
|
2510
|
-
|
|
2588
|
+
let o = Math.max(1, Math.floor(r.catAxisTickLabelSkip ?? 1));
|
|
2589
|
+
for (let r = 0; r < S; r += o) {
|
|
2590
|
+
let a = T(r, S, D, E), { axisX: o, axisY: s, depth: l } = G, u = c ? y.project(o, z.y + T(r, S, D, E) * z.h, l) : y.project(z.x + a * z.w, s, l);
|
|
2591
|
+
if (c) {
|
|
2592
|
+
let i = y.project(o, z.y + z.h / 2, l), a = y.project(z.x + z.w / 2, z.y + z.h / 2, l), s = i.x <= a.x;
|
|
2593
|
+
t.textAlign = s ? "right" : "left", t.textBaseline = "middle", t.fillText(n[r], u.x + (s ? -e : e), u.y);
|
|
2511
2594
|
} else {
|
|
2512
|
-
let
|
|
2513
|
-
|
|
2595
|
+
let a = y.project(z.x + z.w / 2, z.y + z.h / 2, l), o = on(G.horizontalStart, G.horizontalEnd, a, "vertical");
|
|
2596
|
+
Rt(t, n[r], u, i, c, o.y < 0 ? -1 : 1, e);
|
|
2514
2597
|
}
|
|
2515
2598
|
}
|
|
2516
2599
|
}
|
|
2517
|
-
|
|
2518
|
-
for (let e of
|
|
2519
|
-
return
|
|
2600
|
+
Wt(t, r, i, h, c, a);
|
|
2601
|
+
for (let e of V) e();
|
|
2602
|
+
return Yt(t, r, g, a, !1, _, o), !0;
|
|
2520
2603
|
}
|
|
2521
|
-
function
|
|
2522
|
-
if (!
|
|
2523
|
-
let
|
|
2524
|
-
if (!
|
|
2525
|
-
let
|
|
2604
|
+
function mn(t, n, r, i, a) {
|
|
2605
|
+
if (!n.threeD || n.chartType !== "pie") return !1;
|
|
2606
|
+
let o = n.series[0];
|
|
2607
|
+
if (!o) return !0;
|
|
2608
|
+
let s = o.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
|
|
2526
2609
|
index: t,
|
|
2527
2610
|
value: Math.abs(e)
|
|
2528
|
-
}] : []),
|
|
2529
|
-
for (let e of
|
|
2530
|
-
if (!(
|
|
2531
|
-
let l =
|
|
2611
|
+
}] : []), c = 0;
|
|
2612
|
+
for (let e of s) c = Math.max(c, e.value);
|
|
2613
|
+
if (!(c > 0)) return !0;
|
|
2614
|
+
let l = s.reduce((e, t) => e + t.value / c, 0);
|
|
2532
2615
|
if (!(l > 0) || !Number.isFinite(l)) return !0;
|
|
2533
|
-
let { plot: u, legend: d, legendMeasure: f } =
|
|
2534
|
-
...
|
|
2535
|
-
rotationY:
|
|
2616
|
+
let { plot: u, legend: d, legendMeasure: f } = Ht(t, n, r, i, "radial", a), p = he({
|
|
2617
|
+
...n.threeD,
|
|
2618
|
+
rotationY: n.threeD.rotationY ?? 0,
|
|
2536
2619
|
heightPercent: void 0,
|
|
2537
2620
|
depthPercent: 100
|
|
2538
2621
|
}, u, {
|
|
@@ -2540,136 +2623,145 @@ function $t(e, t, n, r, i) {
|
|
|
2540
2623
|
sceneHeightScale: .15
|
|
2541
2624
|
});
|
|
2542
2625
|
if (!p) return !0;
|
|
2543
|
-
let m = new Map(
|
|
2626
|
+
let m = new Map(o.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), h = 0;
|
|
2544
2627
|
for (let e of m.values()) e.explosion != null && Number.isFinite(e.explosion) && (h = Math.max(h, Math.max(0, Math.min(100, e.explosion)) / 100));
|
|
2545
2628
|
let { scene: g } = p, _ = Math.min(g.w * .45 / (1 + h), p.modelDepth * .45 / (1 + h), g.h / .45);
|
|
2546
2629
|
if (!(_ > 0)) return !0;
|
|
2547
|
-
let
|
|
2548
|
-
for (let e of
|
|
2549
|
-
let
|
|
2630
|
+
let y = g.x + g.w / 2, b = g.y + g.h / 2, x = .5, S = _ * .3 * be(n.threeD), w = 0, T = [], E = new Map(o.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), D = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
|
|
2631
|
+
for (let e of s) {
|
|
2632
|
+
let t = e.value / c / l, r = Zt(n.firstSliceAngle, w, t), i = m.get(e.index), a = Q(n, o, i, e.index, 0), s = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = y + Math.cos(s) * _ * u, f = x + Math.sin(s) * _ * u / p.modelDepth, h = Math.max(2, Math.ceil(D * t)), g = Le({
|
|
2550
2633
|
centerX: d,
|
|
2551
|
-
centerY:
|
|
2634
|
+
centerY: b,
|
|
2552
2635
|
centerDepth: f,
|
|
2553
2636
|
radius: _,
|
|
2554
2637
|
modelDepth: p.modelDepth,
|
|
2555
|
-
thickness:
|
|
2638
|
+
thickness: S,
|
|
2556
2639
|
startAngle: r.start,
|
|
2557
2640
|
endAngle: r.end,
|
|
2558
2641
|
segments: h
|
|
2559
2642
|
});
|
|
2560
2643
|
if (!g) {
|
|
2561
|
-
|
|
2644
|
+
w += t;
|
|
2562
2645
|
continue;
|
|
2563
2646
|
}
|
|
2564
|
-
|
|
2647
|
+
T.push({
|
|
2565
2648
|
index: e.index,
|
|
2566
2649
|
start: r.start,
|
|
2567
2650
|
end: r.end,
|
|
2568
|
-
color:
|
|
2569
|
-
fillPaint:
|
|
2651
|
+
color: a.fill === null ? "transparent" : a.color,
|
|
2652
|
+
fillPaint: a.fill,
|
|
2570
2653
|
value: e.value,
|
|
2571
|
-
percentValue:
|
|
2654
|
+
percentValue: t,
|
|
2572
2655
|
centerX: d,
|
|
2573
2656
|
centerDepth: f,
|
|
2574
2657
|
segments: h,
|
|
2575
2658
|
mesh: g,
|
|
2576
|
-
lineColor:
|
|
2577
|
-
lineFill:
|
|
2578
|
-
lineWidthEmu:
|
|
2579
|
-
lineDash:
|
|
2580
|
-
lineCustomDash:
|
|
2581
|
-
lineCap:
|
|
2582
|
-
lineJoin:
|
|
2583
|
-
}),
|
|
2584
|
-
}
|
|
2585
|
-
p =
|
|
2586
|
-
let
|
|
2587
|
-
remaining:
|
|
2659
|
+
lineColor: a.lineColor,
|
|
2660
|
+
lineFill: a.lineFill,
|
|
2661
|
+
lineWidthEmu: a.lineWidthEmu ?? null,
|
|
2662
|
+
lineDash: a.lineDash ?? "solid",
|
|
2663
|
+
lineCustomDash: a.lineCustomDash,
|
|
2664
|
+
lineCap: a.lineCap,
|
|
2665
|
+
lineJoin: a.lineJoin
|
|
2666
|
+
}), w += t;
|
|
2667
|
+
}
|
|
2668
|
+
p = Se(p, T.flatMap((e) => e.mesh.vertices), u, .08);
|
|
2669
|
+
let O = [], k = {
|
|
2670
|
+
remaining: Ke,
|
|
2588
2671
|
exceeded: !1
|
|
2589
|
-
},
|
|
2590
|
-
let t = e.lineWidthEmu == null ? .75 *
|
|
2672
|
+
}, A = (e) => {
|
|
2673
|
+
let t = e.lineWidthEmu == null ? .75 * i : Math.max(.25, e.lineWidthEmu / X * i);
|
|
2591
2674
|
return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
|
|
2592
2675
|
color: e.lineColor ?? "rgba(0,0,0,0.42)",
|
|
2593
2676
|
width: t,
|
|
2594
|
-
dash:
|
|
2677
|
+
dash: ae(e.lineCustomDash, e.lineDash, t),
|
|
2595
2678
|
cap: e.lineCap,
|
|
2596
2679
|
join: e.lineJoin
|
|
2597
2680
|
} : void 0;
|
|
2598
|
-
},
|
|
2599
|
-
let n =
|
|
2600
|
-
return
|
|
2601
|
-
|
|
2681
|
+
}, j = T.map((e) => {
|
|
2682
|
+
let n = jt(p, e.mesh, e.color, void 0, k);
|
|
2683
|
+
return Ft(t, n, "fill", e.fillPaint, a), {
|
|
2684
|
+
slice: e,
|
|
2685
|
+
faces: n
|
|
2686
|
+
};
|
|
2687
|
+
}), M = j.flatMap((e) => e.faces), N = [], P = T.map(A), F = P[0], I = (e) => e == null ? null : [
|
|
2602
2688
|
e.color,
|
|
2603
2689
|
e.width,
|
|
2604
2690
|
e.dash.join(","),
|
|
2605
2691
|
e.cap,
|
|
2606
2692
|
e.join
|
|
2607
|
-
].join("|"),
|
|
2608
|
-
if (
|
|
2609
|
-
else for (let
|
|
2610
|
-
let n =
|
|
2693
|
+
].join("|"), L = F != null && T.every((e) => e.lineFill === void 0) && P.every((e) => I(e) === I(F)) && T.every((e) => Math.abs(e.centerX - y) < 1e-9 && Math.abs(e.centerDepth - x) < 1e-9);
|
|
2694
|
+
if (L) N.push(...Mt(p, T, b, _, S, F, k));
|
|
2695
|
+
else for (let e = 0; e < T.length; e++) {
|
|
2696
|
+
let n = P[e];
|
|
2611
2697
|
if (!n) continue;
|
|
2612
|
-
let r =
|
|
2613
|
-
|
|
2614
|
-
}
|
|
2615
|
-
if (
|
|
2616
|
-
if (
|
|
2617
|
-
for (let
|
|
2618
|
-
for (let
|
|
2619
|
-
} else for (let
|
|
2620
|
-
for (let
|
|
2621
|
-
let
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2698
|
+
let r = jt(p, T[e].mesh, "transparent", n, k, !0);
|
|
2699
|
+
Ft(t, r, "outline", T[e].lineFill, a), N.push(...r);
|
|
2700
|
+
}
|
|
2701
|
+
if (k.exceeded) return It(t, r), !0;
|
|
2702
|
+
if (L) {
|
|
2703
|
+
for (let e of Ge(M)) Nt(t, e);
|
|
2704
|
+
for (let e of Ge(N)) Nt(t, e);
|
|
2705
|
+
} else for (let e of Ge([...M, ...N])) Nt(t, e);
|
|
2706
|
+
for (let { slice: r, faces: a } of j) {
|
|
2707
|
+
let s = m.get(r.index), c = De(n, o, r.index, 0), l = e(s?.chartexStyle);
|
|
2708
|
+
ne(t, l ?? e(o.chartexStyle), q(n, "dataPoint3D", 0), l ? r.index : c, i, (e) => Pt(e, a), c);
|
|
2709
|
+
}
|
|
2710
|
+
for (let e of T) {
|
|
2711
|
+
let r = (e.start + e.end) / 2, s = E.get(e.index);
|
|
2712
|
+
if (Vt(n, o, s)) {
|
|
2713
|
+
let c = o.seriesDataLabels, l = v(s?.fontSizeHpt ?? c?.fontSizeHpt ?? n.dataLabelFontSizeHpt, i) ?? 9 * i;
|
|
2714
|
+
t.font = `${s?.fontBold ?? c?.fontBold ?? n.dataLabelFontBold ? "bold " : ""}${l}px ${$(n, s?.fontFace ?? c?.fontFace ?? n.dataLabelFontFace)}`;
|
|
2715
|
+
let d = C({
|
|
2626
2716
|
customText: s?.text,
|
|
2627
|
-
showCategory: s?.showCatName ??
|
|
2628
|
-
showSeries: s?.showSerName ??
|
|
2629
|
-
showValue: s?.showVal ??
|
|
2630
|
-
showPercent: s?.showPercent ??
|
|
2631
|
-
category:
|
|
2632
|
-
seriesName:
|
|
2633
|
-
sourceValue:
|
|
2634
|
-
percentRatio:
|
|
2635
|
-
formatCode: s?.formatCode ??
|
|
2636
|
-
separator: s?.separator ??
|
|
2637
|
-
date1904:
|
|
2638
|
-
}),
|
|
2717
|
+
showCategory: s?.showCatName ?? c?.showCatName ?? !1,
|
|
2718
|
+
showSeries: s?.showSerName ?? c?.showSerName ?? !1,
|
|
2719
|
+
showValue: s?.showVal ?? c?.showVal ?? n.showDataLabels,
|
|
2720
|
+
showPercent: s?.showPercent ?? c?.showPercent ?? !1,
|
|
2721
|
+
category: o.categories?.[e.index] ?? n.categories[e.index] ?? `${e.index + 1}`,
|
|
2722
|
+
seriesName: o.name || "Series 1",
|
|
2723
|
+
sourceValue: e.value,
|
|
2724
|
+
percentRatio: e.percentValue,
|
|
2725
|
+
formatCode: s?.formatCode ?? c?.formatCode ?? n.dataLabelFormatCode ?? o.valFormatCode,
|
|
2726
|
+
separator: s?.separator ?? c?.separator,
|
|
2727
|
+
date1904: n.date1904
|
|
2728
|
+
}), f = $(n, s?.fontFace ?? c?.fontFace ?? n.dataLabelFontFace), m = s?.text && s.richRuns?.length ? ge(t, {
|
|
2639
2729
|
runs: s.richRuns,
|
|
2640
|
-
ptToPx:
|
|
2641
|
-
fontFamily:
|
|
2642
|
-
fallbackBold: s.fontBold ??
|
|
2643
|
-
fontFamilyForFace: (e) =>
|
|
2644
|
-
},
|
|
2645
|
-
for (let
|
|
2646
|
-
let
|
|
2647
|
-
|
|
2730
|
+
ptToPx: i,
|
|
2731
|
+
fontFamily: f,
|
|
2732
|
+
fallbackBold: s.fontBold ?? c?.fontBold ?? n.dataLabelFontBold ?? !1,
|
|
2733
|
+
fontFamilyForFace: (e) => $(n, e)
|
|
2734
|
+
}, l, `#${s.fontColor ?? c?.fontColor ?? o.labelColor ?? n.dataLabelFontColor ?? "111111"}`) : null, h = s?.position ?? c?.position ?? n.dataLabelPosition, g = b - S / 2, y = b + S / 2, x = p.cameraDepth(e.centerX, g, e.centerDepth) >= p.cameraDepth(e.centerX, y, e.centerDepth) ? g : y, w = 0, T = null;
|
|
2735
|
+
for (let t = 0; t <= 12; t++) {
|
|
2736
|
+
let n = e.start + (e.end - e.start) * t / 12, r = p.project(e.centerX + Math.cos(n) * _ * .64, x, e.centerDepth + Math.sin(n) * _ * .64 / p.modelDepth);
|
|
2737
|
+
T && (w += Math.hypot(r.x - T.x, r.y - T.y)), T = r;
|
|
2648
2738
|
}
|
|
2649
|
-
let
|
|
2650
|
-
|
|
2739
|
+
let E = (h == null || h === "bestFit") && (e.percentValue === 0 || w < (m?.width ?? t.measureText(d).width)) || h === "outEnd", D = _ * (E ? 1.12 : .64), k = p.project(e.centerX + Math.cos(r) * D, x, e.centerDepth + Math.sin(r) * D / p.modelDepth), A = p.project(e.centerX + Math.cos(r) * _, x, e.centerDepth + Math.sin(r) * _ / p.modelDepth);
|
|
2740
|
+
O.push(() => Bt(t, n, o, 0, e.index, e.value, k, u, i, 0, e.percentValue, s, "ctr", A, E, void 0, void 0, void 0, a));
|
|
2651
2741
|
}
|
|
2652
2742
|
}
|
|
2653
|
-
for (let e of
|
|
2654
|
-
let
|
|
2655
|
-
let
|
|
2656
|
-
|
|
2743
|
+
for (let e of O) e();
|
|
2744
|
+
let R = o.categories?.length ? o.categories : n.categories, z = Array.from({ length: R.length }, (e, t) => {
|
|
2745
|
+
let r = m.get(t), i = Oe(n, o, r, t, 0);
|
|
2746
|
+
if (i === null) return "00000000";
|
|
2747
|
+
let a = i?.fillType === "solid" ? i.color : r?.color ?? o.dataPointColors?.[t] ?? o.color;
|
|
2748
|
+
return a === "00000000" ? "00000000" : Ce(a ? `#${a}` : gt(t), .8).replace(/^#/, "");
|
|
2657
2749
|
});
|
|
2658
|
-
return
|
|
2659
|
-
...
|
|
2660
|
-
categories:
|
|
2750
|
+
return Yt(t, {
|
|
2751
|
+
...n,
|
|
2752
|
+
categories: R,
|
|
2661
2753
|
series: [{
|
|
2662
|
-
...
|
|
2663
|
-
categories:
|
|
2664
|
-
dataPointColors:
|
|
2754
|
+
...o,
|
|
2755
|
+
categories: R,
|
|
2756
|
+
dataPointColors: z
|
|
2665
2757
|
}]
|
|
2666
|
-
}, d,
|
|
2758
|
+
}, d, i, !0, f, a), !0;
|
|
2667
2759
|
}
|
|
2668
|
-
function
|
|
2669
|
-
return !t.threeD || !(t.chartType === "pie" ||
|
|
2760
|
+
function hn(e, t, n, r, i = 0) {
|
|
2761
|
+
return !t.threeD || !(t.chartType === "pie" || pt.has(t.chartType)) ? !1 : xt(t) ? mn(e, t, n, r, i) ? !0 : pn(e, t, n, r, i) : (It(e, n), !0);
|
|
2670
2762
|
}
|
|
2671
2763
|
//#endregion
|
|
2672
2764
|
//#region src/three-d.ts
|
|
2673
|
-
var
|
|
2765
|
+
var gn = Ee({ render: hn }, "threeD");
|
|
2674
2766
|
//#endregion
|
|
2675
|
-
export {
|
|
2767
|
+
export { gn as threeD };
|