apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.11k stars 19.6k forks source link

[Bug] 绘制3万个左右散点的图形时,鼠标悬浮在部分散点上时鼠标的样式未变化,部分是正常变化的;同时点击散点无法触发点击事件 #19716

Open vikon72 opened 5 months ago

vikon72 commented 5 months ago

Version

5.2.2

Link to Minimal Reproduction

暂无

Steps to Reproduce

准备绘制三万个左右的散点,需要实现点击散点时显示label,但是发现部分散点点击后label无法正常显示,同时发现无法正常显示label的点在鼠标悬浮时鼠标的样式未变化。正常能标记的点鼠标悬浮时鼠标样式默认会变为手型。另外进行区域放大操作后无法正常标记的散点也可以正常标记。

large: true,
label: {
    show : false,
    position: 'outside',
    formatter:function (params) {
        if(params.value[0]){ 
            return params.value[0]
        }else{
            return ""
        }
    }
},
selectedMode: "multiple",
select: {
    label: {
         show: true
    }
}

image image

Current Behavior

创建了多数据集多series的散点图,部分series中所有散点可能无法正常显示label

Expected Behavior

正常点击所有的散点都可以触发点击事件,标记散点名称

Environment

- OS:Windows10
- Browser:Chrome 122.0.6261.128
- Framework:Vue@3

Any additional comments?

No response

echarts-bot[bot] commented 5 months ago

@vikon72 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** [Bug] When drawing a graph of about 30,000 scatters, the style of the mouse does not change when hovering over some of the scatters, and some of them change normally
qwekelly commented 5 months ago

三万个节点数据,渲染不卡顿吗?请问下你是怎么做到不卡顿的

Ovilia commented 5 months ago

With large: true, scatters don't respond to mouse hover events when data number exceeds largeThreshold. This is necessary for performance consideration.

vikon72 commented 5 months ago

感谢您的指导,通过调高largeThreshold后,所有点都可以正常响应hover事件,即鼠标悬浮时鼠标样式默认会改变为手型。但是select散点时,label都无法正常显示。偶然发现将鼠标移入工具栏区域能够使散点的label正常显示,不知道是什么问题导致的?有什么解决办法吗?