supervons / react-native-echarts-pro

A React-Native charts based on Apache ECharts, support various charts and map.
https://supervons.github.io/react-native-echarts-pro-docs/
MIT License
216 stars 32 forks source link

安卓真机图表不展示 #106

Closed lzpMy closed 3 months ago

lzpMy commented 1 year ago

react-native-echarts-pro【1.9.1】 react-native version【0.71.7】 react-native-webview 【11.25.0】【12.0.2】【13.2.0】(这三个版本的webview都试了) Platform【android】 真机型号:vivo xX7 真机系统版本:安卓5.1.1

问题描述: 1、webview是可以正常加载网页的; 2、现只发现这个版本的安卓真机存在问题; 3、图片中的121212内容放在id=main的div标签中,正常如果加载了echart会覆盖掉main中的内容。 image

import React from 'react'; import Echarts from 'react-native-echarts-pro';

const EchartTabView = props => { const tradeOption = { title: { text: '', }, tooltip: { trigger: 'axis', }, legend: { data: ['交易成功数', '交易受理数', '交易金额'], selected: { 交易成功数: true, 交易受理数: false, 交易金额: false, }, }, grid: { top: '8%', left: '3%', right: '4%', bottom: '3%', containLabel: true, }, toolbox: {}, xAxis: { type: 'category', boundaryGap: false, data: ['05-10','05-11','05-12','05-13','05-14','05-15'], }, yAxis: { type: 'value', }, series: [ { name: '交易成功数', type: 'line', smooth: true, itemStyle: { color: 'rgb(255, 0, 0)', }, data:[0,0,0,0,0,0], }, { name: '交易受理数', type: 'line', smooth: true, itemStyle: { color: 'rgb(104, 180, 131)', }, data: [0,0,0,0,0,0], }, { name: '交易金额', type: 'line', smooth: true, itemStyle: { color: 'rgb(77, 156, 215)', }, data: [0,0,0,0,0,0], }, ], };

 return <Echarts option={tradeOption} height={300} webViewSettings={{androidLayerType: 'software'}} />

} export default EchartTabView;