Corrected work for graphs created before this feature.

This commit is contained in:
ilgizar 2018-03-12 23:43:13 +05:00
parent 8c82e5701c
commit 7dd66450ad
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) {
function processRangeHook(plot) { function processRangeHook(plot) {
var yaxis = plot.getYAxes(); 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)); alignYLevel(yaxis, parseFloat(panel.yaxes[1].align));
} }
} }

View File

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