From f0c99694bd5d2d75d6a1b48308a6410a1555d442 Mon Sep 17 00:00:00 2001 From: wisonic Date: Wed, 4 Dec 2024 14:06:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=80=8F=E8=A7=86=E8=A1=A8=E6=A0=91=E5=BD=A2=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E8=A1=8C=E5=B0=8F=E8=AE=A1=E8=AE=A1=E7=AE=97=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20#12928?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/table-pivot.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts index 6d55dd4c32..515a8c7684 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts @@ -240,6 +240,10 @@ export class TablePivot extends S2ChartView { col: chart.xAxisExt, quota: chart.yAxis } + //树形模式下,列维度为空,行小计会变成列总计,特殊处理下 + if (basicStyle.tableLayoutMode === 'tree' && !chart.xAxisExt?.length) { + tableTotal.col.calcTotals = tableTotal.row.calcSubTotals + } totals.forEach(total => { if (total.cfg?.length) { delete total.aggregation