Benchmark

This widget allows performing benchmark analysis by comparing a product or an entire customer to others with similar characteristics and discover correlations.

This widget is valuable for:

Sales Manager

Saves the time needed to compare consumption and product use.

R&D

Saves the time needed to analyze and discover correlations between products.

End User

Be aware of the performance of a product by comparing consumption and productivity with similar products.

Benchmark

This widget is context aware, this means that it compare the current context object (e.g. Thing) with others having similar characteristics.

To be configured, this widget requires specifying:

  • The context object you want to compare, one of THING, LOCATION, CUSTOMER, PARTNER.

  • The comparison property used to define the groups of object along the X axis.

  • One or more properties used to retrieve objects which are similar to the context one.

For instance, in case you want to compare the Productivity of your Machine in respect to others, you need to place this width in the machine dashboard, select THING as Search Target, and select thingDefinitionId in the Cluster Properties.

Configuration

Template Syntax

Below you can find some examples of how to use the component within a template.


<benchmark-widget target="THINGS" 
                  minValue="0"
                  maxBarNumber="20" 
                  valueProperty="properties.workingHours" 
                  valueFilter="millisToHours"
                  unit="hours"
                  [clusterProperties]="['thingDefinitionId', 'customer.country']"
                  [query]="[{property:'properties.size', predicate:'eq', value:'100'}]">                                    
</benchmark-widget>

Component Reference

Here is a comprehensive list of all the elements and properties that can be used to configure the component.

Benchmark <benchmark-widget>

Description

The description of the widget.

Name: description

Type: STRING | Optional

description="abc"

Filter

The filter used to transform the property value before the visualization.

Name: valueFilter

Type: FILTER | Optional

valueFilter="fooBarFilter"

Search Target

The target objects to be used as comparison clusters.

Name: target

Type: ENUM | Required

Values: THING, LOCATION, CUSTOMER, PARTNER

Default Value: THINGS

target="THING"

Title

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

Name: title

Type: STRING | Optional

[title]="'Details'"

Unit

The unit of measurement to be displayed along the value.

Name: unit

Type: STRING | Optional

unit="&deg;C"

Value Label

The label displayed on the chart tooltip for the property value.

Name: valueLabel

Type: STRING | Optional

valueLabel="abc"

Value Property

The object property used to assign each object to a cluster.

Name: valueProperty

Type: PROPERTY | Optional

Default Value: 20

valueProperty="propName"

Cluster Axis

Max Bar Number

The maximum number of bars to group objects in clusters.

Name: maxBarNumber

Type: INTEGER | Optional

Default Value: 20

maxBarNumber="123"

Max Value

The X axis maximum value.

Name: maxValue

Type: INTEGER | Optional

maxValue="123"

Min Value

The X axis minimum value.

Name: minValue

Type: INTEGER | Optional

minValue="123"

Cluster Filtering

Cluster Properties

Object properties used to filter target objects that are similar to those in the context.

Name: clusterProperties

Type: PROPERTY (multiple) | Optional

[clusterProperties]="['property1', 'property2']"

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']}]"

Query Variable

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

Name: queryFieldRef

Type: STRING | Optional

queryFieldRef="query-1"

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"

Height

The height of the widget (e.g. 250px).

Name: height

Type: STRING | Optional

Default Value: 500px

height="abc"

Visibility Condition

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

Name: *ngIf

Type: STRING | Optional

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