Skip to content
ChartslibraryUI Get Pro

Dumbbell chart

Before and after per item with the change printed and coloured by direction.

When to use

  • Conversion before and after a change
  • Prior vs current per segment

When not to use

  • The level matters more than the change – use Dot plot

Good practice

  • Sort by change.
  • Use percentage points for rate changes (the default for percent formats).

Installation

Dumbbell chart is a Pro chart.

Installation is part of Pro

The full source is included in the Pro download. Get Pro to install it with the CLI and use it in unlimited projects.

Unlock with Pro
Already have Pro?npx chartslibraryui add dumbbell-chart --from ./chartslibraryui-pro

Usage

Usage examples are part of Pro

Every example on this page comes with its code in the Pro download. The props and data shape below are public.

Unlock with Pro

Data

Rows with a label key and from/to numeric keys.

[{ segment: "Starter", before: 0.031, after: 0.042 }]

Missing values are null. Invalid values make the chart say what’s wrong instead of drawing a misleading picture. How charts handle bad data

Props

Every chart also accepts the shared frame props: title, subtitle, source, height, mode, toolbar. Common API

export interface DumbbellChartProps extends FrameProps {
  data: Row[];
  label: string;
  /** Key of the "before" value. */
  from: string;
  /** Key of the "after" value. */
  to: string;
  fromLabel?: string;
  toLabel?: string;
  format?: FormatInput;
  favorable?: Favorable;
  /** Sort rows by change. Default "desc". */
  sort?: "none" | "asc" | "desc";
  zero?: boolean;
}

Dot plot

Many items on one scale, optionally against a comparison, with no zero required.

Slope chart

Two points in time per item, where both change and rank matter.