From bef61cf0198903a0a49edfcca80febb0c3dc5eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 21 Jun 2014 17:18:24 +0200 Subject: [PATCH] Ability to set y min/max for right y-axis (RR #519, Closes #360) --- CHANGELOG.md | 3 + src/app/panels/graph/axisEditor.html | 96 ++++++++++++++-------------- src/app/panels/graph/module.js | 11 ++++ 3 files changed, 62 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 633288a0588..55b2582bd2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ vNext +**New features or improvements** +- Ability to set y min/max for right y-axis (RR #519, Closes #360) - thx @acedrew + **Fixes** - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500) diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index e4f42687304..eb8ac3fb081 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -1,57 +1,47 @@ +
-
-
Axes
-
- -
-
- -
-
- - -
-
- - -
- -
- - -
-
- - -
- +
Left Y Axis
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
Right Y Axis
+
+ + +
+
+ + +
+
+ + +
+
+ + +
- -
-
-
-
Grid
-
- - -
-
- - -
-
- - -
-
- - -
-
+
Grid thresholds
@@ -110,4 +100,14 @@
+
+
Show Axes
+
+ +
+
+ +
+
+
diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 1964b8fe526..66994361d91 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -193,10 +193,21 @@ function (angular, app, $, _, kbn, moment, timeSeries) { _.defaults($scope.panel.legend, _d.legend); } + if ($scope.panel.grid.min) { + $scope.panel.grid.leftMin = $scope.panel.grid.min; + delete $scope.panel.grid.min; + } + + if ($scope.panel.grid.max) { + $scope.panel.grid.leftMax = $scope.panel.grid.max; + delete $scope.panel.grid.max; + } + if ($scope.panel.y_format) { $scope.panel.y_formats[0] = $scope.panel.y_format; delete $scope.panel.y_format; } + if ($scope.panel.y2_format) { $scope.panel.y_formats[1] = $scope.panel.y2_format; delete $scope.panel.y2_format;