KPI cards and progress gauges

KPI cards and progress gauges

Multiple KPI Cards and Progress Gauges on a page give administrators dashboard building capability without charts. Combine them with the Dashboard container for a grid layout.

KPI card

Displays one aggregate: "12 Open Cases", "£42,750 Outstanding", "86% Complete".

Setting Key Notes
Label, icon label, icon, iconClass, description Icon classes come from the FontAwesome library loaded by the portal
Metric objectName, function, field, filter COUNT needs no field; SUM and AVG need a numeric field
Period dateField, period TODAY, THIS_WEEK, THIS_MONTH, THIS_QUARTER, THIS_YEAR, LAST_N_DAYS:n, LAST_N_MONTHS:n
Comparison compare, trendInverse, comparisonLabel Compares with the previous period of the same length and shows the trend
Format format, currency, scale, prefix, suffix number, currency, percent, compact, duration (minutes)
Thresholds thresholds[] { operator, value, class } applied to the value, for example gt 10 -> text-error
Refresh refreshSeconds Auto refresh, minimum 10 seconds
Click link page, url or event
{
    "type": "kpi-card",
    "label": "Outstanding",
    "objectName": "Invoice__c",
    "function": "SUM",
    "field": "Balance__c",
    "filter": "Account__c = :contactUser.AccountId AND Status__c != 'Paid'",
    "format": "currency",
    "currency": "GBP",
    "icon": "fa-solid fa-file-invoice",
    "thresholds": [{ "operator": "gt", "value": 10000, "class": "text-error" }],
    "dateField": "Due_Date__c",
    "period": "THIS_MONTH",
    "compare": true,
    "trendInverse": true
}

Progress gauge

Communicates progression toward a target: onboarding 7/10, fundraising 76%, compliance 92%, spend versus budget.

Setting Key Notes
Current value objectName, function, field, filter, dateField, period Same metric definition as the KPI card
Target target A fixed number, or an object { objectName, function, field, filter } for a second aggregate
Style style bar, radial or steps
Format format, currency, prefix, suffix, showRemaining
Thresholds thresholds[] { below: 50, color: 'error' } rules on the percentage; defaults to error under 50, warning under 80, success otherwise
{
    "type": "progress-gauge",
    "label": "Onboarding",
    "objectName": "Onboarding_Step__c",
    "function": "COUNT",
    "filter": "Contact__c = :contactUser.Id AND Status__c = 'Complete'",
    "target": { "objectName": "Onboarding_Step__c", "function": "COUNT", "filter": "Contact__c = :contactUser.Id" },
    "style": "radial",
    "showRemaining": true
}

Both components show a log in prompt when the metric is scoped to the logged in contact and there is no session.