Charts

Scatter Chart

Plot data points on an X-Y plane to visualize relationships

Scatter charts display individual data points on a two-dimensional plane, useful for showing relationships between variables.

Simple Scatter Chart

A scatter chart with two data series and a size axis.

Usage

Each <Scatter> receives its own data array (unlike other chart types where data is on the chart container):

<ScatterChart>
  <XAxis data-key="x" type="number" />
  <YAxis data-key="y" type="number" />
  <Scatter name="Series A" :data="data01" fill="#8884d8" />
  <Scatter name="Series B" :data="data02" fill="#82ca9d" />
</ScatterChart>

Use <ZAxis> to map a third dimension to dot size:

<ZAxis data-key="z" :range="[60, 400]" />

ScatterChart props

<ScatterChart> takes the chart container props. Its tooltip shows one point at a time.

Scatter props

PropTypeDefaultDescription
dataArraythe chart's dataRows for this series
data-keyrow path or accessor—Field with the value; usually set on the axes instead
fillstringseries paletteDot fill
shape'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye''circle'Dot symbol
lineboolean | objectfalseConnect the dots with a line
line-type'joint' | 'fitting''joint'joint connects the points, fitting draws a linear regression
line-joint-typeCurveType'linear'Curve of a joint line
labelboolean | objectfalseShow a value label on every dot
x-axis-id, y-axis-id, z-axis-idstring | number0Axes this series uses
namestring | number—Name in the legend and tooltip
legend-typeLegendType'circle'Legend icon
tooltip-type'none'—Set 'none' to leave the series out of the tooltip
hidebooleanfalseHide the series
classstring—Class on the series layer
is-animation-activebooleanthe chart's valueAnimate this series
transitionChartTransitionthe chart's valueTiming and easing of data changes

Events: @click, @mouseenter, @mouseleave with (point, index, event), and @animation-start, @animation-end.

Scatter slots

SlotPropsDescription
#shapeScatterPointItem & { index, isActive }Replace a dot
default—<Cell> for per-dot colors, <LabelList>, <ErrorBar>

ZAxis props

PropTypeDefaultDescription
z-axis-idstring | number0Unique ID for the Z axis
data-keyrow path or accessor—Field with the Z value
type'number' | 'category''number'Axis data type
range[number, number][64, 64]Min and max dot size
domainAxisDomain—Custom domain for the axis
scalestring | Function'auto'D3 scale type
namestring—Axis name for tooltip display
unitstring—Unit string appended to values
Copyright © 2026