# Retail Revenue block

> Retail revenue dashboard with KPI sparkline cards, stacked sales charts, and a sortable order queue

Commerce revenue dashboard: 4 KPI cards with sparklines and trend deltas, a stacked area revenue chart, a channel-mix bar chart, and a searchable, paginated order queue with fulfillment bars. ReUI Frame, Badge, DataGrid; shadcn Chart and Calendar.

- Type: Pro block
- Category: [Dashboard](https://web.dev.reui.io/blocks/application/dashboard.md)
- Page: https://web.dev.reui.io/blocks/application/dashboard/dashboard-7
- MCP: `get_block("dashboard-7")`
- Built with: Avatar, Badge, Button, Calendar, Chart, Data Grid, Frame, Input Group, Item, Popover, Sheet, Toggle Group
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Booked revenue against a dashed plan line, a direct channel focus toggle and an exceptions only order filter

## Agent notes

- Replace `ORDERS`, `METRICS`, `MONTH_REVENUE`, `QUARTER_REVENUE` and `CHANNEL_VOLUME`; each revenue point's `online` plus `store` should equal its `revenue`
- `DEFAULT_REPORT_RANGE` and `REPORT_RANGE_PRESETS` hardcode today as Aug 4, 2025, and the applied `range` filters only the order queue, not `METRICS` or charts
- `handleExport` only fires a sonner `toast` with the view summary and writes no file; the toast needs a Toaster mounted in your app

## When not to use

- A row of KPI cards with an area sparkline in each, on its own: use [KPI Trend Cards](https://web.dev.reui.io/blocks/chart/sparkline/chart-15.md) (`get_block("chart-15")`)
- An order list with row selection, pinnable columns and per row menus: use [Fulfillment Exceptions](https://web.dev.reui.io/blocks/application/dashboard/dashboard-1.md) (`get_block("dashboard-1")`)

## Third-party libraries

- Recharts v3: [API reference](https://recharts.github.io/en-US/api/), [docs](https://recharts.github.io/en-US/guide/getting-started/)
- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- date-fns v4: [docs](https://date-fns.org/v4.1.0/docs/Getting-Started)
- React DayPicker v9: [API reference](https://daypicker.dev/v9/api), [docs](https://daypicker.dev/v9/start)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/dashboard-7
```

## About Dashboard blocks

### When to use

- A full page overview: a header, a row of summary tiles, then a trend chart, a work list or both
- A team home for fulfillment, product modules, timesheets, staffing, calls, security, revenue or payouts

### When not to use

- One trend panel to drop into a page layout you already have: use the [Area Chart blocks](https://web.dev.reui.io/blocks/chart/area-chart.md)
- A strip of KPI tiles on its own, with nothing under it: use the [Stats blocks](https://web.dev.reui.io/blocks/application/stats.md)
- Product usage reporting on activation, cohorts, events or experiments: use the [Analytics blocks](https://web.dev.reui.io/blocks/solutions/analytics.md)

### Agent notes

- Each block sets its own `min-h-svh` wrapper, padding and max width in page.tsx, its root component or both; strip them inside an app shell

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.
