somonus / react-native-echarts

Echarts for react-native. The react-naitve chart.
MIT License
722 stars 309 forks source link

用Webview实现的,安卓手机上会出现滚动条,怎么解决呢 #132

Open simonyouth opened 6 years ago

zuobaiquan commented 6 years ago

修改 native-echarts 下 src 下 components 下 Echarts 下的 index.js
<WebView ref="chart" scrollEnabled = {false} injectedJavaScript = {renderChart(this.props)} style={{ height: this.props.height || 400, backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={Platform.OS === 'android' ? true : false} source={require('./tpl.html')} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} />

Cygra commented 5 years ago
scalesPageToFit={Platform.select({
  android: true,
  ios: false,
})}