pptx-react-viewer 2.19.7 → 2.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 +13 -0
- package/README.md +1 -1
- package/dist/{AiChatPanel-MAC2Z5SK.js → AiChatPanel-KOKEVIOQ.js} +24 -24
- package/dist/AiChatPanel-KOKEVIOQ.js.br +0 -0
- package/dist/AiChatPanel-KOKEVIOQ.js.gz +0 -0
- package/dist/{AiChatPanel-WVO66CKC.mjs → AiChatPanel-S5UYFWT2.mjs} +4 -4
- package/dist/AiChatPanel-S5UYFWT2.mjs.br +0 -0
- package/dist/AiChatPanel-S5UYFWT2.mjs.gz +0 -0
- package/dist/{Model3DScene-CU4WGIMH.js → Model3DScene-T5372GIJ.js} +2 -2
- package/dist/Model3DScene-T5372GIJ.js.br +0 -0
- package/dist/Model3DScene-T5372GIJ.js.gz +0 -0
- package/dist/{Model3DScene-PTCZUGIT.mjs → Model3DScene-T6QOOVLN.mjs} +1 -1
- package/dist/Model3DScene-T6QOOVLN.mjs.br +0 -0
- package/dist/Model3DScene-T6QOOVLN.mjs.gz +0 -0
- package/dist/{chunk-DZHCLAH3.mjs → chunk-2T7J57AC.mjs} +1 -1
- package/dist/chunk-2T7J57AC.mjs.br +0 -0
- package/dist/chunk-2T7J57AC.mjs.gz +0 -0
- package/dist/{chunk-MVKRI3CZ.js → chunk-6CPUGAK7.js} +2 -0
- package/dist/chunk-6CPUGAK7.js.br +0 -0
- package/dist/{chunk-MVKRI3CZ.js.gz → chunk-6CPUGAK7.js.gz} +0 -0
- package/dist/{chunk-JENKEQZP.js → chunk-AFAAKYYB.js} +1093 -1254
- package/dist/chunk-AFAAKYYB.js.br +0 -0
- package/dist/chunk-AFAAKYYB.js.gz +0 -0
- package/dist/{chunk-V5PW4QCE.js → chunk-BW3ZS73U.js} +178 -172
- package/dist/chunk-BW3ZS73U.js.br +0 -0
- package/dist/chunk-BW3ZS73U.js.gz +0 -0
- package/dist/{chunk-GUGHIQ4P.js → chunk-J56DMNSD.js} +604 -452
- package/dist/chunk-J56DMNSD.js.br +0 -0
- package/dist/chunk-J56DMNSD.js.gz +0 -0
- package/dist/{chunk-SQJBFMEX.mjs → chunk-MZOZNBRO.mjs} +2 -0
- package/dist/chunk-MZOZNBRO.mjs.br +0 -0
- package/dist/{chunk-SQJBFMEX.mjs.gz → chunk-MZOZNBRO.mjs.gz} +0 -0
- package/dist/{chunk-ZPNLWBED.mjs → chunk-QLELFH7A.mjs} +586 -449
- package/dist/chunk-QLELFH7A.mjs.br +0 -0
- package/dist/chunk-QLELFH7A.mjs.gz +0 -0
- package/dist/{chunk-XDF76VFA.js → chunk-SAKMXLW2.js} +382 -379
- package/dist/chunk-SAKMXLW2.js.br +0 -0
- package/dist/chunk-SAKMXLW2.js.gz +0 -0
- package/dist/{chunk-EVM5OFAD.js → chunk-T7OUKBWK.js} +3 -3
- package/dist/chunk-T7OUKBWK.js.br +0 -0
- package/dist/chunk-T7OUKBWK.js.gz +0 -0
- package/dist/{chunk-QZV7XDQG.mjs → chunk-U2UIJRSW.mjs} +25 -19
- package/dist/chunk-U2UIJRSW.mjs.br +0 -0
- package/dist/chunk-U2UIJRSW.mjs.gz +0 -0
- package/dist/{chunk-5BG5BANR.mjs → chunk-XWCN4TGE.mjs} +67 -228
- package/dist/chunk-XWCN4TGE.mjs.br +0 -0
- package/dist/chunk-XWCN4TGE.mjs.gz +0 -0
- package/dist/{chunk-LP3Y4NXE.mjs → chunk-YMNURZ22.mjs} +6 -3
- package/dist/chunk-YMNURZ22.mjs.br +0 -0
- package/dist/chunk-YMNURZ22.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.js +47 -47
- 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.js +79 -79
- 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.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-MAC2Z5SK.js.br +0 -0
- package/dist/AiChatPanel-MAC2Z5SK.js.gz +0 -0
- package/dist/AiChatPanel-WVO66CKC.mjs.br +0 -0
- package/dist/AiChatPanel-WVO66CKC.mjs.gz +0 -0
- package/dist/Model3DScene-CU4WGIMH.js.br +0 -0
- package/dist/Model3DScene-CU4WGIMH.js.gz +0 -0
- package/dist/Model3DScene-PTCZUGIT.mjs.br +0 -0
- package/dist/Model3DScene-PTCZUGIT.mjs.gz +0 -0
- package/dist/chunk-5BG5BANR.mjs.br +0 -0
- package/dist/chunk-5BG5BANR.mjs.gz +0 -0
- package/dist/chunk-DZHCLAH3.mjs.br +0 -0
- package/dist/chunk-DZHCLAH3.mjs.gz +0 -0
- package/dist/chunk-EVM5OFAD.js.br +0 -0
- package/dist/chunk-EVM5OFAD.js.gz +0 -0
- package/dist/chunk-GUGHIQ4P.js.br +0 -0
- package/dist/chunk-GUGHIQ4P.js.gz +0 -0
- package/dist/chunk-JENKEQZP.js.br +0 -0
- package/dist/chunk-JENKEQZP.js.gz +0 -0
- package/dist/chunk-LP3Y4NXE.mjs.br +0 -0
- package/dist/chunk-LP3Y4NXE.mjs.gz +0 -0
- package/dist/chunk-MVKRI3CZ.js.br +0 -0
- package/dist/chunk-QZV7XDQG.mjs.br +0 -0
- package/dist/chunk-QZV7XDQG.mjs.gz +0 -0
- package/dist/chunk-SQJBFMEX.mjs.br +0 -0
- package/dist/chunk-V5PW4QCE.js.br +0 -0
- package/dist/chunk-V5PW4QCE.js.gz +0 -0
- package/dist/chunk-XDF76VFA.js.br +0 -0
- package/dist/chunk-XDF76VFA.js.gz +0 -0
- package/dist/chunk-ZPNLWBED.mjs.br +0 -0
- package/dist/chunk-ZPNLWBED.mjs.gz +0 -0
|
@@ -27582,9 +27582,9 @@ function addSmartArtNode(data, text2, afterNodeId) {
|
|
|
27582
27582
|
};
|
|
27583
27583
|
const nodes = [...data.nodes];
|
|
27584
27584
|
if (afterNodeId) {
|
|
27585
|
-
const
|
|
27586
|
-
if (
|
|
27587
|
-
nodes.splice(
|
|
27585
|
+
const siblingIndex2 = nodes.findIndex((n) => n.id === afterNodeId);
|
|
27586
|
+
if (siblingIndex2 >= 0) {
|
|
27587
|
+
nodes.splice(siblingIndex2 + 1, 0, newNode);
|
|
27588
27588
|
} else {
|
|
27589
27589
|
nodes.push(newNode);
|
|
27590
27590
|
}
|
|
@@ -97255,6 +97255,15 @@ function resolveDataPointMarker(series, pointIndex) {
|
|
|
97255
97255
|
fill: point?.spPr?.fillColor ?? series.marker?.spPr?.fillColor
|
|
97256
97256
|
};
|
|
97257
97257
|
}
|
|
97258
|
+
var LEGEND_ITEM_WIDTH = 80;
|
|
97259
|
+
var LEGEND_ITEM_HEIGHT = 14;
|
|
97260
|
+
function computeChartLegendLayout(vm) {
|
|
97261
|
+
const vertical = vm.legendAnchor === "start";
|
|
97262
|
+
return vm.legend.map((entry2, i) => {
|
|
97263
|
+
const x = vertical ? vm.legendX : vm.legendX - vm.legend.length * LEGEND_ITEM_WIDTH / 2 + i * LEGEND_ITEM_WIDTH, y = vertical ? vm.legendY + i * LEGEND_ITEM_HEIGHT : vm.legendY;
|
|
97264
|
+
return { x, y, color: entry2.color, label: entry2.label };
|
|
97265
|
+
});
|
|
97266
|
+
}
|
|
97258
97267
|
function schemaLabel(keys, token2, translate) {
|
|
97259
97268
|
if (token2 === void 0) {
|
|
97260
97269
|
return "";
|
|
@@ -97897,47 +97906,24 @@ function blendToWhite(color2) {
|
|
|
97897
97906
|
if (!match) {
|
|
97898
97907
|
return color2;
|
|
97899
97908
|
}
|
|
97900
|
-
const value = Number.parseInt(match[1], 16);
|
|
97901
|
-
const mix = (channel) => Math.round(channel + (255 - channel) * 0.5);
|
|
97902
|
-
const r = mix(value >> 16 & 255);
|
|
97903
|
-
const g = mix(value >> 8 & 255);
|
|
97904
|
-
const b = mix(value & 255);
|
|
97909
|
+
const value = Number.parseInt(match[1], 16), mix = (channel) => Math.round(channel + (255 - channel) * 0.5), r = mix(value >> 16 & 255), g = mix(value >> 8 & 255), b = mix(value & 255);
|
|
97905
97910
|
return `#${(r << 16 | g << 8 | b).toString(16).padStart(6, "0").toUpperCase()}`;
|
|
97906
97911
|
}
|
|
97907
97912
|
function invertNegativeFill(series, pointIndex, value, baseFill) {
|
|
97908
97913
|
if (value >= 0) {
|
|
97909
97914
|
return baseFill;
|
|
97910
97915
|
}
|
|
97911
|
-
const point = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
97912
|
-
const invert = point?.invertIfNegative ?? series.invertIfNegative ?? false;
|
|
97916
|
+
const point = series.dataPoints?.find((p) => p.idx === pointIndex), invert = point?.invertIfNegative ?? series.invertIfNegative ?? false;
|
|
97913
97917
|
return invert ? blendToWhite(baseFill) : baseFill;
|
|
97914
97918
|
}
|
|
97915
97919
|
function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, secondaryIdx, grouping, sourceIndices2) {
|
|
97916
|
-
const primitives = [];
|
|
97917
|
-
const dataLabels = [];
|
|
97918
|
-
const series = chartData.series;
|
|
97919
|
-
const palette = chartData.colorPalette;
|
|
97920
|
-
const showLabels = chartData.style?.hasDataLabels;
|
|
97921
|
-
const varyColorsSingle = chartData.varyColors === true && series.length === 1;
|
|
97920
|
+
const primitives = [], dataLabels = [], series = chartData.series, palette = chartData.colorPalette, showLabels = chartData.style?.hasDataLabels, varyColorsSingle = chartData.varyColors === true && series.length === 1;
|
|
97922
97921
|
if (grouping === "clustered") {
|
|
97923
|
-
const seriesCount = Math.max(series.length, 1);
|
|
97924
|
-
const barGroupWidth2 = layout.plotWidth / Math.max(catCount, 1);
|
|
97925
|
-
const singleBarWidth = chartData.barGapWidth !== void 0 ? barGroupWidth2 / (seriesCount + Math.max(chartData.barGapWidth, 0) / 100) : barGroupWidth2 * 0.7 / seriesCount;
|
|
97926
|
-
const overlap = chartData.barOverlap ?? 0;
|
|
97927
|
-
const step = singleBarWidth * (1 - overlap / 100);
|
|
97928
|
-
const clusterWidth = singleBarWidth + step * (seriesCount - 1);
|
|
97929
|
-
const groupOffset = (barGroupWidth2 - clusterWidth) / 2;
|
|
97922
|
+
const seriesCount = Math.max(series.length, 1), barGroupWidth2 = layout.plotWidth / Math.max(catCount, 1), singleBarWidth = chartData.barGapWidth !== void 0 ? barGroupWidth2 / (seriesCount + Math.max(chartData.barGapWidth, 0) / 100) : barGroupWidth2 * 0.7 / seriesCount, overlap = chartData.barOverlap ?? 0, step = singleBarWidth * (1 - overlap / 100), clusterWidth = singleBarWidth + step * (seriesCount - 1), groupOffset = (barGroupWidth2 - clusterWidth) / 2;
|
|
97930
97923
|
for (let displayIndex = 0; displayIndex < catCount; displayIndex++) {
|
|
97931
97924
|
const sourceIndex = sourceIndices2[displayIndex] ?? displayIndex;
|
|
97932
97925
|
for (let si = 0; si < series.length; si++) {
|
|
97933
|
-
const val2 = series[si].values[sourceIndex] ?? 0;
|
|
97934
|
-
const x = layout.plotLeft + barGroupWidth2 * displayIndex + groupOffset + step * si;
|
|
97935
|
-
const activeRange = secondaryIdx.has(si) && secondaryRange ? secondaryRange : primaryRange;
|
|
97936
|
-
const zeroY = valueToY2(0, activeRange, layout.plotTop, layout.plotBottom);
|
|
97937
|
-
const valY = valueToY2(val2, activeRange, layout.plotTop, layout.plotBottom);
|
|
97938
|
-
const y = Math.min(zeroY, valY);
|
|
97939
|
-
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
97940
|
-
const baseFill = varyColorsSingle ? resolveVaryColorFill(series[si], sourceIndex, paletteColor2(sourceIndex, palette)) : resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette);
|
|
97926
|
+
const val2 = series[si].values[sourceIndex] ?? 0, x = layout.plotLeft + barGroupWidth2 * displayIndex + groupOffset + step * si, activeRange = secondaryIdx.has(si) && secondaryRange ? secondaryRange : primaryRange, zeroY = valueToY2(0, activeRange, layout.plotTop, layout.plotBottom), valY = valueToY2(val2, activeRange, layout.plotTop, layout.plotBottom), y = Math.min(zeroY, valY), h = Math.max(Math.abs(zeroY - valY), 1), baseFill = varyColorsSingle ? resolveVaryColorFill(series[si], sourceIndex, paletteColor2(sourceIndex, palette)) : resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette);
|
|
97941
97927
|
primitives.push({
|
|
97942
97928
|
kind: "rect",
|
|
97943
97929
|
x,
|
|
@@ -97946,7 +97932,13 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
97946
97932
|
h,
|
|
97947
97933
|
fill: invertNegativeFill(series[si], sourceIndex, val2, baseFill),
|
|
97948
97934
|
rx: 1,
|
|
97949
|
-
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
97935
|
+
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex },
|
|
97936
|
+
title: buildMarkTooltip(
|
|
97937
|
+
series[si].name,
|
|
97938
|
+
chartData.categories[sourceIndex],
|
|
97939
|
+
val2,
|
|
97940
|
+
series[si].numberFormat
|
|
97941
|
+
)
|
|
97950
97942
|
});
|
|
97951
97943
|
if (showLabels) {
|
|
97952
97944
|
const text2 = buildDataLabelText({
|
|
@@ -97975,19 +97967,23 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
97975
97967
|
const displaySeries2 = series.map((entry2) => ({
|
|
97976
97968
|
...entry2,
|
|
97977
97969
|
values: sourceIndices2.map((sourceIndex) => entry2.values[sourceIndex] ?? 0)
|
|
97978
|
-
}));
|
|
97979
|
-
const rects = computeStackedBarRects(displaySeries2, catCount, layout, primaryRange, palette);
|
|
97970
|
+
})), rects = computeStackedBarRects(displaySeries2, catCount, layout, primaryRange, palette);
|
|
97980
97971
|
for (const r of rects) {
|
|
97981
|
-
let fill = r.fill;
|
|
97982
|
-
let part;
|
|
97972
|
+
let fill = r.fill, part, title;
|
|
97983
97973
|
if (r.seriesIndex !== void 0 && r.pointIndex !== void 0) {
|
|
97984
97974
|
const sourcePointIndex = sourceIndices2[r.pointIndex] ?? r.pointIndex;
|
|
97985
97975
|
fill = resolveDataPointFill(series[r.seriesIndex], sourcePointIndex, r.fill) ?? r.fill;
|
|
97986
97976
|
const value = series[r.seriesIndex].values[sourcePointIndex] ?? 0;
|
|
97987
97977
|
fill = invertNegativeFill(series[r.seriesIndex], sourcePointIndex, value, fill);
|
|
97988
97978
|
part = { role: "dataPoint", seriesIndex: r.seriesIndex, pointIndex: sourcePointIndex };
|
|
97979
|
+
title = buildMarkTooltip(
|
|
97980
|
+
series[r.seriesIndex].name,
|
|
97981
|
+
chartData.categories[sourcePointIndex],
|
|
97982
|
+
value,
|
|
97983
|
+
series[r.seriesIndex].numberFormat
|
|
97984
|
+
);
|
|
97989
97985
|
}
|
|
97990
|
-
primitives.push({ kind: "rect", x: r.x, y: r.y, w: r.w, h: r.h, fill, rx: 1, part });
|
|
97986
|
+
primitives.push({ kind: "rect", x: r.x, y: r.y, w: r.w, h: r.h, fill, rx: 1, part, title });
|
|
97991
97987
|
}
|
|
97992
97988
|
if (showLabels) {
|
|
97993
97989
|
pushClusteredStackedLabels(
|
|
@@ -98002,31 +97998,15 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
98002
97998
|
}
|
|
98003
97999
|
return { primitives, dataLabels };
|
|
98004
98000
|
}
|
|
98005
|
-
const barGroupWidth = layout.plotWidth / Math.max(catCount, 1)
|
|
98006
|
-
const barW = barGroupWidth * 0.6;
|
|
98007
|
-
const barOffset = (barGroupWidth - barW) / 2;
|
|
98008
|
-
const displaySeries = series.map((entry2) => ({
|
|
98001
|
+
const barGroupWidth = layout.plotWidth / Math.max(catCount, 1), barW = barGroupWidth * 0.6, barOffset = (barGroupWidth - barW) / 2, displaySeries = series.map((entry2) => ({
|
|
98009
98002
|
...entry2,
|
|
98010
98003
|
values: sourceIndices2.map((sourceIndex) => entry2.values[sourceIndex] ?? 0)
|
|
98011
|
-
}));
|
|
98012
|
-
const totals = categoryTotals(displaySeries, catCount);
|
|
98004
|
+
})), totals = categoryTotals(displaySeries, catCount);
|
|
98013
98005
|
for (let ci = 0; ci < catCount; ci++) {
|
|
98014
|
-
let posRunning = 0;
|
|
98015
|
-
let negRunning = 0;
|
|
98006
|
+
let posRunning = 0, negRunning = 0;
|
|
98016
98007
|
const catTotal = totals[ci] || 1;
|
|
98017
98008
|
for (let si = 0; si < series.length; si++) {
|
|
98018
|
-
const sourceIndex = sourceIndices2[ci] ?? ci;
|
|
98019
|
-
const rawVal = series[si].values[sourceIndex] ?? 0;
|
|
98020
|
-
const val2 = catTotal > 0 ? rawVal / catTotal * 100 : 0;
|
|
98021
|
-
const isNeg = val2 < 0;
|
|
98022
|
-
const base = isNeg ? negRunning : posRunning;
|
|
98023
|
-
const top = base + val2;
|
|
98024
|
-
const x = layout.plotLeft + barGroupWidth * ci + barOffset;
|
|
98025
|
-
const baseY = valueToY2(base, primaryRange, layout.plotTop, layout.plotBottom);
|
|
98026
|
-
const topY = valueToY2(top, primaryRange, layout.plotTop, layout.plotBottom);
|
|
98027
|
-
const y = Math.min(baseY, topY);
|
|
98028
|
-
const h = Math.max(Math.abs(baseY - topY), 0.5);
|
|
98029
|
-
const pctBaseFill = resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette);
|
|
98009
|
+
const sourceIndex = sourceIndices2[ci] ?? ci, rawVal = series[si].values[sourceIndex] ?? 0, val2 = catTotal > 0 ? rawVal / catTotal * 100 : 0, isNeg = val2 < 0, base = isNeg ? negRunning : posRunning, top = base + val2, x = layout.plotLeft + barGroupWidth * ci + barOffset, baseY = valueToY2(base, primaryRange, layout.plotTop, layout.plotBottom), topY = valueToY2(top, primaryRange, layout.plotTop, layout.plotBottom), y = Math.min(baseY, topY), h = Math.max(Math.abs(baseY - topY), 0.5), pctBaseFill = resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette);
|
|
98030
98010
|
primitives.push({
|
|
98031
98011
|
kind: "rect",
|
|
98032
98012
|
x,
|
|
@@ -98034,7 +98014,13 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
98034
98014
|
w: barW,
|
|
98035
98015
|
h,
|
|
98036
98016
|
fill: invertNegativeFill(series[si], sourceIndex, rawVal, pctBaseFill),
|
|
98037
|
-
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
98017
|
+
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex },
|
|
98018
|
+
title: buildMarkTooltip(
|
|
98019
|
+
series[si].name,
|
|
98020
|
+
chartData.categories[sourceIndex],
|
|
98021
|
+
rawVal,
|
|
98022
|
+
series[si].numberFormat
|
|
98023
|
+
)
|
|
98038
98024
|
});
|
|
98039
98025
|
if (showLabels && Math.abs(val2) > 0) {
|
|
98040
98026
|
dataLabels.push({
|
|
@@ -98058,19 +98044,11 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
98058
98044
|
return { primitives, dataLabels };
|
|
98059
98045
|
}
|
|
98060
98046
|
function pushClusteredStackedLabels(chartData, series, sourceIndices2, catCount, layout, range, dataLabels) {
|
|
98061
|
-
const barGroupWidth = layout.plotWidth / catCount;
|
|
98062
|
-
const seriesCount = Math.max(series.length, 1);
|
|
98063
|
-
const singleBarWidth = barGroupWidth * 0.7 / seriesCount;
|
|
98064
|
-
const groupOffset = (barGroupWidth - singleBarWidth * seriesCount) / 2;
|
|
98047
|
+
const barGroupWidth = layout.plotWidth / catCount, seriesCount = Math.max(series.length, 1), singleBarWidth = barGroupWidth * 0.7 / seriesCount, groupOffset = (barGroupWidth - singleBarWidth * seriesCount) / 2;
|
|
98065
98048
|
for (let ci = 0; ci < catCount; ci++) {
|
|
98066
98049
|
const sourceIndex = sourceIndices2[ci] ?? ci;
|
|
98067
98050
|
for (let si = 0; si < series.length; si++) {
|
|
98068
|
-
const val2 = series[si].values[sourceIndex] ?? 0
|
|
98069
|
-
const x = layout.plotLeft + barGroupWidth * ci + groupOffset + singleBarWidth * si + singleBarWidth / 2;
|
|
98070
|
-
const zeroY = valueToY2(0, range, layout.plotTop, layout.plotBottom);
|
|
98071
|
-
const valY = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
98072
|
-
const labelY = val2 >= 0 ? Math.min(zeroY, valY) - 4 : Math.max(zeroY, valY) + 10;
|
|
98073
|
-
const text2 = buildDataLabelText({
|
|
98051
|
+
const val2 = series[si].values[sourceIndex] ?? 0, x = layout.plotLeft + barGroupWidth * ci + groupOffset + singleBarWidth * si + singleBarWidth / 2, zeroY = valueToY2(0, range, layout.plotTop, layout.plotBottom), valY = valueToY2(val2, range, layout.plotTop, layout.plotBottom), labelY = val2 >= 0 ? Math.min(zeroY, valY) - 4 : Math.max(zeroY, valY) + 10, text2 = buildDataLabelText({
|
|
98074
98052
|
chartData,
|
|
98075
98053
|
series: series[si],
|
|
98076
98054
|
pointIndex: sourceIndex,
|
|
@@ -98262,9 +98240,12 @@ function buildMarkerPrimitive(input) {
|
|
|
98262
98240
|
return { kind: "circle", cx, cy, r, fill, part };
|
|
98263
98241
|
}
|
|
98264
98242
|
}
|
|
98265
|
-
function
|
|
98266
|
-
const
|
|
98267
|
-
|
|
98243
|
+
function xyMarkTooltip(seriesName, xVal, yVal, numberFormat) {
|
|
98244
|
+
const y = formatAxisValue2(yVal, numberFormat), coords = xVal !== void 0 ? `(${formatAxisValue2(xVal)}, ${y})` : y;
|
|
98245
|
+
return seriesName.length > 0 ? `${seriesName}: ${coords}` : coords;
|
|
98246
|
+
}
|
|
98247
|
+
function pushMarker(out, series, pointIndex, cx, cy, fill, defaultRadius2, part, opacity2, title) {
|
|
98248
|
+
const marker = resolveDataPointMarker(series, pointIndex), m = buildMarkerPrimitive({
|
|
98268
98249
|
symbol: marker.symbol,
|
|
98269
98250
|
size: marker.size,
|
|
98270
98251
|
cx,
|
|
@@ -98281,34 +98262,180 @@ function pushMarker(out, series, pointIndex, cx, cy, fill, defaultRadius2, part,
|
|
|
98281
98262
|
if (opacity2 !== void 0) {
|
|
98282
98263
|
m.opacity = opacity2;
|
|
98283
98264
|
}
|
|
98265
|
+
if (title !== void 0) {
|
|
98266
|
+
m.title = title;
|
|
98267
|
+
}
|
|
98284
98268
|
out.push(m);
|
|
98285
98269
|
}
|
|
98286
|
-
function
|
|
98287
|
-
|
|
98288
|
-
|
|
98289
|
-
|
|
98270
|
+
function seriesXValues(chartData, series) {
|
|
98271
|
+
if (series.xValues && series.xValues.length > 0) {
|
|
98272
|
+
return series.xValues;
|
|
98273
|
+
}
|
|
98274
|
+
const fromCategories = chartData.categories.map(Number);
|
|
98275
|
+
return fromCategories.length > 0 ? fromCategories : void 0;
|
|
98276
|
+
}
|
|
98277
|
+
function scatterDrawsLine(chartData, series) {
|
|
98278
|
+
if (series.lineNoFill === true) {
|
|
98279
|
+
return false;
|
|
98280
|
+
}
|
|
98281
|
+
const style = chartData.scatterStyle;
|
|
98282
|
+
return style === "line" || style === "lineMarker" || style === "smooth" || style === "smoothMarker";
|
|
98283
|
+
}
|
|
98284
|
+
function buildScatter(chartData, layout, range) {
|
|
98285
|
+
const primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, allIndices = chartData.series.flatMap((s) => s.values.map((_, i) => i)), maxXIndex = Math.max(1, ...allIndices), perSeriesX = chartData.series.map((series) => seriesXValues(chartData, series)), xDomain = computeScatterXDomain(perSeriesX), smoothStyle = chartData.scatterStyle === "smooth" || chartData.scatterStyle === "smoothMarker";
|
|
98290
98286
|
for (let si = 0; si < chartData.series.length; si++) {
|
|
98291
|
-
const series = chartData.series[si];
|
|
98287
|
+
const series = chartData.series[si], c = seriesColor2(series, si, chartData.colorPalette), dots = computeScatterDots(series.values, maxXIndex, layout, range, perSeriesX[si], xDomain);
|
|
98288
|
+
if (scatterDrawsLine(chartData, series) && dots.length >= 2) {
|
|
98289
|
+
const points3 = dots.map((dot) => ({ x: dot.cx, y: dot.cy })), seriesPart = { role: "series", seriesIndex: si };
|
|
98290
|
+
primitives.push(
|
|
98291
|
+
series.smooth ?? smoothStyle ? {
|
|
98292
|
+
kind: "path",
|
|
98293
|
+
d: smoothLinePath(points3),
|
|
98294
|
+
stroke: c,
|
|
98295
|
+
strokeWidth: 2.4,
|
|
98296
|
+
fill: "none",
|
|
98297
|
+
part: seriesPart
|
|
98298
|
+
} : {
|
|
98299
|
+
kind: "polyline",
|
|
98300
|
+
points: linePointsToSvgString(points3),
|
|
98301
|
+
stroke: c,
|
|
98302
|
+
strokeWidth: 2.4,
|
|
98303
|
+
fill: "none",
|
|
98304
|
+
part: seriesPart
|
|
98305
|
+
}
|
|
98306
|
+
);
|
|
98307
|
+
}
|
|
98308
|
+
dots.forEach((dot, vi) => {
|
|
98309
|
+
const part = { role: "dataPoint", seriesIndex: si, pointIndex: vi };
|
|
98310
|
+
pushMarker(
|
|
98311
|
+
primitives,
|
|
98312
|
+
series,
|
|
98313
|
+
vi,
|
|
98314
|
+
dot.cx,
|
|
98315
|
+
dot.cy,
|
|
98316
|
+
resolveDataPointFill(series, vi, c) ?? c,
|
|
98317
|
+
4,
|
|
98318
|
+
part,
|
|
98319
|
+
0.85,
|
|
98320
|
+
xyMarkTooltip(
|
|
98321
|
+
series.name,
|
|
98322
|
+
perSeriesX[si]?.[vi],
|
|
98323
|
+
series.values[vi] ?? 0,
|
|
98324
|
+
series.numberFormat
|
|
98325
|
+
)
|
|
98326
|
+
);
|
|
98327
|
+
});
|
|
98328
|
+
if (showLabels) {
|
|
98329
|
+
series.values.forEach((val2, vi) => {
|
|
98330
|
+
const dot = dots[vi], text2 = buildDataLabelText({ chartData, series, pointIndex: vi, value: val2 });
|
|
98331
|
+
if (!dot || text2 === void 0) {
|
|
98332
|
+
return;
|
|
98333
|
+
}
|
|
98334
|
+
dataLabels.push({
|
|
98335
|
+
kind: "text",
|
|
98336
|
+
x: dot.cx,
|
|
98337
|
+
y: dot.cy - 6,
|
|
98338
|
+
text: text2,
|
|
98339
|
+
fontSize: DEFAULT_CHART_DATA_LABEL_PX,
|
|
98340
|
+
fill: "#334155",
|
|
98341
|
+
textAnchor: "middle"
|
|
98342
|
+
});
|
|
98343
|
+
});
|
|
98344
|
+
}
|
|
98345
|
+
}
|
|
98346
|
+
return { primitives, dataLabels };
|
|
98347
|
+
}
|
|
98348
|
+
function buildBubbles(chartData, layout, range) {
|
|
98349
|
+
const primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, allIndices = chartData.series.flatMap((s) => s.values.map((_, i) => i)), maxXIndex = Math.max(1, ...allIndices), perSeriesX = chartData.series.map((series) => seriesXValues(chartData, series)), xDomain = computeScatterXDomain(perSeriesX), allSizes = chartData.series.flatMap((series) => series.bubbleSizes ?? []), maxBubble = allSizes.length > 0 ? Math.max(1, ...allSizes.map(Math.abs)) : 1, medianRadius = Math.min(layout.plotWidth, layout.plotHeight) * 0.04;
|
|
98350
|
+
for (let si = 0; si < chartData.series.length; si++) {
|
|
98351
|
+
const series = chartData.series[si], c = seriesColor2(series, si, chartData.colorPalette), dots = computeScatterDots(series.values, maxXIndex, layout, range, perSeriesX[si], xDomain);
|
|
98352
|
+
dots.forEach((dot, vi) => {
|
|
98353
|
+
const r = computeBubbleRadius(series.bubbleSizes?.[vi], maxBubble, medianRadius), size = series.bubbleSizes?.[vi], label = size !== void 0 ? `${xyMarkTooltip(series.name, perSeriesX[si]?.[vi], series.values[vi] ?? 0, series.numberFormat)}, size ${formatAxisValue2(size)}` : xyMarkTooltip(
|
|
98354
|
+
series.name,
|
|
98355
|
+
perSeriesX[si]?.[vi],
|
|
98356
|
+
series.values[vi] ?? 0,
|
|
98357
|
+
series.numberFormat
|
|
98358
|
+
);
|
|
98359
|
+
primitives.push({
|
|
98360
|
+
kind: "circle",
|
|
98361
|
+
cx: dot.cx,
|
|
98362
|
+
cy: dot.cy,
|
|
98363
|
+
r,
|
|
98364
|
+
fill: resolveDataPointFill(series, vi, c) ?? c,
|
|
98365
|
+
opacity: 0.6,
|
|
98366
|
+
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi },
|
|
98367
|
+
title: label
|
|
98368
|
+
});
|
|
98369
|
+
});
|
|
98370
|
+
if (showLabels) {
|
|
98371
|
+
series.values.forEach((val2, vi) => {
|
|
98372
|
+
const dot = dots[vi], text2 = buildDataLabelText({ chartData, series, pointIndex: vi, value: val2 });
|
|
98373
|
+
if (!dot || text2 === void 0) {
|
|
98374
|
+
return;
|
|
98375
|
+
}
|
|
98376
|
+
dataLabels.push({
|
|
98377
|
+
kind: "text",
|
|
98378
|
+
x: dot.cx,
|
|
98379
|
+
y: dot.cy - 10,
|
|
98380
|
+
text: text2,
|
|
98381
|
+
fontSize: DEFAULT_CHART_DATA_LABEL_PX,
|
|
98382
|
+
fill: "#334155",
|
|
98383
|
+
textAnchor: "middle"
|
|
98384
|
+
});
|
|
98385
|
+
});
|
|
98386
|
+
}
|
|
98387
|
+
}
|
|
98388
|
+
return { primitives, dataLabels };
|
|
98389
|
+
}
|
|
98390
|
+
function categoryAbsTotals(seriesValues, catCount) {
|
|
98391
|
+
return Array.from(
|
|
98392
|
+
{ length: catCount },
|
|
98393
|
+
(_, ci) => seriesValues.reduce((sum, values) => sum + Math.abs(values[ci] ?? 0), 0)
|
|
98394
|
+
);
|
|
98395
|
+
}
|
|
98396
|
+
function computeStackedSeriesPlots(seriesValues, catCount, percent3) {
|
|
98397
|
+
const totals = percent3 ? categoryAbsTotals(seriesValues, catCount) : void 0, posRunning = new Array(catCount).fill(0), negRunning = new Array(catCount).fill(0);
|
|
98398
|
+
return seriesValues.map((values) => {
|
|
98399
|
+
const cumulative = [], base = [], own = [];
|
|
98400
|
+
for (let ci = 0; ci < catCount; ci++) {
|
|
98401
|
+
const raw = values[ci] ?? 0, total = totals?.[ci] ?? 0, val2 = percent3 ? total > 0 ? raw / total * 100 : 0 : raw, isNeg = val2 < 0, from = isNeg ? negRunning[ci] : posRunning[ci], to = from + val2;
|
|
98402
|
+
base.push(from);
|
|
98403
|
+
cumulative.push(to);
|
|
98404
|
+
own.push(val2);
|
|
98405
|
+
if (isNeg) {
|
|
98406
|
+
negRunning[ci] = to;
|
|
98407
|
+
} else {
|
|
98408
|
+
posRunning[ci] = to;
|
|
98409
|
+
}
|
|
98410
|
+
}
|
|
98411
|
+
return { cumulative, base, own };
|
|
98412
|
+
});
|
|
98413
|
+
}
|
|
98414
|
+
function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, secondaryIdx, sourceIndices2, xPositions, stacking = "clustered") {
|
|
98415
|
+
const primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, isStackedMode = stacking !== "clustered", isPercent = stacking === "percentStacked", resolved = chartData.series.map((series) => {
|
|
98292
98416
|
if (series.values.length === 0) {
|
|
98293
|
-
|
|
98417
|
+
return void 0;
|
|
98294
98418
|
}
|
|
98295
|
-
const
|
|
98296
|
-
const rawValues = sourceIndices2.map((sourceIndex) => series.values[sourceIndex] ?? 0);
|
|
98297
|
-
const displayBlanks = sourceIndices2.map((sourceIndex) => series.blanks?.[sourceIndex] ?? false);
|
|
98298
|
-
const { values: displayValues, visible } = resolveBlankDisplay(
|
|
98419
|
+
const rawValues = sourceIndices2.map((sourceIndex) => series.values[sourceIndex] ?? 0), displayBlanks = sourceIndices2.map((sourceIndex) => series.blanks?.[sourceIndex] ?? false), { values: displayValues, visible } = resolveBlankDisplay(
|
|
98299
98420
|
rawValues,
|
|
98300
98421
|
displayBlanks,
|
|
98301
98422
|
chartData.chartChrome?.dispBlanksAs
|
|
98302
98423
|
);
|
|
98303
|
-
|
|
98304
|
-
|
|
98305
|
-
|
|
98306
|
-
|
|
98307
|
-
|
|
98308
|
-
|
|
98309
|
-
|
|
98310
|
-
const
|
|
98311
|
-
|
|
98424
|
+
return { displayValues, visible };
|
|
98425
|
+
}), stackedPlots = isStackedMode ? computeStackedSeriesPlots(
|
|
98426
|
+
resolved.map((entry2) => entry2?.displayValues ?? []),
|
|
98427
|
+
catCount,
|
|
98428
|
+
isPercent
|
|
98429
|
+
) : void 0;
|
|
98430
|
+
for (let si = 0; si < chartData.series.length; si++) {
|
|
98431
|
+
const series = chartData.series[si], entry2 = resolved[si];
|
|
98432
|
+
if (!entry2) {
|
|
98433
|
+
continue;
|
|
98434
|
+
}
|
|
98435
|
+
const { displayValues, visible } = entry2, activeRange = isStackedMode ? primaryRange : secondaryIdx.has(si) && secondaryRange ? secondaryRange : primaryRange, plotValues = stackedPlots ? stackedPlots[si].cumulative : displayValues, pts = computeLinePoints(plotValues, catCount, layout, activeRange).map((point, index) => ({
|
|
98436
|
+
...point,
|
|
98437
|
+
x: xPositions?.[index] ?? point.x
|
|
98438
|
+
})), c = seriesColor2(series, si, chartData.colorPalette), seriesPart = { role: "series", seriesIndex: si }, allVisible = visible.every(Boolean);
|
|
98312
98439
|
if (allVisible) {
|
|
98313
98440
|
primitives.push(
|
|
98314
98441
|
series.smooth ? {
|
|
@@ -98346,8 +98473,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
|
|
|
98346
98473
|
if (!visible[displayIndex]) {
|
|
98347
98474
|
return;
|
|
98348
98475
|
}
|
|
98349
|
-
const idx = sourceIndices2[displayIndex] ?? displayIndex;
|
|
98350
|
-
const part = { role: "dataPoint", seriesIndex: si, pointIndex: idx };
|
|
98476
|
+
const idx = sourceIndices2[displayIndex] ?? displayIndex, part = { role: "dataPoint", seriesIndex: si, pointIndex: idx };
|
|
98351
98477
|
pushMarker(
|
|
98352
98478
|
primitives,
|
|
98353
98479
|
series,
|
|
@@ -98356,19 +98482,45 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
|
|
|
98356
98482
|
pt.y,
|
|
98357
98483
|
resolveDataPointFill(series, idx, c) ?? c,
|
|
98358
98484
|
2.5,
|
|
98359
|
-
part
|
|
98485
|
+
part,
|
|
98486
|
+
void 0,
|
|
98487
|
+
buildMarkTooltip(
|
|
98488
|
+
series.name,
|
|
98489
|
+
chartData.categories[idx],
|
|
98490
|
+
series.values[idx] ?? 0,
|
|
98491
|
+
series.numberFormat
|
|
98492
|
+
)
|
|
98360
98493
|
);
|
|
98361
98494
|
});
|
|
98362
98495
|
if (showLabels) {
|
|
98363
|
-
|
|
98496
|
+
const labelValues = stackedPlots ? stackedPlots[si].own : displayValues;
|
|
98497
|
+
labelValues.forEach((val2, displayIndex) => {
|
|
98364
98498
|
const pt = pts[displayIndex];
|
|
98499
|
+
if (!pt || !visible[displayIndex]) {
|
|
98500
|
+
return;
|
|
98501
|
+
}
|
|
98502
|
+
if (isPercent) {
|
|
98503
|
+
if (val2 === 0) {
|
|
98504
|
+
return;
|
|
98505
|
+
}
|
|
98506
|
+
dataLabels.push({
|
|
98507
|
+
kind: "text",
|
|
98508
|
+
x: pt.x,
|
|
98509
|
+
y: pt.y - 7,
|
|
98510
|
+
text: `${Math.round(val2)}%`,
|
|
98511
|
+
fontSize: DEFAULT_CHART_DATA_LABEL_PX,
|
|
98512
|
+
fill: "#334155",
|
|
98513
|
+
textAnchor: "middle"
|
|
98514
|
+
});
|
|
98515
|
+
return;
|
|
98516
|
+
}
|
|
98365
98517
|
const text2 = buildDataLabelText({
|
|
98366
98518
|
chartData,
|
|
98367
98519
|
series,
|
|
98368
98520
|
pointIndex: sourceIndices2[displayIndex] ?? displayIndex,
|
|
98369
98521
|
value: val2
|
|
98370
98522
|
});
|
|
98371
|
-
if (
|
|
98523
|
+
if (text2 === void 0) {
|
|
98372
98524
|
return;
|
|
98373
98525
|
}
|
|
98374
98526
|
dataLabels.push({
|
|
@@ -98385,26 +98537,41 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
|
|
|
98385
98537
|
}
|
|
98386
98538
|
return { primitives, dataLabels };
|
|
98387
98539
|
}
|
|
98388
|
-
function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositions) {
|
|
98389
|
-
const primitives = []
|
|
98390
|
-
|
|
98391
|
-
|
|
98392
|
-
|
|
98540
|
+
function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositions, stacking = "clustered") {
|
|
98541
|
+
const primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, isStackedMode = stacking !== "clustered", isPercent = stacking === "percentStacked", baselineY = valueToY2(0, range, layout.plotTop, layout.plotBottom), allDisplayValues = chartData.series.map(
|
|
98542
|
+
(series) => series.values.length === 0 ? void 0 : sourceIndices2.map((sourceIndex) => series.values[sourceIndex] ?? 0)
|
|
98543
|
+
), stackedPlots = isStackedMode ? computeStackedSeriesPlots(
|
|
98544
|
+
allDisplayValues.map((values) => values ?? []),
|
|
98545
|
+
catCount,
|
|
98546
|
+
isPercent
|
|
98547
|
+
) : void 0;
|
|
98393
98548
|
for (let si = 0; si < chartData.series.length; si++) {
|
|
98394
|
-
const series = chartData.series[si];
|
|
98395
|
-
if (
|
|
98549
|
+
const series = chartData.series[si], displayValues = allDisplayValues[si];
|
|
98550
|
+
if (!displayValues) {
|
|
98396
98551
|
continue;
|
|
98397
98552
|
}
|
|
98398
|
-
const displayValues =
|
|
98399
|
-
const pts = computeLinePoints(displayValues, catCount, layout, range).map((point, index) => ({
|
|
98553
|
+
const plot = stackedPlots?.[si], topValues = plot ? plot.cumulative : displayValues, pts = computeLinePoints(topValues, catCount, layout, range).map((point, index) => ({
|
|
98400
98554
|
...point,
|
|
98401
98555
|
x: xPositions?.[index] ?? point.x
|
|
98402
|
-
}));
|
|
98403
|
-
|
|
98404
|
-
|
|
98405
|
-
|
|
98406
|
-
|
|
98407
|
-
|
|
98556
|
+
})), c = seriesColor2(series, si, chartData.colorPalette), lineStr = linePointsToSvgString(pts), firstPt = pts[0], lastPt = pts[pts.length - 1];
|
|
98557
|
+
if (plot) {
|
|
98558
|
+
const baseStr = linePointsToSvgString(
|
|
98559
|
+
[
|
|
98560
|
+
...computeLinePoints(plot.base, catCount, layout, range).map((point, index) => ({
|
|
98561
|
+
...point,
|
|
98562
|
+
x: xPositions?.[index] ?? point.x
|
|
98563
|
+
}))
|
|
98564
|
+
].reverse()
|
|
98565
|
+
);
|
|
98566
|
+
primitives.push({
|
|
98567
|
+
kind: "polyline",
|
|
98568
|
+
points: `${lineStr} ${baseStr}`,
|
|
98569
|
+
stroke: "none",
|
|
98570
|
+
strokeWidth: 0,
|
|
98571
|
+
fill: c,
|
|
98572
|
+
part: { role: "series", seriesIndex: si }
|
|
98573
|
+
});
|
|
98574
|
+
} else if (firstPt && lastPt) {
|
|
98408
98575
|
primitives.push({
|
|
98409
98576
|
kind: "polyline",
|
|
98410
98577
|
points: `${firstPt.x.toFixed(2)},${baselineY.toFixed(2)} ${lineStr} ${lastPt.x.toFixed(2)},${baselineY.toFixed(2)}`,
|
|
@@ -98424,8 +98591,7 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
|
|
|
98424
98591
|
part: { role: "series", seriesIndex: si }
|
|
98425
98592
|
});
|
|
98426
98593
|
pts.forEach((pt, displayIndex) => {
|
|
98427
|
-
const idx = sourceIndices2[displayIndex] ?? displayIndex;
|
|
98428
|
-
const part = { role: "dataPoint", seriesIndex: si, pointIndex: idx };
|
|
98594
|
+
const idx = sourceIndices2[displayIndex] ?? displayIndex, part = { role: "dataPoint", seriesIndex: si, pointIndex: idx };
|
|
98429
98595
|
pushMarker(
|
|
98430
98596
|
primitives,
|
|
98431
98597
|
series,
|
|
@@ -98434,19 +98600,45 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
|
|
|
98434
98600
|
pt.y,
|
|
98435
98601
|
resolveDataPointFill(series, idx, c) ?? c,
|
|
98436
98602
|
2,
|
|
98437
|
-
part
|
|
98603
|
+
part,
|
|
98604
|
+
void 0,
|
|
98605
|
+
buildMarkTooltip(
|
|
98606
|
+
series.name,
|
|
98607
|
+
chartData.categories[idx],
|
|
98608
|
+
series.values[idx] ?? 0,
|
|
98609
|
+
series.numberFormat
|
|
98610
|
+
)
|
|
98438
98611
|
);
|
|
98439
98612
|
});
|
|
98440
98613
|
if (showLabels) {
|
|
98441
|
-
|
|
98614
|
+
const labelValues = plot ? plot.own : displayValues;
|
|
98615
|
+
labelValues.forEach((val2, displayIndex) => {
|
|
98442
98616
|
const pt = pts[displayIndex];
|
|
98617
|
+
if (!pt) {
|
|
98618
|
+
return;
|
|
98619
|
+
}
|
|
98620
|
+
if (isPercent) {
|
|
98621
|
+
if (val2 === 0) {
|
|
98622
|
+
return;
|
|
98623
|
+
}
|
|
98624
|
+
dataLabels.push({
|
|
98625
|
+
kind: "text",
|
|
98626
|
+
x: pt.x,
|
|
98627
|
+
y: pt.y - 6,
|
|
98628
|
+
text: `${Math.round(val2)}%`,
|
|
98629
|
+
fontSize: DEFAULT_CHART_DATA_LABEL_PX,
|
|
98630
|
+
fill: "#334155",
|
|
98631
|
+
textAnchor: "middle"
|
|
98632
|
+
});
|
|
98633
|
+
return;
|
|
98634
|
+
}
|
|
98443
98635
|
const text2 = buildDataLabelText({
|
|
98444
98636
|
chartData,
|
|
98445
98637
|
series,
|
|
98446
98638
|
pointIndex: sourceIndices2[displayIndex] ?? displayIndex,
|
|
98447
98639
|
value: val2
|
|
98448
98640
|
});
|
|
98449
|
-
if (
|
|
98641
|
+
if (text2 === void 0) {
|
|
98450
98642
|
return;
|
|
98451
98643
|
}
|
|
98452
98644
|
dataLabels.push({
|
|
@@ -98463,151 +98655,6 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
|
|
|
98463
98655
|
}
|
|
98464
98656
|
return { primitives, dataLabels };
|
|
98465
98657
|
}
|
|
98466
|
-
function seriesXValues(chartData, series) {
|
|
98467
|
-
if (series.xValues && series.xValues.length > 0) {
|
|
98468
|
-
return series.xValues;
|
|
98469
|
-
}
|
|
98470
|
-
const fromCategories = chartData.categories.map(Number);
|
|
98471
|
-
return fromCategories.length > 0 ? fromCategories : void 0;
|
|
98472
|
-
}
|
|
98473
|
-
function scatterDrawsLine(chartData, series) {
|
|
98474
|
-
if (series.lineNoFill === true) {
|
|
98475
|
-
return false;
|
|
98476
|
-
}
|
|
98477
|
-
const style = chartData.scatterStyle;
|
|
98478
|
-
return style === "line" || style === "lineMarker" || style === "smooth" || style === "smoothMarker";
|
|
98479
|
-
}
|
|
98480
|
-
function buildScatter(chartData, layout, range) {
|
|
98481
|
-
const primitives = [];
|
|
98482
|
-
const dataLabels = [];
|
|
98483
|
-
const showLabels = chartData.style?.hasDataLabels;
|
|
98484
|
-
const allIndices = chartData.series.flatMap((s) => s.values.map((_, i) => i));
|
|
98485
|
-
const maxXIndex = Math.max(1, ...allIndices);
|
|
98486
|
-
const perSeriesX = chartData.series.map((series) => seriesXValues(chartData, series));
|
|
98487
|
-
const xDomain = computeScatterXDomain(perSeriesX);
|
|
98488
|
-
const smoothStyle = chartData.scatterStyle === "smooth" || chartData.scatterStyle === "smoothMarker";
|
|
98489
|
-
for (let si = 0; si < chartData.series.length; si++) {
|
|
98490
|
-
const series = chartData.series[si];
|
|
98491
|
-
const c = seriesColor2(series, si, chartData.colorPalette);
|
|
98492
|
-
const dots = computeScatterDots(
|
|
98493
|
-
series.values,
|
|
98494
|
-
maxXIndex,
|
|
98495
|
-
layout,
|
|
98496
|
-
range,
|
|
98497
|
-
perSeriesX[si],
|
|
98498
|
-
xDomain
|
|
98499
|
-
);
|
|
98500
|
-
if (scatterDrawsLine(chartData, series) && dots.length >= 2) {
|
|
98501
|
-
const points3 = dots.map((dot) => ({ x: dot.cx, y: dot.cy }));
|
|
98502
|
-
const seriesPart = { role: "series", seriesIndex: si };
|
|
98503
|
-
primitives.push(
|
|
98504
|
-
series.smooth ?? smoothStyle ? {
|
|
98505
|
-
kind: "path",
|
|
98506
|
-
d: smoothLinePath(points3),
|
|
98507
|
-
stroke: c,
|
|
98508
|
-
strokeWidth: 2.4,
|
|
98509
|
-
fill: "none",
|
|
98510
|
-
part: seriesPart
|
|
98511
|
-
} : {
|
|
98512
|
-
kind: "polyline",
|
|
98513
|
-
points: linePointsToSvgString(points3),
|
|
98514
|
-
stroke: c,
|
|
98515
|
-
strokeWidth: 2.4,
|
|
98516
|
-
fill: "none",
|
|
98517
|
-
part: seriesPart
|
|
98518
|
-
}
|
|
98519
|
-
);
|
|
98520
|
-
}
|
|
98521
|
-
dots.forEach((dot, vi) => {
|
|
98522
|
-
const part = { role: "dataPoint", seriesIndex: si, pointIndex: vi };
|
|
98523
|
-
pushMarker(
|
|
98524
|
-
primitives,
|
|
98525
|
-
series,
|
|
98526
|
-
vi,
|
|
98527
|
-
dot.cx,
|
|
98528
|
-
dot.cy,
|
|
98529
|
-
resolveDataPointFill(series, vi, c) ?? c,
|
|
98530
|
-
4,
|
|
98531
|
-
part,
|
|
98532
|
-
0.85
|
|
98533
|
-
);
|
|
98534
|
-
});
|
|
98535
|
-
if (showLabels) {
|
|
98536
|
-
series.values.forEach((val2, vi) => {
|
|
98537
|
-
const dot = dots[vi];
|
|
98538
|
-
const text2 = buildDataLabelText({ chartData, series, pointIndex: vi, value: val2 });
|
|
98539
|
-
if (!dot || text2 === void 0) {
|
|
98540
|
-
return;
|
|
98541
|
-
}
|
|
98542
|
-
dataLabels.push({
|
|
98543
|
-
kind: "text",
|
|
98544
|
-
x: dot.cx,
|
|
98545
|
-
y: dot.cy - 6,
|
|
98546
|
-
text: text2,
|
|
98547
|
-
fontSize: DEFAULT_CHART_DATA_LABEL_PX,
|
|
98548
|
-
fill: "#334155",
|
|
98549
|
-
textAnchor: "middle"
|
|
98550
|
-
});
|
|
98551
|
-
});
|
|
98552
|
-
}
|
|
98553
|
-
}
|
|
98554
|
-
return { primitives, dataLabels };
|
|
98555
|
-
}
|
|
98556
|
-
function buildBubbles(chartData, layout, range) {
|
|
98557
|
-
const primitives = [];
|
|
98558
|
-
const dataLabels = [];
|
|
98559
|
-
const showLabels = chartData.style?.hasDataLabels;
|
|
98560
|
-
const allIndices = chartData.series.flatMap((s) => s.values.map((_, i) => i));
|
|
98561
|
-
const maxXIndex = Math.max(1, ...allIndices);
|
|
98562
|
-
const perSeriesX = chartData.series.map((series) => seriesXValues(chartData, series));
|
|
98563
|
-
const xDomain = computeScatterXDomain(perSeriesX);
|
|
98564
|
-
const allSizes = chartData.series.flatMap((series) => series.bubbleSizes ?? []);
|
|
98565
|
-
const maxBubble = allSizes.length > 0 ? Math.max(1, ...allSizes.map(Math.abs)) : 1;
|
|
98566
|
-
const medianRadius = Math.min(layout.plotWidth, layout.plotHeight) * 0.04;
|
|
98567
|
-
for (let si = 0; si < chartData.series.length; si++) {
|
|
98568
|
-
const series = chartData.series[si];
|
|
98569
|
-
const c = seriesColor2(series, si, chartData.colorPalette);
|
|
98570
|
-
const dots = computeScatterDots(
|
|
98571
|
-
series.values,
|
|
98572
|
-
maxXIndex,
|
|
98573
|
-
layout,
|
|
98574
|
-
range,
|
|
98575
|
-
perSeriesX[si],
|
|
98576
|
-
xDomain
|
|
98577
|
-
);
|
|
98578
|
-
dots.forEach((dot, vi) => {
|
|
98579
|
-
const r = computeBubbleRadius(series.bubbleSizes?.[vi], maxBubble, medianRadius);
|
|
98580
|
-
primitives.push({
|
|
98581
|
-
kind: "circle",
|
|
98582
|
-
cx: dot.cx,
|
|
98583
|
-
cy: dot.cy,
|
|
98584
|
-
r,
|
|
98585
|
-
fill: resolveDataPointFill(series, vi, c) ?? c,
|
|
98586
|
-
opacity: 0.6,
|
|
98587
|
-
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi }
|
|
98588
|
-
});
|
|
98589
|
-
});
|
|
98590
|
-
if (showLabels) {
|
|
98591
|
-
series.values.forEach((val2, vi) => {
|
|
98592
|
-
const dot = dots[vi];
|
|
98593
|
-
const text2 = buildDataLabelText({ chartData, series, pointIndex: vi, value: val2 });
|
|
98594
|
-
if (!dot || text2 === void 0) {
|
|
98595
|
-
return;
|
|
98596
|
-
}
|
|
98597
|
-
dataLabels.push({
|
|
98598
|
-
kind: "text",
|
|
98599
|
-
x: dot.cx,
|
|
98600
|
-
y: dot.cy - 10,
|
|
98601
|
-
text: text2,
|
|
98602
|
-
fontSize: DEFAULT_CHART_DATA_LABEL_PX,
|
|
98603
|
-
fill: "#334155",
|
|
98604
|
-
textAnchor: "middle"
|
|
98605
|
-
});
|
|
98606
|
-
});
|
|
98607
|
-
}
|
|
98608
|
-
}
|
|
98609
|
-
return { primitives, dataLabels };
|
|
98610
|
-
}
|
|
98611
98658
|
function categoryX(index, catCount, layout, options) {
|
|
98612
98659
|
const explicit = options.xPositions?.[index];
|
|
98613
98660
|
if (explicit !== void 0) {
|
|
@@ -99115,10 +99162,7 @@ function valueToX(val2, range, leftX, rightX) {
|
|
|
99115
99162
|
const usable = rightX - leftX;
|
|
99116
99163
|
let ratio;
|
|
99117
99164
|
if (range.logScale && range.logBase) {
|
|
99118
|
-
const base = range.logBase;
|
|
99119
|
-
const clampedVal = Math.max(val2, range.min);
|
|
99120
|
-
const logVal = Math.log(clampedVal) / Math.log(base);
|
|
99121
|
-
const logMin = Math.log(range.min) / Math.log(base);
|
|
99165
|
+
const base = range.logBase, clampedVal = Math.max(val2, range.min), logVal = Math.log(clampedVal) / Math.log(base), logMin = Math.log(range.min) / Math.log(base);
|
|
99122
99166
|
ratio = (logVal - logMin) / range.span;
|
|
99123
99167
|
} else {
|
|
99124
99168
|
ratio = (val2 - range.min) / range.span;
|
|
@@ -99126,8 +99170,7 @@ function valueToX(val2, range, leftX, rightX) {
|
|
|
99126
99170
|
return range.reverseOrder ? rightX - ratio * usable : leftX + ratio * usable;
|
|
99127
99171
|
}
|
|
99128
99172
|
function buildTransposedValueAxis(range, layout) {
|
|
99129
|
-
const gridlines = [];
|
|
99130
|
-
const axisLabels = [];
|
|
99173
|
+
const gridlines = [], axisLabels = [];
|
|
99131
99174
|
for (const val2 of axisTickValues(range)) {
|
|
99132
99175
|
const x = valueToX(val2, range, layout.plotLeft, layout.plotRight);
|
|
99133
99176
|
gridlines.push({
|
|
@@ -99152,8 +99195,7 @@ function buildTransposedValueAxis(range, layout) {
|
|
|
99152
99195
|
return { gridlines, axisLabels };
|
|
99153
99196
|
}
|
|
99154
99197
|
function buildSideCategoryLabels(categoryLabels, layout) {
|
|
99155
|
-
const catCount = Math.max(categoryLabels.length, 1);
|
|
99156
|
-
const band = layout.plotHeight / catCount;
|
|
99198
|
+
const catCount = Math.max(categoryLabels.length, 1), band = layout.plotHeight / catCount;
|
|
99157
99199
|
return categoryLabels.map((label, i) => ({
|
|
99158
99200
|
kind: "text",
|
|
99159
99201
|
x: layout.plotLeft - 4,
|
|
@@ -99179,16 +99221,7 @@ function barFill(chartData, series, seriesIndex, pointIndex) {
|
|
|
99179
99221
|
return resolveDataPointFill(series, pointIndex, paletteColor2(seriesIndex, palette)) ?? seriesColor2(series, seriesIndex, palette);
|
|
99180
99222
|
}
|
|
99181
99223
|
function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
99182
|
-
const layout = computePlotLayout(element.width, element.height, chartData, true)
|
|
99183
|
-
const catCount = Math.max(categoryLabels.length, 1);
|
|
99184
|
-
const series = chartData.series;
|
|
99185
|
-
const grouping = chartData.grouping ?? "clustered";
|
|
99186
|
-
const isStacked = grouping === "stacked" || grouping === "percentStacked";
|
|
99187
|
-
const isPercent = grouping === "percentStacked";
|
|
99188
|
-
const range = isPercent ? { min: 0, max: 100, span: 100 } : isStacked ? computeStackedValueRange(series, catCount) : computeValueRangeForChart(series, chartData.axes);
|
|
99189
|
-
const { gridlines, axisLabels } = buildTransposedValueAxis(range, layout);
|
|
99190
|
-
const zeroX = valueToX(0, range, layout.plotLeft, layout.plotRight);
|
|
99191
|
-
const zeroLine = range.min < 0 && range.max > 0 ? {
|
|
99224
|
+
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 ? {
|
|
99192
99225
|
kind: "line",
|
|
99193
99226
|
x1: zeroX,
|
|
99194
99227
|
y1: layout.plotTop,
|
|
@@ -99196,25 +99229,12 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
|
99196
99229
|
y2: layout.plotBottom,
|
|
99197
99230
|
stroke: ZERO_LINE_COLOR,
|
|
99198
99231
|
strokeWidth: 1
|
|
99199
|
-
} : void 0;
|
|
99200
|
-
const primitives = [];
|
|
99201
|
-
const dataLabels = [];
|
|
99202
|
-
const showLabels = chartData.style?.hasDataLabels;
|
|
99203
|
-
const band = layout.plotHeight / catCount;
|
|
99232
|
+
} : void 0, primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, band = layout.plotHeight / catCount;
|
|
99204
99233
|
if (!isStacked) {
|
|
99205
|
-
const seriesCount = Math.max(series.length, 1);
|
|
99206
|
-
const singleBarHeight = chartData.barGapWidth !== void 0 ? band / (seriesCount + Math.max(chartData.barGapWidth, 0) / 100) : band * 0.7 / seriesCount;
|
|
99207
|
-
const overlap = chartData.barOverlap ?? 0;
|
|
99208
|
-
const step = singleBarHeight * (1 - overlap / 100);
|
|
99209
|
-
const clusterHeight = singleBarHeight + step * (seriesCount - 1);
|
|
99210
|
-
const groupOffset = (band - clusterHeight) / 2;
|
|
99234
|
+
const seriesCount = Math.max(series.length, 1), singleBarHeight = chartData.barGapWidth !== void 0 ? band / (seriesCount + Math.max(chartData.barGapWidth, 0) / 100) : band * 0.7 / seriesCount, overlap = chartData.barOverlap ?? 0, step = singleBarHeight * (1 - overlap / 100), clusterHeight = singleBarHeight + step * (seriesCount - 1), groupOffset = (band - clusterHeight) / 2;
|
|
99211
99235
|
for (let ci = 0; ci < catCount; ci++) {
|
|
99212
99236
|
for (let si = 0; si < series.length; si++) {
|
|
99213
|
-
const val2 = series[si].values[ci] ?? 0;
|
|
99214
|
-
const y = layout.plotTop + band * ci + groupOffset + step * si;
|
|
99215
|
-
const valX = valueToX(val2, range, layout.plotLeft, layout.plotRight);
|
|
99216
|
-
const x = Math.min(zeroX, valX);
|
|
99217
|
-
const w = Math.max(Math.abs(valX - zeroX), 1);
|
|
99237
|
+
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);
|
|
99218
99238
|
primitives.push({
|
|
99219
99239
|
kind: "rect",
|
|
99220
99240
|
x,
|
|
@@ -99223,7 +99243,13 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
|
99223
99243
|
h: singleBarHeight,
|
|
99224
99244
|
fill: barFill(chartData, series[si], si, ci),
|
|
99225
99245
|
rx: 1,
|
|
99226
|
-
part: { role: "dataPoint", seriesIndex: si, pointIndex: ci }
|
|
99246
|
+
part: { role: "dataPoint", seriesIndex: si, pointIndex: ci },
|
|
99247
|
+
title: buildMarkTooltip(
|
|
99248
|
+
series[si].name,
|
|
99249
|
+
categoryLabels[ci],
|
|
99250
|
+
val2,
|
|
99251
|
+
series[si].numberFormat
|
|
99252
|
+
)
|
|
99227
99253
|
});
|
|
99228
99254
|
if (showLabels) {
|
|
99229
99255
|
dataLabels.push({
|
|
@@ -99240,27 +99266,16 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
|
99240
99266
|
}
|
|
99241
99267
|
}
|
|
99242
99268
|
} else {
|
|
99243
|
-
const totals = isPercent ? categoryTotals2(series, catCount) : [];
|
|
99244
|
-
const barH = band * (isPercent ? 0.6 : 0.7);
|
|
99245
|
-
const barOffset = (band - barH) / 2;
|
|
99269
|
+
const totals = isPercent ? categoryTotals2(series, catCount) : [], barH = band * (isPercent ? 0.6 : 0.7), barOffset = (band - barH) / 2;
|
|
99246
99270
|
for (let ci = 0; ci < catCount; ci++) {
|
|
99247
|
-
let posRunning = 0;
|
|
99248
|
-
let negRunning = 0;
|
|
99271
|
+
let posRunning = 0, negRunning = 0;
|
|
99249
99272
|
const catTotal = isPercent ? totals[ci] || 1 : 1;
|
|
99250
99273
|
for (let si = 0; si < series.length; si++) {
|
|
99251
|
-
const rawVal = series[si].values[ci] ?? 0;
|
|
99252
|
-
const val2 = isPercent ? rawVal / catTotal * 100 : rawVal;
|
|
99274
|
+
const rawVal = series[si].values[ci] ?? 0, val2 = isPercent ? rawVal / catTotal * 100 : rawVal;
|
|
99253
99275
|
if (val2 === 0) {
|
|
99254
99276
|
continue;
|
|
99255
99277
|
}
|
|
99256
|
-
const isNeg = val2 < 0;
|
|
99257
|
-
const base = isNeg ? negRunning : posRunning;
|
|
99258
|
-
const top = base + val2;
|
|
99259
|
-
const y = layout.plotTop + band * ci + barOffset;
|
|
99260
|
-
const baseX = valueToX(base, range, layout.plotLeft, layout.plotRight);
|
|
99261
|
-
const topX = valueToX(top, range, layout.plotLeft, layout.plotRight);
|
|
99262
|
-
const x = Math.min(baseX, topX);
|
|
99263
|
-
const w = Math.max(Math.abs(topX - baseX), 0.5);
|
|
99278
|
+
const isNeg = val2 < 0, base = isNeg ? negRunning : posRunning, top = base + val2, y = layout.plotTop + band * ci + barOffset, baseX = valueToX(base, range, layout.plotLeft, layout.plotRight), topX = valueToX(top, range, layout.plotLeft, layout.plotRight), x = Math.min(baseX, topX), w = Math.max(Math.abs(topX - baseX), 0.5);
|
|
99264
99279
|
primitives.push({
|
|
99265
99280
|
kind: "rect",
|
|
99266
99281
|
x,
|
|
@@ -99269,7 +99284,13 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
|
99269
99284
|
h: barH,
|
|
99270
99285
|
fill: barFill(chartData, series[si], si, ci),
|
|
99271
99286
|
rx: 1,
|
|
99272
|
-
part: { role: "dataPoint", seriesIndex: si, pointIndex: ci }
|
|
99287
|
+
part: { role: "dataPoint", seriesIndex: si, pointIndex: ci },
|
|
99288
|
+
title: buildMarkTooltip(
|
|
99289
|
+
series[si].name,
|
|
99290
|
+
categoryLabels[ci],
|
|
99291
|
+
rawVal,
|
|
99292
|
+
series[si].numberFormat
|
|
99293
|
+
)
|
|
99273
99294
|
});
|
|
99274
99295
|
if (showLabels && Math.abs(val2) > 0) {
|
|
99275
99296
|
dataLabels.push({
|
|
@@ -99292,8 +99313,7 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
|
|
|
99292
99313
|
}
|
|
99293
99314
|
}
|
|
99294
99315
|
}
|
|
99295
|
-
const legendPos = chartData.style?.legendPosition ?? "b"
|
|
99296
|
-
const { legend, legendX, legendY, legendAnchor } = buildLegend(
|
|
99316
|
+
const legendPos = chartData.style?.legendPosition ?? "b", { legend, legendX, legendY, legendAnchor } = buildLegend(
|
|
99297
99317
|
series,
|
|
99298
99318
|
chartData.colorPalette,
|
|
99299
99319
|
layout.svgWidth,
|
|
@@ -99928,7 +99948,7 @@ function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
|
|
|
99928
99948
|
const layoutOpts = computeLayoutOptions(chartData.axes, chartData.dataTable, seriesCount);
|
|
99929
99949
|
const layout = computePlotLayout(element.width, element.height, chartData, true, layoutOpts);
|
|
99930
99950
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
99931
|
-
const isStacked = kind === "bar" && (chartData.grouping === "stacked" || chartData.grouping === "percentStacked");
|
|
99951
|
+
const isStacked = (kind === "bar" || kind === "line" || kind === "area") && (chartData.grouping === "stacked" || chartData.grouping === "percentStacked");
|
|
99932
99952
|
const isPercent = isStacked && chartData.grouping === "percentStacked";
|
|
99933
99953
|
const { secondary } = splitSeriesByAxis(chartData.series, chartData.axes);
|
|
99934
99954
|
const secondaryIdx = new Set(secondary.map((e) => e.index));
|
|
@@ -99990,7 +100010,8 @@ function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
|
|
|
99990
100010
|
secondaryRange,
|
|
99991
100011
|
secondaryIdx,
|
|
99992
100012
|
sourceIndices2,
|
|
99993
|
-
horizontalAxis.xPositions
|
|
100013
|
+
horizontalAxis.xPositions,
|
|
100014
|
+
isStacked ? isPercent ? "percentStacked" : "stacked" : "clustered"
|
|
99994
100015
|
);
|
|
99995
100016
|
} else if (kind === "area") {
|
|
99996
100017
|
plot = buildAreas(
|
|
@@ -99999,7 +100020,8 @@ function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
|
|
|
99999
100020
|
layout,
|
|
100000
100021
|
primaryRange,
|
|
100001
100022
|
sourceIndices2,
|
|
100002
|
-
horizontalAxis.xPositions
|
|
100023
|
+
horizontalAxis.xPositions,
|
|
100024
|
+
isStacked ? isPercent ? "percentStacked" : "stacked" : "clustered"
|
|
100003
100025
|
);
|
|
100004
100026
|
} else if (kind === "scatter") {
|
|
100005
100027
|
plot = buildScatter(chartData, layout, primaryRange);
|
|
@@ -102646,8 +102668,7 @@ function seriesColor2(series, index, colorPalette) {
|
|
|
102646
102668
|
return series.color ?? series.marker?.spPr?.fillColor ?? paletteColor2(index, colorPalette);
|
|
102647
102669
|
}
|
|
102648
102670
|
function computeValueRange2(series) {
|
|
102649
|
-
let dataMin = Number.POSITIVE_INFINITY;
|
|
102650
|
-
let dataMax = Number.NEGATIVE_INFINITY;
|
|
102671
|
+
let dataMin = Number.POSITIVE_INFINITY, dataMax = Number.NEGATIVE_INFINITY;
|
|
102651
102672
|
for (const item of series) {
|
|
102652
102673
|
for (const value of item.values) {
|
|
102653
102674
|
if (value < dataMin) {
|
|
@@ -102665,11 +102686,9 @@ function computeValueRange2(series) {
|
|
|
102665
102686
|
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
102666
102687
|
}
|
|
102667
102688
|
function computeStackedValueRange(series, catCount) {
|
|
102668
|
-
let maxSum = 0;
|
|
102669
|
-
let minSum = 0;
|
|
102689
|
+
let maxSum = 0, minSum = 0;
|
|
102670
102690
|
for (let ci = 0; ci < catCount; ci++) {
|
|
102671
|
-
let pos2 = 0;
|
|
102672
|
-
let neg = 0;
|
|
102691
|
+
let pos2 = 0, neg = 0;
|
|
102673
102692
|
for (const s of series) {
|
|
102674
102693
|
const v = s.values[ci] ?? 0;
|
|
102675
102694
|
if (v >= 0) {
|
|
@@ -102688,10 +102707,7 @@ function valueToY2(val2, range, topY, bottomY) {
|
|
|
102688
102707
|
const usable = bottomY - topY;
|
|
102689
102708
|
let ratio;
|
|
102690
102709
|
if (range.logScale && range.logBase) {
|
|
102691
|
-
const base = range.logBase;
|
|
102692
|
-
const clampedVal = Math.max(val2, range.min);
|
|
102693
|
-
const logVal = Math.log(clampedVal) / Math.log(base);
|
|
102694
|
-
const logMin = Math.log(range.min) / Math.log(base);
|
|
102710
|
+
const base = range.logBase, clampedVal = Math.max(val2, range.min), logVal = Math.log(clampedVal) / Math.log(base), logMin = Math.log(range.min) / Math.log(base);
|
|
102695
102711
|
ratio = (logVal - logMin) / range.span;
|
|
102696
102712
|
} else {
|
|
102697
102713
|
ratio = (val2 - range.min) / range.span;
|
|
@@ -102714,23 +102730,20 @@ function formatAxisValue2(val2, formatCode) {
|
|
|
102714
102730
|
}
|
|
102715
102731
|
return val2.toFixed(1);
|
|
102716
102732
|
}
|
|
102733
|
+
function buildMarkTooltip(seriesName, categoryLabel, value, numberFormat) {
|
|
102734
|
+
const label = [seriesName, categoryLabel].filter((part) => Boolean(part && part.length > 0)).join(", "), formatted = formatAxisValue2(value, numberFormat);
|
|
102735
|
+
return label.length > 0 ? `${label}: ${formatted}` : formatted;
|
|
102736
|
+
}
|
|
102717
102737
|
function categoryAxisBand(chartData) {
|
|
102718
102738
|
const axis = chartData.axes?.find(
|
|
102719
102739
|
(candidate) => candidate.axisType === "catAx" || candidate.axisType === "dateAx"
|
|
102720
|
-
);
|
|
102721
|
-
const fontPx = axis?.fontSize !== void 0 ? chartFontPx(axis.fontSize) : DEFAULT_CHART_TEXT_PX;
|
|
102722
|
-
const offset = 4 + 8 * ((axis?.labelOffset ?? 100) / 100);
|
|
102740
|
+
), fontPx = axis?.fontSize !== void 0 ? chartFontPx(axis.fontSize) : DEFAULT_CHART_TEXT_PX, offset = 4 + 8 * ((axis?.labelOffset ?? 100) / 100);
|
|
102723
102741
|
return Math.max(24, offset + fontPx * 1.2);
|
|
102724
102742
|
}
|
|
102725
102743
|
function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, options) {
|
|
102726
|
-
const svgWidth = Math.max(1, elementWidth);
|
|
102727
|
-
|
|
102728
|
-
|
|
102729
|
-
let plotTop = 8;
|
|
102730
|
-
let plotRight = svgWidth - 8;
|
|
102731
|
-
let plotBottom = svgHeight - (hasAxes ? categoryAxisBand(chartData) : 8);
|
|
102732
|
-
const style = chartData.style;
|
|
102733
|
-
const legendPos = style?.legendPosition ?? "b";
|
|
102744
|
+
const svgWidth = Math.max(1, elementWidth), svgHeight = Math.max(1, elementHeight);
|
|
102745
|
+
let plotLeft = hasAxes ? 48 : 8, plotTop = 8, plotRight = svgWidth - 8, plotBottom = svgHeight - (hasAxes ? categoryAxisBand(chartData) : 8);
|
|
102746
|
+
const style = chartData.style, legendPos = style?.legendPosition ?? "b";
|
|
102734
102747
|
if (style?.hasTitle) {
|
|
102735
102748
|
plotTop += 20;
|
|
102736
102749
|
}
|
|
@@ -102755,8 +102768,7 @@ function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, opti
|
|
|
102755
102768
|
const rowCount = options.dataTableRowCount ?? 1;
|
|
102756
102769
|
plotBottom -= 14 + rowCount * 14;
|
|
102757
102770
|
}
|
|
102758
|
-
const plotWidth = Math.max(plotRight - plotLeft, 1);
|
|
102759
|
-
const plotHeight = Math.max(plotBottom - plotTop, 1);
|
|
102771
|
+
const plotWidth = Math.max(plotRight - plotLeft, 1), plotHeight = Math.max(plotBottom - plotTop, 1);
|
|
102760
102772
|
return {
|
|
102761
102773
|
svgWidth,
|
|
102762
102774
|
svgHeight,
|
|
@@ -102786,8 +102798,7 @@ function axisTickValues(range) {
|
|
|
102786
102798
|
);
|
|
102787
102799
|
}
|
|
102788
102800
|
function buildGridlinesAndLabels(range, layout) {
|
|
102789
|
-
const gridlines = [];
|
|
102790
|
-
const axisLabels = [];
|
|
102801
|
+
const gridlines = [], axisLabels = [];
|
|
102791
102802
|
for (const val2 of axisTickValues(range)) {
|
|
102792
102803
|
const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
102793
102804
|
gridlines.push({
|
|
@@ -102847,9 +102858,7 @@ function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotT
|
|
|
102847
102858
|
color: seriesColor2(s, i, colorPalette),
|
|
102848
102859
|
label: s.name
|
|
102849
102860
|
}));
|
|
102850
|
-
let legendX = svgWidth / 2;
|
|
102851
|
-
let legendY = svgHeight - 8;
|
|
102852
|
-
let legendAnchor = "middle";
|
|
102861
|
+
let legendX = svgWidth / 2, legendY = svgHeight - 8, legendAnchor = "middle";
|
|
102853
102862
|
if (legendPos === "r") {
|
|
102854
102863
|
legendX = svgWidth - 75;
|
|
102855
102864
|
legendY = plotTop;
|
|
@@ -102864,19 +102873,10 @@ function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotT
|
|
|
102864
102873
|
return { legend, legendX, legendY, legendAnchor };
|
|
102865
102874
|
}
|
|
102866
102875
|
function computeBarRects(series, catCount, layout, range, colorPalette) {
|
|
102867
|
-
const rects = [];
|
|
102868
|
-
const seriesCount = Math.max(series.length, 1);
|
|
102869
|
-
const barGroupWidth = layout.plotWidth / Math.max(catCount, 1);
|
|
102870
|
-
const singleBarWidth = barGroupWidth * 0.7 / seriesCount;
|
|
102871
|
-
const groupOffset = (barGroupWidth - singleBarWidth * seriesCount) / 2;
|
|
102876
|
+
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;
|
|
102872
102877
|
for (let ci = 0; ci < catCount; ci++) {
|
|
102873
102878
|
for (let si = 0; si < series.length; si++) {
|
|
102874
|
-
const val2 = series[si].values[ci] ?? 0;
|
|
102875
|
-
const x = layout.plotLeft + barGroupWidth * ci + groupOffset + singleBarWidth * si;
|
|
102876
|
-
const zeroY = valueToY2(0, range, layout.plotTop, layout.plotBottom);
|
|
102877
|
-
const valY = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
102878
|
-
const y = Math.min(zeroY, valY);
|
|
102879
|
-
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
102879
|
+
const val2 = series[si].values[ci] ?? 0, x = layout.plotLeft + barGroupWidth * ci + groupOffset + singleBarWidth * si, zeroY = valueToY2(0, range, layout.plotTop, layout.plotBottom), valY = valueToY2(val2, range, layout.plotTop, layout.plotBottom), y = Math.min(zeroY, valY), h = Math.max(Math.abs(zeroY - valY), 1);
|
|
102880
102880
|
rects.push({
|
|
102881
102881
|
x,
|
|
102882
102882
|
y,
|
|
@@ -102889,20 +102889,15 @@ function computeBarRects(series, catCount, layout, range, colorPalette) {
|
|
|
102889
102889
|
return rects;
|
|
102890
102890
|
}
|
|
102891
102891
|
function computeStackedBarRects(series, catCount, layout, range, colorPalette) {
|
|
102892
|
-
const rects = [];
|
|
102893
|
-
const barW = layout.plotWidth / Math.max(catCount, 1) * 0.7;
|
|
102894
|
-
const barOffset = (layout.plotWidth / Math.max(catCount, 1) - barW) / 2;
|
|
102895
|
-
const zeroY = valueToY2(0, range, layout.plotTop, layout.plotBottom);
|
|
102892
|
+
const rects = [], barW = layout.plotWidth / Math.max(catCount, 1) * 0.7, barOffset = (layout.plotWidth / Math.max(catCount, 1) - barW) / 2, zeroY = valueToY2(0, range, layout.plotTop, layout.plotBottom);
|
|
102896
102893
|
for (let ci = 0; ci < catCount; ci++) {
|
|
102897
|
-
let posTop = zeroY;
|
|
102898
|
-
let negBottom = zeroY;
|
|
102894
|
+
let posTop = zeroY, negBottom = zeroY;
|
|
102899
102895
|
for (let si = 0; si < series.length; si++) {
|
|
102900
102896
|
const val2 = series[si].values[ci] ?? 0;
|
|
102901
102897
|
if (val2 === 0) {
|
|
102902
102898
|
continue;
|
|
102903
102899
|
}
|
|
102904
|
-
const x = layout.plotLeft + layout.plotWidth / Math.max(catCount, 1) * ci + barOffset
|
|
102905
|
-
const h = Math.max(
|
|
102900
|
+
const x = layout.plotLeft + layout.plotWidth / Math.max(catCount, 1) * ci + barOffset, h = Math.max(
|
|
102906
102901
|
Math.abs(
|
|
102907
102902
|
valueToY2(val2, range, layout.plotTop, layout.plotBottom) - valueToY2(0, range, layout.plotTop, layout.plotBottom)
|
|
102908
102903
|
),
|
|
@@ -102940,9 +102935,7 @@ function computeStackedBarRects(series, catCount, layout, range, colorPalette) {
|
|
|
102940
102935
|
function computeLinePoints(values, catCount, layout, range) {
|
|
102941
102936
|
const n = Math.max(catCount, 2);
|
|
102942
102937
|
return values.map((val2, i) => {
|
|
102943
|
-
const nx = n > 1 ? i / (n - 1) : 0;
|
|
102944
|
-
const x = layout.plotLeft + layout.plotWidth * nx;
|
|
102945
|
-
const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
102938
|
+
const nx = n > 1 ? i / (n - 1) : 0, x = layout.plotLeft + layout.plotWidth * nx, y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
102946
102939
|
return { x, y };
|
|
102947
102940
|
});
|
|
102948
102941
|
}
|
|
@@ -102950,49 +102943,30 @@ function linePointsToSvgString(points3) {
|
|
|
102950
102943
|
return points3.map((p) => `${p.x.toFixed(2)},${p.y.toFixed(2)}`).join(" ");
|
|
102951
102944
|
}
|
|
102952
102945
|
function computePieSlicePath(cx, cy, outerR, innerR, startAngle, endAngle) {
|
|
102953
|
-
const largeArc = endAngle - startAngle > Math.PI ? 1 : 0;
|
|
102954
|
-
const x1 = cx + outerR * Math.cos(startAngle);
|
|
102955
|
-
const y1 = cy + outerR * Math.sin(startAngle);
|
|
102956
|
-
const x2 = cx + outerR * Math.cos(endAngle);
|
|
102957
|
-
const y2 = cy + outerR * Math.sin(endAngle);
|
|
102946
|
+
const largeArc = endAngle - startAngle > Math.PI ? 1 : 0, x1 = cx + outerR * Math.cos(startAngle), y1 = cy + outerR * Math.sin(startAngle), x2 = cx + outerR * Math.cos(endAngle), y2 = cy + outerR * Math.sin(endAngle);
|
|
102958
102947
|
let d;
|
|
102959
102948
|
if (innerR > 0) {
|
|
102960
|
-
const ix1 = cx + innerR * Math.cos(startAngle);
|
|
102961
|
-
const iy1 = cy + innerR * Math.sin(startAngle);
|
|
102962
|
-
const ix2 = cx + innerR * Math.cos(endAngle);
|
|
102963
|
-
const iy2 = cy + innerR * Math.sin(endAngle);
|
|
102949
|
+
const ix1 = cx + innerR * Math.cos(startAngle), iy1 = cy + innerR * Math.sin(startAngle), ix2 = cx + innerR * Math.cos(endAngle), iy2 = cy + innerR * Math.sin(endAngle);
|
|
102964
102950
|
d = `M${x1},${y1} A${outerR},${outerR} 0 ${largeArc} 1 ${x2},${y2} L${ix2},${iy2} A${innerR},${innerR} 0 ${largeArc} 0 ${ix1},${iy1} Z`;
|
|
102965
102951
|
} else {
|
|
102966
102952
|
d = `M${cx},${cy} L${x1},${y1} A${outerR},${outerR} 0 ${largeArc} 1 ${x2},${y2} Z`;
|
|
102967
102953
|
}
|
|
102968
|
-
const midAngle = (startAngle + endAngle) / 2;
|
|
102969
|
-
const labelR = outerR * 0.7;
|
|
102970
|
-
const labelX = cx + labelR * Math.cos(midAngle);
|
|
102971
|
-
const labelY = cy + labelR * Math.sin(midAngle);
|
|
102954
|
+
const midAngle = (startAngle + endAngle) / 2, labelR = outerR * 0.7, labelX = cx + labelR * Math.cos(midAngle), labelY = cy + labelR * Math.sin(midAngle);
|
|
102972
102955
|
return { d, midAngle, labelX, labelY };
|
|
102973
102956
|
}
|
|
102974
102957
|
function computePieLayout(elementWidth, elementHeight, chartData, isDoughnut) {
|
|
102975
|
-
const size = Math.min(Math.max(elementWidth, 1), Math.max(elementHeight, 1));
|
|
102976
|
-
const titleOffset = chartData.style?.hasTitle ? 20 : 0;
|
|
102977
|
-
const legendOffset = chartData.style?.hasLegend ? 20 : 0;
|
|
102978
|
-
const cx = size / 2;
|
|
102979
|
-
const cy = titleOffset + (size - titleOffset - legendOffset) / 2;
|
|
102980
|
-
const outerR = Math.max((size - titleOffset - legendOffset) * 0.42, 0);
|
|
102981
|
-
const holeRatio = isDoughnut && chartData.doughnutHoleSize !== void 0 ? Math.min(Math.max(chartData.doughnutHoleSize, 10), 90) / 100 : 0.55;
|
|
102982
|
-
const innerR = isDoughnut ? outerR * holeRatio : 0;
|
|
102958
|
+
const size = Math.min(Math.max(elementWidth, 1), Math.max(elementHeight, 1)), titleOffset = chartData.style?.hasTitle ? 20 : 0, legendOffset = chartData.style?.hasLegend ? 20 : 0, cx = size / 2, cy = titleOffset + (size - titleOffset - legendOffset) / 2, outerR = Math.max((size - titleOffset - legendOffset) * 0.42, 0), holeRatio = isDoughnut && chartData.doughnutHoleSize !== void 0 ? Math.min(Math.max(chartData.doughnutHoleSize, 10), 90) / 100 : 0.55, innerR = isDoughnut ? outerR * holeRatio : 0;
|
|
102983
102959
|
return { cx, cy, outerR, innerR, size };
|
|
102984
102960
|
}
|
|
102985
102961
|
function computePieSlices(values, cx, cy, outerR, innerR, options) {
|
|
102986
102962
|
const total = values.reduce((s, v) => s + Math.abs(v), 0) || 1;
|
|
102987
102963
|
let cumAngle = options?.startAngle ?? -Math.PI / 2;
|
|
102988
102964
|
return values.map((val2, i) => {
|
|
102989
|
-
const sliceAngle = Math.abs(val2) / total * Math.PI * 2;
|
|
102990
|
-
const startAngle = cumAngle;
|
|
102965
|
+
const sliceAngle = Math.abs(val2) / total * Math.PI * 2, startAngle = cumAngle;
|
|
102991
102966
|
cumAngle += sliceAngle;
|
|
102992
102967
|
const explosion = options?.explosions?.[i] ?? 0;
|
|
102993
102968
|
if (explosion > 0) {
|
|
102994
|
-
const mid = (startAngle + cumAngle) / 2;
|
|
102995
|
-
const offset = outerR * (explosion / 100);
|
|
102969
|
+
const mid = (startAngle + cumAngle) / 2, offset = outerR * (explosion / 100);
|
|
102996
102970
|
return computePieSlicePath(
|
|
102997
102971
|
cx + Math.cos(mid) * offset,
|
|
102998
102972
|
cy + Math.sin(mid) * offset,
|
|
@@ -103021,9 +102995,7 @@ function computeScatterXDomain(seriesXValues2) {
|
|
|
103021
102995
|
return { min, span: Math.max(Math.max(...finite2) - min, 1) };
|
|
103022
102996
|
}
|
|
103023
102997
|
function computeScatterDots(values, maxXIndex, layout, range, xValues, xDomain) {
|
|
103024
|
-
const finiteX = xValues?.slice(0, values.length).filter(Number.isFinite);
|
|
103025
|
-
const minX = xDomain ? xDomain.min : finiteX?.length ? Math.min(...finiteX) : 0;
|
|
103026
|
-
const spanX = xDomain ? xDomain.span : finiteX?.length ? Math.max(Math.max(...finiteX) - minX, 1) : maxXIndex;
|
|
102998
|
+
const finiteX = xValues?.slice(0, values.length).filter(Number.isFinite), minX = xDomain ? xDomain.min : finiteX?.length ? Math.min(...finiteX) : 0, spanX = xDomain ? xDomain.span : finiteX?.length ? Math.max(Math.max(...finiteX) - minX, 1) : maxXIndex;
|
|
103027
102999
|
return values.map((val2, i) => ({
|
|
103028
103000
|
cx: layout.plotLeft + (spanX > 0 ? (Number.isFinite(xValues?.[i]) ? xValues[i] - minX : i) / spanX : 0) * layout.plotWidth,
|
|
103029
103001
|
cy: valueToY2(val2, range, layout.plotTop, layout.plotBottom)
|
|
@@ -103043,8 +103015,7 @@ function radarAngle(index, catCount) {
|
|
|
103043
103015
|
function computeRadarPoints(values, maxVal, radius, cx, cy, catCount) {
|
|
103044
103016
|
const denom = maxVal > 0 ? maxVal : 1;
|
|
103045
103017
|
return values.slice(0, Math.max(catCount, 1)).map((val2, i) => {
|
|
103046
|
-
const angle = radarAngle(i, catCount);
|
|
103047
|
-
const r = Math.abs(val2) / denom * radius;
|
|
103018
|
+
const angle = radarAngle(i, catCount), r = Math.abs(val2) / denom * radius;
|
|
103048
103019
|
return { x: cx + r * Math.cos(angle), y: cy + r * Math.sin(angle) };
|
|
103049
103020
|
});
|
|
103050
103021
|
}
|
|
@@ -103111,18 +103082,15 @@ function buildChartViewModel(element) {
|
|
|
103111
103082
|
if (element.type !== "chart") {
|
|
103112
103083
|
return buildFallbackViewModel(element.width, element.height, "Chart");
|
|
103113
103084
|
}
|
|
103114
|
-
const chartEl = element;
|
|
103115
|
-
const chartData = chartEl.chartData;
|
|
103085
|
+
const chartEl = element, chartData = chartEl.chartData;
|
|
103116
103086
|
if (!chartData || chartData.series.length === 0) {
|
|
103117
103087
|
return buildFallbackViewModel(element.width, element.height, chartData?.title ?? "Chart");
|
|
103118
103088
|
}
|
|
103119
|
-
const chartType = chartData.chartType ?? "bar";
|
|
103120
|
-
const kind = resolveChartKind(chartType);
|
|
103089
|
+
const chartType = chartData.chartType ?? "bar", kind = resolveChartKind(chartType);
|
|
103121
103090
|
if (kind === "unsupported") {
|
|
103122
103091
|
return buildFallbackViewModel(element.width, element.height, chartData.title ?? chartType);
|
|
103123
103092
|
}
|
|
103124
|
-
const longestLen = chartData.series.reduce((m, s) => Math.max(m, s.values.length), 0);
|
|
103125
|
-
const categoryLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: longestLen }, (_, i) => String(i + 1));
|
|
103093
|
+
const longestLen = chartData.series.reduce((m, s) => Math.max(m, s.values.length), 0), categoryLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: longestLen }, (_, i) => String(i + 1));
|
|
103126
103094
|
if (chartType === "ofPie") {
|
|
103127
103095
|
return withChartAreaFill(
|
|
103128
103096
|
withUserShapeOverlay(buildOfPieViewModel(element, chartData, categoryLabels), chartData),
|
|
@@ -103199,8 +103167,7 @@ function buildFlatViewModel(element, chartData, categoryLabels, kind) {
|
|
|
103199
103167
|
return buildCartesianViewModel(element, chartData, categoryLabels, kind);
|
|
103200
103168
|
}
|
|
103201
103169
|
function buildFallbackViewModel(width, height, label) {
|
|
103202
|
-
const svgWidth = Math.max(width, 1);
|
|
103203
|
-
const svgHeight = Math.max(height, 1);
|
|
103170
|
+
const svgWidth = Math.max(width, 1), svgHeight = Math.max(height, 1);
|
|
103204
103171
|
return {
|
|
103205
103172
|
svgWidth,
|
|
103206
103173
|
svgHeight,
|
|
@@ -103248,15 +103215,7 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
|
|
|
103248
103215
|
element.height,
|
|
103249
103216
|
chartData,
|
|
103250
103217
|
isDoughnut
|
|
103251
|
-
)
|
|
103252
|
-
const svgWidth = Math.max(size, 100);
|
|
103253
|
-
const svgHeight = Math.max(size, 60);
|
|
103254
|
-
const pieSeries = chartData.series[0];
|
|
103255
|
-
const values = pieSeries?.values ?? [];
|
|
103256
|
-
const startAngle = -Math.PI / 2 + (chartData.firstSliceAngle ?? 0) * Math.PI / 180;
|
|
103257
|
-
const explosions = pieSeries ? values.map((_v, i) => resolveDataPointExplosion(pieSeries, i)) : void 0;
|
|
103258
|
-
const slices = computePieSlices(values, cx, cy, outerR, innerR, { startAngle, explosions });
|
|
103259
|
-
const primitives = slices.map(
|
|
103218
|
+
), svgWidth = Math.max(size, 100), svgHeight = Math.max(size, 60), pieSeries = chartData.series[0], values = pieSeries?.values ?? [], startAngle = -Math.PI / 2 + (chartData.firstSliceAngle ?? 0) * Math.PI / 180, explosions = pieSeries ? values.map((_v, i) => resolveDataPointExplosion(pieSeries, i)) : void 0, slices = computePieSlices(values, cx, cy, outerR, innerR, { startAngle, explosions }), primitives = slices.map(
|
|
103260
103219
|
({ d }, i) => ({
|
|
103261
103220
|
kind: "path",
|
|
103262
103221
|
d,
|
|
@@ -103265,13 +103224,17 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
|
|
|
103265
103224
|
fill: pieSeries ? resolveVaryColorFill(pieSeries, i, paletteColor2(i, chartData.colorPalette)) : paletteColor2(i, chartData.colorPalette),
|
|
103266
103225
|
stroke: "#ffffff",
|
|
103267
103226
|
strokeWidth: 1.5,
|
|
103268
|
-
part: { role: "dataPoint", seriesIndex: 0, pointIndex: i }
|
|
103227
|
+
part: { role: "dataPoint", seriesIndex: 0, pointIndex: i },
|
|
103228
|
+
title: buildMarkTooltip(
|
|
103229
|
+
pieSeries?.name,
|
|
103230
|
+
categoryLabels[i],
|
|
103231
|
+
values[i] ?? 0,
|
|
103232
|
+
pieSeries?.numberFormat
|
|
103233
|
+
)
|
|
103269
103234
|
})
|
|
103270
|
-
);
|
|
103271
|
-
const dataLabels = [];
|
|
103235
|
+
), dataLabels = [];
|
|
103272
103236
|
if (chartData.style?.hasDataLabels) {
|
|
103273
|
-
const percentBase = values.reduce((total, entry2) => total + Math.abs(entry2), 0)
|
|
103274
|
-
const labelResult = buildPieDataLabels({
|
|
103237
|
+
const percentBase = values.reduce((total, entry2) => total + Math.abs(entry2), 0), labelResult = buildPieDataLabels({
|
|
103275
103238
|
slices,
|
|
103276
103239
|
values,
|
|
103277
103240
|
cx,
|
|
@@ -103291,12 +103254,10 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
|
|
|
103291
103254
|
dataLabels.push(...labelResult.labels);
|
|
103292
103255
|
primitives.push(...labelResult.leaderLines);
|
|
103293
103256
|
}
|
|
103294
|
-
const legendPos = chartData.style?.legendPosition ?? "b"
|
|
103295
|
-
const legend = categoryLabels.map((label, i) => ({
|
|
103257
|
+
const legendPos = chartData.style?.legendPosition ?? "b", legend = categoryLabels.map((label, i) => ({
|
|
103296
103258
|
color: pieSeries ? resolveVaryColorFill(pieSeries, i, paletteColor2(i, chartData.colorPalette)) : paletteColor2(i, chartData.colorPalette),
|
|
103297
103259
|
label
|
|
103298
|
-
}));
|
|
103299
|
-
const legendX = svgWidth / 2;
|
|
103260
|
+
})), legendX = svgWidth / 2;
|
|
103300
103261
|
let legendY = svgHeight - 8;
|
|
103301
103262
|
const legendAnchor = "middle";
|
|
103302
103263
|
if (legendPos === "t") {
|
|
@@ -103326,14 +103287,7 @@ var RADAR_RING_COLOR = "#cbd5e1";
|
|
|
103326
103287
|
var RADAR_SPOKE_COLOR = "#94a3b8";
|
|
103327
103288
|
var RADAR_LABEL_COLOR = "#64748b";
|
|
103328
103289
|
function buildRadarViewModel(element, chartData, categoryLabels) {
|
|
103329
|
-
const layout = computePlotLayout(element.width, element.height, chartData, false);
|
|
103330
|
-
const cx = layout.plotLeft + layout.plotWidth / 2;
|
|
103331
|
-
const cy = layout.plotTop + layout.plotHeight / 2;
|
|
103332
|
-
const radius = Math.max(Math.min(layout.plotWidth, layout.plotHeight) / 2 - 4, 1);
|
|
103333
|
-
const catCount = Math.max(categoryLabels.length, 1);
|
|
103334
|
-
const maxVal = Math.max(1, ...chartData.series.flatMap((s) => s.values.map((v) => Math.abs(v))));
|
|
103335
|
-
const primitives = [];
|
|
103336
|
-
const perimeterLabels = [];
|
|
103290
|
+
const layout = computePlotLayout(element.width, element.height, chartData, false), cx = layout.plotLeft + layout.plotWidth / 2, cy = layout.plotTop + layout.plotHeight / 2, radius = Math.max(Math.min(layout.plotWidth, layout.plotHeight) / 2 - 4, 1), catCount = Math.max(categoryLabels.length, 1), maxVal = Math.max(1, ...chartData.series.flatMap((s) => s.values.map((v) => Math.abs(v)))), primitives = [], perimeterLabels = [];
|
|
103337
103291
|
for (let r = 1; r <= RADAR_RINGS; r++) {
|
|
103338
103292
|
const rr = radius * r / RADAR_RINGS;
|
|
103339
103293
|
primitives.push({
|
|
@@ -103370,8 +103324,7 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
|
|
|
103370
103324
|
}
|
|
103371
103325
|
const dataLabels = [];
|
|
103372
103326
|
chartData.series.forEach((series, si) => {
|
|
103373
|
-
const c = seriesColor2(series, si, chartData.colorPalette);
|
|
103374
|
-
const pts = computeRadarPoints(series.values, maxVal, radius, cx, cy, catCount);
|
|
103327
|
+
const c = seriesColor2(series, si, chartData.colorPalette), pts = computeRadarPoints(series.values, maxVal, radius, cx, cy, catCount);
|
|
103375
103328
|
if (pts.length === 0) {
|
|
103376
103329
|
return;
|
|
103377
103330
|
}
|
|
@@ -103383,7 +103336,8 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
|
|
|
103383
103336
|
opacity: 0.2,
|
|
103384
103337
|
stroke: c,
|
|
103385
103338
|
strokeWidth: 1.5,
|
|
103386
|
-
part: { role: "series", seriesIndex: si }
|
|
103339
|
+
part: { role: "series", seriesIndex: si },
|
|
103340
|
+
title: series.name.length > 0 ? series.name : void 0
|
|
103387
103341
|
});
|
|
103388
103342
|
pts.forEach((p, vi) => {
|
|
103389
103343
|
primitives.push({
|
|
@@ -103392,7 +103346,13 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
|
|
|
103392
103346
|
cy: p.y,
|
|
103393
103347
|
r: 3,
|
|
103394
103348
|
fill: c,
|
|
103395
|
-
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi }
|
|
103349
|
+
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi },
|
|
103350
|
+
title: buildMarkTooltip(
|
|
103351
|
+
series.name,
|
|
103352
|
+
categoryLabels[vi],
|
|
103353
|
+
series.values[vi] ?? 0,
|
|
103354
|
+
series.numberFormat
|
|
103355
|
+
)
|
|
103396
103356
|
});
|
|
103397
103357
|
});
|
|
103398
103358
|
if (chartData.style?.hasDataLabels) {
|
|
@@ -103413,16 +103373,14 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
|
|
|
103413
103373
|
});
|
|
103414
103374
|
}
|
|
103415
103375
|
});
|
|
103416
|
-
const legendPos = chartData.style?.legendPosition ?? "b"
|
|
103417
|
-
const { legend, legendX, legendY, legendAnchor } = buildLegend(
|
|
103376
|
+
const legendPos = chartData.style?.legendPosition ?? "b", { legend, legendX, legendY, legendAnchor } = buildLegend(
|
|
103418
103377
|
chartData.series,
|
|
103419
103378
|
chartData.colorPalette,
|
|
103420
103379
|
layout.svgWidth,
|
|
103421
103380
|
legendPos,
|
|
103422
103381
|
layout.svgHeight,
|
|
103423
103382
|
layout.plotTop
|
|
103424
|
-
);
|
|
103425
|
-
const title = chartData.style?.hasTitle && chartData.title ? chartData.title : void 0;
|
|
103383
|
+
), title = chartData.style?.hasTitle && chartData.title ? chartData.title : void 0;
|
|
103426
103384
|
return {
|
|
103427
103385
|
svgWidth: layout.svgWidth,
|
|
103428
103386
|
svgHeight: layout.svgHeight,
|
|
@@ -103981,6 +103939,31 @@ var DIRECTIONAL_PRESETS = /* @__PURE__ */ new Set([
|
|
|
103981
103939
|
"floatIn",
|
|
103982
103940
|
"peekIn"
|
|
103983
103941
|
]);
|
|
103942
|
+
function reorderAnimationTo(animations, source, targetIndex) {
|
|
103943
|
+
const sorted = [...animations].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
103944
|
+
const sourceIndex = typeof source === "number" ? source : sorted.findIndex((a) => a.elementId === source.elementId);
|
|
103945
|
+
if (sourceIndex < 0 || sourceIndex >= sorted.length || targetIndex < 0 || targetIndex >= sorted.length || sourceIndex === targetIndex) {
|
|
103946
|
+
return reindexOrder(sorted);
|
|
103947
|
+
}
|
|
103948
|
+
const [moved] = sorted.splice(sourceIndex, 1);
|
|
103949
|
+
sorted.splice(targetIndex, 0, moved);
|
|
103950
|
+
return reindexOrder(sorted);
|
|
103951
|
+
}
|
|
103952
|
+
function buildAnimationTimelineBars(animations) {
|
|
103953
|
+
const sorted = [...animations].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
103954
|
+
const total = Math.max(
|
|
103955
|
+
1,
|
|
103956
|
+
...sorted.map((animation) => (animation.delayMs ?? 0) + (animation.durationMs ?? 500))
|
|
103957
|
+
);
|
|
103958
|
+
return sorted.map((animation) => ({
|
|
103959
|
+
elementId: animation.elementId,
|
|
103960
|
+
leftPercent: (animation.delayMs ?? 0) / total * 100,
|
|
103961
|
+
widthPercent: (animation.durationMs ?? 500) / total * 100
|
|
103962
|
+
}));
|
|
103963
|
+
}
|
|
103964
|
+
function reindexOrder(anims) {
|
|
103965
|
+
return anims.map((a, i) => ({ ...a, order: i }));
|
|
103966
|
+
}
|
|
103984
103967
|
function animationPresetLabelKey(preset) {
|
|
103985
103968
|
return `pptx.animation.preset.${preset}`;
|
|
103986
103969
|
}
|
|
@@ -108851,6 +108834,23 @@ var TABLE_STYLE_PRESETS = [
|
|
|
108851
108834
|
borderColor: "#548235"
|
|
108852
108835
|
}
|
|
108853
108836
|
];
|
|
108837
|
+
function applyTableStylePreset(td, preset) {
|
|
108838
|
+
return td.rows.map((row, ri) => ({
|
|
108839
|
+
...row,
|
|
108840
|
+
cells: row.cells.map((cell) => {
|
|
108841
|
+
const isHeader = ri === 0 && Boolean(td.firstRowHeader);
|
|
108842
|
+
const isBand = Boolean(td.bandedRows) && (ri - (td.firstRowHeader ? 1 : 0)) % 2 === 0;
|
|
108843
|
+
const style = {
|
|
108844
|
+
...cell.style,
|
|
108845
|
+
backgroundColor: isHeader ? preset.headerBg : isBand ? preset.bandBg : void 0,
|
|
108846
|
+
color: isHeader ? preset.headerFg : cell.style?.color,
|
|
108847
|
+
bold: isHeader ? true : cell.style?.bold,
|
|
108848
|
+
borderColor: preset.borderColor
|
|
108849
|
+
};
|
|
108850
|
+
return { ...cell, style };
|
|
108851
|
+
})
|
|
108852
|
+
}));
|
|
108853
|
+
}
|
|
108854
108854
|
var SEL = "bg-muted border border-border rounded px-2 py-1 text-[11px] w-full";
|
|
108855
108855
|
var NUM = "flex-1 bg-muted border border-border rounded px-1.5 py-0.5 w-full text-[11px]";
|
|
108856
108856
|
var LBL = "text-muted-foreground text-[11px]";
|
|
@@ -108869,6 +108869,7 @@ var PATTERN_OPTIONS = OOXML_PATTERN_PRESETS.slice(0, 20);
|
|
|
108869
108869
|
var MIN_COLUMN_PROPORTION = 0.03;
|
|
108870
108870
|
var MIN_ROW_HEIGHT = 16;
|
|
108871
108871
|
var DEFAULT_ROW_HEIGHT = 32;
|
|
108872
|
+
var MIN_COLUMN_WIDTH_FRACTION = 0.05;
|
|
108872
108873
|
function computeColumnBoundaries(columnWidths) {
|
|
108873
108874
|
const result = [];
|
|
108874
108875
|
let cumulative = 0;
|
|
@@ -108897,6 +108898,39 @@ function computeResizedColumnWidths(initialWidths, index, deltaProportion) {
|
|
|
108897
108898
|
function computeResizedRowHeight(initialRowHeight, deltaY) {
|
|
108898
108899
|
return Math.round(Math.max(MIN_ROW_HEIGHT, initialRowHeight + deltaY));
|
|
108899
108900
|
}
|
|
108901
|
+
function redistributeColumnWidth(widths, index, newFraction) {
|
|
108902
|
+
const oldFraction = widths[index];
|
|
108903
|
+
if (oldFraction === void 0) {
|
|
108904
|
+
return widths;
|
|
108905
|
+
}
|
|
108906
|
+
const diff = newFraction - oldFraction;
|
|
108907
|
+
const next = [...widths];
|
|
108908
|
+
next[index] = newFraction;
|
|
108909
|
+
const othersTotal = 1 - oldFraction;
|
|
108910
|
+
if (othersTotal > 0) {
|
|
108911
|
+
for (let j = 0; j < next.length; j++) {
|
|
108912
|
+
if (j !== index) {
|
|
108913
|
+
next[j] = Math.max(MIN_COLUMN_WIDTH_FRACTION, widths[j] - diff * (widths[j] / othersTotal));
|
|
108914
|
+
}
|
|
108915
|
+
}
|
|
108916
|
+
}
|
|
108917
|
+
const sum = next.reduce((a, b) => a + b, 0);
|
|
108918
|
+
return sum > 0 ? next.map((w) => w / sum) : next;
|
|
108919
|
+
}
|
|
108920
|
+
function evenColumnWidths(count) {
|
|
108921
|
+
if (count <= 0) {
|
|
108922
|
+
return [];
|
|
108923
|
+
}
|
|
108924
|
+
return Array.from({ length: count }, () => 1 / count);
|
|
108925
|
+
}
|
|
108926
|
+
function evenRowHeights(rows) {
|
|
108927
|
+
const count = rows.length;
|
|
108928
|
+
if (count === 0) {
|
|
108929
|
+
return rows;
|
|
108930
|
+
}
|
|
108931
|
+
const avg = Math.round(rows.reduce((s, r) => s + (r.height ?? DEFAULT_ROW_HEIGHT), 0) / count);
|
|
108932
|
+
return rows.map((r) => ({ ...r, height: avg }));
|
|
108933
|
+
}
|
|
108900
108934
|
function findSmartArtNodeText(data, nodeId) {
|
|
108901
108935
|
return data.nodes.find((n) => n.id === nodeId)?.text;
|
|
108902
108936
|
}
|
|
@@ -111821,6 +111855,8 @@ var translationsEn = {
|
|
|
111821
111855
|
"pptx.ribbon.customColour": "Custom colour...",
|
|
111822
111856
|
"pptx.ribbon.textHighlightColour": "Text highlight colour",
|
|
111823
111857
|
"pptx.ribbon.highlightColourValue": "Highlight colour {{color}}",
|
|
111858
|
+
"pptx.ribbon.fillColourValue": "Fill colour {{color}}",
|
|
111859
|
+
"pptx.ribbon.outlineColourValue": "Outline colour {{color}}",
|
|
111824
111860
|
"pptx.ribbon.bulletList": "Bullet list",
|
|
111825
111861
|
"pptx.ribbon.justify": "Justify",
|
|
111826
111862
|
"pptx.toolbar.findAndReplace": "Find and replace",
|
|
@@ -124828,6 +124864,102 @@ function buildSmartArtA11y(data) {
|
|
|
124828
124864
|
nodes
|
|
124829
124865
|
};
|
|
124830
124866
|
}
|
|
124867
|
+
var LAYOUT_BOUNDS = {
|
|
124868
|
+
// A Venn diagram is typically drawn with 2-3 overlapping sets; beyond a
|
|
124869
|
+
// handful of circles it becomes unreadable.
|
|
124870
|
+
venn: { min: 2, max: 3 },
|
|
124871
|
+
// A 2x2 matrix has exactly four quadrants.
|
|
124872
|
+
matrix: { min: 4, max: 4 },
|
|
124873
|
+
// Pyramids and funnels need at least two tiers to convey a hierarchy.
|
|
124874
|
+
pyramid: { min: 2, max: 5 },
|
|
124875
|
+
funnel: { min: 2, max: 5 },
|
|
124876
|
+
// A target is a small set of concentric rings.
|
|
124877
|
+
target: { min: 2, max: 5 },
|
|
124878
|
+
// Gears mesh in small clusters.
|
|
124879
|
+
gear: { min: 2, max: 3 },
|
|
124880
|
+
// Cycles need at least three steps to read as a loop.
|
|
124881
|
+
cycle: { min: 3 }
|
|
124882
|
+
// Relationship / process / list / hierarchy / timeline are flexible but
|
|
124883
|
+
// still need at least one node to exist.
|
|
124884
|
+
};
|
|
124885
|
+
var DEFAULT_BOUNDS = { min: 1 };
|
|
124886
|
+
function getSmartArtNodeBounds(layout) {
|
|
124887
|
+
if (!layout) {
|
|
124888
|
+
return DEFAULT_BOUNDS;
|
|
124889
|
+
}
|
|
124890
|
+
return LAYOUT_BOUNDS[layout] ?? DEFAULT_BOUNDS;
|
|
124891
|
+
}
|
|
124892
|
+
function canAddTopLevelNode(layout, topLevelCount) {
|
|
124893
|
+
const { max } = getSmartArtNodeBounds(layout);
|
|
124894
|
+
return max === void 0 || topLevelCount < max;
|
|
124895
|
+
}
|
|
124896
|
+
function canRemoveTopLevelNode(layout, topLevelCount) {
|
|
124897
|
+
const { min } = getSmartArtNodeBounds(layout);
|
|
124898
|
+
return topLevelCount > min;
|
|
124899
|
+
}
|
|
124900
|
+
function describeSmartArtBounds(layout) {
|
|
124901
|
+
const { min, max } = getSmartArtNodeBounds(layout);
|
|
124902
|
+
if (min <= 1 && max === void 0) {
|
|
124903
|
+
return void 0;
|
|
124904
|
+
}
|
|
124905
|
+
if (max === void 0) {
|
|
124906
|
+
return `Works best with at least ${min} items.`;
|
|
124907
|
+
}
|
|
124908
|
+
if (min === max) {
|
|
124909
|
+
return `This layout uses exactly ${max} items.`;
|
|
124910
|
+
}
|
|
124911
|
+
return `Works best with ${min} to ${max} items.`;
|
|
124912
|
+
}
|
|
124913
|
+
function addSiblingAfter(data, nodeId) {
|
|
124914
|
+
const next = addSmartArtNode(data, "", nodeId);
|
|
124915
|
+
if (next === data) {
|
|
124916
|
+
return void 0;
|
|
124917
|
+
}
|
|
124918
|
+
const idx = next.nodes.findIndex((n) => n.id === nodeId), inserted = idx >= 0 ? next.nodes[idx + 1] : void 0;
|
|
124919
|
+
return { data: next, focusNodeId: inserted?.id };
|
|
124920
|
+
}
|
|
124921
|
+
function removeEmptyNode(data, nodeId) {
|
|
124922
|
+
if (data.nodes.length <= 1) {
|
|
124923
|
+
return void 0;
|
|
124924
|
+
}
|
|
124925
|
+
const removedIndex = data.nodes.findIndex((n) => n.id === nodeId), next = removeSmartArtNode(data, nodeId);
|
|
124926
|
+
if (next === data) {
|
|
124927
|
+
return void 0;
|
|
124928
|
+
}
|
|
124929
|
+
const focusNode = next.nodes[Math.max(0, removedIndex - 1)];
|
|
124930
|
+
return { data: next, focusNodeId: focusNode?.id };
|
|
124931
|
+
}
|
|
124932
|
+
function demote(data, nodeId) {
|
|
124933
|
+
const next = demoteSmartArtNode(data, nodeId);
|
|
124934
|
+
return next === data ? void 0 : next;
|
|
124935
|
+
}
|
|
124936
|
+
function promote(data, nodeId) {
|
|
124937
|
+
const next = promoteSmartArtNode(data, nodeId);
|
|
124938
|
+
return next === data ? void 0 : next;
|
|
124939
|
+
}
|
|
124940
|
+
function reorder2(data, nodeId, direction) {
|
|
124941
|
+
const next = reorderSmartArtNode(data, nodeId, direction);
|
|
124942
|
+
return next === data ? void 0 : next;
|
|
124943
|
+
}
|
|
124944
|
+
function siblingIndex(data, nodeId) {
|
|
124945
|
+
const node = data.nodes.find((n) => n.id === nodeId);
|
|
124946
|
+
if (!node) {
|
|
124947
|
+
return -1;
|
|
124948
|
+
}
|
|
124949
|
+
const siblings = data.nodes.filter((n) => n.parentId === node.parentId);
|
|
124950
|
+
return siblings.findIndex((n) => n.id === nodeId);
|
|
124951
|
+
}
|
|
124952
|
+
function siblingCount(data, nodeId) {
|
|
124953
|
+
const node = data.nodes.find((n) => n.id === nodeId);
|
|
124954
|
+
if (!node) {
|
|
124955
|
+
return 0;
|
|
124956
|
+
}
|
|
124957
|
+
return data.nodes.filter((n) => n.parentId === node.parentId).length;
|
|
124958
|
+
}
|
|
124959
|
+
var TREE_CONNECTION_TYPES = /* @__PURE__ */ new Set(["parOf", "presParOf", void 0]);
|
|
124960
|
+
function classifyExtraConnections(data) {
|
|
124961
|
+
return (data.connections ?? []).filter((c) => !TREE_CONNECTION_TYPES.has(c.type));
|
|
124962
|
+
}
|
|
124831
124963
|
var THREE_UNAVAILABLE = {
|
|
124832
124964
|
ok: false,
|
|
124833
124965
|
resize: () => {
|
|
@@ -129266,6 +129398,17 @@ function resolveInkWidth(widths, index, fallback = 3) {
|
|
|
129266
129398
|
}
|
|
129267
129399
|
return widths[index] > 0 ? widths[index] : fallback;
|
|
129268
129400
|
}
|
|
129401
|
+
function buildBarActions(opts) {
|
|
129402
|
+
const { slideCount } = opts;
|
|
129403
|
+
const noSlides = slideCount === 0;
|
|
129404
|
+
return [
|
|
129405
|
+
{ key: "slides", label: "Slides", disabled: noSlides },
|
|
129406
|
+
{ key: "insert", label: "Insert", disabled: noSlides },
|
|
129407
|
+
{ key: "inspector", label: "Format", disabled: noSlides },
|
|
129408
|
+
{ key: "comments", label: "Comments", disabled: noSlides },
|
|
129409
|
+
{ key: "notes", label: "Notes", disabled: noSlides }
|
|
129410
|
+
];
|
|
129411
|
+
}
|
|
129269
129412
|
var COMMENT_MENTION_ATTRIBUTE = "data-pptx-comment-mention";
|
|
129270
129413
|
var COMMENT_MENTION_CLASS = "pptx-comment-mention";
|
|
129271
129414
|
var usableMentions = (body, mentions) => (mentions ?? []).filter(
|
|
@@ -132742,8 +132885,7 @@ function sanitizeDownloadFilename(input) {
|
|
|
132742
132885
|
return cleaned;
|
|
132743
132886
|
}
|
|
132744
132887
|
function downloadBlob(blob, filename) {
|
|
132745
|
-
const url = URL.createObjectURL(blob);
|
|
132746
|
-
const anchor = document.createElement("a");
|
|
132888
|
+
const url = URL.createObjectURL(blob), anchor = document.createElement("a");
|
|
132747
132889
|
anchor.href = url;
|
|
132748
132890
|
anchor.download = filename;
|
|
132749
132891
|
document.body.appendChild(anchor);
|
|
@@ -132768,13 +132910,10 @@ function dataUrlToBlob(dataUrl) {
|
|
|
132768
132910
|
if (!match?.groups) {
|
|
132769
132911
|
return void 0;
|
|
132770
132912
|
}
|
|
132771
|
-
const mime = match.groups.mime || "application/octet-stream";
|
|
132772
|
-
const isBase64 = Boolean(match.groups.base64);
|
|
132773
|
-
const payload = match.groups.payload ?? "";
|
|
132913
|
+
const mime = match.groups.mime || "application/octet-stream", isBase64 = Boolean(match.groups.base64), payload = match.groups.payload ?? "";
|
|
132774
132914
|
try {
|
|
132775
132915
|
if (isBase64) {
|
|
132776
|
-
const binary = atob(payload);
|
|
132777
|
-
const bytes = new Uint8Array(binary.length);
|
|
132916
|
+
const binary = atob(payload), bytes = new Uint8Array(binary.length);
|
|
132778
132917
|
for (let i = 0; i < binary.length; i++) {
|
|
132779
132918
|
bytes[i] = binary.charCodeAt(i);
|
|
132780
132919
|
}
|
|
@@ -132786,9 +132925,7 @@ function dataUrlToBlob(dataUrl) {
|
|
|
132786
132925
|
}
|
|
132787
132926
|
}
|
|
132788
132927
|
function openUrlInNewTab(url) {
|
|
132789
|
-
const blob = url.startsWith("data:") ? dataUrlToBlob(url) : void 0;
|
|
132790
|
-
const target = blob ? URL.createObjectURL(blob) : url;
|
|
132791
|
-
const opened = window.open(target, "_blank");
|
|
132928
|
+
const blob = url.startsWith("data:") ? dataUrlToBlob(url) : void 0, target = blob ? URL.createObjectURL(blob) : url, opened = window.open(target, "_blank");
|
|
132792
132929
|
if (opened) {
|
|
132793
132930
|
try {
|
|
132794
132931
|
opened.opener = null;
|
|
@@ -134348,4 +134485,4 @@ function segmentFrameCount(durationMs, fps) {
|
|
|
134348
134485
|
* `<p:extLst>` (optional)
|
|
134349
134486
|
*/
|
|
134350
134487
|
|
|
134351
|
-
export { ACTION_BUTTON_PRESETS, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, CHARACTER_SPACING_OPTIONS, COLOR_MAP_ALIAS_KEYS, COMMENT_MENTION_ATTRIBUTE, COMMENT_MENTION_CLASS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, CONNECTOR_SITE_SNAP_PX, CUSTOM_FONT_ACCEPT, DEBOUNCE_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_FONT_FAMILY, DEFAULT_INSERT_CHART_KIND, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_PALETTE2, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPANDED_MAX_HEIGHT, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, FILL_PATTERN_LABEL_KEYS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, HIDDEN_SLIDE_LABEL_KEY, HIDDEN_SLIDE_SLASH_GRADIENT, HIGHLIGHTER_COLORS, INDENT_PX, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_HINT_CLASS, LINK_TOOLTIP_HOST_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_PANEL_CLASS, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_INDENT_LEVEL, MAX_ZOOM_SCALE, MEDIA_CHROME_ATTRIBUTE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PEN_COLORS, PPTX_OPEN_ACCEPT, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_HIT_TEST_CSS, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESENTATION_OPEN_EXTENSIONS, PRESENTATION_STAGE_ATTRIBUTE, PRESENTER_CONSOLE_CLASSES, PRESENTER_CONSOLE_CONTROLS, PRESENTER_NAVIGATOR_LABEL_KEYS, PRESENT_TOOLBAR_CLASSES, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RIBBON_SHAPE_SWATCHES, RIBBON_TRANSITION_PRESETS, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_SHOW_OPTIONS, SLIDE_SIZE_PRESETS, SLIDE_TEMPLATES, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, SORTER_MAX_ZOOM, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_SCHEME_KEYS, THEME_COLOR_SLOT_LABEL_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptAutosaveRecovery, acceptsPresentationInput, actionAffordanceLabels, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, animationEffectLabel, annotationOverlayZIndex, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFindReplacements, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, attachPresentationVisibilityPause, authorConnectorBetweenSites, autosaveSnapshotMark, availableQuickAccessCommands, backstageCardsFor, beginShapeAdjustment, bringForward, bringToFront, build3DExtrusionData, buildActiveSessionUsers, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildFontCatalog, buildHandoutsHtml, buildHollowHitOutline, buildInitialGuides, buildJoinCollaborationConfig, buildLayoutPreviewGeometry, buildMorphAnimationRules, buildMorphTransitionPlan, buildMotionPathPreview, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildParagraphs, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildSaveSlides, buildSlideTemplateContent, buildSlideTemplateSlide, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBodyLayoutStyle, buildTextBuildSpec, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canGoNext, canGoPrevious, canInteractWithElement, canvasToJpegData, cellRunStyle, cellStyleToCss, centeredSvgTextLines, chartDataChangeType, chartPartToAttrs, chartPreserveAspectRatio, clampCropValue, clampNotesFontSize, clampPercent, clampSorterZoom, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectConnectorSiteCandidates, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, commentTextSegments, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeColumnBoundaries, computeDrawingViewBox, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPlainNotesSegments, createPresenceProjector, createPresentationKeyBuffer, createPresentationSessionId, createPresenterShowGuard, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, createViewerZoomStore, createWheelStepBuffer, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, deriveSlideFieldContext, describeFontEmbedding, detectOrientation, detectTouchDevice, discardAutosaveRecovery, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, elementLockTogglePatch, embeddedFontSaveOptions, encodeGif, endAudienceDisplay, ensureActionAffordanceStyles, ensureChartInteractionStyles, erasePresentationInkAt, escapeHtml22 as escapeHtml2, exportDeckJson, extraQuickAccessCommands, extractPathPoints, filterCommands, filterInteractableIds, filterRenderedElements, findChartPartTarget, findConnectorSiteNear, findInSlides, findMediaElementByElementId, findSmartArtNodeText, firstShowSlideIndex, flattenNodes, flattenTagCollections, forgetSessionDeck, formatAxisValue, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getComputedFillStyle, getComputedStrokeStyle, getConnectorEndpointHandles, getContentPartReplayStyles, getCurrentParagraphIndex, getDraggedShapeAdjustments, getDuotoneCachedResult, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageFitStyle, getImageSvgFilters, getImageTilingStyle, getInkReplayStyles, getInlineEditorSelection, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx2, getSessionTabId, getShapeAdjustmentHandleDescriptors, getShapeConnectionSites, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTableCellBandStyle, getTextBodyRotationTransform, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasShowSlideAfter, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, hiddenSlideCue, hollowTextFillStyle, inlineElementPointerEvents, insertTableColumn, insertTableRow, isActionHidden, isBlackboardActive, isBrowserOpenableMime, isCalloutShape, isCellInRect, isCurrentLayout, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementLocked, isElementRendered, isExportAbortError, isHollowShapeElement, isImageLikeElement, isImageTiled, isInkElement, isKeyboardOpen, isLegacyBinaryPresentation, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isStrokeOnlyPresetElement, isSupportedPresentationFile, isTemplateElementId3 as isTemplateElementId, isUrlSafe, lastShowSlideIndex, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, loadSessionDeck, makeCloneId, makeSlideId, mapEditingWheel, mapEditorKey, mapOutlineKey, mapPresentationKey, mapPresentationWheel, mapSlideSorterKey, masterViewBackgroundColor, masterViewElements, masterViewPseudoSlide, mayLeaveSlideShow, mediaFallbackIcon, mediaFallbackLabelKey, mediaFallbackVisual, mediaPlaybackAttributes, mediaTransportVisible, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, nestedTextDecorationStyle, newTableElement, nextPresentedSlide, nextShowSlideIndex, normalizeColorsForCapture, normalizeHexColor, normalizeSegments, normalizeStrokeDashType, notesSegmentsToSpans, observeYDocSlides, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paintedStrokeWidth, paragraphsToSegments, parseDrawingColor, parseDrawingColorOpacity, parsePanoseString, parsePpactionUrl, parseSegmentsFromRichEditor, partitionTemplateElements, pickSupportedMimeType, pieceLetterSpacing, placeAudienceWindow, placeCaretAtEnd, playSlideTransitionPreview, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationBaseName, presentationInkPath, presenterElapsed, presenterNextDisabled, presenterPaneAdvancesOnClick, presenterPrevDisabled, presenterTimerProgress, pressuresToWidths, previousShowSlideIndex, printPropertiesFrameSlides, printPropertiesSlidesPerPage, probeAutosaveRecovery, projectDrawingShapes, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readRibbonTransitionDraft, readSlideShowOption, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, registerCustomFont, registerPersistentAudio, remapTextToSegments, rememberSessionDeck, removeChartCategory, removeChartSeries, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorderSmartArtNode, replaceMasterViewElements, rerouteConnectorsForMovedElements, resetPresenterTimer, resetSlideLayoutPath, resolveActionType, resolveAudienceScreenPlacement, resolveAuthoredCustomShowId, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveAutosaveActivation, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, resolveChartKind, resolveConnectorEndpointUpdate, resolveDefaultFontFamily, resolveDrawingShapeNodeId, resolveElementActionAffordance, resolveElementInteractivity, resolveFontForScript, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveMetricTrackingPx, resolveOleType, resolvePalette, resolveProfileInitial, resolveSelectionPaneRename, resolveShapeGeometry, resolveShowSlideIndexes, resolveSlideSizeSelection, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveViewerAddinRows, restoreSegmentSelection, restoreSessionDeck, revealedSmartArtNodeCount, ribbonTransitionUpdates, rulerDragToGuidePosition, runMediaCommand, runPresentationAction, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveDeckWithPassword, saveViewerProfile, savedPresentationFileName, scanAvailableFontFamilies, schemaLabel, scopeLayoutOptionsToSlide, segmentByScript, segmentFrameCount, segmentsToEditorHtml, segmentsToParagraphs, segmentsToPlainText, sendBackward, sendToBack, setCachedResult, setCellText, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMasterViewBackgroundColor, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shapeFillChange, shapeOutlineChange, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldProbeAutosaveRecovery, shouldRoomSlidesReplaceLoad, shouldShowAutosaveRecoveryPrompt, shouldUseSvgWarp, shouldWriteAutosaveSnapshot, slideProgressPercent, slideShowOptionChange, slideSizeFromPreset, slideSizeToCanvasPx, slideStatusLabel, snapBoxToGrid, splitCell, splitRunForMetrics, stepPresenterZoom, stopAllPersistentAudio, storeAudienceContent, strokeOutlineViewBox, styleShadowFilter, substituteFieldText, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, tableCellCss, tableContainerCss, templateSchemeFromTheme, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorLabel, themeColorSchemesEqual, themeToCssVars, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, toggleBlackboard, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, ungroupElements, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMasterViewElement, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withConnectorEndpointUpdate, withFrameSlides, withSlideSizeOrientation, withSlidesPerPage, writeStoredViewerPrefs };
|
|
134488
|
+
export { ACTION_BUTTON_PRESETS, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, CHARACTER_SPACING_OPTIONS, COLOR_MAP_ALIAS_KEYS, COMMENT_MENTION_ATTRIBUTE, COMMENT_MENTION_CLASS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, CONNECTOR_SITE_SNAP_PX, CUSTOM_FONT_ACCEPT, DEBOUNCE_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_FONT_FAMILY, DEFAULT_INSERT_CHART_KIND, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_PALETTE2, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPANDED_MAX_HEIGHT, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, FILL_PATTERN_LABEL_KEYS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, HIDDEN_SLIDE_LABEL_KEY, HIDDEN_SLIDE_SLASH_GRADIENT, HIGHLIGHTER_COLORS, INDENT_PX, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_HINT_CLASS, LINK_TOOLTIP_HOST_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_PANEL_CLASS, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_INDENT_LEVEL, MAX_ZOOM_SCALE, MEDIA_CHROME_ATTRIBUTE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PEN_COLORS, PPTX_OPEN_ACCEPT, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_HIT_TEST_CSS, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESENTATION_OPEN_EXTENSIONS, PRESENTATION_STAGE_ATTRIBUTE, PRESENTER_CONSOLE_CLASSES, PRESENTER_CONSOLE_CONTROLS, PRESENTER_NAVIGATOR_LABEL_KEYS, PRESENT_TOOLBAR_CLASSES, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RIBBON_SHAPE_SWATCHES, RIBBON_TRANSITION_PRESETS, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_SHOW_OPTIONS, SLIDE_SIZE_PRESETS, SLIDE_TEMPLATES, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, SORTER_MAX_ZOOM, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_SCHEME_KEYS, THEME_COLOR_SLOT_LABEL_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptAutosaveRecovery, acceptsPresentationInput, actionAffordanceLabels, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSiblingAfter, addSmartArtNodeAsChild, addTagToCollections, alignElements, animationEffectLabel, annotationOverlayZIndex, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFindReplacements, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyTableStylePreset, applyThemeOverrideToSlide, applyThemeToData, attachPresentationVisibilityPause, authorConnectorBetweenSites, autosaveSnapshotMark, availableQuickAccessCommands, backstageCardsFor, beginShapeAdjustment, bringForward, bringToFront, build3DExtrusionData, buildActiveSessionUsers, buildAnimationTimelineBars, buildBarActions, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildFontCatalog, buildHandoutsHtml, buildHollowHitOutline, buildInitialGuides, buildJoinCollaborationConfig, buildLayoutPreviewGeometry, buildMorphAnimationRules, buildMorphTransitionPlan, buildMotionPathPreview, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildParagraphs, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildSaveSlides, buildSlideTemplateContent, buildSlideTemplateSlide, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBodyLayoutStyle, buildTextBuildSpec, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canAddTopLevelNode, canCommitActionType, canGoNext, canGoPrevious, canInteractWithElement, canRemoveTopLevelNode, canvasToJpegData, cellRunStyle, cellStyleToCss, centeredSvgTextLines, chartDataChangeType, chartPartToAttrs, chartPreserveAspectRatio, clampCropValue, clampNotesFontSize, clampPercent, clampSorterZoom, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, classifyExtraConnections, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectConnectorSiteCandidates, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, commentTextSegments, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeChartLegendLayout, computeColumnBoundaries, computeDrawingViewBox, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPlainNotesSegments, createPresenceProjector, createPresentationKeyBuffer, createPresentationSessionId, createPresenterShowGuard, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, createViewerZoomStore, createWheelStepBuffer, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demote, deriveSlideFieldContext, describeFontEmbedding, describeSmartArtBounds, detectOrientation, detectTouchDevice, discardAutosaveRecovery, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, elementLockTogglePatch, embeddedFontSaveOptions, encodeGif, endAudienceDisplay, ensureActionAffordanceStyles, ensureChartInteractionStyles, erasePresentationInkAt, escapeHtml22 as escapeHtml2, evenColumnWidths, evenRowHeights, exportDeckJson, extraQuickAccessCommands, extractPathPoints, filterCommands, filterInteractableIds, filterRenderedElements, findChartPartTarget, findConnectorSiteNear, findInSlides, findMediaElementByElementId, findSmartArtNodeText, firstShowSlideIndex, flattenNodes, flattenTagCollections, forgetSessionDeck, formatAxisValue, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getComputedFillStyle, getComputedStrokeStyle, getConnectorEndpointHandles, getContentPartReplayStyles, getCurrentParagraphIndex, getDraggedShapeAdjustments, getDuotoneCachedResult, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageFitStyle, getImageSvgFilters, getImageTilingStyle, getInkReplayStyles, getInlineEditorSelection, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx2, getSessionTabId, getShapeAdjustmentHandleDescriptors, getShapeConnectionSites, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTableCellBandStyle, getTextBodyRotationTransform, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasShowSlideAfter, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, hiddenSlideCue, hollowTextFillStyle, inlineElementPointerEvents, insertTableColumn, insertTableRow, isActionHidden, isBlackboardActive, isBrowserOpenableMime, isCalloutShape, isCellInRect, isCurrentLayout, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementLocked, isElementRendered, isExportAbortError, isHollowShapeElement, isImageLikeElement, isImageTiled, isInkElement, isKeyboardOpen, isLegacyBinaryPresentation, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isStrokeOnlyPresetElement, isSupportedPresentationFile, isTemplateElementId3 as isTemplateElementId, isUrlSafe, lastShowSlideIndex, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, loadSessionDeck, makeCloneId, makeSlideId, mapEditingWheel, mapEditorKey, mapOutlineKey, mapPresentationKey, mapPresentationWheel, mapSlideSorterKey, masterViewBackgroundColor, masterViewElements, masterViewPseudoSlide, mayLeaveSlideShow, mediaFallbackIcon, mediaFallbackLabelKey, mediaFallbackVisual, mediaPlaybackAttributes, mediaTransportVisible, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, nestedTextDecorationStyle, newTableElement, nextPresentedSlide, nextShowSlideIndex, normalizeColorsForCapture, normalizeHexColor, normalizeSegments, normalizeStrokeDashType, notesSegmentsToSpans, observeYDocSlides, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paintedStrokeWidth, paragraphsToSegments, parseDrawingColor, parseDrawingColorOpacity, parsePanoseString, parsePpactionUrl, parseSegmentsFromRichEditor, partitionTemplateElements, pickSupportedMimeType, pieceLetterSpacing, placeAudienceWindow, placeCaretAtEnd, playSlideTransitionPreview, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationBaseName, presentationInkPath, presenterElapsed, presenterNextDisabled, presenterPaneAdvancesOnClick, presenterPrevDisabled, presenterTimerProgress, pressuresToWidths, previousShowSlideIndex, printPropertiesFrameSlides, printPropertiesSlidesPerPage, probeAutosaveRecovery, projectDrawingShapes, promote, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readRibbonTransitionDraft, readSlideShowOption, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, redistributeColumnWidth, registerCollaborationTeardown, registerCustomFont, registerPersistentAudio, remapTextToSegments, rememberSessionDeck, removeChartCategory, removeChartSeries, removeEmptyNode, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorder2 as reorder, reorderAnimationTo, replaceMasterViewElements, rerouteConnectorsForMovedElements, resetPresenterTimer, resetSlideLayoutPath, resolveActionType, resolveAudienceScreenPlacement, resolveAuthoredCustomShowId, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveAutosaveActivation, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, resolveChartKind, resolveConnectorEndpointUpdate, resolveDefaultFontFamily, resolveDrawingShapeNodeId, resolveElementActionAffordance, resolveElementInteractivity, resolveFontForScript, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveMetricTrackingPx, resolveOleType, resolvePalette, resolveProfileInitial, resolveSelectionPaneRename, resolveShapeGeometry, resolveShowSlideIndexes, resolveSlideSizeSelection, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveViewerAddinRows, restoreSegmentSelection, restoreSessionDeck, revealedSmartArtNodeCount, ribbonTransitionUpdates, rulerDragToGuidePosition, runMediaCommand, runPresentationAction, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveDeckWithPassword, saveViewerProfile, savedPresentationFileName, scanAvailableFontFamilies, schemaLabel, scopeLayoutOptionsToSlide, segmentByScript, segmentFrameCount, segmentsToEditorHtml, segmentsToParagraphs, segmentsToPlainText, sendBackward, sendToBack, setCachedResult, setCellText, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMasterViewBackgroundColor, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shapeFillChange, shapeOutlineChange, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldProbeAutosaveRecovery, shouldRoomSlidesReplaceLoad, shouldShowAutosaveRecoveryPrompt, shouldUseSvgWarp, shouldWriteAutosaveSnapshot, siblingCount, siblingIndex, slideProgressPercent, slideShowOptionChange, slideSizeFromPreset, slideSizeToCanvasPx, slideStatusLabel, snapBoxToGrid, splitCell, splitRunForMetrics, stepPresenterZoom, stopAllPersistentAudio, storeAudienceContent, strokeOutlineViewBox, styleShadowFilter, substituteFieldText, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, tableCellCss, tableContainerCss, templateSchemeFromTheme, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorLabel, themeColorSchemesEqual, themeToCssVars, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, toggleBlackboard, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, ungroupElements, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMasterViewElement, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withConnectorEndpointUpdate, withFrameSlides, withSlideSizeOrientation, withSlidesPerPage, writeStoredViewerPrefs };
|