From d90f2537a4e75ec9b9a8fa9649e67bb35f1962ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 5 Feb 2014 11:30:54 +0100 Subject: [PATCH] added unit (y axis format) mapping support for png renderer (#22) --- src/app/directives/grafanaGraph.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 1460d083e65..cd842c6c2b2 100644 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -180,6 +180,18 @@ function (angular, $, kbn, moment, _) { url += scope.panel['x-axis'] ? '' : '&hideAxes=true'; url += scope.panel['y-axis'] ? '' : '&hideYAxis=true'; + switch(scope.panel.y_format) { + case 'bytes': + url += '&yUnitSystem=binary'; + break; + case 'short': + url += '&yUnitSystem=si'; + break; + case 'none': + url += '&yUnitSystem=none'; + break; + } + switch(scope.panel.nullPointMode) { case 'connected': url += '&lineMode=connected';