/

Scatter Chart

Plot individual data points on two axes. Reveal correlations, clusters, and outliers in your data.

Usage

example.tsx
import { ScatterChart } from "@chartts/react"

<ScatterChart
  data={measurements}
  x="height"
  y="weight"
  size="age"
  color="group"
/>

Props

PropTypeDescription
dataT[]Array of data objects
xkeyof TKey for x-axis values
ykeyof TKey for y-axis values
sizekeyof T | numberPoint size - fixed number or data key
colorkeyof T | stringPoint color - fixed or data key for color scale
shape'circle' | 'square' | 'triangle' | 'diamond'Point shape. Default: 'circle'

Features

  • Multiple data series with legend
  • Size encoding (bubble-like)
  • Color encoding with scales
  • Trend line / regression line
  • Zoom and pan
  • Point selection and brushing

Other Charts