@extend-ai/react-xlsx 0.19.0 → 0.20.1
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/README.md +2 -1
- package/dist/{chart-renderer-LHXMRBGR.cjs → chart-renderer-K2VM257E.cjs} +44 -39
- package/dist/chart-renderer-K2VM257E.cjs.map +1 -0
- package/dist/{chart-renderer-HVOEAQXK.cjs → chart-renderer-K6GORT3R.cjs} +44 -39
- package/dist/chart-renderer-K6GORT3R.cjs.map +1 -0
- package/dist/{chart-renderer-R2B4I2HL.js → chart-renderer-KGLAI4DN.js} +25 -20
- package/dist/chart-renderer-KGLAI4DN.js.map +1 -0
- package/dist/{chart-renderer-3K2VKB5I.js → chart-renderer-RXO7WP4Q.js} +25 -20
- package/dist/chart-renderer-RXO7WP4Q.js.map +1 -0
- package/dist/{chunk-ZIO47YMT.cjs → chunk-2MVEKDY2.cjs} +4 -4
- package/dist/{chunk-ZIO47YMT.cjs.map → chunk-2MVEKDY2.cjs.map} +1 -1
- package/dist/{chunk-3O2QY6LA.js → chunk-3JTCYAUX.js} +3 -3
- package/dist/{chunk-4VX5HTCF.cjs → chunk-54YBFWL3.cjs} +4 -4
- package/dist/{chunk-4VX5HTCF.cjs.map → chunk-54YBFWL3.cjs.map} +1 -1
- package/dist/{chunk-T5WZHPIN.cjs → chunk-AD4CGQN2.cjs} +2 -2
- package/dist/{chunk-T5WZHPIN.cjs.map → chunk-AD4CGQN2.cjs.map} +1 -1
- package/dist/{chunk-Y737JKUG.js → chunk-GXJO6CK6.js} +136 -33
- package/dist/chunk-GXJO6CK6.js.map +1 -0
- package/dist/{chunk-TYJLNPNE.cjs → chunk-HAHCVXCU.cjs} +922 -819
- package/dist/chunk-HAHCVXCU.cjs.map +1 -0
- package/dist/{chunk-E2VSYCP2.cjs → chunk-O3V2MCOC.cjs} +18 -2
- package/dist/chunk-O3V2MCOC.cjs.map +1 -0
- package/dist/{chunk-BAAMDEDS.js → chunk-VXBNYHW5.js} +18 -2
- package/dist/{chunk-BAAMDEDS.js.map → chunk-VXBNYHW5.js.map} +1 -1
- package/dist/{chunk-O7S3Y6II.js → chunk-WSQDFXDW.js} +3 -3
- package/dist/index.cjs +617 -530
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +115 -28
- package/dist/index.js.map +1 -1
- package/dist/{internal-DSz8QMhK.d.cts → internal-trWFv9In.d.cts} +5 -0
- package/dist/{internal-DSz8QMhK.d.ts → internal-trWFv9In.d.ts} +5 -0
- package/dist/internal.cjs +4 -4
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +2 -2
- package/dist/{region-map-geography-6TGXBY3V.cjs → region-map-geography-VEN5CPRS.cjs} +2 -2
- package/dist/{region-map-geography-6TGXBY3V.cjs.map → region-map-geography-VEN5CPRS.cjs.map} +1 -1
- package/dist/{spreadsheet-font-assets-4AHYDTAQ.cjs → spreadsheet-font-assets-6FKCVICP.cjs} +2 -2
- package/dist/{spreadsheet-font-assets-4AHYDTAQ.cjs.map → spreadsheet-font-assets-6FKCVICP.cjs.map} +1 -1
- package/dist/{surface-regl-MAPCPD7W.cjs → surface-regl-2NNG62KS.cjs} +18 -15
- package/dist/surface-regl-2NNG62KS.cjs.map +1 -0
- package/dist/{surface-regl-NWR5ZZ5D.js → surface-regl-7CDGGVDG.js} +10 -7
- package/dist/surface-regl-7CDGGVDG.js.map +1 -0
- package/dist/{surface-regl-PWTZWQQS.cjs → surface-regl-SUJ2TFZA.cjs} +18 -15
- package/dist/surface-regl-SUJ2TFZA.cjs.map +1 -0
- package/dist/{surface-regl-KW4JL325.js → surface-regl-TJUWTLAZ.js} +10 -7
- package/dist/surface-regl-TJUWTLAZ.js.map +1 -0
- package/dist/vanilla.cjs +4 -4
- 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 +67 -1
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/chart-renderer-3K2VKB5I.js.map +0 -1
- package/dist/chart-renderer-HVOEAQXK.cjs.map +0 -1
- package/dist/chart-renderer-LHXMRBGR.cjs.map +0 -1
- package/dist/chart-renderer-R2B4I2HL.js.map +0 -1
- package/dist/chunk-E2VSYCP2.cjs.map +0 -1
- package/dist/chunk-TYJLNPNE.cjs.map +0 -1
- package/dist/chunk-Y737JKUG.js.map +0 -1
- package/dist/surface-regl-KW4JL325.js.map +0 -1
- package/dist/surface-regl-MAPCPD7W.cjs.map +0 -1
- package/dist/surface-regl-NWR5ZZ5D.js.map +0 -1
- package/dist/surface-regl-PWTZWQQS.cjs.map +0 -1
- /package/dist/{chunk-3O2QY6LA.js.map → chunk-3JTCYAUX.js.map} +0 -0
- /package/dist/{chunk-O7S3Y6II.js.map → chunk-WSQDFXDW.js.map} +0 -0
package/README.md
CHANGED
|
@@ -240,7 +240,7 @@ if (controller && !controller.isLoading && controller.sheets.length > 0) {
|
|
|
240
240
|
}
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
-
`setCellValue` requires an editable workbook. `exportXlsx()` downloads the current workbook in the browser.
|
|
243
|
+
`setCellValue` requires an editable workbook. `exportXlsx()` downloads the current workbook in the browser, and `getXlsxBytes()` returns the same bytes as a `Uint8Array` (or `null` before a workbook loads) for saving elsewhere, such as uploading to your own storage.
|
|
244
244
|
|
|
245
245
|
Change options or load another workbook with `setOptions`:
|
|
246
246
|
|
|
@@ -763,6 +763,7 @@ Common source and loading props:
|
|
|
763
763
|
- `fileName?: string`
|
|
764
764
|
- `controller?: XlsxViewerController`
|
|
765
765
|
- `useWorker?: boolean`
|
|
766
|
+
- `locale?: string` — BCP 47 locale for numeric decimal and grouping separators, defaulting to `"en-US"`. Pass `"fr-FR"` for French or `navigator.language` for the browser locale. Dates retain their workbook format.
|
|
766
767
|
- `maxFileSizeBytes?: number`
|
|
767
768
|
- `readOnly?: boolean`
|
|
768
769
|
- `readOnlyAboveBytes?: number`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk2MVEKDY2cjs = require('./chunk-2MVEKDY2.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ var _chunkZIO47YMTcjs = require('./chunk-ZIO47YMT.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkO3V2MCOCcjs = require('./chunk-O3V2MCOC.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ var _chunkE2VSYCP2cjs = require('./chunk-E2VSYCP2.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkCJBI5F6Vcjs = require('./chunk-CJBI5F6V.cjs');
|
|
26
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-AD4CGQN2.cjs');
|
|
27
27
|
|
|
28
28
|
// src/chart-renderer.tsx
|
|
29
29
|
var _d3hierarchy = require('d3-hierarchy');
|
|
@@ -38,14 +38,14 @@ var _d3scale = require('d3-scale');
|
|
|
38
38
|
|
|
39
39
|
var _d3shape = require('d3-shape');
|
|
40
40
|
function RegionMapPlot({ chart, palette, layout, selectedChartElement }) {
|
|
41
|
-
const resources =
|
|
41
|
+
const resources = _chunk2MVEKDY2cjs.useChartModule.call(void 0, _chunk2MVEKDY2cjs.regionMapResources);
|
|
42
42
|
return resources ? renderRegionMapChart(chart, palette, layout, selectedChartElement, resources) : null;
|
|
43
43
|
}
|
|
44
44
|
function SurfaceChartComposite({
|
|
45
45
|
loadingFallback,
|
|
46
46
|
...props
|
|
47
47
|
}) {
|
|
48
|
-
const renderer =
|
|
48
|
+
const renderer = _chunk2MVEKDY2cjs.useChartModule.call(void 0, _chunk2MVEKDY2cjs.surfaceRenderer);
|
|
49
49
|
return renderer ? /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, renderer.MemoSurfaceChartComposite, { ...props }) : /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, _chunkCJBI5F6Vcjs.S, { children: loadingFallback });
|
|
50
50
|
}
|
|
51
51
|
function chartElementDataProps(seriesIndex, pointIndex, options) {
|
|
@@ -3971,7 +3971,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3971
3971
|
return null;
|
|
3972
3972
|
}
|
|
3973
3973
|
const isContour = isContourSurfaceChart(chart);
|
|
3974
|
-
const ratios =
|
|
3974
|
+
const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _464 => _464.valueAxis, 'optionalAccess', _465 => _465.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.heightPercent]), _optionalChain([chart, 'access', _468 => _468.view3d, 'optionalAccess', _469 => _469.depthPercent]), layout);
|
|
3975
3975
|
const minValue = domain.minValue;
|
|
3976
3976
|
const safeMax = domain.safeMax;
|
|
3977
3977
|
const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _470 => _470.backWall, 'optionalAccess', _471 => _471.fillColor]), () => ( "#d9d9df"));
|
|
@@ -3979,8 +3979,8 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3979
3979
|
if (isContour) {
|
|
3980
3980
|
const faces2 = [];
|
|
3981
3981
|
const lines = [];
|
|
3982
|
-
const backgroundNormal =
|
|
3983
|
-
const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill :
|
|
3982
|
+
const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _478 => _478.view3d, 'optionalAccess', _479 => _479.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _480 => _480.view3d, 'optionalAccess', _481 => _481.rotY]), () => ( 0)));
|
|
3983
|
+
const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
|
|
3984
3984
|
const inset = _optionalChain([chart, 'access', _482 => _482.valueAxis, 'optionalAccess', _483 => _483.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
|
|
3985
3985
|
const dataWidth = plot.width - 2 * inset;
|
|
3986
3986
|
for (let rowIndex = 0; rowIndex < rows - 1; rowIndex += 1) {
|
|
@@ -3996,7 +3996,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
3996
3996
|
const x1 = plot.left + inset + (columnIndex + 1) / (cols - 1) * dataWidth;
|
|
3997
3997
|
const y0 = plot.top + plot.height - rowIndex / (rows - 1) * plot.height;
|
|
3998
3998
|
const y1 = plot.top + plot.height - (rowIndex + 1) / (rows - 1) * plot.height;
|
|
3999
|
-
const triangles =
|
|
3999
|
+
const triangles = _chunkO3V2MCOCcjs.triangulateSurfaceQuad.call(void 0, [
|
|
4000
4000
|
{ value: p00, x: x0, y: y0 },
|
|
4001
4001
|
{ value: p10, x: x1, y: y0 },
|
|
4002
4002
|
{ value: p11, x: x1, y: y1 },
|
|
@@ -4005,37 +4005,38 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4005
4005
|
triangles.forEach((triangle, triangleIndex) => {
|
|
4006
4006
|
const world = triangle.map((point) => ({
|
|
4007
4007
|
x: (point.x - plot.left - inset) / dataWidth,
|
|
4008
|
-
y: (1 -
|
|
4008
|
+
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
|
|
4009
4009
|
z: (point.y - plot.top) / plot.height * ratios.depth
|
|
4010
4010
|
}));
|
|
4011
|
-
const normal =
|
|
4011
|
+
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _492 => _492.view3d, 'optionalAccess', _493 => _493.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _494 => _494.view3d, 'optionalAccess', _495 => _495.rotY]), () => ( 0)));
|
|
4012
4012
|
for (let band = 0; band < domain.ticks.length - 1; band += 1) {
|
|
4013
4013
|
const lower = domain.ticks[band];
|
|
4014
4014
|
const upper = domain.ticks[band + 1];
|
|
4015
|
-
const polygon =
|
|
4015
|
+
const polygon = _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, triangle, lower, true, chart.valueAxis, band === 0), upper, false, chart.valueAxis);
|
|
4016
4016
|
if (polygon.length < 3) {
|
|
4017
4017
|
continue;
|
|
4018
4018
|
}
|
|
4019
4019
|
const key = `${rowIndex}-${columnIndex}-${triangleIndex}-${band}`;
|
|
4020
4020
|
const midpoint = (lower + upper) / 2;
|
|
4021
4021
|
if (!chart.wireframe) {
|
|
4022
|
-
faces2.push(/* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) :
|
|
4022
|
+
faces2.push(/* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: polygon.map((point) => `${point.x},${point.y}`).join(" ") }, `surface-band-${key}`));
|
|
4023
4023
|
}
|
|
4024
4024
|
const widths = _optionalChain([chart, 'access', _496 => _496.raw, 'optionalAccess', _497 => _497.bandFormatLineWidths]);
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4025
|
+
for (const group of _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true)) {
|
|
4026
|
+
const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
|
|
4027
|
+
lines.push(
|
|
4028
|
+
/* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0,
|
|
4029
|
+
"path",
|
|
4030
|
+
{
|
|
4031
|
+
d: group.edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
|
|
4032
|
+
fill: "none",
|
|
4033
|
+
stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint),
|
|
4034
|
+
strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _498 => _498[group.band]]), () => ( _optionalChain([chart, 'access', _499 => _499.series, 'access', _500 => _500[0], 'optionalAccess', _501 => _501.lineWidthPx]))), () => ( 1))
|
|
4035
|
+
},
|
|
4036
|
+
`surface-edge-${key}-${group.band}`
|
|
4037
|
+
)
|
|
4038
|
+
);
|
|
4039
|
+
}
|
|
4039
4040
|
}
|
|
4040
4041
|
});
|
|
4041
4042
|
}
|
|
@@ -4074,7 +4075,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4074
4075
|
const projectRawPoint = (columnIndex, rowIndex, value) => {
|
|
4075
4076
|
const hasValue = value != null;
|
|
4076
4077
|
const normalizedX = cols <= 1 ? 0 : (columnIndex / (cols - 1) - 0.5) * 2;
|
|
4077
|
-
const normalizedY = hasValue ? -(
|
|
4078
|
+
const normalizedY = hasValue ? -(_chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
|
|
4078
4079
|
const normalizedZ = rows <= 1 ? 0 : (rowIndex / (rows - 1) - 0.5) * 2 * depthScale;
|
|
4079
4080
|
if (_optionalChain([chart, 'access', _516 => _516.view3d, 'optionalAccess', _517 => _517.rAngAx]) !== false) {
|
|
4080
4081
|
return {
|
|
@@ -4121,12 +4122,12 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4121
4122
|
if (hidden || color === "transparent") return;
|
|
4122
4123
|
const world = points.map((point) => ({
|
|
4123
4124
|
x: point.x / Math.max(1, cols - 1),
|
|
4124
|
-
y: (1 -
|
|
4125
|
+
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
|
|
4125
4126
|
z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
|
|
4126
4127
|
}));
|
|
4127
|
-
const normal =
|
|
4128
|
+
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _520 => _520.view3d, 'optionalAccess', _521 => _521.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _522 => _522.view3d, 'optionalAccess', _523 => _523.rotY]), () => ( 30)), _optionalChain([chart, 'access', _524 => _524.view3d, 'optionalAccess', _525 => _525.rAngAx]) !== false);
|
|
4128
4129
|
const baseColor = _nullishCoalesce(color, () => ( wallFill));
|
|
4129
|
-
wallNodes.push(/* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? baseColor :
|
|
4130
|
+
wallNodes.push(/* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? baseColor : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, baseColor, normal), points: points.map(projectPoint).map((point) => `${point.x},${point.y}`).join(" ") }, key));
|
|
4130
4131
|
};
|
|
4131
4132
|
addWall("floor", [wallPoint(0, 0, minValue), wallPoint(cols - 1, 0, minValue), wallPoint(cols - 1, rows - 1, minValue), wallPoint(0, rows - 1, minValue)], _optionalChain([chart, 'access', _526 => _526.floor, 'optionalAccess', _527 => _527.fillColor]), _optionalChain([chart, 'access', _528 => _528.floor, 'optionalAccess', _529 => _529.hidden]));
|
|
4132
4133
|
addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access', _530 => _530.backWall, 'optionalAccess', _531 => _531.fillColor]), _optionalChain([chart, 'access', _532 => _532.backWall, 'optionalAccess', _533 => _533.hidden]));
|
|
@@ -4148,7 +4149,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4148
4149
|
for (let columnIndex = 0; columnIndex < cols - 1; columnIndex += 1) {
|
|
4149
4150
|
const values = [matrix[rowIndex][columnIndex], matrix[rowIndex][columnIndex + 1], matrix[rowIndex + 1][columnIndex + 1], matrix[rowIndex + 1][columnIndex]];
|
|
4150
4151
|
if (values.some((value) => value == null)) continue;
|
|
4151
|
-
const triangles =
|
|
4152
|
+
const triangles = _chunkO3V2MCOCcjs.triangulateSurfaceQuad.call(void 0, [
|
|
4152
4153
|
{ value: values[0], x: columnIndex, y: rowIndex },
|
|
4153
4154
|
{ value: values[1], x: columnIndex + 1, y: rowIndex },
|
|
4154
4155
|
{ value: values[2], x: columnIndex + 1, y: rowIndex + 1 },
|
|
@@ -4157,24 +4158,28 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
|
|
|
4157
4158
|
triangles.forEach((triangle, triangleIndex) => {
|
|
4158
4159
|
const world = triangle.map((point) => ({
|
|
4159
4160
|
x: point.x / Math.max(1, cols - 1),
|
|
4160
|
-
y: (1 -
|
|
4161
|
+
y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
|
|
4161
4162
|
z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
|
|
4162
4163
|
}));
|
|
4163
|
-
const normal =
|
|
4164
|
+
const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _544 => _544.view3d, 'optionalAccess', _545 => _545.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _546 => _546.view3d, 'optionalAccess', _547 => _547.rotY]), () => ( 30)), _optionalChain([chart, 'access', _548 => _548.view3d, 'optionalAccess', _549 => _549.rAngAx]) !== false);
|
|
4164
4165
|
for (let band = 0; band < domain.ticks.length - 1; band += 1) {
|
|
4165
4166
|
const lower = domain.ticks[band];
|
|
4166
4167
|
const upper = domain.ticks[band + 1];
|
|
4167
|
-
const polygon =
|
|
4168
|
+
const polygon = _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, triangle, lower, true, chart.valueAxis, band === 0), upper, false, chart.valueAxis);
|
|
4168
4169
|
if (polygon.length < 3) continue;
|
|
4169
4170
|
const projected = polygon.map(projectPoint);
|
|
4170
4171
|
const midpoint = (lower + upper) / 2;
|
|
4171
4172
|
const widths = _optionalChain([chart, 'access', _550 => _550.raw, 'optionalAccess', _551 => _551.bandFormatLineWidths]);
|
|
4172
|
-
const
|
|
4173
|
+
const edgeGroups = _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true);
|
|
4173
4174
|
faces.push({
|
|
4174
4175
|
depth: projected.reduce((sum, point) => sum + point.depth, 0) / projected.length,
|
|
4175
4176
|
node: /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "g", { children: [
|
|
4176
|
-
!chart.wireframe && /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) :
|
|
4177
|
-
|
|
4177
|
+
!chart.wireframe && /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: projected.map((point) => `${point.x},${point.y}`).join(" ") }),
|
|
4178
|
+
edgeGroups.map((group) => {
|
|
4179
|
+
const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
|
|
4180
|
+
const edges = group.edges.map(([from, to]) => [projectPoint(from), projectPoint(to)]);
|
|
4181
|
+
return /* @__PURE__ */ _chunkCJBI5F6Vcjs.u.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _552 => _552[group.band]]), () => ( _optionalChain([chart, 'access', _553 => _553.series, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") }, `surface-edge-${group.band}`);
|
|
4182
|
+
})
|
|
4178
4183
|
] }, `surface-band-${rowIndex}-${columnIndex}-${triangleIndex}-${band}`)
|
|
4179
4184
|
});
|
|
4180
4185
|
}
|
|
@@ -5040,4 +5045,4 @@ var MemoChartSvg = _chunkCJBI5F6Vcjs.N.call(void 0, function MemoChartSvg2({
|
|
|
5040
5045
|
|
|
5041
5046
|
|
|
5042
5047
|
exports.MemoChartSvg = MemoChartSvg;
|
|
5043
|
-
//# sourceMappingURL=chart-renderer-
|
|
5048
|
+
//# sourceMappingURL=chart-renderer-K2VM257E.cjs.map
|