Custom aggregators
Developers can register named aggregator functions, such as median, distinct count or concatenation, and use them like the built-ins. The contract supports both full recomputation and incremental add/remove.
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 with Median(Revenue) and DistinctCount(Customer).
Expected behavior
Custom results appear on group rows and the grand total exactly like built-ins. The code panel shows the aggregator definition used.
Planned API surface
api.registerAggregator(name, def)AggregatorDef {init, add, remove?, merge?, result}columns[].aggregate (custom name or function)Acceptance criteria
- A registered aggregator is usable by name in column config. (pending)
- merge, when provided, is used to roll up child groups instead of rescanning the leaves. (pending)
- Without remove, edits trigger a group-level recompute instead of an incremental update. (pending)
- Name collisions with built-ins throw a descriptive error. (pending)