echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] dispatchAction highlight line chart seriesIndex always keep the first series

Open westn opened this issue 2 years ago • 4 comments

Version

5.4.3

Link to Minimal Reproduction

Here

Steps to Reproduce

  1. Create a line chart with more than N series (N is unknown, but it seems to be working when I have fewer than 10 series, but an issue with 26 series). Make sure that the series has emphasis: { focus: "series" }
  2. Dispatch an action of type highlight to highlight the first seriesIndex (or any seriesIndex)
  3. Dispatch an action of type highlight to highlight any other seriesIndex
  4. Note the error

Current Behavior

image

The first series always stays highlighted, while the second, third, etc that you change will update. But it keeps the first series highlighted.

Expected Behavior

Only the seriesIndex that is sent should be highlighted

Environment

- OS: MacOS Monterey
- Browser: Chrome 120.0.6099.71
- Framework: None

Any additional comments?

I had a smaller dataset previously which is working fine, but with a bigger dataset it seems to be an issue.

westn avatar Dec 08 '23 08:12 westn

I've researched a bit more, and it seems like if I lower the amount of datapoints per series from 100 to 50, then the bug is no longer present. So it seems to be something happening at around 1500 data points (for me)

I have tested to lower the number in hoverLayerThreshold, but unsuccessfully

westn avatar Dec 08 '23 10:12 westn

Here is a minimal reproducable example to play around with and pinpoint the issue.

The zoom button can be used to switch through the lines.

MatthiasMert avatar Dec 08 '23 10:12 MatthiasMert

Thanks @MatthiasMert I pinpointed it to the symbol: Here

westn avatar Dec 08 '23 10:12 westn

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Dec 07 '25 21:12 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Dec 14 '25 21:12 github-actions[bot]