-
Notifications
You must be signed in to change notification settings - Fork 211
Closed
Labels
Description
🏷 Version
Package | Version |
---|---|
@antv/s2 | v1.11.0 |
@antv/s2-react | - |
🖋 Description
上述文档中,配置聚合方式 代码如下:calcTotals 与 row、col 在同一级
⌨️ Code Snapshots
🔗 Reproduce Link
使用一个没有传入 小计、总计 数据的示例
🤔 Steps to Reproduce
在 s2Options 中加入如下正确配置
// 配置小计总计显示
totals: {
row: {
showGrandTotals: true,
showSubTotals: true,
reverseLayout: false,
reverseSubLayout: false,
subTotalsDimensions: ['province'],
calcTotals: {
aggregation: 'SUM'
},
calcSubTotals: {
aggregation: 'SUM'
}
},
col: {
showGrandTotals: true,
showSubTotals: true,
reverseLayout: false,
reverseSubLayout: false,
subTotalsDimensions: ['type'],
calcTotals: {
aggregation: 'SUM'
},
calcSubTotals: {
aggregation: 'SUM'
}
},
}
😊 Expected Behavior
实际上,calcTotals 应是 row、col 的字段
😅 Current Behavior
💻 System information
lijinke666