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

20 lines
399 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
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
/>
);
}
}