diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 8c18ec491ce..558354fdeeb 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -104,8 +104,7 @@ class GraphElement { }; const legendReactElem = React.createElement(Legend, legendProps); const legendElem = this.elem.parent().find('.graph-legend'); - ReactDOM.render(legendReactElem, legendElem[0]); - this.onLegendRenderingComplete(); + ReactDOM.render(legendReactElem, legendElem[0], () => this.onLegendRenderingComplete()); } onLegendRenderingComplete() {