Portal Community

Minimal Example

{
  "id": "budget-used",
  "type": "gauge-linear",
  "label": "Budget Used",
  "width": "full",
  "settings": {
    "min": 0,
    "max": 500000,
    "unit": "$",
    "format": "currency",
    "value": { "source": "$context", "path": "budget.spent" }
  }
}

Settings Reference

SettingTypeDefaultDescription
minnumber0Minimum value of the scale
maxnumber100Maximum value of the scale
valueBindingConfig | numberScalar value binding, or a static number
directionhorizontal | verticalhorizontalBar orientation
heightstring (CSS)"20px"Bar thickness (horizontal) or total height (vertical)
showValuebooleantrueShow the current numeric value as a label
showPercentbooleanfalseShow percentage instead of raw value
unitstringUnit suffix appended to the value label
formatstringValue format: number, currency, percent
zonesGaugeZone[]Colour bands: [{ from, to, color }]
thresholdsnumber[]Vertical marker lines at specific values (e.g. budget target)
thresholdColorstring"#ef4444"Colour of threshold marker lines
barColorstring"#6c8cff"Bar fill colour when no zones are defined
trackColorstring"#e5e7eb"Background track colour
roundedbooleantrueRound the bar ends

Budget Tracker with Threshold

{
  "id": "budget-gauge",
  "type": "gauge-linear",
  "settings": {
    "min": 0,
    "max": 500000,
    "format": "currency",
    "showValue": true,
    "thresholds": [400000],
    "thresholdColor": "#f59e0b",
    "zones": [
      { "from": 0,      "to": 400000, "color": "#22c55e" },
      { "from": 400000, "to": 500000, "color": "#ef4444" }
    ],
    "value": { "source": "$context", "path": "budget.spent" }
  }
}

Multi-Row KPI Progress List

Combine multiple linear gauges stacked vertically for a compact KPI progress panel. Each gauge is bound to a different metric:

// Four stacked metrics — each "full" width
{
  "id": "cpu-gauge",
  "type": "gauge-linear",
  "label": "CPU Usage",
  "width": "full",
  "settings": {
    "min": 0, "max": 100, "unit": "%",
    "showPercent": true,
    "zones": [
      { "from": 0,  "to": 70, "color": "#22c55e" },
      { "from": 70, "to": 90, "color": "#f59e0b" },
      { "from": 90, "to": 100, "color": "#ef4444" }
    ],
    "value": { "source": "$context", "path": "server.cpuPercent" }
  }
},
{
  "id": "memory-gauge",
  "type": "gauge-linear",
  "label": "Memory Usage",
  "width": "full",
  "settings": {
    "min": 0, "max": 32768, "unit": "MB",
    "zones": [
      { "from": 0,     "to": 24576, "color": "#22c55e" },
      { "from": 24576, "to": 32768, "color": "#ef4444" }
    ],
    "value": { "source": "$context", "path": "server.memoryMb" }
  }
},
{
  "id": "disk-gauge",
  "type": "gauge-linear",
  "label": "Disk Usage",
  "width": "full",
  "settings": {
    "min": 0, "max": 100, "unit": "%",
    "barColor": "#8b5cf6",
    "value": { "source": "$context", "path": "server.diskPercent" }
  }
}

Vertical Gauge

Set direction: "vertical" for a tall bar that fills from the bottom. Useful for tank or capacity displays:

{
  "id": "queue-depth",
  "type": "gauge-linear",
  "width": "quarter",
  "settings": {
    "direction": "vertical",
    "height": "200px",
    "min": 0,
    "max": 1000,
    "showValue": true,
    "zones": [
      { "from": 0,   "to": 700,  "color": "#22c55e" },
      { "from": 700, "to": 1000, "color": "#ef4444" }
    ],
    "value": { "source": "$context", "path": "queue.depth" }
  }
}

Radial vs Linear Gauge

ScenarioRadial GaugeLinear Gauge
Single prominent KPIBest — large, visual impactAcceptable
Multiple KPIs in a listToo largeBest — compact rows
Progress toward targetPossibleBest — feels like a progress bar
Score with zones (NPS, SLA)Best — coloured arcGood — coloured segments
Narrow column layoutRequires square spaceBest — flexible width