Scatter Chart plots individual data points on an X/Y axis to reveal correlations and distribution patterns.
Loading demo: scatter-chart-real-world
npx sdaia-ui@latest add scatter
import { Scatter } from '@/components/ui/Scatter';<Scatter type="linear" />Scatter chart with a linear data distribution.
Loading demo: scatter-linear
Scatter chart following a sinusoidal data pattern.
Loading demo: scatter-chart-sin
Scatter chart with a square/grid data distribution.
Loading demo: scatter-square
Props for the Scatter component.
Prop | Type | Default | Required |
|---|---|---|---|
type | 'Linear' | 'Sin' | 'No Trend' | 'Square' | 'Linear' | optional |
title | string | — | optional |
points | ScatterPoint[] | — | optional |
yTicks | string[] | — | optional |
xTicks | string[] | — | optional |
xMin | number | derived from preset | optional |
xMax | number | derived from preset | optional |
yMin | number | derived from preset | optional |
yMax | number | derived from preset | optional |
rtl | boolean | false | optional |
labels | Partial<ScatterChartLabels> | English strings | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Fills the width of its container; the plot area is at least 240px tall and scales with the width. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Same; the plot gets narrower. Axis labels stay on one line, so keep them short on phones. |