உள்ளடக்கத்திற்குச் செல்லவும்

Gauge விட்ஜெட்

நிலையான குறைந்தபட்ச மற்றும் அதிகபட்ச மதிப்புகளுக்கு இடையே ஒரு டயலில் ஒரு மதிப்பு. SLO, பிழை வரவு, வெப்பநிலை, கொள்ளளவுக்குச் சிறந்தது.

The gauge template draws a value on an arc between two bounds you choose. It answers "how close to the limit is this?", which a bare number cannot: 2.4 means nothing until you know the ceiling is 5.

Fields

FieldTypeNotes
templatestringRequired. Must be "gauge"
valuefloatRequired. Must be finite and fall within min_valuemax_value; outside that range the request is rejected with 422
min_valuefloatRequired. Start of the arc. Must be strictly less than max_value
max_valuefloatRequired. End of the arc
unitstringAppended to the value and to the MIN / MAX end labels. Max 32 characters
trendstringup / down / flat. Accepted by the server; the current iOS gauge does not draw an arrow, so treat it as forward-looking metadata rather than something users will see
label, subtitle, icon, accent_color, background_color, text_colorstringShared content fields — see the API reference

Example: error rate against an SLO

PATCH /widgets/error-rate
{
  "content": {
    "template": "gauge",
    "value": 2.4,
    "min_value": 0,
    "max_value": 5,
    "unit": "%",
    "label": "Errors",
    "subtitle": "api-gateway · last 5m · SLO 1.0%",
    "icon": "chart.line.uptrend.xyaxis",
    "accent_color": "red"
  }
}

Behavior

Pick bounds once and keep them fixed. The arc's meaning comes entirely from where the needle sits between them, so a max_value that tracks the current peak makes every update look the same and hides exactly the trend you built the widget to see. Choose the number that means "this is the limit" — the SLO, the disk size, the tank capacity — and leave it alone.

Because the server rejects a value outside the bounds, a metric that can legitimately overshoot needs headroom in max_value rather than a clamp at the sender. Set the ceiling above the worst case you expect, or keep sending the raw number to a value widget and let the subtitle carry the threshold.

தகவல்

The MIN and MAX end labels take the same unit as the value, so a unit that reads well next to a big number ("%", "°C") also has to read well in MAX 5%. Long words ("requests per second") are better placed in label or subtitle.

For a fraction that is already a percentage of a known whole, progress says the same thing with less configuration.

ஆப் பதிப்பு 1.6 இல் வருகிறது

App Store மதிப்பாய்வுக்காகக் காத்திருக்கும் ஆப் புதுப்பிப்பில் உள்ள ஒரு அம்சத்தை இந்தப் பிரிவு விவரிக்கிறது. புதுப்பிப்பு வெளியானவுடன் இது இங்கே தானாகவே திறக்கப்படும்.

Set the bounds and drag the needle on the playground to see the arc across the small, medium, large, and Lock Screen families.