Skip to content
InsightCharts

Search

Search guides and components

Radial bar chart

Draws bars around a circle for data that repeats in a cycle, such as hours of the day or months of the year.

Use when
Only when the dimension is cyclical and the wrap-around matters: activity by hour of day, seasonality by month, wind by compass direction. The first category is placed at 12 o'clock.
Avoid when
Any dimension that does not wrap around: categories, rankings, years (use bar chart); precise comparison of values, since bars further out look bigger (use bar chart or line chart); more than about 3 stacked series.

Preview

Weekday bike-share trips peak at 9.2% in the 5pm hour and 8.8% in the 8am hour

Share of daily bike-share trips starting in each hour, weekdays

Source: Illustrative bike-share data

Composition

Used in

1 template uses radial bar chart.

Templates

1

A sequence of full-frame cards (title, stat, chart, quote, closing) that the reader swipes or steps through. Each card states one fact. It has an optional fixed aspect ratio, a keyboard-accessible pager and a stacked layout for print.

Installation

$ pnpm dlx shadcn@latest add @insightcharts/radial-bar-chart

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

Examples

Months

Munich averages 118 mm of rain in July and 38 mm in March

Average monthly rainfall, Munich, 1991-2020

Source: Deutscher Wetterdienst · Rounded, approximate figures for illustration

Stacked series

Weekday emergency calls peak at 172 per hour at 5pm

Average emergency calls per hour by hour of day, weekdays and weekends

Source: Illustrative data

Stress: long labels, compass

The wind at Heathrow blows from the south-west 16% of the time

Share of hours by wind direction, Heathrow, annual average

Source: Illustrative data based on Met Office wind roses

Props

PropTypeDefaultDescription
xrequiredstringThe cyclical category field, in cycle order.
yrequiredstring | string[]Value field, or several to stack.
seriesstringField that splits rows into stacked series (long data).
labelEverynumberLabel every nth category around the rim. Default: chosen to avoid crowding.
labelsbooleanPrint the value on the tallest bar. Default: on for a single series.
centerFirstbooleanfalseCentre the first category on 12 o'clock (compass directions) instead of starting its band there (hours).
centerLabelstringText in the centre of the ring, e.g. "24 hours".
namesRecord<string, string>Display names for series keys.
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>.