Skip to content

PivotConfig

Configuration for the pivot plugin.

Pivot mode transforms flat row data into a cross-tabulation (pivot table) by grouping rows along one axis (rowGroupFields), spreading unique values of another field across columns (columnGroupFields), and computing aggregate values (valueFields) at each intersection.

new PivotPlugin({
rowGroupFields: ['department'],
columnGroupFields: ['quarter'],
valueFields: [{ field: 'revenue', aggFunc: 'sum' }],
showTotals: true,
showGrandTotal: true,
})
PropertyTypeDescription
active?booleanWhether pivot view is active on load (default: true when fields are configured)
rowGroupFields?string[]Fields to group rows by (vertical axis). Multiple fields create nested groups.
columnGroupFields?string[]Fields whose unique values become column headers (horizontal axis).
valueFields?PivotValueField[]Value fields to aggregate at each row/column intersection.
showTotals?boolean
showGrandTotal?boolean
defaultExpanded?booleanWhether groups are expanded by default (default: true)
indentWidth?numberIndent width per depth level in pixels (default: 20)
showToolPanel?booleanWhether to show the pivot configuration tool panel (default: true)
animation?ExpandCollapseAnimationAnimation style for expanding/collapsing groups. - false: No animation - 'slide': Slide animation (default) - 'fade': Fade animation

Default: 'slide'


AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt