Browse Source

Fix "this._dataTimerange is undefined"

master
rozetko 5 years ago
parent
commit
c9370a4eea
  1. 2
      src/panel/graph_panel/graph_ctrl.ts

2
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] };
}

Loading…
Cancel
Save