@silurus/ooxml 0.81.0 → 0.82.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 +4 -8
- package/dist/assets/render-worker-7-Zr7fSw.js +10 -0
- package/dist/assets/{render-worker-C2ACcLes.js → render-worker-B5gsW6b5.js} +4 -4
- package/dist/assets/{render-worker-DtU8oQZ7.js → render-worker-Dw_wQRIh.js} +1 -1
- package/dist/{canvas-viewer-mechanics-CqxKRGCp.js → canvas-viewer-mechanics-CS_qbr6T.js} +1 -1
- package/dist/chart-ex.mjs +4 -4
- package/dist/comment-occurrence-C34fWs_F.js +6 -0
- package/dist/comment-ui-runtime-BAe30Ct9.js +112 -0
- package/dist/comment-ui-runtime-BUCj4hWn.js +171 -0
- package/dist/comment-ui-runtime-F4a3te6p.js +2 -0
- package/dist/comments-Cf9W7r3M.js +241 -0
- package/dist/{document-pull-client-Ux4a_ax8.js → document-pull-client-BCgmytqI.js} +2205 -2192
- package/dist/{docx-SEyQ4gS-.js → docx-wokGKYfi.js} +674 -249
- package/dist/docx.mjs +6 -5
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/dom-interaction-boundary-C8F6HO5x.js +119 -0
- package/dist/highlight-rect-MaCt0om0.js +13 -0
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-BBGvvwLt.js → line-distribute-iXsUCIH-.js} +2 -2
- package/dist/{line-metrics-Baz31mML.js → line-metrics-B3syvDn2.js} +52 -52
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +10 -10
- package/dist/{plot-area-frame-Dg1VIpUU.js → plot-area-frame-DHV02PJU.js} +591 -590
- package/dist/{pptx-5lQrMvMR.js → pptx-DU8L8I2T.js} +537 -243
- package/dist/pptx.mjs +6 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/read-only-comment-decoration-DcFevX_Q.js +96 -0
- package/dist/read-only-comment-margin-Dn2y55W6.js +189 -0
- package/dist/region-map.mjs +2 -2
- package/dist/{render-DEHjijQD.js → render-CenWM4g1.js} +1 -1
- package/dist/{render-worker-host-Dg_74V64.js → render-worker-host-BNENN3qP.js} +1 -1
- package/dist/{render-worker-host-B1nbV_k7.js → render-worker-host-BmH3kGSj.js} +1 -1
- package/dist/{render-worker-host-Bze5M6k5.js → render-worker-host-CmPBviYJ.js} +1 -1
- package/dist/{renderer-DuopJE1K.js → renderer-CYr9YTXM.js} +436 -435
- package/dist/{resource-measurement-DRLp4nFt.js → resource-measurement-CsW4_eYt.js} +2 -2
- package/dist/{session-CNVc3VJ4.js → session-Cky_swUj.js} +3 -3
- package/dist/{slide-pull-client-CzutXnGc.js → slide-pull-client-CqTVFb3W.js} +490 -383
- package/dist/source-key-BklvnEyQ.js +42 -0
- package/dist/{three-d-BYiWCNlz.js → three-d-7MaVzQuZ.js} +48 -47
- package/dist/three-d.mjs +324 -323
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +181 -19
- package/dist/types/index.d.ts +337 -26
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +84 -10
- package/dist/types/pptx.d.ts +130 -11
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/xlsx.d.ts +76 -10
- package/dist/units-BzZ0gAxs.js +4 -0
- package/dist/{worksheet-pull-client-Cxj3Ej0s.js → worksheet-pull-client-CYtwXP5D.js} +3 -3
- package/dist/{xlsx-Bl3TIEVu.js → xlsx-DlV37-0j.js} +429 -218
- package/dist/xlsx.mjs +6 -6
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-Cx5uR77k.js +0 -10
- package/dist/highlight-rect-BqcZMHUE.js +0 -48
- /package/dist/{mathjax-DJa-Q93p.js → mathjax-DwIrafQ6.js} +0 -0
- /package/dist/{renderer-module-contract-0bO_5SC0.js → renderer-module-contract-DLbb7zY0.js} +0 -0
- /package/dist/{transfer-D0U6Uhn4.js → transfer-R6NjgBKD.js} +0 -0
- /package/dist/{visible-index-DbDuGMCE.js → visible-index-BFE3PWiY.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $ as e, A as t, At as n, B as r, Bt as i, Ct as a, Dt as o, E as s, Ft as c, G as l, Gt as u, H as d, Ht as f, It as p, J as m, Jt as h, K as g, L as _, Lt as v, Nt as y, Ot as b, Pt as x, Q as S, R as C, Rt as w, St as T, T as E, Tt as D, U as O, Ut as k, V as A, W as j, Wt as M, X as N, Xt as P, Y as F, Yt as ee, Z as I, Zt as L, _ as te, _t as ne, a as R,
|
|
2
|
-
import {
|
|
1
|
+
import { $ as e, A as t, At as n, B as r, Bt as i, Ct as a, Dt as o, E as s, Ft as c, G as l, Gt as u, H as d, Ht as f, It as p, J as m, Jt as h, K as g, L as _, Lt as v, Nt as y, Ot as b, Pt as x, Q as S, R as C, Rt as w, St as T, T as E, Tt as D, U as O, Ut as k, V as A, W as j, Wt as M, X as N, Xt as P, Y as F, Yt as ee, Z as I, Zt as L, _ as te, _t as ne, a as R, at as re, b as ie, bt as z, c as ae, ct as oe, d as se, dt as ce, en as le, et as B, f as ue, ft as de, gt as fe, ht as V, i as pe, it as me, j as he, jt as ge, kt as _e, l as ve, lt as ye, m as be, mt as xe, n as Se, nt as Ce, o as we, ot as Te, p as Ee, pt as De, qt as Oe, r as ke, rt as Ae, st as je, t as Me, tt as Ne, u as H, ut as Pe, v as Fe, vt as Ie, wt as U, x as Le, xt as Re, yt as ze, z as Be, zt as Ve } from "./plot-area-frame-DHV02PJU.js";
|
|
2
|
+
import { a as W, r as He } from "./units-BzZ0gAxs.js";
|
|
3
|
+
import { C as Ue, D as We, E as G, O as Ge, S as K, _ as q, a as Ke, b as qe, d as Je, f as Ye, g as J, h as Xe, i as Ze, k as Qe, l as $e, m as et, n as tt, o as nt, p as rt, u as it, v as at, x as ot, y as st } from "./three-d-7MaVzQuZ.js";
|
|
3
4
|
//#region packages/core/src/chart/of-pie.ts
|
|
4
5
|
function ct(e, t) {
|
|
5
6
|
let n = e?.splitType ?? "auto", r = e?.splitPos, i = /* @__PURE__ */ new Set();
|
|
@@ -70,7 +71,7 @@ function ft(e, t) {
|
|
|
70
71
|
function pt(e) {
|
|
71
72
|
let t = e.categories.map((e) => Number(e));
|
|
72
73
|
if (t.length === 0 || t.some((e) => !Number.isFinite(e))) return null;
|
|
73
|
-
let n = e.date1904 === !0, r = lt(e.baseTimeUnit) ?? "days", i = lt(e.majorTimeUnit) ?? r, a = lt(e.minorTimeUnit) ?? r, o = (e, t) => e == null || !(e > 0) || !Number.isFinite(e) ? null : t === "days" || e >= 1 && Number.isInteger(e) ? e : null, s = o(e.majorUnit, i), c = o(e.minorUnit, a), l = (e) => ft(
|
|
74
|
+
let n = e.date1904 === !0, r = lt(e.baseTimeUnit) ?? "days", i = lt(e.majorTimeUnit) ?? r, a = lt(e.minorTimeUnit) ?? r, o = (e, t) => e == null || !(e > 0) || !Number.isFinite(e) ? null : t === "days" || e >= 1 && Number.isInteger(e) ? e : null, s = o(e.majorUnit, i), c = o(e.minorUnit, a), l = (e) => ft(ae(e, n), r), u = Array(t.length), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity;
|
|
74
75
|
for (let e = 0; e < t.length; e++) {
|
|
75
76
|
let n = t[e], r = l(n);
|
|
76
77
|
u[e] = r, d = Math.min(d, r), f = Math.max(f, r), p = Math.min(p, n), m = Math.max(m, n);
|
|
@@ -79,9 +80,9 @@ function pt(e) {
|
|
|
79
80
|
x > b || (b -= .5, x += .5);
|
|
80
81
|
let S = x - b, C = (e) => (l(e) - b) / S, w = e.reversed ? (e) => 1 - C(e) : C, T = (e) => (l(e) + (y ? .5 : 0) - b) / S, E = e.reversed ? (e) => 1 - T(e) : T, D = t.map(E), O = t.map(() => 1 / S), k = h != null && Number.isFinite(h) ? h : p, A = g != null && Number.isFinite(g) ? g : m, j = (e, t) => {
|
|
81
82
|
if (t == null) return [];
|
|
82
|
-
let r = ut(
|
|
83
|
+
let r = ut(ae(k, n), e), i = ve(r, n);
|
|
83
84
|
for (let a = 0; i < k && a < 512; a++) {
|
|
84
|
-
let a = dt(r, t, e), o =
|
|
85
|
+
let a = dt(r, t, e), o = ve(a, n);
|
|
85
86
|
if (!(o > i)) return [];
|
|
86
87
|
r = a, i = o;
|
|
87
88
|
}
|
|
@@ -93,7 +94,7 @@ function pt(e) {
|
|
|
93
94
|
serial: i,
|
|
94
95
|
fraction: w(i)
|
|
95
96
|
});
|
|
96
|
-
let o = dt(r, t, e), s =
|
|
97
|
+
let o = dt(r, t, e), s = ve(o, n);
|
|
97
98
|
if (!(s > i)) break;
|
|
98
99
|
r = o, i = s;
|
|
99
100
|
}
|
|
@@ -328,7 +329,7 @@ function Lt(e, t, n, r = !1) {
|
|
|
328
329
|
}
|
|
329
330
|
function Rt(e, t, n, r, i, a, o, s, c, l, u = "sans-serif", d, f, p, m) {
|
|
330
331
|
e.save(), e.font = Pt(a, u, o, s), e.fillStyle = c;
|
|
331
|
-
let h = p ? t : q(e, t, l), g =
|
|
332
|
+
let h = p ? t : q(e, t, l), g = ge(i, d, f), _ = n, v = r;
|
|
332
333
|
if (p && m) {
|
|
333
334
|
let t = e.measureText(h).width, i = Math.abs(Math.cos(g)), o = Math.abs(Math.sin(g)), s = t * i + a * o, c = t * o + a * i, l = {
|
|
334
335
|
x: n - s / 2,
|
|
@@ -368,7 +369,7 @@ function Bt(e, t, r, i, a, o, s, c, l, u, d, f, p, m, h = !1) {
|
|
|
368
369
|
t.valAxisTitle && g(t.valAxisTitle, h ? "horizontal" : "left", m, t.valAxisTitleFontBold ?? !0, t.valAxisTitleFontItalic ?? !1, zt(t.valAxisTitleFontColor), Y(t, t.valAxisTitleFontFace, "major"), t.valAxisTitleRotation, t.valAxisTitleVerticalMode, t.valAxisTitleManualLayout), t.catAxisTitle && g(t.catAxisTitle, h ? "left" : "horizontal", p, t.catAxisTitleFontBold ?? !0, t.catAxisTitleFontItalic ?? !1, zt(t.catAxisTitleFontColor), Y(t, t.catAxisTitleFontFace, "major"), t.catAxisTitleRotation, t.catAxisTitleVerticalMode, t.catAxisTitleManualLayout);
|
|
369
370
|
}
|
|
370
371
|
function Vt(e) {
|
|
371
|
-
return e.dataTable != null &&
|
|
372
|
+
return e.dataTable != null && B(e.chartType);
|
|
372
373
|
}
|
|
373
374
|
function Ht(e) {
|
|
374
375
|
let t = e.chartType === "clusteredBarH" || e.chartType === "stackedBarH" || e.chartType === "stackedBarHPct", n = e.series.map((e, t) => ({
|
|
@@ -400,7 +401,7 @@ function Gt(e, t, n, r) {
|
|
|
400
401
|
e.save(), e.font = Pt(o, l, a.fontBold ?? !1, a.fontItalic ?? !1);
|
|
401
402
|
let u = t.series.find((e) => e.catFormatCode)?.catFormatCode ?? t.catAxisFormatCode, d = t.series.find((e) => e.catFormatBuiltinId != null)?.catFormatBuiltinId, f = pr(t).map((i) => {
|
|
402
403
|
let a = i.trim() === "" ? NaN : Number(i);
|
|
403
|
-
return Yn(e, d === 14 && Number.isFinite(a) ?
|
|
404
|
+
return Yn(e, d === 14 && Number.isFinite(a) ? we(a, t.date1904) : ke(i, u, t.date1904), Math.max(1, n - 4 * r));
|
|
404
405
|
});
|
|
405
406
|
e.restore();
|
|
406
407
|
let p = Math.max(1, ...f.map((e) => e.length)) * s + 4 * r;
|
|
@@ -485,8 +486,8 @@ function X(t, n, r, i, a, o) {
|
|
|
485
486
|
let s = i[a];
|
|
486
487
|
if (!s) return null;
|
|
487
488
|
let c = s.seriesType ?? t, l = c === "stock", u = c === "line" || c === "stackedLine" || c === "stackedLinePct" || c === "radar" || l, d = c === "bubble", f = c === "scatter" || d;
|
|
488
|
-
if (!u && !f || !
|
|
489
|
-
let p = s.markerSymbol ?? s.automaticMarkerSymbol ?? (l ? "none" : "circle"), m = At(a, s), h =
|
|
489
|
+
if (!u && !f || !De(t, n, s, r)) return null;
|
|
490
|
+
let p = s.markerSymbol ?? s.automaticMarkerSymbol ?? (l ? "none" : "circle"), m = At(a, s), h = xe(s, m.replace(/^#/, "")), g = d ? !1 : f ? Jt("scatter", n, s) : s.lineHidden !== !0;
|
|
490
491
|
if (d && o) {
|
|
491
492
|
let t = mi(o, s, void 0, a, m), n = hi(o, s, void 0, a);
|
|
492
493
|
return {
|
|
@@ -507,7 +508,7 @@ function X(t, n, r, i, a, o) {
|
|
|
507
508
|
return {
|
|
508
509
|
symbol: p,
|
|
509
510
|
fill: h,
|
|
510
|
-
fillPaint:
|
|
511
|
+
fillPaint: V(s),
|
|
511
512
|
line: s.markerLine ?? null,
|
|
512
513
|
lineWidthEmu: s.markerLineWidthEmu ?? null,
|
|
513
514
|
withLine: g
|
|
@@ -548,7 +549,7 @@ function Q(e, t, n, r, i, a, o, s = null, c = void 0, l = null, u = null, d = nu
|
|
|
548
549
|
e.save(), e.strokeStyle = l ? `#${l}` : n, e.lineWidth = u == null ? Math.max(1.5, o * .15) : H(u, m), e.setLineDash(Mi(d ?? void 0, e.lineWidth)), e.lineCap = f === "rnd" ? "round" : f === "sq" ? "square" : "butt", e.lineJoin = p === "round" || p === "bevel" ? p : "miter", e.beginPath();
|
|
549
550
|
let t = i + o / 2;
|
|
550
551
|
e.moveTo(r, t), e.lineTo(r + a, t), e.stroke(), s && Si(e, r + a / 2, i + o / 2, s.symbol, o * .58 / m, s.fill, s.line, m, s.lineWidthEmu == null ? void 0 : H(s.lineWidthEmu, m), s.fillPaint, h, s.linePaint, s.lineDash, s.lineCustomDash, s.lineCap, s.lineJoin, s.bubble3D), e.restore();
|
|
551
|
-
} else if (c !== null && (c && (e.fillStyle = c.fillType === "solid" ? c.color.startsWith("#") ? c.color : `#${c.color}` :
|
|
552
|
+
} else if (c !== null && (c && (e.fillStyle = c.fillType === "solid" ? c.color.startsWith("#") ? c.color : `#${c.color}` : Fe(c, e, r, i, a, o, h) ?? n), e.fillRect(r, i, a, o)), l) {
|
|
552
553
|
let t = H(u, m);
|
|
553
554
|
e.save(), e.strokeStyle = `#${l}`, e.lineWidth = t, e.setLineDash(Mi(d ?? void 0, e.lineWidth)), e.lineCap = f === "rnd" ? "round" : f === "sq" ? "square" : "butt", e.lineJoin = p === "round" || p === "bevel" ? p : "miter", e.strokeRect(r + t / 2, i + t / 2, Math.max(0, a - t), Math.max(0, o - t)), e.restore();
|
|
554
555
|
}
|
|
@@ -752,10 +753,10 @@ function _n(e, t, n, r, i, a, o, s, c, l, u, d, f, p = [], m = 0) {
|
|
|
752
753
|
}, b) : null;
|
|
753
754
|
if (C) {
|
|
754
755
|
let r = C.w >= C.h ? "horizontal" : "vertical";
|
|
755
|
-
|
|
756
|
+
Se(e, t, C, f, m), hn(e, g, C.x, C.y, C.w, C.h, r, t.chartType, h, t.scatterStyle, _, t.categories, f, p, m, t.varyColors !== !1, t, n);
|
|
756
757
|
return;
|
|
757
758
|
}
|
|
758
|
-
|
|
759
|
+
Se(e, t, b, f, m), hn(e, g, b.x, b.y, b.w, b.h, x, t.chartType, h, t.scatterStyle, _, t.categories, f, p, m, t.varyColors !== !1, t, n);
|
|
759
760
|
}
|
|
760
761
|
function vn(e, t, n, r, i, a, o, s) {
|
|
761
762
|
if (!t || t.side !== "t" || e.legendOverlay === !0 || e.legendManualLayout == null) return s;
|
|
@@ -805,7 +806,7 @@ function Cn(e, t, n, r, i, a) {
|
|
|
805
806
|
o.length > 0 && e.setLineDash(o), e.beginPath(), e.moveTo(t, r), e.lineTo(t + n, r), e.stroke(), o.length > 0 && e.setLineDash(s);
|
|
806
807
|
}
|
|
807
808
|
function wn(e, t) {
|
|
808
|
-
let { color: n, width: r } =
|
|
809
|
+
let { color: n, width: r } = Ee(e.valAxisGridlineColor, e.valAxisGridlineWidthEmu, t);
|
|
809
810
|
return {
|
|
810
811
|
color: n,
|
|
811
812
|
width: r,
|
|
@@ -814,7 +815,7 @@ function wn(e, t) {
|
|
|
814
815
|
};
|
|
815
816
|
}
|
|
816
817
|
function Tn(e, t) {
|
|
817
|
-
let { color: n, width: r } =
|
|
818
|
+
let { color: n, width: r } = Ee(e.valAxisMinorGridlineColor, e.valAxisMinorGridlineWidthEmu, t);
|
|
818
819
|
return {
|
|
819
820
|
color: n,
|
|
820
821
|
width: r,
|
|
@@ -823,7 +824,7 @@ function Tn(e, t) {
|
|
|
823
824
|
};
|
|
824
825
|
}
|
|
825
826
|
function En(e, t) {
|
|
826
|
-
let { color: n, width: r } =
|
|
827
|
+
let { color: n, width: r } = Ee(e.minorGridlineColor, e.minorGridlineWidthEmu, t);
|
|
827
828
|
return {
|
|
828
829
|
color: n,
|
|
829
830
|
width: r,
|
|
@@ -832,7 +833,7 @@ function En(e, t) {
|
|
|
832
833
|
};
|
|
833
834
|
}
|
|
834
835
|
function Dn(e, t) {
|
|
835
|
-
let { color: n, width: r } =
|
|
836
|
+
let { color: n, width: r } = Ee(e.majorGridlineColor, e.majorGridlineWidthEmu, t);
|
|
836
837
|
return {
|
|
837
838
|
color: n,
|
|
838
839
|
width: r,
|
|
@@ -844,14 +845,14 @@ function On(e) {
|
|
|
844
845
|
return e.catAxisMajorGridlines === !0;
|
|
845
846
|
}
|
|
846
847
|
function kn(e, t) {
|
|
847
|
-
let n =
|
|
848
|
+
let n = Ee(e.catAxisGridlineColor, e.catAxisGridlineWidthEmu, t);
|
|
848
849
|
return {
|
|
849
850
|
...n,
|
|
850
851
|
dash: Mi(e.catAxisGridlineDash ?? void 0, n.width)
|
|
851
852
|
};
|
|
852
853
|
}
|
|
853
854
|
function An(e, t) {
|
|
854
|
-
let n =
|
|
855
|
+
let n = Ee(e.catAxisMinorGridlineColor, e.catAxisMinorGridlineWidthEmu, t);
|
|
855
856
|
return {
|
|
856
857
|
...n,
|
|
857
858
|
dash: Mi(e.catAxisMinorGridlineDash ?? void 0, n.width)
|
|
@@ -859,7 +860,7 @@ function An(e, t) {
|
|
|
859
860
|
}
|
|
860
861
|
function jn(e, t) {
|
|
861
862
|
if (t <= 0) return [];
|
|
862
|
-
let n =
|
|
863
|
+
let n = se(e), r = [], i = n ? t : t - 1;
|
|
863
864
|
for (let e = 0; e <= i; e++) r.push(n ? e / t : t === 1 ? .5 : e / (t - 1));
|
|
864
865
|
return r;
|
|
865
866
|
}
|
|
@@ -896,7 +897,7 @@ function zn(e) {
|
|
|
896
897
|
hundredMillions: "Hundred Millions",
|
|
897
898
|
billions: "Billions",
|
|
898
899
|
trillions: "Trillions"
|
|
899
|
-
}[e.builtInUnit] ?? e.builtInUnit :
|
|
900
|
+
}[e.builtInUnit] ?? e.builtInUnit : pe(e.divisor);
|
|
900
901
|
}
|
|
901
902
|
function Bn(e, t, n, r) {
|
|
902
903
|
let a = [
|
|
@@ -945,11 +946,11 @@ function Bn(e, t, n, r) {
|
|
|
945
946
|
continue;
|
|
946
947
|
}
|
|
947
948
|
let v = _.x + _.w / 2, y = _.y + _.h / 2;
|
|
948
|
-
a.boxStyle?.fill && (e.fillStyle = `#${a.boxStyle.fill}`, e.fillRect(_.x, _.y, _.w, _.h)), a.boxStyle?.borderColor && (e.strokeStyle = `#${a.boxStyle.borderColor}`, e.lineWidth = a.boxStyle.borderWidthEmu ? Math.max(.5, a.boxStyle.borderWidthEmu /
|
|
949
|
+
a.boxStyle?.fill && (e.fillStyle = `#${a.boxStyle.fill}`, e.fillRect(_.x, _.y, _.w, _.h)), a.boxStyle?.borderColor && (e.strokeStyle = `#${a.boxStyle.borderColor}`, e.lineWidth = a.boxStyle.borderWidthEmu ? Math.max(.5, a.boxStyle.borderWidthEmu / He * r) : 1, e.strokeRect(_.x, _.y, _.w, _.h)), e.translate(v, y), f !== 0 && e.rotate(f), e.fillStyle = a.fontColor ? `#${a.fontColor}` : "#595959", e.textAlign = "center", e.textBaseline = "middle", e.fillText(u, 0, 0), e.restore();
|
|
949
950
|
}
|
|
950
951
|
}
|
|
951
952
|
function Vn(e, t, n, r, i = !1, a = "vertical") {
|
|
952
|
-
let o = Mn(e), s = e.valAxisLogBase, c = Fn(e.valMin, i) ?? (i ? t : e.valMin), l = Fn(e.valMax, i) ?? (i ? n : e.valMax), u = Fn(e.valAxisMajorUnit, i), d = i && !(s != null && isFinite(s) && s >= 2) && !(u != null && isFinite(u) && u > 0) ? at(t, n, a, r) : u, f = e.valAxisMinorTickMark != null && e.valAxisMinorTickMark !== "none", p =
|
|
953
|
+
let o = Mn(e), s = e.valAxisLogBase, c = Fn(e.valMin, i) ?? (i ? t : e.valMin), l = Fn(e.valMax, i) ?? (i ? n : e.valMax), u = Fn(e.valAxisMajorUnit, i), d = i && !(s != null && isFinite(s) && s >= 2) && !(u != null && isFinite(u) && u > 0) ? at(t, n, a, r) : u, f = e.valAxisMinorTickMark != null && e.valAxisMinorTickMark !== "none", p = G({
|
|
953
954
|
dataMin: t,
|
|
954
955
|
dataMax: n,
|
|
955
956
|
explicitMin: c,
|
|
@@ -973,7 +974,7 @@ function Vn(e, t, n, r, i = !1, a = "vertical") {
|
|
|
973
974
|
};
|
|
974
975
|
}
|
|
975
976
|
function Hn(e, t) {
|
|
976
|
-
return t && t.trim().toLowerCase() !== "general" ? R(e, t) :
|
|
977
|
+
return t && t.trim().toLowerCase() !== "general" ? R(e, t) : pe(Number(e.toPrecision(6)));
|
|
977
978
|
}
|
|
978
979
|
function Un(e, t, n) {
|
|
979
980
|
if (e.labelText) return e.labelText.split(/\r?\n/);
|
|
@@ -1016,7 +1017,7 @@ function Wn(e, t, n, r, o, s) {
|
|
|
1016
1017
|
textRInsEmu: t.labelTextRInsEmu ?? void 0,
|
|
1017
1018
|
textBInsEmu: t.labelTextBInsEmu ?? void 0,
|
|
1018
1019
|
textBodyAuthored: t.labelTextBodyAuthored ?? void 0
|
|
1019
|
-
}, x =
|
|
1020
|
+
}, x = ze(b, r), S = y + x.left + x.right, C = (v?.height ?? c.length * g) + x.top + x.bottom, w = a(S, C, t.labelTextRotation ?? void 0, t.labelTextVerticalMode ?? void 0), E = mt(u, d, w.w, w.h, f, t.labelManualLayout, o.automaticAnchor);
|
|
1020
1021
|
if (!E) return;
|
|
1021
1022
|
e.save(), E.automatic && (e.beginPath(), e.rect(d.x, d.y, d.w, d.h), e.clip());
|
|
1022
1023
|
let D = E.x + E.w / 2, O = E.y + E.h / 2, k = t.labelTextBodyAuthored === !0 || t.labelTextRotation != null || t.labelTextWrap != null || t.labelTextVerticalAnchor != null || t.labelTextVerticalMode != null || t.labelTextLInsEmu != null || t.labelTextTInsEmu != null || t.labelTextRInsEmu != null || t.labelTextBInsEmu != null, A = E.automatic ? {
|
|
@@ -1030,7 +1031,7 @@ function Wn(e, t, n, r, o, s) {
|
|
|
1030
1031
|
w: E.w,
|
|
1031
1032
|
h: E.h
|
|
1032
1033
|
};
|
|
1033
|
-
|
|
1034
|
+
Ge(e, Fr(l, t.labelBox, l.chartStyleRoles?.trendlineLabel, !0), A, r, o.shapeRotationDeg ?? 0);
|
|
1034
1035
|
let j = t.labelTextAlign;
|
|
1035
1036
|
e.textAlign = j === "r" ? "right" : j === "ctr" ? "center" : "left", e.textBaseline = "top", e.fillStyle = _ ? `#${_}` : "#595959";
|
|
1036
1037
|
let M = Math.max(0, A.w - x.left - x.right), N = Math.max(0, A.h - x.top - x.bottom), P = E.automatic && w.radians === 0 && E.w === w.w && E.h === w.h && (t.labelTextWrap == null || t.labelTextWrap === "none"), F = v ? [] : k && !P ? T(c.join("\n"), M, N, g, (t) => e.measureText(t).width, b) : c;
|
|
@@ -1062,7 +1063,7 @@ function Gn(e, t, n, r, i, a, o, s, c) {
|
|
|
1062
1063
|
backward: o.backward
|
|
1063
1064
|
});
|
|
1064
1065
|
if (l.xs.length < 2 || ![...l.xs, ...l.ys].every(Number.isFinite)) continue;
|
|
1065
|
-
let f = o.trendlineType === "linear" ?
|
|
1066
|
+
let f = o.trendlineType === "linear" ? Ue(u, d, o.intercept) : null, p = f && [
|
|
1066
1067
|
f.slope,
|
|
1067
1068
|
f.intercept,
|
|
1068
1069
|
f.rSquared
|
|
@@ -1183,7 +1184,7 @@ function tr(e, t, n = Nn(e)) {
|
|
|
1183
1184
|
minorUnit: e.catAxisMinorUnit,
|
|
1184
1185
|
explicitMin: e.catAxisMin,
|
|
1185
1186
|
explicitMax: e.catAxisMax,
|
|
1186
|
-
crossBetween:
|
|
1187
|
+
crossBetween: se(e),
|
|
1187
1188
|
reversed: n
|
|
1188
1189
|
}) : null;
|
|
1189
1190
|
}
|
|
@@ -1216,7 +1217,7 @@ function rr(e, t, n, r = "y", i = !1, a = !1, o = (e) => e.useSecondaryAxis ===
|
|
|
1216
1217
|
}
|
|
1217
1218
|
}
|
|
1218
1219
|
(!Number.isFinite(c) || !Number.isFinite(l)) && (c = 0, l = 1);
|
|
1219
|
-
let d =
|
|
1220
|
+
let d = G({
|
|
1220
1221
|
dataMin: c,
|
|
1221
1222
|
dataMax: l,
|
|
1222
1223
|
explicitMin: Fn(e.min, i),
|
|
@@ -1252,7 +1253,7 @@ function ir(e, t, n, r, i, a, o) {
|
|
|
1252
1253
|
}
|
|
1253
1254
|
}
|
|
1254
1255
|
function ar(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h = !1) {
|
|
1255
|
-
let g = o + c, { color: _, width: v } =
|
|
1256
|
+
let g = o + c, { color: _, width: v } = ue(n.lineColor, n.lineWidthEmu, u);
|
|
1256
1257
|
if (n.lineHidden || bn(e, g, s, g, s + l, _, v, n.lineDash), !n.hidden) {
|
|
1257
1258
|
e.font = `${n.fontItalic ? "italic " : ""}${n.fontBold ? "bold " : ""}${d}px ${Y(t, n.fontFace, "minor")}`, e.fillStyle = n.fontColor ? `#${n.fontColor}` : p, e.textAlign = "left", e.textBaseline = "middle";
|
|
1258
1259
|
for (let t of r.majorLines) {
|
|
@@ -1265,16 +1266,16 @@ function ar(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h = !1) {
|
|
|
1265
1266
|
}
|
|
1266
1267
|
function or(e, t, n, r, i, a, o, s, c, l) {
|
|
1267
1268
|
if (!n.title) return;
|
|
1268
|
-
let u =
|
|
1269
|
+
let u = _e(n.titleFontSizeHpt, l), d = n.titleFontColor ? `#${n.titleFontColor}` : n.fontColor ? `#${n.fontColor}` : "#555";
|
|
1269
1270
|
Rt(e, n.title, i + o + c + u * .6, a + s / 2, "right", u, n.titleFontBold ?? !0, n.titleFontItalic ?? !1, d, s, Y(t, n.titleFontFace, "major"), n.titleRotation, n.titleVerticalMode, n.titleManualLayout, r);
|
|
1270
1271
|
}
|
|
1271
1272
|
function sr(e, t, n, r, a, o, s, l, u) {
|
|
1272
1273
|
if (n.hidden || r.length === 0) return;
|
|
1273
|
-
let { color: d, width: f } =
|
|
1274
|
+
let { color: d, width: f } = ue(n.lineColor, n.lineWidthEmu, u);
|
|
1274
1275
|
n.lineHidden || bn(e, o, s, o + l, s, d, f, n.lineDash);
|
|
1275
|
-
let p = n.orientation === "maxMin", m = Math.max(1, Math.floor(n.tickLabelSkip ?? 1)), g = Math.max(1, Math.floor(n.tickMarkSkip ?? 1)), _ = r.length, v = (e) =>
|
|
1276
|
+
let p = n.orientation === "maxMin", m = Math.max(1, Math.floor(n.tickLabelSkip ?? 1)), g = Math.max(1, Math.floor(n.tickMarkSkip ?? 1)), _ = r.length, v = (e) => Oe(e, _, se(t), p, n.labelAlignment);
|
|
1276
1277
|
if (!n.lineHidden && n.majorTickMark !== "none") {
|
|
1277
|
-
let r =
|
|
1278
|
+
let r = se(t), i = r ? _ : _ - 1;
|
|
1278
1279
|
for (let t = 0; t <= i; t += g) {
|
|
1279
1280
|
let a = p ? i - t : t, c = r ? a / _ : _ === 1 ? .5 : a / (_ - 1);
|
|
1280
1281
|
yn(e, n.majorTickMark, "cat", s, o + c * l, d, f, !0, n.lineHidden, "major", u, n.lineDash);
|
|
@@ -1286,11 +1287,11 @@ function sr(e, t, n, r, a, o, s, l, u) {
|
|
|
1286
1287
|
let i = Math.max(1, l / _ - 4), a = h(c(y), n.labelOffsetPercent);
|
|
1287
1288
|
for (let c = 0; c < _; c += m) {
|
|
1288
1289
|
let u = v(c);
|
|
1289
|
-
e.textAlign = u.textAlign, e.fillText(q(e,
|
|
1290
|
+
e.textAlign = u.textAlign, e.fillText(q(e, ke(r[c], n.formatCode, t.date1904), i), o + u.fraction * l, s - a);
|
|
1290
1291
|
}
|
|
1291
1292
|
}
|
|
1292
1293
|
if (n.title) {
|
|
1293
|
-
let r =
|
|
1294
|
+
let r = _e(n.titleFontSizeHpt, u);
|
|
1294
1295
|
Rt(e, n.title, o + l / 2, s - (n.tickLabelPos === "none" ? 0 : y + h(c(y), n.labelOffsetPercent)) - r / 2 - 4, "horizontal", r, n.titleFontBold ?? !0, n.titleFontItalic ?? !1, n.titleFontColor ? `#${n.titleFontColor}` : "#555", l, Y(t, n.titleFontFace, "major"), n.titleRotation, n.titleVerticalMode, n.titleManualLayout, a);
|
|
1295
1296
|
}
|
|
1296
1297
|
}
|
|
@@ -1454,23 +1455,23 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1454
1455
|
let I = (e) => {
|
|
1455
1456
|
let t = ee.get(e.valueAxis);
|
|
1456
1457
|
return t != null && t.count === t.percentCount;
|
|
1457
|
-
}, te = Xt(t, a), ne = t.series.some((e) => e.useSecondaryAxis === !0), R = !_ && t.secondaryValAxis && ne ? t.secondaryValAxis : null,
|
|
1458
|
+
}, te = Xt(t, a), ne = t.series.some((e) => e.useSecondaryAxis === !0), R = !_ && t.secondaryValAxis && ne ? t.secondaryValAxis : null, ie = R ? T.filter((e) => e.useSecondaryAxis === !0) : [], z = R ? T.filter((e) => e.useSecondaryAxis !== !0) : T, ae = ie.length > 0 ? t.secondaryCatAxis : null, oe = ie[0]?.categories?.length ? ie[0].categories : t.categories, le = pr(t), B = le.length;
|
|
1458
1459
|
if (B === 0) return;
|
|
1459
|
-
let
|
|
1460
|
+
let fe = /* @__PURE__ */ new Map();
|
|
1460
1461
|
for (let e of T) {
|
|
1461
|
-
let t = D(e), n =
|
|
1462
|
-
n ? n.push(e) :
|
|
1462
|
+
let t = D(e), n = fe.get(t);
|
|
1463
|
+
n ? n.push(e) : fe.set(t, [e]);
|
|
1463
1464
|
}
|
|
1464
|
-
let V = (e) =>
|
|
1465
|
-
for (let [e, t] of
|
|
1465
|
+
let V = (e) => fe.get(D(e)) ?? [e], pe = /* @__PURE__ */ new Map();
|
|
1466
|
+
for (let [e, t] of fe) {
|
|
1466
1467
|
let n = Array(B).fill(0);
|
|
1467
1468
|
for (let e of t) for (let t = 0; t < B; t++) n[t] += Math.abs(e.values[t] ?? 0);
|
|
1468
1469
|
pe.set(e, n);
|
|
1469
1470
|
}
|
|
1470
|
-
let
|
|
1471
|
+
let he = (e, t) => pe.get(D(e))?.[t] || 1, ge = (e) => {
|
|
1471
1472
|
let t = F.get(e);
|
|
1472
1473
|
return t == null || I(t) ? 100 : 1;
|
|
1473
|
-
},
|
|
1474
|
+
}, ve = (e, t) => A(e) ? ge(e) / he(e, t) : 1, ye = /* @__PURE__ */ new Map(), be = /* @__PURE__ */ new Map();
|
|
1474
1475
|
for (let e of [...j, ...M]) ye.set(e, Array.from({ length: B }, (t, n) => e.values[n] ?? 0)), be.set(e, Array(B).fill(0));
|
|
1475
1476
|
for (let e of t.plotGroups ?? []) {
|
|
1476
1477
|
if (e.kind !== "line" && e.kind !== "area") continue;
|
|
@@ -1485,21 +1486,21 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1485
1486
|
}
|
|
1486
1487
|
let xe = (e, t) => ye.get(e)?.[t] ?? e.values[t] ?? 0, Se = (e, t) => be.get(e)?.[t] ?? 0, Ce = (e) => A(e) ? (e.errBars ?? []).map((t) => ({
|
|
1487
1488
|
...t,
|
|
1488
|
-
plus: t.plus.map((t, n) => t == null ? t : t *
|
|
1489
|
-
minus: t.minus.map((t, n) => t == null ? t : t *
|
|
1490
|
-
})) : e.errBars ?? [], we = It(t),
|
|
1491
|
-
|
|
1492
|
-
let r =
|
|
1493
|
-
|
|
1489
|
+
plus: t.plus.map((t, n) => t == null ? t : t * ve(e, n)),
|
|
1490
|
+
minus: t.minus.map((t, n) => t == null ? t : t * ve(e, n))
|
|
1491
|
+
})) : e.errBars ?? [], we = It(t), Ee = T.map((e) => new Map((e.dataPointOverrides ?? []).map((e) => [e.idx, e]))), De = T.map((e) => new Map((e.dataLabelOverrides ?? []).map((e) => [e.idx, e]))), Ae = T.map((e, t) => Li(e, t)), Ne = t.chartexDataPointStyle != null || t.chartexColorPalette != null, Pe = /* @__PURE__ */ new Map();
|
|
1492
|
+
Ne && T.forEach((e, n) => {
|
|
1493
|
+
let r = Ae[n], i = e.color ?? Hi(t, r, T.length, e.chartexStyle);
|
|
1494
|
+
Pe.set(e, $i(t, e.name, e, t.chartexDataPointStyle, r, T.length, i));
|
|
1494
1495
|
});
|
|
1495
|
-
let
|
|
1496
|
+
let Ie = {
|
|
1496
1497
|
...t,
|
|
1497
|
-
series: (
|
|
1498
|
-
}, U = ur(e, t, m, g, a), Le = U.fontPx, Re = U.topPad, ze = U.bandH, Be = Jn(t.catAxisFontSizeHpt, g, a),
|
|
1498
|
+
series: (Ne ? T : t.series).map((e) => Pe.get(e) ?? e)
|
|
1499
|
+
}, U = ur(e, t, m, g, a), Le = U.fontPx, Re = U.topPad, ze = U.bandH, Be = Jn(t.catAxisFontSizeHpt, g, a), W = Jn(t.valAxisFontSizeHpt, g, a), He = !_ && !Vt(t) && t.catAxisNoMultiLevelLabels !== !0 && (t.categoryLevels?.length ?? 0) > 1 ? t.categoryLevels : null, Ue = He ? (He.length - 1) * (Be + 4) : 0, Ge = Vt(t), K = Ut(t, a), Ke = Wt(e, t, a), qe = mn(e, Ie, m, g, .22, a), { legRightW: Je, legLeftW: Ye, legTopH: J, legBottomH: Xe } = v(qe, t.legendOverlay === !0), Ze = p(t, m, g, a), Qe = Ze.catFontPx, $e = Ze.valFontPx, et = _ ? t.valAxisTitle ? $e + n(g) + 4 : 0 : Ze.catBandH, tt = _ ? t.catAxisTitle ? Qe + n(m) + 4 : 0 : Ze.valBandW, nt = i(ae?.fontSizeHpt, a) ?? 9 * a, rt = ae && !ae.hidden && ae.tickLabelPos !== "none" ? nt + h(c(nt), ae.labelOffsetPercent) + 2 : 0, it = ae?.title ? _e(ae.titleFontSizeHpt, a) + 6 : 0, at = ze + J + W / 2 + 2 + rt + it, st = _ ? (t.valAxisHidden ? g * .02 : x(W)) + K + et + Xe : (Ge ? 0 : x(Be, t.catAxisLabelOffsetPercent)) + Ue + K + et + Xe, ct = g - at - st, lt = 0;
|
|
1499
1500
|
if (_ && !t.catAxisHidden && Zn(t)) {
|
|
1500
1501
|
let n = t.catAxisFontSizeHpt == null ? Math.max(8, Math.min(11, ct / B * .5)) : Be;
|
|
1501
1502
|
e.save(), e.font = Pt(n, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
1502
|
-
for (let n of
|
|
1503
|
+
for (let n of le) lt = Math.max(lt, e.measureText(ke(n, t.catAxisFormatCode, t.date1904)).width);
|
|
1503
1504
|
e.restore(), lt += h(t.catAxisFontSizeHpt == null ? 4 : u(n), t.catAxisLabelOffsetPercent) + b * a;
|
|
1504
1505
|
}
|
|
1505
1506
|
let ut = Math.min(lt, Math.max(0, m / 2 - tt - Ye)), dt = _ ? m - ((t.catAxisHidden ? m * .03 : ut) + tt + Ye) - (Je + m * .03) : 0, ft = t.valAxisHidden ? void 0 : (_ ? dt : ct) / a, pt = (e, t) => {
|
|
@@ -1507,7 +1508,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1507
1508
|
if (!n || !k(n)) return r;
|
|
1508
1509
|
let i = V(n), a = A(n), o = 1;
|
|
1509
1510
|
a && (o = i.reduce((e, n) => e + Math.abs(n.values[t] ?? 0), 0) || 1);
|
|
1510
|
-
let s = a ?
|
|
1511
|
+
let s = a ? ve(n, t) * o : 1, c = a ? r / o * s : r, l = 0, u = i.indexOf(n);
|
|
1511
1512
|
for (let e = 0; e <= u; e++) {
|
|
1512
1513
|
let n = i[e]?.values[t] ?? 0, r = a ? n / o * s : n;
|
|
1513
1514
|
c < 0 == r < 0 && (l += r);
|
|
@@ -1548,7 +1549,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1548
1549
|
gt = Math.max(gt, t), _t = Math.min(_t, t);
|
|
1549
1550
|
});
|
|
1550
1551
|
ht && (z.some((e) => e.values.some((e) => e != null && e > 0)) && (gt = Math.max(gt, 100)), z.some((e) => e.values.some((e) => e != null && e < 0)) && (_t = Math.min(_t, -100))), t.valMax != null && (gt = ht ? t.valMax * 100 : t.valMax), t.valMin != null && (_t = ht ? t.valMin * 100 : t.valMin), gt === 0 && _t === 0 && (gt = 1);
|
|
1551
|
-
let vt = Vn(t, _t, gt, ft, ht, _ ? "horizontal" : "vertical"), { step: yt } = vt, bt = new Set(T), xt = new Set(C), St = (t.plotGroups ?? []).filter((e) => e.seriesCount > 0 && e.valueAxis === "secondary"), Ct = St.length > 0 ? St.every((e) => e.grouping === "percentStacked") :
|
|
1552
|
+
let vt = Vn(t, _t, gt, ft, ht, _ ? "horizontal" : "vertical"), { step: yt } = vt, bt = new Set(T), xt = new Set(C), St = (t.plotGroups ?? []).filter((e) => e.seriesCount > 0 && e.valueAxis === "secondary"), Ct = St.length > 0 ? St.every((e) => e.grouping === "percentStacked") : ie.some(A), wt = t.series.filter((e) => !xt.has(e) || bt.has(e)).map((e) => {
|
|
1552
1553
|
if (e.useSecondaryAxis !== !0) return e;
|
|
1553
1554
|
if (bt.has(e)) {
|
|
1554
1555
|
let t = T.indexOf(e);
|
|
@@ -1568,15 +1569,15 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1568
1569
|
}))
|
|
1569
1570
|
} : e;
|
|
1570
1571
|
});
|
|
1571
|
-
if (Ct &&
|
|
1572
|
+
if (Ct && ie[0]) {
|
|
1572
1573
|
let e = [];
|
|
1573
|
-
|
|
1574
|
-
...
|
|
1574
|
+
ie.some((e) => e.values.some((e) => e != null && e > 0)) && e.push(100), ie.some((e) => e.values.some((e) => e != null && e < 0)) && e.push(-100), wt.push({
|
|
1575
|
+
...ie[0],
|
|
1575
1576
|
values: e,
|
|
1576
1577
|
errBars: []
|
|
1577
1578
|
});
|
|
1578
1579
|
}
|
|
1579
|
-
let Tt = rr(R, wt, ct / a, _ ? "x" : "y", Ct,
|
|
1580
|
+
let Tt = rr(R, wt, ct / a, _ ? "x" : "y", Ct, ie.length > 0), Et = Math.max(8, Math.min(11, g / 20)), Dt = t.valAxisFontSizeHpt == null ? Math.max(8, Math.min(11, ct / 20)) : W, Ot = e.font, kt = 0, Nt = 0;
|
|
1580
1581
|
if (!_ && !t.valAxisHidden) {
|
|
1581
1582
|
e.font = Pt(Dt, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1);
|
|
1582
1583
|
let n = 0;
|
|
@@ -1594,7 +1595,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1594
1595
|
Lt = n + 18;
|
|
1595
1596
|
}
|
|
1596
1597
|
e.font = Ot;
|
|
1597
|
-
let Rt = R && R.title ?
|
|
1598
|
+
let Rt = R && R.title ? _e(R.titleFontSizeHpt, a) + 8 : 0, zt = {
|
|
1598
1599
|
t: at,
|
|
1599
1600
|
r: Je + m * .03 + Lt + Rt,
|
|
1600
1601
|
b: st,
|
|
@@ -1606,7 +1607,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1606
1607
|
r: t.valAxisHidden ? 0 : Dt / 2,
|
|
1607
1608
|
b: t.valAxisHidden ? 0 : Dt + et,
|
|
1608
1609
|
l: t.catAxisHidden ? 0 : lt + tt
|
|
1609
|
-
} :
|
|
1610
|
+
} : Ve({
|
|
1610
1611
|
valAxisHidden: t.valAxisHidden,
|
|
1611
1612
|
catAxisHidden: t.catAxisHidden,
|
|
1612
1613
|
valLabelWidth: kt,
|
|
@@ -1626,7 +1627,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1626
1627
|
honorPlotAreaManualLayout: !0,
|
|
1627
1628
|
manualOuterInsets: Ht
|
|
1628
1629
|
}), Jt = ur(e, t, qt.plotRect.pw, g, a);
|
|
1629
|
-
Math.abs(Jt.bandH - U.bandH) > .01 && (U = Jt, Le = U.fontPx, Re = U.topPad, ze = U.bandH, at = ze + J +
|
|
1630
|
+
Math.abs(Jt.bandH - U.bandH) > .01 && (U = Jt, Le = U.fontPx, Re = U.topPad, ze = U.bandH, at = ze + J + W / 2 + 2 + rt + it, zt.t = vn(t, qe, l, d, m, g, ze, at), qt = f(t, l, d, m, g, a, {
|
|
1630
1631
|
titleBand: U,
|
|
1631
1632
|
legendSideReserveFrac: .22,
|
|
1632
1633
|
legendReserve: qe,
|
|
@@ -1636,23 +1637,23 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1636
1637
|
}));
|
|
1637
1638
|
let { px0: X, py0: Z, pw: Q } = qt.plotRect, { ph: $ } = qt.plotRect;
|
|
1638
1639
|
if (fr(e, t, t.titleManualLayout || !t.titleRichRuns?.length ? l : X, d, t.titleManualLayout || !t.titleRichRuns?.length ? m : Q, g, d + Re, Le), Q <= 0 || $ <= 0) return;
|
|
1639
|
-
let Yt = tr(t,
|
|
1640
|
-
if (!
|
|
1640
|
+
let Yt = tr(t, le, _ ? !Nn(t) : Nn(t)), Zt = $n(t), Qt = [], $t = 0;
|
|
1641
|
+
if (!Ge && !_ && !Yt && !t.catAxisHidden && Zn(t) && Zt === 0) {
|
|
1641
1642
|
let n = Q / B, r = t.catAxisFontSizeHpt == null ? Math.max(8, Math.min(11, n * .5)) : Be;
|
|
1642
1643
|
e.save(), e.font = Pt(r, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
1643
|
-
for (let i of
|
|
1644
|
-
let a =
|
|
1644
|
+
for (let i of le) {
|
|
1645
|
+
let a = ke(i, t.catAxisFormatCode, t.date1904);
|
|
1645
1646
|
Qt.push(Yn(e, a, Math.max(1, n), Xn(a, r)));
|
|
1646
1647
|
}
|
|
1647
1648
|
e.restore();
|
|
1648
1649
|
let i = Math.max(1, ...Qt.map((e) => e.length));
|
|
1649
1650
|
!(t.plotAreaManualLayout?.layoutTarget === "inner" && t.plotAreaManualLayout.w != null && t.plotAreaManualLayout.h != null) && i > 1 && ($t = (i - 1) * (r + 2), $ = Math.max(1, $ - $t));
|
|
1650
1651
|
}
|
|
1651
|
-
let en =
|
|
1652
|
-
en && en.totalHeight > K && ($ = Math.max(1, $ - (en.totalHeight - K))),
|
|
1652
|
+
let en = Ge ? Gt(e, t, Q / B, a) : null;
|
|
1653
|
+
en && en.totalHeight > K && ($ = Math.max(1, $ - (en.totalHeight - K))), Me(e, t, X, Z, Q, $, a, s);
|
|
1653
1654
|
let tn = (e) => Z + $ - vt.frac(e) * $, nn = (e) => X + vt.frac(e) * Q, rn = tn(0), an = nn(0), on = (e) => tn(e), sn = Tt ? Tt.makeToY(Z, $) : tn, cn = (e) => sn(e), ln = wn(t, a);
|
|
1654
1655
|
e.textBaseline = "middle";
|
|
1655
|
-
let un = t.valAxisFontSizeHpt == null ? Math.max(8, Math.min(11, $ / 20)) :
|
|
1656
|
+
let un = t.valAxisFontSizeHpt == null ? Math.max(8, Math.min(11, $ / 20)) : W;
|
|
1656
1657
|
e.font = Pt(un, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1);
|
|
1657
1658
|
let dn = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555";
|
|
1658
1659
|
if (e.fillStyle = dn, !t.valAxisHidden) {
|
|
@@ -1707,7 +1708,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1707
1708
|
}
|
|
1708
1709
|
n.dash.length > 0 && e.setLineDash(r);
|
|
1709
1710
|
}
|
|
1710
|
-
let { color: fn, width: pn } =
|
|
1711
|
+
let { color: fn, width: pn } = ue(t.catAxisLineColor, t.catAxisLineWidthEmu, a), { color: hn, width: gn } = ue(t.valAxisLineColor, t.valAxisLineWidthEmu, a), Sn = !t.catAxisHidden && !t.catAxisLineHidden, En = !t.valAxisHidden && !t.valAxisLineHidden && t.valAxisLineColor != null, Dn = Kr(t, vt.min, vt.max), An = _ ? Z + $ : tn(Dn), Mn = _ ? nn(Dn) : X, Fn = !_ && (t.catAxisTickLabelPos ?? "nextTo") === "nextTo" ? An : Z + $, Ln = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), zn = !_ && He != null && Yt == null && !t.catAxisLineHidden && se(t) && Math.abs(Fn - An) < .01, Bn = () => {
|
|
1711
1712
|
if (_ ? (Sn && bn(e, Mn, Z, Mn, Z + $, fn, pn, t.catAxisLineDash), En && bn(e, X, Z + $, X + Q, Z + $, hn, gn, t.valAxisLineDash)) : (Sn && bn(e, X, An, X + Q, An, fn, pn, t.catAxisLineDash), En && bn(e, X, Z, X, Z + $, hn, gn, t.valAxisLineDash)), !t.valAxisHidden && t.valAxisMajorTickMark && t.valAxisMajorTickMark !== "none") for (let n of vt.majorLines) _ ? yn(e, t.valAxisMajorTickMark, "cat", Z + $, nn(n), hn, gn, !1, t.valAxisLineHidden, "major", a, t.valAxisLineDash) : yn(e, t.valAxisMajorTickMark, "val", X, tn(n), hn, gn, !1, t.valAxisLineHidden, "major", a, t.valAxisLineDash);
|
|
1712
1713
|
if (!t.valAxisHidden && t.valAxisMinorTickMark && t.valAxisMinorTickMark !== "none") for (let n of vt.minorTicks) _ ? yn(e, t.valAxisMinorTickMark, "cat", Z + $, nn(n), hn, gn, !1, t.valAxisLineHidden, "minor", a, t.valAxisLineDash) : yn(e, t.valAxisMinorTickMark, "val", X, tn(n), hn, gn, !1, t.valAxisLineHidden, "minor", a, t.valAxisLineDash);
|
|
1713
1714
|
if (!t.catAxisHidden && t.catAxisMajorTickMark && t.catAxisMajorTickMark !== "none") {
|
|
@@ -1715,7 +1716,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1715
1716
|
for (let n of r) _ ? yn(e, t.catAxisMajorTickMark, "val", Mn, Z + n * $, fn, pn, !1, t.catAxisLineHidden, "major", a, t.catAxisLineDash) : yn(e, t.catAxisMajorTickMark, "cat", An, X + n * Q, fn, pn, !1, t.catAxisLineHidden, "major", a, t.catAxisLineDash);
|
|
1716
1717
|
}
|
|
1717
1718
|
if (!t.catAxisHidden && t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none") {
|
|
1718
|
-
let n =
|
|
1719
|
+
let n = se(t) ? Array.from({ length: B }, (e, t) => (t + .5) / B) : Array.from({ length: Math.max(0, B - 1) }, (e, t) => (t + .5) / (B - 1)), r = Yt ? Yt.minorTicks.map((e) => e.fraction) : n;
|
|
1719
1720
|
for (let n of r) _ ? yn(e, t.catAxisMinorTickMark, "val", Mn, Z + n * $, fn, pn, !1, t.catAxisLineHidden, "minor", a, t.catAxisLineDash) : yn(e, t.catAxisMinorTickMark, "cat", An, X + n * Q, fn, pn, !1, t.catAxisLineHidden, "minor", a, t.catAxisLineDash);
|
|
1720
1721
|
}
|
|
1721
1722
|
}, Hn = (e) => e ? $ / B : Q / B, Un = Hn(_), Wn = Nn(t), qn = (e, t) => t ? Wn ? e : B - 1 - e : Wn ? B - 1 - e : e, Qn = (e, t = _) => Yt ? Yt.categoryBandFractions[e] * (t ? $ : Q) : Hn(t), or = (e, t = _) => Yt ? (t ? Z : X) + Yt.positions[e] * (t ? $ : Q) - Qn(e, t) / 2 : (t ? Z : X) + qn(e, t) * Hn(t), cr = (e) => Yt ? X + Yt.positions[e] * Q : X + qn(e, !1) * Hn(!1) + Hn(!1) / 2, lr = (e, n) => {
|
|
@@ -1731,7 +1732,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1731
1732
|
if (u.length !== 0) {
|
|
1732
1733
|
Yt && (e.save(), e.beginPath(), e.rect(X, Z, Q, $), e.clip()), e.beginPath(), e.moveTo(u[0].x, u[0].baseY), e.lineTo(u[0].x, u[0].y), ji(e, u, !1);
|
|
1733
1734
|
for (let t = u.length - 1; t >= 0; t--) e.lineTo(u[t].x, u[t].baseY);
|
|
1734
|
-
e.closePath(), e.fillStyle = r.fillPattern ?
|
|
1735
|
+
e.closePath(), e.fillStyle = r.fillPattern ? Fe(r.fillPattern, e, u[0].x, Z, Math.max(1, u[u.length - 1].x - u[0].x), $) ?? o : o, e.fill(), r.lineHidden !== !0 && (e.strokeStyle = r.lineColor ? `#${r.lineColor}` : o, e.lineWidth = r.lineWidthEmu == null ? 1.5 : H(r.lineWidthEmu, a), e.setLineDash([]), e.stroke()), Yt && e.restore(), u = [];
|
|
1735
1736
|
}
|
|
1736
1737
|
};
|
|
1737
1738
|
for (let e = 0; e < B; e++) r.values[e] == null && (l === "gap" && d(), l !== "zero") || u.push({
|
|
@@ -1740,17 +1741,17 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1740
1741
|
baseY: c(Se(r, e))
|
|
1741
1742
|
});
|
|
1742
1743
|
d();
|
|
1743
|
-
let f = (r.showMarker === !0 ||
|
|
1744
|
-
if (f ||
|
|
1744
|
+
let f = (r.showMarker === !0 || de(r)) && r.markerSymbol !== "none";
|
|
1745
|
+
if (f || re(r)) {
|
|
1745
1746
|
let t = Math.max(2, 2.5 * a);
|
|
1746
1747
|
for (let n = 0; n < B; n++) {
|
|
1747
1748
|
if (r.values[n] == null) continue;
|
|
1748
|
-
let l = i.get(n), u =
|
|
1749
|
+
let l = i.get(n), u = me(r, l, "circle", f);
|
|
1749
1750
|
if (u === "none") continue;
|
|
1750
1751
|
let d = cr(n), p = c(xe(r, n));
|
|
1751
|
-
if (
|
|
1752
|
+
if (de(r) || ce(l)) {
|
|
1752
1753
|
let t = l?.markerLineWidthEmu ?? r.markerLineWidthEmu;
|
|
1753
|
-
Si(e, d, p, u, l?.markerSize ?? r.markerSize ?? 5,
|
|
1754
|
+
Si(e, d, p, u, l?.markerSize ?? r.markerSize ?? 5, Te(r, l, n, o), l?.markerLine ?? r.markerLine ?? null, a, t == null ? void 0 : H(t, a), je(r, l, n), s);
|
|
1754
1755
|
} else e.fillStyle = o, e.beginPath(), e.arc(d, p, t, 0, Math.PI * 2), e.fill();
|
|
1755
1756
|
}
|
|
1756
1757
|
}
|
|
@@ -1758,19 +1759,19 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1758
1759
|
for (let n = 0; n < B; n++) {
|
|
1759
1760
|
let r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1760
1761
|
for (let c = 0; c < T.length; c++) {
|
|
1761
|
-
let u = T[c], f = w(u), p = Qn(n, f), h = R != null && u.useSecondaryAxis === !0, _ = V(u), v = D(u), y = k(u), b = A(u), x = b && _.reduce((e, t) => e + Math.abs(t.values[n] ?? 0), 0) || 1, S = r.get(v) ?? 0, C = o.get(v) ?? 0, E = Math.max(0, _.indexOf(u)), { barW: O, clusterGap: j, catStart: M } = lr(_, p), N = h && Tt ? Tt.makeToY(Z, $) : tn, F = Tt ? ae?.crossesAt != null && Number.isFinite(ae.crossesAt) ? Math.max(Tt.min, Math.min(Tt.max, ae.crossesAt)) : ae?.crosses === "max" ? Tt.max : ae?.crosses === "min" ? Tt.min : Math.max(Tt.min, Math.min(Tt.max, 0)) : 0, ee = h ? N(F) : rn, I = u.values[n] ?? 0, L = b ? I / x * ge(u) : I, ne = L < 0, re = h && Tt ? Tt.max : vt.max, ie = ne && (u.invertIfNegative === !0 || u.automaticNegativeStyle === !0), z =
|
|
1762
|
+
let u = T[c], f = w(u), p = Qn(n, f), h = R != null && u.useSecondaryAxis === !0, _ = V(u), v = D(u), y = k(u), b = A(u), x = b && _.reduce((e, t) => e + Math.abs(t.values[n] ?? 0), 0) || 1, S = r.get(v) ?? 0, C = o.get(v) ?? 0, E = Math.max(0, _.indexOf(u)), { barW: O, clusterGap: j, catStart: M } = lr(_, p), N = h && Tt ? Tt.makeToY(Z, $) : tn, F = Tt ? ae?.crossesAt != null && Number.isFinite(ae.crossesAt) ? Math.max(Tt.min, Math.min(Tt.max, ae.crossesAt)) : ae?.crosses === "max" ? Tt.max : ae?.crosses === "min" ? Tt.min : Math.max(Tt.min, Math.min(Tt.max, 0)) : 0, ee = h ? N(F) : rn, I = u.values[n] ?? 0, L = b ? I / x * ge(u) : I, ne = L < 0, re = h && Tt ? Tt.max : vt.max, ie = ne && (u.invertIfNegative === !0 || u.automaticNegativeStyle === !0), z = Ee[c].get(n), oe = z?.color ?? u.dataPointColors?.[n], se = oe ? `#${oe}` : we ? Mt(n, u) : At(c, u), ce = ie ? u.automaticNegativeStyle === !0 || u.invertedFillHidden === !0 ? null : u.invertedFill : void 0, B = z?.fillHidden ? null : z?.color ? {
|
|
1762
1763
|
fillType: "solid",
|
|
1763
1764
|
color: z.color
|
|
1764
|
-
} :
|
|
1765
|
+
} : ce === void 0 ? Ne ? Ji(t, Ae[c], T.length, u.chartexStyle, u.color) : void 0 : ce, ue = () => {
|
|
1765
1766
|
if (z?.lineHidden != null || z?.lineColor != null || z?.lineWidthEmu != null || z?.lineDash != null) {
|
|
1766
1767
|
if (z?.lineHidden) return !1;
|
|
1767
|
-
let n = zi(t, t.chartexDataPointStyle, "line",
|
|
1768
|
+
let n = zi(t, t.chartexDataPointStyle, "line", Ae[c], T.length) ?? u.lineColor ?? se;
|
|
1768
1769
|
return e.strokeStyle = `#${z?.lineColor ?? n.replace(/^#/, "")}`, e.lineWidth = z?.lineWidthEmu == null ? u.lineWidthEmu == null ? 1 : H(u.lineWidthEmu, a) : H(z.lineWidthEmu, a), e.setLineDash(Mi(z?.lineDash, e.lineWidth)), !0;
|
|
1769
1770
|
}
|
|
1770
1771
|
if (ie && (u.invertedLineHidden != null || u.invertedLineColor != null || u.invertedLineWidthEmu != null)) return u.invertedLineHidden ? !1 : (e.strokeStyle = `#${u.invertedLineColor ?? "000000"}`, e.lineWidth = H(u.invertedLineWidthEmu, a), e.setLineDash([]), !0);
|
|
1771
1772
|
if (u.automaticNegativeStyle === !0) return e.strokeStyle = "#000000", e.lineWidth = .75 * a, e.setLineDash([]), !0;
|
|
1772
1773
|
let n = ie && t.chartType === "clusteredBar" && t.legacyChartStyle === 2 && u.invertedFillAuthored === !0 && u.invertedFill != null && u.invertedLineAuthored === !1, r = u.lineHidden === !0 || u.lineColor != null || u.lineWidthEmu != null;
|
|
1773
|
-
return n && r ? u.lineHidden || !u.lineColor ? !1 : (e.strokeStyle = `#${u.lineColor}`, e.lineWidth = H(u.lineWidthEmu, a), e.setLineDash([]), !0) : n ? (e.strokeStyle = "#000000", e.lineWidth = .75 * a, e.setLineDash([]), !0) :
|
|
1774
|
+
return n && r ? u.lineHidden || !u.lineColor ? !1 : (e.strokeStyle = `#${u.lineColor}`, e.lineWidth = H(u.lineWidthEmu, a), e.setLineDash([]), !0) : n ? (e.strokeStyle = "#000000", e.lineWidth = .75 * a, e.setLineDash([]), !0) : Ne ? Qi(e, t, t.chartexDataPointStyle, u, Ae[c], T.length, se, a) : !u.lineColor || u.lineHidden ? !1 : (e.strokeStyle = `#${u.lineColor}`, e.lineWidth = H(u.lineWidthEmu, a), e.setLineDash([]), !0);
|
|
1774
1775
|
};
|
|
1775
1776
|
if (f) {
|
|
1776
1777
|
let r = E, o = y ? or(n, !0) + M : or(n, !0) + M + r * j, f = y ? nn(ne ? C : S) : an, p = nn(y ? (ne ? C : S) + L : L), h = Ai(Math.min(f, p), X, X + Q), _ = Ai(Math.max(f, p), X, X + Q), v = Math.max(0, _ - h);
|
|
@@ -1778,11 +1779,11 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1778
1779
|
categoryStart: o,
|
|
1779
1780
|
categoryEnd: o + O,
|
|
1780
1781
|
valueEnd: Ai(p, X, X + Q)
|
|
1781
|
-
}), B !== null && (e.fillStyle = B ? Yi(e, B, h, o, v, O,
|
|
1782
|
+
}), B !== null && (e.fillStyle = B ? Yi(e, B, h, o, v, O, se) : u.fillPattern ? Fe(u.fillPattern, e, h, o, v, O) ?? se : se, e.fillRect(h, o, v, O)), v > 0 && O > 0 && ue()) {
|
|
1782
1783
|
let t = e.lineWidth;
|
|
1783
1784
|
e.strokeRect(h + t / 2, o + t / 2, Math.max(0, v - t), Math.max(0, O - t));
|
|
1784
1785
|
}
|
|
1785
|
-
let x = u.seriesDataLabels, w = Ri(t, u, n, u.categories?.[n] ??
|
|
1786
|
+
let x = u.seriesDataLabels, w = Ri(t, u, n, u.categories?.[n] ?? le[n] ?? "", I, {
|
|
1786
1787
|
visible: t.showDataLabels,
|
|
1787
1788
|
showVal: t.showDataLabels && !b,
|
|
1788
1789
|
showPercent: t.showDataLabels && b,
|
|
@@ -1800,7 +1801,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1800
1801
|
y: d,
|
|
1801
1802
|
w: m,
|
|
1802
1803
|
h: g
|
|
1803
|
-
}, f?.manualLayout, ne, Ei(t, f, a, _, p, w.textStyle), w.showLegendKey ? te(P.get(u) ?? c, n) : void 0, w.textStyle, a,
|
|
1804
|
+
}, f?.manualLayout, ne, Ei(t, f, a, _, p, w.textStyle), w.showLegendKey ? te(P.get(u) ?? c, n) : void 0, w.textStyle, a, We(f?.labelBox, x?.labelBox), s);
|
|
1804
1805
|
}
|
|
1805
1806
|
} else {
|
|
1806
1807
|
let r = y ? or(n, !1) + M : or(n, !1) + M + E * j;
|
|
@@ -1810,11 +1811,11 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1810
1811
|
categoryStart: r,
|
|
1811
1812
|
categoryEnd: r + O,
|
|
1812
1813
|
valueEnd: Ai(f, Z, Z + $)
|
|
1813
|
-
}), B !== null && (e.fillStyle = B ? Yi(e, B, r, p, O, _,
|
|
1814
|
+
}), B !== null && (e.fillStyle = B ? Yi(e, B, r, p, O, _, se) : u.fillPattern ? Fe(u.fillPattern, e, r, p, O, _) ?? se : se, e.fillRect(r, p, O, _)), O > 0 && _ > 0 && ue()) {
|
|
1814
1815
|
let t = e.lineWidth;
|
|
1815
1816
|
e.strokeRect(r + t / 2, p + t / 2, Math.max(0, O - t), Math.max(0, _ - t));
|
|
1816
1817
|
}
|
|
1817
|
-
let v = u.seriesDataLabels, x = Ri(t, u, n, u.categories?.[n] ??
|
|
1818
|
+
let v = u.seriesDataLabels, x = Ri(t, u, n, u.categories?.[n] ?? le[n] ?? "", I, {
|
|
1818
1819
|
visible: t.showDataLabels,
|
|
1819
1820
|
showVal: t.showDataLabels && !b,
|
|
1820
1821
|
showPercent: t.showDataLabels && b,
|
|
@@ -1832,7 +1833,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1832
1833
|
y: d,
|
|
1833
1834
|
w: m,
|
|
1834
1835
|
h: g
|
|
1835
|
-
}, f?.manualLayout, ne, Ei(t, f, a, b, h, x.textStyle), x.showLegendKey ? te(P.get(u) ?? c, n) : void 0, x.textStyle, a,
|
|
1836
|
+
}, f?.manualLayout, ne, Ei(t, f, a, b, h, x.textStyle), x.showLegendKey ? te(P.get(u) ?? c, n) : void 0, x.textStyle, a, We(f?.labelBox, v?.labelBox), s);
|
|
1836
1837
|
}
|
|
1837
1838
|
}
|
|
1838
1839
|
y && (ne ? o.set(v, C + L) : r.set(v, S + L));
|
|
@@ -1891,16 +1892,16 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1891
1892
|
y: l(t)
|
|
1892
1893
|
});
|
|
1893
1894
|
}
|
|
1894
|
-
if ((!
|
|
1895
|
+
if ((!Ge || _) && !t.catAxisHidden && Zn(t)) {
|
|
1895
1896
|
e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#555";
|
|
1896
1897
|
let n = t.catAxisFontSizeHpt == null ? Math.max(8, Math.min(11, Un * .5)) : Be;
|
|
1897
1898
|
e.font = Pt(n, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
1898
1899
|
let r = Un - 4, i = X - 4 - (l + Ye + tt), o = Zt, s = Yt ? Yt.majorTicks.map((e) => ({
|
|
1899
|
-
raw:
|
|
1900
|
+
raw: ke(String(e.serial), t.catAxisFormatCode, t.date1904),
|
|
1900
1901
|
fraction: e.fraction,
|
|
1901
1902
|
categoryIndex: -1
|
|
1902
|
-
})) :
|
|
1903
|
-
raw:
|
|
1903
|
+
})) : le.map((e, n) => ({
|
|
1904
|
+
raw: ke(e.toString(), t.catAxisFormatCode, t.date1904),
|
|
1904
1905
|
fraction: null,
|
|
1905
1906
|
categoryIndex: n
|
|
1906
1907
|
}));
|
|
@@ -1913,7 +1914,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1913
1914
|
let i = a.fraction != null || a.categoryIndex < 0 ? {
|
|
1914
1915
|
fraction: a.fraction ?? .5,
|
|
1915
1916
|
textAlign: "center"
|
|
1916
|
-
} :
|
|
1917
|
+
} : Oe(a.categoryIndex, B, se(t), Wn, t.catAxisLabelAlignment), l = X + i.fraction * Q;
|
|
1917
1918
|
e.textAlign = i.textAlign, e.textBaseline = "top";
|
|
1918
1919
|
let u = o === 0 ? r : $ * .4, d = h(t.catAxisFontSizeHpt == null ? 3 : c(n), t.catAxisLabelOffsetPercent);
|
|
1919
1920
|
o === 0 ? (a.categoryIndex >= 0 ? Qt[a.categoryIndex] ?? [s] : [s]).forEach((t, r) => {
|
|
@@ -1974,13 +1975,13 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
1974
1975
|
});
|
|
1975
1976
|
}
|
|
1976
1977
|
g(), f && e.stroke();
|
|
1977
|
-
let _ = i.showMarker !== !1 && i.markerSymbol !== "none", v = _ ||
|
|
1978
|
+
let _ = i.showMarker !== !1 && i.markerSymbol !== "none", v = _ || re(i), y = de(i);
|
|
1978
1979
|
if (v) for (let t = 0; t < B; t++) {
|
|
1979
1980
|
if (i.values[t] == null) continue;
|
|
1980
|
-
let n = cr(t), r = u(xe(i, t)), o = c.get(t), d =
|
|
1981
|
-
if (d !== "none") if (y ||
|
|
1981
|
+
let n = cr(t), r = u(xe(i, t)), o = c.get(t), d = me(i, o, "circle", _);
|
|
1982
|
+
if (d !== "none") if (y || ce(o)) {
|
|
1982
1983
|
let c = o?.markerLineWidthEmu ?? i.markerLineWidthEmu;
|
|
1983
|
-
Si(e, n, r, d, o?.markerSize ?? i.markerSize ?? 5,
|
|
1984
|
+
Si(e, n, r, d, o?.markerSize ?? i.markerSize ?? 5, Te(i, o, t, l), o?.markerLine ?? i.markerLine ?? null, a, c == null ? void 0 : H(c, a), je(i, o, t), s);
|
|
1984
1985
|
} else e.fillStyle = l, e.beginPath(), e.arc(n, r, 3, 0, Math.PI * 2), e.fill();
|
|
1985
1986
|
}
|
|
1986
1987
|
Gn(e, i, l, (e) => cr(e), u, a, void 0, {
|
|
@@ -2007,7 +2008,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
2007
2008
|
}
|
|
2008
2009
|
}
|
|
2009
2010
|
if (n.length && i.length) {
|
|
2010
|
-
let o = t.secondaryCatAxis, c = t.secondaryValAxis, u = ot(n), f = ot(i), p = (e) => e?.minorGridlines === !0 || e?.minorTickMark != null && e.minorTickMark !== "none", h =
|
|
2011
|
+
let o = t.secondaryCatAxis, c = t.secondaryValAxis, u = ot(n), f = ot(i), p = (e) => e?.minorGridlines === !0 || e?.minorTickMark != null && e.minorTickMark !== "none", h = G({
|
|
2011
2012
|
dataMin: u.min,
|
|
2012
2013
|
dataMax: u.max,
|
|
2013
2014
|
explicitMin: o?.min,
|
|
@@ -2019,7 +2020,7 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
2019
2020
|
needMinor: p(o),
|
|
2020
2021
|
logBase: o?.logBase,
|
|
2021
2022
|
reversed: o?.orientation === "maxMin"
|
|
2022
|
-
}), _ =
|
|
2023
|
+
}), _ = G({
|
|
2023
2024
|
dataMin: f.min,
|
|
2024
2025
|
dataMax: f.max,
|
|
2025
2026
|
explicitMin: c?.min,
|
|
@@ -2043,9 +2044,9 @@ function vr(e, t, r, a, o = {}, s = 0) {
|
|
|
2043
2044
|
}, _.max, void 0, s);
|
|
2044
2045
|
}
|
|
2045
2046
|
}
|
|
2046
|
-
Bn(), ae && !_ && sr(e, t, ae, oe, r, X, Z, Q, a), R && Tt && ar(e, t, R, Tt, sn, r, X, Z, Q, $, a, Ft, Lt, dn, t.date1904, Ct), en && Kt(e, t, en, X, Z + $ + (_ ? t.valAxisHidden ? g * .02 : x(
|
|
2047
|
-
let xr =
|
|
2048
|
-
_n(e,
|
|
2047
|
+
Bn(), ae && !_ && sr(e, t, ae, oe, r, X, Z, Q, a), R && Tt && ar(e, t, R, Tt, sn, r, X, Z, Q, $, a, Ft, Lt, dn, t.date1904, Ct), en && Kt(e, t, en, X, Z + $ + (_ ? t.valAxisHidden ? g * .02 : x(W) : 0), Q, l + Ye, a);
|
|
2048
|
+
let xr = Ne ? T.flatMap((e, n) => [Ji(t, Ae[n], T.length, e.chartexStyle, e.color), ...Kn([e]).map(() => void 0)]) : [];
|
|
2049
|
+
_n(e, Ie, qe, l, d, m, g, X, Z, Q, $, ze + 2, a, xr), Bt(e, t, l, d, m, g, X, Z, Q, $, Ye, Xe, Qe, $e, _);
|
|
2049
2050
|
}
|
|
2050
2051
|
function yr(e, t, n) {
|
|
2051
2052
|
return t.hidden === !0 || t.paintAuthored === !0 && t.color == null ? !1 : (e.strokeStyle = `#${t.color ?? "000000"}`, e.lineWidth = t.widthEmu == null ? Math.max(1, .75 * n) : H(t.widthEmu, n), e.setLineDash(Mi(t.dash ?? void 0, e.lineWidth)), e.lineCap = t.cap === "rnd" ? "round" : t.cap === "sq" ? "square" : "butt", e.lineJoin = t.join === "round" || t.join === "bevel" ? t.join : "miter", !0);
|
|
@@ -2237,7 +2238,7 @@ function Mr(e, t) {
|
|
|
2237
2238
|
}
|
|
2238
2239
|
function Nr(e, t, n, r) {
|
|
2239
2240
|
let i = e.chartStyleRoles?.dataPointMarker;
|
|
2240
|
-
if (!Mr(e, t) || (t.showMarker === !1 || t.markerSymbol === "none") && !
|
|
2241
|
+
if (!Mr(e, t) || (t.showMarker === !1 || t.markerSymbol === "none") && !re(t)) return t;
|
|
2241
2242
|
let a = i != null && i.fillNoStyle !== !0, o = i != null && i.lineNoStyle !== !0, s = t.markerFillPaintAuthored === !0 || t.markerFill != null || t.markerFillPaint !== void 0, c = t.markerFill ?? (!s && a && i?.fillHidden === !0 ? "00000000" : !s && a && i ? zi(e, i, "fill", n, r) : null), l = !s && a && i ? Ki(e, i, n, r) : void 0, u = t.markerFillPaint === void 0 ? l?.fillType === "gradient" || l?.fillType === "pattern" || l?.fillType === "image" ? l : void 0 : t.markerFillPaint, d = s ? t.markerFillPaintAuthored : a && i?.fillPaintAuthored === !0 ? !0 : void 0, f = t.markerLine ?? (o && i?.lineHidden === !0 ? "00000000" : o && i ? zi(e, i, "line", n, r) : null), p = t.markerLineWidthEmu ?? (o ? i?.lineWidthEmu : null), m = t.markerSize ?? e.chartStyleMarkerSizePt, h = t.markerSymbol ?? e.chartStyleMarkerSymbol;
|
|
2242
2243
|
return c === t.markerFill && u === t.markerFillPaint && d === t.markerFillPaintAuthored && f === t.markerLine && p === t.markerLineWidthEmu && m === t.markerSize && h === t.markerSymbol ? t : {
|
|
2243
2244
|
...t,
|
|
@@ -2380,7 +2381,7 @@ function Rr(e, t, n) {
|
|
|
2380
2381
|
textBInsEmu: t.textBInsEmu ?? n?.textBInsEmu ?? r?.textBInsEmu ?? void 0,
|
|
2381
2382
|
textBodyAuthored: t.textBodyAuthored === !0 || n?.textBodyAuthored === !0 || r?.textBodyAuthored === !0 || void 0,
|
|
2382
2383
|
textAlign: t.textAlign ?? n?.textAlign,
|
|
2383
|
-
labelBox:
|
|
2384
|
+
labelBox: We(t.labelBox, i)
|
|
2384
2385
|
};
|
|
2385
2386
|
}
|
|
2386
2387
|
function zr(e) {
|
|
@@ -2583,7 +2584,7 @@ function Ur(e, t, n, r, i, a, o, s, c, l, u, d = 0) {
|
|
|
2583
2584
|
if (!(p > 0) || !(g > 0) || !Number.isFinite(g)) continue;
|
|
2584
2585
|
let _ = f >= r ? c.up : c.down, v = _.fillPaintAuthored === !0 || _.fill != null || _.fillColor != null || _.fillHidden === !0 ? void 0 : f >= r ? u?.upFillColor : u?.downFillColor, y = _.fillColor ?? v, b = i(s) - p / 2, x = Math.min(m, h);
|
|
2585
2586
|
if (!_.fillHidden && (_.fill != null || y != null)) {
|
|
2586
|
-
let t = _.fill ?
|
|
2587
|
+
let t = _.fill ? Fe(_.fill, e, b, x, p, g, d) : `#${y}`;
|
|
2587
2588
|
t != null && (e.fillStyle = t, e.fillRect(b, x, p, g));
|
|
2588
2589
|
}
|
|
2589
2590
|
let S = _.linePaintAuthored === !0 || _.lineColor != null || _.lineHidden === !0, C = _.lineColor ?? (S ? void 0 : u?.lineColor), w = _.lineWidthEmu ?? (S ? void 0 : u?.lineWidthEmu);
|
|
@@ -2687,92 +2688,92 @@ function qr(e, t, n, r, a = 0) {
|
|
|
2687
2688
|
isFinite(L) || (L = 0, te = 1);
|
|
2688
2689
|
let ne = t.valAxisLogBase != null && t.valAxisLogBase >= 2;
|
|
2689
2690
|
t.valMin == null ? j && L > 0 && !ne && (L = 0) : L = j ? t.valMin * 100 : t.valMin, t.valMax == null ? j && te < 0 && (te = 0) : te = j ? t.valMax * 100 : t.valMax;
|
|
2690
|
-
let R = ur(e, t, l, d, r),
|
|
2691
|
-
if (F &&
|
|
2691
|
+
let R = ur(e, t, l, d, r), ie = R.fontPx, z = R.topPad, ae = R.bandH, oe = mn(e, t, l, d, .22, r), { legRightW: le, legLeftW: B, legTopH: fe, legBottomH: V } = v(oe, t.legendOverlay === !0), pe = Jn(t.catAxisFontSizeHpt, d, r), he = Jn(t.valAxisFontSizeHpt, d, r), ge = p(t, l, d, r), ve = ge.catFontPx, ye = ge.valFontPx, be = ge.catBandH, xe = ge.valBandW, Se = Vt(t), Ce = Ut(t, r), we = Wt(e, t, r), Ee = ae + fe + he / 2 + 2, De = (Se ? Ce : x(pe, t.catAxisLabelOffsetPercent)) + be + V, Ae = d - Ee - De, Ne = rr(F, t.series, Ae / r, "y", P, !1, (e, n) => T[n] || t.plotGroups == null && t.series[n].useSecondaryAxis === !0, (e, t, n) => !C[n] && e.values[t] == null ? null : k(n, t)), Pe = Math.max(8, Math.min(11, d / 20)), Fe = i(F?.fontSizeHpt, r) ?? Pe, Ie = 0;
|
|
2692
|
+
if (F && Ne && !F.hidden) {
|
|
2692
2693
|
let n = e.font;
|
|
2693
2694
|
e.font = Pt(Fe, Y(t, F.fontFace, "minor"), !1, F.fontItalic ?? !1);
|
|
2694
2695
|
let r = 0;
|
|
2695
|
-
for (let n of
|
|
2696
|
-
|
|
2696
|
+
for (let n of Ne.majorLines) r = Math.max(r, e.measureText(Rn(n, F.formatCode ?? null, t.date1904, F.displayUnits)).width);
|
|
2697
|
+
Ie = r + 18, e.font = n;
|
|
2697
2698
|
}
|
|
2698
|
-
let
|
|
2699
|
+
let U = F && F.title ? _e(F.titleFontSizeHpt, r) + 8 : 0, Le = B + Math.max(he * 2.2 + 10 + xe, we), Re = le + l * .05 + Ie + U, ze = Vn(t, L, te, Ae / r, j), Be = 0;
|
|
2699
2700
|
if (!t.valAxisHidden && t.valAxisTickLabelPos !== "none" && t.plotAreaManualLayout != null && t.plotAreaManualLayout.layoutTarget !== "inner") {
|
|
2700
2701
|
let n = e.font;
|
|
2701
|
-
e.font = Pt(
|
|
2702
|
+
e.font = Pt(he, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1);
|
|
2702
2703
|
for (let n of ze.majorLines) Be = Math.max(Be, e.measureText(In(t, n, j)).width);
|
|
2703
2704
|
e.font = n;
|
|
2704
2705
|
}
|
|
2705
|
-
let
|
|
2706
|
-
t:
|
|
2706
|
+
let W = {
|
|
2707
|
+
t: Ee,
|
|
2707
2708
|
r: Re,
|
|
2708
2709
|
b: De,
|
|
2709
2710
|
l: Le
|
|
2710
|
-
}, He =
|
|
2711
|
+
}, He = Ve({
|
|
2711
2712
|
valAxisHidden: t.valAxisHidden,
|
|
2712
2713
|
catAxisHidden: t.catAxisHidden,
|
|
2713
2714
|
valLabelWidth: Be,
|
|
2714
|
-
valLabelFontPx:
|
|
2715
|
+
valLabelFontPx: he,
|
|
2715
2716
|
catLabelFontPx: pe,
|
|
2716
|
-
valLabelGapPx: t.valAxisFontSizeHpt == null ? 6 : u(
|
|
2717
|
+
valLabelGapPx: t.valAxisFontSizeHpt == null ? 6 : u(he),
|
|
2717
2718
|
catLabelGapPx: t.catAxisFontSizeHpt == null ? h(5, t.catAxisLabelOffsetPercent) : h(c(pe), t.catAxisLabelOffsetPercent),
|
|
2718
2719
|
outerTextMarginPx: b * r,
|
|
2719
2720
|
valTitleBandW: xe,
|
|
2720
2721
|
catTitleBandH: be,
|
|
2721
|
-
secondaryBandW:
|
|
2722
|
-
}),
|
|
2722
|
+
secondaryBandW: Ie + U
|
|
2723
|
+
}), Ue = f(t, o, s, l, d, r, {
|
|
2723
2724
|
titleBand: R,
|
|
2724
2725
|
legendSideReserveFrac: .22,
|
|
2725
2726
|
legendReserve: oe,
|
|
2726
|
-
pad:
|
|
2727
|
+
pad: W,
|
|
2727
2728
|
honorPlotAreaManualLayout: !0,
|
|
2728
2729
|
manualOuterInsets: He
|
|
2729
|
-
}),
|
|
2730
|
-
Math.abs(
|
|
2730
|
+
}), We = ur(e, t, Ue.plotRect.pw, d, r);
|
|
2731
|
+
Math.abs(We.bandH - R.bandH) > .01 && (R = We, ie = R.fontPx, z = R.topPad, ae = R.bandH, Ee = ae + fe + he / 2 + 2, W.t = Ee, Ue = f(t, o, s, l, d, r, {
|
|
2731
2732
|
titleBand: R,
|
|
2732
2733
|
legendSideReserveFrac: .22,
|
|
2733
2734
|
legendReserve: oe,
|
|
2734
|
-
pad:
|
|
2735
|
+
pad: W,
|
|
2735
2736
|
honorPlotAreaManualLayout: !0,
|
|
2736
2737
|
manualOuterInsets: He
|
|
2737
2738
|
}));
|
|
2738
|
-
let { px0:
|
|
2739
|
-
if (fr(e, t, t.titleManualLayout || !t.titleRichRuns?.length ? o :
|
|
2739
|
+
let { px0: G, py0: Ge, pw: K } = Ue.plotRect, { ph: q } = Ue.plotRect;
|
|
2740
|
+
if (fr(e, t, t.titleManualLayout || !t.titleRichRuns?.length ? o : G, s, t.titleManualLayout || !t.titleRichRuns?.length ? l : K, d, s + z, ie), K <= 0 || q <= 0) return;
|
|
2740
2741
|
let Ke = Se ? Gt(e, t, K / g, r) : null;
|
|
2741
|
-
Ke && Ke.totalHeight > Ce && (q = Math.max(1, q - (Ke.totalHeight - Ce))),
|
|
2742
|
+
Ke && Ke.totalHeight > Ce && (q = Math.max(1, q - (Ke.totalHeight - Ce))), Me(e, t, G, Ge, K, q, r, a);
|
|
2742
2743
|
let qe = Vn(t, L, te, q / r, j);
|
|
2743
2744
|
if (qe.max - qe.min === 0) return;
|
|
2744
|
-
let Je = (e) =>
|
|
2745
|
+
let Je = (e) => Ge + q - qe.frac(e) * q, Ye = Ne ? Ne.makeToY(Ge, q) : Je, J = (e) => I(e) ? Ye : Je, Xe = Je(Kr(t, qe.min, qe.max)), Ze = F && Ne ? Ye(Gr(t.secondaryCatAxis?.crossesAt, t.secondaryCatAxis?.crosses, Ne.min, Ne.max)) : Xe, Qe = (e) => I(e) ? Ze : Xe, $e = ue(t.catAxisLineColor, t.catAxisLineWidthEmu, r), tt = ue(t.valAxisLineColor, t.valAxisLineWidthEmu, r), nt = t.catAxisLineColor == null ? void 0 : $e.color, rt = t.catAxisLineWidthEmu == null ? void 0 : $e.width, it = t.valAxisLineColor == null ? void 0 : tt.color, at = t.valAxisLineWidthEmu == null ? void 0 : tt.width, ot = tr(t, m), st = se(t), ct = Nn(t), lt = ot ? (e) => G + ot.positions[e] * K : st ? (e) => G + ((ct ? g - 1 - e : e) + .5) / g * K : (e) => {
|
|
2745
2746
|
let t = ct ? g - 1 - e : e;
|
|
2746
|
-
return
|
|
2747
|
+
return G + (g === 1 ? K / 2 : t / (g - 1) * K);
|
|
2747
2748
|
};
|
|
2748
2749
|
if (!t.valAxisHidden) {
|
|
2749
|
-
e.font = Pt(
|
|
2750
|
+
e.font = Pt(he, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1), e.textBaseline = "middle";
|
|
2750
2751
|
let n = wn(t, r), i = Tn(t, r);
|
|
2751
|
-
for (let t of qe.minorLines) Cn(e,
|
|
2752
|
+
for (let t of qe.minorLines) Cn(e, G, K, Je(t), !1, i);
|
|
2752
2753
|
let a = Pn(t), o = t.valAxisTickLabelPos !== "none";
|
|
2753
2754
|
for (let i of qe.majorLines) {
|
|
2754
2755
|
let s = Je(i);
|
|
2755
|
-
if (a && Cn(e,
|
|
2756
|
+
if (a && Cn(e, G, K, s, i === 0, n), yn(e, t.valAxisMajorTickMark, "val", G, s, it, at, !1, t.valAxisLineHidden, "major", r, t.valAxisLineDash), o) {
|
|
2756
2757
|
e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555", e.textAlign = "right";
|
|
2757
|
-
let n = t.valAxisFontSizeHpt == null ? 6 : u(
|
|
2758
|
-
e.fillText(In(t, i, j),
|
|
2758
|
+
let n = t.valAxisFontSizeHpt == null ? 6 : u(he);
|
|
2759
|
+
e.fillText(In(t, i, j), G - n, s);
|
|
2759
2760
|
}
|
|
2760
2761
|
}
|
|
2761
|
-
if (t.valAxisMinorTickMark && t.valAxisMinorTickMark !== "none") for (let n of qe.minorTicks) yn(e, t.valAxisMinorTickMark, "val",
|
|
2762
|
+
if (t.valAxisMinorTickMark && t.valAxisMinorTickMark !== "none") for (let n of qe.minorTicks) yn(e, t.valAxisMinorTickMark, "val", G, Je(n), it, at, !1, t.valAxisLineHidden, "minor", r, t.valAxisLineDash);
|
|
2762
2763
|
}
|
|
2763
|
-
if (F &&
|
|
2764
|
+
if (F && Ne && ir(e, F, Ne, Ye, G, K, r), !t.catAxisHidden && On(t)) {
|
|
2764
2765
|
let n = kn(t, r);
|
|
2765
2766
|
e.strokeStyle = n.color, e.lineWidth = n.width;
|
|
2766
2767
|
let i = n.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
2767
2768
|
n.dash.length > 0 && e.setLineDash(n.dash);
|
|
2768
2769
|
let a = ot ? ot.majorTicks.map((e) => e.fraction) : jn(t, g);
|
|
2769
2770
|
for (let t of a) {
|
|
2770
|
-
let n =
|
|
2771
|
-
e.beginPath(), e.moveTo(n,
|
|
2771
|
+
let n = G + t * K;
|
|
2772
|
+
e.beginPath(), e.moveTo(n, Ge), e.lineTo(n, Ge + q), e.stroke();
|
|
2772
2773
|
}
|
|
2773
2774
|
n.dash.length > 0 && e.setLineDash(i);
|
|
2774
2775
|
}
|
|
2775
|
-
!t.catAxisHidden && !t.catAxisLineHidden && bn(e,
|
|
2776
|
+
!t.catAxisHidden && !t.catAxisLineHidden && bn(e, G, Xe, G + K, Xe, $e.color, $e.width, t.catAxisLineDash), !t.valAxisHidden && !t.valAxisLineHidden && bn(e, G, Ge, G, Ge + q, tt.color, tt.width, t.valAxisLineDash);
|
|
2776
2777
|
let ut = ot ? (ot.categoryBandFractions[0] ?? 0) * K : st ? K / g : g > 1 ? K / (g - 1) : K, dt = new Map(t.series.map((e, t) => [e, t]));
|
|
2777
2778
|
Wr(e, t, g, lt, J, Qe, (e, t) => {
|
|
2778
2779
|
let n = dt.get(e);
|
|
@@ -2802,11 +2803,11 @@ function qr(e, t, n, r, a = 0) {
|
|
|
2802
2803
|
let S = (e) => k(i, e);
|
|
2803
2804
|
for (let n of c.errBars ?? []) Pi(e, c, Cr(t, n), g, lt, v, S, h);
|
|
2804
2805
|
e.fillStyle = h;
|
|
2805
|
-
let T = c.showMarker !== !1 && c.markerSymbol !== "none", D = T ||
|
|
2806
|
+
let T = c.showMarker !== !1 && c.markerSymbol !== "none", D = T || re(c), O = de(c), A = (c.dataLabelOverrides?.length ?? 0) > 0 || c.seriesDataLabels != null;
|
|
2806
2807
|
A && ht.push(() => {
|
|
2807
2808
|
Ii(e, c, m, g, lt, v, S, q, r, t.date1904 ?? !1, u || M === "zero", Y(t, t.dataLabelFontFace, "minor"), t.dataLabelPosition ?? "r", {
|
|
2808
2809
|
x: o,
|
|
2809
|
-
y:
|
|
2810
|
+
y: Ge,
|
|
2810
2811
|
w: l,
|
|
2811
2812
|
h: q
|
|
2812
2813
|
}, {
|
|
@@ -2817,19 +2818,19 @@ function qr(e, t, n, r, a = 0) {
|
|
|
2817
2818
|
}, w[i] && f ? (e) => (c.values[e] ?? 0) / f[e] : void 0, (e) => {
|
|
2818
2819
|
if (!D) return 0;
|
|
2819
2820
|
let t = p.get(e);
|
|
2820
|
-
return !O && !
|
|
2821
|
-
}, (e) => Y(t, e, "minor"), I(c) ? F?.displayUnits : t.valAxisDisplayUnits, (e) => _(i, e), (e) => hr(t, e, I(c) &&
|
|
2821
|
+
return !O && !ce(t) ? pt : me(c, t, "circle", T) === "none" ? 0 : (t?.markerSize ?? c.markerSize ?? 5) / 2 * r;
|
|
2822
|
+
}, (e) => Y(t, e, "minor"), I(c) ? F?.displayUnits : t.valAxisDisplayUnits, (e) => _(i, e), (e) => hr(t, e, I(c) && Ne ? Ne.max : qe.max), a);
|
|
2822
2823
|
});
|
|
2823
2824
|
for (let t = 0; t < g; t++) {
|
|
2824
2825
|
if (!u && c.values[t] == null && M !== "zero") continue;
|
|
2825
2826
|
let n = k(i, t);
|
|
2826
2827
|
if (D) {
|
|
2827
2828
|
let i = p.get(t);
|
|
2828
|
-
if (O ||
|
|
2829
|
-
let o =
|
|
2829
|
+
if (O || ce(i)) {
|
|
2830
|
+
let o = me(c, i, "circle", T);
|
|
2830
2831
|
if (o !== "none") {
|
|
2831
|
-
let s = i?.markerSize ?? c.markerSize ?? 5, l =
|
|
2832
|
-
Si(e, lt(t), v(n), o, s, l, u, r, d == null ? void 0 : H(d, r),
|
|
2832
|
+
let s = i?.markerSize ?? c.markerSize ?? 5, l = Te(c, i, t, h), u = i?.markerLine ?? c.markerLine ?? null, d = i?.markerLineWidthEmu ?? c.markerLineWidthEmu;
|
|
2833
|
+
Si(e, lt(t), v(n), o, s, l, u, r, d == null ? void 0 : H(d, r), je(c, i, t), a);
|
|
2833
2834
|
}
|
|
2834
2835
|
} else e.beginPath(), e.arc(lt(t), v(n), pt, 0, Math.PI * 2), e.fill();
|
|
2835
2836
|
}
|
|
@@ -2845,8 +2846,8 @@ function qr(e, t, n, r, a = 0) {
|
|
|
2845
2846
|
date1904: t.date1904
|
|
2846
2847
|
});
|
|
2847
2848
|
Ti(e, lt(n), v(r), a, t.dataLabelPosition ?? "r", mt, t.dataLabelFontColor ?? void 0, t.dataLabelFontBold ?? !1, Y(t, t.dataLabelFontFace, "minor"), D ? pt + 1 : 2, {
|
|
2848
|
-
x:
|
|
2849
|
-
y:
|
|
2849
|
+
x: G,
|
|
2850
|
+
y: Ge,
|
|
2850
2851
|
w: K,
|
|
2851
2852
|
h: q
|
|
2852
2853
|
});
|
|
@@ -2855,8 +2856,8 @@ function qr(e, t, n, r, a = 0) {
|
|
|
2855
2856
|
chart: t,
|
|
2856
2857
|
chartRect: n,
|
|
2857
2858
|
plotRect: {
|
|
2858
|
-
x:
|
|
2859
|
-
y:
|
|
2859
|
+
x: G,
|
|
2860
|
+
y: Ge,
|
|
2860
2861
|
w: K,
|
|
2861
2862
|
h: q
|
|
2862
2863
|
},
|
|
@@ -2871,65 +2872,65 @@ function qr(e, t, n, r, a = 0) {
|
|
|
2871
2872
|
if (!t.catAxisHidden) {
|
|
2872
2873
|
let n = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#555";
|
|
2873
2874
|
e.fillStyle = n, e.textAlign = "center", e.textBaseline = "top", e.font = Pt(pe, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
2874
|
-
let i = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), a = ot ? ot.majorTicks.map((e) =>
|
|
2875
|
+
let i = Math.max(1, Math.floor(t.catAxisTickMarkSkip ?? 1)), a = ot ? ot.majorTicks.map((e) => G + e.fraction * K) : Array.from({ length: Math.ceil(g / i) }, (e, t) => lt(t * i));
|
|
2875
2876
|
for (let n of a) yn(e, t.catAxisMajorTickMark, "cat", Xe, n, nt, rt, !1, t.catAxisLineHidden, "major", r, t.catAxisLineDash);
|
|
2876
|
-
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && ot) for (let n of ot.minorTicks) yn(e, t.catAxisMinorTickMark, "cat", Xe,
|
|
2877
|
+
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && ot) for (let n of ot.minorTicks) yn(e, t.catAxisMinorTickMark, "cat", Xe, G + n.fraction * K, nt, rt, !1, t.catAxisLineHidden, "minor", r, t.catAxisLineDash);
|
|
2877
2878
|
let o = !Se && Zn(t), s = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1)), l = $n(t), u = ot ? ot.majorTicks.map((e) => ({
|
|
2878
|
-
label:
|
|
2879
|
-
x:
|
|
2879
|
+
label: ke(String(e.serial), t.catAxisFormatCode, t.date1904),
|
|
2880
|
+
x: G + e.fraction * K,
|
|
2880
2881
|
categoryIndex: -1
|
|
2881
2882
|
})) : Array.from({ length: Math.ceil(g / s) }, (e, n) => {
|
|
2882
2883
|
let r = n * s;
|
|
2883
2884
|
return {
|
|
2884
|
-
label:
|
|
2885
|
+
label: ke((m[r] ?? "").toString(), t.catAxisFormatCode, t.date1904),
|
|
2885
2886
|
x: lt(r),
|
|
2886
2887
|
categoryIndex: r
|
|
2887
2888
|
};
|
|
2888
2889
|
});
|
|
2889
2890
|
for (let r of u) {
|
|
2890
|
-
let i = r.categoryIndex < 0 ? null :
|
|
2891
|
+
let i = r.categoryIndex < 0 ? null : Oe(r.categoryIndex, g, se(t), Nn(t), t.catAxisLabelAlignment), a = i ? G + i.fraction * K : r.x;
|
|
2891
2892
|
if (!o) continue;
|
|
2892
2893
|
e.textAlign = i?.textAlign ?? "center", e.fillStyle = n;
|
|
2893
2894
|
let s = r.label;
|
|
2894
2895
|
if (!s) continue;
|
|
2895
2896
|
let u = h(t.catAxisFontSizeHpt == null ? 5 : c(pe), t.catAxisLabelOffsetPercent), d = t.catAxisTickLabelPos ?? "nextTo";
|
|
2896
|
-
er(e, s, a, (d === "nextTo" ? Xe : d === "high" ?
|
|
2897
|
+
er(e, s, a, (d === "nextTo" ? Xe : d === "high" ? Ge : Ge + q) + u, l);
|
|
2897
2898
|
}
|
|
2898
2899
|
}
|
|
2899
|
-
if (F &&
|
|
2900
|
+
if (F && Ne) {
|
|
2900
2901
|
let i = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555";
|
|
2901
|
-
ar(e, t, F,
|
|
2902
|
+
ar(e, t, F, Ne, Ye, n, G, Ge, K, q, r, Fe, Ie, i, t.date1904);
|
|
2902
2903
|
}
|
|
2903
|
-
Ke && Kt(e, t, Ke,
|
|
2904
|
+
Ke && Kt(e, t, Ke, G, Ge + q, K, o + B, r), _n(e, t, oe, o, s, l, d, G, Ge, K, q, ae + 2, r), Bt(e, t, o, s, l, d, G, Ge, K, q, B, V, ve, ye);
|
|
2904
2905
|
}
|
|
2905
2906
|
function Jr(e, t, n, r, a = 0) {
|
|
2906
2907
|
let { x: o, y: s, w: c, h: l } = n, u = pr(t), d = u.length;
|
|
2907
2908
|
if (d === 0) return;
|
|
2908
|
-
let m = Xt(t, r), g = t.plotGroups?.find((e) => e.kind === "stock"), _ = g ? t.series.slice(g.seriesStart, g.seriesStart + g.seriesCount) : t.series, y = t.plotGroups == null ? [] : t.plotGroups.filter((e) => e.kind === "line").flatMap((e) => t.series.slice(e.seriesStart, e.seriesStart + e.seriesCount)), b = [..._, ...y], S = new Map(t.series.map((e, t) => [e, t])), C = _.length >= 4, w = C ? 0 : -1, T = +!!C, E = C ? 2 : 1, D = C ? 3 : 2, O = _[T], k = _[E], A = _[D], j = w >= 0 ? _[w] : void 0, M = _[0], N = _.at(-1), P = t.secondaryValAxis && b.some((e) => e.useSecondaryAxis === !0) ? t.secondaryValAxis : null, F = (e) => P != null && e.useSecondaryAxis === !0, ee = ur(e, t, c, l, r), I = ee.fontPx, L = ee.topPad, te = ee.bandH, ne = mn(e, t, c, l, .22, r), { legRightW: R, legLeftW:
|
|
2909
|
+
let m = Xt(t, r), g = t.plotGroups?.find((e) => e.kind === "stock"), _ = g ? t.series.slice(g.seriesStart, g.seriesStart + g.seriesCount) : t.series, y = t.plotGroups == null ? [] : t.plotGroups.filter((e) => e.kind === "line").flatMap((e) => t.series.slice(e.seriesStart, e.seriesStart + e.seriesCount)), b = [..._, ...y], S = new Map(t.series.map((e, t) => [e, t])), C = _.length >= 4, w = C ? 0 : -1, T = +!!C, E = C ? 2 : 1, D = C ? 3 : 2, O = _[T], k = _[E], A = _[D], j = w >= 0 ? _[w] : void 0, M = _[0], N = _.at(-1), P = t.secondaryValAxis && b.some((e) => e.useSecondaryAxis === !0) ? t.secondaryValAxis : null, F = (e) => P != null && e.useSecondaryAxis === !0, ee = ur(e, t, c, l, r), I = ee.fontPx, L = ee.topPad, te = ee.bandH, ne = mn(e, t, c, l, .22, r), { legRightW: R, legLeftW: z, legBottomH: ae, legTopH: oe } = v(ne, t.legendOverlay === !0), ce = Jn(t.catAxisFontSizeHpt, l, r), le = Jn(t.valAxisFontSizeHpt, l, r), B = p(t, c, l, r), fe = B.catFontPx, V = B.valFontPx, pe = B.catBandH, he = B.valBandW, ge = Vt(t), ve = Ut(t, r), ye = Wt(e, t, r), be = te + oe + le / 2 + 2, xe = (ge ? ve : x(ce, t.catAxisLabelOffsetPercent)) + pe + ae, Se = rr(P, b, (l - be - xe) / r), Ce = Math.max(8, Math.min(11, l / 20)), we = i(P?.fontSizeHpt, r) ?? Ce, Ee = 0;
|
|
2909
2910
|
if (P && Se && !P.hidden) {
|
|
2910
2911
|
let n = e.font;
|
|
2911
2912
|
e.font = Pt(we, Y(t, P.fontFace, "minor"), P.fontBold ?? !1, P.fontItalic ?? !1);
|
|
2912
2913
|
let r = 0;
|
|
2913
2914
|
for (let n of Se.majorLines) r = Math.max(r, e.measureText(Rn(n, P.formatCode ?? null, t.date1904, P.displayUnits)).width);
|
|
2914
|
-
|
|
2915
|
+
Ee = r + 18, e.font = n;
|
|
2915
2916
|
}
|
|
2916
|
-
let De = P?.title ?
|
|
2917
|
+
let De = P?.title ? _e(P.titleFontSizeHpt, r) + 8 : 0, Ae = {
|
|
2917
2918
|
t: be,
|
|
2918
|
-
r: R + c * .05 +
|
|
2919
|
+
r: R + c * .05 + Ee + De,
|
|
2919
2920
|
b: xe,
|
|
2920
|
-
l:
|
|
2921
|
+
l: z + Math.max(le * 2.2 + 10 + he, ye)
|
|
2921
2922
|
};
|
|
2922
2923
|
fr(e, t, o, s, c, l, s + L, I);
|
|
2923
|
-
let
|
|
2924
|
+
let Ne = f(t, o, s, c, l, r, {
|
|
2924
2925
|
titleBand: ee,
|
|
2925
2926
|
legendSideReserveFrac: .22,
|
|
2926
2927
|
legendReserve: ne,
|
|
2927
|
-
pad:
|
|
2928
|
+
pad: Ae,
|
|
2928
2929
|
honorPlotAreaManualLayout: !0
|
|
2929
|
-
}), { px0:
|
|
2930
|
+
}), { px0: Pe, py0: Ie, pw: U } = Ne.plotRect, { ph: Le } = Ne.plotRect;
|
|
2930
2931
|
if (U <= 0 || Le <= 0) return;
|
|
2931
2932
|
let Re = ge ? Gt(e, t, U / d, r) : null;
|
|
2932
|
-
Re && Re.totalHeight >
|
|
2933
|
+
Re && Re.totalHeight > ve && (Le = Math.max(1, Le - (Re.totalHeight - ve))), Me(e, t, Pe, Ie, U, Le, r, a);
|
|
2933
2934
|
let ze = Infinity, Be = -Infinity;
|
|
2934
2935
|
for (let e of b) if (!F(e)) for (let t = 0; t < d; t++) {
|
|
2935
2936
|
let n = e.values[t];
|
|
@@ -2941,30 +2942,30 @@ function Jr(e, t, n, r, a = 0) {
|
|
|
2941
2942
|
isFinite(ze) || (ze = 0, Be = 1), t.valMin != null && (ze = t.valMin), t.valMax != null && (Be = t.valMax);
|
|
2942
2943
|
let Ve = Vn(t, ze, Be, Le / r);
|
|
2943
2944
|
if (Ve.max - Ve.min === 0) return;
|
|
2944
|
-
let
|
|
2945
|
-
let t =
|
|
2946
|
-
return
|
|
2945
|
+
let W = (e) => Ie + Le - Ve.frac(e) * Le, He = Se?.makeToY(Ie, Le) ?? W, Ue = (e) => F(e) ? He : W, We = se(t), G = Nn(t), Ge = tr(t, u), K = Ge ? (e) => Pe + Ge.positions[e] * U : We ? (e) => Pe + ((G ? d - 1 - e : e) + .5) / d * U : (e) => {
|
|
2946
|
+
let t = G ? d - 1 - e : e;
|
|
2947
|
+
return Pe + (d === 1 ? U / 2 : t / (d - 1) * U);
|
|
2947
2948
|
};
|
|
2948
2949
|
if (!t.valAxisHidden) {
|
|
2949
2950
|
e.font = Pt(le, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1), e.textBaseline = "middle";
|
|
2950
2951
|
let n = wn(t, r), i = Tn(t, r);
|
|
2951
|
-
for (let t of Ve.minorLines) Cn(e,
|
|
2952
|
+
for (let t of Ve.minorLines) Cn(e, Pe, U, W(t), !1, i);
|
|
2952
2953
|
let a = Pn(t), o = t.valAxisTickLabelPos !== "none";
|
|
2953
2954
|
for (let i of Ve.majorLines) {
|
|
2954
|
-
let s =
|
|
2955
|
-
a && Cn(e,
|
|
2955
|
+
let s = W(i);
|
|
2956
|
+
a && Cn(e, Pe, U, s, i === 0, n), yn(e, t.valAxisMajorTickMark, "val", Pe, s, void 0, void 0, !1, t.valAxisLineHidden, "major", r, t.valAxisLineDash), o && (e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555", e.textAlign = "right", e.fillText(In(t, i, !1), Pe - 6, s));
|
|
2956
2957
|
}
|
|
2957
|
-
for (let n of Ve.minorTicks) yn(e, t.valAxisMinorTickMark, "val",
|
|
2958
|
+
for (let n of Ve.minorTicks) yn(e, t.valAxisMinorTickMark, "val", Pe, W(n), void 0, void 0, !1, t.valAxisLineHidden, "minor", r, t.valAxisLineDash);
|
|
2958
2959
|
}
|
|
2959
|
-
P && Se && ir(e, P, Se,
|
|
2960
|
-
let Ke =
|
|
2961
|
-
if (!t.catAxisHidden && !t.catAxisLineHidden && bn(e,
|
|
2960
|
+
P && Se && ir(e, P, Se, He, Pe, U, r);
|
|
2961
|
+
let Ke = ue(t.catAxisLineColor, t.catAxisLineWidthEmu, r), qe = ue(t.valAxisLineColor, t.valAxisLineWidthEmu, r);
|
|
2962
|
+
if (!t.catAxisHidden && !t.catAxisLineHidden && bn(e, Pe, Ie + Le, Pe + U, Ie + Le, Ke.color, Ke.width, t.catAxisLineDash), !t.valAxisHidden && !t.valAxisLineHidden && bn(e, Pe, Ie, Pe, Ie + Le, qe.color, qe.width, t.valAxisLineDash), t.stockDropLines) {
|
|
2962
2963
|
let n = br(t, t.stockDropLines, "dropLine"), i = {
|
|
2963
2964
|
...n,
|
|
2964
2965
|
color: n.color ?? (n.paintAuthored === !0 ? null : t.stockAutomaticStyle?.lineColor),
|
|
2965
2966
|
widthEmu: n.widthEmu ?? t.stockAutomaticStyle?.lineWidthEmu
|
|
2966
2967
|
};
|
|
2967
|
-
(i.paintAuthored !== !0 || i.color != null) && (i.color != null || i.widthEmu != null || i.dash != null) && yr(e, i, r) && Sr(e, _, d, K, (e) =>
|
|
2968
|
+
(i.paintAuthored !== !0 || i.color != null) && (i.color != null || i.widthEmu != null || i.dash != null) && yr(e, i, r) && Sr(e, _, d, K, (e) => Ue(e), () => Ie + Le, (e, t) => e.values[t] ?? null);
|
|
2968
2969
|
}
|
|
2969
2970
|
if (t.stockHiLowLines === !0 && O != null && k != null && O && k) {
|
|
2970
2971
|
let n = br(t, t.stockHiLowLineStyle ?? { color: t.stockHiLowLineColor ?? null }, "hiLoLine"), i = {
|
|
@@ -2975,20 +2976,20 @@ function Jr(e, t, n, r, a = 0) {
|
|
|
2975
2976
|
if ((i.paintAuthored !== !0 || i.color != null) && (i.color != null || i.widthEmu != null || i.dash != null) && yr(e, i, r)) for (let t = 0; t < d; t++) {
|
|
2976
2977
|
let n = O.values[t], r = k.values[t];
|
|
2977
2978
|
if (n == null || r == null) continue;
|
|
2978
|
-
let i = K(t), a =
|
|
2979
|
+
let i = K(t), a = Ue(O), o = Ue(k);
|
|
2979
2980
|
e.beginPath(), e.moveTo(i, a(n)), e.lineTo(i, o(r)), e.stroke();
|
|
2980
2981
|
}
|
|
2981
2982
|
}
|
|
2982
2983
|
let Je = (t, n, i) => {
|
|
2983
2984
|
if (!t) return;
|
|
2984
|
-
let o = At(n, t), s = jt(t.dataPointOverrides), c = t.markerSymbol != null && t.markerSymbol !== "none" &&
|
|
2985
|
+
let o = At(n, t), s = jt(t.dataPointOverrides), c = t.markerSymbol != null && t.markerSymbol !== "none" && de(t), l = Math.max(3, U / d * .22);
|
|
2985
2986
|
for (let n = 0; n < d; n++) {
|
|
2986
2987
|
let u = t.values[n];
|
|
2987
2988
|
if (u == null) continue;
|
|
2988
|
-
let d = K(n), f =
|
|
2989
|
+
let d = K(n), f = Ue(t)(u), p = s.get(n);
|
|
2989
2990
|
if (p?.markerSymbol === "none" || p?.markerSymbol == null && t.markerSymbol === "none") continue;
|
|
2990
2991
|
if (c || p?.markerSymbol != null && p.markerSymbol !== "none") {
|
|
2991
|
-
Si(e, d, f, p?.markerSymbol ?? t.markerSymbol ?? "circle", p?.markerSize ?? t.markerSize ?? 3,
|
|
2992
|
+
Si(e, d, f, p?.markerSymbol ?? t.markerSymbol ?? "circle", p?.markerSize ?? t.markerSize ?? 3, Te(t, p, n, o), p?.markerLine ?? t.markerLine ?? null, r, (p?.markerLineWidthEmu ?? t.markerLineWidthEmu) == null ? void 0 : H(p?.markerLineWidthEmu ?? t.markerLineWidthEmu, r), je(t, p, n), a);
|
|
2992
2993
|
continue;
|
|
2993
2994
|
}
|
|
2994
2995
|
e.strokeStyle = o, e.lineWidth = Math.max(1, .75 * r), e.beginPath();
|
|
@@ -2997,11 +2998,11 @@ function Jr(e, t, n, r, a = 0) {
|
|
|
2997
2998
|
}
|
|
2998
2999
|
};
|
|
2999
3000
|
for (let i of y) {
|
|
3000
|
-
let o = S.get(i) ?? 0, s = At(Math.max(0, o), i), c =
|
|
3001
|
+
let o = S.get(i) ?? 0, s = At(Math.max(0, o), i), c = Ue(i), l = jt(i.dataPointOverrides);
|
|
3001
3002
|
if (i.lineHidden !== !0) {
|
|
3002
|
-
let n = Gi(t, i.chartexStyle, o, t.series.length), l = n === void 0 ? i.lineColor ? `#${i.lineColor}` : s : n == null ? null :
|
|
3003
|
+
let n = Gi(t, i.chartexStyle, o, t.series.length), l = n === void 0 ? i.lineColor ? `#${i.lineColor}` : s : n == null ? null : Fe(n, e, Pe, Ie, U, Le, a);
|
|
3003
3004
|
if (l != null) {
|
|
3004
|
-
e.save(), e.strokeStyle = l, e.lineWidth = i.lineWidthEmu == null ? Math.max(1, 2.25 * r) : H(i.lineWidthEmu, r), e.setLineDash(
|
|
3005
|
+
e.save(), e.strokeStyle = l, e.lineWidth = i.lineWidthEmu == null ? Math.max(1, 2.25 * r) : H(i.lineWidthEmu, r), e.setLineDash(ie(i.chartexStyle?.lineCustomDash, i.chartexStyle?.lineDash, e.lineWidth)), e.lineCap = i.chartexStyle?.lineCap === "rnd" ? "round" : i.chartexStyle?.lineCap === "sq" ? "square" : "butt", e.lineJoin = i.chartexStyle?.lineJoin === "round" || i.chartexStyle?.lineJoin === "bevel" ? i.chartexStyle.lineJoin : "miter", e.beginPath();
|
|
3005
3006
|
let t = [], n = () => {
|
|
3006
3007
|
t.length !== 0 && (e.moveTo(t[0].x, t[0].y), ji(e, t, i.smooth === !0), t = []);
|
|
3007
3008
|
};
|
|
@@ -3020,18 +3021,18 @@ function Jr(e, t, n, r, a = 0) {
|
|
|
3020
3021
|
}
|
|
3021
3022
|
}
|
|
3022
3023
|
let u = i.showMarker !== !1 && i.markerSymbol !== "none";
|
|
3023
|
-
if (u ||
|
|
3024
|
+
if (u || re(i)) for (let t = 0; t < d; t++) {
|
|
3024
3025
|
let n = i.values[t];
|
|
3025
3026
|
if (n == null) continue;
|
|
3026
|
-
let o = l.get(t), d =
|
|
3027
|
-
d !== "none" && Si(e, K(t), c(n), d, o?.markerSize ?? i.markerSize ?? 5,
|
|
3027
|
+
let o = l.get(t), d = me(i, o, "circle", u);
|
|
3028
|
+
d !== "none" && Si(e, K(t), c(n), d, o?.markerSize ?? i.markerSize ?? 5, Te(i, o, t, s), o?.markerLine ?? i.markerLine ?? null, r, (o?.markerLineWidthEmu ?? i.markerLineWidthEmu) == null ? void 0 : H(o?.markerLineWidthEmu ?? i.markerLineWidthEmu, r), je(i, o, t), a);
|
|
3028
3029
|
}
|
|
3029
3030
|
Gn(e, i, s, K, c, r, void 0, {
|
|
3030
3031
|
chart: t,
|
|
3031
3032
|
chartRect: n,
|
|
3032
3033
|
plotRect: {
|
|
3033
|
-
x:
|
|
3034
|
-
y:
|
|
3034
|
+
x: Pe,
|
|
3035
|
+
y: Ie,
|
|
3035
3036
|
w: U,
|
|
3036
3037
|
h: Le
|
|
3037
3038
|
},
|
|
@@ -3047,53 +3048,53 @@ function Jr(e, t, n, r, a = 0) {
|
|
|
3047
3048
|
...n,
|
|
3048
3049
|
up: xr(t, n.up, "upBar"),
|
|
3049
3050
|
down: xr(t, n.down, "downBar")
|
|
3050
|
-
}, o =
|
|
3051
|
-
Ur(e, (e) => M.values[e] ?? null, (e) => N.values[e] ?? null, d, K,
|
|
3051
|
+
}, o = Ge ? (Ge.categoryBandFractions[0] ?? 0) * U : We ? U / d : d > 1 ? U / (d - 1) : U;
|
|
3052
|
+
Ur(e, (e) => M.values[e] ?? null, (e) => N.values[e] ?? null, d, K, Ue(M), Ue(N), o, i, r, t.stockAutomaticStyle ?? void 0, a);
|
|
3052
3053
|
}
|
|
3053
|
-
Je(j, w, "left"), (O?.markerSymbol != null || O &&
|
|
3054
|
+
Je(j, w, "left"), (O?.markerSymbol != null || O && re(O)) && Je(O, T, "both"), (k?.markerSymbol != null || k && re(k)) && Je(k, E, "both"), Je(A, D, "right");
|
|
3054
3055
|
for (let n of b) {
|
|
3055
3056
|
let r = At(S.get(n) ?? 0, n);
|
|
3056
|
-
for (let i of n.errBars ?? []) Pi(e, n, Cr(t, i), d, K,
|
|
3057
|
+
for (let i of n.errBars ?? []) Pi(e, n, Cr(t, i), d, K, Ue(n), (e) => n.values[e] ?? 0, r);
|
|
3057
3058
|
}
|
|
3058
3059
|
if (_.length < 3) for (let e = 0; e < _.length; e++) Je(_[e], e, "both");
|
|
3059
3060
|
for (let i of b) {
|
|
3060
3061
|
let o = S.get(i) ?? 0;
|
|
3061
|
-
wi(e, i, u, !0, K,
|
|
3062
|
-
x:
|
|
3063
|
-
y:
|
|
3062
|
+
wi(e, i, u, !0, K, Ue(i), Le, r, t.date1904, Y(t, t.dataLabelFontFace, "minor"), t.dataLabelPosition ?? "r", {
|
|
3063
|
+
x: Pe,
|
|
3064
|
+
y: Ie,
|
|
3064
3065
|
w: U,
|
|
3065
3066
|
h: Le
|
|
3066
3067
|
}, n, (e) => Y(t, e, "minor"), F(i) ? P?.displayUnits : t.valAxisDisplayUnits, (e) => m(o, e), (e) => hr(t, e, F(i) ? Se?.max ?? Ve.max : Ve.max), a);
|
|
3067
3068
|
}
|
|
3068
3069
|
if (!t.catAxisHidden) {
|
|
3069
3070
|
let n = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1)), i = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#555";
|
|
3070
|
-
e.fillStyle = i, e.textAlign = "center", e.textBaseline = "top", e.font = Pt(
|
|
3071
|
-
let a =
|
|
3072
|
-
label:
|
|
3073
|
-
x:
|
|
3071
|
+
e.fillStyle = i, e.textAlign = "center", e.textBaseline = "top", e.font = Pt(ce, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
3072
|
+
let a = Ge ? (Ge.categoryBandFractions[0] ?? 0) * U - 4 : U / d * n - 4, o = !ge && Zn(t), s = $n(t), c = Ge && Ge.majorTicks.length > 0 ? Ge.majorTicks.map((e) => ({
|
|
3073
|
+
label: ke(String(e.serial), t.catAxisFormatCode, t.date1904),
|
|
3074
|
+
x: Pe + e.fraction * U,
|
|
3074
3075
|
categoryIndex: -1
|
|
3075
3076
|
})) : Array.from({ length: Math.ceil(d / n) }, (e, r) => {
|
|
3076
3077
|
let i = r * n;
|
|
3077
3078
|
return {
|
|
3078
|
-
label:
|
|
3079
|
+
label: ke((u[i] ?? "").toString(), t.catAxisFormatCode, t.date1904),
|
|
3079
3080
|
x: K(i),
|
|
3080
3081
|
categoryIndex: i
|
|
3081
3082
|
};
|
|
3082
3083
|
});
|
|
3083
3084
|
for (let n of c) {
|
|
3084
|
-
let c = n.categoryIndex < 0 ? null :
|
|
3085
|
-
if (yn(e, t.catAxisMajorTickMark, "cat",
|
|
3085
|
+
let c = n.categoryIndex < 0 ? null : Oe(n.categoryIndex, d, se(t), Nn(t), t.catAxisLabelAlignment), l = c ? Pe + c.fraction * U : n.x;
|
|
3086
|
+
if (yn(e, t.catAxisMajorTickMark, "cat", Ie + Le, l, Ke.color, Ke.width, !1, t.catAxisLineHidden, "major", r, t.catAxisLineDash), !o) continue;
|
|
3086
3087
|
e.textAlign = c?.textAlign ?? "center", e.fillStyle = i;
|
|
3087
3088
|
let u = n.label;
|
|
3088
|
-
er(e, q(e, u, s === 0 ? a : Le * .4), l,
|
|
3089
|
+
er(e, q(e, u, s === 0 ? a : Le * .4), l, Ie + Le + h(5, t.catAxisLabelOffsetPercent), s);
|
|
3089
3090
|
}
|
|
3090
|
-
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" &&
|
|
3091
|
+
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none" && Ge) for (let n of Ge.minorTicks) yn(e, t.catAxisMinorTickMark, "cat", Ie + Le, Pe + n.fraction * U, void 0, void 0, !1, t.catAxisLineHidden, "minor", r, t.catAxisLineDash);
|
|
3091
3092
|
}
|
|
3092
3093
|
if (P && Se) {
|
|
3093
3094
|
let i = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555";
|
|
3094
|
-
ar(e, t, P, Se,
|
|
3095
|
+
ar(e, t, P, Se, He, n, Pe, Ie, U, Le, r, we, Ee, i, t.date1904);
|
|
3095
3096
|
}
|
|
3096
|
-
Re && Kt(e, t, Re,
|
|
3097
|
+
Re && Kt(e, t, Re, Pe, Ie + Le, U, o + z, r), _n(e, t, ne, o, s, c, l, Pe, Ie, U, Le, te + 2, r), Bt(e, t, o, s, c, l, Pe, Ie, U, Le, z, ae, fe, V);
|
|
3097
3098
|
}
|
|
3098
3099
|
var Yr = (e) => e[0] + e[2] > e[1] + e[3] ? [[
|
|
3099
3100
|
0,
|
|
@@ -3163,11 +3164,11 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3163
3164
|
if (!(F > 0) || !Number.isFinite(F)) return;
|
|
3164
3165
|
let I = Math.ceil(F / j), L = Math.floor(F / j + 1e-9) + 1, te = (_ - 1) * (y - 1) * 2;
|
|
3165
3166
|
if (!Number.isSafeInteger(I) || !Number.isSafeInteger(L) || I < 1 || L < 2 || te < 1 || I > 512 || L > 512 || I > Math.floor(Xr / te) || L > Xr) return;
|
|
3166
|
-
let ne = I, re = Mn(t) ? (e) => 1 - (e - M) / F : (e) => (e - M) / F,
|
|
3167
|
+
let ne = I, re = Mn(t) ? (e) => 1 - (e - M) / F : (e) => (e - M) / F, z = Array.from({ length: L }, (e, t) => M + t * j), ae = (e, t) => {
|
|
3167
3168
|
let n = Math.min(e, t), r = Math.max(e, t), i = Math.max(1, Math.floor((n - M) / j) + 1), a = Math.min(ne - 1, Math.ceil((r - M) / j) - 1), o = [0];
|
|
3168
3169
|
if (e !== t) for (let n = i; n <= a; n++) o.push((M + n * j - e) / (t - e));
|
|
3169
3170
|
return o.push(1), o.sort((e, t) => e - t), o;
|
|
3170
|
-
},
|
|
3171
|
+
}, ce = Array.from({ length: ne }, (e, n) => it(t.themeAccentColors ?? [], n, ne, t.legacyChartStyle ?? 2) ?? (g[n]?.color ? `#${g[n].color}` : At(n, g[n]))), le = new Map((t.surfaceBandFormats ?? []).map((e) => [e.idx, e])), B = t.chartStyleRoles?.dataPoint3D, ue = t.chartStyleRoles?.dataPointWireframe, de = (e) => e?.lineNoStyle !== !0 && (e?.linePaintAuthored === !0 || e?.lineHidden === !0 || (e?.lineColors?.length ?? 0) > 0 || (e?.linePaints?.length ?? 0) > 0), fe = t.surfaceWireframe === !0 ? [] : Array.from({ length: ne }, (e, t) => {
|
|
3171
3172
|
let n = le.get(t), r;
|
|
3172
3173
|
return r = n?.fillHidden === !0 ? null : n?.fill ? n.fill : C(n?.style, t), r === void 0 ? C(B, t) : r;
|
|
3173
3174
|
}), V = t.surfaceWireframe === !0 ? [] : Array.from({ length: ne }, (e, t) => {
|
|
@@ -3176,7 +3177,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3176
3177
|
fillType: "solid",
|
|
3177
3178
|
color: n.lineColor
|
|
3178
3179
|
} : r(n?.style, t), i === void 0 ? r(B, t) : i;
|
|
3179
|
-
}),
|
|
3180
|
+
}), me = (e, t) => {
|
|
3180
3181
|
let n = e?.lineNoStyle === !0 ? void 0 : e, r = n?.lineDashAuthored === !0 || n?.lineDash != null || n?.lineCustomDash != null;
|
|
3181
3182
|
return {
|
|
3182
3183
|
lineWidthEmu: n?.lineWidthEmu ?? t.lineWidthEmu,
|
|
@@ -3209,7 +3210,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3209
3210
|
fillType: "solid",
|
|
3210
3211
|
color: ve.lineColor
|
|
3211
3212
|
};
|
|
3212
|
-
let be =
|
|
3213
|
+
let be = me(ve?.chartexStyle, _e), xe = {
|
|
3213
3214
|
paint: ye === void 0 ? ge : ye,
|
|
3214
3215
|
...be,
|
|
3215
3216
|
lineWidthEmu: ve?.lineWidthEmu ?? be.lineWidthEmu
|
|
@@ -3222,7 +3223,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3222
3223
|
color: n.lineColor
|
|
3223
3224
|
};
|
|
3224
3225
|
}), Ce = Se.map((e, t) => {
|
|
3225
|
-
let n = le.get(t), r =
|
|
3226
|
+
let n = le.get(t), r = me(n?.style, xe), i = {
|
|
3226
3227
|
paint: e === void 0 ? xe.paint : e,
|
|
3227
3228
|
...r,
|
|
3228
3229
|
lineWidthEmu: n?.lineWidthEmu ?? r.lineWidthEmu
|
|
@@ -3259,7 +3260,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3259
3260
|
}
|
|
3260
3261
|
}
|
|
3261
3262
|
}
|
|
3262
|
-
let
|
|
3263
|
+
let De = Se.some((e) => e === void 0), ke = [
|
|
3263
3264
|
{
|
|
3264
3265
|
surface: t.threeD?.floor,
|
|
3265
3266
|
role: "floor"
|
|
@@ -3276,58 +3277,58 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3276
3277
|
for (let e of [
|
|
3277
3278
|
...fe,
|
|
3278
3279
|
...V,
|
|
3279
|
-
...t.surfaceWireframe === !0 &&
|
|
3280
|
+
...t.surfaceWireframe === !0 && De ? [xe.paint] : [],
|
|
3280
3281
|
...t.surfaceWireframe === !0 ? Se.filter((e) => e !== void 0) : [],
|
|
3281
|
-
...
|
|
3282
|
+
...ke.flatMap((e) => [e.fill, e.line])
|
|
3282
3283
|
]) {
|
|
3283
3284
|
if (e == null) continue;
|
|
3284
|
-
let t =
|
|
3285
|
+
let t = oe(e);
|
|
3285
3286
|
if (e.fillType === "gradient" && t > ea || t > ta - Ae) return;
|
|
3286
3287
|
Ae += t;
|
|
3287
3288
|
}
|
|
3288
3289
|
let je = Array.from({ length: ne }, (e, t) => {
|
|
3289
3290
|
let n = M + t * j, r = Math.min(N, n + j);
|
|
3290
|
-
return `${
|
|
3291
|
-
}),
|
|
3291
|
+
return `${pe(n)}-${pe(r)}`;
|
|
3292
|
+
}), Ne = {
|
|
3292
3293
|
...t,
|
|
3293
3294
|
series: je.map((e, t) => ({
|
|
3294
3295
|
name: e,
|
|
3295
|
-
color:
|
|
3296
|
+
color: ce[t].replace(/^#/, ""),
|
|
3296
3297
|
values: []
|
|
3297
3298
|
}))
|
|
3298
3299
|
};
|
|
3299
|
-
Math.abs(w.rotationX) === 90 &&
|
|
3300
|
-
let
|
|
3300
|
+
Math.abs(w.rotationX) === 90 && Ne.series.reverse();
|
|
3301
|
+
let Pe = mn(e, Ne, u, p, .22, a), { legRightW: Ie, legLeftW: U, legTopH: Re, legBottomH: ze } = v(Pe, t.legendOverlay === !0), Be = ur(e, t, u, p, a), Ve = Jn(t.catAxisFontSizeHpt, p, a), W = t.threeD?.seriesAxis, He = i(W?.fontSizeHpt, a) ?? Ve, { px0: Ue, py0: We, pw: G, ph: Ge } = f(t, c, l, u, p, a, {
|
|
3301
3302
|
titleBand: Be,
|
|
3302
3303
|
legendSideReserveFrac: .22,
|
|
3303
|
-
legendReserve:
|
|
3304
|
+
legendReserve: Pe,
|
|
3304
3305
|
pad: {
|
|
3305
|
-
t: Be.bandH +
|
|
3306
|
-
r:
|
|
3307
|
-
b: x(Ve, t.catAxisLabelOffsetPercent) +
|
|
3306
|
+
t: Be.bandH + Re + He / 2,
|
|
3307
|
+
r: Ie + He * 3.2 + 12,
|
|
3308
|
+
b: x(Ve, t.catAxisLabelOffsetPercent) + ze,
|
|
3308
3309
|
l: U + Ve * 1.5
|
|
3309
3310
|
},
|
|
3310
3311
|
honorPlotAreaManualLayout: !0
|
|
3311
3312
|
}).plotRect;
|
|
3312
|
-
if (!(
|
|
3313
|
-
fr(e, t, t.titleManualLayout || !t.titleRichRuns?.length ? c :
|
|
3313
|
+
if (!(G > 0) || !(Ge > 0)) return;
|
|
3314
|
+
fr(e, t, t.titleManualLayout || !t.titleRichRuns?.length ? c : Ue, l, t.titleManualLayout || !t.titleRichRuns?.length ? u : G, p, l + Be.topPad, Be.fontPx), Me(e, t, Ue, We, G, Ge, a, o);
|
|
3314
3315
|
let K = Ze(w, {
|
|
3315
|
-
x:
|
|
3316
|
-
y:
|
|
3317
|
-
w:
|
|
3318
|
-
h:
|
|
3316
|
+
x: Ue,
|
|
3317
|
+
y: We,
|
|
3318
|
+
w: G,
|
|
3319
|
+
h: Ge
|
|
3319
3320
|
}, {
|
|
3320
3321
|
sceneDepthScale: Zr,
|
|
3321
3322
|
perspectiveTangentGain: E
|
|
3322
3323
|
});
|
|
3323
3324
|
if (!K) return;
|
|
3324
3325
|
K = tt(K, t.threeD ?? {}, {
|
|
3325
|
-
x:
|
|
3326
|
-
y:
|
|
3327
|
-
w:
|
|
3328
|
-
h:
|
|
3326
|
+
x: Ue,
|
|
3327
|
+
y: We,
|
|
3328
|
+
w: G,
|
|
3329
|
+
h: Ge
|
|
3329
3330
|
});
|
|
3330
|
-
let q = T || Math.abs(w.rotationX) === 90 && w.rotationY === 0 && w.rightAngleAxes === !1 && w.perspective === 0, { front: J } = K, Xe = t.catAxisOrientation === "maxMin", et =
|
|
3331
|
+
let q = T || Math.abs(w.rotationX) === 90 && w.rotationY === 0 && w.rightAngleAxes === !1 && w.perspective === 0, { front: J } = K, Xe = t.catAxisOrientation === "maxMin", et = se(t), at = (e) => J.x + P(e, _, et, Xe) * J.w, ot = W?.orientation === "maxMin", st = (e) => P(e, y, !1, ot), ct = (e) => J.y + J.h - re(e) * J.h, lt = [], ut = [], dt = (e, t) => {
|
|
3331
3332
|
let n = (n) => ({
|
|
3332
3333
|
x: e.x + (t.x - e.x) * n,
|
|
3333
3334
|
y: e.y + (t.y - e.y) * n,
|
|
@@ -3382,13 +3383,13 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3382
3383
|
});
|
|
3383
3384
|
}
|
|
3384
3385
|
};
|
|
3385
|
-
e.save(), e.beginPath(), e.rect(
|
|
3386
|
+
e.save(), e.beginPath(), e.rect(Ue, We, G, Ge), e.clip();
|
|
3386
3387
|
let mt = (t, n, r, i, a = !1) => {
|
|
3387
3388
|
if (t.length < 2) return;
|
|
3388
3389
|
let o = a ? t.map((e) => K.projectUnbounded(e.x, e.y, e.depth)) : t.map((e) => K.project(e.x, e.y, e.depth));
|
|
3389
3390
|
e.beginPath(), e.moveTo(o[0].x, o[0].y);
|
|
3390
3391
|
for (let t = 1; t < o.length; t++) e.lineTo(o[t].x, o[t].y);
|
|
3391
|
-
e.strokeStyle = n, e.lineWidth = r, e.setLineDash(
|
|
3392
|
+
e.strokeStyle = n, e.lineWidth = r, e.setLineDash(Le(i ?? "solid", r)), e.stroke();
|
|
3392
3393
|
}, ht = K.topology.farDepth, gt = K.topology.nearDepth, _t = J.y + J.h, vt = J.y, yt = K.topology.farX === "min" ? J.x : J.x + J.w, bt = [
|
|
3393
3394
|
"floor",
|
|
3394
3395
|
"sideWall",
|
|
@@ -3433,7 +3434,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3433
3434
|
for (let n = 0; n < Tt.length; n++) {
|
|
3434
3435
|
let r = Tt[n];
|
|
3435
3436
|
if (!r.length) continue;
|
|
3436
|
-
let i = r.flat(), o =
|
|
3437
|
+
let i = r.flat(), o = ke[n], c = o.fill?.fillType === "image" ? o.fill : null;
|
|
3437
3438
|
if (c) {
|
|
3438
3439
|
let r = s(c), i = t.threeD?.[xt[n]];
|
|
3439
3440
|
r && Qe(e, c, r, i, xt[n], bt[n], bt[n].faces.map((e, t) => ({
|
|
@@ -3441,11 +3442,11 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3441
3442
|
faceIndex: t
|
|
3442
3443
|
})).filter(({ face: e }) => bt[n].thickness === 0 || K.cameraFacing(e)).map(({ faceIndex: e }) => e), (e) => K.projectUnbounded(e.x, e.y, e.depth), F);
|
|
3443
3444
|
}
|
|
3444
|
-
let l = Math.min(...i.map((e) => e.x)), u = Math.max(...i.map((e) => e.x)), d = Math.min(...i.map((e) => e.y)), f = Math.max(...i.map((e) => e.y)), p = c ? null : o.fill?.fillType === "solid" ? `#${o.fill.color}` : o.fill ?
|
|
3445
|
+
let l = Math.min(...i.map((e) => e.x)), u = Math.max(...i.map((e) => e.x)), d = Math.min(...i.map((e) => e.y)), f = Math.max(...i.map((e) => e.y)), p = c ? null : o.fill?.fillType === "solid" ? `#${o.fill.color}` : o.fill ? Fe(o.fill, e, l, d, u - l, f - d) : null, m = o.line?.fillType === "solid" ? `#${o.line.color}` : o.line ? Fe(o.line, e, l, d, u - l, f - d) : null, h = o.lineWidthEmu == null ? 1 : H(o.lineWidthEmu, a);
|
|
3445
3446
|
for (let t of r) {
|
|
3446
3447
|
e.beginPath(), e.moveTo(t[0].x, t[0].y);
|
|
3447
3448
|
for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
|
|
3448
|
-
e.closePath(), p && (e.fillStyle = p, e.fill()), m && (e.strokeStyle = m, e.lineWidth = h, e.setLineDash(
|
|
3449
|
+
e.closePath(), p && (e.fillStyle = p, e.fill()), m && (e.strokeStyle = m, e.lineWidth = h, e.setLineDash(ie(o.lineCustomDash, o.lineDash, h)), e.lineCap = o.lineCap === "rnd" ? "round" : o.lineCap === "sq" ? "square" : "butt", e.lineJoin = o.lineJoin === "round" || o.lineJoin === "bevel" ? o.lineJoin : "miter", e.stroke());
|
|
3449
3450
|
}
|
|
3450
3451
|
}
|
|
3451
3452
|
if (t.valAxisMinorGridlines === !0) {
|
|
@@ -3453,9 +3454,9 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3453
3454
|
Ct(A.minorLines.filter((e) => e >= M && e <= N), e.color, e.width, t.valAxisMinorGridlineDash);
|
|
3454
3455
|
}
|
|
3455
3456
|
if (Pn(t)) {
|
|
3456
|
-
let e =
|
|
3457
|
-
if (t.valAxisMajorGridlines === !0) Ct(
|
|
3458
|
-
else for (let n of
|
|
3457
|
+
let e = Ee(t.valAxisGridlineColor, t.valAxisGridlineWidthEmu, a);
|
|
3458
|
+
if (t.valAxisMajorGridlines === !0) Ct(z, e.color, e.width, t.valAxisGridlineDash);
|
|
3459
|
+
else for (let n of z) {
|
|
3459
3460
|
let r = re(n), i = ct(n);
|
|
3460
3461
|
bt[2].thickness > 0 ? St(2, "y", r, e.color, e.width, t.valAxisGridlineDash) : mt([{
|
|
3461
3462
|
x: J.x,
|
|
@@ -3481,7 +3482,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3481
3482
|
wt(ee(_, et), e.color, e.width, t.catAxisMinorGridlineDash);
|
|
3482
3483
|
}
|
|
3483
3484
|
if (t.catAxisMajorGridlines) {
|
|
3484
|
-
let e =
|
|
3485
|
+
let e = Ee(t.catAxisGridlineColor, t.catAxisGridlineWidthEmu, a);
|
|
3485
3486
|
wt(jn(t, _), e.color, e.width, t.catAxisGridlineDash);
|
|
3486
3487
|
}
|
|
3487
3488
|
for (let e = 0; e < y - 1; e++) for (let t = 0; t < _ - 1; t++) {
|
|
@@ -3569,7 +3570,7 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3569
3570
|
if (t == null) return t;
|
|
3570
3571
|
if (t.fillType === "solid") return `#${t.color}`;
|
|
3571
3572
|
let r = Et[n];
|
|
3572
|
-
return !Number.isFinite(r.minX) || !Number.isFinite(r.minY) || !Number.isFinite(r.maxX) || !Number.isFinite(r.maxY) ? null :
|
|
3573
|
+
return !Number.isFinite(r.minX) || !Number.isFinite(r.minY) || !Number.isFinite(r.maxX) || !Number.isFinite(r.maxY) ? null : Fe(t, e, r.minX, r.minY, r.maxX - r.minX, r.maxY - r.minY);
|
|
3573
3574
|
}, Ot = fe.map(Dt), kt = V.map(Dt);
|
|
3574
3575
|
for (let t of lt) {
|
|
3575
3576
|
let n = le.get(t.band);
|
|
@@ -3577,23 +3578,23 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3577
3578
|
for (let n = 1; n < t.points.length; n++) e.lineTo(t.points[n].x, t.points[n].y);
|
|
3578
3579
|
e.closePath();
|
|
3579
3580
|
let r = Ot[t.band];
|
|
3580
|
-
r !== null && (e.fillStyle = r ?? Je(
|
|
3581
|
+
r !== null && (e.fillStyle = r ?? Je(ce[t.band], q ? Ye(K.cameraNormal(t.scenePoints)) : 1), e.fill());
|
|
3581
3582
|
let i = kt[t.band];
|
|
3582
3583
|
if (i != null) {
|
|
3583
3584
|
let t = n?.style, r = B?.lineNoStyle === !0 ? void 0 : B;
|
|
3584
3585
|
e.strokeStyle = i;
|
|
3585
3586
|
let o = n?.lineWidthEmu ?? t?.lineWidthEmu ?? r?.lineWidthEmu;
|
|
3586
|
-
e.lineWidth = o == null ? 1 : H(o, a), e.setLineDash(
|
|
3587
|
+
e.lineWidth = o == null ? 1 : H(o, a), e.setLineDash(ie(t?.lineCustomDash ?? r?.lineCustomDash, t?.lineDash ?? r?.lineDash, e.lineWidth));
|
|
3587
3588
|
let s = t?.lineCap ?? r?.lineCap, c = t?.lineJoin ?? r?.lineJoin;
|
|
3588
3589
|
e.lineCap = s === "rnd" ? "round" : s === "sq" ? "square" : "butt", e.lineJoin = c === "round" || c === "bevel" ? c : "miter", e.stroke();
|
|
3589
3590
|
}
|
|
3590
3591
|
}
|
|
3591
3592
|
if (t.surfaceWireframe === !0) {
|
|
3592
|
-
let t =
|
|
3593
|
+
let t = De ? xe.paint?.fillType === "solid" ? `#${xe.paint.color}` : xe.paint ? Fe(xe.paint, e, Ue, We, G, Ge) : xe.paint : void 0, n = Se.map((e, n) => e === void 0 ? t : Dt(e, n));
|
|
3593
3594
|
for (let t of ut) {
|
|
3594
3595
|
let r = Ce[t.band], i = n[t.band];
|
|
3595
3596
|
if (i === null) continue;
|
|
3596
|
-
e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y), e.lineTo(t.points[1].x, t.points[1].y), e.strokeStyle = i ??
|
|
3597
|
+
e.beginPath(), e.moveTo(t.points[0].x, t.points[0].y), e.lineTo(t.points[1].x, t.points[1].y), e.strokeStyle = i ?? ce[t.band], e.lineWidth = r.lineWidthEmu == null ? Math.max(1, .75 * a) : H(r.lineWidthEmu, a), e.setLineDash(ie(r.lineCustomDash, r.lineDash, e.lineWidth));
|
|
3597
3598
|
let o = r.lineCap, s = r.lineJoin;
|
|
3598
3599
|
e.lineCap = o === "rnd" ? "round" : o === "sq" ? "square" : "butt", e.lineJoin = s === "round" || s === "bevel" ? s : "miter", e.stroke();
|
|
3599
3600
|
}
|
|
@@ -3617,16 +3618,16 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3617
3618
|
}
|
|
3618
3619
|
e.font = Pt(Ve, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1), e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#000000", e.textBaseline = "top";
|
|
3619
3620
|
for (let n = 0; n < _; n++) {
|
|
3620
|
-
let r =
|
|
3621
|
+
let r = Oe(n, _, se(t), Nn(t), t.catAxisLabelAlignment), i = K.project(J.x + r.fraction * J.w, _t, gt);
|
|
3621
3622
|
e.textAlign = r.textAlign, e.fillText(m[n] ?? "", i.x, i.y + h(8, t.catAxisLabelOffsetPercent));
|
|
3622
3623
|
}
|
|
3623
|
-
if (!
|
|
3624
|
-
let n =
|
|
3625
|
-
bn(e, s.x, s.y, c.x, c.y,
|
|
3626
|
-
let l =
|
|
3627
|
-
for (let e = 0; e < y; e += u) Mt(
|
|
3628
|
-
if (
|
|
3629
|
-
e.font = Pt(
|
|
3624
|
+
if (!W?.hidden) {
|
|
3625
|
+
let n = W?.lineWidthEmu == null ? 1 : H(W.lineWidthEmu, a), r = K.project(J.x, _t, .5), i = K.project(J.x + J.w, _t, .5), o = r.x >= i.x ? J.x : J.x + J.w, s = K.project(o, _t, gt), c = K.project(o, _t, ht);
|
|
3626
|
+
bn(e, s.x, s.y, c.x, c.y, W?.lineColor ? `#${W.lineColor}` : "#000000", n, W?.lineDash);
|
|
3627
|
+
let l = W?.lineColor ? `#${W.lineColor}` : "#000000", u = Math.max(1, Math.floor(W?.tickMarkSkip ?? 1));
|
|
3628
|
+
for (let e = 0; e < y; e += u) Mt(W?.majorTickMark, K.project(o, _t, st(e)), s, c, l, n, W?.lineHidden === !0, "major", W?.lineDash);
|
|
3629
|
+
if (W?.minorTickMark != null && W.minorTickMark !== "none") for (let e = 0; e < y - 1; e++) Mt(W.minorTickMark, K.project(o, _t, (st(e) + st(e + 1)) / 2), s, c, l, n, W.lineHidden === !0, "minor", W.lineDash);
|
|
3630
|
+
e.font = Pt(He, Y(t, W?.fontFace, "minor"), W?.fontBold ?? !1, W?.fontItalic ?? !1), e.fillStyle = W?.fontColor ? `#${W.fontColor}` : "#000000", e.textAlign = "left", e.textBaseline = "middle";
|
|
3630
3631
|
for (let t = 0; t < y; t++) {
|
|
3631
3632
|
let n = K.project(o, _t, st(t));
|
|
3632
3633
|
e.fillText(g[t].name, n.x + 8, n.y);
|
|
@@ -3637,15 +3638,15 @@ function $r(e, t, n, a, o = 0) {
|
|
|
3637
3638
|
if (Math.hypot(i.x - r.x, i.y - r.y) > 4) {
|
|
3638
3639
|
let o = t.valAxisLineWidthEmu == null ? 1 : H(t.valAxisLineWidthEmu, a);
|
|
3639
3640
|
bn(e, r.x, r.y, i.x, i.y, t.valAxisLineColor ? `#${t.valAxisLineColor}` : "#000000", o, t.valAxisLineDash), e.font = Pt(Jn(t.valAxisFontSizeHpt, p, a), Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1), e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#000000";
|
|
3640
|
-
let s = (r.x + i.x) / 2 <
|
|
3641
|
+
let s = (r.x + i.x) / 2 < Ue + G / 2;
|
|
3641
3642
|
e.textAlign = s ? "right" : "left", e.textBaseline = "middle";
|
|
3642
|
-
for (let r of
|
|
3643
|
+
for (let r of z) {
|
|
3643
3644
|
let i = K.project(n, ct(r), gt);
|
|
3644
3645
|
e.fillText(R(r, t.valAxisFormatCode, t.date1904), i.x + (s ? -6 : 6), i.y);
|
|
3645
3646
|
}
|
|
3646
3647
|
}
|
|
3647
3648
|
}
|
|
3648
|
-
_n(e,
|
|
3649
|
+
_n(e, Ne, Pe, c, l, u, p, Ue, We, G, Ge, Be.bandH + 2, a);
|
|
3649
3650
|
}
|
|
3650
3651
|
function ei(e, t, n, r, a = 0) {
|
|
3651
3652
|
let { x: o, y: s, w: l, h: d } = n, m = pr(t), g = m.length;
|
|
@@ -3694,18 +3695,18 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3694
3695
|
}
|
|
3695
3696
|
}
|
|
3696
3697
|
}
|
|
3697
|
-
let ee = P.filter((e) => e.valueAxis !== "secondary"), I = ee.length > 0 && ee.every((e) => e.grouping === "percentStacked"), L = new Map(y.map((e, t) => [e.series, t])), te = new Map(t.series.map((e, t) => [e, t])), ne = (e) => C[te.get(e) ?? -1]?.valueAxis === "secondary" || t.plotGroups == null && e.useSecondaryAxis === !0, R = P.filter((e) => e.valueAxis === "secondary"),
|
|
3698
|
+
let ee = P.filter((e) => e.valueAxis !== "secondary"), I = ee.length > 0 && ee.every((e) => e.grouping === "percentStacked"), L = new Map(y.map((e, t) => [e.series, t])), te = new Map(t.series.map((e, t) => [e, t])), ne = (e) => C[te.get(e) ?? -1]?.valueAxis === "secondary" || t.plotGroups == null && e.useSecondaryAxis === !0, R = P.filter((e) => e.valueAxis === "secondary"), ie = R.length > 0 && R.every((e) => e.grouping === "percentStacked"), z = t.secondaryValAxis && t.series.some((e) => ne(e)) ? t.secondaryValAxis : null, ae = (e) => z != null && ne(e), oe = ur(e, t, l, d, r), le = oe.fontPx, B = oe.topPad, fe = oe.bandH, V = Jn(t.catAxisFontSizeHpt, d, r), pe = Jn(t.valAxisFontSizeHpt, d, r), he = mn(e, t, l, d, .22, r), { legRightW: ge, legLeftW: ve, legTopH: ye, legBottomH: be } = v(he, t.legendOverlay === !0), xe = p(t, l, d, r), Se = xe.catFontPx, Ce = xe.valFontPx, we = xe.catBandH, Ee = xe.valBandW, De = Vt(t), Ae = Ut(t, r), Ne = Wt(e, t, r), Pe = fe + ye + pe / 2 + 2, Fe = (De ? Ae : x(V, t.catAxisLabelOffsetPercent)) + we + be, Ie = d - Pe - Fe, U = rr(z, t.series, Ie / r, "y", ie, !1, (e) => ne(e), (e, t) => {
|
|
3698
3699
|
let n = L.get(e);
|
|
3699
3700
|
return n == null ? e.values[t] ?? null : e.values[t] == null ? null : N[n][t] ?? null;
|
|
3700
3701
|
}), Le = Math.max(8, Math.min(11, d / 20)), Re = i(z?.fontSizeHpt, r) ?? Le, ze = 0;
|
|
3701
|
-
if (z &&
|
|
3702
|
+
if (z && U && !z.hidden) {
|
|
3702
3703
|
let n = e.font;
|
|
3703
3704
|
e.font = `${Re}px ${Y(t, z.fontFace, "minor")}`;
|
|
3704
3705
|
let r = 0;
|
|
3705
|
-
for (let n of
|
|
3706
|
+
for (let n of U.majorLines) r = Math.max(r, e.measureText(Rn(n, z.formatCode ?? null, t.date1904, z.displayUnits)).width);
|
|
3706
3707
|
ze = r + 18, e.font = n;
|
|
3707
3708
|
}
|
|
3708
|
-
let Be = z && z.title ?
|
|
3709
|
+
let Be = z && z.title ? _e(z.titleFontSizeHpt, r) + 8 : 0, W = (() => {
|
|
3709
3710
|
let e = Infinity, t = -Infinity;
|
|
3710
3711
|
for (let n = 0; n < g; n++) {
|
|
3711
3712
|
for (let r = 0; r < y.length; r++) {
|
|
@@ -3731,9 +3732,9 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3731
3732
|
})();
|
|
3732
3733
|
if (!I) {
|
|
3733
3734
|
let e = (e) => {
|
|
3734
|
-
|
|
3735
|
-
min: Math.min(
|
|
3736
|
-
max: Math.max(
|
|
3735
|
+
W = {
|
|
3736
|
+
min: Math.min(W.min, e),
|
|
3737
|
+
max: Math.max(W.max, e)
|
|
3737
3738
|
};
|
|
3738
3739
|
};
|
|
3739
3740
|
for (let t = 0; t < y.length; t++) {
|
|
@@ -3742,53 +3743,53 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3742
3743
|
}
|
|
3743
3744
|
for (let { series: t } of S) ae(t) || nr(t, "y", (e) => t.values[e] ?? null, e);
|
|
3744
3745
|
}
|
|
3745
|
-
let He = Vn(t,
|
|
3746
|
+
let He = Vn(t, W.min, W.max, Ie / r, I), Ue = t.valAxisFontSizeHpt == null ? Math.max(8, Math.min(11, Ie / 20)) : pe, We = 0;
|
|
3746
3747
|
if (!t.valAxisHidden && t.plotAreaManualLayout != null && t.plotAreaManualLayout.layoutTarget !== "inner") {
|
|
3747
3748
|
let n = e.font;
|
|
3748
|
-
e.font = Pt(
|
|
3749
|
-
for (let n of He.majorLines)
|
|
3749
|
+
e.font = Pt(Ue, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1);
|
|
3750
|
+
for (let n of He.majorLines) We = Math.max(We, e.measureText(In(t, n, I)).width);
|
|
3750
3751
|
e.font = n;
|
|
3751
3752
|
}
|
|
3752
|
-
let
|
|
3753
|
+
let G = Ve({
|
|
3753
3754
|
valAxisHidden: t.valAxisHidden,
|
|
3754
3755
|
catAxisHidden: t.catAxisHidden,
|
|
3755
|
-
valLabelWidth:
|
|
3756
|
-
valLabelFontPx:
|
|
3756
|
+
valLabelWidth: We,
|
|
3757
|
+
valLabelFontPx: Ue,
|
|
3757
3758
|
catLabelFontPx: V,
|
|
3758
|
-
valLabelGapPx: t.valAxisFontSizeHpt == null ? 6 : u(
|
|
3759
|
+
valLabelGapPx: t.valAxisFontSizeHpt == null ? 6 : u(Ue),
|
|
3759
3760
|
catLabelGapPx: t.catAxisFontSizeHpt == null ? h(3, t.catAxisLabelOffsetPercent) : h(c(V), t.catAxisLabelOffsetPercent),
|
|
3760
3761
|
outerTextMarginPx: b * r,
|
|
3761
|
-
valTitleBandW:
|
|
3762
|
+
valTitleBandW: Ee,
|
|
3762
3763
|
catTitleBandH: we,
|
|
3763
3764
|
secondaryBandW: ze + Be
|
|
3764
|
-
}),
|
|
3765
|
-
t:
|
|
3765
|
+
}), Ge = {
|
|
3766
|
+
t: Pe,
|
|
3766
3767
|
r: ge + l * .05 + ze + Be,
|
|
3767
3768
|
b: Fe,
|
|
3768
|
-
l:
|
|
3769
|
+
l: ve + Math.max(l * .12 + Ee, Ne)
|
|
3769
3770
|
};
|
|
3770
|
-
fr(e, t, o, s, l, d, s + B,
|
|
3771
|
+
fr(e, t, o, s, l, d, s + B, le);
|
|
3771
3772
|
let K = f(t, o, s, l, d, r, {
|
|
3772
3773
|
titleBand: oe,
|
|
3773
3774
|
legendSideReserveFrac: .22,
|
|
3774
|
-
legendReserve:
|
|
3775
|
-
pad:
|
|
3775
|
+
legendReserve: he,
|
|
3776
|
+
pad: Ge,
|
|
3776
3777
|
honorPlotAreaManualLayout: !0,
|
|
3777
|
-
manualOuterInsets:
|
|
3778
|
+
manualOuterInsets: G
|
|
3778
3779
|
}), { px0: q, py0: Ke, pw: qe } = K.plotRect, { ph: Je } = K.plotRect;
|
|
3779
3780
|
if (qe <= 0 || Je <= 0) return;
|
|
3780
3781
|
let Ye = De ? Gt(e, t, qe / g, r) : null;
|
|
3781
|
-
Ye && Ye.totalHeight >
|
|
3782
|
-
let J = Vn(t,
|
|
3782
|
+
Ye && Ye.totalHeight > Ae && (Je = Math.max(1, Je - (Ye.totalHeight - Ae))), Me(e, t, q, Ke, qe, Je, r, a);
|
|
3783
|
+
let J = Vn(t, W.min, W.max, Je / r, I), Xe = se(t), Ze = Nn(t), Qe = tr(t, m), $e = Qe ? (e) => q + Qe.positions[e] * qe : Xe ? (e) => q + ((Ze ? g - 1 - e : e) + .5) / g * qe : (e) => {
|
|
3783
3784
|
let t = Ze ? g - 1 - e : e;
|
|
3784
3785
|
return q + (g === 1 ? qe / 2 : t / (g - 1) * qe);
|
|
3785
|
-
}, et = (e) => Ke + Je - J.frac(e) * Je, tt =
|
|
3786
|
+
}, et = (e) => Ke + Je - J.frac(e) * Je, tt = U ? U.makeToY(Ke, Je) : et, nt = (e) => ae(e) ? tt : et, rt = et(Kr(t, J.min, J.max)), it = z && U ? tt(Gr(t.secondaryCatAxis?.crossesAt, t.secondaryCatAxis?.crosses, U.min, U.max)) : rt, at = (e) => ae(e) ? it : rt, { color: ot, width: st } = ue(t.catAxisLineColor, t.catAxisLineWidthEmu, r), { color: ct, width: lt } = ue(t.valAxisLineColor, t.valAxisLineWidthEmu, r);
|
|
3786
3787
|
if (!t.valAxisHidden) {
|
|
3787
3788
|
let n = wn(t, r), i = Tn(t, r);
|
|
3788
3789
|
if (t.valAxisMinorGridlines) for (let t of J.minorLines) Cn(e, q, qe, et(t), !1, i);
|
|
3789
3790
|
if (Pn(t)) for (let t of J.majorLines) Cn(e, q, qe, et(t), t === 0, n);
|
|
3790
3791
|
}
|
|
3791
|
-
if (z &&
|
|
3792
|
+
if (z && U && ir(e, z, U, tt, q, qe, r), !t.catAxisHidden && On(t)) {
|
|
3792
3793
|
let n = kn(t, r);
|
|
3793
3794
|
e.strokeStyle = n.color, e.lineWidth = n.width;
|
|
3794
3795
|
let i = n.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
@@ -3847,15 +3848,15 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3847
3848
|
for (let i = 0; i < y.length; i++) {
|
|
3848
3849
|
let { series: c, chartIndex: u } = y[i], f = jt(c.dataPointOverrides), p = At(u, c), h = nt(c), v = (e) => dt(i, e), b = A[i];
|
|
3849
3850
|
for (let n of c.errBars ?? []) Pi(e, c, Cr(t, n), g, $e, h, v, p);
|
|
3850
|
-
let x = (c.showMarker === !0 ||
|
|
3851
|
-
if (x ||
|
|
3851
|
+
let x = (c.showMarker === !0 || de(c)) && c.markerSymbol !== "none";
|
|
3852
|
+
if (x || re(c)) for (let t = 0; t < g; t++) {
|
|
3852
3853
|
if (c.values[t] == null) continue;
|
|
3853
|
-
let i = f.get(t), o =
|
|
3854
|
+
let i = f.get(t), o = me(c, i, "circle", x);
|
|
3854
3855
|
if (o === "none") continue;
|
|
3855
3856
|
let s = $e(t), l = h(v(t));
|
|
3856
|
-
if (
|
|
3857
|
-
let n = i?.markerSize ?? c.markerSize ?? 5, u =
|
|
3858
|
-
Si(e, s, l, o, n, u, d, r, f == null ? void 0 : H(f, r),
|
|
3857
|
+
if (de(c) || ce(i)) {
|
|
3858
|
+
let n = i?.markerSize ?? c.markerSize ?? 5, u = Te(c, i, t, p), d = i?.markerLine ?? c.markerLine ?? null, f = i?.markerLineWidthEmu ?? c.markerLineWidthEmu;
|
|
3859
|
+
Si(e, s, l, o, n, u, d, r, f == null ? void 0 : H(f, r), je(c, i, t), a);
|
|
3859
3860
|
} else e.fillStyle = p, e.beginPath(), e.arc(s, l, n, 0, Math.PI * 2), e.fill();
|
|
3860
3861
|
}
|
|
3861
3862
|
Ii(e, c, m, g, $e, h, v, Je, r, t.date1904 ?? !1, !0, Y(t, t.dataLabelFontFace, "minor"), t.dataLabelPosition ?? "ctr", {
|
|
@@ -3868,7 +3869,7 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3868
3869
|
y: s,
|
|
3869
3870
|
w: l,
|
|
3870
3871
|
h: d
|
|
3871
|
-
}, k[i] && b ? (e) => (c.values[e] ?? 0) / b[e] : void 0, void 0, (e) => Y(t, e, "minor"), ae(c) ? z?.displayUnits : t.valAxisDisplayUnits, (e) => _(u, e), (e) => hr(t, e, ae(c) &&
|
|
3872
|
+
}, k[i] && b ? (e) => (c.values[e] ?? 0) / b[e] : void 0, void 0, (e) => Y(t, e, "minor"), ae(c) ? z?.displayUnits : t.valAxisDisplayUnits, (e) => _(u, e), (e) => hr(t, e, ae(c) && U ? U.max : J.max), a);
|
|
3872
3873
|
}
|
|
3873
3874
|
}
|
|
3874
3875
|
for (let { series: i, chartIndex: c } of S) {
|
|
@@ -3889,12 +3890,12 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3889
3890
|
}
|
|
3890
3891
|
let v = (e) => i.values[e] ?? 0;
|
|
3891
3892
|
for (let n of i.errBars ?? []) Pi(e, i, Cr(t, n), g, $e, h, v, p);
|
|
3892
|
-
let y = (i.showMarker === !0 ||
|
|
3893
|
-
if (y ||
|
|
3893
|
+
let y = (i.showMarker === !0 || de(i)) && i.markerSymbol !== "none";
|
|
3894
|
+
if (y || re(i)) for (let t = 0; t < g; t++) {
|
|
3894
3895
|
let n = i.values[t];
|
|
3895
3896
|
if (n == null) continue;
|
|
3896
|
-
let o = u.get(t), s =
|
|
3897
|
-
s !== "none" && Si(e, $e(t), h(n), s, o?.markerSize ?? i.markerSize ?? 5,
|
|
3897
|
+
let o = u.get(t), s = me(i, o, "circle", y);
|
|
3898
|
+
s !== "none" && Si(e, $e(t), h(n), s, o?.markerSize ?? i.markerSize ?? 5, Te(i, o, t, p), o?.markerLine ?? i.markerLine ?? null, r, (o?.markerLineWidthEmu ?? i.markerLineWidthEmu) == null ? void 0 : H(o?.markerLineWidthEmu ?? i.markerLineWidthEmu, r), je(i, o, t), a);
|
|
3898
3899
|
}
|
|
3899
3900
|
Ii(e, i, m, g, $e, h, v, Je, r, t.date1904 ?? !1, !1, Y(t, t.dataLabelFontFace, "minor"), t.dataLabelPosition ?? "r", {
|
|
3900
3901
|
x: q,
|
|
@@ -3906,7 +3907,7 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3906
3907
|
y: s,
|
|
3907
3908
|
w: l,
|
|
3908
3909
|
h: d
|
|
3909
|
-
}, void 0, void 0, (e) => Y(t, e, "minor"), ae(i) ? z?.displayUnits : t.valAxisDisplayUnits, (e) => _(c, e), (e) => hr(t, e, ae(i) &&
|
|
3910
|
+
}, void 0, void 0, (e) => Y(t, e, "minor"), ae(i) ? z?.displayUnits : t.valAxisDisplayUnits, (e) => _(c, e), (e) => hr(t, e, ae(i) && U ? U.max : J.max), a), Gn(e, i, p, $e, h, r, void 0, {
|
|
3910
3911
|
chart: t,
|
|
3911
3912
|
chartRect: n,
|
|
3912
3913
|
plotRect: {
|
|
@@ -3940,13 +3941,13 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3940
3941
|
let n = t.catAxisFontSizeHpt == null ? Math.max(8, Math.min(11, qe / g * .8)) : V;
|
|
3941
3942
|
e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#555", e.textAlign = "center", e.textBaseline = "top", e.font = Pt(n, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
3942
3943
|
let r = Math.max(1, Math.floor(t.catAxisTickLabelSkip ?? 1)), i = Qe ? Qe.majorTicks.map((e) => ({
|
|
3943
|
-
label:
|
|
3944
|
+
label: ke(String(e.serial), t.catAxisFormatCode, t.date1904),
|
|
3944
3945
|
x: q + e.fraction * qe,
|
|
3945
3946
|
categoryIndex: -1
|
|
3946
3947
|
})) : Array.from({ length: Math.ceil(g / r) }, (e, n) => {
|
|
3947
3948
|
let i = n * r;
|
|
3948
3949
|
return {
|
|
3949
|
-
label:
|
|
3950
|
+
label: ke((m[i] ?? "").toString(), t.catAxisFormatCode, t.date1904),
|
|
3950
3951
|
x: $e(i),
|
|
3951
3952
|
categoryIndex: i
|
|
3952
3953
|
};
|
|
@@ -3954,17 +3955,17 @@ function ei(e, t, n, r, a = 0) {
|
|
|
3954
3955
|
for (let r of i) {
|
|
3955
3956
|
let i = r.label;
|
|
3956
3957
|
if (!i) continue;
|
|
3957
|
-
let a = r.categoryIndex < 0 ? null :
|
|
3958
|
+
let a = r.categoryIndex < 0 ? null : Oe(r.categoryIndex, g, se(t), Nn(t), t.catAxisLabelAlignment), o = h(t.catAxisFontSizeHpt == null ? 3 : c(n), t.catAxisLabelOffsetPercent);
|
|
3958
3959
|
e.textAlign = a?.textAlign ?? "center";
|
|
3959
3960
|
let s = t.catAxisTickLabelPos ?? "nextTo", l = s === "nextTo" ? rt : s === "high" ? Ke : Ke + Je;
|
|
3960
3961
|
e.fillText(i, a ? q + a.fraction * qe : r.x, l + o);
|
|
3961
3962
|
}
|
|
3962
3963
|
}
|
|
3963
|
-
if (z &&
|
|
3964
|
+
if (z && U) {
|
|
3964
3965
|
let i = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555";
|
|
3965
|
-
ar(e, t, z,
|
|
3966
|
+
ar(e, t, z, U, tt, n, q, Ke, qe, Je, r, Re, ze, i, t.date1904);
|
|
3966
3967
|
}
|
|
3967
|
-
Ye && Kt(e, t, Ye, q, Ke + Je, qe, o +
|
|
3968
|
+
Ye && Kt(e, t, Ye, q, Ke + Je, qe, o + ve, r), _n(e, t, he, o, s, l, d, q, Ke, qe, Je, fe + 2, r), Bt(e, t, o, s, l, d, q, Ke, qe, Je, ve, be, Se, Ce);
|
|
3968
3969
|
}
|
|
3969
3970
|
var ti = .88;
|
|
3970
3971
|
function ni(e, t, n, r, i = 0) {
|
|
@@ -4007,7 +4008,7 @@ function ni(e, t, n, r, i = 0) {
|
|
|
4007
4008
|
fr(e, t, n.x, n.y, n.w, n.h, n.y + d.title.topPad, d.title.fontPx);
|
|
4008
4009
|
let { px0: p, py0: m, pw: h, ph: g } = d.plotRect;
|
|
4009
4010
|
if (!(h > 0) || !(g > 0)) return;
|
|
4010
|
-
|
|
4011
|
+
Me(e, t, p, m, h, g, r, i);
|
|
4011
4012
|
let _ = t.ofPie, v = Math.max(.05, Math.min(2, (_?.secondPieSizePercent ?? 75) / 100)), y = Math.max(0, _?.gapWidthPercent ?? 150) / 100, b = Math.min(g * .44, h * .9 / (2 + 2 * v + y)), x = b * v;
|
|
4012
4013
|
if (!(b > 0) || !(x > 0)) return;
|
|
4013
4014
|
let S = p + (h - (2 * b + y * b + 2 * x)) / 2, C = S + b, w = S + 2 * b + y * b + x, T = m + g / 2, E = c.reduce((e, t) => e + t.value, 0), D = [...s, {
|
|
@@ -4066,7 +4067,7 @@ function ri(e, t, n, r, i, a = 0) {
|
|
|
4066
4067
|
}), v = _.title.fontPx, y = _.title.bandH;
|
|
4067
4068
|
fr(e, t, o, s, c, l, s + _.title.topPad, v);
|
|
4068
4069
|
let { px0: b, py0: x, pw: S, ph: C } = _.plotRect;
|
|
4069
|
-
|
|
4070
|
+
Me(e, t, b, x, S, C, i, a);
|
|
4070
4071
|
let w = _.center.cx, T = _.center.cy, E = Math.min(S, C) * .42, D = -Math.PI / 2 + (t.firstSliceAngle ?? 0) * Math.PI / 180, O = r ? Math.max(1, Math.min(90, t.holeSize ?? 50)) : 0, k = r ? t.series : [u], A = new Map(k.map((e) => [e, jt(e.dataPointOverrides)])), j = (E - O / 100 * E) / k.length, M = (e, t) => {
|
|
4071
4072
|
let n = A.get(e)?.get(t)?.explosion ?? e.explosion ?? 0;
|
|
4072
4073
|
return n > 0 ? n / 100 * E : 0;
|
|
@@ -4107,8 +4108,8 @@ function ii(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C)
|
|
|
4107
4108
|
}, m), D = /* @__PURE__ */ new Set();
|
|
4108
4109
|
for (let e = 0; e < o.length; e++) {
|
|
4109
4110
|
let t = w.get(e);
|
|
4110
|
-
if (
|
|
4111
|
-
let r =
|
|
4111
|
+
if (z(n, t)) continue;
|
|
4112
|
+
let r = We(t?.labelBox, n.labelBox);
|
|
4112
4113
|
r?.fillHidden !== !0 && (r?.fill != null || r?.fillPaint != null) && D.add(e);
|
|
4113
4114
|
}
|
|
4114
4115
|
D.size > 0 && li(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, _, g, v, y, b, x, S, D, w, C);
|
|
@@ -4117,7 +4118,7 @@ function ii(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C)
|
|
|
4117
4118
|
let A = o[f] / s * Math.PI * 2, j = k + A / 2;
|
|
4118
4119
|
if (k += A, D.has(f)) continue;
|
|
4119
4120
|
let M = w.get(f);
|
|
4120
|
-
if (
|
|
4121
|
+
if (z(n, M)) continue;
|
|
4121
4122
|
let N = M?.showCatName ?? n.showCatName, P = M?.showSerName ?? n.showSerName, F = M?.showVal ?? n.showVal, ee = M?.showPercent ?? n.showPercent, I = M?.showLegendKey ?? n.showLegendKey ?? !1, L = et({
|
|
4122
4123
|
customText: M?.text,
|
|
4123
4124
|
showCategory: N,
|
|
@@ -4134,9 +4135,9 @@ function ii(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C)
|
|
|
4134
4135
|
separator: M?.separator ?? n.separator
|
|
4135
4136
|
}), te = I ? E(0, f) : void 0;
|
|
4136
4137
|
if (!L && !te) continue;
|
|
4137
|
-
let ne = (M?.position ?? n.position ?? "bestFit") === "outEnd", R = i(M?.fontSizeHpt ?? n.fontSizeHpt, m) ?? Math.max(8, u * .1), re = M?.fontBold ?? n.fontBold, ie = M?.fontColor ?? n.fontColor,
|
|
4138
|
+
let ne = (M?.position ?? n.position ?? "bestFit") === "outEnd", R = i(M?.fontSizeHpt ?? n.fontSizeHpt, m) ?? Math.max(8, u * .1), re = M?.fontBold ?? n.fontBold, ie = M?.fontColor ?? n.fontColor, ae = M?.fontFace ?? n.fontFace ? Y(t, M?.fontFace ?? n.fontFace, "minor") : p, oe = Re(M, n), se = Ei(t, M, m, ae, re ?? !1, oe), ce = d > .01 ? (d + u) / 2 : u * ti;
|
|
4138
4139
|
if (M?.manualLayout) {
|
|
4139
|
-
e.font = `${oe.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${
|
|
4140
|
+
e.font = `${oe.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${ae}`, Oi(e, L, {
|
|
4140
4141
|
kind: "point",
|
|
4141
4142
|
x: c + Math.cos(j) * ce,
|
|
4142
4143
|
y: l + Math.sin(j) * ce,
|
|
@@ -4151,19 +4152,19 @@ function ii(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C)
|
|
|
4151
4152
|
y: b,
|
|
4152
4153
|
w: x,
|
|
4153
4154
|
h: S
|
|
4154
|
-
}, se, te, oe, m,
|
|
4155
|
+
}, se, te, oe, m, We(M?.labelBox, n.labelBox), C);
|
|
4155
4156
|
continue;
|
|
4156
4157
|
}
|
|
4157
4158
|
if (ne) {
|
|
4158
|
-
e.font = `${oe.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${
|
|
4159
|
+
e.font = `${oe.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${ae}`;
|
|
4159
4160
|
let t = se ? J(e, se, R, ie ? `#${ie}` : "#333") : null, n = R * 1.15, r = t ? [] : T(L, Math.max(0, x - R), Math.max(0, S - R), n, (t) => e.measureText(t).width, oe);
|
|
4160
4161
|
if (se && !t || !t && r.length === 0 && !te) continue;
|
|
4161
4162
|
let i = t?.width ?? r.reduce((t, n) => Math.max(t, e.measureText(n).width), 0), a = t?.height ?? R + Math.max(0, r.length - 1) * n, o = te ? dn([te.entry], R, m)[0] ?? 0 : 0, s = te ? fn(te.entry, R, m) : 0;
|
|
4162
|
-
O.push(si(r, j, c, l, u, Math.min(o + (L ? en : 0) + i, Math.max(0, x - R)), Math.min(Math.max(s, a), Math.max(0, S - R)), n, R, re ?? !1, ie ? `#${ie}` : "#333",
|
|
4163
|
+
O.push(si(r, j, c, l, u, Math.min(o + (L ? en : 0) + i, Math.max(0, x - R)), Math.min(Math.max(s, a), Math.max(0, S - R)), n, R, re ?? !1, ie ? `#${ie}` : "#333", ae, t ?? void 0, te, oe, m));
|
|
4163
4164
|
continue;
|
|
4164
4165
|
}
|
|
4165
4166
|
let le = ce, B = c + Math.cos(j) * le, ue = l + Math.sin(j) * le;
|
|
4166
|
-
e.font = `${oe.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${
|
|
4167
|
+
e.font = `${oe.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${ae}`;
|
|
4167
4168
|
let de = 2 * le * Math.sin(Math.min(Math.PI, Math.abs(A)) / 2) - R, fe = d > .01 ? u - d - R : u - R;
|
|
4168
4169
|
if (!(de > 0) || !(fe > 0)) continue;
|
|
4169
4170
|
let V = mr({
|
|
@@ -4187,7 +4188,7 @@ function ii(e, t, n, r, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C)
|
|
|
4187
4188
|
y: b,
|
|
4188
4189
|
w: x,
|
|
4189
4190
|
h: S
|
|
4190
|
-
}, se, te, oe, m,
|
|
4191
|
+
}, se, te, oe, m, We(M?.labelBox, n.labelBox), C);
|
|
4191
4192
|
}
|
|
4192
4193
|
ci(e, O, y, b, x, S);
|
|
4193
4194
|
}
|
|
@@ -4204,7 +4205,7 @@ function oi(e, t, n, r, i) {
|
|
|
4204
4205
|
return l;
|
|
4205
4206
|
}
|
|
4206
4207
|
function si(e, t, n, r, i, o, s, c, l, u, d, f, p, m, h = {}, g = 1) {
|
|
4207
|
-
let _ = a(o, s, h.textRotation, h.textVerticalMode), v =
|
|
4208
|
+
let _ = a(o, s, h.textRotation, h.textVerticalMode), v = ze(h, g), y = o + v.left + v.right, b = s + v.top + v.bottom, x = a(y, b, h.textRotation, h.textVerticalMode);
|
|
4208
4209
|
o = x.w, s = x.h;
|
|
4209
4210
|
let S = oi(t, i, _.w / 2, _.h / 2, l * .5), C = n + Math.cos(t) * S, w = r + Math.sin(t) * S;
|
|
4210
4211
|
return {
|
|
@@ -4230,7 +4231,7 @@ function ci(e, t, n, r, i, o) {
|
|
|
4230
4231
|
if (t.length !== 0) {
|
|
4231
4232
|
e.save(), e.beginPath(), e.rect(n, r, i, o), e.clip();
|
|
4232
4233
|
for (let n of t) {
|
|
4233
|
-
let t =
|
|
4234
|
+
let t = ze(n.textStyle, n.ptToPx), r = a(n.unrotatedW, n.unrotatedH, n.textStyle.textRotation, n.textStyle.textVerticalMode), i = n.cxBox + (t.left - t.right) / 2, o = n.cyBox + (t.top - t.bottom) / 2, s = Math.max(0, n.unrotatedW - t.left - t.right), c = Ie(n.textStyle, "center"), l = c === "left" ? n.cxBox - n.unrotatedW / 2 + t.left : c === "right" ? n.cxBox + n.unrotatedW / 2 - t.right : i;
|
|
4234
4235
|
if (e.save(), r.radians !== 0 && (e.translate(n.cxBox, n.cyBox), e.rotate(r.radians), e.translate(-n.cxBox, -n.cyBox)), !n.legendKey) {
|
|
4235
4236
|
if (n.rich) {
|
|
4236
4237
|
Xe(e, n.rich, l, o, c, "middle", s), e.restore();
|
|
@@ -4262,8 +4263,8 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4262
4263
|
let D = c[m] / l * Math.PI * 2, O = P + D / 2;
|
|
4263
4264
|
if (P += D, D <= 0 || !E.has(m)) continue;
|
|
4264
4265
|
let F = A(m);
|
|
4265
|
-
if (
|
|
4266
|
-
let ee = F?.showCatName ?? n.showCatName, I = F?.showSerName ?? n.showSerName, L = F?.showVal ?? n.showVal, te = F?.showPercent ?? n.showPercent, ne = F?.showLegendKey ?? n.showLegendKey ?? !1, R = i(F?.fontSizeHpt, g) ?? j, re = F?.fontBold ?? n.fontBold ?? !1, ie = F?.fontFace ?? n.fontFace ? Y(t, F?.fontFace ?? n.fontFace, "minor") : h,
|
|
4266
|
+
if (z(n, F)) continue;
|
|
4267
|
+
let ee = F?.showCatName ?? n.showCatName, I = F?.showSerName ?? n.showSerName, L = F?.showVal ?? n.showVal, te = F?.showPercent ?? n.showPercent, ne = F?.showLegendKey ?? n.showLegendKey ?? !1, R = i(F?.fontSizeHpt, g) ?? j, re = F?.fontBold ?? n.fontBold ?? !1, ie = F?.fontFace ?? n.fontFace ? Y(t, F?.fontFace ?? n.fontFace, "minor") : h, ae = F?.fontColor ? `#${F.fontColor}` : n.fontColor ? `#${n.fontColor}` : "#000", oe = We(F?.labelBox, M), se = F?.position ?? n.position ?? "bestFit", ce = et({
|
|
4267
4268
|
customText: F?.text,
|
|
4268
4269
|
showCategory: ee,
|
|
4269
4270
|
showSeries: I,
|
|
@@ -4280,9 +4281,9 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4280
4281
|
defaultSeparator: "\n"
|
|
4281
4282
|
}), le = ne ? k(0, m) : void 0;
|
|
4282
4283
|
if (!ce && !le) continue;
|
|
4283
|
-
let B =
|
|
4284
|
+
let B = Re(F, n), ue = Ei(t, F, g, ie, re, B), de = B.textBodyAuthored === !0 || B.textLInsEmu != null || B.textTInsEmu != null || B.textRInsEmu != null || B.textBInsEmu != null, fe = ze(B, g), V = de ? fe.left : Math.max(4, R * .45), pe = de ? fe.right : Math.max(4, R * .45), me = de ? fe.top : Math.max(2, R * .28), he = de ? fe.bottom : Math.max(2, R * .28), ge = R * .22, _e = R + ge;
|
|
4284
4285
|
e.font = `${B.fontItalic ? "italic " : ""}${re ? "bold " : ""}${R}px ${ie}`;
|
|
4285
|
-
let ve = ue ? J(e, ue, R,
|
|
4286
|
+
let ve = ue ? J(e, ue, R, ae) : null;
|
|
4286
4287
|
if (ue && !ve) continue;
|
|
4287
4288
|
let ye = ve ? [] : T(ce, Math.max(0, v - V - pe), Math.max(0, b - me - he), _e, (t) => e.measureText(t).width, B);
|
|
4288
4289
|
if (!ve && ye.length === 0 && !le) continue;
|
|
@@ -4290,12 +4291,12 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4290
4291
|
if (!ve) for (let t of ye) be = Math.max(be, e.measureText(t).width);
|
|
4291
4292
|
let xe = le ? dn([le.entry], R, g)[0] ?? 0 : 0, Se = le ? fn(le.entry, R, g) : 0, Ce = le && ce ? en : 0, we = xe + Ce + be + V + pe, Te = Math.max(Se, ve?.height ?? (ye.length > 0 ? ye.length * _e - ge : 0)) + me + he, Ee = a(we, Te, B.textRotation, B.textVerticalMode), De = Math.min(Ee.w, v), Oe = Math.max(Se, ve?.height ?? (ye.length > 0 ? ye.length * _e - ge : 0));
|
|
4292
4293
|
Oe = Math.min(Ee.h, b);
|
|
4293
|
-
let ke = u + Math.cos(O) * f, Ae = d + Math.sin(O) * f, je = Math.cos(O) < 0, Me = Math.max(De, Oe) * .55 + f * .06, Ne = ke + Math.cos(O) * Me,
|
|
4294
|
+
let ke = u + Math.cos(O) * f, Ae = d + Math.sin(O) * f, je = Math.cos(O) < 0, Me = Math.max(De, Oe) * .55 + f * .06, Ne = ke + Math.cos(O) * Me, H = Ae + Math.sin(O) * Me, Pe, Fe = !1;
|
|
4294
4295
|
if (F?.manualLayout) {
|
|
4295
4296
|
let t = o({
|
|
4296
4297
|
kind: "point",
|
|
4297
4298
|
x: Ne,
|
|
4298
|
-
y:
|
|
4299
|
+
y: H,
|
|
4299
4300
|
position: "ctr"
|
|
4300
4301
|
}, {
|
|
4301
4302
|
x: _,
|
|
@@ -4312,7 +4313,7 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4312
4313
|
h: w
|
|
4313
4314
|
});
|
|
4314
4315
|
if (!t || (De = t.rect.w, Oe = t.rect.h, we = De, Te = Oe, !ve && (ye = T(ce, Math.max(0, De - V - pe - xe - Ce), Math.max(0, Oe - me - he), _e, (t) => e.measureText(t).width, B), ye.length === 0 && !le))) continue;
|
|
4315
|
-
Ne = t.rect.x + t.rect.w / 2,
|
|
4316
|
+
Ne = t.rect.x + t.rect.w / 2, H = t.rect.y + t.rect.h / 2, je = Ne < u, Pe = t.clip;
|
|
4316
4317
|
} else if (se !== "bestFit" && se !== "outEnd") {
|
|
4317
4318
|
let t = p > .01 ? (p + f) / 2 : f * ti, n = u + Math.cos(O) * t, r = d + Math.sin(O) * t, i = 2 * t * Math.sin(Math.min(Math.PI, Math.abs(D)) / 2) - R, s = p > .01 ? f - p - R : f - R, c = mr({
|
|
4318
4319
|
x: n - i / 2,
|
|
@@ -4341,7 +4342,7 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4341
4342
|
h: Oe
|
|
4342
4343
|
}, R);
|
|
4343
4344
|
if (!l) continue;
|
|
4344
|
-
Ne = l.textAlign === "left" ? l.x + De / 2 : l.textAlign === "right" ? l.x - De / 2 : l.x,
|
|
4345
|
+
Ne = l.textAlign === "left" ? l.x + De / 2 : l.textAlign === "right" ? l.x - De / 2 : l.x, H = l.textBaseline === "top" ? l.y + Oe / 2 : l.textBaseline === "bottom" ? l.y - Oe / 2 : l.y, je = Ne < u, Pe = l.clip, Fe = !0;
|
|
4345
4346
|
}
|
|
4346
4347
|
N.push({
|
|
4347
4348
|
lines: ye,
|
|
@@ -4356,17 +4357,17 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4356
4357
|
unrotatedW: we,
|
|
4357
4358
|
unrotatedH: Te,
|
|
4358
4359
|
cxBox: Ne,
|
|
4359
|
-
cyBox:
|
|
4360
|
+
cyBox: H,
|
|
4360
4361
|
leftSide: je,
|
|
4361
|
-
fontColor:
|
|
4362
|
+
fontColor: ae,
|
|
4362
4363
|
box: oe,
|
|
4363
4364
|
fontPx: R,
|
|
4364
4365
|
bold: re,
|
|
4365
4366
|
font: ie,
|
|
4366
4367
|
textStyle: B,
|
|
4367
4368
|
ptToPx: g,
|
|
4368
|
-
inside:
|
|
4369
|
-
manualClip:
|
|
4369
|
+
inside: Fe,
|
|
4370
|
+
manualClip: Pe
|
|
4370
4371
|
});
|
|
4371
4372
|
}
|
|
4372
4373
|
let F = y + 2, ee = y + b - 2, I = ee - F, L = (e) => {
|
|
@@ -4402,7 +4403,7 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4402
4403
|
e.cxBox - t < te && (e.cxBox = te + t), e.cxBox + t > ne && (e.cxBox = ne - t);
|
|
4403
4404
|
}
|
|
4404
4405
|
e.save(), e.beginPath(), e.rect(_, y, v, b), e.clip();
|
|
4405
|
-
let R = wr(t, n), re = R.color ? `#${R.color}` : "#a6a6a6", ie = R.widthEmu ? Math.max(.5, R.widthEmu /
|
|
4406
|
+
let R = wr(t, n), re = R.color ? `#${R.color}` : "#a6a6a6", ie = R.widthEmu ? Math.max(.5, R.widthEmu / He * g) : 1;
|
|
4406
4407
|
e.setLineDash(Mi(R.dash ?? void 0, ie));
|
|
4407
4408
|
for (let t of N) {
|
|
4408
4409
|
let r = t.cxBox + (t.leftSide ? t.boxW / 2 : -t.boxW / 2), i = t.cyBox, a = r - t.rimX, o = i - t.rimY, s = Math.hypot(a, o);
|
|
@@ -4411,13 +4412,13 @@ function li(e, t, n, r, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, E,
|
|
|
4411
4412
|
for (let t of N) {
|
|
4412
4413
|
t.manualClip && (e.save(), e.beginPath(), e.rect(t.manualClip.x, t.manualClip.y, t.manualClip.w, t.manualClip.h), e.clip());
|
|
4413
4414
|
let n = t.cxBox - t.boxW / 2, r = t.cyBox - t.boxH / 2;
|
|
4414
|
-
|
|
4415
|
+
Ge(e, t.box, {
|
|
4415
4416
|
x: n,
|
|
4416
4417
|
y: r,
|
|
4417
4418
|
w: t.boxW,
|
|
4418
4419
|
h: t.boxH
|
|
4419
4420
|
}, g, O);
|
|
4420
|
-
let i = t.textStyle.textBodyAuthored === !0 || t.textStyle.textLInsEmu != null || t.textStyle.textTInsEmu != null || t.textStyle.textRInsEmu != null || t.textStyle.textBInsEmu != null, o =
|
|
4421
|
+
let i = t.textStyle.textBodyAuthored === !0 || t.textStyle.textLInsEmu != null || t.textStyle.textTInsEmu != null || t.textStyle.textRInsEmu != null || t.textStyle.textBInsEmu != null, o = ze(t.textStyle, t.ptToPx), s = i ? o.left : Math.max(4, t.fontPx * .45), c = i ? o.right : Math.max(4, t.fontPx * .45), l = i ? o.top : Math.max(2, t.fontPx * .28), u = i ? o.bottom : Math.max(2, t.fontPx * .28), d = a(t.unrotatedW, t.unrotatedH, t.textStyle.textRotation, t.textStyle.textVerticalMode), f = t.cxBox + (s - c) / 2, p = t.cyBox + (l - u) / 2, m = n + s, h = n + t.boxW - c, _ = Math.max(0, h - m), v = Ie(t.textStyle, "center"), y = v === "left" ? m : v === "right" ? h : f, b = (e) => (t.textStyle.textVerticalAnchor ?? (t.textStyle.textBodyAuthored === !0 ? "t" : "ctr")) === "t" ? r + l + e / 2 : (t.textStyle.textVerticalAnchor ?? (t.textStyle.textBodyAuthored === !0 ? "t" : "ctr")) === "b" ? r + t.boxH - u - e / 2 : p, x = (e) => v === "left" ? m : v === "right" ? h - e : f - e / 2;
|
|
4421
4422
|
if (e.save(), e.beginPath(), e.rect(n, r, t.boxW, t.boxH), e.clip(), d.radians !== 0 && (e.translate(t.cxBox, t.cyBox), e.rotate(d.radians), e.translate(-t.cxBox, -t.cyBox)), !t.legendKey) {
|
|
4422
4423
|
let n = b(t.rich?.height ?? Math.max(0, t.lines.length * t.lineHeight - (t.lineHeight - t.fontPx)));
|
|
4423
4424
|
if (t.rich) {
|
|
@@ -4454,11 +4455,11 @@ function ui(e, t, n, r, i = 0) {
|
|
|
4454
4455
|
}), m = p.title.fontPx;
|
|
4455
4456
|
fr(e, t, a, o, s, c, o + p.title.topPad, m);
|
|
4456
4457
|
let { px0: g, py0: _, pw: v, ph: y } = p.plotRect;
|
|
4457
|
-
|
|
4458
|
+
Me(e, t, g, _, v, y, r, i);
|
|
4458
4459
|
let b = p.center.cx, x = p.center.cy, S = Math.min(v, y) * .38, C = Infinity, w = -Infinity;
|
|
4459
4460
|
for (let e of t.series) for (let t of e.values) t != null && (C = Math.min(C, t), w = Math.max(w, t));
|
|
4460
4461
|
isFinite(C) || (C = 0, w = 1), w === 0 && (w = 1);
|
|
4461
|
-
let T = t.valAxisMinorTickMark != null && t.valAxisMinorTickMark !== "none", E = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, D = t.valAxisMajorUnit ?? (E ? null : st(t.valMin ?? C, t.valMax ?? w, S / r)), O =
|
|
4462
|
+
let T = t.valAxisMinorTickMark != null && t.valAxisMinorTickMark !== "none", E = t.valAxisLogBase != null && Number.isFinite(t.valAxisLogBase) && t.valAxisLogBase >= 2, D = t.valAxisMajorUnit ?? (E ? null : st(t.valMin ?? C, t.valMax ?? w, S / r)), O = G({
|
|
4462
4463
|
dataMin: C,
|
|
4463
4464
|
dataMax: w,
|
|
4464
4465
|
explicitMin: t.valMin,
|
|
@@ -4503,11 +4504,11 @@ function ui(e, t, n, r, i = 0) {
|
|
|
4503
4504
|
if (!t.valAxisHidden) {
|
|
4504
4505
|
e.font = Pt(Jn(t.valAxisFontSizeHpt, c, r), Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1), e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555", e.textAlign = "right", e.textBaseline = "middle";
|
|
4505
4506
|
for (let n of M) {
|
|
4506
|
-
let i = x - k(n) * S, a =
|
|
4507
|
+
let i = x - k(n) * S, a = ue(t.valAxisLineColor, t.valAxisLineWidthEmu, r);
|
|
4507
4508
|
yn(e, t.valAxisMajorTickMark, "val", b, i, a.color, a.width, !1, t.valAxisLineHidden, "major", r, t.valAxisLineDash), t.valAxisTickLabelPos !== "none" && e.fillText(In(t, n, !1), b - 3, i);
|
|
4508
4509
|
}
|
|
4509
4510
|
if (T) {
|
|
4510
|
-
let n =
|
|
4511
|
+
let n = ue(t.valAxisLineColor, t.valAxisLineWidthEmu, r);
|
|
4511
4512
|
for (let i of O.minorTicks) yn(e, t.valAxisMinorTickMark, "val", b, x - k(i) * S, n.color, n.width, !1, t.valAxisLineHidden, "minor", r, t.valAxisLineDash);
|
|
4512
4513
|
}
|
|
4513
4514
|
}
|
|
@@ -4516,10 +4517,10 @@ function ui(e, t, n, r, i = 0) {
|
|
|
4516
4517
|
if (!t.catAxisHidden && Zn(t)) for (let n = 0; n < u; n++) {
|
|
4517
4518
|
let r = j(n), i = h(12, t.catAxisLabelOffsetPercent), a = b + Math.cos(r) * (S + i), o = x + Math.sin(r) * (S + i), s = t.catAxisLabelAlignment, c = s === "l" ? "left" : s === "r" ? "right" : s === "ctr" ? "center" : Math.cos(r) < -.1 ? "right" : Math.cos(r) > .1 ? "left" : "center";
|
|
4518
4519
|
e.textAlign = c;
|
|
4519
|
-
let u = c === "right" ? a - P : c === "left" ? F - a : 2 * Math.min(F - a, a - P), d =
|
|
4520
|
+
let u = c === "right" ? a - P : c === "left" ? F - a : 2 * Math.min(F - a, a - P), d = ke((l[n] ?? "").toString(), t.catAxisFormatCode, t.date1904);
|
|
4520
4521
|
e.fillText(q(e, d, u), a, o);
|
|
4521
4522
|
}
|
|
4522
|
-
let ee =
|
|
4523
|
+
let ee = Pe("radar", t.chartType, t.scatterStyle, t.radarStyle), I = Math.max(2, S * .025);
|
|
4523
4524
|
for (let n = 0; n < t.series.length; n++) {
|
|
4524
4525
|
let a = t.series[n], o = At(n, a), s = [];
|
|
4525
4526
|
for (let e = 0; e < u; e++) {
|
|
@@ -4546,15 +4547,15 @@ function ui(e, t, n, r, i = 0) {
|
|
|
4546
4547
|
e.strokeStyle = a.lineColor ? `#${a.lineColor}` : o, e.lineWidth = a.lineWidthEmu == null ? 2 : H(a.lineWidthEmu, r), e.setLineDash(Mi(a.chartexStyle?.lineDash ?? void 0, e.lineWidth)), e.lineCap = a.chartexStyle?.lineCap === "rnd" ? "round" : a.chartexStyle?.lineCap === "sq" ? "square" : "butt", e.lineJoin = a.chartexStyle?.lineJoin === "round" || a.chartexStyle?.lineJoin === "bevel" ? a.chartexStyle.lineJoin : "miter", e.stroke(), e.setLineDash(t), e.lineCap = n, e.lineJoin = i;
|
|
4547
4548
|
}
|
|
4548
4549
|
let d = !ee && a.showMarker !== !1 && a.markerSymbol !== "none";
|
|
4549
|
-
if (!ee && (d ||
|
|
4550
|
+
if (!ee && (d || re(a))) {
|
|
4550
4551
|
let t = jt(a.dataPointOverrides);
|
|
4551
4552
|
for (let n = 0; n < s.length; n++) {
|
|
4552
4553
|
let c = s[n];
|
|
4553
4554
|
if (c == null) continue;
|
|
4554
|
-
let l = t.get(n), u =
|
|
4555
|
+
let l = t.get(n), u = me(a, l, "circle", d);
|
|
4555
4556
|
if (u === "none") continue;
|
|
4556
|
-
let f = l?.markerSize ?? a.markerSize ?? Math.max(4, I * 2 / r), p =
|
|
4557
|
-
Si(e, c[0], c[1], u, f, p, m, r, h == null ? 1 : H(h, r),
|
|
4557
|
+
let f = l?.markerSize ?? a.markerSize ?? Math.max(4, I * 2 / r), p = Te(a, l, n, o), m = l?.markerLine ?? a.markerLine ?? null, h = l?.markerLineWidthEmu ?? a.markerLineWidthEmu;
|
|
4558
|
+
Si(e, c[0], c[1], u, f, p, m, r, h == null ? 1 : H(h, r), je(a, l, n), i);
|
|
4558
4559
|
}
|
|
4559
4560
|
}
|
|
4560
4561
|
}
|
|
@@ -4571,7 +4572,7 @@ function fi(e, t) {
|
|
|
4571
4572
|
return e.bubbleSizeRepresents === "w" ? t : Math.sqrt(t);
|
|
4572
4573
|
}
|
|
4573
4574
|
function pi(e, t, n, r) {
|
|
4574
|
-
return
|
|
4575
|
+
return Te(e, t, n, r);
|
|
4575
4576
|
}
|
|
4576
4577
|
function mi(t, n, r, i, a, o = e(n, r)) {
|
|
4577
4578
|
let s = n.bubbleSizes?.[i];
|
|
@@ -4618,7 +4619,7 @@ function mi(t, n, r, i, a, o = e(n, r)) {
|
|
|
4618
4619
|
let d = Ki(t, t.chartStyleRoles?.dataPoint, i, n.values.length);
|
|
4619
4620
|
return d === void 0 ? {
|
|
4620
4621
|
color: pi(n, r, i, a),
|
|
4621
|
-
paint:
|
|
4622
|
+
paint: je(n, r, i)
|
|
4622
4623
|
} : {
|
|
4623
4624
|
color: d?.fillType === "solid" ? d.color : a,
|
|
4624
4625
|
paint: d
|
|
@@ -4702,13 +4703,13 @@ function _i(e, t, n, r, i) {
|
|
|
4702
4703
|
let o = 0;
|
|
4703
4704
|
for (let { series: r, cats: i, pointOverrides: a } of t) if (!(r.showMarker === !1 || r.markerSymbol === "none")) for (let t = 0; t < r.values.length; t++) {
|
|
4704
4705
|
if (r.values[t] == null || di(i, t, n) == null || a.get(t)?.markerSymbol === "none") continue;
|
|
4705
|
-
let s =
|
|
4706
|
+
let s = fe(e, r.bubbleSizes?.[t]);
|
|
4706
4707
|
s != null && (o = Math.max(o, fi(e, s)));
|
|
4707
4708
|
}
|
|
4708
4709
|
return o <= 0 ? 0 : Math.min(r, i) * a / (300 + a) / o;
|
|
4709
4710
|
}
|
|
4710
4711
|
function vi(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v = 0, y) {
|
|
4711
|
-
let b = m === "line" || m === "lineMarker" || m === "lineNoMarker", x = m === "smooth" || m === "smoothMarker" || m === "smoothNoMarker", S =
|
|
4712
|
+
let b = m === "line" || m === "lineMarker" || m === "lineNoMarker", x = m === "smooth" || m === "smoothMarker" || m === "smoothNoMarker", S = Pe("scatter", n.chartType, m, n.radarStyle), C = r.map(({ series: e, index: t }) => gi(n, e, t)), w = Xt(n, f), T = y ?? n, E = p ? _i(T, C, i, u, d) : 0;
|
|
4712
4713
|
for (let { series: e, fallbackColor: r, cats: s } of C) for (let c of e.errBars ?? []) Ci(t, e, Cr(n, c), s, i, a, o, r);
|
|
4713
4714
|
for (let { series: e, fallbackColor: n, cats: r } of C) {
|
|
4714
4715
|
let s = m === "marker" && Tt(e), c = s || b, l = !s && m === "marker" && !p || x;
|
|
@@ -4741,22 +4742,22 @@ function vi(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v = 0, y) {
|
|
|
4741
4742
|
}
|
|
4742
4743
|
for (let { series: r, fallbackColor: s, cats: c, pointOverrides: l } of C) {
|
|
4743
4744
|
let u = !S && r.showMarker !== !1 && r.markerSymbol !== "none";
|
|
4744
|
-
if (u || !S &&
|
|
4745
|
+
if (u || !S && re(r)) for (let d = 0; d < r.values.length; d++) {
|
|
4745
4746
|
let m = r.values[d];
|
|
4746
4747
|
if (m == null) continue;
|
|
4747
4748
|
let h = di(c, d, i);
|
|
4748
4749
|
if (h == null) continue;
|
|
4749
|
-
let g = l.get(d), _ =
|
|
4750
|
+
let g = l.get(d), _ = me(r, g, p ? "circle" : r.automaticMarkerSymbol ?? "circle", u);
|
|
4750
4751
|
if (_ === "none") continue;
|
|
4751
4752
|
let y = g?.markerSize ?? r.markerSize ?? 5;
|
|
4752
4753
|
if (p) {
|
|
4753
4754
|
if (E <= 0) continue;
|
|
4754
|
-
let e =
|
|
4755
|
+
let e = fe(T, r.bubbleSizes?.[d]);
|
|
4755
4756
|
if (e == null) continue;
|
|
4756
4757
|
y = fi(T, e) * E / f;
|
|
4757
4758
|
}
|
|
4758
4759
|
let b = p ? mi(n, r, g, d, s) : null, x = b?.color ?? pi(r, g, d, s), S = p ? hi(n, r, g, d) : null, C = p ? S.color : g?.markerLine ?? r.markerLine ?? null, w = g?.markerLineWidthEmu ?? r.markerLineWidthEmu, D = S?.widthEmu, O = p ? D : w, k = O == null ? void 0 : H(O, f);
|
|
4759
|
-
Si(t, a(h), o(m), _, y, x, C, f, k, p ? b.paint :
|
|
4760
|
+
Si(t, a(h), o(m), _, y, x, C, f, k, p ? b.paint : je(r, g, d), v, p ? S.paint : void 0, p ? S.dash : void 0, p ? S.customDash : void 0, p ? S.cap : void 0, p ? S.join : void 0, p ? e(r, g) : !1);
|
|
4760
4761
|
}
|
|
4761
4762
|
}
|
|
4762
4763
|
for (let { series: e, seriesIndex: r, cats: c, pointOverrides: u } of C) wi(t, e, c, i, a, o, d, f, n.date1904, Y(n, n.dataLabelFontFace, "minor"), n.dataLabelPosition ?? "r", {
|
|
@@ -4767,11 +4768,11 @@ function vi(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v = 0, y) {
|
|
|
4767
4768
|
}, h, (e) => Y(n, e, "minor"), _, (e) => w(r, e), (e) => hr(n, e, g), v, (t) => {
|
|
4768
4769
|
if (S) return 0;
|
|
4769
4770
|
let n = e.showMarker !== !1 && e.markerSymbol !== "none", r = u.get(t);
|
|
4770
|
-
if (
|
|
4771
|
+
if (me(e, r, "circle", n) === "none") return 0;
|
|
4771
4772
|
let i = r?.markerSize ?? e.markerSize ?? 5;
|
|
4772
4773
|
if (p) {
|
|
4773
4774
|
if (E <= 0) return 0;
|
|
4774
|
-
let n =
|
|
4775
|
+
let n = fe(T, e.bubbleSizes?.[t]);
|
|
4775
4776
|
if (n == null) return 0;
|
|
4776
4777
|
i = fi(T, n) * E / f;
|
|
4777
4778
|
}
|
|
@@ -4833,7 +4834,7 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4833
4834
|
y: A(C).y
|
|
4834
4835
|
}, P = ur(e, t, l, d, r), F = P.fontPx, ee = P.topPad, I = Jn(t.catAxisFontSizeHpt, d, r), L = Jn(t.valAxisFontSizeHpt, d, r), te = mn(e, t, l, d, .22, r), { legRightW: ne, legLeftW: R, legTopH: re, legBottomH: ie } = v(te, t.legendOverlay === !0), z = p(t, l, d, r), ae = z.catFontPx, oe = z.valFontPx, se = z.catBandH, ce = z.valBandW;
|
|
4835
4836
|
fr(e, t, o, s, l, d, s + ee, F);
|
|
4836
|
-
let le = D ?
|
|
4837
|
+
let le = D ? G({
|
|
4837
4838
|
dataMin: N.y.min,
|
|
4838
4839
|
dataMax: N.y.max,
|
|
4839
4840
|
explicitMin: D.min,
|
|
@@ -4852,12 +4853,12 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4852
4853
|
for (let n of le.majorTicks) B = Math.max(B, e.measureText(Rn(n, D.formatCode, t.date1904, D.displayUnits)).width);
|
|
4853
4854
|
B += u(L) + 4, e.font = n;
|
|
4854
4855
|
}
|
|
4855
|
-
let
|
|
4856
|
+
let de = E && !E.hidden && E.tickLabelPos !== "none" ? (i(E.fontSizeHpt, r) ?? I) + c(I) + 2 : 0, { plotRect: { px0: fe, py0: V, pw: pe, ph: me } } = f(t, o, s, l, d, r, {
|
|
4856
4857
|
titleBand: P,
|
|
4857
4858
|
legendSideReserveFrac: .22,
|
|
4858
4859
|
legendReserve: te,
|
|
4859
4860
|
pad: {
|
|
4860
|
-
t: P.bandH + re + L / 2 + 2 +
|
|
4861
|
+
t: P.bandH + re + L / 2 + 2 + de,
|
|
4861
4862
|
r: ne + l * .05 + B,
|
|
4862
4863
|
b: (t.catAxisHidden ? d * .04 : x(I)) + se + ie,
|
|
4863
4864
|
l: (t.valAxisHidden ? l * .04 : l * .12) + ce + R
|
|
@@ -4865,10 +4866,10 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4865
4866
|
honorPlotAreaManualLayout: !0
|
|
4866
4867
|
});
|
|
4867
4868
|
if (pe <= 0 || me <= 0) return;
|
|
4868
|
-
|
|
4869
|
+
Me(e, t, fe, V, pe, me, r, a);
|
|
4869
4870
|
let { min: he, max: ge } = M.x, { min: _e, max: ve } = M.y;
|
|
4870
4871
|
t.valMin != null && (_e = t.valMin), t.valMax != null && (ve = t.valMax);
|
|
4871
|
-
let ye = t.valAxisMinorGridlines === !0 || t.valAxisMinorTickMark != null && t.valAxisMinorTickMark !== "none", be =
|
|
4872
|
+
let ye = t.valAxisMinorGridlines === !0 || t.valAxisMinorTickMark != null && t.valAxisMinorTickMark !== "none", be = G({
|
|
4872
4873
|
dataMin: _e,
|
|
4873
4874
|
dataMax: ve,
|
|
4874
4875
|
explicitMin: t.valMin,
|
|
@@ -4882,7 +4883,7 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4882
4883
|
reversed: Mn(t)
|
|
4883
4884
|
});
|
|
4884
4885
|
_e = be.min, ve = be.max;
|
|
4885
|
-
let xe = t.catAxisMinorGridlines === !0 || t.catAxisMinorTickMark != null && t.catAxisMinorTickMark !== "none", Se =
|
|
4886
|
+
let xe = t.catAxisMinorGridlines === !0 || t.catAxisMinorTickMark != null && t.catAxisMinorTickMark !== "none", Se = G({
|
|
4886
4887
|
dataMin: he,
|
|
4887
4888
|
dataMax: ge,
|
|
4888
4889
|
explicitMin: t.catAxisMin ?? (k == null ? null : 0),
|
|
@@ -4896,7 +4897,7 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4896
4897
|
reversed: Nn(t)
|
|
4897
4898
|
});
|
|
4898
4899
|
he = Se.min, ge = Se.max;
|
|
4899
|
-
let Ce = E ?
|
|
4900
|
+
let Ce = E ? G({
|
|
4900
4901
|
dataMin: N.x.min,
|
|
4901
4902
|
dataMax: N.x.max,
|
|
4902
4903
|
explicitMin: E.min,
|
|
@@ -4908,7 +4909,7 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4908
4909
|
needMinor: E.minorGridlines === !0 || E.minorTickMark != null && E.minorTickMark !== "none",
|
|
4909
4910
|
logBase: E.logBase,
|
|
4910
4911
|
reversed: E.orientation === "maxMin"
|
|
4911
|
-
}) : null, we = D ?
|
|
4912
|
+
}) : null, we = D ? G({
|
|
4912
4913
|
dataMin: N.y.min,
|
|
4913
4914
|
dataMax: N.y.max,
|
|
4914
4915
|
explicitMin: D.min,
|
|
@@ -4920,19 +4921,19 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4920
4921
|
needMinor: D.minorGridlines === !0 || D.minorTickMark != null && D.minorTickMark !== "none",
|
|
4921
4922
|
logBase: D.logBase,
|
|
4922
4923
|
reversed: D.orientation === "maxMin"
|
|
4923
|
-
}) : null, Te = (e) => fe + Se.fraction(e) * pe, Ee = (e) => V + me - be.fraction(e) * me, De = (e) => fe + (Ce?.fraction(e) ?? 0) * pe, Oe = (e) => V + me - (we?.fraction(e) ?? 0) * me, ke = Se.majorUnit, Ae = be.majorTicks, je = be.minorTicks,
|
|
4924
|
+
}) : null, Te = (e) => fe + Se.fraction(e) * pe, Ee = (e) => V + me - be.fraction(e) * me, De = (e) => fe + (Ce?.fraction(e) ?? 0) * pe, Oe = (e) => V + me - (we?.fraction(e) ?? 0) * me, ke = Se.majorUnit, Ae = be.majorTicks, je = be.minorTicks, Ne = Se.majorTicks, Pe = Se.minorTicks, Fe = V + me;
|
|
4924
4925
|
if (t.catAxisCrossesAt != null) Fe = Ai(Ee(t.catAxisCrossesAt), V, V + me);
|
|
4925
4926
|
else {
|
|
4926
4927
|
let e = t.catAxisCrosses ?? "autoZero";
|
|
4927
4928
|
e === "autoZero" && _e < 0 && ve > 0 ? Fe = Ai(Ee(0), V, V + me) : e === "max" && (Fe = V);
|
|
4928
4929
|
}
|
|
4929
|
-
let
|
|
4930
|
-
if (t.valAxisCrossesAt != null)
|
|
4930
|
+
let Ie = fe;
|
|
4931
|
+
if (t.valAxisCrossesAt != null) Ie = Ai(Te(t.valAxisCrossesAt), fe, fe + pe);
|
|
4931
4932
|
else {
|
|
4932
4933
|
let e = t.valAxisCrosses ?? "autoZero";
|
|
4933
|
-
e === "autoZero" && he < 0 && ge > 0 ?
|
|
4934
|
+
e === "autoZero" && he < 0 && ge > 0 ? Ie = Ai(Te(0), fe, fe + pe) : e === "max" && (Ie = fe + pe);
|
|
4934
4935
|
}
|
|
4935
|
-
let
|
|
4936
|
+
let U = wn(t, r);
|
|
4936
4937
|
if (!t.valAxisHidden) {
|
|
4937
4938
|
let n = t.valAxisFontSizeHpt == null ? Math.max(8, Math.min(11, me / 20)) : Jn(t.valAxisFontSizeHpt, d, r), i = t.valAxisFontSizeHpt == null ? 4 : u(n);
|
|
4938
4939
|
e.font = Pt(n, Y(t, t.valAxisFontFace, "minor"), t.valAxisFontBold ?? !1, t.valAxisFontItalic ?? !1);
|
|
@@ -4943,25 +4944,25 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4943
4944
|
}
|
|
4944
4945
|
for (let n of Ae) {
|
|
4945
4946
|
let c = Ee(n);
|
|
4946
|
-
if (e.strokeStyle =
|
|
4947
|
-
let t =
|
|
4948
|
-
|
|
4947
|
+
if (e.strokeStyle = U.color, e.lineWidth = U.width, Pn(t)) {
|
|
4948
|
+
let t = U.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
4949
|
+
U.dash.length > 0 && e.setLineDash(U.dash), e.beginPath(), e.moveTo(fe, c), e.lineTo(fe + pe, c), e.stroke(), U.dash.length > 0 && e.setLineDash(t);
|
|
4949
4950
|
}
|
|
4950
4951
|
if (t.valAxisTickLabelPos !== "none") {
|
|
4951
4952
|
e.fillStyle = t.valAxisFontColor ? `#${t.valAxisFontColor}` : "#555";
|
|
4952
4953
|
let r = t.valAxisTickLabelPos ?? "nextTo", a;
|
|
4953
|
-
r === "high" ? (e.textAlign = "left", a = fe + pe + i) : r === "low" ? (e.textAlign = "right", a = fe - i) : (e.textAlign = "right", a =
|
|
4954
|
+
r === "high" ? (e.textAlign = "left", a = fe + pe + i) : r === "low" ? (e.textAlign = "right", a = fe - i) : (e.textAlign = "right", a = Ie - s - i), e.textBaseline = "middle", e.fillText(In(t, n, !1), a, c);
|
|
4954
4955
|
}
|
|
4955
|
-
yn(e, t.valAxisMajorTickMark, "val",
|
|
4956
|
+
yn(e, t.valAxisMajorTickMark, "val", Ie, c, a, o, !1, t.valAxisLineHidden, "major", r, t.valAxisLineDash);
|
|
4956
4957
|
}
|
|
4957
|
-
if (t.valAxisMinorTickMark && t.valAxisMinorTickMark !== "none") for (let n of je) yn(e, t.valAxisMinorTickMark, "val",
|
|
4958
|
+
if (t.valAxisMinorTickMark && t.valAxisMinorTickMark !== "none") for (let n of je) yn(e, t.valAxisMinorTickMark, "val", Ie, Ee(n), a, o, !1, t.valAxisLineHidden, "minor", r, t.valAxisLineDash);
|
|
4958
4959
|
}
|
|
4959
4960
|
if (!t.catAxisHidden && On(t) && ke > 0) {
|
|
4960
4961
|
let n = kn(t, r);
|
|
4961
4962
|
e.strokeStyle = n.color, e.lineWidth = n.width;
|
|
4962
4963
|
let i = n.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
4963
4964
|
n.dash.length > 0 && e.setLineDash(n.dash);
|
|
4964
|
-
for (let t of
|
|
4965
|
+
for (let t of Ne) {
|
|
4965
4966
|
let n = Te(t);
|
|
4966
4967
|
e.beginPath(), e.moveTo(n, V), e.lineTo(n, V + me), e.stroke();
|
|
4967
4968
|
}
|
|
@@ -4970,22 +4971,22 @@ function yi(e, t, n, r, a = 0) {
|
|
|
4970
4971
|
if (!t.catAxisHidden && t.catAxisMinorGridlines && ke > 0) {
|
|
4971
4972
|
let n = An(t, r), i = n.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
4972
4973
|
e.strokeStyle = n.color, e.lineWidth = n.width, n.dash.length > 0 && e.setLineDash(n.dash);
|
|
4973
|
-
for (let t of
|
|
4974
|
+
for (let t of Pe) {
|
|
4974
4975
|
let n = Te(t);
|
|
4975
4976
|
e.beginPath(), e.moveTo(n, V), e.lineTo(n, V + me), e.stroke();
|
|
4976
4977
|
}
|
|
4977
4978
|
n.dash.length > 0 && e.setLineDash(i);
|
|
4978
4979
|
}
|
|
4979
|
-
if (!t.catAxisHidden && !t.catAxisLineHidden && (e.save(), e.lineCap = "butt", bn(e, fe, Fe, fe + pe, Fe, t.catAxisLineColor ? `#${t.catAxisLineColor}` : "#888", H(t.catAxisLineWidthEmu, r), t.catAxisLineDash), e.restore()), !t.valAxisHidden && !t.valAxisLineHidden && (e.save(), bn(e,
|
|
4980
|
+
if (!t.catAxisHidden && !t.catAxisLineHidden && (e.save(), e.lineCap = "butt", bn(e, fe, Fe, fe + pe, Fe, t.catAxisLineColor ? `#${t.catAxisLineColor}` : "#888", H(t.catAxisLineWidthEmu, r), t.catAxisLineDash), e.restore()), !t.valAxisHidden && !t.valAxisLineHidden && (e.save(), bn(e, Ie, V, Ie, V + me, t.valAxisLineColor ? `#${t.valAxisLineColor}` : "#888", H(t.valAxisLineWidthEmu, r), t.valAxisLineDash), e.restore()), !t.catAxisHidden) {
|
|
4980
4981
|
let n = t.catAxisFontSizeHpt == null ? Math.max(8, Math.min(11, me / 20)) : Jn(t.catAxisFontSizeHpt, d, r), i = t.catAxisFontSizeHpt == null ? 4 : c(n);
|
|
4981
4982
|
e.font = Pt(n, Y(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1), e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#555", e.textAlign = "center";
|
|
4982
4983
|
let a = t.catAxisTickLabelPos ?? "nextTo", o = H(t.catAxisLineWidthEmu, r), s = t.catAxisLineColor ? `#${t.catAxisLineColor}` : void 0, l = t.catAxisLineHidden ? 0 : Sn(t.catAxisMajorTickMark, "major", o, r), u = a === "low" ? V + me + i : a === "high" ? V - i : Fe + l + i;
|
|
4983
4984
|
e.textBaseline = a === "high" ? "bottom" : "top";
|
|
4984
|
-
for (let n of
|
|
4985
|
+
for (let n of Ne) {
|
|
4985
4986
|
let i = Te(n);
|
|
4986
4987
|
a !== "none" && e.fillText(Rn(n, t.catAxisFormatCode, t.date1904, t.catAxisDisplayUnits), i, u), yn(e, t.catAxisMajorTickMark, "cat", Fe, i, s, o, !1, t.catAxisLineHidden, "major", r, t.catAxisLineDash);
|
|
4987
4988
|
}
|
|
4988
|
-
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none") for (let n of
|
|
4989
|
+
if (t.catAxisMinorTickMark && t.catAxisMinorTickMark !== "none") for (let n of Pe) yn(e, t.catAxisMinorTickMark, "cat", Fe, Te(n), s, o, !1, t.catAxisLineHidden, "minor", r, t.catAxisLineDash);
|
|
4989
4990
|
}
|
|
4990
4991
|
let Le = (i, c, u, f, p, m, h, g) => {
|
|
4991
4992
|
i.length !== 0 && vi(e, t, i, O, f, p, n, fe, V, pe, me, r, c, u, {
|
|
@@ -5013,7 +5014,7 @@ function yi(e, t, n, r, a = 0) {
|
|
|
5013
5014
|
} : void 0);
|
|
5014
5015
|
}
|
|
5015
5016
|
if (E && Ce && !E.hidden) {
|
|
5016
|
-
let n =
|
|
5017
|
+
let n = ue(E.lineColor, E.lineWidthEmu, r);
|
|
5017
5018
|
E.lineHidden || bn(e, fe, V, fe + pe, V, n.color, n.width, E.lineDash);
|
|
5018
5019
|
let a = i(E.fontSizeHpt, r) ?? I;
|
|
5019
5020
|
e.font = Pt(a, Y(t, E.fontFace, "minor"), E.fontBold ?? !1, E.fontItalic ?? !1), e.fillStyle = E.fontColor ? `#${E.fontColor}` : "#555", e.textAlign = "center", e.textBaseline = "bottom";
|
|
@@ -5048,8 +5049,8 @@ function xi(e, t, n, r) {
|
|
|
5048
5049
|
}
|
|
5049
5050
|
function Si(e, n, r, i, a, o, s, c, l = 1, u = void 0, d = 0, f = void 0, p = void 0, m = void 0, h = void 0, g = void 0, _ = !1) {
|
|
5050
5051
|
let v = Math.max(2, a * c), y = v / 2, b = o.startsWith("#") ? o : `#${o}`, x = s ? s.startsWith("#") ? s : `#${s}` : null;
|
|
5051
|
-
e.save(), e.fillStyle = u === void 0 ? b : u == null ? "rgba(0,0,0,0)" :
|
|
5052
|
-
let S = f === void 0 ? x : f == null ? null :
|
|
5052
|
+
e.save(), e.fillStyle = u === void 0 ? b : u == null ? "rgba(0,0,0,0)" : Fe(u, e, n - y, r - y, v, v, d) ?? "rgba(0,0,0,0)";
|
|
5053
|
+
let S = f === void 0 ? x : f == null ? null : Fe(f, e, n - y, r - y, v, v, d), C = S != null;
|
|
5053
5054
|
S && (e.strokeStyle = S, e.lineWidth = l, e.setLineDash(Ni(m, p, l)), e.lineCap = h === "rnd" ? "round" : h === "sq" ? "square" : "butt", e.lineJoin = g === "round" || g === "bevel" ? g : "miter");
|
|
5054
5055
|
let w = u?.fillType === "image" ? u : void 0, T = () => {
|
|
5055
5056
|
if (!w) {
|
|
@@ -5103,7 +5104,7 @@ function Si(e, n, r, i, a, o, s, c, l = 1, u = void 0, d = 0, f = void 0, p = vo
|
|
|
5103
5104
|
}
|
|
5104
5105
|
function Ci(e, t, n, r, i, a, o, s) {
|
|
5105
5106
|
if (n.hidden === !0) return;
|
|
5106
|
-
e.save(), e.strokeStyle = n.color ? `#${n.color}` : s, e.lineWidth = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu /
|
|
5107
|
+
e.save(), e.strokeStyle = n.color ? `#${n.color}` : s, e.lineWidth = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / He) : 1, e.setLineDash(Mi(n.dash, e.lineWidth));
|
|
5107
5108
|
let c = n.barType === "plus" || n.barType === "both", l = n.barType === "minus" || n.barType === "both", u = n.dir === "x", d = e.lineWidth / 2;
|
|
5108
5109
|
for (let s = 0; s < t.values.length; s++) {
|
|
5109
5110
|
let f = t.values[s];
|
|
@@ -5140,14 +5141,14 @@ function wi(e, t, n, r, a, o, s, c, l = !1, u = "sans-serif", d = "r", f = {
|
|
|
5140
5141
|
let w = di(n, b, r);
|
|
5141
5142
|
if (w == null) continue;
|
|
5142
5143
|
let T = x.get(b);
|
|
5143
|
-
if (
|
|
5144
|
+
if (z(S, T)) continue;
|
|
5144
5145
|
let E = T?.showCatName ?? S?.showCatName, D = T?.showSerName ?? S?.showSerName, O = T?.showVal ?? S?.showVal, k = T?.showBubbleSize ?? S?.showBubbleSize, A = T?.showLegendKey ?? S?.showLegendKey ?? !1, j = et({
|
|
5145
5146
|
customText: T?.text,
|
|
5146
5147
|
showCategory: E,
|
|
5147
5148
|
showSeries: D,
|
|
5148
5149
|
showValue: O,
|
|
5149
5150
|
showBubbleSize: k,
|
|
5150
|
-
category: r ?
|
|
5151
|
+
category: r ? ke((n[b] ?? String(w)).toString(), t.catFormatCodes?.[b] ?? t.catFormatCode ?? null, l) : R(w, t.catFormatCodes?.[b] ?? t.catFormatCode ?? null, l),
|
|
5151
5152
|
seriesName: t.name,
|
|
5152
5153
|
sourceValue: C,
|
|
5153
5154
|
bubbleSize: t.bubbleSizes?.[b] ?? void 0,
|
|
@@ -5158,7 +5159,7 @@ function wi(e, t, n, r, a, o, s, c, l = !1, u = "sans-serif", d = "r", f = {
|
|
|
5158
5159
|
}), M = A ? g?.(b) : void 0;
|
|
5159
5160
|
if (!j && !M) continue;
|
|
5160
5161
|
let N = T?.position ?? S?.position ?? d, P = i(T?.fontSizeHpt ?? S?.fontSizeHpt, c) ?? Math.max(9, Math.min(11, s / 25)), F = T?.fontColor ?? S?.fontColor, ee = T?.fontBold ?? S?.fontBold ?? !1, I = T?.fontFace ?? S?.fontFace, L = I && m ? m(I) : u;
|
|
5161
|
-
Ti(e, a(w), o(C), j, N, P, F, ee, L, y?.(b) ?? 0, f, T?.manualLayout, p, T?.richRuns, c, m, M,
|
|
5162
|
+
Ti(e, a(w), o(C), j, N, P, F, ee, L, y?.(b) ?? 0, f, T?.manualLayout, p, T?.richRuns, c, m, M, Re(T, S), We(T?.labelBox, S?.labelBox), v);
|
|
5162
5163
|
}
|
|
5163
5164
|
}
|
|
5164
5165
|
function Ti(e, t, n, r, i, a, o, s, c = "sans-serif", l = 0, u = {
|
|
@@ -5208,17 +5209,17 @@ function Oi(e, t, n, r, i, s, c, l = r, u, d, f, p = 1, m, h = 0) {
|
|
|
5208
5209
|
if (u) {
|
|
5209
5210
|
let t = J(e, u, i, s);
|
|
5210
5211
|
if (!t) return;
|
|
5211
|
-
let d =
|
|
5212
|
+
let d = ze(f, p), g = a(t.width + d.left + d.right, t.height + d.top + d.bottom, f?.textRotation, f?.textVerticalMode), _ = o(n, r, {
|
|
5212
5213
|
w: g.w,
|
|
5213
5214
|
h: g.h
|
|
5214
5215
|
}, i, c, l);
|
|
5215
5216
|
if (!_) return;
|
|
5216
|
-
e.save(), e.beginPath(), e.rect(_.clip.x, _.clip.y, _.clip.w, _.clip.h), e.clip(),
|
|
5217
|
-
let v =
|
|
5217
|
+
e.save(), e.beginPath(), e.rect(_.clip.x, _.clip.y, _.clip.w, _.clip.h), e.clip(), Ge(e, m, _.rect, p, h);
|
|
5218
|
+
let v = Ie(f, _.textAlign), y = ne(_.x, _.y, _.rect, t.height + d.top + d.bottom, f, c != null, v, _.textAlign, t.width + d.left + d.right, g.radians), b = U(e, y.x, y.y, g.radians, v, _.textBaseline, d);
|
|
5218
5219
|
Xe(e, t, b.x, b.y, v, _.textBaseline, c ? Math.max(0, _.rect.w - d.left - d.right) : t.width), e.restore();
|
|
5219
5220
|
return;
|
|
5220
5221
|
}
|
|
5221
|
-
let g = i * 1.15, _ = D(t).value.split(/\r?\n/), v = _.reduce((t, n) => Math.max(t, e.measureText(n).width), 0), y = Math.max(g, _.length * g), b =
|
|
5222
|
+
let g = i * 1.15, _ = D(t).value.split(/\r?\n/), v = _.reduce((t, n) => Math.max(t, e.measureText(n).width), 0), y = Math.max(g, _.length * g), b = ze(f, p), x = a(v + b.left + b.right, y + b.top + b.bottom, f?.textRotation, f?.textVerticalMode), S = o(n, r, {
|
|
5222
5223
|
w: x.w,
|
|
5223
5224
|
h: x.h
|
|
5224
5225
|
}, i, c, l);
|
|
@@ -5230,19 +5231,19 @@ function Oi(e, t, n, r, i, s, c, l = r, u, d, f, p = 1, m, h = 0) {
|
|
|
5230
5231
|
w: k.w,
|
|
5231
5232
|
h: k.h
|
|
5232
5233
|
}, i, c, l), !S) return;
|
|
5233
|
-
e.save(), e.beginPath(), e.rect(S.clip.x, S.clip.y, S.clip.w, S.clip.h), e.clip(),
|
|
5234
|
+
e.save(), e.beginPath(), e.rect(S.clip.x, S.clip.y, S.clip.w, S.clip.h), e.clip(), Ge(e, m, S.rect, p, h);
|
|
5234
5235
|
let A = f?.fontPaintAuthored === !0 && (f.fontHidden === !0 || f.fontColor == null);
|
|
5235
5236
|
e.fillStyle = s;
|
|
5236
|
-
let j =
|
|
5237
|
+
let j = Ie(f, S.textAlign);
|
|
5237
5238
|
e.textAlign = j, e.textBaseline = S.textBaseline;
|
|
5238
|
-
let M = ne(S.x, S.y, S.rect, O + b.top + b.bottom, f, c != null, j, S.textAlign, E + b.left + b.right, k.radians), N =
|
|
5239
|
+
let M = ne(S.x, S.y, S.rect, O + b.top + b.bottom, f, c != null, j, S.textAlign, E + b.left + b.right, k.radians), N = U(e, M.x, M.y, k.radians, j, S.textBaseline, b), P = (f?.fontBaseline ?? 0) * i, F = S.textBaseline === "middle" ? N.y - (w.length - 1) * g / 2 : S.textBaseline === "bottom" ? N.y - (w.length - 1) * g : N.y;
|
|
5239
5240
|
if (!A) for (let t = 0; t < w.length; t++) e.fillText(w[t], N.x, F + t * g - P);
|
|
5240
5241
|
e.restore();
|
|
5241
5242
|
}
|
|
5242
5243
|
function ki(e, t, n, r, i, s, c, l, u, d, f, p) {
|
|
5243
5244
|
let { entry: m, ptToPx: h, shapeRotationDeg: g } = d, _ = dn([m], i, h)[0] ?? 0, v = fn(m, i, h), y = t ? en : 0, b = t && u ? J(e, u, i, s) : null;
|
|
5244
5245
|
if (t && u && !b) return;
|
|
5245
|
-
let x = i * 1.15, S = t && !b ? D(t).value.split(/\r?\n/) : [], C = b?.width ?? S.reduce((t, n) => Math.max(t, e.measureText(n).width), 0), w = b?.height ?? (S.length > 0 ? Math.max(x, S.length * x) : 0), E =
|
|
5246
|
+
let x = i * 1.15, S = t && !b ? D(t).value.split(/\r?\n/) : [], C = b?.width ?? S.reduce((t, n) => Math.max(t, e.measureText(n).width), 0), w = b?.height ?? (S.length > 0 ? Math.max(x, S.length * x) : 0), E = ze(f, h), O = a(_ + y + C + E.left + E.right, Math.max(v, w) + E.top + E.bottom, f?.textRotation, f?.textVerticalMode), k = o(n, r, {
|
|
5246
5247
|
w: O.w,
|
|
5247
5248
|
h: O.h
|
|
5248
5249
|
}, i, c, l);
|
|
@@ -5256,11 +5257,11 @@ function ki(e, t, n, r, i, s, c, l, u, d, f, p) {
|
|
|
5256
5257
|
}, i, c, l), !k) return;
|
|
5257
5258
|
let L = k.textAlign === "left" ? k.x + I.w / 2 : k.textAlign === "right" ? k.x - I.w / 2 : k.x, te = k.textBaseline === "top" ? k.y + I.h / 2 : k.textBaseline === "bottom" ? k.y - I.h / 2 : k.y;
|
|
5258
5259
|
if (c) {
|
|
5259
|
-
let e =
|
|
5260
|
+
let e = Ie(f, "center"), t = ne(L, te, k.rect, ee, f, !0, e);
|
|
5260
5261
|
L = e === "left" ? t.x + F / 2 : e === "right" ? t.x - F / 2 : t.x, te = t.y;
|
|
5261
5262
|
}
|
|
5262
5263
|
let R = L - F / 2 + E.left, re = te - ee / 2 + E.top;
|
|
5263
|
-
if (e.save(), e.beginPath(), e.rect(k.clip.x, k.clip.y, k.clip.w, k.clip.h), e.clip(),
|
|
5264
|
+
if (e.save(), e.beginPath(), e.rect(k.clip.x, k.clip.y, k.clip.w, k.clip.h), e.clip(), Ge(e, p, k.rect, h, g), I.radians !== 0 && (e.translate(L, te), e.rotate(I.radians), e.translate(-L, -te)), Q(e, m.swatchStyle, m.color, R, re + (P - v) / 2, _, v, m.marker, m.fillPaint, m.outlineColor, m.outlineWidthEmu, m.outlineDash, m.outlineCap, m.outlineJoin, h, g), t) {
|
|
5264
5265
|
let t = R + _ + y;
|
|
5265
5266
|
if (b) Xe(e, b, t, re + (P - M) / 2, "left", "top");
|
|
5266
5267
|
else if (!(f?.fontPaintAuthored === !0 && (f.fontHidden === !0 || f.fontColor == null))) {
|
|
@@ -5282,15 +5283,15 @@ function ji(e, t, n) {
|
|
|
5282
5283
|
else for (let n = 1; n < t.length; n++) e.lineTo(t[n].x, t[n].y);
|
|
5283
5284
|
}
|
|
5284
5285
|
function Mi(e, t = 1) {
|
|
5285
|
-
return
|
|
5286
|
+
return Le(e ?? "solid", Number.isFinite(t) && t > 0 ? t : 1);
|
|
5286
5287
|
}
|
|
5287
5288
|
function Ni(e, t, n = 1) {
|
|
5288
|
-
return
|
|
5289
|
+
return ie(e, t, Number.isFinite(n) && n > 0 ? n : 1);
|
|
5289
5290
|
}
|
|
5290
5291
|
function Pi(e, t, n, r, i, a, o, s) {
|
|
5291
5292
|
if (n.hidden === !0 || n.dir === "x") return;
|
|
5292
5293
|
let c = n.barType === "plus" || n.barType === "both", l = n.barType === "minus" || n.barType === "both";
|
|
5293
|
-
e.save(), e.strokeStyle = n.color ? `#${n.color}` : s, e.lineWidth = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu /
|
|
5294
|
+
e.save(), e.strokeStyle = n.color ? `#${n.color}` : s, e.lineWidth = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / He) : 1, e.setLineDash(Mi(n.dash, e.lineWidth));
|
|
5294
5295
|
let u = e.lineWidth / 2;
|
|
5295
5296
|
for (let s = 0; s < r; s++) {
|
|
5296
5297
|
if (t.values[s] == null) continue;
|
|
@@ -5312,7 +5313,7 @@ function Pi(e, t, n, r, i, a, o, s) {
|
|
|
5312
5313
|
function Fi(e, t, n, r, i, a, o, s, c, l) {
|
|
5313
5314
|
if (n.hidden === !0 || !i && n.dir === "x" || i && n.dir === "y") return;
|
|
5314
5315
|
let u = n.barType === "plus" || n.barType === "both", d = n.barType === "minus" || n.barType === "both";
|
|
5315
|
-
e.save(), e.strokeStyle = n.color ? `#${n.color}` : c, e.lineWidth = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu /
|
|
5316
|
+
e.save(), e.strokeStyle = n.color ? `#${n.color}` : c, e.lineWidth = n.lineWidthEmu ? Math.max(.5, n.lineWidthEmu / He * l) : Math.max(.5, l * .75), e.setLineDash(Mi(n.dash, e.lineWidth));
|
|
5316
5317
|
let f = Math.max(e.lineWidth / 2, 2 * l);
|
|
5317
5318
|
for (let c = 0; c < r; c++) {
|
|
5318
5319
|
if (t.values[c] == null) continue;
|
|
@@ -5344,7 +5345,7 @@ function Ii(e, t, n, r, a, o, s, c, l, u, d, f = "sans-serif", p = "t", m = {
|
|
|
5344
5345
|
let r = s(C);
|
|
5345
5346
|
if (x && !x(r)) continue;
|
|
5346
5347
|
let E = t.values[C] ?? 0, D = w.get(C);
|
|
5347
|
-
if (
|
|
5348
|
+
if (z(T, D)) continue;
|
|
5348
5349
|
let O = D?.showCatName ?? T?.showCatName, k = D?.showSerName ?? T?.showSerName, A = D?.showVal ?? T?.showVal, j = D?.showPercent ?? T?.showPercent, M = D?.showLegendKey ?? T?.showLegendKey ?? !1, N = et({
|
|
5349
5350
|
customText: D?.text,
|
|
5350
5351
|
showCategory: O,
|
|
@@ -5362,7 +5363,7 @@ function Ii(e, t, n, r, a, o, s, c, l, u, d, f = "sans-serif", p = "t", m = {
|
|
|
5362
5363
|
}), P = M ? b?.(C) : void 0;
|
|
5363
5364
|
if (!N && !P) continue;
|
|
5364
5365
|
let F = D?.position ?? T?.position ?? p, ee = i(D?.fontSizeHpt ?? T?.fontSizeHpt, l) ?? Math.max(9, Math.min(11, c / 25)), I = D?.fontColor ?? T?.fontColor, L = D?.fontBold ?? T?.fontBold ?? !1, te = D?.fontFace ?? T?.fontFace, ne = te && v ? v(te) : f;
|
|
5365
|
-
Ti(e, a(C), o(r), N, F, ee, I, L, ne, _?.(C) ?? 0, m, D?.manualLayout, h, D?.richRuns, l, v, P,
|
|
5366
|
+
Ti(e, a(C), o(r), N, F, ee, I, L, ne, _?.(C) ?? 0, m, D?.manualLayout, h, D?.richRuns, l, v, P, Re(D, T), We(D?.labelBox, T?.labelBox), S);
|
|
5366
5367
|
}
|
|
5367
5368
|
return !0;
|
|
5368
5369
|
}
|
|
@@ -5372,7 +5373,7 @@ function Li(e, t) {
|
|
|
5372
5373
|
function Ri(e, t, n, r, i, a, o, s, c) {
|
|
5373
5374
|
if (!t) return null;
|
|
5374
5375
|
let l = t.seriesDataLabels, u = o.get(n);
|
|
5375
|
-
if (
|
|
5376
|
+
if (z(l, u) || !l && !u && !a.visible) return null;
|
|
5376
5377
|
let d = typeof s == "boolean" ? s : !1, f = typeof s == "number" ? s : void 0, p = !d && (u?.showVal ?? l?.showVal ?? a.showVal), m = u?.showCatName ?? l?.showCatName ?? a.showCatName, h = u?.showSerName ?? l?.showSerName ?? a.showSerName ?? !1, g = u?.showPercent ?? l?.showPercent ?? a.showPercent ?? !1, _ = u?.showLegendKey ?? l?.showLegendKey ?? !1, v = u?.formatCode ?? l?.formatCode ?? e.dataLabelFormatCode ?? null, y = et({
|
|
5377
5378
|
customText: u?.text,
|
|
5378
5379
|
showCategory: m,
|
|
@@ -5398,9 +5399,9 @@ function Ri(e, t, n, r, i, a, o, s, c) {
|
|
|
5398
5399
|
fontBold: u?.fontBold ?? l?.fontBold,
|
|
5399
5400
|
fontFace: u?.fontFace ?? l?.fontFace,
|
|
5400
5401
|
manualLayout: u?.manualLayout,
|
|
5401
|
-
labelBox:
|
|
5402
|
+
labelBox: We(u?.labelBox, l?.labelBox),
|
|
5402
5403
|
richRuns: u?.text ? u.richRuns : void 0,
|
|
5403
|
-
textStyle:
|
|
5404
|
+
textStyle: Re(u, l)
|
|
5404
5405
|
};
|
|
5405
5406
|
}
|
|
5406
5407
|
function zi(e, t, n, r, i) {
|
|
@@ -5418,7 +5419,7 @@ function Hi(e, t, n, r) {
|
|
|
5418
5419
|
return zi(e, r, "fill", t, n) ?? zi(e, e.chartexDataPointStyle, "fill", t, n) ?? Vi(e, t, n);
|
|
5419
5420
|
}
|
|
5420
5421
|
function Ui(e, t) {
|
|
5421
|
-
return
|
|
5422
|
+
return Be(e, t);
|
|
5422
5423
|
}
|
|
5423
5424
|
function Wi(e, t) {
|
|
5424
5425
|
return A(e, t);
|
|
@@ -5459,7 +5460,7 @@ function Ji(e, t, n, r, i, a = e.chartexDataPointStyle) {
|
|
|
5459
5460
|
} : s;
|
|
5460
5461
|
}
|
|
5461
5462
|
function Yi(e, t, n, r, i, a, o, s = 0) {
|
|
5462
|
-
return t.fillType === "solid" ? t.color.startsWith("#") ? t.color : `#${t.color}` :
|
|
5463
|
+
return t.fillType === "solid" ? t.color.startsWith("#") ? t.color : `#${t.color}` : Fe(t, e, n, r, i, a, s) ?? o;
|
|
5463
5464
|
}
|
|
5464
5465
|
function Xi(e, t, n, r, i, a, o = {}) {
|
|
5465
5466
|
let s = (t, n) => ({
|
|
@@ -5542,13 +5543,13 @@ function oa(e, t, n) {
|
|
|
5542
5543
|
labels: Math.max(2, o)
|
|
5543
5544
|
};
|
|
5544
5545
|
}
|
|
5545
|
-
function sa(t, n, r =
|
|
5546
|
+
function sa(t, n, r = W, i) {
|
|
5546
5547
|
let a = I(t.chartType), o = t.chartexBox != null;
|
|
5547
5548
|
if (!a && !o) return null;
|
|
5548
5549
|
let s = j(t), c = t.series.some((e, n) => {
|
|
5549
5550
|
let r = s[n];
|
|
5550
5551
|
return (r?.kind === "bubble" || r?.kind === "scatter" ? "scatter" : e.seriesType ?? (t.chartType === "bubble" ? "scatter" : t.chartType)) === "scatter" ? (e.categories ?? t.categories).some((e) => Number.isFinite(Number.parseFloat(e))) : !1;
|
|
5551
|
-
}), u = Vt(t) && pr(t).length > 0 && t.dataTable?.showKeys === !0, d =
|
|
5552
|
+
}), u = Vt(t) && pr(t).length > 0 && t.dataTable?.showKeys === !0, d = Ae(t), f = t.chartType === "bubble" && i ? _i(t, t.series.map((e, n) => gi(t, e, n)), !c, i.w, i.h) : 0, p = /* @__PURE__ */ new Map();
|
|
5552
5553
|
if (i) for (let e of t.plotGroups ?? []) {
|
|
5553
5554
|
if (e.kind !== "bubble" || e.seriesCount === 0) continue;
|
|
5554
5555
|
let n = t.series.slice(e.seriesStart, e.seriesStart + e.seriesCount).map((n, r) => gi(t, n, e.seriesStart + r));
|
|
@@ -5560,7 +5561,7 @@ function sa(t, n, r = re, i) {
|
|
|
5560
5561
|
}
|
|
5561
5562
|
let m = 0, h = (e, t = 1) => t <= 0 || e <= 0 ? !0 : !Number.isSafeInteger(t) || e > Math.floor((ta - m) / t) ? !1 : (m += e * t, !0), g = (e, t = 1, i = Math.max(2, 5 * r)) => {
|
|
5562
5563
|
if (t <= 0 || e == null) return !0;
|
|
5563
|
-
let a = e.fillType === "image" ? E(e, n, i, i, r) :
|
|
5564
|
+
let a = e.fillType === "image" ? E(e, n, i, i, r) : oe(e);
|
|
5564
5565
|
return e.fillType === "gradient" && a > ea ? !1 : h(a, t);
|
|
5565
5566
|
};
|
|
5566
5567
|
if (a) for (let n = 0; n < t.series.length; n++) {
|
|
@@ -5573,17 +5574,17 @@ function sa(t, n, r = re, i) {
|
|
|
5573
5574
|
bubbleSizeRepresents: o?.bubbleSizeRepresents ?? t.bubbleSizeRepresents,
|
|
5574
5575
|
showNegativeBubbles: x.showNegativeBubbles
|
|
5575
5576
|
} : void 0, C = o?.kind === "bubble" ? p.get(o) ?? 0 : f;
|
|
5576
|
-
if (!(_ === "line" || _ === "stackedLine" || _ === "stackedLinePct" || _ === "area" || _ === "stackedArea" || _ === "stackedAreaPct" || _ === "scatter" || _ === "radar" || _ === "stock") ||
|
|
5577
|
-
let w = _ === "area" || _ === "stackedArea" || _ === "stackedAreaPct" ? (a.showMarker === !0 ||
|
|
5578
|
-
if (!w && !
|
|
5577
|
+
if (!(_ === "line" || _ === "stackedLine" || _ === "stackedLinePct" || _ === "area" || _ === "stackedArea" || _ === "stackedAreaPct" || _ === "scatter" || _ === "radar" || _ === "stock") || Pe(_, v, y, b)) continue;
|
|
5578
|
+
let w = _ === "area" || _ === "stackedArea" || _ === "stackedAreaPct" ? (a.showMarker === !0 || de(a)) && a.markerSymbol !== "none" : _ === "stock" ? a.markerSymbol != null && a.markerSymbol !== "none" : a.showMarker !== !1 && a.markerSymbol !== "none";
|
|
5579
|
+
if (!w && !re(a)) continue;
|
|
5579
5580
|
let T = Math.max(a.values.length, a.categories?.length ?? 0, t.categories.length), E = jt(a.dataPointOverrides);
|
|
5580
5581
|
for (let o = 0; o < T; o++) {
|
|
5581
|
-
if (!
|
|
5582
|
+
if (!Ne(t, a, _, o, c, x) || m && (C <= 0 || fe(S, a.bubbleSizes?.[o]) == null)) continue;
|
|
5582
5583
|
let s = E.get(o);
|
|
5583
|
-
if (!
|
|
5584
|
-
let l = m ? mi(t, a, s, o, At(n, a)) : null, u = m ? l.paint :
|
|
5584
|
+
if (!ye(me(a, s, "circle", w))) continue;
|
|
5585
|
+
let l = m ? mi(t, a, s, o, At(n, a)) : null, u = m ? l.paint : je(a, s, o), d = Math.max(2, (s?.markerSize ?? a.markerSize ?? 5) * r);
|
|
5585
5586
|
if (_ === "scatter" && m) {
|
|
5586
|
-
let e =
|
|
5587
|
+
let e = fe(S, a.bubbleSizes?.[o]);
|
|
5587
5588
|
d = e == null ? 0 : fi(S, e) * C;
|
|
5588
5589
|
} else _ === "radar" && s?.markerSize == null && a.markerSize == null && i && (d = Math.max(4 * r, Math.min(i.w, i.h) * .025));
|
|
5589
5590
|
if (!g(u, 1, d)) return ta + 1;
|
|
@@ -5592,20 +5593,20 @@ function sa(t, n, r = re, i) {
|
|
|
5592
5593
|
if (!g(n, 1, d) || e(a, s) && l.paint !== null && !h(bi)) return ta + 1;
|
|
5593
5594
|
}
|
|
5594
5595
|
}
|
|
5595
|
-
if (
|
|
5596
|
-
let i = d.has(n), o =
|
|
5596
|
+
if (ye(a.markerSymbol ?? (_ === "stock" ? "none" : "circle")) && De(v, y, a, b)) {
|
|
5597
|
+
let i = d.has(n), o = Ce(t, a, _, T, c, x), s = oa(t, a, r), l = m ? mi(t, a, void 0, n, At(n, a)) : null, f = m ? l.paint : V(a), p = m ? hi(t, a, void 0, n) : null, v = (t, n) => g(f, t, n) && (!m || g(p.paint, t, n)) && (!m || !e(a, void 0) || l.paint === null || h(bi, t));
|
|
5597
5598
|
if (t.showLegend && !i && !v(1, s.legend) || u && !v(1, s.table) || !v(o, s.labels)) return ta + 1;
|
|
5598
5599
|
}
|
|
5599
5600
|
}
|
|
5600
5601
|
let _ = t.chartexBox;
|
|
5601
5602
|
if (_) {
|
|
5602
5603
|
let e = _.series.length, n = t.chartexDataPointMarkerStyle ?? t.chartexDataPointStyle;
|
|
5603
|
-
if (
|
|
5604
|
+
if (ye(t.chartStyleMarkerSymbol ?? t.chartexMarkerSymbol ?? "circle")) for (let i = 0; i < e; i++) {
|
|
5604
5605
|
let a = _.series[i];
|
|
5605
5606
|
if (!a.showNonoutliers && !a.showOutliers) continue;
|
|
5606
5607
|
let o = 0;
|
|
5607
5608
|
for (let e of a.valuesByCategory) {
|
|
5608
|
-
let t =
|
|
5609
|
+
let t = le(e, a.quartileMethod);
|
|
5609
5610
|
t && (a.showNonoutliers && (o += t.inner.length), a.showOutliers && (o += t.outliers.length));
|
|
5610
5611
|
}
|
|
5611
5612
|
if (!g(qi(t, Li(a, i), e, a.chartexStyle, a.color, n), o, Math.max(2, 3 * r))) return ta + 1;
|
|
@@ -5617,7 +5618,7 @@ function ca(e) {
|
|
|
5617
5618
|
let t = 0;
|
|
5618
5619
|
for (let n of [e?.fillPaint, e?.borderFill]) {
|
|
5619
5620
|
if (!n) continue;
|
|
5620
|
-
let e =
|
|
5621
|
+
let e = oe(n);
|
|
5621
5622
|
if (n.fillType === "gradient" && e > na) return null;
|
|
5622
5623
|
t += e;
|
|
5623
5624
|
}
|
|
@@ -5625,7 +5626,7 @@ function ca(e) {
|
|
|
5625
5626
|
}
|
|
5626
5627
|
function la(e, t, n, r) {
|
|
5627
5628
|
let i = t.seriesDataLabels;
|
|
5628
|
-
return
|
|
5629
|
+
return z(i, r) ? !1 : !!(r?.text || (r?.showVal ?? i?.showVal ?? e.showDataLabels) || (r?.showCatName ?? i?.showCatName) || (r?.showSerName ?? i?.showSerName) || (r?.showPercent ?? i?.showPercent) || (r?.showBubbleSize ?? i?.showBubbleSize) || (r?.showLegendKey ?? i?.showLegendKey)) && n < Math.max(t.values.length, t.categories?.length ?? 0, e.categories.length);
|
|
5629
5630
|
}
|
|
5630
5631
|
function ua(e, t) {
|
|
5631
5632
|
if (e.chartexSunburst || e.chartexTreemap) return null;
|
|
@@ -5646,7 +5647,7 @@ function ua(e, t) {
|
|
|
5646
5647
|
} else if (!aa(e, t, o, c, a)) continue;
|
|
5647
5648
|
let l = n.get(c);
|
|
5648
5649
|
if (!la(e, t, c, l)) continue;
|
|
5649
|
-
let u =
|
|
5650
|
+
let u = We(l?.labelBox, t.seriesDataLabels?.labelBox);
|
|
5650
5651
|
if (u && !r(u)) return ra + 1;
|
|
5651
5652
|
}
|
|
5652
5653
|
if (!i) {
|
|
@@ -5672,7 +5673,7 @@ function pa(e, t, n, r) {
|
|
|
5672
5673
|
if (i?.length) for (let a of i) {
|
|
5673
5674
|
let i = n.x + a.x * n.w, o = n.y + a.y * n.h, s = a.w * n.w, c = a.h * n.h;
|
|
5674
5675
|
if (!(s > 0 && c > 0)) continue;
|
|
5675
|
-
let l = i + (a.lIns ?? 91440) /
|
|
5676
|
+
let l = i + (a.lIns ?? 91440) / He * r, u = o + (a.tIns ?? 45720) / He * r, d = i + s - (a.rIns ?? 91440) / He * r, f = o + c - (a.bIns ?? 45720) / He * r, p = d - l, m = f - u;
|
|
5676
5677
|
if (!(p > 0 && m > 0)) continue;
|
|
5677
5678
|
let h = (e, t) => {
|
|
5678
5679
|
let n = Math.max(1, ...t.map((e) => e.fontPx));
|
|
@@ -5728,7 +5729,7 @@ function ha(e, t, n, r, i, a) {
|
|
|
5728
5729
|
let o = Math.max(0, Math.min(a, r / 2, i / 2));
|
|
5729
5730
|
e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.quadraticCurveTo(t + r, n, t + r, n + o), e.lineTo(t + r, n + i - o), e.quadraticCurveTo(t + r, n + i, t + r - o, n + i), e.lineTo(t + o, n + i), e.quadraticCurveTo(t, n + i, t, n + i - o), e.lineTo(t, n + o), e.quadraticCurveTo(t, n, t + o, n), e.closePath();
|
|
5730
5731
|
}
|
|
5731
|
-
function ga(e, n, r, i =
|
|
5732
|
+
function ga(e, n, r, i = W, a = 0, o, s, c, l) {
|
|
5732
5733
|
e.save();
|
|
5733
5734
|
try {
|
|
5734
5735
|
if (fa(e, r, S(n))) return;
|
|
@@ -5736,17 +5737,17 @@ function ga(e, n, r, i = re, a = 0, o, s, c, l) {
|
|
|
5736
5737
|
let { x: u, y: d, w: f, h: p } = r, m = n.roundedCorners === !0, h = m ? ma * i : 0;
|
|
5737
5738
|
if (m && (ha(e, u, d, f, p, h), e.clip()), n.chartFillHidden !== !0) if (n.chartFill?.fillType === "image") t(e, n.chartFill, u, d, f, p, i, a);
|
|
5738
5739
|
else if (n.chartFill) {
|
|
5739
|
-
let t =
|
|
5740
|
+
let t = Fe(n.chartFill, e, u, d, f, p, a);
|
|
5740
5741
|
t && (e.fillStyle = t), t && e.fillRect(u, d, f, p);
|
|
5741
5742
|
} else n.chartBg && (e.fillStyle = `#${n.chartBg}`, e.fillRect(u, d, f, p));
|
|
5742
5743
|
if (n.chartBorderHidden !== !0 && (n.chartBorderLineFill || n.chartBorderColor)) {
|
|
5743
5744
|
e.save();
|
|
5744
|
-
let t = n.chartBorderLineFill ?
|
|
5745
|
+
let t = n.chartBorderLineFill ? Fe(n.chartBorderLineFill, e, u, d, f, p, a) : n.chartBorderColor ? `#${n.chartBorderColor}` : null;
|
|
5745
5746
|
if (!t) e.restore();
|
|
5746
5747
|
else {
|
|
5747
5748
|
e.strokeStyle = t;
|
|
5748
|
-
let r = n.chartBorderWidthEmu ? Math.max(.5, n.chartBorderWidthEmu /
|
|
5749
|
-
e.setLineDash(Ni(n.chartBorderCustomDash, n.chartBorderDash, r)), e.lineCap = n.chartBorderCap === "rnd" ? "round" : n.chartBorderCap === "sq" ? "square" : "butt", e.lineJoin = n.chartBorderJoin === "round" || n.chartBorderJoin === "bevel" ? n.chartBorderJoin : "miter",
|
|
5749
|
+
let r = n.chartBorderWidthEmu ? Math.max(.5, n.chartBorderWidthEmu / He) * i : 1;
|
|
5750
|
+
e.setLineDash(Ni(n.chartBorderCustomDash, n.chartBorderDash, r)), e.lineCap = n.chartBorderCap === "rnd" ? "round" : n.chartBorderCap === "sq" ? "square" : "butt", e.lineJoin = n.chartBorderJoin === "round" || n.chartBorderJoin === "bevel" ? n.chartBorderJoin : "miter", be(e, u, d, f, p, r, n.chartBorderCompound, m ? h : 0), e.restore();
|
|
5750
5751
|
}
|
|
5751
5752
|
}
|
|
5752
5753
|
let g = n.chartexBox != null || n.chartexSunburst != null || n.chartexTreemap != null || n.chartexRegionMap != null;
|
|
@@ -5846,8 +5847,8 @@ function ga(e, n, r, i = re, a = 0, o, s, c, l) {
|
|
|
5846
5847
|
e.restore();
|
|
5847
5848
|
}
|
|
5848
5849
|
}
|
|
5849
|
-
function _a(e, t, n, r =
|
|
5850
|
-
|
|
5850
|
+
function _a(e, t, n, r = W, i = 0, a, o, s, c) {
|
|
5851
|
+
he(s, () => {
|
|
5851
5852
|
ga(e, t, n, r, i, a, o, s, c);
|
|
5852
5853
|
});
|
|
5853
5854
|
}
|