Commit 05303dab by Andrew Rodgers

Revert "Added left and right min and max for y-axis"

This reverts commit 8743ba28.
parent 9edaa407
...@@ -258,8 +258,8 @@ function (angular, $, kbn, moment, _) { ...@@ -258,8 +258,8 @@ function (angular, $, kbn, moment, _) {
var defaults = { var defaults = {
position: 'left', position: 'left',
show: scope.panel['y-axis'], show: scope.panel['y-axis'],
min: scope.panel.grid.leftMin, min: scope.panel.grid.min,
max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.leftMax, max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.max,
}; };
options.yaxes.push(defaults); options.yaxes.push(defaults);
...@@ -267,8 +267,6 @@ function (angular, $, kbn, moment, _) { ...@@ -267,8 +267,6 @@ function (angular, $, kbn, moment, _) {
if (_.findWhere(data, {yaxis: 2})) { if (_.findWhere(data, {yaxis: 2})) {
var secondY = _.clone(defaults); var secondY = _.clone(defaults);
secondY.position = 'right'; secondY.position = 'right';
secondY.min = scope.panel.grid.rightMin;
secondY.max = scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.rightMax;
options.yaxes.push(secondY); options.yaxes.push(secondY);
configureAxisMode(options.yaxes[1], scope.panel.y_formats[1]); configureAxisMode(options.yaxes[1], scope.panel.y_formats[1]);
} }
......
...@@ -36,20 +36,12 @@ ...@@ -36,20 +36,12 @@
<div class="section"> <div class="section">
<h5>Grid</h5> <h5>Grid</h5>
<div class="editor-option"> <div class="editor-option">
<label class="small">Left Y Min / <a ng-click="toggleGridMinMax('leftMin')">Auto <i class="icon-star" ng-show="_.isNull(panel.grid.leftMin)"></i></a></label> <label class="small">Min / <a ng-click="toggleGridMinMax('min')">Auto <i class="icon-star" ng-show="_.isNull(panel.grid.min)"></i></a></label>
<input type="number" class="input-small" ng-model="panel.grid.leftMin" ng-change="render()" ng-model-onblur /> <input type="number" class="input-small" ng-model="panel.grid.min" ng-change="render()" ng-model-onblur />
</div> </div>
<div class="editor-option"> <div class="editor-option">
<label class="small">Left Y Max / <a ng-click="toggleGridMinMax('leftMax')">Auto <i class="icon-star" ng-show="_.isNull(panel.grid.leftMax)"></i></a></label> <label class="small">Max / <a ng-click="toggleGridMinMax('max')">Auto <i class="icon-star" ng-show="_.isNull(panel.grid.max)"></i></a></label>
<input type="number" class="input-small" ng-model="panel.grid.leftMax" ng-change="render()" ng-model-onblur /> <input type="number" class="input-small" ng-model="panel.grid.max" ng-change="render()" ng-model-onblur />
</div>
<div class="editor-option">
<label class="small">Right Y Min / <a ng-click="toggleGridMinMax('rightMin')">Auto <i class="icon-star" ng-show="_.isNull(panel.grid.rightMin)"></i></a></label>
<input type="number" class="input-small" ng-model="panel.grid.rightMin" ng-change="render()" ng-model-onblur />
</div>
<div class="editor-option">
<label class="small">Right Y Max / <a ng-click="toggleGridMinMax('rightMax')">Auto <i class="icon-star" ng-show="_.isNull(panel.grid.rightMax)"></i></a></label>
<input type="number" class="input-small" ng-model="panel.grid.rightMax" ng-change="render()" ng-model-onblur />
</div> </div>
</div> </div>
......
...@@ -95,10 +95,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) { ...@@ -95,10 +95,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
* grid.ma1::: Maximum y-axis value * grid.ma1::: Maximum y-axis value
*/ */
grid : { grid : {
leftMax: null, max: null,
rightMax: null, min: null,
leftMin: null,
rightMin: null,
threshold1: null, threshold1: null,
threshold2: null, threshold2: null,
threshold1Color: 'rgba(216, 200, 27, 0.27)', threshold1Color: 'rgba(216, 200, 27, 0.27)',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment