Dashboard gadget: table and 2D table (aggregated)
Description
Background
Aggregated table for the approvals gadget, in two content modes chosen in Calculations. Count: approval counts by one field (1D: value, count, %) or cross-tabulated by two (2D pivot: rows x columns, counts in cells). Items: per row the actual work items / pages as chips instead of counts. Common chart behaviour per AP-2309; this is an aggregating table, distinct from the approvals list in AP-626.
Count mode
Chart by is the rows; the optional Group by is the columns.
-
Group by empty: 1D table (value, count, percentage share, Total row).
-
Group by set: 2D pivot (rows x columns, counts in cells, Total column per row; no percentage column).
Items mode
No Group by field. A row (a Chart by value, default Approval name) expands into a single column of wrapping chips; each chip is one work item / page and links to it, and a popover lists the step's approvers (from AP-2339). Items within a row are sortable (key, decision deadline, created) and capped per row with a "+N more" control.
Item data loading (Items mode)
The approval database stores only the reference id of each related item, not its display fields. Chips are hydrated client-side after the row loads: the UI resolves the reference id to key, title and icon at render time, for the displayed, entitled, capped set only. The server does not aggregate external item fields, so Items mode stays consistent with the "approval-database fields only" principle in AP-2309.
Format
-
Rows: Ordering, color per value, label override.
-
Columns (2D Count mode only): Ordering and label override, no color.
-
Items column (Items mode only): label override.
Display options
Count: 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).
Items: item sort, items-per-row limit. Count-only options are hidden.
Shared from AP-2309 where meaningful: Show zero counts, Show number column (Count), Limit rows with "Show more", Number format, Labels.
Drilldown
Count: 1D narrows the approvals list to the row value; 2D narrows to row + column together, and a Total cell to the single axis value. Items: clicking a chip opens the linked item. Per AP-2309, in the viewer's context, when hyperlinks are enabled.
Acceptance criteria
-
Calculations selects the mode: Count (default) or Items.
-
Count: Group by empty gives 1D (value, count, %, Total); Group by set gives 2D pivot (rows x columns, counts, Total column, no %).
-
Items: rows are the Chart by value (default Approval name); each cell is a wrapping list of chips for the related work items / pages; each chip links to its item and its popover lists the step's approvers (AP-2339); items are sortable and capped with "+N more".
-
Items stores only the reference id server-side; the UI hydrates key, title and icon by reference id at render time, for the displayed entitled set only, with no server-side aggregation over external item fields.
-
Format and display options as above; Count-only options are hidden in Items mode.
-
Drilldown and all shared behaviour (fields incl. Approver / Current step, counted once per cell in Count despite fan-out, buckets, granularity, ordering, hyperlinks, visibility) per AP-2309.
Notes
Depends on AP-2309 and AP-2339. Fan-out fields (Approver, Current step) may make Count-mode totals exceed the number of distinct approvals. One field per axis in Count only; nesting multiple fields is out of scope for v1. Items mode replaces the need for a dedicated type for the grouped work-item view.