UI: Fixed card widget display only numeric value
This commit is contained in:
parent
1d1e8decd4
commit
06d2a2abc1
@ -27,7 +27,7 @@ import {
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import { WidgetContext } from '@home/models/widget-component.models';
|
||||
import { formatValue, isDefinedAndNotNull, isNumeric } from '@core/utils';
|
||||
import { formatValue, isDefinedAndNotNull } from '@core/utils';
|
||||
import {
|
||||
backgroundStyle,
|
||||
ColorProcessor,
|
||||
@ -179,7 +179,7 @@ export class ValueCardWidgetComponent implements OnInit, AfterViewInit, OnDestro
|
||||
const tsValue = getSingleTsValue(this.ctx.data);
|
||||
let ts;
|
||||
let value;
|
||||
if (tsValue && isDefinedAndNotNull(tsValue[1]) && isNumeric(tsValue[1])) {
|
||||
if (tsValue && isDefinedAndNotNull(tsValue[1])) {
|
||||
ts = tsValue[0];
|
||||
value = tsValue[1];
|
||||
this.valueText = formatValue(value, this.decimals, this.units, false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user