@silurus/ooxml 0.84.1 → 0.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -18
- package/dist/assets/render-worker-BRKOyWVH.js +24 -0
- package/dist/assets/render-worker-CtLMFj9r.js +10 -0
- package/dist/assets/render-worker-NZPOUOTU.js +11 -0
- package/dist/{canvas-viewer-mechanics-CIfhCgYA.js → canvas-viewer-mechanics-CfRzOhz5.js} +308 -234
- package/dist/chart-ex.mjs +270 -270
- package/dist/{comment-ui-runtime-CdMMApEN.js → comment-ui-runtime-CAbpuWi_.js} +4 -4
- package/dist/{comment-ui-runtime-C5qimVMD.js → comment-ui-runtime-DAKBCpsM.js} +5 -5
- package/dist/comment-ui-runtime-DTaaZdXC.js +2 -0
- package/dist/{comments-BAlAyIhb.js → comments-Brfxa3hQ.js} +1 -1
- package/dist/{document-pull-client-BXw6AAhY.js → document-pull-client-BkHHIdR4.js} +4661 -4357
- package/dist/{docx-BA1vB0V-.js → docx-_uelcAui.js} +338 -304
- package/dist/docx.mjs +7 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-DS6BVyHA.js → dom-interaction-boundary-CMDDgICk.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/line-distribute-CiKeWjBF.js +1023 -0
- package/dist/{line-metrics-CXyjyYd5.js → line-metrics-u87yCAfV.js} +2182 -705
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +404 -394
- package/dist/pixel-budget-Dgjw269h.js +37 -0
- package/dist/{plot-area-frame-DuXZzovH.js → plot-area-frame-D5hEOgkJ.js} +691 -1418
- package/dist/{pptx-C17oBD8Z.js → pptx-WpBbS0mq.js} +255 -222
- package/dist/pptx.mjs +7 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/raster-target-whZhvVMt.js +87 -0
- package/dist/region-map.mjs +5 -5
- package/dist/{render-CVeGktZG.js → render-DrAAZWwH.js} +9 -6
- package/dist/{render-worker-host-BbhwA24Y.js → render-worker-host-CBVe8aeD.js} +1 -1
- package/dist/{render-worker-host-BWdhjVH_.js → render-worker-host-CHlwYJdK.js} +1 -1
- package/dist/{render-worker-host-CbaQivE7.js → render-worker-host-XDMsyVsv.js} +1 -1
- package/dist/{renderer-Bmky2yBc.js → renderer-XFSCOT6m.js} +1937 -1936
- package/dist/resource-measurement-6uR3Huao.js +150 -0
- package/dist/{session-Cl0RVnMs.js → session-DoPwA4gv.js} +79 -79
- package/dist/{slide-pull-client-BS0EeZo2.js → slide-pull-client-8i8C4VyD.js} +1054 -824
- package/dist/{three-d-B7LsKeOS.js → three-d-YYghQndN.js} +109 -110
- package/dist/three-d.mjs +726 -726
- package/dist/tiff.mjs +664 -78
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +31 -13
- package/dist/types/index.d.ts +46 -21
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +11 -7
- package/dist/types/pptx.d.ts +35 -15
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +13 -3
- package/dist/types/xlsx.d.ts +30 -13
- package/dist/{worksheet-pull-client-B0zfEVau.js → worksheet-pull-client-Btydoxto.js} +47 -47
- package/dist/{xlsx-FyKAiNo-.js → xlsx-Bd16V4Xx.js} +1395 -1196
- package/dist/xlsx.mjs +7 -6
- package/package.json +2 -2
- package/dist/assets/render-worker-BWPpayBu.js +0 -10
- package/dist/assets/render-worker-CiEWCh_T.js +0 -11
- package/dist/assets/render-worker-Cpmy3GDF.js +0 -24
- package/dist/comment-ui-runtime-aPzHfV_A.js +0 -2
- package/dist/line-distribute-MqInuujx.js +0 -1003
- package/dist/resource-measurement-esyGbzAF.js +0 -120
- package/dist/tiff-contract-Xjn3qXqK.js +0 -69
- /package/dist/{comment-occurrence-C34fWs_F.js → comment-occurrence-tj54AXXB.js} +0 -0
- /package/dist/{highlight-rect-MaCt0om0.js → highlight-rect-DBcYVJDv.js} +0 -0
- /package/dist/{mathjax-DPEX346v.js → mathjax-DS69BmJd.js} +0 -0
- /package/dist/{read-only-comment-decoration-BYCXoSdC.js → read-only-comment-decoration-Mv_SAiHy.js} +0 -0
- /package/dist/{read-only-comment-margin-C7b3l0ro.js → read-only-comment-margin-Cqu-Ir0C.js} +0 -0
- /package/dist/{renderer-module-contract-C6sYZvTV.js → renderer-module-contract-Cu-GKuPd.js} +0 -0
- /package/dist/{source-key-DORuuFb-.js → source-key-BkBB3X82.js} +0 -0
- /package/dist/{transfer-vNOFQuvv.js → transfer-mIj7E7NB.js} +0 -0
- /package/dist/{visible-index-DwJzuGmJ.js → visible-index-DPoQYSDt.js} +0 -0
package/dist/three-d.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { D as
|
|
4
|
-
import { t as
|
|
5
|
-
function
|
|
1
|
+
import { B as e, Bt as t, Ct as n, E as r, Et as i, Ft as a, Gt as o, H as s, Ht as c, Jt as l, Kt as u, M as d, Mt as f, Nt as p, Ot as m, Pt as h, Qt as g, Rt as _, St as v, Tt as y, W as b, Wt as x, X as S, Xt as C, Z as w, Zt as T, _t as E, a as D, b as O, bt as k, ct as ee, gt as A, jt as j, kt as M, lt as N, mt as P, n as F, ot as te, r as ne, st as I, t as L, ut as R, v as z, wt as re, x as B, xt as ie, yt as ae, zt as V } from "./plot-area-frame-D5hEOgkJ.js";
|
|
2
|
+
import { a as H, r as U } from "./units-EJdC96r6.js";
|
|
3
|
+
import { D as W, E as G, O as oe, _ as K, a as q, c as se, d as J, g as ce, h as le, i as ue, k as de, m as fe, n as pe, o as me, r as he, s as ge, t as _e, x as ve } from "./three-d-YYghQndN.js";
|
|
4
|
+
import { t as ye } from "./renderer-module-contract-Cu-GKuPd.js";
|
|
5
|
+
function be(e) {
|
|
6
6
|
switch (e) {
|
|
7
7
|
case "cylinder":
|
|
8
8
|
case "cone":
|
|
@@ -12,8 +12,8 @@ function ye(e) {
|
|
|
12
12
|
default: return "box";
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
var
|
|
16
|
-
function
|
|
15
|
+
var xe = (e) => Math.max(0, Math.min(1, e));
|
|
16
|
+
function Se(e, t) {
|
|
17
17
|
if (t.length < 3) return null;
|
|
18
18
|
let n = e[t[0]];
|
|
19
19
|
for (let r = 1; r + 1 < t.length; r++) for (let i = r + 1; i < t.length; i++) {
|
|
@@ -38,7 +38,7 @@ function xe(e, t) {
|
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Ce(e, t) {
|
|
42
42
|
let n = e.reduce((t, n) => ({
|
|
43
43
|
x: t.x + n.x / e.length,
|
|
44
44
|
y: t.y + n.y / e.length,
|
|
@@ -49,7 +49,7 @@ function Se(e, t) {
|
|
|
49
49
|
depth: 0
|
|
50
50
|
});
|
|
51
51
|
return t.map((t) => {
|
|
52
|
-
let r =
|
|
52
|
+
let r = Se(e, t.indices);
|
|
53
53
|
if (!r) return t;
|
|
54
54
|
let i = t.indices.reduce((n, r) => ({
|
|
55
55
|
x: n.x + e[r].x / t.indices.length,
|
|
@@ -70,7 +70,7 @@ function Se(e, t) {
|
|
|
70
70
|
};
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function we(e) {
|
|
74
74
|
let { horizontal: t, crossStart: n, crossSize: r, baseCoord: i, endCoord: a, nearDepth: o, farDepth: s } = e;
|
|
75
75
|
if (![
|
|
76
76
|
n,
|
|
@@ -80,7 +80,7 @@ function Ce(e) {
|
|
|
80
80
|
o,
|
|
81
81
|
s
|
|
82
82
|
].every(Number.isFinite) || r <= 0 || i === a || o === s) return null;
|
|
83
|
-
let c =
|
|
83
|
+
let c = be(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 = xe(e.baseScale ?? (d ? e.toMaxBaseScale ?? 1 : 1)), m = xe(e.endScale ?? (u ? d ? e.toMaxEndScale ?? 0 : 0 : 1));
|
|
84
84
|
if (p === 0 && m === 0) return null;
|
|
85
85
|
let h = n + r / 2, g = r / 2, _ = (o + s) / 2, v = Math.abs(s - o) / 2, y = [], b = (e, n) => {
|
|
86
86
|
if (n === 0) {
|
|
@@ -147,11 +147,11 @@ function Ce(e) {
|
|
|
147
147
|
return {
|
|
148
148
|
shape: c,
|
|
149
149
|
vertices: y,
|
|
150
|
-
faces:
|
|
150
|
+
faces: Ce(y, w),
|
|
151
151
|
silhouetteEdges: T
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Te(e) {
|
|
155
155
|
let { x0: t, x1: n, lower0: r, lower1: i, upper0: a, upper1: o, nearDepth: s, farDepth: c, capStart: l, capEnd: u } = e;
|
|
156
156
|
if (![
|
|
157
157
|
t,
|
|
@@ -211,7 +211,7 @@ function we(e) {
|
|
|
211
211
|
return {
|
|
212
212
|
shape: "areaStrip",
|
|
213
213
|
vertices: _,
|
|
214
|
-
faces:
|
|
214
|
+
faces: Ce(_, [
|
|
215
215
|
{
|
|
216
216
|
indices: [
|
|
217
217
|
0,
|
|
@@ -276,17 +276,17 @@ function we(e) {
|
|
|
276
276
|
silhouetteEdges: []
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Ee(e) {
|
|
280
280
|
let t = e.upper0 - e.lower0, n = e.upper1 - e.lower1;
|
|
281
281
|
if (Number.isFinite(t) && Number.isFinite(n) && t * n < 0) {
|
|
282
282
|
let r = t / (t - n), i = e.x0 + (e.x1 - e.x0) * r, a = e.lower0 + (e.lower1 - e.lower0) * r;
|
|
283
|
-
return [
|
|
283
|
+
return [Te({
|
|
284
284
|
...e,
|
|
285
285
|
x1: i,
|
|
286
286
|
lower1: a,
|
|
287
287
|
upper1: a,
|
|
288
288
|
capEnd: !1
|
|
289
|
-
}),
|
|
289
|
+
}), Te({
|
|
290
290
|
...e,
|
|
291
291
|
x0: i,
|
|
292
292
|
lower0: a,
|
|
@@ -294,10 +294,10 @@ function Te(e) {
|
|
|
294
294
|
capStart: !1
|
|
295
295
|
})].filter((e) => e != null);
|
|
296
296
|
}
|
|
297
|
-
let r =
|
|
297
|
+
let r = Te(e);
|
|
298
298
|
return r ? [r] : [];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function De(e) {
|
|
301
301
|
let t = e.outline;
|
|
302
302
|
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
303
|
let n = Math.min(e.nearDepth, e.farDepth), r = Math.max(e.nearDepth, e.farDepth), i = t.length, a = [...t.map((e) => ({
|
|
@@ -310,7 +310,7 @@ function Ee(e) {
|
|
|
310
310
|
return {
|
|
311
311
|
shape: "lineRibbon",
|
|
312
312
|
vertices: a,
|
|
313
|
-
faces:
|
|
313
|
+
faces: Ce(a, [
|
|
314
314
|
{
|
|
315
315
|
indices: o,
|
|
316
316
|
role: "side",
|
|
@@ -338,7 +338,7 @@ function Ee(e) {
|
|
|
338
338
|
silhouetteEdges: []
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Oe(e) {
|
|
342
342
|
let { centerX: t, centerY: n, centerDepth: r, radius: i, modelDepth: a, thickness: o, startAngle: s, endAngle: c } = e;
|
|
343
343
|
if (![
|
|
344
344
|
t,
|
|
@@ -430,13 +430,13 @@ function De(e) {
|
|
|
430
430
|
return {
|
|
431
431
|
shape: "pieSector",
|
|
432
432
|
vertices: m,
|
|
433
|
-
faces:
|
|
433
|
+
faces: Ce(m, v),
|
|
434
434
|
silhouetteEdges: h.slice(0, u ? void 0 : -1).map((e, t) => [e, g[t]])
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region packages/core/src/chart/three-d-scene.ts
|
|
439
|
-
function
|
|
439
|
+
function ke(e, t) {
|
|
440
440
|
if (![e, t].every(Number.isFinite)) return null;
|
|
441
441
|
let n = t - e;
|
|
442
442
|
if (n === 0) return e >= 0 && e <= 1 ? {
|
|
@@ -449,7 +449,7 @@ function Oe(e, t) {
|
|
|
449
449
|
endT: o
|
|
450
450
|
} : null;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Ae(e, t, n, r) {
|
|
453
453
|
if (![
|
|
454
454
|
e,
|
|
455
455
|
t,
|
|
@@ -478,12 +478,12 @@ function ke(e, t, n, r) {
|
|
|
478
478
|
}
|
|
479
479
|
return l;
|
|
480
480
|
}
|
|
481
|
-
var
|
|
481
|
+
var je = (e) => ({
|
|
482
482
|
minX: Math.min(...e.map((e) => e.x)),
|
|
483
483
|
maxX: Math.max(...e.map((e) => e.x)),
|
|
484
484
|
minY: Math.min(...e.map((e) => e.y)),
|
|
485
485
|
maxY: Math.max(...e.map((e) => e.y))
|
|
486
|
-
}),
|
|
486
|
+
}), Me = (e, t) => {
|
|
487
487
|
let n = !1;
|
|
488
488
|
for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
|
|
489
489
|
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 +491,7 @@ var Ae = (e) => ({
|
|
|
491
491
|
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
492
|
}
|
|
493
493
|
return n;
|
|
494
|
-
},
|
|
494
|
+
}, Ne = (e, t, n, r) => {
|
|
495
495
|
let i = {
|
|
496
496
|
x: t.x - e.x,
|
|
497
497
|
y: t.y - e.y
|
|
@@ -509,23 +509,23 @@ var Ae = (e) => ({
|
|
|
509
509
|
y: e.y + i.y * c
|
|
510
510
|
};
|
|
511
511
|
};
|
|
512
|
-
function
|
|
512
|
+
function Pe(e, t, n, r) {
|
|
513
513
|
let i = [], a = (e) => {
|
|
514
514
|
i.length >= 12 || i.some((t) => Math.hypot(t.x - e.x, t.y - e.y) < 1e-7) || i.push(e);
|
|
515
515
|
}, o = {
|
|
516
516
|
x: (Math.max(n.minX, r.minX) + Math.min(n.maxX, r.maxX)) / 2,
|
|
517
517
|
y: (Math.max(n.minY, r.minY) + Math.min(n.maxY, r.maxY)) / 2
|
|
518
518
|
};
|
|
519
|
-
|
|
520
|
-
for (let n of e)
|
|
521
|
-
for (let n of t)
|
|
519
|
+
Me(e, o) && Me(t, o) && a(o);
|
|
520
|
+
for (let n of e) Me(t, n) && a(n);
|
|
521
|
+
for (let n of t) Me(e, n) && a(n);
|
|
522
522
|
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 =
|
|
523
|
+
let i = Ne(e[n], e[(n + 1) % e.length], t[r], t[(r + 1) % t.length]);
|
|
524
524
|
i && a(i);
|
|
525
525
|
}
|
|
526
526
|
return i;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Fe(e, t) {
|
|
529
529
|
let n = e.cameraDepths;
|
|
530
530
|
if (!n || n.length !== e.points.length || e.points.length < 3) return e.cameraDepth;
|
|
531
531
|
let r = e.cameraWeights?.length === e.points.length ? e.cameraWeights : e.points.map(() => 1), i = e.points[0];
|
|
@@ -539,17 +539,17 @@ function Pe(e, t) {
|
|
|
539
539
|
}
|
|
540
540
|
return e.cameraDepth;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Ie(e) {
|
|
543
543
|
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) =>
|
|
544
|
+
let t = [...e.keys()].sort((t, n) => e[t].cameraDepth - e[n].cameraDepth || t - n), n = e.map((e) => je(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
545
|
for (let c of r) {
|
|
546
546
|
for (let e = o.length - 1; e >= 0; e--) n[o[e]].maxX < n[c].minX - 1e-9 && o.splice(e, 1);
|
|
547
547
|
for (let r of o) {
|
|
548
548
|
if (++s > 2e5) return t.map((t) => e[t]);
|
|
549
549
|
if (n[r].maxY < n[c].minY - 1e-9 || n[c].maxY < n[r].minY - 1e-9) continue;
|
|
550
|
-
let o =
|
|
550
|
+
let o = Pe(e[r].points, e[c].points, n[r], n[c]), l = 0;
|
|
551
551
|
for (let t of o) {
|
|
552
|
-
let n =
|
|
552
|
+
let n = Fe(e[r], t) - Fe(e[c], t), i = 1e-8 * Math.max(1, Math.abs(e[r].cameraDepth), Math.abs(e[c].cameraDepth));
|
|
553
553
|
if (Math.abs(n) <= i) continue;
|
|
554
554
|
let a = n < 0 ? -1 : 1;
|
|
555
555
|
if (l !== 0 && l !== a) {
|
|
@@ -575,29 +575,29 @@ function Fe(e) {
|
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region packages/core/src/chart/three-d-stroke.ts
|
|
578
|
-
var
|
|
578
|
+
var Y = 1e-9, Le = 1e4, Re = (e, t, n) => ({
|
|
579
579
|
x: e.x + (t.x - e.x) * n,
|
|
580
580
|
y: e.y + (t.y - e.y) * n,
|
|
581
581
|
cameraDepth: e.cameraDepth + (t.cameraDepth - e.cameraDepth) * n,
|
|
582
582
|
cameraWeight: (e.cameraWeight ?? 1) + ((t.cameraWeight ?? 1) - (e.cameraWeight ?? 1)) * n
|
|
583
|
-
}),
|
|
584
|
-
function
|
|
585
|
-
let r = t.filter((e) => Number.isFinite(e) && e >
|
|
583
|
+
}), ze = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= Y;
|
|
584
|
+
function Be(e, t, n = 0) {
|
|
585
|
+
let r = t.filter((e) => Number.isFinite(e) && e > Y);
|
|
586
586
|
if (r.length === 0) return e.length >= 2 ? [[...e]] : [];
|
|
587
587
|
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 >
|
|
588
|
+
let i = [], a = 0, o = r[0], s = !0, c = r.reduce((e, t) => e + t, 0), l = c > Y && Number.isFinite(n) ? (n % c + c) % c : 0;
|
|
589
|
+
for (; l > Y;) {
|
|
590
590
|
let e = Math.min(l, o);
|
|
591
|
-
l -= e, o -= e, o <=
|
|
591
|
+
l -= e, o -= e, o <= Y && (a = (a + 1) % r.length, o = r[a], s = a % 2 == 0);
|
|
592
592
|
}
|
|
593
593
|
let u = null;
|
|
594
594
|
for (let t = 0; t + 1 < e.length; t++) {
|
|
595
595
|
let n = e[t], c = e[t + 1], l = Math.hypot(c.x - n.x, c.y - n.y);
|
|
596
|
-
if (!(l >
|
|
596
|
+
if (!(l > Y)) continue;
|
|
597
597
|
let d = 0;
|
|
598
|
-
for (; d < l -
|
|
599
|
-
let e = Math.min(o, l - d), t =
|
|
600
|
-
if (s && (u ??= [], (u.length === 0 || !
|
|
598
|
+
for (; d < l - Y;) {
|
|
599
|
+
let e = Math.min(o, l - d), t = Re(n, c, d / l), f = Re(n, c, (d + e) / l);
|
|
600
|
+
if (s && (u ??= [], (u.length === 0 || !ze(u.at(-1), t)) && u.push(t), u.push(f)), d += e, o -= e, o <= Y) {
|
|
601
601
|
if (s && u && u.length >= 2) {
|
|
602
602
|
if (i.length >= 1e4) return null;
|
|
603
603
|
i.push(u);
|
|
@@ -610,13 +610,13 @@ function ze(e, t, n = 0) {
|
|
|
610
610
|
if (i.length >= 1e4) return null;
|
|
611
611
|
i.push(u);
|
|
612
612
|
}
|
|
613
|
-
if (i.length > 1 &&
|
|
613
|
+
if (i.length > 1 && ze(e[0], e.at(-1)) && ze(i[0][0], e[0]) && ze(i.at(-1).at(-1), e.at(-1))) {
|
|
614
614
|
let e = i.shift(), t = i.pop();
|
|
615
615
|
i.unshift([...t, ...e.slice(1)]);
|
|
616
616
|
}
|
|
617
617
|
return i;
|
|
618
618
|
}
|
|
619
|
-
var
|
|
619
|
+
var Ve = (e, t) => ({
|
|
620
620
|
kind: e,
|
|
621
621
|
points: t.map(({ x: e, y: t }) => ({
|
|
622
622
|
x: e,
|
|
@@ -625,7 +625,7 @@ var Be = (e, t) => ({
|
|
|
625
625
|
cameraDepths: t.map((e) => e.cameraDepth),
|
|
626
626
|
cameraWeights: t.map((e) => e.cameraWeight ?? 1),
|
|
627
627
|
cameraDepth: t.reduce((e, t) => e + t.cameraDepth, 0) / t.length
|
|
628
|
-
}),
|
|
628
|
+
}), He = (e, t, n) => {
|
|
629
629
|
let r = [];
|
|
630
630
|
for (let n = 0; n < 12; n++) {
|
|
631
631
|
let i = Math.PI * 2 * n / 12;
|
|
@@ -635,17 +635,17 @@ var Be = (e, t) => ({
|
|
|
635
635
|
y: e.y + Math.sin(i) * t
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
-
return
|
|
638
|
+
return Ve(n, r);
|
|
639
639
|
};
|
|
640
|
-
function
|
|
640
|
+
function Ue(e, t, n) {
|
|
641
641
|
let r = Number.isFinite(n.width) ? Math.max(0, n.width) : 0;
|
|
642
|
-
if (!(r >
|
|
642
|
+
if (!(r > Y) || t.length < 3) return null;
|
|
643
643
|
let i = r / 2;
|
|
644
|
-
if ((n.lineJoin ?? "miter") === "round") return
|
|
644
|
+
if ((n.lineJoin ?? "miter") === "round") return He(e, i, "join");
|
|
645
645
|
let a = [];
|
|
646
646
|
for (let n of t) {
|
|
647
647
|
let t = n.x - e.x, r = n.y - e.y, o = Math.hypot(t, r);
|
|
648
|
-
if (!(o >
|
|
648
|
+
if (!(o > Y)) continue;
|
|
649
649
|
let s = -r / o * i, c = t / o * i;
|
|
650
650
|
a.push({
|
|
651
651
|
...e,
|
|
@@ -661,20 +661,20 @@ function He(e, t, n) {
|
|
|
661
661
|
a.sort((e, t) => e.x - t.x || e.y - t.y);
|
|
662
662
|
let o = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), s = [];
|
|
663
663
|
for (let e of a) {
|
|
664
|
-
for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <=
|
|
664
|
+
for (; s.length >= 2 && o(s.at(-2), s.at(-1), e) <= Y;) s.pop();
|
|
665
665
|
s.push(e);
|
|
666
666
|
}
|
|
667
667
|
let c = [];
|
|
668
668
|
for (let e of [...a].reverse()) {
|
|
669
|
-
for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <=
|
|
669
|
+
for (; c.length >= 2 && o(c.at(-2), c.at(-1), e) <= Y;) c.pop();
|
|
670
670
|
c.push(e);
|
|
671
671
|
}
|
|
672
672
|
let l = [...s.slice(0, -1), ...c.slice(0, -1)];
|
|
673
|
-
return l.length >= 3 ?
|
|
673
|
+
return l.length >= 3 ? Ve("join", l) : null;
|
|
674
674
|
}
|
|
675
|
-
var
|
|
675
|
+
var We = (e, t, n, r) => {
|
|
676
676
|
let i = t.x * r.y - t.y * r.x;
|
|
677
|
-
if (Math.abs(i) <=
|
|
677
|
+
if (Math.abs(i) <= Y) return null;
|
|
678
678
|
let a = {
|
|
679
679
|
x: n.x - e.x,
|
|
680
680
|
y: n.y - e.y
|
|
@@ -684,17 +684,17 @@ var Ue = (e, t, n, r) => {
|
|
|
684
684
|
y: e.y + t.y * o
|
|
685
685
|
};
|
|
686
686
|
};
|
|
687
|
-
function
|
|
687
|
+
function Ge(e, t) {
|
|
688
688
|
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 =
|
|
689
|
+
if (!(n > Y) || e.length < 2) return [];
|
|
690
|
+
let r = n / 2, i = t.lineCap ?? "butt", a = t.lineJoin ?? "miter", o = Math.max(1, t.miterLimit ?? 10), s = [], c = Be(e, t.dash ?? [], t.dashOffset);
|
|
691
691
|
if (c == null) return null;
|
|
692
692
|
let l = (e) => s.length >= 1e4 ? !1 : (s.push(e), !0);
|
|
693
693
|
for (let n = 0; n < c.length; n++) {
|
|
694
|
-
let s = c[n], u = s.length > 2 &&
|
|
694
|
+
let s = c[n], u = s.length > 2 && ze(s[0], s.at(-1)), d = n === 0 && ze(s[0], e[0]) ? t.startCap ?? i : i, f = n + 1 === c.length && ze(s.at(-1), e.at(-1)) ? t.endCap ?? i : i, p = [];
|
|
695
695
|
for (let e = 0; e + 1 < s.length; e++) {
|
|
696
696
|
let t = s[e], n = s[e + 1], r = Math.hypot(n.x - t.x, n.y - t.y);
|
|
697
|
-
p.push(r >
|
|
697
|
+
p.push(r > Y ? {
|
|
698
698
|
x: (n.x - t.x) / r,
|
|
699
699
|
y: (n.y - t.y) / r
|
|
700
700
|
} : null);
|
|
@@ -714,7 +714,7 @@ function We(e, t) {
|
|
|
714
714
|
x: s[e + 1].x + n.x * _,
|
|
715
715
|
y: s[e + 1].y + n.y * _
|
|
716
716
|
};
|
|
717
|
-
if (!l(
|
|
717
|
+
if (!l(Ve("segment", [
|
|
718
718
|
{
|
|
719
719
|
...v,
|
|
720
720
|
x: v.x + i.x,
|
|
@@ -737,12 +737,12 @@ function We(e, t) {
|
|
|
737
737
|
}
|
|
738
738
|
]))) return null;
|
|
739
739
|
}
|
|
740
|
-
if (!u && d === "round" && !l(
|
|
740
|
+
if (!u && d === "round" && !l(He(s[0], r, "cap")) || !u && f === "round" && !l(He(s.at(-1), r, "cap"))) return null;
|
|
741
741
|
let m = (e, t, n) => {
|
|
742
742
|
if (!t || !n) return !0;
|
|
743
743
|
let i = t.x * n.y - t.y * n.x;
|
|
744
|
-
if (Math.abs(i) <=
|
|
745
|
-
if (a === "round") return l(
|
|
744
|
+
if (Math.abs(i) <= Y) return !0;
|
|
745
|
+
if (a === "round") return l(He(e, r, "join"));
|
|
746
746
|
let s = i > 0 ? -1 : 1, c = {
|
|
747
747
|
...e,
|
|
748
748
|
x: e.x + -t.y * r * s,
|
|
@@ -753,8 +753,8 @@ function We(e, t) {
|
|
|
753
753
|
y: e.y + n.x * r * s
|
|
754
754
|
};
|
|
755
755
|
if (a === "miter") {
|
|
756
|
-
let i =
|
|
757
|
-
if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(
|
|
756
|
+
let i = We(c, t, u, n);
|
|
757
|
+
if (i && Math.hypot(i.x - e.x, i.y - e.y) <= r * o) return !!l(Ve("join", [
|
|
758
758
|
c,
|
|
759
759
|
{
|
|
760
760
|
...e,
|
|
@@ -763,7 +763,7 @@ function We(e, t) {
|
|
|
763
763
|
u
|
|
764
764
|
]));
|
|
765
765
|
}
|
|
766
|
-
return l(
|
|
766
|
+
return l(Ve("join", [
|
|
767
767
|
c,
|
|
768
768
|
e,
|
|
769
769
|
u
|
|
@@ -776,30 +776,30 @@ function We(e, t) {
|
|
|
776
776
|
}
|
|
777
777
|
//#endregion
|
|
778
778
|
//#region packages/core/src/chart/three-d-outline.ts
|
|
779
|
-
var
|
|
779
|
+
var Ke = 1e-9, qe = (e, t) => Math.hypot(e.x - t.x, e.y - t.y, e.depth - t.depth) <= Ke, Je = (e, t) => e.x - t.x || e.y - t.y || e.depth - t.depth, Ye = (e, t) => {
|
|
780
780
|
let n = Math.min(e.length, t.length);
|
|
781
781
|
for (let r = 0; r < n; r++) {
|
|
782
|
-
let n =
|
|
782
|
+
let n = Je(e[r], t[r]);
|
|
783
783
|
if (n !== 0) return n;
|
|
784
784
|
}
|
|
785
785
|
return e.length - t.length;
|
|
786
786
|
};
|
|
787
|
-
function
|
|
787
|
+
function Xe(e) {
|
|
788
788
|
let t = [...e].reverse();
|
|
789
|
-
return
|
|
789
|
+
return Ye(e, t) <= 0 ? e : t;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
let t =
|
|
791
|
+
function Ze(e) {
|
|
792
|
+
let t = qe(e[0], e.at(-1)) ? e.slice(0, -1) : [...e];
|
|
793
793
|
if (t.length === 0) return [];
|
|
794
794
|
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 =
|
|
795
|
+
for (let e = 1; e < t.length; e++) Je(t[e], t[n]) < 0 && (n = 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 = Ye(r, i) <= 0 ? r : i;
|
|
797
797
|
return [...a, a[0]];
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Qe(e) {
|
|
800
800
|
let t = [], n = (e) => {
|
|
801
|
-
let n = t.find((t) =>
|
|
802
|
-
if (n) return
|
|
801
|
+
let n = t.find((t) => qe(t.point, e));
|
|
802
|
+
if (n) return Je(e, n.point) < 0 && (n.point = e), n;
|
|
803
803
|
let r = {
|
|
804
804
|
point: e,
|
|
805
805
|
edges: [],
|
|
@@ -808,11 +808,11 @@ function Ze(e) {
|
|
|
808
808
|
return t.push(r), r;
|
|
809
809
|
}, r = [];
|
|
810
810
|
for (let [t, i] of e) {
|
|
811
|
-
if (
|
|
811
|
+
if (qe(t, i)) continue;
|
|
812
812
|
let e = n(t), a = n(i);
|
|
813
813
|
e !== a && r.push([e, a]);
|
|
814
814
|
}
|
|
815
|
-
t.sort((e, t) =>
|
|
815
|
+
t.sort((e, t) => Je(e.point, t.point)), t.forEach((e, t) => {
|
|
816
816
|
e.order = t;
|
|
817
817
|
});
|
|
818
818
|
let i = [], a = /* @__PURE__ */ new Set();
|
|
@@ -840,47 +840,47 @@ function Ze(e) {
|
|
|
840
840
|
}
|
|
841
841
|
return n;
|
|
842
842
|
}, c = [];
|
|
843
|
-
for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(
|
|
843
|
+
for (let e of t) if (e.edges.length !== 2) for (let t of e.edges) o.has(t) || c.push(Xe(s(e, t)));
|
|
844
844
|
for (let e = 0; e < i.length; e++) {
|
|
845
845
|
if (o.has(e)) continue;
|
|
846
846
|
let t = i[e], n = t.first.order <= t.second.order ? t.first : t.second;
|
|
847
|
-
c.push(
|
|
847
|
+
c.push(Ze(s(n, e)));
|
|
848
848
|
}
|
|
849
849
|
let l = t.filter((e) => e.edges.length > 2).map((e) => ({
|
|
850
850
|
point: e.point,
|
|
851
851
|
neighbours: e.edges.map((t) => {
|
|
852
852
|
let n = i[t];
|
|
853
853
|
return n.first === e ? n.second.point : n.first.point;
|
|
854
|
-
}).sort(
|
|
854
|
+
}).sort(Je)
|
|
855
855
|
}));
|
|
856
856
|
return {
|
|
857
|
-
paths: c.sort(
|
|
857
|
+
paths: c.sort(Ye),
|
|
858
858
|
junctions: l
|
|
859
859
|
};
|
|
860
860
|
}
|
|
861
861
|
//#endregion
|
|
862
862
|
//#region packages/core/src/chart/three-d-renderer.ts
|
|
863
|
-
function
|
|
863
|
+
function $e(e) {
|
|
864
864
|
let t = /* @__PURE__ */ new Map();
|
|
865
865
|
for (let n of e.legendEntries ?? []) t.set(n.idx, n);
|
|
866
866
|
return t;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
let
|
|
868
|
+
function et(e, t, n) {
|
|
869
|
+
let r = c(t?.fontSizeHpt ?? e.legendFontSizeHpt, n) ?? 9 * n, i = t?.fontFace ?? e.legendFontFace;
|
|
870
870
|
return {
|
|
871
|
-
fontPx:
|
|
872
|
-
font: `${t?.fontBold ?? e.legendFontBold ?? !1 ? "bold " : ""}${
|
|
871
|
+
fontPx: r,
|
|
872
|
+
font: `${t?.fontBold ?? e.legendFontBold ?? !1 ? "bold " : ""}${r}px ${ht(i)}`,
|
|
873
873
|
color: t?.fontColor ? `#${t.fontColor}` : e.legendFontColor ? `#${e.legendFontColor}` : "#595959"
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
|
-
var
|
|
876
|
+
var tt = [
|
|
877
877
|
"4472C4",
|
|
878
878
|
"ED7D31",
|
|
879
879
|
"70AD47",
|
|
880
880
|
"A5A5A5",
|
|
881
881
|
"FFC000",
|
|
882
882
|
"5B9BD5"
|
|
883
|
-
],
|
|
883
|
+
], nt = w, rt = S, it = new Set([
|
|
884
884
|
"line",
|
|
885
885
|
"stackedLine",
|
|
886
886
|
"stackedLinePct",
|
|
@@ -894,11 +894,11 @@ var et = [
|
|
|
894
894
|
"stackedBarPct",
|
|
895
895
|
"stackedBarHPct"
|
|
896
896
|
]);
|
|
897
|
-
function
|
|
898
|
-
let n = Number.isFinite(t) && t > 0 ? t /
|
|
897
|
+
function at(e, t) {
|
|
898
|
+
let n = Number.isFinite(t) && t > 0 ? t / H : 1, r = Number.isFinite(e) && e >= 0 ? e / U : 0;
|
|
899
899
|
return Math.max(.25, r) * n;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function ot(e, t) {
|
|
902
902
|
let n = Number.isSafeInteger(t) && t > 0 ? t : 0, r = Array.from({ length: n }, () => []);
|
|
903
903
|
for (let t of e) {
|
|
904
904
|
let e = t.categoryIndex;
|
|
@@ -906,18 +906,18 @@ function at(e, t) {
|
|
|
906
906
|
}
|
|
907
907
|
return r;
|
|
908
908
|
}
|
|
909
|
-
var
|
|
910
|
-
function
|
|
909
|
+
var st = (e, t) => `#${t?.color ?? tt[e % tt.length]}`;
|
|
910
|
+
function ct(e, t, n) {
|
|
911
911
|
let r = 0;
|
|
912
912
|
for (let i of e) for (let e of [t(i), n(i)]) {
|
|
913
913
|
if (e == null) continue;
|
|
914
|
-
let t =
|
|
915
|
-
if (e.fillType === "gradient" && t >
|
|
914
|
+
let t = R(e);
|
|
915
|
+
if (e.fillType === "gradient" && t > nt || t > rt - r) return !1;
|
|
916
916
|
r += t;
|
|
917
917
|
}
|
|
918
918
|
return !0;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function lt(e, t) {
|
|
921
921
|
let n = Array.from({ length: t }, () => ({
|
|
922
922
|
maxMagnitude: 0,
|
|
923
923
|
scaledTotal: 0
|
|
@@ -932,7 +932,7 @@ function ct(e, t) {
|
|
|
932
932
|
}
|
|
933
933
|
return n;
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function ut(e, t, n, r) {
|
|
936
936
|
let i = e.series[t]?.values[n] ?? 0;
|
|
937
937
|
if (!Number.isFinite(i)) return 0;
|
|
938
938
|
if (!r) return i;
|
|
@@ -942,18 +942,18 @@ function lt(e, t, n, r) {
|
|
|
942
942
|
};
|
|
943
943
|
return a > 0 && o > 0 ? i / a / o * 100 : 0;
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function X(e, t) {
|
|
946
946
|
let n = e + t;
|
|
947
947
|
return Number.isFinite(n) ? n : t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function dt(e) {
|
|
950
950
|
let t = [];
|
|
951
951
|
for (let [n, r] of [
|
|
952
952
|
[e.threeD?.floor, "floor"],
|
|
953
953
|
[e.threeD?.sideWall, "wall"],
|
|
954
954
|
[e.threeD?.backWall, "wall"]
|
|
955
955
|
]) {
|
|
956
|
-
let i =
|
|
956
|
+
let i = b(e, n, r);
|
|
957
957
|
t.push({
|
|
958
958
|
fill: i.fill,
|
|
959
959
|
line: i.line
|
|
@@ -966,7 +966,7 @@ function ut(e) {
|
|
|
966
966
|
for (let i = 0; i < n.values.length; i++) {
|
|
967
967
|
let a = n.values[i];
|
|
968
968
|
if (a == null || !Number.isFinite(a) || Math.abs(a) <= 0) continue;
|
|
969
|
-
let o =
|
|
969
|
+
let o = Z(e, n, r.get(i), i, 0);
|
|
970
970
|
t.push({
|
|
971
971
|
fill: o.fill,
|
|
972
972
|
line: o.lineFill
|
|
@@ -974,7 +974,7 @@ function ut(e) {
|
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
} 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 ?
|
|
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 ? lt(e, o) : void 0, c = (t, n) => {
|
|
978
978
|
if (t === n) return !1;
|
|
979
979
|
let r = Math.min(t, n), i = Math.max(t, n), o = e.valMin, s = e.valMax;
|
|
980
980
|
return o != null && Number.isFinite(o) && i <= o || s != null && Number.isFinite(s) && r >= s ? !1 : !a || i > 0;
|
|
@@ -984,9 +984,9 @@ function ut(e) {
|
|
|
984
984
|
for (let p = 0; p < o; p++) {
|
|
985
985
|
let o = d.values[p];
|
|
986
986
|
if (!(o != null && Number.isFinite(o) && (!a || o > 0) || o == null && i)) continue;
|
|
987
|
-
let m =
|
|
987
|
+
let m = ut(e, r, p, s), h = n ? m >= 0 ? l[p] : u[p] : 0, g = X(h, m);
|
|
988
988
|
if (n && (m >= 0 ? l[p] = g : u[p] = g), !c(h, g)) continue;
|
|
989
|
-
let _ =
|
|
989
|
+
let _ = Z(e, d, f.get(p), p, r);
|
|
990
990
|
t.push({
|
|
991
991
|
fill: _.fill,
|
|
992
992
|
line: _.lineFill
|
|
@@ -994,11 +994,11 @@ function ut(e) {
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
} 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 ?
|
|
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 ? lt(e, s) : void 0, l = e.series.map(() => Array(s).fill(0));
|
|
998
998
|
if (r) {
|
|
999
999
|
let t = Array(s).fill(0), n = Array(s).fill(0);
|
|
1000
1000
|
for (let r = 0; r < e.series.length; r++) for (let i = 0; i < s; i++) {
|
|
1001
|
-
let a =
|
|
1001
|
+
let a = ut(e, r, i, c), o = X(a >= 0 ? t[i] : n[i], a);
|
|
1002
1002
|
l[r][i] = o, a >= 0 ? t[i] = o : n[i] = o;
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
@@ -1008,12 +1008,12 @@ function ut(e) {
|
|
|
1008
1008
|
let f = u.values[s];
|
|
1009
1009
|
if (f != null && Number.isFinite(f) && (!o || f > 0) || f == null && a) {
|
|
1010
1010
|
p++;
|
|
1011
|
-
let a = r ? l[i][s] :
|
|
1011
|
+
let a = r ? l[i][s] : ut(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
1012
|
if (p >= 2 && (n || u.smooth === !0 || !_)) {
|
|
1013
1013
|
if (h = !0, n) break;
|
|
1014
1014
|
let r = d.get(s);
|
|
1015
|
-
if (
|
|
1016
|
-
let n =
|
|
1015
|
+
if (pt(r)) {
|
|
1016
|
+
let n = Z(e, u, r, s, i);
|
|
1017
1017
|
t.push({
|
|
1018
1018
|
fill: void 0,
|
|
1019
1019
|
line: n.lineFill
|
|
@@ -1024,7 +1024,7 @@ function ut(e) {
|
|
|
1024
1024
|
} else (e.dispBlanksAs ?? "gap") === "gap" && (p = 0, m = null);
|
|
1025
1025
|
}
|
|
1026
1026
|
if (!h) continue;
|
|
1027
|
-
let _ =
|
|
1027
|
+
let _ = Z(e, u, void 0, i, i);
|
|
1028
1028
|
n ? t.push({
|
|
1029
1029
|
fill: _.fill,
|
|
1030
1030
|
line: _.lineFill
|
|
@@ -1034,9 +1034,9 @@ function ut(e) {
|
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
return
|
|
1037
|
+
return ct(t, (e) => e.fill, (e) => e.line);
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function ft(e, t) {
|
|
1040
1040
|
return e?.fillType === "solid" ? {
|
|
1041
1041
|
color: `#${e.color}`,
|
|
1042
1042
|
fill: void 0
|
|
@@ -1045,52 +1045,52 @@ function dt(e, t) {
|
|
|
1045
1045
|
fill: e
|
|
1046
1046
|
};
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
let o =
|
|
1050
|
-
if (
|
|
1051
|
-
else if (r?.fillHidden === !0 || r?.color === "00000000")
|
|
1052
|
-
else if (r?.color)
|
|
1048
|
+
function Z(t, n, r, i, a) {
|
|
1049
|
+
let o = n.dataPointColors?.[i] ? `#${n.dataPointColors[i]}` : st(a, n), c = t.chartType === "pie" || t.varyColors === !0 && t.series.length === 1 && t.chartType.includes("Bar") ? i : a, l, u = o, d = e(r?.chartexStyle, i);
|
|
1050
|
+
if (d !== void 0) ({color: u, fill: l} = ft(d, u));
|
|
1051
|
+
else if (r?.fillHidden === !0 || r?.color === "00000000") l = null;
|
|
1052
|
+
else if (r?.color) u = `#${r.color}`;
|
|
1053
1053
|
else {
|
|
1054
|
-
let
|
|
1055
|
-
if (
|
|
1054
|
+
let r = e(n.chartexStyle, c);
|
|
1055
|
+
if (r !== void 0) ({color: u, fill: l} = ft(r, u));
|
|
1056
1056
|
else {
|
|
1057
|
-
let
|
|
1058
|
-
|
|
1057
|
+
let n = e(t.chartStyleRoles?.dataPoint3D, c);
|
|
1058
|
+
n !== void 0 && ({color: u, fill: l} = ft(n, u));
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
|
-
let
|
|
1062
|
-
if (
|
|
1063
|
-
else if (r?.lineHidden === !0)
|
|
1064
|
-
else if (r?.lineColor)
|
|
1061
|
+
let f, p = null, m = s(r?.chartexStyle, i);
|
|
1062
|
+
if (m !== void 0) m?.fillType === "solid" ? p = `#${m.color}` : f = m;
|
|
1063
|
+
else if (r?.lineHidden === !0) f = null;
|
|
1064
|
+
else if (r?.lineColor) p = `#${r.lineColor}`;
|
|
1065
1065
|
else {
|
|
1066
|
-
let
|
|
1067
|
-
if (
|
|
1068
|
-
else if (
|
|
1069
|
-
else if (
|
|
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
1070
|
else {
|
|
1071
|
-
let
|
|
1072
|
-
|
|
1071
|
+
let e = s(t.chartStyleRoles?.dataPoint3D, c);
|
|
1072
|
+
e !== void 0 && (e?.fillType === "solid" ? p = `#${e.color}` : f = e);
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
|
-
let
|
|
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;
|
|
1076
1076
|
return {
|
|
1077
|
-
color:
|
|
1078
|
-
fill:
|
|
1079
|
-
lineColor:
|
|
1080
|
-
lineFill:
|
|
1081
|
-
lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ??
|
|
1082
|
-
lineDash: r?.lineDash ?? r?.chartexStyle?.lineDash ??
|
|
1083
|
-
lineCustomDash: r?.chartexStyle?.lineCustomDash ??
|
|
1084
|
-
lineCap:
|
|
1085
|
-
lineJoin:
|
|
1077
|
+
color: u,
|
|
1078
|
+
fill: l,
|
|
1079
|
+
lineColor: p,
|
|
1080
|
+
lineFill: f,
|
|
1081
|
+
lineWidthEmu: r?.lineWidthEmu ?? r?.chartexStyle?.lineWidthEmu ?? n.lineWidthEmu ?? n.chartexStyle?.lineWidthEmu ?? h?.lineWidthEmu,
|
|
1082
|
+
lineDash: r?.lineDash ?? r?.chartexStyle?.lineDash ?? n.chartexStyle?.lineDash ?? h?.lineDash,
|
|
1083
|
+
lineCustomDash: r?.chartexStyle?.lineCustomDash ?? n.chartexStyle?.lineCustomDash ?? h?.lineCustomDash,
|
|
1084
|
+
lineCap: g === "rnd" ? "round" : g === "sq" ? "square" : "butt",
|
|
1085
|
+
lineJoin: _ === "round" || _ === "bevel" ? _ : "miter"
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function pt(e) {
|
|
1089
1089
|
if (!e) return !1;
|
|
1090
1090
|
let t = e.chartexStyle;
|
|
1091
1091
|
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
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function mt(e, t) {
|
|
1094
1094
|
let n = e.cameraNormal(t);
|
|
1095
1095
|
if (!n) return 1;
|
|
1096
1096
|
let r = {
|
|
@@ -1100,20 +1100,20 @@ function pt(e, t) {
|
|
|
1100
1100
|
}, 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
1101
|
return Math.max(.78, Math.min(1, .78 + .24 * a));
|
|
1102
1102
|
}
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1103
|
+
var ht = (e) => `"${e && !e.startsWith("+") ? e.replace(/["\\]/g, "") : "Arial"}"`, Q = (e, t, n = "minor") => ht((t?.startsWith("+mj-") ? e.themeMajorFontLatin : t?.startsWith("+mn-") ? e.themeMinorFontLatin : t) ?? (n === "major" ? e.themeMajorFontLatin : e.themeMinorFontLatin));
|
|
1104
|
+
function gt(e, t) {
|
|
1105
1105
|
if (t.length) {
|
|
1106
1106
|
e.beginPath(), e.moveTo(t[0].x, t[0].y);
|
|
1107
1107
|
for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
|
|
1108
1108
|
e.closePath();
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
var
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1111
|
+
var _t = (e) => e === "transparent" || e === "#00000000" || e === "rgba(0,0,0,0)";
|
|
1112
|
+
function vt(e, t, n, r) {
|
|
1113
|
+
_t(n) || (gt(e, t), e.fillStyle = n, e.fill(), r > 0 && (gt(e, t), e.fillStyle = `rgba(0,0,0,${r})`, e.fill()));
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return
|
|
1115
|
+
function yt(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
1116
|
+
return Ee({
|
|
1117
1117
|
x0: t,
|
|
1118
1118
|
x1: n,
|
|
1119
1119
|
lower0: r,
|
|
@@ -1124,13 +1124,13 @@ function vt(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
|
1124
1124
|
farDepth: c,
|
|
1125
1125
|
capStart: u,
|
|
1126
1126
|
capEnd: d
|
|
1127
|
-
}).flatMap((t) =>
|
|
1127
|
+
}).flatMap((t) => xt(e, t, l).map((e) => ({
|
|
1128
1128
|
...e,
|
|
1129
1129
|
outline: !1,
|
|
1130
1130
|
outlineSegments: void 0
|
|
1131
1131
|
})));
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function bt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
1134
1134
|
if (![
|
|
1135
1135
|
r,
|
|
1136
1136
|
i,
|
|
@@ -1141,7 +1141,7 @@ function yt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
|
1141
1141
|
l,
|
|
1142
1142
|
u
|
|
1143
1143
|
].every(Number.isFinite) || a <= 0 || o <= 0 || s === c) return [];
|
|
1144
|
-
let v =
|
|
1144
|
+
let v = we({
|
|
1145
1145
|
shape: t,
|
|
1146
1146
|
horizontal: n,
|
|
1147
1147
|
crossStart: n ? i : r,
|
|
@@ -1155,9 +1155,9 @@ function yt(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = !1, h = !1, g, _) {
|
|
|
1155
1155
|
omitBaseCap: m,
|
|
1156
1156
|
omitEndCap: h
|
|
1157
1157
|
});
|
|
1158
|
-
return v ?
|
|
1158
|
+
return v ? xt(e, v, d, g, _) : [];
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function xt(e, t, n, r, i, a = !1) {
|
|
1161
1161
|
if (i?.exceeded) return [];
|
|
1162
1162
|
let o = t.faces.map((r) => {
|
|
1163
1163
|
let i = r.indices.map((e) => t.vertices[e]), a = e.cameraFacing(i);
|
|
@@ -1179,7 +1179,7 @@ function bt(e, t, n, r, i, a = !1) {
|
|
|
1179
1179
|
facing: a,
|
|
1180
1180
|
face: {
|
|
1181
1181
|
points: o,
|
|
1182
|
-
color:
|
|
1182
|
+
color: J(n, mt(e, i)),
|
|
1183
1183
|
paintRole: "fill",
|
|
1184
1184
|
shade: 0,
|
|
1185
1185
|
cameraDepth: i.reduce((t, n) => t + e.cameraDepth(n.x, n.y, n.depth), 0) / i.length,
|
|
@@ -1216,11 +1216,11 @@ function bt(e, t, n, r, i, a = !1) {
|
|
|
1216
1216
|
let t = [d ? void 0 : e.meshFace.baseRimEdge, f ? void 0 : e.meshFace.endRimEdge].filter((e) => e != null);
|
|
1217
1217
|
for (let [e, n] of t) l(e, n);
|
|
1218
1218
|
}
|
|
1219
|
-
let p =
|
|
1219
|
+
let p = Qe([...c.values()].map(([e, n]) => [t.vertices[e], t.vertices[n]]));
|
|
1220
1220
|
if (!r) return s;
|
|
1221
1221
|
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
1222
|
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 =
|
|
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 = Ge(n.map((e, t) => ({
|
|
1224
1224
|
...e,
|
|
1225
1225
|
cameraDepth: a[t],
|
|
1226
1226
|
cameraWeight: o[t]
|
|
@@ -1250,7 +1250,7 @@ function bt(e, t, n, r, i, a = !1) {
|
|
|
1250
1250
|
}));
|
|
1251
1251
|
}
|
|
1252
1252
|
for (let t of p.junctions) {
|
|
1253
|
-
let n =
|
|
1253
|
+
let n = Ue({
|
|
1254
1254
|
...e.project(t.point.x, t.point.y, t.point.depth),
|
|
1255
1255
|
cameraDepth: e.cameraDepth(t.point.x, t.point.y, t.point.depth),
|
|
1256
1256
|
cameraWeight: e.cameraProjectionWeight(t.point.x, t.point.y, t.point.depth)
|
|
@@ -1279,7 +1279,7 @@ function bt(e, t, n, r, i, a = !1) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
return s;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function St(e, t, n, r, i, a, o) {
|
|
1283
1283
|
if (!t.length || o.exceeded) return [];
|
|
1284
1284
|
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
1285
|
x: t.centerX + Math.cos(n) * r,
|
|
@@ -1291,7 +1291,7 @@ function xt(e, t, n, r, i, a, o) {
|
|
|
1291
1291
|
depth: e.centerDepth
|
|
1292
1292
|
}), h = [], g = (t, n = !1) => {
|
|
1293
1293
|
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 =
|
|
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 = Ge((n && !s ? [...t, r] : [...t]).map((t) => ({
|
|
1295
1295
|
...e.project(t.x, t.y, t.depth),
|
|
1296
1296
|
cameraDepth: e.cameraDepth(t.x, t.y, t.depth),
|
|
1297
1297
|
cameraWeight: e.cameraProjectionWeight(t.x, t.y, t.depth)
|
|
@@ -1371,10 +1371,10 @@ function xt(e, t, n, r, i, a, o) {
|
|
|
1371
1371
|
for (let { slice: e, angle: t } of C.values()) g([p(e, t, d), p(e, t, f)]);
|
|
1372
1372
|
return h;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
t.paint !== null && (t.paint === void 0 ?
|
|
1374
|
+
function Ct(e, t) {
|
|
1375
|
+
t.paint !== null && (t.paint === void 0 ? vt(e, t.points, t.color, t.shade) : (gt(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(B(t.outlineDash ?? "solid", e.lineWidth)), e.lineCap = t.outlineCap ?? "butt", e.lineJoin = t.outlineJoin ?? "miter", t.outline && (gt(e, t.points), e.stroke()), e.setLineDash([])));
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function wt(e, t, n, r, i) {
|
|
1378
1378
|
if (r === void 0) return;
|
|
1379
1379
|
let a = t.filter((e) => e.paintRole === n);
|
|
1380
1380
|
if (!a.length) return;
|
|
@@ -1382,258 +1382,258 @@ function Ct(e, t, n, r, i) {
|
|
|
1382
1382
|
for (let e of a) e.paint = null;
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
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 =
|
|
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 = z(r, e, s, l, c - s, u - l, i);
|
|
1386
1386
|
for (let e of a) e.paint = d;
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function Tt(e, t) {
|
|
1389
1389
|
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
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function Et(e) {
|
|
1392
1392
|
let t = e.catAxisLabelRotation;
|
|
1393
1393
|
return t == null ? null : !Number.isFinite(t) || Math.abs(t) > 54e5 ? 0 : t / 6e4 * Math.PI / 180;
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function Dt(e, t, n, r, i, a = 1, o = 6) {
|
|
1396
1396
|
if (i || r === 0) {
|
|
1397
1397
|
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
1398
|
return;
|
|
1399
1399
|
}
|
|
1400
1400
|
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
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
if (!(
|
|
1404
|
-
let
|
|
1405
|
-
switch (
|
|
1402
|
+
function Ot(e, t, n, r, i, a, o, s = void 0, c = 0, l = H) {
|
|
1403
|
+
if (!(r > 0) || !Number.isFinite(t.x) || !Number.isFinite(t.y)) return;
|
|
1404
|
+
let u = r / 2;
|
|
1405
|
+
switch (e.beginPath(), n) {
|
|
1406
1406
|
case "square":
|
|
1407
|
-
|
|
1407
|
+
e.rect(t.x - u, t.y - u, r, r);
|
|
1408
1408
|
break;
|
|
1409
1409
|
case "diamond":
|
|
1410
|
-
|
|
1410
|
+
e.moveTo(t.x, t.y - u), e.lineTo(t.x + u, t.y), e.lineTo(t.x, t.y + u), e.lineTo(t.x - u, t.y), e.closePath();
|
|
1411
1411
|
break;
|
|
1412
1412
|
case "triangle":
|
|
1413
|
-
|
|
1413
|
+
e.moveTo(t.x, t.y - u), e.lineTo(t.x + u, t.y + u), e.lineTo(t.x - u, t.y + u), e.closePath();
|
|
1414
1414
|
break;
|
|
1415
1415
|
case "x":
|
|
1416
1416
|
case "plus": {
|
|
1417
|
-
let
|
|
1418
|
-
|
|
1417
|
+
let r = n === "x";
|
|
1418
|
+
e.moveTo(t.x - u, t.y + (r ? -u : 0)), e.lineTo(t.x + u, t.y + (r ? u : 0)), e.moveTo(t.x + (r ? -u : 0), t.y + u), e.lineTo(t.x + (r ? u : 0), t.y - u), e.strokeStyle = a, e.lineWidth = o, e.stroke();
|
|
1419
1419
|
return;
|
|
1420
1420
|
}
|
|
1421
1421
|
case "dash":
|
|
1422
|
-
|
|
1422
|
+
e.rect(t.x - u, t.y - r * .1, r, r * .2);
|
|
1423
1423
|
break;
|
|
1424
1424
|
case "star":
|
|
1425
|
-
for (let
|
|
1426
|
-
let r = -Math.PI / 2 +
|
|
1427
|
-
|
|
1425
|
+
for (let n = 0; n < 10; n++) {
|
|
1426
|
+
let r = -Math.PI / 2 + n * Math.PI / 5, i = n % 2 == 0 ? u : u * .4, a = t.x + Math.cos(r) * i, o = t.y + Math.sin(r) * i;
|
|
1427
|
+
n ? e.lineTo(a, o) : e.moveTo(a, o);
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1429
|
+
e.closePath();
|
|
1430
1430
|
break;
|
|
1431
1431
|
case "dot":
|
|
1432
|
-
|
|
1432
|
+
e.ellipse(t.x, t.y, r * .25, r * .1, 0, 0, Math.PI * 2);
|
|
1433
1433
|
break;
|
|
1434
1434
|
case "picture":
|
|
1435
|
-
|
|
1435
|
+
s?.fillType === "image" && d(e, s, t.x - u, t.y - u, r, r, l, c), e.strokeStyle = a, e.lineWidth = o, e.strokeRect(t.x - u, t.y - u, r, r);
|
|
1436
1436
|
return;
|
|
1437
1437
|
default:
|
|
1438
|
-
|
|
1438
|
+
e.arc(t.x, t.y, u, 0, Math.PI * 2);
|
|
1439
1439
|
break;
|
|
1440
1440
|
}
|
|
1441
|
-
let f =
|
|
1442
|
-
p == null ? f && (
|
|
1441
|
+
let f = s?.fillType === "image" ? s : void 0, p = f ? null : s === void 0 ? i === "transparent" ? null : i : s == null ? null : z(s, e, t.x - u, t.y - u, r, r, c);
|
|
1442
|
+
p == null ? f && (e.save(), e.clip(), d(e, f, t.x - u, t.y - u, r, r, l, c), e.restore()) : (e.fillStyle = p, e.fill()), e.strokeStyle = a, e.lineWidth = o, e.stroke();
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1445
|
-
let
|
|
1446
|
-
if (
|
|
1447
|
-
let E =
|
|
1448
|
-
customText:
|
|
1444
|
+
function kt(e, t, r, a, o, s, l, u, d, f = 0, p, m, h = "t", g = l, _ = !0, b, x, S = s, C = 0) {
|
|
1445
|
+
let w = m, T = r.seriesDataLabels;
|
|
1446
|
+
if (v(T, w) || t.showDataLabelsOverMax !== !0 && x != null && Number.isFinite(x) && S > x) return;
|
|
1447
|
+
let E = w?.showVal ?? T?.showVal ?? t.showDataLabels, D = w?.showCatName ?? T?.showCatName ?? !1, O = w?.showSerName ?? T?.showSerName ?? !1, ee = w?.showPercent ?? T?.showPercent ?? !1, A = w?.text, j = fe({
|
|
1448
|
+
customText: A,
|
|
1449
1449
|
showCategory: D,
|
|
1450
1450
|
showSeries: O,
|
|
1451
1451
|
showValue: E,
|
|
1452
|
-
showPercent:
|
|
1453
|
-
category:
|
|
1454
|
-
seriesName:
|
|
1455
|
-
sourceValue:
|
|
1456
|
-
valueDivisor:
|
|
1452
|
+
showPercent: ee,
|
|
1453
|
+
category: r.categories?.[o] ?? t.categories[o] ?? `${o + 1}`,
|
|
1454
|
+
seriesName: r.name || `Series ${a + 1}`,
|
|
1455
|
+
sourceValue: s,
|
|
1456
|
+
valueDivisor: b?.divisor,
|
|
1457
1457
|
percentRatio: p != null && Number.isFinite(p) ? p : void 0,
|
|
1458
|
-
formatCode:
|
|
1459
|
-
percentFormatCode:
|
|
1458
|
+
formatCode: w?.formatCode ?? T?.formatCode ?? t.dataLabelFormatCode ?? r.valFormatCode,
|
|
1459
|
+
percentFormatCode: w?.formatCode ?? T?.formatCode ?? t.dataLabelFormatCode ?? "0%",
|
|
1460
1460
|
date1904: t.date1904,
|
|
1461
|
-
separator:
|
|
1461
|
+
separator: w?.separator ?? T?.separator
|
|
1462
1462
|
});
|
|
1463
|
-
if (!
|
|
1464
|
-
let N =
|
|
1465
|
-
e.font = `${F.fontItalic ? "italic " : ""}${P ? "bold " : ""}${N}px ${
|
|
1466
|
-
let
|
|
1467
|
-
runs:
|
|
1463
|
+
if (!j) return;
|
|
1464
|
+
let N = c(w?.fontSizeHpt ?? T?.fontSizeHpt ?? t.dataLabelFontSizeHpt, d) ?? 9 * d, P = w?.fontBold ?? T?.fontBold ?? t.dataLabelFontBold ?? !1, F = n(w, T), te = Q(t, w?.fontFace ?? T?.fontFace ?? t.dataLabelFontFace);
|
|
1465
|
+
e.font = `${F.fontItalic ? "italic " : ""}${P ? "bold " : ""}${N}px ${te}`;
|
|
1466
|
+
let ne = `#${w?.fontColor ?? T?.fontColor ?? r.labelColor ?? t.dataLabelFontColor ?? "111111"}`, I = A && w?.richRuns?.length ? ce(e, {
|
|
1467
|
+
runs: w.richRuns,
|
|
1468
1468
|
ptToPx: d,
|
|
1469
|
-
fontFamily:
|
|
1469
|
+
fontFamily: te,
|
|
1470
1470
|
fallbackBold: P,
|
|
1471
1471
|
fallbackItalic: F.fontItalic,
|
|
1472
1472
|
fallbackBaseline: F.fontBaseline,
|
|
1473
1473
|
fallbackColorHidden: F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null),
|
|
1474
|
-
fontFamilyForFace: (e) =>
|
|
1475
|
-
}, N,
|
|
1476
|
-
if (!
|
|
1477
|
-
let
|
|
1474
|
+
fontFamilyForFace: (e) => Q(t, e)
|
|
1475
|
+
}, N, ne) : null, L = I ? [] : re(j, Math.max(N, u.w * .45), Math.max(N * 1.2, u.h * .35), N * 1.2, (t) => e.measureText(t).width, F);
|
|
1476
|
+
if (!I && !L.length) return;
|
|
1477
|
+
let R = I?.width ?? Math.max(...L.map((t) => e.measureText(t).width)), z = I?.height ?? L.length * N * 1.2, V = ie(F, d), H = y(R + V.left + V.right, z + V.top + V.bottom, F.textRotation, F.textVerticalMode), G = M({
|
|
1478
1478
|
kind: "point",
|
|
1479
1479
|
x: l.x,
|
|
1480
1480
|
y: l.y,
|
|
1481
|
-
position:
|
|
1481
|
+
position: w?.position ?? T?.position ?? t.dataLabelPosition ?? h,
|
|
1482
1482
|
markerGap: f
|
|
1483
1483
|
}, u, {
|
|
1484
|
-
w:
|
|
1485
|
-
h:
|
|
1486
|
-
}, N,
|
|
1487
|
-
if (!
|
|
1488
|
-
let
|
|
1489
|
-
|
|
1490
|
-
let
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1484
|
+
w: H.w,
|
|
1485
|
+
h: H.h
|
|
1486
|
+
}, N, w?.manualLayout, u);
|
|
1487
|
+
if (!G) return;
|
|
1488
|
+
let K = W(w?.labelBox, T?.labelBox);
|
|
1489
|
+
T?.showLeaderLines && T.leaderLineHidden !== !0 && _ && (e.beginPath(), e.moveTo(g.x, g.y), e.lineTo(Math.max(G.rect.x, Math.min(g.x, G.rect.x + G.rect.w)), Math.max(G.rect.y, Math.min(g.y, G.rect.y + G.rect.h))), e.strokeStyle = `#${T.leaderLineColor ?? "808080"}`, e.lineWidth = T.leaderLineWidthEmu == null ? .75 * d : Math.max(.25, T.leaderLineWidthEmu / U * d), e.setLineDash(B(T.leaderLineDash ?? "solid", e.lineWidth)), e.stroke()), oe(e, K, G.rect, d, C), e.save(), e.beginPath(), e.rect(G.clip.x, G.clip.y, G.clip.w, G.clip.h), e.clip();
|
|
1490
|
+
let q = k(F, G.textAlign), se = ae(G.x, G.y, G.rect, z + V.top + V.bottom, F, w?.manualLayout != null, q, G.textAlign, R + V.left + V.right, H.radians), J = i(e, se.x, se.y, H.radians, q, G.textBaseline, V);
|
|
1491
|
+
if (I) {
|
|
1492
|
+
le(e, I, J.x, J.y, q, G.textBaseline, w?.manualLayout ? Math.max(0, G.rect.w - V.left - V.right) : I.width), e.restore();
|
|
1493
1493
|
return;
|
|
1494
1494
|
}
|
|
1495
1495
|
if (!(F.fontPaintAuthored === !0 && (F.fontHidden === !0 || F.fontColor == null))) {
|
|
1496
|
-
e.fillStyle =
|
|
1497
|
-
let t = N * 1.2, n = (F.fontBaseline ?? 0) * N, r =
|
|
1498
|
-
|
|
1496
|
+
e.fillStyle = ne, e.textAlign = q, e.textBaseline = "middle";
|
|
1497
|
+
let t = N * 1.2, n = (F.fontBaseline ?? 0) * N, r = J.y - (L.length - 1) * t / 2 - n;
|
|
1498
|
+
L.forEach((n, i) => e.fillText(n, J.x, r + i * t));
|
|
1499
1499
|
}
|
|
1500
1500
|
e.restore();
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function At(e, t, n) {
|
|
1503
1503
|
let r = t.seriesDataLabels;
|
|
1504
|
-
return
|
|
1504
|
+
return v(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);
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
let
|
|
1506
|
+
function jt(e, n, r, i, o, s) {
|
|
1507
|
+
let c = a(n, r.h, i);
|
|
1508
1508
|
if (n.title) {
|
|
1509
|
-
e.font = `${n.titleFontBold === !1 ? "" : "bold "}${
|
|
1509
|
+
e.font = `${n.titleFontBold === !1 ? "" : "bold "}${c.fontPx}px ${ht(n.titleFontFace)}`, e.fillStyle = n.titleFontColor ? `#${n.titleFontColor}` : "#111111", e.textAlign = "center", e.textBaseline = "top";
|
|
1510
1510
|
let t = e.measureText(n.title).width, i = {
|
|
1511
1511
|
x: r.x + (r.w - t) / 2,
|
|
1512
|
-
y: r.y +
|
|
1512
|
+
y: r.y + c.topPad,
|
|
1513
1513
|
w: t,
|
|
1514
|
-
h: Math.max(1,
|
|
1515
|
-
}, a = n.titleManualLayout ?
|
|
1514
|
+
h: Math.max(1, c.fontPx)
|
|
1515
|
+
}, a = n.titleManualLayout ? u({
|
|
1516
1516
|
...n.titleManualLayout,
|
|
1517
1517
|
w: void 0,
|
|
1518
1518
|
h: void 0
|
|
1519
1519
|
}, r, i) : null;
|
|
1520
1520
|
e.fillText(n.title, a ? a.x + a.w / 2 : r.x + r.w / 2, a?.y ?? i.y);
|
|
1521
1521
|
}
|
|
1522
|
-
let
|
|
1522
|
+
let l = $e(n);
|
|
1523
1523
|
e.save();
|
|
1524
|
-
let d = (n.chartType === "pie" ? n.series[0]?.categories?.length ? n.series[0].categories : n.categories : n.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) =>
|
|
1524
|
+
let d = (n.chartType === "pie" ? n.series[0]?.categories?.length ? n.series[0].categories : n.categories : n.series.map((e, t) => e.name || `Series ${t + 1}`)).flatMap((e, t) => l.get(t)?.deleted === !0 ? [] : [{
|
|
1525
1525
|
label: e,
|
|
1526
1526
|
index: t
|
|
1527
|
-
}]),
|
|
1528
|
-
itemWidths:
|
|
1529
|
-
rowHeight: Math.max(
|
|
1527
|
+
}]), p = d.map((e) => et(n, l.get(e.index), i)), m = Math.max(0, ...p.map((e) => e.fontPx)), g = d.map((t, n) => (e.font = p[n].font, 7 * i + 4 + e.measureText(t.label).width)), v = t(n, r.w, r.h, .23, {
|
|
1528
|
+
itemWidths: g,
|
|
1529
|
+
rowHeight: Math.max(m * 1.45, 12),
|
|
1530
1530
|
itemGap: 12,
|
|
1531
1531
|
horizontalPadding: 8,
|
|
1532
1532
|
verticalPadding: 4
|
|
1533
1533
|
});
|
|
1534
1534
|
e.restore();
|
|
1535
|
-
let
|
|
1536
|
-
titleBand:
|
|
1535
|
+
let y = V(v, n.legendOverlay === !0), b = _(n, r.w, r.h, i), S = h(n.catAxisTitleTextVerticalInsetEmu, i), C = h(n.valAxisTitleTextVerticalInsetEmu, i), w = o === "horizontal" ? n.catAxisTitle ? b.catFontPx + S + f(r.w) + 4 : 0 : o === "vertical" ? b.valBandW : 0, T = o === "horizontal" ? n.valAxisTitle ? b.valFontPx + C + f(r.h) + 4 : 0 : o === "vertical" ? b.catBandH : 0, E = x(n, r.x, r.y, r.w, r.h, i, {
|
|
1536
|
+
titleBand: c,
|
|
1537
1537
|
legendSideReserveFrac: .23,
|
|
1538
|
-
legendReserve:
|
|
1538
|
+
legendReserve: v,
|
|
1539
1539
|
pad: {
|
|
1540
|
-
t:
|
|
1541
|
-
r:
|
|
1542
|
-
b:
|
|
1543
|
-
l:
|
|
1540
|
+
t: c.bandH + y.legTopH + r.h * .04,
|
|
1541
|
+
r: y.legRightW + r.w * .05,
|
|
1542
|
+
b: y.legBottomH + r.h * .19 + T,
|
|
1543
|
+
l: y.legLeftW + r.w * .13 + w
|
|
1544
1544
|
},
|
|
1545
1545
|
honorPlotAreaManualLayout: !0,
|
|
1546
1546
|
manualOuterInsets: {
|
|
1547
|
-
t:
|
|
1548
|
-
r:
|
|
1549
|
-
b:
|
|
1550
|
-
l:
|
|
1547
|
+
t: c.bandH,
|
|
1548
|
+
r: y.legRightW,
|
|
1549
|
+
b: y.legBottomH + T,
|
|
1550
|
+
l: y.legLeftW + w
|
|
1551
1551
|
}
|
|
1552
|
-
}),
|
|
1553
|
-
x:
|
|
1554
|
-
y:
|
|
1555
|
-
w: Math.max(1,
|
|
1556
|
-
h: Math.max(1,
|
|
1552
|
+
}), D = {
|
|
1553
|
+
x: E.plotRect.px0,
|
|
1554
|
+
y: E.plotRect.py0,
|
|
1555
|
+
w: Math.max(1, E.plotRect.pw),
|
|
1556
|
+
h: Math.max(1, E.plotRect.ph)
|
|
1557
1557
|
};
|
|
1558
|
-
|
|
1559
|
-
let
|
|
1560
|
-
x: r.x + r.w -
|
|
1561
|
-
y:
|
|
1562
|
-
w:
|
|
1563
|
-
h:
|
|
1564
|
-
} :
|
|
1558
|
+
L(e, n, D.x, D.y, D.w, D.h, i, s);
|
|
1559
|
+
let O = v ? v.side === "r" ? {
|
|
1560
|
+
x: r.x + r.w - v.reserveW,
|
|
1561
|
+
y: D.y,
|
|
1562
|
+
w: v.reserveW,
|
|
1563
|
+
h: D.h
|
|
1564
|
+
} : v.side === "l" ? {
|
|
1565
1565
|
x: r.x,
|
|
1566
|
-
y:
|
|
1567
|
-
w:
|
|
1568
|
-
h:
|
|
1569
|
-
} :
|
|
1566
|
+
y: D.y,
|
|
1567
|
+
w: v.reserveW,
|
|
1568
|
+
h: D.h
|
|
1569
|
+
} : v.side === "t" ? {
|
|
1570
1570
|
x: r.x + 4,
|
|
1571
|
-
y: r.y +
|
|
1571
|
+
y: r.y + c.bandH,
|
|
1572
1572
|
w: Math.max(1, r.w - 8),
|
|
1573
|
-
h:
|
|
1573
|
+
h: v.reserveH
|
|
1574
1574
|
} : {
|
|
1575
1575
|
x: r.x + 4,
|
|
1576
|
-
y: r.y + r.h -
|
|
1576
|
+
y: r.y + r.h - v.reserveH,
|
|
1577
1577
|
w: Math.max(1, r.w - 8),
|
|
1578
|
-
h:
|
|
1578
|
+
h: v.reserveH
|
|
1579
1579
|
} : null;
|
|
1580
1580
|
return {
|
|
1581
|
-
plot:
|
|
1582
|
-
legend: (
|
|
1581
|
+
plot: D,
|
|
1582
|
+
legend: (O && n.legendManualLayout ? u(n.legendManualLayout, r, O) : null) ?? O,
|
|
1583
1583
|
legendMeasure: {
|
|
1584
1584
|
labels: d.map((e) => e.label),
|
|
1585
|
-
styles:
|
|
1586
|
-
itemWidths:
|
|
1585
|
+
styles: p,
|
|
1586
|
+
itemWidths: g
|
|
1587
1587
|
}
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1590
|
+
function Mt(e, t, n, r, i, a, o, s, c, l, d, f, m, h) {
|
|
1591
1591
|
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(
|
|
1592
|
+
let g = m ? t : K(e, t, h), _ = p(i, d, f), v = r;
|
|
1593
|
+
if (m) {
|
|
1594
|
+
let t = e.measureText(g).width, i = Math.abs(Math.cos(_)), o = Math.abs(Math.sin(_)), s = {
|
|
1595
1595
|
x: r.x - (t * i + a * o) / 2,
|
|
1596
1596
|
y: r.y - (t * o + a * i) / 2,
|
|
1597
1597
|
w: t * i + a * o,
|
|
1598
1598
|
h: t * o + a * i
|
|
1599
|
-
}, c =
|
|
1600
|
-
...
|
|
1599
|
+
}, c = u({
|
|
1600
|
+
...m,
|
|
1601
1601
|
w: void 0,
|
|
1602
1602
|
h: void 0
|
|
1603
1603
|
}, n, s);
|
|
1604
|
-
c && (
|
|
1604
|
+
c && (v = {
|
|
1605
1605
|
x: c.x + c.w / 2,
|
|
1606
1606
|
y: c.y + c.h / 2
|
|
1607
1607
|
});
|
|
1608
1608
|
}
|
|
1609
|
-
e.translate(
|
|
1609
|
+
e.translate(v.x, v.y), _ && e.rotate(_), e.textAlign = "center", e.textBaseline = "middle", e.fillText(g, 0, 0), e.restore();
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1612
|
-
if (
|
|
1613
|
-
let
|
|
1614
|
-
|
|
1615
|
-
x:
|
|
1616
|
-
y:
|
|
1611
|
+
function Nt(e, t, n, r, i, a) {
|
|
1612
|
+
if (t.valAxisTitle) {
|
|
1613
|
+
let o = j(t.valAxisTitleFontSizeHpt, a), s = i ? "horizontal" : "left";
|
|
1614
|
+
Mt(e, t.valAxisTitle, n, i ? {
|
|
1615
|
+
x: r.x + r.w / 2,
|
|
1616
|
+
y: r.y + r.h + f(n.h) + o / 2
|
|
1617
1617
|
} : {
|
|
1618
|
-
x:
|
|
1619
|
-
y:
|
|
1620
|
-
},
|
|
1621
|
-
}
|
|
1622
|
-
if (
|
|
1623
|
-
let
|
|
1624
|
-
|
|
1625
|
-
x:
|
|
1626
|
-
y:
|
|
1618
|
+
x: r.x - f(n.w) - o / 2,
|
|
1619
|
+
y: r.y + r.h / 2
|
|
1620
|
+
}, s, o, Q(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleFontColor, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout, i ? r.w : r.h);
|
|
1621
|
+
}
|
|
1622
|
+
if (t.catAxisTitle) {
|
|
1623
|
+
let o = j(t.catAxisTitleFontSizeHpt, a), s = i ? "left" : "horizontal";
|
|
1624
|
+
Mt(e, t.catAxisTitle, n, i ? {
|
|
1625
|
+
x: r.x - f(n.w) - o / 2,
|
|
1626
|
+
y: r.y + r.h / 2
|
|
1627
1627
|
} : {
|
|
1628
|
-
x:
|
|
1629
|
-
y:
|
|
1630
|
-
},
|
|
1628
|
+
x: r.x + r.w / 2,
|
|
1629
|
+
y: r.y + r.h + f(n.h) + o / 2
|
|
1630
|
+
}, s, o, Q(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleFontColor, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout, i ? r.h : r.w);
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function Pt(e, t, n, r, i, a, o, s, l, u, d) {
|
|
1634
1634
|
let f = t.threeD?.seriesAxis;
|
|
1635
1635
|
if (!f || f.hidden || t.threeD?.barGrouping !== "standard" || t.series.length === 0) return;
|
|
1636
|
-
let p = Xt(t, i, a, o, s,
|
|
1636
|
+
let p = Xt(t, r, i, a, o, s, l), m = zt(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), v = r.project(h, g, r.topology.farDepth), y = Math.hypot(v.x - _.x, v.y - _.y);
|
|
1637
1637
|
if (!(y > 1e-6)) return;
|
|
1638
1638
|
let b = {
|
|
1639
1639
|
x: (v.x - _.x) / y,
|
|
@@ -1641,7 +1641,7 @@ function Nt(e, t, n, i, a, o, s, c, l, u, d) {
|
|
|
1641
1641
|
}, x = {
|
|
1642
1642
|
x: -b.y,
|
|
1643
1643
|
y: b.x
|
|
1644
|
-
}, S =
|
|
1644
|
+
}, S = r.project(r.front.x + r.front.w / 2, r.front.y + r.front.h / 2, .5), C = {
|
|
1645
1645
|
x: (_.x + v.x) / 2,
|
|
1646
1646
|
y: (_.y + v.y) / 2
|
|
1647
1647
|
};
|
|
@@ -1651,18 +1651,18 @@ function Nt(e, t, n, i, a, o, s, c, l, u, d) {
|
|
|
1651
1651
|
}), (f.tickLabelPos === "low" && x.y < 0 || f.tickLabelPos === "high" && x.y > 0) && (x = {
|
|
1652
1652
|
x: -x.x,
|
|
1653
1653
|
y: -x.y
|
|
1654
|
-
}), f.lineHidden || (
|
|
1655
|
-
let w = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), E = f.majorTickMark ?? "out", D =
|
|
1656
|
-
if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${D}px ${
|
|
1657
|
-
|
|
1654
|
+
}), f.lineHidden || ($(e, Vt(f.lineColor, f.lineWidthEmu, f.lineDash, d)), e.beginPath(), e.moveTo(_.x, _.y), e.lineTo(v.x, v.y), e.stroke());
|
|
1655
|
+
let w = Math.max(1, Math.floor(f.tickMarkSkip ?? 1)), T = Math.max(1, Math.floor(f.tickLabelSkip ?? 1)), E = f.majorTickMark ?? "out", D = c(f.fontSizeHpt, d) ?? 9 * d;
|
|
1656
|
+
if (e.font = `${f.fontItalic ? "italic " : ""}${f.fontBold ? "bold " : ""}${D}px ${Q(t, f.fontFace)}`, e.fillStyle = f.fontColor ? `#${f.fontColor}` : "#595959", e.textAlign = Math.abs(x.x) < .2 ? "center" : x.x < 0 ? "right" : "left", e.textBaseline = Math.abs(x.y) < .2 ? "middle" : x.y < 0 ? "bottom" : "top", u && !f.lineHidden && E !== "none") {
|
|
1657
|
+
$(e, Ht(f.lineColor, f.lineWidthEmu, f.lineDash, d));
|
|
1658
1658
|
let n = t.series.length;
|
|
1659
1659
|
for (let t = 0; t <= n; t += w) {
|
|
1660
|
-
let
|
|
1660
|
+
let i = t / n, a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a), s = 6 * d, c = E === "cross" ? s / 2 : E === "out" ? s : 0, l = E === "cross" ? s / 2 : E === "in" ? s : 0;
|
|
1661
1661
|
e.beginPath(), e.moveTo(o.x + x.x * c, o.y + x.y * c), e.lineTo(o.x - x.x * l, o.y - x.y * l), e.stroke();
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
1664
|
for (let n = 0; n < t.series.length; n++) {
|
|
1665
|
-
let
|
|
1665
|
+
let i = r.seriesDepth(n, t.series.length, !1), a = f.orientation === "maxMin" ? 1 - i : i, o = r.project(h, g, a);
|
|
1666
1666
|
if (!u && !f.lineHidden && n % w === 0 && E !== "none") {
|
|
1667
1667
|
let t = 6 * d, n = E === "cross" ? t / 2 : E === "out" ? t : 0, r = E === "cross" ? t / 2 : E === "in" ? t : 0;
|
|
1668
1668
|
e.beginPath(), e.moveTo(o.x + x.x * n, o.y + x.y * n), e.lineTo(o.x - x.x * r, o.y - x.y * r), e.stroke();
|
|
@@ -1670,89 +1670,89 @@ function Nt(e, t, n, i, a, o, s, c, l, u, d) {
|
|
|
1670
1670
|
f.tickLabelPos !== "none" && n % T === 0 && e.fillText(t.series[n].name || `Series ${n + 1}`, o.x + x.x * (6 * d + 3), o.y + x.y * (6 * d + 3));
|
|
1671
1671
|
}
|
|
1672
1672
|
if (e.setLineDash([]), f.title) {
|
|
1673
|
-
let
|
|
1674
|
-
|
|
1675
|
-
x: C.x + x.x * (D +
|
|
1676
|
-
y: C.y + x.y * (D +
|
|
1677
|
-
}, "horizontal",
|
|
1673
|
+
let i = j(f.titleFontSizeHpt, d);
|
|
1674
|
+
Mt(e, f.title, n, {
|
|
1675
|
+
x: C.x + x.x * (D + i + 12),
|
|
1676
|
+
y: C.y + x.y * (D + i + 12)
|
|
1677
|
+
}, "horizontal", i, Q(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));
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function Ft(e, t, n, r, i, a, o, s) {
|
|
1681
1681
|
if (t.lineHidden !== !0) {
|
|
1682
|
-
let s = t.lineWidthEmu == null ? Math.max(1, 2 * o) : Math.max(.5, t.lineWidthEmu /
|
|
1683
|
-
e.beginPath(), e.moveTo(r, i), e.lineTo(r + a, i), e.strokeStyle = t.lineColor ? `#${t.lineColor}` :
|
|
1682
|
+
let s = t.lineWidthEmu == null ? Math.max(1, 2 * o) : Math.max(.5, t.lineWidthEmu / U * o);
|
|
1683
|
+
e.beginPath(), e.moveTo(r, i), e.lineTo(r + a, i), e.strokeStyle = t.lineColor ? `#${t.lineColor}` : J(n, .7), e.lineWidth = s, e.setLineDash(B(t.chartexStyle?.lineDash ?? "solid", s)), e.stroke(), e.setLineDash([]);
|
|
1684
1684
|
}
|
|
1685
1685
|
if (t.showMarker !== !0 || t.markerSymbol === "none") return;
|
|
1686
|
-
let c = t.markerSymbol ?? "circle", l =
|
|
1687
|
-
|
|
1686
|
+
let c = t.markerSymbol ?? "circle", l = A(t, n.replace(/^#/, "")), u = l === "00000000" ? "transparent" : l.startsWith("#") ? l : `#${l}`, d = t.markerLine ?? t.lineColor ?? n.replace(/^#/, ""), f = d === "00000000" ? "rgba(0,0,0,0)" : d.startsWith("#") ? d : `#${d}`, p = t.markerLineWidthEmu == null ? Math.max(.75, o) : Math.max(.25, t.markerLineWidthEmu / U * o);
|
|
1687
|
+
Ot(e, {
|
|
1688
1688
|
x: r + a / 2,
|
|
1689
1689
|
y: i
|
|
1690
|
-
}, c, Math.min(a, Math.max(2, (t.markerSize ?? 5) * o)), u, f, p,
|
|
1690
|
+
}, c, Math.min(a, Math.max(2, (t.markerSize ?? 5) * o)), u, f, p, E(t), s, o);
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1692
|
+
function It(e, t, n, r, i = !1, a, s = 0) {
|
|
1693
1693
|
if (!n) return;
|
|
1694
|
-
|
|
1694
|
+
F(e, t, n, r, s);
|
|
1695
1695
|
let c = new Map(t.series[0]?.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), l = i ? (t.series[0]?.categories?.length ? t.series[0].categories : t.categories).map((e, n) => {
|
|
1696
1696
|
let r = t.series[0]?.dataPointColors?.[n];
|
|
1697
1697
|
return {
|
|
1698
1698
|
label: e,
|
|
1699
|
-
color: r === "00000000" ? "transparent" : r ? `#${r}` :
|
|
1699
|
+
color: r === "00000000" ? "transparent" : r ? `#${r}` : st(n),
|
|
1700
1700
|
series: t.series[0],
|
|
1701
1701
|
point: c.get(n),
|
|
1702
1702
|
sourceIndex: n
|
|
1703
1703
|
};
|
|
1704
1704
|
}) : t.series.map((e, t) => ({
|
|
1705
1705
|
label: e.name || `Series ${t + 1}`,
|
|
1706
|
-
color:
|
|
1706
|
+
color: st(t, e),
|
|
1707
1707
|
series: e,
|
|
1708
1708
|
point: void 0,
|
|
1709
1709
|
sourceIndex: t
|
|
1710
|
-
})), u =
|
|
1710
|
+
})), u = $e(t), d = l.filter((e) => u.get(e.sourceIndex)?.deleted !== !0), f = a != null && a.labels.length === d.length && a.labels.every((e, t) => e === d[t].label), p = f ? a.styles : d.map((e) => et(t, u.get(e.sourceIndex), r));
|
|
1711
1711
|
e.textAlign = "left", e.textBaseline = "middle";
|
|
1712
|
-
let
|
|
1712
|
+
let h = Math.max(Math.max(0, ...p.map((e) => e.fontPx)) * 1.45, 12), g = Math.min(7 * r, h * .7);
|
|
1713
1713
|
if (t.legendPos === "t" || t.legendPos === "b" || t.legendManualLayout != null && n.w >= n.h) {
|
|
1714
|
-
let
|
|
1715
|
-
for (let a of
|
|
1716
|
-
let
|
|
1714
|
+
let c = f ? a.itemWidths : d.map((t, n) => (e.font = p[n].font, g + 4 + e.measureText(t.label).width)), l = o(c, Math.max(1, n.w - 8), 12).slice(0, Math.max(0, Math.floor((n.h - 4 + 1e-6) / h))), u = n.y + 2 + h / 2;
|
|
1715
|
+
for (let a of l) {
|
|
1716
|
+
let o = a.map((e) => Math.min(n.w, c[e])), l = o.reduce((e, t) => e + t, 0) + Math.max(0, a.length - 1) * 12, f = n.x + Math.max(4, (n.w - l) / 2);
|
|
1717
1717
|
for (let n = 0; n < a.length; n++) {
|
|
1718
|
-
let
|
|
1718
|
+
let c = a[n], l = d[c], m = p[c];
|
|
1719
1719
|
e.font = m.font;
|
|
1720
|
-
let
|
|
1721
|
-
if (!i && t.chartType.toLowerCase().includes("line") &&
|
|
1720
|
+
let h = Math.max(0, o[n] - g - 4);
|
|
1721
|
+
if (!i && t.chartType.toLowerCase().includes("line") && l.series) Ft(e, l.series, l.color, f, u, g, r, s);
|
|
1722
1722
|
else {
|
|
1723
|
-
|
|
1724
|
-
let t =
|
|
1725
|
-
t !== !0 && n && (e.strokeStyle = `#${n}`, e.lineWidth = (
|
|
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
1726
|
}
|
|
1727
|
-
e.fillStyle = m.color, e.fillText(
|
|
1727
|
+
e.fillStyle = m.color, e.fillText(K(e, l.label, h), f + g + 4, u), f += o[n] + 12;
|
|
1728
1728
|
}
|
|
1729
|
-
|
|
1729
|
+
u += h;
|
|
1730
1730
|
}
|
|
1731
1731
|
return;
|
|
1732
1732
|
}
|
|
1733
|
-
let
|
|
1733
|
+
let _ = n.y;
|
|
1734
1734
|
for (let a = 0; a < d.length; a++) {
|
|
1735
|
-
let
|
|
1736
|
-
e.font =
|
|
1737
|
-
let
|
|
1735
|
+
let o = d[a], c = p[a];
|
|
1736
|
+
e.font = c.font;
|
|
1737
|
+
let l = n.x + 8 + g, u = Math.max(0, n.x + n.w - 4 - l), f = Math.max(c.fontPx * 1.2, 10), v = m(o.label, u, f * (i ? 1 : 2), f, (t) => e.measureText(t).width);
|
|
1738
1738
|
if (v.length === 0) continue;
|
|
1739
|
-
let y = Math.max(
|
|
1740
|
-
if (
|
|
1741
|
-
let b =
|
|
1742
|
-
if (!i && t.chartType.toLowerCase().includes("line") &&
|
|
1739
|
+
let y = Math.max(h, v.length * f + 2);
|
|
1740
|
+
if (_ + y > n.y + n.h + 1e-6) break;
|
|
1741
|
+
let b = _ + y / 2;
|
|
1742
|
+
if (!i && t.chartType.toLowerCase().includes("line") && o.series) Ft(e, o.series, o.color, n.x + 4, b, g, r, s);
|
|
1743
1743
|
else {
|
|
1744
|
-
|
|
1745
|
-
let t =
|
|
1746
|
-
t !== !0 && i && (e.strokeStyle = `#${i}`, e.lineWidth = (
|
|
1744
|
+
o.color !== "transparent" && (e.fillStyle = o.color, e.fillRect(n.x + 4, b - g / 2, g, g));
|
|
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
1747
|
}
|
|
1748
|
-
e.fillStyle =
|
|
1749
|
-
let x = b - (v.length - 1) *
|
|
1750
|
-
v.forEach((t, n) => e.fillText(t,
|
|
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;
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function Lt(e, t, n, r, i, a) {
|
|
1754
1754
|
let o = i ? 100 : 1, s = e.valAxisMinorTickMark ?? "none";
|
|
1755
|
-
return
|
|
1755
|
+
return G({
|
|
1756
1756
|
dataMin: t,
|
|
1757
1757
|
dataMax: n,
|
|
1758
1758
|
explicitMin: e.valMin == null ? i ? t : null : e.valMin * o,
|
|
@@ -1766,7 +1766,7 @@ function It(e, t, n, r, i, a) {
|
|
|
1766
1766
|
needMinor: e.valAxisMinorGridlines === !0 || s !== "none"
|
|
1767
1767
|
});
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function Rt(e, t, n) {
|
|
1770
1770
|
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
1771
|
return {
|
|
1772
1772
|
start: Math.min(o, s),
|
|
@@ -1775,7 +1775,7 @@ function Lt(e, t, n) {
|
|
|
1775
1775
|
leading: o
|
|
1776
1776
|
};
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function zt(e) {
|
|
1779
1779
|
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
1780
|
return {
|
|
1781
1781
|
floor: [
|
|
@@ -1804,42 +1804,42 @@ function Rt(e) {
|
|
|
1804
1804
|
farDepth: l
|
|
1805
1805
|
};
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1808
|
-
let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t /
|
|
1807
|
+
function Bt(e, t, n, r, i = "A6A6A6", a = .75) {
|
|
1808
|
+
let o = t != null && Number.isFinite(t) && t >= 0 ? Math.max(.25, t / U * r) : a * r;
|
|
1809
1809
|
return {
|
|
1810
1810
|
color: `#${e ?? i}`,
|
|
1811
1811
|
width: o,
|
|
1812
|
-
dash:
|
|
1812
|
+
dash: B(n ?? "solid", o)
|
|
1813
1813
|
};
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1816
|
-
let i =
|
|
1815
|
+
function Vt(e, t, n, r) {
|
|
1816
|
+
let i = Bt(e, t, n, r, "898989", 1);
|
|
1817
1817
|
if (t == null || !Number.isFinite(t) || t < 0) return i;
|
|
1818
|
-
let a = t /
|
|
1818
|
+
let a = t / U * r;
|
|
1819
1819
|
if (!(a > 0)) return i;
|
|
1820
1820
|
let o = a;
|
|
1821
1821
|
return {
|
|
1822
1822
|
...i,
|
|
1823
1823
|
width: o,
|
|
1824
|
-
dash:
|
|
1824
|
+
dash: B(n ?? "solid", o)
|
|
1825
1825
|
};
|
|
1826
1826
|
}
|
|
1827
|
-
function
|
|
1828
|
-
return
|
|
1827
|
+
function Ht(e, t, n, r) {
|
|
1828
|
+
return Vt(e, t, n, r);
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function $(e, t) {
|
|
1831
1831
|
e.strokeStyle = t.color, e.lineWidth = t.width, e.setLineDash(t.dash);
|
|
1832
1832
|
}
|
|
1833
|
-
function Ut(e, t, n,
|
|
1834
|
-
let { front: d } = n, f = d.x,
|
|
1833
|
+
function Ut(e, t, n, i, a, o, s, c, u) {
|
|
1834
|
+
let { front: d } = n, f = d.x, p = d.x + d.w, m = zt(n), { sideX: h, floorY: g, oppositeFloorY: _, nearDepth: v, farDepth: y } = m, x = Xt(t, n, i, o, s, c, a), S = [], C = t.catAxisLinePaintAuthored === !0, w = t.valAxisLinePaintAuthored === !0, E = a === "vertical" ? C && !t.catAxisHidden && !t.catAxisLineHidden : w && !t.valAxisHidden && !t.valAxisLineHidden, D = a === "vertical" ? w && !t.valAxisHidden && !t.valAxisLineHidden : C && !t.catAxisHidden && !t.catAxisLineHidden;
|
|
1835
1835
|
E && S.push([x.horizontalStart, x.horizontalEnd]), D && S.push([x.verticalStart, x.verticalEnd]);
|
|
1836
|
-
let k = t.threeD?.seriesAxis,
|
|
1837
|
-
if (k && !k.hidden && !k.lineHidden &&
|
|
1838
|
-
let e =
|
|
1839
|
-
S.push([n.project(e, t,
|
|
1836
|
+
let k = t.threeD?.seriesAxis, ee = k?.linePaintAuthored === !0;
|
|
1837
|
+
if (k && !k.hidden && !k.lineHidden && ee && t.threeD?.barGrouping === "standard" && t.series.length > 0) {
|
|
1838
|
+
let e = a === "vertical" ? m.seriesAxisX : x.axisX, t = a === "horizontal" ? g === n.front.y ? n.front.y + n.front.h : n.front.y : g;
|
|
1839
|
+
S.push([n.project(e, t, v), n.project(e, t, y)]);
|
|
1840
1840
|
}
|
|
1841
|
-
let
|
|
1842
|
-
let r =
|
|
1841
|
+
let A = (e, t) => Math.hypot(e.x - t.x, e.y - t.y) <= 1e-6, j = (e, t) => S.some(([n, r]) => A(e, n) && A(t, r) || A(e, r) && A(t, n)), M = (e, t) => {
|
|
1842
|
+
let r = q(n, e, t?.thicknessPercent), i = r.faces.map((e, t) => ({
|
|
1843
1843
|
scenePoints: e,
|
|
1844
1844
|
faceIndex: t
|
|
1845
1845
|
})).filter(({ scenePoints: e }) => r.thickness === 0 || n.cameraFacing(e)).map(({ scenePoints: e, faceIndex: t }) => ({
|
|
@@ -1853,67 +1853,67 @@ function Ut(e, t, n, r, i, a, s, l, u) {
|
|
|
1853
1853
|
faces: i,
|
|
1854
1854
|
visibleFaceIndices: new Set(i.map((e) => e.faceIndex))
|
|
1855
1855
|
};
|
|
1856
|
-
},
|
|
1857
|
-
let
|
|
1858
|
-
if (!
|
|
1859
|
-
if (
|
|
1860
|
-
let t =
|
|
1856
|
+
}, N = M("floor", t.threeD?.floor), P = M("sideWall", t.threeD?.sideWall), F = M("backWall", t.threeD?.backWall), te = N.faces, ne = P.faces, I = F.faces, L = (a, o, s, c) => {
|
|
1857
|
+
let l = b(t, o, s), u = a.faces;
|
|
1858
|
+
if (!l.fill || !u.length) return;
|
|
1859
|
+
if (l.fill.fillType === "image") {
|
|
1860
|
+
let t = r(l.fill);
|
|
1861
1861
|
if (!t) return;
|
|
1862
|
-
|
|
1862
|
+
de(e, l.fill, t, o, c, a.slab, a.faces.map((e) => e.faceIndex), (e) => n.projectUnbounded(e.x, e.y, e.depth), i.max - i.min);
|
|
1863
1863
|
return;
|
|
1864
1864
|
}
|
|
1865
|
-
let
|
|
1866
|
-
if (
|
|
1865
|
+
let d = u.flatMap((e) => e.points), f = Math.min(...d.map((e) => e.x)), p = Math.max(...d.map((e) => e.x)), m = Math.min(...d.map((e) => e.y)), h = Math.max(...d.map((e) => e.y)), g = l.fill.fillType === "solid" ? `#${l.fill.color}` : z(l.fill, e, f, m, p - f, h - m);
|
|
1866
|
+
if (g) for (let t of u) t.points.length < 3 || (gt(e, t.points), e.fillStyle = g, e.fill());
|
|
1867
1867
|
};
|
|
1868
|
-
|
|
1869
|
-
let
|
|
1870
|
-
for (let s of
|
|
1868
|
+
L(N, t.threeD?.floor, "floor", "floor"), L(P, t.threeD?.sideWall, "wall", "sideWall"), L(F, t.threeD?.backWall, "wall", "backWall");
|
|
1869
|
+
let R = (t, r, i, a, o = !0) => {
|
|
1870
|
+
for (let s of me(t.slab, r, i, a)) {
|
|
1871
1871
|
if (!o && s.faceIndex !== 0 || !t.visibleFaceIndices.has(s.faceIndex)) continue;
|
|
1872
1872
|
let [r, i] = s.scenePoints.map((e) => n.projectUnbounded(e.x, e.y, e.depth));
|
|
1873
1873
|
e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(i.x, i.y), e.stroke();
|
|
1874
1874
|
}
|
|
1875
|
-
},
|
|
1876
|
-
|
|
1877
|
-
for (let
|
|
1878
|
-
let t =
|
|
1875
|
+
}, re = (t, r, o) => {
|
|
1876
|
+
$(e, r);
|
|
1877
|
+
for (let r of t) {
|
|
1878
|
+
let t = i.fraction(r);
|
|
1879
1879
|
if (o) {
|
|
1880
|
-
|
|
1880
|
+
a === "horizontal" ? (R(N, "floor", "x", t), R(F, "backWall", "x", t)) : (R(P, "sideWall", "y", t), R(F, "backWall", "y", t));
|
|
1881
1881
|
continue;
|
|
1882
1882
|
}
|
|
1883
|
-
if (
|
|
1884
|
-
let r = d.x + t * d.w, i = n.project(r,
|
|
1883
|
+
if (a === "horizontal") {
|
|
1884
|
+
let r = d.x + t * d.w, i = n.project(r, g, y), a = n.project(r, _, y);
|
|
1885
1885
|
e.beginPath(), e.moveTo(i.x, i.y), e.lineTo(a.x, a.y), e.stroke();
|
|
1886
1886
|
} else {
|
|
1887
|
-
let r = d.y + d.h - t * d.h, i = n.project(
|
|
1887
|
+
let r = d.y + d.h - t * d.h, i = n.project(h, r, v), a = n.project(h, r, y), o = n.project(h === f ? p : f, r, y);
|
|
1888
1888
|
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
1889
|
}
|
|
1890
1890
|
}
|
|
1891
1891
|
};
|
|
1892
|
-
t.valAxisMinorGridlines === !0 &&
|
|
1893
|
-
let
|
|
1894
|
-
|
|
1895
|
-
for (let e of t)
|
|
1892
|
+
t.valAxisMinorGridlines === !0 && re(i.minorTicks, Bt(t.valAxisMinorGridlineColor, t.valAxisMinorGridlineWidthEmu, t.valAxisMinorGridlineDash, u, "D9D9D9", .5), !0), t.valAxisMajorGridlines === !0 && re(i.majorTicks, Bt(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, t.valAxisGridlineDash, u, "898989", 1), !0);
|
|
1893
|
+
let B = (t, n) => {
|
|
1894
|
+
$(e, n);
|
|
1895
|
+
for (let e of t) a === "vertical" ? (R(N, "floor", "x", e), R(F, "backWall", "x", e)) : (R(P, "sideWall", "y", e), R(F, "backWall", "y", e));
|
|
1896
1896
|
};
|
|
1897
|
-
t.catAxisMinorGridlines === !0 &&
|
|
1898
|
-
let
|
|
1897
|
+
t.catAxisMinorGridlines === !0 && B(T(o, s), Bt(t.catAxisMinorGridlineColor, t.catAxisMinorGridlineWidthEmu, t.catAxisMinorGridlineDash, u, "E0E0E0", .5)), t.catAxisMajorGridlines === !0 && B(l(o, s), Bt(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, t.catAxisGridlineDash, u, "E0E0E0", .5));
|
|
1898
|
+
let ie = (n, r, i) => {
|
|
1899
1899
|
if (!n.length) return;
|
|
1900
|
-
let a =
|
|
1900
|
+
let a = b(t, r, i);
|
|
1901
1901
|
if (a.line === null) return;
|
|
1902
1902
|
let o = a.line ?? {
|
|
1903
1903
|
fillType: "solid",
|
|
1904
1904
|
color: "898989"
|
|
1905
|
-
}, s = n.flatMap((e) => e.points),
|
|
1906
|
-
if (!
|
|
1907
|
-
let
|
|
1908
|
-
e.strokeStyle =
|
|
1905
|
+
}, s = n.flatMap((e) => e.points), c = Math.min(...s.map((e) => e.x)), l = 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}` : z(o, e, c, d, l - c, f - d);
|
|
1906
|
+
if (!p) return;
|
|
1907
|
+
let m = a.lineWidthEmu == null ? u : Math.max(.25, a.lineWidthEmu / U * u);
|
|
1908
|
+
e.strokeStyle = p, e.lineWidth = m, e.setLineDash(O(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
1909
|
for (let t of n) {
|
|
1910
1910
|
if (t.points.length < 2) continue;
|
|
1911
1911
|
let n = t.points.map((e, n) => ({
|
|
1912
1912
|
start: e,
|
|
1913
1913
|
end: t.points[(n + 1) % t.points.length]
|
|
1914
1914
|
}));
|
|
1915
|
-
if (n.some((e) =>
|
|
1916
|
-
for (let t of n)
|
|
1915
|
+
if (n.some((e) => j(e.start, e.end))) {
|
|
1916
|
+
for (let t of n) j(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
1917
|
continue;
|
|
1918
1918
|
}
|
|
1919
1919
|
e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y);
|
|
@@ -1921,11 +1921,11 @@ function Ut(e, t, n, r, i, a, s, l, u) {
|
|
|
1921
1921
|
e.lineTo(t.points[0].x, t.points[0].y), e.closePath(), e.stroke();
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
|
-
|
|
1924
|
+
ie(te, t.threeD?.floor, "floor"), ie(ne, t.threeD?.sideWall, "wall"), ie(I, t.threeD?.backWall, "wall"), e.setLineDash([]);
|
|
1925
1925
|
}
|
|
1926
1926
|
function Wt(e, t, n, r, i, a, o, s, c) {
|
|
1927
1927
|
let l = Xt(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;
|
|
1928
|
-
u && (
|
|
1928
|
+
u && ($(e, Vt(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 && ($(e, Vt(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
1929
|
}
|
|
1930
1930
|
function Gt(e, t, n, r) {
|
|
1931
1931
|
let i = {
|
|
@@ -1968,251 +1968,251 @@ function Xt(e, t, n, r, i, a, o) {
|
|
|
1968
1968
|
return c(t === "min" ? n.fraction(n.min) : t === "max" ? n.fraction(n.max) : n.fraction(0));
|
|
1969
1969
|
}, f = () => {
|
|
1970
1970
|
let t = e.valAxisCrossesAt;
|
|
1971
|
-
if (t != null && Number.isFinite(t)) return
|
|
1971
|
+
if (t != null && Number.isFinite(t)) return g(t - 1, r, i, a);
|
|
1972
1972
|
let n = e.valAxisCrosses;
|
|
1973
1973
|
if (n !== "min" && n !== "max") return null;
|
|
1974
1974
|
let o = +(n === "max");
|
|
1975
1975
|
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,
|
|
1976
|
+
}, p = d(), m = f(), h = o === "horizontal" ? s.x + p * s.w : m == null ? l : s.x + m * s.w, _ = o === "vertical" ? s.y + s.h - p * s.h : m == null ? u : s.y + m * s.h, v = t.topology.nearDepth;
|
|
1977
1977
|
return {
|
|
1978
1978
|
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,
|
|
1979
|
+
axisY: _,
|
|
1980
|
+
depth: v,
|
|
1981
|
+
horizontalStart: t.project(s.x, _, v),
|
|
1982
|
+
horizontalEnd: t.project(s.x + s.w, _, v),
|
|
1983
|
+
verticalStart: t.project(h, s.y + s.h, v),
|
|
1984
|
+
verticalEnd: t.project(h, s.y, v)
|
|
1985
1985
|
};
|
|
1986
1986
|
}
|
|
1987
|
-
function Zt(e, t, n, r, i, a, o, s, c,
|
|
1988
|
-
let { front:
|
|
1987
|
+
function Zt(e, t, n, r, i, a, o, s, c, u) {
|
|
1988
|
+
let { front: d } = n, f = Xt(t, n, r, i, a, o, s), { axisX: p, axisY: m, depth: h } = f, _ = n.project(d.x + d.w / 2, d.y + d.h / 2, h), v = t.valAxisMinorTickMark ?? "none", y = c ? Ht : Vt;
|
|
1989
1989
|
if (!t.valAxisHidden && !t.valAxisLineHidden) {
|
|
1990
|
-
|
|
1991
|
-
let i = (e) => s === "horizontal" ? n.project(
|
|
1992
|
-
for (let n of r.majorTicks) Kt(e, t.valAxisMajorTickMark, i(n), a, o,
|
|
1993
|
-
for (let t of r.minorTicks) Kt(e,
|
|
1990
|
+
$(e, y(t.valAxisLineColor, t.valAxisLineWidthEmu, t.valAxisLineDash, u));
|
|
1991
|
+
let i = (e) => s === "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 = s === "horizontal" ? f.horizontalStart : f.verticalStart, o = s === "horizontal" ? f.horizontalEnd : f.verticalEnd;
|
|
1992
|
+
for (let n of r.majorTicks) Kt(e, t.valAxisMajorTickMark, i(n), a, o, _, s === "vertical" ? "horizontal" : "vertical", "major", u);
|
|
1993
|
+
for (let t of r.minorTicks) Kt(e, v, i(t), a, o, _, s === "vertical" ? "horizontal" : "vertical", "minor", u);
|
|
1994
1994
|
}
|
|
1995
1995
|
if (!t.catAxisHidden && !t.catAxisLineHidden) {
|
|
1996
|
-
|
|
1997
|
-
let r = s === "vertical" ?
|
|
1998
|
-
let a = s === "vertical" ? n.project(
|
|
1999
|
-
Kt(e, t.catAxisMajorTickMark, a, r,
|
|
1996
|
+
$(e, y(t.catAxisLineColor, t.catAxisLineWidthEmu, t.catAxisLineDash, u));
|
|
1997
|
+
let r = s === "vertical" ? f.horizontalStart : f.verticalStart, v = s === "vertical" ? f.horizontalEnd : f.verticalEnd, b = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), x = (i) => {
|
|
1998
|
+
let a = s === "vertical" ? n.project(d.x + i * d.w, m, h) : n.project(p, d.y + i * d.h, h);
|
|
1999
|
+
Kt(e, t.catAxisMajorTickMark, a, r, v, _, s === "vertical" ? "vertical" : "horizontal", "major", u);
|
|
2000
2000
|
};
|
|
2001
2001
|
if (c) {
|
|
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 c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit :
|
|
2008
|
-
for (let
|
|
2009
|
-
let
|
|
2010
|
-
if (!(
|
|
2011
|
-
if (Math.abs(
|
|
2012
|
-
let
|
|
2013
|
-
Kt(e, t.catAxisMinorTickMark,
|
|
2002
|
+
let e = l(i, a);
|
|
2003
|
+
for (let t = 0; t < e.length; t += b) x(o ? 1 - e[t] : e[t]);
|
|
2004
|
+
} else for (let e = 0; e < i; e += b) x(g(e, i, a, o));
|
|
2005
|
+
let S = t.catAxisMinorUnit;
|
|
2006
|
+
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && S != null && Number.isFinite(S) && S > 0) {
|
|
2007
|
+
let c = t.catAxisMajorUnit != null && Number.isFinite(t.catAxisMajorUnit) && t.catAxisMajorUnit > 0 ? t.catAxisMajorUnit : b, l = Math.min(512, Math.ceil(i / S));
|
|
2008
|
+
for (let f = 1; f < l; f++) {
|
|
2009
|
+
let l = f * S;
|
|
2010
|
+
if (!(l < i)) break;
|
|
2011
|
+
if (Math.abs(l / c - Math.round(l / c)) < 1e-9) continue;
|
|
2012
|
+
let y = g(l, i, a, o), b = s === "vertical" ? n.project(d.x + y * d.w, m, h) : n.project(p, d.y + y * d.h, h);
|
|
2013
|
+
Kt(e, t.catAxisMinorTickMark, b, r, v, _, s === "vertical" ? "vertical" : "horizontal", "minor", u);
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
2016
|
}
|
|
2017
2017
|
e.setLineDash([]);
|
|
2018
2018
|
}
|
|
2019
|
-
function Qt(e, t, n,
|
|
2019
|
+
function Qt(e, t, n, r, i) {
|
|
2020
2020
|
if (!t.threeD) return !1;
|
|
2021
|
-
let
|
|
2022
|
-
sceneDepthScale:
|
|
2021
|
+
let a = t.chartType === "clusteredBar" || t.chartType === "clusteredBarH" || t.chartType.startsWith("stackedBar"), o = t.chartType.endsWith("H") || t.chartType.includes("BarH"), s = t.chartType.startsWith("stacked"), l = a && !s && t.threeD.barGrouping === "standard", { plot: u, legend: d, legendMeasure: f } = jt(e, t, n, r, o ? "horizontal" : "vertical", i), p = ue(t.threeD, u, {
|
|
2022
|
+
sceneDepthScale: a ? l ? .65 : .1 : .4,
|
|
2023
2023
|
perspectiveTangentGain: l ? 1 : 2,
|
|
2024
|
-
sceneHeightScale: !
|
|
2024
|
+
sceneHeightScale: !a && !(t.threeD.heightPercentAuthored ?? t.threeD.heightPercent != null) ? 1 / 3 : void 0
|
|
2025
2025
|
});
|
|
2026
|
-
if (!
|
|
2027
|
-
|
|
2028
|
-
let
|
|
2026
|
+
if (!p) return !0;
|
|
2027
|
+
p = pe(p, t.threeD, u);
|
|
2028
|
+
let m = t.chartType.endsWith("Pct"), h = t.series.find((e) => (e.categories?.length ?? 0) > 0)?.categories ?? t.categories, _ = Math.max(1, h.length, ...t.series.map((e) => e.values.length)), v = m ? lt(t, _) : void 0, y = t.catAxisOrientation === "maxMin", b = t.catAxisCrossBetween === "between", x = t.dispBlanksAs ?? "gap", S = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, w = (e, n) => {
|
|
2029
2029
|
let r = t.series[e]?.values[n];
|
|
2030
|
-
return r != null && Number.isFinite(r) && (!
|
|
2031
|
-
}, T = (e, n) =>
|
|
2032
|
-
if (
|
|
2030
|
+
return r != null && Number.isFinite(r) && (!S || r > 0) || r == null && (s || x === "zero");
|
|
2031
|
+
}, T = (e, n) => ut(t, e, n, v), E = 0, k = 0;
|
|
2032
|
+
if (s) {
|
|
2033
2033
|
for (let e = 0; e < _; e++) {
|
|
2034
2034
|
let n = 0, r = 0;
|
|
2035
2035
|
for (let i = 0; i < t.series.length; i++) {
|
|
2036
2036
|
let t = T(i, e);
|
|
2037
|
-
t >= 0 ? n =
|
|
2037
|
+
t >= 0 ? n = X(n, t) : r = X(r, t);
|
|
2038
2038
|
}
|
|
2039
|
-
|
|
2039
|
+
E = Math.min(E, r), k = Math.max(k, n);
|
|
2040
2040
|
}
|
|
2041
|
-
|
|
2041
|
+
m && (E = E < 0 ? -100 : 0, k = k > 0 ? 100 : 0, E === 0 && k === 0 && (k = 1));
|
|
2042
2042
|
} else {
|
|
2043
|
-
let e =
|
|
2043
|
+
let e = ve(t.series.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e) && (!S || e > 0)), S ? {
|
|
2044
2044
|
min: 1,
|
|
2045
2045
|
max: 10
|
|
2046
2046
|
} : {
|
|
2047
2047
|
min: 0,
|
|
2048
2048
|
max: 1
|
|
2049
2049
|
});
|
|
2050
|
-
|
|
2050
|
+
E = S ? e.min : Math.min(0, e.min), k = S ? e.max : Math.max(0, e.max);
|
|
2051
2051
|
}
|
|
2052
|
-
let
|
|
2053
|
-
|
|
2054
|
-
let { front:
|
|
2055
|
-
if (
|
|
2056
|
-
let
|
|
2052
|
+
let A = o ? p.project(p.front.x, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y, p.topology.nearDepth), j = o ? p.project(p.front.x + p.front.w, p.topology.axisY === "min" ? p.front.y : p.front.y + p.front.h, p.topology.nearDepth) : p.project(p.topology.axisX === "min" ? p.front.x : p.front.x + p.front.w, p.front.y + p.front.h, p.topology.nearDepth), M = Math.hypot(j.x - A.x, j.y - A.y) / r, F = Lt(t, E, k, M, m, o ? "horizontal" : "vertical"), L = (e) => Number.isFinite(e) ? Math.max(F.min, Math.min(F.max, e)) : F.min;
|
|
2053
|
+
a || Ut(e, t, p, F, o ? "horizontal" : "vertical", _, b, y, r);
|
|
2054
|
+
let { front: R } = p, z = Math.max(1, t.series.length), re = [], B = t.series.map((e) => new Map(e.dataPointOverrides?.map((e) => [e.idx, e]) ?? [])), ie = t.series.map((e) => new Map(e.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []));
|
|
2055
|
+
if (a) {
|
|
2056
|
+
let a = p.prismInterval(0, 1, !0), c = [], u = Array(_).fill(0), d = Array(_).fill(0), f = (o ? R.h : R.w) / _, h = t.barGapWidth != null && Number.isFinite(t.barGapWidth) && t.barGapWidth >= 0 ? t.barGapWidth : 150;
|
|
2057
2057
|
for (let e = 0; e < t.series.length; e++) {
|
|
2058
|
-
let n = t.series[e],
|
|
2059
|
-
for (let
|
|
2060
|
-
if (!w(e,
|
|
2061
|
-
let l = T(e,
|
|
2062
|
-
|
|
2063
|
-
let
|
|
2058
|
+
let n = t.series[e], i = l ? p.prismInterval(e, z, !1) : a, g = ge(f, h, l ? 0 : e, l ? 1 : z, s || l);
|
|
2059
|
+
for (let a = 0; a < _; a++) {
|
|
2060
|
+
if (!w(e, a)) continue;
|
|
2061
|
+
let l = T(e, a), p = Z(t, n, B[e].get(a), a, e), h = p.fill === null ? "transparent" : p.color, v = p.lineFill !== null && (p.lineColor != null || p.lineFill !== void 0), b = s ? l >= 0 ? u[a] : d[a] : 0, x = X(b, l);
|
|
2062
|
+
s && (l >= 0 ? u[a] = x : d[a] = x);
|
|
2063
|
+
let C = L(b), E = L(x), D = n.threeDShape ?? t.threeD.shape ?? "box", O = D === "cone" || D === "pyramid", k = D === "coneToMax" || D === "pyramidToMax", ee = (e) => {
|
|
2064
2064
|
if (!O) return 1;
|
|
2065
|
-
let t =
|
|
2065
|
+
let t = S && !(b > 0) ? F.min : b, n = F.fraction(t), r = F.fraction(x), i = F.fraction(e), a = r - n;
|
|
2066
2066
|
return a === 0 || !Number.isFinite(a) || !Number.isFinite(i - n) ? +(e === t) : Math.max(0, Math.min(1, 1 - (i - n) / a));
|
|
2067
|
-
},
|
|
2067
|
+
}, A = (e) => {
|
|
2068
2068
|
if (!k) return 1;
|
|
2069
|
-
let t = x >= b ?
|
|
2069
|
+
let t = x >= b ? F.max : F.min, n = S ? F.min : 0, r = F.fraction(t), i = F.fraction(n), a = F.fraction(e), o = Math.abs(r - i);
|
|
2070
2070
|
return !(o > 0) || ![
|
|
2071
2071
|
r,
|
|
2072
2072
|
i,
|
|
2073
2073
|
a
|
|
2074
|
-
].every(Number.isFinite) ?
|
|
2075
|
-
},
|
|
2076
|
-
if (
|
|
2077
|
-
let t =
|
|
2078
|
-
|
|
2074
|
+
].every(Number.isFinite) ? se(e, F.min, F.max) : Math.max(0, Math.min(1, Math.abs(r - a) / o));
|
|
2075
|
+
}, j = k ? A(C) : ee(C), M = k ? A(E) : ee(E);
|
|
2076
|
+
if (o) {
|
|
2077
|
+
let t = R.x + F.fraction(C) * R.w, n = R.x + F.fraction(E) * R.w, o = y ? _ - 1 - a : a, s = R.y + o * f + g.offset;
|
|
2078
|
+
c.push({
|
|
2079
2079
|
x: Math.min(t, n),
|
|
2080
|
-
y:
|
|
2080
|
+
y: s,
|
|
2081
2081
|
width: Math.abs(n - t),
|
|
2082
2082
|
height: g.size,
|
|
2083
|
-
nearDepth:
|
|
2084
|
-
farDepth:
|
|
2085
|
-
categoryIndex:
|
|
2083
|
+
nearDepth: i.near,
|
|
2084
|
+
farDepth: i.far,
|
|
2085
|
+
categoryIndex: a,
|
|
2086
2086
|
seriesIndex: e,
|
|
2087
|
-
color:
|
|
2087
|
+
color: h,
|
|
2088
2088
|
fillPaint: p.fill,
|
|
2089
2089
|
lineFill: p.lineFill,
|
|
2090
2090
|
shape: D,
|
|
2091
2091
|
baseCoord: t,
|
|
2092
2092
|
endCoord: n,
|
|
2093
|
-
baseScale:
|
|
2094
|
-
endScale:
|
|
2093
|
+
baseScale: j,
|
|
2094
|
+
endScale: M,
|
|
2095
2095
|
omitBaseCap: !1,
|
|
2096
2096
|
omitEndCap: !1,
|
|
2097
2097
|
outline: v,
|
|
2098
2098
|
outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
|
|
2099
|
-
outlineWidth: p.lineWidthEmu == null ? .75 *
|
|
2099
|
+
outlineWidth: p.lineWidthEmu == null ? .75 * r / H : at(p.lineWidthEmu, r),
|
|
2100
2100
|
outlineDash: p.lineDash ?? "solid",
|
|
2101
2101
|
outlineCustomDash: p.lineCustomDash,
|
|
2102
2102
|
outlineCap: p.lineCap,
|
|
2103
2103
|
outlineJoin: p.lineJoin,
|
|
2104
|
-
labelValue:
|
|
2104
|
+
labelValue: m ? l / 100 : l,
|
|
2105
2105
|
plottedLabelValue: x
|
|
2106
2106
|
});
|
|
2107
2107
|
} else {
|
|
2108
|
-
let t =
|
|
2109
|
-
|
|
2110
|
-
x:
|
|
2108
|
+
let t = R.y + R.h - F.fraction(C) * R.h, n = R.y + R.h - F.fraction(E) * R.h, o = y ? _ - 1 - a : a, s = R.x + o * f + g.offset;
|
|
2109
|
+
c.push({
|
|
2110
|
+
x: s,
|
|
2111
2111
|
y: Math.min(t, n),
|
|
2112
2112
|
width: g.size,
|
|
2113
2113
|
height: Math.abs(n - t),
|
|
2114
|
-
nearDepth:
|
|
2115
|
-
farDepth:
|
|
2116
|
-
categoryIndex:
|
|
2114
|
+
nearDepth: i.near,
|
|
2115
|
+
farDepth: i.far,
|
|
2116
|
+
categoryIndex: a,
|
|
2117
2117
|
seriesIndex: e,
|
|
2118
|
-
color:
|
|
2118
|
+
color: h,
|
|
2119
2119
|
fillPaint: p.fill,
|
|
2120
2120
|
lineFill: p.lineFill,
|
|
2121
2121
|
shape: D,
|
|
2122
2122
|
baseCoord: t,
|
|
2123
2123
|
endCoord: n,
|
|
2124
|
-
baseScale:
|
|
2125
|
-
endScale:
|
|
2124
|
+
baseScale: j,
|
|
2125
|
+
endScale: M,
|
|
2126
2126
|
omitBaseCap: !1,
|
|
2127
2127
|
omitEndCap: !1,
|
|
2128
2128
|
outline: v,
|
|
2129
2129
|
outlineColor: p.lineColor ?? "rgba(0,0,0,0.42)",
|
|
2130
|
-
outlineWidth: p.lineWidthEmu == null ? .75 *
|
|
2130
|
+
outlineWidth: p.lineWidthEmu == null ? .75 * r / H : at(p.lineWidthEmu, r),
|
|
2131
2131
|
outlineDash: p.lineDash ?? "solid",
|
|
2132
2132
|
outlineCustomDash: p.lineCustomDash,
|
|
2133
2133
|
outlineCap: p.lineCap,
|
|
2134
2134
|
outlineJoin: p.lineJoin,
|
|
2135
|
-
labelValue:
|
|
2135
|
+
labelValue: m ? l / 100 : l,
|
|
2136
2136
|
plottedLabelValue: x
|
|
2137
2137
|
});
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
|
-
if (
|
|
2142
|
-
let e =
|
|
2141
|
+
if (s) {
|
|
2142
|
+
let e = ot(c, _);
|
|
2143
2143
|
for (let t = 0; t < _; t++) {
|
|
2144
2144
|
let n = e[t];
|
|
2145
2145
|
for (let e of [-1, 1]) {
|
|
2146
|
-
let t = n.filter((t) => Math.sign(t.labelValue) === e && !
|
|
2146
|
+
let t = n.filter((t) => Math.sign(t.labelValue) === e && !_t(t.color) && Math.abs(t.endCoord - t.baseCoord) > 1e-9).sort((e, t) => e.seriesIndex - t.seriesIndex);
|
|
2147
2147
|
for (let e = 0; e + 1 < t.length; e++) {
|
|
2148
2148
|
let n = t[e], r = t[e + 1], i = 1e-8 * Math.max(1, Math.abs(n.endCoord), Math.abs(r.baseCoord));
|
|
2149
2149
|
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
2150
|
}
|
|
2151
2151
|
}
|
|
2152
|
-
let r = n.find((e) => e.labelValue > 0 && !
|
|
2152
|
+
let r = n.find((e) => e.labelValue > 0 && !_t(e.color)), i = n.find((e) => e.labelValue < 0 && !_t(e.color));
|
|
2153
2153
|
if (r && i) {
|
|
2154
2154
|
let e = 1e-8 * Math.max(1, Math.abs(r.baseCoord), Math.abs(i.baseCoord));
|
|
2155
2155
|
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
2156
|
}
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
2159
|
-
Ut(e, t,
|
|
2159
|
+
Ut(e, t, p, F, o ? "horizontal" : "vertical", _, b, y, r);
|
|
2160
2160
|
let g = {
|
|
2161
|
-
remaining:
|
|
2161
|
+
remaining: Le,
|
|
2162
2162
|
exceeded: !1
|
|
2163
|
-
}, v =
|
|
2164
|
-
let n =
|
|
2163
|
+
}, v = c.flatMap((t) => {
|
|
2164
|
+
let n = bt(p, t.shape, o, t.x, t.y, t.width, t.height, t.baseCoord, t.endCoord, t.nearDepth, t.farDepth, t.color, t.baseScale, t.endScale, t.omitBaseCap, t.omitEndCap, t.outline && t.outlineColor ? {
|
|
2165
2165
|
color: t.outlineColor,
|
|
2166
2166
|
width: t.outlineWidth,
|
|
2167
2167
|
dash: O(t.outlineCustomDash, t.outlineDash, t.outlineWidth),
|
|
2168
2168
|
cap: t.outlineCap,
|
|
2169
2169
|
join: t.outlineJoin
|
|
2170
2170
|
} : void 0, g);
|
|
2171
|
-
return
|
|
2171
|
+
return wt(e, n, "fill", t.fillPaint, i), wt(e, n, "outline", t.lineFill, i), n;
|
|
2172
2172
|
});
|
|
2173
|
-
if (g.exceeded) return
|
|
2174
|
-
for (let t of
|
|
2175
|
-
for (let
|
|
2176
|
-
let
|
|
2177
|
-
|
|
2173
|
+
if (g.exceeded) return Tt(e, n), !0;
|
|
2174
|
+
for (let t of Ie(v)) Ct(e, t);
|
|
2175
|
+
for (let a of c) {
|
|
2176
|
+
let s = t.series[a.seriesIndex], c = o ? p.project(a.endCoord, a.y + a.height / 2, (a.nearDepth + a.farDepth) / 2) : p.project(a.x + a.width / 2, a.endCoord, (a.nearDepth + a.farDepth) / 2), l = ie[a.seriesIndex].get(a.categoryIndex);
|
|
2177
|
+
At(t, s, l) && re.push(() => kt(e, t, s, a.seriesIndex, a.categoryIndex, a.labelValue, c, n, r, 0, void 0, l, "t", c, !0, t.valAxisDisplayUnits, F.max, a.plottedLabelValue, i));
|
|
2178
2178
|
}
|
|
2179
2179
|
} else {
|
|
2180
|
-
let
|
|
2181
|
-
if (
|
|
2180
|
+
let a = t.series.map(() => Array(_).fill(0)), o = t.series.map(() => Array(_).fill(0));
|
|
2181
|
+
if (s) {
|
|
2182
2182
|
let e = Array(_).fill(0), n = Array(_).fill(0);
|
|
2183
|
-
for (let
|
|
2184
|
-
let
|
|
2185
|
-
r
|
|
2183
|
+
for (let r = 0; r < t.series.length; r++) for (let t = 0; t < _; t++) {
|
|
2184
|
+
let i = T(r, t), s = i >= 0 ? e[t] : n[t];
|
|
2185
|
+
a[r][t] = s, o[r][t] = X(s, i), i >= 0 ? e[t] = X(e[t], i) : n[t] = X(n[t], i);
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
|
-
let
|
|
2189
|
-
let t =
|
|
2188
|
+
let c = (e) => {
|
|
2189
|
+
let t = p.seriesDepth(e, z, s), n = 0, r = 0;
|
|
2190
2190
|
for (let i = 0; i < _; i++) {
|
|
2191
2191
|
if (!w(e, i)) continue;
|
|
2192
|
-
let a =
|
|
2193
|
-
n +=
|
|
2192
|
+
let a = s ? o[e][i] : T(e, i), c = R.x + g(i, _, b, y) * R.w, l = R.y + R.h - F.fraction(L(a)) * R.h;
|
|
2193
|
+
n += p.cameraDepth(c, l, t), r++;
|
|
2194
2194
|
}
|
|
2195
2195
|
return r > 0 ? n / r : -Infinity;
|
|
2196
|
-
}, l = t.series.map((e, t) => t).sort((e, t) =>
|
|
2197
|
-
for (let
|
|
2198
|
-
if (
|
|
2199
|
-
let l = t.series[
|
|
2196
|
+
}, l = t.series.map((e, t) => t).sort((e, t) => c(e) - c(t) || t - e), u = t.series.map((e, n) => Z(t, e, void 0, n, n)), d = [], f = [], h = !1;
|
|
2197
|
+
for (let c of l) {
|
|
2198
|
+
if (h) break;
|
|
2199
|
+
let l = t.series[c], v = u[c], S = v.fill === null ? "transparent" : v.color, C = s ? p.prismInterval(0, 1, !0) : p.prismInterval(c, z, !1), E = R.x + R.w / 2, D = R.y + R.h / 2, k = p.cameraDepth(E, D, C.near) >= p.cameraDepth(E, D, C.far) ? C.near : C.far, A = [], j = [], M = [], ne = [], L = [], ae = [], V = [], H = [], W = [], G = [];
|
|
2200
2200
|
for (let e = 0; e < _; e++) {
|
|
2201
|
-
if (!w(
|
|
2202
|
-
|
|
2201
|
+
if (!w(c, e)) {
|
|
2202
|
+
A.push(null), j.push(null), M.push(null), ne.push(null), L.push(null), ae.push(null), V.push(null), H.push(null), W.push(null), G.push(null);
|
|
2203
2203
|
continue;
|
|
2204
2204
|
}
|
|
2205
|
-
let n =
|
|
2206
|
-
|
|
2205
|
+
let n = s ? o[c][e] : T(c, e), r = s ? a[c][e] : 0, i = R.x + g(e, _, b, y) * R.w, l = F.fraction(n), u = F.fraction(r), d = Number.isFinite(u) ? u : r <= F.min ? 0 : 1, f = Number.isFinite(l) && l >= 0 && l <= 1, m = Number.isFinite(l) ? Math.max(0, Math.min(1, l)) : n <= F.min ? 0 : 1, h = R.y + R.h - m * R.h, v = R.y + R.h - Math.max(0, Math.min(1, d)) * R.h;
|
|
2206
|
+
A.push(t.chartType.toLowerCase().includes("area") || f ? p.project(i, h, k) : null), j.push(p.project(i, v, k)), M.push(f ? p.cameraDepth(i, h, k) : null), ne.push(p.cameraDepth(i, v, k)), L.push(n), ae.push(i), V.push(h), H.push(v), W.push(l), G.push(d);
|
|
2207
2207
|
}
|
|
2208
|
-
let
|
|
2209
|
-
for (let e = 0; e <
|
|
2210
|
-
let t =
|
|
2208
|
+
let oe = [], K = null;
|
|
2209
|
+
for (let e = 0; e < A.length; e++) {
|
|
2210
|
+
let t = A[e], n = j[e];
|
|
2211
2211
|
if (!t || !n) {
|
|
2212
|
-
x === "gap" && (
|
|
2212
|
+
x === "gap" && (K && oe.push(K), K = null);
|
|
2213
2213
|
continue;
|
|
2214
2214
|
}
|
|
2215
|
-
|
|
2215
|
+
K ??= {
|
|
2216
2216
|
upper: [],
|
|
2217
2217
|
lower: [],
|
|
2218
2218
|
upperDepths: [],
|
|
@@ -2223,30 +2223,30 @@ function Qt(e, t, n, i, a) {
|
|
|
2223
2223
|
lowerYs: [],
|
|
2224
2224
|
upperFractions: [],
|
|
2225
2225
|
lowerFractions: []
|
|
2226
|
-
},
|
|
2226
|
+
}, K.upper.push(t), K.lower.push(n), K.upperDepths.push(M[e] ?? 0), K.lowerDepths.push(ne[e] ?? 0), K.indices.push(e), K.sceneXs.push(ae[e] ?? 0), K.upperYs.push(V[e] ?? 0), K.lowerYs.push(H[e] ?? 0), K.upperFractions.push(W[e] ?? 0), K.lowerFractions.push(G[e] ?? 0);
|
|
2227
2227
|
}
|
|
2228
|
-
|
|
2229
|
-
let
|
|
2228
|
+
K && oe.push(K);
|
|
2229
|
+
let q = [], se = [];
|
|
2230
2230
|
if (t.chartType.toLowerCase().includes("area")) {
|
|
2231
|
-
for (let t of
|
|
2231
|
+
for (let t of oe) {
|
|
2232
2232
|
let n = null;
|
|
2233
2233
|
for (let r = 0; r + 1 < t.upper.length; r++) {
|
|
2234
|
-
let i =
|
|
2234
|
+
let i = Ae(t.lowerFractions[r], t.lowerFractions[r + 1], t.upperFractions[r], t.upperFractions[r + 1]);
|
|
2235
2235
|
for (let a = 0; a < i.length; a++) {
|
|
2236
|
-
let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, l =
|
|
2237
|
-
...
|
|
2238
|
-
cameraDepth:
|
|
2239
|
-
cameraWeight:
|
|
2236
|
+
let o = i[a], s = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.startT, c = t.sceneXs[r] + (t.sceneXs[r + 1] - t.sceneXs[r]) * o.endT, l = R.y + R.h - o.lowerStart * R.h, u = R.y + R.h - o.lowerEnd * R.h, f = R.y + R.h - o.upperStart * R.h, m = R.y + R.h - o.upperEnd * R.h, g = {
|
|
2237
|
+
...p.project(s, f, k),
|
|
2238
|
+
cameraDepth: p.cameraDepth(s, f, k),
|
|
2239
|
+
cameraWeight: p.cameraProjectionWeight(s, f, k)
|
|
2240
2240
|
}, _ = {
|
|
2241
|
-
...
|
|
2242
|
-
cameraDepth:
|
|
2243
|
-
cameraWeight:
|
|
2241
|
+
...p.project(c, m, k),
|
|
2242
|
+
cameraDepth: p.cameraDepth(c, m, k),
|
|
2243
|
+
cameraWeight: p.cameraProjectionWeight(c, m, k)
|
|
2244
2244
|
};
|
|
2245
|
-
n != null && Math.hypot(n.at(-1).x - g.x, n.at(-1).y - g.y) <= 1e-8 ? n.push(_) : (n && n.length >= 2 &&
|
|
2246
|
-
let
|
|
2247
|
-
for (let t of
|
|
2245
|
+
n != null && Math.hypot(n.at(-1).x - g.x, n.at(-1).y - g.y) <= 1e-8 ? n.push(_) : (n && n.length >= 2 && q.push(n), n = [g, _]);
|
|
2246
|
+
let v = yt(p, s, c, l, u, f, m, C.near, C.far, S, r === 0 && a === 0 && o.startT === 0, r + 2 === t.upper.length && a + 1 === i.length && o.endT === 1);
|
|
2247
|
+
for (let t of v) {
|
|
2248
2248
|
if (d.length >= 1e4) {
|
|
2249
|
-
|
|
2249
|
+
h = !0;
|
|
2250
2250
|
break;
|
|
2251
2251
|
}
|
|
2252
2252
|
d.push({
|
|
@@ -2255,42 +2255,42 @@ function Qt(e, t, n, i, a) {
|
|
|
2255
2255
|
cameraDepths: t.cameraDepths,
|
|
2256
2256
|
cameraWeights: t.cameraWeights,
|
|
2257
2257
|
layer: 0,
|
|
2258
|
-
paint: () =>
|
|
2259
|
-
}),
|
|
2258
|
+
paint: () => Ct(e, t)
|
|
2259
|
+
}), se.push(t);
|
|
2260
2260
|
}
|
|
2261
|
-
if (
|
|
2261
|
+
if (h) break;
|
|
2262
2262
|
}
|
|
2263
|
-
if (
|
|
2263
|
+
if (h) break;
|
|
2264
2264
|
}
|
|
2265
|
-
if (n && n.length >= 2 &&
|
|
2265
|
+
if (n && n.length >= 2 && q.push(n), h) break;
|
|
2266
2266
|
}
|
|
2267
|
-
|
|
2267
|
+
wt(e, se, "fill", v.fill, i);
|
|
2268
2268
|
}
|
|
2269
|
-
let
|
|
2269
|
+
let ce = [];
|
|
2270
2270
|
if (!t.chartType.toLowerCase().includes("area")) {
|
|
2271
2271
|
let e = [], t = null;
|
|
2272
2272
|
for (let n = 0; n < _; n++) {
|
|
2273
|
-
let r =
|
|
2273
|
+
let r = L[n], i = r == null ? NaN : F.fraction(r);
|
|
2274
2274
|
if (r == null || !Number.isFinite(i)) {
|
|
2275
2275
|
x === "gap" && t && (e.push(t), t = null);
|
|
2276
2276
|
continue;
|
|
2277
2277
|
}
|
|
2278
2278
|
t ??= [], t.push({
|
|
2279
|
-
x:
|
|
2279
|
+
x: R.x + g(n, _, b, y) * R.w,
|
|
2280
2280
|
fraction: i,
|
|
2281
2281
|
ownerIndex: n
|
|
2282
2282
|
});
|
|
2283
2283
|
}
|
|
2284
2284
|
t && e.push(t);
|
|
2285
2285
|
let n = (e) => {
|
|
2286
|
-
let t = Math.max(0, Math.min(1, e.fraction)), n =
|
|
2286
|
+
let t = Math.max(0, Math.min(1, e.fraction)), n = R.y + R.h - t * R.h;
|
|
2287
2287
|
return {
|
|
2288
|
-
...
|
|
2289
|
-
cameraDepth:
|
|
2290
|
-
cameraWeight:
|
|
2288
|
+
...p.project(e.x, n, k),
|
|
2289
|
+
cameraDepth: p.cameraDepth(e.x, n, k),
|
|
2290
|
+
cameraWeight: p.cameraProjectionWeight(e.x, n, k)
|
|
2291
2291
|
};
|
|
2292
2292
|
}, r = (e) => {
|
|
2293
|
-
e && e.path.length >= 2 &&
|
|
2293
|
+
e && e.path.length >= 2 && ce.push(e);
|
|
2294
2294
|
};
|
|
2295
2295
|
for (let t of e) {
|
|
2296
2296
|
if (t.length < 2) continue;
|
|
@@ -2319,8 +2319,8 @@ function Qt(e, t, n, i, a) {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
let i = null, a = 0;
|
|
2321
2321
|
for (let t = 0; t + 1 < e.length; t++) {
|
|
2322
|
-
let o = e[t], s = e[t + 1], c = (e) =>
|
|
2323
|
-
if (!
|
|
2322
|
+
let o = e[t], s = e[t + 1], c = (e) => p.project(e.x, R.y + R.h - e.fraction * R.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) * R.h), m = ke(o.fraction, s.fraction);
|
|
2323
|
+
if (!m || m.endT - m.startT <= 1e-12) {
|
|
2324
2324
|
r(i), i = null, a += f;
|
|
2325
2325
|
continue;
|
|
2326
2326
|
}
|
|
@@ -2328,67 +2328,67 @@ function Qt(e, t, n, i, a) {
|
|
|
2328
2328
|
x: o.x + (s.x - o.x) * e,
|
|
2329
2329
|
fraction: o.fraction + (s.fraction - o.fraction) * e,
|
|
2330
2330
|
ownerIndex: s.ownerIndex
|
|
2331
|
-
}), g = c(h(
|
|
2331
|
+
}), g = c(h(m.startT)), _ = Math.hypot(g.x - l.x, g.y - l.y), v = n(h(m.startT)), y = n(h(m.endT)), b = h(m.startT), x = h(m.endT), S = (e) => ({
|
|
2332
2332
|
x: e.x,
|
|
2333
|
-
y:
|
|
2333
|
+
y: R.y + R.h - Math.max(0, Math.min(1, e.fraction)) * R.h
|
|
2334
2334
|
});
|
|
2335
|
-
i != null && Math.hypot(i.path.at(-1).x - v.x, i.path.at(-1).y - v.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(y), i.modelPath.push(S(x)), i.endClipped = t + 1 < e.length - 1 ||
|
|
2335
|
+
i != null && Math.hypot(i.path.at(-1).x - v.x, i.path.at(-1).y - v.y) <= 1e-8 && i.ownerIndex === s.ownerIndex ? (i.path.push(y), i.modelPath.push(S(x)), i.endClipped = t + 1 < e.length - 1 || m.endT < 1) : (r(i), i = {
|
|
2336
2336
|
path: [v, y],
|
|
2337
2337
|
modelPath: [S(b), S(x)],
|
|
2338
2338
|
ownerIndex: s.ownerIndex,
|
|
2339
|
-
startClipped: t > 0 ||
|
|
2340
|
-
endClipped: t + 1 < e.length - 1 ||
|
|
2341
|
-
dashOffset: a + (Number.isFinite(_) ? _ : f *
|
|
2339
|
+
startClipped: t > 0 || m.startT > 0,
|
|
2340
|
+
endClipped: t + 1 < e.length - 1 || m.endT < 1,
|
|
2341
|
+
dashOffset: a + (Number.isFinite(_) ? _ : f * m.startT)
|
|
2342
2342
|
}), a += f;
|
|
2343
2343
|
}
|
|
2344
2344
|
r(i);
|
|
2345
2345
|
}
|
|
2346
2346
|
}
|
|
2347
|
-
let
|
|
2348
|
-
if (!
|
|
2349
|
-
let n = /* @__PURE__ */ new Map(),
|
|
2350
|
-
let r =
|
|
2351
|
-
if (!
|
|
2347
|
+
let le = t.chartType.toLowerCase().includes("area"), ue = l.lineHidden != null || l.lineColor != null || l.lineWidthEmu != null || l.chartexStyle?.lineHidden != null || l.chartexStyle?.lineColors?.some(Boolean) || l.chartexStyle?.lineWidthEmu != null || l.chartexStyle?.lineDash != null || l.chartexStyle?.lineCap != null || l.chartexStyle?.lineJoin != null || v.lineColor != null || v.lineFill !== void 0;
|
|
2348
|
+
if (!le || v.lineFill !== null && ue) {
|
|
2349
|
+
let n = /* @__PURE__ */ new Map(), a = (e) => {
|
|
2350
|
+
let r = B[c].get(e);
|
|
2351
|
+
if (!pt(r)) return v;
|
|
2352
2352
|
let i = n.get(e);
|
|
2353
|
-
return i || (i =
|
|
2354
|
-
}, o = /* @__PURE__ */ new Map(),
|
|
2355
|
-
remaining:
|
|
2353
|
+
return i || (i = Z(t, l, r, e, c), n.set(e, i)), i;
|
|
2354
|
+
}, o = /* @__PURE__ */ new Map(), s = {
|
|
2355
|
+
remaining: Le,
|
|
2356
2356
|
exceeded: !1
|
|
2357
|
-
}, u = (t, n,
|
|
2357
|
+
}, u = (t, n, i, a = i, c = 0, l) => {
|
|
2358
2358
|
if (n.lineFill === null) return;
|
|
2359
|
-
let u = n ===
|
|
2360
|
-
width:
|
|
2361
|
-
dash: O(n.lineCustomDash, n.lineDash,
|
|
2362
|
-
dashOffset:
|
|
2359
|
+
let u = n === v ? S : n.color, f = n.lineColor ?? J(u, .7), m = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / U) * r : le ? .75 * r : Math.max(1, 2 * r), g = {
|
|
2360
|
+
width: m,
|
|
2361
|
+
dash: O(n.lineCustomDash, n.lineDash, m),
|
|
2362
|
+
dashOffset: c,
|
|
2363
2363
|
lineCap: n.lineCap,
|
|
2364
|
-
startCap:
|
|
2364
|
+
startCap: i,
|
|
2365
2365
|
endCap: a,
|
|
2366
2366
|
lineJoin: n.lineJoin
|
|
2367
2367
|
};
|
|
2368
|
-
if (!
|
|
2369
|
-
let t =
|
|
2368
|
+
if (!le && l && l.length >= 2) {
|
|
2369
|
+
let t = Ge(l.map((e) => ({
|
|
2370
2370
|
...e,
|
|
2371
2371
|
cameraDepth: 0,
|
|
2372
2372
|
cameraWeight: 1
|
|
2373
|
-
})),
|
|
2373
|
+
})), g);
|
|
2374
2374
|
if (t == null) {
|
|
2375
|
-
|
|
2375
|
+
h = !0;
|
|
2376
2376
|
return;
|
|
2377
2377
|
}
|
|
2378
2378
|
let r = o.get(n) ?? [];
|
|
2379
2379
|
for (let n of t) {
|
|
2380
|
-
let t =
|
|
2380
|
+
let t = De({
|
|
2381
2381
|
outline: n.points,
|
|
2382
2382
|
nearDepth: C.near,
|
|
2383
2383
|
farDepth: C.far
|
|
2384
2384
|
});
|
|
2385
2385
|
if (!t) continue;
|
|
2386
|
-
let i =
|
|
2386
|
+
let i = xt(p, t, f, void 0, s).map((e) => ({
|
|
2387
2387
|
...e,
|
|
2388
2388
|
paintRole: "outline"
|
|
2389
2389
|
}));
|
|
2390
|
-
if (
|
|
2391
|
-
|
|
2390
|
+
if (s.exceeded) {
|
|
2391
|
+
h = !0;
|
|
2392
2392
|
return;
|
|
2393
2393
|
}
|
|
2394
2394
|
r.push(...i);
|
|
@@ -2398,22 +2398,22 @@ function Qt(e, t, n, i, a) {
|
|
|
2398
2398
|
cameraDepths: t.cameraDepths,
|
|
2399
2399
|
cameraWeights: t.cameraWeights,
|
|
2400
2400
|
layer: 1,
|
|
2401
|
-
paint: () =>
|
|
2401
|
+
paint: () => Ct(e, t)
|
|
2402
2402
|
});
|
|
2403
2403
|
}
|
|
2404
2404
|
o.set(n, r);
|
|
2405
2405
|
return;
|
|
2406
2406
|
}
|
|
2407
|
-
let
|
|
2408
|
-
if (
|
|
2409
|
-
|
|
2407
|
+
let _ = Ge(t, g);
|
|
2408
|
+
if (_ == null) {
|
|
2409
|
+
h = !0;
|
|
2410
2410
|
return;
|
|
2411
2411
|
}
|
|
2412
|
-
if (d.length +
|
|
2413
|
-
|
|
2412
|
+
if (d.length + _.length > 1e4) {
|
|
2413
|
+
h = !0;
|
|
2414
2414
|
return;
|
|
2415
2415
|
}
|
|
2416
|
-
for (let t of
|
|
2416
|
+
for (let t of _) {
|
|
2417
2417
|
let r = {
|
|
2418
2418
|
points: t.points,
|
|
2419
2419
|
color: f,
|
|
@@ -2430,107 +2430,107 @@ function Qt(e, t, n, i, a) {
|
|
|
2430
2430
|
cameraDepths: t.cameraDepths,
|
|
2431
2431
|
cameraWeights: t.cameraWeights,
|
|
2432
2432
|
layer: 1,
|
|
2433
|
-
paint: () =>
|
|
2433
|
+
paint: () => Ct(e, r)
|
|
2434
2434
|
});
|
|
2435
2435
|
}
|
|
2436
2436
|
};
|
|
2437
|
-
if (
|
|
2438
|
-
else for (let e of
|
|
2439
|
-
let t =
|
|
2437
|
+
if (le) for (let e of q) u(e, v, v.lineCap);
|
|
2438
|
+
else for (let e of ce) {
|
|
2439
|
+
let t = a(e.ownerIndex);
|
|
2440
2440
|
u(e.path, t, e.startClipped ? "butt" : t.lineCap, e.endClipped ? "butt" : t.lineCap, e.dashOffset, e.modelPath);
|
|
2441
2441
|
}
|
|
2442
|
-
for (let [t, n] of o)
|
|
2442
|
+
for (let [t, n] of o) wt(e, n, "outline", t.lineFill, i);
|
|
2443
2443
|
}
|
|
2444
|
-
let
|
|
2445
|
-
if ((t.chartType.toLowerCase().includes("line") ||
|
|
2446
|
-
let n =
|
|
2444
|
+
let de = (le ? l.showMarker === !0 || P(l) : l.showMarker === !0) && l.markerSymbol !== "none";
|
|
2445
|
+
if ((t.chartType.toLowerCase().includes("line") || le) && (de || I(l))) for (let t = 0; t < A.length; t++) {
|
|
2446
|
+
let n = A[t];
|
|
2447
2447
|
if (!n) continue;
|
|
2448
|
-
let
|
|
2448
|
+
let a = B[c].get(t), o = te(l, a, "circle", de);
|
|
2449
2449
|
if (o === "none") continue;
|
|
2450
|
-
let
|
|
2451
|
-
f.push(() =>
|
|
2450
|
+
let s = a?.markerSize ?? l.markerSize ?? 5, u = ee(l, a, t, l.color ?? tt[c % tt.length]), d = N(l, a, t), p = a?.markerLine ?? l.markerLine ?? l.lineColor ?? l.color ?? tt[c % tt.length], m = (a?.markerLineWidthEmu ?? l.markerLineWidthEmu) == null ? Math.max(.75, l.lineWidthEmu == null ? r : l.lineWidthEmu / U * r) : Math.max(.25, (a?.markerLineWidthEmu ?? l.markerLineWidthEmu ?? 0) / U * r);
|
|
2451
|
+
f.push(() => Ot(e, n, o, Math.max(2, s) * r, u === "00000000" ? "transparent" : `#${u}`, `#${p}`, m, d, i, r));
|
|
2452
2452
|
}
|
|
2453
|
-
for (let
|
|
2454
|
-
let u =
|
|
2453
|
+
for (let a = 0; a < A.length; a++) {
|
|
2454
|
+
let u = A[a];
|
|
2455
2455
|
if (!u) continue;
|
|
2456
|
-
let d = T(
|
|
2457
|
-
|
|
2456
|
+
let d = T(c, a), f = B[c].get(a), p = f?.markerSize ?? l.markerSize ?? 5, h = ie[c].get(a);
|
|
2457
|
+
At(t, l, h) && re.push(() => kt(e, t, l, c, a, m ? d / 100 : d, u, n, r, l.showMarker === !0 || f?.markerSymbol != null ? p * r / 2 : 0, void 0, h, "t", u, !0, t.valAxisDisplayUnits, F.max, s ? o[c][a] : d, i));
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
if (
|
|
2461
|
-
for (let e of
|
|
2460
|
+
if (h) return Tt(e, n), !0;
|
|
2461
|
+
for (let e of Ie(d)) e.paint();
|
|
2462
2462
|
for (let e of f) e();
|
|
2463
2463
|
}
|
|
2464
|
-
Wt(e, t,
|
|
2465
|
-
let
|
|
2466
|
-
if (t !== "low" && t !== "high") return
|
|
2467
|
-
let n =
|
|
2468
|
-
if (e === "value" ===
|
|
2469
|
-
let e =
|
|
2464
|
+
Wt(e, t, p, F, _, b, y, r, o ? "horizontal" : "vertical"), Zt(e, t, p, F, _, b, y, o ? "horizontal" : "vertical", a, r), Pt(e, t, n, p, F, _, b, y, o ? "horizontal" : "vertical", a, r);
|
|
2465
|
+
let ae = Xt(t, p, F, _, b, y, o ? "horizontal" : "vertical"), V = (e, t) => {
|
|
2466
|
+
if (t !== "low" && t !== "high") return ae;
|
|
2467
|
+
let n = p.topology.nearDepth, r = ae.axisX, i = ae.axisY;
|
|
2468
|
+
if (e === "value" === o) {
|
|
2469
|
+
let e = R.y, r = R.y + R.h, a = p.project(R.x + R.w / 2, e, n), o = p.project(R.x + R.w / 2, r, n), s = a.y >= o.y ? e : r;
|
|
2470
2470
|
i = t === "low" ? s : s === e ? r : e;
|
|
2471
2471
|
} else {
|
|
2472
|
-
let e =
|
|
2472
|
+
let e = R.x, i = R.x + R.w, a = p.project(e, R.y + R.h / 2, n), o = p.project(i, R.y + R.h / 2, n), s = a.x <= o.x ? e : i;
|
|
2473
2473
|
r = t === "low" ? s : s === e ? i : e;
|
|
2474
2474
|
}
|
|
2475
2475
|
return {
|
|
2476
2476
|
axisX: r,
|
|
2477
2477
|
axisY: i,
|
|
2478
2478
|
depth: n,
|
|
2479
|
-
horizontalStart:
|
|
2480
|
-
horizontalEnd:
|
|
2481
|
-
verticalStart:
|
|
2482
|
-
verticalEnd:
|
|
2479
|
+
horizontalStart: p.project(R.x, i, n),
|
|
2480
|
+
horizontalEnd: p.project(R.x + R.w, i, n),
|
|
2481
|
+
verticalStart: p.project(r, R.y + R.h, n),
|
|
2482
|
+
verticalEnd: p.project(r, R.y, n)
|
|
2483
2483
|
};
|
|
2484
|
-
},
|
|
2485
|
-
if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${
|
|
2486
|
-
let { axisX: n, axisY:
|
|
2484
|
+
}, W = V("value", t.valAxisTickLabelPos), G = V("category", t.catAxisTickLabelPos), oe = c(t.valAxisFontSizeHpt, r) ?? 9 * r;
|
|
2485
|
+
if (e.font = `${t.valAxisFontItalic ? "italic " : ""}${t.valAxisFontBold ? "bold " : ""}${oe}px ${ht(t.valAxisFontFace)}`, e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#595959", e.textAlign = o ? "center" : "right", e.textBaseline = o ? "top" : "middle", !t.valAxisHidden && t.valAxisTickLabelPos !== "none") {
|
|
2486
|
+
let { axisX: n, axisY: i, depth: a } = W, s = p.project(R.x + R.w / 2, R.y + R.h / 2, a), c = Gt(o ? W.horizontalStart : W.verticalStart, o ? W.horizontalEnd : W.verticalEnd, s, o ? "vertical" : "horizontal");
|
|
2487
2487
|
e.textAlign = Math.abs(c.x) < .2 ? "center" : c.x < 0 ? "right" : "left", e.textBaseline = Math.abs(c.y) < .2 ? "middle" : c.y < 0 ? "bottom" : "top";
|
|
2488
|
-
let l = Yt(t.valAxisMajorTickMark, t.valAxisLineHidden,
|
|
2489
|
-
for (let
|
|
2490
|
-
let
|
|
2491
|
-
e.fillText(
|
|
2488
|
+
let l = Yt(t.valAxisMajorTickMark, t.valAxisLineHidden, r, 5), u = t.valAxisDisplayUnits?.divisor;
|
|
2489
|
+
for (let r of F.majorTicks) {
|
|
2490
|
+
let s = o ? p.project(R.x + F.fraction(r) * R.w, i, a) : p.project(n, R.y + R.h - F.fraction(r) * R.h, a);
|
|
2491
|
+
e.fillText(D(m ? r / 100 : u != null && Number.isFinite(u) && u > 0 ? r / u : r, m ? t.valAxisFormatCode ?? "0%" : t.valAxisFormatCode, t.date1904), s.x + c.x * l, s.y + c.y * l);
|
|
2492
2492
|
}
|
|
2493
2493
|
}
|
|
2494
|
-
let
|
|
2495
|
-
if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${
|
|
2496
|
-
let n =
|
|
2497
|
-
if (a == null && (a = 0, !
|
|
2498
|
-
let t = Infinity, n = null,
|
|
2494
|
+
let K = c(t.catAxisFontSizeHpt, r) ?? 9 * r;
|
|
2495
|
+
if (e.font = `${t.catAxisFontItalic ? "italic " : ""}${t.catAxisFontBold ? "bold " : ""}${K}px ${ht(t.catAxisFontFace)}`, e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", !t.catAxisHidden && t.catAxisTickLabelPos !== "none") {
|
|
2496
|
+
let n = C(Yt(t.catAxisMajorTickMark, t.catAxisLineHidden, r, 6), t.catAxisLabelOffsetPercent), i = Array.from({ length: _ }, (e, n) => ne(String(h[n] ?? n + 1), t.catAxisFormatCode, t.date1904)), a = Et(t);
|
|
2497
|
+
if (a == null && (a = 0, !o && _ > 1)) {
|
|
2498
|
+
let t = Infinity, n = null, r = G.axisY;
|
|
2499
2499
|
for (let e = 0; e < _; e++) {
|
|
2500
|
-
let
|
|
2500
|
+
let i = g(e, _, b, y), a = p.project(R.x + i * R.w, r, p.topology.nearDepth);
|
|
2501
2501
|
n && (t = Math.min(t, Math.hypot(a.x - n.x, a.y - n.y))), n = a;
|
|
2502
2502
|
}
|
|
2503
|
-
Math.max(0, ...
|
|
2503
|
+
Math.max(0, ...i.map((t) => e.measureText(t).width)) > t * .9 && (a = -Math.PI / 4);
|
|
2504
2504
|
}
|
|
2505
|
-
let
|
|
2506
|
-
for (let t = 0; t < _; t +=
|
|
2507
|
-
let
|
|
2508
|
-
if (
|
|
2509
|
-
let
|
|
2510
|
-
e.textAlign =
|
|
2505
|
+
let s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1));
|
|
2506
|
+
for (let t = 0; t < _; t += s) {
|
|
2507
|
+
let r = g(t, _, b, y), { axisX: s, axisY: c, depth: l } = G, u = o ? p.project(s, R.y + g(t, _, b, y) * R.h, l) : p.project(R.x + r * R.w, c, l);
|
|
2508
|
+
if (o) {
|
|
2509
|
+
let r = p.project(s, R.y + R.h / 2, l), a = p.project(R.x + R.w / 2, R.y + R.h / 2, l), o = r.x <= a.x;
|
|
2510
|
+
e.textAlign = o ? "right" : "left", e.textBaseline = "middle", e.fillText(i[t], u.x + (o ? -n : n), u.y);
|
|
2511
2511
|
} else {
|
|
2512
|
-
let
|
|
2513
|
-
|
|
2512
|
+
let r = p.project(R.x + R.w / 2, R.y + R.h / 2, l), s = Gt(G.horizontalStart, G.horizontalEnd, r, "vertical");
|
|
2513
|
+
Dt(e, i[t], u, a, o, s.y < 0 ? -1 : 1, n);
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
2516
|
}
|
|
2517
|
-
|
|
2518
|
-
for (let e of
|
|
2519
|
-
return
|
|
2517
|
+
Nt(e, t, n, u, o, r);
|
|
2518
|
+
for (let e of re) e();
|
|
2519
|
+
return It(e, t, d, r, !1, f, i), !0;
|
|
2520
2520
|
}
|
|
2521
|
-
function $t(e, t, n,
|
|
2521
|
+
function $t(e, t, n, r, i) {
|
|
2522
2522
|
if (!t.threeD || t.chartType !== "pie") return !1;
|
|
2523
|
-
let
|
|
2524
|
-
if (!
|
|
2525
|
-
let
|
|
2523
|
+
let a = t.series[0];
|
|
2524
|
+
if (!a) return !0;
|
|
2525
|
+
let o = a.values.flatMap((e, t) => e != null && Number.isFinite(e) ? [{
|
|
2526
2526
|
index: t,
|
|
2527
2527
|
value: Math.abs(e)
|
|
2528
|
-
}] : []),
|
|
2529
|
-
for (let e of
|
|
2530
|
-
if (!(
|
|
2531
|
-
let l =
|
|
2528
|
+
}] : []), s = 0;
|
|
2529
|
+
for (let e of o) s = Math.max(s, e.value);
|
|
2530
|
+
if (!(s > 0)) return !0;
|
|
2531
|
+
let l = o.reduce((e, t) => e + t.value / s, 0);
|
|
2532
2532
|
if (!(l > 0) || !Number.isFinite(l)) return !0;
|
|
2533
|
-
let { plot: u, legend: d, legendMeasure: f } =
|
|
2533
|
+
let { plot: u, legend: d, legendMeasure: f } = jt(e, t, n, r, "radial", i), p = ue({
|
|
2534
2534
|
...t.threeD,
|
|
2535
2535
|
rotationY: t.threeD.rotationY ?? 0,
|
|
2536
2536
|
heightPercent: void 0,
|
|
@@ -2540,13 +2540,13 @@ function $t(e, t, n, i, a) {
|
|
|
2540
2540
|
sceneHeightScale: .15
|
|
2541
2541
|
});
|
|
2542
2542
|
if (!p) return !0;
|
|
2543
|
-
let m = new Map(
|
|
2543
|
+
let m = new Map(a.dataPointOverrides?.map((e) => [e.idx, e]) ?? []), h = 0;
|
|
2544
2544
|
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
2545
|
let { scene: g } = p, _ = Math.min(g.w * .45 / (1 + h), p.modelDepth * .45 / (1 + h), g.h / .45);
|
|
2546
2546
|
if (!(_ > 0)) return !0;
|
|
2547
|
-
let v = g.x + g.w / 2, y = g.y + g.h / 2, b = .5, x = _ * .3 *
|
|
2548
|
-
for (let e of
|
|
2549
|
-
let n = e.value /
|
|
2547
|
+
let v = g.x + g.w / 2, y = g.y + g.h / 2, b = .5, x = _ * .3 * he(t.threeD), S = 0, C = [], w = new Map(a.dataLabelOverrides?.map((e) => [e.idx, e]) ?? []), T = Math.max(48, Math.min(128, Math.ceil(Math.PI * 2 * _ / 4)));
|
|
2548
|
+
for (let e of o) {
|
|
2549
|
+
let n = e.value / s / l, r = Rt(t.firstSliceAngle, S, n), i = m.get(e.index), o = Z(t, a, i, e.index, 0), c = r.middle, u = i?.explosion != null && Number.isFinite(i.explosion) ? Math.max(0, Math.min(100, i.explosion)) / 100 : 0, d = v + Math.cos(c) * _ * u, f = b + Math.sin(c) * _ * u / p.modelDepth, h = Math.max(2, Math.ceil(T * n)), g = Oe({
|
|
2550
2550
|
centerX: d,
|
|
2551
2551
|
centerY: y,
|
|
2552
2552
|
centerDepth: f,
|
|
@@ -2565,29 +2565,29 @@ function $t(e, t, n, i, a) {
|
|
|
2565
2565
|
index: e.index,
|
|
2566
2566
|
start: r.start,
|
|
2567
2567
|
end: r.end,
|
|
2568
|
-
color:
|
|
2569
|
-
fillPaint:
|
|
2568
|
+
color: o.fill === null ? "transparent" : o.color,
|
|
2569
|
+
fillPaint: o.fill,
|
|
2570
2570
|
value: e.value,
|
|
2571
2571
|
percentValue: n,
|
|
2572
2572
|
centerX: d,
|
|
2573
2573
|
centerDepth: f,
|
|
2574
2574
|
segments: h,
|
|
2575
2575
|
mesh: g,
|
|
2576
|
-
lineColor:
|
|
2577
|
-
lineFill:
|
|
2578
|
-
lineWidthEmu:
|
|
2579
|
-
lineDash:
|
|
2580
|
-
lineCustomDash:
|
|
2581
|
-
lineCap:
|
|
2582
|
-
lineJoin:
|
|
2576
|
+
lineColor: o.lineColor,
|
|
2577
|
+
lineFill: o.lineFill,
|
|
2578
|
+
lineWidthEmu: o.lineWidthEmu ?? null,
|
|
2579
|
+
lineDash: o.lineDash ?? "solid",
|
|
2580
|
+
lineCustomDash: o.lineCustomDash,
|
|
2581
|
+
lineCap: o.lineCap,
|
|
2582
|
+
lineJoin: o.lineJoin
|
|
2583
2583
|
}), S += n;
|
|
2584
2584
|
}
|
|
2585
|
-
p =
|
|
2585
|
+
p = _e(p, C.flatMap((e) => e.mesh.vertices), u, .08);
|
|
2586
2586
|
let E = [], D = {
|
|
2587
|
-
remaining:
|
|
2587
|
+
remaining: Le,
|
|
2588
2588
|
exceeded: !1
|
|
2589
2589
|
}, k = (e) => {
|
|
2590
|
-
let t = e.lineWidthEmu == null ? .75 *
|
|
2590
|
+
let t = e.lineWidthEmu == null ? .75 * r : Math.max(.25, e.lineWidthEmu / U * r);
|
|
2591
2591
|
return e.lineFill !== null && (e.lineColor != null || e.lineFill !== void 0) ? {
|
|
2592
2592
|
color: e.lineColor ?? "rgba(0,0,0,0.42)",
|
|
2593
2593
|
width: t,
|
|
@@ -2595,81 +2595,81 @@ function $t(e, t, n, i, a) {
|
|
|
2595
2595
|
cap: e.lineCap,
|
|
2596
2596
|
join: e.lineJoin
|
|
2597
2597
|
} : void 0;
|
|
2598
|
-
},
|
|
2599
|
-
let n =
|
|
2600
|
-
return
|
|
2601
|
-
}),
|
|
2598
|
+
}, ee = C.flatMap((t) => {
|
|
2599
|
+
let n = xt(p, t.mesh, t.color, void 0, D);
|
|
2600
|
+
return wt(e, n, "fill", t.fillPaint, i), n;
|
|
2601
|
+
}), A = [], j = C.map(k), M = j[0], N = (e) => e == null ? null : [
|
|
2602
2602
|
e.color,
|
|
2603
2603
|
e.width,
|
|
2604
2604
|
e.dash.join(","),
|
|
2605
2605
|
e.cap,
|
|
2606
2606
|
e.join
|
|
2607
|
-
].join("|"),
|
|
2608
|
-
if (
|
|
2607
|
+
].join("|"), P = M != null && C.every((e) => e.lineFill === void 0) && j.every((e) => N(e) === N(M)) && C.every((e) => Math.abs(e.centerX - v) < 1e-9 && Math.abs(e.centerDepth - b) < 1e-9);
|
|
2608
|
+
if (P) A.push(...St(p, C, y, _, x, M, D));
|
|
2609
2609
|
else for (let t = 0; t < C.length; t++) {
|
|
2610
|
-
let n =
|
|
2610
|
+
let n = j[t];
|
|
2611
2611
|
if (!n) continue;
|
|
2612
|
-
let r =
|
|
2613
|
-
|
|
2614
|
-
}
|
|
2615
|
-
if (D.exceeded) return
|
|
2616
|
-
if (
|
|
2617
|
-
for (let t of
|
|
2618
|
-
for (let t of
|
|
2619
|
-
} else for (let t of
|
|
2612
|
+
let r = xt(p, C[t].mesh, "transparent", n, D, !0);
|
|
2613
|
+
wt(e, r, "outline", C[t].lineFill, i), A.push(...r);
|
|
2614
|
+
}
|
|
2615
|
+
if (D.exceeded) return Tt(e, n), !0;
|
|
2616
|
+
if (P) {
|
|
2617
|
+
for (let t of Ie(ee)) Ct(e, t);
|
|
2618
|
+
for (let t of Ie(A)) Ct(e, t);
|
|
2619
|
+
} else for (let t of Ie([...ee, ...A])) Ct(e, t);
|
|
2620
2620
|
for (let n of C) {
|
|
2621
|
-
let
|
|
2622
|
-
if (
|
|
2623
|
-
let l =
|
|
2624
|
-
e.font = `${
|
|
2625
|
-
let f =
|
|
2626
|
-
customText:
|
|
2627
|
-
showCategory:
|
|
2628
|
-
showSeries:
|
|
2629
|
-
showValue:
|
|
2630
|
-
showPercent:
|
|
2631
|
-
category:
|
|
2632
|
-
seriesName:
|
|
2621
|
+
let o = (n.start + n.end) / 2, s = w.get(n.index);
|
|
2622
|
+
if (At(t, a, s)) {
|
|
2623
|
+
let l = a.seriesDataLabels, d = c(s?.fontSizeHpt ?? l?.fontSizeHpt ?? t.dataLabelFontSizeHpt, r) ?? 9 * r;
|
|
2624
|
+
e.font = `${s?.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ? "bold " : ""}${d}px ${Q(t, s?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace)}`;
|
|
2625
|
+
let f = fe({
|
|
2626
|
+
customText: s?.text,
|
|
2627
|
+
showCategory: s?.showCatName ?? l?.showCatName ?? !1,
|
|
2628
|
+
showSeries: s?.showSerName ?? l?.showSerName ?? !1,
|
|
2629
|
+
showValue: s?.showVal ?? l?.showVal ?? t.showDataLabels,
|
|
2630
|
+
showPercent: s?.showPercent ?? l?.showPercent ?? !1,
|
|
2631
|
+
category: a.categories?.[n.index] ?? t.categories[n.index] ?? `${n.index + 1}`,
|
|
2632
|
+
seriesName: a.name || "Series 1",
|
|
2633
2633
|
sourceValue: n.value,
|
|
2634
2634
|
percentRatio: n.percentValue,
|
|
2635
|
-
formatCode:
|
|
2636
|
-
separator:
|
|
2635
|
+
formatCode: s?.formatCode ?? l?.formatCode ?? t.dataLabelFormatCode ?? a.valFormatCode,
|
|
2636
|
+
separator: s?.separator ?? l?.separator,
|
|
2637
2637
|
date1904: t.date1904
|
|
2638
|
-
}), m =
|
|
2639
|
-
runs:
|
|
2640
|
-
ptToPx:
|
|
2638
|
+
}), m = Q(t, s?.fontFace ?? l?.fontFace ?? t.dataLabelFontFace), h = s?.text && s.richRuns?.length ? ce(e, {
|
|
2639
|
+
runs: s.richRuns,
|
|
2640
|
+
ptToPx: r,
|
|
2641
2641
|
fontFamily: m,
|
|
2642
|
-
fallbackBold:
|
|
2643
|
-
fontFamilyForFace: (e) =>
|
|
2644
|
-
}, d, `#${
|
|
2642
|
+
fallbackBold: s.fontBold ?? l?.fontBold ?? t.dataLabelFontBold ?? !1,
|
|
2643
|
+
fontFamilyForFace: (e) => Q(t, e)
|
|
2644
|
+
}, d, `#${s.fontColor ?? l?.fontColor ?? a.labelColor ?? t.dataLabelFontColor ?? "111111"}`) : null, g = s?.position ?? l?.position ?? t.dataLabelPosition, v = y - x / 2, b = y + x / 2, S = p.cameraDepth(n.centerX, v, n.centerDepth) >= p.cameraDepth(n.centerX, b, n.centerDepth) ? v : b, C = 0, w = null;
|
|
2645
2645
|
for (let e = 0; e <= 12; e++) {
|
|
2646
2646
|
let t = n.start + (n.end - n.start) * e / 12, r = p.project(n.centerX + Math.cos(t) * _ * .64, S, n.centerDepth + Math.sin(t) * _ * .64 / p.modelDepth);
|
|
2647
2647
|
w && (C += Math.hypot(r.x - w.x, r.y - w.y)), w = r;
|
|
2648
2648
|
}
|
|
2649
|
-
let T = (g == null || g === "bestFit") && (n.percentValue === 0 || C < (h?.width ?? e.measureText(f).width)) || g === "outEnd", D = _ * (T ? 1.12 : .64), O = p.project(n.centerX + Math.cos(
|
|
2650
|
-
E.push(() =>
|
|
2649
|
+
let T = (g == null || g === "bestFit") && (n.percentValue === 0 || C < (h?.width ?? e.measureText(f).width)) || g === "outEnd", D = _ * (T ? 1.12 : .64), O = p.project(n.centerX + Math.cos(o) * D, S, n.centerDepth + Math.sin(o) * D / p.modelDepth), k = p.project(n.centerX + Math.cos(o) * _, S, n.centerDepth + Math.sin(o) * _ / p.modelDepth);
|
|
2650
|
+
E.push(() => kt(e, t, a, 0, n.index, n.value, O, u, r, 0, n.percentValue, s, "ctr", k, T, void 0, void 0, void 0, i));
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
2653
|
for (let e of E) e();
|
|
2654
|
-
let
|
|
2655
|
-
let n = m.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ??
|
|
2656
|
-
return r === "00000000" ? "00000000" :
|
|
2654
|
+
let F = a.categories?.length ? a.categories : t.categories, te = Array.from({ length: F.length }, (e, t) => {
|
|
2655
|
+
let n = m.get(t), r = n?.fillHidden === !0 ? "00000000" : n?.color ?? a.dataPointColors?.[t] ?? a.color;
|
|
2656
|
+
return r === "00000000" ? "00000000" : J(r ? `#${r}` : st(t), .8).replace(/^#/, "");
|
|
2657
2657
|
});
|
|
2658
|
-
return
|
|
2658
|
+
return It(e, {
|
|
2659
2659
|
...t,
|
|
2660
|
-
categories:
|
|
2660
|
+
categories: F,
|
|
2661
2661
|
series: [{
|
|
2662
|
-
...
|
|
2663
|
-
categories:
|
|
2664
|
-
dataPointColors:
|
|
2662
|
+
...a,
|
|
2663
|
+
categories: F,
|
|
2664
|
+
dataPointColors: te
|
|
2665
2665
|
}]
|
|
2666
|
-
}, d,
|
|
2666
|
+
}, d, r, !0, f, i), !0;
|
|
2667
2667
|
}
|
|
2668
2668
|
function en(e, t, n, r, i = 0) {
|
|
2669
|
-
return !t.threeD || !(t.chartType === "pie" ||
|
|
2669
|
+
return !t.threeD || !(t.chartType === "pie" || it.has(t.chartType)) ? !1 : dt(t) ? $t(e, t, n, r, i) ? !0 : Qt(e, t, n, r, i) : (Tt(e, n), !0);
|
|
2670
2670
|
}
|
|
2671
2671
|
//#endregion
|
|
2672
2672
|
//#region src/three-d.ts
|
|
2673
|
-
var tn =
|
|
2673
|
+
var tn = ye({ render: en }, "threeD");
|
|
2674
2674
|
//#endregion
|
|
2675
2675
|
export { tn as threeD };
|