This widget displays a metric or statistic data in a compact chart.
With this chart, you can display data from a single metric or statistic without an axis, grid or legend.
You can select whether to display data by using:
- LINE: a single line is used to render data points in the period.
The line is automatically color by using the threshold severity of the last value. - BARS: for each value, a bar is displayed.
Each bar is colored according to the threshold severity of the value. - PIE: display a pie chart, where each slice represents a value.
Each slice is colored according to the threshold severity of the value.
Configuration
code_blocksDesign View
In the template editor, you can find the Micro Chart icon under the Charts component palette group.
You can drag the widget into the grid and then configure the following sub-elements according to your needs:
Metric: the metrics used to load timeseries data.
Below are references to the properties that can be configured for this widget.
For more details on how to manage metrics, you can refer to this article.
code_blocksCode View
Template Syntax
Below you can find some examples of how to use the component within a template.
<micro-chart-widget defaultPeriod="LAST_30_DAYS" layout="LINE"> <metric name="connectivity_index_percentage"></metric> </micro-chart-widget>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Micro Chart <micro-chart-widget> | |
---|---|
PROPERTIES | |
Color | The default color expressed in hexadecimal. Type: STRING | Optional color="fooBar" |
CSS Class | The name(s) of the CSS class used to customize the widget layout. Type: STRING | Optional class="my-custom-class" |
Default Loading Period | The default date and time filtering period applied when entering the page. Type: ENUM | Optional | Values: TODAY YESTERDAY LAST_1_HOUR LAST_4_HOURS LAST_6_HOURS LAST_12_HOURS LAST_24_HOURS LAST_7_DAYS LAST_30_DAYS THIS_MONTH LAST_MONTH LAST_6_MONTHS LAST_12_MONTHS THIS_WEEK LAST_WEEK LAST_FULL_7_DAYS LAST_FULL_30_DAYS LAST_FULL_12_MONTHS defaultPeriodValue="LAST_7_DAYS" |
Height | The height of the widget (e.g. 250px). Type: STRING | Optional | Default: 200px height="250px" |
Layout | The way the data are presented, which can be Line, Bars or Pie. Type: ENUM | Optional | Values: LINE BARS PIE layout="BARS" |
Max | The maximum value showed on the axis. Type: INTEGER | Optional [maxScale]="123" |
Min | The minimum value showed on the axis. Type: INTEGER | Optional [minScale]="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>. 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: QUERY | Optional query="[{'property': 'connectionStatus', 'predicate': 'eq', 'value': '1'}, {...}]" |
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'" |
Visibility Condition | The expression that allows you to reduce the visibility of the element. Type: STRING | Optional *ngIf="getUser().organizationId != null" |
SUB-ELEMENTS | |
Metric | The metrics used to load timeseries data. Single | Optional <metric name="Temperature"></metric> |
Metric <metric> | |
---|---|
PROPERTIES | |
Aggregation | The aggregation to be applied to the daily values of the metric. If missing, the last value of the day is loaded. Type: ENUM | Optional | Values: AVG DELTA MIN MAX aggregation="AVG" |
Filter | The name of the filter used to transform and display values. Type: FILTER | Optional filter="fooBarFilter" |
Label | The metric alternative label. Type: STRING | Optional label="Temperature" |
Name | The metric whose value(s) must be loaded by the widget. Type: METRIC | Required name="Temperature" |
Unit | The unit of measurement to be displayed along the value. Type: STRING | Optional unit="°C" |
Visibility Condition | The expression that allows you to reduce the visibility of the element. Type: STRING | Optional *ngIf="getUser().organizationId != null" |
Comments
0 comments
Please sign in to leave a comment.