# Social Engagement block

> Social engagement line chart comparing channels by metric with a per-channel breakdown table

Facebook, Instagram and LinkedIn lines over 24 hours to 12 months, switchable between engagement rate, engagements, impressions and link clicks, a format filter, previous-period ghosts and a per-channel table. ReUI Frame, Badge. Social analytics.

- Type: Pro block
- Category: [Line Chart](https://web.dev.reui.io/blocks/chart/line-chart.md)
- Page: https://web.dev.reui.io/blocks/chart/line-chart/chart-23
- MCP: `get_block("chart-23")`
- Built with: Badge, Button, Button Group, Chart, Dropdown Menu, Empty, Frame, Progress, Select, Separator, Skeleton, Spinner, Table, Toggle, Toggle Group, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Social channels compared as lines on one metric at a time, with previous-period ghosts and a per-channel totals table

## Agent notes

- Replace `spanTallies` in social-view.ts with your hourly or daily ledger; `rowsOf` and `summariesOf` bucket it for the plot, table and exports
- A new channel needs a key in `CHANNELS`, a `chartConfig` entry and its classes in `SERIES_TONE`, `BAR_TONE` and `SPOTLIGHT`
- `refresh` only waits `REFRESH_MS` and bumps `revision`, which redraws the lines and the `updated` stamp; wire it to refetch your analytics

## When not to use

- One metric's trend with KPI tiles switching what the plot shows: use [Metric Switcher](https://web.dev.reui.io/blocks/chart/line-chart/chart-6.md) (`get_block("chart-6")`)
- Revenue split into streams against a dashed baseline: use [Revenue Trend](https://web.dev.reui.io/blocks/chart/line-chart/chart-22.md) (`get_block("chart-22")`)

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

## 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://web.dev.reui.io/blocks/chart/area-chart.md)
- Compact tiles where each figure carries a small trend of its own: use the [Sparkline blocks](https://web.dev.reui.io/blocks/chart/sparkline.md)

### Agent notes

- Series colors live in the `ChartContainer` config; chart-6 and chart-26 plot in a `ComposedChart` with an `Area`, the others in a `LineChart`

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.
