@silurus/ooxml 0.89.7 → 0.89.9
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 +9 -3
- package/dist/assets/render-worker-CSJJ7vFD.js +15 -0
- package/dist/assets/render-worker-Ck21oePL.js +16 -0
- package/dist/assets/render-worker-jGsxSIGb.js +35 -0
- package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
- package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
- package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
- package/dist/chart-ex.mjs +367 -367
- package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-b3tKmzMa.js} +29 -25
- package/dist/{comment-ui-runtime-DKlEfBPp.js → comment-ui-runtime-BlgDzQx_.js} +3 -3
- package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-Bp37ytDC.js} +3 -3
- package/dist/{document-model-source-xnkMoTZ_.js → document-model-source-BlMfm6po.js} +37 -37
- package/dist/{document-pull-client-CzhPbnY_.js → document-pull-client-_G-DIh2T.js} +17071 -13819
- package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
- package/dist/{docx-BWyACb-n.js → docx-DE-Di6SH.js} +33 -33
- package/dist/{docx-BgCQiuuN.js → docx-Do90Z4L7.js} +593 -593
- package/dist/{docx-model-source-DCRFgO7-.js → docx-model-source-zYIufUjR.js} +6 -6
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
- package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
- package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
- package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
- package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
- package/dist/{host-layout-measure-CXKOWA5J.js → host-layout-measure-IFLllYwV.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
- package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
- package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
- package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
- package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
- package/dist/node.mjs +5 -5
- package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
- package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
- package/dist/{pptx-CfCiVlNB.js → pptx-DbjWegUB.js} +283 -266
- package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
- package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-DLNioq7T.js} +6 -6
- package/dist/region-map.mjs +39 -39
- package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
- package/dist/{render-worker-host-CZHIKTtZ.js → render-worker-host-CVr53kg0.js} +1 -1
- package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-EgUrirnQ.js} +1 -1
- package/dist/{render-worker-host-G1fnymI8.js → render-worker-host-pKls3F_t.js} +1 -1
- package/dist/renderer-DpTePxGq.js +5887 -0
- package/dist/{renderer-B4KIpz-2.js → renderer-DuYC3xXi.js} +1336 -1224
- package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
- package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
- package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
- package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
- package/dist/three-d.mjs +678 -678
- package/dist/types/chart-ex.d.ts +5 -2
- package/dist/types/docx.d.ts +30 -8
- package/dist/types/index.d.ts +37 -12
- package/dist/types/node.d.ts +28 -6
- package/dist/types/pptx.d.ts +13 -7
- package/dist/types/region-map.d.ts +5 -2
- package/dist/types/three-d.d.ts +5 -2
- package/dist/types/xlsx.d.ts +10 -7
- package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
- package/dist/{workbook-model-source-J9ir5Kov.js → workbook-model-source-D1dmkDMP.js} +6 -6
- package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
- package/dist/{xlsx-BbQ7RcNc.js → xlsx-DA0uR1B1.js} +44 -44
- package/dist/{xlsx-ClQiNSrr.js → xlsx-DBhYlJKp.js} +728 -716
- package/dist/{xlsx-model-source-C-Riw89p.js → xlsx-model-source-zemVDAfl.js} +36 -36
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-B3hF7Akg.js +0 -35
- package/dist/assets/render-worker-B5HWxkbU.js +0 -16
- package/dist/assets/render-worker-DNGf06QT.js +0 -15
- package/dist/renderer-xdugdcMd.js +0 -5769
package/dist/chart-ex.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// optional-renderer: packages/core/src/chart/chart-ex-renderer.ts
|
|
2
|
-
import { $ as e, $
|
|
3
|
-
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-
|
|
2
|
+
import { $ as e, $n as t, Aa as n, Ci as r, Fn as i, In as a, J as o, Ka as s, Ln as c, Mt as l, Nn as u, Pn as d, Qn as f, R as p, Rn as m, Rt as h, S as g, Sa as _, Ut as v, Wa as y, Wt as b, Xa as x, Xi as S, Y as C, Yt as w, Zn as T, Zt as E, _n as D, aa as O, b as k, ba as A, bt as j, ct as M, da as N, eo as P, er as F, fn as I, ga as ee, gn as L, ha as te, hn as ne, ia as R, in as z, it as re, jt as ie, la as B, mn as ae, nt as oe, oa as se, on as ce, ot as le, pn as ue, ra as de, rt as fe, s as pe, so as V, st as me, t as he, tt as ge, x as H, xn as _e, ya as ve, yt as ye, zt as be } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
|
+
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-DpTePxGq.js";
|
|
4
4
|
import { t as G } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
5
|
-
function Ke(e, t, n,
|
|
6
|
-
let a = 0, o = Math.max(1, n?.w ?? 32 *
|
|
7
|
-
let
|
|
5
|
+
function Ke(e, t, n, i = 1) {
|
|
6
|
+
let a = 0, o = Math.max(1, n?.w ?? 32 * i), c = Math.max(1, n?.h ?? 16 * i), l = ae(e, ({ label: n, linkedStyleIndex: l }) => {
|
|
7
|
+
let u = n.labelBox, d = L(u), f = d ? e.chartStyleRoles?.dataLabelCallout ?? e.chartStyleRoles?.dataLabel : e.chartStyleRoles?.dataLabel, p = d ? V(e, "dataLabelCallout") ?? V(e, "dataLabel") : V(e, "dataLabel"), m = D(u, f, p, f != null, 0, l)?.fillPaint, h = y(u?.style, p, 0), g = u?.borderHidden === !0 ? s(p) : void 0, _ = u?.borderColor != null || u?.borderFill != null || h !== void 0 || g !== void 0 || u?.borderPaintAuthored === !0 && u?.borderHidden !== !0, v = h === void 0 ? g === void 0 ? u?.borderFill ?? (u?.borderColor ? {
|
|
8
8
|
fillType: "solid",
|
|
9
|
-
color:
|
|
10
|
-
} :
|
|
11
|
-
for (let e of [
|
|
9
|
+
color: u.borderColor
|
|
10
|
+
} : _ ? null : x(f, l)) : g : h;
|
|
11
|
+
for (let e of [m, v]) {
|
|
12
12
|
if (!e) continue;
|
|
13
|
-
let n = e.fillType === "image" ?
|
|
13
|
+
let n = e.fillType === "image" ? pe(e, t, o, c, i) ?? 1048577 : r(e);
|
|
14
14
|
if (e.fillType === "gradient" && n > 4096 || n > 1048576 - a) {
|
|
15
15
|
a = ce + 1;
|
|
16
16
|
return;
|
|
@@ -18,7 +18,7 @@ function Ke(e, t, n, r = 1) {
|
|
|
18
18
|
a += n;
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
return
|
|
21
|
+
return l === "not-hierarchy" ? null : l === "too-large" ? ce + 1 : a;
|
|
22
22
|
}
|
|
23
23
|
function K(e, t, n, r) {
|
|
24
24
|
if (!e.chartexParetoOutlineOwner) return t;
|
|
@@ -47,50 +47,50 @@ function qe(e, t, n = 1) {
|
|
|
47
47
|
"pareto",
|
|
48
48
|
"paretoLine"
|
|
49
49
|
].includes(e.chartType)) return null;
|
|
50
|
-
let
|
|
51
|
-
if (!e ||
|
|
52
|
-
let
|
|
53
|
-
e.fillType === "gradient" &&
|
|
54
|
-
},
|
|
55
|
-
let o = Fe(e, t, n, r,
|
|
56
|
-
o.visible &&
|
|
50
|
+
let i = 0, a = (e) => {
|
|
51
|
+
if (!e || i > 1048576) return;
|
|
52
|
+
let a = e.fillType === "image" ? pe(e, void 0, Math.max(1, t.w), Math.max(1, t.h), n) : r(e);
|
|
53
|
+
e.fillType === "gradient" && a > 4096 || a > 1048576 - i ? i = ce + 1 : i += a;
|
|
54
|
+
}, o = (t, n, r, i) => {
|
|
55
|
+
let o = Fe(e, t, n, r, i, "#000000", { linkedNoStyleFallback: !0 });
|
|
56
|
+
o.visible && a(o.paint ?? {
|
|
57
57
|
fillType: "solid",
|
|
58
58
|
color: "000000"
|
|
59
59
|
});
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
let s = xe(e, t, n,
|
|
63
|
-
if (s.visible && !Ge(s) &&
|
|
60
|
+
}, s = (t, n, r, o) => {
|
|
61
|
+
a(Ie(e, t, n, r, o));
|
|
62
|
+
let s = xe(e, t, n, r, o, "#000000");
|
|
63
|
+
if (s.visible && !Ge(s) && a(s.paint ?? {
|
|
64
64
|
fillType: "solid",
|
|
65
65
|
color: "000000"
|
|
66
|
-
}),
|
|
67
|
-
},
|
|
66
|
+
}), i > 1048576) return !1;
|
|
67
|
+
}, c = (t, n) => {
|
|
68
68
|
let r = [e.chartexDataPointStyle, e.chartexDataPointLineStyle];
|
|
69
|
-
Te(e, Se(t, n), r, r, n, 1, "#000000", { linkedNoStyleFallback: !0 }).visible &&
|
|
69
|
+
Te(e, Se(t, n), r, r, n, 1, "#000000", { linkedNoStyleFallback: !0 }).visible && a({
|
|
70
70
|
fillType: "solid",
|
|
71
71
|
color: "000000"
|
|
72
72
|
});
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
75
|
-
if (
|
|
76
|
-
if (
|
|
77
|
-
if (e.chartType === "pareto" &&
|
|
78
|
-
let t = e.chartexParetoOwnerIndex ?? 0, n =
|
|
79
|
-
|
|
73
|
+
}, l = k(e, (t, n, r) => n === 0 ? K(e, t, n, r) : t);
|
|
74
|
+
if (l) {
|
|
75
|
+
if (l.kind === "tooManyInputPoints") return ce + 1;
|
|
76
|
+
if (g(l, s), i > 1048576 || (H(l, s), i > 1048576)) return i;
|
|
77
|
+
if (e.chartType === "pareto" && l.series.length > 0) {
|
|
78
|
+
let t = e.chartexParetoOwnerIndex ?? 0, n = l.series[t], r = e.series.find((e) => e.seriesType === "line");
|
|
79
|
+
c(r ?? n, r?.chartexFormatIdx ?? n?.chartexFormatIdx ?? 0);
|
|
80
80
|
}
|
|
81
81
|
} else if (e.chartType === "paretoLine") {
|
|
82
82
|
let t = e.series[0];
|
|
83
|
-
t &&
|
|
83
|
+
t && v(t, e.categories, { sortDescending: e.chartexParetoSortDescending ?? !1 }).points.length > 0 && c(t, h(t, 0));
|
|
84
84
|
} else if (e.chartType === "waterfall") {
|
|
85
|
-
let t = e.series[0], n = t?.values ?? [], r =
|
|
86
|
-
if (
|
|
87
|
-
for (let n = 0; n <
|
|
88
|
-
let o =
|
|
85
|
+
let t = e.series[0], n = t?.values ?? [], r = be(t?.dataPointOverrides), i = I(n, e.categories.length, e.subtotalIndices);
|
|
86
|
+
if (i.cumulativeOverflow || i.rawMax <= i.rawMin) return 0;
|
|
87
|
+
for (let n = 0; n < i.bars.length; n++) {
|
|
88
|
+
let o = i.bars[n];
|
|
89
89
|
if (!o.paintSlot) continue;
|
|
90
90
|
let s = o.semanticIndex, c = r.get(n);
|
|
91
|
-
|
|
91
|
+
a(Ie(e, t, c, s, 3));
|
|
92
92
|
let l = xe(e, t, c, s, 3, "#000000");
|
|
93
|
-
l.visible && !Ge(l) &&
|
|
93
|
+
l.visible && !Ge(l) && a(l.paint ?? {
|
|
94
94
|
fillType: "solid",
|
|
95
95
|
color: "000000"
|
|
96
96
|
});
|
|
@@ -98,13 +98,13 @@ function qe(e, t, n = 1) {
|
|
|
98
98
|
} else if (e.chartType === "funnel") {
|
|
99
99
|
let t = e.series[0], n = t?.values ?? [], r = Math.max(n.length, e.categories.length);
|
|
100
100
|
if (n.some((e) => e != null && e > 0)) {
|
|
101
|
-
let
|
|
101
|
+
let i = be(t?.dataPointOverrides);
|
|
102
102
|
for (let o = 0; o < r; o++) {
|
|
103
103
|
if (!((n[o] ?? 0) > 0)) continue;
|
|
104
|
-
let r =
|
|
105
|
-
|
|
104
|
+
let r = i.get(o);
|
|
105
|
+
a(Ie(e, t, r, 0, 1));
|
|
106
106
|
let s = xe(e, t, r, 0, 1, "#000000");
|
|
107
|
-
s.visible &&
|
|
107
|
+
s.visible && a(s.paint ?? {
|
|
108
108
|
fillType: "solid",
|
|
109
109
|
color: "000000"
|
|
110
110
|
});
|
|
@@ -113,37 +113,37 @@ function qe(e, t, n = 1) {
|
|
|
113
113
|
} else if (e.chartType === "boxWhisker") {
|
|
114
114
|
let t = e.chartexBox, n = t?.series.length ?? 0;
|
|
115
115
|
for (let r = 0; r < n; r++) {
|
|
116
|
-
let
|
|
117
|
-
for (let t of
|
|
116
|
+
let i = t.series[r], s = i.chartexFormatIdx ?? r, c = Ue(e, s, n, i.chartexStyle, i.color);
|
|
117
|
+
for (let t of i.valuesByCategory) F(t, i.quartileMethod) && (a(c), o(e.chartexDataPointStyle, Se(i, s), s, n));
|
|
118
118
|
}
|
|
119
119
|
} else {
|
|
120
120
|
let t = e.series[0], n = 1;
|
|
121
121
|
ue(e, ({ node: e }) => {
|
|
122
122
|
n = Math.max(n, e.branchIndex + 1);
|
|
123
123
|
});
|
|
124
|
-
let r =
|
|
125
|
-
if (ue(e, ({ node:
|
|
124
|
+
let r = be(t?.dataPointOverrides);
|
|
125
|
+
if (ue(e, ({ node: i, paintsBody: o }) => {
|
|
126
126
|
if (!o) return;
|
|
127
|
-
let s = r.get(
|
|
128
|
-
|
|
129
|
-
let c = xe(e, t, s,
|
|
130
|
-
c.visible &&
|
|
127
|
+
let s = r.get(i.labelIndex);
|
|
128
|
+
a(Ie(e, t, s, i.branchIndex, n));
|
|
129
|
+
let c = xe(e, t, s, i.branchIndex, n, "#000000", e.chartexDataPointStyle, { linkedNoStyleFallback: e.chartType === "treemap" });
|
|
130
|
+
c.visible && a(c.paint ?? {
|
|
131
131
|
fillType: "solid",
|
|
132
132
|
color: "000000"
|
|
133
133
|
});
|
|
134
134
|
}) === "too-large") return ce + 1;
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return i;
|
|
137
137
|
}
|
|
138
138
|
function Je(e, t, n, r, i = 0) {
|
|
139
139
|
let a = t.series[0];
|
|
140
140
|
if (!a) return;
|
|
141
|
-
let o =
|
|
141
|
+
let o = b(a.values, t.chartexHistogramBinning ?? {}, a.valFormatCode, t.date1904 === !0);
|
|
142
142
|
if (o.kind === "tooManyInputPoints") {
|
|
143
|
-
Le(e, n,
|
|
143
|
+
Le(e, n, z + 1);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
ze(e,
|
|
146
|
+
ze(e, P(t, {
|
|
147
147
|
chartType: "clusteredBar",
|
|
148
148
|
categories: o.categories,
|
|
149
149
|
series: [{
|
|
@@ -154,106 +154,106 @@ function Je(e, t, n, r, i = 0) {
|
|
|
154
154
|
}]
|
|
155
155
|
}), n, r, { gapPolicy: "chartex" }, i);
|
|
156
156
|
}
|
|
157
|
-
function Ye(t,
|
|
158
|
-
let { x:
|
|
159
|
-
if (
|
|
160
|
-
let { bars:
|
|
161
|
-
if (
|
|
162
|
-
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, r, i, a, s) {
|
|
158
|
+
let { x: l, y: u, w: d, h: f } = i, h = r.series[0]?.values ?? [], g = r.categories, v = Math.max(h.length, g.length);
|
|
159
|
+
if (v === 0 || Le(t, i, v)) return;
|
|
160
|
+
let { bars: y, rawMax: b, rawMin: x, cumulativeOverflow: S } = I(h, g.length, r.subtotalIndices);
|
|
161
|
+
if (S) {
|
|
162
|
+
t.fillStyle = "#888", t.font = "12px sans-serif", t.textAlign = "center", t.textBaseline = "middle", t.fillText("(chart values out of range)", l + d / 2, u + f / 2);
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
if (
|
|
166
|
-
let w =
|
|
165
|
+
if (b <= x) return;
|
|
166
|
+
let w = r.subtotalIndices.length === 0 && y.every((e, t) => !e.hasValue || h[t] >= 0), T = !r.valAxisHidden && r.valAxisTickLabelPos !== "none" && !w, D = Ae(t, r, d, f, a), k = O(r, d, f, a), F = p(r.valAxisFontSizeHpt, f, a), L = p(r.catAxisFontSizeHpt, f, a), te = j(r, r.valAxisFontFace, "minor"), R = j(r, r.catAxisFontFace, "minor"), z = oe(r, x, b, f / a);
|
|
167
167
|
t.save();
|
|
168
|
-
let
|
|
168
|
+
let ie = 0;
|
|
169
169
|
if (T) {
|
|
170
|
-
t.font = ye(
|
|
170
|
+
t.font = ye(F, te, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1);
|
|
171
171
|
let e = 0;
|
|
172
|
-
for (let
|
|
173
|
-
|
|
172
|
+
for (let n of z.majorLines) e = Math.max(e, _(t, ge(r, n, !1)));
|
|
173
|
+
ie = e + 8;
|
|
174
174
|
}
|
|
175
|
-
let
|
|
176
|
-
t.font = ye(
|
|
177
|
-
let
|
|
178
|
-
for (let e of
|
|
179
|
-
let
|
|
175
|
+
let ae = T ? ee(z.majorLines.map((e) => ge(r, e, !1)), ve(F)) / 2 : 0, ce = Math.max(1, d - k.valBandW - ie - d * .02) / v;
|
|
176
|
+
t.font = ye(L, R, r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1);
|
|
177
|
+
let ue = g.slice(0, v).map((e) => M(t, _e(e, r.catAxisFormatCode, r.date1904), Math.max(1, ce - 8))), de = 0;
|
|
178
|
+
for (let e of ue) e.some(Boolean) && (de = Math.max(de, e.length));
|
|
179
|
+
let pe = r.catAxisHidden || de === 0 ? 0 : de * (L + 2) + 4, V = r.series[0], H = be(V?.dataLabelOverrides), Ce = be(V?.dataPointOverrides), Ee = V?.chartexStyle, De = `#${V?.color ?? U(r, 0, 3, Ee)}`, Oe = `#${U(r, 1, 3, Ee)}`, Pe = `#${U(r, 2, 3, Ee)}`, Fe = Ue(r, 0, 3, Ee, V?.color), Re = Ue(r, 1, 3, Ee), ze = Ue(r, 2, 3, Ee), W = P(r, {
|
|
180
180
|
chartType: "clusteredBar",
|
|
181
181
|
series: [
|
|
182
|
-
ke(
|
|
183
|
-
ke(
|
|
184
|
-
ke(
|
|
182
|
+
ke(r, "Increase", V, r.chartexDataPointStyle, 0, 3, De, !1, !0, !0),
|
|
183
|
+
ke(r, "Decrease", V, r.chartexDataPointStyle, 1, 3, Oe, !1, !0, !0),
|
|
184
|
+
ke(r, "Total", V, r.chartexDataPointStyle, 2, 3, Pe, !1, !0, !0)
|
|
185
185
|
]
|
|
186
|
-
}), G = Be(t, W,
|
|
187
|
-
titleBand:
|
|
186
|
+
}), G = Be(t, W, d, f, a), { legRightW: Ke, legLeftW: K, legTopH: qe, legBottomH: Je } = se(G, r.legendOverlay === !0), Ye = N(r, l, u, d, f, a, {
|
|
187
|
+
titleBand: D,
|
|
188
188
|
legendReserve: G,
|
|
189
189
|
pad: {
|
|
190
|
-
t:
|
|
191
|
-
r: Ke +
|
|
192
|
-
b: Je + k.catBandH +
|
|
193
|
-
l: K + k.valBandW + (
|
|
190
|
+
t: D.bandH + qe + F / 2 + 2 + ae,
|
|
191
|
+
r: Ke + d * .02,
|
|
192
|
+
b: Je + k.catBandH + pe,
|
|
193
|
+
l: K + k.valBandW + (r.valAxisHidden ? d * .02 : Math.max(d * .03, ie))
|
|
194
194
|
},
|
|
195
195
|
honorPlotAreaManualLayout: !0
|
|
196
196
|
});
|
|
197
|
-
Ve(t,
|
|
197
|
+
Ve(t, r, l, u, d, f, u + Ye.title.topPad, Ye.title.fontPx);
|
|
198
198
|
let { px0: q, py0: J, pw: Y, ph: X } = Ye.plotRect;
|
|
199
199
|
if (Y <= 0 || X <= 0) return;
|
|
200
|
-
|
|
201
|
-
let Xe = oe(
|
|
202
|
-
if (!
|
|
203
|
-
t.font = ye(
|
|
204
|
-
let
|
|
205
|
-
for (let e of Xe.minorLines)
|
|
206
|
-
for (let
|
|
207
|
-
let
|
|
208
|
-
if (e(
|
|
200
|
+
he(t, r, q, J, Y, X, a, s);
|
|
201
|
+
let Xe = oe(r, x, b, X / a), Z = (e) => J + X - Xe.frac(e) * X, Q = E(r.valAxisLineColor, r.valAxisLineWidthEmu, a), Ze = E(r.catAxisLineColor, r.catAxisLineWidthEmu, a), Qe = le(r, a);
|
|
202
|
+
if (!r.valAxisHidden) {
|
|
203
|
+
t.font = ye(F, te, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1), t.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", t.textAlign = "right", t.textBaseline = "middle";
|
|
204
|
+
let n = me(r, a);
|
|
205
|
+
for (let e of Xe.minorLines) re(t, q, Y, Z(e), !1, n);
|
|
206
|
+
for (let n of Xe.majorLines) {
|
|
207
|
+
let i = Z(n);
|
|
208
|
+
if (e(r)) {
|
|
209
209
|
t.strokeStyle = Qe.color, t.lineWidth = Qe.width;
|
|
210
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,
|
|
211
|
+
Qe.dash.length > 0 && t.setLineDash(Qe.dash), t.beginPath(), t.moveTo(q, i), t.lineTo(q + Y, i), t.stroke(), Qe.dash.length > 0 && t.setLineDash(e);
|
|
212
212
|
}
|
|
213
|
-
T &&
|
|
213
|
+
T && A(t, ge(r, n, !1), q - 4, i, ve(F)), o(t, r.valAxisMajorTickMark, "val", q, i, Q.color, Q.width, !1, r.valAxisLineHidden, "major", a, r.valAxisLineDash);
|
|
214
214
|
}
|
|
215
|
-
for (let e of Xe.minorTicks)
|
|
215
|
+
for (let e of Xe.minorTicks) o(t, r.valAxisMinorTickMark, "val", q, Z(e), Q.color, Q.width, !1, r.valAxisLineHidden, "minor", a, r.valAxisLineDash);
|
|
216
216
|
}
|
|
217
|
-
let $e = !
|
|
218
|
-
$e &&
|
|
219
|
-
let tt = Y /
|
|
220
|
-
|
|
221
|
-
let
|
|
222
|
-
if (e.paintSlot &&
|
|
223
|
-
x:
|
|
224
|
-
y:
|
|
217
|
+
let $e = !r.valAxisHidden && !r.valAxisLineHidden, et = !r.catAxisHidden && !r.catAxisLineHidden;
|
|
218
|
+
$e && fe(t, q, J, q, J + X, Q.color, Q.width, r.valAxisLineDash), et && fe(t, q, J + X, q + Y, J + X, Ze.color, Ze.width, r.catAxisLineDash);
|
|
219
|
+
let tt = Y / v, $ = tt / (1 + n(r.barGapWidth, "chartex") / 100);
|
|
220
|
+
y.forEach((e, n) => {
|
|
221
|
+
let i = q + tt * n + (tt - $) / 2, o = Math.min(Z(e.start), Z(e.end)), _ = Math.max(Z(e.start), Z(e.end)), b = Math.max(1, _ - o), x = e.semanticIndex, S = Ce.get(n), C = Ie(r, V, S, x, 3), w = S?.color ? `#${S.color}` : e.isSub ? Pe : e.isPos ? De : Oe, T = We(r, r.chartexDataPointStyle, "line", x, 3), E = xe(r, V, S, x, 3, T ? `#${T}` : w);
|
|
222
|
+
if (e.paintSlot && m(t, c(S?.chartexStyle, V?.chartexStyle), r.chartexDataPointStyle, x, {
|
|
223
|
+
x: i,
|
|
224
|
+
y: o,
|
|
225
225
|
w: $,
|
|
226
226
|
h: b
|
|
227
|
-
},
|
|
227
|
+
}, a, (e) => {
|
|
228
228
|
C && we(e, C, {
|
|
229
|
-
x:
|
|
230
|
-
y:
|
|
229
|
+
x: i,
|
|
230
|
+
y: o,
|
|
231
231
|
w: $,
|
|
232
232
|
h: b
|
|
233
|
-
}, w,
|
|
234
|
-
x:
|
|
235
|
-
y:
|
|
233
|
+
}, w, a, s), !Ge(E) && Ne(e, E, a, {
|
|
234
|
+
x: i,
|
|
235
|
+
y: o,
|
|
236
236
|
w: $,
|
|
237
237
|
h: b
|
|
238
|
-
},
|
|
239
|
-
}), e.paintSlot &&
|
|
240
|
-
let
|
|
238
|
+
}, s) && e.strokeRect(i, o, $, b);
|
|
239
|
+
}), e.paintSlot && y[n + 1]?.paintSlot && n < v - 1 && r.chartexConnectorLines !== !1) {
|
|
240
|
+
let s = q + tt * (n + 1) + (tt - $) / 2, c = e.isPos ? o : _;
|
|
241
241
|
t.save();
|
|
242
|
-
let
|
|
243
|
-
Ne(t,
|
|
242
|
+
let l = [r.chartexSeriesLineStyle, r.chartexDataPointLineStyle], u = Te(r, Se(V, x), l, l, x, 3, "#000000", { linkedNoStyleFallback: !0 });
|
|
243
|
+
Ne(t, u, a) && (u.widthEmu ?? (t.lineWidth = .75 * a), t.beginPath(), t.moveTo(i + $, c), t.lineTo(s, c), t.stroke()), t.restore();
|
|
244
244
|
}
|
|
245
|
-
let D = e.hasValue ?
|
|
246
|
-
visible:
|
|
245
|
+
let D = e.hasValue ? h[n] : 0, O = ne(r, V, n, g[n] ?? "", D, {
|
|
246
|
+
visible: r.showDataLabels,
|
|
247
247
|
showVal: !0,
|
|
248
248
|
showCatName: !1
|
|
249
|
-
},
|
|
249
|
+
}, H, !e.hasValue);
|
|
250
250
|
if (O) {
|
|
251
|
-
let e =
|
|
252
|
-
t.font = `${O.textStyle.fontItalic ? "italic " : ""}${
|
|
251
|
+
let e = V?.dataLabelColors?.[n] ?? O.fontColor ?? null, c = e ? `#${e}` : r.dataLabelFontColor ? `#${r.dataLabelFontColor}` : "#595959", m = B(O.fontSizeHpt, a) ?? p(r.dataLabelFontSizeHpt, f, a), h = O.fontBold ?? r.dataLabelFontBold ?? !1, g = j(r, O.fontFace ?? r.dataLabelFontFace, "minor");
|
|
252
|
+
t.font = `${O.textStyle.fontItalic ? "italic " : ""}${h ? "bold " : ""}${m}px ${g}`, He(t, O.text, {
|
|
253
253
|
kind: "bar",
|
|
254
254
|
rect: {
|
|
255
|
-
x:
|
|
256
|
-
y:
|
|
255
|
+
x: i,
|
|
256
|
+
y: o,
|
|
257
257
|
w: $,
|
|
258
258
|
h: b
|
|
259
259
|
},
|
|
@@ -265,123 +265,123 @@ function Ye(t, n, r, i, a) {
|
|
|
265
265
|
y: J,
|
|
266
266
|
w: Y,
|
|
267
267
|
h: X
|
|
268
|
-
},
|
|
269
|
-
x:
|
|
270
|
-
y:
|
|
271
|
-
w:
|
|
272
|
-
h:
|
|
273
|
-
}, je(
|
|
268
|
+
}, m, c, O.manualLayout, {
|
|
269
|
+
x: l,
|
|
270
|
+
y: u,
|
|
271
|
+
w: d,
|
|
272
|
+
h: f
|
|
273
|
+
}, je(r, O.richRuns, a, g, h, O.textStyle), void 0, O.textStyle, a, O.labelBox, s);
|
|
274
274
|
}
|
|
275
|
-
}), t.textAlign = "center", t.textBaseline = "top", t.fillStyle =
|
|
275
|
+
}), t.textAlign = "center", t.textBaseline = "top", t.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", t.font = ye(L, R, r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1);
|
|
276
276
|
let nt = J + X + 4;
|
|
277
|
-
for (let e = 0; e <
|
|
277
|
+
for (let e = 0; e < v && !r.catAxisHidden; e++) {
|
|
278
278
|
let n = q + tt * e + tt / 2;
|
|
279
|
-
(
|
|
279
|
+
(ue[e] ?? []).forEach((e, r) => e && t.fillText(e, n, nt + r * (L + 2)));
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
C(t, r, l, u, d, f, q, J, Y, X, K, Je, k.catFontPx, k.valFontPx), Me(t, W, G, l, u, d, f, q, J, Y, X, D.bandH + 2, a, [
|
|
282
282
|
Fe,
|
|
283
283
|
Re,
|
|
284
284
|
ze
|
|
285
|
-
],
|
|
285
|
+
], s), t.restore();
|
|
286
286
|
}
|
|
287
|
-
function q(e, t,
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
290
|
-
let
|
|
291
|
-
for (let e = 0; e <
|
|
292
|
-
if (!(
|
|
293
|
-
let { x:
|
|
287
|
+
function q(e, t, r, i, a) {
|
|
288
|
+
let o = t.series[0]?.values ?? [], s = Math.max(o.length, t.categories.length);
|
|
289
|
+
if (s === 0 || Le(e, r, s)) return;
|
|
290
|
+
let l = 0;
|
|
291
|
+
for (let e = 0; e < s; e++) l = Math.max(l, o[e] ?? 0);
|
|
292
|
+
if (!(l > 0)) return;
|
|
293
|
+
let { x: u, y: d, w: f, h } = r, g = Ae(e, t, f, h, i), v = t.series[0], y = be(v?.dataLabelOverrides), b = `#${v?.color ?? U(t, 0, 1, v?.chartexStyle)}`, x = Ue(t, 0, 1, v?.chartexStyle, v?.color), S = {
|
|
294
294
|
...t,
|
|
295
|
-
series: [ke(t,
|
|
296
|
-
},
|
|
297
|
-
e.save(), e.font = ye(k,
|
|
298
|
-
let
|
|
295
|
+
series: [ke(t, v?.name ?? "", v, t.chartexDataPointStyle, 0, 1, b)]
|
|
296
|
+
}, C = Be(e, S, f, h, i), { legRightW: w, legLeftW: T, legTopH: D, legBottomH: O } = se(C, t.legendOverlay === !0), k = p(t.catAxisFontSizeHpt, h, i);
|
|
297
|
+
e.save(), e.font = ye(k, j(t, t.catAxisFontFace, "minor"), t.catAxisFontBold ?? !1, t.catAxisFontItalic ?? !1);
|
|
298
|
+
let M = 0;
|
|
299
299
|
if (!t.catAxisHidden) {
|
|
300
|
-
for (let n = 0; n < Math.min(
|
|
301
|
-
t.categories.length > 0 && (
|
|
300
|
+
for (let n = 0; n < Math.min(s, t.categories.length); n++) M = Math.max(M, _(e, t.categories[n]));
|
|
301
|
+
t.categories.length > 0 && (M += 10);
|
|
302
302
|
}
|
|
303
|
-
let
|
|
304
|
-
titleBand:
|
|
305
|
-
legendReserve:
|
|
303
|
+
let P = N(t, u, d, f, h, i, {
|
|
304
|
+
titleBand: g,
|
|
305
|
+
legendReserve: C,
|
|
306
306
|
pad: {
|
|
307
|
-
t:
|
|
308
|
-
r:
|
|
309
|
-
b: O +
|
|
310
|
-
l:
|
|
307
|
+
t: g.bandH + D + 2,
|
|
308
|
+
r: w + f * .02,
|
|
309
|
+
b: O + h * .02,
|
|
310
|
+
l: T + M + f * .02
|
|
311
311
|
},
|
|
312
312
|
honorPlotAreaManualLayout: !0
|
|
313
313
|
});
|
|
314
|
-
Ve(e, t,
|
|
315
|
-
let { px0:
|
|
316
|
-
if (
|
|
317
|
-
|
|
318
|
-
let
|
|
319
|
-
for (let n = 0; n <
|
|
320
|
-
let
|
|
321
|
-
S &&
|
|
322
|
-
x:
|
|
323
|
-
y:
|
|
324
|
-
w:
|
|
314
|
+
Ve(e, t, u, d, f, h, d + P.title.topPad, P.title.fontPx);
|
|
315
|
+
let { px0: F, py0: I, pw: ee, ph: L } = P.plotRect;
|
|
316
|
+
if (ee <= 0 || L <= 0) return;
|
|
317
|
+
he(e, t, F, I, ee, L, i, a);
|
|
318
|
+
let te = L / s, R = te / (1 + n(t.barGapWidth, "chartex") / 100), z = be(v?.dataPointOverrides);
|
|
319
|
+
for (let n = 0; n < s; n++) {
|
|
320
|
+
let r = Math.max(0, o[n] ?? 0), s = ee * r / l, g = F + (ee - s) / 2, _ = I + te * n + (te - R) / 2, x = z.get(n), S = Ie(t, v, x, 0, 1), C = xe(t, v, x, 0, 1, b), w = (e) => {
|
|
321
|
+
S && s > 0 ? we(e, S, {
|
|
322
|
+
x: g,
|
|
323
|
+
y: _,
|
|
324
|
+
w: s,
|
|
325
325
|
h: R
|
|
326
|
-
},
|
|
327
|
-
x:
|
|
328
|
-
y:
|
|
329
|
-
w:
|
|
326
|
+
}, b, i, a) : S && (e.fillStyle = W(e, S, g, _, s, R, b, a), e.fillRect(g, _, s, R)), Ne(e, C, i, s > 0 ? {
|
|
327
|
+
x: g,
|
|
328
|
+
y: _,
|
|
329
|
+
w: s,
|
|
330
330
|
h: R
|
|
331
|
-
} : void 0,
|
|
331
|
+
} : void 0, a) && e.strokeRect(g, _, s, R);
|
|
332
332
|
};
|
|
333
|
-
|
|
334
|
-
x:
|
|
335
|
-
y:
|
|
336
|
-
w:
|
|
333
|
+
s > 0 ? m(e, c(x?.chartexStyle, v?.chartexStyle), t.chartexDataPointStyle, 0, {
|
|
334
|
+
x: g,
|
|
335
|
+
y: _,
|
|
336
|
+
w: s,
|
|
337
337
|
h: R
|
|
338
|
-
},
|
|
338
|
+
}, i, w) : w(e);
|
|
339
339
|
let T = t.categories[n];
|
|
340
|
-
!t.catAxisHidden && T != null && (e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", e.textAlign = "right", e.textBaseline = "middle",
|
|
341
|
-
let E =
|
|
340
|
+
!t.catAxisHidden && T != null && (e.fillStyle = t.catAxisFontColor ? `#${t.catAxisFontColor}` : "#595959", e.textAlign = "right", e.textBaseline = "middle", A(e, T, F - 6, _ + R / 2, ve(k)));
|
|
341
|
+
let E = ne(t, v, n, T ?? "", r, {
|
|
342
342
|
visible: !1,
|
|
343
343
|
showVal: !1,
|
|
344
344
|
showCatName: !1
|
|
345
|
-
},
|
|
345
|
+
}, y);
|
|
346
346
|
if (E) {
|
|
347
|
-
let n =
|
|
348
|
-
e.font = `${E.textStyle.fontItalic ? "italic " : ""}${E.fontBold ? "bold " : ""}${n}px ${
|
|
347
|
+
let n = B(E.fontSizeHpt, i) ?? p(t.dataLabelFontSizeHpt, h, i), r = j(t, E.fontFace ?? t.dataLabelFontFace, "minor");
|
|
348
|
+
e.font = `${E.textStyle.fontItalic ? "italic " : ""}${E.fontBold ? "bold " : ""}${n}px ${r}`, He(e, E.text, {
|
|
349
349
|
kind: "bar",
|
|
350
350
|
rect: {
|
|
351
|
-
x:
|
|
352
|
-
y:
|
|
353
|
-
w:
|
|
351
|
+
x: g,
|
|
352
|
+
y: _,
|
|
353
|
+
w: s,
|
|
354
354
|
h: R
|
|
355
355
|
},
|
|
356
356
|
orientation: "horizontal",
|
|
357
357
|
negative: !1,
|
|
358
358
|
position: E.position ?? "ctr"
|
|
359
359
|
}, {
|
|
360
|
-
x:
|
|
361
|
-
y:
|
|
362
|
-
w:
|
|
363
|
-
h:
|
|
360
|
+
x: F,
|
|
361
|
+
y: I,
|
|
362
|
+
w: ee,
|
|
363
|
+
h: L
|
|
364
364
|
}, n, E.fontColor ? `#${E.fontColor}` : "#ffffff", E.manualLayout, {
|
|
365
|
-
x:
|
|
366
|
-
y:
|
|
367
|
-
w:
|
|
368
|
-
h
|
|
369
|
-
}, je(t, E.richRuns,
|
|
365
|
+
x: u,
|
|
366
|
+
y: d,
|
|
367
|
+
w: f,
|
|
368
|
+
h
|
|
369
|
+
}, je(t, E.richRuns, i, r, E.fontBold ?? !1, E.textStyle), void 0, E.textStyle, i, E.labelBox, a);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
if (!t.catAxisHidden && !t.catAxisLineHidden) {
|
|
373
|
-
let n = E(t.catAxisLineColor, t.catAxisLineWidthEmu,
|
|
374
|
-
e.strokeStyle = n.color, e.lineWidth = n.width, e.beginPath(), e.moveTo(
|
|
373
|
+
let n = E(t.catAxisLineColor, t.catAxisLineWidthEmu, i);
|
|
374
|
+
e.strokeStyle = n.color, e.lineWidth = n.width, e.beginPath(), e.moveTo(F, I), e.lineTo(F, I + L), e.stroke();
|
|
375
375
|
}
|
|
376
|
-
Me(e,
|
|
376
|
+
Me(e, S, C, u, d, f, h, F, I, ee, L, g.bandH + 2, i, [x], a), e.restore();
|
|
377
377
|
}
|
|
378
378
|
function J(e, t, n, r, i = 0) {
|
|
379
379
|
let a = t.series[0];
|
|
380
380
|
if (!a || Le(e, n, Math.max(t.categories.length, a.categories?.length ?? 0, a.values.length))) return;
|
|
381
|
-
let o =
|
|
381
|
+
let o = v(a, t.categories, { sortDescending: t.chartexParetoSortDescending ?? !1 });
|
|
382
382
|
if (o.points.length === 0) return;
|
|
383
|
-
let s =
|
|
384
|
-
Pe(e,
|
|
383
|
+
let s = h(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, P(t, {
|
|
385
385
|
chartType: "line",
|
|
386
386
|
categories: t.chartexParetoFlatEndpoint ? [...o.categories, ""] : o.categories,
|
|
387
387
|
series: [{
|
|
@@ -431,7 +431,7 @@ function Y(e) {
|
|
|
431
431
|
function X(e, t, n, r, i = 0) {
|
|
432
432
|
let a = t.series.filter((e) => e.seriesType !== "line"), o = t.chartexParetoOwnerIndex ?? 0, s = a[o];
|
|
433
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) =>
|
|
434
|
+
let c = a.map((e, n) => v(n === 0 ? K(t, e, n, a.length) : e, t.categories, {
|
|
435
435
|
sortDescending: t.chartexParetoSortDescending ?? !0,
|
|
436
436
|
keepUnvaluedCategories: !0
|
|
437
437
|
})), l = c[o], u = c[0];
|
|
@@ -446,7 +446,7 @@ function X(e, t, n, r, i = 0) {
|
|
|
446
446
|
useSecondaryAxis: !0,
|
|
447
447
|
showMarker: !1
|
|
448
448
|
}, h = Y(t);
|
|
449
|
-
ze(e,
|
|
449
|
+
ze(e, P(t, {
|
|
450
450
|
chartType: "clusteredBar",
|
|
451
451
|
categories: d ? [...u.categories, ""] : u.categories,
|
|
452
452
|
series: [...c.map((e) => ({
|
|
@@ -468,7 +468,7 @@ var Xe = 7, Z = .05, Q = 1.2;
|
|
|
468
468
|
function Ze(e, t, n, r) {
|
|
469
469
|
let i = (r ?? t) - (n ?? e);
|
|
470
470
|
if (!(i > 0) || !Number.isFinite(i)) return null;
|
|
471
|
-
let a =
|
|
471
|
+
let a = ie(i, Xe);
|
|
472
472
|
if (!(a > 0) || !Number.isFinite(a)) return null;
|
|
473
473
|
let o = e - i * Z, s = t + i * Z;
|
|
474
474
|
e >= 0 && (e === 0 || t > Q * e) && (o = 0), t <= 0 && (t === 0 || Math.abs(e) > Q * Math.abs(t)) && (s = 0);
|
|
@@ -479,91 +479,91 @@ function Ze(e, t, n, r) {
|
|
|
479
479
|
majorUnit: a
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
function Qe(e, r, i,
|
|
483
|
-
let
|
|
484
|
-
if (!
|
|
485
|
-
let { x:
|
|
486
|
-
if (Le(e, i,
|
|
487
|
-
let
|
|
488
|
-
e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(chart values out of range)",
|
|
489
|
-
},
|
|
482
|
+
function Qe(e, r, i, a, s) {
|
|
483
|
+
let u = 3 * a, d = r.chartexBox;
|
|
484
|
+
if (!d || d.categories.length === 0 || d.series.length === 0) return;
|
|
485
|
+
let { x: g, y: v, w: y, h: b } = i;
|
|
486
|
+
if (Le(e, i, t(d.series.map((e) => e.valuesByCategory), 1e4))) return;
|
|
487
|
+
let x = () => {
|
|
488
|
+
e.fillStyle = "#888", e.font = "12px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("(chart values out of range)", g + y / 2, v + b / 2);
|
|
489
|
+
}, D = (e) => {
|
|
490
490
|
let t = e.max - e.min, n = t / e.step;
|
|
491
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;
|
|
492
|
-
},
|
|
493
|
-
for (let e of
|
|
494
|
-
if (!isFinite(
|
|
495
|
-
if (!Number.isFinite(
|
|
496
|
-
|
|
492
|
+
}, k = Infinity, M = -Infinity;
|
|
493
|
+
for (let e of d.series) for (let t of e.valuesByCategory) for (let e of t) Number.isFinite(e) && (e < k && (k = e), e > M && (M = e));
|
|
494
|
+
if (!isFinite(k) || !isFinite(M)) return;
|
|
495
|
+
if (!Number.isFinite(M - k)) {
|
|
496
|
+
x();
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
|
-
let
|
|
499
|
+
let P = r.valAxisMajorUnit == null ? Ze(k, M, r.valMin, r.valMax) : null, I = P ? {
|
|
500
500
|
...r,
|
|
501
|
-
valMin:
|
|
502
|
-
valMax:
|
|
503
|
-
valAxisMajorUnit:
|
|
504
|
-
} : r,
|
|
505
|
-
dataMin:
|
|
506
|
-
dataMax:
|
|
507
|
-
explicitMin:
|
|
508
|
-
explicitMax:
|
|
509
|
-
axisLenPt:
|
|
510
|
-
majorUnit:
|
|
501
|
+
valMin: P.min,
|
|
502
|
+
valMax: P.max,
|
|
503
|
+
valAxisMajorUnit: P.majorUnit
|
|
504
|
+
} : r, L = j(r, r.valAxisFontFace, "minor"), ne = p(r.valAxisFontSizeHpt, b, a), z = te(ne), ie = Oe(a), B = l({
|
|
505
|
+
dataMin: k,
|
|
506
|
+
dataMax: M,
|
|
507
|
+
explicitMin: I.valMin,
|
|
508
|
+
explicitMax: I.valMax,
|
|
509
|
+
axisLenPt: b / a,
|
|
510
|
+
majorUnit: I.valAxisMajorUnit
|
|
511
511
|
});
|
|
512
|
-
if (!
|
|
513
|
-
min:
|
|
514
|
-
max:
|
|
515
|
-
step:
|
|
512
|
+
if (!D({
|
|
513
|
+
min: B.min,
|
|
514
|
+
max: B.max,
|
|
515
|
+
step: B.majorUnit
|
|
516
516
|
})) {
|
|
517
|
-
|
|
517
|
+
x();
|
|
518
518
|
return;
|
|
519
519
|
}
|
|
520
|
-
let
|
|
520
|
+
let ae = 0;
|
|
521
521
|
if (!r.valAxisHidden) {
|
|
522
522
|
let t = e.font;
|
|
523
|
-
e.font = ye(
|
|
523
|
+
e.font = ye(ne, L, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1);
|
|
524
524
|
let n = 0;
|
|
525
|
-
for (let t of
|
|
525
|
+
for (let t of B.majorTicks) {
|
|
526
526
|
let i = ge(r, t, !1);
|
|
527
|
-
n = Math.max(n,
|
|
527
|
+
n = Math.max(n, _(e, i));
|
|
528
528
|
}
|
|
529
|
-
e.font = t,
|
|
529
|
+
e.font = t, ae = n + z + S * a;
|
|
530
530
|
}
|
|
531
|
-
let
|
|
532
|
-
let n =
|
|
531
|
+
let ce = Ae(e, r, y, b, a), ue = p(r.catAxisFontSizeHpt, b, a), pe = p(r.valAxisFontSizeHpt, b, a), V = O(r, y, b, a), H = d.series.length, _e = d.series.map((e, t) => h(e, t)), be = d.series.map((e, t) => {
|
|
532
|
+
let n = _e[t], i = e.color ?? U(r, n, H, e.chartexStyle), a = ke(r, e.name, Se(e, n) ?? e, r.chartexDataPointStyle, n, H, i, !0), o = Ce(r, e, n, H, i);
|
|
533
533
|
return o.darkened && a.lineColor != null ? {
|
|
534
534
|
...a,
|
|
535
535
|
lineColor: o.line.color.replace(/^#/, "")
|
|
536
536
|
} : a;
|
|
537
537
|
}), xe = {
|
|
538
538
|
...r,
|
|
539
|
-
series:
|
|
540
|
-
}, Te = Be(e, xe,
|
|
541
|
-
titleBand:
|
|
539
|
+
series: be
|
|
540
|
+
}, Te = Be(e, xe, y, b, a), { legRightW: De, legLeftW: je, legTopH: Pe, legBottomH: Ie } = se(Te, r.legendOverlay === !0), ze = r.valAxisHidden ? 0 : ee(B.majorTicks.map((e) => ge(r, e, !1)), ve(ne)) / 2, He = r.catAxisHidden ? 0 : ee(d.categories, ve(ue)), Ge = N(r, g, v, y, b, a, {
|
|
541
|
+
titleBand: ce,
|
|
542
542
|
legendReserve: Te,
|
|
543
543
|
pad: {
|
|
544
|
-
t:
|
|
545
|
-
r: De +
|
|
546
|
-
b: Ie +
|
|
547
|
-
l: je +
|
|
544
|
+
t: ce.bandH + Pe + pe / 2 + 2 + ze,
|
|
545
|
+
r: De + y * .02,
|
|
546
|
+
b: Ie + V.catBandH + (r.catAxisHidden ? b * .02 : de(ue) + He),
|
|
547
|
+
l: je + V.valBandW + (r.valAxisHidden ? y * .02 : ae)
|
|
548
548
|
},
|
|
549
549
|
honorPlotAreaManualLayout: !0
|
|
550
550
|
}), { px0: W, py0: G, pw: Ke, ph: K } = Ge.plotRect;
|
|
551
551
|
if (Ke <= 0 || K <= 0) {
|
|
552
|
-
Ve(e, r,
|
|
552
|
+
Ve(e, r, g, v, y, b, v + Ge.title.topPad, Ge.title.fontPx);
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
|
-
|
|
556
|
-
let qe =
|
|
557
|
-
if (!
|
|
558
|
-
|
|
555
|
+
he(e, r, W, G, Ke, K, a, s);
|
|
556
|
+
let qe = d.categories, Je = qe.length, Ye = oe(I, k, M, K / a);
|
|
557
|
+
if (!D(Ye)) {
|
|
558
|
+
x();
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
|
-
Ve(e, r,
|
|
562
|
-
let { min: q, max: J } = Ye, Y = J - q, X = (e) => G + K * (1 - (e - q) / Y), Xe = E(r.valAxisLineColor, r.valAxisLineWidthEmu,
|
|
561
|
+
Ve(e, r, g, v, y, b, v + 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, a), Z = le(r, a);
|
|
563
563
|
if (e.save(), !r.valAxisHidden) {
|
|
564
|
-
if (e.font = ye(
|
|
565
|
-
let t =
|
|
566
|
-
for (let n of Ye.minorLines)
|
|
564
|
+
if (e.font = ye(ne, L, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1), e.textAlign = "right", e.textBaseline = "middle", r.valAxisMinorGridlines) {
|
|
565
|
+
let t = me(r, a);
|
|
566
|
+
for (let n of Ye.minorLines) re(e, W, Ke, X(n), !1, t);
|
|
567
567
|
}
|
|
568
568
|
for (let t of Ye.majorLines) {
|
|
569
569
|
let n = X(t);
|
|
@@ -572,15 +572,15 @@ function Qe(e, r, i, o, u) {
|
|
|
572
572
|
let t = Z.dash.length > 0 && e.getLineDash ? e.getLineDash() : [];
|
|
573
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);
|
|
574
574
|
}
|
|
575
|
-
e.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959",
|
|
575
|
+
e.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", A(e, ge(r, t, !1), W - ie, n, ve(ne)), o(e, r.valAxisMajorTickMark, "val", W, n, Xe.color, Xe.width, !1, r.valAxisLineHidden, "major", a, r.valAxisLineDash);
|
|
576
576
|
}
|
|
577
|
-
for (let t of Ye.minorTicks)
|
|
578
|
-
r.valAxisLineHidden ||
|
|
577
|
+
for (let t of Ye.minorTicks) o(e, r.valAxisMinorTickMark, "val", W, X(t), Xe.color, Xe.width, !1, r.valAxisLineHidden, "minor", a, r.valAxisLineDash);
|
|
578
|
+
r.valAxisLineHidden || fe(e, W, G, W, G + K, Xe.color, Xe.width, r.valAxisLineDash);
|
|
579
579
|
}
|
|
580
|
-
let Q = E(r.catAxisLineColor, r.catAxisLineWidthEmu,
|
|
581
|
-
!r.catAxisHidden && !r.catAxisLineHidden &&
|
|
582
|
-
let Qe = Ke / Je, $e =
|
|
583
|
-
let n = T(W, Ke,
|
|
580
|
+
let Q = E(r.catAxisLineColor, r.catAxisLineWidthEmu, a);
|
|
581
|
+
!r.catAxisHidden && !r.catAxisLineHidden && fe(e, W, G + K, W + Ke, G + K, Q.color, Q.width, r.catAxisLineDash);
|
|
582
|
+
let Qe = Ke / Je, $e = n(r.barGapWidth, "chartex"), et = (e) => `#${d.series[e].color ?? U(r, _e[e], H, d.series[e].chartexStyle)}`, tt = (e) => Ue(r, _e[e], H, d.series[e].chartexStyle, d.series[e].color), $ = d.series.map((e) => e.valuesByCategory.map((t) => F(t, e.quartileMethod))), nt = r.chartStyleMarkerSymbol ?? r.chartexMarkerSymbol ?? "circle", rt = d.series.map((e, t) => nt === "none" ? $[t].map(() => []) : f($[t], e.showNonoutliers, e.showOutliers, X, 3 * a)), it = (e, t) => {
|
|
583
|
+
let n = T(W, Ke, d.oneBoxPerSeries ? 1 : Je, H, d.oneBoxPerSeries ? 0 : e, t, $e);
|
|
584
584
|
return n ? {
|
|
585
585
|
bx: n.boxX,
|
|
586
586
|
boxW: n.boxWidth,
|
|
@@ -591,46 +591,46 @@ function Qe(e, r, i, o, u) {
|
|
|
591
591
|
cx: W
|
|
592
592
|
};
|
|
593
593
|
}, at = (t, n) => {
|
|
594
|
-
let i =
|
|
595
|
-
if (!
|
|
596
|
-
let { bx:
|
|
597
|
-
if (Ne(e, C,
|
|
598
|
-
let t = X(
|
|
599
|
-
e.beginPath(),
|
|
594
|
+
let i = d.series[t], o = $[t][n];
|
|
595
|
+
if (!o) return;
|
|
596
|
+
let { bx: l, boxW: f, cx: p } = it(n, t), h = et(t), g = tt(t), _ = r.chartexDataPointStyle, v = r.chartexDataPointMarkerStyle ?? _, y = _e[t], b = Se(i, y) ?? i, x = We(r, _, "line", y, H), S = b.lineColor ? `#${b.lineColor}` : x ? `#${x}` : h, C = Ce(r, i, y, H, S).line, T = We(r, v, "fill", y, H), E = Ee(r, y, H, i.chartexStyle, i.color, v), D = Fe(r, v, b, y, H, We(r, v, "line", y, H) ?? S, { linkedNoStyleFallback: !0 }), O = c(i.chartexStyle), k = X(o.q1), A = X(o.q3), j = Math.min(k, A), M = Math.max(1, Math.abs(k - A)), N = f * .4;
|
|
597
|
+
if (Ne(e, C, a)) {
|
|
598
|
+
let t = X(o.whiskerHi), n = X(o.whiskerLo);
|
|
599
|
+
e.beginPath(), o.whiskerHi > o.q3 && (e.moveTo(p, t), e.lineTo(p, A)), o.whiskerLo < o.q1 && (e.moveTo(p, k), e.lineTo(p, n)), o.whiskerHi >= o.q3 && (e.moveTo(p - N / 2, t), e.lineTo(p + N / 2, t)), o.whiskerLo <= o.q1 && (e.moveTo(p - N / 2, n), e.lineTo(p + N / 2, n)), e.stroke();
|
|
600
600
|
}
|
|
601
|
-
|
|
602
|
-
x:
|
|
601
|
+
m(e, i.chartexStyle, _, y, {
|
|
602
|
+
x: l,
|
|
603
603
|
y: j,
|
|
604
|
-
w:
|
|
604
|
+
w: f,
|
|
605
605
|
h: M
|
|
606
|
-
},
|
|
607
|
-
if (
|
|
608
|
-
x:
|
|
606
|
+
}, a, (e) => {
|
|
607
|
+
if (g && we(e, g, {
|
|
608
|
+
x: l,
|
|
609
609
|
y: j,
|
|
610
|
-
w:
|
|
610
|
+
w: f,
|
|
611
611
|
h: M
|
|
612
|
-
},
|
|
613
|
-
x:
|
|
612
|
+
}, h, a, s), Ne(e, C, a, {
|
|
613
|
+
x: l,
|
|
614
614
|
y: j,
|
|
615
|
-
w:
|
|
615
|
+
w: f,
|
|
616
616
|
h: M
|
|
617
|
-
},
|
|
617
|
+
}, s)) {
|
|
618
618
|
let t = e.lineWidth;
|
|
619
|
-
e.strokeRect(
|
|
619
|
+
e.strokeRect(l + t / 2, j + t / 2, f - t, M - t);
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
|
-
let P = X(
|
|
623
|
-
Ne(e, C,
|
|
624
|
-
for (let r of rt[t][n]) Re(e,
|
|
622
|
+
let P = X(o.median);
|
|
623
|
+
Ne(e, C, a) && (e.beginPath(), e.moveTo(l, P), e.lineTo(l + f, P), e.stroke());
|
|
624
|
+
for (let r of rt[t][n]) Re(e, p, X(r), nt, 3, E ? T ? `#${T}` : h : "transparent", D.visible ? D.color : null, a, D.widthEmu == null ? 1 : w(D.widthEmu, a), E, s, D.visible ? D.paint : null, D.dash, D.customDash, D.cap, D.join, !1, O, v, y, y);
|
|
625
625
|
if (i.meanMarker) {
|
|
626
|
-
let t = X(
|
|
627
|
-
Ne(e, C,
|
|
626
|
+
let t = X(o.mean), n = u;
|
|
627
|
+
Ne(e, C, a) && (e.beginPath(), e.moveTo(p - n, t - n), e.lineTo(p + n, t + n), e.moveTo(p + n, t - n), e.lineTo(p - n, t + n), e.stroke());
|
|
628
628
|
}
|
|
629
629
|
}, ot = (t) => {
|
|
630
|
-
let n =
|
|
630
|
+
let n = d.series[t];
|
|
631
631
|
if (!n.meanLine) return;
|
|
632
|
-
let i = Ce(r, n,
|
|
633
|
-
if (e.save(), Ne(e, i,
|
|
632
|
+
let i = Ce(r, n, _e[t], H, et(t)).line;
|
|
633
|
+
if (e.save(), Ne(e, i, a)) {
|
|
634
634
|
let n = !1;
|
|
635
635
|
e.beginPath();
|
|
636
636
|
for (let r = 0; r < Je; r++) {
|
|
@@ -646,121 +646,121 @@ function Qe(e, r, i, o, u) {
|
|
|
646
646
|
}
|
|
647
647
|
e.restore();
|
|
648
648
|
};
|
|
649
|
-
for (let e = 0; e <
|
|
649
|
+
for (let e = 0; e < H; e++) {
|
|
650
650
|
for (let t = 0; t < Je; t++) at(e, t);
|
|
651
651
|
ot(e);
|
|
652
652
|
}
|
|
653
|
-
let st =
|
|
653
|
+
let st = p(r.catAxisFontSizeHpt, b, a), ct = R(st);
|
|
654
654
|
for (let t = 0; t < Je; t++) {
|
|
655
655
|
let n = W + Qe * (t + .5);
|
|
656
|
-
if (r.catAxisHidden ||
|
|
657
|
-
e.font = ye(st,
|
|
656
|
+
if (r.catAxisHidden || o(e, r.catAxisMajorTickMark, "cat", G + K, n, Q.color, Q.width, !1, r.catAxisLineHidden, "major", a, r.catAxisLineDash), !r.catAxisHidden) {
|
|
657
|
+
e.font = ye(st, j(r, r.catAxisFontFace, "minor"), r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1), e.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", e.textAlign = "center", e.textBaseline = "top";
|
|
658
658
|
let i = qe[t];
|
|
659
|
-
|
|
659
|
+
A(e, i, n, G + K + ct, ve(st));
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
e.restore(),
|
|
662
|
+
e.restore(), C(e, r, g, v, y, b, W, G, Ke, K, je, Ie, V.catFontPx, V.valFontPx), Me(e, xe, Te, g, v, y, b, W, G, Ke, K, ce.bandH + 2, a, d.series.map((e, t) => tt(t)), s);
|
|
663
663
|
}
|
|
664
664
|
var $e = .18;
|
|
665
|
-
function et(e, t, n,
|
|
665
|
+
function et(e, t, n, r, o) {
|
|
666
666
|
let s = t.chartexSunburst;
|
|
667
667
|
if (!s || s.rows.length === 0) return;
|
|
668
|
-
let { x: l, y: f, w: p, h
|
|
668
|
+
let { x: l, y: f, w: p, h } = n;
|
|
669
669
|
if (d(s.rows)) {
|
|
670
|
-
Le(e, n,
|
|
670
|
+
Le(e, n, z + 1);
|
|
671
671
|
return;
|
|
672
672
|
}
|
|
673
673
|
let g = u(s.rows);
|
|
674
674
|
if (g.layoutWeight <= 0 || g.children.length === 0) return;
|
|
675
|
-
let _ = t.series[0], v =
|
|
675
|
+
let _ = t.series[0], v = be(_?.dataLabelOverrides), y = g.children.map((e, n) => Ue(t, n, g.children.length, _?.chartexStyle, _?.color)), b = P(t, {
|
|
676
676
|
chartType: "clusteredBar",
|
|
677
677
|
series: g.children.map((e) => {
|
|
678
678
|
let n = U(t, e.branchIndex, g.children.length, _?.chartexStyle);
|
|
679
679
|
return ke(t, e.label, _, t.chartexDataPointStyle, e.branchIndex, g.children.length, n, !1, !1);
|
|
680
680
|
})
|
|
681
|
-
}), x = Be(e, b, p,
|
|
681
|
+
}), x = Be(e, b, p, h, r), S = N(t, l, f, p, h, r, {
|
|
682
682
|
titleTopPadFrac: .035,
|
|
683
683
|
titleBottomPadFrac: .035,
|
|
684
684
|
legendReserve: x,
|
|
685
685
|
radialGapFrac: .02,
|
|
686
686
|
honorPlotAreaManualLayout: !0
|
|
687
687
|
});
|
|
688
|
-
Ve(e, t, l, f, p,
|
|
689
|
-
let { px0:
|
|
690
|
-
if (!(
|
|
691
|
-
|
|
692
|
-
let
|
|
693
|
-
g.a0 = -Math.PI / 2, g.a1 = -Math.PI / 2 + Math.PI * 2,
|
|
694
|
-
let
|
|
695
|
-
for (;
|
|
696
|
-
let e =
|
|
697
|
-
e.depth >= 0 &&
|
|
698
|
-
for (let t = e.children.length - 1; t >= 0; t--)
|
|
688
|
+
Ve(e, t, l, f, p, h, f + S.title.topPad, S.title.fontPx);
|
|
689
|
+
let { px0: C, py0: w, pw: T, ph: E } = S.plotRect;
|
|
690
|
+
if (!(T > 0) || !(E > 0)) return;
|
|
691
|
+
he(e, t, C, w, T, E, r, o);
|
|
692
|
+
let D = C + T / 2, O = w + E / 2, k = Math.min(T, E) * .46;
|
|
693
|
+
g.a0 = -Math.PI / 2, g.a1 = -Math.PI / 2 + Math.PI * 2, i(g);
|
|
694
|
+
let A = a(g) + 1, M = k * $e, F = (k - M) / A, I = (e) => `#${U(t, e, g.children.length, _?.chartexStyle)}`, ee = be(_?.dataPointOverrides), L = _?.seriesDataLabels, te = j(t, L?.fontFace ?? t.dataLabelFontFace, "minor"), R = B(L?.fontSizeHpt, r) ?? Math.max(7, Math.min(13, k * .075)), re = L?.fontColor ? `#${L.fontColor}` : "#ffffff", ie = Array.from({ length: A }, () => []), ae = [g];
|
|
695
|
+
for (; ae.length > 0;) {
|
|
696
|
+
let e = ae.pop();
|
|
697
|
+
e.depth >= 0 && ie[e.depth].push(e);
|
|
698
|
+
for (let t = e.children.length - 1; t >= 0; t--) ae.push(e.children[t]);
|
|
699
699
|
}
|
|
700
700
|
e.save();
|
|
701
|
-
for (let n = 0; n <
|
|
702
|
-
let
|
|
703
|
-
for (let s of
|
|
701
|
+
for (let n = 0; n < A; n++) {
|
|
702
|
+
let i = M + n * F, a = i + F;
|
|
703
|
+
for (let s of ie[n]) {
|
|
704
704
|
let n = s.a1 - s.a0;
|
|
705
705
|
if (n <= 1e-4) continue;
|
|
706
|
-
let u =
|
|
707
|
-
x:
|
|
708
|
-
y:
|
|
709
|
-
w:
|
|
710
|
-
h:
|
|
706
|
+
let u = ee.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: D - a,
|
|
708
|
+
y: O - a,
|
|
709
|
+
w: a * 2,
|
|
710
|
+
h: a * 2
|
|
711
711
|
};
|
|
712
|
-
|
|
713
|
-
e.beginPath(), e.arc(
|
|
712
|
+
m(e, c(u?.chartexStyle, _?.chartexStyle), t.chartexDataPointStyle, _?.chartexFormatIdx ?? 0, b, r, (e) => {
|
|
713
|
+
e.beginPath(), e.arc(D, O, a, s.a0, s.a1), e.arc(D, O, i, s.a1, s.a0, !0), e.closePath(), d && De(e, d, b, I(s.branchIndex), r, o), Ne(e, y, r, b, o) && e.stroke();
|
|
714
714
|
}, s.branchIndex);
|
|
715
|
-
let x =
|
|
715
|
+
let x = ne(t, _, s.labelIndex, s.label, s.value, {
|
|
716
716
|
visible: !1,
|
|
717
717
|
showVal: !1,
|
|
718
718
|
showCatName: !1
|
|
719
719
|
}, v);
|
|
720
720
|
if (!x) continue;
|
|
721
|
-
let S = x.text,
|
|
722
|
-
if (!x.manualLayout && L <
|
|
723
|
-
let
|
|
724
|
-
if (e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${
|
|
721
|
+
let S = x.text, k = B(x.fontSizeHpt, r) ?? R, A = x.fontColor ? `#${x.fontColor}` : re, M = x.fontFace ? j(t, x.fontFace, "minor") : te, N = (s.a0 + s.a1) / 2, P = (i + a) / 2, L = F - 4, z = n * P;
|
|
722
|
+
if (!x.manualLayout && L < k * .9 && z < k * .9) continue;
|
|
723
|
+
let ie = D + Math.cos(N) * P, ae = O + Math.sin(N) * P;
|
|
724
|
+
if (e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${k}px ${M}`, x.manualLayout) {
|
|
725
725
|
He(e, S, {
|
|
726
726
|
kind: "point",
|
|
727
|
-
x:
|
|
728
|
-
y:
|
|
727
|
+
x: ie,
|
|
728
|
+
y: ae,
|
|
729
729
|
position: x.position ?? "ctr"
|
|
730
730
|
}, {
|
|
731
|
-
x:
|
|
732
|
-
y:
|
|
733
|
-
w:
|
|
734
|
-
h:
|
|
735
|
-
},
|
|
731
|
+
x: C,
|
|
732
|
+
y: w,
|
|
733
|
+
w: T,
|
|
734
|
+
h: E
|
|
735
|
+
}, k, A, x.manualLayout, {
|
|
736
736
|
x: l,
|
|
737
737
|
y: f,
|
|
738
738
|
w: p,
|
|
739
|
-
h
|
|
740
|
-
}, je(t, x.richRuns,
|
|
739
|
+
h
|
|
740
|
+
}, je(t, x.richRuns, r, M, x.fontBold ?? !1, x.textStyle), void 0, x.textStyle, r, x.labelBox, o);
|
|
741
741
|
continue;
|
|
742
742
|
}
|
|
743
|
-
e.save(), e.translate(
|
|
744
|
-
let
|
|
745
|
-
(
|
|
743
|
+
e.save(), e.translate(ie, ae);
|
|
744
|
+
let oe = N, se = oe * 180 / Math.PI % 360;
|
|
745
|
+
(se > 90 || se < -90) && (oe += Math.PI), e.rotate(oe), e.font = `${x.textStyle.fontItalic ? "italic " : ""}${x.fontBold ? "bold " : ""}${k}px ${M}`, He(e, S, {
|
|
746
746
|
kind: "point",
|
|
747
747
|
x: 0,
|
|
748
748
|
y: 0,
|
|
749
749
|
position: x.position ?? "ctr"
|
|
750
750
|
}, {
|
|
751
751
|
x: -L / 2,
|
|
752
|
-
y: -
|
|
752
|
+
y: -z / 2,
|
|
753
753
|
w: L,
|
|
754
|
-
h:
|
|
755
|
-
},
|
|
754
|
+
h: z
|
|
755
|
+
}, k, A, void 0, {
|
|
756
756
|
x: -L / 2,
|
|
757
|
-
y: -
|
|
757
|
+
y: -z / 2,
|
|
758
758
|
w: L,
|
|
759
|
-
h:
|
|
760
|
-
}, je(t, x.richRuns,
|
|
759
|
+
h: z
|
|
760
|
+
}, je(t, x.richRuns, r, M, x.fontBold ?? !1, x.textStyle), void 0, x.textStyle, r, x.labelBox, o), e.restore();
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
|
-
e.restore(), Me(e, b, x, l, f, p,
|
|
763
|
+
e.restore(), Me(e, b, x, l, f, p, h, C, w, T, E, S.title.bandH + 2, r, y, o);
|
|
764
764
|
}
|
|
765
765
|
function tt(e, t) {
|
|
766
766
|
let n = e.map((e, t) => ({
|
|
@@ -829,43 +829,43 @@ function $(e, t, n, r, i) {
|
|
|
829
829
|
let a = t.chartexTreemap;
|
|
830
830
|
if (!a || a.rows.length === 0) return;
|
|
831
831
|
if (d(a.rows)) {
|
|
832
|
-
Le(e, n,
|
|
832
|
+
Le(e, n, z + 1);
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
835
|
let o = u(a.rows, !0);
|
|
836
836
|
if (o.layoutWeight <= 0 || o.children.length === 0) return;
|
|
837
|
-
let s = t.series[0], l = o.children.map((e) => Ue(t, e.branchIndex, o.children.length, s?.chartexStyle, s?.color)), f =
|
|
837
|
+
let s = t.series[0], l = o.children.map((e) => Ue(t, e.branchIndex, o.children.length, s?.chartexStyle, s?.color)), f = P(t, {
|
|
838
838
|
chartType: "clusteredBar",
|
|
839
839
|
series: o.children.map((e) => {
|
|
840
840
|
let n = U(t, e.branchIndex, o.children.length, s?.chartexStyle);
|
|
841
841
|
return ke(t, e.label, s, t.chartexDataPointStyle, e.branchIndex, o.children.length, n);
|
|
842
842
|
})
|
|
843
|
-
}), p = Be(e, f, n.w, n.h, r),
|
|
843
|
+
}), p = Be(e, f, n.w, n.h, r), h = N(t, n.x, n.y, n.w, n.h, r, {
|
|
844
844
|
titleTopPadFrac: .035,
|
|
845
845
|
titleBottomPadFrac: .035,
|
|
846
846
|
legendReserve: p,
|
|
847
847
|
radialGapFrac: .015,
|
|
848
848
|
honorPlotAreaManualLayout: !0
|
|
849
849
|
});
|
|
850
|
-
Ve(e, t, n.x, n.y, n.w, n.h, n.y +
|
|
851
|
-
let { px0: g, py0: _, pw: v, ph: y } =
|
|
850
|
+
Ve(e, t, n.x, n.y, n.w, n.h, n.y + h.title.topPad, h.title.fontPx);
|
|
851
|
+
let { px0: g, py0: _, pw: v, ph: y } = h.plotRect;
|
|
852
852
|
if (!(v > 0) || !(y > 0)) return;
|
|
853
|
-
|
|
853
|
+
he(e, t, g, _, v, y, r, i);
|
|
854
854
|
let b = {
|
|
855
855
|
x: g,
|
|
856
856
|
y: _,
|
|
857
857
|
w: v,
|
|
858
858
|
h: y
|
|
859
|
-
}, x = a.parentLabelLayout ?? "overlapping", S = t.series[0]?.seriesDataLabels,
|
|
859
|
+
}, x = a.parentLabelLayout ?? "overlapping", S = t.series[0]?.seriesDataLabels, C = j(t, S?.fontFace ?? t.dataLabelFontFace, "minor"), w = B(S?.fontSizeHpt, r) ?? Math.max(8, Math.min(13, h.plotRect.ph * .025)), T = S?.fontColor ? `#${S.fontColor}` : "#ffffff", E = new Map((t.series[0]?.dataLabelOverrides ?? []).map((e) => [e.idx, e])), D = t.chartBg ? t.chartBg.startsWith("#") ? t.chartBg : `#${t.chartBg}` : "#ffffff", O = be(s?.dataPointOverrides), k = (a, l) => {
|
|
860
860
|
if (l.w < .5 || l.h < .5) return;
|
|
861
|
-
let u = `#${U(t, a.branchIndex, o.children.length, s?.chartexStyle)}`, d =
|
|
861
|
+
let u = `#${U(t, a.branchIndex, o.children.length, s?.chartexStyle)}`, d = O.get(a.labelIndex), f = Ie(t, s, d, a.branchIndex, o.children.length), p = c(d?.chartexStyle, s?.chartexStyle), h = E.get(a.labelIndex), g = h?.fontColor ? `#${h.fontColor}` : T, _ = B(h?.fontSizeHpt, r) ?? w, v = h?.fontBold ?? S?.fontBold ?? !1;
|
|
862
862
|
if (a.children.length > 0) {
|
|
863
|
-
let o =
|
|
863
|
+
let o = ne(t, s, a.labelIndex, a.label, a.value, {
|
|
864
864
|
visible: x !== "none",
|
|
865
865
|
showVal: !1,
|
|
866
866
|
showCatName: !0
|
|
867
|
-
},
|
|
868
|
-
S > 0 &&
|
|
867
|
+
}, E, !0), c = o != null && (x !== "overlapping" || a.depth === 0), d = _, y = o?.fontFace ? j(t, o.fontFace, "minor") : C, S = x === "banner" && c ? Math.min(l.h * .28, d + 7) : 0;
|
|
868
|
+
S > 0 && m(e, p, t.chartexDataPointStyle, s?.chartexFormatIdx ?? 0, {
|
|
869
869
|
x: l.x,
|
|
870
870
|
y: l.y,
|
|
871
871
|
w: l.w,
|
|
@@ -878,13 +878,13 @@ function $(e, t, n, r, i) {
|
|
|
878
878
|
h: S
|
|
879
879
|
}, u, r, i);
|
|
880
880
|
}, a.branchIndex);
|
|
881
|
-
let
|
|
881
|
+
let w = {
|
|
882
882
|
x: l.x,
|
|
883
883
|
y: l.y + S,
|
|
884
884
|
w: l.w,
|
|
885
885
|
h: Math.max(0, l.h - S)
|
|
886
886
|
};
|
|
887
|
-
for (let e of tt(a.children,
|
|
887
|
+
for (let e of tt(a.children, w)) k(e.node, e.rect);
|
|
888
888
|
if (c && (o.manualLayout || l.w > d * 2 && l.h > d + 4)) {
|
|
889
889
|
e.font = `${v ? "bold " : ""}${d}px ${y}`;
|
|
890
890
|
let a = S > 0 ? {
|
|
@@ -892,7 +892,7 @@ function $(e, t, n, r, i) {
|
|
|
892
892
|
y: l.y,
|
|
893
893
|
w: l.w,
|
|
894
894
|
h: S
|
|
895
|
-
} : l, s =
|
|
895
|
+
} : l, s = h?.position ?? "inBase";
|
|
896
896
|
He(e, o.text, o.manualLayout ? {
|
|
897
897
|
kind: "point",
|
|
898
898
|
x: l.x + l.w / 2,
|
|
@@ -906,19 +906,19 @@ function $(e, t, n, r, i) {
|
|
|
906
906
|
}
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
909
|
-
|
|
910
|
-
f && we(e, f, l, u, r, i), Ne(e, xe(t, s, d, a.branchIndex, o.children.length,
|
|
909
|
+
m(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, D, t.chartexDataPointStyle, { linkedNoStyleFallback: !0 }), r, l, i) && e.strokeRect(l.x, l.y, l.w, l.h);
|
|
911
911
|
}, a.branchIndex);
|
|
912
|
-
let y =
|
|
912
|
+
let y = ne(t, s, a.labelIndex, a.label, a.value, {
|
|
913
913
|
visible: !1,
|
|
914
914
|
showVal: !1,
|
|
915
915
|
showCatName: !1
|
|
916
|
-
},
|
|
916
|
+
}, E);
|
|
917
917
|
if (!y) return;
|
|
918
|
-
let
|
|
919
|
-
if (!y.manualLayout && (l.w <=
|
|
920
|
-
let M = y.fontFace ?
|
|
921
|
-
e.font = `${y.fontBold ? "bold " : ""}${
|
|
918
|
+
let A = B(y.fontSizeHpt, r) ?? _;
|
|
919
|
+
if (!y.manualLayout && (l.w <= A * 1.2 || l.h <= A * 1.2)) return;
|
|
920
|
+
let M = y.fontFace ? j(t, y.fontFace, "minor") : C;
|
|
921
|
+
e.font = `${y.fontBold ? "bold " : ""}${A}px ${M}`;
|
|
922
922
|
let N = l, P = y.position === "outEnd" ? "inEnd" : y.position ?? "ctr";
|
|
923
923
|
He(e, y.text, y.manualLayout ? {
|
|
924
924
|
kind: "point",
|
|
@@ -929,7 +929,7 @@ function $(e, t, n, r, i) {
|
|
|
929
929
|
kind: "box",
|
|
930
930
|
rect: N,
|
|
931
931
|
position: P
|
|
932
|
-
}, y.manualLayout ? b : N,
|
|
932
|
+
}, y.manualLayout ? b : N, A, 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);
|
|
933
933
|
};
|
|
934
934
|
e.save(), e.beginPath(), e.rect(g, _, v, y), e.clip();
|
|
935
935
|
for (let e of tt(o.children, {
|
|
@@ -937,12 +937,12 @@ function $(e, t, n, r, i) {
|
|
|
937
937
|
y: _,
|
|
938
938
|
w: v,
|
|
939
939
|
h: y
|
|
940
|
-
}))
|
|
941
|
-
e.restore(), Me(e, f, p, n.x, n.y, n.w, n.h, g, _, v, y,
|
|
940
|
+
})) k(e.node, e.rect);
|
|
941
|
+
e.restore(), Me(e, f, p, n.x, n.y, n.w, n.h, g, _, v, y, h.title.bandH + 2, r, l, i);
|
|
942
942
|
}
|
|
943
943
|
function nt(e, t, n, r, i = 0) {
|
|
944
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,
|
|
945
|
+
if (a != null && a > 1048576 || o != null && o > 1048576 || a != null && o != null && a > 1048576 - o) return Le(e, n, z + 1), !0;
|
|
946
946
|
if (t.chartexSuppressGeometry) {
|
|
947
947
|
let i = Ae(e, t, n.w, n.h, r);
|
|
948
948
|
return Ve(e, t, n.x, n.y, n.w, n.h, n.y + i.topPad, i.fontPx), !0;
|
|
@@ -950,7 +950,7 @@ function nt(e, t, n, r, i = 0) {
|
|
|
950
950
|
switch (t.chartType) {
|
|
951
951
|
case "waterfall": return Ye(e, t, n, r, i), !0;
|
|
952
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) =>
|
|
953
|
+
let a = t.series.map((e, n) => n === 0 ? K(t, e, n, t.series.length) : e), o = t.chartexParetoSortDescending ? a.map((e) => v(e, t.categories, {
|
|
954
954
|
sortDescending: !0,
|
|
955
955
|
keepUnvaluedCategories: !0
|
|
956
956
|
}).orderedSeries) : a, s = t.chartexShowUnpairedPercentageAxis && o[0] ? [{
|
|
@@ -962,7 +962,7 @@ function nt(e, t, n, r, i = 0) {
|
|
|
962
962
|
lineHidden: !0,
|
|
963
963
|
showMarker: !1
|
|
964
964
|
}] : [];
|
|
965
|
-
return ze(e,
|
|
965
|
+
return ze(e, P(t, {
|
|
966
966
|
chartType: "clusteredBar",
|
|
967
967
|
categories: o[0]?.categories ?? t.categories,
|
|
968
968
|
series: [...o, ...s],
|