Просмотр исходного кода

Corrected work for graphs created before this feature.

ilgizar 7 лет назад
Родитель
Сommit
7dd66450ad
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      public/app/plugins/panel/graph/graph.ts
  2. 1 1
      public/vendor/flot/jquery.flot.js

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

@@ -158,7 +158,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) {
 
       function processRangeHook(plot) {
         var yaxis = plot.getYAxes();
-        if (yaxis.length > 1 && panel.yaxes[1].align !== null) {
+        if (yaxis.length > 1 && 'align' in panel.yaxes[1] && panel.yaxes[1].align !== null) {
           alignYLevel(yaxis, parseFloat(panel.yaxes[1].align));
         }
       }

+ 1 - 1
public/vendor/flot/jquery.flot.js

@@ -1633,7 +1633,7 @@ Licensed under the MIT license.
                         measureTickLabels(axis);
                     });
 
-                    if (snaped) {
+                    if (snaped && hooks.processRange.length > 0) {
                         executeHooks(hooks.processRange, []);
                         snaped = false;
                     } else {