echarts icon indicating copy to clipboard operation
echarts copied to clipboard

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

Open electroheadfx opened this issue 1 year ago • 6 comments

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

electroheadfx avatar Jun 27 '24 08:06 electroheadfx

did you try triggerEmphasis:false ?

helgasoft avatar Jun 27 '24 15:06 helgasoft

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 avatar Jun 27 '24 15:06 electroheadfx

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

electroheadfx avatar Jun 28 '24 08:06 electroheadfx

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

electroheadfx avatar Jun 28 '24 10:06 electroheadfx

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.

helgasoft avatar Jun 28 '24 21:06 helgasoft

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 avatar Jun 29 '24 05:06 electroheadfx

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 avatar Jul 03 '24 05:07 electroheadfx

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 avatar Aug 30 '24 14:08 electroheadfx

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 !

electroheadfx avatar Nov 08 '24 16:11 electroheadfx