From c9370a4eea0daf8fe11abfa72dbc8eb204fa66c0 Mon Sep 17 00:00:00 2001 From: rozetko Date: Mon, 24 Jun 2019 13:18:27 +0300 Subject: [PATCH] Fix "this._dataTimerange is undefined" --- src/panel/graph_panel/graph_ctrl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panel/graph_panel/graph_ctrl.ts b/src/panel/graph_panel/graph_ctrl.ts index d63401c..fabe35d 100644 --- a/src/panel/graph_panel/graph_ctrl.ts +++ b/src/panel/graph_panel/graph_ctrl.ts @@ -175,6 +175,7 @@ class GraphCtrl extends MetricsPanelCtrl { this._panelId = `${this.dashboard.uid}/${this.panel.id}`; this._datasources = {}; + this._dataTimerange = {}; } rebindKeys() { @@ -390,7 +391,6 @@ class GraphCtrl extends MetricsPanelCtrl { const from = _.find(seriesList[0].datapoints, datapoint => datapoint[0] !== null); const to = _.findLast(seriesList[0].datapoints, datapoint => datapoint[0] !== null); - this._dataTimerange = {}; if (from !== undefined && to !== undefined) { this._dataTimerange = { from: from[1], to: to[1] }; }