echarts 穿透
时间: 2023-10-07 22:12:47 浏览: 238
echarts穿透是指当鼠标悬停在echarts图表上时,图表的tooltip能够穿透至弹窗或选择器之上。根据引用中提到的解决方案,可以使用CSS样式来盖住tooltip所在的元素,或者在弹窗打开时通过JavaScript来隐藏这个元素。在解决方案2中,使用了以下代码来隐藏这个元素:
```javascript
const doms = document.querySelectorAll('.echarts > div:nth-child(2)');
doms?.forEach((dom) => {
dom.style.visibility = 'hidden';
dom.style.opacity = '0';
});
```
通过以上解决方案,可以成功解决echarts穿透的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [echarts在移动端使用tooltip样式穿透](https://blog.csdn.net/qq_39331257/article/details/119207106)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [echarts 中国地图+穿透](https://blog.csdn.net/qq_38333529/article/details/118578847)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文