react-native-echarts/src/components/Echarts/index.js

22 lines
469 B
JavaScript
Raw Normal View History

2016-10-21 07:05:57 +00:00
import React, { Component } from 'react';
import { WebView } from 'react-native';
2016-10-21 07:54:29 +00:00
import renderChart from './renderChart';
2016-10-21 07:05:57 +00:00
import echarts from './echarts.min';
export default class App extends Component {
render() {
return (
<WebView
2016-10-21 10:37:32 +00:00
scrollEnabled = {false}
2016-11-01 09:31:14 +00:00
injectedJavaScript = {renderChart(this.props)}
2016-10-21 07:05:57 +00:00
style={{
height: this.props.height || 400,
}}
2016-11-01 09:31:14 +00:00
source={require('./tpl.html')}
2016-10-21 07:05:57 +00:00
/>
);
}
}