Usage
GaugeChart displays a single value on a radial arc:
Sections
Use sections to split the arc into threshold bands. Each section ends at its value, the last section should end at max.
With sections, the whole arc is colored, use the target marker to show where the value falls:
Target marker
Set target to draw a line marker across the arc at the given value.
Use targetColor and targetSize to change its color and thickness:
Start and end angle
startAngle and endAngle set the span of the arc in degrees. 0 is the top of the chart, positive values go clockwise:
A span of 360 degrees renders a full circle. Set endAngle lower than startAngle
to draw the arc counter-clockwise:
Thickness
thickness sets the width of the arc, size sets the width of the chart. The height follows the arc proportions:
Value formatter
Use valueFormatter to format the value in the center label. Screen readers announce the same formatted value:
Custom label
Use label prop to replace the center label with any React node:
Round caps
Set roundCaps to round the endpoints of the arc:
Accessibility
Set aria-label to name the metric, even when the chart has a visible label: