AggregatorRef
Since v0.1.1
Reference to an aggregation function for footer/group summaries.
Can be either:
- A built-in aggregator name:
'sum','avg','min','max','count' - A plugin-registered aggregator name
- A custom
AggregatorFn
Aggregators are not declared on a column directly — they are configured per
field on the consumer (e.g. RowGroupRenderConfig.aggregators for group
rows, keyed by column field name).
type AggregatorRef = string | AggregatorFnExample
Section titled “Example”// Built-in aggregator on a group row config{ aggregators: { amount: 'sum' } }
// Custom aggregator function{ aggregators: { price: (rows, field) => { const values = rows.map((r) => (r as any)[field]).filter((v) => v != null); return values.length ? Math.max(...(values as number[])) : null; }, },}