@extend-ai/react-xlsx 0.20.1 → 0.20.2
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/dist/{chart-renderer-K2VM257E.cjs → chart-renderer-3QDNTMRN.cjs} +525 -603
- package/dist/chart-renderer-3QDNTMRN.cjs.map +1 -0
- package/dist/{chart-renderer-RXO7WP4Q.js → chart-renderer-7DTEXXG6.js} +19 -97
- package/dist/chart-renderer-7DTEXXG6.js.map +1 -0
- package/dist/{chart-renderer-KGLAI4DN.js → chart-renderer-F355CYSE.js} +13 -92
- package/dist/chart-renderer-F355CYSE.js.map +1 -0
- package/dist/{chart-renderer-K6GORT3R.cjs → chart-renderer-LGW4EH4M.cjs} +286 -365
- package/dist/chart-renderer-LGW4EH4M.cjs.map +1 -0
- package/dist/{chunk-WSQDFXDW.js → chunk-3LMOGW6A.js} +22 -6
- package/dist/chunk-3LMOGW6A.js.map +1 -0
- package/dist/chunk-A4S3AMON.js +108 -0
- package/dist/chunk-A4S3AMON.js.map +1 -0
- package/dist/chunk-AJT23BDP.js +111 -0
- package/dist/chunk-AJT23BDP.js.map +1 -0
- package/dist/{chunk-CJBI5F6V.cjs → chunk-AZWBTFJI.cjs} +12 -93
- package/dist/chunk-AZWBTFJI.cjs.map +1 -0
- package/dist/{chunk-54YBFWL3.cjs → chunk-D2UA4P6N.cjs} +14 -3
- package/dist/chunk-D2UA4P6N.cjs.map +1 -0
- package/dist/{chunk-GXJO6CK6.js → chunk-GXYDJPHM.js} +40 -12
- package/dist/chunk-GXYDJPHM.js.map +1 -0
- package/dist/chunk-IDNIGBUM.cjs +108 -0
- package/dist/chunk-IDNIGBUM.cjs.map +1 -0
- package/dist/{chunk-3JTCYAUX.js → chunk-IYGZTLDY.js} +14 -3
- package/dist/chunk-IYGZTLDY.js.map +1 -0
- package/dist/chunk-M55TBS4X.cjs +111 -0
- package/dist/chunk-M55TBS4X.cjs.map +1 -0
- package/dist/{chunk-2MVEKDY2.cjs → chunk-OCF75R75.cjs} +25 -9
- package/dist/chunk-OCF75R75.cjs.map +1 -0
- package/dist/{chunk-NBH72POD.js → chunk-PUI6QI4U.js} +11 -92
- package/dist/chunk-PUI6QI4U.js.map +1 -0
- package/dist/{chunk-HAHCVXCU.cjs → chunk-ZJ76CZAL.cjs} +787 -759
- package/dist/chunk-ZJ76CZAL.cjs.map +1 -0
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/{internal-trWFv9In.d.cts → internal-BJsg5os3.d.cts} +10 -0
- package/dist/{internal-trWFv9In.d.ts → internal-BJsg5os3.d.ts} +10 -0
- package/dist/internal.cjs +5 -4
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +4 -3
- package/dist/preact-LICENSE.txt +21 -0
- package/dist/region-map-geography-24TXETDP.cjs +184 -0
- package/dist/region-map-geography-24TXETDP.cjs.map +1 -0
- package/dist/region-map-geography-OR6DHAF7.js +182 -0
- package/dist/region-map-geography-OR6DHAF7.js.map +1 -0
- package/dist/shared-chart-3STFRVWT.js +215 -0
- package/dist/shared-chart-3STFRVWT.js.map +1 -0
- package/dist/shared-chart-BFQNYOIQ.js +221 -0
- package/dist/shared-chart-BFQNYOIQ.js.map +1 -0
- package/dist/shared-chart-DVC5S2P6.cjs +222 -0
- package/dist/shared-chart-DVC5S2P6.cjs.map +1 -0
- package/dist/shared-chart-MFQSQG4K.cjs +216 -0
- package/dist/shared-chart-MFQSQG4K.cjs.map +1 -0
- package/dist/{surface-regl-2NNG62KS.cjs → surface-regl-BBJ6OIKK.cjs} +14 -12
- package/dist/surface-regl-BBJ6OIKK.cjs.map +1 -0
- package/dist/{surface-regl-TJUWTLAZ.js → surface-regl-R2N54JT2.js} +7 -5
- package/dist/{surface-regl-TJUWTLAZ.js.map → surface-regl-R2N54JT2.js.map} +1 -1
- package/dist/us-atlas-LICENSE.txt +13 -0
- package/dist/vanilla.cjs +5 -4
- package/dist/vanilla.cjs.map +1 -1
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +4 -3
- package/dist/world-atlas-LICENSE.txt +13 -0
- package/dist/xlsx-worker.js +15 -0
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +7 -6
- package/dist/chart-renderer-K2VM257E.cjs.map +0 -1
- package/dist/chart-renderer-K6GORT3R.cjs.map +0 -1
- package/dist/chart-renderer-KGLAI4DN.js.map +0 -1
- package/dist/chart-renderer-RXO7WP4Q.js.map +0 -1
- package/dist/chunk-2MVEKDY2.cjs.map +0 -1
- package/dist/chunk-3JTCYAUX.js.map +0 -1
- package/dist/chunk-54YBFWL3.cjs.map +0 -1
- package/dist/chunk-CJBI5F6V.cjs.map +0 -1
- package/dist/chunk-GXJO6CK6.js.map +0 -1
- package/dist/chunk-HAHCVXCU.cjs.map +0 -1
- package/dist/chunk-NBH72POD.js.map +0 -1
- package/dist/chunk-WSQDFXDW.js.map +0 -1
- package/dist/region-map-geography-VEN5CPRS.cjs +0 -184
- package/dist/region-map-geography-VEN5CPRS.cjs.map +0 -1
- package/dist/region-map-geography-YD54DI3H.js +0 -182
- package/dist/region-map-geography-YD54DI3H.js.map +0 -1
- package/dist/surface-regl-2NNG62KS.cjs.map +0 -1
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkOCF75R75cjs = require('./chunk-OCF75R75.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkM55TBS4Xcjs = require('./chunk-M55TBS4X.cjs');
|
|
6
11
|
|
|
7
12
|
|
|
8
13
|
|
|
@@ -17,12 +22,13 @@ var _chunkO3V2MCOCcjs = require('./chunk-O3V2MCOC.cjs');
|
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
|
|
25
|
+
var _chunk5ERNVHSOcjs = require('./chunk-5ERNVHSO.cjs');
|
|
20
26
|
|
|
21
27
|
|
|
22
28
|
|
|
23
29
|
|
|
24
30
|
|
|
25
|
-
var
|
|
31
|
+
var _chunkAZWBTFJIcjs = require('./chunk-AZWBTFJI.cjs');
|
|
26
32
|
require('./chunk-AD4CGQN2.cjs');
|
|
27
33
|
|
|
28
34
|
// src/chart-renderer.tsx
|
|
@@ -38,15 +44,15 @@ var _d3scale = require('d3-scale');
|
|
|
38
44
|
|
|
39
45
|
var _d3shape = require('d3-shape');
|
|
40
46
|
function RegionMapPlot({ chart, palette, layout, selectedChartElement }) {
|
|
41
|
-
const resources =
|
|
47
|
+
const resources = _chunkOCF75R75cjs.useChartModule.call(void 0, _chunkOCF75R75cjs.regionMapResources);
|
|
42
48
|
return resources ? renderRegionMapChart(chart, palette, layout, selectedChartElement, resources) : null;
|
|
43
49
|
}
|
|
44
50
|
function SurfaceChartComposite({
|
|
45
51
|
loadingFallback,
|
|
46
52
|
...props
|
|
47
53
|
}) {
|
|
48
|
-
const renderer =
|
|
49
|
-
return renderer ? /* @__PURE__ */
|
|
54
|
+
const renderer = _chunkOCF75R75cjs.useChartModule.call(void 0, _chunkOCF75R75cjs.surfaceRenderer);
|
|
55
|
+
return renderer ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, renderer.MemoSurfaceChartComposite, { ...props }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: loadingFallback });
|
|
50
56
|
}
|
|
51
57
|
function chartElementDataProps(seriesIndex, pointIndex, options) {
|
|
52
58
|
return {
|
|
@@ -62,84 +68,14 @@ function chartElementDataProps(seriesIndex, pointIndex, options) {
|
|
|
62
68
|
function barChartElementDataProps(seriesIndex, pointIndex) {
|
|
63
69
|
return chartElementDataProps(seriesIndex, pointIndex, { selectionMode: "seriesFirst" });
|
|
64
70
|
}
|
|
65
|
-
function resolveChartElementTarget(target) {
|
|
66
|
-
if (!(target instanceof Element)) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return target.closest("[data-xlsx-chart-series-index]");
|
|
70
|
-
}
|
|
71
|
-
function resolveChartSelectionFromTarget(chart, target, selectedChartElement) {
|
|
72
|
-
const element = resolveChartElementTarget(target);
|
|
73
|
-
if (!element) {
|
|
74
|
-
return _optionalChain([selectedChartElement, 'optionalAccess', _4 => _4.chartId]) === chart.id ? { chartId: chart.id, kind: "chart" } : { chartId: chart.id, kind: "chart" };
|
|
75
|
-
}
|
|
76
|
-
const seriesIndex = Number(element.dataset.xlsxChartSeriesIndex);
|
|
77
|
-
if (!Number.isInteger(seriesIndex) || seriesIndex < 0 || seriesIndex >= chart.series.length) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
const series = chart.series[seriesIndex];
|
|
81
|
-
if (!series) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
const rawPointIndex = element.dataset.xlsxChartPointIndex;
|
|
85
|
-
const rawElementKind = element.dataset.xlsxChartElementKind;
|
|
86
|
-
const selectionMode = element.dataset.xlsxChartSelectionMode;
|
|
87
|
-
const pointIndex = rawPointIndex == null || rawPointIndex === "" ? null : Number(rawPointIndex);
|
|
88
|
-
const hasPoint = pointIndex != null && Number.isInteger(pointIndex) && pointIndex >= 0;
|
|
89
|
-
const sameSelectedSeries = _optionalChain([selectedChartElement, 'optionalAccess', _5 => _5.chartId]) === chart.id && selectedChartElement.kind !== "chart" && selectedChartElement.seriesIndex === seriesIndex;
|
|
90
|
-
if (hasPoint && (selectionMode !== "seriesFirst" || sameSelectedSeries)) {
|
|
91
|
-
return {
|
|
92
|
-
chartId: chart.id,
|
|
93
|
-
kind: "point",
|
|
94
|
-
pointIndex,
|
|
95
|
-
seriesId: series.id,
|
|
96
|
-
seriesIndex
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
chartId: chart.id,
|
|
101
|
-
kind: rawElementKind === "legendEntry" ? "legendEntry" : "series",
|
|
102
|
-
seriesId: series.id,
|
|
103
|
-
seriesIndex
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
71
|
function isSelectedChartSeries(selectedChartElement, chartId, seriesIndex) {
|
|
107
|
-
return _optionalChain([selectedChartElement, 'optionalAccess',
|
|
72
|
+
return _optionalChain([selectedChartElement, 'optionalAccess', _4 => _4.chartId]) === chartId && selectedChartElement.kind !== "chart" && selectedChartElement.seriesIndex === seriesIndex;
|
|
108
73
|
}
|
|
109
74
|
function isSelectedChartPoint(selectedChartElement, chartId, seriesIndex, pointIndex) {
|
|
110
|
-
return _optionalChain([selectedChartElement, 'optionalAccess',
|
|
75
|
+
return _optionalChain([selectedChartElement, 'optionalAccess', _5 => _5.chartId]) === chartId && selectedChartElement.kind === "point" && selectedChartElement.seriesIndex === seriesIndex && selectedChartElement.pointIndex === pointIndex;
|
|
111
76
|
}
|
|
112
77
|
function isSelectedChartPointOrSeries(selectedChartElement, chartId, seriesIndex, pointIndex) {
|
|
113
|
-
return isSelectedChartPoint(selectedChartElement, chartId, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chartId, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
114
|
-
}
|
|
115
|
-
function renderSelectionRectHandles(key, left, top, width, height, color = "#64748b") {
|
|
116
|
-
return renderSelectionPointHandles(
|
|
117
|
-
key,
|
|
118
|
-
[
|
|
119
|
-
{ x: left, y: top },
|
|
120
|
-
{ x: left + width, y: top },
|
|
121
|
-
{ x: left, y: top + height },
|
|
122
|
-
{ x: left + width, y: top + height }
|
|
123
|
-
],
|
|
124
|
-
color
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
function renderSelectionPointHandles(key, points, color = "#64748b") {
|
|
128
|
-
const radius = 3;
|
|
129
|
-
return /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "g", { pointerEvents: "none", children: points.map((point, index) => /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0,
|
|
130
|
-
"circle",
|
|
131
|
-
{
|
|
132
|
-
cx: point.x,
|
|
133
|
-
cy: point.y,
|
|
134
|
-
fill: "#ffffff",
|
|
135
|
-
r: radius,
|
|
136
|
-
stroke: color,
|
|
137
|
-
strokeWidth: 1.1,
|
|
138
|
-
style: { filter: "drop-shadow(0 1px 2px rgba(15, 23, 42, 0.18))" },
|
|
139
|
-
vectorEffect: "non-scaling-stroke"
|
|
140
|
-
},
|
|
141
|
-
`${key}-handle-${index}`
|
|
142
|
-
)) }, key);
|
|
78
|
+
return isSelectedChartPoint(selectedChartElement, chartId, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chartId, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _6 => _6.kind]) !== "point";
|
|
143
79
|
}
|
|
144
80
|
function parseRgbColor(color) {
|
|
145
81
|
const match = /^#?([0-9a-f]{6})$/i.exec(color);
|
|
@@ -232,23 +168,23 @@ function safeNumber(value) {
|
|
|
232
168
|
}
|
|
233
169
|
function chartSeriesColor(chart, seriesIndex) {
|
|
234
170
|
const series = chart.series[seriesIndex];
|
|
235
|
-
const paletteColor = _optionalChain([chart, 'access',
|
|
236
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
171
|
+
const paletteColor = _optionalChain([chart, 'access', _7 => _7.chartColorPalette, 'optionalAccess', _8 => _8[seriesIndex % Math.max(1, chart.chartColorPalette.length)]]);
|
|
172
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _9 => _9.color]), () => ( _optionalChain([series, 'optionalAccess', _10 => _10.lineColor]))), () => ( paletteColor)), () => ( chart.textColor)), () => ( "#222222"));
|
|
237
173
|
}
|
|
238
174
|
function chartSeriesStrokeColor(chart, seriesIndex) {
|
|
239
175
|
const series = chart.series[seriesIndex];
|
|
240
|
-
const paletteColor = _optionalChain([chart, 'access',
|
|
241
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
176
|
+
const paletteColor = _optionalChain([chart, 'access', _11 => _11.chartColorPalette, 'optionalAccess', _12 => _12[seriesIndex % Math.max(1, chart.chartColorPalette.length)]]);
|
|
177
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _13 => _13.lineColor]), () => ( _optionalChain([series, 'optionalAccess', _14 => _14.color]))), () => ( paletteColor)), () => ( chart.textColor)), () => ( "#222222"));
|
|
242
178
|
}
|
|
243
179
|
function variesBarColorsByCategory(chart) {
|
|
244
180
|
return chart.series.length === 1 && chart.varyColors !== false && !chart.chartExLayout && ["ColumnClustered", "ColumnStacked", "ColumnPercentStacked", "BarClustered", "BarStacked", "BarPercentStacked"].includes(chart.chartType);
|
|
245
181
|
}
|
|
246
182
|
function chartPointColor(chart, pointIndex, seriesIndex = 0) {
|
|
247
|
-
const pointStyle = _optionalChain([chart, 'access',
|
|
248
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
183
|
+
const pointStyle = _optionalChain([chart, 'access', _15 => _15.series, 'access', _16 => _16[seriesIndex], 'optionalAccess', _17 => _17.dataPointStyles, 'optionalAccess', _18 => _18.find, 'call', _19 => _19((entry) => entry.index === pointIndex)]);
|
|
184
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _20 => _20.color])) {
|
|
249
185
|
return pointStyle.color;
|
|
250
186
|
}
|
|
251
|
-
const rawPoint = _optionalChain([chart, 'access',
|
|
187
|
+
const rawPoint = _optionalChain([chart, 'access', _21 => _21.series, 'access', _22 => _22[seriesIndex], 'optionalAccess', _23 => _23.dataPoints, 'optionalAccess', _24 => _24[pointIndex]]);
|
|
252
188
|
if (rawPoint && typeof rawPoint === "object") {
|
|
253
189
|
const pointRecord = rawPoint;
|
|
254
190
|
if (typeof pointRecord.color === "string") {
|
|
@@ -271,9 +207,9 @@ function chartPointColor(chart, pointIndex, seriesIndex = 0) {
|
|
|
271
207
|
}
|
|
272
208
|
}
|
|
273
209
|
}
|
|
274
|
-
const themeColors = _optionalChain([chart, 'access',
|
|
275
|
-
const pointCount = Math.max(1, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
276
|
-
const builtinColor = themeColors ?
|
|
210
|
+
const themeColors = _optionalChain([chart, 'access', _25 => _25.raw, 'optionalAccess', _26 => _26.builtinThemeColors]);
|
|
211
|
+
const pointCount = Math.max(1, _nullishCoalesce(_optionalChain([chart, 'access', _27 => _27.series, 'access', _28 => _28[seriesIndex], 'optionalAccess', _29 => _29.values, 'access', _30 => _30.length]), () => ( 0)));
|
|
212
|
+
const builtinColor = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, pointIndex, pointCount), themeColors) : void 0;
|
|
277
213
|
if (builtinColor) return builtinColor;
|
|
278
214
|
const palette = chart.chartColorPalette;
|
|
279
215
|
if (palette && palette.length > 0) {
|
|
@@ -283,14 +219,14 @@ function chartPointColor(chart, pointIndex, seriesIndex = 0) {
|
|
|
283
219
|
return chartSeriesColor(chart, seriesIndex);
|
|
284
220
|
}
|
|
285
221
|
function isHistogramLikeSeries(series) {
|
|
286
|
-
const raw = _optionalChain([series, 'optionalAccess',
|
|
287
|
-
return Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
222
|
+
const raw = _optionalChain([series, 'optionalAccess', _31 => _31.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
223
|
+
return Array.isArray(_optionalChain([raw, 'optionalAccess', _32 => _32.chartExHistogramBins])) && raw.chartExHistogramBins.length > 0;
|
|
288
224
|
}
|
|
289
225
|
function isHistogramLikeChart(chart) {
|
|
290
226
|
return chart.series.some((series) => isHistogramLikeSeries(series));
|
|
291
227
|
}
|
|
292
228
|
function resolveRegionMapBaseColor(chart, seriesIndex) {
|
|
293
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
229
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _33 => _33.series, 'access', _34 => _34[seriesIndex], 'optionalAccess', _35 => _35.color]), () => ( _optionalChain([chart, 'access', _36 => _36.series, 'access', _37 => _37[seriesIndex], 'optionalAccess', _38 => _38.lineColor]))), () => ( _optionalChain([chart, 'access', _39 => _39.chartColorPalette, 'optionalAccess', _40 => _40[0]]))), () => ( chartSeriesColor(chart, seriesIndex)));
|
|
294
230
|
}
|
|
295
231
|
function resolveRegionMapDataColor(chart, seriesIndex) {
|
|
296
232
|
const pointColor = normalizeRendererHexColor(chartPointColor(chart, 0, seriesIndex));
|
|
@@ -307,21 +243,21 @@ function resolveRegionMapDataColor(chart, seriesIndex) {
|
|
|
307
243
|
return paletteColor;
|
|
308
244
|
}
|
|
309
245
|
}
|
|
310
|
-
return _nullishCoalesce(normalizeRendererHexColor(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
246
|
+
return _nullishCoalesce(normalizeRendererHexColor(_nullishCoalesce(_optionalChain([chart, 'access', _41 => _41.series, 'access', _42 => _42[seriesIndex], 'optionalAccess', _43 => _43.color]), () => ( _optionalChain([chart, 'access', _44 => _44.series, 'access', _45 => _45[seriesIndex], 'optionalAccess', _46 => _46.lineColor])))), () => ( "#4f81bd"));
|
|
311
247
|
}
|
|
312
248
|
function resolveRegionMapValueColors(series) {
|
|
313
|
-
const raw = _optionalChain([series, 'optionalAccess',
|
|
314
|
-
const colors = Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
249
|
+
const raw = _optionalChain([series, 'optionalAccess', _47 => _47.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
250
|
+
const colors = Array.isArray(_optionalChain([raw, 'optionalAccess', _48 => _48.valueColors])) ? raw.valueColors.map((value) => normalizeRendererHexColor(value)).filter((value) => Boolean(value)) : [];
|
|
315
251
|
return colors.length >= 2 ? colors : null;
|
|
316
252
|
}
|
|
317
253
|
function resolveRegionMapColorStrings(series) {
|
|
318
|
-
const raw = _optionalChain([series, 'optionalAccess',
|
|
319
|
-
const values = Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
254
|
+
const raw = _optionalChain([series, 'optionalAccess', _49 => _49.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
255
|
+
const values = Array.isArray(_optionalChain([raw, 'optionalAccess', _50 => _50.chartExColorStrings])) ? raw.chartExColorStrings.map((value) => typeof value === "string" ? value.trim() : "") : [];
|
|
320
256
|
return values.some((value) => value.length > 0) ? values : null;
|
|
321
257
|
}
|
|
322
258
|
function resolveRegionMapLayoutProperties(series) {
|
|
323
|
-
const raw = _optionalChain([series, 'optionalAccess',
|
|
324
|
-
return _optionalChain([raw, 'optionalAccess',
|
|
259
|
+
const raw = _optionalChain([series, 'optionalAccess', _51 => _51.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
260
|
+
return _optionalChain([raw, 'optionalAccess', _52 => _52.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
325
261
|
}
|
|
326
262
|
function resolveRegionMapValueColorFromStops(stops, ratio) {
|
|
327
263
|
if (stops.length === 0) {
|
|
@@ -363,7 +299,7 @@ function buildRegionMapLegendItems(chart) {
|
|
|
363
299
|
label: value
|
|
364
300
|
}));
|
|
365
301
|
}
|
|
366
|
-
const values = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
302
|
+
const values = (_nullishCoalesce(_optionalChain([chart, 'access', _53 => _53.series, 'access', _54 => _54[primarySeriesIndex], 'optionalAccess', _55 => _55.values]), () => ( []))).map((value) => safeNumber(value)).filter((value) => value != null);
|
|
367
303
|
if (values.length === 0) {
|
|
368
304
|
return [];
|
|
369
305
|
}
|
|
@@ -381,12 +317,12 @@ function normalizeBuiltinPieStyleId(styleId) {
|
|
|
381
317
|
return styleId >= 100 ? styleId - 100 : styleId;
|
|
382
318
|
}
|
|
383
319
|
function getBuiltinPiePalette(chart, seriesIndex) {
|
|
384
|
-
if (_optionalChain([chart, 'access',
|
|
320
|
+
if (_optionalChain([chart, 'access', _56 => _56.raw, 'optionalAccess', _57 => _57.builtinThemeColors])) return null;
|
|
385
321
|
const normalized = normalizeBuiltinPieStyleId(chart.chartStyleId);
|
|
386
322
|
if (normalized !== 32) {
|
|
387
323
|
return null;
|
|
388
324
|
}
|
|
389
|
-
const baseColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
325
|
+
const baseColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _58 => _58.series, 'access', _59 => _59[seriesIndex], 'optionalAccess', _60 => _60.color]), () => ( _optionalChain([chart, 'access', _61 => _61.series, 'access', _62 => _62[seriesIndex], 'optionalAccess', _63 => _63.lineColor]))), () => ( _optionalChain([chart, 'access', _64 => _64.chartColorPalette, 'optionalAccess', _65 => _65[0]]))), () => ( null));
|
|
390
326
|
if (!baseColor) {
|
|
391
327
|
return null;
|
|
392
328
|
}
|
|
@@ -400,8 +336,8 @@ function getBuiltinPiePalette(chart, seriesIndex) {
|
|
|
400
336
|
];
|
|
401
337
|
}
|
|
402
338
|
function resolvePiePointColor(chart, pointIndex, seriesIndex = 0) {
|
|
403
|
-
const pointStyle = _optionalChain([chart, 'access',
|
|
404
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
339
|
+
const pointStyle = _optionalChain([chart, 'access', _66 => _66.series, 'access', _67 => _67[seriesIndex], 'optionalAccess', _68 => _68.dataPointStyles, 'optionalAccess', _69 => _69.find, 'call', _70 => _70((entry) => entry.index === pointIndex)]);
|
|
340
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _71 => _71.color])) {
|
|
405
341
|
return pointStyle.color;
|
|
406
342
|
}
|
|
407
343
|
const builtinPalette = getBuiltinPiePalette(chart, seriesIndex);
|
|
@@ -435,8 +371,8 @@ function chartSeriesBarColors(chart, seriesIndex, value, negativeFillMode) {
|
|
|
435
371
|
const series = chart.series[seriesIndex];
|
|
436
372
|
const defaultFill = chartSeriesColor(chart, seriesIndex);
|
|
437
373
|
const defaultStroke = chartSeriesStrokeColor(chart, seriesIndex);
|
|
438
|
-
const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess',
|
|
439
|
-
if (value < 0 && _optionalChain([series, 'optionalAccess',
|
|
374
|
+
const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess', _72 => _72.lineWidthPx]) === "number" && Number.isFinite(series.lineWidthPx) ? Math.max(0.8, Math.min(4, series.lineWidthPx)) : 1;
|
|
375
|
+
if (value < 0 && _optionalChain([series, 'optionalAccess', _73 => _73.invertIfNegative])) {
|
|
440
376
|
const resolvedNegativeFill = negativeFillMode === "none" ? "none" : _nullishCoalesce(_nullishCoalesce(series.negativeColor, () => ( (negativeFillMode === "chartArea" ? chart.chartAreaFillColor : void 0))), () => ( defaultFill));
|
|
441
377
|
return {
|
|
442
378
|
fill: resolvedNegativeFill,
|
|
@@ -526,13 +462,13 @@ function estimateReferencePointCount(formula) {
|
|
|
526
462
|
return Math.abs(endRow - startRow) + 1;
|
|
527
463
|
}
|
|
528
464
|
function getCategoryLabels(chart) {
|
|
529
|
-
const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
465
|
+
const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access', _74 => _74.series, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.categories]), () => ( []));
|
|
530
466
|
const includeReferenceCategoryCount = chart.plotVisibleOnly !== true;
|
|
531
467
|
const referenceCategoryCount = includeReferenceCategoryCount ? Math.max(
|
|
532
468
|
0,
|
|
533
469
|
...chart.series.map((series) => Math.max(
|
|
534
|
-
estimateReferencePointCount(_optionalChain([series, 'access',
|
|
535
|
-
estimateReferencePointCount(_optionalChain([series, 'access',
|
|
470
|
+
estimateReferencePointCount(_optionalChain([series, 'access', _77 => _77.categoriesRef, 'optionalAccess', _78 => _78.formula])),
|
|
471
|
+
estimateReferencePointCount(_optionalChain([series, 'access', _79 => _79.valuesRef, 'optionalAccess', _80 => _80.formula]))
|
|
536
472
|
))
|
|
537
473
|
) : 0;
|
|
538
474
|
const categoryCount = Math.max(
|
|
@@ -656,7 +592,7 @@ function coerceLooseNumber(value) {
|
|
|
656
592
|
}
|
|
657
593
|
function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)) {
|
|
658
594
|
const categories = getCategoryLabels(chart);
|
|
659
|
-
const values = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
595
|
+
const values = _nullishCoalesce(_optionalChain([chart, 'access', _81 => _81.series, 'access', _82 => _82[seriesIndex], 'optionalAccess', _83 => _83.values]), () => ( []));
|
|
660
596
|
return values.map((rawValue, index) => ({
|
|
661
597
|
color: resolvePiePointColor(chart, index, seriesIndex),
|
|
662
598
|
index,
|
|
@@ -666,9 +602,9 @@ function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)
|
|
|
666
602
|
}
|
|
667
603
|
function resolveChartStageSubtotal(series) {
|
|
668
604
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
669
|
-
const layoutProperties = _optionalChain([raw, 'optionalAccess',
|
|
670
|
-
const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess',
|
|
671
|
-
return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess',
|
|
605
|
+
const layoutProperties = _optionalChain([raw, 'optionalAccess', _84 => _84.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
606
|
+
const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess', _85 => _85.subtotals])) ? layoutProperties.subtotals : [];
|
|
607
|
+
return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess', _86 => _86.aggregation]) === true;
|
|
672
608
|
}
|
|
673
609
|
function buildChartStages(chart) {
|
|
674
610
|
if (chart.chartType === "Funnel" || chart.chartType === "Waterfall") {
|
|
@@ -696,7 +632,7 @@ function buildChartStages(chart) {
|
|
|
696
632
|
if (!Number.isFinite(value)) {
|
|
697
633
|
return null;
|
|
698
634
|
}
|
|
699
|
-
const formula = typeof _optionalChain([series, 'access',
|
|
635
|
+
const formula = typeof _optionalChain([series, 'access', _87 => _87.valuesRef, 'optionalAccess', _88 => _88.formula]) === "string" ? series.valuesRef.formula : "";
|
|
700
636
|
const label = _nullishCoalesce(series.name, () => ( (formula.length > 0 ? formula.replace(/^.*!/, "").replace(/\$/g, "") : `Series ${index + 1}`)));
|
|
701
637
|
return {
|
|
702
638
|
color: chartSeriesColor(chart, typeof series.formatIdx === "number" ? series.formatIdx : index),
|
|
@@ -715,7 +651,7 @@ function buildHierarchyData(chart) {
|
|
|
715
651
|
const topLevelIndexByName = /* @__PURE__ */ new Map();
|
|
716
652
|
const primaryHierarchySeries = _nullishCoalesce(chart.series.find((series) => {
|
|
717
653
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
718
|
-
return Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
654
|
+
return Array.isArray(_optionalChain([raw, 'optionalAccess', _89 => _89.chartExHierarchyCategories]));
|
|
719
655
|
}), () => ( null));
|
|
720
656
|
const primaryHierarchyPaths = (() => {
|
|
721
657
|
if (!primaryHierarchySeries) {
|
|
@@ -726,7 +662,7 @@ function buildHierarchyData(chart) {
|
|
|
726
662
|
})();
|
|
727
663
|
const rowCount = primaryHierarchyPaths ? primaryHierarchyPaths.length : Math.max(0, ...chart.series.map((series) => series.values.length));
|
|
728
664
|
for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
|
|
729
|
-
const path = _nullishCoalesce(_optionalChain([primaryHierarchyPaths, 'optionalAccess',
|
|
665
|
+
const path = _nullishCoalesce(_optionalChain([primaryHierarchyPaths, 'optionalAccess', _90 => _90[rowIndex]]), () => ( chart.series.map((series) => normalizeCategoryLabel(_nullishCoalesce(series.categories[rowIndex], () => ( series.values[rowIndex])))).filter((value) => value.length > 0)));
|
|
730
666
|
if (path.length === 0) {
|
|
731
667
|
continue;
|
|
732
668
|
}
|
|
@@ -749,25 +685,25 @@ function buildHierarchyData(chart) {
|
|
|
749
685
|
current = next;
|
|
750
686
|
});
|
|
751
687
|
const valueSource = _nullishCoalesce(_nullishCoalesce(primaryHierarchySeries, () => ( chart.series[chart.series.length - 1])), () => ( null));
|
|
752
|
-
current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess',
|
|
688
|
+
current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess', _91 => _91.values, 'access', _92 => _92[rowIndex]])), () => ( 1)));
|
|
753
689
|
}
|
|
754
690
|
return rootChildren.length > 0 ? root : null;
|
|
755
691
|
}
|
|
756
692
|
function resolveBoxWhiskerQuartileMethod(series) {
|
|
757
693
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
758
|
-
const layoutProperties = _optionalChain([raw, 'optionalAccess',
|
|
759
|
-
const statistics = _optionalChain([layoutProperties, 'optionalAccess',
|
|
760
|
-
return _optionalChain([statistics, 'optionalAccess',
|
|
694
|
+
const layoutProperties = _optionalChain([raw, 'optionalAccess', _93 => _93.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
695
|
+
const statistics = _optionalChain([layoutProperties, 'optionalAccess', _94 => _94.statistics]) && typeof layoutProperties.statistics === "object" ? layoutProperties.statistics : null;
|
|
696
|
+
return _optionalChain([statistics, 'optionalAccess', _95 => _95.quartileMethod]) === "inclusive" ? "inclusive" : "exclusive";
|
|
761
697
|
}
|
|
762
698
|
function resolveBoxWhiskerVisibility(series) {
|
|
763
699
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
764
|
-
const layoutProperties = _optionalChain([raw, 'optionalAccess',
|
|
765
|
-
const visibility = _optionalChain([layoutProperties, 'optionalAccess',
|
|
700
|
+
const layoutProperties = _optionalChain([raw, 'optionalAccess', _96 => _96.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
701
|
+
const visibility = _optionalChain([layoutProperties, 'optionalAccess', _97 => _97.visibility]) && typeof layoutProperties.visibility === "object" ? layoutProperties.visibility : null;
|
|
766
702
|
return {
|
|
767
|
-
meanLine: _optionalChain([visibility, 'optionalAccess',
|
|
768
|
-
meanMarker: _optionalChain([visibility, 'optionalAccess',
|
|
769
|
-
nonoutliers: _optionalChain([visibility, 'optionalAccess',
|
|
770
|
-
outliers: _optionalChain([visibility, 'optionalAccess',
|
|
703
|
+
meanLine: _optionalChain([visibility, 'optionalAccess', _98 => _98.meanLine]) === true,
|
|
704
|
+
meanMarker: _optionalChain([visibility, 'optionalAccess', _99 => _99.meanMarker]) !== false,
|
|
705
|
+
nonoutliers: _optionalChain([visibility, 'optionalAccess', _100 => _100.nonoutliers]) === true,
|
|
706
|
+
outliers: _optionalChain([visibility, 'optionalAccess', _101 => _101.outliers]) !== false
|
|
771
707
|
};
|
|
772
708
|
}
|
|
773
709
|
function computePercentile(sortedValues, percentile, method) {
|
|
@@ -827,7 +763,7 @@ function computeBoxWhiskerStats(series) {
|
|
|
827
763
|
function resolveHierarchyNodeColor(chart, node) {
|
|
828
764
|
const lineage = node.ancestors().reverse();
|
|
829
765
|
const topLevel = lineage[1];
|
|
830
|
-
const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess',
|
|
766
|
+
const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _102 => _102.data, 'access', _103 => _103.colorIndex]), () => ( 0));
|
|
831
767
|
const baseColor = chartSeriesColor(chart, baseIndex);
|
|
832
768
|
const depth = Math.max(0, node.depth - 1);
|
|
833
769
|
return depth === 0 ? baseColor : lightenColor(baseColor, clamp(depth * 0.16, 0, 0.5));
|
|
@@ -835,7 +771,7 @@ function resolveHierarchyNodeColor(chart, node) {
|
|
|
835
771
|
function resolveTreemapNodeColor(chart, node) {
|
|
836
772
|
const lineage = node.ancestors().reverse();
|
|
837
773
|
const topLevel = lineage[1];
|
|
838
|
-
return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess',
|
|
774
|
+
return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _104 => _104.data, 'access', _105 => _105.colorIndex]), () => ( 0)));
|
|
839
775
|
}
|
|
840
776
|
function excelTreemapTile(node, x0, y0, x1, y1) {
|
|
841
777
|
if (!node.children || node.children.length === 0) {
|
|
@@ -850,12 +786,12 @@ function excelTreemapTile(node, x0, y0, x1, y1) {
|
|
|
850
786
|
node.children.forEach((child) => excelTreemapTile(child, child.x0, child.y0, child.x1, child.y1));
|
|
851
787
|
}
|
|
852
788
|
function resolveSurfaceBaseColor(chart, palette) {
|
|
853
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
789
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _106 => _106.chartColorPalette, 'optionalAccess', _107 => _107[0]]), () => ( _optionalChain([chart, 'access', _108 => _108.series, 'access', _109 => _109[0], 'optionalAccess', _110 => _110.color]))), () => ( _optionalChain([chart, 'access', _111 => _111.series, 'access', _112 => _112[0], 'optionalAccess', _113 => _113.lineColor]))), () => ( chart.axisLineColor)), () => ( chart.textColor)), () => ( palette.text));
|
|
854
790
|
}
|
|
855
791
|
function resolveExplicitSurfaceSeriesColor(chart, kind) {
|
|
856
|
-
const shape = _optionalChain([chart, 'access',
|
|
857
|
-
if (kind === "fill" ? _optionalChain([shape, 'optionalAccess',
|
|
858
|
-
const color = kind === "fill" ? _nullishCoalesce(_optionalChain([shape, 'optionalAccess',
|
|
792
|
+
const shape = _optionalChain([chart, 'access', _114 => _114.series, 'access', _115 => _115[0], 'optionalAccess', _116 => _116.shapeProperties]);
|
|
793
|
+
if (kind === "fill" ? _optionalChain([shape, 'optionalAccess', _117 => _117.xmlFillHidden]) === true : _optionalChain([shape, 'optionalAccess', _118 => _118.xmlLineHidden]) === true) return "transparent";
|
|
794
|
+
const color = kind === "fill" ? _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _119 => _119.xmlFillColor]), () => ( _optionalChain([shape, 'optionalAccess', _120 => _120.solidFillHex]))) : _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _121 => _121.xmlLineColor]), () => ( _optionalChain([shape, 'optionalAccess', _122 => _122.lineColorHex])));
|
|
859
795
|
return normalizeRendererHexColor(color);
|
|
860
796
|
}
|
|
861
797
|
function getSurfaceColorStops(chart, palette) {
|
|
@@ -870,9 +806,9 @@ function resolveSurfaceBandPaletteColor(chart, palette, domain, value) {
|
|
|
870
806
|
if (explicitColor) return explicitColor;
|
|
871
807
|
const explicitFill = resolveExplicitSurfaceSeriesColor(chart, "fill");
|
|
872
808
|
if (explicitFill) return explicitFill;
|
|
873
|
-
const themeColors = _optionalChain([chart, 'access',
|
|
809
|
+
const themeColors = _optionalChain([chart, 'access', _123 => _123.raw, 'optionalAccess', _124 => _124.builtinThemeColors]);
|
|
874
810
|
const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
|
|
875
|
-
const builtinColor = themeColors ?
|
|
811
|
+
const builtinColor = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, bandIndex % paletteCount, paletteCount), themeColors) : void 0;
|
|
876
812
|
if (builtinColor) return builtinColor;
|
|
877
813
|
const stops = getSurfaceColorStops(chart, palette);
|
|
878
814
|
if (stops.length === 0) {
|
|
@@ -885,8 +821,8 @@ function getSurfaceDomain(chart) {
|
|
|
885
821
|
if (numericValues.length === 0) {
|
|
886
822
|
return null;
|
|
887
823
|
}
|
|
888
|
-
const explicitMin = typeof _optionalChain([chart, 'access',
|
|
889
|
-
const explicitMax = typeof _optionalChain([chart, 'access',
|
|
824
|
+
const explicitMin = typeof _optionalChain([chart, 'access', _125 => _125.valueAxis, 'optionalAccess', _126 => _126.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? chart.valueAxis.min : null;
|
|
825
|
+
const explicitMax = typeof _optionalChain([chart, 'access', _127 => _127.valueAxis, 'optionalAccess', _128 => _128.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? chart.valueAxis.max : null;
|
|
890
826
|
const rawMin = Math.min(...numericValues);
|
|
891
827
|
const rawMax = Math.max(...numericValues);
|
|
892
828
|
const spanBase = Math.max(1e-6, rawMax - Math.min(0, rawMin));
|
|
@@ -894,7 +830,7 @@ function getSurfaceDomain(chart) {
|
|
|
894
830
|
const magnitude = 10 ** Math.floor(Math.log10(Math.max(roughStep, 1e-6)));
|
|
895
831
|
const normalized = roughStep / magnitude;
|
|
896
832
|
const niceNormalized = normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10;
|
|
897
|
-
const step = typeof _optionalChain([chart, 'access',
|
|
833
|
+
const step = typeof _optionalChain([chart, 'access', _129 => _129.valueAxis, 'optionalAccess', _130 => _130.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : niceNormalized * magnitude;
|
|
898
834
|
const minValue = _nullishCoalesce(explicitMin, () => ( (rawMin >= 0 ? 0 : Math.floor(rawMin / step) * step)));
|
|
899
835
|
const maxValue = _nullishCoalesce(explicitMax, () => ( Math.ceil(rawMax / step) * step));
|
|
900
836
|
const safeMax = maxValue <= minValue ? minValue + step : maxValue;
|
|
@@ -924,16 +860,16 @@ function resolveSurfaceBandIndex(domain, value) {
|
|
|
924
860
|
return Math.max(0, ticks.length - 2);
|
|
925
861
|
}
|
|
926
862
|
function resolveSurfaceBandFormatColor(chart, key, index) {
|
|
927
|
-
const colors = _optionalChain([chart, 'access',
|
|
863
|
+
const colors = _optionalChain([chart, 'access', _131 => _131.raw, 'optionalAccess', _132 => _132[key]]);
|
|
928
864
|
if (!colors || typeof colors !== "object" || !Object.prototype.hasOwnProperty.call(colors, index)) return null;
|
|
929
865
|
const color = colors[index];
|
|
930
866
|
return typeof color === "string" && color.length > 0 ? color : null;
|
|
931
867
|
}
|
|
932
868
|
function resolveSurfaceWireframeColor(chart, palette, domain, value) {
|
|
933
869
|
const bandIndex = resolveSurfaceBandIndex(domain, value);
|
|
934
|
-
const themeColors = _optionalChain([chart, 'access',
|
|
870
|
+
const themeColors = _optionalChain([chart, 'access', _133 => _133.raw, 'optionalAccess', _134 => _134.builtinThemeColors]);
|
|
935
871
|
const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
|
|
936
|
-
const builtinLine = themeColors ?
|
|
872
|
+
const builtinLine = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartSurfaceLine.call(void 0, chart.chartStyleId, bandIndex, paletteCount), themeColors) : void 0;
|
|
937
873
|
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(resolveSurfaceBandFormatColor(chart, "bandFormatLineColors", bandIndex), () => ( resolveExplicitSurfaceSeriesColor(chart, "line"))), () => ( builtinLine)), () => ( resolveSurfaceBandPaletteColor(chart, palette, domain, value)));
|
|
938
874
|
}
|
|
939
875
|
function resolveSurfacePlotRect(chart, layout) {
|
|
@@ -941,7 +877,7 @@ function resolveSurfacePlotRect(chart, layout) {
|
|
|
941
877
|
return layout.plot;
|
|
942
878
|
}
|
|
943
879
|
const columnCount = Math.max(1, getCategoryLabels(chart).length);
|
|
944
|
-
const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
880
|
+
const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access', _135 => _135.view3d, 'optionalAccess', _136 => _136.depthPercent]), () => ( 100))) / 100);
|
|
945
881
|
const targetAspect = columnCount / Math.max(1, chart.series.length) / depthScale;
|
|
946
882
|
let width = layout.plot.width;
|
|
947
883
|
let height = layout.plot.height;
|
|
@@ -985,7 +921,7 @@ function isContourSurfaceChart(chart) {
|
|
|
985
921
|
return chart.chartType === "Surface" && chart.is3d !== true;
|
|
986
922
|
}
|
|
987
923
|
function renderSurfaceAxes(chart, layout) {
|
|
988
|
-
if (_optionalChain([chart, 'access',
|
|
924
|
+
if (_optionalChain([chart, 'access', _137 => _137.categoryAxis, 'optionalAccess', _138 => _138.delete]) && _optionalChain([chart, 'access', _139 => _139.seriesAxis, 'optionalAccess', _140 => _140.delete]) && _optionalChain([chart, 'access', _141 => _141.valueAxis, 'optionalAccess', _142 => _142.delete])) {
|
|
989
925
|
return null;
|
|
990
926
|
}
|
|
991
927
|
const plot = resolveSurfacePlotRect(chart, layout);
|
|
@@ -995,10 +931,10 @@ function renderSurfaceAxes(chart, layout) {
|
|
|
995
931
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( "#888888"));
|
|
996
932
|
const rowCount = Math.max(1, seriesLabels.length);
|
|
997
933
|
const columnCount = Math.max(1, categories.length);
|
|
998
|
-
const columnPositions = categories.map((_, index) => plot.left + (isContourSurfaceChart(chart) && _optionalChain([chart, 'access',
|
|
934
|
+
const columnPositions = categories.map((_, index) => plot.left + (isContourSurfaceChart(chart) && _optionalChain([chart, 'access', _143 => _143.valueAxis, 'optionalAccess', _144 => _144.crossBetween]) !== "midCat" ? (index + 0.5) / columnCount * plot.width : columnCount <= 1 ? plot.width / 2 : index / (columnCount - 1) * plot.width));
|
|
999
935
|
const rowPositions = seriesLabels.map((_, index) => plot.top + plot.height - (rowCount <= 1 ? plot.height / 2 : index / (rowCount - 1) * plot.height));
|
|
1000
|
-
return /* @__PURE__ */
|
|
1001
|
-
isContourSurfaceChart(chart) && /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
937
|
+
isContourSurfaceChart(chart) && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1002
938
|
"rect",
|
|
1003
939
|
{
|
|
1004
940
|
fill: "none",
|
|
@@ -1010,7 +946,7 @@ function renderSurfaceAxes(chart, layout) {
|
|
|
1010
946
|
y: plot.top
|
|
1011
947
|
}
|
|
1012
948
|
),
|
|
1013
|
-
_optionalChain([chart, 'access',
|
|
949
|
+
_optionalChain([chart, 'access', _145 => _145.categoryAxis, 'optionalAccess', _146 => _146.delete]) !== true && _optionalChain([chart, 'access', _147 => _147.categoryAxis, 'optionalAccess', _148 => _148.labelPosition]) !== "none" && categories.map((label, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1014
950
|
"text",
|
|
1015
951
|
{
|
|
1016
952
|
fill: labelColor,
|
|
@@ -1022,7 +958,7 @@ function renderSurfaceAxes(chart, layout) {
|
|
|
1022
958
|
},
|
|
1023
959
|
`surface-x-label-${index}`
|
|
1024
960
|
)),
|
|
1025
|
-
_optionalChain([chart, 'access',
|
|
961
|
+
_optionalChain([chart, 'access', _149 => _149.seriesAxis, 'optionalAccess', _150 => _150.delete]) !== true && _optionalChain([chart, 'access', _151 => _151.seriesAxis, 'optionalAccess', _152 => _152.labelPosition]) !== "none" && seriesLabels.map((label, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1026
962
|
"text",
|
|
1027
963
|
{
|
|
1028
964
|
fill: labelColor,
|
|
@@ -1077,7 +1013,7 @@ function getLegendItems(chart, chartType, palette) {
|
|
|
1077
1013
|
}
|
|
1078
1014
|
if (chartType === "Sunburst" || chartType === "Treemap") {
|
|
1079
1015
|
const hierarchyData = buildHierarchyData(chart);
|
|
1080
|
-
if (!_optionalChain([hierarchyData, 'optionalAccess',
|
|
1016
|
+
if (!_optionalChain([hierarchyData, 'optionalAccess', _153 => _153.children])) {
|
|
1081
1017
|
return [];
|
|
1082
1018
|
}
|
|
1083
1019
|
return hierarchyData.children.map((child, index) => ({
|
|
@@ -1088,7 +1024,7 @@ function getLegendItems(chart, chartType, palette) {
|
|
|
1088
1024
|
if (chartType === "Pie" || chartType === "Pie3D" || chartType === "PieExploded" || chartType === "Doughnut" || chartType === "BarOfPie") {
|
|
1089
1025
|
if (chartType === "BarOfPie") {
|
|
1090
1026
|
const categories = getCategoryLabels(chart);
|
|
1091
|
-
const values = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
1027
|
+
const values = _nullishCoalesce(_optionalChain([chart, 'access', _154 => _154.series, 'access', _155 => _155[0], 'optionalAccess', _156 => _156.values]), () => ( []));
|
|
1092
1028
|
return categories.map((label, index) => ({
|
|
1093
1029
|
color: chartPointColor(chart, index),
|
|
1094
1030
|
label: normalizeCategoryLabel(label),
|
|
@@ -1113,8 +1049,8 @@ function buildLayout(chart, rect, legendItems) {
|
|
|
1113
1049
|
const width = Math.max(80, Math.round(rect.width));
|
|
1114
1050
|
const height = Math.max(60, Math.round(rect.height));
|
|
1115
1051
|
const isSurfaceChart = chart.chartType === "Surface" || chart.raw && typeof chart.raw === "object" && typeof chart.raw.xmlChartType === "string" && String(chart.raw.xmlChartType).includes("surface");
|
|
1116
|
-
const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access',
|
|
1117
|
-
const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access',
|
|
1052
|
+
const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access', _157 => _157.raw, 'optionalAccess', _158 => _158.titleOverlay]) === true) ? isSurfaceChart ? 30 : 24 : 8;
|
|
1053
|
+
const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access', _159 => _159.legend, 'optionalAccess', _160 => _160.position]));
|
|
1118
1054
|
const legendVertical = legendItems.length > 0 && (legendPosition === "right" || legendPosition === "left");
|
|
1119
1055
|
const compactWidth = width <= 280;
|
|
1120
1056
|
const compactHeight = height <= 200;
|
|
@@ -1124,10 +1060,10 @@ function buildLayout(chart, rect, legendItems) {
|
|
|
1124
1060
|
const horizontalMapGradient = chart.chartType === "RegionMap" && legendItems.length > 0 && !resolveRegionMapColorStrings(primarySeries) && (layoutLegendPosition === "top" || layoutLegendPosition === "bottom");
|
|
1125
1061
|
const horizontalLegendHeight = horizontalMapGradient ? Math.min(48, Math.max(24, height - titleHeight - 8)) : 24;
|
|
1126
1062
|
const legendWidth = isSurfaceChart ? Math.max(32, ...legendItems.map((item) => 20 + item.label.length * 5.4)) : 98;
|
|
1127
|
-
const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access',
|
|
1063
|
+
const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access', _161 => _161.valueAxis, 'optionalAccess', _162 => _162.delete]) ? 12 : 42) + (layoutLegendPosition === "left" ? legendWidth : 0);
|
|
1128
1064
|
const plotRight = 16 + (layoutLegendPosition === "right" ? legendWidth : 0);
|
|
1129
1065
|
const plotTop = titleHeight + (layoutLegendPosition === "top" ? horizontalLegendHeight : 0);
|
|
1130
|
-
const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access',
|
|
1066
|
+
const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access', _163 => _163.categoryAxis, 'optionalAccess', _164 => _164.delete]) ? 8 : 28) + (layoutLegendPosition === "bottom" ? horizontalLegendHeight : 0);
|
|
1131
1067
|
const plotWidth = Math.max(horizontalMapGradient ? 1 : 40, width - plotLeft - plotRight);
|
|
1132
1068
|
return {
|
|
1133
1069
|
height,
|
|
@@ -1200,30 +1136,30 @@ function resolveNumericAxisDomain(minValue, maxValue, majorUnit, includeZero = f
|
|
|
1200
1136
|
};
|
|
1201
1137
|
}
|
|
1202
1138
|
function resolveAxisDomainWithChartOverrides(axis, minValue, maxValue, includeZero = false) {
|
|
1203
|
-
const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess',
|
|
1204
|
-
const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess',
|
|
1205
|
-
const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1206
|
-
const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1207
|
-
const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess',
|
|
1139
|
+
const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess', _165 => _165.min]) === "number" && Number.isFinite(axis.min);
|
|
1140
|
+
const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess', _166 => _166.max]) === "number" && Number.isFinite(axis.max);
|
|
1141
|
+
const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _167 => _167.min])) : minValue;
|
|
1142
|
+
const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _168 => _168.max])) : maxValue;
|
|
1143
|
+
const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess', _169 => _169.majorUnit]), includeZero);
|
|
1208
1144
|
return {
|
|
1209
1145
|
hasExplicitMax,
|
|
1210
1146
|
hasExplicitMin,
|
|
1211
|
-
majorUnit: _optionalChain([axis, 'optionalAccess',
|
|
1212
|
-
max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1213
|
-
min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1147
|
+
majorUnit: _optionalChain([axis, 'optionalAccess', _170 => _170.majorUnit]),
|
|
1148
|
+
max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _171 => _171.max])) : domain.max,
|
|
1149
|
+
min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _172 => _172.min])) : domain.min,
|
|
1214
1150
|
ticks: hasExplicitMin || hasExplicitMax ? buildNumericTickValues(
|
|
1215
|
-
hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1216
|
-
hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1217
|
-
_optionalChain([axis, 'optionalAccess',
|
|
1151
|
+
hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _173 => _173.min])) : domain.min,
|
|
1152
|
+
hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _174 => _174.max])) : domain.max,
|
|
1153
|
+
_optionalChain([axis, 'optionalAccess', _175 => _175.majorUnit])
|
|
1218
1154
|
) : domain.ticks
|
|
1219
1155
|
};
|
|
1220
1156
|
}
|
|
1221
1157
|
function resolve3dFrameOffsets(chart, baseDepthX = 11, baseDepthY = 8) {
|
|
1222
|
-
const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1223
|
-
const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1224
|
-
const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1225
|
-
const usePerspective = _optionalChain([chart, 'access',
|
|
1226
|
-
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1158
|
+
const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _176 => _176.view3d, 'optionalAccess', _177 => _177.depthPercent]), () => ( 100))) / 100, 0.35, 3.2);
|
|
1159
|
+
const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _178 => _178.view3d, 'optionalAccess', _179 => _179.rotX]), () => ( 20)), -80, 80);
|
|
1160
|
+
const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _180 => _180.view3d, 'optionalAccess', _181 => _181.rotY]), () => ( 20)), -80, 80);
|
|
1161
|
+
const usePerspective = _optionalChain([chart, 'access', _182 => _182.view3d, 'optionalAccess', _183 => _183.rAngAx]) === false;
|
|
1162
|
+
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _184 => _184.view3d, 'optionalAccess', _185 => _185.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
|
|
1227
1163
|
const projectedOrigin = projectCartesian3dPoint(
|
|
1228
1164
|
0,
|
|
1229
1165
|
0,
|
|
@@ -1321,9 +1257,9 @@ function formatExcelDateSerial(value, formatCode, use1904) {
|
|
|
1321
1257
|
function formatCategoryLabel(chart, value, fallback = "") {
|
|
1322
1258
|
const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
|
|
1323
1259
|
const numeric = typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
1324
|
-
const formatCode = _optionalChain([chart, 'access',
|
|
1260
|
+
const formatCode = _optionalChain([chart, 'access', _186 => _186.categoryAxis, 'optionalAccess', _187 => _187.numberFormat, 'optionalAccess', _188 => _188.formatCode]);
|
|
1325
1261
|
if (numeric != null && isLikelyDateFormatCode(formatCode)) {
|
|
1326
|
-
return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess',
|
|
1262
|
+
return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess', _189 => _189.date1904]) === true);
|
|
1327
1263
|
}
|
|
1328
1264
|
const normalized = normalizeCategoryLabel(value);
|
|
1329
1265
|
if (normalized.length > 0) {
|
|
@@ -1454,7 +1390,7 @@ function renderTitle(chart, layout, palette) {
|
|
|
1454
1390
|
const fontSize = 12;
|
|
1455
1391
|
const text = truncateSvgText(chart.title, Math.max(40, layout.width - 12), fontSize);
|
|
1456
1392
|
const baselineY = layout.titleHeight >= 30 ? 19 : 16;
|
|
1457
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1458
1394
|
"text",
|
|
1459
1395
|
{
|
|
1460
1396
|
fill: _nullishCoalesce(_nullishCoalesce(chart.titleColor, () => ( chart.textColor)), () => ( DEFAULT_CHART_TEXT_COLOR)),
|
|
@@ -1483,27 +1419,27 @@ function renderLegend(chart, layout, palette) {
|
|
|
1483
1419
|
if (!resolveRegionMapColorStrings(series)) {
|
|
1484
1420
|
const vertical = legendPos === "left" || legendPos === "right";
|
|
1485
1421
|
const x = vertical ? legendPos === "right" ? layout.plot.left + layout.plot.width + 8 : 8 : layout.plot.left;
|
|
1486
|
-
const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access',
|
|
1487
|
-
const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access',
|
|
1422
|
+
const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access', _190 => _190.legendBounds, 'optionalAccess', _191 => _191.height]), () => ( 48))) >= 44;
|
|
1423
|
+
const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access', _192 => _192.legendBounds, 'optionalAccess', _193 => _193.top]), () => ( layout.height - 48))) + (showSeriesName ? 20 : 4);
|
|
1488
1424
|
const length = vertical ? Math.min(100, Math.max(24, layout.plot.height - 42)) : Math.min(160, layout.plot.width);
|
|
1489
1425
|
const gradientId = `map-legend-${chart.id}`;
|
|
1490
1426
|
const stops = resolveRegionMapValueColors(series);
|
|
1491
|
-
const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess',
|
|
1492
|
-
return /* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
showSeriesName && /* @__PURE__ */
|
|
1495
|
-
/* @__PURE__ */
|
|
1496
|
-
/* @__PURE__ */
|
|
1497
|
-
/* @__PURE__ */
|
|
1427
|
+
const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess', _194 => _194.length]), () => ( 3));
|
|
1428
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1429
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "defs", { children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "linearGradient", { id: gradientId, x1: "0%", x2: vertical ? "0%" : "100%", y1: vertical ? "100%" : "0%", y2: "0%", children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: `${index / (count - 1) * 100}%`, stopColor: resolveRegionMapValueColor(chart, seriesIndex, index / (count - 1)) }, index)) }) }),
|
|
1430
|
+
showSeriesName && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: textColor, fontSize: 10, x, y: y - 12, children: _nullishCoalesce(_optionalChain([series, 'optionalAccess', _195 => _195.name]), () => ( "")) }),
|
|
1431
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: `url(#${gradientId})`, x, y, width: vertical ? 8 : length, height: vertical ? length : 8 }),
|
|
1432
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: textColor, fontSize: 10, x: vertical ? x + 12 : x, y: vertical ? y + length : y + 20, children: _optionalChain([items, 'access', _196 => _196[0], 'optionalAccess', _197 => _197.label]) }),
|
|
1433
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: textColor, fontSize: 10, textAnchor: vertical ? "start" : "end", x: vertical ? x + 12 : x + length, y: vertical ? y + 7 : y + 20, children: _optionalChain([items, 'access', _198 => _198[1], 'optionalAccess', _199 => _199.label]) })
|
|
1498
1434
|
] });
|
|
1499
1435
|
}
|
|
1500
1436
|
}
|
|
1501
1437
|
if (legendPos === "left" || legendPos === "right") {
|
|
1502
1438
|
const x = legendPos === "right" ? layout.plot.left + layout.plot.width + 8 : 8;
|
|
1503
1439
|
const startY = chart.chartType === "Surface" ? layout.plot.top + Math.max(6, (layout.plot.height - items.length * 18) / 2 + 9) : layout.plot.top + 6;
|
|
1504
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: items.map((item, index) => {
|
|
1505
1441
|
const y = startY + index * 18;
|
|
1506
|
-
return /* @__PURE__ */
|
|
1442
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
1507
1443
|
"g",
|
|
1508
1444
|
{
|
|
1509
1445
|
...index < chart.series.length ? chartElementDataProps(index) : {},
|
|
@@ -1511,17 +1447,17 @@ function renderLegend(chart, layout, palette) {
|
|
|
1511
1447
|
key: `legend-${index}`,
|
|
1512
1448
|
transform: `translate(${x}, ${y})`
|
|
1513
1449
|
},
|
|
1514
|
-
/* @__PURE__ */
|
|
1515
|
-
/* @__PURE__ */
|
|
1450
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: chart.chartType === "Surface" && chart.wireframe ? "none" : item.color, stroke: chart.chartType === "Surface" && chart.wireframe ? item.color : void 0, height: swatchSize, width: swatchSize, x: 0, y: -7 }),
|
|
1451
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: textColor, fontSize: 10, x: textOffset, y: 0, children: item.label })
|
|
1516
1452
|
);
|
|
1517
1453
|
}) });
|
|
1518
1454
|
}
|
|
1519
1455
|
const rowY = legendPos === "top" ? layout.titleHeight + 12 : layout.height - 8;
|
|
1520
1456
|
const totalWidth = items.reduce((sum, item) => sum + 24 + Math.min(96, item.label.length * 5.4), 0);
|
|
1521
1457
|
let cursorX = Math.max(8, (layout.width - totalWidth) / 2);
|
|
1522
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: items.map((item, index) => {
|
|
1523
1459
|
const labelWidth = Math.min(96, item.label.length * 5.4);
|
|
1524
|
-
const node = /* @__PURE__ */
|
|
1460
|
+
const node = /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
1525
1461
|
"g",
|
|
1526
1462
|
{
|
|
1527
1463
|
...index < chart.series.length ? chartElementDataProps(index) : {},
|
|
@@ -1529,8 +1465,8 @@ function renderLegend(chart, layout, palette) {
|
|
|
1529
1465
|
key: `legend-${index}`,
|
|
1530
1466
|
transform: `translate(${cursorX}, ${rowY})`
|
|
1531
1467
|
},
|
|
1532
|
-
/* @__PURE__ */
|
|
1533
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: chart.chartType === "Surface" && chart.wireframe ? "none" : item.color, stroke: chart.chartType === "Surface" && chart.wireframe ? item.color : void 0, height: swatchSize, width: swatchSize, x: 0, y: -7 }),
|
|
1469
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: textColor, fontSize: 10, x: textOffset, y: 0, children: item.label })
|
|
1534
1470
|
);
|
|
1535
1471
|
cursorX += 24 + labelWidth;
|
|
1536
1472
|
return node;
|
|
@@ -1540,16 +1476,16 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1540
1476
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
1541
1477
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
1542
1478
|
const zeroPosition = mapValue(0);
|
|
1543
|
-
const showValueAxis = _optionalChain([chart, 'access',
|
|
1544
|
-
const showCategoryAxis = _optionalChain([chart, 'access',
|
|
1545
|
-
const showValueLabels = showValueAxis && _optionalChain([chart, 'access',
|
|
1546
|
-
const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access',
|
|
1547
|
-
return /* @__PURE__ */
|
|
1479
|
+
const showValueAxis = _optionalChain([chart, 'access', _200 => _200.valueAxis, 'optionalAccess', _201 => _201.delete]) !== true;
|
|
1480
|
+
const showCategoryAxis = _optionalChain([chart, 'access', _202 => _202.categoryAxis, 'optionalAccess', _203 => _203.delete]) !== true;
|
|
1481
|
+
const showValueLabels = showValueAxis && _optionalChain([chart, 'access', _204 => _204.valueAxis, 'optionalAccess', _205 => _205.labelPosition]) !== "none";
|
|
1482
|
+
const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access', _206 => _206.categoryAxis, 'optionalAccess', _207 => _207.labelPosition]) !== "none";
|
|
1483
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1548
1484
|
showValueAxis ? valueTicks.map((tick) => {
|
|
1549
1485
|
const valuePosition = mapValue(tick);
|
|
1550
1486
|
if (isHorizontal) {
|
|
1551
|
-
return /* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1488
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1553
1489
|
"line",
|
|
1554
1490
|
{
|
|
1555
1491
|
stroke: lightenColor(axisColor, 0.7),
|
|
@@ -1560,7 +1496,7 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1560
1496
|
y2: plot.top + plot.height
|
|
1561
1497
|
}
|
|
1562
1498
|
),
|
|
1563
|
-
showValueLabels ? /* @__PURE__ */
|
|
1499
|
+
showValueLabels ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1564
1500
|
"text",
|
|
1565
1501
|
{
|
|
1566
1502
|
fill: labelColor,
|
|
@@ -1573,8 +1509,8 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1573
1509
|
) : null
|
|
1574
1510
|
] }, `grid-v-${tick}`);
|
|
1575
1511
|
}
|
|
1576
|
-
return /* @__PURE__ */
|
|
1577
|
-
/* @__PURE__ */
|
|
1512
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1513
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1578
1514
|
"line",
|
|
1579
1515
|
{
|
|
1580
1516
|
stroke: lightenColor(axisColor, 0.7),
|
|
@@ -1585,7 +1521,7 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1585
1521
|
y2: valuePosition
|
|
1586
1522
|
}
|
|
1587
1523
|
),
|
|
1588
|
-
showValueLabels ? /* @__PURE__ */
|
|
1524
|
+
showValueLabels ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1589
1525
|
"text",
|
|
1590
1526
|
{
|
|
1591
1527
|
fill: labelColor,
|
|
@@ -1601,7 +1537,7 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1601
1537
|
showCategoryLabels ? categoryPositions.map((position, index) => {
|
|
1602
1538
|
const label = _nullishCoalesce(categoryLabels[index], () => ( ""));
|
|
1603
1539
|
if (isHorizontal) {
|
|
1604
|
-
return /* @__PURE__ */
|
|
1540
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1605
1541
|
"text",
|
|
1606
1542
|
{
|
|
1607
1543
|
fill: labelColor,
|
|
@@ -1614,7 +1550,7 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1614
1550
|
`cat-y-${index}`
|
|
1615
1551
|
);
|
|
1616
1552
|
}
|
|
1617
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1618
1554
|
"text",
|
|
1619
1555
|
{
|
|
1620
1556
|
fill: labelColor,
|
|
@@ -1627,8 +1563,8 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1627
1563
|
`cat-x-${index}`
|
|
1628
1564
|
);
|
|
1629
1565
|
}) : null,
|
|
1630
|
-
isHorizontal ? /* @__PURE__ */
|
|
1631
|
-
showValueAxis ? /* @__PURE__ */
|
|
1566
|
+
isHorizontal ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
1567
|
+
showValueAxis ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1632
1568
|
"line",
|
|
1633
1569
|
{
|
|
1634
1570
|
stroke: axisColor,
|
|
@@ -1639,7 +1575,7 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1639
1575
|
y2: plot.top + plot.height
|
|
1640
1576
|
}
|
|
1641
1577
|
) : null,
|
|
1642
|
-
showCategoryAxis ? /* @__PURE__ */
|
|
1578
|
+
showCategoryAxis ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1643
1579
|
"line",
|
|
1644
1580
|
{
|
|
1645
1581
|
stroke: axisColor,
|
|
@@ -1650,8 +1586,8 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1650
1586
|
y2: plot.top + plot.height
|
|
1651
1587
|
}
|
|
1652
1588
|
) : null
|
|
1653
|
-
] }) : /* @__PURE__ */
|
|
1654
|
-
showValueAxis ? /* @__PURE__ */
|
|
1589
|
+
] }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
1590
|
+
showValueAxis ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1655
1591
|
"line",
|
|
1656
1592
|
{
|
|
1657
1593
|
stroke: axisColor,
|
|
@@ -1662,7 +1598,7 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1662
1598
|
y2: plot.top + plot.height
|
|
1663
1599
|
}
|
|
1664
1600
|
) : null,
|
|
1665
|
-
showCategoryAxis ? /* @__PURE__ */
|
|
1601
|
+
showCategoryAxis ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
1666
1602
|
"line",
|
|
1667
1603
|
{
|
|
1668
1604
|
stroke: axisColor,
|
|
@@ -1732,11 +1668,11 @@ function renderRadialFrustum(bar, normalizedShape, frontFill, sideFill, topFill)
|
|
|
1732
1668
|
const frontWallPath2 = buildRibbonSvgPath(frontEndArc2, frontStartArc2);
|
|
1733
1669
|
const endCapPath2 = endScale > 0.018 ? buildLinearSvgPath(sampleProjectedEllipseArc(endCenter2, endAxisA2, endAxisB2, 0, Math.PI * 2), true) : "";
|
|
1734
1670
|
const startCapPath = startScale > 0.028 ? buildLinearSvgPath(sampleProjectedEllipseArc(startCenter2, startAxisA2, startAxisB2, 0, Math.PI * 2), true) : "";
|
|
1735
|
-
return /* @__PURE__ */
|
|
1736
|
-
backWallPath2 ? /* @__PURE__ */
|
|
1737
|
-
showEndCap && endCapPath2 ? /* @__PURE__ */
|
|
1738
|
-
frontWallPath2 ? /* @__PURE__ */
|
|
1739
|
-
showStartCap && startCapPath ? /* @__PURE__ */
|
|
1671
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1672
|
+
backWallPath2 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: backWallPath2, fill: sideFill, stroke: bar.stroke, strokeWidth: secondaryStrokeWidth }) : null,
|
|
1673
|
+
showEndCap && endCapPath2 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: endCapPath2, fill: topFill, stroke: bar.stroke, strokeWidth: secondaryStrokeWidth }) : null,
|
|
1674
|
+
frontWallPath2 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: frontWallPath2, fill: frontFill, stroke: bar.stroke, strokeWidth: bar.strokeWidth }) : null,
|
|
1675
|
+
showStartCap && startCapPath ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: startCapPath, fill: frontFill, stroke: bar.stroke, strokeWidth: secondaryStrokeWidth }) : null
|
|
1740
1676
|
] }, `${bar.key}-3d-horizontal-${normalizedShape}`);
|
|
1741
1677
|
}
|
|
1742
1678
|
const startCenter = { x: centerX + depthAxis.x, y: frontY + frontH + depthAxis.y };
|
|
@@ -1752,10 +1688,10 @@ function renderRadialFrustum(bar, normalizedShape, frontFill, sideFill, topFill)
|
|
|
1752
1688
|
const backWallPath = buildRibbonSvgPath(backEndArc, backStartArc);
|
|
1753
1689
|
const frontWallPath = buildRibbonSvgPath(frontEndArc, frontStartArc);
|
|
1754
1690
|
const endCapPath = endScale > 0.018 ? buildLinearSvgPath(sampleProjectedEllipseArc(endCenter, endAxisA, endAxisB, 0, Math.PI * 2), true) : "";
|
|
1755
|
-
return /* @__PURE__ */
|
|
1756
|
-
backWallPath ? /* @__PURE__ */
|
|
1757
|
-
showEndCap && endCapPath ? /* @__PURE__ */
|
|
1758
|
-
frontWallPath ? /* @__PURE__ */
|
|
1691
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1692
|
+
backWallPath ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: backWallPath, fill: sideFill, stroke: bar.stroke, strokeWidth: secondaryStrokeWidth }) : null,
|
|
1693
|
+
showEndCap && endCapPath ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: endCapPath, fill: topFill, stroke: bar.stroke, strokeWidth: secondaryStrokeWidth }) : null,
|
|
1694
|
+
frontWallPath ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: frontWallPath, fill: frontFill, stroke: bar.stroke, strokeWidth: bar.strokeWidth }) : null
|
|
1759
1695
|
] }, `${bar.key}-3d-${normalizedShape}`);
|
|
1760
1696
|
}
|
|
1761
1697
|
function renderExtrudedRect(bar) {
|
|
@@ -1803,10 +1739,10 @@ function renderExtrudedRect(bar) {
|
|
|
1803
1739
|
return renderRadialFrustum(bar, normalizedShape, frontFill, sideFill, topFill);
|
|
1804
1740
|
}
|
|
1805
1741
|
if (normalizedShape === "box") {
|
|
1806
|
-
return /* @__PURE__ */
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
/* @__PURE__ */
|
|
1742
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1743
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: sideFill, points: sideFace, stroke: bar.stroke, strokeWidth: Math.max(0.6, bar.strokeWidth * 0.65) }),
|
|
1744
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: topFill, points: topFace, stroke: bar.stroke, strokeWidth: Math.max(0.6, bar.strokeWidth * 0.65) }),
|
|
1745
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: frontFill, height: frontH, stroke: bar.stroke, strokeWidth: bar.strokeWidth, width: frontW, x: frontX, y: frontY })
|
|
1810
1746
|
] }, `${bar.key}-3d`);
|
|
1811
1747
|
}
|
|
1812
1748
|
if (bar.isHorizontal) {
|
|
@@ -1821,19 +1757,19 @@ function renderExtrudedRect(bar) {
|
|
|
1821
1757
|
const farSidePoints = `${frontX2},${endTop} ${frontX2},${endBottom} ${frontX2 + sideDepthX},${endBottom + depthY} ${frontX2 + sideDepthX},${endTop + depthY}`;
|
|
1822
1758
|
const taperedFarFace = `${frontX2},${endTop} ${frontX2 + sideDepthX},${endTop + depthY} ${frontX2 + sideDepthX},${endBottom + depthY} ${frontX2},${endBottom}`;
|
|
1823
1759
|
const frontPolygon = `${frontX},${startTop} ${frontX2},${endTop} ${frontX2},${endBottom} ${frontX},${startBottom}`;
|
|
1824
|
-
return /* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */
|
|
1827
|
-
/* @__PURE__ */
|
|
1760
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1761
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: sideFill, points: taperedFarFace, stroke: bar.stroke, strokeWidth: Math.max(0.6, bar.strokeWidth * 0.65) }),
|
|
1762
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: topFill, points: topFacePoints, stroke: bar.stroke, strokeWidth: Math.max(0.6, bar.strokeWidth * 0.65) }),
|
|
1763
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: frontFill, points: frontPolygon, stroke: bar.stroke, strokeWidth: bar.strokeWidth })
|
|
1828
1764
|
] }, `${bar.key}-3d-horizontal-${normalizedShape}`);
|
|
1829
1765
|
}
|
|
1830
1766
|
const taperedTopFace = `${topLeft},${frontY} ${topRight},${frontY} ${topRight + sideDepthX},${frontY + depthY} ${topLeft + sideDepthX},${frontY + depthY}`;
|
|
1831
1767
|
const taperedSideFace = `${topRight},${frontY} ${bottomRight},${frontY2} ${bottomRight + sideDepthX},${frontY2 + depthY} ${topRight + sideDepthX},${frontY + depthY}`;
|
|
1832
1768
|
const pyramidFrontFace = `${topLeft},${frontY} ${topRight},${frontY} ${bottomRight},${frontY2} ${bottomLeft},${frontY2}`;
|
|
1833
|
-
return /* @__PURE__ */
|
|
1834
|
-
/* @__PURE__ */
|
|
1835
|
-
showEndCap ? /* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1769
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1770
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: sideFill, points: taperedSideFace, stroke: bar.stroke, strokeWidth: Math.max(0.6, bar.strokeWidth * 0.65) }),
|
|
1771
|
+
showEndCap ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: topFill, points: taperedTopFace, stroke: bar.stroke, strokeWidth: Math.max(0.6, bar.strokeWidth * 0.65) }) : null,
|
|
1772
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: frontFill, points: pyramidFrontFace, stroke: bar.stroke, strokeWidth: bar.strokeWidth })
|
|
1837
1773
|
] }, `${bar.key}-3d-${normalizedShape}`);
|
|
1838
1774
|
}
|
|
1839
1775
|
function buildLinearSvgPath(points, close = false) {
|
|
@@ -1868,22 +1804,22 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
1868
1804
|
chart.valueAxis,
|
|
1869
1805
|
minValue,
|
|
1870
1806
|
maxValue,
|
|
1871
|
-
isAreaChart || _optionalChain([chart, 'access',
|
|
1807
|
+
isAreaChart || _optionalChain([chart, 'access', _208 => _208.valueAxis, 'optionalAccess', _209 => _209.crosses]) === "autoZero"
|
|
1872
1808
|
);
|
|
1873
1809
|
minValue = valueDomain.min;
|
|
1874
1810
|
maxValue = valueDomain.max;
|
|
1875
1811
|
const valueSpan = Math.max(1e-6, maxValue - minValue);
|
|
1876
1812
|
const seriesCount = Math.max(1, chart.series.length);
|
|
1877
1813
|
const categoryCount = Math.max(1, categories.length);
|
|
1878
|
-
const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1814
|
+
const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _210 => _210.view3d, 'optionalAccess', _211 => _211.depthPercent]), () => ( 100))) / 100, 0.5, 4);
|
|
1879
1815
|
const halfDepth = (seriesCount <= 1 ? 0.82 : 1.02) * depthScale;
|
|
1880
1816
|
const frontZ = halfDepth;
|
|
1881
1817
|
const backZ = -halfDepth;
|
|
1882
1818
|
const baseValue = isAreaChart ? Math.max(minValue, Math.min(maxValue, 0)) : minValue;
|
|
1883
|
-
const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1884
|
-
const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1885
|
-
const usePerspective = _optionalChain([chart, 'access',
|
|
1886
|
-
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1819
|
+
const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _212 => _212.view3d, 'optionalAccess', _213 => _213.rotX]), () => ( 18)), -80, 80) * (Math.PI / 180);
|
|
1820
|
+
const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _214 => _214.view3d, 'optionalAccess', _215 => _215.rotY]), () => ( 24)), -80, 80) * (Math.PI / 180);
|
|
1821
|
+
const usePerspective = _optionalChain([chart, 'access', _216 => _216.view3d, 'optionalAccess', _217 => _217.rAngAx]) === false;
|
|
1822
|
+
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _218 => _218.view3d, 'optionalAccess', _219 => _219.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
|
|
1887
1823
|
const normalizeX = (categoryIndex) => categoryCount <= 1 ? 0 : (categoryIndex / (categoryCount - 1) - 0.5) * 2;
|
|
1888
1824
|
const normalizeY = (value) => -(((value - minValue) / valueSpan - 0.5) * 2);
|
|
1889
1825
|
const stackedAreaDepthSpan = isAreaChart && isStackedSeries ? Math.max(0.18, (frontZ - backZ) * 0.56) : 0;
|
|
@@ -1932,7 +1868,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
1932
1868
|
categoryIndex,
|
|
1933
1869
|
defined: point.defined,
|
|
1934
1870
|
depth: top.depth,
|
|
1935
|
-
depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess',
|
|
1871
|
+
depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess', _220 => _220.depth]), () => ( top.depth)),
|
|
1936
1872
|
top,
|
|
1937
1873
|
topBack
|
|
1938
1874
|
};
|
|
@@ -2014,21 +1950,21 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2014
1950
|
)),
|
|
2015
1951
|
tick
|
|
2016
1952
|
}));
|
|
2017
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2018
1954
|
yTicks.map((tick) => {
|
|
2019
1955
|
const yNorm = normalizeY(tick);
|
|
2020
1956
|
const leftBack = toScreenPoint(projectCartesian3dPoint(-1, yNorm, backZ, rotXRad, rotYRad, usePerspective, perspectiveStrength));
|
|
2021
1957
|
const rightBack = toScreenPoint(projectCartesian3dPoint(1, yNorm, backZ, rotXRad, rotYRad, usePerspective, perspectiveStrength));
|
|
2022
1958
|
const leftFront = toScreenPoint(projectCartesian3dPoint(-1, yNorm, frontZ, rotXRad, rotYRad, usePerspective, perspectiveStrength));
|
|
2023
|
-
return /* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
1960
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: gridColor, strokeWidth: 1, x1: leftBack.x, x2: rightBack.x, y1: leftBack.y, y2: rightBack.y }),
|
|
1961
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: gridColor, strokeWidth: 0.9, x1: leftBack.x, x2: leftFront.x, y1: leftBack.y, y2: leftFront.y })
|
|
2026
1962
|
] }, `line3d-grid-${tick}`);
|
|
2027
1963
|
}),
|
|
2028
1964
|
boxEdges.map(([startIndex, endIndex, emphasized], index) => {
|
|
2029
1965
|
const start = screenCorners[startIndex];
|
|
2030
1966
|
const end = screenCorners[endIndex];
|
|
2031
|
-
return /* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2032
1968
|
"line",
|
|
2033
1969
|
{
|
|
2034
1970
|
stroke: emphasized ? edgeColor : lightenColor(edgeColor, 0.34),
|
|
@@ -2057,17 +1993,17 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2057
1993
|
] : [];
|
|
2058
1994
|
const strokeColor = chartSeriesStrokeColor(chart, seriesIndex);
|
|
2059
1995
|
const fillColor = chartSeriesColor(chart, seriesIndex);
|
|
2060
|
-
const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access',
|
|
2061
|
-
const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access',
|
|
1996
|
+
const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access', _221 => _221.series, 'access', _222 => _222[seriesIndex], 'optionalAccess', _223 => _223.markerSymbol]));
|
|
1997
|
+
const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access', _224 => _224.series, 'access', _225 => _225[seriesIndex], 'optionalAccess', _226 => _226.markerSize])));
|
|
2062
1998
|
const slabFaces = isAreaChart && isStackedSeries ? definedPoints.slice(1).map((point, pointIndex) => {
|
|
2063
1999
|
const previous = definedPoints[pointIndex];
|
|
2064
|
-
if (!_optionalChain([previous, 'optionalAccess',
|
|
2000
|
+
if (!_optionalChain([previous, 'optionalAccess', _227 => _227.topBack]) || !point.topBack || !previous.bottomBack || !point.bottomBack) {
|
|
2065
2001
|
return null;
|
|
2066
2002
|
}
|
|
2067
2003
|
const topFace = buildLinearSvgPath([previous.top, point.top, point.topBack, previous.topBack], true);
|
|
2068
2004
|
const bottomFace = buildLinearSvgPath([previous.bottom, point.bottom, point.bottomBack, previous.bottomBack], true);
|
|
2069
|
-
return /* @__PURE__ */
|
|
2070
|
-
/* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
2006
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2071
2007
|
"path",
|
|
2072
2008
|
{
|
|
2073
2009
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2078,7 +2014,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2078
2014
|
strokeWidth: 0.8
|
|
2079
2015
|
}
|
|
2080
2016
|
),
|
|
2081
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2082
2018
|
"path",
|
|
2083
2019
|
{
|
|
2084
2020
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2093,20 +2029,20 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2093
2029
|
}) : [];
|
|
2094
2030
|
const firstDefinedPoint = _nullishCoalesce(definedPoints[0], () => ( null));
|
|
2095
2031
|
const lastDefinedPoint = _nullishCoalesce(definedPoints[definedPoints.length - 1], () => ( null));
|
|
2096
|
-
const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess',
|
|
2032
|
+
const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess', _228 => _228.topBack]) && _optionalChain([firstDefinedPoint, 'optionalAccess', _229 => _229.bottomBack]) ? buildLinearSvgPath([
|
|
2097
2033
|
firstDefinedPoint.top,
|
|
2098
2034
|
firstDefinedPoint.bottom,
|
|
2099
2035
|
firstDefinedPoint.bottomBack,
|
|
2100
2036
|
firstDefinedPoint.topBack
|
|
2101
2037
|
], true) : "";
|
|
2102
|
-
const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess',
|
|
2038
|
+
const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess', _230 => _230.topBack]) && _optionalChain([lastDefinedPoint, 'optionalAccess', _231 => _231.bottomBack]) ? buildLinearSvgPath([
|
|
2103
2039
|
lastDefinedPoint.top,
|
|
2104
2040
|
lastDefinedPoint.bottom,
|
|
2105
2041
|
lastDefinedPoint.bottomBack,
|
|
2106
2042
|
lastDefinedPoint.topBack
|
|
2107
2043
|
], true) : "";
|
|
2108
|
-
return /* @__PURE__ */
|
|
2109
|
-
isAreaChart && isStackedSeries && areaBackPoints.length >= 3 ? /* @__PURE__ */
|
|
2044
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2045
|
+
isAreaChart && isStackedSeries && areaBackPoints.length >= 3 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2110
2046
|
"path",
|
|
2111
2047
|
{
|
|
2112
2048
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2118,7 +2054,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2118
2054
|
}
|
|
2119
2055
|
) : null,
|
|
2120
2056
|
slabFaces,
|
|
2121
|
-
startCap ? /* @__PURE__ */
|
|
2057
|
+
startCap ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2122
2058
|
"path",
|
|
2123
2059
|
{
|
|
2124
2060
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2129,7 +2065,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2129
2065
|
strokeWidth: 0.7
|
|
2130
2066
|
}
|
|
2131
2067
|
) : null,
|
|
2132
|
-
endCap ? /* @__PURE__ */
|
|
2068
|
+
endCap ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2133
2069
|
"path",
|
|
2134
2070
|
{
|
|
2135
2071
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2140,7 +2076,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2140
2076
|
strokeWidth: 0.7
|
|
2141
2077
|
}
|
|
2142
2078
|
) : null,
|
|
2143
|
-
isAreaChart && areaPoints.length >= 3 ? /* @__PURE__ */
|
|
2079
|
+
isAreaChart && areaPoints.length >= 3 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2144
2080
|
"path",
|
|
2145
2081
|
{
|
|
2146
2082
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2151,7 +2087,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2151
2087
|
strokeWidth: 0.9
|
|
2152
2088
|
}
|
|
2153
2089
|
) : null,
|
|
2154
|
-
!isAreaChart ? definedPoints.map((point, pointIndex) => /* @__PURE__ */
|
|
2090
|
+
!isAreaChart ? definedPoints.map((point, pointIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2155
2091
|
"line",
|
|
2156
2092
|
{
|
|
2157
2093
|
stroke: lightenColor(strokeColor, 0.44),
|
|
@@ -2164,7 +2100,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2164
2100
|
},
|
|
2165
2101
|
`line3d-drop-${seriesIndex}-${pointIndex}`
|
|
2166
2102
|
)) : null,
|
|
2167
|
-
/* @__PURE__ */
|
|
2103
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2168
2104
|
"path",
|
|
2169
2105
|
{
|
|
2170
2106
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2172,27 +2108,27 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2172
2108
|
fill: "none",
|
|
2173
2109
|
stroke: strokeColor,
|
|
2174
2110
|
strokeLinejoin: "round",
|
|
2175
|
-
strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2111
|
+
strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access', _232 => _232.series, 'access', _233 => _233[seriesIndex], 'optionalAccess', _234 => _234.lineWidthPx]), () => ( 2)))
|
|
2176
2112
|
}
|
|
2177
2113
|
),
|
|
2178
|
-
markerPath.length > 0 ? definedPoints.map((point, pointIndex) => /* @__PURE__ */
|
|
2114
|
+
markerPath.length > 0 ? definedPoints.map((point, pointIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2179
2115
|
"g",
|
|
2180
2116
|
{
|
|
2181
2117
|
transform: `translate(${toSvgNumber(point.top.x)}, ${toSvgNumber(point.top.y)})`,
|
|
2182
|
-
children: /* @__PURE__ */
|
|
2118
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2183
2119
|
"path",
|
|
2184
2120
|
{
|
|
2185
2121
|
...chartElementDataProps(seriesIndex, point.categoryIndex),
|
|
2186
2122
|
d: markerPath,
|
|
2187
|
-
fill: _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2188
|
-
stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
2123
|
+
fill: _nullishCoalesce(_optionalChain([chart, 'access', _235 => _235.series, 'access', _236 => _236[seriesIndex], 'optionalAccess', _237 => _237.markerColor]), () => ( fillColor)),
|
|
2124
|
+
stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _238 => _238.series, 'access', _239 => _239[seriesIndex], 'optionalAccess', _240 => _240.markerLineColor]), () => ( chart.chartAreaFillColor)), () => ( palette.surface)),
|
|
2189
2125
|
strokeWidth: 1
|
|
2190
2126
|
}
|
|
2191
2127
|
)
|
|
2192
2128
|
},
|
|
2193
2129
|
`line3d-marker-${seriesIndex}-${pointIndex}`
|
|
2194
2130
|
)) : null,
|
|
2195
|
-
definedPoints.map((point) => /* @__PURE__ */
|
|
2131
|
+
definedPoints.map((point) => /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
2196
2132
|
"circle",
|
|
2197
2133
|
{
|
|
2198
2134
|
...chartElementDataProps(seriesIndex, point.categoryIndex),
|
|
@@ -2204,13 +2140,13 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2204
2140
|
stroke: "none"
|
|
2205
2141
|
}
|
|
2206
2142
|
)),
|
|
2207
|
-
definedPoints.map((point) => isSelectedChartPointOrSeries(selectedChartElement, chart.id, seriesIndex, point.categoryIndex) ? renderSelectionPointHandles(
|
|
2143
|
+
definedPoints.map((point) => isSelectedChartPointOrSeries(selectedChartElement, chart.id, seriesIndex, point.categoryIndex) ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0,
|
|
2208
2144
|
`line3d-selection-${seriesIndex}-${point.categoryIndex}`,
|
|
2209
2145
|
[{ x: point.top.x, y: point.top.y }]
|
|
2210
2146
|
) : null)
|
|
2211
2147
|
] }, `line3d-series-${seriesIndex}`);
|
|
2212
2148
|
}),
|
|
2213
|
-
yLabelPoints.map(({ point, tick }) => /* @__PURE__ */
|
|
2149
|
+
yLabelPoints.map(({ point, tick }) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2214
2150
|
"text",
|
|
2215
2151
|
{
|
|
2216
2152
|
fill: labelColor,
|
|
@@ -2222,7 +2158,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2222
2158
|
},
|
|
2223
2159
|
`line3d-y-label-${tick}`
|
|
2224
2160
|
)),
|
|
2225
|
-
xLabelPoints.map(({ label, point }, index) => /* @__PURE__ */
|
|
2161
|
+
xLabelPoints.map(({ label, point }, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2226
2162
|
"text",
|
|
2227
2163
|
{
|
|
2228
2164
|
fill: labelColor,
|
|
@@ -2247,7 +2183,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2247
2183
|
const isPercentStacked = chartType === "ColumnPercentStacked" || chartType === "BarPercentStacked";
|
|
2248
2184
|
const isHorizontal = chartType === "BarClustered" || chartType === "BarStacked" || chartType === "BarPercentStacked";
|
|
2249
2185
|
const isHistogramLike = isHistogramLikeChart(chart) && chartType === "ColumnClustered";
|
|
2250
|
-
const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access',
|
|
2186
|
+
const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access', _241 => _241.categoryAxis, 'optionalAccess', _242 => _242.orientation]) !== "maxMin";
|
|
2251
2187
|
const categories = shouldReverseCategories ? sourceCategories.slice().reverse() : sourceCategories;
|
|
2252
2188
|
const isStacked = chartType === "ColumnStacked" || chartType === "BarStacked" || isPercentStacked;
|
|
2253
2189
|
const negativeFillMode = isPercentStacked ? "chartArea" : chartType === "ColumnClustered" ? "none" : "series";
|
|
@@ -2339,13 +2275,13 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2339
2275
|
const depthGridSpanY = usesSeriesDepthAxis && frameOffsets ? frameOffsets.depthY * depthLaneSpread : 0;
|
|
2340
2276
|
const depthSlotX = usesSeriesDepthAxis ? depthGridSpanX / Math.max(1, seriesCount) : 0;
|
|
2341
2277
|
const depthSlotY = usesSeriesDepthAxis ? depthGridSpanY / Math.max(1, seriesCount) : 0;
|
|
2342
|
-
const depthBarX = usesSeriesDepthAxis ? Math.sign(depthSlotX || _optionalChain([frameOffsets, 'optionalAccess',
|
|
2343
|
-
const depthBarY = usesSeriesDepthAxis ? Math.sign(depthSlotY || _optionalChain([frameOffsets, 'optionalAccess',
|
|
2344
|
-
const shouldReverseValueAxis = _optionalChain([chart, 'access',
|
|
2278
|
+
const depthBarX = usesSeriesDepthAxis ? Math.sign(depthSlotX || _optionalChain([frameOffsets, 'optionalAccess', _243 => _243.depthX]) || 1) * Math.max(8, Math.abs(depthSlotX) * 1.14) : _optionalChain([frameOffsets, 'optionalAccess', _244 => _244.depthX]);
|
|
2279
|
+
const depthBarY = usesSeriesDepthAxis ? Math.sign(depthSlotY || _optionalChain([frameOffsets, 'optionalAccess', _245 => _245.depthY]) || -1) * Math.max(5.5, Math.abs(depthSlotY) * 1.12) : _optionalChain([frameOffsets, 'optionalAccess', _246 => _246.depthY]);
|
|
2280
|
+
const shouldReverseValueAxis = _optionalChain([chart, 'access', _247 => _247.valueAxis, 'optionalAccess', _248 => _248.orientation]) === "maxMin";
|
|
2345
2281
|
const valueScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range(
|
|
2346
2282
|
isHorizontal ? shouldReverseValueAxis ? [plot.left + plot.width, plot.left] : [plot.left, plot.left + plot.width] : shouldReverseValueAxis ? [plot.top, plot.top + plot.height] : [plot.top + plot.height, plot.top]
|
|
2347
2283
|
);
|
|
2348
|
-
const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2284
|
+
const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _249 => _249.valueAxis, 'optionalAccess', _250 => _250.majorUnit]), () => ( 20))) : valueDomain.ticks;
|
|
2349
2285
|
const categoryPositions = categories.map((category) => {
|
|
2350
2286
|
const bandStart = _nullishCoalesce(categoryScale(category), () => ( 0));
|
|
2351
2287
|
return bandStart + categoryScale.bandwidth() / 2;
|
|
@@ -2358,7 +2294,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2358
2294
|
const value = _nullishCoalesce(matrix[seriesIndex][categoryIndex], () => ( 0));
|
|
2359
2295
|
const rawValue = _nullishCoalesce(rawMatrix[seriesIndex][categoryIndex], () => ( value));
|
|
2360
2296
|
const pointIndex = shouldReverseCategories ? categoryCount - 1 - categoryIndex : categoryIndex;
|
|
2361
|
-
const pointStyle = _optionalChain([chart, 'access',
|
|
2297
|
+
const pointStyle = _optionalChain([chart, 'access', _251 => _251.series, 'access', _252 => _252[seriesIndex], 'optionalAccess', _253 => _253.dataPointStyles, 'optionalAccess', _254 => _254.find, 'call', _255 => _255((entry) => entry.index === pointIndex)]);
|
|
2362
2298
|
let start = 0;
|
|
2363
2299
|
let end = value;
|
|
2364
2300
|
if (isStacked) {
|
|
@@ -2373,19 +2309,19 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2373
2309
|
}
|
|
2374
2310
|
}
|
|
2375
2311
|
const colors = chartSeriesBarColors(chart, seriesIndex, rawValue, negativeFillMode);
|
|
2376
|
-
const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access',
|
|
2312
|
+
const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access', _256 => _256.series, 'access', _257 => _257[seriesIndex], 'optionalAccess', _258 => _258.invertIfNegative]) === true;
|
|
2377
2313
|
if (!isInvertedNegative) {
|
|
2378
2314
|
if (variesBarColorsByCategory(chart)) {
|
|
2379
2315
|
colors.fill = chartPointColor(chart, pointIndex, seriesIndex);
|
|
2380
2316
|
colors.stroke = colors.fill;
|
|
2381
2317
|
}
|
|
2382
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
2318
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _259 => _259.color])) {
|
|
2383
2319
|
colors.fill = pointStyle.color;
|
|
2384
2320
|
if (!pointStyle.lineColor) {
|
|
2385
2321
|
colors.stroke = pointStyle.color;
|
|
2386
2322
|
}
|
|
2387
2323
|
}
|
|
2388
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
2324
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _260 => _260.lineColor])) {
|
|
2389
2325
|
colors.stroke = pointStyle.lineColor;
|
|
2390
2326
|
}
|
|
2391
2327
|
}
|
|
@@ -2398,7 +2334,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2398
2334
|
const barOffset = usesSeriesDepthAxis ? Math.max(0, (categoryScale.bandwidth() - barThickness) * 0.5) : isHistogramLike ? 0 : isStacked ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0));
|
|
2399
2335
|
const depthOffsetX = usesSeriesDepthAxis ? depthSlotX * seriesIndex : 0;
|
|
2400
2336
|
const depthOffsetY = usesSeriesDepthAxis ? depthSlotY * seriesIndex : 0;
|
|
2401
|
-
const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess',
|
|
2337
|
+
const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _261 => _261.depthX]), () => ( 0))) + depthOffsetY * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _262 => _262.depthY]), () => ( 0)));
|
|
2402
2338
|
const shapeTaper = normalized3dShape === "pyramid" ? 0.94 : normalized3dShape === "cone" ? 1 : 0;
|
|
2403
2339
|
let topScale = 1;
|
|
2404
2340
|
let bottomScale = 1;
|
|
@@ -2436,8 +2372,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2436
2372
|
isHorizontal: true,
|
|
2437
2373
|
key: `bar-${seriesIndex}-${categoryIndex}`,
|
|
2438
2374
|
left: Math.min(x1, x2),
|
|
2439
|
-
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2440
|
-
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2375
|
+
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _263 => _263.depthX]),
|
|
2376
|
+
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _264 => _264.depthY]),
|
|
2441
2377
|
shape3d: normalized3dShape,
|
|
2442
2378
|
seriesIndex,
|
|
2443
2379
|
stroke: colors.stroke,
|
|
@@ -2466,8 +2402,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2466
2402
|
isHorizontal: false,
|
|
2467
2403
|
key: `bar-${seriesIndex}-${categoryIndex}`,
|
|
2468
2404
|
left: categoryStart + barOffset,
|
|
2469
|
-
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2470
|
-
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2405
|
+
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _265 => _265.depthX]),
|
|
2406
|
+
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _266 => _266.depthY]),
|
|
2471
2407
|
shape3d: normalized3dShape,
|
|
2472
2408
|
seriesIndex,
|
|
2473
2409
|
stroke: colors.stroke,
|
|
@@ -2539,12 +2475,12 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2539
2475
|
);
|
|
2540
2476
|
const depthAxisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
2541
2477
|
const depthGridColor = lightenColor(depthAxisColor, 0.48);
|
|
2542
|
-
const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess',
|
|
2543
|
-
const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess',
|
|
2544
|
-
const depthAxisNode = usesSeriesDepthAxis && frameOffsets ? /* @__PURE__ */
|
|
2478
|
+
const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _267 => _267.depthX]), () => ( 0));
|
|
2479
|
+
const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _268 => _268.depthY]), () => ( 0));
|
|
2480
|
+
const depthAxisNode = usesSeriesDepthAxis && frameOffsets ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2545
2481
|
Array.from({ length: categoryCount + 1 }, (_, boundaryIndex) => {
|
|
2546
2482
|
const x = plot.left + boundaryIndex / Math.max(1, categoryCount) * plot.width;
|
|
2547
|
-
return /* @__PURE__ */
|
|
2483
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2548
2484
|
"line",
|
|
2549
2485
|
{
|
|
2550
2486
|
stroke: depthGridColor,
|
|
@@ -2561,7 +2497,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2561
2497
|
const ratio = boundaryIndex / Math.max(1, seriesCount);
|
|
2562
2498
|
const offsetX = depthGridSpanX * ratio;
|
|
2563
2499
|
const offsetY = depthGridSpanY * ratio;
|
|
2564
|
-
return /* @__PURE__ */
|
|
2500
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2565
2501
|
"line",
|
|
2566
2502
|
{
|
|
2567
2503
|
stroke: depthGridColor,
|
|
@@ -2578,7 +2514,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2578
2514
|
const ratio = (seriesIndex + 0.5) / Math.max(1, seriesCount);
|
|
2579
2515
|
const x = plot.left + plot.width + depthGridSpanX * ratio;
|
|
2580
2516
|
const y = plot.top + plot.height + depthGridSpanY * ratio;
|
|
2581
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2582
2518
|
"text",
|
|
2583
2519
|
{
|
|
2584
2520
|
fill: resolveChartAxisTextColor(chart),
|
|
@@ -2592,8 +2528,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2592
2528
|
);
|
|
2593
2529
|
})
|
|
2594
2530
|
] }) : null;
|
|
2595
|
-
const frameNode = chart.is3d && frameOffsets ? /* @__PURE__ */
|
|
2596
|
-
/* @__PURE__ */
|
|
2531
|
+
const frameNode = chart.is3d && frameOffsets ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2532
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2597
2533
|
"polygon",
|
|
2598
2534
|
{
|
|
2599
2535
|
fill: lightenColor(_nullishCoalesce(chart.chartAreaFillColor, () => ( palette.surface)), 0.05),
|
|
@@ -2602,7 +2538,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2602
2538
|
strokeWidth: 1
|
|
2603
2539
|
}
|
|
2604
2540
|
),
|
|
2605
|
-
/* @__PURE__ */
|
|
2541
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2606
2542
|
"polygon",
|
|
2607
2543
|
{
|
|
2608
2544
|
fill: lightenColor(_nullishCoalesce(chart.chartAreaFillColor, () => ( palette.surface)), 0.12),
|
|
@@ -2612,16 +2548,16 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2612
2548
|
}
|
|
2613
2549
|
)
|
|
2614
2550
|
] }) : null;
|
|
2615
|
-
return /* @__PURE__ */
|
|
2616
|
-
useVertical3dGradient && gradientByColor.size > 0 ? /* @__PURE__ */
|
|
2617
|
-
/* @__PURE__ */
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
-
/* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2552
|
+
useVertical3dGradient && gradientByColor.size > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "defs", { children: Array.from(gradientByColor.entries()).map(([color, id]) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "linearGradient", { id, x1: "0%", x2: "0%", y1: "0%", y2: "100%", children: [
|
|
2553
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "0%", stopColor: lightenColor(color, 0.28) }),
|
|
2554
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "42%", stopColor: lightenColor(color, 0.12) }),
|
|
2555
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "100%", stopColor: darkenColor(color, 0.1) })
|
|
2620
2556
|
] }, id)) }) : null,
|
|
2621
2557
|
axisNode,
|
|
2622
2558
|
frameNode,
|
|
2623
2559
|
depthAxisNode,
|
|
2624
|
-
chart.is3d ? sortedBars.map((bar) => /* @__PURE__ */
|
|
2560
|
+
chart.is3d ? sortedBars.map((bar) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { ...barChartElementDataProps(bar.seriesIndex, bar.categoryIndex), children: renderExtrudedRect(bar) }, `bar-hit-${bar.key}`)) : renderedBars.map((bar) => /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
2625
2561
|
"rect",
|
|
2626
2562
|
{
|
|
2627
2563
|
...barChartElementDataProps(bar.seriesIndex, bar.categoryIndex),
|
|
@@ -2635,7 +2571,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2635
2571
|
y: bar.top
|
|
2636
2572
|
}
|
|
2637
2573
|
)),
|
|
2638
|
-
renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
2574
|
+
renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _269 => _269.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0, `bar-selection-${bar.key}`, bar.left, bar.top, bar.width, bar.height) : null)
|
|
2639
2575
|
] });
|
|
2640
2576
|
}
|
|
2641
2577
|
function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartElement) {
|
|
@@ -2662,11 +2598,11 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2662
2598
|
return Math.abs(total) < 1e-9 ? 1 : total;
|
|
2663
2599
|
}) : null;
|
|
2664
2600
|
return chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
|
|
2665
|
-
const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access',
|
|
2601
|
+
const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _270 => _270[seriesIndex], 'optionalAccess', _271 => _271[categoryIndex]]), () => ( null));
|
|
2666
2602
|
if (rawValue == null) {
|
|
2667
2603
|
return { defined: false, y: null, y0: null, y1: null };
|
|
2668
2604
|
}
|
|
2669
|
-
const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess',
|
|
2605
|
+
const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess', _272 => _272[categoryIndex]]), () => ( 1))) * 100 : rawValue;
|
|
2670
2606
|
if (value >= 0) {
|
|
2671
2607
|
const start2 = positive[categoryIndex];
|
|
2672
2608
|
const end2 = start2 + value;
|
|
@@ -2679,7 +2615,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2679
2615
|
return { defined: true, y: end, y0: start, y1: end };
|
|
2680
2616
|
}));
|
|
2681
2617
|
})() : chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
|
|
2682
|
-
const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access',
|
|
2618
|
+
const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _273 => _273[seriesIndex], 'optionalAccess', _274 => _274[categoryIndex]]), () => ( null));
|
|
2683
2619
|
return {
|
|
2684
2620
|
defined: value != null,
|
|
2685
2621
|
y: value,
|
|
@@ -2695,12 +2631,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2695
2631
|
let maxValue = Math.max(...stackedExtents);
|
|
2696
2632
|
if (isAreaChart) {
|
|
2697
2633
|
minValue = Math.min(0, minValue);
|
|
2698
|
-
} else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access',
|
|
2634
|
+
} else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access', _275 => _275.valueAxis, 'optionalAccess', _276 => _276.crosses]) === "autoZero") {
|
|
2699
2635
|
minValue = Math.min(0, minValue);
|
|
2700
2636
|
}
|
|
2701
2637
|
if (isPercentStackedSeries) {
|
|
2702
|
-
const explicitMin = typeof _optionalChain([chart, 'access',
|
|
2703
|
-
const explicitMax = typeof _optionalChain([chart, 'access',
|
|
2638
|
+
const explicitMin = typeof _optionalChain([chart, 'access', _277 => _277.valueAxis, 'optionalAccess', _278 => _278.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? Number(chart.valueAxis.min) : Math.min(0, minValue);
|
|
2639
|
+
const explicitMax = typeof _optionalChain([chart, 'access', _279 => _279.valueAxis, 'optionalAccess', _280 => _280.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? Number(chart.valueAxis.max) : Math.max(100, maxValue);
|
|
2704
2640
|
minValue = explicitMin;
|
|
2705
2641
|
maxValue = explicitMax <= explicitMin ? explicitMin + 1 : explicitMax;
|
|
2706
2642
|
} else {
|
|
@@ -2708,24 +2644,24 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2708
2644
|
chart.valueAxis,
|
|
2709
2645
|
minValue,
|
|
2710
2646
|
maxValue,
|
|
2711
|
-
isAreaChart || _optionalChain([chart, 'access',
|
|
2647
|
+
isAreaChart || _optionalChain([chart, 'access', _281 => _281.valueAxis, 'optionalAccess', _282 => _282.crosses]) === "autoZero"
|
|
2712
2648
|
);
|
|
2713
2649
|
minValue = valueDomain.min;
|
|
2714
2650
|
maxValue = valueDomain.max;
|
|
2715
2651
|
}
|
|
2716
2652
|
const xScale = _d3scale.scalePoint.call(void 0, ).domain(categories).range([plot.left, plot.left + plot.width]);
|
|
2717
2653
|
const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range([plot.top + plot.height, plot.top]);
|
|
2718
|
-
const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2654
|
+
const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _283 => _283.valueAxis, 'optionalAccess', _284 => _284.majorUnit]), () => ( 20))) : resolveAxisDomainWithChartOverrides(
|
|
2719
2655
|
chart.valueAxis,
|
|
2720
2656
|
minValue,
|
|
2721
2657
|
maxValue,
|
|
2722
|
-
isAreaChart || _optionalChain([chart, 'access',
|
|
2658
|
+
isAreaChart || _optionalChain([chart, 'access', _285 => _285.valueAxis, 'optionalAccess', _286 => _286.crosses]) === "autoZero"
|
|
2723
2659
|
).ticks;
|
|
2724
2660
|
const categoryPositions = categories.map((category) => _nullishCoalesce(xScale(category), () => ( plot.left)));
|
|
2725
2661
|
const curve = _d3shape.curveLinear;
|
|
2726
2662
|
const areaBaseline = yScale(Math.max(minValue, 0));
|
|
2727
2663
|
const plotPointsBySeries = chart.series.map((_, seriesIndex) => categories.map((category, categoryIndex) => {
|
|
2728
|
-
const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access',
|
|
2664
|
+
const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access', _287 => _287[seriesIndex], 'optionalAccess', _288 => _288[categoryIndex]]), () => ( {
|
|
2729
2665
|
defined: false,
|
|
2730
2666
|
y: null,
|
|
2731
2667
|
y0: null,
|
|
@@ -2754,15 +2690,15 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2754
2690
|
);
|
|
2755
2691
|
}
|
|
2756
2692
|
const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
|
|
2757
|
-
const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess',
|
|
2758
|
-
const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess',
|
|
2759
|
-
const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess',
|
|
2760
|
-
const dropLineColor = _nullishCoalesce(normalizeRendererHexColor(_optionalChain([dropLinesRecord, 'optionalAccess',
|
|
2761
|
-
const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess',
|
|
2762
|
-
const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess',
|
|
2693
|
+
const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _289 => _289.dropLines]) && typeof rawRecord.dropLines === "object" ? rawRecord.dropLines : null;
|
|
2694
|
+
const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _290 => _290.highLowLines]) && typeof rawRecord.highLowLines === "object" ? rawRecord.highLowLines : null;
|
|
2695
|
+
const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess', _291 => _291.upDownBars]) && typeof rawRecord.upDownBars === "object" ? rawRecord.upDownBars : null;
|
|
2696
|
+
const dropLineColor = _nullishCoalesce(normalizeRendererHexColor(_optionalChain([dropLinesRecord, 'optionalAccess', _292 => _292.shapeProperties, 'optionalAccess', _293 => _293.lineColorHex])), () => ( lightenColor(_nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border)), 0.45)));
|
|
2697
|
+
const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess', _294 => _294.shapeProperties, 'optionalAccess', _295 => _295.lineColorHex])), () => ( chart.axisLineColor)), () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
2698
|
+
const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess', _296 => _296.gapWidth]) === "number" && Number.isFinite(upDownBarsRecord.gapWidth) ? upDownBarsRecord.gapWidth : 150;
|
|
2763
2699
|
const categoryStep = categoryPositions.length >= 2 ? Math.min(...categoryPositions.slice(1).map((position, index) => Math.abs(position - (_nullishCoalesce(categoryPositions[index], () => ( 0))))).filter((value) => value > 0)) : plot.width;
|
|
2764
2700
|
const upDownBarWidth = clamp(categoryStep * (1 - resolveCategoryBandPadding(upDownGapWidth).inner) * 0.82, 3, 28);
|
|
2765
|
-
return /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2766
2702
|
renderCartesianAxes(
|
|
2767
2703
|
chart,
|
|
2768
2704
|
palette,
|
|
@@ -2774,12 +2710,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2774
2710
|
(value) => yScale(value)
|
|
2775
2711
|
),
|
|
2776
2712
|
!isAreaChart && !isStackedSeries && highLowLinesRecord ? categories.map((_, categoryIndex) => {
|
|
2777
|
-
const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access',
|
|
2713
|
+
const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access', _297 => _297[categoryIndex], 'optionalAccess', _298 => _298.y])).filter((value) => value != null && Number.isFinite(value));
|
|
2778
2714
|
if (yValues.length < 2) {
|
|
2779
2715
|
return null;
|
|
2780
2716
|
}
|
|
2781
2717
|
const x = _nullishCoalesce(categoryPositions[categoryIndex], () => ( plot.left));
|
|
2782
|
-
return /* @__PURE__ */
|
|
2718
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2783
2719
|
"line",
|
|
2784
2720
|
{
|
|
2785
2721
|
stroke: highLowLineColor,
|
|
@@ -2793,8 +2729,8 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2793
2729
|
);
|
|
2794
2730
|
}) : null,
|
|
2795
2731
|
!isAreaChart && !isStackedSeries && upDownBarsRecord && plotPointsBySeries.length >= 2 ? categories.map((_, categoryIndex) => {
|
|
2796
|
-
const first = _optionalChain([plotPointsBySeries, 'access',
|
|
2797
|
-
const second = _optionalChain([plotPointsBySeries, 'access',
|
|
2732
|
+
const first = _optionalChain([plotPointsBySeries, 'access', _299 => _299[0], 'optionalAccess', _300 => _300[categoryIndex]]);
|
|
2733
|
+
const second = _optionalChain([plotPointsBySeries, 'access', _301 => _301[plotPointsBySeries.length - 1], 'optionalAccess', _302 => _302[categoryIndex]]);
|
|
2798
2734
|
if (!first || !second || first.y == null || second.y == null) {
|
|
2799
2735
|
return null;
|
|
2800
2736
|
}
|
|
@@ -2802,7 +2738,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2802
2738
|
const bottom = yScale(Math.min(first.y, second.y));
|
|
2803
2739
|
const isUpBar = second.y >= first.y;
|
|
2804
2740
|
const fill = isUpBar ? darkenColor(highLowLineColor, 0.12) : "#c0504d";
|
|
2805
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2806
2742
|
"rect",
|
|
2807
2743
|
{
|
|
2808
2744
|
fill,
|
|
@@ -2822,9 +2758,9 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2822
2758
|
const lineStrokePoints = displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
|
|
2823
2759
|
const linePath = _nullishCoalesce(_d3shape.line.call(void 0, ).defined((point) => point.y != null).x((point) => point.x).y((point) => yScale(_nullishCoalesce(point.y, () => ( 0)))).curve(curve)(lineStrokePoints), () => ( ""));
|
|
2824
2760
|
const areaPath = isAreaChart ? _nullishCoalesce(_d3shape.area.call(void 0, ).defined((point) => isStackedSeries ? point.y0 != null && point.y1 != null : point.y != null).x((point) => point.x).y0((point) => isStackedSeries ? yScale(_nullishCoalesce(point.y0, () => ( 0))) : areaBaseline).y1((point) => yScale(_nullishCoalesce((isStackedSeries ? point.y1 : point.y), () => ( 0)))).curve(curve)(points), () => ( "")) : "";
|
|
2825
|
-
const seriesFillColor = typeof _optionalChain([series, 'access',
|
|
2826
|
-
return /* @__PURE__ */
|
|
2827
|
-
!isAreaChart && !isStackedSeries && dropLinesRecord ? points.map((point, pointIndex) => point.y == null ? null : /* @__PURE__ */
|
|
2761
|
+
const seriesFillColor = typeof _optionalChain([series, 'access', _303 => _303.shapeProperties, 'optionalAccess', _304 => _304.xmlFillColor]) === "string" ? series.shapeProperties.xmlFillColor : chartSeriesColor(chart, seriesIndex);
|
|
2762
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2763
|
+
!isAreaChart && !isStackedSeries && dropLinesRecord ? points.map((point, pointIndex) => point.y == null ? null : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2828
2764
|
"line",
|
|
2829
2765
|
{
|
|
2830
2766
|
stroke: dropLineColor,
|
|
@@ -2836,7 +2772,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2836
2772
|
},
|
|
2837
2773
|
`drop-line-${seriesIndex}-${pointIndex}`
|
|
2838
2774
|
)) : null,
|
|
2839
|
-
isAreaChart ? /* @__PURE__ */
|
|
2775
|
+
isAreaChart ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2840
2776
|
"path",
|
|
2841
2777
|
{
|
|
2842
2778
|
...chartElementDataProps(seriesIndex),
|
|
@@ -2846,19 +2782,19 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2846
2782
|
stroke: "none"
|
|
2847
2783
|
}
|
|
2848
2784
|
) : null,
|
|
2849
|
-
/* @__PURE__ */
|
|
2785
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2850
2786
|
"path",
|
|
2851
2787
|
{
|
|
2852
2788
|
...chartElementDataProps(seriesIndex),
|
|
2853
2789
|
d: linePath,
|
|
2854
2790
|
fill: "none",
|
|
2855
|
-
stroke: _optionalChain([series, 'access',
|
|
2791
|
+
stroke: _optionalChain([series, 'access', _305 => _305.shapeProperties, 'optionalAccess', _306 => _306.xmlLineHidden]) === true ? "none" : chartSeriesStrokeColor(chart, seriesIndex),
|
|
2856
2792
|
strokeLinecap: "round",
|
|
2857
2793
|
strokeLinejoin: "round",
|
|
2858
2794
|
strokeWidth: Math.max(1.5, _nullishCoalesce(series.lineWidthPx, () => ( 2)))
|
|
2859
2795
|
}
|
|
2860
2796
|
),
|
|
2861
|
-
points.map((point, pointIndex) => point.y == null || normalizeChartMarkerSymbol(series.markerSymbol) === "none" ? null : /* @__PURE__ */
|
|
2797
|
+
points.map((point, pointIndex) => point.y == null || normalizeChartMarkerSymbol(series.markerSymbol) === "none" ? null : /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
2862
2798
|
"path",
|
|
2863
2799
|
{
|
|
2864
2800
|
...chartElementDataProps(seriesIndex, pointIndex),
|
|
@@ -2870,7 +2806,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2870
2806
|
strokeWidth: 1
|
|
2871
2807
|
}
|
|
2872
2808
|
)),
|
|
2873
|
-
points.map((point, pointIndex) => point.y != null && (isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
2809
|
+
points.map((point, pointIndex) => point.y != null && (isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _307 => _307.kind]) !== "point") ? isAreaChart ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `area-selection-${seriesIndex}-${pointIndex}`, [{ x: point.x, y: yScale(point.y) }]) : _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
2874
2810
|
`line-selection-${seriesIndex}-${pointIndex}`,
|
|
2875
2811
|
point.x - 4,
|
|
2876
2812
|
yScale(point.y) - 4,
|
|
@@ -2902,7 +2838,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2902
2838
|
return null;
|
|
2903
2839
|
}
|
|
2904
2840
|
const plot = layout.plot;
|
|
2905
|
-
const groupGapWidth = typeof _optionalChain([columnGroup, 'access',
|
|
2841
|
+
const groupGapWidth = typeof _optionalChain([columnGroup, 'access', _308 => _308.raw, 'optionalAccess', _309 => _309.gapWidth]) === "number" && Number.isFinite(columnGroup.raw.gapWidth) ? columnGroup.raw.gapWidth : _nullishCoalesce(columnGroup.gapWidth, () => ( chart.gapWidth));
|
|
2906
2842
|
const histogramColumns = columnGroup.series.some((series) => isHistogramLikeSeries(series));
|
|
2907
2843
|
const categoryBandPadding = histogramColumns ? { inner: 0, outer: 0 } : resolveCategoryBandPadding(groupGapWidth);
|
|
2908
2844
|
const categoryScale = _d3scale.scaleBand.call(void 0, ).domain(categories).range([plot.left, plot.left + plot.width]).paddingInner(categoryBandPadding.inner).paddingOuter(categoryBandPadding.outer);
|
|
@@ -2918,22 +2854,22 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2918
2854
|
return null;
|
|
2919
2855
|
}
|
|
2920
2856
|
const primaryDomain = resolveNumericAxisDomain(
|
|
2921
|
-
typeof _optionalChain([columnGroup, 'access',
|
|
2922
|
-
typeof _optionalChain([columnGroup, 'access',
|
|
2923
|
-
_optionalChain([columnGroup, 'access',
|
|
2857
|
+
typeof _optionalChain([columnGroup, 'access', _310 => _310.valueAxis, 'optionalAccess', _311 => _311.min]) === "number" ? columnGroup.valueAxis.min : Math.min(...primaryValues),
|
|
2858
|
+
typeof _optionalChain([columnGroup, 'access', _312 => _312.valueAxis, 'optionalAccess', _313 => _313.max]) === "number" ? columnGroup.valueAxis.max : Math.max(...primaryValues),
|
|
2859
|
+
_optionalChain([columnGroup, 'access', _314 => _314.valueAxis, 'optionalAccess', _315 => _315.majorUnit]),
|
|
2924
2860
|
true
|
|
2925
2861
|
);
|
|
2926
2862
|
const secondaryDomain = resolveNumericAxisDomain(
|
|
2927
|
-
typeof _optionalChain([lineGroup, 'access',
|
|
2928
|
-
typeof _optionalChain([lineGroup, 'access',
|
|
2929
|
-
_optionalChain([lineGroup, 'access',
|
|
2863
|
+
typeof _optionalChain([lineGroup, 'access', _316 => _316.valueAxis, 'optionalAccess', _317 => _317.min]) === "number" ? lineGroup.valueAxis.min : Math.min(...secondaryValues),
|
|
2864
|
+
typeof _optionalChain([lineGroup, 'access', _318 => _318.valueAxis, 'optionalAccess', _319 => _319.max]) === "number" ? lineGroup.valueAxis.max : Math.max(...secondaryValues),
|
|
2865
|
+
_optionalChain([lineGroup, 'access', _320 => _320.valueAxis, 'optionalAccess', _321 => _321.majorUnit]),
|
|
2930
2866
|
false
|
|
2931
2867
|
);
|
|
2932
2868
|
const primaryScale = _d3scale.scaleLinear.call(void 0, ).domain([primaryDomain.min, primaryDomain.max]).range([plot.top + plot.height, plot.top]);
|
|
2933
2869
|
const secondaryScale = _d3scale.scaleLinear.call(void 0, ).domain([secondaryDomain.min, secondaryDomain.max]).range([plot.top + plot.height, plot.top]);
|
|
2934
2870
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
2935
2871
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
2936
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2937
2873
|
renderCartesianAxes(
|
|
2938
2874
|
primaryChart,
|
|
2939
2875
|
palette,
|
|
@@ -2944,9 +2880,9 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2944
2880
|
primaryDomain.ticks,
|
|
2945
2881
|
(value) => primaryScale(value)
|
|
2946
2882
|
),
|
|
2947
|
-
_optionalChain([lineGroup, 'access',
|
|
2883
|
+
_optionalChain([lineGroup, 'access', _322 => _322.valueAxis, 'optionalAccess', _323 => _323.delete]) !== true && _optionalChain([lineGroup, 'access', _324 => _324.valueAxis, 'optionalAccess', _325 => _325.labelPosition]) !== "none" ? secondaryDomain.ticks.map((tick) => {
|
|
2948
2884
|
const y = secondaryScale(tick);
|
|
2949
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2950
2886
|
"text",
|
|
2951
2887
|
{
|
|
2952
2888
|
fill: labelColor,
|
|
@@ -2959,7 +2895,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2959
2895
|
`combo-secondary-tick-${tick}`
|
|
2960
2896
|
);
|
|
2961
2897
|
}) : null,
|
|
2962
|
-
_optionalChain([lineGroup, 'access',
|
|
2898
|
+
_optionalChain([lineGroup, 'access', _326 => _326.valueAxis, 'optionalAccess', _327 => _327.delete]) !== true ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2963
2899
|
"line",
|
|
2964
2900
|
{
|
|
2965
2901
|
stroke: axisColor,
|
|
@@ -2979,9 +2915,9 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2979
2915
|
const y = primaryScale(Math.max(0, value));
|
|
2980
2916
|
const zeroY = primaryScale(0);
|
|
2981
2917
|
const height = Math.max(1, Math.abs(zeroY - primaryScale(value)));
|
|
2982
|
-
const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
2983
|
-
return /* @__PURE__ */
|
|
2984
|
-
/* @__PURE__ */
|
|
2918
|
+
const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _328 => _328.kind]) !== "point";
|
|
2919
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
2920
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
2985
2921
|
"rect",
|
|
2986
2922
|
{
|
|
2987
2923
|
...barChartElementDataProps(globalSeriesIndex, categoryIndex),
|
|
@@ -2994,7 +2930,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2994
2930
|
y: Math.min(y, zeroY)
|
|
2995
2931
|
}
|
|
2996
2932
|
),
|
|
2997
|
-
selected ? renderSelectionRectHandles(
|
|
2933
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
2998
2934
|
`combo-bar-selection-${globalSeriesIndex}-${categoryIndex}`,
|
|
2999
2935
|
x,
|
|
3000
2936
|
Math.min(y, zeroY),
|
|
@@ -3011,8 +2947,8 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
3011
2947
|
}));
|
|
3012
2948
|
const lineStrokePoints = chart.displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
|
|
3013
2949
|
const path = _nullishCoalesce(_d3shape.line.call(void 0, ).defined((point) => point.y != null).x((point) => point.x).y((point) => secondaryScale(_nullishCoalesce(point.y, () => ( 0)))).curve((0, _d3shape.curveLinear))(lineStrokePoints), () => ( ""));
|
|
3014
|
-
return /* @__PURE__ */
|
|
3015
|
-
/* @__PURE__ */
|
|
2950
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
2951
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3016
2952
|
"path",
|
|
3017
2953
|
{
|
|
3018
2954
|
...chartElementDataProps(globalSeriesIndex),
|
|
@@ -3024,7 +2960,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
3024
2960
|
strokeWidth: Math.max(1.5, _nullishCoalesce(series.lineWidthPx, () => ( 2)))
|
|
3025
2961
|
}
|
|
3026
2962
|
),
|
|
3027
|
-
points.map((point, pointIndex) => point.y == null || normalizeChartMarkerSymbol(series.markerSymbol) === "none" ? null : /* @__PURE__ */
|
|
2963
|
+
points.map((point, pointIndex) => point.y == null || normalizeChartMarkerSymbol(series.markerSymbol) === "none" ? null : /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
3028
2964
|
"path",
|
|
3029
2965
|
{
|
|
3030
2966
|
...chartElementDataProps(globalSeriesIndex, pointIndex),
|
|
@@ -3036,7 +2972,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
3036
2972
|
transform: `translate(${point.x}, ${secondaryScale(point.y)})`
|
|
3037
2973
|
}
|
|
3038
2974
|
)),
|
|
3039
|
-
points.map((point, pointIndex) => point.y != null && isSelectedChartPointOrSeries(selectedChartElement, chart.id, globalSeriesIndex, pointIndex) ? renderSelectionRectHandles(
|
|
2975
|
+
points.map((point, pointIndex) => point.y != null && isSelectedChartPointOrSeries(selectedChartElement, chart.id, globalSeriesIndex, pointIndex) ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
3040
2976
|
`combo-line-selection-${globalSeriesIndex}-${pointIndex}`,
|
|
3041
2977
|
point.x - 4,
|
|
3042
2978
|
secondaryScale(point.y) - 4,
|
|
@@ -3108,26 +3044,26 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3108
3044
|
if (allX.length === 0 || allY.length === 0) {
|
|
3109
3045
|
return null;
|
|
3110
3046
|
}
|
|
3111
|
-
const hasExplicitMinX = typeof _optionalChain([chart, 'access',
|
|
3112
|
-
const hasExplicitMaxX = typeof _optionalChain([chart, 'access',
|
|
3113
|
-
const hasExplicitMinY = typeof _optionalChain([chart, 'access',
|
|
3114
|
-
const hasExplicitMaxY = typeof _optionalChain([chart, 'access',
|
|
3047
|
+
const hasExplicitMinX = typeof _optionalChain([chart, 'access', _329 => _329.categoryAxis, 'optionalAccess', _330 => _330.min]) === "number" && Number.isFinite(chart.categoryAxis.min);
|
|
3048
|
+
const hasExplicitMaxX = typeof _optionalChain([chart, 'access', _331 => _331.categoryAxis, 'optionalAccess', _332 => _332.max]) === "number" && Number.isFinite(chart.categoryAxis.max);
|
|
3049
|
+
const hasExplicitMinY = typeof _optionalChain([chart, 'access', _333 => _333.valueAxis, 'optionalAccess', _334 => _334.min]) === "number" && Number.isFinite(chart.valueAxis.min);
|
|
3050
|
+
const hasExplicitMaxY = typeof _optionalChain([chart, 'access', _335 => _335.valueAxis, 'optionalAccess', _336 => _336.max]) === "number" && Number.isFinite(chart.valueAxis.max);
|
|
3115
3051
|
const hasSyntheticIndexAxis = pointsBySeries.some((series) => series.usesSyntheticIndex);
|
|
3116
3052
|
const syntheticPointCount = Math.max(0, ...pointsBySeries.map((series) => series.pointCount));
|
|
3117
|
-
let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access',
|
|
3118
|
-
let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access',
|
|
3119
|
-
let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access',
|
|
3120
|
-
let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access',
|
|
3053
|
+
let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access', _337 => _337.categoryAxis, 'optionalAccess', _338 => _338.min])) : Math.min(...allX);
|
|
3054
|
+
let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access', _339 => _339.categoryAxis, 'optionalAccess', _340 => _340.max])) : Math.max(...allX);
|
|
3055
|
+
let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access', _341 => _341.valueAxis, 'optionalAccess', _342 => _342.min])) : Math.min(...allY);
|
|
3056
|
+
let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access', _343 => _343.valueAxis, 'optionalAccess', _344 => _344.max])) : Math.max(...allY);
|
|
3121
3057
|
if (!hasExplicitMinX) {
|
|
3122
|
-
minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access',
|
|
3058
|
+
minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access', _345 => _345.categoryAxis, 'optionalAccess', _346 => _346.crosses]) === "autoZero" ? Math.min(0, minX) : minX;
|
|
3123
3059
|
}
|
|
3124
3060
|
if (!hasExplicitMaxX) {
|
|
3125
|
-
maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access',
|
|
3061
|
+
maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access', _347 => _347.categoryAxis, 'optionalAccess', _348 => _348.crosses]) === "autoZero" ? Math.max(0, maxX) : maxX;
|
|
3126
3062
|
}
|
|
3127
|
-
if (!hasExplicitMinY && _optionalChain([chart, 'access',
|
|
3063
|
+
if (!hasExplicitMinY && _optionalChain([chart, 'access', _349 => _349.valueAxis, 'optionalAccess', _350 => _350.crosses]) === "autoZero") {
|
|
3128
3064
|
minY = Math.min(0, minY);
|
|
3129
3065
|
}
|
|
3130
|
-
if (!hasExplicitMaxY && _optionalChain([chart, 'access',
|
|
3066
|
+
if (!hasExplicitMaxY && _optionalChain([chart, 'access', _351 => _351.valueAxis, 'optionalAccess', _352 => _352.crosses]) === "autoZero") {
|
|
3131
3067
|
maxY = Math.max(0, maxY);
|
|
3132
3068
|
}
|
|
3133
3069
|
if (maxX <= minX) {
|
|
@@ -3136,8 +3072,8 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3136
3072
|
if (maxY <= minY) {
|
|
3137
3073
|
maxY = minY + 1;
|
|
3138
3074
|
}
|
|
3139
|
-
const xStep = typeof _optionalChain([chart, 'access',
|
|
3140
|
-
const yStep = typeof _optionalChain([chart, 'access',
|
|
3075
|
+
const xStep = typeof _optionalChain([chart, 'access', _353 => _353.categoryAxis, 'optionalAccess', _354 => _354.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : buildNiceStep(minX, maxX, 5);
|
|
3076
|
+
const yStep = typeof _optionalChain([chart, 'access', _355 => _355.valueAxis, 'optionalAccess', _356 => _356.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, maxY, 5);
|
|
3141
3077
|
if (!hasExplicitMinX && !hasSyntheticIndexAxis && Number.isFinite(xStep) && xStep > 0) {
|
|
3142
3078
|
minX = Math.floor(minX / xStep) * xStep;
|
|
3143
3079
|
}
|
|
@@ -3154,17 +3090,17 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3154
3090
|
const safeMaxY = maxY <= minY ? minY + 1 : maxY;
|
|
3155
3091
|
const xScale = _d3scale.scaleLinear.call(void 0, ).domain([minX, safeMaxX]).range([plot.left, plot.left + plot.width]);
|
|
3156
3092
|
const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minY, safeMaxY]).range([plot.top + plot.height, plot.top]);
|
|
3157
|
-
const xMajorUnit = typeof _optionalChain([chart, 'access',
|
|
3158
|
-
const yMajorUnit = typeof _optionalChain([chart, 'access',
|
|
3093
|
+
const xMajorUnit = typeof _optionalChain([chart, 'access', _357 => _357.categoryAxis, 'optionalAccess', _358 => _358.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : hasSyntheticIndexAxis ? 1 : void 0;
|
|
3094
|
+
const yMajorUnit = typeof _optionalChain([chart, 'access', _359 => _359.valueAxis, 'optionalAccess', _360 => _360.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, safeMaxY, 6);
|
|
3159
3095
|
const xTicks = buildNumericTickValues(minX, safeMaxX, xMajorUnit);
|
|
3160
3096
|
const yTicks = buildNumericTickValues(minY, safeMaxY, yMajorUnit);
|
|
3161
3097
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
3162
3098
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
3163
3099
|
const hasZeroX = minX <= 0 && safeMaxX >= 0;
|
|
3164
3100
|
const hasZeroY = minY <= 0 && safeMaxY >= 0;
|
|
3165
|
-
return /* @__PURE__ */
|
|
3166
|
-
xTicks.map((tick) => /* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3101
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3102
|
+
xTicks.map((tick) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3103
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3168
3104
|
"line",
|
|
3169
3105
|
{
|
|
3170
3106
|
stroke: lightenColor(axisColor, 0.7),
|
|
@@ -3175,10 +3111,10 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3175
3111
|
y2: plot.top + plot.height
|
|
3176
3112
|
}
|
|
3177
3113
|
),
|
|
3178
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: labelColor, fontSize: 10, textAnchor: "middle", x: xScale(tick), y: plot.top + plot.height + 14, children: formatTickValue(tick) })
|
|
3179
3115
|
] }, `scatter-x-${tick}`)),
|
|
3180
|
-
yTicks.map((tick) => /* @__PURE__ */
|
|
3181
|
-
/* @__PURE__ */
|
|
3116
|
+
yTicks.map((tick) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3117
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3182
3118
|
"line",
|
|
3183
3119
|
{
|
|
3184
3120
|
stroke: lightenColor(axisColor, 0.7),
|
|
@@ -3189,9 +3125,9 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3189
3125
|
y2: yScale(tick)
|
|
3190
3126
|
}
|
|
3191
3127
|
),
|
|
3192
|
-
/* @__PURE__ */
|
|
3128
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: labelColor, fontSize: 10, textAnchor: "end", x: plot.left - 6, y: yScale(tick) + 3, children: formatTickValue(tick) })
|
|
3193
3129
|
] }, `scatter-y-${tick}`)),
|
|
3194
|
-
hasZeroY ? /* @__PURE__ */
|
|
3130
|
+
hasZeroY ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3195
3131
|
"line",
|
|
3196
3132
|
{
|
|
3197
3133
|
stroke: axisColor,
|
|
@@ -3202,7 +3138,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3202
3138
|
y2: yScale(0)
|
|
3203
3139
|
}
|
|
3204
3140
|
) : null,
|
|
3205
|
-
hasZeroX ? /* @__PURE__ */
|
|
3141
|
+
hasZeroX ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3206
3142
|
"line",
|
|
3207
3143
|
{
|
|
3208
3144
|
stroke: axisColor,
|
|
@@ -3221,12 +3157,12 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3221
3157
|
markerSize
|
|
3222
3158
|
);
|
|
3223
3159
|
const markerFill = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(series.lineColor, () => ( series.markerColor)), () => ( series.color)), () => ( chartSeriesStrokeColor(chart, seriesIndex)));
|
|
3224
|
-
const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access',
|
|
3160
|
+
const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access', _361 => _361.shapeProperties, 'optionalAccess', _362 => _362.xmlLineHidden]) !== true && seriesPoints.points.length > 1;
|
|
3225
3161
|
const shouldDrawMarkers = styleShowsMarkers && markerPath.length > 0;
|
|
3226
3162
|
const lineCurve = smooth || styleUsesSmoothCurve || series.smooth === true ? _d3shape.curveCatmullRom.alpha(0.5) : _d3shape.curveLinear;
|
|
3227
3163
|
const linePath = shouldDrawLine ? _nullishCoalesce(_d3shape.line.call(void 0, ).x((point) => xScale(point.x)).y((point) => yScale(point.y)).curve(lineCurve)(seriesPoints.points), () => ( "")) : "";
|
|
3228
|
-
return /* @__PURE__ */
|
|
3229
|
-
shouldDrawLine && linePath.length > 0 ? /* @__PURE__ */
|
|
3164
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3165
|
+
shouldDrawLine && linePath.length > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3230
3166
|
"path",
|
|
3231
3167
|
{
|
|
3232
3168
|
...chartElementDataProps(seriesIndex),
|
|
@@ -3242,11 +3178,11 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3242
3178
|
if (!shouldDrawMarkers) {
|
|
3243
3179
|
return null;
|
|
3244
3180
|
}
|
|
3245
|
-
return /* @__PURE__ */
|
|
3181
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3246
3182
|
"g",
|
|
3247
3183
|
{
|
|
3248
3184
|
transform: `translate(${xScale(point.x)}, ${yScale(point.y)})`,
|
|
3249
|
-
children: /* @__PURE__ */
|
|
3185
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3250
3186
|
"path",
|
|
3251
3187
|
{
|
|
3252
3188
|
...chartElementDataProps(seriesIndex, pointIndex, { selectionMode: "seriesFirst" }),
|
|
@@ -3260,7 +3196,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3260
3196
|
`scatter-point-${seriesIndex}-${pointIndex}`
|
|
3261
3197
|
);
|
|
3262
3198
|
}),
|
|
3263
|
-
seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3199
|
+
seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _363 => _363.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0,
|
|
3264
3200
|
`scatter-selection-${seriesIndex}-${pointIndex}`,
|
|
3265
3201
|
[{ x: xScale(point.x), y: yScale(point.y) }]
|
|
3266
3202
|
) : null)
|
|
@@ -3273,7 +3209,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3273
3209
|
const pointsBySeries = chart.series.map((series) => series.values.map((value, index) => {
|
|
3274
3210
|
const x = safeNumber(series.categories[index]);
|
|
3275
3211
|
const y = safeNumber(value);
|
|
3276
|
-
const bubble = safeNumber(_optionalChain([series, 'access',
|
|
3212
|
+
const bubble = safeNumber(_optionalChain([series, 'access', _364 => _364.bubbleSizes, 'optionalAccess', _365 => _365[index]]));
|
|
3277
3213
|
return x == null || y == null ? null : { bubble: _nullishCoalesce(bubble, () => ( 1)), index, x, y };
|
|
3278
3214
|
}).filter((point) => point != null));
|
|
3279
3215
|
const allX = pointsBySeries.flatMap((points) => points.map((point) => point.x));
|
|
@@ -3303,13 +3239,13 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3303
3239
|
chart.categoryAxis,
|
|
3304
3240
|
minX - xPad,
|
|
3305
3241
|
safeMaxX + xPad,
|
|
3306
|
-
_optionalChain([chart, 'access',
|
|
3242
|
+
_optionalChain([chart, 'access', _366 => _366.categoryAxis, 'optionalAccess', _367 => _367.crosses]) === "autoZero"
|
|
3307
3243
|
);
|
|
3308
3244
|
const yDomain = resolveAxisDomainWithChartOverrides(
|
|
3309
3245
|
chart.valueAxis,
|
|
3310
3246
|
minY - yPad,
|
|
3311
3247
|
safeMaxY + yPad,
|
|
3312
|
-
_optionalChain([chart, 'access',
|
|
3248
|
+
_optionalChain([chart, 'access', _368 => _368.valueAxis, 'optionalAccess', _369 => _369.crosses]) === "autoZero"
|
|
3313
3249
|
);
|
|
3314
3250
|
const xScale = _d3scale.scaleLinear.call(void 0, ).domain([xDomain.min, xDomain.max]).range([plot.left, plot.left + plot.width]);
|
|
3315
3251
|
const yScale = _d3scale.scaleLinear.call(void 0, ).domain([yDomain.min, yDomain.max]).range([plot.top + plot.height, plot.top]);
|
|
@@ -3319,12 +3255,12 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3319
3255
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
3320
3256
|
const isBubble3d = chart.bubble3d === true || chart.is3d === true;
|
|
3321
3257
|
const labelsEnabled = Boolean(
|
|
3322
|
-
_optionalChain([chart, 'access',
|
|
3258
|
+
_optionalChain([chart, 'access', _370 => _370.dataLabels, 'optionalAccess', _371 => _371.showCategoryName]) || _optionalChain([chart, 'access', _372 => _372.dataLabels, 'optionalAccess', _373 => _373.showSeriesName]) || _optionalChain([chart, 'access', _374 => _374.dataLabels, 'optionalAccess', _375 => _375.showValue]) || _optionalChain([chart, 'access', _376 => _376.dataLabels, 'optionalAccess', _377 => _377.showBubbleSize]) || _optionalChain([chart, 'access', _378 => _378.dataLabels, 'optionalAccess', _379 => _379.showPercent])
|
|
3323
3259
|
);
|
|
3324
3260
|
const bubbleTotals = pointsBySeries.map((points) => points.reduce((sum, point) => sum + Math.abs(point.bubble), 0));
|
|
3325
|
-
return /* @__PURE__ */
|
|
3326
|
-
xTicks.map((tick) => /* @__PURE__ */
|
|
3327
|
-
/* @__PURE__ */
|
|
3261
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3262
|
+
xTicks.map((tick) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3263
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3328
3264
|
"line",
|
|
3329
3265
|
{
|
|
3330
3266
|
stroke: lightenColor(axisColor, 0.72),
|
|
@@ -3335,10 +3271,10 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3335
3271
|
y2: plot.top + plot.height
|
|
3336
3272
|
}
|
|
3337
3273
|
),
|
|
3338
|
-
/* @__PURE__ */
|
|
3274
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: labelColor, fontSize: 10, textAnchor: "middle", x: xScale(tick), y: plot.top + plot.height + 14, children: formatTickValue(tick) })
|
|
3339
3275
|
] }, `bubble-x-${tick}`)),
|
|
3340
|
-
yTicks.map((tick) => /* @__PURE__ */
|
|
3341
|
-
/* @__PURE__ */
|
|
3276
|
+
yTicks.map((tick) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3277
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3342
3278
|
"line",
|
|
3343
3279
|
{
|
|
3344
3280
|
stroke: lightenColor(axisColor, 0.72),
|
|
@@ -3349,15 +3285,15 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3349
3285
|
y2: yScale(tick)
|
|
3350
3286
|
}
|
|
3351
3287
|
),
|
|
3352
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: labelColor, fontSize: 10, textAnchor: "end", x: plot.left - 6, y: yScale(tick) + 3, children: formatTickValue(tick) })
|
|
3353
3289
|
] }, `bubble-y-${tick}`)),
|
|
3354
|
-
/* @__PURE__ */
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
pointsBySeries.map((points, seriesIndex) => /* @__PURE__ */
|
|
3357
|
-
isBubble3d ? /* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3290
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left + plot.width, y1: plot.top + plot.height, y2: plot.top + plot.height }),
|
|
3291
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left, y1: plot.top, y2: plot.top + plot.height }),
|
|
3292
|
+
pointsBySeries.map((points, seriesIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3293
|
+
isBubble3d ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "defs", { children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "radialGradient", { id: `bubble3d-grad-${chart.id}-${seriesIndex}`, cx: "35%", cy: "30%", r: "70%", children: [
|
|
3294
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "0%", stopColor: lightenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _380 => _380.series, 'access', _381 => _381[seriesIndex], 'optionalAccess', _382 => _382.color]), () => ( _optionalChain([chart, 'access', _383 => _383.series, 'access', _384 => _384[seriesIndex], 'optionalAccess', _385 => _385.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.42) }),
|
|
3295
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "58%", stopColor: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _386 => _386.series, 'access', _387 => _387[seriesIndex], 'optionalAccess', _388 => _388.color]), () => ( _optionalChain([chart, 'access', _389 => _389.series, 'access', _390 => _390[seriesIndex], 'optionalAccess', _391 => _391.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))) }),
|
|
3296
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "100%", stopColor: darkenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _392 => _392.series, 'access', _393 => _393[seriesIndex], 'optionalAccess', _394 => _394.color]), () => ( _optionalChain([chart, 'access', _395 => _395.series, 'access', _396 => _396[seriesIndex], 'optionalAccess', _397 => _397.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.18) })
|
|
3361
3297
|
] }) }) : null,
|
|
3362
3298
|
[...points].sort((left, right) => {
|
|
3363
3299
|
if (left.bubble !== right.bubble) {
|
|
@@ -3366,26 +3302,26 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3366
3302
|
return left.index - right.index;
|
|
3367
3303
|
}).map((point) => {
|
|
3368
3304
|
const series = chart.series[seriesIndex];
|
|
3369
|
-
const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
3305
|
+
const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _398 => _398.color]), () => ( _optionalChain([series, 'optionalAccess', _399 => _399.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex)));
|
|
3370
3306
|
const radius = radiusScale(Math.sqrt(Math.max(0, point.bubble)));
|
|
3371
3307
|
const pieces = [];
|
|
3372
|
-
if (_optionalChain([chart, 'access',
|
|
3308
|
+
if (_optionalChain([chart, 'access', _400 => _400.dataLabels, 'optionalAccess', _401 => _401.showSeriesName]) && _optionalChain([series, 'optionalAccess', _402 => _402.name])) {
|
|
3373
3309
|
pieces.push(series.name);
|
|
3374
3310
|
}
|
|
3375
|
-
if (_optionalChain([chart, 'access',
|
|
3311
|
+
if (_optionalChain([chart, 'access', _403 => _403.dataLabels, 'optionalAccess', _404 => _404.showCategoryName])) {
|
|
3376
3312
|
pieces.push(formatTickValue(point.x));
|
|
3377
3313
|
}
|
|
3378
|
-
if (_optionalChain([chart, 'access',
|
|
3314
|
+
if (_optionalChain([chart, 'access', _405 => _405.dataLabels, 'optionalAccess', _406 => _406.showValue])) {
|
|
3379
3315
|
pieces.push(formatTickValue(point.y));
|
|
3380
3316
|
}
|
|
3381
|
-
if (_optionalChain([chart, 'access',
|
|
3317
|
+
if (_optionalChain([chart, 'access', _407 => _407.dataLabels, 'optionalAccess', _408 => _408.showBubbleSize])) {
|
|
3382
3318
|
pieces.push(formatTickValue(point.bubble));
|
|
3383
3319
|
}
|
|
3384
|
-
if (_optionalChain([chart, 'access',
|
|
3320
|
+
if (_optionalChain([chart, 'access', _409 => _409.dataLabels, 'optionalAccess', _410 => _410.showPercent])) {
|
|
3385
3321
|
pieces.push(`${Math.round(Math.abs(point.bubble) / Math.max(1, _nullishCoalesce(bubbleTotals[seriesIndex], () => ( 1))) * 100)}%`);
|
|
3386
3322
|
}
|
|
3387
|
-
return /* @__PURE__ */
|
|
3388
|
-
/* @__PURE__ */
|
|
3323
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3324
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3389
3325
|
"circle",
|
|
3390
3326
|
{
|
|
3391
3327
|
...chartElementDataProps(seriesIndex, point.index, { selectionMode: "seriesFirst" }),
|
|
@@ -3398,14 +3334,14 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3398
3334
|
strokeWidth: isBubble3d ? 1.2 : 1
|
|
3399
3335
|
}
|
|
3400
3336
|
),
|
|
3401
|
-
isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3337
|
+
isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _411 => _411.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
3402
3338
|
`bubble-selection-${seriesIndex}-${point.index}`,
|
|
3403
3339
|
xScale(point.x) - radius,
|
|
3404
3340
|
yScale(point.y) - radius,
|
|
3405
3341
|
radius * 2,
|
|
3406
3342
|
radius * 2
|
|
3407
3343
|
) : null,
|
|
3408
|
-
isBubble3d ? /* @__PURE__ */
|
|
3344
|
+
isBubble3d ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3409
3345
|
"ellipse",
|
|
3410
3346
|
{
|
|
3411
3347
|
cx: xScale(point.x) - radius * 0.16,
|
|
@@ -3416,7 +3352,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3416
3352
|
ry: Math.max(1, radius * 0.2)
|
|
3417
3353
|
}
|
|
3418
3354
|
) : null,
|
|
3419
|
-
labelsEnabled && pieces.length > 0 ? /* @__PURE__ */
|
|
3355
|
+
labelsEnabled && pieces.length > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3420
3356
|
"text",
|
|
3421
3357
|
{
|
|
3422
3358
|
fill: resolveChartTextColor(chart),
|
|
@@ -3445,22 +3381,22 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3445
3381
|
const centerY = plot.top + plot.height * 0.52;
|
|
3446
3382
|
const radius = Math.max(22, Math.min(plot.width, plot.height) * 0.38);
|
|
3447
3383
|
const values = chart.series.flatMap((series) => series.values.slice(0, categories.length).map((value) => safeNumber(value)).filter((value) => value != null));
|
|
3448
|
-
const hasExplicitMin = typeof _optionalChain([chart, 'access',
|
|
3449
|
-
const hasExplicitMax = typeof _optionalChain([chart, 'access',
|
|
3450
|
-
let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access',
|
|
3451
|
-
let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access',
|
|
3452
|
-
if (_optionalChain([chart, 'access',
|
|
3384
|
+
const hasExplicitMin = typeof _optionalChain([chart, 'access', _412 => _412.valueAxis, 'optionalAccess', _413 => _413.min]) === "number" && Number.isFinite(chart.valueAxis.min);
|
|
3385
|
+
const hasExplicitMax = typeof _optionalChain([chart, 'access', _414 => _414.valueAxis, 'optionalAccess', _415 => _415.max]) === "number" && Number.isFinite(chart.valueAxis.max);
|
|
3386
|
+
let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access', _416 => _416.valueAxis, 'optionalAccess', _417 => _417.min])) : Math.min(0, ...values.length ? values : [0]);
|
|
3387
|
+
let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access', _418 => _418.valueAxis, 'optionalAccess', _419 => _419.max])) : Math.max(1, ...values.length ? values : [1]);
|
|
3388
|
+
if (_optionalChain([chart, 'access', _420 => _420.valueAxis, 'optionalAccess', _421 => _421.crosses]) === "autoZero") {
|
|
3453
3389
|
minValue = Math.min(0, minValue);
|
|
3454
3390
|
}
|
|
3455
3391
|
const safeMax = maxValue <= minValue ? minValue + 1 : maxValue;
|
|
3456
3392
|
const span = Math.max(1e-6, safeMax - minValue);
|
|
3457
|
-
const candidateMajorUnit = typeof _optionalChain([chart, 'access',
|
|
3393
|
+
const candidateMajorUnit = typeof _optionalChain([chart, 'access', _422 => _422.valueAxis, 'optionalAccess', _423 => _423.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : void 0;
|
|
3458
3394
|
const preferredMajorUnit = candidateMajorUnit && span / candidateMajorUnit >= 3 ? candidateMajorUnit : buildNiceStep(minValue, safeMax, 6);
|
|
3459
3395
|
const ticks = buildNumericTickValues(minValue, safeMax, preferredMajorUnit);
|
|
3460
3396
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
3461
3397
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
3462
3398
|
const filled = chart.radarStyle === "filled";
|
|
3463
|
-
const showSpokes = _optionalChain([chart, 'access',
|
|
3399
|
+
const showSpokes = _optionalChain([chart, 'access', _424 => _424.categoryAxis, 'optionalAccess', _425 => _425.majorGridlines]) === true;
|
|
3464
3400
|
const angleAt = (index) => Math.PI * 2 * index / categories.length - Math.PI / 2;
|
|
3465
3401
|
const radialPoint = (index, valueRatio) => {
|
|
3466
3402
|
const angle = angleAt(index);
|
|
@@ -3470,13 +3406,13 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3470
3406
|
y: centerY + Math.sin(angle) * r
|
|
3471
3407
|
};
|
|
3472
3408
|
};
|
|
3473
|
-
return /* @__PURE__ */
|
|
3409
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3474
3410
|
ticks.map((tick, ringIndex) => {
|
|
3475
3411
|
const ratio = (tick - minValue) / (safeMax - minValue);
|
|
3476
3412
|
const ringPoints = categories.map((_, categoryIndex) => radialPoint(categoryIndex, ratio));
|
|
3477
3413
|
const ringPath = _nullishCoalesce(_d3shape.line.call(void 0, ).x((point) => point.x).y((point) => point.y).curve((0, _d3shape.curveLinearClosed))(ringPoints), () => ( ""));
|
|
3478
|
-
return /* @__PURE__ */
|
|
3479
|
-
/* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3415
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3480
3416
|
"path",
|
|
3481
3417
|
{
|
|
3482
3418
|
d: ringPath,
|
|
@@ -3485,14 +3421,14 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3485
3421
|
strokeWidth: 1
|
|
3486
3422
|
}
|
|
3487
3423
|
),
|
|
3488
|
-
/* @__PURE__ */
|
|
3424
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: labelColor, fontSize: 9, x: centerX + 4, y: centerY - radius * ratio + 3, children: formatTickValue(tick) })
|
|
3489
3425
|
] }, `radar-ring-${ringIndex}`);
|
|
3490
3426
|
}),
|
|
3491
3427
|
categories.map((category, categoryIndex) => {
|
|
3492
3428
|
const edge = radialPoint(categoryIndex, 1);
|
|
3493
|
-
return /* @__PURE__ */
|
|
3494
|
-
showSpokes ? /* @__PURE__ */
|
|
3495
|
-
/* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3430
|
+
showSpokes ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: lightenColor(axisColor, 0.52), strokeWidth: 1, x1: centerX, x2: edge.x, y1: centerY, y2: edge.y }) : null,
|
|
3431
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3496
3432
|
"text",
|
|
3497
3433
|
{
|
|
3498
3434
|
fill: labelColor,
|
|
@@ -3533,8 +3469,8 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3533
3469
|
const markerSize = markerRadiusPx(series.markerSize);
|
|
3534
3470
|
const markerPath = markerSymbolPath(markerSymbol, markerSize);
|
|
3535
3471
|
const showMarkers = markerSymbol !== "none" && markerPath.length > 0;
|
|
3536
|
-
return /* @__PURE__ */
|
|
3537
|
-
definedPoints.length >= 2 ? /* @__PURE__ */
|
|
3472
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3473
|
+
definedPoints.length >= 2 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3538
3474
|
"path",
|
|
3539
3475
|
{
|
|
3540
3476
|
...chartElementDataProps(seriesIndex),
|
|
@@ -3545,11 +3481,11 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3545
3481
|
strokeWidth: 1.8
|
|
3546
3482
|
}
|
|
3547
3483
|
) : null,
|
|
3548
|
-
showMarkers ? definedPoints.map((point) => /* @__PURE__ */
|
|
3484
|
+
showMarkers ? definedPoints.map((point) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3549
3485
|
"g",
|
|
3550
3486
|
{
|
|
3551
3487
|
transform: `translate(${point.x}, ${point.y})`,
|
|
3552
|
-
children: /* @__PURE__ */
|
|
3488
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3553
3489
|
"path",
|
|
3554
3490
|
{
|
|
3555
3491
|
...chartElementDataProps(seriesIndex, point.pointIndex),
|
|
@@ -3562,7 +3498,7 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3562
3498
|
},
|
|
3563
3499
|
`radar-point-${seriesIndex}-${point.pointIndex}`
|
|
3564
3500
|
)) : null,
|
|
3565
|
-
definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3501
|
+
definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _426 => _426.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0,
|
|
3566
3502
|
`radar-selection-${seriesIndex}-${point.pointIndex}`,
|
|
3567
3503
|
[{ x: point.x, y: point.y }]
|
|
3568
3504
|
) : null)
|
|
@@ -3587,14 +3523,14 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3587
3523
|
const arcs = _d3shape.pie.call(void 0, ).value((entry) => entry.value).sort(null).startAngle(startAngle).endAngle(startAngle + Math.PI * 2)(pieData);
|
|
3588
3524
|
const arcPath = _d3shape.arc.call(void 0, ).innerRadius(innerRadius).outerRadius(outerRadius);
|
|
3589
3525
|
const isPie3d = chartType === "Pie3D" || chartType === "PieExploded" && chart.is3d === true;
|
|
3590
|
-
const rotX = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3591
|
-
const perspective = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3526
|
+
const rotX = _nullishCoalesce(_optionalChain([chart, 'access', _427 => _427.view3d, 'optionalAccess', _428 => _428.rotX]), () => ( 20));
|
|
3527
|
+
const perspective = _nullishCoalesce(_optionalChain([chart, 'access', _429 => _429.view3d, 'optionalAccess', _430 => _430.perspective]), () => ( 30));
|
|
3592
3528
|
const tiltFromRotX = clamp(0.14 + rotX / 90 * 0.72, 0.12, 0.92);
|
|
3593
3529
|
const perspectiveCompression = clamp(1 - perspective / 180, 0.55, 1);
|
|
3594
3530
|
const tilt = isPie3d ? clamp(tiltFromRotX * perspectiveCompression, 0.14, 0.78) : 1;
|
|
3595
|
-
const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3531
|
+
const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access', _431 => _431.view3d, 'optionalAccess', _432 => _432.depthPercent]), () => ( 100))) / 100;
|
|
3596
3532
|
const depth = isPie3d ? Math.max(9, outerRadius * 0.28 * depthScale) : 0;
|
|
3597
|
-
const dataLabelsEnabled = Boolean(_optionalChain([chart, 'access',
|
|
3533
|
+
const dataLabelsEnabled = Boolean(_optionalChain([chart, 'access', _433 => _433.dataLabels, 'optionalAccess', _434 => _434.showCategoryName]) || _optionalChain([chart, 'access', _435 => _435.dataLabels, 'optionalAccess', _436 => _436.showPercent]) || _optionalChain([chart, 'access', _437 => _437.dataLabels, 'optionalAccess', _438 => _438.showValue]));
|
|
3598
3534
|
const total = pieData.reduce((sum, entry) => sum + entry.value, 0);
|
|
3599
3535
|
const shadowId = `pie3d-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
3600
3536
|
const baseShadowId = `pie3d-base-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
@@ -3605,8 +3541,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3605
3541
|
right: layout.width - 6,
|
|
3606
3542
|
top: layout.plot.top + 8
|
|
3607
3543
|
};
|
|
3608
|
-
const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3609
|
-
const centerValuePointLabel = chartType === "Doughnut" ? _nullishCoalesce((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3544
|
+
const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access', _439 => _439.dataLabels, 'optionalAccess', _440 => _440.pointLabels]), () => ( []))).map((label) => [label.index, label]));
|
|
3545
|
+
const centerValuePointLabel = chartType === "Doughnut" ? _nullishCoalesce((_nullishCoalesce(_optionalChain([chart, 'access', _441 => _441.dataLabels, 'optionalAccess', _442 => _442.pointLabels]), () => ( []))).find((label) => label.deleted !== true && label.showValue === true && label.showCategoryName !== true && label.showPercent !== true && label.showSeriesName !== true && label.showBubbleSize !== true), () => ( null)) : null;
|
|
3610
3546
|
const centerValueEntry = centerValuePointLabel ? _nullishCoalesce(pieData.find((entry) => entry.index === centerValuePointLabel.index), () => ( null)) : null;
|
|
3611
3547
|
const shouldRenderCenterValue = chartType === "Doughnut" && centerValueEntry != null;
|
|
3612
3548
|
const centerValueLooksPercent = centerValueEntry != null && total > 0 && total <= 1.0000001 && centerValueEntry.value >= 0 && centerValueEntry.value <= 1.0000001;
|
|
@@ -3615,13 +3551,13 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3615
3551
|
14,
|
|
3616
3552
|
Math.min(
|
|
3617
3553
|
Math.max(20, innerRadius * 0.72),
|
|
3618
|
-
(_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess',
|
|
3554
|
+
(_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess', _443 => _443.fontSizePt]), () => ( 28))) * 0.85
|
|
3619
3555
|
)
|
|
3620
3556
|
) : 0;
|
|
3621
3557
|
const resolveSliceExplosion = (pointIndex) => {
|
|
3622
|
-
const pointStyle = _optionalChain([pieSeries, 'optionalAccess',
|
|
3623
|
-
const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess',
|
|
3624
|
-
const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess',
|
|
3558
|
+
const pointStyle = _optionalChain([pieSeries, 'optionalAccess', _444 => _444.dataPointStyles, 'optionalAccess', _445 => _445.find, 'call', _446 => _446((entry) => entry.index === pointIndex)]);
|
|
3559
|
+
const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess', _447 => _447.shapeProperties, 'optionalAccess', _448 => _448.xmlExplosion]) === "number" ? pieSeries.shapeProperties.xmlExplosion : 0;
|
|
3560
|
+
const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess', _449 => _449.explosion]), () => ( seriesExplosion)), () => ( 0)));
|
|
3625
3561
|
if (rawExplosion <= 0) {
|
|
3626
3562
|
return 0;
|
|
3627
3563
|
}
|
|
@@ -3629,12 +3565,12 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3629
3565
|
};
|
|
3630
3566
|
const hasExplodedSlices = arcs.some((arc) => resolveSliceExplosion(arc.data.index) > 0);
|
|
3631
3567
|
const sliceSeparatorWidth = hasExplodedSlices ? 2 : 1.2;
|
|
3632
|
-
return /* @__PURE__ */
|
|
3633
|
-
isPie3d ? /* @__PURE__ */
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3568
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3569
|
+
isPie3d ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "defs", { children: [
|
|
3570
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "filter", { id: shadowId, x: "-40%", y: "-40%", width: "180%", height: "200%", children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "feDropShadow", { dx: "1.2", dy: "3.6", floodColor: "#000000", floodOpacity: "0.28", stdDeviation: "2.8" }) }),
|
|
3571
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "filter", { id: baseShadowId, x: "-50%", y: "-50%", width: "220%", height: "220%", children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "feGaussianBlur", { stdDeviation: "3.2" }) })
|
|
3636
3572
|
] }) : null,
|
|
3637
|
-
isPie3d ? /* @__PURE__ */
|
|
3573
|
+
isPie3d ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3638
3574
|
"ellipse",
|
|
3639
3575
|
{
|
|
3640
3576
|
cx: centerX,
|
|
@@ -3664,8 +3600,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3664
3600
|
if (sidePaths.length === 0) {
|
|
3665
3601
|
return null;
|
|
3666
3602
|
}
|
|
3667
|
-
return /* @__PURE__ */
|
|
3668
|
-
sidePaths.map((sidePath, sideIndex) => /* @__PURE__ */
|
|
3603
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { transform: `translate(${explodeX}, ${explodeY})`, children: [
|
|
3604
|
+
sidePaths.map((sidePath, sideIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3669
3605
|
"path",
|
|
3670
3606
|
{
|
|
3671
3607
|
d: sidePath,
|
|
@@ -3694,8 +3630,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3694
3630
|
arc.endAngle,
|
|
3695
3631
|
true
|
|
3696
3632
|
);
|
|
3697
|
-
return /* @__PURE__ */
|
|
3698
|
-
startWall ? /* @__PURE__ */
|
|
3633
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
3634
|
+
startWall ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3699
3635
|
"path",
|
|
3700
3636
|
{
|
|
3701
3637
|
d: startWall,
|
|
@@ -3704,7 +3640,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3704
3640
|
strokeWidth: 0.8
|
|
3705
3641
|
}
|
|
3706
3642
|
) : null,
|
|
3707
|
-
endWall ? /* @__PURE__ */
|
|
3643
|
+
endWall ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3708
3644
|
"path",
|
|
3709
3645
|
{
|
|
3710
3646
|
d: endWall,
|
|
@@ -3722,7 +3658,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3722
3658
|
const midAngle = (arc.startAngle + arc.endAngle) / 2;
|
|
3723
3659
|
const explodeX = Math.sin(midAngle) * explosion;
|
|
3724
3660
|
const explodeY = -Math.cos(midAngle) * explosion * (isPie3d ? tilt : 1);
|
|
3725
|
-
const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3661
|
+
const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _450 => _450.kind]) !== "point";
|
|
3726
3662
|
const sliceHandlePoints = isSliceSelected ? [
|
|
3727
3663
|
pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, arc.startAngle),
|
|
3728
3664
|
pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, midAngle),
|
|
@@ -3736,12 +3672,12 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3736
3672
|
const labelX = centerX + Math.sin(midAngle) * labelRadius + explodeX;
|
|
3737
3673
|
const labelY = centerY - Math.cos(midAngle) * labelRadius * (isPie3d ? tilt : 1) + explodeY;
|
|
3738
3674
|
const pieces = [];
|
|
3739
|
-
if (_optionalChain([chart, 'access',
|
|
3675
|
+
if (_optionalChain([chart, 'access', _451 => _451.dataLabels, 'optionalAccess', _452 => _452.showCategoryName]) && arc.data.label.trim().length > 0) {
|
|
3740
3676
|
pieces.push(arc.data.label);
|
|
3741
3677
|
}
|
|
3742
3678
|
const pointLabel = pointLabelByIndex.get(arc.data.index);
|
|
3743
|
-
const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess',
|
|
3744
|
-
const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess',
|
|
3679
|
+
const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _453 => _453.showValue]), () => ( _optionalChain([chart, 'access', _454 => _454.dataLabels, 'optionalAccess', _455 => _455.showValue])));
|
|
3680
|
+
const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _456 => _456.showPercent]), () => ( _optionalChain([chart, 'access', _457 => _457.dataLabels, 'optionalAccess', _458 => _458.showPercent])));
|
|
3745
3681
|
if (showValue) {
|
|
3746
3682
|
pieces.push(formatTickValue(arc.data.value));
|
|
3747
3683
|
}
|
|
@@ -3761,8 +3697,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3761
3697
|
}
|
|
3762
3698
|
resolvedLabelX = clamp(resolvedLabelX, labelBounds.left, labelBounds.right);
|
|
3763
3699
|
const resolvedLabelY = clamp(labelY, labelBounds.top, labelBounds.bottom);
|
|
3764
|
-
return /* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3700
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
3701
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { transform: `translate(${explodeX}, ${explodeY})`, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3766
3702
|
"path",
|
|
3767
3703
|
{
|
|
3768
3704
|
...chartElementDataProps(pieSeriesIndex, arc.data.index),
|
|
@@ -3774,8 +3710,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3774
3710
|
transform: `translate(${centerX}, ${centerY})${isPie3d ? ` scale(1, ${tilt})` : ""}`
|
|
3775
3711
|
}
|
|
3776
3712
|
) }),
|
|
3777
|
-
isSliceSelected ? renderSelectionPointHandles(`pie-selection-${arc.data.index}`, sliceHandlePoints) : null,
|
|
3778
|
-
dataLabelsEnabled && truncatedLabelText.length > 0 ? /* @__PURE__ */
|
|
3713
|
+
isSliceSelected ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `pie-selection-${arc.data.index}`, sliceHandlePoints) : null,
|
|
3714
|
+
dataLabelsEnabled && truncatedLabelText.length > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3779
3715
|
"text",
|
|
3780
3716
|
{
|
|
3781
3717
|
fill: resolveChartTextColor(chart),
|
|
@@ -3788,7 +3724,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3788
3724
|
) : null
|
|
3789
3725
|
] }, `pie-top-${arc.data.index}`);
|
|
3790
3726
|
}),
|
|
3791
|
-
shouldRenderCenterValue ? /* @__PURE__ */
|
|
3727
|
+
shouldRenderCenterValue ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3792
3728
|
"text",
|
|
3793
3729
|
{
|
|
3794
3730
|
fill: _nullishCoalesce(_nullishCoalesce(chart.textColor, () => ( chart.titleColor)), () => ( DEFAULT_CHART_TEXT_COLOR)),
|
|
@@ -3806,7 +3742,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3806
3742
|
const pieSeriesIndex = selectPrimaryPieSeriesIndex(chart);
|
|
3807
3743
|
const pieSeries = chart.series[pieSeriesIndex];
|
|
3808
3744
|
const categories = getCategoryLabels(chart);
|
|
3809
|
-
const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess',
|
|
3745
|
+
const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess', _459 => _459.values, 'access', _460 => _460.map, 'call', _461 => _461((value) => Math.max(0, _nullishCoalesce(safeNumber(value), () => ( 0))))]), () => ( []));
|
|
3810
3746
|
if (values.length === 0) {
|
|
3811
3747
|
return null;
|
|
3812
3748
|
}
|
|
@@ -3853,13 +3789,13 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3853
3789
|
const stackedBarHeight = Math.max(28, layout.plot.height - 32);
|
|
3854
3790
|
const secondaryTotalSafe = Math.max(1e-6, secondaryTotal);
|
|
3855
3791
|
let stackCursor = stackedBarTop;
|
|
3856
|
-
return /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3857
3793
|
pieArcs.map((entry, index) => {
|
|
3858
3794
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, pieSeriesIndex, entry.data.index);
|
|
3859
3795
|
const midAngle = (entry.startAngle + entry.endAngle) / 2;
|
|
3860
3796
|
const dot = pieEllipsePoint(pieCenterX, pieCenterY, pieRadius * 0.62, 1, midAngle);
|
|
3861
|
-
return /* @__PURE__ */
|
|
3862
|
-
/* @__PURE__ */
|
|
3797
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
3798
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3863
3799
|
"path",
|
|
3864
3800
|
{
|
|
3865
3801
|
...chartElementDataProps(pieSeriesIndex, entry.data.index),
|
|
@@ -3870,10 +3806,10 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3870
3806
|
transform: `translate(${pieCenterX}, ${pieCenterY})`
|
|
3871
3807
|
}
|
|
3872
3808
|
),
|
|
3873
|
-
selected ? renderSelectionPointHandles(`bar-of-pie-main-selection-${index}`, [dot]) : null
|
|
3809
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `bar-of-pie-main-selection-${index}`, [dot]) : null
|
|
3874
3810
|
] }, `bar-of-pie-main-${index}`);
|
|
3875
3811
|
}),
|
|
3876
|
-
/* @__PURE__ */
|
|
3812
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3877
3813
|
"line",
|
|
3878
3814
|
{
|
|
3879
3815
|
stroke: _nullishCoalesce(chart.chartAreaBorderColor, () => ( palette.border)),
|
|
@@ -3884,7 +3820,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3884
3820
|
y2: layout.plot.top + 10
|
|
3885
3821
|
}
|
|
3886
3822
|
),
|
|
3887
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3888
3824
|
"line",
|
|
3889
3825
|
{
|
|
3890
3826
|
stroke: _nullishCoalesce(chart.chartAreaBorderColor, () => ( palette.border)),
|
|
@@ -3899,8 +3835,8 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3899
3835
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, pieSeriesIndex, entry.data.index);
|
|
3900
3836
|
const midAngle = (entry.startAngle + entry.endAngle) / 2;
|
|
3901
3837
|
const dot = pieEllipsePoint(secondaryCenterX, secondaryCenterY, secondaryRadius * 0.62, 1, midAngle);
|
|
3902
|
-
return /* @__PURE__ */
|
|
3903
|
-
/* @__PURE__ */
|
|
3838
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
3839
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3904
3840
|
"path",
|
|
3905
3841
|
{
|
|
3906
3842
|
...chartElementDataProps(pieSeriesIndex, entry.data.index),
|
|
@@ -3911,15 +3847,15 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3911
3847
|
transform: `translate(${secondaryCenterX}, ${secondaryCenterY})`
|
|
3912
3848
|
}
|
|
3913
3849
|
),
|
|
3914
|
-
selected ? renderSelectionPointHandles(`bar-of-pie-secondary-pie-selection-${index}`, [dot]) : null
|
|
3850
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `bar-of-pie-secondary-pie-selection-${index}`, [dot]) : null
|
|
3915
3851
|
] }, `bar-of-pie-secondary-pie-${index}`);
|
|
3916
3852
|
}) : secondaryData.map((entry, index) => {
|
|
3917
3853
|
const segmentHeight = index === secondaryData.length - 1 ? Math.max(1, stackedBarTop + stackedBarHeight - stackCursor) : Math.max(1, entry.value / secondaryTotalSafe * stackedBarHeight);
|
|
3918
3854
|
const y = stackCursor;
|
|
3919
3855
|
stackCursor += segmentHeight;
|
|
3920
3856
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, pieSeriesIndex, entry.index);
|
|
3921
|
-
return /* @__PURE__ */
|
|
3922
|
-
/* @__PURE__ */
|
|
3857
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3858
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3923
3859
|
"rect",
|
|
3924
3860
|
{
|
|
3925
3861
|
...chartElementDataProps(pieSeriesIndex, entry.index),
|
|
@@ -3932,14 +3868,14 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3932
3868
|
y
|
|
3933
3869
|
}
|
|
3934
3870
|
),
|
|
3935
|
-
selected ? renderSelectionRectHandles(
|
|
3871
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
3936
3872
|
`bar-of-pie-secondary-bar-selection-${index}`,
|
|
3937
3873
|
stackedBarLeft,
|
|
3938
3874
|
y,
|
|
3939
3875
|
stackedBarWidth,
|
|
3940
3876
|
segmentHeight
|
|
3941
3877
|
) : null,
|
|
3942
|
-
/* @__PURE__ */
|
|
3878
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
3943
3879
|
"text",
|
|
3944
3880
|
{
|
|
3945
3881
|
fill: resolveChartAxisTextColor(chart),
|
|
@@ -3971,24 +3907,24 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3971
3907
|
return null;
|
|
3972
3908
|
}
|
|
3973
3909
|
const isContour = isContourSurfaceChart(chart);
|
|
3974
|
-
const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access',
|
|
3910
|
+
const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _462 => _462.valueAxis, 'optionalAccess', _463 => _463.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _464 => _464.view3d, 'optionalAccess', _465 => _465.heightPercent]), _optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.depthPercent]), layout);
|
|
3975
3911
|
const minValue = domain.minValue;
|
|
3976
3912
|
const safeMax = domain.safeMax;
|
|
3977
|
-
const wallFill = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3978
|
-
const wallLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3913
|
+
const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _468 => _468.backWall, 'optionalAccess', _469 => _469.fillColor]), () => ( "#d9d9df"));
|
|
3914
|
+
const wallLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _470 => _470.backWall, 'optionalAccess', _471 => _471.lineColor]), () => ( _optionalChain([chart, 'access', _472 => _472.sideWall, 'optionalAccess', _473 => _473.lineColor]))), () => ( _optionalChain([chart, 'access', _474 => _474.floor, 'optionalAccess', _475 => _475.lineColor]))), () => ( (_nullishCoalesce(chart.axisLineColor, () => ( lightenColor(resolveSurfaceBaseColor(chart, palette), 0.4))))));
|
|
3979
3915
|
if (isContour) {
|
|
3980
3916
|
const faces2 = [];
|
|
3981
3917
|
const lines = [];
|
|
3982
|
-
const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3918
|
+
const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _476 => _476.view3d, 'optionalAccess', _477 => _477.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _478 => _478.view3d, 'optionalAccess', _479 => _479.rotY]), () => ( 0)));
|
|
3983
3919
|
const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
|
|
3984
|
-
const inset = _optionalChain([chart, 'access',
|
|
3920
|
+
const inset = _optionalChain([chart, 'access', _480 => _480.valueAxis, 'optionalAccess', _481 => _481.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
|
|
3985
3921
|
const dataWidth = plot.width - 2 * inset;
|
|
3986
3922
|
for (let rowIndex = 0; rowIndex < rows - 1; rowIndex += 1) {
|
|
3987
3923
|
for (let columnIndex = 0; columnIndex < cols - 1; columnIndex += 1) {
|
|
3988
|
-
const p00 = _optionalChain([matrix, 'access',
|
|
3989
|
-
const p10 = _optionalChain([matrix, 'access',
|
|
3990
|
-
const p01 = _optionalChain([matrix, 'access',
|
|
3991
|
-
const p11 = _optionalChain([matrix, 'access',
|
|
3924
|
+
const p00 = _optionalChain([matrix, 'access', _482 => _482[rowIndex], 'optionalAccess', _483 => _483[columnIndex]]);
|
|
3925
|
+
const p10 = _optionalChain([matrix, 'access', _484 => _484[rowIndex], 'optionalAccess', _485 => _485[columnIndex + 1]]);
|
|
3926
|
+
const p01 = _optionalChain([matrix, 'access', _486 => _486[rowIndex + 1], 'optionalAccess', _487 => _487[columnIndex]]);
|
|
3927
|
+
const p11 = _optionalChain([matrix, 'access', _488 => _488[rowIndex + 1], 'optionalAccess', _489 => _489[columnIndex + 1]]);
|
|
3992
3928
|
if (p00 == null || p10 == null || p01 == null || p11 == null) {
|
|
3993
3929
|
continue;
|
|
3994
3930
|
}
|
|
@@ -4008,7 +3944,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4008
3944
|
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
|
|
4009
3945
|
z: (point.y - plot.top) / plot.height * ratios.depth
|
|
4010
3946
|
}));
|
|
4011
|
-
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3947
|
+
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _490 => _490.view3d, 'optionalAccess', _491 => _491.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _492 => _492.view3d, 'optionalAccess', _493 => _493.rotY]), () => ( 0)));
|
|
4012
3948
|
for (let band = 0; band < domain.ticks.length - 1; band += 1) {
|
|
4013
3949
|
const lower = domain.ticks[band];
|
|
4014
3950
|
const upper = domain.ticks[band + 1];
|
|
@@ -4019,19 +3955,19 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4019
3955
|
const key = `${rowIndex}-${columnIndex}-${triangleIndex}-${band}`;
|
|
4020
3956
|
const midpoint = (lower + upper) / 2;
|
|
4021
3957
|
if (!chart.wireframe) {
|
|
4022
|
-
faces2.push(/* @__PURE__ */
|
|
3958
|
+
faces2.push(/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: polygon.map((point) => `${point.x},${point.y}`).join(" ") }, `surface-band-${key}`));
|
|
4023
3959
|
}
|
|
4024
|
-
const widths = _optionalChain([chart, 'access',
|
|
3960
|
+
const widths = _optionalChain([chart, 'access', _494 => _494.raw, 'optionalAccess', _495 => _495.bandFormatLineWidths]);
|
|
4025
3961
|
for (const group of _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true)) {
|
|
4026
3962
|
const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
|
|
4027
3963
|
lines.push(
|
|
4028
|
-
/* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4029
3965
|
"path",
|
|
4030
3966
|
{
|
|
4031
3967
|
d: group.edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
|
|
4032
3968
|
fill: "none",
|
|
4033
3969
|
stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint),
|
|
4034
|
-
strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess',
|
|
3970
|
+
strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _496 => _496[group.band]]), () => ( _optionalChain([chart, 'access', _497 => _497.series, 'access', _498 => _498[0], 'optionalAccess', _499 => _499.lineWidthPx]))), () => ( 1))
|
|
4035
3971
|
},
|
|
4036
3972
|
`surface-edge-${key}-${group.band}`
|
|
4037
3973
|
)
|
|
@@ -4041,28 +3977,28 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4041
3977
|
});
|
|
4042
3978
|
}
|
|
4043
3979
|
}
|
|
4044
|
-
return /* @__PURE__ */
|
|
4045
|
-
/* @__PURE__ */
|
|
3980
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
3981
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4046
3982
|
"rect",
|
|
4047
3983
|
{
|
|
4048
|
-
fill: _optionalChain([chart, 'access',
|
|
3984
|
+
fill: _optionalChain([chart, 'access', _500 => _500.raw, 'optionalAccess', _501 => _501.plotAreaNoFill]) === true ? "transparent" : typeof _optionalChain([chart, 'access', _502 => _502.raw, 'optionalAccess', _503 => _503.plotAreaFillColor]) === "string" ? chart.raw.plotAreaFillColor : backgroundFill,
|
|
4049
3985
|
x: layout.plot.left,
|
|
4050
3986
|
y: layout.plot.top,
|
|
4051
3987
|
width: layout.plot.width,
|
|
4052
3988
|
height: layout.plot.height,
|
|
4053
|
-
stroke: typeof _optionalChain([chart, 'access',
|
|
3989
|
+
stroke: typeof _optionalChain([chart, 'access', _504 => _504.raw, 'optionalAccess', _505 => _505.plotAreaLineColor]) === "string" ? chart.raw.plotAreaLineColor : wallLineColor
|
|
4054
3990
|
}
|
|
4055
3991
|
),
|
|
4056
|
-
/* @__PURE__ */
|
|
3992
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: "none", height: plot.height, stroke: wallLineColor, width: plot.width, x: plot.left, y: plot.top }),
|
|
4057
3993
|
faces2,
|
|
4058
3994
|
lines
|
|
4059
3995
|
] });
|
|
4060
3996
|
}
|
|
4061
|
-
const rotX = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
4062
|
-
const rotY = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
4063
|
-
const usePerspective = _optionalChain([chart, 'access',
|
|
3997
|
+
const rotX = (_nullishCoalesce(_optionalChain([chart, 'access', _506 => _506.view3d, 'optionalAccess', _507 => _507.rotX]), () => ( 25))) * (Math.PI / 180);
|
|
3998
|
+
const rotY = (_nullishCoalesce(_optionalChain([chart, 'access', _508 => _508.view3d, 'optionalAccess', _509 => _509.rotY]), () => ( 30))) * (Math.PI / 180);
|
|
3999
|
+
const usePerspective = _optionalChain([chart, 'access', _510 => _510.view3d, 'optionalAccess', _511 => _511.rAngAx]) === false;
|
|
4064
4000
|
const perspectiveStrength = clamp(
|
|
4065
|
-
(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
4001
|
+
(_nullishCoalesce(_optionalChain([chart, 'access', _512 => _512.view3d, 'optionalAccess', _513 => _513.perspective]), () => ( (usePerspective ? 30 : 0)))) / 100,
|
|
4066
4002
|
0,
|
|
4067
4003
|
1
|
|
4068
4004
|
);
|
|
@@ -4077,7 +4013,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4077
4013
|
const normalizedX = cols <= 1 ? 0 : (columnIndex / (cols - 1) - 0.5) * 2;
|
|
4078
4014
|
const normalizedY = hasValue ? -(_chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
|
|
4079
4015
|
const normalizedZ = rows <= 1 ? 0 : (rowIndex / (rows - 1) - 0.5) * 2 * depthScale;
|
|
4080
|
-
if (_optionalChain([chart, 'access',
|
|
4016
|
+
if (_optionalChain([chart, 'access', _514 => _514.view3d, 'optionalAccess', _515 => _515.rAngAx]) !== false) {
|
|
4081
4017
|
return {
|
|
4082
4018
|
depth: normalizedZ,
|
|
4083
4019
|
hasValue,
|
|
@@ -4115,7 +4051,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4115
4051
|
return { ...projected, x: centerX + (projected.x - centerRawX) * scale, y: centerY + (projected.y - centerRawY) * scale };
|
|
4116
4052
|
};
|
|
4117
4053
|
const wallNodes = [];
|
|
4118
|
-
const backRow = _optionalChain([chart, 'access',
|
|
4054
|
+
const backRow = _optionalChain([chart, 'access', _516 => _516.view3d, 'optionalAccess', _517 => _517.rAngAx]) !== false || cosX * cosY >= 0 ? rows - 1 : 0;
|
|
4119
4055
|
const sideColumn = sinY >= 0 ? 0 : cols - 1;
|
|
4120
4056
|
const wallPoint = (x, y, value) => ({ x, y, value });
|
|
4121
4057
|
const addWall = (key, points, color, hidden) => {
|
|
@@ -4125,20 +4061,20 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4125
4061
|
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
|
|
4126
4062
|
z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
|
|
4127
4063
|
}));
|
|
4128
|
-
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access',
|
|
4064
|
+
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _518 => _518.view3d, 'optionalAccess', _519 => _519.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _520 => _520.view3d, 'optionalAccess', _521 => _521.rotY]), () => ( 30)), _optionalChain([chart, 'access', _522 => _522.view3d, 'optionalAccess', _523 => _523.rAngAx]) !== false);
|
|
4129
4065
|
const baseColor = _nullishCoalesce(color, () => ( wallFill));
|
|
4130
|
-
wallNodes.push(/* @__PURE__ */
|
|
4066
|
+
wallNodes.push(/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? baseColor : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, baseColor, normal), points: points.map(projectPoint).map((point) => `${point.x},${point.y}`).join(" ") }, key));
|
|
4131
4067
|
};
|
|
4132
|
-
addWall("floor", [wallPoint(0, 0, minValue), wallPoint(cols - 1, 0, minValue), wallPoint(cols - 1, rows - 1, minValue), wallPoint(0, rows - 1, minValue)], _optionalChain([chart, 'access',
|
|
4133
|
-
addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access',
|
|
4134
|
-
addWall("side", [wallPoint(sideColumn, 0, safeMax), wallPoint(sideColumn, rows - 1, safeMax), wallPoint(sideColumn, rows - 1, minValue), wallPoint(sideColumn, 0, minValue)], _optionalChain([chart, 'access',
|
|
4135
|
-
if (_optionalChain([chart, 'access',
|
|
4068
|
+
addWall("floor", [wallPoint(0, 0, minValue), wallPoint(cols - 1, 0, minValue), wallPoint(cols - 1, rows - 1, minValue), wallPoint(0, rows - 1, minValue)], _optionalChain([chart, 'access', _524 => _524.floor, 'optionalAccess', _525 => _525.fillColor]), _optionalChain([chart, 'access', _526 => _526.floor, 'optionalAccess', _527 => _527.hidden]));
|
|
4069
|
+
addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access', _528 => _528.backWall, 'optionalAccess', _529 => _529.fillColor]), _optionalChain([chart, 'access', _530 => _530.backWall, 'optionalAccess', _531 => _531.hidden]));
|
|
4070
|
+
addWall("side", [wallPoint(sideColumn, 0, safeMax), wallPoint(sideColumn, rows - 1, safeMax), wallPoint(sideColumn, rows - 1, minValue), wallPoint(sideColumn, 0, minValue)], _optionalChain([chart, 'access', _532 => _532.sideWall, 'optionalAccess', _533 => _533.fillColor]), _optionalChain([chart, 'access', _534 => _534.sideWall, 'optionalAccess', _535 => _535.hidden]));
|
|
4071
|
+
if (_optionalChain([chart, 'access', _536 => _536.valueAxis, 'optionalAccess', _537 => _537.majorGridlines])) {
|
|
4136
4072
|
for (const tick of domain.ticks) {
|
|
4137
4073
|
const edges = [
|
|
4138
|
-
..._optionalChain([chart, 'access',
|
|
4139
|
-
..._optionalChain([chart, 'access',
|
|
4074
|
+
..._optionalChain([chart, 'access', _538 => _538.backWall, 'optionalAccess', _539 => _539.hidden]) ? [] : [[wallPoint(0, backRow, tick), wallPoint(cols - 1, backRow, tick)]],
|
|
4075
|
+
..._optionalChain([chart, 'access', _540 => _540.sideWall, 'optionalAccess', _541 => _541.hidden]) ? [] : [[wallPoint(sideColumn, 0, tick), wallPoint(sideColumn, rows - 1, tick)]]
|
|
4140
4076
|
];
|
|
4141
|
-
wallNodes.push(/* @__PURE__ */
|
|
4077
|
+
wallNodes.push(/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { fill: "none", stroke: _nullishCoalesce(chart.valueAxis.majorGridlineColor, () => ( wallLineColor)), strokeWidth: 1, d: edges.map((edge) => {
|
|
4142
4078
|
const [from, to] = edge.map(projectPoint);
|
|
4143
4079
|
return `M ${from.x} ${from.y} L ${to.x} ${to.y}`;
|
|
4144
4080
|
}).join(" ") }, `wall-grid-${tick}`));
|
|
@@ -4161,7 +4097,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4161
4097
|
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
|
|
4162
4098
|
z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
|
|
4163
4099
|
}));
|
|
4164
|
-
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access',
|
|
4100
|
+
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _542 => _542.view3d, 'optionalAccess', _543 => _543.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _544 => _544.view3d, 'optionalAccess', _545 => _545.rotY]), () => ( 30)), _optionalChain([chart, 'access', _546 => _546.view3d, 'optionalAccess', _547 => _547.rAngAx]) !== false);
|
|
4165
4101
|
for (let band = 0; band < domain.ticks.length - 1; band += 1) {
|
|
4166
4102
|
const lower = domain.ticks[band];
|
|
4167
4103
|
const upper = domain.ticks[band + 1];
|
|
@@ -4169,16 +4105,16 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4169
4105
|
if (polygon.length < 3) continue;
|
|
4170
4106
|
const projected = polygon.map(projectPoint);
|
|
4171
4107
|
const midpoint = (lower + upper) / 2;
|
|
4172
|
-
const widths = _optionalChain([chart, 'access',
|
|
4108
|
+
const widths = _optionalChain([chart, 'access', _548 => _548.raw, 'optionalAccess', _549 => _549.bandFormatLineWidths]);
|
|
4173
4109
|
const edgeGroups = _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true);
|
|
4174
4110
|
faces.push({
|
|
4175
4111
|
depth: projected.reduce((sum, point) => sum + point.depth, 0) / projected.length,
|
|
4176
|
-
node: /* @__PURE__ */
|
|
4177
|
-
!chart.wireframe && /* @__PURE__ */
|
|
4112
|
+
node: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4113
|
+
!chart.wireframe && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: projected.map((point) => `${point.x},${point.y}`).join(" ") }),
|
|
4178
4114
|
edgeGroups.map((group) => {
|
|
4179
4115
|
const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
|
|
4180
4116
|
const edges = group.edges.map(([from, to]) => [projectPoint(from), projectPoint(to)]);
|
|
4181
|
-
return /* @__PURE__ */
|
|
4117
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _550 => _550[group.band]]), () => ( _optionalChain([chart, 'access', _551 => _551.series, 'access', _552 => _552[0], 'optionalAccess', _553 => _553.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") }, `surface-edge-${group.band}`);
|
|
4182
4118
|
})
|
|
4183
4119
|
] }, `surface-band-${rowIndex}-${columnIndex}-${triangleIndex}-${band}`)
|
|
4184
4120
|
});
|
|
@@ -4187,7 +4123,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4187
4123
|
}
|
|
4188
4124
|
}
|
|
4189
4125
|
faces.sort((left, right) => right.depth - left.depth);
|
|
4190
|
-
return /* @__PURE__ */
|
|
4126
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4191
4127
|
wallNodes,
|
|
4192
4128
|
faces.map((face) => face.node)
|
|
4193
4129
|
] });
|
|
@@ -4205,12 +4141,12 @@ function renderSurfaceHitOverlay(chart, layout, selectedChartElement) {
|
|
|
4205
4141
|
}
|
|
4206
4142
|
const cellWidth = plot.width / cols;
|
|
4207
4143
|
const cellHeight = plot.height / rows;
|
|
4208
|
-
return /* @__PURE__ */
|
|
4144
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: chart.series.flatMap((_, seriesIndex) => Array.from({ length: cols }, (_2, pointIndex) => {
|
|
4209
4145
|
const left = plot.left + pointIndex * cellWidth;
|
|
4210
4146
|
const top = plot.top + seriesIndex * cellHeight;
|
|
4211
4147
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, seriesIndex, pointIndex);
|
|
4212
|
-
return /* @__PURE__ */
|
|
4213
|
-
/* @__PURE__ */
|
|
4148
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
4149
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4214
4150
|
"rect",
|
|
4215
4151
|
{
|
|
4216
4152
|
...chartElementDataProps(seriesIndex, pointIndex),
|
|
@@ -4222,7 +4158,7 @@ function renderSurfaceHitOverlay(chart, layout, selectedChartElement) {
|
|
|
4222
4158
|
y: top
|
|
4223
4159
|
}
|
|
4224
4160
|
),
|
|
4225
|
-
selected ? renderSelectionRectHandles(
|
|
4161
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
4226
4162
|
`surface-selection-${seriesIndex}-${pointIndex}`,
|
|
4227
4163
|
left,
|
|
4228
4164
|
top,
|
|
@@ -4260,12 +4196,12 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4260
4196
|
maxValue = minValue + 1;
|
|
4261
4197
|
}
|
|
4262
4198
|
const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range([plot.top + plot.height, plot.top]);
|
|
4263
|
-
const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access',
|
|
4199
|
+
const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access', _554 => _554.valueAxis, 'optionalAccess', _555 => _555.majorUnit]));
|
|
4264
4200
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
4265
4201
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
4266
|
-
return /* @__PURE__ */
|
|
4267
|
-
ticks.map((tick) => /* @__PURE__ */
|
|
4268
|
-
/* @__PURE__ */
|
|
4202
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4203
|
+
ticks.map((tick) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4204
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4269
4205
|
"line",
|
|
4270
4206
|
{
|
|
4271
4207
|
stroke: lightenColor(axisColor, 0.72),
|
|
@@ -4276,10 +4212,10 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4276
4212
|
y2: yScale(tick)
|
|
4277
4213
|
}
|
|
4278
4214
|
),
|
|
4279
|
-
/* @__PURE__ */
|
|
4215
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: labelColor, fontSize: 10, textAnchor: "end", x: plot.left - 6, y: yScale(tick) + 3, children: formatTickValue(tick) })
|
|
4280
4216
|
] }, `waterfall-y-${tick}`)),
|
|
4281
|
-
/* @__PURE__ */
|
|
4282
|
-
/* @__PURE__ */
|
|
4217
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left, y1: plot.top, y2: plot.top + plot.height }),
|
|
4218
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left + plot.width, y1: yScale(0), y2: yScale(0) }),
|
|
4283
4219
|
bars.map((bar, index) => {
|
|
4284
4220
|
const bandLeft = _nullishCoalesce(xScale(bar.label), () => ( plot.left));
|
|
4285
4221
|
const bandWidth = xScale.bandwidth();
|
|
@@ -4291,8 +4227,8 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4291
4227
|
const connectorStart = index > 0 ? bars[index - 1] : null;
|
|
4292
4228
|
const connectorY = connectorStart ? yScale(connectorStart.end) : 0;
|
|
4293
4229
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, 0, index);
|
|
4294
|
-
return /* @__PURE__ */
|
|
4295
|
-
connectorStart ? /* @__PURE__ */
|
|
4230
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4231
|
+
connectorStart ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4296
4232
|
"line",
|
|
4297
4233
|
{
|
|
4298
4234
|
stroke: lightenColor(axisColor, 0.35),
|
|
@@ -4304,7 +4240,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4304
4240
|
y2: connectorY
|
|
4305
4241
|
}
|
|
4306
4242
|
) : null,
|
|
4307
|
-
/* @__PURE__ */
|
|
4243
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4308
4244
|
"rect",
|
|
4309
4245
|
{
|
|
4310
4246
|
...chartElementDataProps(0, index),
|
|
@@ -4319,8 +4255,8 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4319
4255
|
height
|
|
4320
4256
|
}
|
|
4321
4257
|
),
|
|
4322
|
-
selected ? renderSelectionRectHandles(`waterfall-selection-${index}`, bandLeft, top, bandWidth, height) : null,
|
|
4323
|
-
/* @__PURE__ */
|
|
4258
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0, `waterfall-selection-${index}`, bandLeft, top, bandWidth, height) : null,
|
|
4259
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4324
4260
|
"text",
|
|
4325
4261
|
{
|
|
4326
4262
|
fill: labelColor,
|
|
@@ -4331,7 +4267,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4331
4267
|
children: bar.label
|
|
4332
4268
|
}
|
|
4333
4269
|
),
|
|
4334
|
-
/* @__PURE__ */
|
|
4270
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4335
4271
|
"text",
|
|
4336
4272
|
{
|
|
4337
4273
|
fill: labelColor,
|
|
@@ -4356,7 +4292,7 @@ function renderFunnelChart(chart, palette, layout, selectedChartElement) {
|
|
|
4356
4292
|
const sectionHeight = plot.height / stages.length;
|
|
4357
4293
|
const centerX = plot.left + plot.width * 0.5;
|
|
4358
4294
|
const labelColor = resolveChartTextColor(chart);
|
|
4359
|
-
return /* @__PURE__ */
|
|
4295
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: stages.map((stage, index) => {
|
|
4360
4296
|
const stageWidth = stage.value / maxValue * plot.width;
|
|
4361
4297
|
const topY = plot.top + index * sectionHeight;
|
|
4362
4298
|
const stageHeight = Math.max(6, sectionHeight - 2);
|
|
@@ -4364,8 +4300,8 @@ function renderFunnelChart(chart, palette, layout, selectedChartElement) {
|
|
|
4364
4300
|
const fill = stage.isSubtotal ? darkenColor(stage.color, 0.14) : stage.color;
|
|
4365
4301
|
const labelFitsInside = stageWidth > 90;
|
|
4366
4302
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, 0, index);
|
|
4367
|
-
return /* @__PURE__ */
|
|
4368
|
-
/* @__PURE__ */
|
|
4303
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4304
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4369
4305
|
"rect",
|
|
4370
4306
|
{
|
|
4371
4307
|
...chartElementDataProps(0, index),
|
|
@@ -4380,8 +4316,8 @@ function renderFunnelChart(chart, palette, layout, selectedChartElement) {
|
|
|
4380
4316
|
y: topY
|
|
4381
4317
|
}
|
|
4382
4318
|
),
|
|
4383
|
-
selected ? renderSelectionRectHandles(`funnel-selection-${index}`, left, topY, stageWidth, stageHeight) : null,
|
|
4384
|
-
/* @__PURE__ */
|
|
4319
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0, `funnel-selection-${index}`, left, topY, stageWidth, stageHeight) : null,
|
|
4320
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4385
4321
|
"text",
|
|
4386
4322
|
{
|
|
4387
4323
|
fill: labelColor,
|
|
@@ -4409,7 +4345,7 @@ function renderSunburstChart(chart, palette, layout, selectedChartElement) {
|
|
|
4409
4345
|
const centerY = plot.top + plot.height * 0.5;
|
|
4410
4346
|
const ringSpan = Math.max(1, partitioned.height || 1);
|
|
4411
4347
|
const arcBuilder = _d3shape.arc.call(void 0, ).startAngle((node) => node.x0).endAngle((node) => node.x1).padAngle(5e-3).padRadius(radius).innerRadius((node) => holeRadius + (node.y0 - 1) / ringSpan * (radius - holeRadius)).outerRadius((node) => holeRadius + (node.y1 - 1) / ringSpan * (radius - holeRadius) - 1);
|
|
4412
|
-
return /* @__PURE__ */
|
|
4348
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { transform: `translate(${centerX}, ${centerY})`, children: [
|
|
4413
4349
|
partitioned.descendants().filter((node) => node.depth > 0).map((node, index) => {
|
|
4414
4350
|
const path = arcBuilder(node);
|
|
4415
4351
|
if (!path) {
|
|
@@ -4423,8 +4359,8 @@ function renderSunburstChart(chart, palette, layout, selectedChartElement) {
|
|
|
4423
4359
|
const canShowLabel = arcSpan * labelRadius > 26;
|
|
4424
4360
|
const fill = resolveHierarchyNodeColor(chart, node);
|
|
4425
4361
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, 0, index);
|
|
4426
|
-
return /* @__PURE__ */
|
|
4427
|
-
/* @__PURE__ */
|
|
4362
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4363
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4428
4364
|
"path",
|
|
4429
4365
|
{
|
|
4430
4366
|
...chartElementDataProps(0, index),
|
|
@@ -4434,8 +4370,8 @@ function renderSunburstChart(chart, palette, layout, selectedChartElement) {
|
|
|
4434
4370
|
strokeWidth: selected ? 2 : 1
|
|
4435
4371
|
}
|
|
4436
4372
|
),
|
|
4437
|
-
selected ? renderSelectionPointHandles(`sunburst-selection-${index}`, [{ x: labelX, y: labelY }]) : null,
|
|
4438
|
-
canShowLabel ? /* @__PURE__ */
|
|
4373
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `sunburst-selection-${index}`, [{ x: labelX, y: labelY }]) : null,
|
|
4374
|
+
canShowLabel ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4439
4375
|
"text",
|
|
4440
4376
|
{
|
|
4441
4377
|
fill: darkenColor(fill, 0.65),
|
|
@@ -4447,7 +4383,7 @@ function renderSunburstChart(chart, palette, layout, selectedChartElement) {
|
|
|
4447
4383
|
) : null
|
|
4448
4384
|
] }, `sunburst-node-${index}`);
|
|
4449
4385
|
}),
|
|
4450
|
-
/* @__PURE__ */
|
|
4386
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "circle", { fill: _nullishCoalesce(chart.chartAreaFillColor, () => ( palette.surface)), r: holeRadius - 2 })
|
|
4451
4387
|
] });
|
|
4452
4388
|
}
|
|
4453
4389
|
function renderTreemapChart(chart, palette, layout, selectedChartElement) {
|
|
@@ -4457,14 +4393,14 @@ function renderTreemapChart(chart, palette, layout, selectedChartElement) {
|
|
|
4457
4393
|
}
|
|
4458
4394
|
const root = _d3hierarchy.hierarchy.call(void 0, hierarchyData).sum((node) => node.children && node.children.length > 0 ? 0 : Math.max(1e-4, _nullishCoalesce(node.value, () => ( 0)))).sort((left, right) => (_nullishCoalesce(right.value, () => ( 0))) - (_nullishCoalesce(left.value, () => ( 0))));
|
|
4459
4395
|
const treemapRoot = _d3hierarchy.treemap.call(void 0, ).size([layout.plot.width, layout.plot.height]).paddingInner(2).paddingOuter(1).round(true).tile(excelTreemapTile)(root);
|
|
4460
|
-
return /* @__PURE__ */
|
|
4396
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { transform: `translate(${layout.plot.left}, ${layout.plot.top})`, children: treemapRoot.leaves().map((leaf, index) => {
|
|
4461
4397
|
const fill = resolveTreemapNodeColor(chart, leaf);
|
|
4462
4398
|
const width = Math.max(0, leaf.x1 - leaf.x0);
|
|
4463
4399
|
const height = Math.max(0, leaf.y1 - leaf.y0);
|
|
4464
4400
|
const canShowLabel = width > 48 && height > 22;
|
|
4465
4401
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, 0, index);
|
|
4466
|
-
return /* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4402
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4403
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4468
4404
|
"rect",
|
|
4469
4405
|
{
|
|
4470
4406
|
...chartElementDataProps(0, index),
|
|
@@ -4479,9 +4415,9 @@ function renderTreemapChart(chart, palette, layout, selectedChartElement) {
|
|
|
4479
4415
|
height
|
|
4480
4416
|
}
|
|
4481
4417
|
),
|
|
4482
|
-
selected ? renderSelectionRectHandles(`treemap-selection-${index}`, leaf.x0, leaf.y0, width, height) : null,
|
|
4483
|
-
canShowLabel ? /* @__PURE__ */
|
|
4484
|
-
/* @__PURE__ */
|
|
4418
|
+
selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0, `treemap-selection-${index}`, leaf.x0, leaf.y0, width, height) : null,
|
|
4419
|
+
canShowLabel ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
4420
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4485
4421
|
"text",
|
|
4486
4422
|
{
|
|
4487
4423
|
fill: darkenColor(fill, 0.68),
|
|
@@ -4492,7 +4428,7 @@ function renderTreemapChart(chart, palette, layout, selectedChartElement) {
|
|
|
4492
4428
|
children: leaf.data.name
|
|
4493
4429
|
}
|
|
4494
4430
|
),
|
|
4495
|
-
/* @__PURE__ */
|
|
4431
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4496
4432
|
"text",
|
|
4497
4433
|
{
|
|
4498
4434
|
fill: darkenColor(fill, 0.54),
|
|
@@ -4542,11 +4478,11 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4542
4478
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
4543
4479
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
4544
4480
|
const meanLinePoints = seriesStats.filter((entry) => entry.visibility.meanLine).map((entry, index) => `${_nullishCoalesce(xScale(index), () => ( layout.plot.left))},${yScale(entry.stats.mean)}`);
|
|
4545
|
-
return /* @__PURE__ */
|
|
4481
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4546
4482
|
valueDomain.ticks.map((tick, index) => {
|
|
4547
4483
|
const y = yScale(tick);
|
|
4548
|
-
return /* @__PURE__ */
|
|
4549
|
-
/* @__PURE__ */
|
|
4484
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4485
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4550
4486
|
"line",
|
|
4551
4487
|
{
|
|
4552
4488
|
stroke: lightenColor(axisColor, 0.22),
|
|
@@ -4557,7 +4493,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4557
4493
|
y2: y
|
|
4558
4494
|
}
|
|
4559
4495
|
),
|
|
4560
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4561
4497
|
"text",
|
|
4562
4498
|
{
|
|
4563
4499
|
fill: labelColor,
|
|
@@ -4570,7 +4506,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4570
4506
|
)
|
|
4571
4507
|
] }, `box-whisker-grid-${index}`);
|
|
4572
4508
|
}),
|
|
4573
|
-
/* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4574
4510
|
"line",
|
|
4575
4511
|
{
|
|
4576
4512
|
stroke: axisColor,
|
|
@@ -4581,7 +4517,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4581
4517
|
y2: layout.plot.top + layout.plot.height
|
|
4582
4518
|
}
|
|
4583
4519
|
),
|
|
4584
|
-
/* @__PURE__ */
|
|
4520
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4585
4521
|
"line",
|
|
4586
4522
|
{
|
|
4587
4523
|
stroke: axisColor,
|
|
@@ -4592,7 +4528,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4592
4528
|
y2: layout.plot.top + layout.plot.height
|
|
4593
4529
|
}
|
|
4594
4530
|
),
|
|
4595
|
-
meanLinePoints.length >= 2 ? /* @__PURE__ */
|
|
4531
|
+
meanLinePoints.length >= 2 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4596
4532
|
"polyline",
|
|
4597
4533
|
{
|
|
4598
4534
|
fill: "none",
|
|
@@ -4613,7 +4549,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4613
4549
|
const visiblePoints = entry.visibility.nonoutliers ? entry.stats.visiblePoints : [];
|
|
4614
4550
|
const outliers = entry.visibility.outliers ? entry.stats.outliers : [];
|
|
4615
4551
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, index, index);
|
|
4616
|
-
return /* @__PURE__ */
|
|
4552
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0, "g", { ...chartElementDataProps(index), key: `box-whisker-series-${index}` }, /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4617
4553
|
"line",
|
|
4618
4554
|
{
|
|
4619
4555
|
stroke: entry.lineColor,
|
|
@@ -4623,7 +4559,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4623
4559
|
y1: upperWhiskerY,
|
|
4624
4560
|
y2: boxTop
|
|
4625
4561
|
}
|
|
4626
|
-
), /* @__PURE__ */
|
|
4562
|
+
), /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4627
4563
|
"line",
|
|
4628
4564
|
{
|
|
4629
4565
|
stroke: entry.lineColor,
|
|
@@ -4633,7 +4569,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4633
4569
|
y1: boxBottom,
|
|
4634
4570
|
y2: lowerWhiskerY
|
|
4635
4571
|
}
|
|
4636
|
-
), /* @__PURE__ */
|
|
4572
|
+
), /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4637
4573
|
"line",
|
|
4638
4574
|
{
|
|
4639
4575
|
stroke: entry.lineColor,
|
|
@@ -4643,7 +4579,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4643
4579
|
y1: upperWhiskerY,
|
|
4644
4580
|
y2: upperWhiskerY
|
|
4645
4581
|
}
|
|
4646
|
-
), /* @__PURE__ */
|
|
4582
|
+
), /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4647
4583
|
"line",
|
|
4648
4584
|
{
|
|
4649
4585
|
stroke: entry.lineColor,
|
|
@@ -4653,7 +4589,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4653
4589
|
y1: lowerWhiskerY,
|
|
4654
4590
|
y2: lowerWhiskerY
|
|
4655
4591
|
}
|
|
4656
|
-
), /* @__PURE__ */
|
|
4592
|
+
), /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4657
4593
|
"rect",
|
|
4658
4594
|
{
|
|
4659
4595
|
...chartElementDataProps(index, index),
|
|
@@ -4666,13 +4602,13 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4666
4602
|
x: x - boxWidth * 0.5,
|
|
4667
4603
|
y: boxTop
|
|
4668
4604
|
}
|
|
4669
|
-
), selected ? renderSelectionRectHandles(
|
|
4605
|
+
), selected ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
|
|
4670
4606
|
`box-whisker-selection-${index}`,
|
|
4671
4607
|
x - boxWidth * 0.5,
|
|
4672
4608
|
boxTop,
|
|
4673
4609
|
boxWidth,
|
|
4674
4610
|
Math.max(1, boxBottom - boxTop)
|
|
4675
|
-
) : null, /* @__PURE__ */
|
|
4611
|
+
) : null, /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4676
4612
|
"line",
|
|
4677
4613
|
{
|
|
4678
4614
|
stroke: darkenColor(entry.lineColor, 0.15),
|
|
@@ -4682,8 +4618,8 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4682
4618
|
y1: medianY,
|
|
4683
4619
|
y2: medianY
|
|
4684
4620
|
}
|
|
4685
|
-
), entry.visibility.meanMarker ? /* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */
|
|
4621
|
+
), entry.visibility.meanMarker ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
4622
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4687
4623
|
"line",
|
|
4688
4624
|
{
|
|
4689
4625
|
stroke: darkenColor(entry.lineColor, 0.18),
|
|
@@ -4694,7 +4630,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4694
4630
|
y2: meanY + 4
|
|
4695
4631
|
}
|
|
4696
4632
|
),
|
|
4697
|
-
/* @__PURE__ */
|
|
4633
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4698
4634
|
"line",
|
|
4699
4635
|
{
|
|
4700
4636
|
stroke: darkenColor(entry.lineColor, 0.18),
|
|
@@ -4708,7 +4644,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4708
4644
|
] }) : null, visiblePoints.map((value, pointIndex) => {
|
|
4709
4645
|
const y = yScale(value);
|
|
4710
4646
|
const jitter = (pointIndex % 7 - 3) * (boxWidth / 16);
|
|
4711
|
-
return /* @__PURE__ */
|
|
4647
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
4712
4648
|
"circle",
|
|
4713
4649
|
{
|
|
4714
4650
|
...chartElementDataProps(index, pointIndex),
|
|
@@ -4723,7 +4659,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4723
4659
|
);
|
|
4724
4660
|
}), outliers.map((value, pointIndex) => {
|
|
4725
4661
|
const y = yScale(value);
|
|
4726
|
-
return /* @__PURE__ */
|
|
4662
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.k.call(void 0,
|
|
4727
4663
|
"circle",
|
|
4728
4664
|
{
|
|
4729
4665
|
...chartElementDataProps(index, pointIndex),
|
|
@@ -4736,7 +4672,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4736
4672
|
strokeWidth: 1.2
|
|
4737
4673
|
}
|
|
4738
4674
|
);
|
|
4739
|
-
}), /* @__PURE__ */
|
|
4675
|
+
}), /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4740
4676
|
"text",
|
|
4741
4677
|
{
|
|
4742
4678
|
fill: labelColor,
|
|
@@ -4758,10 +4694,10 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4758
4694
|
}
|
|
4759
4695
|
const labels = getCategoryLabels(chart);
|
|
4760
4696
|
const layoutProperties = resolveRegionMapLayoutProperties(primarySeries);
|
|
4761
|
-
const geography = _optionalChain([layoutProperties, 'optionalAccess',
|
|
4697
|
+
const geography = _optionalChain([layoutProperties, 'optionalAccess', _556 => _556.geography]) && typeof layoutProperties.geography === "object" ? layoutProperties.geography : null;
|
|
4762
4698
|
const featureSet = resolveRegionMapFeatureSet(labels, geography);
|
|
4763
|
-
const viewedRegionType = typeof _optionalChain([geography, 'optionalAccess',
|
|
4764
|
-
const projectionType = typeof _optionalChain([geography, 'optionalAccess',
|
|
4699
|
+
const viewedRegionType = typeof _optionalChain([geography, 'optionalAccess', _557 => _557.viewedRegionType]) === "string" ? geography.viewedRegionType : null;
|
|
4700
|
+
const projectionType = typeof _optionalChain([geography, 'optionalAccess', _558 => _558.projectionType]) === "string" ? geography.projectionType : null;
|
|
4765
4701
|
const projection = featureSet === "us-state" ? geoIdentity() : projectionType === "miller" ? geoMercator() : geoNaturalEarth1();
|
|
4766
4702
|
const availableFeatures = getRegionMapBaseFeatures(featureSet);
|
|
4767
4703
|
const categoricalValues = resolveRegionMapColorStrings(primarySeries);
|
|
@@ -4774,7 +4710,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4774
4710
|
const entries = labels.map((label, index) => {
|
|
4775
4711
|
const feature = resolveRegionMapFeature(label, featureSet);
|
|
4776
4712
|
const value = safeNumber(primarySeries.values[index]);
|
|
4777
|
-
const colorLabel = _optionalChain([categoricalValues, 'optionalAccess',
|
|
4713
|
+
const colorLabel = _optionalChain([categoricalValues, 'optionalAccess', _559 => _559[index]]) || null;
|
|
4778
4714
|
return {
|
|
4779
4715
|
colorLabel,
|
|
4780
4716
|
feature,
|
|
@@ -4802,14 +4738,14 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4802
4738
|
const numericEntryValues = primarySeries.values.map(safeNumber).filter((value) => typeof value === "number" && Number.isFinite(value));
|
|
4803
4739
|
const minValue = numericEntryValues.length > 0 ? Math.min(...numericEntryValues) : 0;
|
|
4804
4740
|
const maxValue = numericEntryValues.length > 0 ? Math.max(...numericEntryValues) : 1;
|
|
4805
|
-
const showRegionLabels = _optionalChain([layoutProperties, 'optionalAccess',
|
|
4806
|
-
return /* @__PURE__ */
|
|
4741
|
+
const showRegionLabels = _optionalChain([layoutProperties, 'optionalAccess', _560 => _560.regionLabelLayout]) !== "none";
|
|
4742
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4807
4743
|
baseFeatures.map((feature, index) => {
|
|
4808
4744
|
const d = path(feature);
|
|
4809
4745
|
if (!d) {
|
|
4810
4746
|
return null;
|
|
4811
4747
|
}
|
|
4812
|
-
return /* @__PURE__ */
|
|
4748
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4813
4749
|
"path",
|
|
4814
4750
|
{
|
|
4815
4751
|
d,
|
|
@@ -4829,12 +4765,12 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4829
4765
|
const fill = entry.value != null ? (() => {
|
|
4830
4766
|
const ratio = maxValue <= minValue ? 1 : (entry.value - minValue) / Math.max(1e-6, maxValue - minValue);
|
|
4831
4767
|
return resolveRegionMapValueColor(chart, primarySeriesIndex, ratio);
|
|
4832
|
-
})() : _nullishCoalesce(_optionalChain([categoricalColorByLabel, 'optionalAccess',
|
|
4768
|
+
})() : _nullishCoalesce(_optionalChain([categoricalColorByLabel, 'optionalAccess', _561 => _561.get, 'call', _562 => _562(_nullishCoalesce(entry.colorLabel, () => ( "")))]), () => ( resolveRegionMapDataColor(chart, primarySeriesIndex)));
|
|
4833
4769
|
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, primarySeriesIndex, index);
|
|
4834
4770
|
const centroid = path.centroid(entry.feature);
|
|
4835
4771
|
const canShowSelectionDot = Number.isFinite(centroid[0]) && Number.isFinite(centroid[1]);
|
|
4836
|
-
return /* @__PURE__ */
|
|
4837
|
-
/* @__PURE__ */
|
|
4772
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
4773
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4838
4774
|
"path",
|
|
4839
4775
|
{
|
|
4840
4776
|
...chartElementDataProps(primarySeriesIndex, index),
|
|
@@ -4845,7 +4781,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4845
4781
|
strokeWidth: selected ? 1.8 : 0.85
|
|
4846
4782
|
}
|
|
4847
4783
|
),
|
|
4848
|
-
selected && canShowSelectionDot ? renderSelectionPointHandles(`region-map-selection-${index}`, [{ x: centroid[0], y: centroid[1] }]) : null
|
|
4784
|
+
selected && canShowSelectionDot ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `region-map-selection-${index}`, [{ x: centroid[0], y: centroid[1] }]) : null
|
|
4849
4785
|
] }, `region-map-value-${entry.key || index}`);
|
|
4850
4786
|
}),
|
|
4851
4787
|
showRegionLabels ? entries.map((entry, index) => {
|
|
@@ -4860,7 +4796,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4860
4796
|
if (!Number.isFinite(centroid[0]) || !Number.isFinite(centroid[1])) {
|
|
4861
4797
|
return null;
|
|
4862
4798
|
}
|
|
4863
|
-
return /* @__PURE__ */
|
|
4799
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4864
4800
|
"text",
|
|
4865
4801
|
{
|
|
4866
4802
|
fill: resolveChartTextColor(chart),
|
|
@@ -4877,8 +4813,8 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
|
|
|
4877
4813
|
] });
|
|
4878
4814
|
}
|
|
4879
4815
|
function renderUnsupported(chart, palette, layout, chartType) {
|
|
4880
|
-
return /* @__PURE__ */
|
|
4881
|
-
/* @__PURE__ */
|
|
4816
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
|
|
4817
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4882
4818
|
"rect",
|
|
4883
4819
|
{
|
|
4884
4820
|
fill: lightenColor(_nullishCoalesce(chart.chartAreaFillColor, () => ( palette.surface)), 0.02),
|
|
@@ -4890,7 +4826,7 @@ function renderUnsupported(chart, palette, layout, chartType) {
|
|
|
4890
4826
|
y: layout.plot.top
|
|
4891
4827
|
}
|
|
4892
4828
|
),
|
|
4893
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
4894
4830
|
"text",
|
|
4895
4831
|
{
|
|
4896
4832
|
fill: resolveChartMutedTextColor(chart),
|
|
@@ -4956,11 +4892,11 @@ function renderChartPlot(chart, palette, layout, chartType, selectedChartElement
|
|
|
4956
4892
|
return renderTreemapChart(chart, palette, layout, selectedChartElement);
|
|
4957
4893
|
}
|
|
4958
4894
|
if (chartType === "RegionMap") {
|
|
4959
|
-
return /* @__PURE__ */
|
|
4895
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, RegionMapPlot, { chart, layout, palette, selectedChartElement });
|
|
4960
4896
|
}
|
|
4961
4897
|
return renderUnsupported(chart, palette, layout, chartType);
|
|
4962
4898
|
}
|
|
4963
|
-
var MemoChartSvg =
|
|
4899
|
+
var MemoChartSvg = _chunkAZWBTFJIcjs.N.call(void 0, function MemoChartSvg2({
|
|
4964
4900
|
chart,
|
|
4965
4901
|
onChartElementDoubleClick,
|
|
4966
4902
|
onChartElementPointerDown,
|
|
@@ -4972,34 +4908,20 @@ var MemoChartSvg = _chunkCJBI5F6Vcjs.N.call(void 0, function MemoChartSvg2({
|
|
|
4972
4908
|
const legendItems = getLegendItems(chart, renderChartType, palette);
|
|
4973
4909
|
const layout = buildLayout(chart, rect, legendItems);
|
|
4974
4910
|
const chartRaw = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
|
|
4975
|
-
const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess',
|
|
4911
|
+
const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess', _563 => _563.chartAreaNoFill]) === true || _optionalChain([chartRaw, 'optionalAccess', _564 => _564.plotAreaNoFill]) === true;
|
|
4976
4912
|
const background = _nullishCoalesce(chart.chartAreaFillColor, () => ( (explicitNoFill ? "transparent" : "#ffffff")));
|
|
4977
4913
|
const borderColor = _nullishCoalesce(chart.chartAreaBorderColor, () => ( "transparent"));
|
|
4978
4914
|
const normalizedBackground = background.trim().toLowerCase();
|
|
4979
4915
|
const normalizedBorderColor = borderColor.trim().toLowerCase();
|
|
4980
4916
|
const hideBackgroundRect = normalizedBackground === "transparent" && normalizedBorderColor === "transparent";
|
|
4981
4917
|
const fontFamily = buildChartFontFamily(chart.fontFamily);
|
|
4982
|
-
const handlePointerDown =
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
}
|
|
4990
|
-
_optionalChain([onChartElementPointerDown, 'optionalCall', _567 => _567(selection, event)]);
|
|
4991
|
-
}, [chart, onChartElementPointerDown, selectedChartElement]);
|
|
4992
|
-
const handleDoubleClick = _chunkCJBI5F6Vcjs.q.call(void 0, (event) => {
|
|
4993
|
-
const selection = resolveChartSelectionFromTarget(chart, event.target, selectedChartElement);
|
|
4994
|
-
if (!selection) {
|
|
4995
|
-
return;
|
|
4996
|
-
}
|
|
4997
|
-
if (resolveChartElementTarget(event.target)) {
|
|
4998
|
-
event.stopPropagation();
|
|
4999
|
-
}
|
|
5000
|
-
_optionalChain([onChartElementDoubleClick, 'optionalCall', _568 => _568(selection, event)]);
|
|
5001
|
-
}, [chart, onChartElementDoubleClick, selectedChartElement]);
|
|
5002
|
-
const renderSvgChart = (plot) => /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0,
|
|
4918
|
+
const { handlePointerDown, handleDoubleClick } = _chunkM55TBS4Xcjs.useChartEvents.call(void 0, {
|
|
4919
|
+
chart,
|
|
4920
|
+
onChartElementPointerDown,
|
|
4921
|
+
onChartElementDoubleClick,
|
|
4922
|
+
selectedChartElement
|
|
4923
|
+
});
|
|
4924
|
+
const renderSvgChart = (plot) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
5003
4925
|
"svg",
|
|
5004
4926
|
{
|
|
5005
4927
|
"aria-label": _nullishCoalesce(_nullishCoalesce(chart.title, () => ( chart.name)), () => ( "Chart")),
|
|
@@ -5009,7 +4931,7 @@ var MemoChartSvg = _chunkCJBI5F6Vcjs.N.call(void 0, function MemoChartSvg2({
|
|
|
5009
4931
|
style: { display: "block", fontFamily, height: "100%", pointerEvents: "auto", width: "100%" },
|
|
5010
4932
|
viewBox: `0 0 ${layout.width} ${layout.height}`,
|
|
5011
4933
|
children: [
|
|
5012
|
-
hideBackgroundRect ? null : /* @__PURE__ */
|
|
4934
|
+
hideBackgroundRect ? null : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: background, height: layout.height, stroke: borderColor, strokeWidth: 1, width: layout.width, x: 0, y: 0 }),
|
|
5013
4935
|
renderTitle(chart, layout, palette),
|
|
5014
4936
|
renderLegend(chart, layout, palette),
|
|
5015
4937
|
plot
|
|
@@ -5018,7 +4940,7 @@ var MemoChartSvg = _chunkCJBI5F6Vcjs.N.call(void 0, function MemoChartSvg2({
|
|
|
5018
4940
|
);
|
|
5019
4941
|
if (renderChartType === "Surface") {
|
|
5020
4942
|
const surfacePlot = renderSurfaceChart(chart, palette, layout, selectedChartElement);
|
|
5021
|
-
return /* @__PURE__ */
|
|
4943
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
5022
4944
|
SurfaceChartComposite,
|
|
5023
4945
|
{
|
|
5024
4946
|
loadingFallback: renderSvgChart(surfacePlot),
|
|
@@ -5030,7 +4952,7 @@ var MemoChartSvg = _chunkCJBI5F6Vcjs.N.call(void 0, function MemoChartSvg2({
|
|
|
5030
4952
|
layout,
|
|
5031
4953
|
onDoubleClick: handleDoubleClick,
|
|
5032
4954
|
onPointerDown: handlePointerDown,
|
|
5033
|
-
overlay: /* @__PURE__ */
|
|
4955
|
+
overlay: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
5034
4956
|
renderSurfaceHitOverlay(chart, layout, selectedChartElement),
|
|
5035
4957
|
renderSurfaceAxes(chart, layout),
|
|
5036
4958
|
renderTitle(chart, layout, palette),
|
|
@@ -5045,4 +4967,4 @@ var MemoChartSvg = _chunkCJBI5F6Vcjs.N.call(void 0, function MemoChartSvg2({
|
|
|
5045
4967
|
|
|
5046
4968
|
|
|
5047
4969
|
exports.MemoChartSvg = MemoChartSvg;
|
|
5048
|
-
//# sourceMappingURL=chart-renderer-
|
|
4970
|
+
//# sourceMappingURL=chart-renderer-3QDNTMRN.cjs.map
|