Pivot analysis PRO
Cross-aggregate data along row and column axes.
Options
Changes below update the Grid and code immediately.
Find teams on the left and APAC, EMEA, and AMER across the top. This menu starts in pivot mode.
View code
Sample data included in the code · 6 rows
Usage guide
#Compare team order quantities across regions: teams form rows, regions form columns, and intersections show total quantity.
Try it yourself
- Read rows and columns
Find teams on the left and APAC, EMEA, and AMER across the top. This menu starts in pivot mode.
- Compare intersections
For example, Platform's APAC cell sums quantities for Platform orders in APAC. Compare regions side by side.
- Inspect source orders
Choose Source data under Data analysis to inspect individual orders, then Team × region pivot to return to summaries.
Orders are summarized by team/region combinations. Total also lets you compare row and column totals.
Distinguish pivot totals from individual order quantities. This example sums quantity; it does not calculate averages or order counts.
Useful terms
- Pivot
- A table cross-aggregating two dimensions as rows and columns.
- pivotValueColumns
- The numeric field to aggregate; quantity in this example.
Using this feature in your product requires the Pro runtime and a valid license.
API reference
#Key properties
| Attribute / Property | Type / Default | Description |
|---|---|---|
PRO pivotMode | booleanDefault: false | pivot mode. When on (and the three axis props below are non-empty), the grid cross-tabs the data instead of the normal client pipeline: `pivotRowGroupColumns` form the left rows, the distinct values of `pivotColumns` become auto-generated secondary columns, and each cell is `pivotAggFuncs[valueColumn]` over that row-group ∩ pivot value. Mutually exclusive with tree data / row grouping. |
PRO pivotRowGroupColumns | string[]Default: undefined | left-axis grouping columns (outermost first). |
PRO pivotColumns | string[]Default: undefined | columns whose distinct values become the top-axis pivot columns. |
PRO pivotValueColumns | string[]Default: undefined | the value columns aggregated into each cell. |
PRO pivotAggFuncs | Record<string, string>Default: undefined | aggregation per value column (built-in name or a registered custom name; default 'sum'). |
Other properties4
| Attribute / Property | Type / Default | Description |
|---|---|---|
PRO pivotSubtotals | 'off' | 'top' | 'bottom'Default: 'off' | PF-GROUPPIVOT-WIRING-02 — per-level subtotal PLACEMENT for the client cross-tab. `off` (default) composes exactly the pre-ADR-023 list; `top` places each open node's subtotal straight after its marker, `bottom` closes the subtree . Collapsed nodes and innermost nodes get none; level filtering stays a core-only option. |
PRO pivotGrandTotal | 'off' | 'top' | 'bottom'Default: 'bottom' | PF-GROUPPIVOT-WIRING-02 — grand-total placement. `bottom` is the default AND the pre-ADR-023 behavior (the computed grand total has always closed the list); `top` opens with it; `off` hides it. |
PRO pivotPanelShow | 'always' | 'onlyWhenPivoting' | 'never'Default: 'never' | Canonical Pivot Panel visibility policy from the roadmap contract. |
PRO pivotPanel | booleanDefault: false | Compatibility alias: `true` is equivalent to `pivotPanelShow='always'`. |
Events5
| Events | Detail type | Description |
|---|---|---|
PRO | PivotPanelChangeDetail | Fires after the pivot panel changes an axis, order, or aggregation. |
PRO | PivotPanelChangeDetail | Roadmap-compatible alias emitted with the same deterministic pivot config detail. |
PRO | { pivotMode: boolean } | Fires when the built-in pivot panel toggles delegated/client pivot mode. |
PRO | SyGridPivotCombinationConflictDetail | one conflict announcement per pivot combination the grid resolves against the caller's configuration (`PF-PIVOT-SILENT-01`). The detail carries the matrix vocabulary and the exact sentence the console also received; `getPivotCombinationReport` is the pull channel for the same information. |
PRO | SyGridPivotColumnsChangedDetail | PF-GROUPPIVOT-WIRING-02 — the refresh identity, LIVE: emitted once per cross-tab recompute whose generated column set actually changed (`diffPivotColumns` — retained / added / removed / moved / axesChanged). The stateful model lives in the 'group-pivot' chunk and carries its OWN re-entrancy latch ; the element adds none. No diff, no event — a recompute that regenerates the same columns is silence, not noise. |
Methods4
| Method / Arguments | Return type | Description |
|---|---|---|
PRO | Promise<SyGridPivotCombinationReport> | the combination decision over the features this grid actually has configured. |
PRO | Promise<SyGridPivotSecondaryColumns | null> | the identity model of the columns the grid GENERATED for the current cross-tab. |
PRO columns: string[] | Promise<boolean> | Replace the pivot columns through the same validated transition path as the Pivot Panel. |
PRO columns: string[] | Promise<boolean> | Replace the value columns; duplicates are removed and arrays are detached from the caller. |
Explore each feature
Learn when to use each feature and how to configure it. Each guide identifies live examples and features you connect in your app.