ECharts 升级
This commit is contained in:
parent
3767deeae3
commit
aea8c0f0bd
|
|
@ -1,2 +1,12 @@
|
|||
/node_modules
|
||||
*.sh
|
||||
logs/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
node_modules/
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
coverage/
|
||||
.idea/
|
||||
run/
|
||||
.DS_Store
|
||||
*.sw*
|
||||
*.un~
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -26,6 +26,6 @@
|
|||
},
|
||||
"homepage": "https://github.com/somonus/react-native-echarts#readme",
|
||||
"dependencies": {
|
||||
"echarts": "3.2.3"
|
||||
"echarts": "^4.2.0-rc.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import React, {Component} from 'react';
|
||||
import {View} from 'react-native';
|
||||
import styles from '../../style';
|
||||
|
||||
export default class App extends Component {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { WebView, View, StyleSheet, Platform } from 'react-native';
|
||||
import React, {Component} from 'react';
|
||||
import {WebView, View, StyleSheet, Platform} from 'react-native';
|
||||
import renderChart from './renderChart';
|
||||
import echarts from './echarts.min';
|
||||
|
||||
export default class App extends Component {
|
||||
|
||||
|
|
@ -12,7 +11,7 @@ export default class App extends Component {
|
|||
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if(nextProps.option !== this.props.option) {
|
||||
if (nextProps.option !== this.props.option) {
|
||||
this.refs.chart.reload();
|
||||
}
|
||||
}
|
||||
|
|
@ -26,8 +25,8 @@ export default class App extends Component {
|
|||
<View style={{flex: 1, height: this.props.height || 400,}}>
|
||||
<WebView
|
||||
ref="chart"
|
||||
scrollEnabled = {false}
|
||||
injectedJavaScript = {renderChart(this.props)}
|
||||
scrollEnabled={false}
|
||||
injectedJavaScript={renderChart(this.props)}
|
||||
style={{
|
||||
height: this.props.height || 400,
|
||||
backgroundColor: this.props.backgroundColor || 'transparent'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import echarts from './echarts.min';
|
||||
import toString from '../../util/toString';
|
||||
|
||||
export default function renderChart(props) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { WebView, View } from 'react-native';
|
||||
import { Container, Echarts } from './components'
|
||||
import React, {Component} from 'react';
|
||||
import {WebView, View} from 'react-native';
|
||||
import {Container, Echarts} from './components'
|
||||
|
||||
export default class App extends Component {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue