From 9bae19a7ec34add85a76ff381fb89ba7b56182eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 21 Mar 2015 15:34:26 -0400 Subject: [PATCH] Small fix to logarithmic scale --- src/app/panels/graph/graph.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/panels/graph/graph.js b/src/app/panels/graph/graph.js index 9efe99dee87..5e8bcb2d964 100755 --- a/src/app/panels/graph/graph.js +++ b/src/app/panels/graph/graph.js @@ -396,8 +396,8 @@ function (angular, $, kbn, moment, _, GraphTooltip) { } } - axis.min = axis.min !== null ? axis.min : 1; - axis.ticks = [1]; + axis.min = axis.min !== null ? axis.min : 0; + axis.ticks = [0, 1]; var nextTick = 1; while (true) { @@ -409,10 +409,10 @@ function (angular, $, kbn, moment, _, GraphTooltip) { } if (axis.logBase === 10) { - axis.transform = function(v) { return Math.log(v+0.0001); }; + axis.transform = function(v) { return Math.log(v+0.1); }; axis.inverseTransform = function (v) { return Math.pow(10,v); }; } else { - axis.transform = function(v) { return Math.log(v+0.0001) / Math.log(axis.logBase); }; + axis.transform = function(v) { return Math.log(v+0.1) / Math.log(axis.logBase); }; axis.inverseTransform = function (v) { return Math.pow(axis.logBase,v); }; } }