Ridgeline
A React component in Beamline's Charts & data-vis category.
Distributions per group as overlapping density ridges (response time by region, order size by plan): an overlap control, median and p95 readouts per row, hover or focus a ridge to bring it forward with its markers, and hatched rows for groups that were not measured.
Use it for
- Comparing the shape of a distribution between groups: latency by region, deal size by segment, session length by plan.
Not for
- One total per group (bar-chart).
- A percentile over time (line-chart).
Anatomy
- title, description, overlap switch (actions), table button
- row labels (buttons, one per group)
- ridges (density area per group, sharing one scale)
- median and p95 markers on the active ridge
- row summary (p50 · p95) at the end of each row
- value axis with ticks and grid
- hatched row for an unmeasured group
Variants
- 0: overlap: any number of row heights through the prop; the built-in switch offers none 0 · low 0.5 · medium 1 · high 2 and can be hidden
- 1: domain and bandwidth fixed or from the data
- 2: color per group (series palette by default)
States
- loading (skeleton)
- empty
- unmeasured group (values null or empty): hatched row, “Not measured”
- active ridge (lifted, outlined, markers shown, others dimmed)
- table view (samples, median, p95, min, max per group)
- narrow: the row summary moves to a readout under the axis
- right-to-left: the value axis still runs left to right
Keyboard
- Tab focuses the active (or first) row label; ↑/↓ move between groups, Home/End to the first/last
- Focus or hover lifts that ridge; Escape releases it
- Overlap switch: ← → choose a preset (radio group)
Motion
Ridges rise from their baselines once; a change of overlap carries every ridge to its new height over the chart duration; the active ridge leads and the others dim over --pui-motion-out. Nothing moves under reduced motion.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | RidgelineGroup[] | — | Groups from top to bottom. |
format | (value: number) => string | — | How values read on the axis, markers and table: "182 ms". |
domain | [number, number] | — | Axis range; the data (without its last 0.2% of outliers) on round numbers by default. |
bandwidth | number | — | Smoothing in value units; Silverman's rule per group by default. |
overlap / defaultOverlap / onOverlapChange | number | — | overlap: How far a ridge rises into the rows above, in row heights. Default 1. defaultOverlap: Initial ridge overlap when uncontrolled. Defaults to 1. onOverlapChange: Reports ridge overlap after a change; no callback by default. |
overlapControl | boolean | — | The overlap switch in the header (none, low, medium, high). Default true. |
height | number | "fill" | — | Plot height in px (about 34 px per group by default), or "fill" for whatever height its container gives it. |
active / defaultActive / onActiveChange | string | null | — | active: The lifted group's key; hover and focus preview others. defaultActive: Initial active item when uncontrolled. Defaults to null. onActiveChange: Reports active item after a change; no callback by default. |
title / hideTitle / description | string / boolean / ReactNode | — | title: Heading shown above the content. Required. hideTitle: Hides the title; defaults to false. Deprecated: Use showTitle={false} instead. description: Supporting text beneath the label or heading. Defaults to no supporting text. |
table | boolean | — | Offers a table view of the same chart data. Defaults to true. |
loading | boolean | — | Shows the loading state while data or an operation is pending. Defaults to false. |
actions | ReactNode | — | Actions displayed with the heading or toolbar. Defaults to no actions. |
className | string | — | Classes on the documented visual root; no override by default. |
classNames | ChartClassNames | — | Classes for the named visual parts; no overrides by default. |
style / ref | CSSProperties / Ref<HTMLElement> | — | style: Inline styles on the documented visual root; no overrides by default. ref: Receives the documented native target or imperative handle; omitted by default. |
emptyLabel | string | — | What an empty chart says, in the product's own words ("No deploys yet"). Default: "No data for this range" on a chart over time, "No data yet" on the others. |
showTitle | boolean | true | Shows the title visually while keeping its accessible name; defaults to true. Takes precedence over hideTitle. |
title (required) | string | — | Heading shown above the content. Required. |
hideTitle | boolean | — | Hides the title; defaults to false. Deprecated: Use showTitle={false} instead. |
description | ReactNode | — | Supporting text beneath the label or heading. Defaults to no supporting text. |
overlap | number | — | How far a ridge rises into the rows above, in row heights. Default 1. |
defaultOverlap | number | — | Initial ridge overlap when uncontrolled. Defaults to 1. |
onOverlapChange | ((overlap: number) => void) | — | Reports ridge overlap after a change; no callback by default. |
active | string | null | — | The lifted group's key; hover and focus preview others. |
defaultActive | string | null | — | Initial active item when uncontrolled. Defaults to null. |
onActiveChange | ((key: string | null) => void) | — | Reports active item after a change; no callback by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no overrides by default. |
ref | Ref<HTMLElement> | — | Receives the documented native target or imperative handle; omitted by default. |
Built from
- Button
- Checkbox
- Chip group
- Dropdown menu
- Empty state
- Glow
- Kbd
- Label
- Pagination
- Search field
- Segmented control
- Select
- Skeleton
- Spinner
- Table
- Text morph
- Tooltip
Dependencies
motion
Import
import { Ridgeline } from "@beamline/ridgeline";
Get it
Ridgeline is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent
More in Charts & data-vis
- Sankey chart: Flows between stages as bands whose width is the amount: sources to pages to outcomes, budgets to teams; hovering or focusing a node lights its flows and…
- Geo map: Values by country as a choropleth on the system's own world outline (no map service): classes from a sequential or diverging ramp with a legend you can…
- Streamgraph: Stacked flows over time around a centre baseline, with silhouette, wiggle, expand (shares) and zero offsets: a legend that turns layers on and off, a…
- Treemap: Nested rectangles sized by value (spend by team, then service), squarified so tiles stay close to square: labels that fit or hide, hover and focus…
- Gantt chart: A plan as bars on a timeline: tasks grouped down the side, each bar from its start to its end with its progress, milestones as diamonds, arrows from each…
- Activity heatmap: A calendar of daily counts, one cell per day on a sequential ramp: weeks across, weekdays down, month and weekday labels, a legend scale, hatched days…
- Gauge: One value against a known range: a semicircle, a 270° dial or a full ring, filled or with a needle, coloured bands with their names (healthy, busy…
- Radial chart: Progress of a few measures toward their targets as concentric rings, full or half circle, with a centre readout and a list of each ring's value, target…
- Radar chart: A few series compared across the same five to eight dimensions as polygons on a polygon or circle grid; hover or arrow keys pick a dimension and read…
- Scatter chart: Two measures of many items against each other, one point per item, or a bubble chart when a third measure sizes the points: groups by colour and shape…
- Area chart: Amounts over time as filled areas: overlapping, stacked or as shares of 100%, five fills, two strokes, five curves, a range handle; gaps for missing…
- Composed chart: Different measures on one time axis: bars, lines and areas per series, a left and a right value axis with their own formats, and reference lines.
- Funnel chart: People or deals moving through ordered steps, each step a bar narrowing from the first: the part lost between two steps stays beside the next as a fading…
- Waffle chart: Units of a whole as a grid of cells by category (seats used of a plan, tickets by channel): a 10×10 grid by default, hatched cells for units whose…
- Slope chart: Change between two points in time per item, by value or by rank: labels on both sides that never collide, rising and falling told by the end marker (▲ ▼)…
- Line chart: Values over time as lines: curves, point markers, dashed series for forecasts, reference lines for limits and targets, an optional zero baseline and a…
- Bar chart: Amounts by category as bars: columns or rows, grouped, stacked or as shares, reference lines, five looks (rounded, cells, trace, isometric, monospace), a…
- Pie chart: A few shares of a whole as a pie or donut, with spaced slices, percent labels, a centre readout and a list of every slice with value and share; hovering…
- Sparkline: A compact trend beside its value: point along it or focus it and use ← → to read each point; nulls are gaps. TrendLine is the bare line.