API / Plugins / Base / Aggregation

AggregationPlugin

The AggregationPlugin from @omnigrid/aggregation-plugin computes per-group aggregates for columns that declare an aggFunc. Columns declare aggFunc ("sum" | "avg" | "min" | "max" | "count") and the plugin computes group-level aggregates when rows are grouped.

Live demo|NPM

Constructor

new AggregationPlugin<T>()

Types and Interfaces

AggregationFunc<T>

Aggregation function applied to a column's values within a group.

type AggregationFunc<T = unknown> =
    | "sum"
    | "avg"
    | "min"
    | "max"
    | "count"
    | ((values: unknown[]) => unknown);
ResolvedAggregationFunc<T>

Resolved aggregation callback registered with the grid grouping engine.

type ResolvedAggregationFunc<T = unknown> = (values: unknown[]) => unknown;