echarts 关系图中的emphasis效果

2cmtqfgy  于 2个月前  发布在  Echarts
关注(0)|答案(1)|浏览(33)

What problem does this feature solve?

type: 'graph', layout: 'force', 类型的图中,如果鼠标停靠在其中一个节点时,当focus: 'adjacency',时,其相关结点将突出显示,而其它不相关节点将变暗。这一效果本身没有问题。但是切换时opacity没有了transition时间延迟,导致画面闪烁太厉害。过渡不够平滑。
当layout = 'none'时,这种效果是存在的,但是layout='force'时没有了,不知道什么原因?

What does the proposed API look like?

实现 type: 'graph', layout: 'force', 类型的图中,如果鼠标停靠在其中一个节点时,当focus: 'adjacency',时,其opacity的transition效果有效。

gywdnpxw

gywdnpxw1#

@guoyl It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED

TITLE

The emphasis effect in the relationship diagram

BODY

What problem does this feature solve?

type: 'graph', layout: 'force', type of graph, if the mouse docks on one of the nodes, when focus: 'adjacency', its related nodes will be highlighted and the other unrelated nodes will be dimmed. There is nothing wrong with this effect itself. However, when switching, opacity has no transition time delay, resulting in too much screen flickering. The transition is not smooth enough.
This effect exists when layout = 'none', but not when layout='force', for unknown reasons?

What does the proposed API look like?

Implement type: 'graph', layout: 'force', type of graph, if the mouse docks on one of the nodes, when focus: 'adjacency', its opacity transition effect is effective.

相关问题