# Inbound Leads block

> Monthly leads area chart comparing this year to last, with a widget toolbar and accent picker

Leads per month or quarter over an area fill with drifting dots, against last year in grey, with a trend line. Display and Trend menus, color picker, refresh, expand dialog, CSV and copy export. shadcn Card, ReUI ColorPicker. CRM dashboard.

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

## Best for

The current year against last year with a switchable linear or 3 point moving average trend, by month or by quarter

## Agent notes

- Replace `monthlyLeads` and `years`; the Quarter view sums 3 months at a time, so keep all 12 months for both years
- `linearFit` and `centeredAverage` fit only this year's `current` values, so last year never gets a trend
- `syncedAt` is a fixed label and Refresh only remounts the plot after `REFRESH_MS`, refetching nothing

## When not to use

- Ad impressions split by channel, the current window against the one before: use [Campaign Impressions](https://reui.io/blocks/chart/area-chart/chart-17.md) (`get_block("chart-17")`)
- Actual sales tracked against a dashed target with a fixed date marker: use [Sales vs Goal](https://reui.io/blocks/chart/composed-chart/chart-20.md) (`get_block("chart-20")`)

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

## 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://reui.io/blocks/chart/composed-chart.md)
- Several KPI tiles, each with a tiny trend tucked under its value: use the [Sparkline blocks](https://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://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://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
