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