ScatterChart
Dots on two numeric axes. Page-weight timings below are honest sample data, rendered as a static SVG with no scripts.
Page weight vs load time
<ScatterChart points={weight} xLabel="Bundle size (KB)" yLabel="Load time (ms)" />Custom size
Pass width and height to resize the viewBox.
<ScatterChart label="API timings" points={api} xLabel="Payload (KB)" yLabel="P99 (ms)" width={560} height={280} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
points | Array<{ x: number; y: number; label?: string }> | - | Dots in document order. |
width | number | 560 | viewBox width; the SVG scales to 100%. |
height | number | 320 | viewBox height. |
xLabel | string | "x" | Horizontal axis name; used in the auto-summary. |
yLabel | string | "y" | Vertical axis name; used in the auto-summary. |
label | string | "Scatter chart" | Chart name; opens the auto-summary. |
class | string | - | Style passthrough. |
Static honesty
Static SVG, no scripts. Axis domains come from the data extent (floored minimum to ceiled maximum) expanded through niceTicks with a count of 5, so the printed range may extend past the outer dots. Points without a label fall back to an"x, y" coordinate title.
Accessibility
- The chart is an image (
role="img") with an auto-summary label:"{Label}, {n} points, x {xLabel} {xmin} to {xmax}, y {yLabel} {ymin} to {ymax}". - A
<title>repeats the summary and a<desc>names both axes. - Every dot carries a
<title>with its label or coordinates; axis ticks and names exist as text.