Merge pull request #4275 from influxdata/bugfix/update-visualizations-in-ceo

Force timeseries update when visualization options change
pull/4284/head
Brandon Farmer 2018-08-23 15:38:24 -07:00 committed by GitHub
commit 1ebc646a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,14 @@ class RefreshingGraph extends PureComponent<Props> {
decimalPlaces: DEFAULT_DECIMAL_PLACES,
}
private timeSeries: React.RefObject<TimeSeries> = React.createRef()
public componentDidUpdate() {
if (this.props.isInCEO) {
this.timeSeries.current.forceUpdate()
}
}
public render() {
const {
type,
@ -98,6 +106,7 @@ class RefreshingGraph extends PureComponent<Props> {
return (
<TimeSeries
ref={this.timeSeries}
source={source}
cellType={type}
inView={inView}