Interface AggregateSpecIf<T>

One aggregate in full form: which aggregator, which value, and (in a footer) how it is shown.

Example

const spec: AggregateSpecIf<Order> = {
aggregator: "avg",
value: "total", // default: the key of the spec
format: v => `${(v as number).toFixed(2)} €` // footer text; Excel gets the number
};

Since

1.1.94

Type Parameters

  • T = any

Hierarchy

  • AggregateSpecIf

Properties

aggregator: AggregatorRef

A built-in aggregator by name or an own one.

format?: ((result) => string)

Type declaration

    • (result): string
    • The text in a footer cell. Default: numbers with at most two decimals ("1,234.5"), dates as date, undefined empty.

      Parameters

      • result: unknown

      Returns string

value?: ValueAccessor<T>

The value of a row. Default: the key of the spec as property path.