From e51ab22ea6d8e2b982055473f7e66b1406e575fb Mon Sep 17 00:00:00 2001 From: JuZe Date: Thu, 7 Sep 2023 15:49:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20isTotalRoot=20=E6=9B=BF=E6=8D=A2=20isTot?= =?UTF-8?q?als?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/data-set/pivot-data-set.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/s2-core/src/data-set/pivot-data-set.ts b/packages/s2-core/src/data-set/pivot-data-set.ts index 37a50b5425..25c37d07b5 100644 --- a/packages/s2-core/src/data-set/pivot-data-set.ts +++ b/packages/s2-core/src/data-set/pivot-data-set.ts @@ -623,7 +623,7 @@ export class PivotDataSet extends BaseDataSet { } // 有中间维度汇总的分组场景,将有中间 undefined 值的 query 处理为一组合法 query 后查询数据再合并 - private getGroupTotalMultiData(totalRows, columns, query): DataType[] { + private getGroupTotalMultiData(totalRows, rows, columns, query): DataType[] { let result = []; const rowTotalGroupQueries = this.getTotalGroupQueries(totalRows, query); let totalGroupQueries = []; @@ -645,8 +645,8 @@ export class PivotDataSet extends BaseDataSet { colDimensionValues, careUndefined: true, isFirstCreate: true, - rowFields: rowDimensionValues, - colFields: colDimensionValues, + rowFields: rows, + colFields: columns, rowPivotMeta: this.rowPivotMeta, colPivotMeta: this.colPivotMeta, }); @@ -674,7 +674,7 @@ export class PivotDataSet extends BaseDataSet { const existDimensionGroup = this.checkExistDimensionGroup(query); let result = []; if (existDimensionGroup) { - result = this.getGroupTotalMultiData(totalRows, columns, query); + result = this.getGroupTotalMultiData(totalRows, rows, columns, query); } else { const rowDimensionValues = getQueryDimValues(totalRows, query); const colDimensionValues = getQueryDimValues(columns as string[], query); @@ -683,8 +683,8 @@ export class PivotDataSet extends BaseDataSet { colDimensionValues, careUndefined: true, isFirstCreate: true, - rowFields: rowDimensionValues, - colFields: colDimensionValues, + rowFields: rows, + colFields: columns as string[], rowPivotMeta: this.rowPivotMeta, colPivotMeta: this.colPivotMeta, });