Dot plot
Many items on one scale, optionally against a comparison, with no zero required.
Before and after per item with the change printed and coloured by direction.
<DumbbellChart />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 Pronpx chartslibraryui add dumbbell-chart --from ./chartslibraryui-proUsage 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 ProRows 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
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;
}Many items on one scale, optionally against a comparison, with no zero required.
Two points in time per item, where both change and rank matter.