gauge
gauge, tile type
The gauge tile displays a single numeric value on a semicircular scale. It
expects exactly one numeric expression in its with block. The value is
clamped to the configured gaugeMin and gaugeMax bounds. The tile supports
both legacy coordinates and block placement syntax.
show gauge "Service level" { 1..4, 1..10 } with 0.85
Examples
Legacy dashboards attach gauge-specific StyleCode to the gauge entry:
show gauge "Fill rate" a1d4 {
entry {
gaugeMin: 0;
gaugeMax: 1;
gaugeFillColor: orange;
gaugeStrokeColor: "green/700"
}
} with 0.85
Block placement can be combined with additional tile-level gauge properties:
show gauge "Fill rate" { 1..4, 1..10;
gaugeLabelPosition: "top";
gaugeVariant: "dot"
} with
0.85 { gaugeMin: 0; gaugeMax: 1 }
The same bounded value can use a filled bar or a dot, with the label centered or above the gauge. The tile’s accent and chrome colors style the indicator and its surrounding scale respectively.
variants = show region { 1..8, 1..13 }
show gauge "Bar" { 1..6, 1..10 in variants;
gaugeVariant: bar; gaugeLabelPosition: center; tileColor: blue; gaugeChromeColor: "blue/100"
} with
150 { gaugeMin: 0; gaugeMax: 200; numbers: simple; unit: " units" }
show gauge "Dot" { 7..12, 1..10 in variants;
gaugeVariant: dot; gaugeLabelPosition: top; tileColor: green; gaugeChromeColor: "green/100"
} with
150 { gaugeMin: 0; gaugeMax: 200; numbers: simple; unit: " units" }
Both gauges display 150 units on a scale from 0 to 200, so both indicate three quarters of their range. Changing the variant or color does not change those bounds. Numeric formatting belongs to the displayed entry value.
Remarks
Gauge tiles support dashboard slicing via slices: like other tiles. When the
slice has no data, the tile displays an error message.
With block placement, gaugeLabelPosition, gaugeVariant,
gaugeChromeColor, and gaugeAngle belong to the tile itself.
gaugeMin and gaugeMax still belong to the gauge entry.
See show for the general placement syntax.
gaugeLabelPosition accepts "center" and "top". gaugeVariant accepts
"bar" and "dot". gaugeAngle accepts values from 180 to 270, and the
new dashboard renderer also accepts auto.
StyleCode
In region-based dashboards, tile styles control the gauge presentation. The entry supplies its bounds, and the value scope supplies its numeric formatting. The region-based element inventory is:
The legacy dashboard attachment points are listed below.
For generic StyleCode rules, see stylecode.
- In
show gauge, StyleCode may be attached to the gauge tile itself, to theentry, and to thevalue. - gauge tile
- entry and value