/

Bubble Chart

Extend scatter plots with a third dimension encoded as bubble size. Compare three variables simultaneously.

Usage

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

<BubbleChart
  data={countries}
  x="gdpPerCapita"
  y="lifeExpectancy"
  size="population"
  color="continent"
/>

Props

PropTypeDescription
dataT[]Array of data objects
xkeyof TKey for x-axis values
ykeyof TKey for y-axis values
sizekeyof TKey for bubble size values
colorkeyof T | stringColor key or fixed color
minRadiusnumberMinimum bubble radius in px. Default: 4
maxRadiusnumberMaximum bubble radius in px. Default: 40

Features

  • Three-dimensional data encoding
  • Automatic size scaling
  • Color scales for categories
  • Overlap avoidance
  • Interactive tooltips per bubble
  • Animated entry

Other Charts