Bulb Gauges are used to indicate a specific dataset by utilizing a circle that changes color to indicate whether the monitored data is within the defined limits and if it is, then which limit does the data belong to. Colors can be selected to suit the application such as green for satisfactory, yellow for caution, and red for alarm.
In this section, you will be shown how you can create a simple bulb gauge.
Creating a Simple Bulb Gauge
For our example, we will create a bulb gauge that monitors the temperature status of deep freezers.
To create a bulb gauge, you need to:
Define the lower and upper limits (also known as the minimum and maximum values) for the gauge scale. For our example, we will set the lower limit to -60 and the upper limit to -5.
Divide the temperature values into pre-determined ranges, as shown below:
Limits | Range Name | Color used to represent the Range |
---|---|---|
-60°C to -35°C | Mission control, we have a situation! | Red |
-35°C to -25°C | Something is just not right! | Orange |
-25°C to -5°C | All well ahoy! | Green |
- Decide a data value to indicate the present temperature status. For our example, we will set the temperature to -5.
A bulb gauge created to monitor the temperature status of deep freezers looks like this:
Given below is a brief description of the attributes used to create a simple bulb gauge:
Attribute Name | Description |
---|---|
lowerLimit |
It is used to specify the lower limit, or the minimum value, of the gauge scale, eg. -60. |
upperLimit |
It is used to specify the upper limit, or the maximum value, of the gauge scale, eg. -5. |
numberSuffix |
It is used to specify the character which will be appended to the end of the number, eg. °C. |
The data structure needed to create a bulb gauge to monitor the temperature level is given below:
There! You have now seen how you can create a simple bulb gauge.