{}OPF
DocsObject referenceEdit on GitHub

Metric

Metric content with optional display metadata. Use 'value' for the primary value, 'label' for the metric name, 'description' for supporting context, 'unit' for a suffix/currency marker, 'delta' for change, and…

Metadata

Definition

#/$defs/Metric

Type

object

Source

spec/schemas/opf.schema.json

Fields

FieldTypeReqDescription
valuestring | numberyesPrimary metric value.
labelstringMetric label.
descriptionstringOptional supporting context for the metric.
unitstringMetric unit, suffix, or currency marker.
deltastring | numberMetric change value.
trendenumMetric trend direction.

value

Type: string | number · Required · Default:

Primary metric value.

value.json
{
  "value": 42
}

label

Type: string · Optional · Default:

Metric label.

label.json
{
  "label": "Revenue"
}

description

Type: string · Optional · Default:

Optional supporting context for the metric.

description.json
{
  "description": "Recognized revenue for the quarter."
}

unit

Type: string · Optional · Default:

Metric unit, suffix, or currency marker.

unit.json
{
  "unit": "%"
}

delta

Type: string | number · Optional · Default:

Metric change value.

delta.json
{
  "delta": "+12%"
}

trend

Type: enum · Optional · Default:

Metric trend direction.

trend.json
{
  "trend": "up"
}