BulletChart
Compact KPI chart with value, target, and qualitative ranges
Source
Package
Usage
BulletChart displays a value against a target on top of range bands:
Data format
Each item in ranges sets the upper bound of a band with value and its color.
The optional label names the band. It is read by screen readers and shown in the default tooltip.
Visible labels always show the formatted range value.
The scale ends at the largest of the ranges, value and target.
A value beyond all ranges extends the scale, and NaN or Infinity values are not displayed.
Label
Use label prop to display a label next to the chart:
Vertical orientation
Set orientation="vertical" to render the chart vertically. Vertical chart requires a fixed height:
Bar color
Use barColor prop to change the value bar color and targetColor to change the target marker color:
Chart size
Use size prop to change the thickness of the track and barSize to change the thickness of the value bar:
Value formatter
Use valueFormatter prop to format values in labels and tooltip. Set withTooltip to display the tooltip on hover and keyboard focus:
Without target
The target marker is rendered only when the target prop is set:
Accessibility
Set aria-label to translate the chart summary or describe the value relative to its target: