feat(reports): SVG bar chart on every report detail page (MAPPS-297) #336
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!336
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/MAPPS-297-report-charts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The report-detail page rendered summary tiles + a breakdown table
but no chart. AC: "every report has at least one chart".
Ships a hand-rolled SVG BarChart component (no JS charting dep added
to the wasm bundle) and wires it into the report-detail render
pipeline:
aging, projects by status, etc.): chart sits in the breakdown Card,
table sits below it. Both render off the same data so a row can be
read in the chart or scanned in the table.
the numeric series): the summary tiles get a parallel chart Card
rendered as a horizontal bar chart of the numeric summary metrics.
Value parsing tolerates plain ints, decimals, currency ("$1,234.56"),
and percentages ("87%"); rows that cannot parse (free-form labels) are
silently dropped from the chart but kept in the table, so the chart
never crashes on a non-numeric value.
The chart auto-scales to the maximum value, uses the existing
fill-accent + fill-surface-2 theme tokens so light/dark + tenant-accent
overrides apply for free, and falls back to a "No data to chart"
state when the series is empty.
Acceptance criteria:
string was already missing from main; the gap was that the reports
surface rendered tables only with no visualization at all. Fixed.
fallback in ReportDetailPage guarantees at least one BarChart Card
renders for every report_type that returns numeric data.
#MAPPS-297
The report-detail page rendered summary tiles + a breakdown table but no chart. AC: "every report has at least one chart". Ships a hand-rolled SVG BarChart component (no JS charting dep added to the wasm bundle) and wires it into the report-detail render pipeline: - Reports with a breakdown (tickets opened-by-status, billing A/R aging, projects by status, etc.): chart sits in the breakdown Card, table sits below it. Both render off the same data so a row can be read in the chart or scanned in the table. - Reports without a breakdown (time, where the summary itself carries the numeric series): the summary tiles get a parallel chart Card rendered as a horizontal bar chart of the numeric summary metrics. Value parsing tolerates plain ints, decimals, currency ("$1,234.56"), and percentages ("87%"); rows that cannot parse (free-form labels) are silently dropped from the chart but kept in the table, so the chart never crashes on a non-numeric value. The chart auto-scales to the maximum value, uses the existing fill-accent + fill-surface-2 theme tokens so light/dark + tenant-accent overrides apply for free, and falls back to a "No data to chart" state when the series is empty. Acceptance criteria: - "Charts coming soon" placeholder is gone everywhere: the literal string was already missing from main; the gap was that the reports surface rendered tables only with no visualization at all. Fixed. - Every report has at least one chart: the breakdown-or-summary fallback in ReportDetailPage guarantees at least one BarChart Card renders for every report_type that returns numeric data. #MAPPS-297