# Distance Tracker block

> Distance Metric Card with Week, Month, Year Tabs and Dotted Sparkline Fill

Cycling distance KPI card that swaps a dotted area sparkline and value across Week, Month, and Year tabs. Built with ReUI Frame and shadcn Tabs for fitness, activity, or analytics stat panels and metric widgets.

- Type: Pro block
- Category: [Sparkline](https://reui.io/blocks/chart/sparkline.md)
- Page: https://reui.io/blocks/chart/sparkline/chart-11
- MCP: `get_block("chart-11")`
- Built with: Frame, Tabs
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

One distance figure over a raw SVG path with a dotted fill, where Week, Month and Year tabs swap path strings stored in data

## Agent notes

- Replace `PERIODS` in data.tsx; each `value` is a preformatted string and each `linePath` a hand drawn path in a 552 by 118 viewBox
- `areaPath` only closes a line down to the bottom edge, so generate each `linePath` from your series scaled to that viewBox

## When not to use

- Several stock metrics, each with its own trend, swapped together by one period switch: use [Inventory Health](https://reui.io/blocks/chart/sparkline/chart-1.md) (`get_block("chart-1")`)
- Several business figures side by side, each with a hover tooltip on its trend: use [KPI Trend Cards](https://reui.io/blocks/chart/sparkline/chart-15.md) (`get_block("chart-15")`)

## Install

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

## About Sparkline blocks

### When to use

- Rows of metric tiles, each pairing its value with a sparkline, a meter or a delta
- Health strips for cron jobs, SLOs or data syncs that open with KPI tiles and mini trends
- Metric lists where every row ends in a small trend and a change badge

### When not to use

- Plain KPI numbers that need only a delta badge, an actions menu or a progress bar: use the [Stats blocks](https://reui.io/blocks/application/stats.md)
- One metric that deserves a full width plot with axes and a tooltip: use the [Area Chart blocks](https://reui.io/blocks/chart/area-chart.md)
- A whole overview page that sets a header, summary tiles and a work list around its plots: use the [Dashboard blocks](https://reui.io/blocks/application/dashboard.md)

### Agent notes

- `Chart` takes no props and fetches nothing: every tile value and series comes from constants in the block's own folder

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