Pivot table
A pivot table over in-memory records with row, sub-row and column dimensions, sum, count or average, collapsible groups with subtotals, grand totals, heat-tinted cells and sortable totals.
Preview
Rows
Then by
Columns
Value
| Region › Channel | Q1 | Q2 | Q3 | Q4 | |
|---|---|---|---|---|---|
| $38.6k | $34.9k | $46.1k | $35.5k | $155k | |
| $19.8k | $18.2k | $18.8k | $19.4k | $76.3k | |
| Online | $5.2k | $5k | $3.8k | $5.2k | $19.2k |
| Partner | $9.1k | $4k | $10.9k | $11.4k | $35.4k |
| Retail | $5.6k | $9.1k | $4.1k | $2.9k | $21.7k |
| $65.9k | $23.6k | $34.5k | $13.4k | $137.5k | |
| Online | $16.7k | $15.1k | $6.7k | $6.5k | $45.1k |
| Partner | $30k | $2.9k | $17.6k | $2k | $52.5k |
| Retail | $19.1k | $5.6k | $10.2k | $4.9k | $39.9k |
| $85.3k | $79.5k | $74.9k | $37.9k | $277.6k | |
| Grand total | $209.5k | $156.2k | $174.4k | $106.3k | $646.3k |
Sum of Revenue · 192 records · cells tinted by value
Install
Pro source requires Pebble Pro. Try the full preview above.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data | Record<string, string | number>[] | — | Records to pivot. |
| dimensions | { key: string; label: string }[] | — | Fields offered for rows, sub-rows and columns. |
| measures | { key: string; label: string; format?: (n: number) => string }[] | — | Numeric fields offered as the value. |
| defaultRows | string | first dimension | Row dimension. |
| defaultSubRows | string | null | third dimension | Second row level (collapsible groups); null for one level. |
| defaultColumns | string | second dimension | Column dimension. |
| defaultMeasure | string | first measure | Measure shown in the cells. |
| defaultAggregate | "sum" | "count" | "avg" | "sum" | How cells are aggregated. |
| defaultCollapsed | string[] | [] | Group keys collapsed on first render. |
| caption | ReactNode | — | Accessible table caption. |
Pro component
Try the full preview above. Editable source and build guides require Pebble Pro.
