@meshmakers/octo-meshboard 3.4.350 → 3.4.370
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13378,9 +13378,10 @@ class BarChartWidgetComponent {
|
|
|
13378
13378
|
const categories = Array.from(allCategories);
|
|
13379
13379
|
const seriesGroups = Array.from(allSeriesGroups);
|
|
13380
13380
|
// Build series data
|
|
13381
|
+
const valueScale = this.config?.valueScale ?? 1;
|
|
13381
13382
|
const seriesData = seriesGroups.map(seriesGroup => {
|
|
13382
13383
|
const rawData = categories.map(category => {
|
|
13383
|
-
return dataMap.get(category)?.get(seriesGroup) ?? 0;
|
|
13384
|
+
return (dataMap.get(category)?.get(seriesGroup) ?? 0) * valueScale;
|
|
13384
13385
|
});
|
|
13385
13386
|
return {
|
|
13386
13387
|
name: seriesGroup,
|
|
@@ -15409,7 +15410,8 @@ class LineChartConfigDialogComponent {
|
|
|
15409
15410
|
{ value: 'AVG', label: 'Average (instantaneous)' },
|
|
15410
15411
|
{ value: 'MAX', label: 'Max (e.g. demand)' },
|
|
15411
15412
|
{ value: 'MIN', label: 'Min' },
|
|
15412
|
-
{ value: 'COUNT', label: 'Count' }
|
|
15413
|
+
{ value: 'COUNT', label: 'Count' },
|
|
15414
|
+
{ value: 'TIME_WEIGHTED_AVG', label: 'Time-weighted average (event-based duty cycle)' }
|
|
15413
15415
|
];
|
|
15414
15416
|
/** Entity selectors available on the current MeshBoard (for the scope picker). */
|
|
15415
15417
|
get availableEntitySelectors() {
|
|
@@ -29158,6 +29160,7 @@ function registerDefaultWidgets(registry) {
|
|
|
29158
29160
|
legendPosition: widget.legendPosition,
|
|
29159
29161
|
showDataLabels: widget.showDataLabels,
|
|
29160
29162
|
dataLabelSuffix: widget.dataLabelSuffix,
|
|
29163
|
+
valueScale: widget.valueScale,
|
|
29161
29164
|
colorThresholds: widget.colorThresholds,
|
|
29162
29165
|
defaultBarColor: widget.defaultBarColor,
|
|
29163
29166
|
queryName: widget.dataSource.queryName,
|
|
@@ -29192,6 +29195,7 @@ function registerDefaultWidgets(registry) {
|
|
|
29192
29195
|
legendPosition: config['legendPosition'] ?? 'right',
|
|
29193
29196
|
showDataLabels: config['showDataLabels'] ?? false,
|
|
29194
29197
|
dataLabelSuffix: config['dataLabelSuffix'],
|
|
29198
|
+
valueScale: config['valueScale'],
|
|
29195
29199
|
colorThresholds: config['colorThresholds'],
|
|
29196
29200
|
defaultBarColor: config['defaultBarColor'],
|
|
29197
29201
|
filters: config['filters']
|