Saltar al contenido principal

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​

Abrir Simple en Storybook

With Labels​

Abrir With Labels en Storybook

No Target​

Abrir No Target en Storybook

Custom Range​

Abrir Custom Range en Storybook

Negative Range​

Abrir Negative Range en Storybook

Single Range​

Abrir Single Range en Storybook

Value At Extremes​

Abrir Value At Extremes en Storybook

See Also​

  • Gauge - Semicircular gauge
  • Stat - Single metric display