From 7dd62ef948681f4242bc29c6cb953b80d8fc6e3f Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Mon, 12 Aug 2019 13:24:11 +0300 Subject: [PATCH] Add option to control whether to format target value. (#4063) --- client/app/visualizations/counter/counter-editor.html | 8 ++++++++ client/app/visualizations/counter/index.js | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/app/visualizations/counter/counter-editor.html b/client/app/visualizations/counter/counter-editor.html index 82ecd199a6..f47238c4ac 100644 --- a/client/app/visualizations/counter/counter-editor.html +++ b/client/app/visualizations/counter/counter-editor.html @@ -83,5 +83,13 @@ +
+
+ +
+
diff --git a/client/app/visualizations/counter/index.js b/client/app/visualizations/counter/index.js index 6a1476e274..d2577ba316 100644 --- a/client/app/visualizations/counter/index.js +++ b/client/app/visualizations/counter/index.js @@ -145,7 +145,9 @@ const CounterRenderer = { $scope.targetValueTooltip = formatTooltip($scope.targetValue, options.tooltipFormat); $scope.counterValue = formatValue($scope.counterValue, options); - $scope.targetValue = formatValue($scope.targetValue, options); + if (options.formatTargetValue) { + $scope.targetValue = formatValue($scope.targetValue, options); + } } $timeout(() => {