From 062ba4a9d7023291c3dd2f7ae4e587c551a2b569 Mon Sep 17 00:00:00 2001 From: Even Stensberg Date: Wed, 9 May 2018 00:24:02 +0200 Subject: [PATCH] fix: check if stats is present before reseting zoom (#2029) --- src/plugins/plot/src/configuration/YAxisModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plot/src/configuration/YAxisModel.js b/src/plugins/plot/src/configuration/YAxisModel.js index 8660b38d39..57a18f748a 100644 --- a/src/plugins/plot/src/configuration/YAxisModel.js +++ b/src/plugins/plot/src/configuration/YAxisModel.js @@ -152,7 +152,7 @@ define([ this.resetStats(); }, toggleAutoscale: function (autoscale) { - if (autoscale) { + if (autoscale && this.has('stats')) { this.set('displayRange', this.applyPadding(this.get('stats'))); } else { this.set('displayRange', this.get('range'));