Box plot
Median, quartiles, whiskers and every outlier per group, with n printed.
The shape of a distribution for several groups, stacked to compare at a glance.
A ridgeline plot draws the distribution of a value for each group as a smooth curve, stacked one above the other like a mountain range. You see more than a box plot shows: where most values sit, how wide the spread is, and whether there are two peaks, for example a fast lane and a slow lane.
The curves are kernel density estimates on a shared axis, so shapes can be compared directly, and each median is marked with a line. Sort by median to turn it into a ranking, and highlight the groups your title is about. The table gives the count, quartiles and median of every group.
With only a few values per group the curves are guesses, and the chart says so; use a strip plot there instead.
Ridgeline plot is a Pro chart.
Installation is part of Pro
Get Pro to install it with your access key and the shadcn CLI, and use it in unlimited projects.
Unlock with ProUsage examples are part of Pro
Every example on this page comes with its code in Pro. The props and data shape below are public.
Unlock with ProOne row per observation (long format) with a group key and a numeric value key.
[{ region: "EMEA", days: 34 }, { region: "EMEA", days: 41 }, ...]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 RidgelinePlotProps extends FrameProps {
/** One row per observation (long format). See the Data section for the shape. */
data: Row[];
/** Key of the group each observation belongs to (one ridge per group). */
group: string;
/** Key of the numeric value. */
value: string;
/** Number format for the value axis. */
format?: FormatInput;
/** Group order. Default: order of first appearance. "median" sorts by median, highest first. */
order?: "data" | "median";
/** How much ridges overlap, 0 to 1. Default 0.5. */
overlap?: number;
/** Group names to draw in colour; the rest are grey. */
highlight?: string | string[];
}Median, quartiles, whiskers and every outlier per group, with n printed.
The shape of one distribution, with automatic binning and a median marker.
Every observation visible by group, with the median marked.