We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7991b49 commit 9fe0742Copy full SHA for 9fe0742
packages/s2-core/src/data-set/pivot-data-set.ts
@@ -391,8 +391,8 @@ export class PivotDataSet extends BaseDataSet {
391
colPivotMeta: this.colPivotMeta,
392
});
393
if (isTotals) {
394
- const { totals = {} } = this.spreadsheet.options;
395
- if (totals.calcTotals) {
+ const { calcTotals } = this.spreadsheet?.options?.totals || {};
+ if (calcTotals) {
396
// 前端计算汇总值
397
const totalValue = getDataSumByField(
398
this.getMultiData(query),
0 commit comments