Built-in aggregators: sum, avg, min, max, count
Columns declare an aggregator, and group rows show the computed value per group. Averages are always computed from the leaf data, never as an average of child averages.
Planned. This page shows the specification from issue #196. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Orders grouped by Region > Country. Revenue=sum, Discount=avg, Qty=max.
Expected behavior
Changing an aggregator updates every group row immediately. The parent avg equals the leaf-level average, not the mean of child averages.
Planned API surface
columns[].aggregate ('sum'|'avg'|'min'|'max'|'count')api.getGroupAggregateoptions.grouping.aggregateOnlyVisibleLevelsAcceptance criteria
- sum equals the arithmetic sum of all leaf values in the group. (pending)
- The parent avg equals sum/count over leaf rows. (pending)
- min and max ignore null and undefined values. (pending)
- count counts the leaf rows, including rows whose cell is null. (pending)
- Floating-point sums are stable to a documented precision strategy. (pending)