Displays metric or statistic data through columns in a bar chart.
This chart uses a category based X-axis, so you must use this widget to load aggregated data, for instance the count of machines grouped by model name.
Configuration
Template Syntax
Below you can find some examples of how to use the component within a template.
<bar-chart-widget-v2 title="Alert Count">
<statistic resource="alert" aggregation="COUNT" groupBy="MONTH"></statistic>
</bar-chart-widget-v2>
Component Reference
Here is a comprehensive list of all the elements and properties that can be used to configure the component.
Bar Chart <bar-chart-widget-v2> | |
---|---|
PROPERTIES | |
Collapse / Expand | The flag indicating whether the widget is collaspible. true false
|
CSS Class | The name(s) of the CSS class used to customize the widget layout. |
Default Loading Period | The default date and time filtering period applied when entering the page. TODAY YESTERDAY LAST_1_HOUR 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
|
Empty Message | The blank message to be displayed in the widget in case no item was found. To manage translations, you can define a label and use the key as the value of the property. |
Enabled Periods | The list of periods which can be selected from the embedded period filter. TODAY YESTERDAY LAST_1_HOUR 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 CUSTOM
|
Export Enabled | The boolean flag indicating whether the data export is enabled. true false
|
Height | The height of the widget (e.g. 250px). |
Mode | The mode used to display the chart. WIDE MICRO
|
Period Filter Enabled | The boolean flag indicating whether the embedded period filter is available. true false
|
Period Variable | The id of the page's variable providing the date range filtering period, for instance the id of a <period-filter-field>. |
Query Variable | The id of the page's <things-filter-field> used for searching. |
Show Bars Horizontally | The flag indicating whether to display the bars horizontally. true false
|
Show Category Labels | Show category under each single bar. true false
|
Show Pareto Line | Compute the cumulative total and display it through a line overlaid on the columns. true false
|
Title | The title displayed on the top part of the widget box. |
Width | The width of the widget (e.g. 500px). |
X-Axis Label | The label to be displayed under the X-axis. |
Y-Axis Label | The label to be displayed on the left of the Y-axis. |
SUB-ELEMENTS | |
Statistic | The statistic whose values must be rendered as chart columns. |
Metric | The metric whose values must be aggregated and rendered as chart columns. |
Aggregated Value | The aggregated value to be displayed over the Bar Chart. |
Statistic <statistic> | |
---|---|
PROPERTIES | |
Aggregation | The function used to aggregate data. AVG COUNT MAX MIN SUM
|
Alert Status | Define whether to include alerts that are still active, or have been activated in a period. ACTIVE ACTIVATED
|
Averaged By | The count used to average the statistic results (e.g. Average alert count by thing). thingCount
|
Color | The color used to render columns. |
Group By | The property used to group results. |
Label | The alternative label displayed by the widget. |
Max Result Count | The number of maximum returned results (default all results are returned). |
Property | The object property whose values must be aggregated. |
Query | The array of conditions filtering out items. |
Resource | The resource from which to retrieve the items to be used to calculate the statistic. ACTION ALERT CUSTOMER LOCATION PARTNER THING USER WORK_SESSION
|
Sorting | The sort direction used to order categories by value (default none). ASC DESC
|
Unit | The unit of measurement to be displayed along the value. |
Value Filter | The name of the filter used to transform and display values. |
Category Order | The order used to display categories by value in the chart. ASC DESC
[DEPRECATED] Use the Sorting property. |
Metric <metric> | |
---|---|
PROPERTIES | |
Aggregation | The aggregation applied on the metric values. AVG DELTA MAX MIN SUM
|
Category Order | The order used to display categories by value in the chart. ASC DESC
|
Color | The color used to render columns. |
Group By | The group by applied on the metric values. DAY_OF_MONTH HOUR_OF_DAY
|
Label | The alternative label displayed by the widget. |
Name | The metric whose value(s) must be loaded by the widget. |
Unit | The unit of measurement to be displayed along the value. |
Value Filter | The name of the filter used to transform and display values. |
Aggregated Value <property> | |
---|---|
PROPERTIES | |
Aggregation | The aggregation type. AVG MAX MIN SUM
|
Filter | The name of the filter used to transform and display values. |
Label | The label displayed for the aggregated value. |
Unit | The unit of measurement to be displayed along the value. |