# Orders Overview block

> Orders overview chart with orders, revenue and average order tabs over a hatched gradient area

Store performance card: a Day, Week, Month or Year menu, metric tabs with change on the prior period, a pinned value pill, curve and layer options, refresh, expand, CSV and copy export. ReUI Frame, shadcn Tabs, DropdownMenu. Ecommerce sales.

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

## Best for

Store metrics as 3 tabs that swap a single area, with a pinned pill that adds the prior period's matching value

## Agent notes

- Replace the tables in data.tsx that build `PERIODS`; each `previousPoints` list must align point for point with `points`
- Revenue and average order print in USD through `currencyFormat`, `centsFormat` and `compactCurrency`; set each one's `currency` for other data
- Refresh only waits `REFRESH_MS`, replays the rise and sets `synced` to just now; nothing is refetched

## When not to use

- A grid of KPI cells where each figure carries its own small area and delta badge: use [KPI Area Charts](https://web.dev.reui.io/blocks/application/card/card-29.md) (`get_block("card-29")`)
- A row of 4 KPI buttons switching a single dashed stroke with no fill: use [Metric Switcher](https://web.dev.reui.io/blocks/chart/line-chart/chart-6.md) (`get_block("chart-6")`)

## 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-18
```

## About Area Chart blocks

### When to use

- A metric over time drawn as a gradient filled area and read against an earlier period or a baseline
- Dashboard widgets whose toolbar reshapes the view and exports the plotted data as CSV
- Report cards where a hovered point reads out beside its earlier value or its share of the whole

### When not to use

- A series held against a target or limit line drawn across the same axis: use the [Composed Chart blocks](https://web.dev.reui.io/blocks/chart/composed-chart.md)
- Several KPI tiles, each with a tiny trend tucked under its value: use the [Sparkline blocks](https://web.dev.reui.io/blocks/chart/sparkline.md)
- Conversion stages where each step keeps only part of the volume before it: use the [Sankey Chart blocks](https://web.dev.reui.io/blocks/chart/sankey-chart.md)

### Agent notes

- Keep the `useId` prefix on any new `linearGradient` id, so 2 copies of a block on one page never share a fill
- Copy and export confirmations call `toast` from `sonner`, so the app needs a mounted Toaster to show them
- `Chart` takes no props, so real figures replace the sample rows in the block's data file

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.
