From 61313478063b0e0721f204847f3c0298ea8f593f Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Thu, 3 Aug 2017 17:57:04 +0200 Subject: [PATCH] graph: adds decimals option for y-axis Fixes #8187 --- .../app/plugins/panel/graph/axes_editor.html | 20 +++++++++++-------- public/app/plugins/panel/graph/graph.ts | 2 ++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/public/app/plugins/panel/graph/axes_editor.html b/public/app/plugins/panel/graph/axes_editor.html index b0ab759bf18..704f3b550f9 100644 --- a/public/app/plugins/panel/graph/axes_editor.html +++ b/public/app/plugins/panel/graph/axes_editor.html @@ -4,34 +4,38 @@
Left Y
Right Y
- +
- -
+ +
- -
+ +
- +
- +
+
+
+ +
- +
diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 28da07b88ad..6b70ad36e4e 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -498,6 +498,7 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) { logBase: panel.yaxes[0].logBase || 1, min: panel.yaxes[0].min ? _.toNumber(panel.yaxes[0].min) : null, max: panel.yaxes[0].max ? _.toNumber(panel.yaxes[0].max) : null, + tickDecimals: panel.yaxes[0].decimals !== null ? _.toNumber(panel.yaxes[0].decimals): null }; options.yaxes.push(defaults); @@ -510,6 +511,7 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) { secondY.position = 'right'; secondY.min = panel.yaxes[1].min ? _.toNumber(panel.yaxes[1].min) : null; secondY.max = panel.yaxes[1].max ? _.toNumber(panel.yaxes[1].max) : null; + secondY.tickDecimals = panel.yaxes[1].decimals !== null ? _.toNumber(panel.yaxes[1].decimals): null; options.yaxes.push(secondY); applyLogScale(options.yaxes[1], data);