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
214 stars 30 forks source link

使用中国地图时,多次点击会有几次无法影响click事件 #104

Closed yuepy closed 1 year ago

yuepy commented 1 year ago

问题描述:使用中国地图时,有时无法响应onMessage里面的click,断点看只有touchstart,touchend就结束了,而且没有走到on Message方法里面

react-native-charts-pro 【1.9.0】 react-native 【0.71.6】 react-native-swiper 【1.6.0】 Platform 【android】 Demo

const option = { tooltip: { trigger: 'item' }, geo: [ { map: 'china', zoom: 1, geoIndex:0, layoutCenter: ['50%', '70%'], layoutSize: '125%', label: { show: false, color: '#fff', }, itemStyle: { borderWidth: 1, borderColor: '#1c337f', areaColor: '#7AA7FF' }, emphasis: { label: { show: true, color: '#fff' }, itemStyle: { borderWidth: 1, borderColor: '#fff', areaColor: '#53b1f9' } }, select: { label: { show: true, color: '#fff' }, itemStyle: { borderWidth: 1, borderColor: '#fff', areaColor: '#53b1f9' } } } ], visualMap: { type: 'piecewise', left: 12, bottom: 5, pieces: [ { min: 80, max: 100, label: '100+' }, { min: 60, max: 80, label: ' ' }, { min: 40, max: 60, label: ' ' }, { min: 20, max: 40, label: ' ' }, { min: 0, max: 20, label: '0' } ], inRange: { color: ['#7AA7FF', '#6996FF', '#3E6CFE', '#1256EA', '#003DCC'] }, text: ['交易客户数',''], textGap: 5, textStyle: { color: 'rgba(255, 255, 255, .7)', fontSize:8, lineHeight:16 }, itemWidth: 12, itemHeight: 6, itemGap: 1, showLabel: true }, series: [ { name: 'china', type: 'map', geoIndex: 0, data:[{value:100,name:'陕西'}] } ] }

yuepy commented 1 year ago
image
yuepy commented 1 year ago
image

网上查解决方案还是更新echarts版本

yuepy commented 1 year ago
image

现象是选中西藏省,只触发了高亮没有触发select,select状态还在上一个新疆省,并且没有触发组件的onPress

supervons commented 1 year ago

感谢反馈,将会跟进复现并修复该问题,另外,可以提供下Android的系统版本吗?

yuepy commented 1 year ago
image

设备信息

yuepy commented 1 year ago

估计是echarts本身的问题,查了echarts的issue,里面也出现过移动端click事件没响应的问题,感觉可以从这方面入手查一下

supervons commented 1 year ago

的确,echarts issues 中有几个和 click 相关的,如:

https://github.com/apache/echarts/issues/17046

https://github.com/apache/echarts/issues/16598

但是我在最小示例中却没有复现,能否发下完整单文件可运行的代码?

yuepy commented 1 year ago

归档.zip

image

"react-native": "0.69.3", "react-native-webview": "^12.0.2", "react-native-echarts-pro": "1.9.0", china js路径要改一下,辛苦

supervons commented 1 year ago

抱歉,我在相同的版本中没有复现成功;但已经同步到 ECharts 最新版 5.4.2,后续发布后可以更新试下是否修复该问题。

supervons commented 1 year ago

1.9.1 版本已发布,EChats 版本更新至 5.2.4,详见 Tag-1.9.1