Skip to content
InsightCharts

Search

Search guides and components

Scale ladder

A tall vertical band graded along one scale (linear or log, running up or down) with each item placed at its true position and labelled with an icon, its name and its value on alternating sides.

Use when
Answering how deep, how high, how hot, how old or how far each of 4 to about 20 things is on one shared scale, when the reader needs the positions themselves: depths, altitudes, temperatures, ages, distances. Use zones to name ranges along the scale.
Avoid when
Comparing sizes rather than positions (use bar chart or lollipop chart); events with start and end dates (use timeline chart); a distribution of many unnamed values (use strip plot or histogram).

Preview

Composition

Used in

2 infographics use scale ladder.

Infographics

2

A poster that describes one subject from four sides: the subject as one large silhouette filled to a share (shape-fill), two to four large figures, its place among other things on one scale (scale-ladder), and a table that sets it beside its peers with every number drawn as a small form (glyph-table).

A tall poster that is one illustrated scale: a full-height scale-ladder with icons, leader-labelled items and named zones, and a narrow side column of large figures and one small graphic, each set level with the part of the scale it describes.

Installation

$ pnpm dlx shadcn@latest add @insightcharts/scale-ladder

The CLI copies the source into your project and needs the @insightcharts registry in components.json; see installation. With the package, import it by name:

import { ScaleLadder } from "insightcharts";

Examples

Depth, log scale, running down, one highlighted

Stress: 14 items, crowded values, long names

Props

PropTypeDefaultDescription
namerequiredstringField holding each item's name.
valuerequiredstringField holding each item's position on the scale.
iconIconInputOne icon for every item: a built-in name or a path:// string. Items without an icon get a dot.
iconFieldstringField holding a per-item icon name or path:// string. Overrides icon.
scale"linear" | "log""linear"Log spaces the scale by powers of ten; the heading over the band says so.
direction"up" | "down""up"up: larger values higher (height, temperature). down: larger values lower (depth, age).
minnumberStart of the scale. Default: a round number at or below the smallest value.
maxnumberEnd of the scale. Default: a round number at or above the largest value.
ticksnumber[]Values that get a boxed label on the band. Default: round steps, or powers of ten on a log scale.
zones{ from: number; to: number; label: string }[]Named ranges along the scale, shaded across the graphic and named along its outer edge.
scaleLabelstringHeading over the band: the measure and its unit, e.g. "Depth, metres".
namesRecord<string, string>Display names for item keys.
bandWidthnumberWidth of the band in px, at most 40% of the plot width. Default 60, or 46 on narrow screens.
Common chart props 29

Every chart built with defineChart accepts these on top of its own props.

PropTypeDescription
dataDataInputRows, CSV text, a URL, { url, path }, an async function, or an Arrow-style table. Omit inside <InsightData>.
transformTransform | Transform[]A pipeline of transforms applied before drawing.
titlestringThe title. One plain statement of what the data shows, with the number and the period ("Monthly churn fell from 4.2% to 2.1% in 2024"), or a plain label ("Monthly churn, 2024"). One clause, no figures of speech.
subtitlestringMeasure, unit, population, period.
sourcestringData source, shown as "Source: ...".
notestringMethod notes or caveats.
heightnumber | stringCSS height of the plot. Default 360.
aspectnumberWidth / height. Overrides height.
highlightstring | string[]The entity (or entities) the title is about. Every other series is drawn in grey.
annotationsAnnotation[]Reference lines, shaded bands and callouts, in data coordinates.
formatFormatSpecHow to print values: "compact", "percent", "currency:USD", "{value} kg", Intl options, or a function.
legendbooleanShow the legend. Default: shown when there are two or more series.
selectboolean | stringMake marks clickable to filter. Inside <InsightData> the selection filters every other chart. Pass a field name, or true to use the chart's category field.
onSelect(values: string[], field: string) => voidCalled with the selected values whenever the selection changes.
optionEChartsOption | ((option: EChartsOption, ctx: BuildContext) => EChartsOption)Deep-merged over the generated ECharts option, or a function that receives and returns it. Use it for ECharts settings no prop covers.
themeThemeInputA theme, or a partial set of tokens merged over the surrounding theme, for this chart only.
modeModeInput"auto" (default) follows the page, "system" follows the OS, or force "light" / "dark".
rendererRendererInput"auto" (default) uses SVG for light charts and canvas for heavy ones.
animatebooleanSet false to disable animation. Reduced-motion preferences are always respected.
lazybooleanMount the chart only when it scrolls near the viewport. Default true.
groupstringLink tooltips with other charts sharing this group id.
exportableboolean | ExportFormat[]Show an export menu: true or a list of formats from png, jpeg, svg, pdf, csv, json.
tablebooleanShow a collapsible "View data" table under the chart.
altstringAccessible description: the chart type and measures, then the main pattern and the notable values.
idstringStable id for this chart's selection in the shared store.
onEventsRecord<string, ChartEventHandler>ECharts event handlers, e.g. { click: (params, chart) => {} }. Prefix a name with zr: to bind to the canvas itself.
onReady(chart: EChartsInstance) => voidCalled with the ECharts instance once it is created.
classNamestringClass name for the outer <figure>.
styleCSSPropertiesInline style for the outer <figure>.