@extend-ai/react-xlsx 0.20.3 → 0.20.5

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.
Files changed (113) hide show
  1. package/dist/{browser-B73UAN6E.cjs → browser-6MKX73CJ.cjs} +8 -28
  2. package/dist/browser-6MKX73CJ.cjs.map +1 -0
  3. package/dist/{browser-KWIEUO2X.js → browser-KJ6EVWLG.js} +8 -27
  4. package/dist/{browser-KWIEUO2X.js.map → browser-KJ6EVWLG.js.map} +1 -1
  5. package/dist/{chart-renderer-XBF7EPUS.js → chart-renderer-2BLFC2BD.js} +94 -180
  6. package/dist/chart-renderer-2BLFC2BD.js.map +1 -0
  7. package/dist/{chart-renderer-W7XW24JI.cjs → chart-renderer-2K7XSPVG.cjs} +321 -407
  8. package/dist/chart-renderer-2K7XSPVG.cjs.map +1 -0
  9. package/dist/{chart-renderer-2EKXNHUD.cjs → chart-renderer-2UJZRUSN.cjs} +324 -410
  10. package/dist/chart-renderer-2UJZRUSN.cjs.map +1 -0
  11. package/dist/{chart-renderer-ZLJVPLGN.js → chart-renderer-IYKCQENY.js} +86 -172
  12. package/dist/chart-renderer-IYKCQENY.js.map +1 -0
  13. package/dist/{chunk-WGRRI25I.cjs → chunk-5PBSOOA7.cjs} +22 -9
  14. package/dist/chunk-5PBSOOA7.cjs.map +1 -0
  15. package/dist/{chunk-VG4JELEQ.js → chunk-BFSDKYQU.js} +30 -15
  16. package/dist/chunk-BFSDKYQU.js.map +1 -0
  17. package/dist/chunk-IN7OU5PF.js +32 -0
  18. package/dist/chunk-IN7OU5PF.js.map +1 -0
  19. package/dist/{chunk-HKMFMIKE.js → chunk-KSXNNWAY.js} +16 -7
  20. package/dist/chunk-KSXNNWAY.js.map +1 -0
  21. package/dist/chunk-LY4EWUKF.js +22 -0
  22. package/dist/chunk-LY4EWUKF.js.map +1 -0
  23. package/dist/chunk-N6MMMGLF.cjs +32 -0
  24. package/dist/chunk-N6MMMGLF.cjs.map +1 -0
  25. package/dist/{chunk-HEEFCVWS.js → chunk-R5ERJ3BT.js} +404 -149
  26. package/dist/chunk-R5ERJ3BT.js.map +1 -0
  27. package/dist/chunk-RN27VSTN.cjs +108 -0
  28. package/dist/chunk-RN27VSTN.cjs.map +1 -0
  29. package/dist/{chunk-XISBYOD5.cjs → chunk-YPTGD7GK.cjs} +1172 -917
  30. package/dist/chunk-YPTGD7GK.cjs.map +1 -0
  31. package/dist/chunk-ZAUUKER4.cjs +22 -0
  32. package/dist/chunk-ZAUUKER4.cjs.map +1 -0
  33. package/dist/full-C7H4X2EX.cjs +212 -0
  34. package/dist/full-C7H4X2EX.cjs.map +1 -0
  35. package/dist/full-YT626I57.js +209 -0
  36. package/dist/full-YT626I57.js.map +1 -0
  37. package/dist/index.cjs +838 -620
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +57 -1
  40. package/dist/index.d.ts +57 -1
  41. package/dist/index.js +350 -132
  42. package/dist/index.js.map +1 -1
  43. package/dist/{internal-BJsg5os3.d.cts → internal-Cks9H21d.d.cts} +56 -1
  44. package/dist/{internal-BJsg5os3.d.ts → internal-Cks9H21d.d.ts} +56 -1
  45. package/dist/internal.cjs +4 -3
  46. package/dist/internal.cjs.map +1 -1
  47. package/dist/internal.d.cts +1 -1
  48. package/dist/internal.d.ts +1 -1
  49. package/dist/internal.js +3 -2
  50. package/dist/office_charts_bg.wasm +0 -0
  51. package/dist/office_charts_full_bg.wasm +0 -0
  52. package/dist/payload-7QT6NY6S.js +6 -0
  53. package/dist/payload-7QT6NY6S.js.map +1 -0
  54. package/dist/payload-BZGBW73P.cjs +8 -0
  55. package/dist/payload-BZGBW73P.cjs.map +1 -0
  56. package/dist/payload-H55PON66.js +6 -0
  57. package/dist/payload-H55PON66.js.map +1 -0
  58. package/dist/payload-RNKEYTQ4.cjs +8 -0
  59. package/dist/payload-RNKEYTQ4.cjs.map +1 -0
  60. package/dist/{shared-chart-DVC5S2P6.cjs → shared-chart-GCUFIUQL.cjs} +49 -20
  61. package/dist/shared-chart-GCUFIUQL.cjs.map +1 -0
  62. package/dist/{shared-chart-3STFRVWT.js → shared-chart-JV4MGKXX.js} +50 -20
  63. package/dist/shared-chart-JV4MGKXX.js.map +1 -0
  64. package/dist/{shared-chart-MFQSQG4K.cjs → shared-chart-OUC7EHFC.cjs} +49 -19
  65. package/dist/shared-chart-OUC7EHFC.cjs.map +1 -0
  66. package/dist/{shared-chart-BFQNYOIQ.js → shared-chart-PY47ED4I.js} +49 -20
  67. package/dist/shared-chart-PY47ED4I.js.map +1 -0
  68. package/dist/{surface-regl-R2N54JT2.js → surface-webgl-2ZZ6JQR2.js} +87 -151
  69. package/dist/surface-webgl-2ZZ6JQR2.js.map +1 -0
  70. package/dist/{surface-regl-BBJ6OIKK.cjs → surface-webgl-3HS6VBCK.cjs} +88 -152
  71. package/dist/surface-webgl-3HS6VBCK.cjs.map +1 -0
  72. package/dist/{surface-regl-7CDGGVDG.js → surface-webgl-4DQXDDXU.js} +87 -151
  73. package/dist/surface-webgl-4DQXDDXU.js.map +1 -0
  74. package/dist/{surface-regl-SUJ2TFZA.cjs → surface-webgl-SVYD564V.cjs} +88 -152
  75. package/dist/surface-webgl-SVYD564V.cjs.map +1 -0
  76. package/dist/vanilla.cjs +4 -3
  77. package/dist/vanilla.cjs.map +1 -1
  78. package/dist/vanilla.d.cts +2 -2
  79. package/dist/vanilla.d.ts +2 -2
  80. package/dist/vanilla.js +3 -2
  81. package/dist/xlsx-worker.js +298 -92
  82. package/dist/xlsx-worker.js.map +1 -1
  83. package/package.json +6 -15
  84. package/dist/browser-B73UAN6E.cjs.map +0 -1
  85. package/dist/chart-renderer-2EKXNHUD.cjs.map +0 -1
  86. package/dist/chart-renderer-W7XW24JI.cjs.map +0 -1
  87. package/dist/chart-renderer-XBF7EPUS.js.map +0 -1
  88. package/dist/chart-renderer-ZLJVPLGN.js.map +0 -1
  89. package/dist/chunk-6IGWCJU5.cjs +0 -90
  90. package/dist/chunk-6IGWCJU5.cjs.map +0 -1
  91. package/dist/chunk-HEEFCVWS.js.map +0 -1
  92. package/dist/chunk-HKMFMIKE.js.map +0 -1
  93. package/dist/chunk-VG4JELEQ.js.map +0 -1
  94. package/dist/chunk-WGRRI25I.cjs.map +0 -1
  95. package/dist/chunk-XISBYOD5.cjs.map +0 -1
  96. package/dist/payload-JBPE7GEG.cjs +0 -8
  97. package/dist/payload-JBPE7GEG.cjs.map +0 -1
  98. package/dist/payload-KYNCVJT5.js +0 -6
  99. package/dist/payload-KYNCVJT5.js.map +0 -1
  100. package/dist/region-map-geography-24TXETDP.cjs +0 -184
  101. package/dist/region-map-geography-24TXETDP.cjs.map +0 -1
  102. package/dist/region-map-geography-OR6DHAF7.js +0 -182
  103. package/dist/region-map-geography-OR6DHAF7.js.map +0 -1
  104. package/dist/shared-chart-3STFRVWT.js.map +0 -1
  105. package/dist/shared-chart-BFQNYOIQ.js.map +0 -1
  106. package/dist/shared-chart-DVC5S2P6.cjs.map +0 -1
  107. package/dist/shared-chart-MFQSQG4K.cjs.map +0 -1
  108. package/dist/surface-regl-7CDGGVDG.js.map +0 -1
  109. package/dist/surface-regl-BBJ6OIKK.cjs.map +0 -1
  110. package/dist/surface-regl-R2N54JT2.js.map +0 -1
  111. package/dist/surface-regl-SUJ2TFZA.cjs.map +0 -1
  112. package/dist/world-atlas-LICENSE.txt +0 -13
  113. /package/dist/{us-atlas-LICENSE.txt → rust-office-charts-MAP-DATA-LICENSE.txt} +0 -0
@@ -11,8 +11,7 @@ var _chunkO3V2MCOCcjs = require('./chunk-O3V2MCOC.cjs');
11
11
 
12
12
 
13
13
 
14
-
15
- var _chunk6IGWCJU5cjs = require('./chunk-6IGWCJU5.cjs');
14
+ var _chunkRN27VSTNcjs = require('./chunk-RN27VSTN.cjs');
16
15
 
17
16
 
18
17
 
@@ -33,7 +32,36 @@ require('./chunk-AD4CGQN2.cjs');
33
32
 
34
33
  // src/chart-renderer.tsx
35
34
  var _d3hierarchy = require('d3-hierarchy');
36
- var _d3scale = require('d3-scale');
35
+
36
+ // src/chart-scales.ts
37
+ function linearScale([low, high], [start, end]) {
38
+ if (high < low) return linearScale([high, low], [end, start]);
39
+ const span = high - low;
40
+ return (value) => {
41
+ const t = span === 0 ? 0.5 : (value - low) / span;
42
+ return start * (1 - t) + end * t;
43
+ };
44
+ }
45
+ function bandScale(domain, [from, to], inner, outer) {
46
+ const indices = /* @__PURE__ */ new Map();
47
+ for (const value of domain) {
48
+ if (!indices.has(value)) indices.set(value, indices.size);
49
+ }
50
+ const count = indices.size;
51
+ const width = Math.abs(to - from);
52
+ const step = width / Math.max(1, count - inner + 2 * outer);
53
+ const origin = Math.min(from, to) + (width - step * (count - inner)) / 2;
54
+ const locate = (value) => {
55
+ const index = indices.get(value);
56
+ return index == null ? void 0 : origin + step * (to < from ? count - 1 - index : index);
57
+ };
58
+ return Object.assign(locate, { bandwidth: step * (1 - inner) });
59
+ }
60
+ function pointScale(domain, range) {
61
+ return bandScale(domain, range, 1, 0);
62
+ }
63
+
64
+ // src/chart-renderer.tsx
37
65
 
38
66
 
39
67
 
@@ -43,15 +71,11 @@ var _d3scale = require('d3-scale');
43
71
 
44
72
 
45
73
  var _d3shape = require('d3-shape');
46
- function RegionMapPlot({ chart, palette, layout, selectedChartElement }) {
47
- const resources = _chunk6IGWCJU5cjs.useChartModule.call(void 0, _chunk6IGWCJU5cjs.regionMapResources);
48
- return resources ? renderRegionMapChart(chart, palette, layout, selectedChartElement, resources) : null;
49
- }
50
74
  function SurfaceChartComposite({
51
75
  loadingFallback,
52
76
  ...props
53
77
  }) {
54
- const renderer = _chunk6IGWCJU5cjs.useChartModule.call(void 0, _chunk6IGWCJU5cjs.surfaceRenderer);
78
+ const renderer = _chunkRN27VSTNcjs.useChartModule.call(void 0, _chunkRN27VSTNcjs.surfaceRenderer);
55
79
  return renderer ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, renderer.MemoSurfaceChartComposite, { ...props }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: loadingFallback });
56
80
  }
57
81
  function chartElementDataProps(seriesIndex, pointIndex, options) {
@@ -225,9 +249,6 @@ function isHistogramLikeSeries(series) {
225
249
  function isHistogramLikeChart(chart) {
226
250
  return chart.series.some((series) => isHistogramLikeSeries(series));
227
251
  }
228
- function resolveRegionMapBaseColor(chart, seriesIndex) {
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)));
230
- }
231
252
  function resolveRegionMapDataColor(chart, seriesIndex) {
232
253
  const pointColor = normalizeRendererHexColor(chartPointColor(chart, 0, seriesIndex));
233
254
  if (pointColor) {
@@ -243,22 +264,18 @@ function resolveRegionMapDataColor(chart, seriesIndex) {
243
264
  return paletteColor;
244
265
  }
245
266
  }
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"));
267
+ return _nullishCoalesce(normalizeRendererHexColor(_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])))), () => ( "#4f81bd"));
247
268
  }
248
269
  function resolveRegionMapValueColors(series) {
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)) : [];
270
+ const raw = _optionalChain([series, 'optionalAccess', _39 => _39.raw]) && typeof series.raw === "object" ? series.raw : null;
271
+ const colors = Array.isArray(_optionalChain([raw, 'optionalAccess', _40 => _40.valueColors])) ? raw.valueColors.map((value) => normalizeRendererHexColor(value)).filter((value) => Boolean(value)) : [];
251
272
  return colors.length >= 2 ? colors : null;
252
273
  }
253
274
  function resolveRegionMapColorStrings(series) {
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() : "") : [];
275
+ const raw = _optionalChain([series, 'optionalAccess', _41 => _41.raw]) && typeof series.raw === "object" ? series.raw : null;
276
+ const values = Array.isArray(_optionalChain([raw, 'optionalAccess', _42 => _42.chartExColorStrings])) ? raw.chartExColorStrings.map((value) => typeof value === "string" ? value.trim() : "") : [];
256
277
  return values.some((value) => value.length > 0) ? values : null;
257
278
  }
258
- function resolveRegionMapLayoutProperties(series) {
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;
261
- }
262
279
  function resolveRegionMapValueColorFromStops(stops, ratio) {
263
280
  if (stops.length === 0) {
264
281
  return "#4f81bd";
@@ -285,10 +302,6 @@ function resolveRegionMapValueColor(chart, seriesIndex, ratio) {
285
302
  darkenColor(baseColor, 0.08)
286
303
  ], ratio);
287
304
  }
288
- function resolveRegionMapNoDataColor(chart, seriesIndex) {
289
- const baseColor = resolveRegionMapBaseColor(chart, seriesIndex);
290
- return _nullishCoalesce(normalizeRendererHexColor(baseColor), () => ( chartSeriesColor(chart, seriesIndex)));
291
- }
292
305
  function buildRegionMapLegendItems(chart) {
293
306
  const primarySeriesIndex = Math.max(0, chart.series.findIndex((series) => series.hidden !== true));
294
307
  const categoricalValues = resolveRegionMapColorStrings(_nullishCoalesce(chart.series[primarySeriesIndex], () => ( null)));
@@ -299,7 +312,7 @@ function buildRegionMapLegendItems(chart) {
299
312
  label: value
300
313
  }));
301
314
  }
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);
315
+ const values = (_nullishCoalesce(_optionalChain([chart, 'access', _43 => _43.series, 'access', _44 => _44[primarySeriesIndex], 'optionalAccess', _45 => _45.values]), () => ( []))).map((value) => safeNumber(value)).filter((value) => value != null);
303
316
  if (values.length === 0) {
304
317
  return [];
305
318
  }
@@ -317,12 +330,12 @@ function normalizeBuiltinPieStyleId(styleId) {
317
330
  return styleId >= 100 ? styleId - 100 : styleId;
318
331
  }
319
332
  function getBuiltinPiePalette(chart, seriesIndex) {
320
- if (_optionalChain([chart, 'access', _56 => _56.raw, 'optionalAccess', _57 => _57.builtinThemeColors])) return null;
333
+ if (_optionalChain([chart, 'access', _46 => _46.raw, 'optionalAccess', _47 => _47.builtinThemeColors])) return null;
321
334
  const normalized = normalizeBuiltinPieStyleId(chart.chartStyleId);
322
335
  if (normalized !== 32) {
323
336
  return null;
324
337
  }
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));
338
+ const baseColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _48 => _48.series, 'access', _49 => _49[seriesIndex], 'optionalAccess', _50 => _50.color]), () => ( _optionalChain([chart, 'access', _51 => _51.series, 'access', _52 => _52[seriesIndex], 'optionalAccess', _53 => _53.lineColor]))), () => ( _optionalChain([chart, 'access', _54 => _54.chartColorPalette, 'optionalAccess', _55 => _55[0]]))), () => ( null));
326
339
  if (!baseColor) {
327
340
  return null;
328
341
  }
