Displays the value of a metric in a box, highlighting the severity and the increase from the previous value.
The widget is subdivided into the following sections, each one providing different information.
HEADER: provide the information about the displayed data, including an icon, the title and a description (optional).
MAIN VALUE: the main value to be displayed, which can be provided by a metric or statistic, even aggregated across multiple things (max 500), locations, and customers. The value can be colored according to the severity of the dictionary item or threshold.
DETAILS BAR: describes the quality of the value and, if present, at what threshold it lies
PREVIOUS VALUE: the value, which can be the previous value or, in the case of aggregation, the value calculated using the previous period (e.g. This Month VS Last Month).
You can decide whether to display the absolute value or the increment, which can be colored according to whether it is positive or negative.LAST UPDATE: the timestamp related to the last update of the main value.
Below are some examples with different configurations.
For more details about how to define dictionary and thresholds, you can refer to the following articles:
Property: define dictionary and thresholds for properties.
Metric: define dictionary and thresholds for metric.
Template Syntax
Below you can find some examples of how to use the component within a template.
Example 1
Displays the current value of running hours.
<value-widget>
<metric name="Running Hours" filter="millisToHours"></metric>
</value-widget>
Example 2
Displays the number of pieces produced in a selected period from a set of things.
<period-field></period-field>
<search-field id="machinesFilter" context="THINGS"></search-field>
<value-widget aggregation="DELTA"
periodRef="period"
queryFieldRef="machinesFilter"
showIncrement="RELATIVE">
<metric name="thing.Total Pieces"></metric>
</value-widget>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Value <value-widget> | |
---|---|
PROPERTIES | |
Aggregation | The aggregation applied on the underlying data. LAST_VALUE SUM MIN MAX AVG DELTA
|
CSS Class | The name(s) of the CSS class used to customize the widget layout. |
Description | The description text to be displayed as tooltip on the link element. |
Details Button Icon | The Angular Material icon displayed inside the details button. |
Icon | The Google Fonts icon name to be displayed within the widget. |
Increment Style | Indicates whether an increase in value compared to the previous period should be displayed as positive or negative. POSITIVE NEGATIVE
|
Mode | The way the details is opened. EMBEDDED POPUP
|
Period | The default period to use when computing aggregated value. LAST_24H LAST_7_DAYS LAST_30_DAYS THIS_MONTH THIS_YEAR
|
Period Variable | The id of the page's variable providing the date range filtering period, for instance the id of a <period-filter-field>. |
Popup Title | The title displayed on the top part of the popup. |
Query Variable | The id of the page's <things-filter-field> used for searching. |
Show Colors | Indicates whether the widget must be colored according to the severity of the value, else it is black and white. true false
|
Show Details Bar | It displays a colored bar that provides additional information about the value and its severity. true false
|
Show Increment | Indicates whether and how to show the value calculated over the previous period. NONE ABSOLUTE PERCENTAGE ABSOLUTE_AND_PERCENTAGE PERCENTAGE_ABSOLUTE
|
Show Last Update | Indicates whether to show or hide the last update timestamp. true false
|
Show Previous Value | Indicates whether the severity should be used to highlight the value. true false
|
Show Title | Indicates whether the title is visible. true false
|
Template | The name of the template to display. |
Title | The title displayed on the top part of the widget box. |
Value Mode | The mode used to display the value. ICON_AND_VALUE ICON_AND_LABEL VALUE LABEL ICON NONE
|
Visibility Condition | The expression that allows you to reduce the visibility of the element. |
SUB-ELEMENTS | |
Metric | The metric whose current value must be displayed within the widget. |
Statistic | The statistic whose current value must be displayed within the widget. |
Property | The property whose current value must be displayed within the widget. |
Metric <metric> | |
---|---|
PROPERTIES | |
Filter | The name of the filter used to transform and display values. |
Name | The metric whose value(s) must be loaded by the widget. |
Unit | The unit of measurement to be displayed along the value. |
Statistic <statistic> | |
---|---|
PROPERTIES | |
Aggregation | The function used to aggregate data. AVG COUNT MAX MIN SUM
|
Alert Status | Define whether to include alerts that are still active, or have been activated in a period. ACTIVE ACTIVATED
|
Averaged By | The count used to average the statistic results (e.g. Average alert count by thing). thingCount
|
Filter | The name of the filter used to transform and display values. |
Label | The alternative label displayed by the widget. |
Property | The object property whose values must be aggregated. |
Query | The array of conditions filtering out items. |
Resource | The resource from which to retrieve the items to be used to calculate the statistic. ACTION ALERT CUSTOMER LOCATION PARTNER THING USER WORK_SESSION
|
Unit | The unit of measurement to be displayed along the value. |
Property <property> | |
---|---|
PROPERTIES | |
Filter | The name of the filter used to transform and display values. |
Name | The property whose value must be loaded by the widget. |
Unit | The unit of measurement to be displayed along the value. |
Limits
The aggregation of metric data over multiple things works on a maximum of 500 things.