npm install react-native-echarts-plus react-native-webview
react-native link react-native-webviewimport { Echarts, echarts } from 'react-native-echarts-plus';<Echarts option={{}} />| 属性 | 数据类型 | 默认值 | 备注 |
|---|---|---|---|
| option | obj | null | echarts配置项,必传参数 |
| backgroundColor | string | 'rgba(0,0,0,0)' | 画布背景色 |
| width | number / string | 'auto' | 画布宽度 |
| height | number / string | '100%' | 画布高度 |
| onPress | func | (e)=>{} | 点击事件 |
| geo | array | null | 使用geoJson加载矢量地图,数组中两个参数:mapName geoJson |