Aller au contenu 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​

Ouvrir Simple dans Storybook

With Labels​

Ouvrir With Labels dans Storybook

No Target​

Ouvrir No Target dans Storybook

Custom Range​

Ouvrir Custom Range dans Storybook

Negative Range​

Ouvrir Negative Range dans Storybook

Single Range​

Ouvrir Single Range dans Storybook

Value At Extremes​

Ouvrir Value At Extremes dans Storybook

See Also​

  • Gauge - Semicircular gauge
  • Stat - Single metric display