Dashboard gadget: table and 2D table (aggregated)
Description
Background
Aggregated table output for the approvals gadget: approval counts grouped by one field (1D table: value, count, percentage share) or cross-tabulated by two fields (2D table / pivot: row values x column values, counts in cells). Common chart behaviour is specified in AP-2309 and applies here; this ticket specifies only this type. This is an aggregating table, distinct from the approvals-list table mode in AP-626 (which shows individual approvals per row).
Table type
Chart by is the rows; the optional Group by is the columns. A single type; the variant follows from Group by:
-
Group by empty: 1D table (columns: value, count, percentage share; a Total row).
-
Group by set: 2D pivot (row values down the left, column values across the top, counts in cells, a Total column per row). No percentage column in 2D; cells are counts.
Format tab
-
Rows: Ordering, color per row value (changeable; color carries the Chart by values), row header label override.
-
Columns (2D only): Ordering and column header label override, no color.
Display options (specific to table)
-
Show total row (1D): total count and 100%. On by default.
-
Show totals (2D): Total column per row, per-column totals, grand total. On by default.
-
Show percentage column (1D): on by default.
-
Empty cell display (2D): blank (default) or 0.
-
Conditional formatting: rules that color cells by value. Two modes, matching the common data viz baseline: single color (highlight cells that are greater than / less than / equal to a value) and color range (a gradient from low to high, the heatmap). Totals and grand totals are not formatted. Off by default.
Shared value-list options from AP-2309 apply (Show zero counts, Show number column, Limit rows with "Show more" summary, Number format, Labels).
Drilldown
-
1D: clicking a row's count or percentage narrows the approvals list to that row value.
-
2D: clicking a cell narrows to that row value and column value together; clicking a Total cell narrows to the single axis value.
Per AP-2309, in the viewer's context, when hyperlinks are enabled.
Acceptance criteria
-
Selecting the type reveals Chart by (rows) and an optional Group by (columns); the same field cannot be both.
-
Group by empty: 1D table (value, count, percentage, Total row). Group by set: 2D pivot (rows x columns, counts in cells, Total column per row); no percentage column in 2D.
-
Format: Rows with Ordering, color per value and label override; Columns (2D) with Ordering and label override, no color.
-
Display options: Show total row (1D, on), Show totals (2D, on), Show percentage column (1D, on), Empty cell display (2D, blank default / 0), Conditional formatting (single color and color range / heatmap, off by default, totals not formatted); shared options (Show zero counts, Show number column, Limit rows, Number format, Labels) per AP-2309.
-
Drilldown: 1D narrows to the row value; 2D narrows to row + column together, Total cells to the single axis value; in the viewer's context.
-
All shared behaviour (fields incl. Approver / Current step with fan-out counted once per cell, buckets, granularity, ordering, hyperlinks, visibility) per AP-2309.
Notes
Depends on AP-2309 (chart foundation). Fan-out fields (Approver, Current step) may make totals exceed the number of distinct approvals. One field per axis only: nesting multiple fields on rows or columns is out of scope for v1.