Perspective - Thermometer
Component Palette Icon:
Description​
The Thermometer component displays a temperature value depicted as a level in a mercury thermometer. Temperature intervals can be defined with their own colors so that the mercury color changes based on the temperature range. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
Properties​
Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.
| Name | Description | Property Type |
|---|---|---|
| thermometerColor | Color of the outline of the thermometer. Default is black. | color |
| mercuryColor | Color of the mercury. See Color Selector. | color |
| axisLabelColor | The color of the thermometer's y-axis label. Default is black. See Color Selector. | color |
| strokeWidth | Width of the lines used to draw the thermometer in pixels. | value: numeric |
| highBound | The high boundary value for the whole thermometer. | value: numeric |
| lowBound | The lower boundary value for the whole thermometer. | value: numeric |
| value | The value to display in the thermometer. The mercury level and value label will change to reflect this. | value: numeric |
| unit | A string to describe the units for the current value label. Options are "F" for Fahrenheit or "C" for Celsius. | value: string dropdown |
| valueFontcolor | The color of the current value. See Color Selector. | color |
| valueFont | The font to use for the current value label.Â
| object |
| intervals | Defines the upper and lower temperature range for each interval.Â
| object |
| style | Sets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class. | object |
Component Scripts and Events​
Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:
- Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.
- Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.
Example​

| Property | Value |
|---|---|
| props.unit | F |
| props.mercuryColor | #8AFF8A |
| props.intervals.1.high | 45 |
| props.intervals.0.color | #0000FF |
| props.intervals.1.color | #CCCCFF |
| props.intervals.2.color | #FF0000 |
| props.intervals.2.low | 85 |
| props.value | 90 |