Skip to content

feat(web): long-range trend chart (min/max band + average) - #45

Merged
ClaraVnk merged 1 commit into
mainfrom
feat/longrange-charts
Jun 30, 2026
Merged

feat(web): long-range trend chart (min/max band + average)#45
ClaraVnk merged 1 commit into
mainfrom
feat/longrange-charts

Conversation

@ClaraVnk

Copy link
Copy Markdown
Contributor

Context

Phase 4 follow-up — long-range charts backed by trends (the trends from #28 finally
get a long-term visual consumer).

Changes

  • band_chart (pure, unit-tested): SVG geometry for an average polyline + a min/max
    band polygon, with axis ticks.
  • The item page renders it from up to ~30 days of hourly trend rollups (numeric items),
    alongside the existing raw-history chart. Long-term shape survives raw-sample retention.

Tests

Band geometry + the item-page render. Full suite 221 passed; ruff + mypy(strict)
green. Screenshot in the README.

…m page

Add a long-range chart backed by the hourly trend rollups: a min/max band with the
average line, so an item's long-term shape stays visible after raw samples are
pruned by retention. Sits alongside the raw-history chart on the item page.

- charts.py: a pure `band_chart` helper → SVG geometry (avg polyline + a band polygon
  from the max edge then the min edge), with axis ticks; flat/too-few-points handled.
- Item page renders it from up to ~30 days of trends (numeric items only).

Tests: band geometry (line + band point counts, value range) and the item-page
render. Full suite 221 passed; ruff + mypy(strict) green.
@ClaraVnk
ClaraVnk merged commit be6f592 into main Jun 30, 2026
4 checks passed
@ClaraVnk
ClaraVnk deleted the feat/longrange-charts branch June 30, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant