Format target value as a number with reasonable default (#4073)

This commit is contained in:
Arik Fraimovich
2019-08-15 15:54:32 +03:00
committed by GitHub
parent 0e90b89acc
commit 24d68008fa

View File

@@ -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]');
}
}
}