PivotValueField
Defines a value field in the pivot table — which data field to aggregate and how to compute the aggregation.
Multiple PivotValueField entries on the same field with different aggFunc
values create separate columns (e.g. “Revenue (Sum)” and “Revenue (Avg)”).
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
field | string | The row data field to aggregate (must exist on the source row objects). |
aggFunc | AggFunc | Aggregation function — a built-in name or a custom function. |
header? | string | Custom column header label. Defaults to "field (aggFunc)" if omitted. |
format? | (value: number) => string | Format function for display values. Receives the aggregated number and returns a string. When omitted, the original column’s format is used if available, otherwise raw String(value). |
Property Details
Section titled “Property Details”format
Section titled “format”{ field: 'revenue', aggFunc: 'sum', format: (v) => `$${v.toLocaleString()}` }
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