Skip to content
peakcharts

FunnelChart

Track how many people make it through each stage.

Checkout funnel
Checkout funnelClick a mark to pin its value; click it again to release. Keyboard: Enter or Space to pin, Escape to release. Data table below.Visited: 8,400Added to cart: 3,150Started checkout: 1,720Paid: 1,0868,4003,1501,7201,086
Click a mark to pin its value
Visited 8,400Added to cart 3,150Started checkout 1,720Paid 1,086
View data
Checkout funnel
LabelValue
Visited8,400
Added to cart3,150
Started checkout1,720
Paid1,086
<FunnelChart title="Checkout funnel" data={data} />

Usage

FunnelChart.tsx
import { FunnelChart } from 'peakcharts';
import 'peakcharts/styles.css';

const data = [
  { label: 'Visited', value: 8400 },
  { label: 'Added to cart', value: 3150 },
  { label: 'Started checkout', value: 1720 },
  { label: 'Paid', value: 1086 },
];

export default function Example() {
  return <FunnelChart title="Checkout funnel" data={data} />;
}

Data

data takes { label: string; value: number; color?: string }[]. Input arrays are never mutated and order is preserved.

  • Values must be non-negative.
  • Each value is printed on the chart.
  • Takes colors, or a color on each datum.

Every chart also accepts the common props: description, height, color, variant, animate, formatValue and className.