Installation
Theme
Mode

Data viz

Scatter & bubble

For correlation — how two measures relate across many items. Each dot is a record placed by its x and y; a third dimension can size it into a bubble. Same SVG foundation and theme as the family: shared series palette, a dark per-point tooltip, and an optional quadrant overlay for prioritization.

$npx shadcn@latest add @orbit/scatter-chart

Overview

Correlated points, colored by series. Hover a point for its exact values.

Effort vs. impact — 13 initiatives
Effort vs. impact
13 initiatives · hover a point
3 teams
EngineeringDesignGrowth

Variants

Plain scatter plots two measures as equal dots. Bubble adds a third — point area encodes a z value like team size or cost. A single variant prop switches between them.

scatter — two measures, equal dots
bubble — point area encodes a third value

Quadrants

Turn showQuadrants on to split the plane with reference lines and shade the corners — low-effort/high-impact “quick wins” against high-effort/low-impact “money pits.” The classic effort–impact matrix.

EngineeringDesignGrowth

In context

A planning card — the scatter paired with the takeaways it surfaces.

Backlog triage
Effort vs. impact across 13 initiatives
Quick wins
4do first
Highest impact
API v29/10
Money pits
2defer

Props

PropTypeDefaultDescription
variant"scatter" | "bubble""scatter"scatter plots equal dots; bubble sizes each point's area by its z value.
series{ name: string; points: { name: string; x: number; y: number; z?: number }[]; color?: string }[]The point series. Colors default to the fixed CHART_SERIES palette by position.
accentstring"var(--pri)"Mark color when exactly one series is plotted (any token or color-mix).
heightnumber320Total height in px, legend row included. Width is responsive.
showGridbooleantrueHairline gridlines at every x and y tick.
showLegendbooleantrueTop-right dot legend. Never rendered for one series.
showQuadrantsbooleanfalseDashed reference lines at the quadrant split with shaded, labeled corners.
xLabel / yLabelstringAxis titles with units, e.g. “Effort (story points) →”.
xName / yName / zNamestring"X" / "Y" / "Size"Measure names for the tooltip rows.
xDomain / yDomain[number, number]Fixed axis ranges (5 even ticks). Default: nice ticks over the data from zero.
quadrantX / quadrantYnumberdomain midpointsWhere the quadrant guides split each axis.
quadrantLabels{ topLeft?: string; bottomRight?: string }"QUICK WINS" / "MONEY PITS"Corner tags for the quadrant overlay.
bubbleRange[number, number][60, 620]Bubble area range in px² that the z extent maps onto.
formatX / formatY / formatZ(v: number) => stringStringFormats the tooltip values.
ariaLabelstringPlain-language summary for the chart's role=“img”.
…restHTMLAttributes<HTMLDivElement>Forwarded to the root div, including ref and className.

Usage

Scatter plots reveal correlation and outliers across many records. Reach for them when the relationship between two measures matters more than any single value.

Do

Use it for correlation

Scatter is the right tool when you want to show how two measures move together across many items.

Don’t

Plot only a handful of points

With five or six records a labeled bar or table reads clearer — scatter earns its keep with density.

Do

Add quadrants to prioritize

Reference lines turn a cloud into a decision: quick wins, big bets, fill-ins, money pits.

Don’t

Overload the bubble dimension

Area is hard to judge precisely — use z for rough magnitude, not values that must be compared exactly.

Keyboard & accessibility

The chart renders as a labelled image with every point's data on hover; series identity never rides on color alone.

roleimg with aria-label summary
LegendSeries names beyond color
TooltipName, x, y & z per point
AxesLabeled with units