mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 10:00:17 -04:00
Format target value as a number with reasonable default (#4073)
This commit is contained in:
@@ -145,8 +145,13 @@ const CounterRenderer = {
|
||||
$scope.targetValueTooltip = formatTooltip($scope.targetValue, options.tooltipFormat);
|
||||
|
||||
$scope.counterValue = formatValue($scope.counterValue, options);
|
||||
|
||||
if (options.formatTargetValue) {
|
||||
$scope.targetValue = formatValue($scope.targetValue, options);
|
||||
} else {
|
||||
if (Number.isFinite($scope.targetValue)) {
|
||||
$scope.targetValue = numeral($scope.targetValue).format('0[.]00[0]');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user