Skip to content

@jsvision/datagrid / AggregateSpec

Interface: AggregateSpec

Defined in: datagrid/src/aggregate.ts:21

A per-column footer aggregate. fn reduces the column's typed value across the displayed rows; format renders the numeric result (e.g. a currency Intl formatter); label is an optional static prefix (e.g. 'Σ', 'Avg:'). The rendered cell text is "[label ][formatted result][ (loaded)]", where the trailing " (loaded)" appears only when the source is not fully loaded.

Properties

fn

readonly fn: AggregateFn

Defined in: datagrid/src/aggregate.ts:23

The reduction to apply.


format?

readonly optional format?: (v) => string

Defined in: datagrid/src/aggregate.ts:25

Render the numeric fold result to display text; defaults to String(v) when omitted.

Parameters

v

number

Returns

string


label?

readonly optional label?: string

Defined in: datagrid/src/aggregate.ts:27

An optional static prefix placed before the value (e.g. 'Σ').