apache / echarts

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

[Bug] Series Labels z index broke when there is too much data #20085

Open electroheadfx opened 4 months ago

electroheadfx commented 4 months ago

Version

5.5.0

Link to Minimal Reproduction

https://gist.github.com/electroheadfx/71827f8b8a997f99ac29e2768dfc3798

Steps to Reproduce

I have a echarts with severals grid and axis attached to them, my axisPointer are actived:

axisPointer: {
      animation: false,
      snap: true,
      link: [
        {
          xAxisIndex: 'all',
        },
      ],

My echarts have click handler for show true or false a label, from a point object at bottom graph.

My last graph at bottom have higher z grid index, but the label are offseted distance over the others graph, when I focus mouse on the graph the labels are overlapped by the lines, when I remove the mouse out from the graphs, the label show fine.

axisPointer.triggerEmphasis to true create the overalapping on the labels.

here the sandbox test for reproduce the label overlapping

Capture d’écran 2024-06-27 à 10 29 27 Capture d’écran 2024-06-27 à 10 29 42

Current Behavior

Labels are overlapped by graphs with emphasis

Expected Behavior

Labels may be setup to top with a z index

Environment

- OS: Mac Os Sonoma
- Browser: Arc
- Framework: Echarts + react-for-echarts

Any additional comments?

No response

helgasoft commented 4 months ago

did you try triggerEmphasis:false ?

electroheadfx commented 4 months ago

Thanks to look it, right I tried, it works, but I lost the axisPointer interactivity with all xAxisIndex. I have just data on one graph at time and not all graphs. The issue is that line emphasis when mouse enter on it give a z index over the label.

electroheadfx commented 4 months ago

I wrote a sandbox test for reproduce the issue here the sandbox test for reproduce the label overlapping

electroheadfx commented 4 months ago

I have found the Echarts bug, on this sandbox here this show label overlappe
Capture d’écran 2024-06-28 à 12 17 23 Now suppress +5 lines in dataset in middle source : dataset: [ source: [ ... here supress 6 lines .... ] ] and label work like expected : Capture d’écran 2024-06-28 à 12 18 32

helgasoft commented 4 months ago

Could not replicate solution by removing 5+ lines of data... I believe the problem is due to one series id: "nonAdvAssets-13". When removed (commented out), the lines are not emphasized anymore and do not come on top of label.

Debugging complex charts as this one is a good occasion for a reminder. 🚩 Please follow Official posting guidelines : Note that questions about usage, "how to" or debugging shouldn't be addressed here.


The issue list is reserved exclusively for bug reports and feature requests. For usage questions, please use the following resources:

Another good resource is website makeapie.cn with many code examples.

electroheadfx commented 4 months ago

Iam sorry I can replicate the issue look at this screenshot video, it seem too much point avoid the series-scatter z index (which containe the label):

https://github.com/apache/echarts/assets/1211149/1015a5df-befa-49fb-a06d-7092a2da27af

electroheadfx commented 4 months ago

I posted on stackoverflow like I can't help with this bug here. I noticed on another project Echarts has a maximum number of chart lines and data per axis which is supported, above it it has severe drawing issue. Here the stackoverflow issue thanks

electroheadfx commented 2 months ago

I re-open the issue because I did a reproducible project with this issue, it seem it happen when there is too much data. I put a multiplier in line #1, when multiplier = 1 it works: echarts multiplier data = 1

When multiplier is 2, it double the data, the z index in label issue happen: echarts multiplier data = 2

electroheadfx commented 1 week ago

I found the issue guys, when echarts have more 3 series-lines (or enough data) and the series-lines has showSymbol to true, the z-index of the labels has issues over the lines. When I switch series-lines to showSymbol to false : it works !