Commit 98037ca0 by Torkel Ödegaard

SinglestatPanel: fixed issue when value is zero, #1039

parent 4ec59e82
......@@ -124,6 +124,9 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
$scope.getDecimalsForValue = function(value) {
var opts = {};
if (value === 0) {
return { decimals: 0, scaledDecimals: 0 };
}
var delta = value / 2;
var dec = -Math.floor(Math.log(delta) / Math.LN10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment