the row type
the grouped header
the pivot body
the total row
the columns in front of the values (row numbers, group column)
all columns (leading columns, value columns, total columns)
the fixed total columns on the right
fixed columns on the left (the leading columns)
row heights
selection model factory
Optional valueWidth: SizeIfthe width of new value columns
Readonly bodyProtected columnProtected contentProtected contentReadonly defaultReadonly fixedReadonly fixedReadonly footerProtected footerfalse: the footer is hidden (height 0), see setFooterVisible.
Readonly headerProtected headerfalse: the header is hidden (height 0), see setHeaderVisible.
Readonly kindMarker for isPivotTableModel (works across copies of the core).
Protected overridingProtected paddingProtected parentReadonly rowProtected rowProtected xSorts the items using the given sortItems array.
An array of sort items to sort the items.
This method is called when an external filter is changed.
The function used to predict whether an element should be filtered or not.
Calculates the height of the area identified by the given area identifier.
The identifier of the area.
Retrieves the area model (header, body or footer) based on the area identification.
The identifier of the area.
The area model corresponding to the given area identification.
If the area identification is invalid.
Returns the body area model.
The body area model.
Returns the column definition at the specified index.
The index of the column definition to retrieve.
Returns an array of ColumnDefIf objects or undefined.
An array of ColumnDefIf objects or undefined.
Retrieves the property key of the table row business object associated with the specified column index. It's only available when columnDefs are specified.
The index of the column to retrieve the property from.
The property associated with the specified column index.
Retrieves the model for the given row area identifier.
The identifier of the row area.
The body: cells, row groups, drill-down (AreaModelPivot.getCellSourceRows) and the PivotResult.
the body model
const pivotBody = pivotModel.getPivotBody();
pivotBody.getResult().columnLeaves.map(c => c.label); // ["Feb", "Jan"]
The current configuration.
a copy
pivotModel.getPivotConfig().rowFields; // ["region"]
Returns the height of the specified row in the given row area identifier.
The row area identifier.
The index of the row.
Returns the total width of the side area identified by sideIdent.
The identifier of the side area ("west" | "center" | "east").
Retrieves the start and end column indices based on the given side identifier.
The side identifier, which can be "west", "east", or "center".
Whether a column is shown (ColumnDefIf.isVisible). Columns without a column definition are always shown.
column index, property or column definition
false for hidden and for unknown columns
const hidden = tableModel.isColumnVisible?.("category") === false;
Checks if the footer is visible: it has rows and is not hidden with setFooterVisible.
True if the footer is visible, false otherwise.
Checks if the header area is visible: it has rows and is not hidden with setHeaderVisible.
Returns true if the header area is visible, otherwise false.
Recalculates the height and padding for the body area.
This method retrieves the area model for the "body" area, and updates the rowCount property with the row count of the model.
The contentHeightInPx property is then updated with the height of the "body" area.
The method calls the recalcContentWidthInPx() method to recalculate the content width.
Finally, the method calls the recalcPadding() method to recalculate the padding.
Shows or hides a column. The column keeps its definition, position and width – a hidden column has the width 0 (getColumnWidth), is not rendered, copied or exported; showing it again restores its width.
Works through ColumnDefIf.isVisible: it is replaced by TrueFn / FalseFn (an own
isVisible function of the column is replaced, too). Columns without a column definition can't be hidden.
With header groups (AreaModelCellGroups) the column is shown only if neither this method nor a collapsed
group hides it – expanding the group does not bring back a column hidden here, and vice versa.
Weight widths (new Size(1, "weight")) are shared among the shown columns.
Recalculates the content width, the padding (fixed columns) and the x positions. Only changes the model –
TableApi.setColumnVisible also repaints the table.
column index (fixed columns included), property or column definition
false hides the column
false if there is no such column definition
tableModel.setColumnVisible?.("category", false);
Sets the width in pixel of a column (by columnIndex) in a table.
The width is also stored in the column's ColumnDef (width = the new px size), so it survives a host resize
(the widths are recalculated from the ColumnDefs then).
The index of the column.
The desired width of the column.
Shows or hides the footer. A hidden footer takes no space; its area model and rows stay unchanged. Only changes the model – TableApi.setFooterVisible also repaints the table.
false hides the footer
tableModel.setFooterVisible?.(false);
Shows or hides the header. A hidden header takes no space (the body moves up); its area model and rows stay unchanged, so showing it again restores it. Only changes the model – TableApi.setHeaderVisible also repaints the table.
false hides the header
tableModel.setHeaderVisible?.(false);
Pivots again with a changed configuration and/or new rows: new keys, columns, header and totals in this model. Prefer TableApi.setPivotConfig – it also lays the table out again; after this method alone the table must be laid out by you.
the changed parts, e.g. { columnFields: ["jahr"] }
Optional rows: T[]new source rows (default: the current ones)
pivotModel.setPivotConfig({ values: [{ value: "umsatz", aggregator: "avg" }] });
The table model of a pivot table – a TableModel (all wrappers take it) whose columns follow the pivot: a group column, one column per column key × value, subtotal and total columns, a grouped header and a total row. Created by PivotFactory.createTableModel.
Pivot again at runtime – other fields, values or rows – with TableApi.setPivotConfig: the same model and the same table get new columns (no new model, so no rebuild in the framework wrappers).
Example
Since
1.1.94