Skip to content

ADR-0013: Hand-rolled Canvas charts

  • Status: Superseded by ADR-0028
  • Date: 2026-08-11
  • Deciders: maintainers
  • Related: ui.md

Context

Reports need a category donut and a 6-month trend bar chart. Chart libraries (MPAndroidChart, Vico, …) add dependencies, themes, and license surface for two simple charts.

Decision

Charts are hand-rolled Compose Canvas draws in ReportScreen:

  • Donut: drawArc strokes per category slice with a palette derived from the Material theme.
  • Trend: proportionally filled bars (fillMaxHeight(fraction)), current month emphasized.

Both carry contentDescription semantics for accessibility.

Consequences

  • Dependency count stays low (no chart SDK), charts inherit the Material theme automatically (light/dark/dynamic color just work).
  • Chart code is small, owned, and trivially restylable.
  • No zoom/gestures/interaction beyond what we draw — acceptable for the report surface.

Alternatives considered

  • MPAndroidChart / Vico — rejected: extra dependency, theme wiring, license review for two static charts.
  • Material3 Charts — rejected: experimental at the time.