# Balance Tracker block

> Account Balance Line Chart with Reference Line, Peak Dots and Stat Header

Portfolio balance tracker: a stat header (balance, trend, High, Low, Change) over a recharts line chart with a date reference line and custom dots on peaks and troughs. ReUI Frame, FramePanel, shadcn ChartContainer. For finance, trading dashboards.

- Type: Pro block
- Category: [Line Chart](https://reui.io/blocks/chart/line-chart.md)
- Page: https://reui.io/blocks/chart/line-chart/chart-4
- MCP: `get_block("chart-4")`
- Built with: Frame
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

One tall balance line with dots only past fixed high and low cutoffs and at a dashed date marker, under computed High and Low figures

## Agent notes

- `currentBalance`, `todaysPnL`, `pnlPercentage` and `change` are literals inside `Chart`; only High and Low derive from `portfolioData`
- `CustomTooltip` multiplies each value by 10 and always prints +12.7%, while the `YAxis` `tickFormatter` doubles it, so the 2 scales disagree
- The `ReferenceLine` and the custom `dot` renderer key on the literal Jan 17 date and the 2800 and 1000 cutoffs; reset them for your series

## When not to use

- A cashflow trend the reader narrows by range, with a total summed over the months kept: use [Cashflow Trend](https://reui.io/blocks/chart/composed-chart/chart-21.md) (`get_block("chart-21")`)
- Several KPIs sharing one plot, switched from a row of toggle buttons: use [Metric Switcher](https://reui.io/blocks/chart/line-chart/chart-6.md) (`get_block("chart-6")`)

## Install

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

## About Line Chart blocks

### When to use

- A balance, price or revenue trend as a single stroke with period tabs and a peak marker
- Several platforms or channels compared as separate strokes on one time axis
- Two measures on different scales plotted against left and right axes

### When not to use

- A trend that needs its volume emphasized with a filled region below it: use the [Area Chart blocks](https://reui.io/blocks/chart/area-chart.md)
- Compact tiles where each figure carries a small trend of its own: use the [Sparkline blocks](https://reui.io/blocks/chart/sparkline.md)

### Agent notes

- Each stroke takes its label and color from a `chartConfig` key passed to `ChartContainer`, so add a key for every new series

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.
