diff --git a/components/chart/chart.js b/components/chart/chart.js index c56b77a..0248979 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -98,8 +98,13 @@ export default class CycleChart extends Component { onLayout={this.onLayout} style={{ flexDirection: 'row', flex: 1 }} > - {!this.state.chartHeight && Loading...} - {this.state.chartHeight && + {!this.state.chartLoaded && + + Loading... + + } + + {this.state.chartHeight && this.state.chartLoaded && } - {this.state.chartHeight && makeHorizontalGrid(columnHeight, symptomRowHeight)} + {this.state.chartHeight && this.state.chartLoaded && makeHorizontalGrid(columnHeight, symptomRowHeight)} {this.state.chartHeight && item.dateString} initialNumToRender={15} maxToRenderPerBatch={5} + onLayout={() => this.setState({chartLoaded: true})} /> }