apache / apache/echarts

[graph] When I manually trigger the highlight, I can only highlight nodes, but not the links between them

Open
#18,855 1 comment 0 reactions 0 assignees View on GitHub
en new-feature topic: graph
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

My requirement is to highlight the entire chain when the mouse hovers over it. So I added a mouse hover event to find the chain when the mouse hovers over a node, and then used dispatchAction - highlight about some points. However, I found that although the nodes were highlighted, the links between them were not.

What should I do to achieve my requirement? Here is my code:

` const name = getAllLightName(p.data?.id, currentData.links, currentData.nodes);

chart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
name,
});`



![Snipaste_2023-07-06_11-55-54](https://github.com/apache/echarts/assets/77480903/93d7b200-f134-49fe-a753-9efceabc5bce)

### What does the proposed API look like?

I need an API to implement this requirement, or is there currently a suitable way to achieve my requirement? Thank you very much

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.