Skip to content
InsightCharts

Search

Search guides and components

Bullet chart

Compares one measure per row with its target, optionally against qualitative bands such as poor / fair / good.

Use when
Progress against a target or budget for one to about 10 measures, including measures in different units (scale: "independent"); a compact scorecard instead of a row of gauges.
Avoid when
No target or thresholds to compare with (use bar chart); a single share of a whole (use progress meter); change over time (use line chart).

Preview

Europe sold $71 million against a target of $85 million in 2024

Sales against target by region, $ millions, 2024

Source: Company accounts · Illustrative figures.

Composition

Used in

No molecule or template lists bullet chart in its composes. It still fits any slot that takes a component.

Installation

$ pnpm dlx shadcn@latest add @insightcharts/bullet-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 { BulletChart } from "insightcharts";

Examples

Scorecard with a separate scale per row

Third-quarter revenue was $4.6 million against a target of $5.0 million

Third-quarter results against target

Illustrative figures.

No thresholds, one row highlighted

Onboarding delivered 52% of its quarterly roadmap

Share of quarterly roadmap delivered, by team. The tick marks the 80% commitment.

Illustrative figures.

Stress: 10 rows with long labels

The health service missed all 10 national standards in the latest month

Performance against the national standard, % of cases

Illustrative figures.

Props

PropTypeDefaultDescription
categoryrequiredstringField naming each row.
valuerequiredstringField with the measured value. Values below zero are not supported.
targetstringField with the target, drawn as a tick across the bar.
bandsnumber[] | string[]Ascending upper bounds of qualitative bands, or the fields holding them per row. Omit unless the thresholds are real.
bandNamesstring[]Band names, lowest first, for the legend and tooltip.
maxnumber | stringEnd of the scale: a number or a per-row field. Default: just past the largest value, target or band.
scale"shared" | "independent""shared"One axis for all rows, or each row on its own scale (different units).
formatFieldstringField holding a format spec per row, for mixed units.
namesRecord<string, string>Display names for the value and target fields.
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>.