Commit a6fc74e3 by David Committed by GitHub

Merge pull request #13803 from grafana/davkal/explore-fix-resize

Explore: fix graph resize on window resize
parents 1fbef171 d6ff16fe
...@@ -168,7 +168,8 @@ export class Graph extends PureComponent<GraphProps, GraphState> { ...@@ -168,7 +168,8 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
const data = this.getGraphData(); const data = this.getGraphData();
return ( return (
<> <div className="panel-container">
{loading && <div className="explore-graph__loader" />}
{this.props.data && {this.props.data &&
this.props.data.length > MAX_NUMBER_OF_TIME_SERIES && this.props.data.length > MAX_NUMBER_OF_TIME_SERIES &&
!this.state.showAllTimeSeries && ( !this.state.showAllTimeSeries && (
...@@ -180,12 +181,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> { ...@@ -180,12 +181,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
}`}</span> }`}</span>
</div> </div>
)} )}
<div className="panel-container"> <div id={id} className="explore-graph" style={{ height }} />
{loading && <div className="explore-graph__loader" />} <Legend data={data} />
<div id={id} className="explore-graph" style={{ height }} /> </div>
<Legend data={data} />
</div>
</>
); );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment