Commit 7dd66450 by ilgizar

Corrected work for graphs created before this feature.

parent 8c82e570
......@@ -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));
}
}
......
......@@ -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 {
......
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