Component

Gauge

Semicircle progress display — read-only, perfect for utilisation and score widgets.

Installation

import { WrGauge } from 'ngwr/gauge';

@Component({ imports: [WrGauge] })
export class MyComponent {}

Basic

<wr-gauge [value]="72" suffix="%" />
72%

Custom range + color

<wr-gauge [value]="9.5" [min]="0" [max]="10" suffix="/10" valueColor="var(--wr-color-warning)" />
9.5/10

API

NameDescriptionTypeDefault
ariaLabelAccessible name — the role needs one. Falls back to gauge.label.string | nullnull
valuerequiredThe reading. Coerced like every other numeric input here — it was the only one without it, so a NaN reached the arc's d as the literal text NaN, which is invalid path geometry and drops the arc.number
minnumber0
maxnumber100
sizeDiameter in CSS pixels.number160
strokeWidthArc stroke thickness in viewBox units (out of 100).number10
trackColorstring'rgba(var(--wr-color-light-rgb), 0.6)'
valueColorstring'var(--wr-color-primary)'
showValueShow the value text in the center.booleantrue
suffixstring''