@extend-ai/react-xlsx 0.20.2 → 0.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-IQ4UDS5M.js +209 -0
- package/dist/browser-IQ4UDS5M.js.map +1 -0
- package/dist/browser-S6E2BS5S.cjs +212 -0
- package/dist/browser-S6E2BS5S.cjs.map +1 -0
- package/dist/{chart-renderer-F355CYSE.js → chart-renderer-4HTNG3SX.js} +94 -180
- package/dist/chart-renderer-4HTNG3SX.js.map +1 -0
- package/dist/{chart-renderer-7DTEXXG6.js → chart-renderer-5IN2B3YS.js} +94 -180
- package/dist/chart-renderer-5IN2B3YS.js.map +1 -0
- package/dist/{chart-renderer-LGW4EH4M.cjs → chart-renderer-6CWSXOSC.cjs} +324 -410
- package/dist/chart-renderer-6CWSXOSC.cjs.map +1 -0
- package/dist/{chart-renderer-3QDNTMRN.cjs → chart-renderer-H4BLRO5P.cjs} +324 -410
- package/dist/chart-renderer-H4BLRO5P.cjs.map +1 -0
- package/dist/chunk-GX5LAENE.cjs +108 -0
- package/dist/chunk-GX5LAENE.cjs.map +1 -0
- package/dist/{chunk-GXYDJPHM.js → chunk-H62SZBEY.js} +401 -132
- package/dist/chunk-H62SZBEY.js.map +1 -0
- package/dist/{chunk-3LMOGW6A.js → chunk-IISMO3AX.js} +30 -15
- package/dist/chunk-IISMO3AX.js.map +1 -0
- package/dist/{chunk-ZJ76CZAL.cjs → chunk-KQSUAIZD.cjs} +1168 -899
- package/dist/chunk-KQSUAIZD.cjs.map +1 -0
- package/dist/{chunk-IYGZTLDY.js → chunk-LZXL5E4W.js} +16 -7
- package/dist/chunk-LZXL5E4W.js.map +1 -0
- package/dist/chunk-MYN475JP.cjs +32 -0
- package/dist/chunk-MYN475JP.cjs.map +1 -0
- package/dist/{chunk-D2UA4P6N.cjs → chunk-NAYVSTCX.cjs} +22 -9
- package/dist/chunk-NAYVSTCX.cjs.map +1 -0
- package/dist/chunk-PK3MCNDK.js +32 -0
- package/dist/chunk-PK3MCNDK.js.map +1 -0
- package/dist/full-3FSPB3R6.cjs +212 -0
- package/dist/full-3FSPB3R6.cjs.map +1 -0
- package/dist/full-GPY27HZY.js +209 -0
- package/dist/full-GPY27HZY.js.map +1 -0
- package/dist/index.cjs +834 -602
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -1
- package/dist/index.d.ts +57 -1
- package/dist/index.js +347 -115
- package/dist/index.js.map +1 -1
- package/dist/{internal-BJsg5os3.d.cts → internal-Cks9H21d.d.cts} +56 -1
- package/dist/{internal-BJsg5os3.d.ts → internal-Cks9H21d.d.ts} +56 -1
- package/dist/internal.cjs +3 -3
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +2 -2
- package/dist/office_charts_bg.wasm +0 -0
- package/dist/office_charts_full_bg.wasm +0 -0
- package/dist/payload-B55ZKNYO.js +6 -0
- package/dist/payload-B55ZKNYO.js.map +1 -0
- package/dist/payload-E2KM77DZ.js +6 -0
- package/dist/payload-E2KM77DZ.js.map +1 -0
- package/dist/payload-K4S5RLJN.cjs +8 -0
- package/dist/payload-K4S5RLJN.cjs.map +1 -0
- package/dist/payload-PL4646XV.cjs +8 -0
- package/dist/payload-PL4646XV.cjs.map +1 -0
- package/dist/rust-office-charts-LICENSE.txt +21 -0
- package/dist/{shared-chart-3STFRVWT.js → shared-chart-5KTGZEZ5.js} +38 -20
- package/dist/shared-chart-5KTGZEZ5.js.map +1 -0
- package/dist/{shared-chart-DVC5S2P6.cjs → shared-chart-ACR4M7BP.cjs} +37 -20
- package/dist/shared-chart-ACR4M7BP.cjs.map +1 -0
- package/dist/{shared-chart-BFQNYOIQ.js → shared-chart-EGN5JTKT.js} +37 -20
- package/dist/shared-chart-EGN5JTKT.js.map +1 -0
- package/dist/{shared-chart-MFQSQG4K.cjs → shared-chart-XAV7VA45.cjs} +37 -19
- package/dist/shared-chart-XAV7VA45.cjs.map +1 -0
- package/dist/{surface-regl-R2N54JT2.js → surface-webgl-2ZZ6JQR2.js} +87 -151
- package/dist/surface-webgl-2ZZ6JQR2.js.map +1 -0
- package/dist/{surface-regl-BBJ6OIKK.cjs → surface-webgl-3HS6VBCK.cjs} +88 -152
- package/dist/surface-webgl-3HS6VBCK.cjs.map +1 -0
- package/dist/{surface-regl-7CDGGVDG.js → surface-webgl-4DQXDDXU.js} +87 -151
- package/dist/surface-webgl-4DQXDDXU.js.map +1 -0
- package/dist/{surface-regl-SUJ2TFZA.cjs → surface-webgl-SVYD564V.cjs} +88 -152
- package/dist/surface-webgl-SVYD564V.cjs.map +1 -0
- package/dist/vanilla.cjs +3 -3
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +2 -2
- package/dist/xlsx-worker.js +298 -92
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +7 -15
- package/dist/chart-renderer-3QDNTMRN.cjs.map +0 -1
- package/dist/chart-renderer-7DTEXXG6.js.map +0 -1
- package/dist/chart-renderer-F355CYSE.js.map +0 -1
- package/dist/chart-renderer-LGW4EH4M.cjs.map +0 -1
- package/dist/chunk-3LMOGW6A.js.map +0 -1
- package/dist/chunk-D2UA4P6N.cjs.map +0 -1
- package/dist/chunk-GXYDJPHM.js.map +0 -1
- package/dist/chunk-IYGZTLDY.js.map +0 -1
- package/dist/chunk-OCF75R75.cjs +0 -90
- package/dist/chunk-OCF75R75.cjs.map +0 -1
- package/dist/chunk-ZJ76CZAL.cjs.map +0 -1
- package/dist/region-map-geography-24TXETDP.cjs +0 -184
- package/dist/region-map-geography-24TXETDP.cjs.map +0 -1
- package/dist/region-map-geography-OR6DHAF7.js +0 -182
- package/dist/region-map-geography-OR6DHAF7.js.map +0 -1
- package/dist/shared-chart-3STFRVWT.js.map +0 -1
- package/dist/shared-chart-BFQNYOIQ.js.map +0 -1
- package/dist/shared-chart-DVC5S2P6.cjs.map +0 -1
- package/dist/shared-chart-MFQSQG4K.cjs.map +0 -1
- package/dist/surface-regl-7CDGGVDG.js.map +0 -1
- package/dist/surface-regl-BBJ6OIKK.cjs.map +0 -1
- package/dist/surface-regl-R2N54JT2.js.map +0 -1
- package/dist/surface-regl-SUJ2TFZA.cjs.map +0 -1
- package/dist/world-atlas-LICENSE.txt +0 -13
- /package/dist/{us-atlas-LICENSE.txt → rust-office-charts-MAP-DATA-LICENSE.txt} +0 -0
|
@@ -2,33 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var _chunkD2UA4P6Ncjs = require('./chunk-D2UA4P6N.cjs');
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
var _chunkIDNIGBUMcjs = require('./chunk-IDNIGBUM.cjs');
|
|
11
|
-
|
|
12
9
|
|
|
10
|
+
var _chunkO3V2MCOCcjs = require('./chunk-O3V2MCOC.cjs');
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
|
|
14
|
+
var _chunkNAYVSTCXcjs = require('./chunk-NAYVSTCX.cjs');
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
|
|
20
|
-
var
|
|
19
|
+
var _chunk5ERNVHSOcjs = require('./chunk-5ERNVHSO.cjs');
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
var
|
|
24
|
+
var _chunkIDNIGBUMcjs = require('./chunk-IDNIGBUM.cjs');
|
|
26
25
|
require('./chunk-AD4CGQN2.cjs');
|
|
27
26
|
|
|
28
27
|
// src/chart-renderer.tsx
|
|
29
28
|
var _d3hierarchy = require('d3-hierarchy');
|
|
30
29
|
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
31
|
-
|
|
30
|
+
|
|
31
|
+
// src/chart-scales.ts
|
|
32
|
+
function linearScale([low, high], [start, end]) {
|
|
33
|
+
if (high < low) return linearScale([high, low], [end, start]);
|
|
34
|
+
const span = high - low;
|
|
35
|
+
return (value) => {
|
|
36
|
+
const t = span === 0 ? 0.5 : (value - low) / span;
|
|
37
|
+
return start * (1 - t) + end * t;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function bandScale(domain, [from, to], inner, outer) {
|
|
41
|
+
const indices = /* @__PURE__ */ new Map();
|
|
42
|
+
for (const value of domain) {
|
|
43
|
+
if (!indices.has(value)) indices.set(value, indices.size);
|
|
44
|
+
}
|
|
45
|
+
const count = indices.size;
|
|
46
|
+
const width = Math.abs(to - from);
|
|
47
|
+
const step = width / Math.max(1, count - inner + 2 * outer);
|
|
48
|
+
const origin = Math.min(from, to) + (width - step * (count - inner)) / 2;
|
|
49
|
+
const locate = (value) => {
|
|
50
|
+
const index = indices.get(value);
|
|
51
|
+
return index == null ? void 0 : origin + step * (to < from ? count - 1 - index : index);
|
|
52
|
+
};
|
|
53
|
+
return Object.assign(locate, { bandwidth: step * (1 - inner) });
|
|
54
|
+
}
|
|
55
|
+
function pointScale(domain, range) {
|
|
56
|
+
return bandScale(domain, range, 1, 0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// src/chart-renderer.tsx
|
|
32
60
|
|
|
33
61
|
|
|
34
62
|
|
|
@@ -40,15 +68,11 @@ var _d3scale = require('d3-scale');
|
|
|
40
68
|
var _d3shape = require('d3-shape');
|
|
41
69
|
var _jsxruntime = require('react/jsx-runtime');
|
|
42
70
|
|
|
43
|
-
function RegionMapPlot({ chart, palette, layout, selectedChartElement }) {
|
|
44
|
-
const resources = _chunkD2UA4P6Ncjs.useChartModule.call(void 0, _chunkD2UA4P6Ncjs.regionMapResources);
|
|
45
|
-
return resources ? renderRegionMapChart(chart, palette, layout, selectedChartElement, resources) : null;
|
|
46
|
-
}
|
|
47
71
|
function SurfaceChartComposite({
|
|
48
72
|
loadingFallback,
|
|
49
73
|
...props
|
|
50
74
|
}) {
|
|
51
|
-
const renderer =
|
|
75
|
+
const renderer = _chunkNAYVSTCXcjs.useChartModule.call(void 0, _chunkNAYVSTCXcjs.surfaceRenderer);
|
|
52
76
|
return renderer ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, renderer.MemoSurfaceChartComposite, { ...props }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingFallback });
|
|
53
77
|
}
|
|
54
78
|
function chartElementDataProps(seriesIndex, pointIndex, options) {
|
|
@@ -222,9 +246,6 @@ function isHistogramLikeSeries(series) {
|
|
|
222
246
|
function isHistogramLikeChart(chart) {
|
|
223
247
|
return chart.series.some((series) => isHistogramLikeSeries(series));
|
|
224
248
|
}
|
|
225
|
-
function resolveRegionMapBaseColor(chart, seriesIndex) {
|
|
226
|
-
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)));
|
|
227
|
-
}
|
|
228
249
|
function resolveRegionMapDataColor(chart, seriesIndex) {
|
|
229
250
|
const pointColor = normalizeRendererHexColor(chartPointColor(chart, 0, seriesIndex));
|
|
230
251
|
if (pointColor) {
|
|
@@ -240,22 +261,18 @@ function resolveRegionMapDataColor(chart, seriesIndex) {
|
|
|
240
261
|
return paletteColor;
|
|
241
262
|
}
|
|
242
263
|
}
|
|
243
|
-
return _nullishCoalesce(normalizeRendererHexColor(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
264
|
+
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"));
|
|
244
265
|
}
|
|
245
266
|
function resolveRegionMapValueColors(series) {
|
|
246
|
-
const raw = _optionalChain([series, 'optionalAccess',
|
|
247
|
-
const colors = Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
267
|
+
const raw = _optionalChain([series, 'optionalAccess', _39 => _39.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
268
|
+
const colors = Array.isArray(_optionalChain([raw, 'optionalAccess', _40 => _40.valueColors])) ? raw.valueColors.map((value) => normalizeRendererHexColor(value)).filter((value) => Boolean(value)) : [];
|
|
248
269
|
return colors.length >= 2 ? colors : null;
|
|
249
270
|
}
|
|
250
271
|
function resolveRegionMapColorStrings(series) {
|
|
251
|
-
const raw = _optionalChain([series, 'optionalAccess',
|
|
252
|
-
const values = Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
272
|
+
const raw = _optionalChain([series, 'optionalAccess', _41 => _41.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
273
|
+
const values = Array.isArray(_optionalChain([raw, 'optionalAccess', _42 => _42.chartExColorStrings])) ? raw.chartExColorStrings.map((value) => typeof value === "string" ? value.trim() : "") : [];
|
|
253
274
|
return values.some((value) => value.length > 0) ? values : null;
|
|
254
275
|
}
|
|
255
|
-
function resolveRegionMapLayoutProperties(series) {
|
|
256
|
-
const raw = _optionalChain([series, 'optionalAccess', _51 => _51.raw]) && typeof series.raw === "object" ? series.raw : null;
|
|
257
|
-
return _optionalChain([raw, 'optionalAccess', _52 => _52.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
258
|
-
}
|
|
259
276
|
function resolveRegionMapValueColorFromStops(stops, ratio) {
|
|
260
277
|
if (stops.length === 0) {
|
|
261
278
|
return "#4f81bd";
|
|
@@ -282,10 +299,6 @@ function resolveRegionMapValueColor(chart, seriesIndex, ratio) {
|
|
|
282
299
|
darkenColor(baseColor, 0.08)
|
|
283
300
|
], ratio);
|
|
284
301
|
}
|
|
285
|
-
function resolveRegionMapNoDataColor(chart, seriesIndex) {
|
|
286
|
-
const baseColor = resolveRegionMapBaseColor(chart, seriesIndex);
|
|
287
|
-
return _nullishCoalesce(normalizeRendererHexColor(baseColor), () => ( chartSeriesColor(chart, seriesIndex)));
|
|
288
|
-
}
|
|
289
302
|
function buildRegionMapLegendItems(chart) {
|
|
290
303
|
const primarySeriesIndex = Math.max(0, chart.series.findIndex((series) => series.hidden !== true));
|
|
291
304
|
const categoricalValues = resolveRegionMapColorStrings(_nullishCoalesce(chart.series[primarySeriesIndex], () => ( null)));
|
|
@@ -296,7 +309,7 @@ function buildRegionMapLegendItems(chart) {
|
|
|
296
309
|
label: value
|
|
297
310
|
}));
|
|
298
311
|
}
|
|
299
|
-
const values = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
312
|
+
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);
|
|
300
313
|
if (values.length === 0) {
|
|
301
314
|
return [];
|
|
302
315
|
}
|
|
@@ -314,12 +327,12 @@ function normalizeBuiltinPieStyleId(styleId) {
|
|
|
314
327
|
return styleId >= 100 ? styleId - 100 : styleId;
|
|
315
328
|
}
|
|
316
329
|
function getBuiltinPiePalette(chart, seriesIndex) {
|
|
317
|
-
if (_optionalChain([chart, 'access',
|
|
330
|
+
if (_optionalChain([chart, 'access', _46 => _46.raw, 'optionalAccess', _47 => _47.builtinThemeColors])) return null;
|
|
318
331
|
const normalized = normalizeBuiltinPieStyleId(chart.chartStyleId);
|
|
319
332
|
if (normalized !== 32) {
|
|
320
333
|
return null;
|
|
321
334
|
}
|
|
322
|
-
const baseColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
335
|
+
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));
|
|
323
336
|
if (!baseColor) {
|
|
324
337
|
return null;
|
|
325
338
|
}
|
|
@@ -333,8 +346,8 @@ function getBuiltinPiePalette(chart, seriesIndex) {
|
|
|
333
346
|
];
|
|
334
347
|
}
|
|
335
348
|
function resolvePiePointColor(chart, pointIndex, seriesIndex = 0) {
|
|
336
|
-
const pointStyle = _optionalChain([chart, 'access',
|
|
337
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
349
|
+
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)]);
|
|
350
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _61 => _61.color])) {
|
|
338
351
|
return pointStyle.color;
|
|
339
352
|
}
|
|
340
353
|
const builtinPalette = getBuiltinPiePalette(chart, seriesIndex);
|
|
@@ -368,8 +381,8 @@ function chartSeriesBarColors(chart, seriesIndex, value, negativeFillMode) {
|
|
|
368
381
|
const series = chart.series[seriesIndex];
|
|
369
382
|
const defaultFill = chartSeriesColor(chart, seriesIndex);
|
|
370
383
|
const defaultStroke = chartSeriesStrokeColor(chart, seriesIndex);
|
|
371
|
-
const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess',
|
|
372
|
-
if (value < 0 && _optionalChain([series, 'optionalAccess',
|
|
384
|
+
const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess', _62 => _62.lineWidthPx]) === "number" && Number.isFinite(series.lineWidthPx) ? Math.max(0.8, Math.min(4, series.lineWidthPx)) : 1;
|
|
385
|
+
if (value < 0 && _optionalChain([series, 'optionalAccess', _63 => _63.invertIfNegative])) {
|
|
373
386
|
const resolvedNegativeFill = negativeFillMode === "none" ? "none" : _nullishCoalesce(_nullishCoalesce(series.negativeColor, () => ( (negativeFillMode === "chartArea" ? chart.chartAreaFillColor : void 0))), () => ( defaultFill));
|
|
374
387
|
return {
|
|
375
388
|
fill: resolvedNegativeFill,
|
|
@@ -459,13 +472,13 @@ function estimateReferencePointCount(formula) {
|
|
|
459
472
|
return Math.abs(endRow - startRow) + 1;
|
|
460
473
|
}
|
|
461
474
|
function getCategoryLabels(chart) {
|
|
462
|
-
const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
475
|
+
const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access', _64 => _64.series, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.categories]), () => ( []));
|
|
463
476
|
const includeReferenceCategoryCount = chart.plotVisibleOnly !== true;
|
|
464
477
|
const referenceCategoryCount = includeReferenceCategoryCount ? Math.max(
|
|
465
478
|
0,
|
|
466
479
|
...chart.series.map((series) => Math.max(
|
|
467
|
-
estimateReferencePointCount(_optionalChain([series, 'access',
|
|
468
|
-
estimateReferencePointCount(_optionalChain([series, 'access',
|
|
480
|
+
estimateReferencePointCount(_optionalChain([series, 'access', _67 => _67.categoriesRef, 'optionalAccess', _68 => _68.formula])),
|
|
481
|
+
estimateReferencePointCount(_optionalChain([series, 'access', _69 => _69.valuesRef, 'optionalAccess', _70 => _70.formula]))
|
|
469
482
|
))
|
|
470
483
|
) : 0;
|
|
471
484
|
const categoryCount = Math.max(
|
|
@@ -589,7 +602,7 @@ function coerceLooseNumber(value) {
|
|
|
589
602
|
}
|
|
590
603
|
function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)) {
|
|
591
604
|
const categories = getCategoryLabels(chart);
|
|
592
|
-
const values = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
605
|
+
const values = _nullishCoalesce(_optionalChain([chart, 'access', _71 => _71.series, 'access', _72 => _72[seriesIndex], 'optionalAccess', _73 => _73.values]), () => ( []));
|
|
593
606
|
return values.map((rawValue, index) => ({
|
|
594
607
|
color: resolvePiePointColor(chart, index, seriesIndex),
|
|
595
608
|
index,
|
|
@@ -599,9 +612,9 @@ function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)
|
|
|
599
612
|
}
|
|
600
613
|
function resolveChartStageSubtotal(series) {
|
|
601
614
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
602
|
-
const layoutProperties = _optionalChain([raw, 'optionalAccess',
|
|
603
|
-
const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess',
|
|
604
|
-
return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess',
|
|
615
|
+
const layoutProperties = _optionalChain([raw, 'optionalAccess', _74 => _74.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
616
|
+
const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess', _75 => _75.subtotals])) ? layoutProperties.subtotals : [];
|
|
617
|
+
return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess', _76 => _76.aggregation]) === true;
|
|
605
618
|
}
|
|
606
619
|
function buildChartStages(chart) {
|
|
607
620
|
if (chart.chartType === "Funnel" || chart.chartType === "Waterfall") {
|
|
@@ -629,7 +642,7 @@ function buildChartStages(chart) {
|
|
|
629
642
|
if (!Number.isFinite(value)) {
|
|
630
643
|
return null;
|
|
631
644
|
}
|
|
632
|
-
const formula = typeof _optionalChain([series, 'access',
|
|
645
|
+
const formula = typeof _optionalChain([series, 'access', _77 => _77.valuesRef, 'optionalAccess', _78 => _78.formula]) === "string" ? series.valuesRef.formula : "";
|
|
633
646
|
const label = _nullishCoalesce(series.name, () => ( (formula.length > 0 ? formula.replace(/^.*!/, "").replace(/\$/g, "") : `Series ${index + 1}`)));
|
|
634
647
|
return {
|
|
635
648
|
color: chartSeriesColor(chart, typeof series.formatIdx === "number" ? series.formatIdx : index),
|
|
@@ -648,7 +661,7 @@ function buildHierarchyData(chart) {
|
|
|
648
661
|
const topLevelIndexByName = /* @__PURE__ */ new Map();
|
|
649
662
|
const primaryHierarchySeries = _nullishCoalesce(chart.series.find((series) => {
|
|
650
663
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
651
|
-
return Array.isArray(_optionalChain([raw, 'optionalAccess',
|
|
664
|
+
return Array.isArray(_optionalChain([raw, 'optionalAccess', _79 => _79.chartExHierarchyCategories]));
|
|
652
665
|
}), () => ( null));
|
|
653
666
|
const primaryHierarchyPaths = (() => {
|
|
654
667
|
if (!primaryHierarchySeries) {
|
|
@@ -659,7 +672,7 @@ function buildHierarchyData(chart) {
|
|
|
659
672
|
})();
|
|
660
673
|
const rowCount = primaryHierarchyPaths ? primaryHierarchyPaths.length : Math.max(0, ...chart.series.map((series) => series.values.length));
|
|
661
674
|
for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
|
|
662
|
-
const path = _nullishCoalesce(_optionalChain([primaryHierarchyPaths, 'optionalAccess',
|
|
675
|
+
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)));
|
|
663
676
|
if (path.length === 0) {
|
|
664
677
|
continue;
|
|
665
678
|
}
|
|
@@ -682,25 +695,25 @@ function buildHierarchyData(chart) {
|
|
|
682
695
|
current = next;
|
|
683
696
|
});
|
|
684
697
|
const valueSource = _nullishCoalesce(_nullishCoalesce(primaryHierarchySeries, () => ( chart.series[chart.series.length - 1])), () => ( null));
|
|
685
|
-
current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess',
|
|
698
|
+
current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess', _81 => _81.values, 'access', _82 => _82[rowIndex]])), () => ( 1)));
|
|
686
699
|
}
|
|
687
700
|
return rootChildren.length > 0 ? root : null;
|
|
688
701
|
}
|
|
689
702
|
function resolveBoxWhiskerQuartileMethod(series) {
|
|
690
703
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
691
|
-
const layoutProperties = _optionalChain([raw, 'optionalAccess',
|
|
692
|
-
const statistics = _optionalChain([layoutProperties, 'optionalAccess',
|
|
693
|
-
return _optionalChain([statistics, 'optionalAccess',
|
|
704
|
+
const layoutProperties = _optionalChain([raw, 'optionalAccess', _83 => _83.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
705
|
+
const statistics = _optionalChain([layoutProperties, 'optionalAccess', _84 => _84.statistics]) && typeof layoutProperties.statistics === "object" ? layoutProperties.statistics : null;
|
|
706
|
+
return _optionalChain([statistics, 'optionalAccess', _85 => _85.quartileMethod]) === "inclusive" ? "inclusive" : "exclusive";
|
|
694
707
|
}
|
|
695
708
|
function resolveBoxWhiskerVisibility(series) {
|
|
696
709
|
const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
|
|
697
|
-
const layoutProperties = _optionalChain([raw, 'optionalAccess',
|
|
698
|
-
const visibility = _optionalChain([layoutProperties, 'optionalAccess',
|
|
710
|
+
const layoutProperties = _optionalChain([raw, 'optionalAccess', _86 => _86.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
|
|
711
|
+
const visibility = _optionalChain([layoutProperties, 'optionalAccess', _87 => _87.visibility]) && typeof layoutProperties.visibility === "object" ? layoutProperties.visibility : null;
|
|
699
712
|
return {
|
|
700
|
-
meanLine: _optionalChain([visibility, 'optionalAccess',
|
|
701
|
-
meanMarker: _optionalChain([visibility, 'optionalAccess',
|
|
702
|
-
nonoutliers: _optionalChain([visibility, 'optionalAccess',
|
|
703
|
-
outliers: _optionalChain([visibility, 'optionalAccess',
|
|
713
|
+
meanLine: _optionalChain([visibility, 'optionalAccess', _88 => _88.meanLine]) === true,
|
|
714
|
+
meanMarker: _optionalChain([visibility, 'optionalAccess', _89 => _89.meanMarker]) !== false,
|
|
715
|
+
nonoutliers: _optionalChain([visibility, 'optionalAccess', _90 => _90.nonoutliers]) === true,
|
|
716
|
+
outliers: _optionalChain([visibility, 'optionalAccess', _91 => _91.outliers]) !== false
|
|
704
717
|
};
|
|
705
718
|
}
|
|
706
719
|
function computePercentile(sortedValues, percentile, method) {
|
|
@@ -760,7 +773,7 @@ function computeBoxWhiskerStats(series) {
|
|
|
760
773
|
function resolveHierarchyNodeColor(chart, node) {
|
|
761
774
|
const lineage = node.ancestors().reverse();
|
|
762
775
|
const topLevel = lineage[1];
|
|
763
|
-
const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess',
|
|
776
|
+
const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _92 => _92.data, 'access', _93 => _93.colorIndex]), () => ( 0));
|
|
764
777
|
const baseColor = chartSeriesColor(chart, baseIndex);
|
|
765
778
|
const depth = Math.max(0, node.depth - 1);
|
|
766
779
|
return depth === 0 ? baseColor : lightenColor(baseColor, clamp(depth * 0.16, 0, 0.5));
|
|
@@ -768,7 +781,7 @@ function resolveHierarchyNodeColor(chart, node) {
|
|
|
768
781
|
function resolveTreemapNodeColor(chart, node) {
|
|
769
782
|
const lineage = node.ancestors().reverse();
|
|
770
783
|
const topLevel = lineage[1];
|
|
771
|
-
return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess',
|
|
784
|
+
return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _94 => _94.data, 'access', _95 => _95.colorIndex]), () => ( 0)));
|
|
772
785
|
}
|
|
773
786
|
function excelTreemapTile(node, x0, y0, x1, y1) {
|
|
774
787
|
if (!node.children || node.children.length === 0) {
|
|
@@ -783,12 +796,12 @@ function excelTreemapTile(node, x0, y0, x1, y1) {
|
|
|
783
796
|
node.children.forEach((child) => excelTreemapTile(child, child.x0, child.y0, child.x1, child.y1));
|
|
784
797
|
}
|
|
785
798
|
function resolveSurfaceBaseColor(chart, palette) {
|
|
786
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
799
|
+
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));
|
|
787
800
|
}
|
|
788
801
|
function resolveExplicitSurfaceSeriesColor(chart, kind) {
|
|
789
|
-
const shape = _optionalChain([chart, 'access',
|
|
790
|
-
if (kind === "fill" ? _optionalChain([shape, 'optionalAccess',
|
|
791
|
-
const color = kind === "fill" ? _nullishCoalesce(_optionalChain([shape, 'optionalAccess',
|
|
802
|
+
const shape = _optionalChain([chart, 'access', _104 => _104.series, 'access', _105 => _105[0], 'optionalAccess', _106 => _106.shapeProperties]);
|
|
803
|
+
if (kind === "fill" ? _optionalChain([shape, 'optionalAccess', _107 => _107.xmlFillHidden]) === true : _optionalChain([shape, 'optionalAccess', _108 => _108.xmlLineHidden]) === true) return "transparent";
|
|
804
|
+
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])));
|
|
792
805
|
return normalizeRendererHexColor(color);
|
|
793
806
|
}
|
|
794
807
|
function getSurfaceColorStops(chart, palette) {
|
|
@@ -803,7 +816,7 @@ function resolveSurfaceBandPaletteColor(chart, palette, domain, value) {
|
|
|
803
816
|
if (explicitColor) return explicitColor;
|
|
804
817
|
const explicitFill = resolveExplicitSurfaceSeriesColor(chart, "fill");
|
|
805
818
|
if (explicitFill) return explicitFill;
|
|
806
|
-
const themeColors = _optionalChain([chart, 'access',
|
|
819
|
+
const themeColors = _optionalChain([chart, 'access', _113 => _113.raw, 'optionalAccess', _114 => _114.builtinThemeColors]);
|
|
807
820
|
const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
|
|
808
821
|
const builtinColor = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, bandIndex % paletteCount, paletteCount), themeColors) : void 0;
|
|
809
822
|
if (builtinColor) return builtinColor;
|
|
@@ -818,8 +831,8 @@ function getSurfaceDomain(chart) {
|
|
|
818
831
|
if (numericValues.length === 0) {
|
|
819
832
|
return null;
|
|
820
833
|
}
|
|
821
|
-
const explicitMin = typeof _optionalChain([chart, 'access',
|
|
822
|
-
const explicitMax = typeof _optionalChain([chart, 'access',
|
|
834
|
+
const explicitMin = typeof _optionalChain([chart, 'access', _115 => _115.valueAxis, 'optionalAccess', _116 => _116.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? chart.valueAxis.min : null;
|
|
835
|
+
const explicitMax = typeof _optionalChain([chart, 'access', _117 => _117.valueAxis, 'optionalAccess', _118 => _118.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? chart.valueAxis.max : null;
|
|
823
836
|
const rawMin = Math.min(...numericValues);
|
|
824
837
|
const rawMax = Math.max(...numericValues);
|
|
825
838
|
const spanBase = Math.max(1e-6, rawMax - Math.min(0, rawMin));
|
|
@@ -827,7 +840,7 @@ function getSurfaceDomain(chart) {
|
|
|
827
840
|
const magnitude = 10 ** Math.floor(Math.log10(Math.max(roughStep, 1e-6)));
|
|
828
841
|
const normalized = roughStep / magnitude;
|
|
829
842
|
const niceNormalized = normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10;
|
|
830
|
-
const step = typeof _optionalChain([chart, 'access',
|
|
843
|
+
const step = typeof _optionalChain([chart, 'access', _119 => _119.valueAxis, 'optionalAccess', _120 => _120.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : niceNormalized * magnitude;
|
|
831
844
|
const minValue = _nullishCoalesce(explicitMin, () => ( (rawMin >= 0 ? 0 : Math.floor(rawMin / step) * step)));
|
|
832
845
|
const maxValue = _nullishCoalesce(explicitMax, () => ( Math.ceil(rawMax / step) * step));
|
|
833
846
|
const safeMax = maxValue <= minValue ? minValue + step : maxValue;
|
|
@@ -857,14 +870,14 @@ function resolveSurfaceBandIndex(domain, value) {
|
|
|
857
870
|
return Math.max(0, ticks.length - 2);
|
|
858
871
|
}
|
|
859
872
|
function resolveSurfaceBandFormatColor(chart, key, index) {
|
|
860
|
-
const colors = _optionalChain([chart, 'access',
|
|
873
|
+
const colors = _optionalChain([chart, 'access', _121 => _121.raw, 'optionalAccess', _122 => _122[key]]);
|
|
861
874
|
if (!colors || typeof colors !== "object" || !Object.prototype.hasOwnProperty.call(colors, index)) return null;
|
|
862
875
|
const color = colors[index];
|
|
863
876
|
return typeof color === "string" && color.length > 0 ? color : null;
|
|
864
877
|
}
|
|
865
878
|
function resolveSurfaceWireframeColor(chart, palette, domain, value) {
|
|
866
879
|
const bandIndex = resolveSurfaceBandIndex(domain, value);
|
|
867
|
-
const themeColors = _optionalChain([chart, 'access',
|
|
880
|
+
const themeColors = _optionalChain([chart, 'access', _123 => _123.raw, 'optionalAccess', _124 => _124.builtinThemeColors]);
|
|
868
881
|
const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
|
|
869
882
|
const builtinLine = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartSurfaceLine.call(void 0, chart.chartStyleId, bandIndex, paletteCount), themeColors) : void 0;
|
|
870
883
|
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(resolveSurfaceBandFormatColor(chart, "bandFormatLineColors", bandIndex), () => ( resolveExplicitSurfaceSeriesColor(chart, "line"))), () => ( builtinLine)), () => ( resolveSurfaceBandPaletteColor(chart, palette, domain, value)));
|
|
@@ -874,7 +887,7 @@ function resolveSurfacePlotRect(chart, layout) {
|
|
|
874
887
|
return layout.plot;
|
|
875
888
|
}
|
|
876
889
|
const columnCount = Math.max(1, getCategoryLabels(chart).length);
|
|
877
|
-
const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
890
|
+
const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access', _125 => _125.view3d, 'optionalAccess', _126 => _126.depthPercent]), () => ( 100))) / 100);
|
|
878
891
|
const targetAspect = columnCount / Math.max(1, chart.series.length) / depthScale;
|
|
879
892
|
let width = layout.plot.width;
|
|
880
893
|
let height = layout.plot.height;
|
|
@@ -918,7 +931,7 @@ function isContourSurfaceChart(chart) {
|
|
|
918
931
|
return chart.chartType === "Surface" && chart.is3d !== true;
|
|
919
932
|
}
|
|
920
933
|
function renderSurfaceAxes(chart, layout) {
|
|
921
|
-
if (_optionalChain([chart, 'access',
|
|
934
|
+
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])) {
|
|
922
935
|
return null;
|
|
923
936
|
}
|
|
924
937
|
const plot = resolveSurfacePlotRect(chart, layout);
|
|
@@ -928,7 +941,7 @@ function renderSurfaceAxes(chart, layout) {
|
|
|
928
941
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( "#888888"));
|
|
929
942
|
const rowCount = Math.max(1, seriesLabels.length);
|
|
930
943
|
const columnCount = Math.max(1, categories.length);
|
|
931
|
-
const columnPositions = categories.map((_, index) => plot.left + (isContourSurfaceChart(chart) && _optionalChain([chart, 'access',
|
|
944
|
+
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));
|
|
932
945
|
const rowPositions = seriesLabels.map((_, index) => plot.top + plot.height - (rowCount <= 1 ? plot.height / 2 : index / (rowCount - 1) * plot.height));
|
|
933
946
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
934
947
|
isContourSurfaceChart(chart) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -943,7 +956,7 @@ function renderSurfaceAxes(chart, layout) {
|
|
|
943
956
|
y: plot.top
|
|
944
957
|
}
|
|
945
958
|
),
|
|
946
|
-
_optionalChain([chart, 'access',
|
|
959
|
+
_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__ */ _jsxruntime.jsx.call(void 0,
|
|
947
960
|
"text",
|
|
948
961
|
{
|
|
949
962
|
fill: labelColor,
|
|
@@ -955,7 +968,7 @@ function renderSurfaceAxes(chart, layout) {
|
|
|
955
968
|
},
|
|
956
969
|
`surface-x-label-${index}`
|
|
957
970
|
)),
|
|
958
|
-
_optionalChain([chart, 'access',
|
|
971
|
+
_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__ */ _jsxruntime.jsx.call(void 0,
|
|
959
972
|
"text",
|
|
960
973
|
{
|
|
961
974
|
fill: labelColor,
|
|
@@ -1010,7 +1023,7 @@ function getLegendItems(chart, chartType, palette) {
|
|
|
1010
1023
|
}
|
|
1011
1024
|
if (chartType === "Sunburst" || chartType === "Treemap") {
|
|
1012
1025
|
const hierarchyData = buildHierarchyData(chart);
|
|
1013
|
-
if (!_optionalChain([hierarchyData, 'optionalAccess',
|
|
1026
|
+
if (!_optionalChain([hierarchyData, 'optionalAccess', _143 => _143.children])) {
|
|
1014
1027
|
return [];
|
|
1015
1028
|
}
|
|
1016
1029
|
return hierarchyData.children.map((child, index) => ({
|
|
@@ -1021,7 +1034,7 @@ function getLegendItems(chart, chartType, palette) {
|
|
|
1021
1034
|
if (chartType === "Pie" || chartType === "Pie3D" || chartType === "PieExploded" || chartType === "Doughnut" || chartType === "BarOfPie") {
|
|
1022
1035
|
if (chartType === "BarOfPie") {
|
|
1023
1036
|
const categories = getCategoryLabels(chart);
|
|
1024
|
-
const values = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
1037
|
+
const values = _nullishCoalesce(_optionalChain([chart, 'access', _144 => _144.series, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.values]), () => ( []));
|
|
1025
1038
|
return categories.map((label, index) => ({
|
|
1026
1039
|
color: chartPointColor(chart, index),
|
|
1027
1040
|
label: normalizeCategoryLabel(label),
|
|
@@ -1046,8 +1059,8 @@ function buildLayout(chart, rect, legendItems) {
|
|
|
1046
1059
|
const width = Math.max(80, Math.round(rect.width));
|
|
1047
1060
|
const height = Math.max(60, Math.round(rect.height));
|
|
1048
1061
|
const isSurfaceChart = chart.chartType === "Surface" || chart.raw && typeof chart.raw === "object" && typeof chart.raw.xmlChartType === "string" && String(chart.raw.xmlChartType).includes("surface");
|
|
1049
|
-
const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access',
|
|
1050
|
-
const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access',
|
|
1062
|
+
const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access', _147 => _147.raw, 'optionalAccess', _148 => _148.titleOverlay]) === true) ? isSurfaceChart ? 30 : 24 : 8;
|
|
1063
|
+
const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access', _149 => _149.legend, 'optionalAccess', _150 => _150.position]));
|
|
1051
1064
|
const legendVertical = legendItems.length > 0 && (legendPosition === "right" || legendPosition === "left");
|
|
1052
1065
|
const compactWidth = width <= 280;
|
|
1053
1066
|
const compactHeight = height <= 200;
|
|
@@ -1057,10 +1070,10 @@ function buildLayout(chart, rect, legendItems) {
|
|
|
1057
1070
|
const horizontalMapGradient = chart.chartType === "RegionMap" && legendItems.length > 0 && !resolveRegionMapColorStrings(primarySeries) && (layoutLegendPosition === "top" || layoutLegendPosition === "bottom");
|
|
1058
1071
|
const horizontalLegendHeight = horizontalMapGradient ? Math.min(48, Math.max(24, height - titleHeight - 8)) : 24;
|
|
1059
1072
|
const legendWidth = isSurfaceChart ? Math.max(32, ...legendItems.map((item) => 20 + item.label.length * 5.4)) : 98;
|
|
1060
|
-
const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access',
|
|
1073
|
+
const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access', _151 => _151.valueAxis, 'optionalAccess', _152 => _152.delete]) ? 12 : 42) + (layoutLegendPosition === "left" ? legendWidth : 0);
|
|
1061
1074
|
const plotRight = 16 + (layoutLegendPosition === "right" ? legendWidth : 0);
|
|
1062
1075
|
const plotTop = titleHeight + (layoutLegendPosition === "top" ? horizontalLegendHeight : 0);
|
|
1063
|
-
const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access',
|
|
1076
|
+
const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access', _153 => _153.categoryAxis, 'optionalAccess', _154 => _154.delete]) ? 8 : 28) + (layoutLegendPosition === "bottom" ? horizontalLegendHeight : 0);
|
|
1064
1077
|
const plotWidth = Math.max(horizontalMapGradient ? 1 : 40, width - plotLeft - plotRight);
|
|
1065
1078
|
return {
|
|
1066
1079
|
height,
|
|
@@ -1133,30 +1146,30 @@ function resolveNumericAxisDomain(minValue, maxValue, majorUnit, includeZero = f
|
|
|
1133
1146
|
};
|
|
1134
1147
|
}
|
|
1135
1148
|
function resolveAxisDomainWithChartOverrides(axis, minValue, maxValue, includeZero = false) {
|
|
1136
|
-
const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess',
|
|
1137
|
-
const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess',
|
|
1138
|
-
const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1139
|
-
const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1140
|
-
const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess',
|
|
1149
|
+
const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess', _155 => _155.min]) === "number" && Number.isFinite(axis.min);
|
|
1150
|
+
const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess', _156 => _156.max]) === "number" && Number.isFinite(axis.max);
|
|
1151
|
+
const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _157 => _157.min])) : minValue;
|
|
1152
|
+
const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _158 => _158.max])) : maxValue;
|
|
1153
|
+
const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess', _159 => _159.majorUnit]), includeZero);
|
|
1141
1154
|
return {
|
|
1142
1155
|
hasExplicitMax,
|
|
1143
1156
|
hasExplicitMin,
|
|
1144
|
-
majorUnit: _optionalChain([axis, 'optionalAccess',
|
|
1145
|
-
max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1146
|
-
min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1157
|
+
majorUnit: _optionalChain([axis, 'optionalAccess', _160 => _160.majorUnit]),
|
|
1158
|
+
max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _161 => _161.max])) : domain.max,
|
|
1159
|
+
min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _162 => _162.min])) : domain.min,
|
|
1147
1160
|
ticks: hasExplicitMin || hasExplicitMax ? buildNumericTickValues(
|
|
1148
|
-
hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1149
|
-
hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess',
|
|
1150
|
-
_optionalChain([axis, 'optionalAccess',
|
|
1161
|
+
hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _163 => _163.min])) : domain.min,
|
|
1162
|
+
hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _164 => _164.max])) : domain.max,
|
|
1163
|
+
_optionalChain([axis, 'optionalAccess', _165 => _165.majorUnit])
|
|
1151
1164
|
) : domain.ticks
|
|
1152
1165
|
};
|
|
1153
1166
|
}
|
|
1154
1167
|
function resolve3dFrameOffsets(chart, baseDepthX = 11, baseDepthY = 8) {
|
|
1155
|
-
const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1156
|
-
const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1157
|
-
const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1158
|
-
const usePerspective = _optionalChain([chart, 'access',
|
|
1159
|
-
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1168
|
+
const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _166 => _166.view3d, 'optionalAccess', _167 => _167.depthPercent]), () => ( 100))) / 100, 0.35, 3.2);
|
|
1169
|
+
const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _168 => _168.view3d, 'optionalAccess', _169 => _169.rotX]), () => ( 20)), -80, 80);
|
|
1170
|
+
const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _170 => _170.view3d, 'optionalAccess', _171 => _171.rotY]), () => ( 20)), -80, 80);
|
|
1171
|
+
const usePerspective = _optionalChain([chart, 'access', _172 => _172.view3d, 'optionalAccess', _173 => _173.rAngAx]) === false;
|
|
1172
|
+
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _174 => _174.view3d, 'optionalAccess', _175 => _175.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
|
|
1160
1173
|
const projectedOrigin = projectCartesian3dPoint(
|
|
1161
1174
|
0,
|
|
1162
1175
|
0,
|
|
@@ -1254,9 +1267,9 @@ function formatExcelDateSerial(value, formatCode, use1904) {
|
|
|
1254
1267
|
function formatCategoryLabel(chart, value, fallback = "") {
|
|
1255
1268
|
const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
|
|
1256
1269
|
const numeric = typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
1257
|
-
const formatCode = _optionalChain([chart, 'access',
|
|
1270
|
+
const formatCode = _optionalChain([chart, 'access', _176 => _176.categoryAxis, 'optionalAccess', _177 => _177.numberFormat, 'optionalAccess', _178 => _178.formatCode]);
|
|
1258
1271
|
if (numeric != null && isLikelyDateFormatCode(formatCode)) {
|
|
1259
|
-
return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess',
|
|
1272
|
+
return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess', _179 => _179.date1904]) === true);
|
|
1260
1273
|
}
|
|
1261
1274
|
const normalized = normalizeCategoryLabel(value);
|
|
1262
1275
|
if (normalized.length > 0) {
|
|
@@ -1416,18 +1429,18 @@ function renderLegend(chart, layout, palette) {
|
|
|
1416
1429
|
if (!resolveRegionMapColorStrings(series)) {
|
|
1417
1430
|
const vertical = legendPos === "left" || legendPos === "right";
|
|
1418
1431
|
const x = vertical ? legendPos === "right" ? layout.plot.left + layout.plot.width + 8 : 8 : layout.plot.left;
|
|
1419
|
-
const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access',
|
|
1420
|
-
const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access',
|
|
1432
|
+
const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access', _180 => _180.legendBounds, 'optionalAccess', _181 => _181.height]), () => ( 48))) >= 44;
|
|
1433
|
+
const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access', _182 => _182.legendBounds, 'optionalAccess', _183 => _183.top]), () => ( layout.height - 48))) + (showSeriesName ? 20 : 4);
|
|
1421
1434
|
const length = vertical ? Math.min(100, Math.max(24, layout.plot.height - 42)) : Math.min(160, layout.plot.width);
|
|
1422
1435
|
const gradientId = `map-legend-${chart.id}`;
|
|
1423
1436
|
const stops = resolveRegionMapValueColors(series);
|
|
1424
|
-
const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess',
|
|
1437
|
+
const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess', _184 => _184.length]), () => ( 3));
|
|
1425
1438
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
1426
1439
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsx.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__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: `${index / (count - 1) * 100}%`, stopColor: resolveRegionMapValueColor(chart, seriesIndex, index / (count - 1)) }, index)) }) }),
|
|
1427
|
-
showSeriesName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x, y: y - 12, children: _nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
1440
|
+
showSeriesName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x, y: y - 12, children: _nullishCoalesce(_optionalChain([series, 'optionalAccess', _185 => _185.name]), () => ( "")) }),
|
|
1428
1441
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { fill: `url(#${gradientId})`, x, y, width: vertical ? 8 : length, height: vertical ? length : 8 }),
|
|
1429
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x: vertical ? x + 12 : x, y: vertical ? y + length : y + 20, children: _optionalChain([items, 'access',
|
|
1430
|
-
/* @__PURE__ */ _jsxruntime.jsx.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',
|
|
1442
|
+
/* @__PURE__ */ _jsxruntime.jsx.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]) }),
|
|
1443
|
+
/* @__PURE__ */ _jsxruntime.jsx.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]) })
|
|
1431
1444
|
] });
|
|
1432
1445
|
}
|
|
1433
1446
|
}
|
|
@@ -1473,10 +1486,10 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
|
|
|
1473
1486
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
1474
1487
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
1475
1488
|
const zeroPosition = mapValue(0);
|
|
1476
|
-
const showValueAxis = _optionalChain([chart, 'access',
|
|
1477
|
-
const showCategoryAxis = _optionalChain([chart, 'access',
|
|
1478
|
-
const showValueLabels = showValueAxis && _optionalChain([chart, 'access',
|
|
1479
|
-
const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access',
|
|
1489
|
+
const showValueAxis = _optionalChain([chart, 'access', _190 => _190.valueAxis, 'optionalAccess', _191 => _191.delete]) !== true;
|
|
1490
|
+
const showCategoryAxis = _optionalChain([chart, 'access', _192 => _192.categoryAxis, 'optionalAccess', _193 => _193.delete]) !== true;
|
|
1491
|
+
const showValueLabels = showValueAxis && _optionalChain([chart, 'access', _194 => _194.valueAxis, 'optionalAccess', _195 => _195.labelPosition]) !== "none";
|
|
1492
|
+
const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access', _196 => _196.categoryAxis, 'optionalAccess', _197 => _197.labelPosition]) !== "none";
|
|
1480
1493
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
1481
1494
|
showValueAxis ? valueTicks.map((tick) => {
|
|
1482
1495
|
const valuePosition = mapValue(tick);
|
|
@@ -1801,22 +1814,22 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
1801
1814
|
chart.valueAxis,
|
|
1802
1815
|
minValue,
|
|
1803
1816
|
maxValue,
|
|
1804
|
-
isAreaChart || _optionalChain([chart, 'access',
|
|
1817
|
+
isAreaChart || _optionalChain([chart, 'access', _198 => _198.valueAxis, 'optionalAccess', _199 => _199.crosses]) === "autoZero"
|
|
1805
1818
|
);
|
|
1806
1819
|
minValue = valueDomain.min;
|
|
1807
1820
|
maxValue = valueDomain.max;
|
|
1808
1821
|
const valueSpan = Math.max(1e-6, maxValue - minValue);
|
|
1809
1822
|
const seriesCount = Math.max(1, chart.series.length);
|
|
1810
1823
|
const categoryCount = Math.max(1, categories.length);
|
|
1811
|
-
const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1824
|
+
const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _200 => _200.view3d, 'optionalAccess', _201 => _201.depthPercent]), () => ( 100))) / 100, 0.5, 4);
|
|
1812
1825
|
const halfDepth = (seriesCount <= 1 ? 0.82 : 1.02) * depthScale;
|
|
1813
1826
|
const frontZ = halfDepth;
|
|
1814
1827
|
const backZ = -halfDepth;
|
|
1815
1828
|
const baseValue = isAreaChart ? Math.max(minValue, Math.min(maxValue, 0)) : minValue;
|
|
1816
|
-
const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1817
|
-
const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1818
|
-
const usePerspective = _optionalChain([chart, 'access',
|
|
1819
|
-
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
1829
|
+
const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _202 => _202.view3d, 'optionalAccess', _203 => _203.rotX]), () => ( 18)), -80, 80) * (Math.PI / 180);
|
|
1830
|
+
const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _204 => _204.view3d, 'optionalAccess', _205 => _205.rotY]), () => ( 24)), -80, 80) * (Math.PI / 180);
|
|
1831
|
+
const usePerspective = _optionalChain([chart, 'access', _206 => _206.view3d, 'optionalAccess', _207 => _207.rAngAx]) === false;
|
|
1832
|
+
const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _208 => _208.view3d, 'optionalAccess', _209 => _209.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
|
|
1820
1833
|
const normalizeX = (categoryIndex) => categoryCount <= 1 ? 0 : (categoryIndex / (categoryCount - 1) - 0.5) * 2;
|
|
1821
1834
|
const normalizeY = (value) => -(((value - minValue) / valueSpan - 0.5) * 2);
|
|
1822
1835
|
const stackedAreaDepthSpan = isAreaChart && isStackedSeries ? Math.max(0.18, (frontZ - backZ) * 0.56) : 0;
|
|
@@ -1865,7 +1878,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
1865
1878
|
categoryIndex,
|
|
1866
1879
|
defined: point.defined,
|
|
1867
1880
|
depth: top.depth,
|
|
1868
|
-
depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess',
|
|
1881
|
+
depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess', _210 => _210.depth]), () => ( top.depth)),
|
|
1869
1882
|
top,
|
|
1870
1883
|
topBack
|
|
1871
1884
|
};
|
|
@@ -1990,11 +2003,11 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
1990
2003
|
] : [];
|
|
1991
2004
|
const strokeColor = chartSeriesStrokeColor(chart, seriesIndex);
|
|
1992
2005
|
const fillColor = chartSeriesColor(chart, seriesIndex);
|
|
1993
|
-
const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access',
|
|
1994
|
-
const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access',
|
|
2006
|
+
const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access', _211 => _211.series, 'access', _212 => _212[seriesIndex], 'optionalAccess', _213 => _213.markerSymbol]));
|
|
2007
|
+
const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access', _214 => _214.series, 'access', _215 => _215[seriesIndex], 'optionalAccess', _216 => _216.markerSize])));
|
|
1995
2008
|
const slabFaces = isAreaChart && isStackedSeries ? definedPoints.slice(1).map((point, pointIndex) => {
|
|
1996
2009
|
const previous = definedPoints[pointIndex];
|
|
1997
|
-
if (!_optionalChain([previous, 'optionalAccess',
|
|
2010
|
+
if (!_optionalChain([previous, 'optionalAccess', _217 => _217.topBack]) || !point.topBack || !previous.bottomBack || !point.bottomBack) {
|
|
1998
2011
|
return null;
|
|
1999
2012
|
}
|
|
2000
2013
|
const topFace = buildLinearSvgPath([previous.top, point.top, point.topBack, previous.topBack], true);
|
|
@@ -2026,13 +2039,13 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2026
2039
|
}) : [];
|
|
2027
2040
|
const firstDefinedPoint = _nullishCoalesce(definedPoints[0], () => ( null));
|
|
2028
2041
|
const lastDefinedPoint = _nullishCoalesce(definedPoints[definedPoints.length - 1], () => ( null));
|
|
2029
|
-
const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess',
|
|
2042
|
+
const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess', _218 => _218.topBack]) && _optionalChain([firstDefinedPoint, 'optionalAccess', _219 => _219.bottomBack]) ? buildLinearSvgPath([
|
|
2030
2043
|
firstDefinedPoint.top,
|
|
2031
2044
|
firstDefinedPoint.bottom,
|
|
2032
2045
|
firstDefinedPoint.bottomBack,
|
|
2033
2046
|
firstDefinedPoint.topBack
|
|
2034
2047
|
], true) : "";
|
|
2035
|
-
const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess',
|
|
2048
|
+
const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess', _220 => _220.topBack]) && _optionalChain([lastDefinedPoint, 'optionalAccess', _221 => _221.bottomBack]) ? buildLinearSvgPath([
|
|
2036
2049
|
lastDefinedPoint.top,
|
|
2037
2050
|
lastDefinedPoint.bottom,
|
|
2038
2051
|
lastDefinedPoint.bottomBack,
|
|
@@ -2105,7 +2118,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2105
2118
|
fill: "none",
|
|
2106
2119
|
stroke: strokeColor,
|
|
2107
2120
|
strokeLinejoin: "round",
|
|
2108
|
-
strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2121
|
+
strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access', _222 => _222.series, 'access', _223 => _223[seriesIndex], 'optionalAccess', _224 => _224.lineWidthPx]), () => ( 2)))
|
|
2109
2122
|
}
|
|
2110
2123
|
),
|
|
2111
2124
|
markerPath.length > 0 ? definedPoints.map((point, pointIndex) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2117,8 +2130,8 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
|
|
|
2117
2130
|
{
|
|
2118
2131
|
...chartElementDataProps(seriesIndex, point.categoryIndex),
|
|
2119
2132
|
d: markerPath,
|
|
2120
|
-
fill: _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2121
|
-
stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
2133
|
+
fill: _nullishCoalesce(_optionalChain([chart, 'access', _225 => _225.series, 'access', _226 => _226[seriesIndex], 'optionalAccess', _227 => _227.markerColor]), () => ( fillColor)),
|
|
2134
|
+
stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _228 => _228.series, 'access', _229 => _229[seriesIndex], 'optionalAccess', _230 => _230.markerLineColor]), () => ( chart.chartAreaFillColor)), () => ( palette.surface)),
|
|
2122
2135
|
strokeWidth: 1
|
|
2123
2136
|
}
|
|
2124
2137
|
)
|
|
@@ -2180,7 +2193,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2180
2193
|
const isPercentStacked = chartType === "ColumnPercentStacked" || chartType === "BarPercentStacked";
|
|
2181
2194
|
const isHorizontal = chartType === "BarClustered" || chartType === "BarStacked" || chartType === "BarPercentStacked";
|
|
2182
2195
|
const isHistogramLike = isHistogramLikeChart(chart) && chartType === "ColumnClustered";
|
|
2183
|
-
const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access',
|
|
2196
|
+
const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access', _231 => _231.categoryAxis, 'optionalAccess', _232 => _232.orientation]) !== "maxMin";
|
|
2184
2197
|
const categories = shouldReverseCategories ? sourceCategories.slice().reverse() : sourceCategories;
|
|
2185
2198
|
const isStacked = chartType === "ColumnStacked" || chartType === "BarStacked" || isPercentStacked;
|
|
2186
2199
|
const negativeFillMode = isPercentStacked ? "chartArea" : chartType === "ColumnClustered" ? "none" : "series";
|
|
@@ -2264,24 +2277,35 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2264
2277
|
minValue = valueDomain.min;
|
|
2265
2278
|
maxValue = valueDomain.max;
|
|
2266
2279
|
const categoryBandPadding = isHistogramLike ? { inner: 0, outer: 0 } : resolveCategoryBandPadding(chart.gapWidth);
|
|
2267
|
-
const categoryScale =
|
|
2268
|
-
|
|
2280
|
+
const categoryScale = bandScale(
|
|
2281
|
+
categories,
|
|
2282
|
+
isHorizontal ? [plot.top, plot.top + plot.height] : [plot.left, plot.left + plot.width],
|
|
2283
|
+
categoryBandPadding.inner,
|
|
2284
|
+
categoryBandPadding.outer
|
|
2285
|
+
);
|
|
2286
|
+
const seriesScale = bandScale(
|
|
2287
|
+
Array.from({ length: seriesCount }, (_, index) => String(index)),
|
|
2288
|
+
[0, categoryScale.bandwidth],
|
|
2289
|
+
isHistogramLike ? 0 : 0.16,
|
|
2290
|
+
isHistogramLike ? 0 : 0.08
|
|
2291
|
+
);
|
|
2269
2292
|
const usesSeriesDepthAxis = chart.is3d === true && !isHorizontal && !isStacked && seriesCount > 1 && chart.seriesAxis != null;
|
|
2270
2293
|
const depthLaneSpread = usesSeriesDepthAxis ? clamp(1.26 + seriesCount * 0.16, 1.4, 1.96) : 1;
|
|
2271
2294
|
const depthGridSpanX = usesSeriesDepthAxis && frameOffsets ? frameOffsets.depthX * depthLaneSpread : 0;
|
|
2272
2295
|
const depthGridSpanY = usesSeriesDepthAxis && frameOffsets ? frameOffsets.depthY * depthLaneSpread : 0;
|
|
2273
2296
|
const depthSlotX = usesSeriesDepthAxis ? depthGridSpanX / Math.max(1, seriesCount) : 0;
|
|
2274
2297
|
const depthSlotY = usesSeriesDepthAxis ? depthGridSpanY / Math.max(1, seriesCount) : 0;
|
|
2275
|
-
const depthBarX = usesSeriesDepthAxis ? Math.sign(depthSlotX || _optionalChain([frameOffsets, 'optionalAccess',
|
|
2276
|
-
const depthBarY = usesSeriesDepthAxis ? Math.sign(depthSlotY || _optionalChain([frameOffsets, 'optionalAccess',
|
|
2277
|
-
const shouldReverseValueAxis = _optionalChain([chart, 'access',
|
|
2278
|
-
const valueScale =
|
|
2298
|
+
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]);
|
|
2299
|
+
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]);
|
|
2300
|
+
const shouldReverseValueAxis = _optionalChain([chart, 'access', _237 => _237.valueAxis, 'optionalAccess', _238 => _238.orientation]) === "maxMin";
|
|
2301
|
+
const valueScale = linearScale(
|
|
2302
|
+
[minValue, maxValue],
|
|
2279
2303
|
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]
|
|
2280
2304
|
);
|
|
2281
|
-
const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2305
|
+
const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _239 => _239.valueAxis, 'optionalAccess', _240 => _240.majorUnit]), () => ( 20))) : valueDomain.ticks;
|
|
2282
2306
|
const categoryPositions = categories.map((category) => {
|
|
2283
2307
|
const bandStart = _nullishCoalesce(categoryScale(category), () => ( 0));
|
|
2284
|
-
return bandStart + categoryScale.bandwidth
|
|
2308
|
+
return bandStart + categoryScale.bandwidth / 2;
|
|
2285
2309
|
});
|
|
2286
2310
|
const bars = [];
|
|
2287
2311
|
const positive = Array.from({ length: categoryCount }, () => 0);
|
|
@@ -2291,7 +2315,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2291
2315
|
const value = _nullishCoalesce(matrix[seriesIndex][categoryIndex], () => ( 0));
|
|
2292
2316
|
const rawValue = _nullishCoalesce(rawMatrix[seriesIndex][categoryIndex], () => ( value));
|
|
2293
2317
|
const pointIndex = shouldReverseCategories ? categoryCount - 1 - categoryIndex : categoryIndex;
|
|
2294
|
-
const pointStyle = _optionalChain([chart, 'access',
|
|
2318
|
+
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)]);
|
|
2295
2319
|
let start = 0;
|
|
2296
2320
|
let end = value;
|
|
2297
2321
|
if (isStacked) {
|
|
@@ -2306,19 +2330,19 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2306
2330
|
}
|
|
2307
2331
|
}
|
|
2308
2332
|
const colors = chartSeriesBarColors(chart, seriesIndex, rawValue, negativeFillMode);
|
|
2309
|
-
const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access',
|
|
2333
|
+
const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access', _246 => _246.series, 'access', _247 => _247[seriesIndex], 'optionalAccess', _248 => _248.invertIfNegative]) === true;
|
|
2310
2334
|
if (!isInvertedNegative) {
|
|
2311
2335
|
if (variesBarColorsByCategory(chart)) {
|
|
2312
2336
|
colors.fill = chartPointColor(chart, pointIndex, seriesIndex);
|
|
2313
2337
|
colors.stroke = colors.fill;
|
|
2314
2338
|
}
|
|
2315
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
2339
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _249 => _249.color])) {
|
|
2316
2340
|
colors.fill = pointStyle.color;
|
|
2317
2341
|
if (!pointStyle.lineColor) {
|
|
2318
2342
|
colors.stroke = pointStyle.color;
|
|
2319
2343
|
}
|
|
2320
2344
|
}
|
|
2321
|
-
if (_optionalChain([pointStyle, 'optionalAccess',
|
|
2345
|
+
if (_optionalChain([pointStyle, 'optionalAccess', _250 => _250.lineColor])) {
|
|
2322
2346
|
colors.stroke = pointStyle.lineColor;
|
|
2323
2347
|
}
|
|
2324
2348
|
}
|
|
@@ -2327,11 +2351,11 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2327
2351
|
}
|
|
2328
2352
|
const category = categories[categoryIndex];
|
|
2329
2353
|
const categoryStart = _nullishCoalesce(categoryScale(category), () => ( 0));
|
|
2330
|
-
const barThickness = usesSeriesDepthAxis ? Math.max(7, categoryScale.bandwidth
|
|
2331
|
-
const barOffset = usesSeriesDepthAxis ? Math.max(0, (categoryScale.bandwidth
|
|
2354
|
+
const barThickness = usesSeriesDepthAxis ? Math.max(7, categoryScale.bandwidth * 0.4) : isHistogramLike ? categoryScale.bandwidth : isStacked ? categoryScale.bandwidth : seriesScale.bandwidth;
|
|
2355
|
+
const barOffset = usesSeriesDepthAxis ? Math.max(0, (categoryScale.bandwidth - barThickness) * 0.5) : isHistogramLike ? 0 : isStacked ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0));
|
|
2332
2356
|
const depthOffsetX = usesSeriesDepthAxis ? depthSlotX * seriesIndex : 0;
|
|
2333
2357
|
const depthOffsetY = usesSeriesDepthAxis ? depthSlotY * seriesIndex : 0;
|
|
2334
|
-
const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess',
|
|
2358
|
+
const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _251 => _251.depthX]), () => ( 0))) + depthOffsetY * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _252 => _252.depthY]), () => ( 0)));
|
|
2335
2359
|
const shapeTaper = normalized3dShape === "pyramid" ? 0.94 : normalized3dShape === "cone" ? 1 : 0;
|
|
2336
2360
|
let topScale = 1;
|
|
2337
2361
|
let bottomScale = 1;
|
|
@@ -2369,8 +2393,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2369
2393
|
isHorizontal: true,
|
|
2370
2394
|
key: `bar-${seriesIndex}-${categoryIndex}`,
|
|
2371
2395
|
left: Math.min(x1, x2),
|
|
2372
|
-
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2373
|
-
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2396
|
+
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _253 => _253.depthX]),
|
|
2397
|
+
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _254 => _254.depthY]),
|
|
2374
2398
|
shape3d: normalized3dShape,
|
|
2375
2399
|
seriesIndex,
|
|
2376
2400
|
stroke: colors.stroke,
|
|
@@ -2399,8 +2423,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2399
2423
|
isHorizontal: false,
|
|
2400
2424
|
key: `bar-${seriesIndex}-${categoryIndex}`,
|
|
2401
2425
|
left: categoryStart + barOffset,
|
|
2402
|
-
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2403
|
-
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess',
|
|
2426
|
+
depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _255 => _255.depthX]),
|
|
2427
|
+
depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _256 => _256.depthY]),
|
|
2404
2428
|
shape3d: normalized3dShape,
|
|
2405
2429
|
seriesIndex,
|
|
2406
2430
|
stroke: colors.stroke,
|
|
@@ -2472,8 +2496,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2472
2496
|
);
|
|
2473
2497
|
const depthAxisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
2474
2498
|
const depthGridColor = lightenColor(depthAxisColor, 0.48);
|
|
2475
|
-
const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess',
|
|
2476
|
-
const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess',
|
|
2499
|
+
const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _257 => _257.depthX]), () => ( 0));
|
|
2500
|
+
const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _258 => _258.depthY]), () => ( 0));
|
|
2477
2501
|
const depthAxisNode = usesSeriesDepthAxis && frameOffsets ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
2478
2502
|
Array.from({ length: categoryCount + 1 }, (_, boundaryIndex) => {
|
|
2479
2503
|
const x = plot.left + boundaryIndex / Math.max(1, categoryCount) * plot.width;
|
|
@@ -2568,7 +2592,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
2568
2592
|
y: bar.top
|
|
2569
2593
|
}
|
|
2570
2594
|
)),
|
|
2571
|
-
renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
2595
|
+
renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _259 => _259.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0, `bar-selection-${bar.key}`, bar.left, bar.top, bar.width, bar.height) : null)
|
|
2572
2596
|
] });
|
|
2573
2597
|
}
|
|
2574
2598
|
function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartElement) {
|
|
@@ -2595,11 +2619,11 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2595
2619
|
return Math.abs(total) < 1e-9 ? 1 : total;
|
|
2596
2620
|
}) : null;
|
|
2597
2621
|
return chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
|
|
2598
|
-
const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access',
|
|
2622
|
+
const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _260 => _260[seriesIndex], 'optionalAccess', _261 => _261[categoryIndex]]), () => ( null));
|
|
2599
2623
|
if (rawValue == null) {
|
|
2600
2624
|
return { defined: false, y: null, y0: null, y1: null };
|
|
2601
2625
|
}
|
|
2602
|
-
const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess',
|
|
2626
|
+
const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess', _262 => _262[categoryIndex]]), () => ( 1))) * 100 : rawValue;
|
|
2603
2627
|
if (value >= 0) {
|
|
2604
2628
|
const start2 = positive[categoryIndex];
|
|
2605
2629
|
const end2 = start2 + value;
|
|
@@ -2612,7 +2636,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2612
2636
|
return { defined: true, y: end, y0: start, y1: end };
|
|
2613
2637
|
}));
|
|
2614
2638
|
})() : chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
|
|
2615
|
-
const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access',
|
|
2639
|
+
const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _263 => _263[seriesIndex], 'optionalAccess', _264 => _264[categoryIndex]]), () => ( null));
|
|
2616
2640
|
return {
|
|
2617
2641
|
defined: value != null,
|
|
2618
2642
|
y: value,
|
|
@@ -2628,12 +2652,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2628
2652
|
let maxValue = Math.max(...stackedExtents);
|
|
2629
2653
|
if (isAreaChart) {
|
|
2630
2654
|
minValue = Math.min(0, minValue);
|
|
2631
|
-
} else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access',
|
|
2655
|
+
} else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access', _265 => _265.valueAxis, 'optionalAccess', _266 => _266.crosses]) === "autoZero") {
|
|
2632
2656
|
minValue = Math.min(0, minValue);
|
|
2633
2657
|
}
|
|
2634
2658
|
if (isPercentStackedSeries) {
|
|
2635
|
-
const explicitMin = typeof _optionalChain([chart, 'access',
|
|
2636
|
-
const explicitMax = typeof _optionalChain([chart, 'access',
|
|
2659
|
+
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);
|
|
2660
|
+
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);
|
|
2637
2661
|
minValue = explicitMin;
|
|
2638
2662
|
maxValue = explicitMax <= explicitMin ? explicitMin + 1 : explicitMax;
|
|
2639
2663
|
} else {
|
|
@@ -2641,24 +2665,24 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2641
2665
|
chart.valueAxis,
|
|
2642
2666
|
minValue,
|
|
2643
2667
|
maxValue,
|
|
2644
|
-
isAreaChart || _optionalChain([chart, 'access',
|
|
2668
|
+
isAreaChart || _optionalChain([chart, 'access', _271 => _271.valueAxis, 'optionalAccess', _272 => _272.crosses]) === "autoZero"
|
|
2645
2669
|
);
|
|
2646
2670
|
minValue = valueDomain.min;
|
|
2647
2671
|
maxValue = valueDomain.max;
|
|
2648
2672
|
}
|
|
2649
|
-
const xScale =
|
|
2650
|
-
const yScale =
|
|
2651
|
-
const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
2673
|
+
const xScale = pointScale(categories, [plot.left, plot.left + plot.width]);
|
|
2674
|
+
const yScale = linearScale([minValue, maxValue], [plot.top + plot.height, plot.top]);
|
|
2675
|
+
const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _273 => _273.valueAxis, 'optionalAccess', _274 => _274.majorUnit]), () => ( 20))) : resolveAxisDomainWithChartOverrides(
|
|
2652
2676
|
chart.valueAxis,
|
|
2653
2677
|
minValue,
|
|
2654
2678
|
maxValue,
|
|
2655
|
-
isAreaChart || _optionalChain([chart, 'access',
|
|
2679
|
+
isAreaChart || _optionalChain([chart, 'access', _275 => _275.valueAxis, 'optionalAccess', _276 => _276.crosses]) === "autoZero"
|
|
2656
2680
|
).ticks;
|
|
2657
2681
|
const categoryPositions = categories.map((category) => _nullishCoalesce(xScale(category), () => ( plot.left)));
|
|
2658
2682
|
const curve = _d3shape.curveLinear;
|
|
2659
2683
|
const areaBaseline = yScale(Math.max(minValue, 0));
|
|
2660
2684
|
const plotPointsBySeries = chart.series.map((_, seriesIndex) => categories.map((category, categoryIndex) => {
|
|
2661
|
-
const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access',
|
|
2685
|
+
const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access', _277 => _277[seriesIndex], 'optionalAccess', _278 => _278[categoryIndex]]), () => ( {
|
|
2662
2686
|
defined: false,
|
|
2663
2687
|
y: null,
|
|
2664
2688
|
y0: null,
|
|
@@ -2687,12 +2711,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2687
2711
|
);
|
|
2688
2712
|
}
|
|
2689
2713
|
const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
|
|
2690
|
-
const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess',
|
|
2691
|
-
const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess',
|
|
2692
|
-
const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess',
|
|
2693
|
-
const dropLineColor = _nullishCoalesce(normalizeRendererHexColor(_optionalChain([dropLinesRecord, 'optionalAccess',
|
|
2694
|
-
const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess',
|
|
2695
|
-
const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess',
|
|
2714
|
+
const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _279 => _279.dropLines]) && typeof rawRecord.dropLines === "object" ? rawRecord.dropLines : null;
|
|
2715
|
+
const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _280 => _280.highLowLines]) && typeof rawRecord.highLowLines === "object" ? rawRecord.highLowLines : null;
|
|
2716
|
+
const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess', _281 => _281.upDownBars]) && typeof rawRecord.upDownBars === "object" ? rawRecord.upDownBars : null;
|
|
2717
|
+
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)));
|
|
2718
|
+
const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess', _284 => _284.shapeProperties, 'optionalAccess', _285 => _285.lineColorHex])), () => ( chart.axisLineColor)), () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
2719
|
+
const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess', _286 => _286.gapWidth]) === "number" && Number.isFinite(upDownBarsRecord.gapWidth) ? upDownBarsRecord.gapWidth : 150;
|
|
2696
2720
|
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;
|
|
2697
2721
|
const upDownBarWidth = clamp(categoryStep * (1 - resolveCategoryBandPadding(upDownGapWidth).inner) * 0.82, 3, 28);
|
|
2698
2722
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
@@ -2707,7 +2731,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2707
2731
|
(value) => yScale(value)
|
|
2708
2732
|
),
|
|
2709
2733
|
!isAreaChart && !isStackedSeries && highLowLinesRecord ? categories.map((_, categoryIndex) => {
|
|
2710
|
-
const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access',
|
|
2734
|
+
const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access', _287 => _287[categoryIndex], 'optionalAccess', _288 => _288.y])).filter((value) => value != null && Number.isFinite(value));
|
|
2711
2735
|
if (yValues.length < 2) {
|
|
2712
2736
|
return null;
|
|
2713
2737
|
}
|
|
@@ -2726,8 +2750,8 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2726
2750
|
);
|
|
2727
2751
|
}) : null,
|
|
2728
2752
|
!isAreaChart && !isStackedSeries && upDownBarsRecord && plotPointsBySeries.length >= 2 ? categories.map((_, categoryIndex) => {
|
|
2729
|
-
const first = _optionalChain([plotPointsBySeries, 'access',
|
|
2730
|
-
const second = _optionalChain([plotPointsBySeries, 'access',
|
|
2753
|
+
const first = _optionalChain([plotPointsBySeries, 'access', _289 => _289[0], 'optionalAccess', _290 => _290[categoryIndex]]);
|
|
2754
|
+
const second = _optionalChain([plotPointsBySeries, 'access', _291 => _291[plotPointsBySeries.length - 1], 'optionalAccess', _292 => _292[categoryIndex]]);
|
|
2731
2755
|
if (!first || !second || first.y == null || second.y == null) {
|
|
2732
2756
|
return null;
|
|
2733
2757
|
}
|
|
@@ -2755,7 +2779,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2755
2779
|
const lineStrokePoints = displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
|
|
2756
2780
|
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), () => ( ""));
|
|
2757
2781
|
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), () => ( "")) : "";
|
|
2758
|
-
const seriesFillColor = typeof _optionalChain([series, 'access',
|
|
2782
|
+
const seriesFillColor = typeof _optionalChain([series, 'access', _293 => _293.shapeProperties, 'optionalAccess', _294 => _294.xmlFillColor]) === "string" ? series.shapeProperties.xmlFillColor : chartSeriesColor(chart, seriesIndex);
|
|
2759
2783
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
2760
2784
|
!isAreaChart && !isStackedSeries && dropLinesRecord ? points.map((point, pointIndex) => point.y == null ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2761
2785
|
"line",
|
|
@@ -2785,7 +2809,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2785
2809
|
...chartElementDataProps(seriesIndex),
|
|
2786
2810
|
d: linePath,
|
|
2787
2811
|
fill: "none",
|
|
2788
|
-
stroke: _optionalChain([series, 'access',
|
|
2812
|
+
stroke: _optionalChain([series, 'access', _295 => _295.shapeProperties, 'optionalAccess', _296 => _296.xmlLineHidden]) === true ? "none" : chartSeriesStrokeColor(chart, seriesIndex),
|
|
2789
2813
|
strokeLinecap: "round",
|
|
2790
2814
|
strokeLinejoin: "round",
|
|
2791
2815
|
strokeWidth: Math.max(1.5, _nullishCoalesce(series.lineWidthPx, () => ( 2)))
|
|
@@ -2803,7 +2827,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
|
|
|
2803
2827
|
strokeWidth: 1
|
|
2804
2828
|
}
|
|
2805
2829
|
)),
|
|
2806
|
-
points.map((point, pointIndex) => point.y != null && (isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
2830
|
+
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 ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `area-selection-${seriesIndex}-${pointIndex}`, [{ x: point.x, y: yScale(point.y) }]) : _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
|
|
2807
2831
|
`line-selection-${seriesIndex}-${pointIndex}`,
|
|
2808
2832
|
point.x - 4,
|
|
2809
2833
|
yScale(point.y) - 4,
|
|
@@ -2835,12 +2859,22 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2835
2859
|
return null;
|
|
2836
2860
|
}
|
|
2837
2861
|
const plot = layout.plot;
|
|
2838
|
-
const groupGapWidth = typeof _optionalChain([columnGroup, 'access',
|
|
2862
|
+
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));
|
|
2839
2863
|
const histogramColumns = columnGroup.series.some((series) => isHistogramLikeSeries(series));
|
|
2840
2864
|
const categoryBandPadding = histogramColumns ? { inner: 0, outer: 0 } : resolveCategoryBandPadding(groupGapWidth);
|
|
2841
|
-
const categoryScale =
|
|
2842
|
-
|
|
2843
|
-
|
|
2865
|
+
const categoryScale = bandScale(
|
|
2866
|
+
categories,
|
|
2867
|
+
[plot.left, plot.left + plot.width],
|
|
2868
|
+
categoryBandPadding.inner,
|
|
2869
|
+
categoryBandPadding.outer
|
|
2870
|
+
);
|
|
2871
|
+
const seriesScale = bandScale(
|
|
2872
|
+
Array.from({ length: columnGroup.series.length }, (_, index) => String(index)),
|
|
2873
|
+
[0, categoryScale.bandwidth],
|
|
2874
|
+
histogramColumns ? 0 : 0.16,
|
|
2875
|
+
histogramColumns ? 0 : 0.08
|
|
2876
|
+
);
|
|
2877
|
+
const categoryPositions = categories.map((category) => (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth / 2);
|
|
2844
2878
|
const resolveGlobalSeriesIndex = (series) => {
|
|
2845
2879
|
const index = chart.series.findIndex((candidate) => candidate.id === series.id);
|
|
2846
2880
|
return index >= 0 ? index : 0;
|
|
@@ -2851,19 +2885,19 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2851
2885
|
return null;
|
|
2852
2886
|
}
|
|
2853
2887
|
const primaryDomain = resolveNumericAxisDomain(
|
|
2854
|
-
typeof _optionalChain([columnGroup, 'access',
|
|
2855
|
-
typeof _optionalChain([columnGroup, 'access',
|
|
2856
|
-
_optionalChain([columnGroup, 'access',
|
|
2888
|
+
typeof _optionalChain([columnGroup, 'access', _300 => _300.valueAxis, 'optionalAccess', _301 => _301.min]) === "number" ? columnGroup.valueAxis.min : Math.min(...primaryValues),
|
|
2889
|
+
typeof _optionalChain([columnGroup, 'access', _302 => _302.valueAxis, 'optionalAccess', _303 => _303.max]) === "number" ? columnGroup.valueAxis.max : Math.max(...primaryValues),
|
|
2890
|
+
_optionalChain([columnGroup, 'access', _304 => _304.valueAxis, 'optionalAccess', _305 => _305.majorUnit]),
|
|
2857
2891
|
true
|
|
2858
2892
|
);
|
|
2859
2893
|
const secondaryDomain = resolveNumericAxisDomain(
|
|
2860
|
-
typeof _optionalChain([lineGroup, 'access',
|
|
2861
|
-
typeof _optionalChain([lineGroup, 'access',
|
|
2862
|
-
_optionalChain([lineGroup, 'access',
|
|
2894
|
+
typeof _optionalChain([lineGroup, 'access', _306 => _306.valueAxis, 'optionalAccess', _307 => _307.min]) === "number" ? lineGroup.valueAxis.min : Math.min(...secondaryValues),
|
|
2895
|
+
typeof _optionalChain([lineGroup, 'access', _308 => _308.valueAxis, 'optionalAccess', _309 => _309.max]) === "number" ? lineGroup.valueAxis.max : Math.max(...secondaryValues),
|
|
2896
|
+
_optionalChain([lineGroup, 'access', _310 => _310.valueAxis, 'optionalAccess', _311 => _311.majorUnit]),
|
|
2863
2897
|
false
|
|
2864
2898
|
);
|
|
2865
|
-
const primaryScale =
|
|
2866
|
-
const secondaryScale =
|
|
2899
|
+
const primaryScale = linearScale([primaryDomain.min, primaryDomain.max], [plot.top + plot.height, plot.top]);
|
|
2900
|
+
const secondaryScale = linearScale([secondaryDomain.min, secondaryDomain.max], [plot.top + plot.height, plot.top]);
|
|
2867
2901
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
2868
2902
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
2869
2903
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
@@ -2877,7 +2911,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2877
2911
|
primaryDomain.ticks,
|
|
2878
2912
|
(value) => primaryScale(value)
|
|
2879
2913
|
),
|
|
2880
|
-
_optionalChain([lineGroup, 'access',
|
|
2914
|
+
_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) => {
|
|
2881
2915
|
const y = secondaryScale(tick);
|
|
2882
2916
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2883
2917
|
"text",
|
|
@@ -2892,7 +2926,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2892
2926
|
`combo-secondary-tick-${tick}`
|
|
2893
2927
|
);
|
|
2894
2928
|
}) : null,
|
|
2895
|
-
_optionalChain([lineGroup, 'access',
|
|
2929
|
+
_optionalChain([lineGroup, 'access', _316 => _316.valueAxis, 'optionalAccess', _317 => _317.delete]) !== true ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2896
2930
|
"line",
|
|
2897
2931
|
{
|
|
2898
2932
|
stroke: axisColor,
|
|
@@ -2907,12 +2941,12 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2907
2941
|
const globalSeriesIndex = resolveGlobalSeriesIndex(series);
|
|
2908
2942
|
const value = _nullishCoalesce(safeNumber(series.values[categoryIndex]), () => ( 0));
|
|
2909
2943
|
const categoryStart = _nullishCoalesce(categoryScale(category), () => ( plot.left));
|
|
2910
|
-
const barWidth = Math.max(1, histogramColumns ? categoryScale.bandwidth
|
|
2944
|
+
const barWidth = Math.max(1, histogramColumns ? categoryScale.bandwidth : seriesScale.bandwidth);
|
|
2911
2945
|
const x = categoryStart + (histogramColumns ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0)));
|
|
2912
2946
|
const y = primaryScale(Math.max(0, value));
|
|
2913
2947
|
const zeroY = primaryScale(0);
|
|
2914
2948
|
const height = Math.max(1, Math.abs(zeroY - primaryScale(value)));
|
|
2915
|
-
const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
2949
|
+
const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _318 => _318.kind]) !== "point";
|
|
2916
2950
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.Fragment, { children: [
|
|
2917
2951
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2918
2952
|
"rect",
|
|
@@ -2939,7 +2973,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
|
|
|
2939
2973
|
lineGroup.series.map((series, seriesIndex) => {
|
|
2940
2974
|
const globalSeriesIndex = resolveGlobalSeriesIndex(series);
|
|
2941
2975
|
const points = categories.map((category, categoryIndex) => ({
|
|
2942
|
-
x: (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth
|
|
2976
|
+
x: (_nullishCoalesce(categoryScale(category), () => ( plot.left))) + categoryScale.bandwidth / 2,
|
|
2943
2977
|
y: safeNumber(series.values[categoryIndex])
|
|
2944
2978
|
}));
|
|
2945
2979
|
const lineStrokePoints = chart.displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
|
|
@@ -3041,26 +3075,26 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3041
3075
|
if (allX.length === 0 || allY.length === 0) {
|
|
3042
3076
|
return null;
|
|
3043
3077
|
}
|
|
3044
|
-
const hasExplicitMinX = typeof _optionalChain([chart, 'access',
|
|
3045
|
-
const hasExplicitMaxX = typeof _optionalChain([chart, 'access',
|
|
3046
|
-
const hasExplicitMinY = typeof _optionalChain([chart, 'access',
|
|
3047
|
-
const hasExplicitMaxY = typeof _optionalChain([chart, 'access',
|
|
3078
|
+
const hasExplicitMinX = typeof _optionalChain([chart, 'access', _319 => _319.categoryAxis, 'optionalAccess', _320 => _320.min]) === "number" && Number.isFinite(chart.categoryAxis.min);
|
|
3079
|
+
const hasExplicitMaxX = typeof _optionalChain([chart, 'access', _321 => _321.categoryAxis, 'optionalAccess', _322 => _322.max]) === "number" && Number.isFinite(chart.categoryAxis.max);
|
|
3080
|
+
const hasExplicitMinY = typeof _optionalChain([chart, 'access', _323 => _323.valueAxis, 'optionalAccess', _324 => _324.min]) === "number" && Number.isFinite(chart.valueAxis.min);
|
|
3081
|
+
const hasExplicitMaxY = typeof _optionalChain([chart, 'access', _325 => _325.valueAxis, 'optionalAccess', _326 => _326.max]) === "number" && Number.isFinite(chart.valueAxis.max);
|
|
3048
3082
|
const hasSyntheticIndexAxis = pointsBySeries.some((series) => series.usesSyntheticIndex);
|
|
3049
3083
|
const syntheticPointCount = Math.max(0, ...pointsBySeries.map((series) => series.pointCount));
|
|
3050
|
-
let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access',
|
|
3051
|
-
let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access',
|
|
3052
|
-
let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access',
|
|
3053
|
-
let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access',
|
|
3084
|
+
let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access', _327 => _327.categoryAxis, 'optionalAccess', _328 => _328.min])) : Math.min(...allX);
|
|
3085
|
+
let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access', _329 => _329.categoryAxis, 'optionalAccess', _330 => _330.max])) : Math.max(...allX);
|
|
3086
|
+
let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access', _331 => _331.valueAxis, 'optionalAccess', _332 => _332.min])) : Math.min(...allY);
|
|
3087
|
+
let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access', _333 => _333.valueAxis, 'optionalAccess', _334 => _334.max])) : Math.max(...allY);
|
|
3054
3088
|
if (!hasExplicitMinX) {
|
|
3055
|
-
minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access',
|
|
3089
|
+
minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access', _335 => _335.categoryAxis, 'optionalAccess', _336 => _336.crosses]) === "autoZero" ? Math.min(0, minX) : minX;
|
|
3056
3090
|
}
|
|
3057
3091
|
if (!hasExplicitMaxX) {
|
|
3058
|
-
maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access',
|
|
3092
|
+
maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access', _337 => _337.categoryAxis, 'optionalAccess', _338 => _338.crosses]) === "autoZero" ? Math.max(0, maxX) : maxX;
|
|
3059
3093
|
}
|
|
3060
|
-
if (!hasExplicitMinY && _optionalChain([chart, 'access',
|
|
3094
|
+
if (!hasExplicitMinY && _optionalChain([chart, 'access', _339 => _339.valueAxis, 'optionalAccess', _340 => _340.crosses]) === "autoZero") {
|
|
3061
3095
|
minY = Math.min(0, minY);
|
|
3062
3096
|
}
|
|
3063
|
-
if (!hasExplicitMaxY && _optionalChain([chart, 'access',
|
|
3097
|
+
if (!hasExplicitMaxY && _optionalChain([chart, 'access', _341 => _341.valueAxis, 'optionalAccess', _342 => _342.crosses]) === "autoZero") {
|
|
3064
3098
|
maxY = Math.max(0, maxY);
|
|
3065
3099
|
}
|
|
3066
3100
|
if (maxX <= minX) {
|
|
@@ -3069,8 +3103,8 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3069
3103
|
if (maxY <= minY) {
|
|
3070
3104
|
maxY = minY + 1;
|
|
3071
3105
|
}
|
|
3072
|
-
const xStep = typeof _optionalChain([chart, 'access',
|
|
3073
|
-
const yStep = typeof _optionalChain([chart, 'access',
|
|
3106
|
+
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);
|
|
3107
|
+
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);
|
|
3074
3108
|
if (!hasExplicitMinX && !hasSyntheticIndexAxis && Number.isFinite(xStep) && xStep > 0) {
|
|
3075
3109
|
minX = Math.floor(minX / xStep) * xStep;
|
|
3076
3110
|
}
|
|
@@ -3085,10 +3119,10 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3085
3119
|
}
|
|
3086
3120
|
const safeMaxX = maxX <= minX ? minX + 1 : maxX;
|
|
3087
3121
|
const safeMaxY = maxY <= minY ? minY + 1 : maxY;
|
|
3088
|
-
const xScale =
|
|
3089
|
-
const yScale =
|
|
3090
|
-
const xMajorUnit = typeof _optionalChain([chart, 'access',
|
|
3091
|
-
const yMajorUnit = typeof _optionalChain([chart, 'access',
|
|
3122
|
+
const xScale = linearScale([minX, safeMaxX], [plot.left, plot.left + plot.width]);
|
|
3123
|
+
const yScale = linearScale([minY, safeMaxY], [plot.top + plot.height, plot.top]);
|
|
3124
|
+
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;
|
|
3125
|
+
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);
|
|
3092
3126
|
const xTicks = buildNumericTickValues(minX, safeMaxX, xMajorUnit);
|
|
3093
3127
|
const yTicks = buildNumericTickValues(minY, safeMaxY, yMajorUnit);
|
|
3094
3128
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
@@ -3154,7 +3188,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3154
3188
|
markerSize
|
|
3155
3189
|
);
|
|
3156
3190
|
const markerFill = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(series.lineColor, () => ( series.markerColor)), () => ( series.color)), () => ( chartSeriesStrokeColor(chart, seriesIndex)));
|
|
3157
|
-
const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access',
|
|
3191
|
+
const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access', _351 => _351.shapeProperties, 'optionalAccess', _352 => _352.xmlLineHidden]) !== true && seriesPoints.points.length > 1;
|
|
3158
3192
|
const shouldDrawMarkers = styleShowsMarkers && markerPath.length > 0;
|
|
3159
3193
|
const lineCurve = smooth || styleUsesSmoothCurve || series.smooth === true ? _d3shape.curveCatmullRom.alpha(0.5) : _d3shape.curveLinear;
|
|
3160
3194
|
const linePath = shouldDrawLine ? _nullishCoalesce(_d3shape.line.call(void 0, ).x((point) => xScale(point.x)).y((point) => yScale(point.y)).curve(lineCurve)(seriesPoints.points), () => ( "")) : "";
|
|
@@ -3193,7 +3227,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
|
|
|
3193
3227
|
`scatter-point-${seriesIndex}-${pointIndex}`
|
|
3194
3228
|
);
|
|
3195
3229
|
}),
|
|
3196
|
-
seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3230
|
+
seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _353 => _353.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0,
|
|
3197
3231
|
`scatter-selection-${seriesIndex}-${pointIndex}`,
|
|
3198
3232
|
[{ x: xScale(point.x), y: yScale(point.y) }]
|
|
3199
3233
|
) : null)
|
|
@@ -3206,7 +3240,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3206
3240
|
const pointsBySeries = chart.series.map((series) => series.values.map((value, index) => {
|
|
3207
3241
|
const x = safeNumber(series.categories[index]);
|
|
3208
3242
|
const y = safeNumber(value);
|
|
3209
|
-
const bubble = safeNumber(_optionalChain([series, 'access',
|
|
3243
|
+
const bubble = safeNumber(_optionalChain([series, 'access', _354 => _354.bubbleSizes, 'optionalAccess', _355 => _355[index]]));
|
|
3210
3244
|
return x == null || y == null ? null : { bubble: _nullishCoalesce(bubble, () => ( 1)), index, x, y };
|
|
3211
3245
|
}).filter((point) => point != null));
|
|
3212
3246
|
const allX = pointsBySeries.flatMap((points) => points.map((point) => point.x));
|
|
@@ -3225,7 +3259,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3225
3259
|
const bubbleScaleFactor = clamp((_nullishCoalesce(chart.bubbleScale, () => ( 100))) / 100, 0.2, 4);
|
|
3226
3260
|
const minRadius = 4;
|
|
3227
3261
|
const maxRadius = Math.max(minRadius + 2, 12 * bubbleScaleFactor);
|
|
3228
|
-
const radiusScale =
|
|
3262
|
+
const radiusScale = linearScale([minBubbleMagnitude, maxBubbleMagnitude <= minBubbleMagnitude ? minBubbleMagnitude + 1 : maxBubbleMagnitude], [minRadius, maxRadius]);
|
|
3229
3263
|
const safeMaxX = maxX <= minX ? minX + 1 : maxX;
|
|
3230
3264
|
const safeMaxY = maxY <= minY ? minY + 1 : maxY;
|
|
3231
3265
|
const xSpan = safeMaxX - minX;
|
|
@@ -3236,23 +3270,23 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3236
3270
|
chart.categoryAxis,
|
|
3237
3271
|
minX - xPad,
|
|
3238
3272
|
safeMaxX + xPad,
|
|
3239
|
-
_optionalChain([chart, 'access',
|
|
3273
|
+
_optionalChain([chart, 'access', _356 => _356.categoryAxis, 'optionalAccess', _357 => _357.crosses]) === "autoZero"
|
|
3240
3274
|
);
|
|
3241
3275
|
const yDomain = resolveAxisDomainWithChartOverrides(
|
|
3242
3276
|
chart.valueAxis,
|
|
3243
3277
|
minY - yPad,
|
|
3244
3278
|
safeMaxY + yPad,
|
|
3245
|
-
_optionalChain([chart, 'access',
|
|
3279
|
+
_optionalChain([chart, 'access', _358 => _358.valueAxis, 'optionalAccess', _359 => _359.crosses]) === "autoZero"
|
|
3246
3280
|
);
|
|
3247
|
-
const xScale =
|
|
3248
|
-
const yScale =
|
|
3281
|
+
const xScale = linearScale([xDomain.min, xDomain.max], [plot.left, plot.left + plot.width]);
|
|
3282
|
+
const yScale = linearScale([yDomain.min, yDomain.max], [plot.top + plot.height, plot.top]);
|
|
3249
3283
|
const xTicks = xDomain.ticks;
|
|
3250
3284
|
const yTicks = yDomain.ticks;
|
|
3251
3285
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
3252
3286
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
3253
3287
|
const isBubble3d = chart.bubble3d === true || chart.is3d === true;
|
|
3254
3288
|
const labelsEnabled = Boolean(
|
|
3255
|
-
_optionalChain([chart, 'access',
|
|
3289
|
+
_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])
|
|
3256
3290
|
);
|
|
3257
3291
|
const bubbleTotals = pointsBySeries.map((points) => points.reduce((sum, point) => sum + Math.abs(point.bubble), 0));
|
|
3258
3292
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
@@ -3288,9 +3322,9 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3288
3322
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left, y1: plot.top, y2: plot.top + plot.height }),
|
|
3289
3323
|
pointsBySeries.map((points, seriesIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
3290
3324
|
isBubble3d ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "radialGradient", { id: `bubble3d-grad-${chart.id}-${seriesIndex}`, cx: "35%", cy: "30%", r: "70%", children: [
|
|
3291
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0%", stopColor: lightenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3292
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "58%", stopColor: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3293
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "100%", stopColor: darkenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3325
|
+
/* @__PURE__ */ _jsxruntime.jsx.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) }),
|
|
3326
|
+
/* @__PURE__ */ _jsxruntime.jsx.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))) }),
|
|
3327
|
+
/* @__PURE__ */ _jsxruntime.jsx.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) })
|
|
3294
3328
|
] }) }) : null,
|
|
3295
3329
|
[...points].sort((left, right) => {
|
|
3296
3330
|
if (left.bubble !== right.bubble) {
|
|
@@ -3299,22 +3333,22 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3299
3333
|
return left.index - right.index;
|
|
3300
3334
|
}).map((point) => {
|
|
3301
3335
|
const series = chart.series[seriesIndex];
|
|
3302
|
-
const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess',
|
|
3336
|
+
const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _388 => _388.color]), () => ( _optionalChain([series, 'optionalAccess', _389 => _389.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex)));
|
|
3303
3337
|
const radius = radiusScale(Math.sqrt(Math.max(0, point.bubble)));
|
|
3304
3338
|
const pieces = [];
|
|
3305
|
-
if (_optionalChain([chart, 'access',
|
|
3339
|
+
if (_optionalChain([chart, 'access', _390 => _390.dataLabels, 'optionalAccess', _391 => _391.showSeriesName]) && _optionalChain([series, 'optionalAccess', _392 => _392.name])) {
|
|
3306
3340
|
pieces.push(series.name);
|
|
3307
3341
|
}
|
|
3308
|
-
if (_optionalChain([chart, 'access',
|
|
3342
|
+
if (_optionalChain([chart, 'access', _393 => _393.dataLabels, 'optionalAccess', _394 => _394.showCategoryName])) {
|
|
3309
3343
|
pieces.push(formatTickValue(point.x));
|
|
3310
3344
|
}
|
|
3311
|
-
if (_optionalChain([chart, 'access',
|
|
3345
|
+
if (_optionalChain([chart, 'access', _395 => _395.dataLabels, 'optionalAccess', _396 => _396.showValue])) {
|
|
3312
3346
|
pieces.push(formatTickValue(point.y));
|
|
3313
3347
|
}
|
|
3314
|
-
if (_optionalChain([chart, 'access',
|
|
3348
|
+
if (_optionalChain([chart, 'access', _397 => _397.dataLabels, 'optionalAccess', _398 => _398.showBubbleSize])) {
|
|
3315
3349
|
pieces.push(formatTickValue(point.bubble));
|
|
3316
3350
|
}
|
|
3317
|
-
if (_optionalChain([chart, 'access',
|
|
3351
|
+
if (_optionalChain([chart, 'access', _399 => _399.dataLabels, 'optionalAccess', _400 => _400.showPercent])) {
|
|
3318
3352
|
pieces.push(`${Math.round(Math.abs(point.bubble) / Math.max(1, _nullishCoalesce(bubbleTotals[seriesIndex], () => ( 1))) * 100)}%`);
|
|
3319
3353
|
}
|
|
3320
3354
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
@@ -3331,7 +3365,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
|
|
|
3331
3365
|
strokeWidth: isBubble3d ? 1.2 : 1
|
|
3332
3366
|
}
|
|
3333
3367
|
),
|
|
3334
|
-
isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3368
|
+
isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _401 => _401.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
|
|
3335
3369
|
`bubble-selection-${seriesIndex}-${point.index}`,
|
|
3336
3370
|
xScale(point.x) - radius,
|
|
3337
3371
|
yScale(point.y) - radius,
|
|
@@ -3378,22 +3412,22 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3378
3412
|
const centerY = plot.top + plot.height * 0.52;
|
|
3379
3413
|
const radius = Math.max(22, Math.min(plot.width, plot.height) * 0.38);
|
|
3380
3414
|
const values = chart.series.flatMap((series) => series.values.slice(0, categories.length).map((value) => safeNumber(value)).filter((value) => value != null));
|
|
3381
|
-
const hasExplicitMin = typeof _optionalChain([chart, 'access',
|
|
3382
|
-
const hasExplicitMax = typeof _optionalChain([chart, 'access',
|
|
3383
|
-
let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access',
|
|
3384
|
-
let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access',
|
|
3385
|
-
if (_optionalChain([chart, 'access',
|
|
3415
|
+
const hasExplicitMin = typeof _optionalChain([chart, 'access', _402 => _402.valueAxis, 'optionalAccess', _403 => _403.min]) === "number" && Number.isFinite(chart.valueAxis.min);
|
|
3416
|
+
const hasExplicitMax = typeof _optionalChain([chart, 'access', _404 => _404.valueAxis, 'optionalAccess', _405 => _405.max]) === "number" && Number.isFinite(chart.valueAxis.max);
|
|
3417
|
+
let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access', _406 => _406.valueAxis, 'optionalAccess', _407 => _407.min])) : Math.min(0, ...values.length ? values : [0]);
|
|
3418
|
+
let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access', _408 => _408.valueAxis, 'optionalAccess', _409 => _409.max])) : Math.max(1, ...values.length ? values : [1]);
|
|
3419
|
+
if (_optionalChain([chart, 'access', _410 => _410.valueAxis, 'optionalAccess', _411 => _411.crosses]) === "autoZero") {
|
|
3386
3420
|
minValue = Math.min(0, minValue);
|
|
3387
3421
|
}
|
|
3388
3422
|
const safeMax = maxValue <= minValue ? minValue + 1 : maxValue;
|
|
3389
3423
|
const span = Math.max(1e-6, safeMax - minValue);
|
|
3390
|
-
const candidateMajorUnit = typeof _optionalChain([chart, 'access',
|
|
3424
|
+
const candidateMajorUnit = typeof _optionalChain([chart, 'access', _412 => _412.valueAxis, 'optionalAccess', _413 => _413.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : void 0;
|
|
3391
3425
|
const preferredMajorUnit = candidateMajorUnit && span / candidateMajorUnit >= 3 ? candidateMajorUnit : buildNiceStep(minValue, safeMax, 6);
|
|
3392
3426
|
const ticks = buildNumericTickValues(minValue, safeMax, preferredMajorUnit);
|
|
3393
3427
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
3394
3428
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
3395
3429
|
const filled = chart.radarStyle === "filled";
|
|
3396
|
-
const showSpokes = _optionalChain([chart, 'access',
|
|
3430
|
+
const showSpokes = _optionalChain([chart, 'access', _414 => _414.categoryAxis, 'optionalAccess', _415 => _415.majorGridlines]) === true;
|
|
3397
3431
|
const angleAt = (index) => Math.PI * 2 * index / categories.length - Math.PI / 2;
|
|
3398
3432
|
const radialPoint = (index, valueRatio) => {
|
|
3399
3433
|
const angle = angleAt(index);
|
|
@@ -3495,7 +3529,7 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
|
|
|
3495
3529
|
},
|
|
3496
3530
|
`radar-point-${seriesIndex}-${point.pointIndex}`
|
|
3497
3531
|
)) : null,
|
|
3498
|
-
definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3532
|
+
definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _416 => _416.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0,
|
|
3499
3533
|
`radar-selection-${seriesIndex}-${point.pointIndex}`,
|
|
3500
3534
|
[{ x: point.x, y: point.y }]
|
|
3501
3535
|
) : null)
|
|
@@ -3520,14 +3554,14 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3520
3554
|
const arcs = _d3shape.pie.call(void 0, ).value((entry) => entry.value).sort(null).startAngle(startAngle).endAngle(startAngle + Math.PI * 2)(pieData);
|
|
3521
3555
|
const arcPath = _d3shape.arc.call(void 0, ).innerRadius(innerRadius).outerRadius(outerRadius);
|
|
3522
3556
|
const isPie3d = chartType === "Pie3D" || chartType === "PieExploded" && chart.is3d === true;
|
|
3523
|
-
const rotX = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3524
|
-
const perspective = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3557
|
+
const rotX = _nullishCoalesce(_optionalChain([chart, 'access', _417 => _417.view3d, 'optionalAccess', _418 => _418.rotX]), () => ( 20));
|
|
3558
|
+
const perspective = _nullishCoalesce(_optionalChain([chart, 'access', _419 => _419.view3d, 'optionalAccess', _420 => _420.perspective]), () => ( 30));
|
|
3525
3559
|
const tiltFromRotX = clamp(0.14 + rotX / 90 * 0.72, 0.12, 0.92);
|
|
3526
3560
|
const perspectiveCompression = clamp(1 - perspective / 180, 0.55, 1);
|
|
3527
3561
|
const tilt = isPie3d ? clamp(tiltFromRotX * perspectiveCompression, 0.14, 0.78) : 1;
|
|
3528
|
-
const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3562
|
+
const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access', _421 => _421.view3d, 'optionalAccess', _422 => _422.depthPercent]), () => ( 100))) / 100;
|
|
3529
3563
|
const depth = isPie3d ? Math.max(9, outerRadius * 0.28 * depthScale) : 0;
|
|
3530
|
-
const dataLabelsEnabled = Boolean(_optionalChain([chart, 'access',
|
|
3564
|
+
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]));
|
|
3531
3565
|
const total = pieData.reduce((sum, entry) => sum + entry.value, 0);
|
|
3532
3566
|
const shadowId = `pie3d-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
3533
3567
|
const baseShadowId = `pie3d-base-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
@@ -3538,8 +3572,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3538
3572
|
right: layout.width - 6,
|
|
3539
3573
|
top: layout.plot.top + 8
|
|
3540
3574
|
};
|
|
3541
|
-
const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3542
|
-
const centerValuePointLabel = chartType === "Doughnut" ? _nullishCoalesce((_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3575
|
+
const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access', _429 => _429.dataLabels, 'optionalAccess', _430 => _430.pointLabels]), () => ( []))).map((label) => [label.index, label]));
|
|
3576
|
+
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;
|
|
3543
3577
|
const centerValueEntry = centerValuePointLabel ? _nullishCoalesce(pieData.find((entry) => entry.index === centerValuePointLabel.index), () => ( null)) : null;
|
|
3544
3578
|
const shouldRenderCenterValue = chartType === "Doughnut" && centerValueEntry != null;
|
|
3545
3579
|
const centerValueLooksPercent = centerValueEntry != null && total > 0 && total <= 1.0000001 && centerValueEntry.value >= 0 && centerValueEntry.value <= 1.0000001;
|
|
@@ -3548,13 +3582,13 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3548
3582
|
14,
|
|
3549
3583
|
Math.min(
|
|
3550
3584
|
Math.max(20, innerRadius * 0.72),
|
|
3551
|
-
(_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess',
|
|
3585
|
+
(_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess', _433 => _433.fontSizePt]), () => ( 28))) * 0.85
|
|
3552
3586
|
)
|
|
3553
3587
|
) : 0;
|
|
3554
3588
|
const resolveSliceExplosion = (pointIndex) => {
|
|
3555
|
-
const pointStyle = _optionalChain([pieSeries, 'optionalAccess',
|
|
3556
|
-
const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess',
|
|
3557
|
-
const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess',
|
|
3589
|
+
const pointStyle = _optionalChain([pieSeries, 'optionalAccess', _434 => _434.dataPointStyles, 'optionalAccess', _435 => _435.find, 'call', _436 => _436((entry) => entry.index === pointIndex)]);
|
|
3590
|
+
const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess', _437 => _437.shapeProperties, 'optionalAccess', _438 => _438.xmlExplosion]) === "number" ? pieSeries.shapeProperties.xmlExplosion : 0;
|
|
3591
|
+
const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess', _439 => _439.explosion]), () => ( seriesExplosion)), () => ( 0)));
|
|
3558
3592
|
if (rawExplosion <= 0) {
|
|
3559
3593
|
return 0;
|
|
3560
3594
|
}
|
|
@@ -3655,7 +3689,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3655
3689
|
const midAngle = (arc.startAngle + arc.endAngle) / 2;
|
|
3656
3690
|
const explodeX = Math.sin(midAngle) * explosion;
|
|
3657
3691
|
const explodeY = -Math.cos(midAngle) * explosion * (isPie3d ? tilt : 1);
|
|
3658
|
-
const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess',
|
|
3692
|
+
const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _440 => _440.kind]) !== "point";
|
|
3659
3693
|
const sliceHandlePoints = isSliceSelected ? [
|
|
3660
3694
|
pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, arc.startAngle),
|
|
3661
3695
|
pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, midAngle),
|
|
@@ -3669,12 +3703,12 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
|
|
|
3669
3703
|
const labelX = centerX + Math.sin(midAngle) * labelRadius + explodeX;
|
|
3670
3704
|
const labelY = centerY - Math.cos(midAngle) * labelRadius * (isPie3d ? tilt : 1) + explodeY;
|
|
3671
3705
|
const pieces = [];
|
|
3672
|
-
if (_optionalChain([chart, 'access',
|
|
3706
|
+
if (_optionalChain([chart, 'access', _441 => _441.dataLabels, 'optionalAccess', _442 => _442.showCategoryName]) && arc.data.label.trim().length > 0) {
|
|
3673
3707
|
pieces.push(arc.data.label);
|
|
3674
3708
|
}
|
|
3675
3709
|
const pointLabel = pointLabelByIndex.get(arc.data.index);
|
|
3676
|
-
const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess',
|
|
3677
|
-
const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess',
|
|
3710
|
+
const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _443 => _443.showValue]), () => ( _optionalChain([chart, 'access', _444 => _444.dataLabels, 'optionalAccess', _445 => _445.showValue])));
|
|
3711
|
+
const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _446 => _446.showPercent]), () => ( _optionalChain([chart, 'access', _447 => _447.dataLabels, 'optionalAccess', _448 => _448.showPercent])));
|
|
3678
3712
|
if (showValue) {
|
|
3679
3713
|
pieces.push(formatTickValue(arc.data.value));
|
|
3680
3714
|
}
|
|
@@ -3739,7 +3773,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
|
|
|
3739
3773
|
const pieSeriesIndex = selectPrimaryPieSeriesIndex(chart);
|
|
3740
3774
|
const pieSeries = chart.series[pieSeriesIndex];
|
|
3741
3775
|
const categories = getCategoryLabels(chart);
|
|
3742
|
-
const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess',
|
|
3776
|
+
const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess', _449 => _449.values, 'access', _450 => _450.map, 'call', _451 => _451((value) => Math.max(0, _nullishCoalesce(safeNumber(value), () => ( 0))))]), () => ( []));
|
|
3743
3777
|
if (values.length === 0) {
|
|
3744
3778
|
return null;
|
|
3745
3779
|
}
|
|
@@ -3904,24 +3938,24 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3904
3938
|
return null;
|
|
3905
3939
|
}
|
|
3906
3940
|
const isContour = isContourSurfaceChart(chart);
|
|
3907
|
-
const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access',
|
|
3941
|
+
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);
|
|
3908
3942
|
const minValue = domain.minValue;
|
|
3909
3943
|
const safeMax = domain.safeMax;
|
|
3910
|
-
const wallFill = _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3911
|
-
const wallLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3944
|
+
const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _458 => _458.backWall, 'optionalAccess', _459 => _459.fillColor]), () => ( "#d9d9df"));
|
|
3945
|
+
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))))));
|
|
3912
3946
|
if (isContour) {
|
|
3913
3947
|
const faces2 = [];
|
|
3914
3948
|
const lines = [];
|
|
3915
|
-
const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3949
|
+
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)));
|
|
3916
3950
|
const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
|
|
3917
|
-
const inset = _optionalChain([chart, 'access',
|
|
3951
|
+
const inset = _optionalChain([chart, 'access', _470 => _470.valueAxis, 'optionalAccess', _471 => _471.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
|
|
3918
3952
|
const dataWidth = plot.width - 2 * inset;
|
|
3919
3953
|
for (let rowIndex = 0; rowIndex < rows - 1; rowIndex += 1) {
|
|
3920
3954
|
for (let columnIndex = 0; columnIndex < cols - 1; columnIndex += 1) {
|
|
3921
|
-
const p00 = _optionalChain([matrix, 'access',
|
|
3922
|
-
const p10 = _optionalChain([matrix, 'access',
|
|
3923
|
-
const p01 = _optionalChain([matrix, 'access',
|
|
3924
|
-
const p11 = _optionalChain([matrix, 'access',
|
|
3955
|
+
const p00 = _optionalChain([matrix, 'access', _472 => _472[rowIndex], 'optionalAccess', _473 => _473[columnIndex]]);
|
|
3956
|
+
const p10 = _optionalChain([matrix, 'access', _474 => _474[rowIndex], 'optionalAccess', _475 => _475[columnIndex + 1]]);
|
|
3957
|
+
const p01 = _optionalChain([matrix, 'access', _476 => _476[rowIndex + 1], 'optionalAccess', _477 => _477[columnIndex]]);
|
|
3958
|
+
const p11 = _optionalChain([matrix, 'access', _478 => _478[rowIndex + 1], 'optionalAccess', _479 => _479[columnIndex + 1]]);
|
|
3925
3959
|
if (p00 == null || p10 == null || p01 == null || p11 == null) {
|
|
3926
3960
|
continue;
|
|
3927
3961
|
}
|
|
@@ -3941,7 +3975,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3941
3975
|
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
|
|
3942
3976
|
z: (point.y - plot.top) / plot.height * ratios.depth
|
|
3943
3977
|
}));
|
|
3944
|
-
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access',
|
|
3978
|
+
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)));
|
|
3945
3979
|
for (let band = 0; band < domain.ticks.length - 1; band += 1) {
|
|
3946
3980
|
const lower = domain.ticks[band];
|
|
3947
3981
|
const upper = domain.ticks[band + 1];
|
|
@@ -3954,7 +3988,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3954
3988
|
if (!chart.wireframe) {
|
|
3955
3989
|
faces2.push(/* @__PURE__ */ _jsxruntime.jsx.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}`));
|
|
3956
3990
|
}
|
|
3957
|
-
const widths = _optionalChain([chart, 'access',
|
|
3991
|
+
const widths = _optionalChain([chart, 'access', _484 => _484.raw, 'optionalAccess', _485 => _485.bandFormatLineWidths]);
|
|
3958
3992
|
for (const group of _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true)) {
|
|
3959
3993
|
const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
|
|
3960
3994
|
lines.push(
|
|
@@ -3964,7 +3998,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3964
3998
|
d: group.edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
|
|
3965
3999
|
fill: "none",
|
|
3966
4000
|
stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint),
|
|
3967
|
-
strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess',
|
|
4001
|
+
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))
|
|
3968
4002
|
},
|
|
3969
4003
|
`surface-edge-${key}-${group.band}`
|
|
3970
4004
|
)
|
|
@@ -3978,12 +4012,12 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3978
4012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3979
4013
|
"rect",
|
|
3980
4014
|
{
|
|
3981
|
-
fill: _optionalChain([chart, 'access',
|
|
4015
|
+
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,
|
|
3982
4016
|
x: layout.plot.left,
|
|
3983
4017
|
y: layout.plot.top,
|
|
3984
4018
|
width: layout.plot.width,
|
|
3985
4019
|
height: layout.plot.height,
|
|
3986
|
-
stroke: typeof _optionalChain([chart, 'access',
|
|
4020
|
+
stroke: typeof _optionalChain([chart, 'access', _494 => _494.raw, 'optionalAccess', _495 => _495.plotAreaLineColor]) === "string" ? chart.raw.plotAreaLineColor : wallLineColor
|
|
3987
4021
|
}
|
|
3988
4022
|
),
|
|
3989
4023
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { fill: "none", height: plot.height, stroke: wallLineColor, width: plot.width, x: plot.left, y: plot.top }),
|
|
@@ -3991,11 +4025,11 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3991
4025
|
lines
|
|
3992
4026
|
] });
|
|
3993
4027
|
}
|
|
3994
|
-
const rotX = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3995
|
-
const rotY = (_nullishCoalesce(_optionalChain([chart, 'access',
|
|
3996
|
-
const usePerspective = _optionalChain([chart, 'access',
|
|
4028
|
+
const rotX = (_nullishCoalesce(_optionalChain([chart, 'access', _496 => _496.view3d, 'optionalAccess', _497 => _497.rotX]), () => ( 25))) * (Math.PI / 180);
|
|
4029
|
+
const rotY = (_nullishCoalesce(_optionalChain([chart, 'access', _498 => _498.view3d, 'optionalAccess', _499 => _499.rotY]), () => ( 30))) * (Math.PI / 180);
|
|
4030
|
+
const usePerspective = _optionalChain([chart, 'access', _500 => _500.view3d, 'optionalAccess', _501 => _501.rAngAx]) === false;
|
|
3997
4031
|
const perspectiveStrength = clamp(
|
|
3998
|
-
(_nullishCoalesce(_optionalChain([chart, 'access',
|
|
4032
|
+
(_nullishCoalesce(_optionalChain([chart, 'access', _502 => _502.view3d, 'optionalAccess', _503 => _503.perspective]), () => ( (usePerspective ? 30 : 0)))) / 100,
|
|
3999
4033
|
0,
|
|
4000
4034
|
1
|
|
4001
4035
|
);
|
|
@@ -4010,7 +4044,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4010
4044
|
const normalizedX = cols <= 1 ? 0 : (columnIndex / (cols - 1) - 0.5) * 2;
|
|
4011
4045
|
const normalizedY = hasValue ? -(_chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
|
|
4012
4046
|
const normalizedZ = rows <= 1 ? 0 : (rowIndex / (rows - 1) - 0.5) * 2 * depthScale;
|
|
4013
|
-
if (_optionalChain([chart, 'access',
|
|
4047
|
+
if (_optionalChain([chart, 'access', _504 => _504.view3d, 'optionalAccess', _505 => _505.rAngAx]) !== false) {
|
|
4014
4048
|
return {
|
|
4015
4049
|
depth: normalizedZ,
|
|
4016
4050
|
hasValue,
|
|
@@ -4048,7 +4082,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4048
4082
|
return { ...projected, x: centerX + (projected.x - centerRawX) * scale, y: centerY + (projected.y - centerRawY) * scale };
|
|
4049
4083
|
};
|
|
4050
4084
|
const wallNodes = [];
|
|
4051
|
-
const backRow = _optionalChain([chart, 'access',
|
|
4085
|
+
const backRow = _optionalChain([chart, 'access', _506 => _506.view3d, 'optionalAccess', _507 => _507.rAngAx]) !== false || cosX * cosY >= 0 ? rows - 1 : 0;
|
|
4052
4086
|
const sideColumn = sinY >= 0 ? 0 : cols - 1;
|
|
4053
4087
|
const wallPoint = (x, y, value) => ({ x, y, value });
|
|
4054
4088
|
const addWall = (key, points, color, hidden) => {
|
|
@@ -4058,18 +4092,18 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4058
4092
|
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
|
|
4059
4093
|
z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
|
|
4060
4094
|
}));
|
|
4061
|
-
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access',
|
|
4095
|
+
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);
|
|
4062
4096
|
const baseColor = _nullishCoalesce(color, () => ( wallFill));
|
|
4063
4097
|
wallNodes.push(/* @__PURE__ */ _jsxruntime.jsx.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));
|
|
4064
4098
|
};
|
|
4065
|
-
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',
|
|
4066
|
-
addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access',
|
|
4067
|
-
addWall("side", [wallPoint(sideColumn, 0, safeMax), wallPoint(sideColumn, rows - 1, safeMax), wallPoint(sideColumn, rows - 1, minValue), wallPoint(sideColumn, 0, minValue)], _optionalChain([chart, 'access',
|
|
4068
|
-
if (_optionalChain([chart, 'access',
|
|
4099
|
+
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]));
|
|
4100
|
+
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]));
|
|
4101
|
+
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]));
|
|
4102
|
+
if (_optionalChain([chart, 'access', _526 => _526.valueAxis, 'optionalAccess', _527 => _527.majorGridlines])) {
|
|
4069
4103
|
for (const tick of domain.ticks) {
|
|
4070
4104
|
const edges = [
|
|
4071
|
-
..._optionalChain([chart, 'access',
|
|
4072
|
-
..._optionalChain([chart, 'access',
|
|
4105
|
+
..._optionalChain([chart, 'access', _528 => _528.backWall, 'optionalAccess', _529 => _529.hidden]) ? [] : [[wallPoint(0, backRow, tick), wallPoint(cols - 1, backRow, tick)]],
|
|
4106
|
+
..._optionalChain([chart, 'access', _530 => _530.sideWall, 'optionalAccess', _531 => _531.hidden]) ? [] : [[wallPoint(sideColumn, 0, tick), wallPoint(sideColumn, rows - 1, tick)]]
|
|
4073
4107
|
];
|
|
4074
4108
|
wallNodes.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: _nullishCoalesce(chart.valueAxis.majorGridlineColor, () => ( wallLineColor)), strokeWidth: 1, d: edges.map((edge) => {
|
|
4075
4109
|
const [from, to] = edge.map(projectPoint);
|
|
@@ -4094,7 +4128,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4094
4128
|
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
|
|
4095
4129
|
z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
|
|
4096
4130
|
}));
|
|
4097
|
-
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access',
|
|
4131
|
+
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);
|
|
4098
4132
|
for (let band = 0; band < domain.ticks.length - 1; band += 1) {
|
|
4099
4133
|
const lower = domain.ticks[band];
|
|
4100
4134
|
const upper = domain.ticks[band + 1];
|
|
@@ -4102,7 +4136,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4102
4136
|
if (polygon.length < 3) continue;
|
|
4103
4137
|
const projected = polygon.map(projectPoint);
|
|
4104
4138
|
const midpoint = (lower + upper) / 2;
|
|
4105
|
-
const widths = _optionalChain([chart, 'access',
|
|
4139
|
+
const widths = _optionalChain([chart, 'access', _538 => _538.raw, 'optionalAccess', _539 => _539.bandFormatLineWidths]);
|
|
4106
4140
|
const edgeGroups = _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true);
|
|
4107
4141
|
faces.push({
|
|
4108
4142
|
depth: projected.reduce((sum, point) => sum + point.depth, 0) / projected.length,
|
|
@@ -4111,7 +4145,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4111
4145
|
edgeGroups.map((group) => {
|
|
4112
4146
|
const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
|
|
4113
4147
|
const edges = group.edges.map(([from, to]) => [projectPoint(from), projectPoint(to)]);
|
|
4114
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess',
|
|
4148
|
+
return /* @__PURE__ */ _jsxruntime.jsx.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}`);
|
|
4115
4149
|
})
|
|
4116
4150
|
] }, `surface-band-${rowIndex}-${columnIndex}-${triangleIndex}-${band}`)
|
|
4117
4151
|
});
|
|
@@ -4175,7 +4209,12 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4175
4209
|
}
|
|
4176
4210
|
const plot = layout.plot;
|
|
4177
4211
|
const labels = stages.map((stage) => stage.label);
|
|
4178
|
-
const xScale =
|
|
4212
|
+
const xScale = bandScale(
|
|
4213
|
+
labels,
|
|
4214
|
+
[plot.left, plot.left + plot.width],
|
|
4215
|
+
0.34,
|
|
4216
|
+
0.18
|
|
4217
|
+
);
|
|
4179
4218
|
const bars = [];
|
|
4180
4219
|
let runningTotal = 0;
|
|
4181
4220
|
stages.forEach((stage, index) => {
|
|
@@ -4192,8 +4231,8 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4192
4231
|
if (maxValue <= minValue) {
|
|
4193
4232
|
maxValue = minValue + 1;
|
|
4194
4233
|
}
|
|
4195
|
-
const yScale =
|
|
4196
|
-
const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access',
|
|
4234
|
+
const yScale = linearScale([minValue, maxValue], [plot.top + plot.height, plot.top]);
|
|
4235
|
+
const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access', _544 => _544.valueAxis, 'optionalAccess', _545 => _545.majorUnit]));
|
|
4197
4236
|
const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
|
|
4198
4237
|
const labelColor = resolveChartAxisTextColor(chart);
|
|
4199
4238
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
@@ -4215,7 +4254,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4215
4254
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left + plot.width, y1: yScale(0), y2: yScale(0) }),
|
|
4216
4255
|
bars.map((bar, index) => {
|
|
4217
4256
|
const bandLeft = _nullishCoalesce(xScale(bar.label), () => ( plot.left));
|
|
4218
|
-
const bandWidth = xScale.bandwidth
|
|
4257
|
+
const bandWidth = xScale.bandwidth;
|
|
4219
4258
|
const topValue = Math.max(bar.start, bar.end);
|
|
4220
4259
|
const bottomValue = Math.min(bar.start, bar.end);
|
|
4221
4260
|
const top = yScale(topValue);
|
|
@@ -4231,7 +4270,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
|
|
|
4231
4270
|
stroke: lightenColor(axisColor, 0.35),
|
|
4232
4271
|
strokeDasharray: "3 3",
|
|
4233
4272
|
strokeWidth: 1,
|
|
4234
|
-
x1: (_nullishCoalesce(xScale(connectorStart.label), () => ( plot.left))) + xScale.bandwidth
|
|
4273
|
+
x1: (_nullishCoalesce(xScale(connectorStart.label), () => ( plot.left))) + xScale.bandwidth,
|
|
4235
4274
|
x2: bandLeft,
|
|
4236
4275
|
y1: connectorY,
|
|
4237
4276
|
y2: connectorY
|
|
@@ -4467,8 +4506,8 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4467
4506
|
const minValue = Math.min(...allValues);
|
|
4468
4507
|
const maxValue = Math.max(...allValues);
|
|
4469
4508
|
const valueDomain = resolveAxisDomainWithChartOverrides(chart.valueAxis, minValue, maxValue, false);
|
|
4470
|
-
const yScale =
|
|
4471
|
-
const xScale =
|
|
4509
|
+
const yScale = linearScale([valueDomain.min, valueDomain.max], [layout.plot.top + layout.plot.height, layout.plot.top]);
|
|
4510
|
+
const xScale = pointScale(seriesStats.map((_, index) => index), [layout.plot.left + 24, layout.plot.left + layout.plot.width - 24]);
|
|
4472
4511
|
const gap = seriesStats.length > 1 ? Math.abs((_nullishCoalesce(xScale(1), () => ( 0))) - (_nullishCoalesce(xScale(0), () => ( 0)))) : layout.plot.width * 0.5;
|
|
4473
4512
|
const boxWidth = clamp(gap * 0.34, 20, 54);
|
|
4474
4513
|
const capWidth = Math.max(8, boxWidth * 0.52);
|
|
@@ -4683,132 +4722,6 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
|
|
|
4683
4722
|
})
|
|
4684
4723
|
] });
|
|
4685
4724
|
}
|
|
4686
|
-
function renderRegionMapChart(chart, palette, layout, selectedChartElement, { geoIdentity, geoMercator, geoNaturalEarth1, geoPath, resolveRegionMapFeatureSet, resolveRegionMapFeature, getRegionMapBaseFeatures }) {
|
|
4687
|
-
const primarySeriesIndex = Math.max(0, chart.series.findIndex((series) => series.hidden !== true));
|
|
4688
|
-
const primarySeries = _nullishCoalesce(chart.series[primarySeriesIndex], () => ( null));
|
|
4689
|
-
if (!primarySeries) {
|
|
4690
|
-
return null;
|
|
4691
|
-
}
|
|
4692
|
-
const labels = getCategoryLabels(chart);
|
|
4693
|
-
const layoutProperties = resolveRegionMapLayoutProperties(primarySeries);
|
|
4694
|
-
const geography = _optionalChain([layoutProperties, 'optionalAccess', _556 => _556.geography]) && typeof layoutProperties.geography === "object" ? layoutProperties.geography : null;
|
|
4695
|
-
const featureSet = resolveRegionMapFeatureSet(labels, geography);
|
|
4696
|
-
const viewedRegionType = typeof _optionalChain([geography, 'optionalAccess', _557 => _557.viewedRegionType]) === "string" ? geography.viewedRegionType : null;
|
|
4697
|
-
const projectionType = typeof _optionalChain([geography, 'optionalAccess', _558 => _558.projectionType]) === "string" ? geography.projectionType : null;
|
|
4698
|
-
const projection = featureSet === "us-state" ? geoIdentity() : projectionType === "miller" ? geoMercator() : geoNaturalEarth1();
|
|
4699
|
-
const availableFeatures = getRegionMapBaseFeatures(featureSet);
|
|
4700
|
-
const categoricalValues = resolveRegionMapColorStrings(primarySeries);
|
|
4701
|
-
const categoricalColorByLabel = categoricalValues ? new Map(
|
|
4702
|
-
Array.from(new Set(categoricalValues.filter(Boolean))).map((value, index) => [
|
|
4703
|
-
value,
|
|
4704
|
-
chartPointColor(chart, index, primarySeriesIndex)
|
|
4705
|
-
])
|
|
4706
|
-
) : null;
|
|
4707
|
-
const entries = labels.map((label, index) => {
|
|
4708
|
-
const feature = resolveRegionMapFeature(label, featureSet);
|
|
4709
|
-
const value = safeNumber(primarySeries.values[index]);
|
|
4710
|
-
const colorLabel = _optionalChain([categoricalValues, 'optionalAccess', _559 => _559[index]]) || null;
|
|
4711
|
-
return {
|
|
4712
|
-
colorLabel,
|
|
4713
|
-
feature,
|
|
4714
|
-
key: normalizeCategoryLabel(label),
|
|
4715
|
-
label: normalizeCategoryLabel(label),
|
|
4716
|
-
value
|
|
4717
|
-
};
|
|
4718
|
-
}).filter((entry) => entry.feature != null && (entry.value != null || entry.colorLabel != null));
|
|
4719
|
-
const fitToMatchedData = entries.length > 0 && (viewedRegionType === "dataOnly" || entries.length === 1);
|
|
4720
|
-
const fitFeatures = fitToMatchedData ? entries.map((entry) => entry.feature) : availableFeatures;
|
|
4721
|
-
projection.fitExtent(
|
|
4722
|
-
[
|
|
4723
|
-
[layout.plot.left + 8, layout.plot.top + 8],
|
|
4724
|
-
[layout.plot.left + layout.plot.width - 8, layout.plot.top + layout.plot.height - 8]
|
|
4725
|
-
],
|
|
4726
|
-
{
|
|
4727
|
-
type: "FeatureCollection",
|
|
4728
|
-
features: fitFeatures
|
|
4729
|
-
}
|
|
4730
|
-
);
|
|
4731
|
-
const path = geoPath(projection);
|
|
4732
|
-
const baseFeatures = fitToMatchedData ? fitFeatures : availableFeatures;
|
|
4733
|
-
const noDataFill = resolveRegionMapNoDataColor(chart, primarySeriesIndex);
|
|
4734
|
-
const outlineColor = chart.chartAreaBorderColor && chart.chartAreaBorderColor !== "transparent" ? chart.chartAreaBorderColor : darkenColor(noDataFill, 0.22);
|
|
4735
|
-
const numericEntryValues = primarySeries.values.map(safeNumber).filter((value) => typeof value === "number" && Number.isFinite(value));
|
|
4736
|
-
const minValue = numericEntryValues.length > 0 ? Math.min(...numericEntryValues) : 0;
|
|
4737
|
-
const maxValue = numericEntryValues.length > 0 ? Math.max(...numericEntryValues) : 1;
|
|
4738
|
-
const showRegionLabels = _optionalChain([layoutProperties, 'optionalAccess', _560 => _560.regionLabelLayout]) !== "none";
|
|
4739
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
4740
|
-
baseFeatures.map((feature, index) => {
|
|
4741
|
-
const d = path(feature);
|
|
4742
|
-
if (!d) {
|
|
4743
|
-
return null;
|
|
4744
|
-
}
|
|
4745
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4746
|
-
"path",
|
|
4747
|
-
{
|
|
4748
|
-
d,
|
|
4749
|
-
fill: noDataFill,
|
|
4750
|
-
stroke: outlineColor,
|
|
4751
|
-
strokeLinejoin: "round",
|
|
4752
|
-
strokeWidth: 0.6
|
|
4753
|
-
},
|
|
4754
|
-
`region-map-base-${_nullishCoalesce(feature.id, () => ( "feature"))}-${index}`
|
|
4755
|
-
);
|
|
4756
|
-
}),
|
|
4757
|
-
entries.map((entry, index) => {
|
|
4758
|
-
const d = path(entry.feature);
|
|
4759
|
-
if (!d) {
|
|
4760
|
-
return null;
|
|
4761
|
-
}
|
|
4762
|
-
const fill = entry.value != null ? (() => {
|
|
4763
|
-
const ratio = maxValue <= minValue ? 1 : (entry.value - minValue) / Math.max(1e-6, maxValue - minValue);
|
|
4764
|
-
return resolveRegionMapValueColor(chart, primarySeriesIndex, ratio);
|
|
4765
|
-
})() : _nullishCoalesce(_optionalChain([categoricalColorByLabel, 'optionalAccess', _561 => _561.get, 'call', _562 => _562(_nullishCoalesce(entry.colorLabel, () => ( "")))]), () => ( resolveRegionMapDataColor(chart, primarySeriesIndex)));
|
|
4766
|
-
const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, primarySeriesIndex, index);
|
|
4767
|
-
const centroid = path.centroid(entry.feature);
|
|
4768
|
-
const canShowSelectionDot = Number.isFinite(centroid[0]) && Number.isFinite(centroid[1]);
|
|
4769
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.Fragment, { children: [
|
|
4770
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4771
|
-
"path",
|
|
4772
|
-
{
|
|
4773
|
-
...chartElementDataProps(primarySeriesIndex, index),
|
|
4774
|
-
d,
|
|
4775
|
-
fill,
|
|
4776
|
-
stroke: selected ? "#64748b" : darkenColor(fill, 0.18),
|
|
4777
|
-
strokeLinejoin: "round",
|
|
4778
|
-
strokeWidth: selected ? 1.8 : 0.85
|
|
4779
|
-
}
|
|
4780
|
-
),
|
|
4781
|
-
selected && canShowSelectionDot ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `region-map-selection-${index}`, [{ x: centroid[0], y: centroid[1] }]) : null
|
|
4782
|
-
] }, `region-map-value-${entry.key || index}`);
|
|
4783
|
-
}),
|
|
4784
|
-
showRegionLabels ? entries.map((entry, index) => {
|
|
4785
|
-
const bounds = path.bounds(entry.feature);
|
|
4786
|
-
const [[x0, y0], [x1, y1]] = bounds;
|
|
4787
|
-
const width = x1 - x0;
|
|
4788
|
-
const height = y1 - y0;
|
|
4789
|
-
if (!Number.isFinite(width) || !Number.isFinite(height) || width < 26 || height < 12) {
|
|
4790
|
-
return null;
|
|
4791
|
-
}
|
|
4792
|
-
const centroid = path.centroid(entry.feature);
|
|
4793
|
-
if (!Number.isFinite(centroid[0]) || !Number.isFinite(centroid[1])) {
|
|
4794
|
-
return null;
|
|
4795
|
-
}
|
|
4796
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4797
|
-
"text",
|
|
4798
|
-
{
|
|
4799
|
-
fill: resolveChartTextColor(chart),
|
|
4800
|
-
fontSize: 9,
|
|
4801
|
-
fontWeight: 600,
|
|
4802
|
-
textAnchor: "middle",
|
|
4803
|
-
x: centroid[0],
|
|
4804
|
-
y: centroid[1],
|
|
4805
|
-
children: truncateSvgText(entry.label, Math.max(28, width - 4), 9)
|
|
4806
|
-
},
|
|
4807
|
-
`region-map-label-${entry.key || index}`
|
|
4808
|
-
);
|
|
4809
|
-
}) : null
|
|
4810
|
-
] });
|
|
4811
|
-
}
|
|
4812
4725
|
function renderUnsupported(chart, palette, layout, chartType) {
|
|
4813
4726
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
|
|
4814
4727
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4889,7 +4802,7 @@ function renderChartPlot(chart, palette, layout, chartType, selectedChartElement
|
|
|
4889
4802
|
return renderTreemapChart(chart, palette, layout, selectedChartElement);
|
|
4890
4803
|
}
|
|
4891
4804
|
if (chartType === "RegionMap") {
|
|
4892
|
-
return
|
|
4805
|
+
return renderUnsupported(chart, palette, layout, chartType);
|
|
4893
4806
|
}
|
|
4894
4807
|
return renderUnsupported(chart, palette, layout, chartType);
|
|
4895
4808
|
}
|
|
@@ -4905,7 +4818,7 @@ var MemoChartSvg = React.memo(function MemoChartSvg2({
|
|
|
4905
4818
|
const legendItems = getLegendItems(chart, renderChartType, palette);
|
|
4906
4819
|
const layout = buildLayout(chart, rect, legendItems);
|
|
4907
4820
|
const chartRaw = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
|
|
4908
|
-
const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess',
|
|
4821
|
+
const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess', _546 => _546.chartAreaNoFill]) === true || _optionalChain([chartRaw, 'optionalAccess', _547 => _547.plotAreaNoFill]) === true;
|
|
4909
4822
|
const background = _nullishCoalesce(chart.chartAreaFillColor, () => ( (explicitNoFill ? "transparent" : "#ffffff")));
|
|
4910
4823
|
const borderColor = _nullishCoalesce(chart.chartAreaBorderColor, () => ( "transparent"));
|
|
4911
4824
|
const normalizedBackground = background.trim().toLowerCase();
|
|
@@ -4922,6 +4835,7 @@ var MemoChartSvg = React.memo(function MemoChartSvg2({
|
|
|
4922
4835
|
"svg",
|
|
4923
4836
|
{
|
|
4924
4837
|
"aria-label": _nullishCoalesce(_nullishCoalesce(chart.title, () => ( chart.name)), () => ( "Chart")),
|
|
4838
|
+
"data-xlsx-chart-renderer": "legacy",
|
|
4925
4839
|
onDoubleClick: handleDoubleClick,
|
|
4926
4840
|
onPointerDown: handlePointerDown,
|
|
4927
4841
|
role: "img",
|
|
@@ -4964,4 +4878,4 @@ var MemoChartSvg = React.memo(function MemoChartSvg2({
|
|
|
4964
4878
|
|
|
4965
4879
|
|
|
4966
4880
|
exports.MemoChartSvg = MemoChartSvg;
|
|
4967
|
-
//# sourceMappingURL=chart-renderer-
|
|
4881
|
+
//# sourceMappingURL=chart-renderer-6CWSXOSC.cjs.map
|