# XWUIBurndownChart

A pure-SVG sprint burndown / burn-up chart (no external chart library) driven by a `data.snapshots` array of date-bucketed `{ date, total, completed, byStage? }` points. It draws a time axis (X), a remaining-work axis (Y), a dashed ideal line (linear from the starting scope down to 0), and the actual line plotting remaining work (`total − completed`) per snapshot with hoverable markers. Setting `mode: "burnup"` flips the actual line to cumulative completed against scope (and reverses the ideal line). When `data.stages` are supplied and `showStages` is on, it stacks translucent per-stage areas from each snapshot's `byStage` map under the line. Config covers `showIdeal`, `showAxis`, `showLegend`, `unit` (default `pts`), `height` (default 240), and `idealColor`/`actualColor` overrides; at least two snapshots are required or it renders an empty-state message.

## Basic Usage

A 5-day sprint (Mar 12-16) burning a 40-point total down as `completed` climbs 0 → 8 → 18 → 26 → 34, with the ideal line and axis enabled.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A 5-day, 40-point sprint burndown with the ideal reference line and axis shown.
```

## Burnup

The same daily snapshots in `mode: "burnup"` so the line tracks cumulative `completed` (0 → 38) while the scope `total` drifts upward from 40 to 45, illustrating scope creep against progress.

```example
file: examples/Burnup.ts
html: examples/Burnup.html
title: Burnup
description: Burn-up mode plotting cumulative completed work against a scope that grows from 40 to 45 points.
```

## With Stages

Five snapshots each carry a `byStage` breakdown across three stages (To do, In progress, Review) so `showStages` stacks translucent colored areas under the actual line, with the legend enabled.

```example
file: examples/WithStages.ts
html: examples/WithStages.html
title: With Stages
description: A burndown with stacked To do / In progress / Review areas built from each snapshot's per-stage counts.
```

```api
```
