瀏覽代碼

fix(graph): fixed issue log base scale on right y axis, option was not applied at all, also issue with log scale and max value calculation fixed, fixes #6534

Torkel Ödegaard 9 年之前
父節點
當前提交
6767bdd76d
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 1 0
      CHANGELOG.md
  2. 3 1
      public/app/plugins/panel/graph/graph.ts

+ 1 - 0
CHANGELOG.md

@@ -1,6 +1,7 @@
 # 4.0-beta2 (unrelased)
 
 ### Bugfixes
+* **Graph Panel**: Log base scale on right Y-axis had no effect, max value calc was not applied, [#6534](https://github.com/grafana/grafana/issues/6534)
 * **Graph Panel**: Bar width if bars was only used in series override, [#6528](https://github.com/grafana/grafana/issues/6528)
 * **UI/Browser**: Fixed issue with page/view header gradient border not showing in Safari, [#6530](https://github.com/grafana/grafana/issues/6530)
 

+ 3 - 1
public/app/plugins/panel/graph/graph.ts

@@ -460,7 +460,7 @@ module.directive('grafanaGraph', function($rootScope, timeSrv) {
           show: panel.yaxes[0].show,
           index: 1,
           logBase: panel.yaxes[0].logBase || 1,
-          max: 100, // correct later
+          max: null
         };
 
         options.yaxes.push(defaults);
@@ -472,6 +472,8 @@ module.directive('grafanaGraph', function($rootScope, timeSrv) {
           secondY.logBase = panel.yaxes[1].logBase || 1;
           secondY.position = 'right';
           options.yaxes.push(secondY);
+
+          applyLogScale(options.yaxes[1], data);
           configureAxisMode(options.yaxes[1], panel.percentage && panel.stack ? "percent" : panel.yaxes[1].format);
         }