echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] On graph series when use emphasis focus: 'adjacency' highlighting by category works wrong

Open stnickolas opened this issue 3 years ago • 5 comments

Version

5.3.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=graph-label-overlap

Steps to Reproduce

  1. set emphasis options to use focus: 'adjacency'
  2. point mouse over different categories

Current Behavior

some nodes that does not belong to category are highlighted

Expected Behavior

only nodes that belong to category are highlighted

Environment

- OS:Windows
- Browser:any

Any additional comments?

No response

stnickolas avatar Aug 04 '22 09:08 stnickolas

Cannot reproduce from my side. Can you make a screenshot?

Ovilia avatar Aug 05 '22 05:08 Ovilia

Sure, as you can see, my mouse is hovering category "C", but it is nodes that belongs to "A" and "B" are highlighted. image

stnickolas avatar Aug 05 '22 06:08 stnickolas

OK. This is a bug. But it's hard to say what's the expected result when hovering a legend item with emphasis.focus: 'adjacency'. Because when 'adjacency' is relative to a single node rather than a group of data.

But for sure, the legend has some bugs with hovering in this situation.

Ovilia avatar Aug 05 '22 07:08 Ovilia

I suggest to use 'adjucency' for nodes as usual, but for legend just ignore that and highlight only related to category nodes

stnickolas avatar Aug 05 '22 08:08 stnickolas

Yes, I think this makes sense.

Ovilia avatar Aug 05 '22 08:08 Ovilia