Ridgeline
Compare the shape of measure distributions on a shared value axis.
Chart ID: ridgeline. Independent import: @revolist/charts/ridgeline.
Live example
Section titled “Live example”Loading chart…
Reading the chart
Section titled “Reading the chart”Compare density peaks and spread across measures along the shared horizontal axis. Each ridge is scaled to its own peak.
Data requirements
Section titled “Data requirements”Use one category per row and one or more numeric series. Values are finite numbers or explicit nulls; the row mapper does not group or aggregate repeated keys.
The roles below describe the chart's data contract. Generic category/value roles resolve from the dataset; explicitly bind specialized numeric roles as shown in the complete example.
| Data role | Field count |
|---|---|
category | 1 or more |
series | 1 or more |
Download the complete sample data and settings (JSON). See Data & Configuration for mapping, null values, updates and lifecycle rules.
Create this chart
Section titled “Create this chart”Install the package using the installation guide, give the host an explicit height, and call createRidgelineChart after the host mounts. This factory fixes the chart type to ridgeline.
<div id="chart" style="width: 100%; height: 450px;"></div>Complete runnable TypeScript example with sample data
import { createRidgelineChart } from '@revolist/charts/ridgeline';import sample from './sample-data';
const chart = await createRidgelineChart({ container: document.getElementById('chart')!, ...sample,});import type { ChartOptions } from '@revolist/charts/core';
const sample: Omit<ChartOptions, 'container' | 'chartType'> = { "data": [ { "label": "Run 1", "baseline": 75, "tuned": 58 }, { "label": "Run 2", "baseline": 80, "tuned": 62 }, { "label": "Run 3", "baseline": 85, "tuned": 66 }, { "label": "Run 4", "baseline": 92, "tuned": 70 }, { "label": "Run 5", "baseline": 97, "tuned": 76 }, { "label": "Run 6", "baseline": 102, "tuned": 60 }, { "label": "Run 7", "baseline": 109, "tuned": 64 }, { "label": "Run 8", "baseline": 79, "tuned": 68 }, { "label": "Run 9", "baseline": 84, "tuned": 74 }, { "label": "Run 10", "baseline": 91, "tuned": 78 }, { "label": "Run 11", "baseline": 96, "tuned": 62 }, { "label": "Run 12", "baseline": 101, "tuned": 66 }, { "label": "Run 13", "baseline": 108, "tuned": 72 }, { "label": "Run 14", "baseline": 113, "tuned": 76 }, { "label": "Run 15", "baseline": 83, "tuned": 80 }, { "label": "Run 16", "baseline": 90, "tuned": 64 }, { "label": "Run 17", "baseline": 95, "tuned": 70 }, { "label": "Run 18", "baseline": 100, "tuned": 74 }, { "label": "Run 19", "baseline": 107, "tuned": 78 }, { "label": "Run 20", "baseline": 112, "tuned": 82 }, { "label": "Run 21", "baseline": 117, "tuned": 68 }, { "label": "Run 22", "baseline": 89, "tuned": 72 }, { "label": "Run 23", "baseline": 94, "tuned": 76 }, { "label": "Run 24", "baseline": 99, "tuned": 80 } ], "mapping": { "category": { "field": "label" }, "series": [ { "field": "baseline", "label": "Baseline" }, { "field": "tuned", "label": "Tuned" } ] }, "presentation": { "title": "Ridgeline", "legendPosition": "bottom" }};export default sample;Await updates before reading a snapshot or exporting. Call chart.destroy() when the host unmounts. See the live catalog to interact with this type.
Supported options
Section titled “Supported options”Set these fields in chartOptions. The option schema validates supported keys, ranges and choices; updating chartOptions replaces that authored object.
| Option | Default | Accepted values |
|---|---|---|
showGridLines | true | true or false |
markOpacity | 1 | 0.2 to 1; step 0.05 |
pinTooltips | false | true or false |
Titles, legends, theme and labels belong to presentation or the corresponding top-level setting. Axis, color, navigation and interaction support depends on the selected chart; see Data & Configuration.
Related charts
Section titled “Related charts”- Histogram — Summarize one measure in deterministic numeric bins.
- Strip and dot plot — Show the distribution of individual values along one axis.
- ECDF — Show the cumulative share of observations at or below each value.
- Beeswarm — Show individual observations without overlapping neighboring points.