/

Dumbbell Chart

Show the gap between two values per category. Perfect for before/after comparisons, range displays, and paired data.

Usage

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

<DumbbellChart
  data={yearOverYear}
  x="metric"
  start="lastYear"
  end="thisYear"
/>

Props

PropTypeDescription
dataT[]Array of data objects
xkeyof TKey for categories
startkeyof TKey for start values
endkeyof TKey for end values
dotSizenumberDot radius. Default: 6

Features

  • Before/after comparison
  • Color-coded direction
  • Gap value labels
  • Horizontal layout
  • Sorted by gap size
  • Animated connector draw

Other Charts