Statistics

Updated at:

Introduction

The Statistic component is a basic Moflow component that displays statistical values.

image

Configuration items

Category

Configuration

Example

Description

Content

Title

The title of the statistic.

Mode

The component has two modes: static and countdown.

Deadline

image

The deadline for the countdown mode. The value is the timestamp of the deadline.

Date format

The date format for the countdown mode.

Value

The value displayed in static mode.

Decimal point style

The style of the decimal point in static mode.

Thousands separator style

The style of the thousands separator in static mode.

Extended configuration

Prefix text

The prefix text.

Suffix text

The suffix text.

Prefix icon

The prefix icon.

Suffix icon

The suffix icon.

Interaction

Hide

Hides the component. For more information, see Common Properties.

Keep layout when hidden

Keeps the layout when the component is hidden. For more information, see Common Properties.

Load

Displays the loading state.

Style

Margin

The margin of the component. For more information, see Common Properties.

Position

The position of the component in the container. Options are left, center, and right.

CSS Style

Value text color

The color of the value text.

Properties and methods

Name

Type

Example

Description

value

number

statistic.value

The current value of the statistic component.

title

string

statistic.title

The current title of the statistic component.

counter

string

statistic.counter

The current countdown time of the statistic component.

hidden

boolean

statistic.hidden

Specifies whether the component is hidden.

clearHidden

func

statistic.clearHidden()

Clears the `hidden` value of the component.

clearValue

func

statistic.clearValue()

Clears the value of the statistic component.

setHidden

func

statistic.setHidden()

Sets the `hidden` value of the component.

setValue

func

statistic.setValue(9999)

Sets the value of the statistic component.