# Training Volume block

> Weekly training volume bar chart with an accent week and last block ghost bars or plan finish tapes

12 weeks of running time or distance as patterned bars against the last block or the plan, with a week readout, legend totals, an Expand dialog and CSV or JSON exports. shadcn Card, Chart, ToggleGroup, Dialog. For marathon training logs.

- Type: Pro block
- Category: [Bar Chart](https://web.dev.reui.io/blocks/chart/bar-chart.md)
- Page: https://web.dev.reui.io/blocks/chart/bar-chart/chart-10
- MCP: `get_block("chart-10")`
- Built with: Button, Button Group, Card, Chart, Dialog, Dropdown Menu, Spinner, Toggle Group, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Running weeks set against the last block or the plan, where a week that beats plan snaps its tape and a hovered week marches its fill

## Agent notes

- Replace `weeks` and `block` in data.tsx; each week holds `actual`, `plan` and `prior` minutes and km, and the last week is the accent at rest
- Each week's `range` and the `block.first` and `block.last` dates are hand typed strings, so format them from your real dates
- The `refresh` action only remounts `VolumePlot` to replay the rise, so wire it to refetch your training log

## When not to use

- Several fitness readings side by side, each a figure with a unit suffix: use [Fitness Stats](https://web.dev.reui.io/blocks/application/card/card-40.md) (`get_block("card-40")`)
- An activity distance total that switches between week, month and year: use [Distance Tracker](https://web.dev.reui.io/blocks/chart/sparkline/chart-11.md) (`get_block("chart-11")`)

## Third-party libraries

- Recharts v3: [API reference](https://recharts.github.io/en-US/api/), [docs](https://recharts.github.io/en-US/guide/getting-started/)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/chart-10
```

## About Bar Chart blocks

### When to use

- Amounts compared across years, weeks, categories or regions as prisms, patterned bars, pills or lanes
- Activity over time stacked by outcome, such as job runs, audit events, firewall requests or data syncs
- Run durations and error budgets read against a timeout, a warning line or a paging threshold

### When not to use

- A share of a whole where the slices read better around a ring: use the [Pie Chart blocks](https://web.dev.reui.io/blocks/chart/pie-chart.md)
- A capacity or allocation split into colored segments on one meter, with no axis: use the [Stats blocks](https://web.dev.reui.io/blocks/application/stats.md)
- Rows of jobs or deploys, each with its own run history strip: use the [Status Tracker blocks](https://web.dev.reui.io/blocks/chart/status-tracker.md)

### Agent notes

- `Chart` renders with no props and fetches nothing, so every bar, lane and limit is seeded from constants in the block folder

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
