Table

Prev Next

Display statistical result in a simple table, where the rows and columns are depending on the statistic result grouping.

Table

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 <table-widget>

Category Filter

The name of the filter used to transform category names.

Name: categoryFilter

Type: FILTER | Optional

categoryFilter="dateFormat"

Export Enabled

The boolean flag indicating whether the data export is enabled.

Name: exportEnabled

Type: BOOLEAN | Optional

Default Value: false

[exportEnabled]="true"

Period Filter Enabled

The boolean flag indicating whether the embedded period filter is available.

Name: filterEnabled

Type: BOOLEAN | Optional

Default Value: false

[filterEnabled]="true"

Query Variable

The id of the page's <things-filter-field> used for searching.

Name: queryFieldRef

Type: STRING | Optional

queryFieldRef="query-1"

Title

The title displayed on the top part of the widget box.

Name: title

Type: STRING | Optional

[title]="'Details'"

Value Filter

The name of the filter used to transform values.

Name: valueFilter

Type: FILTER | Optional

valueFilter="dateFormat"

Rendering

CSS Class

The name(s) of the CSS class used to customize the widget layout.

Name: class

Type: STRING | Optional

class="my-custom-class"

Visibility Condition

The expression that allows you to reduce the visibility of the element.

Name: *ngIf

Type: STRING | Optional

*ngIf="getUser().organizationId != null"

Sub Elements

Statistic

The statistic whose values are to be displayed in the table.

Statistic <statistic>

Aggregation

The function used to aggregate data.

Name: aggregation

Type: ENUM | Optional

Values: AVG, COUNT, MAX, MIN, SUM

aggregation="AVG"

Alert Category/

The alert category used to filter the statistic results.

Name: category

Type: ENUM (multiple) | Optional

Values: INFORMATION, ADVICE, ANOMALY, FAILURE, SAFETY

DEPRECATED

Define a condition into the query property

[category]="['INFORMATION', 'ADVICE']"

Alert Severity/

The alert severity used to filter the statistic results.

Name: severity

Type: ENUM (multiple) | Optional

Values: INFORMATIONAL, WARNING, CRITICAL, EMERGENCY

DEPRECATED

Define a condition into the query property.

[severity]="['INFORMATIONAL', 'WARNING']"

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

activationType="ACTIVE"

Averaged By

The count used to average the statistic results (e.g. Average alert count by thing).

Name: averagedBy

Type: ENUM | Optional

Values: thingCount

averagedBy="thingCount"

End Date Variable/

The <period-field>'s End Variable filtering data by end date.

Name: endDateFieldRef

Type: STRING | Optional

DEPRECATED

Use the Period Variable property.

endDateFieldRef="toDate"

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

groupBy="customer.name"

Include Zero Values/

The flag indicating whether to include or not the alerts with zero occurrences.

Name: includeZeroValues

Type: BOOLEAN | Optional

Default Value: false

DEPRECATED

This feature is no longer supported.

[includeZeroValues]="true"

Name/

The statistic whose results(s) must be loaded by the widget.

Name: name

Type: STATISTIC | Required

DEPRECATED

Use the Resource, and select the Aggregation and Property to aggregate.

name="alertCount"

Property

The object property whose values must be aggregated.

Name: property

Type: PROPERTY | Optional

property="propName"

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:

resource="ACTION"

Sorting

The sort direction used to order categories by value (default none).

Name: sortDirection

Type: ENUM | Optional

Values: ASC, DESC

sortDirection="ASC"

Start Date Variable/

The <period-field>'s Start Variable filtering data by start date.

Name: startDateFieldRef

Type: STRING | Optional

DEPRECATED

Use the Period Variable property instead.

startDateFieldRef="fromDate"

Sum Metric/

The work-session monitored metric to sum.

Name: sumMetric

Type: STRING | Optional

DEPRECATED

Use the Resource property and select the Aggregation and the Property to aggregate.

sumMetric="metrics.Pieces.DELTA"

Thing Definition/

The name of the thing-definition used to filter the statistic results.

Name: thingDefinition

Type: STRING | Optional

DEPRECATED

Define a condition into the query property

thingDefinition="abc"

Value Filter

The name of the filter used to transform and display values.

Name: filter

Type: FILTER | Optional

filter="fooBarFilter"

Data

Max Result Count

The number of maximum returned results (default all results are returned).

Name: limit

Type: INTEGER | Optional

limit="123"

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

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.

Name: query

Type: QUERY | Optional

Predicates: beginsWith, eq, neq, gt, gte, isEmpty, isNotEmpty, lt, lte, like, notLike

[query]="[{property:'prop1', predicate: 'eq', value: 'foo'}, {property:'prop2', predicate: 'in', value: ['bar', 'baz']}]"