Metric
Type: metric
Dashboard metric card with formatted value.
Supports children: No
Metric card for dashboards. Shows a single large formatted value from SQL, $param substitution in value, or a static value.
Example — SQL
{
"type": "metric",
"props": {
"sql": "SELECT COUNT(*) FROM {{my_udf}}",
"label": "Total Records",
"format": "compact"
}
}
Example — static / param
{
"type": "metric",
"props": {
"value": "$record_count",
"label": "Records",
"suffix": " rows",
"format": "comma"
}
}
Every widget is defined as { "type": "metric", "props": { ... } }. The properties below describe the props object.
Props
Loading ....
Raw schema
Download the full schema file: /widget-schema/metric.json