echarts emphasis-focus-adjacency when click

1cosmwyk  于 2022-11-05  发布在  Echarts
关注(0)|答案(4)|浏览(159)

What problem does this feature solve?

如何在echarts5 的graph上 实现 “鼠标点击(而不是鼠标悬停) 会有 emphasis-focus-adjacency 效果” 呢? 我试过以下方法,但是不起作用 可能操作不对(前端水平有限,不会vue 这个可能要节和vue实现)

myChart.dispatchAction({
          type: 'focusNodeAdjacency',
          // 使用 dataIndex 来定位节点。
          dataIndex: params.dataIndex
        });

参考链接 http://t.cn/A6cfwSqs

What does the proposed API look like?

emphasis-focus-adjacency when click

jecbmhm3

jecbmhm31#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure thatyou have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list .

Have a nice day! 🍵

agyaoht7

agyaoht72#

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

TRANSLATED

BODY

What problem does this feature solve?

How do I achieve the "focus-focus-closecy effect" on the graph of echarts5? I've tried the following, but it doesn't work May not work correctly (front-end level is limited, no vue this may be section and vue implementation)
myChart.dispatchAction({
type: 'focusNodeAdjacency',
Use dataIndex to locate nodes.
dataIndex: params.dataIndex
});
Refer to the link http://t.cn/A6cfwSqs

What does the proposed API look like?

emphasis-focus-adjacency when click

fgw7neuy

fgw7neuy3#

@YinZhaoJie Please provide a minimum reproducible demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM , https://www.makeapie.com/editor.html or https://codesandbox.io/s/mystifying-bash-2uthz .

  • A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
9gm1akwq

9gm1akwq4#

这个是v4的api, v5的不改源码的话似乎没有这个action了,我为了这个功能用回了v4 ┭┮﹏┭┮

相关问题