Version
5.3.3
Link to Minimal Reproduction
https://codesandbox.io/s/les-miserables-forked-xz43i6?file=/index.js
Steps to Reproduce
See detail in the Minimal Reproduction.
- The graph have simple nodes and links, root -> a -> b, root -> c -> a. There two nodes with same name
a
but different id. - Minimal Reproduction will auto select nodes
a, c, root
in 3 seconds after the chart finished.
Current Behavior
When select node a
with id 4, the other node a
with id 1 is selected.
Expected Behavior
If I use dispatchAction
funciton with name
attribute [a] or a
, selected all nodes named a
is right. But when I use the function with dataIndex
attribute, it should only select the specific node.
Environment
- OS: Mac OS X 10_15_7
- Browser: Chrome/104.0.0.0
- Framework: doesn't matter.
Any additional comments?
No response
4条答案
按热度按时间1qczuiv01#
In case the link expires.
eufgjt7s2#
I think this is not a bug. In Apache ECharts, series/data with the same
name
means intentionally set them to be the same group. For example, if you set the name to be the same for a pie series , the data with the same name share the same color and they all dispears on legend toggling. So I thinkdisapactAction
should work similarly and this is by design.1sbrub3j3#
This means you set name as the key of node. Ok, I can set label
{c}
, and the name of node not duplicate.I have a suggestion:
数据项名称
->数据项名称(键值)
. It is easy to misunderstand that this value is label, not a key.Besides this, I think my question is still a bug. If I use
dataName
in dispatchAction function, you select nodes byname
is right. But I usedataIndex
in the funciton, the result should be the node with specific index is highlight, not get the node with index then get the same name nodes.mpgws1up4#
I think this is not a bug. In Apache ECharts, series/data with the same
name
means intentionally set them to be the same group. For example, if you set the name to be the same for a pie series , the data with the same name share the same color and they all dispears on legend toggling. So I thinkdisapactAction
should work similarly and this is by design.I have another similar question about the same 'name'
As follows
When there are two connect "group" line charts, I only click to close the legend of one line chart with the same name, and the legend of the other line chart is also closed;
A example : https://codepen.io/hongdeyuan/pen/yLjXPXv
As shown in the picture:
Whether it is possible to connect only the hover event, but not the click event
Therefore, I think whether Apache ECharts can provide a "group" for each mouse event separately, so that users can control mouse events that need to be connect “group” in a more granular way;