Skip to content

AggregatorFormatter

Formats the computed aggregation value for display in the cell.

Called after the aggregator function runs. Receives the raw computed value and should return a display string (e.g. currency formatting, unit suffixes).

type AggregatorFormatter = (value: unknown, field: string, column: ColumnConfig) => string
const currencyFormatter: AggregatorFormatter = (value) =>
`$${Number(value).toLocaleString('en-US', { minimumFractionDigits: 2 })}`;
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt