Browse Source

Panels are not rendered without a refresh sometimes #223 (#383)

* add check for undefined

* check on top

* render
master
Alexandr Velikiy 5 years ago committed by Alexey Velikiy
parent
commit
8ac3f01891
  1. 3
      src/panel/graph_panel/graph_ctrl.ts

3
src/panel/graph_panel/graph_ctrl.ts

@ -324,6 +324,7 @@ class GraphCtrl extends MetricsPanelCtrl {
this.$graphElem, this.timeSrv, this.contextSrv, this.$scope, this.analyticsController this.$graphElem, this.timeSrv, this.contextSrv, this.$scope, this.analyticsController
); );
this._graphLegend = new GraphLegend(this.$legendElem, this.popoverSrv, this.$scope, this.analyticsController); this._graphLegend = new GraphLegend(this.$legendElem, this.popoverSrv, this.$scope, this.analyticsController);
this.onRender();
} }
issueQueries(datasource) { issueQueries(datasource) {
@ -422,7 +423,7 @@ class GraphCtrl extends MetricsPanelCtrl {
} }
onRender() { onRender() {
if(!this.seriesList) { if(!this.seriesList || !this._graphRenderer || !this._graphLegend) {
return; return;
} }

Loading…
Cancel
Save