Skip to main content

BulletChart

Every example on this page is live, drawn by the library's Storybook, where you can also change its props and see the result.

Displays a value against a target and qualitative ranges using SVG fill patterns.

Import​

import { BulletChart } from "~lib/data-display/bullet-chart";

Props​

NameTypeRequiredDefaultDescription
valuenumberYesN/ACurrent value to display
targetnumberNoN/ATarget marker position
ranges{ end: number; pattern: PatternType; label?: string }[]YesN/AQualitative range bands
minnumberNo0Minimum scale value
maxnumberNo100Maximum scale value
labelstringNoN/ALabel shown to the left of the bar
widthnumber | stringNo100%Container width
heightnumber | stringNo100%Container height

Examples​

Simple​

Open Simple in Storybook

With Labels​

Open With Labels in Storybook

No Target​

Open No Target in Storybook

Custom Range​

Open Custom Range in Storybook

Negative Range​

Open Negative Range in Storybook

Single Range​

Open Single Range in Storybook

Value At Extremes​

Open Value At Extremes in Storybook

See Also​

  • Gauge - Semicircular gauge
  • Stat - Single metric display