View as Markdown

Fields and filters

Axis bar

PivotAxisBar, the grouping bar - field buttons for the Filters, Columns, Rows and Values axes with sort, filter, aggregation and remove, the fields panel, per-field options, drag and drop and the keyboard.

The axis bar shows the report's fields as buttons, one toolbar per axis, above the table. Use the built-in one or place PivotAxisBar yourself; both bind to the store.

<PivotTable pivot={pivot} axisBar />
<PivotTable pivot={pivot} axisBar={{ showFieldsPanel: true, showRemove: false }} />

// Standalone, anywhere in the page:
<PivotAxisBar pivot={pivot} axes={['rows', 'columns', 'values']} />

Options

Option Default
showFieldsPanel false
showSort true
showFilter true
showAggregate true
showRemove true
draggable true
axes every axis

PivotAxisBar also takes pivot (required), aggregateOptions, localeText, className and style. With <PivotTable axisBar>, the table passes its own aggregateOptions and localeText.

Per field, PivotFieldDefinition options override the bar for that field: sortable, filterable, removable, draggable and hidden (a hidden field has no button). A sorted field shows an arrow, a filtered field a filter mark.

Field menu

Clicking a field button (or Enter, Space or Shift+F10 on it) opens its menu: Sort ascending, descending or none; Filter… (the member editor, Filtering UI) and Clear filter; Group… and Ungroup on row and column fields (ranges, date parts or custom member groups by field type); on value fields "Summarize values by" with the aggregateOptions and Number format…; then "Move to" the other axes, Move up, Move down and Remove. onBeforeAggregateMenuOpen receives { field, index, items }; edit items to change the offered aggregates or call preventDefault() to hide the submenu.

Drag and drop and keyboard

Drag a button to another axis toolbar, or along its toolbar to reorder. The keyboard alternative is the same as in the field list: ArrowLeft / ArrowRight (mirrored in RTL), Home and End move focus inside a toolbar (one tab stop per toolbar); Alt+ArrowUp / Alt+ArrowDown reorders; Delete removes; the menu's "Move to" items move to another axis.

Moves fire onBeforeFieldMove and onFieldMove with { field, from, to, index, source }, the same events as the field list.

Each axis is a toolbar with one tab stop; a button's accessible name is its caption and its description names its menu.

The bar renders its buttons on the server; menus load on first open.

Axis bar options and field moves

Open demo

A PivotAxisBar with its sort, filter and remove commands, drag and drop, the fields panel and the shown axes as options, per-field capabilities, and field moves logged and refused through onBeforeFieldMove.

Region / Country
2025
2026
Grand total
Asia
6,704
4,392
11,096
Europe
6,912
5,800
12,712
Grand total
13,616
10,192
23,808
Drag a field button to another axis or reorder it. With the keyboard, focus a button and press Alt+ArrowUp or Alt+ArrowDown to reorder, Enter for its menu ("Move to"), or Delete to remove it.