@@ -336,8 +349,8 @@ function getBuiltinPiePalette(chart, seriesIndex) {
336
349
  ];
337
350
  }
338
351
  function resolvePiePointColor(chart, pointIndex, seriesIndex = 0) {
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])) {
352
+ const pointStyle = _optionalChain([chart, 'access', _56 => _56.series, 'access', _57 => _57[seriesIndex], 'optionalAccess', _58 => _58.dataPointStyles, 'optionalAccess', _59 => _59.find, 'call', _60 => _60((entry) => entry.index === pointIndex)]);
353
+ if (_optionalChain([pointStyle, 'optionalAccess', _61 => _61.color])) {
341
354
  return pointStyle.color;
342
355
  }
343
356
  const builtinPalette = getBuiltinPiePalette(chart, seriesIndex);
@@ -371,8 +384,8 @@ function chartSeriesBarColors(chart, seriesIndex, value, negativeFillMode) {
371
384
  const series = chart.series[seriesIndex];
372
385
  const defaultFill = chartSeriesColor(chart, seriesIndex);
373
386
  const defaultStroke = chartSeriesStrokeColor(chart, seriesIndex);
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])) {
387
+ const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess', _62 => _62.lineWidthPx]) === "number" && Number.isFinite(series.lineWidthPx) ? Math.max(0.8, Math.min(4, series.lineWidthPx)) : 1;
388
+ if (value < 0 && _optionalChain([series, 'optionalAccess', _63 => _63.invertIfNegative])) {
376
389
  const resolvedNegativeFill = negativeFillMode === "none" ? "none" : _nullishCoalesce(_nullishCoalesce(series.negativeColor, () => ( (negativeFillMode === "chartArea" ? chart.chartAreaFillColor : void 0))), () => ( defaultFill));
377
390
  return {
378
391
  fill: resolvedNegativeFill,
@@ -462,13 +475,13 @@ function estimateReferencePointCount(formula) {
462
475
  return Math.abs(endRow - startRow) + 1;
463
476
  }
464
477
  function getCategoryLabels(chart) {
465
- const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access', _74 => _74.series, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.categories]), () => ( []));
478
+ const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access', _64 => _64.series, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.categories]), () => ( []));
466
479
  const includeReferenceCategoryCount = chart.plotVisibleOnly !== true;
467
480
  const referenceCategoryCount = includeReferenceCategoryCount ? Math.max(
468
481
  0,
469
482
  ...chart.series.map((series) => Math.max(
470
- estimateReferencePointCount(_optionalChain([series, 'access', _77 => _77.categoriesRef, 'optionalAccess', _78 => _78.formula])),
471
- estimateReferencePointCount(_optionalChain([series, 'access', _79 => _79.valuesRef, 'optionalAccess', _80 => _80.formula]))
483
+ estimateReferencePointCount(_optionalChain([series, 'access', _67 => _67.categoriesRef, 'optionalAccess', _68 => _68.formula])),
484
+ estimateReferencePointCount(_optionalChain([series, 'access', _69 => _69.valuesRef, 'optionalAccess', _70 => _70.formula]))
472
485
  ))
473
486
  ) : 0;
474
487
  const categoryCount = Math.max(
@@ -592,7 +605,7 @@ function coerceLooseNumber(value) {
592
605
  }
593
606
  function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)) {
594
607
  const categories = getCategoryLabels(chart);
595
- const values = _nullishCoalesce(_optionalChain([chart, 'access', _81 => _81.series, 'access', _82 => _82[seriesIndex], 'optionalAccess', _83 => _83.values]), () => ( []));
608
+ const values = _nullishCoalesce(_optionalChain([chart, 'access', _71 => _71.series, 'access', _72 => _72[seriesIndex], 'optionalAccess', _73 => _73.values]), () => ( []));
596
609
  return values.map((rawValue, index) => ({
597
610
  color: resolvePiePointColor(chart, index, seriesIndex),
598
611
  index,
@@ -602,9 +615,9 @@ function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)
602
615
  }
603
616
  function resolveChartStageSubtotal(series) {
604
617
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
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;
618
+ const layoutProperties = _optionalChain([raw, 'optionalAccess', _74 => _74.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
619
+ const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess', _75 => _75.subtotals])) ? layoutProperties.subtotals : [];
620
+ return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess', _76 => _76.aggregation]) === true;
608
621
  }
609
622
  function buildChartStages(chart) {
610
623
  if (chart.chartType === "Funnel" || chart.chartType === "Waterfall") {
@@ -632,7 +645,7 @@ function buildChartStages(chart) {
632
645
  if (!Number.isFinite(value)) {
633
646
  return null;
634
647
  }
635
- const formula = typeof _optionalChain([series, 'access', _87 => _87.valuesRef, 'optionalAccess', _88 => _88.formula]) === "string" ? series.valuesRef.formula : "";
648
+ const formula = typeof _optionalChain([series, 'access', _77 => _77.valuesRef, 'optionalAccess', _78 => _78.formula]) === "string" ? series.valuesRef.formula : "";
636
649
  const label = _nullishCoalesce(series.name, () => ( (formula.length > 0 ? formula.replace(/^.*!/, "").replace(/\$/g, "") : `Series ${index + 1}`)));
637
650
  return {
638
651
  color: chartSeriesColor(chart, typeof series.formatIdx === "number" ? series.formatIdx : index),
@@ -651,7 +664,7 @@ function buildHierarchyData(chart) {
651
664
  const topLevelIndexByName = /* @__PURE__ */ new Map();
652
665
  const primaryHierarchySeries = _nullishCoalesce(chart.series.find((series) => {
653
666
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
654
- return Array.isArray(_optionalChain([raw, 'optionalAccess', _89 => _89.chartExHierarchyCategories]));
667
+ return Array.isArray(_optionalChain([raw, 'optionalAccess', _79 => _79.chartExHierarchyCategories]));
655
668
  }), () => ( null));
656
669
  const primaryHierarchyPaths = (() => {
657
670
  if (!primaryHierarchySeries) {
@@ -662,7 +675,7 @@ function buildHierarchyData(chart) {
662
675
  })();
663
676
  const rowCount = primaryHierarchyPaths ? primaryHierarchyPaths.length : Math.max(0, ...chart.series.map((series) => series.values.length));
664
677
  for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
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)));
678
+ const path = _nullishCoalesce(_optionalChain([primaryHierarchyPaths, 'optionalAccess', _80 => _80[rowIndex]]), () => ( chart.series.map((series) => normalizeCategoryLabel(_nullishCoalesce(series.categories[rowIndex], () => ( series.values[rowIndex])))).filter((value) => value.length > 0)));
666
679
  if (path.length === 0) {
667
680
  continue;
668
681
  }
@@ -685,25 +698,25 @@ function buildHierarchyData(chart) {
685
698
  current = next;
686
699
  });
687
700
  const valueSource = _nullishCoalesce(_nullishCoalesce(primaryHierarchySeries, () => ( chart.series[chart.series.length - 1])), () => ( null));
688
- current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess', _91 => _91.values, 'access', _92 => _92[rowIndex]])), () => ( 1)));
701
+ current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess', _81 => _81.values, 'access', _82 => _82[rowIndex]])), () => ( 1)));
689
702
  }
690
703
  return rootChildren.length > 0 ? root : null;
691
704
  }
692
705
  function resolveBoxWhiskerQuartileMethod(series) {
693
706
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
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";
707
+ const layoutProperties = _optionalChain([raw, 'optionalAccess', _83 => _83.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
708
+ const statistics = _optionalChain([layoutProperties, 'optionalAccess', _84 => _84.statistics]) && typeof layoutProperties.statistics === "object" ? layoutProperties.statistics : null;
709
+ return _optionalChain([statistics, 'optionalAccess', _85 => _85.quartileMethod]) === "inclusive" ? "inclusive" : "exclusive";
697
710
  }
698
711
  function resolveBoxWhiskerVisibility(series) {
699
712
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
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;
713
+ const layoutProperties = _optionalChain([raw, 'optionalAccess', _86 => _86.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
714
+ const visibility = _optionalChain([layoutProperties, 'optionalAccess', _87 => _87.visibility]) && typeof layoutProperties.visibility === "object" ? layoutProperties.visibility : null;
702
715
  return {
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
716
+ meanLine: _optionalChain([visibility, 'optionalAccess', _88 => _88.meanLine]) === true,
717
+ meanMarker: _optionalChain([visibility, 'optionalAccess', _89 => _89.meanMarker]) !== false,
718
+ nonoutliers: _optionalChain([visibility, 'optionalAccess', _90 => _90.nonoutliers]) === true,
719
+ outliers: _optionalChain([visibility, 'optionalAccess', _91 => _91.outliers]) !== false
707
720
  };
708
721
  }
709
722
  function computePercentile(sortedValues, percentile, method) {
@@ -763,7 +776,7 @@ function computeBoxWhiskerStats(series) {
763
776
  function resolveHierarchyNodeColor(chart, node) {
764
777
  const lineage = node.ancestors().reverse();
765
778
  const topLevel = lineage[1];
766
- const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _102 => _102.data, 'access', _103 => _103.colorIndex]), () => ( 0));
779
+ const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _92 => _92.data, 'access', _93 => _93.colorIndex]), () => ( 0));
767
780
  const baseColor = chartSeriesColor(chart, baseIndex);
768
781
  const depth = Math.max(0, node.depth - 1);
769
782
  return depth === 0 ? baseColor : lightenColor(baseColor, clamp(depth * 0.16, 0, 0.5));
@@ -771,7 +784,7 @@ function resolveHierarchyNodeColor(chart, node) {
771
784
  function resolveTreemapNodeColor(chart, node) {
772
785
  const lineage = node.ancestors().reverse();
773
786
  const topLevel = lineage[1];
774
- return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _104 => _104.data, 'access', _105 => _105.colorIndex]), () => ( 0)));
787
+ return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _94 => _94.data, 'access', _95 => _95.colorIndex]), () => ( 0)));
775
788
  }
776
789
  function excelTreemapTile(node, x0, y0, x1, y1) {
777
790
  if (!node.children || node.children.length === 0) {
@@ -786,12 +799,12 @@ function excelTreemapTile(node, x0, y0, x1, y1) {
786
799
  node.children.forEach((child) => excelTreemapTile(child, child.x0, child.y0, child.x1, child.y1));
787
800
  }
788
801
  function resolveSurfaceBaseColor(chart, palette) {
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));
802
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _96 => _96.chartColorPalette, 'optionalAccess', _97 => _97[0]]), () => ( _optionalChain([chart, 'access', _98 => _98.series, 'access', _99 => _99[0], 'optionalAccess', _100 => _100.color]))), () => ( _optionalChain([chart, 'access', _101 => _101.series, 'access', _102 => _102[0], 'optionalAccess', _103 => _103.lineColor]))), () => ( chart.axisLineColor)), () => ( chart.textColor)), () => ( palette.text));
790
803
  }
791
804
  function resolveExplicitSurfaceSeriesColor(chart, kind) {
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])));
805
+ const shape = _optionalChain([chart, 'access', _104 => _104.series, 'access', _105 => _105[0], 'optionalAccess', _106 => _106.shapeProperties]);
806
+ if (kind === "fill" ? _optionalChain([shape, 'optionalAccess', _107 => _107.xmlFillHidden]) === true : _optionalChain([shape, 'optionalAccess', _108 => _108.xmlLineHidden]) === true) return "transparent";
807
+ const color = kind === "fill" ? _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _109 => _109.xmlFillColor]), () => ( _optionalChain([shape, 'optionalAccess', _110 => _110.solidFillHex]))) : _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _111 => _111.xmlLineColor]), () => ( _optionalChain([shape, 'optionalAccess', _112 => _112.lineColorHex])));
795
808
  return normalizeRendererHexColor(color);
796
809
  }
797
810
  function getSurfaceColorStops(chart, palette) {
@@ -806,7 +819,7 @@ function resolveSurfaceBandPaletteColor(chart, palette, domain, value) {
806
819
  if (explicitColor) return explicitColor;
807
820
  const explicitFill = resolveExplicitSurfaceSeriesColor(chart, "fill");
808
821
  if (explicitFill) return explicitFill;
809
- const themeColors = _optionalChain([chart, 'access', _123 => _123.raw, 'optionalAccess', _124 => _124.builtinThemeColors]);
822
+ const themeColors = _optionalChain([chart, 'access', _113 => _113.raw, 'optionalAccess', _114 => _114.builtinThemeColors]);
810
823
  const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
811
824
  const builtinColor = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, bandIndex % paletteCount, paletteCount), themeColors) : void 0;
812
825
  if (builtinColor) return builtinColor;
