Displays a pie chart with one slice for each referenced metric value or statistic result.
Template Syntax
Below you can find some examples of how to use the component within a template.
<pie-chart-widget title="Counters">
<metric name="Standby Hours"></metric>
<metric name="Rest Hours"></metric>
<metric name="Heating Hours"></metric>
</pie-chart-widget>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Pie Chart <pie-chart-widget>
Chart Options | The JSON configuring how the chart is rendered, for more details see the link:https://www.chartjs.org/docs/latest/general/responsive.html[Chart JS] documentation. Name: globalChartOptions Type: JSON | Optional
|
Color Filter | The filter function used to draw values using a common color palette. Name: colorFilter Type: FILTER | Optional
|
Title | The title displayed on the top part of the widget box. Name: title Type: STRING | Optional
|
Rendering | |
CSS Class | The name(s) of the CSS class used to customize the widget layout. Name: class Type: STRING | Optional
|
Height | The height of the widget (e.g. 250px). Name: height Type: STRING | Optional
|
Visibility Condition | The expression that allows you to reduce the visibility of the element. Name: *ngIf Type: STRING | Optional
|
Width | The width of the widget (e.g. 500px). Name: width Type: STRING | Optional
|
Sub Elements | |
The metric whose value must be rendered as a slice within the chart. | |
The statistic whose values must be rendered as a slices within the chart. |
Metric <metric>
Filter | The name of the filter used to transform and display values. Name: filter Type: FILTER | Optional
|
Label | The metric alternative label. Name: label Type: STRING | Optional
|
Name | The metric whose value(s) must be loaded by the widget. Name: name Type: METRIC | Required
|
Unit | The unit of measurement to be displayed along the value. Name: unit Type: STRING | Optional
|
Advanced | |
Visibility Condition | The expression that allows you to reduce the visibility of the element. Name: *ngIf Type: STRING | Optional
|
Statistic <statistic>
Aggregation | The function used to aggregate data. Name: aggregation Type: ENUM | Optional Values: AVG, COUNT, MAX, MIN, SUM
|
| The alert category used to filter the statistic results. Name: category Type: ENUM (multiple) | Optional Values: INFORMATION, ADVICE, ANOMALY, FAILURE, SAFETY
|
| The alert severity used to filter the statistic results. Name: severity Type: ENUM (multiple) | Optional Values: INFORMATIONAL, WARNING, CRITICAL, EMERGENCY
|
Alert Status | Define whether to include alerts that are still active, or have been activated in a period. Name: activationType Type: ENUM | Optional Values: ACTIVE, ACTIVATED
|
Averaged By | The count used to average the statistic results (e.g. Average alert count by thing). Name: averagedBy Type: ENUM | Optional Values: thingCount
|
| The <period-field>'s End Variable filtering data by end date. Name: endDateFieldRef Type: STRING | Optional
|
Group By | The property used to group results. For instance: customer.country. In the case where the underlying objects are temporally distributed you can also aggregate by HOUR, DAY, MONTH and YEAR. Name: groupBy Type: GROUP_BY | Optional
|
| The flag indicating whether to include or not the alerts with zero occurrences. Name: includeZeroValues Type: BOOLEAN | Optional Default Value: false
|
| The statistic whose results(s) must be loaded by the widget. Name: name Type: STATISTIC | Required
|
Property | The object property whose values must be aggregated. Name: property Type: PROPERTY | Optional
|
Resource | The resource from which to retrieve the items to be used to calculate the statistic. Name: resource Type: ENUM | Required Values: ACTION, ALERT, CUSTOMER, LOCATION, PARTNER, THING, USER, WORK_SESSION Default Value:
|
Sorting | The sort direction used to order categories by value (default none). Name: sortDirection Type: ENUM | Optional Values: ASC, DESC
|
| The <period-field>'s Start Variable filtering data by start date. Name: startDateFieldRef Type: STRING | Optional
|
| The work-session monitored metric to sum. Name: sumMetric Type: STRING | Optional
|
| The name of the thing-definition used to filter the statistic results. Name: thingDefinition Type: STRING | Optional
|
Value Filter | The name of the filter used to transform and display values. Name: filter Type: FILTER | Optional
|
Data | |
Max Result Count | The number of maximum returned results (default all results are returned). Name: limit Type: INTEGER | Optional
|
Period Variable | The id of the page's variable providing the date range filtering period, for instance the id of a <period-filter-field>. Name: periodRef Type: STRING | Optional
|
Query | The array of conditions filtering out items. For instance: [query]='[{'property': 'connectionStatus', 'predicate': 'eq', 'value': '1'}]' Predicates: eq, beginsWith, like, notLike, isEmpty, isNotEmpty, gt, gte, lt, lte. Name: query Type: QUERY | Optional Predicates: beginsWith, eq, neq, gt, gte, isEmpty, isNotEmpty, lt, lte, like, notLike
|