You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/08/24 09:21:49 UTC
[GitHub] [echarts] weihaopeng opened a new issue, #17564: [Feature] Highlight a line using dispatchAction 'highlight'
weihaopeng opened a new issue, #17564:
URL: https://github.com/apache/echarts/issues/17564
### What problem does this feature solve?
I want to highlight a node, and its path to the root node. I use `dispatchAction` function with `type highlight`, set the nodeIndex in the path to `dataIndex` attr. Like this (node11 is the root node):

The result is :
* node11 was highlight
* node11's related node(include node24) and line were highlight
* node40 was highlight, but the line connecting node24 and node40 weren't highlight`.
Then I reverse the dataIndex, set `[40, 24, 11]`. I get the result:
* node40 was highlight
* the line connecting node40 and node24 was highlight, node24 was highlight
* node24's related node was highlight
* node11 was highlight, node11's related nodes weren't highlight.
I think this is a defect. It seems that it highlight first node and first node's related nodes and their lines, and other node in the `dataIndex` list. But according to [the doc](https://echarts.apache.org/zh/api.html#action.highlight), `dataIndex` means "数据项的index", 'index of data'. It should Has nothing to do with line, and any related nodes(maybe this is conflict with the `emphasis.focus: 'adjacency'` ?)
### Above content should be a bug or a defect, I think. here comes the feature I want. Add `linkIndex` or `edgeIndex` attr to the option in dispatchAction function. So that developers can clearly define which line should be highlight.
[code is here](https://codesandbox.io/s/les-miserables-forked-z3y4p0?file=/index.js), it use `les-miserables` in document. After mounted, waiting 3s, I use a dispatchAciton function to highlight three nodes.
The node11 is the green node `Valjean`, the node24 is the purple node `Thenardier`, the node40 is the top node with label hidden.

### What does the proposed API look like?
dispatchAction({
type: 'highlight',
...
dataIndex?: number | number[], // only effect these data, no effect to related data.
name?: string | string[],
lineIndex?: number | number[]
});
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Highlight a line using dispatchAction 'highlight' [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-2323496596
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Highlight a line using dispatchAction 'highlight' [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-2308993096
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Highlight a line using dispatchAction 'highlight' [echarts]
Posted by "nanianlisao (via GitHub)" <gi...@apache.org>.
nanianlisao commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-2440458753
重新打开
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Highlight a line using dispatchAction 'highlight' [echarts]
Posted by "nanianlisao (via GitHub)" <gi...@apache.org>.
nanianlisao commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-2440461626
@weihaopeng Is there any follow-up solution, or can it be achieved with a small amount of patches?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] weihaopeng commented on issue #17564: [Feature] Highlight a line using dispatchAction 'highlight'
Posted by GitBox <gi...@apache.org>.
weihaopeng commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-1228006990
I found this in the test file.

I tried `chart.dispatchAction({type: 'highlight',dataIndex: [0,1,2,3],dataType:'edge'})`. It worked. Plz add this to your doc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] weihaopeng commented on issue #17564: [Feature] Highlight a line using dispatchAction 'highlight'
Posted by GitBox <gi...@apache.org>.
weihaopeng commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-1228008359
Also, I found that if I use two highlight function at the same time, e.g. :
```
chart.dispatchAction({type: 'highlight',dataIndex: [0,1],dataType:'edge'})
chart.dispatchAction({type: 'highlight',dataIndex: [0,1,2,3]}) // node
```
The node highlight func will downplay the lines' highlight, then highlight nodes. I don't think it's right. With this, I cannot highlight multiple nodes and lines in the same time.(Cannot write them in a function, too.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Highlight a line using dispatchAction 'highlight' [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #17564: [Feature] Highlight a line using dispatchAction 'highlight'
URL: https://github.com/apache/echarts/issues/17564
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Highlight a line using dispatchAction 'highlight' [echarts]
Posted by "nanianlisao (via GitHub)" <gi...@apache.org>.
nanianlisao commented on issue #17564:
URL: https://github.com/apache/echarts/issues/17564#issuecomment-2440486892
我发现有一个办法能解决,但对于直接 hover 上去会
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org