Skip to content

Statistic

<ax-statistic> displays a labeled metric with optional prefix/suffix, locale-aware number formatting, and a trend indicator.

import { AxStatisticComponent } from '@axisui-ng/data';
<ax-statistic label="Revenue" [value]="48230" prefix="$" [trend]="12.5" />
<ax-statistic
label="Conversion"
[value]="0.182"
[formatOptions]="{ style: 'percent', maximumFractionDigits: 1 }"
/>
InputTypeDefaultNotes
labelstring''Caption above the value.
valuenumber | string0The metric; numbers are formatted via Intl.NumberFormat.
prefixstring''Text before the value (e.g. $).
suffixstring''Text after the value (e.g. ms).
localestring | undefinedundefinedBCP-47 locale for formatting.
formatOptionsIntl.NumberFormatOptions | nullnullPassed to Intl.NumberFormat for numeric values.
trendnumber | nullnullPercent change; positive → up/success, negative → down/destructive; null hides the row.

The label and value read together as a single labeled figure. The trend row has an aria-label of up|down {magnitude} and the arrow icon is aria-hidden, so direction isn’t conveyed by color alone.

Interactive examples live in Storybook under Data / Statistic. Run pnpm storybook to explore them.