From 5087cd2b1920ca371959dc8f6b5324becd07ebe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 24 Mar 2014 13:17:27 +0100 Subject: [PATCH] Fixes #225, grid min not sent to graphite png renderer when set to 0 --- src/app/directives/grafanaGraph.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 3eecd64727d..1e5d20c8f7c 100644 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -318,7 +318,7 @@ function (angular, $, kbn, moment, _) { } }); - function render_panel_as_graphite_png(url) { + function render_panel_as_graphite_png(url) { url += '&width=' + elem.width(); url += '&height=' + elem.css('height').replace('px', ''); url += '&bgcolor=1f1f1f'; // @grayDarker & @kibanaPanelBackground @@ -327,8 +327,8 @@ function (angular, $, kbn, moment, _) { url += scope.panel.fill !== 0 ? ('&areaAlpha=' + (scope.panel.fill/10).toFixed(1)) : ''; url += scope.panel.linewidth !== 0 ? '&lineWidth=' + scope.panel.linewidth : ''; url += scope.panel.legend ? '' : '&hideLegend=true'; - url += scope.panel.grid.min ? '&yMin=' + scope.panel.grid.min : ''; - url += scope.panel.grid.max ? '&yMax=' + scope.panel.grid.max : ''; + url += scope.panel.grid.min !== null ? '&yMin=' + scope.panel.grid.min : ''; + url += scope.panel.grid.max !== null ? '&yMax=' + scope.panel.grid.max : ''; url += scope.panel['x-axis'] ? '' : '&hideAxes=true'; url += scope.panel['y-axis'] ? '' : '&hideYAxis=true';