@silurus/ooxml 0.88.0 → 0.89.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -23
- package/THIRD_PARTY_NOTICES.md +8 -7
- package/dist/abort-VrnK7mdP.js +10 -0
- package/dist/assets/render-worker-C5G_Nr_A.js +35 -0
- package/dist/assets/render-worker-DQfWdNsm.js +16 -0
- package/dist/assets/render-worker-Ds7LjwU-.js +15 -0
- package/dist/{hyperlink-Cxzhet30.js → bounded-raw-part-cache-CsnNptAy.js} +4937 -7458
- package/dist/bundled-asset-url-E2nXURF9.js +15 -0
- package/dist/canvas-viewer-mechanics-BZ8QCrRi.js +675 -0
- package/dist/cfb-guard-dNeUiANF.js +528 -0
- package/dist/chart-ex.mjs +667 -663
- package/dist/comment-overlay-controller-CBvQx-En.js +994 -0
- package/dist/comment-ui-runtime-B7ZvovcS.js +2 -0
- package/dist/{comment-ui-runtime-DcJOYlw-.js → comment-ui-runtime-BKidRH36.js} +5 -5
- package/dist/{comment-ui-runtime-CWGqn5Vr.js → comment-ui-runtime-C47QoDUy.js} +5 -5
- package/dist/delimited-text-worker-host-CikWU6_m.js +27 -0
- package/dist/document-model-source-MzFPrxt0.js +249 -0
- package/dist/document-pull-client-BoJeuURD.js +35941 -0
- package/dist/document-pull-worker-CaP8XESP.js +104 -0
- package/dist/docx-BN70UhvX.js +495 -0
- package/dist/docx-BRRtSvk3.js +3563 -0
- package/dist/docx-model-source-CTO9iw_W.js +98 -0
- package/dist/docx-source-worker.mjs +455 -0
- package/dist/docx.mjs +7 -7
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/drawingml-shape-CHmq8kpM.js +310 -0
- package/dist/duotone-DN8P4aXe.js +126 -0
- package/dist/emf-CGFQIz6c.js +1790 -0
- package/dist/font-preload-demand-Dmy31xt-.js +2058 -0
- package/dist/grid-geometry-C3IG20ut.js +384 -0
- package/dist/host-layout-DVMw8hDY.js +56 -0
- package/dist/host-layout-measure-DsuQ2UJs.js +7 -0
- package/dist/in-process-pull-transport-DuXcPZng.js +29 -0
- package/dist/index.mjs +4 -4
- package/dist/internal-companion.mjs +12 -0
- package/dist/line-distribute-Bu8psjGd.js +2799 -0
- package/dist/math.mjs +2 -2
- package/dist/mathjax-stix2.js +10 -10
- package/dist/model-source-kz_NkZqT.js +179 -0
- package/dist/model-source-s5hRpk4w.js +61 -0
- package/dist/model-source-session-6fuaqbGs.js +71 -0
- package/dist/model-source-session-DqrR4XHR.js +85 -0
- package/dist/model-source-session-cPJSF_Ak.js +58 -0
- package/dist/node.mjs +7 -1327
- package/dist/{pixel-budget-9P63Bsk5.js → pixel-budget-BpTYrepD.js} +13 -10
- package/dist/plot-area-frame-Bs_j4uu7.js +41811 -0
- package/dist/pptx-CaJ6ILnw.js +183 -0
- package/dist/pptx-_BOGcBym.js +2936 -0
- package/dist/pptx-model-source-B_9afw9R.js +37 -0
- package/dist/pptx-source-worker.mjs +446 -0
- package/dist/pptx.mjs +8 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/presentation-model-source-CGHLyX32.js +77 -0
- package/dist/raster-target-YQ4G6rxo.js +42 -0
- package/dist/region-map.mjs +117 -153
- package/dist/{render-D3iqVKCo.js → render-CzbDzRKa.js} +3 -3
- package/dist/{render-worker-host-B5wQfB7U.js → render-worker-host-B1u6BOUd.js} +1 -1
- package/dist/{render-worker-host-D4123J27.js → render-worker-host-C-EECo68.js} +1 -1
- package/dist/{render-worker-host-Di3LxLc0.js → render-worker-host-DDqZTCVf.js} +1 -1
- package/dist/renderer-CD2cvVAF.js +5823 -0
- package/dist/renderer-DRoeb14O.js +5170 -0
- package/dist/resource-measurement-Dhhm7P_l.js +772 -0
- package/dist/session-XPmC0CUd.js +656 -0
- package/dist/slide-pull-client-tq7U_fYg.js +6485 -0
- package/dist/three-d-BKwNPAP4.js +878 -0
- package/dist/three-d.mjs +925 -910
- package/dist/{raster-target-ojDdQizC.js → tiff-contract-C6M3QcPp.js} +1 -42
- package/dist/tiff.mjs +401 -248
- package/dist/types/chart-ex.d.ts +149 -2
- package/dist/types/docx.d.ts +333 -96
- package/dist/types/index.d.ts +566 -301
- package/dist/types/internal-companion.d.ts +11 -0
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +422 -9
- package/dist/types/pptx.d.ts +302 -95
- package/dist/types/region-map.d.ts +149 -2
- package/dist/types/three-d.d.ts +149 -2
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +343 -132
- package/dist/wasm-loader-rlgHmcSv.js +35 -0
- package/dist/wasm-runtime-generation-D6TKZdNb.js +97 -0
- package/dist/workbook-model-source-BIGrfZy6.js +94 -0
- package/dist/worker-source-DrwhR9fw.js +22 -0
- package/dist/worker-source-SbudzjYL.js +22 -0
- package/dist/worker-source-UAi3GNcM.js +22 -0
- package/dist/worksheet-pull-client-ClvPO_Jf.js +579 -0
- package/dist/xlsx-CsmREBaZ.js +5819 -0
- package/dist/xlsx-DmHfeNNp.js +534 -0
- package/dist/xlsx-model-source-D1flORqy.js +309 -0
- package/dist/xlsx-source-worker.mjs +525 -0
- package/dist/xlsx.mjs +8 -7
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +42 -16
- package/dist/assets/render-worker-1uPAxMZr.js +0 -31
- package/dist/assets/render-worker-BlvJybji.js +0 -10
- package/dist/assets/render-worker-CzmiJfFL.js +0 -11
- package/dist/bounded-raw-part-cache-Cg1BsSZQ.js +0 -119
- package/dist/canvas-viewer-mechanics-DbLz0rYW.js +0 -1384
- package/dist/cjk-fallback-bLI3z70h.js +0 -46
- package/dist/comment-occurrence-C8Y2uoVr.js +0 -6
- package/dist/comment-ui-runtime-BsK8pmUT.js +0 -2
- package/dist/comments-Diid5ujN.js +0 -246
- package/dist/delimited-text-worker-host-BVY-Ecni.js +0 -27
- package/dist/document-pull-client-B9PTM-pL.js +0 -27280
- package/dist/docx-BF9WXrYH.js +0 -3103
- package/dist/dom-interaction-boundary-Cnm8DSBN.js +0 -223
- package/dist/highlight-rect-C5hkRqUr.js +0 -13
- package/dist/line-distribute-D1WNHKz_.js +0 -1023
- package/dist/line-metrics-B60C86uh.js +0 -60
- package/dist/plot-area-frame-DLTYKHNP.js +0 -4354
- package/dist/pptx-DkyYBYoL.js +0 -3065
- package/dist/renderer-B4GZb5We.js +0 -6492
- package/dist/resource-measurement-SHQCbkh2.js +0 -150
- package/dist/session-BGq81gRQ.js +0 -743
- package/dist/slide-pull-client-DiPnm240.js +0 -6253
- package/dist/source-key-DIJG8BA0.js +0 -42
- package/dist/three-d-DJBl8g8M.js +0 -1162
- package/dist/transfer-p6iCC2R7.js +0 -6
- package/dist/units-BzZ0gAxs.js +0 -4
- package/dist/worksheet-pull-client-BM8ywvbu.js +0 -458
- package/dist/xlsx-C9NVjgaV.js +0 -8484
- /package/dist/{chunk-DmhlhrBa.js → chunk-Dy4uBu1J.js} +0 -0
- /package/dist/{mathjax-DoyWZbSp.js → mathjax-BhwN6ilc.js} +0 -0
- /package/dist/{read-only-comment-decoration-Dz7eTQ4d.js → read-only-comment-decoration-PidH0wnP.js} +0 -0
- /package/dist/{read-only-comment-margin-DkgzASAl.js → read-only-comment-margin-B52rDVKo.js} +0 -0
- /package/dist/{renderer-module-contract-D91rkYHH.js → renderer-module-contract-CWM7jv6d.js} +0 -0
- /package/dist/{visible-index-BgiHEc1z.js → visible-index-FeVA0mGE.js} +0 -0
package/dist/chart-ex.mjs
CHANGED
|
@@ -1,502 +1,476 @@
|
|
|
1
|
-
import { $ as e, $
|
|
2
|
-
import { A as
|
|
3
|
-
import {
|
|
4
|
-
import { t as Me } from "./renderer-module-contract-D91rkYHH.js";
|
|
5
|
-
function Ne(e) {
|
|
6
|
-
return e != null && Number.isFinite(e) ? e : null;
|
|
7
|
-
}
|
|
8
|
-
function Pe(e) {
|
|
9
|
-
return Object.is(e, -0) ? "0" : String(Number.isInteger(e) ? e : Number(e.toPrecision(6)));
|
|
10
|
-
}
|
|
11
|
-
function Fe(e, t) {
|
|
12
|
-
if (e.length > 1048576) return { kind: "tooManyInputPoints" };
|
|
13
|
-
let n = t.intervalClosed === "r" ? "r" : "l", r = Ne(t.underflow), i = Ne(t.overflow);
|
|
14
|
-
r != null && i != null && r >= i && (r = null, i = null);
|
|
15
|
-
let a = (e) => r != null && (n === "r" ? e <= r : e < r), o = (e) => i != null && (n === "r" ? e > i : e >= i), s = Infinity, c = -Infinity, l = 0, u = 0, d = 0;
|
|
16
|
-
for (let t of e) {
|
|
17
|
-
let e = Ne(t);
|
|
18
|
-
e != null && (a(e) ? u++ : o(e) ? d++ : (l++, s = Math.min(s, e), c = Math.max(c, e)));
|
|
19
|
-
}
|
|
20
|
-
if (l + u + d === 0) return {
|
|
21
|
-
kind: "bins",
|
|
22
|
-
categories: [],
|
|
23
|
-
counts: []
|
|
24
|
-
};
|
|
25
|
-
let f = [], p = [];
|
|
26
|
-
if (r != null && (f.push(`${n === "r" ? "≤" : "<"} ${Pe(r)}`), p.push(u)), l > 0) {
|
|
27
|
-
let u = r ?? s, d = i ?? c, m = d - u;
|
|
28
|
-
if (!Number.isFinite(m)) f.push(`${Pe(u)} – ${Pe(d)}`), p.push(l);
|
|
29
|
-
else {
|
|
30
|
-
let s = Ne(t.binSize), c;
|
|
31
|
-
c = s != null && s > 0 && m > 0 ? Math.max(1, Math.ceil(m / s)) : t.binCount != null && Number.isFinite(t.binCount) && t.binCount > 0 ? Math.max(1, Math.floor(t.binCount)) : Math.max(1, Math.ceil(Math.sqrt(l)));
|
|
32
|
-
let d = m <= 0 ? 1 : Math.min(512, c), h = m > 0 && s != null && s > 0 && c <= 512, g = m === 0 ? 1 : h ? s : m / d, _ = Array(d).fill(0);
|
|
33
|
-
for (let t of e) {
|
|
34
|
-
let e = Ne(t);
|
|
35
|
-
if (e == null || a(e) || o(e)) continue;
|
|
36
|
-
let r = h ? (e - u) / g : m === 0 ? 0 : (e - u) / m * d, i = n === "r" ? Math.ceil(r) - 1 : Math.floor(r), s = Math.max(0, Math.min(d - 1, i));
|
|
37
|
-
_[s]++;
|
|
38
|
-
}
|
|
39
|
-
for (let e = 0; e < d; e++) {
|
|
40
|
-
let t = h ? u + g * e : u + e / d * m, a = h ? t + g : u + m * ((e + 1) / d), o = i == null ? a : Math.min(a, i), s = n === "r" && (r != null || e > 0) ? ">" : "≥", c = n === "l" && (i != null || e < d - 1) ? "<" : "≤";
|
|
41
|
-
f.push(`${s} ${Pe(t)} – ${c} ${Pe(o)}`), p.push(_[e]);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return i != null && (f.push(`${n === "r" ? ">" : "≥"} ${Pe(i)}`), p.push(d)), {
|
|
46
|
-
kind: "bins",
|
|
47
|
-
categories: f,
|
|
48
|
-
counts: p
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region packages/core/src/chart/pareto-layout.ts
|
|
53
|
-
function Ie(e, t) {
|
|
54
|
-
return e == null ? e : e.flatMap((e) => {
|
|
55
|
-
let n = t.get(e.idx);
|
|
56
|
-
return n == null ? [] : [{
|
|
57
|
-
...e,
|
|
58
|
-
idx: n
|
|
59
|
-
}];
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function W(e, t) {
|
|
63
|
-
return e == null ? e : t.map((t) => e[t] ?? null);
|
|
64
|
-
}
|
|
65
|
-
function G(e, t, n = {}) {
|
|
66
|
-
let r = e.values.map((e, t) => ({
|
|
67
|
-
value: e,
|
|
68
|
-
sourceIndex: t
|
|
69
|
-
})).filter((e) => e.value != null && Number.isFinite(e.value) && e.value >= 0);
|
|
70
|
-
n.sortDescending !== !1 && r.sort((e, t) => t.value - e.value || e.sourceIndex - t.sourceIndex);
|
|
71
|
-
let i = r[0]?.value ?? 0, a = i > 0 ? r.reduce((e, t) => e + t.value / i, 0) : 0, o = 0, s = r.map((n) => (i > 0 && (o += n.value / i), {
|
|
72
|
-
sourceIndex: n.sourceIndex,
|
|
73
|
-
category: e.categories?.[n.sourceIndex] ?? t[n.sourceIndex] ?? String(n.sourceIndex + 1),
|
|
74
|
-
value: n.value,
|
|
75
|
-
cumulativeFraction: a > 0 ? o >= a ? 1 : o / a : 0
|
|
76
|
-
})), c = s.map((e) => e.sourceIndex), l = new Map(c.map((e, t) => [e, t])), u = s.map((e) => e.category), d = {
|
|
77
|
-
...e,
|
|
78
|
-
categories: u,
|
|
79
|
-
catFormatCodes: W(e.catFormatCodes, c),
|
|
80
|
-
dataPointColors: W(e.dataPointColors, c),
|
|
81
|
-
dataLabelColors: W(e.dataLabelColors, c),
|
|
82
|
-
dataPointOverrides: Ie(e.dataPointOverrides, l),
|
|
83
|
-
dataLabelOverrides: Ie(e.dataLabelOverrides, l)
|
|
84
|
-
};
|
|
85
|
-
return {
|
|
86
|
-
points: s,
|
|
87
|
-
categories: u,
|
|
88
|
-
orderedSeries: {
|
|
89
|
-
...d,
|
|
90
|
-
values: s.map((e) => e.value)
|
|
91
|
-
},
|
|
92
|
-
series: {
|
|
93
|
-
...d,
|
|
94
|
-
values: s.map((e) => e.cumulativeFraction)
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
//#endregion
|
|
1
|
+
import { $ as e, $i as t, $n as n, Fn as r, Ga as i, Gi as a, In as o, J as s, Ln as c, Mt as l, Nn as u, Pn as d, Qi as f, Qn as p, R as m, Rn as h, Rt as g, S as _, Ta as v, Ut as y, Va as b, Wt as x, Y as S, Ya as C, Yt as w, Zn as T, Zt as E, _a as D, _n as O, b as k, bt as A, ct as j, da as M, ea as N, er as P, fn as F, gn as I, ha as ee, hn as te, ia as ne, in as L, it as R, jt as re, ma as ie, mn as ae, no as z, nt as oe, oa as se, on as ce, ot as le, pn as ue, rt as de, s as fe, st as pe, t as me, ta as he, tt as ge, ua as _e, vi as ve, x as B, xn as V, yt as ye, za as be, zt as H } from "./plot-area-frame-Bs_j4uu7.js";
|
|
2
|
+
import { A as xe, C as Se, D as Ce, E as we, O as Te, S as Ee, T as De, _ as U, a as Oe, b as ke, c as Ae, d as je, f as Me, g as Ne, i as Pe, j as Fe, k as Ie, l as Le, m as Re, o as ze, p as Be, s as Ve, u as He, v as Ue, w as We, x as Ge, y as W } from "./renderer-CD2cvVAF.js";
|
|
3
|
+
import { t as G } from "./renderer-module-contract-CWM7jv6d.js";
|
|
99
4
|
//#region packages/core/src/chart/chart-ex-renderer.ts
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function q(e, t, n, r) {
|
|
104
|
-
return t?.fillHidden === !0 || t?.color != null || K(t?.chartexStyle) ? U(e, r, 3, t?.fillHidden === !0 ? {
|
|
105
|
-
...t.chartexStyle,
|
|
106
|
-
fillHidden: !0,
|
|
107
|
-
fillPaintAuthored: !0
|
|
108
|
-
} : t?.chartexStyle, t?.color) : n?.chartexStyle?.fillPaintAuthored === !0 ? U(e, r, 3, n.chartexStyle, n.color) : U(e, r, 3, n?.chartexStyle, n?.color);
|
|
109
|
-
}
|
|
110
|
-
function Le(e) {
|
|
111
|
-
let t = e?.chartexStyle;
|
|
112
|
-
return e?.lineHidden != null || e?.lineColor != null || e?.lineWidthEmu != null || e?.lineDash != null || t?.linePaintAuthored === !0 || t?.lineHidden != null || t?.lineColors?.some((e) => e != null) === !0 || t?.linePaints?.some((e) => e != null) === !0 || t?.lineWidthEmu != null || t?.lineDash != null || t?.lineCustomDash != null || t?.lineCap != null || t?.lineJoin != null;
|
|
113
|
-
}
|
|
114
|
-
function Re(e, n, a, o = 1) {
|
|
115
|
-
let s = 0, c = Math.max(1, a?.w ?? 32 * o), u = Math.max(1, a?.h ?? 16 * o), d = i(e, ({ label: i, linkedStyleIndex: a }) => {
|
|
116
|
-
let d = i.labelBox, f = l(d), p = f ? e.chartStyleRoles?.dataLabelCallout ?? e.chartStyleRoles?.dataLabel : e.chartStyleRoles?.dataLabel, m = f ? k(e, "dataLabelCallout") ?? k(e, "dataLabel") : k(e, "dataLabel"), g = h(d, p, m, p != null, 0, a)?.fillPaint, _ = S(d?.style, m, 0), v = d?.borderHidden === !0 ? t(m) : void 0, y = d?.borderColor != null || d?.borderFill != null || _ !== void 0 || v !== void 0 || d?.borderPaintAuthored === !0 && d?.borderHidden !== !0, x = _ === void 0 ? v === void 0 ? d?.borderFill ?? (d?.borderColor ? {
|
|
5
|
+
function Ke(e, t, n, r = 1) {
|
|
6
|
+
let a = 0, o = Math.max(1, n?.w ?? 32 * r), s = Math.max(1, n?.h ?? 16 * r), c = ae(e, ({ label: n, linkedStyleIndex: c }) => {
|
|
7
|
+
let l = n.labelBox, u = I(l), d = u ? e.chartStyleRoles?.dataLabelCallout ?? e.chartStyleRoles?.dataLabel : e.chartStyleRoles?.dataLabel, f = u ? z(e, "dataLabelCallout") ?? z(e, "dataLabel") : z(e, "dataLabel"), p = O(l, d, f, d != null, 0, c)?.fillPaint, m = be(l?.style, f, 0), h = l?.borderHidden === !0 ? b(f) : void 0, g = l?.borderColor != null || l?.borderFill != null || m !== void 0 || h !== void 0 || l?.borderPaintAuthored === !0 && l?.borderHidden !== !0, _ = m === void 0 ? h === void 0 ? l?.borderFill ?? (l?.borderColor ? {
|
|
117
8
|
fillType: "solid",
|
|
118
|
-
color:
|
|
119
|
-
} :
|
|
120
|
-
for (let e of [
|
|
9
|
+
color: l.borderColor
|
|
10
|
+
} : g ? null : i(d, c)) : h : m;
|
|
11
|
+
for (let e of [p, _]) {
|
|
121
12
|
if (!e) continue;
|
|
122
|
-
let
|
|
123
|
-
if (e.fillType === "gradient" &&
|
|
124
|
-
|
|
13
|
+
let n = e.fillType === "image" ? fe(e, t, o, s, r) ?? 1048577 : ve(e);
|
|
14
|
+
if (e.fillType === "gradient" && n > 4096 || n > 1048576 - a) {
|
|
15
|
+
a = ce + 1;
|
|
125
16
|
return;
|
|
126
17
|
}
|
|
127
|
-
|
|
18
|
+
a += n;
|
|
128
19
|
}
|
|
129
20
|
});
|
|
130
|
-
return
|
|
21
|
+
return c === "not-hierarchy" ? null : c === "too-large" ? ce + 1 : a;
|
|
22
|
+
}
|
|
23
|
+
function K(e, t, n, r) {
|
|
24
|
+
if (!e.chartexParetoOutlineOwner) return t;
|
|
25
|
+
let i = t.chartexFormatIdx ?? n, a = t.lineColor ?? U(e, i, r, t.chartexStyle);
|
|
26
|
+
return {
|
|
27
|
+
...t,
|
|
28
|
+
chartexStyle: {
|
|
29
|
+
...t.chartexStyle,
|
|
30
|
+
fillHidden: !0,
|
|
31
|
+
fillPaintAuthored: !0
|
|
32
|
+
},
|
|
33
|
+
lineColor: a,
|
|
34
|
+
lineHidden: !1
|
|
35
|
+
};
|
|
131
36
|
}
|
|
132
|
-
function
|
|
37
|
+
function qe(e, t, n = 1) {
|
|
38
|
+
if (e.chartexSuppressGeometry) return 0;
|
|
133
39
|
if (![
|
|
134
40
|
"waterfall",
|
|
135
41
|
"funnel",
|
|
136
42
|
"boxWhisker",
|
|
137
43
|
"sunburst",
|
|
138
|
-
"treemap"
|
|
44
|
+
"treemap",
|
|
45
|
+
"clusteredColumn",
|
|
46
|
+
"histogram",
|
|
47
|
+
"pareto",
|
|
48
|
+
"paretoLine"
|
|
139
49
|
].includes(e.chartType)) return null;
|
|
140
|
-
let
|
|
141
|
-
if (!e ||
|
|
142
|
-
let
|
|
143
|
-
e.fillType === "gradient" &&
|
|
144
|
-
},
|
|
145
|
-
let o =
|
|
146
|
-
o.visible &&
|
|
50
|
+
let r = 0, i = (e) => {
|
|
51
|
+
if (!e || r > 1048576) return;
|
|
52
|
+
let i = e.fillType === "image" ? fe(e, void 0, Math.max(1, t.w), Math.max(1, t.h), n) : ve(e);
|
|
53
|
+
e.fillType === "gradient" && i > 4096 || i > 1048576 - r ? r = ce + 1 : r += i;
|
|
54
|
+
}, a = (t, n, r, a) => {
|
|
55
|
+
let o = Fe(e, t, n, r, a, "#000000", { linkedNoStyleFallback: !0 });
|
|
56
|
+
o.visible && i(o.paint ?? {
|
|
147
57
|
fillType: "solid",
|
|
148
58
|
color: "000000"
|
|
149
59
|
});
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
let
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
60
|
+
}, o = (t, n, a, o) => {
|
|
61
|
+
i(Ie(e, t, n, a, o));
|
|
62
|
+
let s = xe(e, t, n, a, o, "#000000");
|
|
63
|
+
if (s.visible && !Ge(s) && i(s.paint ?? {
|
|
64
|
+
fillType: "solid",
|
|
65
|
+
color: "000000"
|
|
66
|
+
}), r > 1048576) return !1;
|
|
67
|
+
}, s = (t, n) => {
|
|
68
|
+
let r = [e.chartexDataPointStyle, e.chartexDataPointLineStyle];
|
|
69
|
+
Te(e, Se(t, n), r, r, n, 1, "#000000", { linkedNoStyleFallback: !0 }).visible && i({
|
|
70
|
+
fillType: "solid",
|
|
71
|
+
color: "000000"
|
|
72
|
+
});
|
|
73
|
+
}, c = k(e, (t, n, r) => n === 0 ? K(e, t, n, r) : t);
|
|
74
|
+
if (c) {
|
|
75
|
+
if (c.kind === "tooManyInputPoints") return ce + 1;
|
|
76
|
+
if (_(c, o), r > 1048576 || (B(c, o), r > 1048576)) return r;
|
|
77
|
+
if (e.chartType === "pareto" && c.series.length > 0) {
|
|
78
|
+
let t = e.chartexParetoOwnerIndex ?? 0, n = c.series[t], r = e.series.find((e) => e.seriesType === "line");
|
|
79
|
+
s(r ?? n, r?.chartexFormatIdx ?? n?.chartexFormatIdx ?? 0);
|
|
80
|
+
}
|
|
81
|
+
} else if (e.chartType === "paretoLine") {
|
|
82
|
+
let t = e.series[0];
|
|
83
|
+
t && y(t, e.categories, { sortDescending: e.chartexParetoSortDescending ?? !1 }).points.length > 0 && s(t, g(t, 0));
|
|
84
|
+
} else if (e.chartType === "waterfall") {
|
|
85
|
+
let t = e.series[0], n = t?.values ?? [], r = H(t?.dataPointOverrides), a = F(n, e.categories.length, e.subtotalIndices);
|
|
86
|
+
if (a.cumulativeOverflow || a.rawMax <= a.rawMin) return 0;
|
|
87
|
+
for (let n = 0; n < a.bars.length; n++) {
|
|
88
|
+
let o = a.bars[n];
|
|
89
|
+
if (!o.paintSlot) continue;
|
|
90
|
+
let s = o.semanticIndex, c = r.get(n);
|
|
91
|
+
i(Ie(e, t, c, s, 3));
|
|
92
|
+
let l = xe(e, t, c, s, 3, "#000000");
|
|
93
|
+
l.visible && !Ge(l) && i(l.paint ?? {
|
|
94
|
+
fillType: "solid",
|
|
95
|
+
color: "000000"
|
|
96
|
+
});
|
|
159
97
|
}
|
|
160
98
|
} else if (e.chartType === "funnel") {
|
|
161
99
|
let t = e.series[0], n = t?.values ?? [], r = Math.max(n.length, e.categories.length);
|
|
162
100
|
if (n.some((e) => e != null && e > 0)) {
|
|
163
|
-
let
|
|
164
|
-
for (let
|
|
101
|
+
let a = H(t?.dataPointOverrides);
|
|
102
|
+
for (let o = 0; o < r; o++) {
|
|
103
|
+
if (!((n[o] ?? 0) > 0)) continue;
|
|
104
|
+
let r = a.get(o);
|
|
105
|
+
i(Ie(e, t, r, 0, 1));
|
|
106
|
+
let s = xe(e, t, r, 0, 1, "#000000");
|
|
107
|
+
s.visible && i(s.paint ?? {
|
|
108
|
+
fillType: "solid",
|
|
109
|
+
color: "000000"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
165
112
|
}
|
|
166
113
|
} else if (e.chartType === "boxWhisker") {
|
|
167
114
|
let t = e.chartexBox, n = t?.series.length ?? 0;
|
|
168
115
|
for (let r = 0; r < n; r++) {
|
|
169
|
-
let
|
|
170
|
-
for (let t of
|
|
116
|
+
let o = t.series[r], s = o.chartexFormatIdx ?? r, c = Ue(e, s, n, o.chartexStyle, o.color);
|
|
117
|
+
for (let t of o.valuesByCategory) P(t, o.quartileMethod) && (i(c), a(e.chartexDataPointStyle, Se(o, s), s, n));
|
|
171
118
|
}
|
|
172
119
|
} else {
|
|
173
120
|
let t = e.series[0], n = 1;
|
|
174
|
-
|
|
121
|
+
ue(e, ({ node: e }) => {
|
|
175
122
|
n = Math.max(n, e.branchIndex + 1);
|
|
176
|
-
})
|
|
177
|
-
|
|
178
|
-
|
|
123
|
+
});
|
|
124
|
+
let r = H(t?.dataPointOverrides);
|
|
125
|
+
if (ue(e, ({ node: a, paintsBody: o }) => {
|
|
126
|
+
if (!o) return;
|
|
127
|
+
let s = r.get(a.labelIndex);
|
|
128
|
+
i(Ie(e, t, s, a.branchIndex, n));
|
|
129
|
+
let c = xe(e, t, s, a.branchIndex, n, "#000000", e.chartexDataPointStyle, { linkedNoStyleFallback: e.chartType === "treemap" });
|
|
130
|
+
c.visible && i(c.paint ?? {
|
|
131
|
+
fillType: "solid",
|
|
132
|
+
color: "000000"
|
|
133
|
+
});
|
|
134
|
+
}) === "too-large") return ce + 1;
|
|
179
135
|
}
|
|
180
|
-
return
|
|
136
|
+
return r;
|
|
181
137
|
}
|
|
182
|
-
function
|
|
138
|
+
function Je(e, t, n, r, i = 0) {
|
|
183
139
|
let a = t.series[0];
|
|
184
140
|
if (!a) return;
|
|
185
|
-
let o =
|
|
141
|
+
let o = x(a.values, t.chartexHistogramBinning ?? {}, a.valFormatCode, t.date1904 === !0);
|
|
186
142
|
if (o.kind === "tooManyInputPoints") {
|
|
187
|
-
|
|
143
|
+
Le(e, n, L + 1);
|
|
188
144
|
return;
|
|
189
145
|
}
|
|
190
|
-
|
|
191
|
-
...t,
|
|
146
|
+
ze(e, C(t, {
|
|
192
147
|
chartType: "clusteredBar",
|
|
193
148
|
categories: o.categories,
|
|
194
149
|
series: [{
|
|
195
150
|
...a,
|
|
196
151
|
categories: void 0,
|
|
197
|
-
values: o.counts
|
|
152
|
+
values: o.counts,
|
|
153
|
+
valFormatCode: null
|
|
198
154
|
}]
|
|
199
|
-
}, n, r, { gapPolicy: "chartex" }, i);
|
|
155
|
+
}), n, r, { gapPolicy: "chartex" }, i);
|
|
200
156
|
}
|
|
201
|
-
function
|
|
202
|
-
let { x:
|
|
203
|
-
if (
|
|
204
|
-
let { bars:
|
|
205
|
-
if (
|
|
206
|
-
t.fillStyle = "#888", t.font = "12px sans-serif", t.textAlign = "center", t.textBaseline = "middle", t.fillText("(chart values out of range)",
|
|
157
|
+
function Ye(t, n, r, i, a) {
|
|
158
|
+
let { x: o, y: l, w: u, h: d } = r, f = n.series[0]?.values ?? [], p = n.categories, g = Math.max(f.length, p.length);
|
|
159
|
+
if (g === 0 || Le(t, r, g)) return;
|
|
160
|
+
let { bars: _, rawMax: y, rawMin: b, cumulativeOverflow: x } = F(f, p.length, n.subtotalIndices);
|
|
161
|
+
if (x) {
|
|
162
|
+
t.fillStyle = "#888", t.font = "12px sans-serif", t.textAlign = "center", t.textBaseline = "middle", t.fillText("(chart values out of range)", o + u / 2, l + d / 2);
|
|
207
163
|
return;
|
|
208
164
|
}
|
|
209
|
-
if (
|
|
210
|
-
let w =
|
|
165
|
+
if (y <= b) return;
|
|
166
|
+
let w = n.subtotalIndices.length === 0 && _.every((e, t) => !e.hasValue || f[t] >= 0), T = !n.valAxisHidden && n.valAxisTickLabelPos !== "none" && !w, O = Ae(t, n, u, d, i), k = N(n, u, d, i), P = m(n.valAxisFontSizeHpt, d, i), I = m(n.catAxisFontSizeHpt, d, i), L = A(n, n.valAxisFontFace, "minor"), re = A(n, n.catAxisFontFace, "minor"), ae = oe(n, b, y, d / i);
|
|
211
167
|
t.save();
|
|
212
|
-
let
|
|
168
|
+
let z = 0;
|
|
213
169
|
if (T) {
|
|
214
|
-
t.font =
|
|
170
|
+
t.font = ye(P, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1);
|
|
215
171
|
let e = 0;
|
|
216
|
-
for (let
|
|
217
|
-
|
|
172
|
+
for (let r of ae.majorLines) e = Math.max(e, D(t, ge(n, r, !1)));
|
|
173
|
+
z = e + 8;
|
|
218
174
|
}
|
|
219
|
-
let ie = Math.max(1,
|
|
220
|
-
t.font =
|
|
221
|
-
let fe =
|
|
222
|
-
for (let e of fe) e.some(Boolean) && (
|
|
223
|
-
let ve =
|
|
224
|
-
...r,
|
|
175
|
+
let ce = T ? M(ae.majorLines.map((e) => ge(n, e, !1)), ie(P)) / 2 : 0, ue = Math.max(1, u - k.valBandW - z - u * .02) / g;
|
|
176
|
+
t.font = ye(I, re, n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1);
|
|
177
|
+
let fe = p.slice(0, g).map((e) => j(t, V(e, n.catAxisFormatCode, n.date1904), Math.max(1, ue - 8))), _e = 0;
|
|
178
|
+
for (let e of fe) e.some(Boolean) && (_e = Math.max(_e, e.length));
|
|
179
|
+
let ve = n.catAxisHidden || _e === 0 ? 0 : _e * (I + 2) + 4, B = n.series[0], be = H(B?.dataLabelOverrides), Ce = H(B?.dataPointOverrides), Ee = B?.chartexStyle, De = `#${B?.color ?? U(n, 0, 3, Ee)}`, Oe = `#${U(n, 1, 3, Ee)}`, Pe = `#${U(n, 2, 3, Ee)}`, Fe = Ue(n, 0, 3, Ee, B?.color), Re = Ue(n, 1, 3, Ee), ze = Ue(n, 2, 3, Ee), W = C(n, {
|
|
225
180
|
chartType: "clusteredBar",
|
|
226
181
|
series: [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
182
|
+
ke(n, "Increase", B, n.chartexDataPointStyle, 0, 3, De, !1, !0, !0),
|
|
183
|
+
ke(n, "Decrease", B, n.chartexDataPointStyle, 1, 3, Oe, !1, !0, !0),
|
|
184
|
+
ke(n, "Total", B, n.chartexDataPointStyle, 2, 3, Pe, !1, !0, !0)
|
|
230
185
|
]
|
|
231
|
-
}, G =
|
|
232
|
-
titleBand:
|
|
233
|
-
legendSideReserveFrac: 0,
|
|
186
|
+
}), G = Be(t, W, u, d, i), { legRightW: Ke, legLeftW: K, legTopH: qe, legBottomH: Je } = he(G, n.legendOverlay === !0), Ye = se(n, o, l, u, d, i, {
|
|
187
|
+
titleBand: O,
|
|
234
188
|
legendReserve: G,
|
|
235
189
|
pad: {
|
|
236
|
-
t:
|
|
237
|
-
r:
|
|
238
|
-
b:
|
|
239
|
-
l:
|
|
190
|
+
t: O.bandH + qe + P / 2 + 2 + ce,
|
|
191
|
+
r: Ke + u * .02,
|
|
192
|
+
b: Je + k.catBandH + ve,
|
|
193
|
+
l: K + k.valBandW + (n.valAxisHidden ? u * .02 : Math.max(u * .03, z))
|
|
240
194
|
},
|
|
241
195
|
honorPlotAreaManualLayout: !0
|
|
242
196
|
});
|
|
243
|
-
|
|
244
|
-
let { px0:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
for (let e of
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
197
|
+
Ve(t, n, o, l, u, d, l + Ye.title.topPad, Ye.title.fontPx);
|
|
198
|
+
let { px0: q, py0: J, pw: Y, ph: X } = Ye.plotRect;
|
|
199
|
+
if (Y <= 0 || X <= 0) return;
|
|
200
|
+
me(t, n, q, J, Y, X, i, a);
|
|
201
|
+
let Xe = oe(n, b, y, X / i), Z = (e) => J + X - Xe.frac(e) * X, Q = E(n.valAxisLineColor, n.valAxisLineWidthEmu, i), Ze = E(n.catAxisLineColor, n.catAxisLineWidthEmu, i), Qe = le(n, i);
|
|
202
|
+
if (!n.valAxisHidden) {
|
|
203
|
+
t.font = ye(P, L, n.valAxisFontBold ?? !1, n.valAxisFontItalic ?? !1), t.fillStyle = n.valAxisFontColor ? `#${n.valAxisFontColor}` : "#595959", t.textAlign = "right", t.textBaseline = "middle";
|
|
204
|
+
let r = pe(n, i);
|
|
205
|
+
for (let e of Xe.minorLines) R(t, q, Y, Z(e), !1, r);
|
|
206
|
+
for (let r of Xe.majorLines) {
|
|
207
|
+
let a = Z(r);
|
|
208
|
+
if (e(n)) {
|
|
209
|
+
t.strokeStyle = Qe.color, t.lineWidth = Qe.width;
|
|
210
|
+
let e = Qe.dash.length > 0 && t.getLineDash ? t.getLineDash() : [];
|
|
211
|
+
Qe.dash.length > 0 && t.setLineDash(Qe.dash), t.beginPath(), t.moveTo(q, a), t.lineTo(q + Y, a), t.stroke(), Qe.dash.length > 0 && t.setLineDash(e);
|
|
257
212
|
}
|
|
258
|
-
T && t
|
|
213
|
+
T && ee(t, ge(n, r, !1), q - 4, a, ie(P)), s(t, n.valAxisMajorTickMark, "val", q, a, Q.color, Q.width, !1, n.valAxisLineHidden, "major", i, n.valAxisLineDash);
|
|
259
214
|
}
|
|
260
|
-
for (let e of
|
|
215
|
+
for (let e of Xe.minorTicks) s(t, n.valAxisMinorTickMark, "val", q, Z(e), Q.color, Q.width, !1, n.valAxisLineHidden, "minor", i, n.valAxisLineDash);
|
|
261
216
|
}
|
|
262
|
-
let
|
|
263
|
-
|
|
264
|
-
let
|
|
265
|
-
|
|
266
|
-
let
|
|
267
|
-
if (
|
|
268
|
-
x:
|
|
269
|
-
y:
|
|
217
|
+
let $e = !n.valAxisHidden && !n.valAxisLineHidden, et = !n.catAxisHidden && !n.catAxisLineHidden;
|
|
218
|
+
$e && de(t, q, J, q, J + X, Q.color, Q.width, n.valAxisLineDash), et && de(t, q, J + X, q + Y, J + X, Ze.color, Ze.width, n.catAxisLineDash);
|
|
219
|
+
let tt = Y / g, $ = tt / (1 + v(n.barGapWidth, "chartex") / 100);
|
|
220
|
+
_.forEach((e, r) => {
|
|
221
|
+
let s = q + tt * r + (tt - $) / 2, v = Math.min(Z(e.start), Z(e.end)), y = Math.max(Z(e.start), Z(e.end)), b = Math.max(1, y - v), x = e.semanticIndex, S = Ce.get(r), C = Ie(n, B, S, x, 3), w = S?.color ? `#${S.color}` : e.isSub ? Pe : e.isPos ? De : Oe, T = We(n, n.chartexDataPointStyle, "line", x, 3), E = xe(n, B, S, x, 3, T ? `#${T}` : w);
|
|
222
|
+
if (e.paintSlot && h(t, c(S?.chartexStyle, B?.chartexStyle), n.chartexDataPointStyle, x, {
|
|
223
|
+
x: s,
|
|
224
|
+
y: v,
|
|
270
225
|
w: $,
|
|
271
|
-
h:
|
|
272
|
-
},
|
|
273
|
-
C &&
|
|
274
|
-
x:
|
|
275
|
-
y:
|
|
226
|
+
h: b
|
|
227
|
+
}, i, (e) => {
|
|
228
|
+
C && we(e, C, {
|
|
229
|
+
x: s,
|
|
230
|
+
y: v,
|
|
276
231
|
w: $,
|
|
277
|
-
h:
|
|
278
|
-
}, w,
|
|
279
|
-
|
|
280
|
-
|
|
232
|
+
h: b
|
|
233
|
+
}, w, i, a), !Ge(E) && Ne(e, E, i, {
|
|
234
|
+
x: s,
|
|
235
|
+
y: v,
|
|
236
|
+
w: $,
|
|
237
|
+
h: b
|
|
238
|
+
}, a) && e.strokeRect(s, v, $, b);
|
|
239
|
+
}), e.paintSlot && _[r + 1]?.paintSlot && r < g - 1 && n.chartexConnectorLines !== !1) {
|
|
240
|
+
let a = q + tt * (r + 1) + (tt - $) / 2, o = e.isPos ? v : y;
|
|
281
241
|
t.save();
|
|
282
|
-
let
|
|
283
|
-
|
|
242
|
+
let c = [n.chartexSeriesLineStyle, n.chartexDataPointLineStyle], l = Te(n, Se(B, x), c, c, x, 3, "#000000", { linkedNoStyleFallback: !0 });
|
|
243
|
+
Ne(t, l, i) && (l.widthEmu ?? (t.lineWidth = .75 * i), t.beginPath(), t.moveTo(s + $, o), t.lineTo(a, o), t.stroke()), t.restore();
|
|
284
244
|
}
|
|
285
|
-
let D =
|
|
286
|
-
visible:
|
|
245
|
+
let D = e.hasValue ? f[r] : 0, O = te(n, B, r, p[r] ?? "", D, {
|
|
246
|
+
visible: n.showDataLabels,
|
|
287
247
|
showVal: !0,
|
|
288
248
|
showCatName: !1
|
|
289
|
-
},
|
|
249
|
+
}, be, !e.hasValue);
|
|
290
250
|
if (O) {
|
|
291
|
-
let e = B?.dataLabelColors?.[
|
|
292
|
-
t.font = `${O.textStyle.fontItalic ? "italic " : ""}${
|
|
251
|
+
let e = B?.dataLabelColors?.[r] ?? O.fontColor ?? null, c = e ? `#${e}` : n.dataLabelFontColor ? `#${n.dataLabelFontColor}` : "#595959", f = ne(O.fontSizeHpt, i) ?? m(n.dataLabelFontSizeHpt, d, i), p = O.fontBold ?? n.dataLabelFontBold ?? !1, h = A(n, O.fontFace ?? n.dataLabelFontFace, "minor");
|
|
252
|
+
t.font = `${O.textStyle.fontItalic ? "italic " : ""}${p ? "bold " : ""}${f}px ${h}`, He(t, O.text, {
|
|
293
253
|
kind: "bar",
|
|
294
254
|
rect: {
|
|
295
|
-
x:
|
|
296
|
-
y:
|
|
255
|
+
x: s,
|
|
256
|
+
y: v,
|
|
297
257
|
w: $,
|
|
298
|
-
h:
|
|
258
|
+
h: b
|
|
299
259
|
},
|
|
300
260
|
orientation: "vertical",
|
|
301
261
|
negative: D < 0,
|
|
302
262
|
position: O.position ?? "outEnd"
|
|
303
263
|
}, {
|
|
304
|
-
x:
|
|
305
|
-
y:
|
|
306
|
-
w:
|
|
307
|
-
h:
|
|
308
|
-
},
|
|
309
|
-
x:
|
|
310
|
-
y:
|
|
311
|
-
w:
|
|
312
|
-
h:
|
|
313
|
-
},
|
|
264
|
+
x: q,
|
|
265
|
+
y: J,
|
|
266
|
+
w: Y,
|
|
267
|
+
h: X
|
|
268
|
+
}, f, c, O.manualLayout, {
|
|
269
|
+
x: o,
|
|
270
|
+
y: l,
|
|
271
|
+
w: u,
|
|
272
|
+
h: d
|
|
273
|
+
}, je(n, O.richRuns, i, h, p, O.textStyle), void 0, O.textStyle, i, O.labelBox, a);
|
|
314
274
|
}
|
|
315
|
-
}), t.textAlign = "center", t.textBaseline = "top", t.fillStyle =
|
|
316
|
-
let
|
|
317
|
-
for (let e = 0; e <
|
|
318
|
-
let n =
|
|
319
|
-
(fe[e] ?? []).forEach((e, r) => e && t.fillText(e, n,
|
|
275
|
+
}), t.textAlign = "center", t.textBaseline = "top", t.fillStyle = n.catAxisFontColor ? `#${n.catAxisFontColor}` : "#595959", t.font = ye(I, re, n.catAxisFontBold ?? !1, n.catAxisFontItalic ?? !1);
|
|
276
|
+
let nt = J + X + 4;
|
|
277
|
+
for (let e = 0; e < g && !n.catAxisHidden; e++) {
|
|
278
|
+
let n = q + tt * e + tt / 2;
|
|
279
|
+
(fe[e] ?? []).forEach((e, r) => e && t.fillText(e, n, nt + r * (I + 2)));
|
|
320
280
|
}
|
|
321
|
-
|
|
322
|
-
Pe,
|
|
281
|
+
S(t, n, o, l, u, d, q, J, Y, X, K, Je, k.catFontPx, k.valFontPx), Me(t, W, G, o, l, u, d, q, J, Y, X, O.bandH + 2, i, [
|
|
323
282
|
Fe,
|
|
324
|
-
|
|
325
|
-
|
|
283
|
+
Re,
|
|
284
|
+
ze
|
|
285
|
+
], a), t.restore();
|
|
326
286
|
}
|
|
327
|
-
function
|
|
328
|
-
let
|
|
329
|
-
if (
|
|
330
|
-
let
|
|
331
|
-
for (let e = 0; e <
|
|
332
|
-
if (!(
|
|
333
|
-
let { x:
|
|
287
|
+
function q(e, t, n, r, i) {
|
|
288
|
+
let a = t.series[0]?.values ?? [], o = Math.max(a.length, t.categories.length);
|
|
289
|
+
if (o === 0 || Le(e, n, o)) return;
|
|
290
|
+
let s = 0;
|
|
291
|
+
for (let e = 0; e < o; e++) s = Math.max(s, a[e] ?? 0);
|
|
292
|
+
if (!(s > 0)) return;
|
|
293
|
+
let { x: l, y: u, w: d, h: f } = n, p = Ae(e, t, d, f, r), g = t.series[0], _ = H(g?.dataLabelOverrides), y = `#${g?.color ?? U(t, 0, 1, g?.chartexStyle)}`, b = Ue(t, 0, 1, g?.chartexStyle, g?.color), x = {
|
|
334
294
|
...t,
|
|
335
|
-
series: [
|
|
336
|
-
}, S =
|
|
337
|
-
e.save(), e.font =
|
|
338
|
-
let
|
|
295
|
+
series: [ke(t, g?.name ?? "", g, t.chartexDataPointStyle, 0, 1, y)]
|
|
296
|
+
}, S = Be(e, x, d, f, r), { legRightW: C, legLeftW: w, legTopH: T, legBottomH: O } = he(S, t.legendOverlay === !0), k = m(t.catAxisFontSizeHpt, f, r);
|
|
297
|
+
e.save(), e.font = ye(k, A(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
298
|
+
let j = 0;
|
|
339
299
|
if (!t.catAxisHidden) {
|
|
340
|
-
for (let n = 0; n < Math.min(
|
|
341
|
-
t.categories.length > 0 && (
|
|
300
|
+
for (let n = 0; n < Math.min(o, t.categories.length); n++) j = Math.max(j, D(e, t.categories[n]));
|
|
301
|
+
t.categories.length > 0 && (j += 10);
|
|
342
302
|
}
|
|
343
|
-
let
|
|
344
|
-
titleBand:
|
|
345
|
-
legendSideReserveFrac: .22,
|
|
303
|
+
let M = se(t, l, u, d, f, r, {
|
|
304
|
+
titleBand: p,
|
|
346
305
|
legendReserve: S,
|
|
347
306
|
pad: {
|
|
348
|
-
t:
|
|
349
|
-
r: C +
|
|
350
|
-
b:
|
|
351
|
-
l: w +
|
|
307
|
+
t: p.bandH + T + 2,
|
|
308
|
+
r: C + d * .02,
|
|
309
|
+
b: O + f * .02,
|
|
310
|
+
l: w + j + d * .02
|
|
352
311
|
},
|
|
353
312
|
honorPlotAreaManualLayout: !0
|
|
354
313
|
});
|
|
355
|
-
|
|
356
|
-
let { px0:
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
314
|
+
Ve(e, t, l, u, d, f, u + M.title.topPad, M.title.fontPx);
|
|
315
|
+
let { px0: N, py0: P, pw: F, ph: I } = M.plotRect;
|
|
316
|
+
if (F <= 0 || I <= 0) return;
|
|
317
|
+
me(e, t, N, P, F, I, r, i);
|
|
318
|
+
let L = I / o, R = L / (1 + v(t.barGapWidth, "chartex") / 100), re = H(g?.dataPointOverrides);
|
|
319
|
+
for (let n = 0; n < o; n++) {
|
|
320
|
+
let o = Math.max(0, a[n] ?? 0), p = F * o / s, v = N + (F - p) / 2, b = P + L * n + (L - R) / 2, x = re.get(n), S = Ie(t, g, x, 0, 1), C = xe(t, g, x, 0, 1, y), w = (e) => {
|
|
321
|
+
S && p > 0 ? we(e, S, {
|
|
322
|
+
x: v,
|
|
323
|
+
y: b,
|
|
324
|
+
w: p,
|
|
365
325
|
h: R
|
|
366
|
-
}, y, r, i) :
|
|
326
|
+
}, y, r, i) : S && (e.fillStyle = W(e, S, v, b, p, R, y, i), e.fillRect(v, b, p, R)), Ne(e, C, r, p > 0 ? {
|
|
327
|
+
x: v,
|
|
328
|
+
y: b,
|
|
329
|
+
w: p,
|
|
330
|
+
h: R
|
|
331
|
+
} : void 0, i) && e.strokeRect(v, b, p, R);
|
|
367
332
|
};
|
|
368
|
-
|
|
369
|
-
x:
|
|
370
|
-
y:
|
|
371
|
-
w:
|
|
333
|
+
p > 0 ? h(e, c(x?.chartexStyle, g?.chartexStyle), t.chartexDataPointStyle, 0, {
|
|
334
|
+
x: v,
|
|
335
|
+
y: b,
|
|
336
|
+
w: p,
|
|
372
337
|
h: R
|
|
373
|
-
}, r,
|
|
374
|
-
let
|
|
375
|
-
!t.catAxisHidden &&
|
|
376
|
-
let
|
|
338
|
+
}, r, w) : w(e);
|
|
339
|
+
let T = t.categories[n];
|
|
340
|
+
!t.catAxisHidden && T != null && (e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", e.textAlign = "right", e.textBaseline = "middle", ee(e, T, N - 6, b + R / 2, ie(k)));
|
|
341
|
+
let E = te(t, g, n, T ?? "", o, {
|
|
377
342
|
visible: !1,
|
|
378
343
|
showVal: !1,
|
|
379
344
|
showCatName: !1
|
|
380
|
-
},
|
|
381
|
-
if (
|
|
382
|
-
let n =
|
|
383
|
-
e.font = `${
|
|
345
|
+
}, _);
|
|
346
|
+
if (E) {
|
|
347
|
+
let n = ne(E.fontSizeHpt, r) ?? m(t.dataLabelFontSizeHpt, f, r), a = A(t, E.fontFace ?? t.dataLabelFontFace, "minor");
|
|
348
|
+
e.font = `${E.textStyle.fontItalic ? "italic " : ""}${E.fontBold ? "bold " : ""}${n}px ${a}`, He(e, E.text, {
|
|
384
349
|
kind: "bar",
|
|
385
350
|
rect: {
|
|
386
|
-
x:
|
|
387
|
-
y:
|
|
388
|
-
w:
|
|
351
|
+
x: v,
|
|
352
|
+
y: b,
|
|
353
|
+
w: p,
|
|
389
354
|
h: R
|
|
390
355
|
},
|
|
391
356
|
orientation: "horizontal",
|
|
392
357
|
negative: !1,
|
|
393
|
-
position:
|
|
358
|
+
position: E.position ?? "ctr"
|
|
394
359
|
}, {
|
|
395
|
-
x:
|
|
360
|
+
x: N,
|
|
396
361
|
y: P,
|
|
397
362
|
w: F,
|
|
398
|
-
h:
|
|
399
|
-
}, n,
|
|
400
|
-
x:
|
|
401
|
-
y:
|
|
402
|
-
w:
|
|
403
|
-
h
|
|
404
|
-
},
|
|
363
|
+
h: I
|
|
364
|
+
}, n, E.fontColor ? `#${E.fontColor}` : "#ffffff", E.manualLayout, {
|
|
365
|
+
x: l,
|
|
366
|
+
y: u,
|
|
367
|
+
w: d,
|
|
368
|
+
h: f
|
|
369
|
+
}, je(t, E.richRuns, r, a, E.fontBold ?? !1, E.textStyle), void 0, E.textStyle, r, E.labelBox, i);
|
|
405
370
|
}
|
|
406
371
|
}
|
|
407
372
|
if (!t.catAxisHidden && !t.catAxisLineHidden) {
|
|
408
|
-
let n =
|
|
409
|
-
e.strokeStyle = n.color, e.lineWidth = n.width, e.beginPath(), e.moveTo(
|
|
373
|
+
let n = E(t.catAxisLineColor, t.catAxisLineWidthEmu, r);
|
|
374
|
+
e.strokeStyle = n.color, e.lineWidth = n.width, e.beginPath(), e.moveTo(N, P), e.lineTo(N, P + I), e.stroke();
|
|
410
375
|
}
|
|
411
|
-
|
|
376
|
+
Me(e, x, S, l, u, d, f, N, P, F, I, p.bandH + 2, r, [b], i), e.restore();
|
|
412
377
|
}
|
|
413
|
-
function
|
|
378
|
+
function J(e, t, n, r, i = 0) {
|
|
414
379
|
let a = t.series[0];
|
|
415
|
-
if (!a ||
|
|
416
|
-
let o =
|
|
380
|
+
if (!a || Le(e, n, Math.max(t.categories.length, a.categories?.length ?? 0, a.values.length))) return;
|
|
381
|
+
let o = y(a, t.categories, { sortDescending: t.chartexParetoSortDescending ?? !1 });
|
|
417
382
|
if (o.points.length === 0) return;
|
|
418
|
-
let s =
|
|
419
|
-
|
|
420
|
-
...t,
|
|
383
|
+
let s = g(a, 0), c = [t.chartexDataPointStyle, t.chartexDataPointLineStyle], l = Te(t, Se(a, s), c, c, s, 1, `#${U(t, s, 1, a.chartexStyle)}`, { linkedNoStyleFallback: !0 });
|
|
384
|
+
Pe(e, C(t, {
|
|
421
385
|
chartType: "line",
|
|
422
|
-
categories: o.categories,
|
|
386
|
+
categories: t.chartexParetoFlatEndpoint ? [...o.categories, ""] : o.categories,
|
|
423
387
|
series: [{
|
|
424
388
|
...o.series,
|
|
389
|
+
values: t.chartexParetoFlatEndpoint ? [...o.series.values, 1] : o.series.values,
|
|
425
390
|
showMarker: !1,
|
|
426
|
-
lineHidden: !
|
|
427
|
-
lineColor:
|
|
428
|
-
lineWidthEmu:
|
|
391
|
+
lineHidden: !l.visible,
|
|
392
|
+
lineColor: l.color.replace(/^#/, ""),
|
|
393
|
+
lineWidthEmu: l.widthEmu ?? 9525,
|
|
429
394
|
chartexStyle: {
|
|
430
|
-
lineDash:
|
|
431
|
-
lineCap:
|
|
432
|
-
lineJoin:
|
|
395
|
+
lineDash: l.dash,
|
|
396
|
+
lineCap: l.cap,
|
|
397
|
+
lineJoin: l.join
|
|
433
398
|
}
|
|
434
399
|
}],
|
|
435
400
|
catAxisHidden: !1,
|
|
436
|
-
catAxisTickLabelPos: "none",
|
|
401
|
+
catAxisTickLabelPos: t.chartexParetoSortDescending == null || !(a.categories ?? t.categories).some((e) => e != null && e !== "") ? "none" : "nextTo",
|
|
437
402
|
showLegend: !1,
|
|
438
403
|
valMin: t.valMin ?? 0,
|
|
439
|
-
valMax: t.valMax ?? 1.2,
|
|
440
|
-
valAxisMajorUnit: t.valAxisMajorUnit ?? .2
|
|
441
|
-
}, n, r, i);
|
|
404
|
+
valMax: t.valMax ?? (t.valAxisFormatCode === "0%" ? 1 : 1.2),
|
|
405
|
+
valAxisMajorUnit: t.valAxisMajorUnit ?? (t.valAxisFormatCode === "0%" ? .1 : .2)
|
|
406
|
+
}), n, r, i);
|
|
407
|
+
}
|
|
408
|
+
function Y(e) {
|
|
409
|
+
return {
|
|
410
|
+
min: e.secondaryValAxis?.min ?? 0,
|
|
411
|
+
max: e.secondaryValAxis?.max ?? 1,
|
|
412
|
+
title: e.secondaryValAxis?.title ?? null,
|
|
413
|
+
hidden: e.secondaryValAxis?.hidden ?? !1,
|
|
414
|
+
formatCode: e.secondaryValAxis?.formatCode ?? "0%",
|
|
415
|
+
fontColor: e.secondaryValAxis?.fontColor ?? null,
|
|
416
|
+
fontSizeHpt: e.secondaryValAxis?.fontSizeHpt ?? null,
|
|
417
|
+
fontFace: e.secondaryValAxis?.fontFace ?? null,
|
|
418
|
+
lineColor: e.secondaryValAxis?.lineColor ?? null,
|
|
419
|
+
lineWidthEmu: e.secondaryValAxis?.lineWidthEmu ?? null,
|
|
420
|
+
lineHidden: e.secondaryValAxis?.lineHidden ?? !1,
|
|
421
|
+
majorTickMark: e.secondaryValAxis?.majorTickMark ?? "out",
|
|
422
|
+
minorTickMark: e.secondaryValAxis?.minorTickMark ?? null,
|
|
423
|
+
majorUnit: e.secondaryValAxis?.majorUnit ?? null,
|
|
424
|
+
minorUnit: e.secondaryValAxis?.minorUnit ?? null,
|
|
425
|
+
titleFontSizeHpt: e.secondaryValAxis?.titleFontSizeHpt ?? null,
|
|
426
|
+
titleFontBold: e.secondaryValAxis?.titleFontBold ?? null,
|
|
427
|
+
titleFontColor: e.secondaryValAxis?.titleFontColor ?? null,
|
|
428
|
+
titleFontFace: e.secondaryValAxis?.titleFontFace ?? null
|
|
429
|
+
};
|
|
442
430
|
}
|
|
443
431
|
function X(e, t, n, r, i = 0) {
|
|
444
|
-
let a = t.series[
|
|
445
|
-
if (!a ||
|
|
446
|
-
let
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
432
|
+
let a = t.series.filter((e) => e.seriesType !== "line"), o = t.chartexParetoOwnerIndex ?? 0, s = a[o];
|
|
433
|
+
if (!s || a.length === 0 || Le(e, n, Math.max(t.categories.length, ...a.map((e) => e.values.length)))) return;
|
|
434
|
+
let c = a.map((e, n) => y(n === 0 ? K(t, e, n, a.length) : e, t.categories, {
|
|
435
|
+
sortDescending: t.chartexParetoSortDescending ?? !0,
|
|
436
|
+
keepUnvaluedCategories: !0
|
|
437
|
+
})), l = c[o], u = c[0];
|
|
438
|
+
if (l.points.length === 0 || u.points.length === 0) return;
|
|
439
|
+
let d = t.chartexParetoFlatEndpoint === !0 && u.categories.length === u.points.length, f = t.series.find((e) => e.seriesType === "line"), p = f?.chartexFormatIdx ?? s.chartexFormatIdx ?? 0, m = {
|
|
440
|
+
...f ?? l.series,
|
|
441
|
+
name: f?.name || "Cumulative %",
|
|
442
|
+
values: l.series.values,
|
|
443
|
+
categories: u.categories,
|
|
444
|
+
color: f?.color ?? We(t, t.chartexDataPointLineStyle, "line", p, 1) ?? s.lineColor ?? s.color,
|
|
454
445
|
seriesType: "line",
|
|
455
446
|
useSecondaryAxis: !0,
|
|
456
447
|
showMarker: !1
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
max: t.secondaryValAxis?.max ?? 1,
|
|
460
|
-
title: t.secondaryValAxis?.title ?? null,
|
|
461
|
-
hidden: t.secondaryValAxis?.hidden ?? !1,
|
|
462
|
-
formatCode: t.secondaryValAxis?.formatCode ?? "0%",
|
|
463
|
-
fontColor: t.secondaryValAxis?.fontColor ?? null,
|
|
464
|
-
fontSizeHpt: t.secondaryValAxis?.fontSizeHpt ?? null,
|
|
465
|
-
fontFace: t.secondaryValAxis?.fontFace ?? null,
|
|
466
|
-
lineColor: t.secondaryValAxis?.lineColor ?? null,
|
|
467
|
-
lineWidthEmu: t.secondaryValAxis?.lineWidthEmu ?? null,
|
|
468
|
-
lineHidden: t.secondaryValAxis?.lineHidden ?? !1,
|
|
469
|
-
majorTickMark: t.secondaryValAxis?.majorTickMark ?? "out",
|
|
470
|
-
minorTickMark: t.secondaryValAxis?.minorTickMark ?? null,
|
|
471
|
-
majorUnit: t.secondaryValAxis?.majorUnit ?? null,
|
|
472
|
-
minorUnit: t.secondaryValAxis?.minorUnit ?? null,
|
|
473
|
-
titleFontSizeHpt: t.secondaryValAxis?.titleFontSizeHpt ?? null,
|
|
474
|
-
titleFontBold: t.secondaryValAxis?.titleFontBold ?? null,
|
|
475
|
-
titleFontColor: t.secondaryValAxis?.titleFontColor ?? null,
|
|
476
|
-
titleFontFace: t.secondaryValAxis?.titleFontFace ?? null
|
|
477
|
-
};
|
|
478
|
-
F(e, {
|
|
479
|
-
...t,
|
|
448
|
+
}, h = Y(t);
|
|
449
|
+
ze(e, C(t, {
|
|
480
450
|
chartType: "clusteredBar",
|
|
481
|
-
categories:
|
|
482
|
-
series: [{
|
|
483
|
-
...
|
|
451
|
+
categories: d ? [...u.categories, ""] : u.categories,
|
|
452
|
+
series: [...c.map((e) => ({
|
|
453
|
+
...e.orderedSeries,
|
|
454
|
+
values: d ? [...e.orderedSeries.values, null] : e.orderedSeries.values,
|
|
484
455
|
seriesType: null,
|
|
485
456
|
useSecondaryAxis: !1
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
|
|
457
|
+
})), d ? {
|
|
458
|
+
...m,
|
|
459
|
+
values: [...m.values, 1]
|
|
460
|
+
} : m],
|
|
461
|
+
secondaryValAxis: h
|
|
462
|
+
}), n, r, {
|
|
489
463
|
gapPolicy: "chartex",
|
|
490
464
|
semanticLineNoStyleFallback: !0
|
|
491
465
|
}, i);
|
|
492
466
|
}
|
|
493
|
-
var
|
|
494
|
-
function
|
|
467
|
+
var Xe = 7, Z = .05, Q = 1.2;
|
|
468
|
+
function Ze(e, t, n, r) {
|
|
495
469
|
let i = (r ?? t) - (n ?? e);
|
|
496
470
|
if (!(i > 0) || !Number.isFinite(i)) return null;
|
|
497
|
-
let a =
|
|
471
|
+
let a = re(i, Xe);
|
|
498
472
|
if (!(a > 0) || !Number.isFinite(a)) return null;
|
|
499
|
-
let o = e - i *
|
|
473
|
+
let o = e - i * Z, s = t + i * Z;
|
|
500
474
|
e >= 0 && (e === 0 || t > Q * e) && (o = 0), t <= 0 && (t === 0 || Math.abs(e) > Q * Math.abs(t)) && (s = 0);
|
|
501
475
|
let c = n ?? Math.floor(o / a) * a, l = r ?? Math.ceil(s / a) * a;
|
|
502
476
|
return ![c, l].every(Number.isFinite) || !(l > c) ? null : {
|
|
@@ -505,102 +479,108 @@ function Ue(e, t, n, r) {
|
|
|
505
479
|
majorUnit: a
|
|
506
480
|
};
|
|
507
481
|
}
|
|
508
|
-
function
|
|
509
|
-
let
|
|
510
|
-
if (!
|
|
511
|
-
let { x:
|
|
512
|
-
if (
|
|
513
|
-
let
|
|
514
|
-
|
|
515
|
-
},
|
|
482
|
+
function Qe(e, r, i, o, u) {
|
|
483
|
+
let d = 3 * o, _ = r.chartexBox;
|
|
484
|
+
if (!_ || _.categories.length === 0 || _.series.length === 0) return;
|
|
485
|
+
let { x: y, y: b, w: x, h: C } = i;
|
|
486
|
+
if (Le(e, i, n(_.series.map((e) => e.valuesByCategory), 1e4))) return;
|
|
487
|
+
let O = () => {
|
|
488
|
+
e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(chart values out of range)", y + x / 2, b + C / 2);
|
|
489
|
+
}, k = (e) => {
|
|
516
490
|
let t = e.max - e.min, n = t / e.step;
|
|
517
491
|
return Number.isFinite(e.min) && Number.isFinite(e.max) && Number.isFinite(e.step) && Number.isFinite(t) && Number.isFinite(n) && e.max > e.min && e.step > 0 && n <= 1e3 && e.min + e.step > e.min;
|
|
518
|
-
},
|
|
519
|
-
for (let e of
|
|
520
|
-
if (!isFinite(
|
|
521
|
-
if (!Number.isFinite(
|
|
522
|
-
|
|
492
|
+
}, j = Infinity, F = -Infinity;
|
|
493
|
+
for (let e of _.series) for (let t of e.valuesByCategory) for (let e of t) Number.isFinite(e) && (e < j && (j = e), e > F && (F = e));
|
|
494
|
+
if (!isFinite(j) || !isFinite(F)) return;
|
|
495
|
+
if (!Number.isFinite(F - j)) {
|
|
496
|
+
O();
|
|
523
497
|
return;
|
|
524
498
|
}
|
|
525
|
-
let
|
|
499
|
+
let I = r.valAxisMajorUnit == null ? Ze(j, F, r.valMin, r.valMax) : null, te = I ? {
|
|
526
500
|
...r,
|
|
527
|
-
valMin:
|
|
528
|
-
valMax:
|
|
529
|
-
valAxisMajorUnit:
|
|
530
|
-
} : r,
|
|
531
|
-
dataMin:
|
|
532
|
-
dataMax:
|
|
533
|
-
explicitMin:
|
|
534
|
-
explicitMax:
|
|
535
|
-
axisLenPt:
|
|
536
|
-
majorUnit:
|
|
501
|
+
valMin: I.min,
|
|
502
|
+
valMax: I.max,
|
|
503
|
+
valAxisMajorUnit: I.majorUnit
|
|
504
|
+
} : r, ne = A(r, r.valAxisFontFace, "minor"), L = m(r.valAxisFontSizeHpt, C, o), re = _e(L), ae = Oe(o), z = l({
|
|
505
|
+
dataMin: j,
|
|
506
|
+
dataMax: F,
|
|
507
|
+
explicitMin: te.valMin,
|
|
508
|
+
explicitMax: te.valMax,
|
|
509
|
+
axisLenPt: C / o,
|
|
510
|
+
majorUnit: te.valAxisMajorUnit
|
|
537
511
|
});
|
|
538
|
-
if (!
|
|
539
|
-
min:
|
|
540
|
-
max:
|
|
541
|
-
step:
|
|
512
|
+
if (!k({
|
|
513
|
+
min: z.min,
|
|
514
|
+
max: z.max,
|
|
515
|
+
step: z.majorUnit
|
|
542
516
|
})) {
|
|
543
|
-
|
|
517
|
+
O();
|
|
544
518
|
return;
|
|
545
519
|
}
|
|
546
|
-
let
|
|
520
|
+
let ce = 0;
|
|
547
521
|
if (!r.valAxisHidden) {
|
|
548
|
-
let
|
|
549
|
-
|
|
522
|
+
let t = e.font;
|
|
523
|
+
e.font = ye(L, ne, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1);
|
|
550
524
|
let n = 0;
|
|
551
|
-
for (let
|
|
552
|
-
let i =
|
|
553
|
-
n = Math.max(n,
|
|
525
|
+
for (let t of z.majorTicks) {
|
|
526
|
+
let i = ge(r, t, !1);
|
|
527
|
+
n = Math.max(n, D(e, i));
|
|
554
528
|
}
|
|
555
|
-
|
|
529
|
+
e.font = t, ce = n + re + a * o;
|
|
556
530
|
}
|
|
557
|
-
let
|
|
558
|
-
let n =
|
|
559
|
-
return
|
|
560
|
-
|
|
531
|
+
let ue = Ae(e, r, x, C, o), fe = m(r.catAxisFontSizeHpt, C, o), ve = m(r.valAxisFontSizeHpt, C, o), B = N(r, x, C, o), V = _.series.length, be = _.series.map((e, t) => g(e, t)), H = _.series.map((e, t) => {
|
|
532
|
+
let n = be[t], i = e.color ?? U(r, n, V, e.chartexStyle), a = ke(r, e.name, Se(e, n) ?? e, r.chartexDataPointStyle, n, V, i, !0), o = Ce(r, e, n, V, i);
|
|
533
|
+
return o.darkened && a.lineColor != null ? {
|
|
534
|
+
...a,
|
|
535
|
+
lineColor: o.line.color.replace(/^#/, "")
|
|
536
|
+
} : a;
|
|
537
|
+
}), xe = {
|
|
561
538
|
...r,
|
|
562
|
-
series:
|
|
563
|
-
},
|
|
564
|
-
titleBand:
|
|
565
|
-
|
|
566
|
-
legendReserve: je,
|
|
539
|
+
series: H
|
|
540
|
+
}, Te = Be(e, xe, x, C, o), { legRightW: De, legLeftW: je, legTopH: Pe, legBottomH: Ie } = he(Te, r.legendOverlay === !0), ze = r.valAxisHidden ? 0 : M(z.majorTicks.map((e) => ge(r, e, !1)), ie(L)) / 2, He = r.catAxisHidden ? 0 : M(_.categories, ie(fe)), Ge = se(r, y, b, x, C, o, {
|
|
541
|
+
titleBand: ue,
|
|
542
|
+
legendReserve: Te,
|
|
567
543
|
pad: {
|
|
568
|
-
t:
|
|
569
|
-
r:
|
|
570
|
-
b:
|
|
571
|
-
l:
|
|
544
|
+
t: ue.bandH + Pe + ve / 2 + 2 + ze,
|
|
545
|
+
r: De + x * .02,
|
|
546
|
+
b: Ie + B.catBandH + (r.catAxisHidden ? C * .02 : f(fe) + He),
|
|
547
|
+
l: je + B.valBandW + (r.valAxisHidden ? x * .02 : ce)
|
|
572
548
|
},
|
|
573
549
|
honorPlotAreaManualLayout: !0
|
|
574
|
-
}), { px0: W, py0: G, pw:
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
550
|
+
}), { px0: W, py0: G, pw: Ke, ph: K } = Ge.plotRect;
|
|
551
|
+
if (Ke <= 0 || K <= 0) {
|
|
552
|
+
Ve(e, r, y, b, x, C, b + Ge.title.topPad, Ge.title.fontPx);
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
me(e, r, W, G, Ke, K, o, u);
|
|
556
|
+
let qe = _.categories, Je = qe.length, Ye = oe(te, j, F, K / o);
|
|
557
|
+
if (!k(Ye)) {
|
|
558
|
+
O();
|
|
579
559
|
return;
|
|
580
560
|
}
|
|
581
|
-
|
|
582
|
-
let { min:
|
|
583
|
-
if (
|
|
584
|
-
if (
|
|
585
|
-
let
|
|
586
|
-
for (let n of
|
|
561
|
+
Ve(e, r, y, b, x, C, b + Ge.title.topPad, Ge.title.fontPx);
|
|
562
|
+
let { min: q, max: J } = Ye, Y = J - q, X = (e) => G + K * (1 - (e - q) / Y), Xe = E(r.valAxisLineColor, r.valAxisLineWidthEmu, o), Z = le(r, o);
|
|
563
|
+
if (e.save(), !r.valAxisHidden) {
|
|
564
|
+
if (e.font = ye(L, ne, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1), e.textAlign = "right", e.textBaseline = "middle", r.valAxisMinorGridlines) {
|
|
565
|
+
let t = pe(r, o);
|
|
566
|
+
for (let n of Ye.minorLines) R(e, W, Ke, X(n), !1, t);
|
|
587
567
|
}
|
|
588
|
-
for (let
|
|
589
|
-
let n =
|
|
568
|
+
for (let t of Ye.majorLines) {
|
|
569
|
+
let n = X(t);
|
|
590
570
|
if (r.valAxisMajorGridlines !== !1) {
|
|
591
|
-
|
|
592
|
-
let
|
|
593
|
-
Z.dash.length > 0 &&
|
|
571
|
+
e.strokeStyle = Z.color, e.lineWidth = Z.width;
|
|
572
|
+
let t = Z.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
573
|
+
Z.dash.length > 0 && e.setLineDash(Z.dash), e.beginPath(), e.moveTo(W, n), e.lineTo(W + Ke, n), e.stroke(), Z.dash.length > 0 && e.setLineDash(t);
|
|
594
574
|
}
|
|
595
|
-
|
|
575
|
+
e.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", ee(e, ge(r, t, !1), W - ae, n, ie(L)), s(e, r.valAxisMajorTickMark, "val", W, n, Xe.color, Xe.width, !1, r.valAxisLineHidden, "major", o, r.valAxisLineDash);
|
|
596
576
|
}
|
|
597
|
-
for (let
|
|
598
|
-
r.valAxisLineHidden ||
|
|
577
|
+
for (let t of Ye.minorTicks) s(e, r.valAxisMinorTickMark, "val", W, X(t), Xe.color, Xe.width, !1, r.valAxisLineHidden, "minor", o, r.valAxisLineDash);
|
|
578
|
+
r.valAxisLineHidden || de(e, W, G, W, G + K, Xe.color, Xe.width, r.valAxisLineDash);
|
|
599
579
|
}
|
|
600
|
-
let
|
|
601
|
-
!r.catAxisHidden && !r.catAxisLineHidden &&
|
|
602
|
-
let
|
|
603
|
-
let n =
|
|
580
|
+
let Q = E(r.catAxisLineColor, r.catAxisLineWidthEmu, o);
|
|
581
|
+
!r.catAxisHidden && !r.catAxisLineHidden && de(e, W, G + K, W + Ke, G + K, Q.color, Q.width, r.catAxisLineDash);
|
|
582
|
+
let Qe = Ke / Je, $e = v(r.barGapWidth, "chartex"), et = (e) => `#${_.series[e].color ?? U(r, be[e], V, _.series[e].chartexStyle)}`, tt = (e) => Ue(r, be[e], V, _.series[e].chartexStyle, _.series[e].color), $ = _.series.map((e) => e.valuesByCategory.map((t) => P(t, e.quartileMethod))), nt = r.chartStyleMarkerSymbol ?? r.chartexMarkerSymbol ?? "circle", rt = _.series.map((e, t) => nt === "none" ? $[t].map(() => []) : p($[t], e.showNonoutliers, e.showOutliers, X, 3 * o)), it = (e, t) => {
|
|
583
|
+
let n = T(W, Ke, _.oneBoxPerSeries ? 1 : Je, V, _.oneBoxPerSeries ? 0 : e, t, $e);
|
|
604
584
|
return n ? {
|
|
605
585
|
bx: n.boxX,
|
|
606
586
|
boxW: n.boxWidth,
|
|
@@ -610,174 +590,179 @@ function We(t, r, i, o, s) {
|
|
|
610
590
|
boxW: 0,
|
|
611
591
|
cx: W
|
|
612
592
|
};
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
593
|
+
}, at = (t, n) => {
|
|
594
|
+
let i = _.series[t], a = $[t][n];
|
|
595
|
+
if (!a) return;
|
|
596
|
+
let { bx: s, boxW: l, cx: f } = it(n, t), p = et(t), m = tt(t), g = r.chartexDataPointStyle, v = r.chartexDataPointMarkerStyle ?? g, y = be[t], b = Se(i, y) ?? i, x = We(r, g, "line", y, V), S = b.lineColor ? `#${b.lineColor}` : x ? `#${x}` : p, C = Ce(r, i, y, V, S).line, T = We(r, v, "fill", y, V), E = Ee(r, y, V, i.chartexStyle, i.color, v), D = Fe(r, v, b, y, V, We(r, v, "line", y, V) ?? S, { linkedNoStyleFallback: !0 }), O = c(i.chartexStyle), k = X(a.q1), A = X(a.q3), j = Math.min(k, A), M = Math.max(1, Math.abs(k - A)), N = l * .4;
|
|
597
|
+
if (Ne(e, C, o)) {
|
|
598
|
+
let t = X(a.whiskerHi), n = X(a.whiskerLo);
|
|
599
|
+
e.beginPath(), a.whiskerHi > a.q3 && (e.moveTo(f, t), e.lineTo(f, A)), a.whiskerLo < a.q1 && (e.moveTo(f, k), e.lineTo(f, n)), a.whiskerHi >= a.q3 && (e.moveTo(f - N / 2, t), e.lineTo(f + N / 2, t)), a.whiskerLo <= a.q1 && (e.moveTo(f - N / 2, n), e.lineTo(f + N / 2, n)), e.stroke();
|
|
600
|
+
}
|
|
601
|
+
h(e, i.chartexStyle, g, y, {
|
|
602
|
+
x: s,
|
|
603
|
+
y: j,
|
|
604
|
+
w: l,
|
|
605
|
+
h: M
|
|
606
|
+
}, o, (e) => {
|
|
607
|
+
if (m && we(e, m, {
|
|
608
|
+
x: s,
|
|
609
|
+
y: j,
|
|
610
|
+
w: l,
|
|
611
|
+
h: M
|
|
612
|
+
}, p, o, u), Ne(e, C, o, {
|
|
613
|
+
x: s,
|
|
614
|
+
y: j,
|
|
615
|
+
w: l,
|
|
616
|
+
h: M
|
|
617
|
+
}, u)) {
|
|
618
|
+
let t = e.lineWidth;
|
|
619
|
+
e.strokeRect(s + t / 2, j + t / 2, l - t, M - t);
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
let P = X(a.median);
|
|
623
|
+
Ne(e, C, o) && (e.beginPath(), e.moveTo(s, P), e.lineTo(s + l, P), e.stroke());
|
|
624
|
+
for (let r of rt[t][n]) Re(e, f, X(r), nt, 3, E ? T ? `#${T}` : p : "transparent", D.visible ? D.color : null, o, D.widthEmu == null ? 1 : w(D.widthEmu, o), E, u, D.visible ? D.paint : null, D.dash, D.customDash, D.cap, D.join, !1, O, v, y, y);
|
|
625
|
+
if (i.meanMarker) {
|
|
626
|
+
let t = X(a.mean), n = d;
|
|
627
|
+
Ne(e, C, o) && (e.beginPath(), e.moveTo(f - n, t - n), e.lineTo(f + n, t + n), e.moveTo(f + n, t - n), e.lineTo(f - n, t + n), e.stroke());
|
|
628
|
+
}
|
|
629
|
+
}, ot = (t) => {
|
|
630
|
+
let n = _.series[t];
|
|
631
|
+
if (!n.meanLine) return;
|
|
632
|
+
let i = Ce(r, n, be[t], V, et(t)).line;
|
|
633
|
+
if (e.save(), Ne(e, i, o)) {
|
|
634
|
+
let n = !1;
|
|
635
|
+
e.beginPath();
|
|
636
|
+
for (let r = 0; r < Je; r++) {
|
|
637
|
+
let i = $[t][r];
|
|
624
638
|
if (!i) {
|
|
625
|
-
|
|
639
|
+
n = !1;
|
|
626
640
|
continue;
|
|
627
641
|
}
|
|
628
|
-
let { cx: a } =
|
|
629
|
-
|
|
642
|
+
let { cx: a } = it(r, t), o = X(i.mean);
|
|
643
|
+
n ? e.lineTo(a, o) : e.moveTo(a, o), n = !0;
|
|
630
644
|
}
|
|
631
|
-
|
|
645
|
+
e.stroke();
|
|
632
646
|
}
|
|
633
|
-
|
|
647
|
+
e.restore();
|
|
648
|
+
};
|
|
649
|
+
for (let e = 0; e < V; e++) {
|
|
650
|
+
for (let t = 0; t < Je; t++) at(e, t);
|
|
651
|
+
ot(e);
|
|
634
652
|
}
|
|
635
|
-
let
|
|
636
|
-
for (let
|
|
637
|
-
let
|
|
638
|
-
r.catAxisHidden ||
|
|
639
|
-
|
|
640
|
-
let
|
|
641
|
-
|
|
642
|
-
let { bx: d, boxW: f, cx: p } = Je(n, i), m = Ge(i), h = Ke(i), g = r.chartexDataPointStyle, _ = r.chartexDataPointLineStyle ?? g, v = r.chartexDataPointMarkerStyle ?? g, y = Se[i], b = me(r, g, "line", y, H), x = a.lineColor ? `#${a.lineColor}` : b ? `#${b}` : m, S = a.lineWidthEmu ? T(a.lineWidthEmu, o) : g?.lineWidthEmu == null ? 1 : T(g.lineWidthEmu, o), C = me(r, _, "line", y, H), w = me(r, v, "fill", y, H), E = B(r, y, H, a.chartexStyle, a.color, v), D = me(r, v, "line", y, H), O = ae(r, v, a, y, H, D ?? x, { linkedNoStyleFallback: !0 }), k = e(a.chartexStyle), A = (e, n) => Ce(t, r, e, a, y, H, n, o, { linkedNoStyleFallback: !0 }), j = Y(c.q1), M = Y(c.q3), N = Math.min(j, M), P = Math.max(1, Math.abs(j - M)), F = f * .4;
|
|
643
|
-
A(_, C ?? x) && (t.beginPath(), t.moveTo(p, Y(c.whiskerHi)), t.lineTo(p, M), t.moveTo(p, j), t.lineTo(p, Y(c.whiskerLo)), t.moveTo(p - F / 2, Y(c.whiskerHi)), t.lineTo(p + F / 2, Y(c.whiskerHi)), t.moveTo(p - F / 2, Y(c.whiskerLo)), t.lineTo(p + F / 2, Y(c.whiskerLo)), t.stroke()), ee(t, a.chartexStyle, g, y, {
|
|
644
|
-
x: d,
|
|
645
|
-
y: N,
|
|
646
|
-
w: f,
|
|
647
|
-
h: P
|
|
648
|
-
}, o, (e) => {
|
|
649
|
-
h && te(e, h, {
|
|
650
|
-
x: d,
|
|
651
|
-
y: N,
|
|
652
|
-
w: f,
|
|
653
|
-
h: P
|
|
654
|
-
}, m, o, s), Ce(e, r, g, a, y, H, x, o, { linkedNoStyleFallback: !0 }) && e.strokeRect(d + S / 2, N + S / 2, f - S, P - S);
|
|
655
|
-
});
|
|
656
|
-
let I = Y(c.median);
|
|
657
|
-
if (A(_, C ?? x) && (t.beginPath(), t.moveTo(d, I), t.lineTo(d + f, I), t.stroke()), a.showNonoutliers) {
|
|
658
|
-
let e = r.chartStyleMarkerSymbol ?? r.chartexMarkerSymbol ?? "circle";
|
|
659
|
-
for (let n of c.inner) e !== "none" && fe(t, p, Y(n), e, 3, E ? w ? `#${w}` : m : "transparent", O.visible ? O.color : null, o, O.widthEmu == null ? 1 : T(O.widthEmu, o), E, s, O.visible ? O.paint : null, O.dash, O.customDash, O.cap, O.join, !1, k, v, y, y);
|
|
660
|
-
}
|
|
661
|
-
if (a.meanMarker) {
|
|
662
|
-
let e = Y(c.mean), n = l;
|
|
663
|
-
A(v, D ?? x) && (t.beginPath(), t.moveTo(p - n, e - n), t.lineTo(p + n, e + n), t.moveTo(p + n, e - n), t.lineTo(p - n, e + n), t.stroke());
|
|
664
|
-
}
|
|
665
|
-
if (a.showOutliers) {
|
|
666
|
-
let e = r.chartStyleMarkerSymbol ?? r.chartexMarkerSymbol ?? "circle";
|
|
667
|
-
for (let n of c.outliers) e !== "none" && fe(t, p, Y(n), e, 3, E ? w ? `#${w}` : m : "transparent", O.visible ? O.color : null, o, O.widthEmu == null ? 1 : T(O.widthEmu, o), E, s, O.visible ? O.paint : null, O.dash, O.customDash, O.cap, O.join, !1, k, v, y, y);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
if (!r.catAxisHidden) {
|
|
671
|
-
t.font = be($, V(r, r.catAxisFontFace, "minor"), r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1), t.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", t.textAlign = "center", t.textBaseline = "top";
|
|
672
|
-
let e = Le[n];
|
|
673
|
-
t.fillText(e, i, G + q + Ye);
|
|
653
|
+
let st = m(r.catAxisFontSizeHpt, C, o), ct = t(st);
|
|
654
|
+
for (let t = 0; t < Je; t++) {
|
|
655
|
+
let n = W + Qe * (t + .5);
|
|
656
|
+
if (r.catAxisHidden || s(e, r.catAxisMajorTickMark, "cat", G + K, n, Q.color, Q.width, !1, r.catAxisLineHidden, "major", o, r.catAxisLineDash), !r.catAxisHidden) {
|
|
657
|
+
e.font = ye(st, A(r, r.catAxisFontFace, "minor"), r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1), e.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", e.textAlign = "center", e.textBaseline = "top";
|
|
658
|
+
let i = qe[t];
|
|
659
|
+
ee(e, i, n, G + K + ct, ie(st));
|
|
674
660
|
}
|
|
675
661
|
}
|
|
676
|
-
|
|
662
|
+
e.restore(), S(e, r, y, b, x, C, W, G, Ke, K, je, Ie, B.catFontPx, B.valFontPx), Me(e, xe, Te, y, b, x, C, W, G, Ke, K, ue.bandH + 2, o, _.series.map((e, t) => tt(t)), u);
|
|
677
663
|
}
|
|
678
|
-
var
|
|
679
|
-
function
|
|
680
|
-
let
|
|
681
|
-
if (!
|
|
682
|
-
let { x:
|
|
683
|
-
if (
|
|
684
|
-
|
|
664
|
+
var $e = .18;
|
|
665
|
+
function et(e, t, n, i, a) {
|
|
666
|
+
let s = t.chartexSunburst;
|
|
667
|
+
if (!s || s.rows.length === 0) return;
|
|
668
|
+
let { x: l, y: f, w: p, h: m } = n;
|
|
669
|
+
if (d(s.rows)) {
|
|
670
|
+
Le(e, n, L + 1);
|
|
685
671
|
return;
|
|
686
672
|
}
|
|
687
|
-
let
|
|
688
|
-
if (
|
|
689
|
-
let
|
|
690
|
-
...t,
|
|
673
|
+
let g = u(s.rows);
|
|
674
|
+
if (g.layoutWeight <= 0 || g.children.length === 0) return;
|
|
675
|
+
let _ = t.series[0], v = H(_?.dataLabelOverrides), y = g.children.map((e, n) => Ue(t, n, g.children.length, _?.chartexStyle, _?.color)), b = C(t, {
|
|
691
676
|
chartType: "clusteredBar",
|
|
692
|
-
series:
|
|
693
|
-
let n =
|
|
694
|
-
return
|
|
677
|
+
series: g.children.map((e) => {
|
|
678
|
+
let n = U(t, e.branchIndex, g.children.length, _?.chartexStyle);
|
|
679
|
+
return ke(t, e.label, _, t.chartexDataPointStyle, e.branchIndex, g.children.length, n, !1, !1);
|
|
695
680
|
})
|
|
696
|
-
},
|
|
681
|
+
}), x = Be(e, b, p, m, i), S = se(t, l, f, p, m, i, {
|
|
697
682
|
titleTopPadFrac: .035,
|
|
698
683
|
titleBottomPadFrac: .035,
|
|
699
|
-
|
|
700
|
-
legendReserve: C,
|
|
684
|
+
legendReserve: x,
|
|
701
685
|
radialGapFrac: .02,
|
|
702
686
|
honorPlotAreaManualLayout: !0
|
|
703
687
|
});
|
|
704
|
-
|
|
705
|
-
let { px0:
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
e
|
|
713
|
-
|
|
688
|
+
Ve(e, t, l, f, p, m, f + S.title.topPad, S.title.fontPx);
|
|
689
|
+
let { px0: w, py0: T, pw: E, ph: D } = S.plotRect;
|
|
690
|
+
if (!(E > 0) || !(D > 0)) return;
|
|
691
|
+
me(e, t, w, T, E, D, i, a);
|
|
692
|
+
let O = w + E / 2, k = T + D / 2, j = Math.min(E, D) * .46;
|
|
693
|
+
g.a0 = -Math.PI / 2, g.a1 = -Math.PI / 2 + Math.PI * 2, r(g);
|
|
694
|
+
let M = o(g) + 1, N = j * $e, P = (j - N) / M, F = (e) => `#${U(t, e, g.children.length, _?.chartexStyle)}`, I = H(_?.dataPointOverrides), ee = _?.seriesDataLabels, R = A(t, ee?.fontFace ?? t.dataLabelFontFace, "minor"), re = ne(ee?.fontSizeHpt, i) ?? Math.max(7, Math.min(13, j * .075)), ie = ee?.fontColor ? `#${ee.fontColor}` : "#ffffff", ae = Array.from({ length: M }, () => []), z = [g];
|
|
695
|
+
for (; z.length > 0;) {
|
|
696
|
+
let e = z.pop();
|
|
697
|
+
e.depth >= 0 && ae[e.depth].push(e);
|
|
698
|
+
for (let t = e.children.length - 1; t >= 0; t--) z.push(e.children[t]);
|
|
714
699
|
}
|
|
715
700
|
e.save();
|
|
716
|
-
for (let n = 0; n <
|
|
717
|
-
let
|
|
718
|
-
for (let
|
|
719
|
-
let n =
|
|
701
|
+
for (let n = 0; n < M; n++) {
|
|
702
|
+
let r = N + n * P, o = r + P;
|
|
703
|
+
for (let s of ae[n]) {
|
|
704
|
+
let n = s.a1 - s.a0;
|
|
720
705
|
if (n <= 1e-4) continue;
|
|
721
|
-
let _ =
|
|
722
|
-
x:
|
|
723
|
-
y:
|
|
724
|
-
w:
|
|
725
|
-
h:
|
|
706
|
+
let u = I.get(s.labelIndex), d = Ie(t, _, u, s.branchIndex, g.children.length), y = xe(t, _, u, s.branchIndex, g.children.length, "#ffffff"), b = {
|
|
707
|
+
x: O - o,
|
|
708
|
+
y: k - o,
|
|
709
|
+
w: o * 2,
|
|
710
|
+
h: o * 2
|
|
726
711
|
};
|
|
727
|
-
|
|
728
|
-
e.beginPath(), e.arc(
|
|
729
|
-
},
|
|
730
|
-
let
|
|
712
|
+
h(e, c(u?.chartexStyle, _?.chartexStyle), t.chartexDataPointStyle, _?.chartexFormatIdx ?? 0, b, i, (e) => {
|
|
713
|
+
e.beginPath(), e.arc(O, k, o, s.a0, s.a1), e.arc(O, k, r, s.a1, s.a0, !0), e.closePath(), d && De(e, d, b, F(s.branchIndex), i, a), Ne(e, y, i, b, a) && e.stroke();
|
|
714
|
+
}, s.branchIndex);
|
|
715
|
+
let x = te(t, _, s.labelIndex, s.label, s.value, {
|
|
731
716
|
visible: !1,
|
|
732
717
|
showVal: !1,
|
|
733
718
|
showCatName: !1
|
|
734
|
-
},
|
|
735
|
-
if (!
|
|
736
|
-
let
|
|
737
|
-
if (!
|
|
738
|
-
let
|
|
739
|
-
if (e.font = `${
|
|
740
|
-
|
|
719
|
+
}, v);
|
|
720
|
+
if (!x) continue;
|
|
721
|
+
let S = x.text, C = ne(x.fontSizeHpt, i) ?? re, j = x.fontColor ? `#${x.fontColor}` : ie, M = x.fontFace ? A(t, x.fontFace, "minor") : R, N = (s.a0 + s.a1) / 2, ee = (r + o) / 2, L = P - 4, ae = n * ee;
|
|
722
|
+
if (!x.manualLayout && L < C * .9 && ae < C * .9) continue;
|
|
723
|
+
let z = O + Math.cos(N) * ee, oe = k + Math.sin(N) * ee;
|
|
724
|
+
if (e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${C}px ${M}`, x.manualLayout) {
|
|
725
|
+
He(e, S, {
|
|
741
726
|
kind: "point",
|
|
742
|
-
x:
|
|
743
|
-
y:
|
|
744
|
-
position:
|
|
727
|
+
x: z,
|
|
728
|
+
y: oe,
|
|
729
|
+
position: x.position ?? "ctr"
|
|
745
730
|
}, {
|
|
746
|
-
x:
|
|
747
|
-
y:
|
|
748
|
-
w:
|
|
749
|
-
h:
|
|
750
|
-
},
|
|
751
|
-
x:
|
|
752
|
-
y:
|
|
753
|
-
w:
|
|
754
|
-
h:
|
|
755
|
-
},
|
|
731
|
+
x: w,
|
|
732
|
+
y: T,
|
|
733
|
+
w: E,
|
|
734
|
+
h: D
|
|
735
|
+
}, C, j, x.manualLayout, {
|
|
736
|
+
x: l,
|
|
737
|
+
y: f,
|
|
738
|
+
w: p,
|
|
739
|
+
h: m
|
|
740
|
+
}, je(t, x.richRuns, i, M, x.fontBold ?? !1, x.textStyle), void 0, x.textStyle, i, x.labelBox, a);
|
|
756
741
|
continue;
|
|
757
742
|
}
|
|
758
|
-
e.save(), e.translate(
|
|
759
|
-
let
|
|
760
|
-
(
|
|
743
|
+
e.save(), e.translate(z, oe);
|
|
744
|
+
let se = N, ce = se * 180 / Math.PI % 360;
|
|
745
|
+
(ce > 90 || ce < -90) && (se += Math.PI), e.rotate(se), e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${C}px ${M}`, He(e, S, {
|
|
761
746
|
kind: "point",
|
|
762
747
|
x: 0,
|
|
763
748
|
y: 0,
|
|
764
|
-
position:
|
|
749
|
+
position: x.position ?? "ctr"
|
|
765
750
|
}, {
|
|
766
|
-
x: -
|
|
767
|
-
y: -
|
|
768
|
-
w:
|
|
769
|
-
h:
|
|
770
|
-
},
|
|
771
|
-
x: -
|
|
772
|
-
y: -
|
|
773
|
-
w:
|
|
774
|
-
h:
|
|
775
|
-
},
|
|
751
|
+
x: -L / 2,
|
|
752
|
+
y: -ae / 2,
|
|
753
|
+
w: L,
|
|
754
|
+
h: ae
|
|
755
|
+
}, C, j, void 0, {
|
|
756
|
+
x: -L / 2,
|
|
757
|
+
y: -ae / 2,
|
|
758
|
+
w: L,
|
|
759
|
+
h: ae
|
|
760
|
+
}, je(t, x.richRuns, i, M, x.fontBold ?? !1, x.textStyle), void 0, x.textStyle, i, x.labelBox, a), e.restore();
|
|
776
761
|
}
|
|
777
762
|
}
|
|
778
|
-
e.restore(),
|
|
763
|
+
e.restore(), Me(e, b, x, l, f, p, m, w, T, E, D, S.title.bandH + 2, i, y, a);
|
|
779
764
|
}
|
|
780
|
-
function
|
|
765
|
+
function tt(e, t) {
|
|
781
766
|
let n = e.map((e, t) => ({
|
|
782
767
|
node: e,
|
|
783
768
|
index: t,
|
|
@@ -840,143 +825,162 @@ function qe(e, t) {
|
|
|
840
825
|
}
|
|
841
826
|
return p(c, l), o;
|
|
842
827
|
}
|
|
843
|
-
function
|
|
828
|
+
function $(e, t, n, r, i) {
|
|
844
829
|
let a = t.chartexTreemap;
|
|
845
830
|
if (!a || a.rows.length === 0) return;
|
|
846
|
-
if (
|
|
847
|
-
|
|
831
|
+
if (d(a.rows)) {
|
|
832
|
+
Le(e, n, L + 1);
|
|
848
833
|
return;
|
|
849
834
|
}
|
|
850
|
-
let o =
|
|
835
|
+
let o = u(a.rows, !0);
|
|
851
836
|
if (o.layoutWeight <= 0 || o.children.length === 0) return;
|
|
852
|
-
let
|
|
853
|
-
...t,
|
|
837
|
+
let s = t.series[0], l = o.children.map((e) => Ue(t, e.branchIndex, o.children.length, s?.chartexStyle, s?.color)), f = C(t, {
|
|
854
838
|
chartType: "clusteredBar",
|
|
855
839
|
series: o.children.map((e) => {
|
|
856
|
-
let n =
|
|
857
|
-
return
|
|
840
|
+
let n = U(t, e.branchIndex, o.children.length, s?.chartexStyle);
|
|
841
|
+
return ke(t, e.label, s, t.chartexDataPointStyle, e.branchIndex, o.children.length, n);
|
|
858
842
|
})
|
|
859
|
-
},
|
|
843
|
+
}), p = Be(e, f, n.w, n.h, r), m = se(t, n.x, n.y, n.w, n.h, r, {
|
|
860
844
|
titleTopPadFrac: .035,
|
|
861
845
|
titleBottomPadFrac: .035,
|
|
862
|
-
|
|
863
|
-
legendReserve: f,
|
|
846
|
+
legendReserve: p,
|
|
864
847
|
radialGapFrac: .015,
|
|
865
848
|
honorPlotAreaManualLayout: !0
|
|
866
849
|
});
|
|
867
|
-
|
|
868
|
-
let { px0:
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
850
|
+
Ve(e, t, n.x, n.y, n.w, n.h, n.y + m.title.topPad, m.title.fontPx);
|
|
851
|
+
let { px0: g, py0: _, pw: v, ph: y } = m.plotRect;
|
|
852
|
+
if (!(v > 0) || !(y > 0)) return;
|
|
853
|
+
me(e, t, g, _, v, y, r, i);
|
|
854
|
+
let b = {
|
|
855
|
+
x: g,
|
|
856
|
+
y: _,
|
|
857
|
+
w: v,
|
|
858
|
+
h: y
|
|
859
|
+
}, x = a.parentLabelLayout ?? "overlapping", S = t.series[0]?.seriesDataLabels, w = A(t, S?.fontFace ?? t.dataLabelFontFace, "minor"), T = ne(S?.fontSizeHpt, r) ?? Math.max(8, Math.min(13, m.plotRect.ph * .025)), E = S?.fontColor ? `#${S.fontColor}` : "#ffffff", D = new Map((t.series[0]?.dataLabelOverrides ?? []).map((e) => [e.idx, e])), O = t.chartBg ? t.chartBg.startsWith("#") ? t.chartBg : `#${t.chartBg}` : "#ffffff", k = H(s?.dataPointOverrides), j = (a, l) => {
|
|
860
|
+
if (l.w < .5 || l.h < .5) return;
|
|
861
|
+
let u = `#${U(t, a.branchIndex, o.children.length, s?.chartexStyle)}`, d = k.get(a.labelIndex), f = Ie(t, s, d, a.branchIndex, o.children.length), p = c(d?.chartexStyle, s?.chartexStyle), m = D.get(a.labelIndex), g = m?.fontColor ? `#${m.fontColor}` : E, _ = ne(m?.fontSizeHpt, r) ?? T, v = m?.fontBold ?? S?.fontBold ?? !1;
|
|
878
862
|
if (a.children.length > 0) {
|
|
879
|
-
let o =
|
|
880
|
-
visible:
|
|
863
|
+
let o = te(t, s, a.labelIndex, a.label, a.value, {
|
|
864
|
+
visible: x !== "none",
|
|
881
865
|
showVal: !1,
|
|
882
866
|
showCatName: !0
|
|
883
|
-
},
|
|
884
|
-
|
|
885
|
-
x:
|
|
886
|
-
y:
|
|
887
|
-
w:
|
|
888
|
-
h:
|
|
867
|
+
}, D, !0), c = o != null && (x !== "overlapping" || a.depth === 0), d = _, y = o?.fontFace ? A(t, o.fontFace, "minor") : w, S = x === "banner" && c ? Math.min(l.h * .28, d + 7) : 0;
|
|
868
|
+
S > 0 && h(e, p, t.chartexDataPointStyle, s?.chartexFormatIdx ?? 0, {
|
|
869
|
+
x: l.x,
|
|
870
|
+
y: l.y,
|
|
871
|
+
w: l.w,
|
|
872
|
+
h: S
|
|
889
873
|
}, r, (e) => {
|
|
890
|
-
|
|
891
|
-
x:
|
|
892
|
-
y:
|
|
893
|
-
w:
|
|
894
|
-
h:
|
|
874
|
+
f && we(e, f, {
|
|
875
|
+
x: l.x,
|
|
876
|
+
y: l.y,
|
|
877
|
+
w: l.w,
|
|
878
|
+
h: S
|
|
895
879
|
}, u, r, i);
|
|
896
880
|
}, a.branchIndex);
|
|
897
|
-
let
|
|
898
|
-
x:
|
|
899
|
-
y:
|
|
900
|
-
w:
|
|
901
|
-
h: Math.max(0,
|
|
881
|
+
let C = {
|
|
882
|
+
x: l.x,
|
|
883
|
+
y: l.y + S,
|
|
884
|
+
w: l.w,
|
|
885
|
+
h: Math.max(0, l.h - S)
|
|
902
886
|
};
|
|
903
|
-
for (let e of
|
|
904
|
-
if (
|
|
905
|
-
e.font = `${
|
|
906
|
-
let a =
|
|
907
|
-
x:
|
|
908
|
-
y:
|
|
909
|
-
w:
|
|
910
|
-
h:
|
|
911
|
-
} :
|
|
912
|
-
|
|
887
|
+
for (let e of tt(a.children, C)) j(e.node, e.rect);
|
|
888
|
+
if (c && (o.manualLayout || l.w > d * 2 && l.h > d + 4)) {
|
|
889
|
+
e.font = `${v ? "bold " : ""}${d}px ${y}`;
|
|
890
|
+
let a = S > 0 ? {
|
|
891
|
+
x: l.x,
|
|
892
|
+
y: l.y,
|
|
893
|
+
w: l.w,
|
|
894
|
+
h: S
|
|
895
|
+
} : l, s = m?.position ?? "inBase";
|
|
896
|
+
He(e, o.text, o.manualLayout ? {
|
|
913
897
|
kind: "point",
|
|
914
|
-
x:
|
|
915
|
-
y:
|
|
898
|
+
x: l.x + l.w / 2,
|
|
899
|
+
y: l.y + l.h / 2,
|
|
916
900
|
position: s
|
|
917
901
|
} : {
|
|
918
902
|
kind: "box",
|
|
919
903
|
rect: a,
|
|
920
904
|
position: s
|
|
921
|
-
}, o.manualLayout ?
|
|
905
|
+
}, o.manualLayout ? b : a, d, g, o.manualLayout, n, je(t, o.richRuns, r, y, v, o.textStyle), void 0, o.textStyle, r, o.labelBox, i);
|
|
922
906
|
}
|
|
923
907
|
return;
|
|
924
908
|
}
|
|
925
|
-
|
|
926
|
-
|
|
909
|
+
h(e, p, t.chartexDataPointStyle, s?.chartexFormatIdx ?? 0, l, r, (e) => {
|
|
910
|
+
f && we(e, f, l, u, r, i), Ne(e, xe(t, s, d, a.branchIndex, o.children.length, O, t.chartexDataPointStyle, { linkedNoStyleFallback: !0 }), r, l, i) && e.strokeRect(l.x, l.y, l.w, l.h);
|
|
927
911
|
}, a.branchIndex);
|
|
928
|
-
let
|
|
912
|
+
let y = te(t, s, a.labelIndex, a.label, a.value, {
|
|
929
913
|
visible: !1,
|
|
930
914
|
showVal: !1,
|
|
931
915
|
showCatName: !1
|
|
932
|
-
},
|
|
933
|
-
if (!
|
|
934
|
-
let
|
|
935
|
-
if (!
|
|
936
|
-
let
|
|
937
|
-
e.font = `${
|
|
938
|
-
let
|
|
939
|
-
|
|
916
|
+
}, D);
|
|
917
|
+
if (!y) return;
|
|
918
|
+
let C = ne(y.fontSizeHpt, r) ?? _;
|
|
919
|
+
if (!y.manualLayout && (l.w <= C * 1.2 || l.h <= C * 1.2)) return;
|
|
920
|
+
let M = y.fontFace ? A(t, y.fontFace, "minor") : w;
|
|
921
|
+
e.font = `${y.fontBold ? "bold " : ""}${C}px ${M}`;
|
|
922
|
+
let N = l, P = y.position === "outEnd" ? "inEnd" : y.position ?? "ctr";
|
|
923
|
+
He(e, y.text, y.manualLayout ? {
|
|
940
924
|
kind: "point",
|
|
941
|
-
x:
|
|
942
|
-
y:
|
|
943
|
-
position:
|
|
925
|
+
x: l.x + l.w / 2,
|
|
926
|
+
y: l.y + l.h / 2,
|
|
927
|
+
position: P
|
|
944
928
|
} : {
|
|
945
929
|
kind: "box",
|
|
946
|
-
rect:
|
|
947
|
-
position:
|
|
948
|
-
},
|
|
930
|
+
rect: N,
|
|
931
|
+
position: P
|
|
932
|
+
}, y.manualLayout ? b : N, C, y.fontColor ? `#${y.fontColor}` : g, y.manualLayout, n, je(t, y.richRuns, r, M, y.fontBold ?? !1, y.textStyle), void 0, y.textStyle, r, y.labelBox, i);
|
|
949
933
|
};
|
|
950
|
-
e.save(), e.beginPath(), e.rect(
|
|
951
|
-
for (let e of
|
|
952
|
-
x:
|
|
953
|
-
y:
|
|
954
|
-
w:
|
|
955
|
-
h:
|
|
956
|
-
}))
|
|
957
|
-
e.restore(),
|
|
934
|
+
e.save(), e.beginPath(), e.rect(g, _, v, y), e.clip();
|
|
935
|
+
for (let e of tt(o.children, {
|
|
936
|
+
x: g,
|
|
937
|
+
y: _,
|
|
938
|
+
w: v,
|
|
939
|
+
h: y
|
|
940
|
+
})) j(e.node, e.rect);
|
|
941
|
+
e.restore(), Me(e, f, p, n.x, n.y, n.w, n.h, g, _, v, y, m.title.bandH + 2, r, l, i);
|
|
958
942
|
}
|
|
959
|
-
function
|
|
960
|
-
let a =
|
|
961
|
-
if (a != null && a > 1048576 || o != null && o > 1048576 || a != null && o != null && a > 1048576 - o) return
|
|
943
|
+
function nt(e, t, n, r, i = 0) {
|
|
944
|
+
let a = Ke(t, void 0, n, r), o = qe(t, n, r);
|
|
945
|
+
if (a != null && a > 1048576 || o != null && o > 1048576 || a != null && o != null && a > 1048576 - o) return Le(e, n, L + 1), !0;
|
|
946
|
+
if (t.chartexSuppressGeometry) {
|
|
947
|
+
let i = Ae(e, t, n.w, n.h, r);
|
|
948
|
+
return Ve(e, t, n.x, n.y, n.w, n.h, n.y + i.topPad, i.fontPx), !0;
|
|
949
|
+
}
|
|
962
950
|
switch (t.chartType) {
|
|
963
|
-
case "waterfall": return
|
|
964
|
-
case "clusteredColumn":
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
951
|
+
case "waterfall": return Ye(e, t, n, r, i), !0;
|
|
952
|
+
case "clusteredColumn": {
|
|
953
|
+
let a = t.series.map((e, n) => n === 0 ? K(t, e, n, t.series.length) : e), o = t.chartexParetoSortDescending ? a.map((e) => y(e, t.categories, {
|
|
954
|
+
sortDescending: !0,
|
|
955
|
+
keepUnvaluedCategories: !0
|
|
956
|
+
}).orderedSeries) : a, s = t.chartexShowUnpairedPercentageAxis && o[0] ? [{
|
|
957
|
+
...o[0],
|
|
958
|
+
name: "",
|
|
959
|
+
values: [],
|
|
960
|
+
seriesType: "line",
|
|
961
|
+
useSecondaryAxis: !0,
|
|
962
|
+
lineHidden: !0,
|
|
963
|
+
showMarker: !1
|
|
964
|
+
}] : [];
|
|
965
|
+
return ze(e, C(t, {
|
|
966
|
+
chartType: "clusteredBar",
|
|
967
|
+
categories: o[0]?.categories ?? t.categories,
|
|
968
|
+
series: [...o, ...s],
|
|
969
|
+
secondaryValAxis: s.length > 0 ? Y(t) : t.secondaryValAxis
|
|
970
|
+
}), n, r, { gapPolicy: "chartex" }, i), !0;
|
|
971
|
+
}
|
|
972
|
+
case "histogram": return Je(e, t, n, r, i), !0;
|
|
973
|
+
case "funnel": return q(e, t, n, r, i), !0;
|
|
974
|
+
case "paretoLine": return J(e, t, n, r, i), !0;
|
|
971
975
|
case "pareto": return X(e, t, n, r, i), !0;
|
|
972
|
-
case "boxWhisker": return
|
|
973
|
-
case "sunburst": return
|
|
974
|
-
case "treemap": return
|
|
976
|
+
case "boxWhisker": return Qe(e, t, n, r, i), !0;
|
|
977
|
+
case "sunburst": return et(e, t, n, r, i), !0;
|
|
978
|
+
case "treemap": return $(e, t, n, r, i), !0;
|
|
975
979
|
default: return !1;
|
|
976
980
|
}
|
|
977
981
|
}
|
|
978
982
|
//#endregion
|
|
979
983
|
//#region src/chart-ex.ts
|
|
980
|
-
var
|
|
984
|
+
var rt = G({ render: nt }, "chartEx");
|
|
981
985
|
//#endregion
|
|
982
|
-
export {
|
|
986
|
+
export { rt as chartEx };
|