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

Explore: fix graph resize on window resize
This commit is contained in:
David 2018-10-24 12:32:27 +02:00 committed by GitHub
commit a6fc74e35b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 898 additions and 906 deletions

View File

@ -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> {
}`}</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>
</>
); );
} }
} }

File diff suppressed because it is too large Load Diff