Merge pull request #13814 from dataease/pr@dev-v2@fix_pivot_row_sub_calc

fix(图表): 修复透视表树形模式下行小计计算错误 #12928
This commit is contained in:
wisonic-s 2024-12-04 14:07:36 +08:00 committed by GitHub
commit 315b1793a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -240,6 +240,10 @@ export class TablePivot extends S2ChartView<PivotSheet> {
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