Zum Hauptinhalt springen

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​

Simple in Storybook öffnen

With Labels​

With Labels in Storybook öffnen

No Target​

No Target in Storybook öffnen

Custom Range​

Custom Range in Storybook öffnen

Negative Range​

Negative Range in Storybook öffnen

Single Range​

Single Range in Storybook öffnen

Value At Extremes​

Value At Extremes in Storybook öffnen

See Also​

  • Gauge - Semicircular gauge
  • Stat - Single metric display