echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Highlight edges through dispatchAction in force-layout graph

Open moqi112358 opened this issue 6 years ago • 11 comments

What problem does this feature solve?

In my project, I want to highlight one or some paths (including several edges). However we can only highlight nodes (dataIndex or data name) through dispatchAction. Could you please add some new feature to help to highlight the edges through dispatchAction?

What does the proposed API look like?

myChart.dispatchAction({
       type: 'highlight',       
       seriesIndex: 0, 
        seriesName: 'test', 
        edgeDataIndex: number | list
});

moqi112358 avatar Jun 14 '19 19:06 moqi112358

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 that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

echarts-bot[bot] avatar Jun 14 '19 19:06 echarts-bot[bot]

https://echarts.apache.org/zh/api.html#action.highlight

Ovilia avatar Jun 17 '19 02:06 Ovilia

Hi, I have read the document as well as the source code. First, the node dataIndex and the edge dataIndex were counted separately. In the code view/Chart.js, I find

highlight: function (seriesModel, ecModel, api, payload) {
        toggleHighlight(seriesModel.getData(), payload, 'emphasis');
    }

Here getData() can be found in Model/Series.js, I think the possible reason that we can't highlight the edges through dispatchAction now is that getData function will get the node dataIndex but not the edge dataindex.

Could you please help me check it?

liuttcc avatar Jun 19 '19 23:06 liuttcc

Could @susiwen8 help check this? Thanks!

Ovilia avatar Jun 20 '19 03:06 Ovilia

@Ovilia Sure

susiwen8 avatar Jun 20 '19 04:06 susiwen8

Any updates on this issue? I have the same requirement - need to highlight an edge programmingly.

ilovepumpkin avatar Jun 06 '20 01:06 ilovepumpkin

Any updates?

ppaz avatar Oct 11 '21 09:10 ppaz

Any updates?

Dugyu avatar Sep 18 '23 03:09 Dugyu

Any updates?I need to highlight both node and edge

hx425072624 avatar Dec 07 '23 04:12 hx425072624

Any updates?

iezlli avatar May 21 '24 01:05 iezlli

any updates?

tri-dataxight avatar Jun 25 '24 05:06 tri-dataxight