Bubble Chart
ProScatter and bubble charts for the relation between two or three values: scatter, bubbles, dot plot, dot matrix, regression, quadrants, beeswarm and a connected scatter.
Playground Bubble Charts
Account health
| name | Monthly active users | Health score | Size | Group |
|---|---|---|---|---|
| Account 1 | 109 | 53 | 74 | Enterprise |
| Account 2 | 19 | 41 | 5 | Mid-market |
| Account 3 | 74 | 53 | 33 | Startup |
| Account 4 | 114 | 84 | 80 | Enterprise |
| Account 5 | 84 | 53 | 12 | Mid-market |
| Account 6 | 80 | 69 | 23 | Startup |
| Account 7 | 80 | 55 | 97 | Enterprise |
| Account 8 | 96 | 54 | 31 | Mid-market |
| Account 9 | 51 | 35 | 6 | Startup |
| Account 10 | 131 | 70 | 11 | Enterprise |
| Account 11 | 34 | 28 | 24 | Mid-market |
| Account 12 | 69 | 53 | 18 | Startup |
| Account 13 | 100 | 57 | 99 | Enterprise |
| Account 14 | 54 | 38 | 32 | Mid-market |
| Account 15 | 25 | 44 | 19 | Startup |
| Account 16 | 124 | 62 | 111 | Enterprise |
| Account 17 | 25 | 34 | 30 | Mid-market |
| Account 18 | 82 | 39 | 21 | Startup |
| Account 19 | 99 | 45 | 82 | Enterprise |
| Account 20 | 32 | 42 | 26 | Mid-market |
| Account 21 | 44 | 48 | 21 | Startup |
| Account 22 | 60 | 37 | 53 | Enterprise |
| Account 23 | 69 | 68 | 8 | Mid-market |
| Account 24 | 39 | 52 | 12 | Startup |
| Account 25 | 116 | 73 | 23 | Enterprise |
| Account 26 | 81 | 63 | 9 | Mid-market |
| Account 27 | 58 | 68 | 23 | Startup |
| Account 28 | 94 | 58 | 96 | Enterprise |
| Account 29 | 54 | 64 | 5 | Mid-market |
| Account 30 | 53 | 46 | 8 | Startup |
| Account 31 | 118 | 87 | 18 | Enterprise |
| Account 32 | 32 | 33 | 8 | Mid-market |
| Account 33 | 73 | 36 | 16 | Startup |
| Account 34 | 73 | 41 | 56 | Enterprise |
| Account 35 | 54 | 33 | 15 | Mid-market |
| Account 36 | 30 | 48 | 29 | Startup |
| Account 37 | 60 | 44 | 40 | Enterprise |
| Account 38 | 30 | 45 | 23 | Mid-market |
| Account 39 | 35 | 42 | 16 | Startup |
| Account 40 | 92 | 48 | 44 | Enterprise |
| Account 41 | 38 | 30 | 18 | Mid-market |
| Account 42 | 32 | 55 | 24 | Startup |
Playground Rows of dots
Feature adoption
| name | 2026 | 2025 |
|---|---|---|
| Search | 82% | 70% |
| Dashboards | 74% | 58% |
| Exports | 61% | 55% |
| Alerts | 48% | 31% |
| API | 39% | 33% |
| Teams | 27% | 14% |
Installation
Bubble Chart comes with WunderUI Core and Pro, in the package from your plan. See the plans.
The charts live in their own entry point: import the chart, its card and its hooks from @wunderui/react/charts, not from @wunderui/react.
Then import what you need:
import {
BubbleChart,
BubbleChartProps,
BubbleChartVariant,
} from "@wunderui/react/charts"Then use it:
import { BubbleChart } from "@wunderui/react/charts"
const data = [
{ name: "Account 1", usage: 22, health: 78, seats: 40 },
{ name: "Account 2", usage: 72, health: 92, seats: 120 },
{ name: "Account 3", usage: 124, health: 62, seats: 200 },
]
export function AccountHealth() {
return <BubbleChart variant="bubble" data={data} index="name" x="usage" y="health" size="seats" label="Account health" />
}Expected result: You should see three bubbles, the biggest at the lowest health, with usage on the horizontal axis.
When to use
Use Bubble Chart for
- How two measures relate across many points (usage against health)
- A third value as the size of the bubble
- Groups told apart by colour, with a regression line or four quadrants
- A dot plot or dot matrix per category, a beeswarm, or a path through time
Use something else for
- Line Chart for a measure over ordered time
- Heatmap for a value for every pair of two categories
- Distribution Chart for how one measure spreads
- Bar Chart for values per category
States
Loading, empty and error keep the chart's size, so the card never jumps. Add a retry handler and the error state offers a Try again button.
Account health
| name | Monthly active users | Health score | Size | Group |
|---|---|---|---|---|
| Account 1 | 109 | 53 | 74 | Enterprise |
| Account 2 | 19 | 41 | 5 | Mid-market |
| Account 3 | 74 | 53 | 33 | Startup |
| Account 4 | 114 | 84 | 80 | Enterprise |
| Account 5 | 84 | 53 | 12 | Mid-market |
| Account 6 | 80 | 69 | 23 | Startup |
| Account 7 | 80 | 55 | 97 | Enterprise |
| Account 8 | 96 | 54 | 31 | Mid-market |
| Account 9 | 51 | 35 | 6 | Startup |
| Account 10 | 131 | 70 | 11 | Enterprise |
| Account 11 | 34 | 28 | 24 | Mid-market |
| Account 12 | 69 | 53 | 18 | Startup |
| Account 13 | 100 | 57 | 99 | Enterprise |
| Account 14 | 54 | 38 | 32 | Mid-market |
| Account 15 | 25 | 44 | 19 | Startup |
| Account 16 | 124 | 62 | 111 | Enterprise |
| Account 17 | 25 | 34 | 30 | Mid-market |
| Account 18 | 82 | 39 | 21 | Startup |
| Account 19 | 99 | 45 | 82 | Enterprise |
| Account 20 | 32 | 42 | 26 | Mid-market |
| Account 21 | 44 | 48 | 21 | Startup |
| Account 22 | 60 | 37 | 53 | Enterprise |
| Account 23 | 69 | 68 | 8 | Mid-market |
| Account 24 | 39 | 52 | 12 | Startup |
| Account 25 | 116 | 73 | 23 | Enterprise |
| Account 26 | 81 | 63 | 9 | Mid-market |
| Account 27 | 58 | 68 | 23 | Startup |
| Account 28 | 94 | 58 | 96 | Enterprise |
| Account 29 | 54 | 64 | 5 | Mid-market |
| Account 30 | 53 | 46 | 8 | Startup |
| Account 31 | 118 | 87 | 18 | Enterprise |
| Account 32 | 32 | 33 | 8 | Mid-market |
| Account 33 | 73 | 36 | 16 | Startup |
| Account 34 | 73 | 41 | 56 | Enterprise |
| Account 35 | 54 | 33 | 15 | Mid-market |
| Account 36 | 30 | 48 | 29 | Startup |
| Account 37 | 60 | 44 | 40 | Enterprise |
| Account 38 | 30 | 45 | 23 | Mid-market |
| Account 39 | 35 | 42 | 16 | Startup |
| Account 40 | 92 | 48 | 44 | Enterprise |
| Account 41 | 38 | 30 | 18 | Mid-market |
| Account 42 | 32 | 55 | 24 | Startup |
Hover and trend line
Hover a point and the others step back to the dimmed level; the crosshair, a ring around the point and the value pills on both axes glide to it, and the ring grows or shrinks to the point's size. The regression variant adds the least-squares line, dashed and wiped in after the points, clipped to the plot at both ends so its slope stays true, with R² in the corner.
Account health
| name | Monthly active users | Health score | Group |
|---|---|---|---|
| Account 1 | 22 | 78 | Enterprise |
| Account 2 | 72 | 92 | Enterprise |
| Account 3 | 124 | 62 | Enterprise |
| Account 4 | 172 | 86 | Enterprise |
| Account 5 | 34 | 42 | Mid-market |
| Account 6 | 88 | 68 | Mid-market |
| Account 7 | 138 | 38 | Mid-market |
| Account 8 | 166 | 58 | Mid-market |
| Account 9 | 52 | 22 | Startup |
| Account 10 | 104 | 30 | Startup |
| Account 11 | 148 | 80 | Startup |
Keyboard interactions
The plot is focusable: arrow keys walk the points in data order and the live region reads each with its axis names, like WunderUI: Revenue $1,200, Margin 24%. Set axis labels so the names are spoken.
- TaborShift+Tab
- Moves focus to the plot and away from it. The plot is one tab stop; so is every legend badge.
- ArrowRightorArrowLeft
- Moves to the next or previous point. The tooltip follows, and a live region announces the one you are on. The first press starts at the first one (Left: the last one).
- HomeorEnd
- Jumps to the first or last point.
- Escape
- Clears the active point.
- EnterorSpace
- On a legend badge of a ChartCard: switches its series off or on. The last visible series stays on.
Behavior and motion
What the chart does on its own and what the page decides.
- Fields
- The x and y fields name the plotted values, a size field sets the bubble size, and a group field puts a point into a group. Groups are listed in legend order with their colours.
- Axes
- Value axes start at 0 when every value is positive (you can change that), with titles from the axis labels. Beeswarm and dot plot use one axis and put groups in rows.
- Variants
- The regression variant draws a fitted line, the quadrant variant four quadrants split at a point you choose, and the connected variant a path through the points in data order.
- Legend
- Groups switched off in the legend fade, so the points that remain keep their positions.
- Loading, empty and error
- The chart keeps its size while it loads, is empty or fails, so the card never jumps. Loading shows a skeleton; error adds a Try again button when a retry handler is set.
- Legend
- A ChartCard shows series as badges. With two or more series each badge switches its series off, the last visible one stays on, and a legend of roles can be made static.
- Size
- The chart fills its container's width; you set the plot height. Text never scales: labels keep their size at every width.
Motion
The enter sequence and the hover follow the motion tokens of the library.
- Pop in
- Points pop in from their centre the first time the chart is in view, and again after loading or when new data arrives. You can turn the animation off.
- Reduced motion
- With reduced motion on, the enter sequence is off and the chart appears at once. Tooltip, crosshair and every state still work.
Anatomy
BubbleChart is the scatter family: scatter, bubbles sized by a third value, dot plot, dot matrix, regression, quadrant, beeswarm and connected scatter. It shows how two measures relate.
Account health
| name | Monthly active users | Health score | Size | Group |
|---|---|---|---|---|
| Account 1 | 22 | 78 | 40 | Enterprise |
| Account 2 | 72 | 92 | 120 | Enterprise |
| Account 3 | 124 | 62 | 200 | Enterprise |
| Account 4 | 172 | 86 | 80 | Enterprise |
| Account 5 | 34 | 42 | 30 | Mid-market |
| Account 6 | 88 | 68 | 60 | Mid-market |
| Account 7 | 138 | 38 | 45 | Mid-market |
| Account 8 | 166 | 58 | 35 | Mid-market |
| Account 9 | 52 | 22 | 20 | Startup |
| Account 10 | 104 | 30 | 25 | Startup |
| Account 11 | 148 | 80 | 18 | Startup |
- 1
Takes data with x, y and a size per bubble. Groups colour the points and fill the legend, axis labels and formatters name and format the axes, and the quadrant variant sets its own dividers.
- 2data-slot="chart-plot"
The focusable region. Arrow keys walk its marks and the live region reads each one the way the tooltip shows it.
- 3data-slot="chart-marks"
Points that pop in from their centre on the dashed grid of the cartesian charts. The regression line (dashed, wiped in after the points, clipped to the plot with its slope kept), quadrant dividers and the connecting path are drawn behind or over them; groups switched off in the legend go to --chart-hidden. On hover the other points dim, a ring glides to the point and the crosshair and value pills on both axes follow it.
Value axes that start at 0 when every value is positive (you can change that), with axis titles. Beeswarm and dot plot use one axis and put the groups in rows.
- 4data-slot="chart-tooltip"Optional
The point label with its x, y and, on bubble charts, its size, using the axis titles as row labels.
- data-slot="chart-message"Optional
A loose cloud of muted dots on the scatter variants, muted rows on the dot plot and dot matrix.
A table of every point for screen readers.
- data-slot="chart-active"Optional
- data-slot="chart-regression"Optional
- data-slot="chart-crosshair"
- data-slot="chart-axis-y"
- data-slot="chart-axis-x"
- data-slot="chart-axis-pill"
Best practices
- Do
Name both axes with axis labels. A scatter without titles cannot be read, and the tooltip uses them for its rows.
- Do
Add the regression variant only when a relationship is the claim, and say what the line shows in the card description.
- Do
Keep bubble sizes comparable: size encodes area, so a value that varies by a factor of ten needs a visible scale or the label.
- Don’t
Don't draw thousands of points in a beeswarm or dot matrix; both are for counts you can read. Aggregate first.
- Don’t
Don't colour more than five groups. Keep to the palette and use the legend; the points are small and similar hues merge.
API reference
One table for BubbleChart. It is a plain component, so the table lists every prop; the ChartCard around it takes its own props, and the chart works without one.
Takes data with x, y and a size per bubble. Groups colour the points and fill the legend, axis labels and formatters name and format the axes, and the quadrant variant sets its own dividers.
| Prop | Type | Default | Description |
|---|---|---|---|
| data required | readonly ChartDatum[] | — | One object per slice / ring / axis. |
| index required | string | — | Field holding the label. |
| x | string | "x" | Field of the horizontal value. Default "x". |
| y | string | "y" | Field of the vertical value (scatter variants). Default "y". |
| size | string | — | : field of the bubble size. |
| group | string | — | Field that puts a point into a group (colour, legend, beeswarm rows). |
| groups | readonly BubbleGroup[] | — | Groups in legend order with their colours (default: in data order, palette colours). |
| variant | "scatter" | "bubble" | "dot-plot" | "dot-matrix" | "scatter-with-regression" | "quadrant-scatter" | "beeswarm" | "connected-scatter" | "scatter" | Figma variant. Default . |
| xLabel | string | — | Axis titles (also the tooltip labels). |
| yLabel | string | — | |
| quadrant | { x?: number; y?: number; labels?: readonly [string, string, string, string] } | — | : where the dividers cross (default: the means) and the corner labels (top left, top right, bottom left, bottom right). |
| valueFormatter | ChartValueFormatter | — | |
| label | string | — | Accessible name, e.g. the card title. |
| height | number | 434 | Height of the plot frame in px. Default 280 (Figma small card plot). |
| state | "ready" | "loading" | "empty" | "error" | — | |
| activeIndex | number | null | — | The active point (hovered or focused) as an index into , to control it yourself. shows none. |
| animate | boolean | — | |
| animationKey | string | number | — | |
| defaultActiveIndex | number | null | — | The point that is active at first, for an uncontrolled chart. It shows the tooltip without a pointer. |
| description | string | — | |
| emptyDescription | string | — | Text under the title in the empty state. |
| emptyTitle | string | — | Title of the message in the empty state. |
| errorDescription | string | — | Text under the title in the error state. |
| errorTitle | string | — | Title of the message in the error state. |
| hiddenSeries | readonly string[] | — | Labels of rows switched off in the legend: drawn faded. |
| includeZero | boolean | — | Start the value axes at 0 (default true when all values are positive, as on the bar charts). |
| onActiveIndexChange | (index) => void | — | Called with the index when the pointer or the arrow keys move to another point, and with when they leave. Use it to show the hovered value in a headline. |
| onRetry | () => void | — | Shows a Try again button in the error state and calls this when it is pressed. |
| series | readonly ChartSeries[] | [] | : one dot per series and row; : the first series is counted in dots. |
| tooltip | boolean | — | |
| unit | number | — | : value of one dot. Default: so the largest row has 40 dots. |
| width | number | — | |
| xFormatter | ChartValueFormatter | — |
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
get_component("bubble-chart")The full library index for assistants is at /llms.txt.
Related components
Sessions by weekday and hour, 7 rows × 24 columns, values from 0 to 87. Sessions by weekday and hour, data table Row · column Value Mon · 0:00 6 Mon · 1:00 2 Mon · 2:00 8 Mon · 3:00 4 Mon · 4:00 4 Mon · 5:00 6 Mon · 6:00 10 Mon · 7:00 20 Mon · 8:00 27 Mon · 9:00 43 Mon · 10:00 50 Mon · 11:00 66 Mon · 12:00 78 Mon · 13:00 80 Mon · 14:00 87 Mon · 15:00 82 Mon · 16:00 72 Mon · 17:00 66 Mon · 18:00 48 Mon · 19:00 35 Mon · 20:00 32 Mon · 21:00 16 Mon · 22:00 16 Mon · 23:00 11 Tue · 0:00 4 Tue · 1:00 1 Tue · 2:00 6 Tue · 3:00 4 Tue · 4:00 10 Tue · 5:00 12 Tue · 6:00 14 Tue · 7:00 16 Tue · 8:00 27 Tue · 9:00 39 Tue · 10:00 50 Tue · 11:00 67 Tue · 12:00 75 Tue · 13:00 83 Tue · 14:00 82 Tue · 15:00 85 Tue · 16:00 72 Tue · 17:00 64 Tue · 18:00 55 Tue · 19:00 42 Tue · 20:00 33 Tue · 21:00 18 Tue · 22:00 15 Tue · 23:00 11 Wed · 0:00 7 Wed · 1:00 5 Wed · 2:00 8 Wed · 3:00 7 Wed · 4:00 10 Wed · 5:00 11 Wed · 6:00 11 Wed · 7:00 22 Wed · 8:00 31 Wed · 9:00 39 Wed · 10:00 52 Wed · 11:00 61 Wed · 12:00 74 Wed · 13:00 78 Wed · 14:00 87 Wed · 15:00 81 Wed · 16:00 75 Wed · 17:00 63 Wed · 18:00 54 Wed · 19:00 40 Wed · 20:00 25 Wed · 21:00 24 Wed · 22:00 12 Wed · 23:00 8 Thu · 0:00 6 Thu · 1:00 1 Thu · 2:00 3 Thu · 3:00 4 Thu · 4:00 3 Thu · 5:00 14 Thu · 6:00 18 Thu · 7:00 20 Thu · 8:00 30 Thu · 9:00 41 Thu · 10:00 51 Thu · 11:00 62 Thu · 12:00 72 Thu · 13:00 85 Thu · 14:00 86 Thu · 15:00 83 Thu · 16:00 78 Thu · 17:00 68 Thu · 18:00 48 Thu · 19:00 35 Thu · 20:00 32 Thu · 21:00 16 Thu · 22:00 15 Thu · 23:00 13 Fri · 0:00 6 Fri · 1:00 2 Fri · 2:00 5 Fri · 3:00 4 Fri · 4:00 5 Fri · 5:00 8 Fri · 6:00 16 Fri · 7:00 19 Fri · 8:00 29 Fri · 9:00 41 Fri · 10:00 51 Fri · 11:00 61 Fri · 12:00 77 Fri · 13:00 82 Fri · 14:00 82 Fri · 15:00 80 Fri · 16:00 71 Fri · 17:00 66 Fri · 18:00 52 Fri · 19:00 38 Fri · 20:00 28 Fri · 21:00 17 Fri · 22:00 12 Fri · 23:00 11 Sat · 0:00 0 Sat · 1:00 7 Sat · 2:00 5 Sat · 3:00 9 Sat · 4:00 7 Sat · 5:00 9 Sat · 6:00 7 Sat · 7:00 9 Sat · 8:00 12 Sat · 9:00 16 Sat · 10:00 24 Sat · 11:00 27 Sat · 12:00 37 Sat · 13:00 31 Sat · 14:00 34 Sat · 15:00 38 Sat · 16:00 31 Sat · 17:00 30 Sat · 18:00 24 Sat · 19:00 22 Sat · 20:00 15 Sat · 21:00 8 Sat · 22:00 13 Sat · 23:00 4 Sun · 0:00 7 Sun · 1:00 5 Sun · 2:00 4 Sun · 3:00 3 Sun · 4:00 6 Sun · 5:00 6 Sun · 6:00 12 Sun · 7:00 13 Sun · 8:00 15 Sun · 9:00 20 Sun · 10:00 25 Sun · 11:00 27 Sun · 12:00 34 Sun · 13:00 39 Sun · 14:00 37 Sun · 15:00 32 Sun · 16:00 31 Sun · 17:00 26 Sun · 18:00 27 Sun · 19:00 17 Sun · 20:00 18 Sun · 21:00 11 Sun · 22:00 8 Sun · 23:00 10 Charts6 stylesProHeatmapHeatmap for values across two dimensions: a weekday × hour matrix, a contribution calendar, a punch card, labelled cells and a correlation matrix.Distribution chart, 3 points from API to Edge. Median from 136 ms to 74 ms, lowest 74 ms, highest 196 ms. Response time, data table group Median API 136 ms Web 196 ms Edge 74 ms Charts10 stylesProDistribution ChartDistribution chart for raw observations: histograms, box plot, violin, density, ridgeline, strip plot and error bars.Line chart, 12 points from Jan to Dec. Revenue from $32.0k to $58.0k, lowest $32.0k, highest $58.0k; Expenses from $18.0k to $35.0k, lowest $18.0k, highest $38.0k. Revenue and expenses, data table month Revenue Expenses Jan $32.0k $18.0k Feb $41.0k $22.0k Mar $38.0k $27.0k Apr $47.0k $24.0k May $44.0k $30.0k Jun $52.0k $28.0k Jul $49.0k $34.0k Aug $55.0k $31.0k Sep $51.0k $36.0k Oct $46.0k $33.0k Nov $53.0k $38.0k Dec $58.0k $35.0k Charts27 stylesProLine ChartLine chart for trends over time: smooth lines (straight on request) and stepped lines, comparisons, bands, forecasts and thresholds, with tooltip, keyboard navigation and a data table.Revenue by product line: 12 parts, total $1.8M. Largest: Enterprise $410k, Core $340k, Pro $260k. Revenue by product line, data table label Path Value Share Core Software › Core $340k 18.4% Pro Software › Pro $260k 14.1% Enterprise Software › Enterprise $410k 22.2% Add-ons Software › Add-ons $90k 4.9% Onboarding Services › Onboarding $120k 6.5% Training Services › Training $80k 4.3% Support Services › Support $150k 8.1% Devices Hardware › Devices $180k 9.8% Accessories Hardware › Accessories $60k 3.3% Templates Marketplace › Templates $70k 3.8% Plugins Marketplace › Plugins $55k 3% Themes Marketplace › Themes $30k 1.6% Charts5 stylesProTreemapTreemap for the parts of a hierarchy: squarified, nested with group headers, or as an icicle.