Skip to content
InsightCharts

Search

Search guides and components

Radial spokes

Draws one spoke per row radiating from a centre disc, each as long as its value, with the name and value set on an outer ring.

Use when
A poster of 4 to 12 effects, causes or attributes of one subject, which sits in the centre as an icon or a short label: what a household's energy goes on, the side effects of one drug, the scores of one product.
Avoid when
Precise comparison or a ranking (use bar chart or pill rank); a dimension that is a cycle, such as hours or months (use radial bar chart); more than 12 rows (use bar chart); several subjects compared on the same attributes (use small multiples or heatmap).

Preview

Composition

Used in

2 infographics use radial spokes.

Infographics

2

A landscape spread of up to eleven small illustrations of one subject, each a different graphic form, in three bands of unequal panels: a statement in large type, spokes round an icon and a network of circles; a smooth trend with its peak labelled, nested squares and a slope chart; a pill ranking, a treemap, a tile map and sized circles; and a closing row of icon statements.

A poster with one subject in the middle of the sheet: a wheel of spokes round an icon (radial-spokes), two to four large figures standing either side of it, and a bottom row with the same subject's surroundings on concentric rings (orbit-chart) and a ranking as centred pills (pill-rank).

Installation

$ pnpm dlx shadcn@latest add @insightcharts/radial-spokes

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 { RadialSpokes } from "insightcharts";

Examples

Thin lines, centre label, click to select

Fan over 180 degrees, shaded by value

Stress: 12 spokes, long labels, values from 0 to 96

Props

PropTypeDefaultDescription
namerequiredstringName field: one spoke per row, in data order, clockwise.
valuerequiredstringValue field: spoke length from the centre disc.
shape"bar" | "line""bar"A thick tapered bar with a round head, or a thin line ending in a dot.
iconstringIcon in the centre disc: a built-in name or path://.
centerLabelstringShort text in the centre disc, used when there is no icon.
ringbooleantrueDotted outer ring at the scale maximum, where the labels sit.
maxnumberValue that reaches the outer ring. Default: the largest value.
startAnglenumber0Angle of the first spoke in degrees clockwise from 12 o'clock.
sweepnumber360Arc the spokes are spread over, in degrees. 180 makes a fan.
colorBy"single" | "value""single"The accent for every spoke, or a shade by value along the sequential ramp.
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>.