Skip to main content
Version: 1.0.4

Gauge

An analog gauge with an arc indicator and needle. Reach for it when a value has a meaningful range and an operator needs to judge position within it at a glance.

The Gauge component as it renders with its default settings.The Gauge component as it renders with its default settings.

Reach for it when you need:

  • Speed, pressure or temperature against its operating range

Component name: Gauge · Category: Display

In the palette: Analog gauge with arc indicator and needle

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
valuenumber50
minnumber0
maxnumber100
variantenumclassicOptions: classic · modern · simple.
angleenum270Options: 270 · 180 · 90 · 360 · custom.
startAnglenumber-225
endAnglenumber45
thicknessnumber10
unitstring""
gaugeColorcolorhsl(43 96% 56%)
valueColorcolorvar(--widget-value)
valueSizenumber18
decimalsnumber0Fraction digits shown. 1.0.4
enableScalebooleantrue
scaleCountnumber5
scaleSizenumber7
scaleColorcolorvar(--widget-scale)
labelstringGauge
enableLabelbooleantrue
pointerColorcolorvar(--widget-label)
labelColorcolorvar(--widget-label)
labelSizenumber11
labelOffsetnumber0
colorRangesarray[]
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Bind fillColor to the same tag through a threshold transform and the gauge does the reading for the operator. Give bad quality its own appearance — a grey gauge that means "stopped" and one that means "we have no idea" is the failure operators remember.

By default a numeric readout shows whole numbers. decimals (0–6) is what gets the fraction back: a tag reading 23.998 displays as 24 until you ask for more, and Math.round is not a formatting choice — it is a loss of data with no way to recover it from the screen. Every numeric widget formats through the same helper, so two widgets bound to the same tag cannot disagree about how many digits it has.

See also