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

安卓真机不显示 #115

Closed a-perfect-day closed 10 months ago

a-perfect-day commented 10 months ago

react-native-echarts-pro【1.9.1】 react-native version【0.72.4】 react-native-webview 【13.6.2】 Platform【android】 真机系统版本:安卓13 const echartsRef =new useRef(null); const pieOption = { tooltip: { trigger: 'axis', axisPointer: { type: 'cross' } }, grid: { left:'5%', right: '3%', bottom: '5%', top:'5%', containLabel: true }, xAxis: { name:'time(sec)', nameLocation: 'middle', nameTextStyle: { padding: [10, 0, 0, 0] }, type: 'category', minorTick: { show: true }, minorSplitLine: { show: true }, }, yAxis: { name:'Temperature(℃)', nameLocation: 'middle', nameTextStyle: { padding: [0, 0, 30, 0] }, type: 'value', minorSplitLine: { show: true }, splitLine: { show: true, lineStyle:{ type:'dashed' } }, axisLine:{ show:true, alignWithLabel: true }, }, series: [ { data:[], type: 'line', showSymbol: false, clip: true, markLine: { silent: true, data: [{ yAxis: 57 }, { yAxis: 59 }, { yAxis: 94 }, { yAxis: 96 },], lineStyle: { type: 'solid', color:'#000' }, } } ], }; const t = [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5, 15, 15.5, 16, 16.5, 17, 17.5, 18, 18.5, 19, 19.5, 20, 20.5, 21, 21.5, 22, 22.5, 23.5, 24, 24.5, 25, 25.5, 26, 26.5, 27, 27.5, 28, 28.5, 29, 29.5, 30, 30.5, 31, 31.5, 32, 32.5, 33, 33.5, 34, 34.5, 35, 35.5, 36, 36.5, 37, 37.5, 38, 38.5, 39] const v = [47.5766, 59.0473, 58.8383, 58.6293, 58.4013, 58.1652, 59.7617, 66.3434, 73.7838, 80.526, 85.7888, 90.033, 93.6959, 96.5649, 98.7993, 99.1328, 95.0791, 87.365, 79.689, 73.1302, 67.6886, 63.197, 59.5299, 56.5963, 54.679, 53.8869, 53.6323, 53.6513, 53.7463, 53.8603, 53.9743, 54.0883, 54.2023, 54.3353, 54.4683, 54.5633, 54.6583, 54.7533, 54.8103, 54.8863, 54.9813, 55.0193, 55.0953, 55.1333, 55.2093, 55.3043, 55.3423, 55.3803, 55.4183, 55.3803, 56.6132, 62.5129, 70.0788, 76.744, 82.2046, 86.7, 90.3974, 93.4603, 95.8353, 96.2067, 92.0574, 85.0331, 78.2633, 72.4213, 67.568, 63.563, 60.2028, 57.3905, 55.7375, 55.051, 54.8293, 54.8103, 54.9053, 55.0193, 55.0953, 55.2093, 55.3423, 55.4373, 55.5323, 55.6273, 55.7033, 55.7793, 55.8553, 55.9313, 55.9883, 56.0453, 56.0833, 56.1403, 56.1593, 56.2353, 56.2543, 56.2923, 56.3683, 56.3683, 56.286, 57.5159, 63.3945, 70.6564] echartsRef.current?.setNewOption({ xAxis: { data:t }, series:[ { data:v, } ] });