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
Design View
In the visual 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.
Code 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 | |
CSS Class | The name(s) of the CSS class used to customize the widget layout.
Type: STRING | single | Optional class="my-custom-class" |
Default Loading Period | The default date and time filtering period applied when entering the page.
Type: ENUM | single | 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 | single | Optional | Default: 200px height="250px" |
Layout | The way the data are presented, which can be Line, Bars or Pie.
Type: ENUM | single | Optional | Values: LINE
BARS
PIE
layout="BARS" |
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 | single | 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 | single | Optional [query]="[{'property': 'connectionStatus', 'predicate': 'eq', 'value': '1'}, {...}]" |
Query Variable | The id of the page's <things-filter-field> used for searching.
Type: STRING | single | Optional queryFieldRef="query-1" |
Title | The title displayed on the top part of the widget box.
Type: STRING | single | Optional [title]="'Details'" |
Visibility Condition | The expression that allows you to reduce the visibility of the element.
Type: STRING | single | 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 | single | Optional | Values: AVG
DELTA
MIN
MAX
aggregation="AVG" |
Filter | The name of the filter used to transform and display values.
Type: FILTER | single | Optional filter="fooBarFilter" |
Label | The metric alternative label.
Type: STRING | single | Optional label="Temperature" |
Name | The metric whose value(s) must be loaded by the widget.
Type: METRIC | single | Mandatory name="Temperature" |
Unit | The unit of measurement to be displayed along the value.
Type: STRING | single | Optional unit="°C" |
Visibility Condition | The expression that allows you to reduce the visibility of the element.
Type: STRING | single | Optional *ngIf="getUser().organizationId != null" |
Comments
0 comments
Please sign in to leave a comment.