Energy Arc Card
Retrospective/analytics card used in the Coach and Facilitator apps to summarize the "energy arc" of a workshop session. Four regions: an eyebrow header (label + progress + status), a score row (large italic score + interpretive badge), a sparkline chart with time-axis labels, and a 2×2 grid of bar-fill metrics.
Canonical
Light-surface default, matching the facilitator retrospective view. Tinted-pill badge, accent-colored chart + metric bars, 340px max width.
<?= ws_energy_arc_card([
'eyebrow' => 'Energy Arc',
'timeUsed' => '8 of 8h used',
'status' => ['text' => 'Complete', 'type' => 'success'],
'score' => 82,
'scoreBadge' => ['text' => 'Needs Work', 'type' => 'warning'],
'chartData' => [
['time' => '9:00', 'value' => 48],
['time' => '10:30', 'value' => 88],
['time' => '12:00', 'value' => 70],
['time' => '1:00', 'value' => 62],
['time' => '3:00', 'value' => 82],
['time' => '5:00', 'value' => 92],
],
'timeLabels' => ['9:00', '10:30', '1:00', '5:00'],
'metrics' => [
['label' => 'Pacing', 'value' => '~17m', 'fill' => 30],
['label' => 'Variety', 'value' => '3/7', 'fill' => 43],
['label' => 'Recovery', 'value' => '55m', 'fill' => 70],
['label' => 'Engagement', 'value' => '63%', 'fill' => 63],
],
]) ?>Dark Theme
Alternate surface for presentation mode and dark dashboards. Badges and bars lift via a tinted-on-dark treatment.
Score Tiers
The score badge signals interpretation at a glance. Pick type by score threshold: Excellent (success), On Track (info), Needs Work (warning), At Risk (danger). Badges use tinted pills; the tint pair is automatic per type.
API Reference
| Option | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Energy Arc' | Top-left label (rendered uppercased). |
timeUsed | string | — | Middle-top muted text (e.g. '8 of 8h used'). |
status | array | — | ['text' => 'Complete', 'type' => 'success']. Types: success, warning, danger, info, neutral. |
score | int | 0 | Score value (0..scoreMax). Required. |
scoreMax | int | 100 | Denominator. |
scoreBadge | array | — | ['text' => 'Needs Work', 'type' => 'warning']. Same types as status. |
chartData | array | [] | Array of ['time' => string, 'value' => 0..100]. Values are clamped. |
timeLabels | array | [] | Strings rendered below the chart as x-axis ticks (evenly spaced). |
metrics | array | [] | Up to 4 items: ['label','value','fill' (0..100), optional 'barColor']. |
theme | string | 'dark' | 'dark' (canonical) or 'light'. |
accent | string | theme default | Override accent color (inline CSS variable). |
id / class / attrs | string / string / array | — | Standard passthrough. |
Design Guidance
Do
- Place this card at the top of the Coach retrospective view — it's the summary the facilitator sees first.
- Drive
scoreBadge.typefrom the score itself so color reinforces the number: 85+ success, 70+ info, 50+ warning, <50 danger. - Pass 4–8 chart points for a readable arc. Fewer than 4 becomes a flat line; more than 10 loses definition at this card width.
- Keep metric values tight (3–5 chars): ~17m, 3/7, 63%.
Don't
- Don't reuse this card for generic score displays — it carries specific session-retrospective semantics. Use
ws_statorws_feature_cardfor generic numbers. - Don't stretch the card wider than 360–400px — the chart and metric grid are tuned for that width.
- Don't hardcode chart colors per tier. The accent follows the theme; tier meaning goes on the badge, not the line.