メインコンテンツまでスキップ

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​

StorybookでSimpleを開く

With Labels​

StorybookでWith Labelsを開く

No Target​

StorybookでNo Targetを開く

Custom Range​

StorybookでCustom Rangeを開く

Negative Range​

StorybookでNegative Rangeを開く

Single Range​

StorybookでSingle Rangeを開く

Value At Extremes​

StorybookでValue At Extremesを開く

See Also​

  • Gauge - Semicircular gauge
  • Stat - Single metric display