apache / apache/echarts

on('click) events don't work with rapid data updates.

Open
#15,861 13 comments 1 reaction 1 assignee Claimed by @Ovilia View on GitHub
bug en pending waiting-for: community
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version
5.2.1

### Steps to reproduce
Head to this example (https://echarts.apache.org/examples/en/editor.html?c=dynamic-data)

Change the update time from 2100 to 21

Attempt to click "Dynamic Bar" Legend text

### What is expected?
The "Dynamic Bar" data should be toggled

### What is actually happening?
There is a high likelihood that the data will not be toggled unless your mouse-down and mouse-up events happen under 21ms

---
I have temporarily fixed this on a local copy by changing the event type for "dispatchSelectAction" from click to mouseup. This is not ideal, but is enough for what I needed short term. ex: ( LegendView.ts: itemGroup.on('mouseup', curry(dispatchSelectAction, name, null, api, excludeSeriesId)) )

I have also discovered the issue seems to be with the generated javascript section "if(this._downEl!==this._upEl||!this._downPoint||Dt(this._downPoint,[e.zrX,e.zrY])>4)" in min.js.

Specifically the section 'this._downEl!==this._upEl'

After expanding the objects I can see they look nearly identical, but the parent sections are drastically different. I suspect the parent ID changes each time setOption() is called.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.