pptx-react-viewer 3.19.1 → 3.20.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/CHANGELOG.md +18 -0
- package/dist/{AiChatPanel-DLADHD56.js → AiChatPanel-NBKG2CWE.js} +25 -25
- package/dist/AiChatPanel-NBKG2CWE.js.br +0 -0
- package/dist/AiChatPanel-NBKG2CWE.js.gz +0 -0
- package/dist/{AiChatPanel-MSALNPYW.mjs → AiChatPanel-OXCJVBUS.mjs} +4 -4
- package/dist/AiChatPanel-OXCJVBUS.mjs.br +0 -0
- package/dist/AiChatPanel-OXCJVBUS.mjs.gz +0 -0
- package/dist/{Area3DChartScene-53ZVPYKG.mjs → Area3DChartScene-5M3LEY6M.mjs} +1 -1
- package/dist/Area3DChartScene-5M3LEY6M.mjs.br +0 -0
- package/dist/Area3DChartScene-5M3LEY6M.mjs.gz +0 -0
- package/dist/{Area3DChartScene-BQQHOYRS.js → Area3DChartScene-7QPDPVR6.js} +2 -2
- package/dist/Area3DChartScene-7QPDPVR6.js.br +0 -0
- package/dist/Area3DChartScene-7QPDPVR6.js.gz +0 -0
- package/dist/{Bar3DChartScene-IN67ZH3P.mjs → Bar3DChartScene-NNSTLO4V.mjs} +1 -1
- package/dist/Bar3DChartScene-NNSTLO4V.mjs.br +0 -0
- package/dist/Bar3DChartScene-NNSTLO4V.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-PNQOIOIH.js → Bar3DChartScene-TAMPS6ZS.js} +2 -2
- package/dist/Bar3DChartScene-TAMPS6ZS.js.br +0 -0
- package/dist/Bar3DChartScene-TAMPS6ZS.js.gz +0 -0
- package/dist/{Line3DChartScene-4SQUUAOW.mjs → Line3DChartScene-7S2DD45T.mjs} +1 -1
- package/dist/Line3DChartScene-7S2DD45T.mjs.br +0 -0
- package/dist/Line3DChartScene-7S2DD45T.mjs.gz +0 -0
- package/dist/{Line3DChartScene-CFSTMTFH.js → Line3DChartScene-T4SH37NU.js} +2 -2
- package/dist/Line3DChartScene-T4SH37NU.js.br +0 -0
- package/dist/Line3DChartScene-T4SH37NU.js.gz +0 -0
- package/dist/{Model3DScene-TA55BJY7.mjs → Model3DScene-CXRM7D3J.mjs} +1 -1
- package/dist/Model3DScene-CXRM7D3J.mjs.br +0 -0
- package/dist/Model3DScene-CXRM7D3J.mjs.gz +0 -0
- package/dist/{Model3DScene-DXNAYZ6P.js → Model3DScene-IDRM7EZD.js} +2 -2
- package/dist/Model3DScene-IDRM7EZD.js.br +0 -0
- package/dist/Model3DScene-IDRM7EZD.js.gz +0 -0
- package/dist/{PieChart3DScene-NCBKTWAO.js → PieChart3DScene-66Y5UP64.js} +2 -2
- package/dist/PieChart3DScene-66Y5UP64.js.br +0 -0
- package/dist/PieChart3DScene-66Y5UP64.js.gz +0 -0
- package/dist/{PieChart3DScene-TQOCHJOY.mjs → PieChart3DScene-VSCSEY2G.mjs} +1 -1
- package/dist/PieChart3DScene-VSCSEY2G.mjs.br +0 -0
- package/dist/PieChart3DScene-VSCSEY2G.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-VA6IRLFG.js → SurfaceChart3DScene-6J4A6XUH.js} +2 -2
- package/dist/SurfaceChart3DScene-6J4A6XUH.js.br +0 -0
- package/dist/SurfaceChart3DScene-6J4A6XUH.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-7CSF2GPT.mjs → SurfaceChart3DScene-NSHDK657.mjs} +1 -1
- package/dist/SurfaceChart3DScene-NSHDK657.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-NSHDK657.mjs.gz +0 -0
- package/dist/{chunk-Z3KMGLXL.mjs → chunk-2IBDKMY2.mjs} +506 -325
- package/dist/chunk-2IBDKMY2.mjs.br +0 -0
- package/dist/chunk-2IBDKMY2.mjs.gz +0 -0
- package/dist/{chunk-DNQ3PGGU.mjs → chunk-5PDGHTRJ.mjs} +32 -28
- package/dist/chunk-5PDGHTRJ.mjs.br +0 -0
- package/dist/chunk-5PDGHTRJ.mjs.gz +0 -0
- package/dist/{chunk-ZHPBQVBK.js → chunk-7SFA4A2E.js} +1515 -1334
- package/dist/chunk-7SFA4A2E.js.br +0 -0
- package/dist/chunk-7SFA4A2E.js.gz +0 -0
- package/dist/{chunk-MQUTXOET.mjs → chunk-AVTH627G.mjs} +11 -0
- package/dist/chunk-AVTH627G.mjs.br +0 -0
- package/dist/chunk-AVTH627G.mjs.gz +0 -0
- package/dist/{chunk-LBKKSCVS.mjs → chunk-AYH6XSE7.mjs} +1 -1
- package/dist/chunk-AYH6XSE7.mjs.br +0 -0
- package/dist/chunk-AYH6XSE7.mjs.gz +0 -0
- package/dist/{chunk-4WUGOCYU.js → chunk-DW66NEST.js} +191 -186
- package/dist/chunk-DW66NEST.js.br +0 -0
- package/dist/chunk-DW66NEST.js.gz +0 -0
- package/dist/{chunk-RCUPQJVY.mjs → chunk-FE4L26FT.mjs} +12 -7
- package/dist/chunk-FE4L26FT.mjs.br +0 -0
- package/dist/chunk-FE4L26FT.mjs.gz +0 -0
- package/dist/{chunk-BRJN3ZMG.js → chunk-I5LPYESF.js} +11 -0
- package/dist/chunk-I5LPYESF.js.br +0 -0
- package/dist/chunk-I5LPYESF.js.gz +0 -0
- package/dist/{chunk-3KVLOKA6.mjs → chunk-N4FLKADC.mjs} +721 -279
- package/dist/chunk-N4FLKADC.mjs.br +0 -0
- package/dist/chunk-N4FLKADC.mjs.gz +0 -0
- package/dist/{chunk-EJSRXEXA.js → chunk-NGWA6L3N.js} +726 -278
- package/dist/chunk-NGWA6L3N.js.br +0 -0
- package/dist/chunk-NGWA6L3N.js.gz +0 -0
- package/dist/{chunk-AZEDCITO.js → chunk-W3RBIIZW.js} +816 -812
- package/dist/chunk-W3RBIIZW.js.br +0 -0
- package/dist/chunk-W3RBIIZW.js.gz +0 -0
- package/dist/{chunk-YVZKXCML.js → chunk-WRXXPCZ7.js} +5 -5
- package/dist/chunk-WRXXPCZ7.js.br +0 -0
- package/dist/chunk-WRXXPCZ7.js.gz +0 -0
- package/dist/i18n/de.cjs +11 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +11 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +11 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +11 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +11 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +11 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +11 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +11 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +48 -48
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +75 -0
- package/dist/internals.js +105 -105
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +75 -0
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-DLADHD56.js.br +0 -0
- package/dist/AiChatPanel-DLADHD56.js.gz +0 -0
- package/dist/AiChatPanel-MSALNPYW.mjs.br +0 -0
- package/dist/AiChatPanel-MSALNPYW.mjs.gz +0 -0
- package/dist/Area3DChartScene-53ZVPYKG.mjs.br +0 -0
- package/dist/Area3DChartScene-53ZVPYKG.mjs.gz +0 -0
- package/dist/Area3DChartScene-BQQHOYRS.js.br +0 -0
- package/dist/Area3DChartScene-BQQHOYRS.js.gz +0 -0
- package/dist/Bar3DChartScene-IN67ZH3P.mjs.br +0 -0
- package/dist/Bar3DChartScene-IN67ZH3P.mjs.gz +0 -0
- package/dist/Bar3DChartScene-PNQOIOIH.js.br +0 -0
- package/dist/Bar3DChartScene-PNQOIOIH.js.gz +0 -0
- package/dist/Line3DChartScene-4SQUUAOW.mjs.br +0 -0
- package/dist/Line3DChartScene-4SQUUAOW.mjs.gz +0 -0
- package/dist/Line3DChartScene-CFSTMTFH.js.br +0 -0
- package/dist/Line3DChartScene-CFSTMTFH.js.gz +0 -0
- package/dist/Model3DScene-DXNAYZ6P.js.br +0 -0
- package/dist/Model3DScene-DXNAYZ6P.js.gz +0 -0
- package/dist/Model3DScene-TA55BJY7.mjs.br +0 -0
- package/dist/Model3DScene-TA55BJY7.mjs.gz +0 -0
- package/dist/PieChart3DScene-NCBKTWAO.js.br +0 -0
- package/dist/PieChart3DScene-NCBKTWAO.js.gz +0 -0
- package/dist/PieChart3DScene-TQOCHJOY.mjs.br +0 -0
- package/dist/PieChart3DScene-TQOCHJOY.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-7CSF2GPT.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-7CSF2GPT.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-VA6IRLFG.js.br +0 -0
- package/dist/SurfaceChart3DScene-VA6IRLFG.js.gz +0 -0
- package/dist/chunk-3KVLOKA6.mjs.br +0 -0
- package/dist/chunk-3KVLOKA6.mjs.gz +0 -0
- package/dist/chunk-4WUGOCYU.js.br +0 -0
- package/dist/chunk-4WUGOCYU.js.gz +0 -0
- package/dist/chunk-AZEDCITO.js.br +0 -0
- package/dist/chunk-AZEDCITO.js.gz +0 -0
- package/dist/chunk-BRJN3ZMG.js.br +0 -0
- package/dist/chunk-BRJN3ZMG.js.gz +0 -0
- package/dist/chunk-DNQ3PGGU.mjs.br +0 -0
- package/dist/chunk-DNQ3PGGU.mjs.gz +0 -0
- package/dist/chunk-EJSRXEXA.js.br +0 -0
- package/dist/chunk-EJSRXEXA.js.gz +0 -0
- package/dist/chunk-LBKKSCVS.mjs.br +0 -0
- package/dist/chunk-LBKKSCVS.mjs.gz +0 -0
- package/dist/chunk-MQUTXOET.mjs.br +0 -0
- package/dist/chunk-MQUTXOET.mjs.gz +0 -0
- package/dist/chunk-RCUPQJVY.mjs.br +0 -0
- package/dist/chunk-RCUPQJVY.mjs.gz +0 -0
- package/dist/chunk-YVZKXCML.js.br +0 -0
- package/dist/chunk-YVZKXCML.js.gz +0 -0
- package/dist/chunk-Z3KMGLXL.mjs.br +0 -0
- package/dist/chunk-Z3KMGLXL.mjs.gz +0 -0
- package/dist/chunk-ZHPBQVBK.js.br +0 -0
- package/dist/chunk-ZHPBQVBK.js.gz +0 -0
|
@@ -24292,7 +24292,9 @@ function getElementTextContent(element) {
|
|
|
24292
24292
|
return element.textSegments.map((segment) => String(segment.text || "")).join("");
|
|
24293
24293
|
}
|
|
24294
24294
|
function createEditorId(prefix) {
|
|
24295
|
-
|
|
24295
|
+
const random = Math.random().toString(36).slice(2, 8).padEnd(6, "0");
|
|
24296
|
+
const sequence = (nextEditorIdSequence++).toString(36);
|
|
24297
|
+
return `${prefix}-${Date.now()}-${random}${sequence}`;
|
|
24296
24298
|
}
|
|
24297
24299
|
function ensureArrayValue(value) {
|
|
24298
24300
|
if (!value) {
|
|
@@ -24300,10 +24302,12 @@ function ensureArrayValue(value) {
|
|
|
24300
24302
|
}
|
|
24301
24303
|
return Array.isArray(value) ? value : [value];
|
|
24302
24304
|
}
|
|
24305
|
+
var nextEditorIdSequence;
|
|
24303
24306
|
var init_element_utils = __esm({
|
|
24304
24307
|
"src/core/utils/element-utils.ts"() {
|
|
24305
24308
|
init_types();
|
|
24306
24309
|
init_clone_utils();
|
|
24310
|
+
nextEditorIdSequence = 0;
|
|
24307
24311
|
}
|
|
24308
24312
|
});
|
|
24309
24313
|
function isTemplateElementId(elementId) {
|
|
@@ -46496,6 +46500,10 @@ function parseChartDataPointPicture(dPtNode, xmlLookup) {
|
|
|
46496
46500
|
if (Number.isFinite(stackUnit)) {
|
|
46497
46501
|
result.pictureStackUnit = stackUnit;
|
|
46498
46502
|
}
|
|
46503
|
+
const opacity2 = parseBlipOpacity(dPtNode, xmlLookup);
|
|
46504
|
+
if (opacity2 !== void 0) {
|
|
46505
|
+
result.opacity = opacity2;
|
|
46506
|
+
}
|
|
46499
46507
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
46500
46508
|
}
|
|
46501
46509
|
function parseChartDataPointPictureBlipRel(dPtNode, xmlLookup) {
|
|
@@ -46505,6 +46513,26 @@ function parseChartDataPointPictureBlipRel(dPtNode, xmlLookup) {
|
|
|
46505
46513
|
const relId = String(blip?.["@_r:embed"] ?? blip?.["@_r:link"] ?? "").trim();
|
|
46506
46514
|
return relId.length > 0 ? relId : void 0;
|
|
46507
46515
|
}
|
|
46516
|
+
function parseBlipOpacity(dPtOrSerNode, xmlLookup) {
|
|
46517
|
+
const spPr = xmlLookup.getChildByLocalName(dPtOrSerNode, "spPr");
|
|
46518
|
+
const blipFill = xmlLookup.getChildByLocalName(spPr, "blipFill");
|
|
46519
|
+
const blip = xmlLookup.getChildByLocalName(blipFill, "blip");
|
|
46520
|
+
const alphaModFix = xmlLookup.getChildByLocalName(blip, "alphaModFix");
|
|
46521
|
+
const amt = Number.parseFloat(String(alphaModFix?.["@_amt"] ?? ""));
|
|
46522
|
+
return Number.isFinite(amt) ? Math.min(Math.max(amt / 1e5, 0), 1) : void 0;
|
|
46523
|
+
}
|
|
46524
|
+
function parseImplicitBlipPictureFill(dPtOrSerNode, xmlLookup) {
|
|
46525
|
+
const pictureOptions = xmlLookup.getChildByLocalName(dPtOrSerNode, "pictureOptions");
|
|
46526
|
+
if (pictureOptions) {
|
|
46527
|
+
return void 0;
|
|
46528
|
+
}
|
|
46529
|
+
const relId = parseChartDataPointPictureBlipRel(dPtOrSerNode, xmlLookup);
|
|
46530
|
+
if (!relId) {
|
|
46531
|
+
return void 0;
|
|
46532
|
+
}
|
|
46533
|
+
const opacity2 = parseBlipOpacity(dPtOrSerNode, xmlLookup);
|
|
46534
|
+
return { pictureFormat: "stretch", ...opacity2 !== void 0 ? { opacity: opacity2 } : {} };
|
|
46535
|
+
}
|
|
46508
46536
|
function buildDptPictureOptions(existing, picture) {
|
|
46509
46537
|
if (picture === void 0) {
|
|
46510
46538
|
return existing;
|
|
@@ -46670,7 +46698,9 @@ function buildChartMarkerXml(existing, marker, getLocalName2, resolveColor2) {
|
|
|
46670
46698
|
throw new RangeError("marker size must be an integer from 2 through 72");
|
|
46671
46699
|
}
|
|
46672
46700
|
const node = {};
|
|
46673
|
-
|
|
46701
|
+
if (marker.symbol !== "auto") {
|
|
46702
|
+
node["c:symbol"] = { "@_val": marker.symbol };
|
|
46703
|
+
}
|
|
46674
46704
|
if (marker.size !== void 0) {
|
|
46675
46705
|
node["c:size"] = { "@_val": String(marker.size) };
|
|
46676
46706
|
}
|
|
@@ -47035,10 +47065,7 @@ function parseMarker(markerNode, xmlLookup, colorParser) {
|
|
|
47035
47065
|
}
|
|
47036
47066
|
const symbolNode = xmlLookup.getChildByLocalName(markerNode, "symbol");
|
|
47037
47067
|
const rawSymbol = String(symbolNode?.["@_val"] || "").trim();
|
|
47038
|
-
const symbol = MARKER_SYMBOL_MAP[rawSymbol];
|
|
47039
|
-
if (!symbol) {
|
|
47040
|
-
return void 0;
|
|
47041
|
-
}
|
|
47068
|
+
const symbol = MARKER_SYMBOL_MAP[rawSymbol] ?? "auto";
|
|
47042
47069
|
const result = { symbol };
|
|
47043
47070
|
const sizeNode = xmlLookup.getChildByLocalName(markerNode, "size");
|
|
47044
47071
|
const size = Number(sizeNode?.["@_val"]);
|
|
@@ -47078,6 +47105,11 @@ function parseSeriesDataPoints(seriesNode, xmlLookup, colorParser) {
|
|
|
47078
47105
|
const picture = parseChartDataPointPicture(node, xmlLookup);
|
|
47079
47106
|
if (picture) {
|
|
47080
47107
|
result.picture = picture;
|
|
47108
|
+
} else {
|
|
47109
|
+
const impliedPicture = parseImplicitBlipPictureFill(node, xmlLookup);
|
|
47110
|
+
if (impliedPicture) {
|
|
47111
|
+
result.impliedPicture = impliedPicture;
|
|
47112
|
+
}
|
|
47081
47113
|
}
|
|
47082
47114
|
const explosionNode = xmlLookup.getChildByLocalName(node, "explosion");
|
|
47083
47115
|
const explosion = safeUnsignedInt(explosionNode?.["@_val"]);
|
|
@@ -48308,6 +48340,13 @@ function safeInt3(val2) {
|
|
|
48308
48340
|
const n = parseInt(String(val2), 10);
|
|
48309
48341
|
return Number.isFinite(n) ? n : void 0;
|
|
48310
48342
|
}
|
|
48343
|
+
function hasLocalName(node, name) {
|
|
48344
|
+
if (Object.hasOwn(node, name)) {
|
|
48345
|
+
return true;
|
|
48346
|
+
}
|
|
48347
|
+
const suffix = `:${name}`;
|
|
48348
|
+
return Object.keys(node).some((key2) => key2.endsWith(suffix));
|
|
48349
|
+
}
|
|
48311
48350
|
function parseChartAxes(plotArea, xmlLookup, colorParser, getLocalName2, resolveTypeface) {
|
|
48312
48351
|
const result = [];
|
|
48313
48352
|
for (const key2 of Object.keys(plotArea)) {
|
|
@@ -48403,20 +48442,24 @@ function parseSingleAxis(axisNode, axisType, xmlLookup, colorParser, getLocalNam
|
|
|
48403
48442
|
result,
|
|
48404
48443
|
(parent, name) => xmlLookup.getChildByLocalName(parent, name)
|
|
48405
48444
|
);
|
|
48406
|
-
|
|
48407
|
-
if (majorGrid) {
|
|
48445
|
+
if (hasLocalName(axisNode, "majorGridlines")) {
|
|
48408
48446
|
result.majorGridlines = true;
|
|
48409
48447
|
result.majorGridlinesSpPr = parseShapeProps(
|
|
48410
|
-
xmlLookup.getChildByLocalName(
|
|
48448
|
+
xmlLookup.getChildByLocalName(
|
|
48449
|
+
xmlLookup.getChildByLocalName(axisNode, "majorGridlines"),
|
|
48450
|
+
"spPr"
|
|
48451
|
+
),
|
|
48411
48452
|
xmlLookup,
|
|
48412
48453
|
colorParser
|
|
48413
48454
|
);
|
|
48414
48455
|
}
|
|
48415
|
-
|
|
48416
|
-
if (minorGrid) {
|
|
48456
|
+
if (hasLocalName(axisNode, "minorGridlines")) {
|
|
48417
48457
|
result.minorGridlines = true;
|
|
48418
48458
|
result.minorGridlinesSpPr = parseShapeProps(
|
|
48419
|
-
xmlLookup.getChildByLocalName(
|
|
48459
|
+
xmlLookup.getChildByLocalName(
|
|
48460
|
+
xmlLookup.getChildByLocalName(axisNode, "minorGridlines"),
|
|
48461
|
+
"spPr"
|
|
48462
|
+
),
|
|
48420
48463
|
xmlLookup,
|
|
48421
48464
|
colorParser
|
|
48422
48465
|
);
|
|
@@ -48619,20 +48662,24 @@ function parseSingleCxAxis(axisNode, xmlLookup, colorParser, resolveTypeface) {
|
|
|
48619
48662
|
if (formatCode) {
|
|
48620
48663
|
result.numFmt = { formatCode, sourceLinked: numFmtNode?.["@_sourceLinked"] === "1" };
|
|
48621
48664
|
}
|
|
48622
|
-
|
|
48623
|
-
if (majorGrid) {
|
|
48665
|
+
if (hasLocalName(axisNode, "majorGridlines")) {
|
|
48624
48666
|
result.majorGridlines = true;
|
|
48625
48667
|
result.majorGridlinesSpPr = parseShapeProps(
|
|
48626
|
-
xmlLookup.getChildByLocalName(
|
|
48668
|
+
xmlLookup.getChildByLocalName(
|
|
48669
|
+
xmlLookup.getChildByLocalName(axisNode, "majorGridlines"),
|
|
48670
|
+
"spPr"
|
|
48671
|
+
),
|
|
48627
48672
|
xmlLookup,
|
|
48628
48673
|
colorParser
|
|
48629
48674
|
);
|
|
48630
48675
|
}
|
|
48631
|
-
|
|
48632
|
-
if (minorGrid) {
|
|
48676
|
+
if (hasLocalName(axisNode, "minorGridlines")) {
|
|
48633
48677
|
result.minorGridlines = true;
|
|
48634
48678
|
result.minorGridlinesSpPr = parseShapeProps(
|
|
48635
|
-
xmlLookup.getChildByLocalName(
|
|
48679
|
+
xmlLookup.getChildByLocalName(
|
|
48680
|
+
xmlLookup.getChildByLocalName(axisNode, "minorGridlines"),
|
|
48681
|
+
"spPr"
|
|
48682
|
+
),
|
|
48636
48683
|
xmlLookup,
|
|
48637
48684
|
colorParser
|
|
48638
48685
|
);
|
|
@@ -48671,6 +48718,7 @@ function parseCxAxes(plotArea, xmlLookup, colorParser, resolveTypeface) {
|
|
|
48671
48718
|
var NO_COLOR;
|
|
48672
48719
|
var init_chart_cx_axis_parser = __esm({
|
|
48673
48720
|
"src/core/utils/chart-cx-axis-parser.ts"() {
|
|
48721
|
+
init_chart_axis_parser();
|
|
48674
48722
|
init_chart_series_detail_parser();
|
|
48675
48723
|
init_chart_title_xml_ops();
|
|
48676
48724
|
NO_COLOR = { parseColor: () => void 0 };
|
|
@@ -67430,6 +67478,12 @@ var init_PptxShapeStyleExtractor = __esm({
|
|
|
67430
67478
|
style.fillMode = "image";
|
|
67431
67479
|
style.fillColor = "transparent";
|
|
67432
67480
|
style.fillOpacity = 0;
|
|
67481
|
+
const blipRotToken = String(blipFill["@_rotWithShape"] ?? "").trim().toLowerCase();
|
|
67482
|
+
if (blipRotToken === "1" || blipRotToken === "true") {
|
|
67483
|
+
style.fillImageRotWithShape = true;
|
|
67484
|
+
} else if (blipRotToken === "0" || blipRotToken === "false") {
|
|
67485
|
+
style.fillImageRotWithShape = false;
|
|
67486
|
+
}
|
|
67433
67487
|
} else if (shapeProps["a:grpFill"] !== void 0) {
|
|
67434
67488
|
style.fillMode = "group";
|
|
67435
67489
|
} else if (styleNode?.["a:fillRef"]) {
|
|
@@ -80942,7 +80996,7 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
|
|
|
80942
80996
|
if (!seriesNode) {
|
|
80943
80997
|
continue;
|
|
80944
80998
|
}
|
|
80945
|
-
const seriesPicture = series[si].picture;
|
|
80999
|
+
const seriesPicture = series[si].picture ?? series[si].impliedPicture;
|
|
80946
81000
|
if (seriesPicture) {
|
|
80947
81001
|
const seriesRelId = parseChartDataPointPictureBlipRel(seriesNode, xmlLookup);
|
|
80948
81002
|
if (seriesRelId) {
|
|
@@ -80968,7 +81022,8 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
|
|
|
80968
81022
|
10
|
|
80969
81023
|
);
|
|
80970
81024
|
const dataPoint = dataPoints.find((dp) => dp.idx === idx);
|
|
80971
|
-
|
|
81025
|
+
const dataPointPicture = dataPoint?.picture ?? dataPoint?.impliedPicture;
|
|
81026
|
+
if (!dataPointPicture) {
|
|
80972
81027
|
continue;
|
|
80973
81028
|
}
|
|
80974
81029
|
const relId = parseChartDataPointPictureBlipRel(dPtNode, xmlLookup);
|
|
@@ -80983,7 +81038,7 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
|
|
|
80983
81038
|
const imagePath = resolveImagePath(chartPartPath, rel.target);
|
|
80984
81039
|
const imageUrl = await getImageData(imagePath);
|
|
80985
81040
|
if (imageUrl) {
|
|
80986
|
-
|
|
81041
|
+
dataPointPicture.imageUrl = imageUrl;
|
|
80987
81042
|
}
|
|
80988
81043
|
}
|
|
80989
81044
|
}
|
|
@@ -96974,6 +97029,7 @@ var PptxHandlerRuntime10;
|
|
|
96974
97029
|
var init_PptxHandlerRuntimePresentationProps = __esm({
|
|
96975
97030
|
"src/core/core/runtime/PptxHandlerRuntimePresentationProps.ts"() {
|
|
96976
97031
|
init_chart_data_label_parser();
|
|
97032
|
+
init_chart_def_rpr_style();
|
|
96977
97033
|
init_chart_legend_serializer();
|
|
96978
97034
|
init_chart_title_style_parser();
|
|
96979
97035
|
init_pptx_presentation_props_helpers();
|
|
@@ -97128,6 +97184,18 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
|
|
|
97128
97184
|
if (entries.length > 0) {
|
|
97129
97185
|
style.legendEntries = entries;
|
|
97130
97186
|
}
|
|
97187
|
+
const legendTxPr = this.xmlLookupService.getChildByLocalName(legend, "txPr");
|
|
97188
|
+
const chartSpaceTxPr = this.xmlLookupService.getChildByLocalName(chartSpace, "txPr");
|
|
97189
|
+
const legendDefRPr = resolveTxPrDefRPr(legendTxPr ?? chartSpaceTxPr, this.xmlLookupService);
|
|
97190
|
+
const legendTextStyle = parseDefRPrTextStyle(
|
|
97191
|
+
legendDefRPr,
|
|
97192
|
+
this.xmlLookupService,
|
|
97193
|
+
{ parseColor: (node) => this.parseColor(node) },
|
|
97194
|
+
(raw) => this.resolveThemeTypeface(raw) ?? raw
|
|
97195
|
+
);
|
|
97196
|
+
if (legendTextStyle) {
|
|
97197
|
+
style.legendTextStyle = legendTextStyle;
|
|
97198
|
+
}
|
|
97131
97199
|
}
|
|
97132
97200
|
const title = this.xmlLookupService.getChildByLocalName(chartRoot, "title");
|
|
97133
97201
|
if (title) {
|
|
@@ -122022,7 +122090,9 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
122022
122090
|
});
|
|
122023
122091
|
}
|
|
122024
122092
|
}
|
|
122025
|
-
if (finalSeries.some(
|
|
122093
|
+
if (finalSeries.some(
|
|
122094
|
+
(s) => s.picture || s.impliedPicture || s.dataPoints?.some((dp) => dp.picture || dp.impliedPicture)
|
|
122095
|
+
)) {
|
|
122026
122096
|
await resolveDataPointPictureImages(
|
|
122027
122097
|
this.xmlLookupService,
|
|
122028
122098
|
this.readChartRels.bind(this),
|
|
@@ -122279,6 +122349,9 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
122279
122349
|
buildChartSeries(seriesList, categories, seriesChartType, axisId, containerChartType) {
|
|
122280
122350
|
return seriesList.map((seriesNode, seriesIndex) => {
|
|
122281
122351
|
const seriesName = this.extractChartSeriesName(seriesNode);
|
|
122352
|
+
const rawIdx = this.xmlLookupService.getChildByLocalName(seriesNode, "idx")?.["@_val"];
|
|
122353
|
+
const parsedIdx = rawIdx !== void 0 ? Number.parseInt(String(rawIdx), 10) : Number.NaN;
|
|
122354
|
+
const idx = Number.isFinite(parsedIdx) ? parsedIdx : void 0;
|
|
122282
122355
|
const valNode2 = this.xmlLookupService.getChildByLocalName(seriesNode, "val") || this.xmlLookupService.getChildByLocalName(seriesNode, "yVal");
|
|
122283
122356
|
const expanded = extractSeriesNumbersWithBlanks(valNode2, this.xmlLookupService);
|
|
122284
122357
|
const hasBlanks = expanded.some((value) => value === null);
|
|
@@ -122337,6 +122410,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
122337
122410
|
(key2) => this.compatibilityService.getXmlLocalName(key2)
|
|
122338
122411
|
);
|
|
122339
122412
|
const seriesPicture = parseChartDataPointPicture(seriesNode, this.xmlLookupService);
|
|
122413
|
+
const impliedSeriesPicture = seriesPicture ? void 0 : parseImplicitBlipPictureFill(seriesNode, this.xmlLookupService);
|
|
122340
122414
|
const xValues = extractSeriesNumbersWithBlanks(
|
|
122341
122415
|
this.xmlLookupService.getChildByLocalName(seriesNode, "xVal"),
|
|
122342
122416
|
this.xmlLookupService
|
|
@@ -122367,6 +122441,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
122367
122441
|
) : void 0;
|
|
122368
122442
|
return {
|
|
122369
122443
|
name: seriesName.trim().length > 0 ? seriesName : `Series ${seriesIndex + 1}`,
|
|
122444
|
+
...idx !== void 0 ? { idx } : {},
|
|
122370
122445
|
values: fallbackValues,
|
|
122371
122446
|
...blanks ? { blanks } : {},
|
|
122372
122447
|
...xValues.length > 0 ? { xValues } : {},
|
|
@@ -122382,6 +122457,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
122382
122457
|
...dataLabels.length > 0 ? { dataLabels } : {},
|
|
122383
122458
|
...explosion !== void 0 ? { explosion } : {},
|
|
122384
122459
|
...seriesPicture ? { picture: seriesPicture } : {},
|
|
122460
|
+
...impliedSeriesPicture ? { impliedPicture: impliedSeriesPicture } : {},
|
|
122385
122461
|
...invertIfNegative !== void 0 ? { invertIfNegative } : {},
|
|
122386
122462
|
...smooth !== void 0 ? { smooth } : {},
|
|
122387
122463
|
...axisId !== void 0 ? { axisId } : {},
|
|
@@ -144129,6 +144205,28 @@ function resolveGroupChildFill(child27, parentGroupFill) {
|
|
|
144129
144205
|
}
|
|
144130
144206
|
return getComputedFillStyle(child27, parentGroupFill);
|
|
144131
144207
|
}
|
|
144208
|
+
function getFrameInverseTransform(element) {
|
|
144209
|
+
const transforms = [];
|
|
144210
|
+
if (element.flipVertical) {
|
|
144211
|
+
transforms.push("scaleY(-1)");
|
|
144212
|
+
}
|
|
144213
|
+
if (element.flipHorizontal) {
|
|
144214
|
+
transforms.push("scaleX(-1)");
|
|
144215
|
+
}
|
|
144216
|
+
if (element.rotation) {
|
|
144217
|
+
transforms.push(`rotate(${-element.rotation}deg)`);
|
|
144218
|
+
}
|
|
144219
|
+
return transforms.length > 0 ? transforms.join(" ") : void 0;
|
|
144220
|
+
}
|
|
144221
|
+
function getImageFillCounterTransform(element, hasCompetingTransform = false) {
|
|
144222
|
+
if (hasCompetingTransform || !hasShapeProperties(element)) {
|
|
144223
|
+
return void 0;
|
|
144224
|
+
}
|
|
144225
|
+
if (element.shapeStyle?.fillImageRotWithShape !== false) {
|
|
144226
|
+
return void 0;
|
|
144227
|
+
}
|
|
144228
|
+
return getFrameInverseTransform(element);
|
|
144229
|
+
}
|
|
144132
144230
|
var DEFAULT_SCHEME_COLOR_MAP2 = {
|
|
144133
144231
|
dk1: "#000000",
|
|
144134
144232
|
lt1: "#FFFFFF",
|
|
@@ -150506,7 +150604,20 @@ function compileEquationTemplateMathMl() {
|
|
|
150506
150604
|
}
|
|
150507
150605
|
var NICE_STEPS = [1, 2, 2.5, 5, 10];
|
|
150508
150606
|
var HEADROOM = 0.05;
|
|
150607
|
+
var POINTS_PER_GRIDLINE = 20;
|
|
150608
|
+
var MIN_TARGET_INTERVALS = 1;
|
|
150609
|
+
var MAX_TARGET_INTERVALS = 10;
|
|
150610
|
+
var PX_PER_POINT = 4 / 3;
|
|
150611
|
+
var DEFAULT_TARGET_INTERVALS = 4;
|
|
150509
150612
|
var ZERO_ANCHOR_RATIO = 5 / 6;
|
|
150613
|
+
function axisTargetIntervals(plotHeightPx) {
|
|
150614
|
+
if (!Number.isFinite(plotHeightPx) || plotHeightPx <= 0) {
|
|
150615
|
+
return DEFAULT_TARGET_INTERVALS;
|
|
150616
|
+
}
|
|
150617
|
+
const plotHeightPt = plotHeightPx / PX_PER_POINT;
|
|
150618
|
+
const raw = Math.round(plotHeightPt / POINTS_PER_GRIDLINE);
|
|
150619
|
+
return Math.min(MAX_TARGET_INTERVALS, Math.max(MIN_TARGET_INTERVALS, raw));
|
|
150620
|
+
}
|
|
150510
150621
|
function niceAxisStep(value) {
|
|
150511
150622
|
if (!Number.isFinite(value) || value <= 0) {
|
|
150512
150623
|
return 1;
|
|
@@ -150522,7 +150633,7 @@ function snap(value, unit, direction) {
|
|
|
150522
150633
|
const rounded = direction === "up" ? Math.ceil(scaled - 1e-9) : Math.floor(scaled + 1e-9);
|
|
150523
150634
|
return rounded * unit;
|
|
150524
150635
|
}
|
|
150525
|
-
function niceValueAxisBounds(dataMin, dataMax, targetIntervals =
|
|
150636
|
+
function niceValueAxisBounds(dataMin, dataMax, targetIntervals = DEFAULT_TARGET_INTERVALS) {
|
|
150526
150637
|
if (!Number.isFinite(dataMin) || !Number.isFinite(dataMax)) {
|
|
150527
150638
|
return { min: 0, max: 1, majorUnit: 0.5 };
|
|
150528
150639
|
}
|
|
@@ -150926,14 +151037,15 @@ function getChartStylePalette(styleId) {
|
|
|
150926
151037
|
}
|
|
150927
151038
|
return palette;
|
|
150928
151039
|
}
|
|
150929
|
-
function computeValueRange(series) {
|
|
151040
|
+
function computeValueRange(series, plotHeightPx) {
|
|
150930
151041
|
const allValues = series.flatMap((s) => s.values);
|
|
150931
151042
|
if (allValues.length === 0) {
|
|
150932
151043
|
return { min: 0, max: 1, span: 1 };
|
|
150933
151044
|
}
|
|
150934
151045
|
const { min, max, majorUnit } = niceValueAxisBounds(
|
|
150935
151046
|
Math.min(...allValues),
|
|
150936
|
-
Math.max(...allValues)
|
|
151047
|
+
Math.max(...allValues),
|
|
151048
|
+
plotHeightPx !== void 0 ? axisTargetIntervals(plotHeightPx) : void 0
|
|
150937
151049
|
);
|
|
150938
151050
|
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
150939
151051
|
}
|
|
@@ -150961,7 +151073,7 @@ function resolve(fill, fallback) {
|
|
|
150961
151073
|
return fill ?? fallback;
|
|
150962
151074
|
}
|
|
150963
151075
|
function chartAreaFill(chartData) {
|
|
150964
|
-
return resolve(chartData?.style?.chartAreaFill,
|
|
151076
|
+
return resolve(chartData?.style?.chartAreaFill, void 0);
|
|
150965
151077
|
}
|
|
150966
151078
|
function plotAreaFill(chartData) {
|
|
150967
151079
|
return resolve(chartData?.style?.plotAreaFill, void 0);
|
|
@@ -151034,10 +151146,10 @@ function computeLogValueRange(series, logBase) {
|
|
|
151034
151146
|
logBase
|
|
151035
151147
|
};
|
|
151036
151148
|
}
|
|
151037
|
-
function computeValueRangeForAxis(series, axis) {
|
|
151149
|
+
function computeValueRangeForAxis(series, axis, plotHeightPx) {
|
|
151038
151150
|
const requestedLogBase = axis?.logBase ?? 10;
|
|
151039
151151
|
const logBase = axis?.logScale && Number.isFinite(requestedLogBase) && requestedLogBase > 1 ? requestedLogBase : axis?.logScale ? 10 : void 0;
|
|
151040
|
-
const automatic = logBase ? computeLogValueRange(series, logBase) : computeValueRange(series);
|
|
151152
|
+
const automatic = logBase ? computeLogValueRange(series, logBase) : computeValueRange(series, plotHeightPx);
|
|
151041
151153
|
const validMin = typeof axis?.min === "number" && Number.isFinite(axis.min) && (!logBase || axis.min > 0) ? axis.min : void 0;
|
|
151042
151154
|
const validMax = typeof axis?.max === "number" && Number.isFinite(axis.max) && (!logBase || axis.max > 0) ? axis.max : void 0;
|
|
151043
151155
|
const min = validMin ?? automatic.min;
|
|
@@ -151114,9 +151226,9 @@ function generateMinorAxisTicks(range, axis) {
|
|
|
151114
151226
|
(value) => Math.abs(value / majorUnit - Math.round(value / majorUnit)) > tolerance
|
|
151115
151227
|
);
|
|
151116
151228
|
}
|
|
151117
|
-
function computeValueRangeForChart(series, axes) {
|
|
151229
|
+
function computeValueRangeForChart(series, axes, plotHeightPx) {
|
|
151118
151230
|
const primaryAxis = axes?.find((axis) => axis.axisType === "valAx" && axis.axPos === "l") ?? axes?.find((axis) => axis.axisType === "valAx" && axis.axPos !== "r");
|
|
151119
|
-
return computeValueRangeForAxis(series, primaryAxis);
|
|
151231
|
+
return computeValueRangeForAxis(series, primaryAxis, plotHeightPx);
|
|
151120
151232
|
}
|
|
151121
151233
|
var DISPLAY_UNIT_DIVISORS = {
|
|
151122
151234
|
hundreds: 100,
|
|
@@ -151178,11 +151290,20 @@ function hasSecondaryValueAxis(axes) {
|
|
|
151178
151290
|
}
|
|
151179
151291
|
return axes.some((a) => a.axisType === "valAx" && a.axPos === "r");
|
|
151180
151292
|
}
|
|
151293
|
+
function categoryAxes(axes) {
|
|
151294
|
+
return axes?.filter((a) => a.axisType === "catAx" || a.axisType === "dateAx") ?? [];
|
|
151295
|
+
}
|
|
151181
151296
|
function hasSecondaryCategoryAxis(axes) {
|
|
151182
|
-
|
|
151297
|
+
const cats = categoryAxes(axes);
|
|
151298
|
+
return cats.length > 1 && cats.some((a) => a.axPos === "t");
|
|
151299
|
+
}
|
|
151300
|
+
function isPrimaryCategoryAxisAtTop(axes) {
|
|
151301
|
+
const cats = categoryAxes(axes);
|
|
151302
|
+
if (cats.length === 0) {
|
|
151183
151303
|
return false;
|
|
151184
151304
|
}
|
|
151185
|
-
|
|
151305
|
+
const primary = cats.find((a) => a.axPos !== "t") ?? cats[0];
|
|
151306
|
+
return primary.axPos === "t";
|
|
151186
151307
|
}
|
|
151187
151308
|
function getSecondaryValueAxis(axes) {
|
|
151188
151309
|
if (!axes) {
|
|
@@ -151194,6 +151315,7 @@ function computeLayoutOptions(axes, dataTable, seriesCount) {
|
|
|
151194
151315
|
return {
|
|
151195
151316
|
hasSecondaryValueAxis: hasSecondaryValueAxis(axes),
|
|
151196
151317
|
hasSecondaryCategoryAxis: hasSecondaryCategoryAxis(axes),
|
|
151318
|
+
categoryAxisAtTop: isPrimaryCategoryAxisAtTop(axes),
|
|
151197
151319
|
hasDataTable: Boolean(dataTable),
|
|
151198
151320
|
dataTableRowCount: dataTable ? seriesCount : void 0
|
|
151199
151321
|
};
|
|
@@ -151254,6 +151376,113 @@ function shade2(hex4, amount) {
|
|
|
151254
151376
|
const [r, g2, b] = hexToRgb3(hex4);
|
|
151255
151377
|
return rgbToHex2(r * (1 - amount), g2 * (1 - amount), b * (1 - amount));
|
|
151256
151378
|
}
|
|
151379
|
+
var AUTOMATIC_MARKER_CYCLE = [
|
|
151380
|
+
"diamond",
|
|
151381
|
+
"square",
|
|
151382
|
+
"triangle",
|
|
151383
|
+
"x",
|
|
151384
|
+
"star",
|
|
151385
|
+
"circle",
|
|
151386
|
+
"plus",
|
|
151387
|
+
"dot",
|
|
151388
|
+
"dash"
|
|
151389
|
+
];
|
|
151390
|
+
function automaticMarkerSymbol(seriesIdx) {
|
|
151391
|
+
const length = AUTOMATIC_MARKER_CYCLE.length;
|
|
151392
|
+
const normalized = (seriesIdx % length + length) % length;
|
|
151393
|
+
return AUTOMATIC_MARKER_CYCLE[normalized];
|
|
151394
|
+
}
|
|
151395
|
+
function markerRadius(size, defaultRadius2) {
|
|
151396
|
+
if (size === void 0 || !Number.isFinite(size) || size <= 0) {
|
|
151397
|
+
return defaultRadius2;
|
|
151398
|
+
}
|
|
151399
|
+
return size / 2;
|
|
151400
|
+
}
|
|
151401
|
+
function polygonPoints(vertices) {
|
|
151402
|
+
return vertices.map(([x, y]) => `${x.toFixed(2)},${y.toFixed(2)}`).join(" ");
|
|
151403
|
+
}
|
|
151404
|
+
function starVertices(cx, cy, r) {
|
|
151405
|
+
const inner = r * 0.5;
|
|
151406
|
+
const out = [];
|
|
151407
|
+
for (let i2 = 0; i2 < 10; i2++) {
|
|
151408
|
+
const radius = i2 % 2 === 0 ? r : inner;
|
|
151409
|
+
const angle = -Math.PI / 2 + Math.PI * i2 / 5;
|
|
151410
|
+
out.push([cx + radius * Math.cos(angle), cy + radius * Math.sin(angle)]);
|
|
151411
|
+
}
|
|
151412
|
+
return out;
|
|
151413
|
+
}
|
|
151414
|
+
function buildMarkerPrimitive(input) {
|
|
151415
|
+
const { symbol, cx, cy, fill, part } = input;
|
|
151416
|
+
if (symbol === "none") {
|
|
151417
|
+
return null;
|
|
151418
|
+
}
|
|
151419
|
+
const r = markerRadius(input.size, input.defaultRadius);
|
|
151420
|
+
const stroke = fill;
|
|
151421
|
+
switch (symbol) {
|
|
151422
|
+
case "square":
|
|
151423
|
+
return { kind: "rect", x: cx - r, y: cy - r, w: r * 2, h: r * 2, fill, part };
|
|
151424
|
+
case "dash":
|
|
151425
|
+
return { kind: "rect", x: cx - r, y: cy - r * 0.32, w: r * 2, h: r * 0.64, fill, part };
|
|
151426
|
+
case "diamond":
|
|
151427
|
+
return {
|
|
151428
|
+
kind: "polygon",
|
|
151429
|
+
points: polygonPoints([
|
|
151430
|
+
[cx, cy - r],
|
|
151431
|
+
[cx + r, cy],
|
|
151432
|
+
[cx, cy + r],
|
|
151433
|
+
[cx - r, cy]
|
|
151434
|
+
]),
|
|
151435
|
+
fill,
|
|
151436
|
+
stroke,
|
|
151437
|
+
strokeWidth: 0,
|
|
151438
|
+
part
|
|
151439
|
+
};
|
|
151440
|
+
case "triangle":
|
|
151441
|
+
return {
|
|
151442
|
+
kind: "polygon",
|
|
151443
|
+
points: polygonPoints([
|
|
151444
|
+
[cx, cy - r],
|
|
151445
|
+
[cx + r * 0.9, cy + r * 0.75],
|
|
151446
|
+
[cx - r * 0.9, cy + r * 0.75]
|
|
151447
|
+
]),
|
|
151448
|
+
fill,
|
|
151449
|
+
stroke,
|
|
151450
|
+
strokeWidth: 0,
|
|
151451
|
+
part
|
|
151452
|
+
};
|
|
151453
|
+
case "star":
|
|
151454
|
+
return {
|
|
151455
|
+
kind: "polygon",
|
|
151456
|
+
points: polygonPoints(starVertices(cx, cy, r)),
|
|
151457
|
+
fill,
|
|
151458
|
+
stroke,
|
|
151459
|
+
strokeWidth: 0,
|
|
151460
|
+
part
|
|
151461
|
+
};
|
|
151462
|
+
case "plus":
|
|
151463
|
+
return {
|
|
151464
|
+
kind: "path",
|
|
151465
|
+
d: `M${(cx - r).toFixed(2)},${cy.toFixed(2)} L${(cx + r).toFixed(2)},${cy.toFixed(2)} M${cx.toFixed(2)},${(cy - r).toFixed(2)} L${cx.toFixed(2)},${(cy + r).toFixed(2)}`,
|
|
151466
|
+
fill: "none",
|
|
151467
|
+
stroke,
|
|
151468
|
+
strokeWidth: Math.max(1, r * 0.4),
|
|
151469
|
+
part
|
|
151470
|
+
};
|
|
151471
|
+
case "x":
|
|
151472
|
+
return {
|
|
151473
|
+
kind: "path",
|
|
151474
|
+
d: `M${(cx - r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx + r).toFixed(2)},${(cy + r).toFixed(2)} M${(cx + r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx - r).toFixed(2)},${(cy + r).toFixed(2)}`,
|
|
151475
|
+
fill: "none",
|
|
151476
|
+
stroke,
|
|
151477
|
+
strokeWidth: Math.max(1, r * 0.4),
|
|
151478
|
+
part
|
|
151479
|
+
};
|
|
151480
|
+
case "dot":
|
|
151481
|
+
return { kind: "circle", cx, cy, r: Math.max(r * 0.6, 1), fill, part };
|
|
151482
|
+
default:
|
|
151483
|
+
return { kind: "circle", cx, cy, r, fill, part };
|
|
151484
|
+
}
|
|
151485
|
+
}
|
|
151257
151486
|
function findDataPoint(series, pointIndex) {
|
|
151258
151487
|
return series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
151259
151488
|
}
|
|
@@ -151268,21 +151497,28 @@ function resolveDataPointExplosion(series, pointIndex) {
|
|
|
151268
151497
|
const point = findDataPoint(series, pointIndex);
|
|
151269
151498
|
return point?.explosion ?? series.explosion ?? 0;
|
|
151270
151499
|
}
|
|
151271
|
-
function resolveDataPointMarker(series, pointIndex) {
|
|
151500
|
+
function resolveDataPointMarker(series, pointIndex, seriesPosition = 0) {
|
|
151272
151501
|
const point = findDataPoint(series, pointIndex)?.marker;
|
|
151502
|
+
const hasMarker = point !== void 0 || series.marker !== void 0;
|
|
151503
|
+
const rawSymbol = point?.symbol ?? series.marker?.symbol;
|
|
151504
|
+
const symbol = hasMarker && (rawSymbol === void 0 || rawSymbol === "auto") ? automaticMarkerSymbol(series.idx ?? seriesPosition) : rawSymbol;
|
|
151273
151505
|
return {
|
|
151274
|
-
symbol
|
|
151506
|
+
symbol,
|
|
151275
151507
|
size: point?.size ?? series.marker?.size,
|
|
151276
151508
|
fill: point?.spPr?.fillColor ?? series.marker?.spPr?.fillColor
|
|
151277
151509
|
};
|
|
151278
151510
|
}
|
|
151279
151511
|
var DEFAULT_PICTURE_FORMAT = "stretch";
|
|
151280
151512
|
function resolveActiveDataPointPicture(series, pointIndex) {
|
|
151281
|
-
const
|
|
151282
|
-
|
|
151513
|
+
const point = findDataPoint(series, pointIndex);
|
|
151514
|
+
const pointPicture = point?.picture?.imageUrl ? point.picture : point?.impliedPicture?.imageUrl ? point.impliedPicture : void 0;
|
|
151515
|
+
if (pointPicture) {
|
|
151283
151516
|
return pointPicture;
|
|
151284
151517
|
}
|
|
151285
|
-
|
|
151518
|
+
if (series.picture?.imageUrl) {
|
|
151519
|
+
return series.picture;
|
|
151520
|
+
}
|
|
151521
|
+
return series.impliedPicture?.imageUrl ? series.impliedPicture : void 0;
|
|
151286
151522
|
}
|
|
151287
151523
|
function resolveBarFaceTargets(picture) {
|
|
151288
151524
|
if (!picture) {
|
|
@@ -151311,7 +151547,8 @@ function resolveDataPointPictureFill(series, pointIndex, seriesIndex, face) {
|
|
|
151311
151547
|
patternId: `chart-dpt-pic-${seriesIndex}-${pointIndex}${face && face !== "front" ? `-${face}` : ""}`,
|
|
151312
151548
|
imageUrl: picture.imageUrl,
|
|
151313
151549
|
format,
|
|
151314
|
-
...format !== "stretch" && picture.pictureStackUnit !== void 0 ? { tileHeightPx: chartFontPx(picture.pictureStackUnit) } : {}
|
|
151550
|
+
...format !== "stretch" && picture.pictureStackUnit !== void 0 ? { tileHeightPx: chartFontPx(picture.pictureStackUnit) } : {},
|
|
151551
|
+
...picture.opacity !== void 0 ? { opacity: picture.opacity } : {}
|
|
151315
151552
|
};
|
|
151316
151553
|
}
|
|
151317
151554
|
function polygonBoundingBox2(points4) {
|
|
@@ -151368,7 +151605,11 @@ function applyDataPointPictureFills(chartData, elementId, primitives) {
|
|
|
151368
151605
|
resolved.tileHeightPx
|
|
151369
151606
|
)
|
|
151370
151607
|
);
|
|
151371
|
-
return {
|
|
151608
|
+
return {
|
|
151609
|
+
...primitive,
|
|
151610
|
+
fill: `url(#${patternId})`,
|
|
151611
|
+
...resolved.opacity !== void 0 ? { opacity: resolved.opacity } : {}
|
|
151612
|
+
};
|
|
151372
151613
|
});
|
|
151373
151614
|
return { primitives: next, defs };
|
|
151374
151615
|
}
|
|
@@ -151523,10 +151764,45 @@ function computeChartLegendLayout(vm) {
|
|
|
151523
151764
|
fill: textStyle?.color ?? DEFAULT_LEGEND_TEXT_COLOR,
|
|
151524
151765
|
fontWeight: textStyle?.bold ? "bold" : "normal",
|
|
151525
151766
|
fontStyle: textStyle?.italic ? "italic" : "normal",
|
|
151526
|
-
fontFamily: textStyle?.fontFamily
|
|
151767
|
+
fontFamily: textStyle?.fontFamily,
|
|
151768
|
+
...entry2.lineSwatch ? { lineSwatch: entry2.lineSwatch } : {}
|
|
151527
151769
|
};
|
|
151528
151770
|
});
|
|
151529
151771
|
}
|
|
151772
|
+
var LEGEND_LINE_SWATCH_WIDTH = 2;
|
|
151773
|
+
var LEGEND_MARKER_RADIUS = 3;
|
|
151774
|
+
var SWATCH_CENTER_Y = -2;
|
|
151775
|
+
var SWATCH_WIDTH = 10;
|
|
151776
|
+
function resolveLegendSwatchKind(kind) {
|
|
151777
|
+
return kind === "line" || kind === "scatter" ? "line" : "rect";
|
|
151778
|
+
}
|
|
151779
|
+
function buildLineLegendSwatch(series, color2, seriesPosition = 0) {
|
|
151780
|
+
const resolved = resolveDataPointMarker(series, -1, seriesPosition), primitives = [];
|
|
151781
|
+
if (!series.lineNoFill) {
|
|
151782
|
+
primitives.push({
|
|
151783
|
+
kind: "line",
|
|
151784
|
+
x1: 0,
|
|
151785
|
+
y1: SWATCH_CENTER_Y,
|
|
151786
|
+
x2: SWATCH_WIDTH,
|
|
151787
|
+
y2: SWATCH_CENTER_Y,
|
|
151788
|
+
stroke: color2,
|
|
151789
|
+
strokeWidth: LEGEND_LINE_SWATCH_WIDTH
|
|
151790
|
+
});
|
|
151791
|
+
}
|
|
151792
|
+
const marker = buildMarkerPrimitive({
|
|
151793
|
+
symbol: resolved.symbol,
|
|
151794
|
+
// Deliberately ignore the series' authored size (see doc comment above).
|
|
151795
|
+
size: void 0,
|
|
151796
|
+
cx: SWATCH_WIDTH / 2,
|
|
151797
|
+
cy: SWATCH_CENTER_Y,
|
|
151798
|
+
fill: resolved.fill ?? color2,
|
|
151799
|
+
defaultRadius: LEGEND_MARKER_RADIUS
|
|
151800
|
+
});
|
|
151801
|
+
if (marker) {
|
|
151802
|
+
primitives.push(marker);
|
|
151803
|
+
}
|
|
151804
|
+
return { primitives };
|
|
151805
|
+
}
|
|
151530
151806
|
var DEFAULT_COLOR2 = "#64748b";
|
|
151531
151807
|
function dashArray(style, width) {
|
|
151532
151808
|
if (!style || style === "solid") {
|
|
@@ -151618,7 +151894,7 @@ function paletteColor2(index, colorPalette) {
|
|
|
151618
151894
|
function seriesColor2(series, index, colorPalette) {
|
|
151619
151895
|
return series.color ?? series.marker?.spPr?.fillColor ?? paletteColor2(index, colorPalette);
|
|
151620
151896
|
}
|
|
151621
|
-
function computeValueRange2(series) {
|
|
151897
|
+
function computeValueRange2(series, plotHeightPx) {
|
|
151622
151898
|
let dataMin = Number.POSITIVE_INFINITY, dataMax = Number.NEGATIVE_INFINITY;
|
|
151623
151899
|
for (const item of series) {
|
|
151624
151900
|
for (const value of item.values) {
|
|
@@ -151633,10 +151909,14 @@ function computeValueRange2(series) {
|
|
|
151633
151909
|
if (dataMin === Number.POSITIVE_INFINITY) {
|
|
151634
151910
|
return { min: 0, max: 1, span: 1 };
|
|
151635
151911
|
}
|
|
151636
|
-
const { min, max, majorUnit } = niceValueAxisBounds(
|
|
151912
|
+
const { min, max, majorUnit } = niceValueAxisBounds(
|
|
151913
|
+
dataMin,
|
|
151914
|
+
dataMax,
|
|
151915
|
+
plotHeightPx !== void 0 ? axisTargetIntervals(plotHeightPx) : void 0
|
|
151916
|
+
);
|
|
151637
151917
|
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
151638
151918
|
}
|
|
151639
|
-
function computeStackedValueRange(series, catCount) {
|
|
151919
|
+
function computeStackedValueRange(series, catCount, plotHeightPx) {
|
|
151640
151920
|
let maxSum = 0, minSum = 0;
|
|
151641
151921
|
for (let ci = 0; ci < catCount; ci++) {
|
|
151642
151922
|
let pos2 = 0, neg = 0;
|
|
@@ -151651,7 +151931,11 @@ function computeStackedValueRange(series, catCount) {
|
|
|
151651
151931
|
maxSum = Math.max(maxSum, pos2);
|
|
151652
151932
|
minSum = Math.min(minSum, neg);
|
|
151653
151933
|
}
|
|
151654
|
-
const { min, max, majorUnit } = niceValueAxisBounds(
|
|
151934
|
+
const { min, max, majorUnit } = niceValueAxisBounds(
|
|
151935
|
+
Math.min(minSum, 0),
|
|
151936
|
+
Math.max(maxSum, 0),
|
|
151937
|
+
plotHeightPx !== void 0 ? axisTargetIntervals(plotHeightPx) : void 0
|
|
151938
|
+
);
|
|
151655
151939
|
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
151656
151940
|
}
|
|
151657
151941
|
function valueToY2(val2, range, topY, bottomY) {
|
|
@@ -151685,6 +151969,30 @@ function buildMarkTooltip(seriesName, categoryLabel, value, numberFormat) {
|
|
|
151685
151969
|
const label = [seriesName, categoryLabel].filter((part) => Boolean(part && part.length > 0)).join(", "), formatted = formatAxisValue2(value, numberFormat);
|
|
151686
151970
|
return label.length > 0 ? `${label}: ${formatted}` : formatted;
|
|
151687
151971
|
}
|
|
151972
|
+
function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotTop, swatchKind = "rect") {
|
|
151973
|
+
const legend = series.map((s, i2) => {
|
|
151974
|
+
const color2 = seriesColor2(s, i2, colorPalette), kind = Array.isArray(swatchKind) ? swatchKind[i2] ?? "rect" : swatchKind;
|
|
151975
|
+
return {
|
|
151976
|
+
color: color2,
|
|
151977
|
+
label: s.name,
|
|
151978
|
+
...kind === "line" ? { lineSwatch: buildLineLegendSwatch(s, color2, i2) } : {}
|
|
151979
|
+
};
|
|
151980
|
+
});
|
|
151981
|
+
let legendX = svgWidth / 2, legendY = svgHeight - 8, legendAnchor = "middle";
|
|
151982
|
+
const side = resolveLegendPlacement(legendPos).side;
|
|
151983
|
+
if (side === "r") {
|
|
151984
|
+
legendX = svgWidth - 75;
|
|
151985
|
+
legendY = plotTop;
|
|
151986
|
+
legendAnchor = "start";
|
|
151987
|
+
} else if (side === "l") {
|
|
151988
|
+
legendX = 4;
|
|
151989
|
+
legendY = plotTop;
|
|
151990
|
+
legendAnchor = "start";
|
|
151991
|
+
} else if (side === "t") {
|
|
151992
|
+
legendY = 28;
|
|
151993
|
+
}
|
|
151994
|
+
return { legend, legendX, legendY, legendAnchor };
|
|
151995
|
+
}
|
|
151688
151996
|
function computeBarRects(series, catCount, layout, range, colorPalette) {
|
|
151689
151997
|
const rects = [], seriesCount = Math.max(series.length, 1), barGroupWidth = layout.plotWidth / Math.max(catCount, 1), singleBarWidth = barGroupWidth * 0.7 / seriesCount, groupOffset = (barGroupWidth - singleBarWidth * seriesCount) / 2;
|
|
151690
151998
|
for (let ci = 0; ci < catCount; ci++) {
|
|
@@ -152357,97 +152665,6 @@ function smoothLinePath(points4) {
|
|
|
152357
152665
|
}
|
|
152358
152666
|
return d;
|
|
152359
152667
|
}
|
|
152360
|
-
function markerRadius(size, defaultRadius2) {
|
|
152361
|
-
if (size === void 0 || !Number.isFinite(size) || size <= 0) {
|
|
152362
|
-
return defaultRadius2;
|
|
152363
|
-
}
|
|
152364
|
-
return size / 2;
|
|
152365
|
-
}
|
|
152366
|
-
function polygonPoints(vertices) {
|
|
152367
|
-
return vertices.map(([x, y]) => `${x.toFixed(2)},${y.toFixed(2)}`).join(" ");
|
|
152368
|
-
}
|
|
152369
|
-
function starVertices(cx, cy, r) {
|
|
152370
|
-
const inner = r * 0.5;
|
|
152371
|
-
const out = [];
|
|
152372
|
-
for (let i2 = 0; i2 < 10; i2++) {
|
|
152373
|
-
const radius = i2 % 2 === 0 ? r : inner;
|
|
152374
|
-
const angle = -Math.PI / 2 + Math.PI * i2 / 5;
|
|
152375
|
-
out.push([cx + radius * Math.cos(angle), cy + radius * Math.sin(angle)]);
|
|
152376
|
-
}
|
|
152377
|
-
return out;
|
|
152378
|
-
}
|
|
152379
|
-
function buildMarkerPrimitive(input) {
|
|
152380
|
-
const { symbol, cx, cy, fill, part } = input;
|
|
152381
|
-
if (symbol === "none") {
|
|
152382
|
-
return null;
|
|
152383
|
-
}
|
|
152384
|
-
const r = markerRadius(input.size, input.defaultRadius);
|
|
152385
|
-
const stroke = fill;
|
|
152386
|
-
switch (symbol) {
|
|
152387
|
-
case "square":
|
|
152388
|
-
return { kind: "rect", x: cx - r, y: cy - r, w: r * 2, h: r * 2, fill, part };
|
|
152389
|
-
case "dash":
|
|
152390
|
-
return { kind: "rect", x: cx - r, y: cy - r * 0.32, w: r * 2, h: r * 0.64, fill, part };
|
|
152391
|
-
case "diamond":
|
|
152392
|
-
return {
|
|
152393
|
-
kind: "polygon",
|
|
152394
|
-
points: polygonPoints([
|
|
152395
|
-
[cx, cy - r],
|
|
152396
|
-
[cx + r, cy],
|
|
152397
|
-
[cx, cy + r],
|
|
152398
|
-
[cx - r, cy]
|
|
152399
|
-
]),
|
|
152400
|
-
fill,
|
|
152401
|
-
stroke,
|
|
152402
|
-
strokeWidth: 0,
|
|
152403
|
-
part
|
|
152404
|
-
};
|
|
152405
|
-
case "triangle":
|
|
152406
|
-
return {
|
|
152407
|
-
kind: "polygon",
|
|
152408
|
-
points: polygonPoints([
|
|
152409
|
-
[cx, cy - r],
|
|
152410
|
-
[cx + r * 0.9, cy + r * 0.75],
|
|
152411
|
-
[cx - r * 0.9, cy + r * 0.75]
|
|
152412
|
-
]),
|
|
152413
|
-
fill,
|
|
152414
|
-
stroke,
|
|
152415
|
-
strokeWidth: 0,
|
|
152416
|
-
part
|
|
152417
|
-
};
|
|
152418
|
-
case "star":
|
|
152419
|
-
return {
|
|
152420
|
-
kind: "polygon",
|
|
152421
|
-
points: polygonPoints(starVertices(cx, cy, r)),
|
|
152422
|
-
fill,
|
|
152423
|
-
stroke,
|
|
152424
|
-
strokeWidth: 0,
|
|
152425
|
-
part
|
|
152426
|
-
};
|
|
152427
|
-
case "plus":
|
|
152428
|
-
return {
|
|
152429
|
-
kind: "path",
|
|
152430
|
-
d: `M${(cx - r).toFixed(2)},${cy.toFixed(2)} L${(cx + r).toFixed(2)},${cy.toFixed(2)} M${cx.toFixed(2)},${(cy - r).toFixed(2)} L${cx.toFixed(2)},${(cy + r).toFixed(2)}`,
|
|
152431
|
-
fill: "none",
|
|
152432
|
-
stroke,
|
|
152433
|
-
strokeWidth: Math.max(1, r * 0.4),
|
|
152434
|
-
part
|
|
152435
|
-
};
|
|
152436
|
-
case "x":
|
|
152437
|
-
return {
|
|
152438
|
-
kind: "path",
|
|
152439
|
-
d: `M${(cx - r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx + r).toFixed(2)},${(cy + r).toFixed(2)} M${(cx + r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx - r).toFixed(2)},${(cy + r).toFixed(2)}`,
|
|
152440
|
-
fill: "none",
|
|
152441
|
-
stroke,
|
|
152442
|
-
strokeWidth: Math.max(1, r * 0.4),
|
|
152443
|
-
part
|
|
152444
|
-
};
|
|
152445
|
-
case "dot":
|
|
152446
|
-
return { kind: "circle", cx, cy, r: Math.max(r * 0.6, 1), fill, part };
|
|
152447
|
-
default:
|
|
152448
|
-
return { kind: "circle", cx, cy, r, fill, part };
|
|
152449
|
-
}
|
|
152450
|
-
}
|
|
152451
152668
|
function elementFrame(layout) {
|
|
152452
152669
|
return { width: layout.svgWidth, height: layout.svgHeight };
|
|
152453
152670
|
}
|
|
@@ -152455,8 +152672,8 @@ function xyMarkTooltip(seriesName, xVal, yVal, numberFormat) {
|
|
|
152455
152672
|
const y = formatAxisValue2(yVal, numberFormat), coords = xVal !== void 0 ? `(${formatAxisValue2(xVal)}, ${y})` : y;
|
|
152456
152673
|
return seriesName.length > 0 ? `${seriesName}: ${coords}` : coords;
|
|
152457
152674
|
}
|
|
152458
|
-
function pushMarker(out, series, pointIndex, cx, cy, fill, defaultRadius2, part, opacity2, title) {
|
|
152459
|
-
const marker = resolveDataPointMarker(series, pointIndex), m = buildMarkerPrimitive({
|
|
152675
|
+
function pushMarker(out, series, pointIndex, cx, cy, fill, defaultRadius2, part, opacity2, title, seriesPosition = part.seriesIndex ?? 0) {
|
|
152676
|
+
const marker = resolveDataPointMarker(series, pointIndex, seriesPosition), m = buildMarkerPrimitive({
|
|
152460
152677
|
symbol: marker.symbol,
|
|
152461
152678
|
size: marker.size,
|
|
152462
152679
|
cx,
|
|
@@ -152959,7 +153176,7 @@ function invertNegativeFill(series, pointIndex, value, baseFill) {
|
|
|
152959
153176
|
function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, secondaryIdx, grouping, sourceIndices2) {
|
|
152960
153177
|
const primitives = [], dataLabels = [], series = chartData.series, palette = chartData.colorPalette, showLabels = chartData.style?.hasDataLabels, varyColorsSingle = chartData.varyColors === true && series.length === 1;
|
|
152961
153178
|
if (grouping === "clustered") {
|
|
152962
|
-
const seriesCount = Math.max(series.length, 1), barGroupWidth = layout.plotWidth / Math.max(catCount, 1), singleBarWidth = chartData.barGapWidth !== void 0 ? barGroupWidth / (
|
|
153179
|
+
const seriesCount = Math.max(series.length, 1), barGroupWidth = layout.plotWidth / Math.max(catCount, 1), overlap = chartData.barOverlap ?? 0, overlapSpan = 1 + (seriesCount - 1) * (1 - overlap / 100), singleBarWidth = chartData.barGapWidth !== void 0 ? barGroupWidth / ((1 + Math.max(chartData.barGapWidth, 0) / 100) * overlapSpan) : barGroupWidth * 0.7 / seriesCount, step = singleBarWidth * (1 - overlap / 100), clusterWidth = singleBarWidth + step * (seriesCount - 1), groupOffset = (barGroupWidth - clusterWidth) / 2;
|
|
152963
153180
|
for (let displayIndex = 0; displayIndex < catCount; displayIndex++) {
|
|
152964
153181
|
const sourceIndex = sourceIndices2[displayIndex] ?? displayIndex;
|
|
152965
153182
|
for (let si = 0; si < series.length; si++) {
|
|
@@ -153676,10 +153893,10 @@ function buildMultiLevelCategoryLabels(categoryLabels, categoryLevels, sourceInd
|
|
|
153676
153893
|
});
|
|
153677
153894
|
}
|
|
153678
153895
|
function primaryCategoryAxis(axes) {
|
|
153679
|
-
const
|
|
153896
|
+
const categoryAxes2 = axes?.filter(
|
|
153680
153897
|
(axis) => axis.axisType === "catAx" || axis.axisType === "dateAx"
|
|
153681
153898
|
);
|
|
153682
|
-
return
|
|
153899
|
+
return categoryAxes2?.find((axis) => axis.axPos !== "t") ?? categoryAxes2?.[0];
|
|
153683
153900
|
}
|
|
153684
153901
|
function tickLine(x, y, placement, topAxis, length, axis) {
|
|
153685
153902
|
if (!placement || placement === "none") {
|
|
@@ -154221,7 +154438,7 @@ function barFill(chartData, series, seriesIndex, pointIndex) {
|
|
|
154221
154438
|
return resolveDataPointFill(series, pointIndex, paletteColor2(seriesIndex, palette)) ?? seriesColor2(series, seriesIndex, palette);
|
|
154222
154439
|
}
|
|
154223
154440
|
function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
154224
|
-
const layout = computePlotLayout(element.width, element.height, chartData, true), catCount = Math.max(categoryLabels.length, 1), series = chartData.series, grouping = chartData.grouping ?? "clustered", isStacked = grouping === "stacked" || grouping === "percentStacked", isPercent = grouping === "percentStacked", range = isPercent ? { min: 0, max: 100, span: 100 } : isStacked ? computeStackedValueRange(series, catCount) : computeValueRangeForChart(series, chartData.axes), { gridlines, axisLabels } = buildTransposedValueAxis(range, layout), zeroX = valueToX(0, range, layout.plotLeft, layout.plotRight), zeroLine = range.min < 0 && range.max > 0 ? {
|
|
154441
|
+
const layout = computePlotLayout(element.width, element.height, chartData, true), catCount = Math.max(categoryLabels.length, 1), series = chartData.series, grouping = chartData.grouping ?? "clustered", isStacked = grouping === "stacked" || grouping === "percentStacked", isPercent = grouping === "percentStacked", range = isPercent ? { min: 0, max: 100, span: 100 } : isStacked ? computeStackedValueRange(series, catCount, layout.plotWidth) : computeValueRangeForChart(series, chartData.axes, layout.plotWidth), { gridlines, axisLabels } = buildTransposedValueAxis(range, layout), zeroX = valueToX(0, range, layout.plotLeft, layout.plotRight), zeroLine = range.min < 0 && range.max > 0 ? {
|
|
154225
154442
|
kind: "line",
|
|
154226
154443
|
x1: zeroX,
|
|
154227
154444
|
y1: layout.plotTop,
|
|
@@ -154231,7 +154448,7 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
|
154231
154448
|
strokeWidth: 1
|
|
154232
154449
|
} : void 0, primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, band = layout.plotHeight / catCount;
|
|
154233
154450
|
if (!isStacked) {
|
|
154234
|
-
const seriesCount = Math.max(series.length, 1), singleBarHeight = chartData.barGapWidth !== void 0 ? band / (
|
|
154451
|
+
const seriesCount = Math.max(series.length, 1), overlap = chartData.barOverlap ?? 0, overlapSpan = 1 + (seriesCount - 1) * (1 - overlap / 100), singleBarHeight = chartData.barGapWidth !== void 0 ? band / ((1 + Math.max(chartData.barGapWidth, 0) / 100) * overlapSpan) : band * 0.7 / seriesCount, step = singleBarHeight * (1 - overlap / 100), clusterHeight = singleBarHeight + step * (seriesCount - 1), groupOffset = (band - clusterHeight) / 2;
|
|
154235
154452
|
for (let ci = 0; ci < catCount; ci++) {
|
|
154236
154453
|
for (let si = 0; si < series.length; si++) {
|
|
154237
154454
|
const val2 = series[si].values[ci] ?? 0, y = layout.plotTop + band * ci + groupOffset + step * si, valX = valueToX(val2, range, layout.plotLeft, layout.plotRight), x = Math.min(zeroX, valX), w = Math.max(Math.abs(valX - zeroX), 1);
|
|
@@ -154807,11 +155024,11 @@ function computeTrendlinePrimitives(chartData, catCount, layout, range, mode = "
|
|
|
154807
155024
|
});
|
|
154808
155025
|
return out;
|
|
154809
155026
|
}
|
|
154810
|
-
function stackedRange(chartData, catCount, isPercent) {
|
|
155027
|
+
function stackedRange(chartData, catCount, isPercent, plotHeightPx) {
|
|
154811
155028
|
if (isPercent) {
|
|
154812
155029
|
return { min: 0, max: 100, span: 100 };
|
|
154813
155030
|
}
|
|
154814
|
-
return computeStackedValueRange(chartData.series, catCount);
|
|
155031
|
+
return computeStackedValueRange(chartData.series, catCount, plotHeightPx);
|
|
154815
155032
|
}
|
|
154816
155033
|
function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
|
|
154817
155034
|
if (kind === "bar" && chartData.barDirection === "bar") {
|
|
@@ -154832,15 +155049,17 @@ function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
|
|
|
154832
155049
|
(axis) => axis.axisType === "valAx" && axis.axPos !== "r"
|
|
154833
155050
|
);
|
|
154834
155051
|
const primaryRange = isStacked ? {
|
|
154835
|
-
...stackedRange(chartData, catCount, isPercent),
|
|
155052
|
+
...stackedRange(chartData, catCount, isPercent, layout.plotHeight),
|
|
154836
155053
|
...primaryAxis?.orientation === "maxMin" ? { reverseOrder: true } : {}
|
|
154837
155054
|
} : computeValueRangeForChart(
|
|
154838
155055
|
primaryPlotSeries.length > 0 ? primaryPlotSeries : chartData.series,
|
|
154839
|
-
chartData.axes
|
|
155056
|
+
chartData.axes,
|
|
155057
|
+
layout.plotHeight
|
|
154840
155058
|
);
|
|
154841
155059
|
const secondaryRange = useSecondary && secondaryPlotSeries.length > 0 ? computeValueRangeForAxis(
|
|
154842
155060
|
secondaryPlotSeries,
|
|
154843
|
-
chartData.axes?.find((axis) => axis.axisType === "valAx" && axis.axPos === "r")
|
|
155061
|
+
chartData.axes?.find((axis) => axis.axisType === "valAx" && axis.axPos === "r"),
|
|
155062
|
+
layout.plotHeight
|
|
154844
155063
|
) : void 0;
|
|
154845
155064
|
const axisRes = buildCartesianAxes(chartData, layout, primaryRange, secondaryRange, catCount);
|
|
154846
155065
|
const zeroLine = primaryRange.logScale ? void 0 : buildZeroLine(primaryRange, layout);
|
|
@@ -154860,7 +155079,8 @@ function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
|
|
|
154860
155079
|
layout.svgWidth,
|
|
154861
155080
|
legendPos,
|
|
154862
155081
|
layout.svgHeight,
|
|
154863
|
-
layout.plotTop
|
|
155082
|
+
layout.plotTop,
|
|
155083
|
+
resolveLegendSwatchKind(kind)
|
|
154864
155084
|
);
|
|
154865
155085
|
let plot;
|
|
154866
155086
|
if (kind === "bar") {
|
|
@@ -155105,10 +155325,11 @@ function buildComboViewModel(element, chartData, categoryLabels) {
|
|
|
155105
155325
|
const primaryAxisId = getPrimaryValueAxisId(chartData.axes);
|
|
155106
155326
|
const primaryAxis = chartData.axes?.find((axis) => axis.axisId === primaryAxisId);
|
|
155107
155327
|
const secondaryAxisFormatting = getSecondaryValueAxis(chartData.axes);
|
|
155108
|
-
const primaryRange = computeValueRangeForAxis(primarySeries, primaryAxis);
|
|
155328
|
+
const primaryRange = computeValueRangeForAxis(primarySeries, primaryAxis, layout.plotHeight);
|
|
155109
155329
|
const secondaryRange = secondary.length > 0 ? computeValueRangeForAxis(
|
|
155110
155330
|
secondary.map((entry2) => entry2.series),
|
|
155111
|
-
secondaryAxisFormatting
|
|
155331
|
+
secondaryAxisFormatting,
|
|
155332
|
+
layout.plotHeight
|
|
155112
155333
|
) : void 0;
|
|
155113
155334
|
const primaryCategoryAxis2 = chartData.axes?.find(
|
|
155114
155335
|
(axis) => (axis.axisType === "catAx" || axis.axisType === "dateAx") && axis.axisId === primaryAxis?.crossAxisId
|
|
@@ -155149,13 +155370,17 @@ function buildComboViewModel(element, chartData, categoryLabels) {
|
|
|
155149
155370
|
);
|
|
155150
155371
|
const sourceIndices2 = horizontalAxis.sourceIndices;
|
|
155151
155372
|
const legendPos = chartData.style?.legendPosition ?? "b";
|
|
155373
|
+
const comboSwatchKinds = chartData.series.map(
|
|
155374
|
+
(_s, i2) => i2 === 0 ? "rect" : "line"
|
|
155375
|
+
);
|
|
155152
155376
|
const { legend, legendX, legendY, legendAnchor } = buildLegend(
|
|
155153
155377
|
chartData.series,
|
|
155154
155378
|
chartData.colorPalette,
|
|
155155
155379
|
layout.svgWidth,
|
|
155156
155380
|
legendPos,
|
|
155157
155381
|
layout.svgHeight,
|
|
155158
|
-
layout.plotTop
|
|
155382
|
+
layout.plotTop,
|
|
155383
|
+
comboSwatchKinds
|
|
155159
155384
|
);
|
|
155160
155385
|
const primitives = [];
|
|
155161
155386
|
const dataLabels = [];
|
|
@@ -155275,7 +155500,11 @@ function buildStockViewModel(element, chartData, categoryLabels) {
|
|
|
155275
155500
|
computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length)
|
|
155276
155501
|
);
|
|
155277
155502
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
155278
|
-
const range = computeValueRangeForChart(
|
|
155503
|
+
const range = computeValueRangeForChart(
|
|
155504
|
+
chartData.series,
|
|
155505
|
+
chartData.axes,
|
|
155506
|
+
layout.plotHeight
|
|
155507
|
+
);
|
|
155279
155508
|
const valueAxis = chartData.axes?.find((axis) => axis.axisType === "valAx" && axis.axPos !== "r");
|
|
155280
155509
|
const categoryAxis = chartData.axes?.find(
|
|
155281
155510
|
(axis) => (axis.axisType === "catAx" || axis.axisType === "dateAx") && axis.axisId === valueAxis?.crossAxisId
|
|
@@ -156096,18 +156325,19 @@ function buildSunburstViewModel(element, chartData, categoryLabels) {
|
|
|
156096
156325
|
legendAnchor: "middle"
|
|
156097
156326
|
};
|
|
156098
156327
|
}
|
|
156099
|
-
function applyLegendEntryOverrides(legend, entries) {
|
|
156100
|
-
if (!entries || entries.length === 0) {
|
|
156328
|
+
function applyLegendEntryOverrides(legend, entries, defaultTextStyle) {
|
|
156329
|
+
if ((!entries || entries.length === 0) && !defaultTextStyle) {
|
|
156101
156330
|
return legend;
|
|
156102
156331
|
}
|
|
156103
|
-
const byIndex = new Map(entries.map((entry2) => [entry2.index, entry2]));
|
|
156332
|
+
const byIndex = new Map((entries ?? []).map((entry2) => [entry2.index, entry2]));
|
|
156104
156333
|
const result = [];
|
|
156105
156334
|
legend.forEach((item, index) => {
|
|
156106
156335
|
const override = byIndex.get(index);
|
|
156107
156336
|
if (override?.deleted) {
|
|
156108
156337
|
return;
|
|
156109
156338
|
}
|
|
156110
|
-
|
|
156339
|
+
const textStyle = override?.textStyle ?? defaultTextStyle;
|
|
156340
|
+
result.push(textStyle ? { ...item, textStyle } : item);
|
|
156111
156341
|
});
|
|
156112
156342
|
return result;
|
|
156113
156343
|
}
|
|
@@ -156427,7 +156657,7 @@ function buildSurfaceWallPanels(cols, rows, cellSize, zScale, offsetX, offsetY,
|
|
|
156427
156657
|
}
|
|
156428
156658
|
function buildIsometricSurfaceViewModel(element, chartData, categoryLabels) {
|
|
156429
156659
|
const layout = computePlotLayout(element.width, element.height, chartData, false);
|
|
156430
|
-
const range = computeValueRange2(chartData.series);
|
|
156660
|
+
const range = computeValueRange2(chartData.series, layout.plotHeight);
|
|
156431
156661
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
156432
156662
|
const seriesCount = chartData.series.length;
|
|
156433
156663
|
const cols = Math.max(catCount - 1, 1);
|
|
@@ -156546,7 +156776,7 @@ function buildIsometricSurfaceViewModel(element, chartData, categoryLabels) {
|
|
|
156546
156776
|
}
|
|
156547
156777
|
function buildFlatSurfaceViewModel(element, chartData, categoryLabels) {
|
|
156548
156778
|
const layout = computePlotLayout(element.width, element.height, chartData, false);
|
|
156549
|
-
const range = computeValueRange2(chartData.series);
|
|
156779
|
+
const range = computeValueRange2(chartData.series, layout.plotHeight);
|
|
156550
156780
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
156551
156781
|
const seriesCount = chartData.series.length;
|
|
156552
156782
|
const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
|
|
@@ -157408,6 +157638,10 @@ function categoryAxisBand(chartData) {
|
|
|
157408
157638
|
function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, options) {
|
|
157409
157639
|
const svgWidth = Math.max(1, elementWidth), svgHeight = Math.max(1, elementHeight);
|
|
157410
157640
|
let plotLeft = hasAxes ? 48 : 8, plotTop = 8, plotRight = svgWidth - 8, plotBottom = svgHeight - (hasAxes ? categoryAxisBand(chartData) : 8);
|
|
157641
|
+
if (hasAxes && options?.categoryAxisAtTop) {
|
|
157642
|
+
plotBottom = svgHeight - 8;
|
|
157643
|
+
plotTop += categoryAxisBand(chartData);
|
|
157644
|
+
}
|
|
157411
157645
|
const style = chartData.style, legendPos = style?.legendPosition ?? "b";
|
|
157412
157646
|
if (style?.hasTitle) {
|
|
157413
157647
|
plotTop += 20;
|
|
@@ -157457,101 +157691,6 @@ function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, opti
|
|
|
157457
157691
|
plotHeight
|
|
157458
157692
|
};
|
|
157459
157693
|
}
|
|
157460
|
-
var GRIDLINE_COLOR = "#e2e8f0";
|
|
157461
|
-
var AXIS_LABEL_COLOR = "#64748b";
|
|
157462
|
-
var ZERO_LINE_COLOR = "#94a3b8";
|
|
157463
|
-
var TICK_COUNT = 5;
|
|
157464
|
-
function axisTickValues(range) {
|
|
157465
|
-
const unit = range.majorUnit;
|
|
157466
|
-
if (unit !== void 0 && Number.isFinite(unit) && unit > 0 && !range.logScale) {
|
|
157467
|
-
const steps = Math.round((range.max - range.min) / unit);
|
|
157468
|
-
if (steps >= 1 && steps <= 100) {
|
|
157469
|
-
return Array.from({ length: steps + 1 }, (_unused, index) => range.min + unit * index);
|
|
157470
|
-
}
|
|
157471
|
-
}
|
|
157472
|
-
return Array.from(
|
|
157473
|
-
{ length: TICK_COUNT + 1 },
|
|
157474
|
-
(_unused, index) => range.min + range.span / TICK_COUNT * index
|
|
157475
|
-
);
|
|
157476
|
-
}
|
|
157477
|
-
function buildGridlinesAndLabels(range, layout, showMajorGridlines = true) {
|
|
157478
|
-
const gridlines = [], axisLabels = [];
|
|
157479
|
-
for (const val2 of axisTickValues(range)) {
|
|
157480
|
-
const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
157481
|
-
if (showMajorGridlines) {
|
|
157482
|
-
gridlines.push({
|
|
157483
|
-
kind: "line",
|
|
157484
|
-
x1: layout.plotLeft,
|
|
157485
|
-
y1: y,
|
|
157486
|
-
x2: layout.plotRight,
|
|
157487
|
-
y2: y,
|
|
157488
|
-
stroke: GRIDLINE_COLOR,
|
|
157489
|
-
strokeWidth: 1
|
|
157490
|
-
});
|
|
157491
|
-
}
|
|
157492
|
-
axisLabels.push({
|
|
157493
|
-
kind: "text",
|
|
157494
|
-
x: layout.plotLeft - 4,
|
|
157495
|
-
y,
|
|
157496
|
-
text: formatAxisValue2(val2),
|
|
157497
|
-
fontSize: DEFAULT_CHART_TEXT_PX,
|
|
157498
|
-
fill: AXIS_LABEL_COLOR,
|
|
157499
|
-
textAnchor: "end",
|
|
157500
|
-
dominantBaseline: "central"
|
|
157501
|
-
});
|
|
157502
|
-
}
|
|
157503
|
-
return { gridlines, axisLabels };
|
|
157504
|
-
}
|
|
157505
|
-
function buildZeroLine(range, layout) {
|
|
157506
|
-
if (range.min >= 0 || range.max <= 0) {
|
|
157507
|
-
return void 0;
|
|
157508
|
-
}
|
|
157509
|
-
const y = valueToY2(0, range, layout.plotTop, layout.plotBottom);
|
|
157510
|
-
return {
|
|
157511
|
-
kind: "line",
|
|
157512
|
-
x1: layout.plotLeft,
|
|
157513
|
-
y1: y,
|
|
157514
|
-
x2: layout.plotRight,
|
|
157515
|
-
y2: y,
|
|
157516
|
-
stroke: ZERO_LINE_COLOR,
|
|
157517
|
-
strokeWidth: 1
|
|
157518
|
-
};
|
|
157519
|
-
}
|
|
157520
|
-
function buildCategoryLabels(categoryLabels, layout, catSpacing) {
|
|
157521
|
-
const catCount = Math.max(categoryLabels.length, 1);
|
|
157522
|
-
return categoryLabels.map((label, i2) => {
|
|
157523
|
-
const x = catSpacing === "bar" ? layout.plotLeft + layout.plotWidth / catCount * (i2 + 0.5) : catCount > 1 ? layout.plotLeft + layout.plotWidth / (catCount - 1) * i2 : layout.plotLeft + layout.plotWidth / 2;
|
|
157524
|
-
return {
|
|
157525
|
-
kind: "text",
|
|
157526
|
-
x,
|
|
157527
|
-
y: layout.plotBottom + 12,
|
|
157528
|
-
text: label,
|
|
157529
|
-
fontSize: DEFAULT_CHART_TEXT_PX,
|
|
157530
|
-
fill: AXIS_LABEL_COLOR,
|
|
157531
|
-
textAnchor: "middle"
|
|
157532
|
-
};
|
|
157533
|
-
});
|
|
157534
|
-
}
|
|
157535
|
-
function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotTop) {
|
|
157536
|
-
const legend = series.map((s, i2) => ({
|
|
157537
|
-
color: seriesColor2(s, i2, colorPalette),
|
|
157538
|
-
label: s.name
|
|
157539
|
-
}));
|
|
157540
|
-
let legendX = svgWidth / 2, legendY = svgHeight - 8, legendAnchor = "middle";
|
|
157541
|
-
const side = resolveLegendPlacement(legendPos).side;
|
|
157542
|
-
if (side === "r") {
|
|
157543
|
-
legendX = svgWidth - 75;
|
|
157544
|
-
legendY = plotTop;
|
|
157545
|
-
legendAnchor = "start";
|
|
157546
|
-
} else if (side === "l") {
|
|
157547
|
-
legendX = 4;
|
|
157548
|
-
legendY = plotTop;
|
|
157549
|
-
legendAnchor = "start";
|
|
157550
|
-
} else if (side === "t") {
|
|
157551
|
-
legendY = 28;
|
|
157552
|
-
}
|
|
157553
|
-
return { legend, legendX, legendY, legendAnchor };
|
|
157554
|
-
}
|
|
157555
157694
|
var RADAR_RINGS = 4;
|
|
157556
157695
|
var RADAR_RING_COLOR = "#cbd5e1";
|
|
157557
157696
|
var RADAR_SPOKE_COLOR = "#94a3b8";
|
|
@@ -158395,13 +158534,16 @@ function buildWaterfallSteps(values, options) {
|
|
|
158395
158534
|
}
|
|
158396
158535
|
return steps;
|
|
158397
158536
|
}
|
|
158398
|
-
function computeWaterfallRange(steps) {
|
|
158399
|
-
return computeValueRange2(
|
|
158400
|
-
|
|
158401
|
-
|
|
158402
|
-
|
|
158403
|
-
|
|
158404
|
-
|
|
158537
|
+
function computeWaterfallRange(steps, plotHeightPx) {
|
|
158538
|
+
return computeValueRange2(
|
|
158539
|
+
[
|
|
158540
|
+
{
|
|
158541
|
+
name: "Waterfall range",
|
|
158542
|
+
values: steps.flatMap((step) => [step.startValue, step.endValue])
|
|
158543
|
+
}
|
|
158544
|
+
],
|
|
158545
|
+
plotHeightPx
|
|
158546
|
+
);
|
|
158405
158547
|
}
|
|
158406
158548
|
var WF_COLOR_POSITIVE = "#22c55e";
|
|
158407
158549
|
var WF_COLOR_NEGATIVE = "#ef4444";
|
|
@@ -158412,7 +158554,7 @@ function buildWaterfallViewModel(element, chartData, categoryLabels) {
|
|
|
158412
158554
|
const series = chartData.series[0];
|
|
158413
158555
|
const values = series?.values ?? [];
|
|
158414
158556
|
const steps = buildWaterfallSteps(values, series?.waterfallOptions);
|
|
158415
|
-
const range = computeWaterfallRange(steps);
|
|
158557
|
+
const range = computeWaterfallRange(steps, layout.plotHeight);
|
|
158416
158558
|
const catCount = Math.max(categoryLabels.length, values.length, 1);
|
|
158417
158559
|
const barWidth = layout.plotWidth / catCount * 0.6;
|
|
158418
158560
|
const gap = layout.plotWidth / catCount * 0.2;
|
|
@@ -158568,7 +158710,11 @@ function withDataPointPictureFills(vm, chartData, elementId) {
|
|
|
158568
158710
|
return { ...vm, primitives, defs: [...vm.defs ?? [], ...defs] };
|
|
158569
158711
|
}
|
|
158570
158712
|
function withLegendEntries(vm, chartData) {
|
|
158571
|
-
const legend = applyLegendEntryOverrides(
|
|
158713
|
+
const legend = applyLegendEntryOverrides(
|
|
158714
|
+
vm.legend,
|
|
158715
|
+
chartData.style?.legendEntries,
|
|
158716
|
+
chartData.style?.legendTextStyle
|
|
158717
|
+
);
|
|
158572
158718
|
return legend === vm.legend ? vm : { ...vm, legend };
|
|
158573
158719
|
}
|
|
158574
158720
|
function withChartAreaFill(vm, chartData) {
|
|
@@ -158635,6 +158781,81 @@ function buildFlatViewModel(element, chartData, categoryLabels, kind) {
|
|
|
158635
158781
|
}
|
|
158636
158782
|
return buildCartesianViewModel(element, chartData, categoryLabels, kind);
|
|
158637
158783
|
}
|
|
158784
|
+
var GRIDLINE_COLOR = "#e2e8f0";
|
|
158785
|
+
var AXIS_LABEL_COLOR = "#64748b";
|
|
158786
|
+
var ZERO_LINE_COLOR = "#94a3b8";
|
|
158787
|
+
var TICK_COUNT = 5;
|
|
158788
|
+
function axisTickValues(range) {
|
|
158789
|
+
const unit = range.majorUnit;
|
|
158790
|
+
if (unit !== void 0 && Number.isFinite(unit) && unit > 0 && !range.logScale) {
|
|
158791
|
+
const steps = Math.round((range.max - range.min) / unit);
|
|
158792
|
+
if (steps >= 1 && steps <= 100) {
|
|
158793
|
+
return Array.from({ length: steps + 1 }, (_unused, index) => range.min + unit * index);
|
|
158794
|
+
}
|
|
158795
|
+
}
|
|
158796
|
+
return Array.from(
|
|
158797
|
+
{ length: TICK_COUNT + 1 },
|
|
158798
|
+
(_unused, index) => range.min + range.span / TICK_COUNT * index
|
|
158799
|
+
);
|
|
158800
|
+
}
|
|
158801
|
+
function buildGridlinesAndLabels(range, layout, showMajorGridlines = true) {
|
|
158802
|
+
const gridlines = [], axisLabels = [];
|
|
158803
|
+
for (const val2 of axisTickValues(range)) {
|
|
158804
|
+
const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
158805
|
+
if (showMajorGridlines) {
|
|
158806
|
+
gridlines.push({
|
|
158807
|
+
kind: "line",
|
|
158808
|
+
x1: layout.plotLeft,
|
|
158809
|
+
y1: y,
|
|
158810
|
+
x2: layout.plotRight,
|
|
158811
|
+
y2: y,
|
|
158812
|
+
stroke: GRIDLINE_COLOR,
|
|
158813
|
+
strokeWidth: 1
|
|
158814
|
+
});
|
|
158815
|
+
}
|
|
158816
|
+
axisLabels.push({
|
|
158817
|
+
kind: "text",
|
|
158818
|
+
x: layout.plotLeft - 4,
|
|
158819
|
+
y,
|
|
158820
|
+
text: formatAxisValue2(val2),
|
|
158821
|
+
fontSize: DEFAULT_CHART_TEXT_PX,
|
|
158822
|
+
fill: AXIS_LABEL_COLOR,
|
|
158823
|
+
textAnchor: "end",
|
|
158824
|
+
dominantBaseline: "central"
|
|
158825
|
+
});
|
|
158826
|
+
}
|
|
158827
|
+
return { gridlines, axisLabels };
|
|
158828
|
+
}
|
|
158829
|
+
function buildZeroLine(range, layout) {
|
|
158830
|
+
if (range.min >= 0 || range.max <= 0) {
|
|
158831
|
+
return void 0;
|
|
158832
|
+
}
|
|
158833
|
+
const y = valueToY2(0, range, layout.plotTop, layout.plotBottom);
|
|
158834
|
+
return {
|
|
158835
|
+
kind: "line",
|
|
158836
|
+
x1: layout.plotLeft,
|
|
158837
|
+
y1: y,
|
|
158838
|
+
x2: layout.plotRight,
|
|
158839
|
+
y2: y,
|
|
158840
|
+
stroke: ZERO_LINE_COLOR,
|
|
158841
|
+
strokeWidth: 1
|
|
158842
|
+
};
|
|
158843
|
+
}
|
|
158844
|
+
function buildCategoryLabels(categoryLabels, layout, catSpacing) {
|
|
158845
|
+
const catCount = Math.max(categoryLabels.length, 1);
|
|
158846
|
+
return categoryLabels.map((label, i2) => {
|
|
158847
|
+
const x = catSpacing === "bar" ? layout.plotLeft + layout.plotWidth / catCount * (i2 + 0.5) : catCount > 1 ? layout.plotLeft + layout.plotWidth / (catCount - 1) * i2 : layout.plotLeft + layout.plotWidth / 2;
|
|
158848
|
+
return {
|
|
158849
|
+
kind: "text",
|
|
158850
|
+
x,
|
|
158851
|
+
y: layout.plotBottom + 12,
|
|
158852
|
+
text: label,
|
|
158853
|
+
fontSize: DEFAULT_CHART_TEXT_PX,
|
|
158854
|
+
fill: AXIS_LABEL_COLOR,
|
|
158855
|
+
textAnchor: "middle"
|
|
158856
|
+
};
|
|
158857
|
+
});
|
|
158858
|
+
}
|
|
158638
158859
|
var GRIDLINE_COLOR2 = "#e2e8f0";
|
|
158639
158860
|
var SECONDARY_GRID_COLOR = "#e2e8f0";
|
|
158640
158861
|
var TICK_COUNT2 = 5;
|
|
@@ -159284,13 +159505,16 @@ function hideChartSeries(data, seriesIndex) {
|
|
|
159284
159505
|
return null;
|
|
159285
159506
|
}
|
|
159286
159507
|
const series = data.series[seriesIndex];
|
|
159287
|
-
|
|
159288
|
-
|
|
159289
|
-
|
|
159290
|
-
|
|
159291
|
-
|
|
159292
|
-
|
|
159293
|
-
idx
|
|
159508
|
+
let idx = series.idx;
|
|
159509
|
+
if (idx === void 0) {
|
|
159510
|
+
const taken = /* @__PURE__ */ new Set([
|
|
159511
|
+
...data.series.map((_, i2) => i2).filter((i2) => i2 !== seriesIndex),
|
|
159512
|
+
...(data.filteredSeries ?? []).map((f6) => f6.idx)
|
|
159513
|
+
]);
|
|
159514
|
+
idx = 0;
|
|
159515
|
+
while (taken.has(idx)) {
|
|
159516
|
+
idx++;
|
|
159517
|
+
}
|
|
159294
159518
|
}
|
|
159295
159519
|
const filteredEntry = {
|
|
159296
159520
|
idx,
|
|
@@ -159298,7 +159522,12 @@ function hideChartSeries(data, seriesIndex) {
|
|
|
159298
159522
|
name: series.name,
|
|
159299
159523
|
categories: data.categories,
|
|
159300
159524
|
values: series.values,
|
|
159301
|
-
...series.uniqueId ? { uniqueId: series.uniqueId } : {}
|
|
159525
|
+
...series.uniqueId ? { uniqueId: series.uniqueId } : {},
|
|
159526
|
+
// Full snapshot so restoreFilteredSeries can bring back everything
|
|
159527
|
+
// (fill/line formatting, marker, data labels, ...), not just name and
|
|
159528
|
+
// values: this used to silently reset a series with a picture fill
|
|
159529
|
+
// or any other non-default formatting to plain defaults on restore.
|
|
159530
|
+
originalSeries: series
|
|
159302
159531
|
};
|
|
159303
159532
|
return {
|
|
159304
159533
|
...data,
|
|
@@ -159314,15 +159543,19 @@ function restoreFilteredSeries(data, filteredIndex) {
|
|
|
159314
159543
|
const name = filtered.name ?? data.filteredSeriesTitle ?? `Series ${data.series.length + 1}`;
|
|
159315
159544
|
const categories = data.categories;
|
|
159316
159545
|
const values = filtered.values ?? (filtered.categories ?? data.filteredCategoryTitle)?.map(() => 0) ?? categories.map(() => 0);
|
|
159317
|
-
const restored = {
|
|
159546
|
+
const restored = filtered.originalSeries ? { ...filtered.originalSeries, idx: filtered.idx } : {
|
|
159318
159547
|
name,
|
|
159319
159548
|
values,
|
|
159549
|
+
idx: filtered.idx,
|
|
159320
159550
|
...filtered.uniqueId ? { uniqueId: filtered.uniqueId } : {}
|
|
159321
159551
|
};
|
|
159552
|
+
const insertAt3 = data.series.findIndex((s, i2) => (s.idx ?? i2) > filtered.idx);
|
|
159553
|
+
const nextSeries = [...data.series];
|
|
159554
|
+
nextSeries.splice(insertAt3 === -1 ? nextSeries.length : insertAt3, 0, restored);
|
|
159322
159555
|
const remainingFiltered = (data.filteredSeries ?? []).filter((_, i2) => i2 !== filteredIndex);
|
|
159323
159556
|
return {
|
|
159324
159557
|
...data,
|
|
159325
|
-
series:
|
|
159558
|
+
series: nextSeries,
|
|
159326
159559
|
...remainingFiltered.length > 0 ? { filteredSeries: remainingFiltered } : { filteredSeries: void 0 }
|
|
159327
159560
|
};
|
|
159328
159561
|
}
|
|
@@ -159341,6 +159574,199 @@ function setDataLabelsRangeCache(series, pointIndex, text22) {
|
|
|
159341
159574
|
dataLabelOptions: { ...series.dataLabelOptions, dataLabelsRange: { ...range, cache } }
|
|
159342
159575
|
};
|
|
159343
159576
|
}
|
|
159577
|
+
var CHART_STYLE_PRESETS = [
|
|
159578
|
+
{ id: "colorful", labelKey: "pptx.chart.styleColorful", styleId: 2 },
|
|
159579
|
+
{ id: "monochrome", labelKey: "pptx.chart.styleMonochrome", styleId: 10 },
|
|
159580
|
+
{ id: "colorfulLight", labelKey: "pptx.chart.styleColorfulLight", styleId: 18 },
|
|
159581
|
+
{ id: "colorfulDark", labelKey: "pptx.chart.styleColorfulDark", styleId: 26 },
|
|
159582
|
+
{ id: "mutedDark", labelKey: "pptx.chart.styleMutedDark", styleId: 34 },
|
|
159583
|
+
{ id: "pastel", labelKey: "pptx.chart.stylePastel", styleId: 42 }
|
|
159584
|
+
];
|
|
159585
|
+
function paletteEquals(a, b) {
|
|
159586
|
+
if (!b || a.length !== b.length) {
|
|
159587
|
+
return false;
|
|
159588
|
+
}
|
|
159589
|
+
return a.every((c, i2) => c.toLowerCase() === b[i2]?.toLowerCase());
|
|
159590
|
+
}
|
|
159591
|
+
function findPreset(id) {
|
|
159592
|
+
return CHART_STYLE_PRESETS.find((p) => p.id === id);
|
|
159593
|
+
}
|
|
159594
|
+
function buildChartStylePresets(chartData) {
|
|
159595
|
+
return CHART_STYLE_PRESETS.map(({ id, labelKey, styleId }) => {
|
|
159596
|
+
const colors = getChartStylePalette(styleId);
|
|
159597
|
+
return {
|
|
159598
|
+
id,
|
|
159599
|
+
labelKey,
|
|
159600
|
+
colors,
|
|
159601
|
+
applied: paletteEquals(colors, chartData.colorPalette)
|
|
159602
|
+
};
|
|
159603
|
+
});
|
|
159604
|
+
}
|
|
159605
|
+
function clearDataPointFill(point) {
|
|
159606
|
+
const { spPr, marker, ...rest } = point;
|
|
159607
|
+
const nextSpPr = spPr && { ...spPr, fillColor: void 0 };
|
|
159608
|
+
const nextMarker = marker?.spPr && {
|
|
159609
|
+
...marker,
|
|
159610
|
+
spPr: { ...marker.spPr, fillColor: void 0 }
|
|
159611
|
+
};
|
|
159612
|
+
return { ...rest, ...spPr && { spPr: nextSpPr }, ...nextMarker && { marker: nextMarker } };
|
|
159613
|
+
}
|
|
159614
|
+
function clearSeriesColor(series) {
|
|
159615
|
+
const { color: _color, marker, dataPoints, ...rest } = series;
|
|
159616
|
+
const nextMarker = marker?.spPr && { ...marker, spPr: { ...marker.spPr, fillColor: void 0 } };
|
|
159617
|
+
return {
|
|
159618
|
+
...rest,
|
|
159619
|
+
...marker && { marker: nextMarker ?? marker },
|
|
159620
|
+
...dataPoints && { dataPoints: dataPoints.map(clearDataPointFill) }
|
|
159621
|
+
};
|
|
159622
|
+
}
|
|
159623
|
+
function applyChartStylePreset(chartData, presetId) {
|
|
159624
|
+
const preset = findPreset(presetId);
|
|
159625
|
+
if (!preset) {
|
|
159626
|
+
return null;
|
|
159627
|
+
}
|
|
159628
|
+
const colors = [...getChartStylePalette(preset.styleId)];
|
|
159629
|
+
return {
|
|
159630
|
+
...chartData,
|
|
159631
|
+
colorPalette: colors,
|
|
159632
|
+
style: { ...chartData.style, styleId: preset.styleId },
|
|
159633
|
+
series: chartData.series.map(clearSeriesColor)
|
|
159634
|
+
};
|
|
159635
|
+
}
|
|
159636
|
+
var AXIS_TYPES_WITH_TITLES = [
|
|
159637
|
+
"catAx",
|
|
159638
|
+
"valAx",
|
|
159639
|
+
"dateAx"
|
|
159640
|
+
];
|
|
159641
|
+
var DEFAULT_AXIS_TITLE_TEXT = "Axis Title";
|
|
159642
|
+
function chartAxesVisibilityPatch(chartData, show) {
|
|
159643
|
+
const axes = (chartData.axes ?? []).map(
|
|
159644
|
+
(axis) => AXIS_TYPES_WITH_TITLES.includes(axis.axisType) ? { ...axis, deleted: !show } : axis
|
|
159645
|
+
);
|
|
159646
|
+
return { axes };
|
|
159647
|
+
}
|
|
159648
|
+
function chartAxesVisibilityState(chartData) {
|
|
159649
|
+
const relevant = (chartData.axes ?? []).filter(
|
|
159650
|
+
(axis) => AXIS_TYPES_WITH_TITLES.includes(axis.axisType)
|
|
159651
|
+
);
|
|
159652
|
+
return relevant.length === 0 || relevant.some((axis) => !axis.deleted);
|
|
159653
|
+
}
|
|
159654
|
+
function chartAxisTitlesPatch(chartData, show) {
|
|
159655
|
+
const axes = (chartData.axes ?? []).map((axis) => {
|
|
159656
|
+
if (!AXIS_TYPES_WITH_TITLES.includes(axis.axisType)) {
|
|
159657
|
+
return axis;
|
|
159658
|
+
}
|
|
159659
|
+
if (!show) {
|
|
159660
|
+
return { ...axis, titleText: void 0 };
|
|
159661
|
+
}
|
|
159662
|
+
return { ...axis, titleText: axis.titleText || DEFAULT_AXIS_TITLE_TEXT };
|
|
159663
|
+
});
|
|
159664
|
+
return { axes };
|
|
159665
|
+
}
|
|
159666
|
+
function chartAxisTitlesState(chartData) {
|
|
159667
|
+
return (chartData.axes ?? []).some(
|
|
159668
|
+
(axis) => AXIS_TYPES_WITH_TITLES.includes(axis.axisType) && Boolean(axis.titleText)
|
|
159669
|
+
);
|
|
159670
|
+
}
|
|
159671
|
+
function applyChartElementToggle(chartData, key2, checked) {
|
|
159672
|
+
switch (key2) {
|
|
159673
|
+
case "title":
|
|
159674
|
+
return patchChartData(chartData, { style: { ...chartData.style, hasTitle: checked } });
|
|
159675
|
+
case "legend":
|
|
159676
|
+
return patchChartData(chartData, { style: { ...chartData.style, hasLegend: checked } });
|
|
159677
|
+
case "dataLabels":
|
|
159678
|
+
return patchChartData(chartData, { style: { ...chartData.style, hasDataLabels: checked } });
|
|
159679
|
+
case "gridlines":
|
|
159680
|
+
return patchChartData(chartData, chartGridlinesPatch(chartData, checked));
|
|
159681
|
+
case "axes":
|
|
159682
|
+
return patchChartData(chartData, chartAxesVisibilityPatch(chartData, checked));
|
|
159683
|
+
case "axisTitles":
|
|
159684
|
+
return patchChartData(chartData, chartAxisTitlesPatch(chartData, checked));
|
|
159685
|
+
default:
|
|
159686
|
+
return chartData;
|
|
159687
|
+
}
|
|
159688
|
+
}
|
|
159689
|
+
var CHART_QUICK_ACTION_BUTTON_SIZE = 24;
|
|
159690
|
+
var BUTTON_GAP = 6;
|
|
159691
|
+
var OUTSIDE_GAP = 8;
|
|
159692
|
+
var BUTTON_ORDER = [
|
|
159693
|
+
{ id: "elements", labelKey: "pptx.chart.quickElements" },
|
|
159694
|
+
{ id: "styles", labelKey: "pptx.chart.quickStyles" },
|
|
159695
|
+
{ id: "filters", labelKey: "pptx.chart.quickFilters" }
|
|
159696
|
+
];
|
|
159697
|
+
function buildButtons(selectionBox, showFilters) {
|
|
159698
|
+
const x = selectionBox.x + selectionBox.width + OUTSIDE_GAP;
|
|
159699
|
+
return BUTTON_ORDER.filter((entry2) => entry2.id !== "filters" || showFilters).map((entry2, i2) => ({
|
|
159700
|
+
...entry2,
|
|
159701
|
+
x,
|
|
159702
|
+
y: selectionBox.y + i2 * (CHART_QUICK_ACTION_BUTTON_SIZE + BUTTON_GAP),
|
|
159703
|
+
size: CHART_QUICK_ACTION_BUTTON_SIZE
|
|
159704
|
+
}));
|
|
159705
|
+
}
|
|
159706
|
+
function buildElements(chartData) {
|
|
159707
|
+
const items = [
|
|
159708
|
+
{ key: "title", labelKey: "pptx.chart.showTitle", checked: chartData.style?.hasTitle ?? false },
|
|
159709
|
+
{
|
|
159710
|
+
key: "legend",
|
|
159711
|
+
labelKey: "pptx.chart.showLegend",
|
|
159712
|
+
checked: chartData.style?.hasLegend ?? false
|
|
159713
|
+
},
|
|
159714
|
+
{
|
|
159715
|
+
key: "gridlines",
|
|
159716
|
+
labelKey: "pptx.chart.showGridlines",
|
|
159717
|
+
checked: chartGridlinesState(chartData)
|
|
159718
|
+
},
|
|
159719
|
+
{
|
|
159720
|
+
key: "dataLabels",
|
|
159721
|
+
labelKey: "pptx.chart.showDataLabels",
|
|
159722
|
+
checked: chartData.style?.hasDataLabels ?? false
|
|
159723
|
+
}
|
|
159724
|
+
];
|
|
159725
|
+
if (chartData.axes && chartData.axes.length > 0) {
|
|
159726
|
+
items.push({
|
|
159727
|
+
key: "axes",
|
|
159728
|
+
labelKey: "pptx.chart.quickAxes",
|
|
159729
|
+
checked: chartAxesVisibilityState(chartData)
|
|
159730
|
+
});
|
|
159731
|
+
items.push({
|
|
159732
|
+
key: "axisTitles",
|
|
159733
|
+
labelKey: "pptx.chart.quickAxisTitles",
|
|
159734
|
+
checked: chartAxisTitlesState(chartData)
|
|
159735
|
+
});
|
|
159736
|
+
}
|
|
159737
|
+
return items;
|
|
159738
|
+
}
|
|
159739
|
+
function buildFilters(chartData) {
|
|
159740
|
+
const visibleSeries = chartData.series.map((series2, index) => ({
|
|
159741
|
+
key: `visible-${index}`,
|
|
159742
|
+
name: series2.name,
|
|
159743
|
+
visible: true,
|
|
159744
|
+
seriesIndex: index,
|
|
159745
|
+
sortKey: series2.idx ?? index
|
|
159746
|
+
}));
|
|
159747
|
+
const filtered = (chartData.filteredSeries ?? []).map((entry2, index) => ({
|
|
159748
|
+
key: `filtered-${index}`,
|
|
159749
|
+
name: entry2.name ?? chartData.filteredSeriesTitle ?? `Series ${index + 1}`,
|
|
159750
|
+
visible: false,
|
|
159751
|
+
filteredIndex: index,
|
|
159752
|
+
sortKey: entry2.idx
|
|
159753
|
+
}));
|
|
159754
|
+
const series = [...visibleSeries, ...filtered].sort((a, b) => a.sortKey - b.sortKey).map(({ sortKey: _sortKey, ...rest }) => rest);
|
|
159755
|
+
return { visible: series.length > 1, series };
|
|
159756
|
+
}
|
|
159757
|
+
function buildChartQuickActionsDescriptor(input) {
|
|
159758
|
+
if (!input.isChartSelected || !input.chartData) {
|
|
159759
|
+
return null;
|
|
159760
|
+
}
|
|
159761
|
+
const { chartData, selectionBox } = input;
|
|
159762
|
+
const filters = buildFilters(chartData);
|
|
159763
|
+
return {
|
|
159764
|
+
buttons: buildButtons(selectionBox, filters.visible),
|
|
159765
|
+
elements: buildElements(chartData),
|
|
159766
|
+
filters,
|
|
159767
|
+
styles: { presets: buildChartStylePresets(chartData) }
|
|
159768
|
+
};
|
|
159769
|
+
}
|
|
159344
159770
|
var TWO_PI = Math.PI * 2;
|
|
159345
159771
|
var ANGLE_EPSILON = TWO_PI * 1e-3;
|
|
159346
159772
|
function buildPieDragGeometry(element, chartData, pointIndex) {
|
|
@@ -159397,7 +159823,7 @@ function buildStackedDragGeometry(element, chartData, seriesIndex, pointIndex) {
|
|
|
159397
159823
|
), plots = computeStackedSeriesPlots(seriesValues, catCount, percent3), baseValue = plots[seriesIndex]?.base[pointIndex] ?? 0, otherAbsSum = seriesValues.reduce(
|
|
159398
159824
|
(sum, values, si) => si === seriesIndex ? sum : sum + Math.abs(values[pointIndex] ?? 0),
|
|
159399
159825
|
0
|
|
159400
|
-
),
|
|
159826
|
+
), layoutOpts = computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length), layout = computePlotLayout(element.width, element.height, chartData, true, layoutOpts), range = percent3 ? { min: 0, max: 100, span: 100 } : computeStackedValueRange(chartData.series, catCount, layout.plotHeight);
|
|
159401
159827
|
return {
|
|
159402
159828
|
range,
|
|
159403
159829
|
plotTop: layout.plotTop,
|
|
@@ -172898,6 +173324,17 @@ var translationsEn = {
|
|
|
172898
173324
|
"pptx.chart.chartFilters": "Chart filters",
|
|
172899
173325
|
"pptx.chart.hideSeries": "Hide {{name}}",
|
|
172900
173326
|
"pptx.chart.showSeries": "Show {{name}}",
|
|
173327
|
+
"pptx.chart.quickElements": "Chart Elements",
|
|
173328
|
+
"pptx.chart.quickStyles": "Chart Styles",
|
|
173329
|
+
"pptx.chart.quickFilters": "Chart Filters",
|
|
173330
|
+
"pptx.chart.quickAxes": "Axes",
|
|
173331
|
+
"pptx.chart.quickAxisTitles": "Axis Titles",
|
|
173332
|
+
"pptx.chart.styleColorful": "Colorful",
|
|
173333
|
+
"pptx.chart.styleMonochrome": "Monochrome",
|
|
173334
|
+
"pptx.chart.styleColorfulLight": "Colorful Light",
|
|
173335
|
+
"pptx.chart.styleColorfulDark": "Colorful Dark",
|
|
173336
|
+
"pptx.chart.styleMutedDark": "Muted Dark",
|
|
173337
|
+
"pptx.chart.stylePastel": "Pastel",
|
|
172901
173338
|
"pptx.chart.valueFromCells": "Value from cells: {{name}}",
|
|
172902
173339
|
"pptx.chart.removeCategory": "Remove category",
|
|
172903
173340
|
"pptx.chart.axes": "Axes",
|
|
@@ -177494,10 +177931,10 @@ function resolveTrackedTextWidth(text22, font, naturalWidth) {
|
|
|
177494
177931
|
const tracking = resolveMetricTrackingPx(text22, font);
|
|
177495
177932
|
return tracking === 0 ? naturalWidth : naturalWidth + tracking * [...text22].length;
|
|
177496
177933
|
}
|
|
177497
|
-
var
|
|
177934
|
+
var PX_PER_POINT2 = 96 / 72;
|
|
177498
177935
|
function authoredLetterSpacingPx(style) {
|
|
177499
177936
|
const spc = style?.characterSpacing;
|
|
177500
|
-
return typeof spc === "number" && spc !== 0 ? spc / 100 *
|
|
177937
|
+
return typeof spc === "number" && spc !== 0 ? spc / 100 * PX_PER_POINT2 : 0;
|
|
177501
177938
|
}
|
|
177502
177939
|
function pieceLetterSpacing(authoredPx, tracking) {
|
|
177503
177940
|
const spacing = authoredPx + tracking;
|
|
@@ -191470,7 +191907,7 @@ function buildSurfaceChart3DData(chartData, categoryLabels, options) {
|
|
|
191470
191907
|
if (seriesCount === 0 || catCount === 0) {
|
|
191471
191908
|
return null;
|
|
191472
191909
|
}
|
|
191473
|
-
const range = computeValueRange2(chartData.series);
|
|
191910
|
+
const range = computeValueRange2(chartData.series, options.height);
|
|
191474
191911
|
const heightMap = new Float32Array(seriesCount * catCount);
|
|
191475
191912
|
const colorMap = new Float32Array(seriesCount * catCount * 3);
|
|
191476
191913
|
const values = new Float32Array(seriesCount * catCount);
|
|
@@ -192303,7 +192740,7 @@ function buildBarChart3DData(chartData, categoryLabels, options) {
|
|
|
192303
192740
|
const isPercent = grouping === "percentStacked";
|
|
192304
192741
|
const horizontal = chartData.barDirection === "bar";
|
|
192305
192742
|
const points4 = buildPoints(chartData, cols, isPercent);
|
|
192306
|
-
const range = isPercent ? { min: 0, max: 100, span: 100 } : grouping === "stacked" ? computeStackedValueRange(chartData.series, cols) : computeValueRange2(chartData.series);
|
|
192743
|
+
const range = isPercent ? { min: 0, max: 100, span: 100 } : grouping === "stacked" ? computeStackedValueRange(chartData.series, cols, options.height) : computeValueRange2(chartData.series, options.height);
|
|
192307
192744
|
const depthPercent = chartData.view3D?.depthPercent;
|
|
192308
192745
|
const boxes = layoutBarChart3D(points4, cols, rows, range, grouping, depthPercent, horizontal);
|
|
192309
192746
|
return {
|
|
@@ -192419,7 +192856,7 @@ function buildCartesianLine3DSceneData(chartData, categoryLabels, options) {
|
|
|
192419
192856
|
return null;
|
|
192420
192857
|
}
|
|
192421
192858
|
const points4 = buildPoints2(chartData, cols);
|
|
192422
|
-
const range = computeValueRange2(chartData.series);
|
|
192859
|
+
const range = computeValueRange2(chartData.series, options.height);
|
|
192423
192860
|
const depthPercent = chartData.view3D?.depthPercent;
|
|
192424
192861
|
const series = layoutCartesianLine3DSeries(points4, cols, rows, range, depthPercent);
|
|
192425
192862
|
return {
|
|
@@ -206700,6 +207137,11 @@ function segmentFrameCount(durationMs, fps) {
|
|
|
206700
207137
|
}
|
|
206701
207138
|
return Math.max(1, Math.ceil(durationMs / (1e3 / fps)));
|
|
206702
207139
|
}
|
|
207140
|
+
function stopCaptureStream(stream) {
|
|
207141
|
+
for (const track of stream.getTracks()) {
|
|
207142
|
+
track.stop();
|
|
207143
|
+
}
|
|
207144
|
+
}
|
|
206703
207145
|
var table;
|
|
206704
207146
|
function getTable() {
|
|
206705
207147
|
if (table) {
|
|
@@ -207290,6 +207732,7 @@ exports.BEVEL_PRESETS = BEVEL_PRESETS;
|
|
|
207290
207732
|
exports.BROADCAST_THROTTLE_MS = BROADCAST_THROTTLE_MS;
|
|
207291
207733
|
exports.CATEGORIES = CATEGORIES;
|
|
207292
207734
|
exports.CHARACTER_SPACING_OPTIONS = CHARACTER_SPACING_OPTIONS;
|
|
207735
|
+
exports.CHART_QUICK_ACTION_BUTTON_SIZE = CHART_QUICK_ACTION_BUTTON_SIZE;
|
|
207293
207736
|
exports.CHART_TYPE_OPTIONS = CHART_TYPE_OPTIONS;
|
|
207294
207737
|
exports.CINEMATIC_TRANSITION_KEYFRAMES = CINEMATIC_TRANSITION_KEYFRAMES;
|
|
207295
207738
|
exports.COMMENT_MARKER_SIZE = COMMENT_MARKER_SIZE;
|
|
@@ -207483,7 +207926,9 @@ exports.applyActiveInlineListFormatting = applyActiveInlineListFormatting;
|
|
|
207483
207926
|
exports.applyAnimationTimelineOrder = applyAnimationTimelineOrder;
|
|
207484
207927
|
exports.applyAutoCorrect = applyAutoCorrect;
|
|
207485
207928
|
exports.applyCaseTransformToSegments = applyCaseTransformToSegments;
|
|
207929
|
+
exports.applyChartElementToggle = applyChartElementToggle;
|
|
207486
207930
|
exports.applyChartPartHighlight = applyChartPartHighlight;
|
|
207931
|
+
exports.applyChartStylePreset = applyChartStylePreset;
|
|
207487
207932
|
exports.applyColorChange = applyColorChange;
|
|
207488
207933
|
exports.applyDuotone = applyDuotone;
|
|
207489
207934
|
exports.applyFindReplacements = applyFindReplacements;
|
|
@@ -207540,6 +207985,7 @@ exports.buildBroadcastViewerUrl = buildBroadcastViewerUrl;
|
|
|
207540
207985
|
exports.buildCacheKey = buildCacheKey;
|
|
207541
207986
|
exports.buildCalloutLeaderLineSvgPath = buildCalloutLeaderLineSvgPath;
|
|
207542
207987
|
exports.buildChartMarkDragGeometry = buildChartMarkDragGeometry;
|
|
207988
|
+
exports.buildChartQuickActionsDescriptor = buildChartQuickActionsDescriptor;
|
|
207543
207989
|
exports.buildChartViewModel = buildChartViewModel;
|
|
207544
207990
|
exports.buildChromeStyle = buildChromeStyle;
|
|
207545
207991
|
exports.buildCollaborationShareUrl = buildCollaborationShareUrl;
|
|
@@ -207837,6 +208283,7 @@ exports.getGroupChildParentFill = getGroupChildParentFill;
|
|
|
207837
208283
|
exports.getImageColorWashStyle = getImageColorWashStyle;
|
|
207838
208284
|
exports.getImageEffectsFilter = getImageEffectsFilter;
|
|
207839
208285
|
exports.getImageEffectsOpacity = getImageEffectsOpacity;
|
|
208286
|
+
exports.getImageFillCounterTransform = getImageFillCounterTransform;
|
|
207840
208287
|
exports.getImageFitStyle = getImageFitStyle;
|
|
207841
208288
|
exports.getImageSvgFilters = getImageSvgFilters;
|
|
207842
208289
|
exports.getImageTilingStyle = getImageTilingStyle;
|
|
@@ -208258,6 +208705,7 @@ exports.splitRunForMetrics = splitRunForMetrics;
|
|
|
208258
208705
|
exports.splitWordsForUnderline = splitWordsForUnderline;
|
|
208259
208706
|
exports.stepPresenterZoom = stepPresenterZoom;
|
|
208260
208707
|
exports.stopAllPersistentAudio = stopAllPersistentAudio;
|
|
208708
|
+
exports.stopCaptureStream = stopCaptureStream;
|
|
208261
208709
|
exports.storeAudienceContent = storeAudienceContent;
|
|
208262
208710
|
exports.stripUnderlineDecoration = stripUnderlineDecoration;
|
|
208263
208711
|
exports.strokeOutlineViewBox = strokeOutlineViewBox;
|