From f7ca071e2e4a085e6d7bbfbfec78c1101111b9cc Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Fri, 18 Jul 2025 12:53:56 +0000 Subject: [PATCH] [FIX] xlsx: correctly export aggregated charts Follow up of #6075, for charts radar charts. The feature to aggregate the chart data based on the labels does not exist in xlsx files. But rather than exporting the chart as normal, ignoring the aggregation, we exported the chart as an image. Task: 4954426 X-original-commit: b3e59cdf924bddd19da81036fee5b617d3c14dcc --- src/helpers/figures/charts/radar_chart.ts | 3 --- tests/xlsx/xlsx_export.test.ts | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/helpers/figures/charts/radar_chart.ts b/src/helpers/figures/charts/radar_chart.ts index 097cf33306..9bc72bbfde 100644 --- a/src/helpers/figures/charts/radar_chart.ts +++ b/src/helpers/figures/charts/radar_chart.ts @@ -186,9 +186,6 @@ export class RadarChart extends AbstractChart { } getDefinitionForExcel(): ExcelChartDefinition | undefined { - if (this.aggregated) { - return undefined; - } const { dataSets, labelRange } = this.getCommonDataSetAttributesForExcel( this.labelRange, this.dataSets, diff --git a/tests/xlsx/xlsx_export.test.ts b/tests/xlsx/xlsx_export.test.ts index 9510684f20..991dff6747 100644 --- a/tests/xlsx/xlsx_export.test.ts +++ b/tests/xlsx/xlsx_export.test.ts @@ -1334,9 +1334,9 @@ describe("Test XLSX export", () => { expect(await exportPrettifiedXlsx(model)).toMatchSnapshot(); }); - test.each(["bar", "line", "pie"] as const)( + test.each(["bar", "line", "pie", "radar"] as const)( "%s chart that aggregate labels is exported as normal chart, ignoring the aggregation", - async (type: "bar" | "line" | "pie") => { + async (type) => { const model = new Model(); createChart(model, { aggregated: true, type }, "1"); const exportedData = getExportedExcelData(model);