# QuadrantDot (/docs/charts/quadrant-dot)

QuadrantDot places a focal dot by its 2-D position, marks the split with a hairline cross, and draws the peers as tiny
muted ghosts. The split defaults to the domain midpoints and takes an override, but it is never hidden: it renders
wherever the split truly is. The first read is which quadrant the item sits in against the field; exact position is the
second read, which is what keeps the chart legible at 24×24. At that size the axes carry no labels, so pass `xLabel`,
`yLabel`, and a `title` — the accessible name is doing the naming.

```tsx
<QuadrantDot
  data={{ x: 3, y: 9 }}
  field={[
    { x: 2, y: 8 },
    { x: 8, y: 9 },
    { x: 3, y: 7 },
    { x: 9, y: 2 },
    { x: 7, y: 3 },
    { x: 1, y: 1 },
    { x: 5, y: 6 },
    { x: 6, y: 8 },
    { x: 4, y: 3 },
    { x: 8, y: 5 },
    { x: 2, y: 4 },
    { x: 7, y: 7 },
    { x: 3, y: 2 },
    { x: 6, y: 1 },
  ]}
  xDomain={[0, 10]}
  domain={[0, 10]}
  xLabel="effort"
  yLabel="impact"
  title="Effort vs impact"
  width={96}
  height={96}
/>
```

## Install

```tsx
import { QuadrantDot } from "@microcharts/react/quadrant-dot";

<QuadrantDot data={item} field={backlog} xLabel="effort" yLabel="impact" title="Effort vs impact" />
```

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 { QuadrantDot } from "@microcharts/react/quadrant-dot/interactive";

<QuadrantDot
  data={item}
  field={backlog}
  split={[5, 5]}
  xLabel="effort" yLabel="impact"
/>
```

## When to use it

Use it for the classic prioritization 2×2 (one cell per initiative in a table), an effort-vs-impact read in a KPI card,
and any "which quadrant, against the field" decision. For a full scatter plot use MicroScatter; for a single ranked list
use MiniBar.

## Sizing

**lone glyph (no field)**

```tsx
<QuadrantDot data={item} xLabel="effort" yLabel="impact" />
```

**named quadrants**

```tsx
<QuadrantDot data={item} field={backlog} quadrants={["quick win", "big bet", "skip", "time sink"]} />
```

## Variants

```tsx
<QuadrantDot data={item} xLabel="effort" yLabel="impact" />
<QuadrantDot data={item} field={backlog} quadrants={["quick win", "big bet", "skip", "time sink"]} />
```

## Edge cases

```tsx
<QuadrantDot
  data={{ x: 5, y: 5 }}
  field={[{ x: 1, y: 5 }, { x: 8, y: 5 }]}
/>
```

```tsx
<QuadrantDot data={{ x: 5, y: 5 }} field={[{ x: 5, y: 5 }, { x: 1, y: 1 }]} />
```

```tsx
<QuadrantDot data={{ x: NaN, y: 5 }} title="Bad input" />
```

When every field value on one axis equals the focal's, that axis's domain collapses to a point. The split line on that
axis is dropped rather than drawn at an arbitrary spot, while the other axis's split still renders. A peer exactly on
top of the focal is still counted (distance 0) and sorts first in the interactive entry's nearest-first order. A
non-finite focal position draws no marks at all: no cross, no tint, no peers. It carries the "No data." summary, the
same degenerate path an empty series takes elsewhere in the library.

## Four homes

**In a sentence**

```tsx
<p>
  Effort vs impact{" "}
  <span className="mc-inline">
    <QuadrantDot data={item} field={backlog} summary={false} />
  </span>{" "}
  — one high-impact, low-effort outlier.
</p>
```

**In a table cell**

```tsx
<td>
  <QuadrantDot data={item} field={backlog} />
</td>
```

**In a KPI card**

```tsx
<div className="kpi">
  <span className="figure">1</span>
  <span className="unit">initiative flagged</span>
  <QuadrantDot data={item} field={backlog} />
</div>
```

**In a tab header**

```tsx
<button className="tab">
  Auth <QuadrantDot data={item} field={backlog} />
</button>
```

Best at KPI/card scale — quadrants need a near-square seat.

## Accessibility

The accessible name states the focal position and the axis-relative quadrant: **"Impact 9, effort 3 — in the
high-impact, low-effort quadrant."** With a `field` it adds how crowded that quadrant is, and
`quadrants={["quick win", …]}` replaces the generated quadrant names with your own. The interactive entry starts on the
focal, then cycles the peers nearest-first, announcing each one's coordinates and quadrant.

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 |
| --- | --- | --- |
| `data` (required) | `{ x; y }` | The focal item's 2-D position. |
| `field` | `{ x; y }[]` | The peer set — omit for a lone glyph. |
| `xDomain` | `[number, number]` | The x-axis range (default: derived from the data); domain stays the y-axis. |
| `domain` | `[number, number]` | The y-axis range (default: derived from the data). |
| `split` | `[number, number]` | The quadrant boundary (default domain midpoints) — never hidden. |
| `quadrants` | `[TL, TR, BL, BR]` | Names in reading order — summaries only, never rendered. |
| `xLabel / yLabel` | `string` | Axis nouns for the summary — pass them, the axes are unlabeled at glyph size. |
| `region` | `boolean` | Faint tint on the focal's quadrant (default true; false for dense grids). |
| `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).
