API reference: @salmonui/pivot-table/engine
PivotValueFieldinterface
import type { PivotValueField } from '@salmonui/pivot-table/engine';Also exported from @salmonui/pivot-table.
interface PivotValueField {
readonly field: string;
readonly caption?: string;
readonly aggregate: PivotAggregate;
readonly customId?: string;
readonly showAs?: PivotShowAs;
}
A value field (one measure of the result).
Measure ids: every value field has a measure id, unique within
model.values, used in PivotHeaderNode.measure, PivotCell.measure,
header keys (...|<measure id>), valueSort.measure, value filters and
formats. It is field when no other value field uses the same field,
field#aggregate when one does (Freight#average, Freight#sampleStdev),
and field#aggregate#index (position in model.values) when even that
repeats. measureId(values, index) computes it. valueSort.measure, value
filters and formats also accept the plain field (first match).
| Name | Signature | Description |
|---|---|---|
field | readonly field: string; | |
captionoptional | readonly caption?: string; | |
aggregate | readonly aggregate: PivotAggregate; | |
customIdoptional | readonly customId?: string; |
|
showAsoptional | readonly showAs?: PivotShowAs; |