Skip to content

Choose a Report Layout

Use a compact layout to save horizontal space, or a tabular layout to place row fields in separate columns. Layout changes the presentation; the records and aggregate values stay the same.

Interactive example

Choose a readable row layout

Display Region and Product in one nested column or separate columns.

Try it: Compare Separate row columns with One nested row column.

The example loads when visible.

What to notice: The layout changes without changing sales totals.

Switch between the layouts and expand a group. Choose the form that makes your field hierarchy easiest to read.

import type { PivotConfig } from '@revolist/pivot';
const config: Partial<PivotConfig> = {
rows: ['region', 'product'], columns: ['quarter'],
values: [{ prop: 'sales', aggregator: 'sum' }],
rowAxisLayout: 'compact', // or 'tabular'
};

For many measures, place values on rows to reduce the number of generated columns. flatHeaders and mergeValueHeaders control generated header presentation; see the layout reference.

Expand row groups, show totals, format values, or adjust chart appearance.