Skip to content
peakcharts

All charts

Seventeen components, grouped by the question they answer. Each page has a live example you can restyle, the source, and the shape of data it takes.

Comparison

ComponentUse it forData
BarChartCompare one value across a handful of categories.{ label: string; value: number; color?: string }[]
HorizontalBarChartBars on their side, for long labels and ranked lists.{ label: string; value: number; color?: string }[]
LollipopChartA lighter bar chart: a stem and a dot per category.{ label: string; value: number; color?: string }[]
WaterfallChartShow how a starting balance becomes an ending one.{ label: string; value: number; total?: boolean; color?: string }[]
FunnelChartTrack how many people make it through each stage.{ label: string; value: number; color?: string }[]

Trends

ComponentUse it forData
LineChartA value moving through an ordered sequence.{ label: string; value: number; color?: string }[]
StepChartFor values that hold steady and then jump.{ label: string; value: number; color?: string }[]
AreaChartA line with the volume underneath it filled in.{ label: string; value: number; color?: string }[]

Parts of a whole

ComponentUse it forData
PieChartShare of a whole, best with three to five slices.{ label: string; value: number; color?: string }[]
DonutChartA pie with the middle cut out, so the labels have room.{ label: string; value: number; color?: string }[]
TreemapChartNested rectangles sized by value, for many parts of a whole.{ label: string; value: number; color?: string }[]
RadialChartProgress toward a goal, drawn as concentric arcs.{ label: string; value: number; color?: string }[]

Distribution

ComponentUse it forData
HistogramHow a set of raw numbers is spread out.number[]
ScatterChartTwo measures per item, to spot clusters and outliers.{ x: number; y: number; label?: string }[]
BubbleChartA scatter plot where a third measure sets the size.{ x: number; y: number; size: number; label?: string }[]
HeatmapChartIntensity across two categories, such as day and time.{ x: string; y: string; value: number }[]
RadarChartCompare one subject across several dimensions at once.{ label: string; value: number; color?: string }[]

The generic Chart component

Chart takes the same props as the others plus a type, which is handy when the kind of chart is decided at runtime.