Display statistical result in a simple table, where the rows and columns are depending on the statistic result grouping.
Design View
In the visual editor, you can find the Table icon under the Charts component palette group.
You can drag and drop the widget in the grid, and then according to your needs configure the following sub-elements:
Statistic: the statistic whose values are to be displayed in the table.
Code View
Template Syntax
Below you can find some examples of how to use the component within a template.
<table-widget [title]="'Customer by Country'"> <statistic name="customerCount" [groupBy]="['country']"></statistic> </table-widget>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
<table-widget> | |
---|---|
PROPERTIES | |
Category Filter | The name of the filter used to transform category names.
Type: FILTER | Optional categoryFilter="FILTER" |
CSS Class | The name(s) of the CSS class used to customize the widget layout.
Type: STRING | Optional class="my-custom-class" |
Export Enabled | The boolean flag indicating whether the data export is enabled.
Type: BOOLEAN | Optional | Values: true false [exportEnabled]="true" |
Period Filter Enabled | The boolean flag indicating whether the embedded period filter is available.
Type: BOOLEAN | Optional | Values: true false [filterEnabled]="true" |
Query Variable | The id of the page's <things-filter-field> used for searching.
Type: STRING | Optional queryFieldRef="query-1" |
Title | The title displayed on the top part of the widget box.
Type: STRING | Optional [title]="'Details'" |
Value Filter | The name of the filter used to transform values.
Type: FILTER | Optional valueFilter="FILTER" |
Visibility Condition | The expression that allows you to reduce the visibility of the element.
Type: STRING | Optional *ngIf="getUser().organizationId != null" |
SUB-ELEMENTS | |
Statistic | The statistic whose values are to be displayed in the table. single | mandatory <statistic name="alertCount"></statistic> |
<statistic> | |
---|---|
PROPERTIES | |
Aggregated Property | The property aggregate when using the Property Aggregation statistic.
Type: PROPERTY | Optional property="serialNumber" |
Aggregation | The aggregation used to retrieve metric data.
Type: ENUM | Optional | Values: SUM MIN MAX AVG DELTA aggregation="MAX" |
Alert Category | The alert category used to filter the statistic results.
Type: ENUM_ARRAY | Optional | Values: INFORMATION ADVICE ANOMALY FAILURE SAFETY [category]="['ANOMALY', 'FAILURE']" |
Alert Severity | The alert severity used to filter the statistic results.
Type: ENUM_ARRAY | Optional | Values: INFORMATIONAL WARNING CRITICAL EMERGENCY [severity]="['WARNING', 'CRITICAL']" |
End Date Variable | The <period-field>'s End Variable filtering data by end date.
Type: STRING | Optional endDateFieldRef="toDate" [DEPRECATED] Use the Period Variable property instead. |
Filter | The name of the filter used to transform and display values.
Type: FILTER | Optional filter="fooBarFilter" |
Group By | The properties names used to group statistic results.
For instance: ['customer.country', 'location.properties.city'].
In the case where the underlying objects are temporally distributed you can also aggregate by HOUR, DAY, MONTH and YEAR.
Type: JSON | Optional [groupBy]="['MONTH', 'name']" |
Include Zero Values | The flag indicating whether to include or not the alerts with zero occurrences.
Type: BOOLEAN | Optional | Values: true false [includeZeroValues]="true" |
Max Result Count | The number of returned results (default all results are returned).
Type: INTEGER | Optional [limit]="123" |
Name | The statistic whose results(s) must be loaded by the widget.
Type: STATISTIC | Mandatory | Values: activeAlertCount activatedAlertCount alertCount alertCountByAlertDefinition thingCount thingPropertyAggregation locationCount customerCount userCount workSessionCount workSessionCount workSessionElapsedTime workSessionSumMetricValues name="alertCount" |
Period Variable | The id of the page's variable providing the date range filtering period, for instance the id of a <period-filter-field>.
Type: STRING | Optional periodRef="period" |
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.
Type: JSON | Optional [query]="[{'property': 'connectionStatus', 'predicate': 'eq', 'value': '1'}, {...}]" |
Start Date Variable | The <period-field>'s Start Variable filtering data by start date.
Type: STRING | Optional startDateFieldRef="fromDate" [DEPRECATED] Use the Period Variable property instead. |
Sum Metric | The work-session monitored metric to sum.
Type: STRING | Optional sumMetric="metrics.Pieces.DELTA" |
Thing Definition | The name of the thing-definition used to filter the statistic results.
Type: STRING | Optional thingDefinition="fooBar" |
Comments
0 comments
Please sign in to leave a comment.