@silurus/ooxml 0.84.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -13
- package/dist/assets/render-worker-BRKOyWVH.js +24 -0
- package/dist/assets/render-worker-DnU-PxZ1.js +10 -0
- package/dist/assets/render-worker-NZPOUOTU.js +11 -0
- package/dist/{canvas-viewer-mechanics-CIfhCgYA.js → canvas-viewer-mechanics-C-yTGbFC.js} +308 -234
- package/dist/chart-ex.mjs +270 -270
- package/dist/{comment-ui-runtime-CdMMApEN.js → comment-ui-runtime-CAbpuWi_.js} +4 -4
- package/dist/{comment-ui-runtime-C5qimVMD.js → comment-ui-runtime-DAKBCpsM.js} +5 -5
- package/dist/comment-ui-runtime-DTaaZdXC.js +2 -0
- package/dist/{comments-BAlAyIhb.js → comments-Brfxa3hQ.js} +1 -1
- package/dist/{document-pull-client-DeHUdQhH.js → document-pull-client-BdYrjAep.js} +4679 -4359
- package/dist/{docx-CbU51aPR.js → docx-qK0Qmyey.js} +315 -300
- package/dist/docx.mjs +7 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-DS6BVyHA.js → dom-interaction-boundary-CMDDgICk.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/line-distribute-CiKeWjBF.js +1023 -0
- package/dist/{line-metrics-CXyjyYd5.js → line-metrics-u87yCAfV.js} +2182 -705
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +404 -394
- package/dist/pixel-budget-Dgjw269h.js +37 -0
- package/dist/{plot-area-frame-DuXZzovH.js → plot-area-frame-D5hEOgkJ.js} +691 -1418
- package/dist/{pptx-C17oBD8Z.js → pptx-DxZwhOWr.js} +250 -221
- package/dist/pptx.mjs +7 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/raster-target-whZhvVMt.js +87 -0
- package/dist/region-map.mjs +5 -5
- package/dist/{render-CVeGktZG.js → render-DrAAZWwH.js} +9 -6
- package/dist/{render-worker-host-BWdhjVH_.js → render-worker-host-CHlwYJdK.js} +1 -1
- package/dist/{render-worker-host-CZi7Mn5v.js → render-worker-host-GZ7ez-l3.js} +1 -1
- package/dist/{render-worker-host-CbaQivE7.js → render-worker-host-XDMsyVsv.js} +1 -1
- package/dist/{renderer-Bmky2yBc.js → renderer-XFSCOT6m.js} +1937 -1936
- package/dist/resource-measurement-6uR3Huao.js +150 -0
- package/dist/{session-Cl0RVnMs.js → session-DoPwA4gv.js} +79 -79
- package/dist/{slide-pull-client-BS0EeZo2.js → slide-pull-client-8i8C4VyD.js} +1054 -824
- package/dist/{three-d-B7LsKeOS.js → three-d-YYghQndN.js} +109 -110
- package/dist/three-d.mjs +726 -726
- package/dist/tiff.mjs +664 -78
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +29 -13
- package/dist/types/index.d.ts +43 -21
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +11 -7
- package/dist/types/pptx.d.ts +34 -15
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +13 -3
- package/dist/types/xlsx.d.ts +30 -13
- package/dist/{worksheet-pull-client-B0zfEVau.js → worksheet-pull-client-Btydoxto.js} +47 -47
- package/dist/{xlsx-FyKAiNo-.js → xlsx-57OZsbD9.js} +1395 -1196
- package/dist/xlsx.mjs +7 -6
- package/package.json +2 -2
- package/dist/assets/render-worker-BZd4-U4w.js +0 -10
- package/dist/assets/render-worker-CiEWCh_T.js +0 -11
- package/dist/assets/render-worker-Cpmy3GDF.js +0 -24
- package/dist/comment-ui-runtime-aPzHfV_A.js +0 -2
- package/dist/line-distribute-MqInuujx.js +0 -1003
- package/dist/resource-measurement-esyGbzAF.js +0 -120
- package/dist/tiff-contract-Xjn3qXqK.js +0 -69
- /package/dist/{comment-occurrence-C34fWs_F.js → comment-occurrence-tj54AXXB.js} +0 -0
- /package/dist/{highlight-rect-MaCt0om0.js → highlight-rect-DBcYVJDv.js} +0 -0
- /package/dist/{mathjax-DPEX346v.js → mathjax-DS69BmJd.js} +0 -0
- /package/dist/{read-only-comment-decoration-BYCXoSdC.js → read-only-comment-decoration-Mv_SAiHy.js} +0 -0
- /package/dist/{read-only-comment-margin-C7b3l0ro.js → read-only-comment-margin-Cqu-Ir0C.js} +0 -0
- /package/dist/{renderer-module-contract-C6sYZvTV.js → renderer-module-contract-Cu-GKuPd.js} +0 -0
- /package/dist/{source-key-DORuuFb-.js → source-key-BkBB3X82.js} +0 -0
- /package/dist/{transfer-vNOFQuvv.js → transfer-mIj7E7NB.js} +0 -0
- /package/dist/{visible-index-DwJzuGmJ.js → visible-index-DPoQYSDt.js} +0 -0
package/dist/chart-ex.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $t as e,
|
|
2
|
-
import { T as y, w as b } from "./three-d-
|
|
3
|
-
import { A as x, C as S, D as C, E as w, F as T, I as E, L as D, M as O, N as k, O as A, P as j, R as M, S as N, T as ee, _ as te, a as P, b as ne, c as re, d as F, f as I, g as ie, h as L, i as R, j as z, l as B, m as V, n as ae, o as oe, p as se, r as ce, s as le, t as ue, u as de, v as fe, w as pe, x as me, y as he } from "./renderer-
|
|
4
|
-
import { t as ge } from "./renderer-module-contract-
|
|
1
|
+
import { $t as e, At as t, Ht as n, It as r, J as i, Lt as a, Rt as o, Wt as s, X as c, en as l, f as u, nn as d, qt as f, r as p, t as m, tn as h, u as g, ut as _, zt as v } from "./plot-area-frame-D5hEOgkJ.js";
|
|
2
|
+
import { T as y, w as b } from "./three-d-YYghQndN.js";
|
|
3
|
+
import { A as x, C as S, D as C, E as w, F as T, I as E, L as D, M as O, N as k, O as A, P as j, R as M, S as N, T as ee, _ as te, a as P, b as ne, c as re, d as F, f as I, g as ie, h as L, i as R, j as z, l as B, m as V, n as ae, o as oe, p as se, r as ce, s as le, t as ue, u as de, v as fe, w as pe, x as me, y as he } from "./renderer-XFSCOT6m.js";
|
|
4
|
+
import { t as ge } from "./renderer-module-contract-Cu-GKuPd.js";
|
|
5
5
|
function H(e) {
|
|
6
6
|
return e != null && Number.isFinite(e) ? e : null;
|
|
7
7
|
}
|
|
@@ -198,14 +198,14 @@ function De(e) {
|
|
|
198
198
|
} : void 0;
|
|
199
199
|
if (!t) return null;
|
|
200
200
|
if (t.rows.length === 0) return 0;
|
|
201
|
-
if (xe(t.rows)) return
|
|
201
|
+
if (xe(t.rows)) return c + 1;
|
|
202
202
|
let n = Se(t.rows, t.kind === "treemap");
|
|
203
203
|
if (n.layoutWeight <= 0 || n.children.length === 0) return 0;
|
|
204
204
|
t.kind === "sunburst" && (n.a0 = -Math.PI / 2, n.a1 = n.a0 + Math.PI * 2, Ce(n));
|
|
205
|
-
let r = e.series[0], i = S(r?.dataLabelOverrides), a = e.chartexTreemap?.parentLabelLayout ?? "overlapping",
|
|
206
|
-
for (;
|
|
207
|
-
let n =
|
|
208
|
-
for (let e of n.children)
|
|
205
|
+
let r = e.series[0], i = S(r?.dataLabelOverrides), a = e.chartexTreemap?.parentLabelLayout ?? "overlapping", o = 0, s = [...n.children];
|
|
206
|
+
for (; s.length > 0;) {
|
|
207
|
+
let n = s.pop();
|
|
208
|
+
for (let e of n.children) s.push(e);
|
|
209
209
|
if (n.layoutWeight <= 0 || t.kind === "sunburst" && n.a1 - n.a0 <= 1e-4) continue;
|
|
210
210
|
let l;
|
|
211
211
|
t.kind === "sunburst" ? l = z(e, r, n.labelIndex, n.label, n.value, {
|
|
@@ -223,41 +223,41 @@ function De(e) {
|
|
|
223
223
|
}, i);
|
|
224
224
|
for (let e of [l?.labelBox?.fillPaint, l?.labelBox?.borderFill]) {
|
|
225
225
|
if (!e) continue;
|
|
226
|
-
let t =
|
|
227
|
-
if (e.fillType === "gradient" && t > 4096 || t > 1048576 -
|
|
228
|
-
|
|
226
|
+
let t = _(e);
|
|
227
|
+
if (e.fillType === "gradient" && t > 4096 || t > 1048576 - o) return c + 1;
|
|
228
|
+
o += t;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
return
|
|
231
|
+
return o;
|
|
232
232
|
}
|
|
233
|
-
function G(e, t, n, r,
|
|
234
|
-
let
|
|
235
|
-
if (!
|
|
236
|
-
let
|
|
237
|
-
if (
|
|
238
|
-
C(e, n,
|
|
233
|
+
function G(e, t, n, r, a = 0) {
|
|
234
|
+
let o = t.series[0];
|
|
235
|
+
if (!o) return;
|
|
236
|
+
let s = _e(o.values, t.chartexHistogramBinning ?? {});
|
|
237
|
+
if (s.kind === "tooManyInputPoints") {
|
|
238
|
+
C(e, n, i + 1);
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
241
|
A(e, {
|
|
242
242
|
...t,
|
|
243
243
|
chartType: "clusteredBar",
|
|
244
|
-
categories:
|
|
244
|
+
categories: s.categories,
|
|
245
245
|
series: [{
|
|
246
|
-
...
|
|
246
|
+
...o,
|
|
247
247
|
categories: void 0,
|
|
248
|
-
values:
|
|
248
|
+
values: s.counts
|
|
249
249
|
}]
|
|
250
|
-
}, n, r, { gapPolicy: "chartex" },
|
|
250
|
+
}, n, r, { gapPolicy: "chartex" }, a);
|
|
251
251
|
}
|
|
252
|
-
function Oe(
|
|
253
|
-
let { x: l, y:
|
|
254
|
-
if (y === 0 || C(
|
|
255
|
-
let b = new Set(
|
|
252
|
+
function Oe(t, r, i, a, c) {
|
|
253
|
+
let { x: l, y: d, w: f, h } = i, g = r.series[0]?.values ?? [], _ = r.categories, y = Math.max(g.length, _.length);
|
|
254
|
+
if (y === 0 || C(t, i, y)) return;
|
|
255
|
+
let b = new Set(r.subtotalIndices), x = !1, A = (e, t) => {
|
|
256
256
|
let n = e + t;
|
|
257
257
|
return Number.isFinite(n) ? n : (x = !0, n < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE);
|
|
258
258
|
}, ne = 0, I = [], R = -Infinity, B = 0;
|
|
259
259
|
for (let e = 0; e < y; e++) {
|
|
260
|
-
let t =
|
|
260
|
+
let t = g[e], n = t != null && Number.isFinite(t), r = t == null || n, i = n ? t : 0;
|
|
261
261
|
if (b.has(e)) {
|
|
262
262
|
let e = {
|
|
263
263
|
start: 0,
|
|
@@ -281,89 +281,89 @@ function Oe(e, n, r, o, s) {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
if (x) {
|
|
284
|
-
|
|
284
|
+
t.fillStyle = "#888", t.font = "12px sans-serif", t.textAlign = "center", t.textBaseline = "middle", t.fillText("(chart values out of range)", l + f / 2, d + h / 2);
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
287
|
if (R <= B) return;
|
|
288
|
-
let de = b.size === 0 && I.every((e, t) => !e.hasValue ||
|
|
289
|
-
|
|
288
|
+
let de = b.size === 0 && I.every((e, t) => !e.hasValue || g[t] >= 0), ge = !r.valAxisHidden && r.valAxisTickLabelPos !== "none" && !de, H = pe(t, r, f, h, a), U = o(r, f, h, a), _e = ce(r.valAxisFontSizeHpt, h, a), ve = ce(r.catAxisFontSizeHpt, h, a), ye = V(r, r.valAxisFontFace, "minor"), be = V(r, r.catAxisFontFace, "minor"), xe = w(r, B, R, h / a);
|
|
289
|
+
t.save();
|
|
290
290
|
let Se = 0;
|
|
291
291
|
if (ge) {
|
|
292
|
-
|
|
293
|
-
let
|
|
294
|
-
for (let
|
|
295
|
-
Se =
|
|
292
|
+
t.font = se(_e, ye, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1);
|
|
293
|
+
let e = 0;
|
|
294
|
+
for (let n of xe.majorLines) e = Math.max(e, t.measureText(N(r, n, !1)).width);
|
|
295
|
+
Se = e + 8;
|
|
296
296
|
}
|
|
297
|
-
let Ce = Math.max(1,
|
|
298
|
-
|
|
299
|
-
let W =
|
|
297
|
+
let Ce = Math.max(1, f - U.valBandW - Se - f * .02) / y;
|
|
298
|
+
t.font = se(ve, be, r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1);
|
|
299
|
+
let W = _.slice(0, y).map((e) => M(t, p(e, r.catAxisFormatCode, r.date1904), Math.max(1, Ce - 8))), we = 0;
|
|
300
300
|
for (let e of W) e.some(Boolean) && (we = Math.max(we, e.length));
|
|
301
|
-
let De =
|
|
302
|
-
...
|
|
301
|
+
let De = r.catAxisHidden || we === 0 ? 0 : we * (ve + 2) + 4, G = r.series[0], Oe = S(G?.dataLabelOverrides), ke = S(G?.dataPointOverrides), Ae = G?.chartexStyle, je = `#${G?.color ?? P(r, 0, 3, Ae)}`, K = `#${P(r, 1, 3, Ae)}`, q = `#${P(r, 2, 3, Ae)}`, Me = oe(r, 0, 3, Ae, G?.color), Ne = oe(r, 1, 3, Ae), J = oe(r, 2, 3, Ae), Pe = {
|
|
302
|
+
...r,
|
|
303
303
|
chartType: "clusteredBar",
|
|
304
304
|
series: [
|
|
305
|
-
re(
|
|
306
|
-
re(
|
|
307
|
-
re(
|
|
305
|
+
re(r, "Increase", G, r.chartexDataPointStyle, 0, 3, je),
|
|
306
|
+
re(r, "Decrease", G, r.chartexDataPointStyle, 1, 3, K),
|
|
307
|
+
re(r, "Total", G, r.chartexDataPointStyle, 2, 3, q)
|
|
308
308
|
]
|
|
309
|
-
}, Fe = ee(
|
|
309
|
+
}, Fe = ee(t, Pe, f, h, .22, a), { legRightW: Ie, legLeftW: Le, legTopH: Re, legBottomH: ze } = v(Fe, r.legendOverlay === !0), Y = s(r, l, d, f, h, a, {
|
|
310
310
|
titleBand: H,
|
|
311
311
|
legendSideReserveFrac: 0,
|
|
312
312
|
legendReserve: Fe,
|
|
313
313
|
pad: {
|
|
314
314
|
t: H.bandH + Re + _e / 2 + 2,
|
|
315
|
-
r: Ie +
|
|
315
|
+
r: Ie + f * .02,
|
|
316
316
|
b: ze + U.catBandH + De,
|
|
317
|
-
l: Le + U.valBandW + (
|
|
317
|
+
l: Le + U.valBandW + (r.valAxisHidden ? f * .02 : Math.max(f * .03, Se))
|
|
318
318
|
},
|
|
319
319
|
honorPlotAreaManualLayout: !0
|
|
320
320
|
});
|
|
321
|
-
fe(
|
|
321
|
+
fe(t, r, l, d, f, h, d + Y.title.topPad, Y.title.fontPx);
|
|
322
322
|
let { px0: X, py0: Z, pw: Q, ph: $ } = Y.plotRect;
|
|
323
|
-
|
|
324
|
-
let Be = w(
|
|
325
|
-
if (!
|
|
326
|
-
|
|
327
|
-
let
|
|
328
|
-
for (let n of Be.minorLines) T(
|
|
329
|
-
for (let
|
|
330
|
-
let
|
|
331
|
-
if (me(
|
|
332
|
-
|
|
333
|
-
let
|
|
334
|
-
We.dash.length > 0 &&
|
|
323
|
+
m(t, r, X, Z, Q, $, a, c);
|
|
324
|
+
let Be = w(r, B, R, $ / a), Ve = (e) => Z + $ - Be.frac(e) * $, He = u(r.valAxisLineColor, r.valAxisLineWidthEmu, a), Ue = u(r.catAxisLineColor, r.catAxisLineWidthEmu, a), We = E(r, a);
|
|
325
|
+
if (!r.valAxisHidden) {
|
|
326
|
+
t.font = se(_e, ye, r.valAxisFontBold ?? !1, r.valAxisFontItalic ?? !1), t.fillStyle = r.valAxisFontColor ? `#${r.valAxisFontColor}` : "#595959", t.textAlign = "right", t.textBaseline = "middle";
|
|
327
|
+
let e = D(r, a);
|
|
328
|
+
for (let n of Be.minorLines) T(t, X, Q, Ve(n), !1, e);
|
|
329
|
+
for (let e of Be.majorLines) {
|
|
330
|
+
let n = Ve(e);
|
|
331
|
+
if (me(r)) {
|
|
332
|
+
t.strokeStyle = We.color, t.lineWidth = We.width;
|
|
333
|
+
let e = We.dash.length > 0 && t.getLineDash ? t.getLineDash() : [];
|
|
334
|
+
We.dash.length > 0 && t.setLineDash(We.dash), t.beginPath(), t.moveTo(X, n), t.lineTo(X + Q, n), t.stroke(), We.dash.length > 0 && t.setLineDash(e);
|
|
335
335
|
}
|
|
336
|
-
ge &&
|
|
336
|
+
ge && t.fillText(N(r, e, !1), X - 4, n), L(t, r.valAxisMajorTickMark, "val", X, n, He.color, He.width, !1, r.valAxisLineHidden, "major", a, r.valAxisLineDash);
|
|
337
337
|
}
|
|
338
|
-
for (let
|
|
338
|
+
for (let e of Be.minorTicks) L(t, r.valAxisMinorTickMark, "val", X, Ve(e), He.color, He.width, !1, r.valAxisLineHidden, "minor", a, r.valAxisLineDash);
|
|
339
339
|
}
|
|
340
|
-
let Ge = !
|
|
341
|
-
Ge && j(
|
|
342
|
-
let qe = Q / y, Je = qe / (1 +
|
|
343
|
-
I.forEach((
|
|
344
|
-
let
|
|
345
|
-
|
|
346
|
-
let S = F(
|
|
347
|
-
if (
|
|
348
|
-
let
|
|
349
|
-
|
|
350
|
-
let l = O(
|
|
351
|
-
ae(
|
|
340
|
+
let Ge = !r.valAxisHidden && !r.valAxisLineHidden, Ke = !r.catAxisHidden && !r.catAxisLineHidden;
|
|
341
|
+
Ge && j(t, X, Z, X, Z + $, He.color, He.width, r.valAxisLineDash), Ke && j(t, X, Z + $, X + Q, Z + $, Ue.color, Ue.width, r.catAxisLineDash);
|
|
342
|
+
let qe = Q / y, Je = qe / (1 + e(r.barGapWidth, "chartex") / 100);
|
|
343
|
+
I.forEach((e, i) => {
|
|
344
|
+
let o = X + qe * i + (qe - Je) / 2, s = Math.min(Ve(e.start), Ve(e.end)), u = Math.max(Ve(e.start), Ve(e.end)), p = Math.max(1, u - s), m = e.isSub ? 2 : +!e.isPos, v = ke.get(i), b = Te(r, v, G, m), x = v?.color ? `#${v.color}` : e.isSub ? q : e.isPos ? je : K;
|
|
345
|
+
e.paintSlot && b && (t.fillStyle = le(t, b, o, s, Je, p, x, c), t.fillRect(o, s, Je, p));
|
|
346
|
+
let S = F(r, r.chartexDataPointStyle, "line", m, 3), C = Ee(v) ? v : G;
|
|
347
|
+
if (e.paintSlot && ue(t, r, r.chartexDataPointStyle, C, m, 3, S ? `#${S}` : x, a) && t.strokeRect(o, s, Je, p), e.paintSlot && I[i + 1]?.paintSlot && i < y - 1 && r.chartexConnectorLines !== !1) {
|
|
348
|
+
let n = X + qe * (i + 1) + (qe - Je) / 2, c = e.isPos ? s : u;
|
|
349
|
+
t.save();
|
|
350
|
+
let l = O(r, r.chartexSeriesLineStyle, G, m, 3, "#000000", { linkedNoStyleFallback: !0 });
|
|
351
|
+
ae(t, l, a) && (l.widthEmu ?? (t.lineWidth = .75 * a), t.beginPath(), t.moveTo(o + Je, c), t.lineTo(n, c), t.stroke()), t.restore();
|
|
352
352
|
}
|
|
353
|
-
let w =
|
|
354
|
-
visible:
|
|
353
|
+
let w = e.hasValue ? g[i] : 0, T = z(r, G, i, _[i] ?? "", w, {
|
|
354
|
+
visible: r.showDataLabels,
|
|
355
355
|
showVal: !0,
|
|
356
356
|
showCatName: !1
|
|
357
|
-
}, Oe, !
|
|
357
|
+
}, Oe, !e.hasValue);
|
|
358
358
|
if (T) {
|
|
359
|
-
let
|
|
360
|
-
|
|
359
|
+
let e = G?.dataLabelColors?.[i] ?? T.fontColor ?? null, u = e ? `#${e}` : r.dataLabelFontColor ? `#${r.dataLabelFontColor}` : "#595959", m = n(T.fontSizeHpt, a) ?? ce(r.dataLabelFontSizeHpt, h, a), g = T.fontBold ?? r.dataLabelFontBold ?? !1, _ = V(r, T.fontFace ?? r.dataLabelFontFace, "minor");
|
|
360
|
+
t.font = `${T.textStyle.fontItalic ? "italic " : ""}${g ? "bold " : ""}${m}px ${_}`, te(t, T.text, {
|
|
361
361
|
kind: "bar",
|
|
362
362
|
rect: {
|
|
363
|
-
x:
|
|
364
|
-
y:
|
|
363
|
+
x: o,
|
|
364
|
+
y: s,
|
|
365
365
|
w: Je,
|
|
366
|
-
h
|
|
366
|
+
h: p
|
|
367
367
|
},
|
|
368
368
|
orientation: "vertical",
|
|
369
369
|
negative: w < 0,
|
|
@@ -373,75 +373,75 @@ function Oe(e, n, r, o, s) {
|
|
|
373
373
|
y: Z,
|
|
374
374
|
w: Q,
|
|
375
375
|
h: $
|
|
376
|
-
}, m,
|
|
376
|
+
}, m, u, T.manualLayout, {
|
|
377
377
|
x: l,
|
|
378
|
-
y:
|
|
379
|
-
w:
|
|
380
|
-
h
|
|
381
|
-
}, k(
|
|
378
|
+
y: d,
|
|
379
|
+
w: f,
|
|
380
|
+
h
|
|
381
|
+
}, k(r, T.richRuns, a, _, g, T.textStyle), void 0, T.textStyle, a, T.labelBox, c);
|
|
382
382
|
}
|
|
383
|
-
}),
|
|
383
|
+
}), t.textAlign = "center", t.textBaseline = "top", t.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", t.font = se(ve, be, r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1);
|
|
384
384
|
let Ye = Z + $ + 4;
|
|
385
|
-
for (let
|
|
386
|
-
let n = X + qe *
|
|
387
|
-
(W[
|
|
385
|
+
for (let e = 0; e < y && !r.catAxisHidden; e++) {
|
|
386
|
+
let n = X + qe * e + qe / 2;
|
|
387
|
+
(W[e] ?? []).forEach((e, r) => e && t.fillText(e, n, Ye + r * (ve + 2)));
|
|
388
388
|
}
|
|
389
|
-
ie(
|
|
389
|
+
ie(t, r, l, d, f, h, X, Z, Q, $, Le, ze, U.catFontPx, U.valFontPx), he(t, Pe, Fe, l, d, f, h, X, Z, Q, $, H.bandH + 2, a, [
|
|
390
390
|
Me,
|
|
391
391
|
Ne,
|
|
392
392
|
J
|
|
393
|
-
],
|
|
393
|
+
], c), t.restore();
|
|
394
394
|
}
|
|
395
|
-
function ke(
|
|
396
|
-
let
|
|
397
|
-
if (l === 0 || C(
|
|
398
|
-
let
|
|
399
|
-
for (let e = 0; e < l; e++)
|
|
400
|
-
if (!(
|
|
401
|
-
let { x:
|
|
402
|
-
...
|
|
403
|
-
series: [re(
|
|
404
|
-
}, E = ee(
|
|
405
|
-
|
|
395
|
+
function ke(t, r, i, a, o) {
|
|
396
|
+
let c = r.series[0]?.values ?? [], l = Math.max(c.length, r.categories.length);
|
|
397
|
+
if (l === 0 || C(t, i, l)) return;
|
|
398
|
+
let d = 0;
|
|
399
|
+
for (let e = 0; e < l; e++) d = Math.max(d, c[e] ?? 0);
|
|
400
|
+
if (!(d > 0)) return;
|
|
401
|
+
let { x: f, y: p, w: h, h: g } = i, _ = pe(t, r, h, g, a), y = r.series[0], b = S(y?.dataLabelOverrides), x = `#${y?.color ?? P(r, 0, 1, y?.chartexStyle)}`, w = oe(r, 0, 1, y?.chartexStyle, y?.color), T = {
|
|
402
|
+
...r,
|
|
403
|
+
series: [re(r, y?.name ?? "", y, r.chartexDataPointStyle, 0, 1, x)]
|
|
404
|
+
}, E = ee(t, T, h, g, .22, a), { legRightW: D, legLeftW: O, legTopH: A, legBottomH: j } = v(E, r.legendOverlay === !0), M = ce(r.catAxisFontSizeHpt, g, a);
|
|
405
|
+
t.save(), t.font = se(M, V(r, r.catAxisFontFace, "minor"), r.catAxisFontBold ?? !1, r.catAxisFontItalic ?? !1);
|
|
406
406
|
let N = 0;
|
|
407
|
-
if (!
|
|
408
|
-
for (let
|
|
409
|
-
|
|
407
|
+
if (!r.catAxisHidden) {
|
|
408
|
+
for (let e = 0; e < Math.min(l, r.categories.length); e++) N = Math.max(N, t.measureText(r.categories[e]).width);
|
|
409
|
+
r.categories.length > 0 && (N += 10);
|
|
410
410
|
}
|
|
411
|
-
let ne =
|
|
412
|
-
titleBand:
|
|
411
|
+
let ne = s(r, f, p, h, g, a, {
|
|
412
|
+
titleBand: _,
|
|
413
413
|
legendSideReserveFrac: .22,
|
|
414
414
|
legendReserve: E,
|
|
415
415
|
pad: {
|
|
416
|
-
t:
|
|
417
|
-
r: D +
|
|
416
|
+
t: _.bandH + A + 2,
|
|
417
|
+
r: D + h * .02,
|
|
418
418
|
b: j + g * .02,
|
|
419
|
-
l: O + N +
|
|
419
|
+
l: O + N + h * .02
|
|
420
420
|
},
|
|
421
421
|
honorPlotAreaManualLayout: !0
|
|
422
422
|
});
|
|
423
|
-
fe(
|
|
423
|
+
fe(t, r, f, p, h, g, p + ne.title.topPad, ne.title.fontPx);
|
|
424
424
|
let { px0: F, py0: I, pw: ie, ph: L } = ne.plotRect;
|
|
425
|
-
|
|
426
|
-
let R = L / l, B = R / (1 +
|
|
427
|
-
for (let
|
|
428
|
-
let i = Math.max(0,
|
|
429
|
-
w && (
|
|
430
|
-
let
|
|
431
|
-
!
|
|
432
|
-
let _ = z(
|
|
425
|
+
m(t, r, F, I, ie, L, a, o);
|
|
426
|
+
let R = L / l, B = R / (1 + e(r.barGapWidth, "chartex") / 100);
|
|
427
|
+
for (let e = 0; e < l; e++) {
|
|
428
|
+
let i = Math.max(0, c[e] ?? 0), s = ie * i / d, l = F + (ie - s) / 2, u = I + R * e + (R - B) / 2;
|
|
429
|
+
w && (t.fillStyle = le(t, w, l, u, s, B, x, o), t.fillRect(l, u, s, B)), ue(t, r, r.chartexDataPointStyle, y, 0, 1, x, a) && t.strokeRect(l, u, s, B);
|
|
430
|
+
let m = r.categories[e];
|
|
431
|
+
!r.catAxisHidden && m != null && (t.fillStyle = r.catAxisFontColor ? `#${r.catAxisFontColor}` : "#595959", t.textAlign = "right", t.textBaseline = "middle", t.fillText(m, F - 6, u + B / 2));
|
|
432
|
+
let _ = z(r, y, e, m ?? "", i, {
|
|
433
433
|
visible: !1,
|
|
434
434
|
showVal: !1,
|
|
435
435
|
showCatName: !1
|
|
436
436
|
}, b);
|
|
437
437
|
if (_) {
|
|
438
|
-
let
|
|
439
|
-
|
|
438
|
+
let e = n(_.fontSizeHpt, a) ?? ce(r.dataLabelFontSizeHpt, g, a), i = V(r, _.fontFace ?? r.dataLabelFontFace, "minor");
|
|
439
|
+
t.font = `${_.textStyle.fontItalic ? "italic " : ""}${_.fontBold ? "bold " : ""}${e}px ${i}`, te(t, _.text, {
|
|
440
440
|
kind: "bar",
|
|
441
441
|
rect: {
|
|
442
442
|
x: l,
|
|
443
|
-
y:
|
|
444
|
-
w:
|
|
443
|
+
y: u,
|
|
444
|
+
w: s,
|
|
445
445
|
h: B
|
|
446
446
|
},
|
|
447
447
|
orientation: "horizontal",
|
|
@@ -452,19 +452,19 @@ function ke(e, n, r, a, o) {
|
|
|
452
452
|
y: I,
|
|
453
453
|
w: ie,
|
|
454
454
|
h: L
|
|
455
|
-
},
|
|
456
|
-
x:
|
|
455
|
+
}, e, _.fontColor ? `#${_.fontColor}` : "#ffffff", _.manualLayout, {
|
|
456
|
+
x: f,
|
|
457
457
|
y: p,
|
|
458
|
-
w:
|
|
458
|
+
w: h,
|
|
459
459
|
h: g
|
|
460
|
-
}, k(
|
|
460
|
+
}, k(r, _.richRuns, a, i, _.fontBold ?? !1, _.textStyle), void 0, _.textStyle, a, _.labelBox, o);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
if (!
|
|
464
|
-
let
|
|
465
|
-
|
|
463
|
+
if (!r.catAxisHidden && !r.catAxisLineHidden) {
|
|
464
|
+
let e = u(r.catAxisLineColor, r.catAxisLineWidthEmu, a);
|
|
465
|
+
t.strokeStyle = e.color, t.lineWidth = e.width, t.beginPath(), t.moveTo(F, I), t.lineTo(F, I + L), t.stroke();
|
|
466
466
|
}
|
|
467
|
-
he(
|
|
467
|
+
he(t, T, E, f, p, h, g, F, I, ie, L, _.bandH + 2, a, [w], o), t.restore();
|
|
468
468
|
}
|
|
469
469
|
function Ae(e, t, n, r, i = 0) {
|
|
470
470
|
let a = t.series[0];
|
|
@@ -561,13 +561,13 @@ function Ne(e, t, n, r) {
|
|
|
561
561
|
majorUnit: a
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function J(
|
|
565
|
-
let b = 3 * p, x =
|
|
564
|
+
function J(n, i, c, p, _) {
|
|
565
|
+
let b = 3 * p, x = i.chartexBox;
|
|
566
566
|
if (!x || x.categories.length === 0 || x.series.length === 0) return;
|
|
567
|
-
let { x: S, y: O, w: k, h: A } =
|
|
568
|
-
if (C(
|
|
567
|
+
let { x: S, y: O, w: k, h: A } = c;
|
|
568
|
+
if (C(n, c, h(x.series.map((e) => e.valuesByCategory), 1e4))) return;
|
|
569
569
|
let M = () => {
|
|
570
|
-
|
|
570
|
+
n.fillStyle = "#888", n.font = "12px sans-serif", n.textAlign = "center", n.textBaseline = "middle", n.fillText("(chart values out of range)", S + k / 2, O + A / 2);
|
|
571
571
|
}, te = (e) => {
|
|
572
572
|
let t = e.max - e.min, n = t / e.step;
|
|
573
573
|
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;
|
|
@@ -578,12 +578,12 @@ function J(t, o, s, p, g) {
|
|
|
578
578
|
M();
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
|
-
let ae =
|
|
582
|
-
...
|
|
581
|
+
let ae = i.valAxisMajorUnit == null ? Ne(R, z, i.valMin, i.valMax) : null, me = ae ? {
|
|
582
|
+
...i,
|
|
583
583
|
valMin: ae.min,
|
|
584
584
|
valMax: ae.max,
|
|
585
585
|
valAxisMajorUnit: ae.majorUnit
|
|
586
|
-
} :
|
|
586
|
+
} : i, ge = V(i, i.valAxisFontFace, "minor"), H = ce(i.valAxisFontSizeHpt, A, p), U = f(H), _e = I(p), ve = y({
|
|
587
587
|
dataMin: R,
|
|
588
588
|
dataMax: z,
|
|
589
589
|
explicitMin: me.valMin,
|
|
@@ -600,63 +600,63 @@ function J(t, o, s, p, g) {
|
|
|
600
600
|
return;
|
|
601
601
|
}
|
|
602
602
|
let ye = 0;
|
|
603
|
-
if (!
|
|
604
|
-
let e =
|
|
605
|
-
|
|
606
|
-
let
|
|
603
|
+
if (!i.valAxisHidden) {
|
|
604
|
+
let e = n.font;
|
|
605
|
+
n.font = se(H, ge, i.valAxisFontBold ?? !1, i.valAxisFontItalic ?? !1);
|
|
606
|
+
let r = 0;
|
|
607
607
|
for (let e of ve.majorTicks) {
|
|
608
|
-
let
|
|
609
|
-
|
|
608
|
+
let t = N(i, e, !1);
|
|
609
|
+
r = Math.max(r, n.measureText(t).width);
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
n.font = e, ye = r + U + t * p;
|
|
612
612
|
}
|
|
613
|
-
let be = pe(
|
|
614
|
-
let n = we[t], r = e.color ?? P(
|
|
615
|
-
return re(
|
|
613
|
+
let be = pe(n, i, k, A, p), xe = ce(i.catAxisFontSizeHpt, A, p), Se = ce(i.valAxisFontSizeHpt, A, p), Ce = o(i, k, A, p), W = x.series.length, we = x.series.map((e, t) => de(e, t)), Te = x.series.map((e, t) => {
|
|
614
|
+
let n = we[t], r = e.color ?? P(i, n, W, e.chartexStyle);
|
|
615
|
+
return re(i, e.name, e, i.chartexDataPointStyle, n, W, r, !0);
|
|
616
616
|
}), Ee = {
|
|
617
|
-
...
|
|
617
|
+
...i,
|
|
618
618
|
series: Te
|
|
619
|
-
}, De = ee(
|
|
619
|
+
}, De = ee(n, Ee, k, A, .22, p), { legRightW: G, legLeftW: Oe, legTopH: ke, legBottomH: Ae } = v(De, i.legendOverlay === !0), je = s(i, S, O, k, A, p, {
|
|
620
620
|
titleBand: be,
|
|
621
621
|
legendSideReserveFrac: .22,
|
|
622
622
|
legendReserve: De,
|
|
623
623
|
pad: {
|
|
624
624
|
t: be.bandH + ke + Se / 2 + 2,
|
|
625
625
|
r: G + k * .02,
|
|
626
|
-
b: Ae + Ce.catBandH + (
|
|
627
|
-
l: Oe + Ce.valBandW + (
|
|
626
|
+
b: Ae + Ce.catBandH + (i.catAxisHidden ? A * .02 : r(xe)),
|
|
627
|
+
l: Oe + Ce.valBandW + (i.valAxisHidden ? k * .02 : ye)
|
|
628
628
|
},
|
|
629
629
|
honorPlotAreaManualLayout: !0
|
|
630
630
|
}), { px0: K, py0: q, pw: Me, ph: J } = je.plotRect;
|
|
631
|
-
|
|
631
|
+
m(n, i, K, q, Me, J, p, _);
|
|
632
632
|
let Pe = x.categories, Fe = Pe.length, Ie = w(me, R, z, J / p);
|
|
633
633
|
if (!te(Ie)) {
|
|
634
634
|
M();
|
|
635
635
|
return;
|
|
636
636
|
}
|
|
637
|
-
fe(
|
|
638
|
-
let { min: Le, max: Re } = Ie, ze = Re - Le, Y = (e) => q + J * (1 - (e - Le) / ze), X =
|
|
639
|
-
if (
|
|
640
|
-
if (
|
|
641
|
-
let e = D(
|
|
642
|
-
for (let
|
|
637
|
+
fe(n, i, S, O, k, A, O + je.title.topPad, je.title.fontPx);
|
|
638
|
+
let { min: Le, max: Re } = Ie, ze = Re - Le, Y = (e) => q + J * (1 - (e - Le) / ze), X = u(i.valAxisLineColor, i.valAxisLineWidthEmu, p), Z = E(i, p);
|
|
639
|
+
if (n.save(), !i.valAxisHidden) {
|
|
640
|
+
if (n.font = se(H, ge, i.valAxisFontBold ?? !1, i.valAxisFontItalic ?? !1), n.textAlign = "right", n.textBaseline = "middle", i.valAxisMinorGridlines) {
|
|
641
|
+
let e = D(i, p);
|
|
642
|
+
for (let t of Ie.minorLines) T(n, K, Me, Y(t), !1, e);
|
|
643
643
|
}
|
|
644
644
|
for (let e of Ie.majorLines) {
|
|
645
|
-
let
|
|
646
|
-
if (
|
|
647
|
-
|
|
648
|
-
let e = Z.dash.length > 0 &&
|
|
649
|
-
Z.dash.length > 0 &&
|
|
645
|
+
let t = Y(e);
|
|
646
|
+
if (i.valAxisMajorGridlines !== !1) {
|
|
647
|
+
n.strokeStyle = Z.color, n.lineWidth = Z.width;
|
|
648
|
+
let e = Z.dash.length > 0 && n.getLineDash ? n.getLineDash() : [];
|
|
649
|
+
Z.dash.length > 0 && n.setLineDash(Z.dash), n.beginPath(), n.moveTo(K, t), n.lineTo(K + Me, t), n.stroke(), Z.dash.length > 0 && n.setLineDash(e);
|
|
650
650
|
}
|
|
651
|
-
|
|
651
|
+
n.fillStyle = i.valAxisFontColor ? `#${i.valAxisFontColor}` : "#595959", n.fillText(N(i, e, !1), K - _e, t), L(n, i.valAxisMajorTickMark, "val", K, t, X.color, X.width, !1, i.valAxisLineHidden, "major", p, i.valAxisLineDash);
|
|
652
652
|
}
|
|
653
|
-
for (let e of Ie.minorTicks) L(
|
|
654
|
-
|
|
653
|
+
for (let e of Ie.minorTicks) L(n, i.valAxisMinorTickMark, "val", K, Y(e), X.color, X.width, !1, i.valAxisLineHidden, "minor", p, i.valAxisLineDash);
|
|
654
|
+
i.valAxisLineHidden || j(n, K, q, K, q + J, X.color, X.width, i.valAxisLineDash);
|
|
655
655
|
}
|
|
656
|
-
let Q =
|
|
657
|
-
!
|
|
658
|
-
let $ = Me / Fe, Be =
|
|
659
|
-
let n =
|
|
656
|
+
let Q = u(i.catAxisLineColor, i.catAxisLineWidthEmu, p);
|
|
657
|
+
!i.catAxisHidden && !i.catAxisLineHidden && j(n, K, q + J, K + Me, q + J, Q.color, Q.width, i.catAxisLineDash);
|
|
658
|
+
let $ = Me / Fe, Be = e(i.barGapWidth, "chartex"), Ve = (e) => `#${x.series[e].color ?? P(i, we[e], W, x.series[e].chartexStyle)}`, He = (e) => oe(i, we[e], W, x.series[e].chartexStyle, x.series[e].color), Ue = x.series.map((e) => e.valuesByCategory.map((t) => d(t, e.quartileMethod))), We = (e, t) => {
|
|
659
|
+
let n = l(K, Me, x.oneBoxPerSeries ? 1 : Fe, W, x.oneBoxPerSeries ? 0 : e, t, Be);
|
|
660
660
|
return n ? {
|
|
661
661
|
bx: n.boxX,
|
|
662
662
|
boxW: n.boxWidth,
|
|
@@ -668,87 +668,87 @@ function J(t, o, s, p, g) {
|
|
|
668
668
|
};
|
|
669
669
|
};
|
|
670
670
|
for (let e = 0; e < W; e++) {
|
|
671
|
-
let
|
|
672
|
-
if (!
|
|
673
|
-
let r =
|
|
674
|
-
if (
|
|
675
|
-
|
|
671
|
+
let t = x.series[e];
|
|
672
|
+
if (!t.meanLine) continue;
|
|
673
|
+
let r = i.chartexDataPointLineStyle ?? i.chartexDataPointStyle, a = t.lineColor ? `#${t.lineColor}` : Ve(e);
|
|
674
|
+
if (n.save(), ue(n, i, r, t, we[e], W, a, p) || t.lineColor != null) {
|
|
675
|
+
t.lineColor && (n.strokeStyle = a), t.lineWidthEmu && (n.lineWidth = g(t.lineWidthEmu, p));
|
|
676
676
|
let r = !1;
|
|
677
|
-
|
|
678
|
-
for (let
|
|
679
|
-
let i = Ue[e][
|
|
677
|
+
n.beginPath();
|
|
678
|
+
for (let t = 0; t < Fe; t++) {
|
|
679
|
+
let i = Ue[e][t];
|
|
680
680
|
if (!i) {
|
|
681
681
|
r = !1;
|
|
682
682
|
continue;
|
|
683
683
|
}
|
|
684
|
-
let { cx: a } = We(
|
|
685
|
-
r ?
|
|
684
|
+
let { cx: a } = We(t, e), o = Y(i.mean);
|
|
685
|
+
r ? n.lineTo(a, o) : n.moveTo(a, o), r = !0;
|
|
686
686
|
}
|
|
687
|
-
|
|
687
|
+
n.stroke();
|
|
688
688
|
}
|
|
689
|
-
|
|
689
|
+
n.restore();
|
|
690
690
|
}
|
|
691
|
-
let Ge = ce(
|
|
691
|
+
let Ge = ce(i.catAxisFontSizeHpt, A, p), Ke = a(Ge);
|
|
692
692
|
for (let e = 0; e < Fe; e++) {
|
|
693
|
-
let
|
|
694
|
-
|
|
695
|
-
for (let
|
|
696
|
-
let r = x.series[
|
|
697
|
-
if (!
|
|
698
|
-
let { bx:
|
|
699
|
-
let
|
|
700
|
-
return !s && c && (
|
|
701
|
-
}, O = Y(
|
|
702
|
-
D(f, C ?? y) && (
|
|
703
|
-
let N = Y(
|
|
704
|
-
if (D(f, C ?? y) && (
|
|
705
|
-
let e =
|
|
706
|
-
for (let
|
|
693
|
+
let t = K + $ * (e + .5);
|
|
694
|
+
i.catAxisHidden || L(n, i.catAxisMajorTickMark, "cat", q + J, t, Q.color, Q.width, !1, i.catAxisLineHidden, "major", p, i.catAxisLineDash);
|
|
695
|
+
for (let t = 0; t < W; t++) {
|
|
696
|
+
let r = x.series[t], a = Ue[t][e];
|
|
697
|
+
if (!a) continue;
|
|
698
|
+
let { bx: o, boxW: s, cx: c } = We(e, t), l = Ve(t), u = He(t), d = i.chartexDataPointStyle, f = i.chartexDataPointLineStyle ?? d, m = i.chartexDataPointMarkerStyle ?? d, h = we[t], v = F(i, d, "line", h, W), y = r.lineColor ? `#${r.lineColor}` : v ? `#${v}` : l, S = r.lineWidthEmu ? g(r.lineWidthEmu, p) : d?.lineWidthEmu == null ? 1 : g(d.lineWidthEmu, p), C = F(i, f, "line", h, W), w = F(i, m, "fill", h, W), T = B(i, h, W, r.chartexStyle, r.color, m), E = F(i, m, "line", h, W), D = (e, t) => {
|
|
699
|
+
let a = r.chartexStyle, o = a?.lineHidden != null || a?.lineColors?.some(Boolean) || a?.lineWidthEmu != null || a?.lineDash != null || a?.lineCap != null || a?.lineJoin != null, s = ue(n, i, e, r, h, W, t, p), c = e?.lineNoStyle === !0 && !o && r.lineColor == null && r.lineWidthEmu == null;
|
|
700
|
+
return !s && c && (n.strokeStyle = t, n.lineWidth = 1, n.setLineDash([])), r.lineColor && (n.strokeStyle = y), r.lineWidthEmu && (n.lineWidth = S), s || c || r.lineColor != null;
|
|
701
|
+
}, O = Y(a.q1), k = Y(a.q3), A = Math.min(O, k), j = Math.max(1, Math.abs(O - k)), M = s * .4;
|
|
702
|
+
D(f, C ?? y) && (n.beginPath(), n.moveTo(c, Y(a.whiskerHi)), n.lineTo(c, k), n.moveTo(c, O), n.lineTo(c, Y(a.whiskerLo)), n.moveTo(c - M / 2, Y(a.whiskerHi)), n.lineTo(c + M / 2, Y(a.whiskerHi)), n.moveTo(c - M / 2, Y(a.whiskerLo)), n.lineTo(c + M / 2, Y(a.whiskerLo)), n.stroke()), u && (n.fillStyle = le(n, u, o, A, s, j, l, _), n.fillRect(o, A, s, j)), D(d, y) && n.strokeRect(o + S / 2, A + S / 2, s - S, j - S);
|
|
703
|
+
let N = Y(a.median);
|
|
704
|
+
if (D(f, C ?? y) && (n.beginPath(), n.moveTo(o, N), n.lineTo(o + s, N), n.stroke()), r.showNonoutliers) {
|
|
705
|
+
let e = i.chartStyleMarkerSymbol ?? i.chartexMarkerSymbol ?? "circle";
|
|
706
|
+
for (let t of a.inner) {
|
|
707
707
|
if (e === "none") continue;
|
|
708
708
|
let r = D(m, E ?? y);
|
|
709
|
-
ne(
|
|
709
|
+
ne(n, c, Y(t), e, 3, T ? w ? `#${w}` : l : "transparent", r ? y : null, p, n.lineWidth, T, _);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
if (r.meanMarker) {
|
|
713
|
-
let e = Y(
|
|
714
|
-
D(m, E ?? y) && (
|
|
713
|
+
let e = Y(a.mean), t = b;
|
|
714
|
+
D(m, E ?? y) && (n.beginPath(), n.moveTo(c - t, e - t), n.lineTo(c + t, e + t), n.moveTo(c + t, e - t), n.lineTo(c - t, e + t), n.stroke());
|
|
715
715
|
}
|
|
716
716
|
if (r.showOutliers) {
|
|
717
|
-
let e =
|
|
718
|
-
for (let
|
|
717
|
+
let e = i.chartStyleMarkerSymbol ?? i.chartexMarkerSymbol ?? "circle";
|
|
718
|
+
for (let t of a.outliers) {
|
|
719
719
|
if (e === "none") continue;
|
|
720
720
|
let r = D(m, E ?? y);
|
|
721
|
-
ne(
|
|
721
|
+
ne(n, c, Y(t), e, 3, T ? w ? `#${w}` : l : "transparent", r ? y : null, p, n.lineWidth, T, _);
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
if (!
|
|
726
|
-
|
|
725
|
+
if (!i.catAxisHidden) {
|
|
726
|
+
n.font = se(Ge, V(i, i.catAxisFontFace, "minor"), i.catAxisFontBold ?? !1, i.catAxisFontItalic ?? !1), n.fillStyle = i.catAxisFontColor ? `#${i.catAxisFontColor}` : "#595959", n.textAlign = "center", n.textBaseline = "top";
|
|
727
727
|
let r = Pe[e];
|
|
728
|
-
|
|
728
|
+
n.fillText(r, t, q + J + Ke);
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
|
-
|
|
731
|
+
n.restore(), ie(n, i, S, O, k, A, K, q, Me, J, Oe, Ae, Ce.catFontPx, Ce.valFontPx), he(n, Ee, De, S, O, k, A, K, q, Me, J, be.bandH + 2, p, x.series.map((e, t) => He(t)), _);
|
|
732
732
|
}
|
|
733
733
|
var Pe = .18;
|
|
734
|
-
function Fe(e,
|
|
735
|
-
let c =
|
|
734
|
+
function Fe(e, t, r, a, o) {
|
|
735
|
+
let c = t.chartexSunburst;
|
|
736
736
|
if (!c || c.rows.length === 0) return;
|
|
737
737
|
let { x: l, y: u, w: d, h: f } = r;
|
|
738
738
|
if (xe(c.rows)) {
|
|
739
|
-
C(e, r,
|
|
739
|
+
C(e, r, i + 1);
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
742
|
let p = Se(c.rows);
|
|
743
743
|
if (p.layoutWeight <= 0 || p.children.length === 0) return;
|
|
744
|
-
let
|
|
745
|
-
...
|
|
744
|
+
let h = t.series[0], g = S(h?.dataLabelOverrides), _ = p.children.map((e, n) => oe(t, n, p.children.length, h?.chartexStyle, h?.color)), v = {
|
|
745
|
+
...t,
|
|
746
746
|
chartType: "clusteredBar",
|
|
747
747
|
series: p.children.map((e) => {
|
|
748
|
-
let
|
|
749
|
-
return re(
|
|
748
|
+
let n = P(t, e.branchIndex, p.children.length, h?.chartexStyle);
|
|
749
|
+
return re(t, e.label, h, t.chartexDataPointStyle, e.branchIndex, p.children.length, n, !1, !1);
|
|
750
750
|
})
|
|
751
|
-
}, y = ee(e, v, d, f, .22, a), b =
|
|
751
|
+
}, y = ee(e, v, d, f, .22, a), b = s(t, l, u, d, f, a, {
|
|
752
752
|
titleTopPadFrac: .035,
|
|
753
753
|
titleBottomPadFrac: .035,
|
|
754
754
|
legendSideReserveFrac: 0,
|
|
@@ -756,12 +756,12 @@ function Fe(e, n, r, a, o) {
|
|
|
756
756
|
radialGapFrac: .02,
|
|
757
757
|
honorPlotAreaManualLayout: !0
|
|
758
758
|
});
|
|
759
|
-
fe(e,
|
|
759
|
+
fe(e, t, l, u, d, f, u + b.title.topPad, b.title.fontPx);
|
|
760
760
|
let { px0: x, py0: w, pw: T, ph: E } = b.plotRect;
|
|
761
|
-
|
|
761
|
+
m(e, t, x, w, T, E, a, o);
|
|
762
762
|
let D = x + T / 2, O = w + E / 2, A = Math.min(T, E) * .46;
|
|
763
763
|
p.a0 = -Math.PI / 2, p.a1 = -Math.PI / 2 + Math.PI * 2, Ce(p);
|
|
764
|
-
let j = W(p) + 1, M = A * Pe, N = (A - M) / j, ne = (e) => `#${P(
|
|
764
|
+
let j = W(p) + 1, M = A * Pe, N = (A - M) / j, ne = (e) => `#${P(t, e, p.children.length, h?.chartexStyle)}`, F = (e) => oe(t, e, p.children.length, h?.chartexStyle, h?.color), I = h?.seriesDataLabels, ie = V(t, I?.fontFace ?? t.dataLabelFontFace, "minor"), L = n(I?.fontSizeHpt, a) ?? Math.max(7, Math.min(13, A * .075)), R = I?.fontColor ? `#${I.fontColor}` : "#ffffff", B = Array.from({ length: j }, () => []), ae = [p];
|
|
765
765
|
for (; ae.length > 0;) {
|
|
766
766
|
let e = ae.pop();
|
|
767
767
|
e.depth >= 0 && B[e.depth].push(e);
|
|
@@ -774,15 +774,15 @@ function Fe(e, n, r, a, o) {
|
|
|
774
774
|
let r = c.a1 - c.a0;
|
|
775
775
|
if (r <= 1e-4) continue;
|
|
776
776
|
e.beginPath(), e.arc(D, O, s, c.a0, c.a1), e.arc(D, O, i, c.a1, c.a0, !0), e.closePath();
|
|
777
|
-
let
|
|
778
|
-
|
|
779
|
-
let _ = z(
|
|
777
|
+
let m = F(c.branchIndex);
|
|
778
|
+
m && (e.fillStyle = le(e, m, D - s, O - s, s * 2, s * 2, ne(c.branchIndex), o), e.fill()), ue(e, t, t.chartexDataPointStyle, t.series[0], c.branchIndex, p.children.length, "#ffffff", a) && e.stroke();
|
|
779
|
+
let _ = z(t, h, c.labelIndex, c.label, c.value, {
|
|
780
780
|
visible: !1,
|
|
781
781
|
showVal: !1,
|
|
782
782
|
showCatName: !1
|
|
783
|
-
},
|
|
783
|
+
}, g);
|
|
784
784
|
if (!_) continue;
|
|
785
|
-
let v = _.text, y =
|
|
785
|
+
let v = _.text, y = n(_.fontSizeHpt, a) ?? L, b = _.fontColor ? `#${_.fontColor}` : R, S = _.fontFace ? V(t, _.fontFace, "minor") : ie, C = (c.a0 + c.a1) / 2, A = (i + s) / 2, j = N - 4, M = r * A;
|
|
786
786
|
if (!_.manualLayout && j < y * .9 && M < y * .9) continue;
|
|
787
787
|
let ee = D + Math.cos(C) * A, P = O + Math.sin(C) * A;
|
|
788
788
|
if (e.font = `${_.textStyle.fontItalic ? "italic " : ""}${_.fontBold ? "bold " : ""}${y}px ${S}`, _.manualLayout) {
|
|
@@ -801,7 +801,7 @@ function Fe(e, n, r, a, o) {
|
|
|
801
801
|
y: u,
|
|
802
802
|
w: d,
|
|
803
803
|
h: f
|
|
804
|
-
}, k(
|
|
804
|
+
}, k(t, _.richRuns, a, S, _.fontBold ?? !1, _.textStyle), void 0, _.textStyle, a, _.labelBox, o);
|
|
805
805
|
continue;
|
|
806
806
|
}
|
|
807
807
|
e.save(), e.translate(ee, P);
|
|
@@ -821,10 +821,10 @@ function Fe(e, n, r, a, o) {
|
|
|
821
821
|
y: -M / 2,
|
|
822
822
|
w: j,
|
|
823
823
|
h: M
|
|
824
|
-
}, k(
|
|
824
|
+
}, k(t, _.richRuns, a, S, _.fontBold ?? !1, _.textStyle), void 0, _.textStyle, a, _.labelBox, o), e.restore();
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
e.restore(), he(e, v, y, l, u, d, f, x, w, T, E, b.title.bandH + 2, a,
|
|
827
|
+
e.restore(), he(e, v, y, l, u, d, f, x, w, T, E, b.title.bandH + 2, a, _, o);
|
|
828
828
|
}
|
|
829
829
|
function Ie(e, t) {
|
|
830
830
|
let n = e.map((e, t) => ({
|
|
@@ -889,23 +889,23 @@ function Ie(e, t) {
|
|
|
889
889
|
}
|
|
890
890
|
return p(c, l), o;
|
|
891
891
|
}
|
|
892
|
-
function Le(e,
|
|
893
|
-
let c =
|
|
892
|
+
function Le(e, t, r, a, o) {
|
|
893
|
+
let c = t.chartexTreemap;
|
|
894
894
|
if (!c || c.rows.length === 0) return;
|
|
895
895
|
if (xe(c.rows)) {
|
|
896
|
-
C(e, r,
|
|
896
|
+
C(e, r, i + 1);
|
|
897
897
|
return;
|
|
898
898
|
}
|
|
899
899
|
let l = Se(c.rows, !0);
|
|
900
900
|
if (l.layoutWeight <= 0 || l.children.length === 0) return;
|
|
901
|
-
let u =
|
|
902
|
-
...
|
|
901
|
+
let u = t.series[0], d = l.children.map((e) => oe(t, e.branchIndex, l.children.length, u?.chartexStyle, u?.color)), f = {
|
|
902
|
+
...t,
|
|
903
903
|
chartType: "clusteredBar",
|
|
904
904
|
series: l.children.map((e) => {
|
|
905
|
-
let
|
|
906
|
-
return re(
|
|
905
|
+
let n = P(t, e.branchIndex, l.children.length, u?.chartexStyle);
|
|
906
|
+
return re(t, e.label, u, t.chartexDataPointStyle, e.branchIndex, l.children.length, n, !0, !1);
|
|
907
907
|
})
|
|
908
|
-
}, p = ee(e, f, r.w, r.h, .22, a),
|
|
908
|
+
}, p = ee(e, f, r.w, r.h, .22, a), h = s(t, r.x, r.y, r.w, r.h, a, {
|
|
909
909
|
titleTopPadFrac: .035,
|
|
910
910
|
titleBottomPadFrac: .035,
|
|
911
911
|
legendSideReserveFrac: 0,
|
|
@@ -913,23 +913,23 @@ function Le(e, n, r, a, o) {
|
|
|
913
913
|
radialGapFrac: .015,
|
|
914
914
|
honorPlotAreaManualLayout: !0
|
|
915
915
|
});
|
|
916
|
-
fe(e,
|
|
917
|
-
let { px0:
|
|
918
|
-
|
|
916
|
+
fe(e, t, r.x, r.y, r.w, r.h, r.y + h.title.topPad, h.title.fontPx);
|
|
917
|
+
let { px0: g, py0: _, pw: v, ph: y } = h.plotRect;
|
|
918
|
+
m(e, t, g, _, v, y, a, o);
|
|
919
919
|
let b = {
|
|
920
|
-
x:
|
|
921
|
-
y:
|
|
920
|
+
x: g,
|
|
921
|
+
y: _,
|
|
922
922
|
w: v,
|
|
923
923
|
h: y
|
|
924
|
-
}, x = c.parentLabelLayout ?? "overlapping", S =
|
|
924
|
+
}, x = c.parentLabelLayout ?? "overlapping", S = t.series[0]?.seriesDataLabels, w = V(t, S?.fontFace ?? t.dataLabelFontFace, "minor"), T = n(S?.fontSizeHpt, a) ?? Math.max(8, Math.min(13, h.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", A = (i, s) => {
|
|
925
925
|
if (s.w < .5 || s.h < .5) return;
|
|
926
|
-
let c = `#${P(
|
|
926
|
+
let c = `#${P(t, i.branchIndex, l.children.length, u?.chartexStyle)}`, d = oe(t, i.branchIndex, l.children.length, u?.chartexStyle, u?.color), f = D.get(i.labelIndex), p = f?.fontColor ? `#${f.fontColor}` : E, m = n(f?.fontSizeHpt, a) ?? T, h = f?.fontBold ?? S?.fontBold ?? !1;
|
|
927
927
|
if (i.children.length > 0) {
|
|
928
|
-
let
|
|
928
|
+
let n = z(t, u, i.labelIndex, i.label, i.value, {
|
|
929
929
|
visible: x !== "none",
|
|
930
930
|
showVal: !1,
|
|
931
931
|
showCatName: !0
|
|
932
|
-
}, D, !0), l =
|
|
932
|
+
}, D, !0), l = n != null && (x !== "overlapping" || i.depth === 0), g = m, _ = n?.fontFace ? V(t, n.fontFace, "minor") : w, v = x === "banner" && l ? Math.min(s.h * .28, g + 7) : 0;
|
|
933
933
|
v > 0 && d && (e.fillStyle = le(e, d, s.x, s.y, s.w, v, c, o), e.fillRect(s.x, s.y, s.w, v));
|
|
934
934
|
let y = {
|
|
935
935
|
x: s.x,
|
|
@@ -938,7 +938,7 @@ function Le(e, n, r, a, o) {
|
|
|
938
938
|
h: Math.max(0, s.h - v)
|
|
939
939
|
};
|
|
940
940
|
for (let e of Ie(i.children, y)) A(e.node, e.rect);
|
|
941
|
-
if (l && (
|
|
941
|
+
if (l && (n.manualLayout || s.w > g * 2 && s.h > g + 4)) {
|
|
942
942
|
e.font = `${h ? "bold " : ""}${g}px ${_}`;
|
|
943
943
|
let i = v > 0 ? {
|
|
944
944
|
x: s.x,
|
|
@@ -946,7 +946,7 @@ function Le(e, n, r, a, o) {
|
|
|
946
946
|
w: s.w,
|
|
947
947
|
h: v
|
|
948
948
|
} : s, c = f?.position ?? "inBase";
|
|
949
|
-
te(e,
|
|
949
|
+
te(e, n.text, n.manualLayout ? {
|
|
950
950
|
kind: "point",
|
|
951
951
|
x: s.x + s.w / 2,
|
|
952
952
|
y: s.y + s.h / 2,
|
|
@@ -955,20 +955,20 @@ function Le(e, n, r, a, o) {
|
|
|
955
955
|
kind: "box",
|
|
956
956
|
rect: i,
|
|
957
957
|
position: c
|
|
958
|
-
},
|
|
958
|
+
}, n.manualLayout ? b : i, g, p, n.manualLayout, r, k(t, n.richRuns, a, _, h, n.textStyle), void 0, n.textStyle, a, n.labelBox, o);
|
|
959
959
|
}
|
|
960
960
|
return;
|
|
961
961
|
}
|
|
962
|
-
d && (e.fillStyle = le(e, d, s.x, s.y, s.w, s.h, c, o), e.fillRect(s.x, s.y, s.w, s.h)), ue(e,
|
|
963
|
-
let g = z(
|
|
962
|
+
d && (e.fillStyle = le(e, d, s.x, s.y, s.w, s.h, c, o), e.fillRect(s.x, s.y, s.w, s.h)), ue(e, t, t.chartexDataPointStyle, t.series[0], i.branchIndex, l.children.length, O, a, { linkedNoStyleFallback: !0 }) && e.strokeRect(s.x, s.y, s.w, s.h);
|
|
963
|
+
let g = z(t, u, i.labelIndex, i.label, i.value, {
|
|
964
964
|
visible: !1,
|
|
965
965
|
showVal: !1,
|
|
966
966
|
showCatName: !1
|
|
967
967
|
}, D);
|
|
968
968
|
if (!g) return;
|
|
969
|
-
let _ =
|
|
969
|
+
let _ = n(g.fontSizeHpt, a) ?? m;
|
|
970
970
|
if (!g.manualLayout && (s.w <= _ * 1.2 || s.h <= _ * 1.2)) return;
|
|
971
|
-
let v = g.fontFace ? V(
|
|
971
|
+
let v = g.fontFace ? V(t, g.fontFace, "minor") : w;
|
|
972
972
|
e.font = `${g.fontBold ? "bold " : ""}${_}px ${v}`;
|
|
973
973
|
let y = s, C = g.position === "outEnd" ? "inEnd" : g.position ?? "ctr";
|
|
974
974
|
te(e, g.text, g.manualLayout ? {
|
|
@@ -980,33 +980,33 @@ function Le(e, n, r, a, o) {
|
|
|
980
980
|
kind: "box",
|
|
981
981
|
rect: y,
|
|
982
982
|
position: C
|
|
983
|
-
}, g.manualLayout ? b : y, _, g.fontColor ? `#${g.fontColor}` : p, g.manualLayout, r, k(
|
|
983
|
+
}, g.manualLayout ? b : y, _, g.fontColor ? `#${g.fontColor}` : p, g.manualLayout, r, k(t, g.richRuns, a, v, g.fontBold ?? !1, g.textStyle), void 0, g.textStyle, a, g.labelBox, o);
|
|
984
984
|
};
|
|
985
|
-
e.save(), e.beginPath(), e.rect(
|
|
985
|
+
e.save(), e.beginPath(), e.rect(g, _, v, y), e.clip();
|
|
986
986
|
for (let e of Ie(l.children, {
|
|
987
|
-
x:
|
|
988
|
-
y:
|
|
987
|
+
x: g,
|
|
988
|
+
y: _,
|
|
989
989
|
w: v,
|
|
990
990
|
h: y
|
|
991
991
|
})) A(e.node, e.rect);
|
|
992
|
-
e.restore(), he(e, f, p, r.x, r.y, r.w, r.h,
|
|
992
|
+
e.restore(), he(e, f, p, r.x, r.y, r.w, r.h, g, _, v, y, h.title.bandH + 2, a, d, o);
|
|
993
993
|
}
|
|
994
|
-
function Re(e, t, n, r,
|
|
995
|
-
let
|
|
996
|
-
if (
|
|
994
|
+
function Re(e, t, n, r, a = 0) {
|
|
995
|
+
let o = De(t);
|
|
996
|
+
if (o != null && o > 1048576) return C(e, n, i + 1), !0;
|
|
997
997
|
switch (t.chartType) {
|
|
998
|
-
case "waterfall": return Oe(e, t, n, r,
|
|
998
|
+
case "waterfall": return Oe(e, t, n, r, a), !0;
|
|
999
999
|
case "clusteredColumn": return A(e, {
|
|
1000
1000
|
...t,
|
|
1001
1001
|
chartType: "clusteredBar"
|
|
1002
|
-
}, n, r, { gapPolicy: "chartex" },
|
|
1003
|
-
case "histogram": return G(e, t, n, r,
|
|
1004
|
-
case "funnel": return ke(e, t, n, r,
|
|
1005
|
-
case "paretoLine": return Ae(e, t, n, r,
|
|
1006
|
-
case "pareto": return je(e, t, n, r,
|
|
1007
|
-
case "boxWhisker": return J(e, t, n, r,
|
|
1008
|
-
case "sunburst": return Fe(e, t, n, r,
|
|
1009
|
-
case "treemap": return Le(e, t, n, r,
|
|
1002
|
+
}, n, r, { gapPolicy: "chartex" }, a), !0;
|
|
1003
|
+
case "histogram": return G(e, t, n, r, a), !0;
|
|
1004
|
+
case "funnel": return ke(e, t, n, r, a), !0;
|
|
1005
|
+
case "paretoLine": return Ae(e, t, n, r, a), !0;
|
|
1006
|
+
case "pareto": return je(e, t, n, r, a), !0;
|
|
1007
|
+
case "boxWhisker": return J(e, t, n, r, a), !0;
|
|
1008
|
+
case "sunburst": return Fe(e, t, n, r, a), !0;
|
|
1009
|
+
case "treemap": return Le(e, t, n, r, a), !0;
|
|
1010
1010
|
default: return !1;
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|