@@ -821,8 +834,8 @@ function getSurfaceDomain(chart) {
821
834
  if (numericValues.length === 0) {
822
835
  return null;
823
836
  }
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;
837
+ const explicitMin = typeof _optionalChain([chart, 'access', _115 => _115.valueAxis, 'optionalAccess', _116 => _116.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? chart.valueAxis.min : null;
838
+ const explicitMax = typeof _optionalChain([chart, 'access', _117 => _117.valueAxis, 'optionalAccess', _118 => _118.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? chart.valueAxis.max : null;
826
839
  const rawMin = Math.min(...numericValues);
827
840
  const rawMax = Math.max(...numericValues);
828
841
  const spanBase = Math.max(1e-6, rawMax - Math.min(0, rawMin));
@@ -830,7 +843,7 @@ function getSurfaceDomain(chart) {
830
843
  const magnitude = 10 ** Math.floor(Math.log10(Math.max(roughStep, 1e-6)));
831
844
  const normalized = roughStep / magnitude;
832
845
  const niceNormalized = normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10;
833
- const step = typeof _optionalChain([chart, 'access', _129 => _129.valueAxis, 'optionalAccess', _130 => _130.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : niceNormalized * magnitude;
846
+ const step = typeof _optionalChain([chart, 'access', _119 => _119.valueAxis, 'optionalAccess', _120 => _120.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : niceNormalized * magnitude;
834
847
  const minValue = _nullishCoalesce(explicitMin, () => ( (rawMin >= 0 ? 0 : Math.floor(rawMin / step) * step)));
835
848
  const maxValue = _nullishCoalesce(explicitMax, () => ( Math.ceil(rawMax / step) * step));
836
849
  const safeMax = maxValue <= minValue ? minValue + step : maxValue;
@@ -860,14 +873,14 @@ function resolveSurfaceBandIndex(domain, value) {
860
873
  return Math.max(0, ticks.length - 2);
861
874
  }
862
875
  function resolveSurfaceBandFormatColor(chart, key, index) {
863
- const colors = _optionalChain([chart, 'access', _131 => _131.raw, 'optionalAccess', _132 => _132[key]]);
876
+ const colors = _optionalChain([chart, 'access', _121 => _121.raw, 'optionalAccess', _122 => _122[key]]);
864
877
  if (!colors || typeof colors !== "object" || !Object.prototype.hasOwnProperty.call(colors, index)) return null;
865
878
  const color = colors[index];
866
879
  return typeof color === "string" && color.length > 0 ? color : null;
867
880
  }
868
881
  function resolveSurfaceWireframeColor(chart, palette, domain, value) {
869
882
  const bandIndex = resolveSurfaceBandIndex(domain, value);
870
- const themeColors = _optionalChain([chart, 'access', _133 => _133.raw, 'optionalAccess', _134 => _134.builtinThemeColors]);
883
+ const themeColors = _optionalChain([chart, 'access', _123 => _123.raw, 'optionalAccess', _124 => _124.builtinThemeColors]);
871
884
  const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
872
885
  const builtinLine = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartSurfaceLine.call(void 0, chart.chartStyleId, bandIndex, paletteCount), themeColors) : void 0;
873
886
  return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(resolveSurfaceBandFormatColor(chart, "bandFormatLineColors", bandIndex), () => ( resolveExplicitSurfaceSeriesColor(chart, "line"))), () => ( builtinLine)), () => ( resolveSurfaceBandPaletteColor(chart, palette, domain, value)));
@@ -877,7 +890,7 @@ function resolveSurfacePlotRect(chart, layout) {
877
890
  return layout.plot;
878
891
  }
879
892
  const columnCount = Math.max(1, getCategoryLabels(chart).length);
880
- const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access', _135 => _135.view3d, 'optionalAccess', _136 => _136.depthPercent]), () => ( 100))) / 100);
893
+ const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access', _125 => _125.view3d, 'optionalAccess', _126 => _126.depthPercent]), () => ( 100))) / 100);
881
894
  const targetAspect = columnCount / Math.max(1, chart.series.length) / depthScale;
882
895
  let width = layout.plot.width;
883
896
  let height = layout.plot.height;
@@ -921,7 +934,7 @@ function isContourSurfaceChart(chart) {
921
934
  return chart.chartType === "Surface" && chart.is3d !== true;
922
935
  }
923
936
  function renderSurfaceAxes(chart, layout) {
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])) {
937
+ if (_optionalChain([chart, 'access', _127 => _127.categoryAxis, 'optionalAccess', _128 => _128.delete]) && _optionalChain([chart, 'access', _129 => _129.seriesAxis, 'optionalAccess', _130 => _130.delete]) && _optionalChain([chart, 'access', _131 => _131.valueAxis, 'optionalAccess', _132 => _132.delete])) {
925
938
  return null;
926
939
  }
927
940
  const plot = resolveSurfacePlotRect(chart, layout);
@@ -931,7 +944,7 @@ function renderSurfaceAxes(chart, layout) {
931
944
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( "#888888"));
932
945
  const rowCount = Math.max(1, seriesLabels.length);
933
946
  const columnCount = Math.max(1, categories.length);
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));
947
+ const columnPositions = categories.map((_, index) => plot.left + (isContourSurfaceChart(chart) && _optionalChain([chart, 'access', _133 => _133.valueAxis, 'optionalAccess', _134 => _134.crossBetween]) !== "midCat" ? (index + 0.5) / columnCount * plot.width : columnCount <= 1 ? plot.width / 2 : index / (columnCount - 1) * plot.width));
935
948
  const rowPositions = seriesLabels.map((_, index) => plot.top + plot.height - (rowCount <= 1 ? plot.height / 2 : index / (rowCount - 1) * plot.height));
936
949
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
937
950
  isContourSurfaceChart(chart) && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
@@ -946,7 +959,7 @@ function renderSurfaceAxes(chart, layout) {
946
959
  y: plot.top
947
960
  }
948
961
  ),
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,
962
+ _optionalChain([chart, 'access', _135 => _135.categoryAxis, 'optionalAccess', _136 => _136.delete]) !== true && _optionalChain([chart, 'access', _137 => _137.categoryAxis, 'optionalAccess', _138 => _138.labelPosition]) !== "none" && categories.map((label, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
950
963
  "text",
951
964
  {
952
965
  fill: labelColor,
@@ -958,7 +971,7 @@ function renderSurfaceAxes(chart, layout) {
958
971
  },
959
972
  `surface-x-label-${index}`
960
973
  )),
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,
974
+ _optionalChain([chart, 'access', _139 => _139.seriesAxis, 'optionalAccess', _140 => _140.delete]) !== true && _optionalChain([chart, 'access', _141 => _141.seriesAxis, 'optionalAccess', _142 => _142.labelPosition]) !== "none" && seriesLabels.map((label, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
962
975
  "text",
963
976
  {
964
977
  fill: labelColor,
@@ -1013,7 +1026,7 @@ function getLegendItems(chart, chartType, palette) {
1013
1026
  }
1014
1027
  if (chartType === "Sunburst" || chartType === "Treemap") {
1015
1028
  const hierarchyData = buildHierarchyData(chart);
1016
- if (!_optionalChain([hierarchyData, 'optionalAccess', _153 => _153.children])) {
1029
+ if (!_optionalChain([hierarchyData, 'optionalAccess', _143 => _143.children])) {
1017
1030
  return [];
1018
1031
  }
1019
1032
  return hierarchyData.children.map((child, index) => ({
@@ -1024,7 +1037,7 @@ function getLegendItems(chart, chartType, palette) {
1024
1037
  if (chartType === "Pie" || chartType === "Pie3D" || chartType === "PieExploded" || chartType === "Doughnut" || chartType === "BarOfPie") {
1025
1038
  if (chartType === "BarOfPie") {
1026
1039
  const categories = getCategoryLabels(chart);
1027
- const values = _nullishCoalesce(_optionalChain([chart, 'access', _154 => _154.series, 'access', _155 => _155[0], 'optionalAccess', _156 => _156.values]), () => ( []));
1040
+ const values = _nullishCoalesce(_optionalChain([chart, 'access', _144 => _144.series, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.values]), () => ( []));
1028
1041
  return categories.map((label, index) => ({
1029
1042
  color: chartPointColor(chart, index),
1030
1043
  label: normalizeCategoryLabel(label),
@@ -1049,8 +1062,8 @@ function buildLayout(chart, rect, legendItems) {
1049
1062
  const width = Math.max(80, Math.round(rect.width));
1050
1063
  const height = Math.max(60, Math.round(rect.height));
1051
1064
  const isSurfaceChart = chart.chartType === "Surface" || chart.raw && typeof chart.raw === "object" && typeof chart.raw.xmlChartType === "string" && String(chart.raw.xmlChartType).includes("surface");
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]));
1065
+ const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access', _147 => _147.raw, 'optionalAccess', _148 => _148.titleOverlay]) === true) ? isSurfaceChart ? 30 : 24 : 8;
1066
+ const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access', _149 => _149.legend, 'optionalAccess', _150 => _150.position]));
1054
1067
  const legendVertical = legendItems.length > 0 && (legendPosition === "right" || legendPosition === "left");
1055
1068
  const compactWidth = width <= 280;
1056
1069
  const compactHeight = height <= 200;
@@ -1060,10 +1073,10 @@ function buildLayout(chart, rect, legendItems) {
1060
1073
  const horizontalMapGradient = chart.chartType === "RegionMap" && legendItems.length > 0 && !resolveRegionMapColorStrings(primarySeries) && (layoutLegendPosition === "top" || layoutLegendPosition === "bottom");
1061
1074
  const horizontalLegendHeight = horizontalMapGradient ? Math.min(48, Math.max(24, height - titleHeight - 8)) : 24;
1062
1075
  const legendWidth = isSurfaceChart ? Math.max(32, ...legendItems.map((item) => 20 + item.label.length * 5.4)) : 98;
1063
- const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access', _161 => _161.valueAxis, 'optionalAccess', _162 => _162.delete]) ? 12 : 42) + (layoutLegendPosition === "left" ? legendWidth : 0);
1076
+ const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access', _151 => _151.valueAxis, 'optionalAccess', _152 => _152.delete]) ? 12 : 42) + (layoutLegendPosition === "left" ? legendWidth : 0);
1064
1077
  const plotRight = 16 + (layoutLegendPosition === "right" ? legendWidth : 0);
1065
1078
  const plotTop = titleHeight + (layoutLegendPosition === "top" ? horizontalLegendHeight : 0);
1066
- const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access', _163 => _163.categoryAxis, 'optionalAccess', _164 => _164.delete]) ? 8 : 28) + (layoutLegendPosition === "bottom" ? horizontalLegendHeight : 0);
1079
+ const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access', _153 => _153.categoryAxis, 'optionalAccess', _154 => _154.delete]) ? 8 : 28) + (layoutLegendPosition === "bottom" ? horizontalLegendHeight : 0);
1067
1080
  const plotWidth = Math.max(horizontalMapGradient ? 1 : 40, width - plotLeft - plotRight);
1068
1081
  return {
1069
1082
  height,
@@ -1136,30 +1149,30 @@ function resolveNumericAxisDomain(minValue, maxValue, majorUnit, includeZero = f
1136
1149
  };
1137
1150
  }
1138
1151
  function resolveAxisDomainWithChartOverrides(axis, minValue, maxValue, includeZero = false) {
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);
1152
+ const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess', _155 => _155.min]) === "number" && Number.isFinite(axis.min);
1153
+ const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess', _156 => _156.max]) === "number" && Number.isFinite(axis.max);
1154
+ const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _157 => _157.min])) : minValue;
1155
+ const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _158 => _158.max])) : maxValue;
1156
+ const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess', _159 => _159.majorUnit]), includeZero);
1144
1157
  return {
1145
1158
  hasExplicitMax,
1146
1159
  hasExplicitMin,
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,
1160
+ majorUnit: _optionalChain([axis, 'optionalAccess', _160 => _160.majorUnit]),
1161
+ max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _161 => _161.max])) : domain.max,
1162
+ min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _162 => _162.min])) : domain.min,
1150
1163
  ticks: hasExplicitMin || hasExplicitMax ? buildNumericTickValues(
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])
1164
+ hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _163 => _163.min])) : domain.min,
1165
+ hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _164 => _164.max])) : domain.max,
1166
+ _optionalChain([axis, 'optionalAccess', _165 => _165.majorUnit])
1154
1167
  ) : domain.ticks
1155
1168
  };
1156
1169
  }
