我有多个具有聚合的列:
const gridOptions: GridOptions = {
pivotMode: false,
groupIncludeTotalFooter: true,
columnDefs: [
{ field: 'year', rowGroup: true },
{ field: 'month' },
{ field: 'col1', aggFunc: 'sum' },
{ field: 'col2', aggFunc: 'sum' },
};
但是当我在Year列上启用数据透视模式时,它同时显示每年的col1和col2:
function enablePivotMode() {
gridOptions.columnApi.setPivotMode(true);
gridOptions.columnApi.setPivotColumns(['year']);
gridOptions.columnApi.setRowGroupColumns(['month']);
}
如何选择在透视模式下可见的辅助列?