Horizontal bar gauge strategy.
Renders a linear horizontal track with a filled region from min to the current value. Supports coloured zones, optional tick marks, and a numeric value readout.
min
Ideal for progress-like KPIs: CPU load, battery level, tank fill, task completion, etc.
Output kind: svg.
const strategy = new BarGaugeStrategy({ ticks: 10 }); Copy
const strategy = new BarGaugeStrategy({ ticks: 10 });
Readonly
Human-readable name for this strategy (e.g. "Analog", "VU Meter").
"Analog"
"VU Meter"
Render the gauge into an SVG element or raw ImageData.
ImageData
Pre-validated render context.
An SVG element or raw ImageData.
Horizontal bar gauge strategy.
Renders a linear horizontal track with a filled region from
minto the current value. Supports coloured zones, optional tick marks, and a numeric value readout.Ideal for progress-like KPIs: CPU load, battery level, tank fill, task completion, etc.
Output kind: svg.
Example