2019-01-09 20:38:09 +08:00
|
|
|
---
|
|
|
|
category: Components
|
|
|
|
type: Data Display
|
|
|
|
title: Statistic
|
2020-05-31 11:48:34 +08:00
|
|
|
cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
|
2019-01-09 20:38:09 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
Display statistic number.
|
|
|
|
|
|
|
|
## When To Use
|
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
- When want to highlight some data.
|
|
|
|
- When want to display statistic data with description.
|
2019-01-09 20:38:09 +08:00
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
#### Statistic
|
|
|
|
|
2022-06-13 14:03:43 +08:00
|
|
|
| Property | Description | Type | Default | Version |
|
|
|
|
| ---------------- | ----------------------------- | -------------------- | ------- | ------- |
|
|
|
|
| decimalSeparator | The decimal separator | string | `.` | |
|
|
|
|
| formatter | Customize value display logic | (value) => ReactNode | - | |
|
|
|
|
| groupSeparator | Group separator | string | `,` | |
|
|
|
|
| loading | Loading status of Statistic | boolean | false | 4.8.0 |
|
|
|
|
| precision | The precision of input value | number | - | |
|
|
|
|
| prefix | The prefix node of value | ReactNode | - | |
|
|
|
|
| suffix | The suffix node of value | ReactNode | - | |
|
|
|
|
| title | Display title | ReactNode | - | |
|
|
|
|
| value | Display value | string \| number | - | |
|
|
|
|
| valueStyle | Set value css style | CSSProperties | - | |
|
2019-01-09 20:38:09 +08:00
|
|
|
|
|
|
|
#### Statistic.Countdown
|
|
|
|
|
2021-03-01 19:20:48 +08:00
|
|
|
| Property | Description | Type | Default | Version |
|
|
|
|
| --- | --- | --- | --- | --- |
|
2022-06-13 14:03:43 +08:00
|
|
|
| format | Format as [dayjs](https://day.js.org/) | string | `HH:mm:ss` | |
|
2021-03-01 19:20:48 +08:00
|
|
|
| prefix | The prefix node of value | ReactNode | - | |
|
|
|
|
| suffix | The suffix node of value | ReactNode | - | |
|
|
|
|
| title | Display title | ReactNode | - | |
|
2022-06-13 14:03:43 +08:00
|
|
|
| value | Set target countdown time | number \| dayjs | - | |
|
2021-03-01 19:20:48 +08:00
|
|
|
| valueStyle | Set value css style | CSSProperties | - | |
|
|
|
|
| onFinish | Trigger when time's up | () => void | - | |
|
2021-05-24 16:24:00 +08:00
|
|
|
| onChange | Trigger when time's changing | (value: number) => void | - | 4.16.0 |
|