Gauge dials
A row of notches covers a progress meter. A speedometer, a fan duty readout or a throughput dial needs more: a scale, a pointer and a red line. Gauge now has dial layers you can stack on any arc gauge, and it sizes them for you.
Layers that compose
Each layer is one prop. Pass true for the default look or an object to tune it.
arcStyledraws the track asnotches(the default), onesolidstroke, ornone, so a sector or ring can carry the value on its own.ruleradds ticks inside or outside the track. Ticks brighten as the fill passes them. Labels can show every major tick or just the two ends, in your own units:labels: { min: 0, max: 800 }.needlecomes asline,gradient,triangleorpolygon.tipstops it inside the track, at its outer edge, or past the outermost layer.zonesmarks ranges such as a red line. Show them as a thin band, as a colour change in the fill (zoneDisplay="fill"), or both.sectorfills the wedge up to the value with a conic or radial gradient, a flat colour or a pattern.progressRing,dots,glowandcenterDiscadd a value ring, rings of dots that light up, a soft bloom and a disc behind the label.
Rings, zone bands and an outside ruler take space from the outside in, and the track shrinks to fit. Stack them without tuning any radii.
A sweep instead of a bounce
The enter animation is new. The track fades in, then the fill, the needle, the sector, the ring and the dots sweep together from zero to the value on a spring with no bounce. When value changes, the sweep carries on from where it is and keeps its speed. Use enterTransition to change the timing. With reduced motion on, the gauge appears at its value straight away.
Six new recipes
A dashboard dial, a speedometer, a conic sector KPI dial, a solid fan duty gauge, a progress dots uptime gauge and a live load dial are ready to copy from Recipes.
See the gauge docs for every option.