# Inventory Velocity block

> Inventory velocity bar chart with pill bars toned by stock health, a warehouse filter and sorting

Daily units sold for 12 categories as pill bars toned healthy, watch or slow by days of supply, with a stock health bar and a warehouse hover readout. Period, sort and warehouse menus, color picker, CSV. ReUI Frame, Badge, ColorPicker; shadcn Chart.

- Type: Pro block
- Category: [Bar Chart](https://web.dev.reui.io/blocks/chart/bar-chart.md)
- Page: https://web.dev.reui.io/blocks/chart/bar-chart/chart-29
- MCP: `get_block("chart-29")`
- Built with: Badge, Button, Button Group, Chart, Color Picker, Dropdown Menu, Frame, Separator, Spinner, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Overstock spotting across a catalog, where categories past 45 days of supply read as slow and the hover readout ranks each by pace

## Agent notes

- Replace `VELOCITY` and `ON_HAND` in data.ts; each `VELOCITY` row lists Reno, Columbus and Savannah units per day, then the prior window's 3
- `WATCH_DAYS` and `SLOW_DAYS` set the 30 and 45 day cutoffs that tone the bars, the stock health bar and the readout scale
- The `refresh` action only redraws the bars and stamps Synced just now, so wire it to refetch your sales and stock

## When not to use

- Road and rail lanes per region placed ahead of or behind a target: use [Transit vs Target](https://web.dev.reui.io/blocks/chart/bar-chart/chart-30.md) (`get_block("chart-30")`)
- A bare bar plot with no card, heading or trend badge around it: use [Chart](https://web.dev.reui.io/components/chart.md) (`get_component("chart")`)

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

## About Bar Chart blocks

### When to use

- Amounts compared across years, weeks, categories or regions as prisms, patterned bars, pills or lanes
- Activity over time stacked by outcome, such as job runs, audit events, firewall requests or data syncs
- Run durations and error budgets read against a timeout, a warning line or a paging threshold

### When not to use

- A share of a whole where the slices read better around a ring: use the [Pie Chart blocks](https://web.dev.reui.io/blocks/chart/pie-chart.md)
- A capacity or allocation split into colored segments on one meter, with no axis: use the [Stats blocks](https://web.dev.reui.io/blocks/application/stats.md)
- Rows of jobs or deploys, each with its own run history strip: use the [Status Tracker blocks](https://web.dev.reui.io/blocks/chart/status-tracker.md)

### Agent notes

- `Chart` renders with no props and fetches nothing, so every bar, lane and limit is seeded from constants in the block folder

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.
