Back to dashboards
ComponentChartFree

Scatter Plot React component

A scatter plot for spotting relationships: coloured groups of points that pop in on scroll, a least-squares trend line with its slope and R², legend toggles, and a nearest-point tooltip with guide lines and value pills on both axes.

About the Scatter Plot component

Scatter Plot puts every item on two measures at once, so you can see whether they move together, where the clusters are and which items are outliers. Points are coloured by group, and a trend line with its slope and R² tells you how strong the relationship is.

Hover, tap or use the arrow keys to read a point: guide lines run to both axes with value pills, and a tooltip names it. Click the legend to hide a group; the trend line refits to what's left.

When to use it

Use it for campaigns (spend vs results), products (price vs rating), accounts (seats vs usage), experiments, or any time the question is 'does more of this mean more of that?'.

For a third measure, use a bubble chart; for change over time, a line chart reads better.

Installation

Add the Scatter Plot component to your project with the shadcn CLI. It lands in components/scatter-plot.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/scatter-plot

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

More Chart components

Bubble Chart
Free
Combo Chart
Free
Candlestick Chart
Free
Stacked Area Chart
Free
Funnel Chart
Free
Pie Chart
Free