/

Waterfall Chart

Show how an initial value is affected by positive and negative changes. Perfect for financial breakdowns and variance analysis.

Usage

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

<WaterfallChart
  data={profitBreakdown}
  x="category"
  y="amount"
  total="isTotal"
/>

Props

PropTypeDescription
dataT[]Array of data objects
xkeyof TKey for category labels
ykeyof TKey for values
totalkeyof TKey for boolean indicating total bars
upColorstringColor for increases. Default: '#10b981'
downColorstringColor for decreases. Default: '#ef4444'
totalColorstringColor for total bars. Default: '#22d3ee'

Features

  • Automatic running total calculation
  • Distinct colors for increase/decrease/total
  • Connector lines between bars
  • Value labels on each segment
  • Horizontal layout option
  • Animated cascade entry

Other Charts