kor TürkçeGitHub

Stat

Shows a metric with an optional change and sparkline.

kor/ui/StatSource

When to use

  • Use one tile for a measure people check frequently.

Examples

A single metric

Loading the example

<k:Stat label="Open shipments" value="56"/>

Lead time and its trend

Loading the example

<k:Stat label="Average lead time" value="4.8" decimals="1" unit="days"
delta="-12" upIsGood="false" note="Compared with last week" trend="{/days}" press=".onPress"/>

API

Properties

NameTypeDefaultDescription
labelstringMetric label
valuefloat0Numeric value
decimalsint0Number of decimal places
unitstringUnit
deltafloat0Percentage change. Zero hides the change
upIsGoodbooleantrueWhether an increase is favorable
notestringExplanation of the change
trendobjectValues for the sparkline
herobooleanfalseWhether to use the larger presentation

Events

NameTypeDescription
pressThe metric was pressed

Related

TrendStatus