visible

General Tab for more information about visibility.

Specifies the visibility of the component. This property can be used to dynamically hide elements in a Dashboard.

Type

Boolean

true: display the component
false: hide the component

Example

Hide or show text based on Gauge value
if (Gauge1.value > 200) {
  Text1.text = 'Too high!';
  Text1.visible = true;
}
else if (Gauge1.value < 50) {
  Text1.text = 'Too low!';
  Text1.visible = true;
}
else {
  Text1.visible = false;
}

Either syntax below can be used in component script:

visible               // unqualified
Component1.visible    // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.