API reference: @salmonui/pivot-table/engine
PivotHeaderNodeinterface
import type { PivotHeaderNode } from '@salmonui/pivot-table/engine';Also exported from @salmonui/pivot-table.
interface PivotHeaderNode {
readonly key: string;
readonly axis: 'rows' | 'columns';
readonly kind: PivotHeaderKind;
readonly path: readonly Json[];
readonly field: string | null;
readonly measure: string | null;
readonly label: string;
readonly depth: number;
readonly position: number;
readonly span: number;
readonly expandable: boolean;
readonly expanded: boolean;
readonly children?: readonly PivotHeaderNode[];
}
A header node of the row or column tree (lazily materialized).
| Name | Signature | Description |
|---|---|---|
key | readonly key: string; | Stable key: member keys (and measure) joined, unique per axis. |
axis | readonly axis: 'rows' | 'columns'; | |
kind | readonly kind: PivotHeaderKind; | |
path | readonly path: readonly Json[]; | Member keys from the axis root. |
field | readonly field: string | null; | Field of the innermost member (null for grand totals and value headers). |
measure | readonly measure: string | null; | Measure name for |
label | readonly label: string; | |
depth | readonly depth: number; | |
position | readonly position: number; | First leaf position covered and the number of leaf positions. |
span | readonly span: number; | |
expandable | readonly expandable: boolean; | Has children (expanded or not). |
expanded | readonly expanded: boolean; | |
childrenoptional | readonly children?: readonly PivotHeaderNode[]; |