Interface PivotTableModelParaIf<T>

Parameters of PivotFactory.createTableModel: the rows, the pivot (PivotConfigIf) and the look of the table.

Example

const para: PivotTableModelParaIf<Sale> = {
rows: sales,
rowFields: ["region", "produkt"],
columnFields: [{ value: "monat", order: "insertion" }],
values: ["umsatz"],
emptyText: "–",
valueColumnWidth: px80
};
const tableModel = PivotFactory.createTableModel(para);

Since

1.1.94

Type Parameters

  • T = any

    the row type

Hierarchy

Properties

columnFields?: RowGroupField<T>[]

The fields whose values become columns, top first. Several fields form a multi-row header. Default [] (totals only).

columnSubtotals?: boolean

A total column behind every column group (e.g. "2026 Total" behind its quarters); the group gets a toggle and, when collapsed, shows only its total. Default: true with two or more column fields.

defaultRowHeights?: DefaultRowHeightsIf

Row heights of header, body and footer. Default: tableOptions.defaultRowHeights.

emptyLabel?: string

The label of empty keys (null, undefined, "") – rows and columns. Default "(empty)".

emptyText?: string

The text of a cell without data (the value stays undefined, not 0). Default "".

expanded?: RowGroupExpanded<T>

Expanded row groups: true (default), false, open levels as a number (0 = all closed) or a function per group.

getSelectionModel?: GetT<SelectionModelIf>

Selection model factory. Default: tableOptions.getSelectionModel.

groupColumn?: Partial<RowGroupColumnOptionsIf<T>>

The group column (arrows and row labels): header, width, showCount (default false), own label, fixed (default true).

maxColumns?: number

The maximum number of column keys (of the lowest column level). More keys: the first ones are shown, a warning is logged and PivotResult.truncated is true – total column, subtotal columns and total row still count all rows. Default 1000.

rowFields: RowGroupField<T>[]

The row levels, top first. Several levels form a hierarchy with subtotals. An empty list shows one total row.

rowNumbersVisible?: boolean | Partial<RowNumberOptionsIf>

Row numbers in front of the group column (counted per displayed row).

rows: T[]

The source rows (not changed).

subtotals?: boolean

Show the aggregates in the group rows (subtotals). Default true.

tableOptions?: TableOptionsIf

Options of the table (row heights, selection model …).

totalColumn?: boolean | "fixed"

The total column(s) on the right: "fixed" (default, fixed on the right), true (last columns, scrolled) or false.

totalLabel?: string

The word for totals: header of the total column, label of the total row, suffix of subtotal columns. Default "Total".

totalRow?: boolean

The total row in the footer. Default true.

valueColumnWidth?: SizeIf

The width of a value column. Default 100 px.

values: PivotValue<T>[]

The aggregated values (at least one): "umsatz" (sum) or PivotValueIf. With several values every column key gets one column per value.