Stats
The "Stats" component lets you easily illustrate "statistical data" with a graph-style icon (available in different visuals). Moreover, the component comes with a text label option to provide extra information about the data.
You can use the following syntax in the onClick
of another component (such as a Button) to set the stats.
onClick
setBindParams("stats", { content: "List", rate: "10%", direction: "up", description: "Last one Month" })
Result
Stats Properties
Property | Description |
---|---|
Title | This text will be set as the title for the component. |
Width | Changes the width of the widget. |
Icon | Choose between the available icon options. |
API Methods
setVisibility
Sets the Visibility flag for this component.
- Method
- Usage
setVisibility(visible: boolean): void
// Setting the visibility to "true" makes the element visible
a8forms.Stats("statsId").setVisibility(true)
// Setting the visibility to "false" makes the element invisible
a8forms.Stats("statsId").setVisibility(false)
setVisibilityCondition
Sets the visibility condition for this component.
- Method
- Usage
setVisibilityCondition(condition: string): void
// Sets a condition for changing the element's visibility status.
a8forms.Stats("statsId").setVisibilityCondition("1 === 1");