Stat Counter
Example
API Methods
setBackground
Sets the background for StatCounter.
- Method
- Usage
setBackground(background: object): void
// Sets the background to statcounter only using RGBA color code
a8forms.StatCounter("statcounter").setBackground({ r: "206", b: "48", g: "226", a: "0.7" })
setColor
Sets the background for StatCounter.
- Method
- Usage
setColor(color: object): void
// Sets the color using RGBA color code
a8forms.StatCounter("StatCounter").setColor({ r: "206", b: "48", g: "226", a: "0.7" })
setLabel
Sets the label of the field.
- Method
- Usage
setLabel(label: string): void
// Sets the field's label to 'My Text'
a8forms.StatCounter("statCounterId").setLabel('My Text')
setSize
Sets the size only by using the parameters passed in.
- Method
- Usage
setSize(size: "small" | "medium" | "large"): void
//Sets the size of the StatCounter to small
a8forms.StatCounter("statCounterId").setSize("small")
//Sets the size of the StatCounter to medium
a8forms.StatCounter("statCounterId").setSize("medium")
//Sets the size of the StatCounter to large
a8forms.StatCounter("statCounterId").setSize("large")
setValue
Sets the value of a field.
- Method
- Usage
setValue(data: string): void
// Sets the value of a text field
a8forms.StatCounter("statCounterId").setValue('A Text Value');
setVisibility
Sets if elements of the given category is visible in this view.
- Method
- Usage
setVisibility(visible: boolean): void
// setting the visibility true makes the element visible
a8forms.StatCounter("statCounterId").setVisibility(true)
// setting the visibility false makes the element invisible
a8forms.StatCounter("statCounterId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Hides the string
a8forms.StatCounter("statcounterId").setVisibilityCondition("1 == 1");