# PictogramRow (/docs/charts/pictogram-row)

●●●○○ — three of five units filled, a count a reader can verify by counting. Filled and hollow differ in shape as well
as opacity, and PictogramRow keeps every unit the same size: the glyph never scales with the value.

```tsx
<span className="text-lg">
  {"The coalition holds "}
  <PictogramRow value={5} total={8} title="Committee seats held" style={{ width: "4.5em", height: "0.9em" }} />
  {" of the seats."}
</span>
```

## Install

```tsx
import { PictogramRow } from "@microcharts/react/pictogram-row";

<PictogramRow value={5} total={8} title="Committee seats held" />
```

Setup (package + stylesheet): [Quickstart](/docs/quickstart#set-up-with-an-ai-agent) or paste [`/agent-setup.md`](/agent-setup.md) into your agent.

## Try it

```tsx
import { PictogramRow } from "@microcharts/react/pictogram-row/interactive";

<PictogramRow
  value={5}
  total={8}
/>
```

## When to use it

Use it for seats, slots, and ratings in a sentence, and for capacity rows in tables. Past 20 units counting fails, and
continuous ratios are not a count: use Progress for both.

## Sizing

**inline in a sentence**

```tsx
holds <PictogramRow value={5} total={8}
  style={{ width: "4.5em", height: "0.8em" }} /> of the seats
```

**star rating via renderPoint**

```tsx
<PictogramRow value={3.5} total={5}
  renderPoint={(u) => <path key={u.index} d={starPath(u)} … />} />
```

## Variants

```tsx
// the partial unit is real data — clipped, not rounded away
<PictogramRow value={2.5} total={4} />
```

```tsx
// seats can't be fractional — declare it
<PictogramRow value={2.5} total={4} fractional="round" />
```

The default clips the partial unit rather than rounding it away, and draws it as a true circular segment instead of a
`clipPath` — generated ids would break server-render determinism. Use `fractional="round"` where a partial unit is
meaningless.

```tsx
<PictogramRow value={3} total={5} shape="square" />
```

## Edge cases

```tsx
<PictogramRow value={3} total={0} title="No capacity" />
```

```tsx
<PictogramRow value={-2} total={4} title="Deficit" />
```

```tsx
<PictogramRow value={9} total={8} title="Over capacity" />
```

A `total` of 0 (or non-finite) draws nothing and the summary is "No data.", since there is no row to count. A negative
value renders every unit hollow, and the summary states the true number ("-2 of 4.") rather than clamping to 0. A value
past the total fills every unit, and never draws more than `total` units, but the summary keeps the true count ("9 of
8.") and dev-warns, so the overflow is never hidden.

## Four homes

**In a sentence**

```tsx
<p>
  The oversight committee holds{" "}
  <span className="mc-inline">
    <PictogramRow value={5} total={8} height={16} summary={false} />
  </span>{" "}
  of its 8 seats — a working majority.
</p>
```

**In a table cell**

```tsx
<td>
  <PictogramRow value={6} total={6} shape="square" />
</td>
```

**In a KPI card**

```tsx
<div className="kpi">
  <span className="figure">14 / 20</span>
  <span className="unit">slots filled</span>
  <PictogramRow value={14} total={20} />
</div>
```

**In a tab header**

```tsx
<button className="tab">
  Aria Desk <PictogramRow value={4} total={5} height={10} />
</button>
```

## Accessibility

The accessible name is the count — **"3 of 5."** — with the context noun coming from your `title` ("Committee seats
held. 3 of 5."). The interactive entry re-announces when the value changes, and roving the units announces each one on
its own: on the 5-of-8 demo at the top of this page, the fourth unit says "Unit 4 of 8 — filled." A unit reads as empty,
filled, or, for a genuinely partial one, the percentage it holds.

The interactive entry follows the shared [interaction contract](/docs/accessibility#one-interaction-contract):
arrow keys rove between units on both axes, `Home` and `End` jump to the ends, and a click, tap, `Enter` or
`Space` selects a unit — pinning its readout so it survives blur, until you select it again, press `Escape`, or
press outside the chart. On touch, a tap pins and a drag scrubs.

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `value` (required) | `number` | Filled units (may be fractional). |
| `total` (required) | `number` | Unit count. |
| `shape` | `"dot" \| "square"` | Squares pack tighter in table cells. |
| `fractional` | `"clip" \| "round"` | Clip shows the true partial unit; round for seat-like units. |
| `renderPoint` | `(unit) => ReactNode` | Custom unit glyph (star ratings) — the one sanctioned customization. |
| `animate` | `boolean` | (interactive) Opt-in entrance motion when the chart mounts client-side — add `import "@microcharts/react/motion"` once. Inert on the server, on hydrated server HTML, and under `prefers-reduced-motion`. |

Plus the shared grammar — `data`, `domain`, `color`, `title`, `summary`, `format` — and the layout props (`width`, `height`, `className`, `style`) that every chart accepts. Interactive entries also share `animate` and `live`, and — wherever a chart has more than one navigable unit — `onActive`, `onSelect`, `selectedIndex` and `defaultSelectedIndex`; and — wherever the chart shows a hover value — `readout`. See [the shared grammar](/docs/quickstart#the-shared-grammar).
