bc-grid
GitHub

Cross-tabulate any column against any other. Drag columns into the row, column, and value zones in the pivot tool panel; bc-grid renders the pivoted matrix with subtotals and grand totals.

Order #
Customer
Region
Status
Sales rep
Amount
R-000001
Customer 00001
North
active
Avery Chen
$0.00
R-000002
Customer 00002
North
pending
Ben Singh
$31.42
R-000003
Customer 00003
North
closed
Cara Diaz
$62.83
R-000004
Customer 00004
North
active
Drew Lin
$94.25
R-000005
Customer 00005
South
pending
Elena Park
$125.66
R-000006
Customer 00006
South
closed
Felix Roy
$157.08
R-000007
Customer 00007
South
active
Gita Bose
$188.50
R-000008
Customer 00008
South
pending
Henry Kao
$219.91
R-000009
Customer 00009
East
closed
Avery Chen
$251.33
R-000010
Customer 00010
East
active
Ben Singh
$282.74
R-000011
Customer 00011
East
pending
Cara Diaz
$314.16
R-000012
Customer 00012
East
closed
Drew Lin
$345.57
R-000013
Customer 00013
West
active
Elena Park
$376.99
R-000014
Customer 00014
West
pending
Felix Roy
$408.41
R-000015
Customer 00015
West
closed
Gita Bose
$439.82

Try this

The pivot tool panel is open in the right sidebar. The grid is pre-pivoted: Region → row, Status → column, sum(Amount) → value.

  • Drag "Sales rep" from the columns list into the Row groups zone — now you have a two-level pivot.
  • Drag "Amount" into the Values zone with a different aggregation (sum / avg / max).
  • Drag a column out of a zone to remove it.
  • Toggle the subtotals checkboxes — row subtotals, column subtotals, both.

Pivot state

  • rowGroups. Columns whose distinct values become the rows of the pivot.
  • colGroups. Columns whose distinct values become the columns of the pivot.
  • values. The cells. Each entry is a { columnId, aggregation, label } — the same BcAggregation shape used by the column footer.
  • subtotals. { rows?: boolean; cols?: boolean }. Both default to true.

Where pivot belongs

  • Reporting screens. Sales by region × month, AR by customer × invoice age, inventory by warehouse × category.
  • Drill-down dashboards. Pair pivot with a saved-view picker so users restore named cross-tabs in one click.
  • Composes with export. The pivoted shape exports to CSV / Excel as a normal matrix.