Skip to content

Pivot Overview

Pivot turns a flat fact table into an analytical view. You choose which fields define the row hierarchy, which fields define generated columns, and which fields become aggregated measures. RevoGrid stays responsible for rendering and interaction, while Pivot builds the grouped rows, generated headers, totals, and summary cells.

For raw type signatures, see Pivot API and Pivot Config API. Use this guide set for behavior, defaults, and how the parts work together.

Interactive example

Pivot overview

Choose attached plugin, custom constructor, standalone/headless, linked charts or remote execution

The example loads when visible.

What you needAPI to useGuide
A Pivot table in RevoGridPivotPlugin with grid.pivotConfiguration
Your own constructor or toolbar for an installed PivotpivotPlugin.getAuthoringController()Custom integrations
Report calculation and editing without a gridcreatePivotController from @revolist/pivot/headlessHeadless controller
Charts linked to the tablePivotChartsPlugin from @revolist/pivotCharts
Charts over your own dataStandalone dataset builder and chart controller from @revolist/pivot/chartsStandalone charts
Server aggregation and pagingAn application-owned engine adapter or remote storeRemote contract

Start with PivotConfig for grid setup. Use a portable report document for saved analytical intent and keep runtime bindings separate. The installed plugin owns its execution; use its authoring controller for a custom UI. A separately created headless controller owns a separate report session.

Open the full demo and framework source.

Use Pivot when your source rows represent detailed facts such as orders, transactions, tickets, or events, and users need to answer questions like:

  • “Sales by region and quarter”
  • “Count of incidents by team and priority”
  • “Average margin by category and month”
  • “Grand totals and subtotals across multiple hierarchies”

Use a normal grid when users mainly inspect or edit row-level records. Use Pivot when users need grouped analytical summaries.

  • dimension: A field that can be placed on the row axis, column axis, or used as a value source.
  • row field: A dimension listed in rows. It creates the vertical hierarchy.
  • column field: A dimension listed in columns. It creates generated headers.
  • value: A measure listed in values. It is aggregated into Pivot cells.
  • generated row: A synthetic row produced by Pivot, not a raw input row.
  • generated column: A synthetic column or column group produced by Pivot.
  • subtotal: A summary for one intermediate branch of a hierarchy.
  • grand total: A summary across the full filtered result.

Client-side Pivot follows this shape:

source rows
-> group by rows / columns
-> aggregate values
-> generate row hierarchy
-> generate column hierarchy
-> render with RevoGrid

Server-side Pivot keeps the same public config, but the aggregation step moves behind a remote engine boundary:

source rows
-> analytical engine
-> visible analytical window
-> RevoGrid

That means the same concepts stay in place even when the data becomes too large for full client-side materialization.

If you are new to Pivot tables or Business Intelligence (BI) concepts, we recommend starting with these conceptual guides:

  1. Install Pro and the standalone Pivot package.

    Terminal window
    pnpm add @revolist/revogrid @revolist/revogrid-pro @revolist/pivot
  2. Import the plugin and any aggregators you want to expose.

    import {
    PivotPlugin,
    type PivotConfig,
    } from '@revolist/pivot';
    import { commonAggregators } from '@revolist/revogrid-pro';
    import '@revolist/revogrid-pro/dist/revogrid-pro.css';
    import '@revolist/pivot/styles.css';
  3. Register PivotPlugin on the grid.

    grid.plugins = [PivotPlugin];
  4. Define a PivotConfig.

    const pivot: PivotConfig = {
    dimensions: [
    { prop: 'region', name: 'Region' },
    { prop: 'quarter', name: 'Quarter' },
    {
    prop: 'sales',
    name: 'Sales',
    aggregators: {
    ...commonAggregators,
    },
    },
    ],
    rows: ['region'],
    columns: ['quarter'],
    values: [{ prop: 'sales', aggregator: 'sum' }],
    };
  5. Apply it through the direct pivot binding.

    grid.pivot = pivot;

    additionalData.pivot is still observed for legacy integrations, but new code should bind pivot directly.

const pivot: PivotConfig = {
dimensions: [...],
rows: ['region', 'rep'],
columns: ['year', 'quarter'],
values: [{ prop: 'sales', aggregator: 'sum' }],
totals: { grandTotal: true, subtotals: true },
collapsed: true,
};
  • dimensions describes the reusable field metadata.
  • rows defines the row hierarchy from left to right.
  • columns defines the generated header hierarchy from left to right.
  • values defines which measures are aggregated in each visible cell.
  • totals enables grand totals and subtotals.
  • collapsed enables grouped row drill-down when the row hierarchy has multiple levels.
  • groupAggregations makes grouped Pivot rows show aggregate values across generated metric columns.

When Pivot is active, PivotPlugin temporarily owns:

  • the rendered source
  • the rendered columns
  • optional pinnedBottomSource for grand totals
  • grouped-row metadata used for drill-down

When Pivot is cleared, the plugin restores the original source, columns, grouping, and pinned totals.

Current Scope

  • Client-side Pivot rows, columns, values, totals, and drill-down are implemented.
  • Client-side grouped row aggregates are implemented through pivot.groupAggregations.
  • valuesOnRows, flat headers, and the drag-and-drop configurator are implemented.
  • Server-side Pivot exposes a first-class remote engine/store contract and plugin integration.
  • Pivot Charts expose a renderer-neutral linked chart lifecycle, the first-party Pivot Charts renderer, persistence, external containers, and an optional modeless UI.
  • The docs below describe the current implementation in packages/pivot/src, including Pivot core, Pivot Charts, and Pivot Config.
  1. What Is Pivot?
  2. What is an OLAP Cube?
  3. Data Modeling for Pivot
  4. Dimensions
  5. Aggregations
  6. Configuration Reference
  7. Totals
  8. Values On Rows
  9. Drill-Down
  10. Sorting And Filtering
  11. Pivot Charts
  12. Plugin Lifecycle
  13. Configurator
  14. Field Panel
  15. Server-Side Pivot
  16. Caching And Cache Keys
  17. OLAP Best Practices