1157
1170
  function resolve3dFrameOffsets(chart, baseDepthX = 11, baseDepthY = 8) {
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);
1171
+ const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _166 => _166.view3d, 'optionalAccess', _167 => _167.depthPercent]), () => ( 100))) / 100, 0.35, 3.2);
1172
+ const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _168 => _168.view3d, 'optionalAccess', _169 => _169.rotX]), () => ( 20)), -80, 80);
1173
+ const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _170 => _170.view3d, 'optionalAccess', _171 => _171.rotY]), () => ( 20)), -80, 80);
1174
+ const usePerspective = _optionalChain([chart, 'access', _172 => _172.view3d, 'optionalAccess', _173 => _173.rAngAx]) === false;
1175
+ const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _174 => _174.view3d, 'optionalAccess', _175 => _175.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
1163
1176
  const projectedOrigin = projectCartesian3dPoint(
1164
1177
  0,
1165
1178
  0,
@@ -1257,9 +1270,9 @@ function formatExcelDateSerial(value, formatCode, use1904) {
1257
1270
  function formatCategoryLabel(chart, value, fallback = "") {
1258
1271
  const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
1259
1272
  const numeric = typeof value === "number" && Number.isFinite(value) ? value : null;
1260
- const formatCode = _optionalChain([chart, 'access', _186 => _186.categoryAxis, 'optionalAccess', _187 => _187.numberFormat, 'optionalAccess', _188 => _188.formatCode]);
1273
+ const formatCode = _optionalChain([chart, 'access', _176 => _176.categoryAxis, 'optionalAccess', _177 => _177.numberFormat, 'optionalAccess', _178 => _178.formatCode]);
1261
1274
  if (numeric != null && isLikelyDateFormatCode(formatCode)) {
1262
- return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess', _189 => _189.date1904]) === true);
1275
+ return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess', _179 => _179.date1904]) === true);
1263
1276
  }
1264
1277
  const normalized = normalizeCategoryLabel(value);
1265
1278
  if (normalized.length > 0) {
@@ -1419,18 +1432,18 @@ function renderLegend(chart, layout, palette) {
1419
1432
  if (!resolveRegionMapColorStrings(series)) {
1420
1433
  const vertical = legendPos === "left" || legendPos === "right";
1421
1434
  const x = vertical ? legendPos === "right" ? layout.plot.left + layout.plot.width + 8 : 8 : layout.plot.left;
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);
1435
+ const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access', _180 => _180.legendBounds, 'optionalAccess', _181 => _181.height]), () => ( 48))) >= 44;
1436
+ const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access', _182 => _182.legendBounds, 'optionalAccess', _183 => _183.top]), () => ( layout.height - 48))) + (showSeriesName ? 20 : 4);
1424
1437
  const length = vertical ? Math.min(100, Math.max(24, layout.plot.height - 42)) : Math.min(160, layout.plot.width);
1425
1438
  const gradientId = `map-legend-${chart.id}`;
1426
1439
  const stops = resolveRegionMapValueColors(series);
1427
- const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess', _194 => _194.length]), () => ( 3));
1440
+ const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess', _184 => _184.length]), () => ( 3));
1428
1441
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
1429
1442
  /* @__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]), () => ( "")) }),
1443
+ showSeriesName && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "text", { fill: textColor, fontSize: 10, x, y: y - 12, children: _nullishCoalesce(_optionalChain([series, 'optionalAccess', _185 => _185.name]), () => ( "")) }),
1431
1444
  /* @__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]) })
1445
+ /* @__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', _186 => _186[0], 'optionalAccess', _187 => _187.label]) }),
1446
+ /* @__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', _188 => _188[1], 'optionalAccess', _189 => _189.label]) })
1434
1447
  ] });
1435
1448
  }
1436
1449
  }
@@ -1476,10 +1489,10 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
1476
1489
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
1477
1490
  const labelColor = resolveChartAxisTextColor(chart);
1478
1491
  const zeroPosition = mapValue(0);
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";
1492
+ const showValueAxis = _optionalChain([chart, 'access', _190 => _190.valueAxis, 'optionalAccess', _191 => _191.delete]) !== true;
1493
+ const showCategoryAxis = _optionalChain([chart, 'access', _192 => _192.categoryAxis, 'optionalAccess', _193 => _193.delete]) !== true;
1494
+ const showValueLabels = showValueAxis && _optionalChain([chart, 'access', _194 => _194.valueAxis, 'optionalAccess', _195 => _195.labelPosition]) !== "none";
1495
+ const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access', _196 => _196.categoryAxis, 'optionalAccess', _197 => _197.labelPosition]) !== "none";
1483
1496
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
1484
1497
  showValueAxis ? valueTicks.map((tick) => {
1485
1498
  const valuePosition = mapValue(tick);
@@ -1804,22 +1817,22 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
1804
1817
  chart.valueAxis,
1805
1818
  minValue,
1806
1819
  maxValue,
1807
- isAreaChart || _optionalChain([chart, 'access', _208 => _208.valueAxis, 'optionalAccess', _209 => _209.crosses]) === "autoZero"
1820
+ isAreaChart || _optionalChain([chart, 'access', _198 => _198.valueAxis, 'optionalAccess', _199 => _199.crosses]) === "autoZero"
1808
1821
  );
1809
1822
  minValue = valueDomain.min;
1810
1823
  maxValue = valueDomain.max;
1811
1824
  const valueSpan = Math.max(1e-6, maxValue - minValue);
1812
1825
  const seriesCount = Math.max(1, chart.series.length);
1813
1826
  const categoryCount = Math.max(1, categories.length);
1814
- const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _210 => _210.view3d, 'optionalAccess', _211 => _211.depthPercent]), () => ( 100))) / 100, 0.5, 4);
1827
+ const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _200 => _200.view3d, 'optionalAccess', _201 => _201.depthPercent]), () => ( 100))) / 100, 0.5, 4);
1815
1828
  const halfDepth = (seriesCount <= 1 ? 0.82 : 1.02) * depthScale;
1816
1829
  const frontZ = halfDepth;
1817
1830
  const backZ = -halfDepth;
1818
1831
  const baseValue = isAreaChart ? Math.max(minValue, Math.min(maxValue, 0)) : minValue;
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);
1832
+ const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _202 => _202.view3d, 'optionalAccess', _203 => _203.rotX]), () => ( 18)), -80, 80) * (Math.PI / 180);
1833
+ const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _204 => _204.view3d, 'optionalAccess', _205 => _205.rotY]), () => ( 24)), -80, 80) * (Math.PI / 180);
1834
+ const usePerspective = _optionalChain([chart, 'access', _206 => _206.view3d, 'optionalAccess', _207 => _207.rAngAx]) === false;
1835
+ const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _208 => _208.view3d, 'optionalAccess', _209 => _209.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
1823
1836
  const normalizeX = (categoryIndex) => categoryCount <= 1 ? 0 : (categoryIndex / (categoryCount - 1) - 0.5) * 2;
1824
1837
  const normalizeY = (value) => -(((value - minValue) / valueSpan - 0.5) * 2);
1825
1838
  const stackedAreaDepthSpan = isAreaChart && isStackedSeries ? Math.max(0.18, (frontZ - backZ) * 0.56) : 0;
@@ -1868,7 +1881,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
1868
1881
  categoryIndex,
1869
1882
  defined: point.defined,
1870
1883
  depth: top.depth,
1871
- depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess', _220 => _220.depth]), () => ( top.depth)),
1884
+ depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess', _210 => _210.depth]), () => ( top.depth)),
1872
1885
  top,
1873
1886
  topBack
1874
1887
  };
@@ -1993,11 +2006,11 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
1993
2006
  ] : [];
1994
2007
  const strokeColor = chartSeriesStrokeColor(chart, seriesIndex);
1995
2008
  const fillColor = chartSeriesColor(chart, seriesIndex);
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])));
2009
+ const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access', _211 => _211.series, 'access', _212 => _212[seriesIndex], 'optionalAccess', _213 => _213.markerSymbol]));
2010
+ const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access', _214 => _214.series, 'access', _215 => _215[seriesIndex], 'optionalAccess', _216 => _216.markerSize])));
1998
2011
  const slabFaces = isAreaChart && isStackedSeries ? definedPoints.slice(1).map((point, pointIndex) => {
1999
2012
  const previous = definedPoints[pointIndex];
2000
- if (!_optionalChain([previous, 'optionalAccess', _227 => _227.topBack]) || !point.topBack || !previous.bottomBack || !point.bottomBack) {
2013
+ if (!_optionalChain([previous, 'optionalAccess', _217 => _217.topBack]) || !point.topBack || !previous.bottomBack || !point.bottomBack) {
2001
2014
  return null;
2002
2015
  }
2003
2016
  const topFace = buildLinearSvgPath([previous.top, point.top, point.topBack, previous.topBack], true);
@@ -2029,13 +2042,13 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2029
2042
  }) : [];
2030
2043
  const firstDefinedPoint = _nullishCoalesce(definedPoints[0], () => ( null));
2031
2044
  const lastDefinedPoint = _nullishCoalesce(definedPoints[definedPoints.length - 1], () => ( null));
2032
- const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess', _228 => _228.topBack]) && _optionalChain([firstDefinedPoint, 'optionalAccess', _229 => _229.bottomBack]) ? buildLinearSvgPath([
2045
+ const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess', _218 => _218.topBack]) && _optionalChain([firstDefinedPoint, 'optionalAccess', _219 => _219.bottomBack]) ? buildLinearSvgPath([
2033
2046
  firstDefinedPoint.top,
2034
2047
  firstDefinedPoint.bottom,
2035
2048
  firstDefinedPoint.bottomBack,
2036
2049
  firstDefinedPoint.topBack
2037
2050
  ], true) : "";
2038
- const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess', _230 => _230.topBack]) && _optionalChain([lastDefinedPoint, 'optionalAccess', _231 => _231.bottomBack]) ? buildLinearSvgPath([
2051
+ const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess', _220 => _220.topBack]) && _optionalChain([lastDefinedPoint, 'optionalAccess', _221 => _221.bottomBack]) ? buildLinearSvgPath([
2039
2052
  lastDefinedPoint.top,
2040
2053
  lastDefinedPoint.bottom,
2041
2054
  lastDefinedPoint.bottomBack,
@@ -2108,7 +2121,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2108
2121
  fill: "none",
2109
2122
  stroke: strokeColor,
2110
2123
  strokeLinejoin: "round",
2111
- strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access', _232 => _232.series, 'access', _233 => _233[seriesIndex], 'optionalAccess', _234 => _234.lineWidthPx]), () => ( 2)))
2124
+ strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access', _222 => _222.series, 'access', _223 => _223[seriesIndex], 'optionalAccess', _224 => _224.lineWidthPx]), () => ( 2)))
2112
2125
  }
2113
2126
  ),
2114
2127
  markerPath.length > 0 ? definedPoints.map((point, pointIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
@@ -2120,8 +2133,8 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2120
2133
  {
2121
2134
  ...chartElementDataProps(seriesIndex, point.categoryIndex),
2122
2135
  d: markerPath,
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)),
2136
+ fill: _nullishCoalesce(_optionalChain([chart, 'access', _225 => _225.series, 'access', _226 => _226[seriesIndex], 'optionalAccess', _227 => _227.markerColor]), () => ( fillColor)),
2137
+ stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _228 => _228.series, 'access', _229 => _229[seriesIndex], 'optionalAccess', _230 => _230.markerLineColor]), () => ( chart.chartAreaFillColor)), () => ( palette.surface)),
2125
2138
  strokeWidth: 1
2126
2139
  }
2127
2140
  )
@@ -2183,7 +2196,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2183
2196
  const isPercentStacked = chartType === "ColumnPercentStacked" || chartType === "BarPercentStacked";
2184
2197
  const isHorizontal = chartType === "BarClustered" || chartType === "BarStacked" || chartType === "BarPercentStacked";
2185
2198
  const isHistogramLike = isHistogramLikeChart(chart) && chartType === "ColumnClustered";
2186
- const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access', _241 => _241.categoryAxis, 'optionalAccess', _242 => _242.orientation]) !== "maxMin";
2199
+ const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access', _231 => _231.categoryAxis, 'optionalAccess', _232 => _232.orientation]) !== "maxMin";
2187
2200
  const categories = shouldReverseCategories ? sourceCategories.slice().reverse() : sourceCategories;
2188
2201
  const isStacked = chartType === "ColumnStacked" || chartType === "BarStacked" || isPercentStacked;
2189
2202
  const negativeFillMode = isPercentStacked ? "chartArea" : chartType === "ColumnClustered" ? "none" : "series";
@@ -2267,24 +2280,35 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2267
2280
  minValue = valueDomain.min;
2268
2281
  maxValue = valueDomain.max;
2269
2282
  const categoryBandPadding = isHistogramLike ? { inner: 0, outer: 0 } : resolveCategoryBandPadding(chart.gapWidth);
2270
- const categoryScale = _d3scale.scaleBand.call(void 0, ).domain(categories).range(isHorizontal ? [plot.top, plot.top + plot.height] : [plot.left, plot.left + plot.width]).paddingInner(categoryBandPadding.inner).paddingOuter(categoryBandPadding.outer);
2271
- const seriesScale = _d3scale.scaleBand.call(void 0, ).domain(Array.from({ length: seriesCount }, (_, index) => String(index))).range([0, categoryScale.bandwidth()]).paddingInner(isHistogramLike ? 0 : 0.16).paddingOuter(isHistogramLike ? 0 : 0.08);
2283
+ const categoryScale = bandScale(
2284
+ categories,
2285
+ isHorizontal ? [plot.top, plot.top + plot.height] : [plot.left, plot.left + plot.width],
2286
+ categoryBandPadding.inner,
2287
+ categoryBandPadding.outer
2288
+ );
2289
+ const seriesScale = bandScale(
2290
+ Array.from({ length: seriesCount }, (_, index) => String(index)),
2291
+ [0, categoryScale.bandwidth],
2292
+ isHistogramLike ? 0 : 0.16,
2293
+ isHistogramLike ? 0 : 0.08
2294
+ );
2272
2295
  const usesSeriesDepthAxis = chart.is3d === true && !isHorizontal && !isStacked && seriesCount > 1 && chart.seriesAxis != null;
2273
2296
  const depthLaneSpread = usesSeriesDepthAxis ? clamp(1.26 + seriesCount * 0.16, 1.4, 1.96) : 1;
2274
2297
  const depthGridSpanX = usesSeriesDepthAxis && frameOffsets ? frameOffsets.depthX * depthLaneSpread : 0;
2275
2298
  const depthGridSpanY = usesSeriesDepthAxis && frameOffsets ? frameOffsets.depthY * depthLaneSpread : 0;
2276
2299
  const depthSlotX = usesSeriesDepthAxis ? depthGridSpanX / Math.max(1, seriesCount) : 0;
2277
2300
  const depthSlotY = usesSeriesDepthAxis ? depthGridSpanY / Math.max(1, seriesCount) : 0;
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";
2281
- const valueScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range(
2301
+ const depthBarX = usesSeriesDepthAxis ? Math.sign(depthSlotX || _optionalChain([frameOffsets, 'optionalAccess', _233 => _233.depthX]) || 1) * Math.max(8, Math.abs(depthSlotX) * 1.14) : _optionalChain([frameOffsets, 'optionalAccess', _234 => _234.depthX]);
2302
+ const depthBarY = usesSeriesDepthAxis ? Math.sign(depthSlotY || _optionalChain([frameOffsets, 'optionalAccess', _235 => _235.depthY]) || -1) * Math.max(5.5, Math.abs(depthSlotY) * 1.12) : _optionalChain([frameOffsets, 'optionalAccess', _236 => _236.depthY]);
2303
+ const shouldReverseValueAxis = _optionalChain([chart, 'access', _237 => _237.valueAxis, 'optionalAccess', _238 => _238.orientation]) === "maxMin";
2304
+ const valueScale = linearScale(
2305
+ [minValue, maxValue],
2282
2306
  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]
2283
2307
  );
2284
- const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _249 => _249.valueAxis, 'optionalAccess', _250 => _250.majorUnit]), () => ( 20))) : valueDomain.ticks;
2308
+ const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _239 => _239.valueAxis, 'optionalAccess', _240 => _240.majorUnit]), () => ( 20))) : valueDomain.ticks;
2285
2309
  const categoryPositions = categories.map((category) => {
2286
2310
  const bandStart = _nullishCoalesce(categoryScale(category), () => ( 0));
2287
- return bandStart + categoryScale.bandwidth() / 2;
2311
+ return bandStart + categoryScale.bandwidth / 2;
2288
2312
  });
2289
2313
  const bars = [];
2290
2314
  const positive = Array.from({ length: categoryCount }, () => 0);
@@ -2294,7 +2318,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2294
2318
  const value = _nullishCoalesce(matrix[seriesIndex][categoryIndex], () => ( 0));
2295
2319
  const rawValue = _nullishCoalesce(rawMatrix[seriesIndex][categoryIndex], () => ( value));
2296
2320
  const pointIndex = shouldReverseCategories ? categoryCount - 1 - categoryIndex : categoryIndex;
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)]);
2321
+ const pointStyle = _optionalChain([chart, 'access', _241 => _241.series, 'access', _242 => _242[seriesIndex], 'optionalAccess', _243 => _243.dataPointStyles, 'optionalAccess', _244 => _244.find, 'call', _245 => _245((entry) => entry.index === pointIndex)]);
2298
2322
  let start = 0;
2299
2323
  let end = value;
2300
2324
  if (isStacked) {
@@ -2309,19 +2333,19 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2309
2333
  }
2310
2334
  }
2311
2335
  const colors = chartSeriesBarColors(chart, seriesIndex, rawValue, negativeFillMode);
2312
- const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access', _256 => _256.series, 'access', _257 => _257[seriesIndex], 'optionalAccess', _258 => _258.invertIfNegative]) === true;
2336
+ const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access', _246 => _246.series, 'access', _247 => _247[seriesIndex], 'optionalAccess', _248 => _248.invertIfNegative]) === true;
2313
2337
  if (!isInvertedNegative) {
2314
2338
  if (variesBarColorsByCategory(chart)) {
2315
2339
  colors.fill = chartPointColor(chart, pointIndex, seriesIndex);
2316
2340
  colors.stroke = colors.fill;
2317
2341
  }
2318
- if (_optionalChain([pointStyle, 'optionalAccess', _259 => _259.color])) {
2342
+ if (_optionalChain([pointStyle, 'optionalAccess', _249 => _249.color])) {
2319
2343
  colors.fill = pointStyle.color;
2320
2344
  if (!pointStyle.lineColor) {
2321
2345
  colors.stroke = pointStyle.color;
2322
2346
  }
2323
2347
  }
2324
- if (_optionalChain([pointStyle, 'optionalAccess', _260 => _260.lineColor])) {
2348
+ if (_optionalChain([pointStyle, 'optionalAccess', _250 => _250.lineColor])) {
2325
2349
  colors.stroke = pointStyle.lineColor;
2326
2350
  }
2327
2351
  }
@@ -2330,11 +2354,11 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2330
2354
  }
2331
2355
  const category = categories[categoryIndex];
2332
2356
  const categoryStart = _nullishCoalesce(categoryScale(category), () => ( 0));
2333
- const barThickness = usesSeriesDepthAxis ? Math.max(7, categoryScale.bandwidth() * 0.4) : isHistogramLike ? categoryScale.bandwidth() : isStacked ? categoryScale.bandwidth() : seriesScale.bandwidth();
2334
- const barOffset = usesSeriesDepthAxis ? Math.max(0, (categoryScale.bandwidth() - barThickness) * 0.5) : isHistogramLike ? 0 : isStacked ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0));
2357
+ const barThickness = usesSeriesDepthAxis ? Math.max(7, categoryScale.bandwidth * 0.4) : isHistogramLike ? categoryScale.bandwidth : isStacked ? categoryScale.bandwidth : seriesScale.bandwidth;
2358
+ const barOffset = usesSeriesDepthAxis ? Math.max(0, (categoryScale.bandwidth - barThickness) * 0.5) : isHistogramLike ? 0 : isStacked ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0));
2335
2359
  const depthOffsetX = usesSeriesDepthAxis ? depthSlotX * seriesIndex : 0;
2336
2360
  const depthOffsetY = usesSeriesDepthAxis ? depthSlotY * seriesIndex : 0;
2337
- const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _261 => _261.depthX]), () => ( 0))) + depthOffsetY * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _262 => _262.depthY]), () => ( 0)));
2361
+ const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _251 => _251.depthX]), () => ( 0))) + depthOffsetY * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _252 => _252.depthY]), () => ( 0)));
2338
2362
  const shapeTaper = normalized3dShape === "pyramid" ? 0.94 : normalized3dShape === "cone" ? 1 : 0;
2339
2363
  let topScale = 1;
2340
2364
  let bottomScale = 1;
@@ -2372,8 +2396,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2372
2396
  isHorizontal: true,
2373
2397
  key: `bar-${seriesIndex}-${categoryIndex}`,
2374
2398
  left: Math.min(x1, x2),
2375
- depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _263 => _263.depthX]),
2376
- depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _264 => _264.depthY]),
2399
+ depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _253 => _253.depthX]),
2400
+ depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _254 => _254.depthY]),
2377
2401
  shape3d: normalized3dShape,
2378
2402
  seriesIndex,
2379
2403
  stroke: colors.stroke,
@@ -2402,8 +2426,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2402
2426
  isHorizontal: false,
2403
2427
  key: `bar-${seriesIndex}-${categoryIndex}`,
2404
2428
  left: categoryStart + barOffset,
2405
- depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _265 => _265.depthX]),
2406
- depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _266 => _266.depthY]),
2429
+ depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _255 => _255.depthX]),
2430
+ depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _256 => _256.depthY]),
2407
2431
  shape3d: normalized3dShape,
2408
2432
  seriesIndex,
2409
2433
  stroke: colors.stroke,
@@ -2475,8 +2499,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2475
2499
  );
2476
2500
  const depthAxisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
2477
2501
  const depthGridColor = lightenColor(depthAxisColor, 0.48);
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));
2502
+ const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _257 => _257.depthX]), () => ( 0));
2503
+ const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _258 => _258.depthY]), () => ( 0));
2480
2504
  const depthAxisNode = usesSeriesDepthAxis && frameOffsets ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
2481
2505
  Array.from({ length: categoryCount + 1 }, (_, boundaryIndex) => {
2482
2506
  const x = plot.left + boundaryIndex / Math.max(1, categoryCount) * plot.width;
@@ -2571,7 +2595,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2571
2595
  y: bar.top
2572
2596
  }
2573
2597
  )),
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)
2598
+ renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _259 => _259.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0, `bar-selection-${bar.key}`, bar.left, bar.top, bar.width, bar.height) : null)
2575
2599
  ] });
2576
2600
  }
2577
2601
  function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartElement) {
@@ -2598,11 +2622,11 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2598
2622
  return Math.abs(total) < 1e-9 ? 1 : total;
2599
2623
  }) : null;
2600
2624
  return chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
2601
- const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _270 => _270[seriesIndex], 'optionalAccess', _271 => _271[categoryIndex]]), () => ( null));
2625
+ const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _260 => _260[seriesIndex], 'optionalAccess', _261 => _261[categoryIndex]]), () => ( null));
2602
2626
  if (rawValue == null) {
2603
2627
  return { defined: false, y: null, y0: null, y1: null };
2604
2628
  }
2605
- const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess', _272 => _272[categoryIndex]]), () => ( 1))) * 100 : rawValue;
2629
+ const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess', _262 => _262[categoryIndex]]), () => ( 1))) * 100 : rawValue;
2606
2630
  if (value >= 0) {
2607
2631
  const start2 = positive[categoryIndex];
2608
2632
  const end2 = start2 + value;
@@ -2615,7 +2639,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2615
2639
  return { defined: true, y: end, y0: start, y1: end };
2616
2640
  }));
2617
2641
  })() : chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
2618
- const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _273 => _273[seriesIndex], 'optionalAccess', _274 => _274[categoryIndex]]), () => ( null));
2642
+ const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _263 => _263[seriesIndex], 'optionalAccess', _264 => _264[categoryIndex]]), () => ( null));
2619
2643
  return {
2620
2644
  defined: value != null,
2621
2645
  y: value,
@@ -2631,12 +2655,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2631
2655
  let maxValue = Math.max(...stackedExtents);
2632
2656
  if (isAreaChart) {
2633
2657
  minValue = Math.min(0, minValue);
2634
- } else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access', _275 => _275.valueAxis, 'optionalAccess', _276 => _276.crosses]) === "autoZero") {
2658
+ } else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access', _265 => _265.valueAxis, 'optionalAccess', _266 => _266.crosses]) === "autoZero") {
2635
2659
  minValue = Math.min(0, minValue);
2636
2660
  }
2637
2661
  if (isPercentStackedSeries) {
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);
2662
+ const explicitMin = typeof _optionalChain([chart, 'access', _267 => _267.valueAxis, 'optionalAccess', _268 => _268.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? Number(chart.valueAxis.min) : Math.min(0, minValue);
2663
+ const explicitMax = typeof _optionalChain([chart, 'access', _269 => _269.valueAxis, 'optionalAccess', _270 => _270.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? Number(chart.valueAxis.max) : Math.max(100, maxValue);
2640
2664
  minValue = explicitMin;
2641
2665
  maxValue = explicitMax <= explicitMin ? explicitMin + 1 : explicitMax;
2642
2666
  } else {
@@ -2644,24 +2668,24 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2644
2668
  chart.valueAxis,
2645
2669
  minValue,
2646
2670
  maxValue,
2647
- isAreaChart || _optionalChain([chart, 'access', _281 => _281.valueAxis, 'optionalAccess', _282 => _282.crosses]) === "autoZero"
2671
+ isAreaChart || _optionalChain([chart, 'access', _271 => _271.valueAxis, 'optionalAccess', _272 => _272.crosses]) === "autoZero"
2648
2672
  );
2649
2673
  minValue = valueDomain.min;
2650
2674
  maxValue = valueDomain.max;
2651
2675
  }
2652
- const xScale = _d3scale.scalePoint.call(void 0, ).domain(categories).range([plot.left, plot.left + plot.width]);
2653
- const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range([plot.top + plot.height, plot.top]);
2654
- const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _283 => _283.valueAxis, 'optionalAccess', _284 => _284.majorUnit]), () => ( 20))) : resolveAxisDomainWithChartOverrides(
2676
+ const xScale = pointScale(categories, [plot.left, plot.left + plot.width]);
2677
+ const yScale = linearScale([minValue, maxValue], [plot.top + plot.height, plot.top]);
2678
+ const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _273 => _273.valueAxis, 'optionalAccess', _274 => _274.majorUnit]), () => ( 20))) : resolveAxisDomainWithChartOverrides(
2655
2679
  chart.valueAxis,
2656
2680
  minValue,
2657
2681
  maxValue,
2658
- isAreaChart || _optionalChain([chart, 'access', _285 => _285.valueAxis, 'optionalAccess', _286 => _286.crosses]) === "autoZero"
2682
+ isAreaChart || _optionalChain([chart, 'access', _275 => _275.valueAxis, 'optionalAccess', _276 => _276.crosses]) === "autoZero"
2659
2683
  ).ticks;
2660
2684
  const categoryPositions = categories.map((category) => _nullishCoalesce(xScale(category), () => ( plot.left)));
2661
2685
  const curve = _d3shape.curveLinear;
2662
2686
  const areaBaseline = yScale(Math.max(minValue, 0));
2663
2687
  const plotPointsBySeries = chart.series.map((_, seriesIndex) => categories.map((category, categoryIndex) => {
2664
- const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access', _287 => _287[seriesIndex], 'optionalAccess', _288 => _288[categoryIndex]]), () => ( {
2688
+ const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access', _277 => _277[seriesIndex], 'optionalAccess', _278 => _278[categoryIndex]]), () => ( {
2665
2689
  defined: false,
2666
2690
  y: null,
2667
2691
  y0: null,
@@ -2690,12 +2714,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2690
2714
  );
2691
2715
  }
2692
2716
  const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
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;
2717
+ const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _279 => _279.dropLines]) && typeof rawRecord.dropLines === "object" ? rawRecord.dropLines : null;
2718
+ const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _280 => _280.highLowLines]) && typeof rawRecord.highLowLines === "object" ? rawRecord.highLowLines : null;
2719
+ const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess', _281 => _281.upDownBars]) && typeof rawRecord.upDownBars === "object" ? rawRecord.upDownBars : null;
2720
+ const dropLineColor = _nullishCoalesce(normalizeRendererHexColor(_optionalChain([dropLinesRecord, 'optionalAccess', _282 => _282.shapeProperties, 'optionalAccess', _283 => _283.lineColorHex])), () => ( lightenColor(_nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border)), 0.45)));
2721
+ const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess', _284 => _284.shapeProperties, 'optionalAccess', _285 => _285.lineColorHex])), () => ( chart.axisLineColor)), () => ( chart.chartAreaBorderColor)), () => ( palette.border));
2722
+ const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess', _286 => _286.gapWidth]) === "number" && Number.isFinite(upDownBarsRecord.gapWidth) ? upDownBarsRecord.gapWidth : 150;
2699
2723
  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;
2700
2724
  const upDownBarWidth = clamp(categoryStep * (1 - resolveCategoryBandPadding(upDownGapWidth).inner) * 0.82, 3, 28);
2701
2725
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
@@ -2710,7 +2734,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2710
2734
  (value) => yScale(value)
2711
2735
  ),
2712
2736
  !isAreaChart && !isStackedSeries && highLowLinesRecord ? categories.map((_, categoryIndex) => {
2713
- const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access', _297 => _297[categoryIndex], 'optionalAccess', _298 => _298.y])).filter((value) => value != null && Number.isFinite(value));
2737
+ const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access', _287 => _287[categoryIndex], 'optionalAccess', _288 => _288.y])).filter((value) => value != null && Number.isFinite(value));
2714
2738
  if (yValues.length < 2) {
2715
2739
  return null;
2716
2740
  }
@@ -2729,8 +2753,8 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2729
2753
  );
2730
2754
  }) : null,
2731
2755
  !isAreaChart && !isStackedSeries && upDownBarsRecord && plotPointsBySeries.length >= 2 ? categories.map((_, categoryIndex) => {
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]]);
2756
+ const first = _optionalChain([plotPointsBySeries, 'access', _289 => _289[0], 'optionalAccess', _290 => _290[categoryIndex]]);
2757
+ const second = _optionalChain([plotPointsBySeries, 'access', _291 => _291[plotPointsBySeries.length - 1], 'optionalAccess', _292 => _292[categoryIndex]]);
2734
2758
  if (!first || !second || first.y == null || second.y == null) {
2735
2759
  return null;
2736
2760
  }
@@ -2758,7 +2782,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2758
2782
  const lineStrokePoints = displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
2759
2783
  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), () => ( ""));
2760
2784
  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), () => ( "")) : "";
2761
- const seriesFillColor = typeof _optionalChain([series, 'access', _303 => _303.shapeProperties, 'optionalAccess', _304 => _304.xmlFillColor]) === "string" ? series.shapeProperties.xmlFillColor : chartSeriesColor(chart, seriesIndex);
2785
+ const seriesFillColor = typeof _optionalChain([series, 'access', _293 => _293.shapeProperties, 'optionalAccess', _294 => _294.xmlFillColor]) === "string" ? series.shapeProperties.xmlFillColor : chartSeriesColor(chart, seriesIndex);
2762
2786
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
2763
2787
  !isAreaChart && !isStackedSeries && dropLinesRecord ? points.map((point, pointIndex) => point.y == null ? null : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
2764
2788
  "line",
@@ -2788,7 +2812,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2788
2812
  ...chartElementDataProps(seriesIndex),
2789
2813
  d: linePath,
2790
2814
  fill: "none",
2791
- stroke: _optionalChain([series, 'access', _305 => _305.shapeProperties, 'optionalAccess', _306 => _306.xmlLineHidden]) === true ? "none" : chartSeriesStrokeColor(chart, seriesIndex),
2815
+ stroke: _optionalChain([series, 'access', _295 => _295.shapeProperties, 'optionalAccess', _296 => _296.xmlLineHidden]) === true ? "none" : chartSeriesStrokeColor(chart, seriesIndex),
2792
2816
  strokeLinecap: "round",
2793
2817
  strokeLinejoin: "round",
2794
2818
  strokeWidth: Math.max(1.5, _nullishCoalesce(series.lineWidthPx, () => ( 2)))
@@ -2806,7 +2830,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2806
2830
  strokeWidth: 1
2807
2831
  }
2808
2832
  )),
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,
2833
+ points.map((point, pointIndex) => point.y != null && (isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _297 => _297.kind]) !== "point") ? isAreaChart ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `area-selection-${seriesIndex}-${pointIndex}`, [{ x: point.x, y: yScale(point.y) }]) : _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
2810
2834
  `line-selection-${seriesIndex}-${pointIndex}`,
2811
2835
  point.x - 4,
2812
2836
  yScale(point.y) - 4,
@@ -2838,12 +2862,22 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2838
2862
  return null;
2839
2863
  }
2840
2864
  const plot = layout.plot;
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));
2865
+ const groupGapWidth = typeof _optionalChain([columnGroup, 'access', _298 => _298.raw, 'optionalAccess', _299 => _299.gapWidth]) === "number" && Number.isFinite(columnGroup.raw.gapWidth) ? columnGroup.raw.gapWidth : _nullishCoalesce(columnGroup.gapWidth, () => ( chart.gapWidth));
2842
2866
  const histogramColumns = columnGroup.series.some((series) => isHistogramLikeSeries(series));
2843
2867
  const categoryBandPadding = histogramColumns ? { inner: 0, outer: 0 } : resolveCategoryBandPadding(groupGapWidth);
2844
- const categoryScale = _d3scale.scaleBand.call(void 0, ).domain(categories).range([plot.left, plot.left + plot.width]).paddingInner(categoryBandPadding.inner).paddingOuter(categoryBandPadding.outer);
2845
- const seriesScale = _d3scale.scaleBand.call(void 0, ).domain(Array.from({ length: columnGroup.series.length }, (_, index) => String(index))).range([0, categoryScale.bandwidth()]).paddingInner(histogramColumns ? 0 : 0.16).paddingOuter(histogramColumns ? 0 : 0.08);
2846
- const categoryPositions = categories.map((category) => (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth() / 2);
2868
+ const categoryScale = bandScale(
2869
+ categories,
2870
+ [plot.left, plot.left + plot.width],
2871
+ categoryBandPadding.inner,
2872
+ categoryBandPadding.outer
2873
+ );
2874
+ const seriesScale = bandScale(
2875
+ Array.from({ length: columnGroup.series.length }, (_, index) => String(index)),
2876
+ [0, categoryScale.bandwidth],
2877
+ histogramColumns ? 0 : 0.16,
2878
+ histogramColumns ? 0 : 0.08
2879
+ );
2880
+ const categoryPositions = categories.map((category) => (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth / 2);
2847
2881
  const resolveGlobalSeriesIndex = (series) => {
2848
2882
  const index = chart.series.findIndex((candidate) => candidate.id === series.id);
2849
2883
  return index >= 0 ? index : 0;
@@ -2854,19 +2888,19 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2854
2888
  return null;
2855
2889
  }
2856
2890
  const primaryDomain = resolveNumericAxisDomain(
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]),
2891
+ typeof _optionalChain([columnGroup, 'access', _300 => _300.valueAxis, 'optionalAccess', _301 => _301.min]) === "number" ? columnGroup.valueAxis.min : Math.min(...primaryValues),
2892
+ typeof _optionalChain([columnGroup, 'access', _302 => _302.valueAxis, 'optionalAccess', _303 => _303.max]) === "number" ? columnGroup.valueAxis.max : Math.max(...primaryValues),
2893
+ _optionalChain([columnGroup, 'access', _304 => _304.valueAxis, 'optionalAccess', _305 => _305.majorUnit]),
2860
2894
  true
2861
2895
  );
2862
2896
  const secondaryDomain = resolveNumericAxisDomain(
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]),
2897
+ typeof _optionalChain([lineGroup, 'access', _306 => _306.valueAxis, 'optionalAccess', _307 => _307.min]) === "number" ? lineGroup.valueAxis.min : Math.min(...secondaryValues),
2898
+ typeof _optionalChain([lineGroup, 'access', _308 => _308.valueAxis, 'optionalAccess', _309 => _309.max]) === "number" ? lineGroup.valueAxis.max : Math.max(...secondaryValues),
2899
+ _optionalChain([lineGroup, 'access', _310 => _310.valueAxis, 'optionalAccess', _311 => _311.majorUnit]),
2866
2900
  false
2867
2901
  );
2868
- const primaryScale = _d3scale.scaleLinear.call(void 0, ).domain([primaryDomain.min, primaryDomain.max]).range([plot.top + plot.height, plot.top]);
2869
- const secondaryScale = _d3scale.scaleLinear.call(void 0, ).domain([secondaryDomain.min, secondaryDomain.max]).range([plot.top + plot.height, plot.top]);
2902
+ const primaryScale = linearScale([primaryDomain.min, primaryDomain.max], [plot.top + plot.height, plot.top]);
2903
+ const secondaryScale = linearScale([secondaryDomain.min, secondaryDomain.max], [plot.top + plot.height, plot.top]);
2870
2904
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
2871
2905
  const labelColor = resolveChartAxisTextColor(chart);
2872
2906
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
@@ -2880,7 +2914,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2880
2914
  primaryDomain.ticks,
2881
2915
  (value) => primaryScale(value)
2882
2916
  ),
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) => {
2917
+ _optionalChain([lineGroup, 'access', _312 => _312.valueAxis, 'optionalAccess', _313 => _313.delete]) !== true && _optionalChain([lineGroup, 'access', _314 => _314.valueAxis, 'optionalAccess', _315 => _315.labelPosition]) !== "none" ? secondaryDomain.ticks.map((tick) => {
2884
2918
  const y = secondaryScale(tick);
2885
2919
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
2886
2920
  "text",
@@ -2895,7 +2929,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2895
2929
  `combo-secondary-tick-${tick}`
2896
2930
  );
2897
2931
  }) : null,
2898
- _optionalChain([lineGroup, 'access', _326 => _326.valueAxis, 'optionalAccess', _327 => _327.delete]) !== true ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
2932
+ _optionalChain([lineGroup, 'access', _316 => _316.valueAxis, 'optionalAccess', _317 => _317.delete]) !== true ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
2899
2933
  "line",
2900
2934
  {
2901
2935
  stroke: axisColor,
@@ -2910,12 +2944,12 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2910
2944
  const globalSeriesIndex = resolveGlobalSeriesIndex(series);
2911
2945
  const value = _nullishCoalesce(safeNumber(series.values[categoryIndex]), () => ( 0));
2912
2946
  const categoryStart = _nullishCoalesce(categoryScale(category), () => ( plot.left));
2913
- const barWidth = Math.max(1, histogramColumns ? categoryScale.bandwidth() : seriesScale.bandwidth());
2947
+ const barWidth = Math.max(1, histogramColumns ? categoryScale.bandwidth : seriesScale.bandwidth);
2914
2948
  const x = categoryStart + (histogramColumns ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0)));
2915
2949
  const y = primaryScale(Math.max(0, value));
2916
2950
  const zeroY = primaryScale(0);
2917
2951
  const height = Math.max(1, Math.abs(zeroY - primaryScale(value)));
2918
- const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _328 => _328.kind]) !== "point";
2952
+ const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _318 => _318.kind]) !== "point";
2919
2953
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
2920
2954
  /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
2921
2955
  "rect",
@@ -2942,7 +2976,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2942
2976
  lineGroup.series.map((series, seriesIndex) => {
2943
2977
  const globalSeriesIndex = resolveGlobalSeriesIndex(series);
2944
2978
  const points = categories.map((category, categoryIndex) => ({
2945
- x: (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth() / 2,
2979
+ x: (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth / 2,
2946
2980
  y: safeNumber(series.values[categoryIndex])
2947
2981
  }));
2948
2982
  const lineStrokePoints = chart.displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
@@ -3044,26 +3078,26 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3044
3078
  if (allX.length === 0 || allY.length === 0) {
3045
3079
  return null;
3046
3080
  }
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);
3081
+ const hasExplicitMinX = typeof _optionalChain([chart, 'access', _319 => _319.categoryAxis, 'optionalAccess', _320 => _320.min]) === "number" && Number.isFinite(chart.categoryAxis.min);
3082
+ const hasExplicitMaxX = typeof _optionalChain([chart, 'access', _321 => _321.categoryAxis, 'optionalAccess', _322 => _322.max]) === "number" && Number.isFinite(chart.categoryAxis.max);
3083
+ const hasExplicitMinY = typeof _optionalChain([chart, 'access', _323 => _323.valueAxis, 'optionalAccess', _324 => _324.min]) === "number" && Number.isFinite(chart.valueAxis.min);
3084
+ const hasExplicitMaxY = typeof _optionalChain([chart, 'access', _325 => _325.valueAxis, 'optionalAccess', _326 => _326.max]) === "number" && Number.isFinite(chart.valueAxis.max);
3051
3085
  const hasSyntheticIndexAxis = pointsBySeries.some((series) => series.usesSyntheticIndex);
3052
3086
  const syntheticPointCount = Math.max(0, ...pointsBySeries.map((series) => series.pointCount));
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);
3087
+ let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access', _327 => _327.categoryAxis, 'optionalAccess', _328 => _328.min])) : Math.min(...allX);
3088
+ let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access', _329 => _329.categoryAxis, 'optionalAccess', _330 => _330.max])) : Math.max(...allX);
3089
+ let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access', _331 => _331.valueAxis, 'optionalAccess', _332 => _332.min])) : Math.min(...allY);
3090
+ let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access', _333 => _333.valueAxis, 'optionalAccess', _334 => _334.max])) : Math.max(...allY);
3057
3091
  if (!hasExplicitMinX) {
3058
- minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access', _345 => _345.categoryAxis, 'optionalAccess', _346 => _346.crosses]) === "autoZero" ? Math.min(0, minX) : minX;
3092
+ minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access', _335 => _335.categoryAxis, 'optionalAccess', _336 => _336.crosses]) === "autoZero" ? Math.min(0, minX) : minX;
3059
3093
  }
3060
3094
  if (!hasExplicitMaxX) {
3061
- maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access', _347 => _347.categoryAxis, 'optionalAccess', _348 => _348.crosses]) === "autoZero" ? Math.max(0, maxX) : maxX;
3095
+ maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access', _337 => _337.categoryAxis, 'optionalAccess', _338 => _338.crosses]) === "autoZero" ? Math.max(0, maxX) : maxX;
3062
3096
  }
3063
- if (!hasExplicitMinY && _optionalChain([chart, 'access', _349 => _349.valueAxis, 'optionalAccess', _350 => _350.crosses]) === "autoZero") {
3097
+ if (!hasExplicitMinY && _optionalChain([chart, 'access', _339 => _339.valueAxis, 'optionalAccess', _340 => _340.crosses]) === "autoZero") {
3064
3098
  minY = Math.min(0, minY);
3065
3099
  }
3066
- if (!hasExplicitMaxY && _optionalChain([chart, 'access', _351 => _351.valueAxis, 'optionalAccess', _352 => _352.crosses]) === "autoZero") {
3100
+ if (!hasExplicitMaxY && _optionalChain([chart, 'access', _341 => _341.valueAxis, 'optionalAccess', _342 => _342.crosses]) === "autoZero") {
3067
3101
  maxY = Math.max(0, maxY);
3068
3102
  }
3069
3103
  if (maxX <= minX) {
@@ -3072,8 +3106,8 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3072
3106
  if (maxY <= minY) {
3073
3107
  maxY = minY + 1;
3074
3108
  }
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);
3109
+ const xStep = typeof _optionalChain([chart, 'access', _343 => _343.categoryAxis, 'optionalAccess', _344 => _344.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : buildNiceStep(minX, maxX, 5);
3110
+ const yStep = typeof _optionalChain([chart, 'access', _345 => _345.valueAxis, 'optionalAccess', _346 => _346.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, maxY, 5);
3077
3111
  if (!hasExplicitMinX && !hasSyntheticIndexAxis && Number.isFinite(xStep) && xStep > 0) {
3078
3112
  minX = Math.floor(minX / xStep) * xStep;
3079
3113
  }
@@ -3088,10 +3122,10 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3088
3122
  }
3089
3123
  const safeMaxX = maxX <= minX ? minX + 1 : maxX;
3090
3124
  const safeMaxY = maxY <= minY ? minY + 1 : maxY;
3091
- const xScale = _d3scale.scaleLinear.call(void 0, ).domain([minX, safeMaxX]).range([plot.left, plot.left + plot.width]);
3092
- const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minY, safeMaxY]).range([plot.top + plot.height, plot.top]);
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);
3125
+ const xScale = linearScale([minX, safeMaxX], [plot.left, plot.left + plot.width]);
3126
+ const yScale = linearScale([minY, safeMaxY], [plot.top + plot.height, plot.top]);
3127
+ const xMajorUnit = typeof _optionalChain([chart, 'access', _347 => _347.categoryAxis, 'optionalAccess', _348 => _348.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : hasSyntheticIndexAxis ? 1 : void 0;
3128
+ const yMajorUnit = typeof _optionalChain([chart, 'access', _349 => _349.valueAxis, 'optionalAccess', _350 => _350.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, safeMaxY, 6);
3095
3129
  const xTicks = buildNumericTickValues(minX, safeMaxX, xMajorUnit);
3096
3130
  const yTicks = buildNumericTickValues(minY, safeMaxY, yMajorUnit);
3097
3131
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
@@ -3157,7 +3191,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3157
3191
  markerSize
3158
3192
  );
3159
3193
  const markerFill = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(series.lineColor, () => ( series.markerColor)), () => ( series.color)), () => ( chartSeriesStrokeColor(chart, seriesIndex)));
3160
- const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access', _361 => _361.shapeProperties, 'optionalAccess', _362 => _362.xmlLineHidden]) !== true && seriesPoints.points.length > 1;
3194
+ const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access', _351 => _351.shapeProperties, 'optionalAccess', _352 => _352.xmlLineHidden]) !== true && seriesPoints.points.length > 1;
3161
3195
  const shouldDrawMarkers = styleShowsMarkers && markerPath.length > 0;
3162
3196
  const lineCurve = smooth || styleUsesSmoothCurve || series.smooth === true ? _d3shape.curveCatmullRom.alpha(0.5) : _d3shape.curveLinear;
3163
3197
  const linePath = shouldDrawLine ? _nullishCoalesce(_d3shape.line.call(void 0, ).x((point) => xScale(point.x)).y((point) => yScale(point.y)).curve(lineCurve)(seriesPoints.points), () => ( "")) : "";
@@ -3196,7 +3230,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3196
3230
  `scatter-point-${seriesIndex}-${pointIndex}`
3197
3231
  );
3198
3232
  }),
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,
3233
+ seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _353 => _353.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0,
3200
3234
  `scatter-selection-${seriesIndex}-${pointIndex}`,
3201
3235
  [{ x: xScale(point.x), y: yScale(point.y) }]
3202
3236
  ) : null)
@@ -3209,7 +3243,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3209
3243
  const pointsBySeries = chart.series.map((series) => series.values.map((value, index) => {
3210
3244
  const x = safeNumber(series.categories[index]);
3211
3245
  const y = safeNumber(value);
3212
- const bubble = safeNumber(_optionalChain([series, 'access', _364 => _364.bubbleSizes, 'optionalAccess', _365 => _365[index]]));
3246
+ const bubble = safeNumber(_optionalChain([series, 'access', _354 => _354.bubbleSizes, 'optionalAccess', _355 => _355[index]]));
3213
3247
  return x == null || y == null ? null : { bubble: _nullishCoalesce(bubble, () => ( 1)), index, x, y };
3214
3248
  }).filter((point) => point != null));
3215
3249
  const allX = pointsBySeries.flatMap((points) => points.map((point) => point.x));
@@ -3228,7 +3262,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3228
3262
  const bubbleScaleFactor = clamp((_nullishCoalesce(chart.bubbleScale, () => ( 100))) / 100, 0.2, 4);
3229
3263
  const minRadius = 4;
3230
3264
  const maxRadius = Math.max(minRadius + 2, 12 * bubbleScaleFactor);
3231
- const radiusScale = _d3scale.scaleLinear.call(void 0, ).domain([minBubbleMagnitude, maxBubbleMagnitude <= minBubbleMagnitude ? minBubbleMagnitude + 1 : maxBubbleMagnitude]).range([minRadius, maxRadius]);
3265
+ const radiusScale = linearScale([minBubbleMagnitude, maxBubbleMagnitude <= minBubbleMagnitude ? minBubbleMagnitude + 1 : maxBubbleMagnitude], [minRadius, maxRadius]);
3232
3266
  const safeMaxX = maxX <= minX ? minX + 1 : maxX;
3233
3267
  const safeMaxY = maxY <= minY ? minY + 1 : maxY;
3234
3268
  const xSpan = safeMaxX - minX;
@@ -3239,23 +3273,23 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3239
3273
  chart.categoryAxis,
3240
3274
  minX - xPad,
3241
3275
  safeMaxX + xPad,
3242
- _optionalChain([chart, 'access', _366 => _366.categoryAxis, 'optionalAccess', _367 => _367.crosses]) === "autoZero"
3276
+ _optionalChain([chart, 'access', _356 => _356.categoryAxis, 'optionalAccess', _357 => _357.crosses]) === "autoZero"
3243
3277
  );
3244
3278
  const yDomain = resolveAxisDomainWithChartOverrides(
3245
3279
  chart.valueAxis,
3246
3280
  minY - yPad,
3247
3281
  safeMaxY + yPad,
3248
- _optionalChain([chart, 'access', _368 => _368.valueAxis, 'optionalAccess', _369 => _369.crosses]) === "autoZero"
3282
+ _optionalChain([chart, 'access', _358 => _358.valueAxis, 'optionalAccess', _359 => _359.crosses]) === "autoZero"
3249
3283
  );
3250
- const xScale = _d3scale.scaleLinear.call(void 0, ).domain([xDomain.min, xDomain.max]).range([plot.left, plot.left + plot.width]);
3251
- const yScale = _d3scale.scaleLinear.call(void 0, ).domain([yDomain.min, yDomain.max]).range([plot.top + plot.height, plot.top]);
3284
+ const xScale = linearScale([xDomain.min, xDomain.max], [plot.left, plot.left + plot.width]);
3285
+ const yScale = linearScale([yDomain.min, yDomain.max], [plot.top + plot.height, plot.top]);
3252
3286
  const xTicks = xDomain.ticks;
3253
3287
  const yTicks = yDomain.ticks;
3254
3288
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
3255
3289
  const labelColor = resolveChartAxisTextColor(chart);
3256
3290
  const isBubble3d = chart.bubble3d === true || chart.is3d === true;
3257
3291
  const labelsEnabled = Boolean(
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])
3292
+ _optionalChain([chart, 'access', _360 => _360.dataLabels, 'optionalAccess', _361 => _361.showCategoryName]) || _optionalChain([chart, 'access', _362 => _362.dataLabels, 'optionalAccess', _363 => _363.showSeriesName]) || _optionalChain([chart, 'access', _364 => _364.dataLabels, 'optionalAccess', _365 => _365.showValue]) || _optionalChain([chart, 'access', _366 => _366.dataLabels, 'optionalAccess', _367 => _367.showBubbleSize]) || _optionalChain([chart, 'access', _368 => _368.dataLabels, 'optionalAccess', _369 => _369.showPercent])
3259
3293
  );
3260
3294
  const bubbleTotals = pointsBySeries.map((points) => points.reduce((sum, point) => sum + Math.abs(point.bubble), 0));
3261
3295
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
@@ -3291,9 +3325,9 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3291
3325
  /* @__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
3326
  pointsBySeries.map((points, seriesIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
3293
3327
  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) })
3328
+ /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "0%", stopColor: lightenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _370 => _370.series, 'access', _371 => _371[seriesIndex], 'optionalAccess', _372 => _372.color]), () => ( _optionalChain([chart, 'access', _373 => _373.series, 'access', _374 => _374[seriesIndex], 'optionalAccess', _375 => _375.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.42) }),
3329
+ /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "58%", stopColor: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _376 => _376.series, 'access', _377 => _377[seriesIndex], 'optionalAccess', _378 => _378.color]), () => ( _optionalChain([chart, 'access', _379 => _379.series, 'access', _380 => _380[seriesIndex], 'optionalAccess', _381 => _381.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))) }),
3330
+ /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "stop", { offset: "100%", stopColor: darkenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _382 => _382.series, 'access', _383 => _383[seriesIndex], 'optionalAccess', _384 => _384.color]), () => ( _optionalChain([chart, 'access', _385 => _385.series, 'access', _386 => _386[seriesIndex], 'optionalAccess', _387 => _387.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.18) })
3297
3331
  ] }) }) : null,
3298
3332
  [...points].sort((left, right) => {
3299
3333
  if (left.bubble !== right.bubble) {
@@ -3302,22 +3336,22 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3302
3336
  return left.index - right.index;
3303
3337
  }).map((point) => {
3304
3338
  const series = chart.series[seriesIndex];
3305
- const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _398 => _398.color]), () => ( _optionalChain([series, 'optionalAccess', _399 => _399.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex)));
3339
+ const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _388 => _388.color]), () => ( _optionalChain([series, 'optionalAccess', _389 => _389.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex)));
3306
3340
  const radius = radiusScale(Math.sqrt(Math.max(0, point.bubble)));
3307
3341
  const pieces = [];
3308
- if (_optionalChain([chart, 'access', _400 => _400.dataLabels, 'optionalAccess', _401 => _401.showSeriesName]) && _optionalChain([series, 'optionalAccess', _402 => _402.name])) {
3342
+ if (_optionalChain([chart, 'access', _390 => _390.dataLabels, 'optionalAccess', _391 => _391.showSeriesName]) && _optionalChain([series, 'optionalAccess', _392 => _392.name])) {
3309
3343
  pieces.push(series.name);
3310
3344
  }
3311
- if (_optionalChain([chart, 'access', _403 => _403.dataLabels, 'optionalAccess', _404 => _404.showCategoryName])) {
3345
+ if (_optionalChain([chart, 'access', _393 => _393.dataLabels, 'optionalAccess', _394 => _394.showCategoryName])) {
3312
3346
  pieces.push(formatTickValue(point.x));
3313
3347
  }
3314
- if (_optionalChain([chart, 'access', _405 => _405.dataLabels, 'optionalAccess', _406 => _406.showValue])) {
3348
+ if (_optionalChain([chart, 'access', _395 => _395.dataLabels, 'optionalAccess', _396 => _396.showValue])) {
3315
3349
  pieces.push(formatTickValue(point.y));
3316
3350
  }
3317
- if (_optionalChain([chart, 'access', _407 => _407.dataLabels, 'optionalAccess', _408 => _408.showBubbleSize])) {
3351
+ if (_optionalChain([chart, 'access', _397 => _397.dataLabels, 'optionalAccess', _398 => _398.showBubbleSize])) {
3318
3352
  pieces.push(formatTickValue(point.bubble));
3319
3353
  }
3320
- if (_optionalChain([chart, 'access', _409 => _409.dataLabels, 'optionalAccess', _410 => _410.showPercent])) {
3354
+ if (_optionalChain([chart, 'access', _399 => _399.dataLabels, 'optionalAccess', _400 => _400.showPercent])) {
3321
3355
  pieces.push(`${Math.round(Math.abs(point.bubble) / Math.max(1, _nullishCoalesce(bubbleTotals[seriesIndex], () => ( 1))) * 100)}%`);
3322
3356
  }
3323
3357
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
@@ -3334,7 +3368,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3334
3368
  strokeWidth: isBubble3d ? 1.2 : 1
3335
3369
  }
3336
3370
  ),
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,
3371
+ isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _401 => _401.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionRectHandles.call(void 0,
3338
3372
  `bubble-selection-${seriesIndex}-${point.index}`,
3339
3373
  xScale(point.x) - radius,
3340
3374
  yScale(point.y) - radius,
@@ -3381,22 +3415,22 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
3381
3415
  const centerY = plot.top + plot.height * 0.52;
3382
3416
  const radius = Math.max(22, Math.min(plot.width, plot.height) * 0.38);
3383
3417
  const values = chart.series.flatMap((series) => series.values.slice(0, categories.length).map((value) => safeNumber(value)).filter((value) => value != null));
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") {
3418
+ const hasExplicitMin = typeof _optionalChain([chart, 'access', _402 => _402.valueAxis, 'optionalAccess', _403 => _403.min]) === "number" && Number.isFinite(chart.valueAxis.min);
3419
+ const hasExplicitMax = typeof _optionalChain([chart, 'access', _404 => _404.valueAxis, 'optionalAccess', _405 => _405.max]) === "number" && Number.isFinite(chart.valueAxis.max);
3420
+ let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access', _406 => _406.valueAxis, 'optionalAccess', _407 => _407.min])) : Math.min(0, ...values.length ? values : [0]);
3421
+ let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access', _408 => _408.valueAxis, 'optionalAccess', _409 => _409.max])) : Math.max(1, ...values.length ? values : [1]);
3422
+ if (_optionalChain([chart, 'access', _410 => _410.valueAxis, 'optionalAccess', _411 => _411.crosses]) === "autoZero") {
3389
3423
  minValue = Math.min(0, minValue);
3390
3424
  }
3391
3425
  const safeMax = maxValue <= minValue ? minValue + 1 : maxValue;
3392
3426
  const span = Math.max(1e-6, safeMax - minValue);
3393
- const candidateMajorUnit = typeof _optionalChain([chart, 'access', _422 => _422.valueAxis, 'optionalAccess', _423 => _423.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : void 0;
3427
+ const candidateMajorUnit = typeof _optionalChain([chart, 'access', _412 => _412.valueAxis, 'optionalAccess', _413 => _413.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : void 0;
3394
3428
  const preferredMajorUnit = candidateMajorUnit && span / candidateMajorUnit >= 3 ? candidateMajorUnit : buildNiceStep(minValue, safeMax, 6);
3395
3429
  const ticks = buildNumericTickValues(minValue, safeMax, preferredMajorUnit);
3396
3430
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
3397
3431
  const labelColor = resolveChartAxisTextColor(chart);
3398
3432
  const filled = chart.radarStyle === "filled";
3399
- const showSpokes = _optionalChain([chart, 'access', _424 => _424.categoryAxis, 'optionalAccess', _425 => _425.majorGridlines]) === true;
3433
+ const showSpokes = _optionalChain([chart, 'access', _414 => _414.categoryAxis, 'optionalAccess', _415 => _415.majorGridlines]) === true;
3400
3434
  const angleAt = (index) => Math.PI * 2 * index / categories.length - Math.PI / 2;
3401
3435
  const radialPoint = (index, valueRatio) => {
3402
3436
  const angle = angleAt(index);
@@ -3498,7 +3532,7 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
3498
3532
  },
3499
3533
  `radar-point-${seriesIndex}-${point.pointIndex}`
3500
3534
  )) : null,
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,
3535
+ definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _416 => _416.kind]) !== "point" ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0,
3502
3536
  `radar-selection-${seriesIndex}-${point.pointIndex}`,
3503
3537
  [{ x: point.x, y: point.y }]
3504
3538
  ) : null)
@@ -3523,14 +3557,14 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3523
3557
  const arcs = _d3shape.pie.call(void 0, ).value((entry) => entry.value).sort(null).startAngle(startAngle).endAngle(startAngle + Math.PI * 2)(pieData);
3524
3558
  const arcPath = _d3shape.arc.call(void 0, ).innerRadius(innerRadius).outerRadius(outerRadius);
3525
3559
  const isPie3d = chartType === "Pie3D" || chartType === "PieExploded" && chart.is3d === true;
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));
3560
+ const rotX = _nullishCoalesce(_optionalChain([chart, 'access', _417 => _417.view3d, 'optionalAccess', _418 => _418.rotX]), () => ( 20));
3561
+ const perspective = _nullishCoalesce(_optionalChain([chart, 'access', _419 => _419.view3d, 'optionalAccess', _420 => _420.perspective]), () => ( 30));
3528
3562
  const tiltFromRotX = clamp(0.14 + rotX / 90 * 0.72, 0.12, 0.92);
3529
3563
  const perspectiveCompression = clamp(1 - perspective / 180, 0.55, 1);
3530
3564
  const tilt = isPie3d ? clamp(tiltFromRotX * perspectiveCompression, 0.14, 0.78) : 1;
3531
- const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access', _431 => _431.view3d, 'optionalAccess', _432 => _432.depthPercent]), () => ( 100))) / 100;
3565
+ const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access', _421 => _421.view3d, 'optionalAccess', _422 => _422.depthPercent]), () => ( 100))) / 100;
3532
3566
  const depth = isPie3d ? Math.max(9, outerRadius * 0.28 * depthScale) : 0;
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]));
3567
+ const dataLabelsEnabled = Boolean(_optionalChain([chart, 'access', _423 => _423.dataLabels, 'optionalAccess', _424 => _424.showCategoryName]) || _optionalChain([chart, 'access', _425 => _425.dataLabels, 'optionalAccess', _426 => _426.showPercent]) || _optionalChain([chart, 'access', _427 => _427.dataLabels, 'optionalAccess', _428 => _428.showValue]));
3534
3568
  const total = pieData.reduce((sum, entry) => sum + entry.value, 0);
3535
3569
  const shadowId = `pie3d-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
3536
3570
  const baseShadowId = `pie3d-base-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
@@ -3541,8 +3575,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3541
3575
  right: layout.width - 6,
3542
3576
  top: layout.plot.top + 8
3543
3577
  };
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;
3578
+ const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access', _429 => _429.dataLabels, 'optionalAccess', _430 => _430.pointLabels]), () => ( []))).map((label) => [label.index, label]));
3579
+ const centerValuePointLabel = chartType === "Doughnut" ? _nullishCoalesce((_nullishCoalesce(_optionalChain([chart, 'access', _431 => _431.dataLabels, 'optionalAccess', _432 => _432.pointLabels]), () => ( []))).find((label) => label.deleted !== true && label.showValue === true && label.showCategoryName !== true && label.showPercent !== true && label.showSeriesName !== true && label.showBubbleSize !== true), () => ( null)) : null;
3546
3580
  const centerValueEntry = centerValuePointLabel ? _nullishCoalesce(pieData.find((entry) => entry.index === centerValuePointLabel.index), () => ( null)) : null;
3547
3581
  const shouldRenderCenterValue = chartType === "Doughnut" && centerValueEntry != null;
3548
3582
  const centerValueLooksPercent = centerValueEntry != null && total > 0 && total <= 1.0000001 && centerValueEntry.value >= 0 && centerValueEntry.value <= 1.0000001;
@@ -3551,13 +3585,13 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3551
3585
  14,
3552
3586
  Math.min(
3553
3587
  Math.max(20, innerRadius * 0.72),
3554
- (_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess', _443 => _443.fontSizePt]), () => ( 28))) * 0.85
3588
+ (_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess', _433 => _433.fontSizePt]), () => ( 28))) * 0.85
3555
3589
  )
3556
3590
  ) : 0;
3557
3591
  const resolveSliceExplosion = (pointIndex) => {
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)));
3592
+ const pointStyle = _optionalChain([pieSeries, 'optionalAccess', _434 => _434.dataPointStyles, 'optionalAccess', _435 => _435.find, 'call', _436 => _436((entry) => entry.index === pointIndex)]);
3593
+ const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess', _437 => _437.shapeProperties, 'optionalAccess', _438 => _438.xmlExplosion]) === "number" ? pieSeries.shapeProperties.xmlExplosion : 0;
3594
+ const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess', _439 => _439.explosion]), () => ( seriesExplosion)), () => ( 0)));
3561
3595
  if (rawExplosion <= 0) {
3562
3596
  return 0;
3563
3597
  }
@@ -3658,7 +3692,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3658
3692
  const midAngle = (arc.startAngle + arc.endAngle) / 2;
3659
3693
  const explodeX = Math.sin(midAngle) * explosion;
3660
3694
  const explodeY = -Math.cos(midAngle) * explosion * (isPie3d ? tilt : 1);
3661
- const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _450 => _450.kind]) !== "point";
3695
+ const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _440 => _440.kind]) !== "point";
3662
3696
  const sliceHandlePoints = isSliceSelected ? [
3663
3697
  pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, arc.startAngle),
3664
3698
  pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, midAngle),
@@ -3672,12 +3706,12 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3672
3706
  const labelX = centerX + Math.sin(midAngle) * labelRadius + explodeX;
3673
3707
  const labelY = centerY - Math.cos(midAngle) * labelRadius * (isPie3d ? tilt : 1) + explodeY;
3674
3708
  const pieces = [];
3675
- if (_optionalChain([chart, 'access', _451 => _451.dataLabels, 'optionalAccess', _452 => _452.showCategoryName]) && arc.data.label.trim().length > 0) {
3709
+ if (_optionalChain([chart, 'access', _441 => _441.dataLabels, 'optionalAccess', _442 => _442.showCategoryName]) && arc.data.label.trim().length > 0) {
3676
3710
  pieces.push(arc.data.label);
3677
3711
  }
3678
3712
  const pointLabel = pointLabelByIndex.get(arc.data.index);
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])));
3713
+ const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _443 => _443.showValue]), () => ( _optionalChain([chart, 'access', _444 => _444.dataLabels, 'optionalAccess', _445 => _445.showValue])));
3714
+ const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _446 => _446.showPercent]), () => ( _optionalChain([chart, 'access', _447 => _447.dataLabels, 'optionalAccess', _448 => _448.showPercent])));
3681
3715
  if (showValue) {
3682
3716
  pieces.push(formatTickValue(arc.data.value));
3683
3717
  }
@@ -3742,7 +3776,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
3742
3776
  const pieSeriesIndex = selectPrimaryPieSeriesIndex(chart);
3743
3777
  const pieSeries = chart.series[pieSeriesIndex];
3744
3778
  const categories = getCategoryLabels(chart);
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))))]), () => ( []));
3779
+ const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess', _449 => _449.values, 'access', _450 => _450.map, 'call', _451 => _451((value) => Math.max(0, _nullishCoalesce(safeNumber(value), () => ( 0))))]), () => ( []));
3746
3780
  if (values.length === 0) {
3747
3781
  return null;
3748
3782
  }
@@ -3907,24 +3941,24 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3907
3941
  return null;
3908
3942
  }
3909
3943
  const isContour = isContourSurfaceChart(chart);
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);
3944
+ const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _452 => _452.valueAxis, 'optionalAccess', _453 => _453.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _454 => _454.view3d, 'optionalAccess', _455 => _455.heightPercent]), _optionalChain([chart, 'access', _456 => _456.view3d, 'optionalAccess', _457 => _457.depthPercent]), layout);
3911
3945
  const minValue = domain.minValue;
3912
3946
  const safeMax = domain.safeMax;
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))))));
3947
+ const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _458 => _458.backWall, 'optionalAccess', _459 => _459.fillColor]), () => ( "#d9d9df"));
3948
+ const wallLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _460 => _460.backWall, 'optionalAccess', _461 => _461.lineColor]), () => ( _optionalChain([chart, 'access', _462 => _462.sideWall, 'optionalAccess', _463 => _463.lineColor]))), () => ( _optionalChain([chart, 'access', _464 => _464.floor, 'optionalAccess', _465 => _465.lineColor]))), () => ( (_nullishCoalesce(chart.axisLineColor, () => ( lightenColor(resolveSurfaceBaseColor(chart, palette), 0.4))))));
3915
3949
  if (isContour) {
3916
3950
  const faces2 = [];
3917
3951
  const lines = [];
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)));
3952
+ const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _468 => _468.view3d, 'optionalAccess', _469 => _469.rotY]), () => ( 0)));
3919
3953
  const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
3920
- const inset = _optionalChain([chart, 'access', _480 => _480.valueAxis, 'optionalAccess', _481 => _481.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
3954
+ const inset = _optionalChain([chart, 'access', _470 => _470.valueAxis, 'optionalAccess', _471 => _471.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
3921
3955
  const dataWidth = plot.width - 2 * inset;
3922
3956
  for (let rowIndex = 0; rowIndex < rows - 1; rowIndex += 1) {
3923
3957
  for (let columnIndex = 0; columnIndex < cols - 1; columnIndex += 1) {
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]]);
3958
+ const p00 = _optionalChain([matrix, 'access', _472 => _472[rowIndex], 'optionalAccess', _473 => _473[columnIndex]]);
3959
+ const p10 = _optionalChain([matrix, 'access', _474 => _474[rowIndex], 'optionalAccess', _475 => _475[columnIndex + 1]]);
3960
+ const p01 = _optionalChain([matrix, 'access', _476 => _476[rowIndex + 1], 'optionalAccess', _477 => _477[columnIndex]]);
3961
+ const p11 = _optionalChain([matrix, 'access', _478 => _478[rowIndex + 1], 'optionalAccess', _479 => _479[columnIndex + 1]]);
3928
3962
  if (p00 == null || p10 == null || p01 == null || p11 == null) {
3929
3963
  continue;
3930
3964
  }
@@ -3944,7 +3978,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3944
3978
  y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
3945
3979
  z: (point.y - plot.top) / plot.height * ratios.depth
3946
3980
  }));
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)));
3981
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _480 => _480.view3d, 'optionalAccess', _481 => _481.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _482 => _482.view3d, 'optionalAccess', _483 => _483.rotY]), () => ( 0)));
3948
3982
  for (let band = 0; band < domain.ticks.length - 1; band += 1) {
3949
3983
  const lower = domain.ticks[band];
3950
3984
  const upper = domain.ticks[band + 1];
@@ -3957,7 +3991,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3957
3991
  if (!chart.wireframe) {
3958
3992
  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}`));
3959
3993
  }
3960
- const widths = _optionalChain([chart, 'access', _494 => _494.raw, 'optionalAccess', _495 => _495.bandFormatLineWidths]);
3994
+ const widths = _optionalChain([chart, 'access', _484 => _484.raw, 'optionalAccess', _485 => _485.bandFormatLineWidths]);
3961
3995
  for (const group of _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true)) {
3962
3996
  const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
3963
3997
  lines.push(
@@ -3967,7 +4001,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3967
4001
  d: group.edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
3968
4002
  fill: "none",
3969
4003
  stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint),
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))
4004
+ strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _486 => _486[group.band]]), () => ( _optionalChain([chart, 'access', _487 => _487.series, 'access', _488 => _488[0], 'optionalAccess', _489 => _489.lineWidthPx]))), () => ( 1))
3971
4005
  },
3972
4006
  `surface-edge-${key}-${group.band}`
3973
4007
  )
@@ -3981,12 +4015,12 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3981
4015
  /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
3982
4016
  "rect",
3983
4017
  {
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,
4018
+ fill: _optionalChain([chart, 'access', _490 => _490.raw, 'optionalAccess', _491 => _491.plotAreaNoFill]) === true ? "transparent" : typeof _optionalChain([chart, 'access', _492 => _492.raw, 'optionalAccess', _493 => _493.plotAreaFillColor]) === "string" ? chart.raw.plotAreaFillColor : backgroundFill,
3985
4019
  x: layout.plot.left,
3986
4020
  y: layout.plot.top,
3987
4021
  width: layout.plot.width,
3988
4022
  height: layout.plot.height,
3989
- stroke: typeof _optionalChain([chart, 'access', _504 => _504.raw, 'optionalAccess', _505 => _505.plotAreaLineColor]) === "string" ? chart.raw.plotAreaLineColor : wallLineColor
4023
+ stroke: typeof _optionalChain([chart, 'access', _494 => _494.raw, 'optionalAccess', _495 => _495.plotAreaLineColor]) === "string" ? chart.raw.plotAreaLineColor : wallLineColor
3990
4024
  }
3991
4025
  ),
3992
4026
  /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill: "none", height: plot.height, stroke: wallLineColor, width: plot.width, x: plot.left, y: plot.top }),
@@ -3994,11 +4028,11 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3994
4028
  lines
3995
4029
  ] });
3996
4030
  }
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;
4031
+ const rotX = (_nullishCoalesce(_optionalChain([chart, 'access', _496 => _496.view3d, 'optionalAccess', _497 => _497.rotX]), () => ( 25))) * (Math.PI / 180);
4032
+ const rotY = (_nullishCoalesce(_optionalChain([chart, 'access', _498 => _498.view3d, 'optionalAccess', _499 => _499.rotY]), () => ( 30))) * (Math.PI / 180);
4033
+ const usePerspective = _optionalChain([chart, 'access', _500 => _500.view3d, 'optionalAccess', _501 => _501.rAngAx]) === false;
4000
4034
  const perspectiveStrength = clamp(
4001
- (_nullishCoalesce(_optionalChain([chart, 'access', _512 => _512.view3d, 'optionalAccess', _513 => _513.perspective]), () => ( (usePerspective ? 30 : 0)))) / 100,
4035
+ (_nullishCoalesce(_optionalChain([chart, 'access', _502 => _502.view3d, 'optionalAccess', _503 => _503.perspective]), () => ( (usePerspective ? 30 : 0)))) / 100,
4002
4036
  0,
4003
4037
  1
4004
4038
  );
@@ -4013,7 +4047,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4013
4047
  const normalizedX = cols <= 1 ? 0 : (columnIndex / (cols - 1) - 0.5) * 2;
4014
4048
  const normalizedY = hasValue ? -(_chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
4015
4049
  const normalizedZ = rows <= 1 ? 0 : (rowIndex / (rows - 1) - 0.5) * 2 * depthScale;
4016
- if (_optionalChain([chart, 'access', _514 => _514.view3d, 'optionalAccess', _515 => _515.rAngAx]) !== false) {
4050
+ if (_optionalChain([chart, 'access', _504 => _504.view3d, 'optionalAccess', _505 => _505.rAngAx]) !== false) {
4017
4051
  return {
4018
4052
  depth: normalizedZ,
4019
4053
  hasValue,
@@ -4051,7 +4085,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4051
4085
  return { ...projected, x: centerX + (projected.x - centerRawX) * scale, y: centerY + (projected.y - centerRawY) * scale };
4052
4086
  };
4053
4087
  const wallNodes = [];
4054
- const backRow = _optionalChain([chart, 'access', _516 => _516.view3d, 'optionalAccess', _517 => _517.rAngAx]) !== false || cosX * cosY >= 0 ? rows - 1 : 0;
4088
+ const backRow = _optionalChain([chart, 'access', _506 => _506.view3d, 'optionalAccess', _507 => _507.rAngAx]) !== false || cosX * cosY >= 0 ? rows - 1 : 0;
4055
4089
  const sideColumn = sinY >= 0 ? 0 : cols - 1;
4056
4090
  const wallPoint = (x, y, value) => ({ x, y, value });
4057
4091
  const addWall = (key, points, color, hidden) => {
@@ -4061,18 +4095,18 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4061
4095
  y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4062
4096
  z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
4063
4097
  }));
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);
4098
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _508 => _508.view3d, 'optionalAccess', _509 => _509.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _510 => _510.view3d, 'optionalAccess', _511 => _511.rotY]), () => ( 30)), _optionalChain([chart, 'access', _512 => _512.view3d, 'optionalAccess', _513 => _513.rAngAx]) !== false);
4065
4099
  const baseColor = _nullishCoalesce(color, () => ( wallFill));
4066
4100
  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));
4067
4101
  };
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])) {
4102
+ 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', _514 => _514.floor, 'optionalAccess', _515 => _515.fillColor]), _optionalChain([chart, 'access', _516 => _516.floor, 'optionalAccess', _517 => _517.hidden]));
4103
+ addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access', _518 => _518.backWall, 'optionalAccess', _519 => _519.fillColor]), _optionalChain([chart, 'access', _520 => _520.backWall, 'optionalAccess', _521 => _521.hidden]));
4104
+ addWall("side", [wallPoint(sideColumn, 0, safeMax), wallPoint(sideColumn, rows - 1, safeMax), wallPoint(sideColumn, rows - 1, minValue), wallPoint(sideColumn, 0, minValue)], _optionalChain([chart, 'access', _522 => _522.sideWall, 'optionalAccess', _523 => _523.fillColor]), _optionalChain([chart, 'access', _524 => _524.sideWall, 'optionalAccess', _525 => _525.hidden]));
4105
+ if (_optionalChain([chart, 'access', _526 => _526.valueAxis, 'optionalAccess', _527 => _527.majorGridlines])) {
4072
4106
  for (const tick of domain.ticks) {
4073
4107
  const edges = [
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)]]
4108
+ ..._optionalChain([chart, 'access', _528 => _528.backWall, 'optionalAccess', _529 => _529.hidden]) ? [] : [[wallPoint(0, backRow, tick), wallPoint(cols - 1, backRow, tick)]],
4109
+ ..._optionalChain([chart, 'access', _530 => _530.sideWall, 'optionalAccess', _531 => _531.hidden]) ? [] : [[wallPoint(sideColumn, 0, tick), wallPoint(sideColumn, rows - 1, tick)]]
4076
4110
  ];
4077
4111
  wallNodes.push(/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { fill: "none", stroke: _nullishCoalesce(chart.valueAxis.majorGridlineColor, () => ( wallLineColor)), strokeWidth: 1, d: edges.map((edge) => {
4078
4112
  const [from, to] = edge.map(projectPoint);
@@ -4097,7 +4131,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4097
4131
  y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4098
4132
  z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
4099
4133
  }));
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);
4134
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _532 => _532.view3d, 'optionalAccess', _533 => _533.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _534 => _534.view3d, 'optionalAccess', _535 => _535.rotY]), () => ( 30)), _optionalChain([chart, 'access', _536 => _536.view3d, 'optionalAccess', _537 => _537.rAngAx]) !== false);
4101
4135
  for (let band = 0; band < domain.ticks.length - 1; band += 1) {
4102
4136
  const lower = domain.ticks[band];
4103
4137
  const upper = domain.ticks[band + 1];
@@ -4105,7 +4139,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4105
4139
  if (polygon.length < 3) continue;
4106
4140
  const projected = polygon.map(projectPoint);
4107
4141
  const midpoint = (lower + upper) / 2;
4108
- const widths = _optionalChain([chart, 'access', _548 => _548.raw, 'optionalAccess', _549 => _549.bandFormatLineWidths]);
4142
+ const widths = _optionalChain([chart, 'access', _538 => _538.raw, 'optionalAccess', _539 => _539.bandFormatLineWidths]);
4109
4143
  const edgeGroups = _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true);
4110
4144
  faces.push({
4111
4145
  depth: projected.reduce((sum, point) => sum + point.depth, 0) / projected.length,
@@ -4114,7 +4148,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4114
4148
  edgeGroups.map((group) => {
4115
4149
  const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
4116
4150
  const edges = group.edges.map(([from, to]) => [projectPoint(from), projectPoint(to)]);
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}`);
4151
+ return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _540 => _540[group.band]]), () => ( _optionalChain([chart, 'access', _541 => _541.series, 'access', _542 => _542[0], 'optionalAccess', _543 => _543.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") }, `surface-edge-${group.band}`);
4118
4152
  })
4119
4153
  ] }, `surface-band-${rowIndex}-${columnIndex}-${triangleIndex}-${band}`)
4120
4154
  });
@@ -4178,7 +4212,12 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
4178
4212
  }
4179
4213
  const plot = layout.plot;
4180
4214
  const labels = stages.map((stage) => stage.label);
4181
- const xScale = _d3scale.scaleBand.call(void 0, ).domain(labels).range([plot.left, plot.left + plot.width]).paddingInner(0.34).paddingOuter(0.18);
4215
+ const xScale = bandScale(
4216
+ labels,
4217
+ [plot.left, plot.left + plot.width],
4218
+ 0.34,
4219
+ 0.18
4220
+ );
4182
4221
  const bars = [];
4183
4222
  let runningTotal = 0;
4184
4223
  stages.forEach((stage, index) => {
@@ -4195,8 +4234,8 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
4195
4234
  if (maxValue <= minValue) {
4196
4235
  maxValue = minValue + 1;
4197
4236
  }
4198
- const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range([plot.top + plot.height, plot.top]);
4199
- const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access', _554 => _554.valueAxis, 'optionalAccess', _555 => _555.majorUnit]));
4237
+ const yScale = linearScale([minValue, maxValue], [plot.top + plot.height, plot.top]);
4238
+ const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access', _544 => _544.valueAxis, 'optionalAccess', _545 => _545.majorUnit]));
4200
4239
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
4201
4240
  const labelColor = resolveChartAxisTextColor(chart);
4202
4241
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
@@ -4218,7 +4257,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
4218
4257
  /* @__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) }),
4219
4258
  bars.map((bar, index) => {
4220
4259
  const bandLeft = _nullishCoalesce(xScale(bar.label), () => ( plot.left));
4221
- const bandWidth = xScale.bandwidth();
4260
+ const bandWidth = xScale.bandwidth;
4222
4261
  const topValue = Math.max(bar.start, bar.end);
4223
4262
  const bottomValue = Math.min(bar.start, bar.end);
4224
4263
  const top = yScale(topValue);
@@ -4234,7 +4273,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
4234
4273
  stroke: lightenColor(axisColor, 0.35),
4235
4274
  strokeDasharray: "3 3",
4236
4275
  strokeWidth: 1,
4237
- x1: (_nullishCoalesce(xScale(connectorStart.label), () => ( plot.left))) + xScale.bandwidth(),
4276
+ x1: (_nullishCoalesce(xScale(connectorStart.label), () => ( plot.left))) + xScale.bandwidth,
4238
4277
  x2: bandLeft,
4239
4278
  y1: connectorY,
4240
4279
  y2: connectorY
@@ -4470,8 +4509,8 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
4470
4509
  const minValue = Math.min(...allValues);
4471
4510
  const maxValue = Math.max(...allValues);
4472
4511
  const valueDomain = resolveAxisDomainWithChartOverrides(chart.valueAxis, minValue, maxValue, false);
4473
- const yScale = _d3scale.scaleLinear.call(void 0, ).domain([valueDomain.min, valueDomain.max]).range([layout.plot.top + layout.plot.height, layout.plot.top]);
4474
- const xScale = _d3scale.scalePoint.call(void 0, ).domain(seriesStats.map((_, index) => index)).range([layout.plot.left + 24, layout.plot.left + layout.plot.width - 24]);
4512
+ const yScale = linearScale([valueDomain.min, valueDomain.max], [layout.plot.top + layout.plot.height, layout.plot.top]);
4513
+ const xScale = pointScale(seriesStats.map((_, index) => index), [layout.plot.left + 24, layout.plot.left + layout.plot.width - 24]);
4475
4514
  const gap = seriesStats.length > 1 ? Math.abs((_nullishCoalesce(xScale(1), () => ( 0))) - (_nullishCoalesce(xScale(0), () => ( 0)))) : layout.plot.width * 0.5;
4476
4515
  const boxWidth = clamp(gap * 0.34, 20, 54);
4477
4516
  const capWidth = Math.max(8, boxWidth * 0.52);
@@ -4686,132 +4725,6 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
4686
4725
  })
4687
4726
  ] });
4688
4727
  }
4689
- function renderRegionMapChart(chart, palette, layout, selectedChartElement, { geoIdentity, geoMercator, geoNaturalEarth1, geoPath, resolveRegionMapFeatureSet, resolveRegionMapFeature, getRegionMapBaseFeatures }) {
4690
- const primarySeriesIndex = Math.max(0, chart.series.findIndex((series) => series.hidden !== true));
4691
- const primarySeries = _nullishCoalesce(chart.series[primarySeriesIndex], () => ( null));
4692
- if (!primarySeries) {
4693
- return null;
4694
- }
4695
- const labels = getCategoryLabels(chart);
4696
- const layoutProperties = resolveRegionMapLayoutProperties(primarySeries);
4697
- const geography = _optionalChain([layoutProperties, 'optionalAccess', _556 => _556.geography]) && typeof layoutProperties.geography === "object" ? layoutProperties.geography : null;
4698
- const featureSet = resolveRegionMapFeatureSet(labels, geography);
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;
4701
- const projection = featureSet === "us-state" ? geoIdentity() : projectionType === "miller" ? geoMercator() : geoNaturalEarth1();
4702
- const availableFeatures = getRegionMapBaseFeatures(featureSet);
4703
- const categoricalValues = resolveRegionMapColorStrings(primarySeries);
4704
- const categoricalColorByLabel = categoricalValues ? new Map(
4705
- Array.from(new Set(categoricalValues.filter(Boolean))).map((value, index) => [
4706
- value,
4707
- chartPointColor(chart, index, primarySeriesIndex)
4708
- ])
4709
- ) : null;
4710
- const entries = labels.map((label, index) => {
4711
- const feature = resolveRegionMapFeature(label, featureSet);
4712
- const value = safeNumber(primarySeries.values[index]);
4713
- const colorLabel = _optionalChain([categoricalValues, 'optionalAccess', _559 => _559[index]]) || null;
4714
- return {
4715
- colorLabel,
4716
- feature,
4717
- key: normalizeCategoryLabel(label),
4718
- label: normalizeCategoryLabel(label),
4719
- value
4720
- };
4721
- }).filter((entry) => entry.feature != null && (entry.value != null || entry.colorLabel != null));
4722
- const fitToMatchedData = entries.length > 0 && (viewedRegionType === "dataOnly" || entries.length === 1);
4723
- const fitFeatures = fitToMatchedData ? entries.map((entry) => entry.feature) : availableFeatures;
4724
- projection.fitExtent(
4725
- [
4726
- [layout.plot.left + 8, layout.plot.top + 8],
4727
- [layout.plot.left + layout.plot.width - 8, layout.plot.top + layout.plot.height - 8]
4728
- ],
4729
- {
4730
- type: "FeatureCollection",
4731
- features: fitFeatures
4732
- }
4733
- );
4734
- const path = geoPath(projection);
4735
- const baseFeatures = fitToMatchedData ? fitFeatures : availableFeatures;
4736
- const noDataFill = resolveRegionMapNoDataColor(chart, primarySeriesIndex);
4737
- const outlineColor = chart.chartAreaBorderColor && chart.chartAreaBorderColor !== "transparent" ? chart.chartAreaBorderColor : darkenColor(noDataFill, 0.22);
4738
- const numericEntryValues = primarySeries.values.map(safeNumber).filter((value) => typeof value === "number" && Number.isFinite(value));
4739
- const minValue = numericEntryValues.length > 0 ? Math.min(...numericEntryValues) : 0;
4740
- const maxValue = numericEntryValues.length > 0 ? Math.max(...numericEntryValues) : 1;
4741
- const showRegionLabels = _optionalChain([layoutProperties, 'optionalAccess', _560 => _560.regionLabelLayout]) !== "none";
4742
- return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
4743
- baseFeatures.map((feature, index) => {
4744
- const d = path(feature);
4745
- if (!d) {
4746
- return null;
4747
- }
4748
- return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
4749
- "path",
4750
- {
4751
- d,
4752
- fill: noDataFill,
4753
- stroke: outlineColor,
4754
- strokeLinejoin: "round",
4755
- strokeWidth: 0.6
4756
- },
4757
- `region-map-base-${_nullishCoalesce(feature.id, () => ( "feature"))}-${index}`
4758
- );
4759
- }),
4760
- entries.map((entry, index) => {
4761
- const d = path(entry.feature);
4762
- if (!d) {
4763
- return null;
4764
- }
4765
- const fill = entry.value != null ? (() => {
4766
- const ratio = maxValue <= minValue ? 1 : (entry.value - minValue) / Math.max(1e-6, maxValue - minValue);
4767
- return resolveRegionMapValueColor(chart, primarySeriesIndex, ratio);
4768
- })() : _nullishCoalesce(_optionalChain([categoricalColorByLabel, 'optionalAccess', _561 => _561.get, 'call', _562 => _562(_nullishCoalesce(entry.colorLabel, () => ( "")))]), () => ( resolveRegionMapDataColor(chart, primarySeriesIndex)));
4769
- const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, primarySeriesIndex, index);
4770
- const centroid = path.centroid(entry.feature);
4771
- const canShowSelectionDot = Number.isFinite(centroid[0]) && Number.isFinite(centroid[1]);
4772
- return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
4773
- /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
4774
- "path",
4775
- {
4776
- ...chartElementDataProps(primarySeriesIndex, index),
4777
- d,
4778
- fill,
4779
- stroke: selected ? "#64748b" : darkenColor(fill, 0.18),
4780
- strokeLinejoin: "round",
4781
- strokeWidth: selected ? 1.8 : 0.85
4782
- }
4783
- ),
4784
- selected && canShowSelectionDot ? _chunkM55TBS4Xcjs.renderSelectionPointHandles.call(void 0, `region-map-selection-${index}`, [{ x: centroid[0], y: centroid[1] }]) : null
4785
- ] }, `region-map-value-${entry.key || index}`);
4786
- }),
4787
- showRegionLabels ? entries.map((entry, index) => {
4788
- const bounds = path.bounds(entry.feature);
4789
- const [[x0, y0], [x1, y1]] = bounds;
4790
- const width = x1 - x0;
4791
- const height = y1 - y0;
4792
- if (!Number.isFinite(width) || !Number.isFinite(height) || width < 26 || height < 12) {
4793
- return null;
4794
- }
4795
- const centroid = path.centroid(entry.feature);
4796
- if (!Number.isFinite(centroid[0]) || !Number.isFinite(centroid[1])) {
4797
- return null;
4798
- }
4799
- return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
4800
- "text",
4801
- {
4802
- fill: resolveChartTextColor(chart),
4803
- fontSize: 9,
4804
- fontWeight: 600,
4805
- textAnchor: "middle",
4806
- x: centroid[0],
4807
- y: centroid[1],
4808
- children: truncateSvgText(entry.label, Math.max(28, width - 4), 9)
4809
- },
4810
- `region-map-label-${entry.key || index}`
4811
- );
4812
- }) : null
4813
- ] });
4814
- }
4815
4728
  function renderUnsupported(chart, palette, layout, chartType) {
4816
4729
  return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { children: [
4817
4730
  /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
@@ -4892,7 +4805,7 @@ function renderChartPlot(chart, palette, layout, chartType, selectedChartElement
4892
4805
  return renderTreemapChart(chart, palette, layout, selectedChartElement);
4893
4806
  }
4894
4807
  if (chartType === "RegionMap") {
4895
- return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, RegionMapPlot, { chart, layout, palette, selectedChartElement });
4808
+ return renderUnsupported(chart, palette, layout, chartType);
4896
4809
  }
4897
4810
  return renderUnsupported(chart, palette, layout, chartType);
4898
4811
  }
@@ -4908,7 +4821,7 @@ var MemoChartSvg = _chunkAZWBTFJIcjs.N.call(void 0, function MemoChartSvg2({
4908
4821
  const legendItems = getLegendItems(chart, renderChartType, palette);
4909
4822
  const layout = buildLayout(chart, rect, legendItems);
4910
4823
  const chartRaw = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
4911
- const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess', _563 => _563.chartAreaNoFill]) === true || _optionalChain([chartRaw, 'optionalAccess', _564 => _564.plotAreaNoFill]) === true;
4824
+ const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess', _546 => _546.chartAreaNoFill]) === true || _optionalChain([chartRaw, 'optionalAccess', _547 => _547.plotAreaNoFill]) === true;
4912
4825
  const background = _nullishCoalesce(chart.chartAreaFillColor, () => ( (explicitNoFill ? "transparent" : "#ffffff")));
4913
4826
  const borderColor = _nullishCoalesce(chart.chartAreaBorderColor, () => ( "transparent"));
4914
4827
  const normalizedBackground = background.trim().toLowerCase();
@@ -4925,6 +4838,7 @@ var MemoChartSvg = _chunkAZWBTFJIcjs.N.call(void 0, function MemoChartSvg2({
4925
4838
  "svg",
4926
4839
  {
4927
4840
  "aria-label": _nullishCoalesce(_nullishCoalesce(chart.title, () => ( chart.name)), () => ( "Chart")),
4841
+ "data-xlsx-chart-renderer": "legacy",
4928
4842
  onDoubleClick: handleDoubleClick,
4929
4843
  onPointerDown: handlePointerDown,
4930
4844
  role: "img",
@@ -4967,4 +4881,4 @@ var MemoChartSvg = _chunkAZWBTFJIcjs.N.call(void 0, function MemoChartSvg2({
4967
4881
 
4968
4882
 
4969
4883
  exports.MemoChartSvg = MemoChartSvg;
4970
- //# sourceMappingURL=chart-renderer-W7XW24JI.cjs.map
4884
+ //# sourceMappingURL=chart-renderer-2K7XSPVG.cjs.map