Pivot Layout Technical Reference

Summary

  • Layout State enables Pivot Layouts to be configured

Find Out More

See General Layouts Technical Reference for details on Layout Options and Layout API

Layout State

Layout State contains a collection of Layouts and the Current Layout:

PropertyTypeDescription
CurrentLayoutstringLayout to be loaded when AdapTable starts (using Name property in Layout); if not provided the first Layout is used
LayoutsLayoutArrayCollection of Layouts - can be Table or Pivot

Base Layout Object

Pivot Layouts derive from the LayoutBase object defined as follows:

PropertyTypeDescription
AutoSizeColumnsbooleanWhether Columns should autosize when Layout first loads
ColumnFiltersColumnFilter[]Collection of Column Filters to apply in Layout
ColumnGroupValuesColumnGroupValuesDefines which Column Groups are expanded / collapsed
ColumnHeadersColumnStringMapSet of custom header names for some (or all) Columns
ColumnPinningColumnDirectionMapDetails of which Columns are pinned
ColumnSizingColumnSizingMapControls size (width or flex & min/max) for Columns
ColumnSortsColumnSort[]Sorting to apply in the Layout
GrandTotalRow'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom' | booleanPosition of the Grand Total Row in the Layout
GridFilterGridFilterGrid Filter to apply in Layout
NamestringName of the Layout as it appears in the Layout toolbar and tool panel
OpenChartsLayoutOpenChart[]AG Grid charts to open when this layout is selected (by chart UUID or name)
RowGroupDisplayTypeRowGroupDisplayType
RowGroupValuesRowGroupValuesDefines which Row Groups are expanded / collapsed
RowSelectionLayoutRowSelection | falseDefines Row Selection behaviour for Layout; if false, Row Selection is disabled; if undefined, GridOptions is used
SuppressAggFuncInHeaderbooleanHides the aggFunc in Column header: e.g. 'sum(Price)' becomes 'Price'
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Pivot Layout Object

The Pivot Layout additionally has:

PropertyTypeDescription
PivotAggregationColumnsPivotAggregationColumnsColumns showing aggregated values in Group Rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
PivotColumnsstring[]Mandatory list of Columns to pivot (provide empty array if just displaying Aggregations)
PivotColumnTotalPivotTotalPositionDisplay automatically calculated Totals within EACH Pivot Column Group, in the position specified
PivotExpandLevelnumberHow deep to expand Pivot Columns (0 for none, 1 for 1st level only etc, -1 to expand all)
PivotGrandTotalPivotTotalPositionDisplay automatically calculated Totals of all Pivot Columns, in the position specified
PivotGroupedColumnsstring[]Columns which are row-grouped when the Layout is applied
PivotResultColumnsOrderstring[] | booleanOrdered list of Pivot Result Columns; set to true to track current display order, or provide custom list
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Column Filter

The ColumnFilters property is a collection of ColumnFilter objects defined as follows:

PropertyTypeDescriptionDefault
ColumnIdstringColumn where Filter should be applied
PredicatesColumnFilterPredicate[]AdaptablePredicate which AdaptableQL will evaluate when the Filter is run
PredicatesOperatorPredicatesOperatorLogic used when combining multiple Predicates ('AND'|'OR')'AND'
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object

Grid Filter

The GridFilter object is defined as follows:

PropertyTypeDescription
ExpressionstringThe (boolean) Expression to run
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object

Column Sort

The ColumnSort object used for sorting is defined as follows:

PropertyTypeDescription
ColumnIdstringId of Column being sorted
SortOrder'Asc' | 'Desc'How Column is sorted - either 'Asc' or 'Desc'

Row Selection

The LayoutRowSelection object used for row selection is defined as follows:

PropertyTypeDescriptionDefault
CheckboxesbooleanWhether to display checkboxes in Selection Columntrue
CheckboxInGroupColumnbooleanRenders selection checkboxes in Auto-Group Column (if true) or in dedicated Selection Column (if false)false
EnableClickSelectionboolean | 'enableDeselection' | 'enableSelection'Selection behaviour when clicking a row: 'enableSelection' | 'enableDeselection' | true | falsefalse
GroupSelectModeGroupSelectionModeGrouping Select Mode: 'self' | 'descendants' | 'filteredDescendants''self'
HeaderCheckboxbooleanWhether to show checkbox in Header of Selection Column Header ('multiRow' only)true
Mode'singleRow' | 'multiRow'Row Selection Mode: 'singleRow' or 'multiRow'
SelectAllModeSelectAllModeSelect All Mode: 'all' | 'filtered' | 'currentPage''all'

Other Pivot Layout Properties

PropertyType
ColumnPinningColumnDirectionMap
ColumnSizingColumnSizingMap
ColumnHeadersColumnStringMap
RowGroupValuesRowGroupValues
ColumnGroupValuesColumnGroupValues

Note