diff --git a/components/chart/chart.js b/components/chart/chart.js index d31b128a2475f5aa831f4c0d06644a841ee17f07..c9c2b1d3e7b17691a3b59a12e57e8e892fc0cf6d 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { View, FlatList } from 'react-native' +import { View, FlatList, ScrollView } from 'react-native' import range from 'date-range' import { LocalDate } from 'js-joda' import { yAxis, normalizeToScale, horizontalGrid } from './y-axis' @@ -41,21 +41,23 @@ export default class CycleChart extends Component { render() { return ( - <View style={{ flexDirection: 'row', marginTop: 50 }}> - {yAxisView} - {horizontalGrid} - {<FlatList - horizontal={true} - inverted={true} - showsHorizontalScrollIndicator={false} - data={this.state.columns} - renderItem={this.renderColumn} - keyExtractor={item => item.dateString} - initialNumToRender={15} - maxToRenderPerBatch={5} - > - </FlatList>} - </View> + <ScrollView> + <View style={{ flexDirection: 'row', marginTop: 50 }}> + {yAxisView} + {horizontalGrid} + {<FlatList + horizontal={true} + inverted={true} + showsHorizontalScrollIndicator={false} + data={this.state.columns} + renderItem={this.renderColumn} + keyExtractor={item => item.dateString} + initialNumToRender={15} + maxToRenderPerBatch={5} + > + </FlatList>} + </View> + </ScrollView> ) } }