Discrete Gauges¶
Discrete gauges are widgets that represent discrete scalar values. The range value is divided into a defined number of blocks, and each block has a specific customizable graphical layout.
Users can choose the most appropriate block according to the number of output needed.
For instance, if users need to represent a binary value, the most suitable gauge is the Like, as it has only 2 outputs.
The Discrete gauges only have one tab, which is the INPUT tab.
Below, users can find the detailed description of the available options and their corresponding GOLD references.
Note
The Discrete gauges options cannot be parametrized.
Subsection |
Option |
Description |
GOLD ref |
---|---|---|---|
Input Options |
Attribute |
It shows the attribute name and type. |
|
Aggregate operator |
It defines the operation users want to perform on data to obtain the final scalar value. This value will now be classified according to the filter definition. |
input |
|
State Options |
Label |
It shows the possible graphical outputs of the gauge. |
input |
Filter |
By clicking on the SET FILTER button, a configuration window will appear. Check the instructions to set filters for the attribute type you dragged onto the gauge here. |
|
|
Code |
Here the filter code will be shown. |
Once all configurations have been set, click APPLY to ultimate the process.
As a result, according to the outcomes of the operation, the gauge will inherit the output that was previously associated to a certain condition.
Note
One of the labels will necessarily remain unselected, so that if none of the conditions is satisfied, the gauge will take on the aspect of the remaining unset label. Users can specify which Label will remain unset in the INPUT window.
Most of the values in the Layout options window are common to all the Discrete gauges, except for some features related to the graphical aspect of each specific gauge, which are explained in detail in the section below.
Traffic Light¶
By default, this gauge has the aspect of a traffic light with a green light on.
According to the results related to the filters and the conditions set by the user, the colors of the traffic light will vary.
The three possible outputs are: red, yellow and green color.
Like¶
By default, this gauge has the aspect of a thumbs up.
According to the results related to the filters and the conditions set by the user, the thumb position will vary.
The two possible outputs are: thumbs up and thumbs down.
Weather¶
By default, this gauge has the aspect of a sun.
According to the results related to the filters and the conditions set by the user, the weather icon will vary.
The seven possible outputs are: stormy, heavy rain, rainy, cloudy, slightly cloudy, slightly sunny and sunny.
Rulebot¶
By default, this gauge has the aspect of a happy green Rulex Platform icon.
According to the results related to the filters and the conditions set by the user, the color and the mood of the Rulebot will vary.
The possible five outputs are: sad and red, slightly sad and orange, neutral and blue, neutral and light-green, happy and green.
Discrete Gauge Schema¶
A discrete gauge is completely described through a JSON object composed by 3 different areas:
input, retaining the information about the linked attributes.
options, retaining all the graphical and functional options which require a re-evaluation of the gauge value.
data, the gauge output value and relative information.
The whole JSON object is saved as a GOLD dictionary in the layout field of the Gauge class.
The schema of the JSON object is presented in YAML format commented. The name of the discrete gauge on the external level means the part contained is custom for the current gauge type.
trafficlight:
input:
table: #table of the attribute used
attr: #name of the attribute used
type: #type of the attribute used
forcedType: #the type of the attribute expected as result of the aggregation function
aggrfunc: #set an aggregation function
formula: #set a custom gold formula
filter: #object that controls the different filters
red: #array that contain filter's informations that shows the red light
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
yellow: #array that contain filter's informations that shows the yellow light
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
green: #array that contain filter's informations that shows the green light
- #set the filter
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
data:
red: #value used to manage the red light
yellow: #value used to manage the yellow light
green: #value used to manage the green light
like:
input:
table: #table of the attribute used
attr: #name of the attribute used
type: #type of the attribute used
forcedType: #the type of the attribute expected as result of the aggregation function
aggrfunc: #set an aggregation function
formula: #set a custom gold formula
filter: #object that controls the different filters
like: #array that contain filter's informations that shows the like icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
dislike: #array that contain filter's informations that shows the dislike icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
data:
like: #value used to manage the like icon
dislike: #value used to manage the dislike icon
weather:
input:
table: #table of the attribute used
attr: #name of the attribute used
type: #type of the attribute used
forcedType: #the type of the attribute expected as result of the aggregation function
aggrfunc: #set an aggregation function
formula: #set a custom gold formula
filter: #object that controls the different filters
sun: #array that contain filter's informations that shows the sun icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function #array that contain filter's informations that shows the dislike icon
suncloud: #array that contain filter's informations that shows the suncloud icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
cloudsun: #array that contain filter's informations that shows the cloudsun icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
cloud: #array that contain filter's informations that shows the cloud icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
rain: #array that contain filter's informations that shows the rain icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
rain2: #array that contain filter's informations that shows the rain2 icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
thunder: #array that contain filter's informations that shows the thunder icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
data:
sun: #value used to manage the sun icon
suncloud: #value used to manage the suncloud icon
cloudsun: #value used to manage the cloudsun icon
cloud: #value used to manage the cloud icon
rain: #value used to manage the rain icon
rain2: #value used to manage the rain2 icon
thunder: #value used to manage the thunder icon
flow:
input:
table: #table of the attribute used
attr: #name of the attribute used
type: #type of the attribute used
forcedType: #the type of the attribute expected as result of the aggregation function
aggrfunc: #set an aggregation function
formula: #set a custom gold formula
filter: #object that controls the different filters
superhappy: #array that contain filter's informations that shows the superhappy icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function #array that contain filter's informations that shows the dislike icon
happy: #array that contain filter's informations that shows the happy icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
neutral: #array that contain filter's informations that shows the neutral icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
sad: #array that contain filter's informations that shows the sad icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
supersad: #array that contain filter's informations that shows the supersad icon
- #set the filter if exist
- #set the same filter but with the attribute value wrapped between round brackets with the selected aggregation function
data:
superhappy: #value used to manage the superhappy icon
happy: #value used to manage the happy icon
neutral: #value used to manage the neutral icon
sad: #value used to manage the sad icon
supersad: #value used to manage the supersad icon
options:
type: #the discrete gauge widget type