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

21 lines
431 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-10-21 07:05:57 +00:00
style={{
height: this.props.height || 400,
}}
2016-10-21 07:54:29 +00:00
source={{html: renderChart(this.props.option)}}
2016-10-21 07:05:57 +00:00
/>
);
}
}