Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


selective edge grouping options

0 votes

I'm hoping someone can help with this - I;m using the the Incremental Hierarchicy layout and want to group certain edge targets on a node.

The only way I can see to do it, is to select the relevant edges and use the "Automatically" option.  Problem is, it seems to reset every time I run the grouping - so I need to reselect all the different edges to be grouped every time I run this.

More importantly, if two of these edges happen to have the same Source, they're grouped at the Source as well, but I only want grouping at the edge Target.

I've tried the "Manually" and "From Sketch" options, but they don't seem to have any impact - certainly not what I'm looking for.

Anyone have any insights to share on this?
in Help by (320 points)

1 Answer

+1 vote
Best answer
There is an undocumented feature that you can use to define edge groupings for hierarchic layouts: Tools -> Constraints -> Edge Grouping. Since its mainly for our testing purposes, it's also not very convenient to use.

Anyways, method 'Manually' allows entering IDs for both ends of the selected edges. The layout algorithm will then group all edge ends of the same ID. Unfortunately, there is no visual indication that shows the assigned IDs.
by [yWorks] (26.8k points)
selected by
Thanks michael.

Although, as you say, there's no indication of assigned IDs, it has the desired result if I assign a different ID to each combination of edges that I want to group.   Once I run the layout, the visual indication is that the edges are group into one target port.

In fact, I don't have a need to display the assigned IDs, so I'm totally happy with the current functionality.

Much appreciated!
You're welcome.
This isn't useful as id's are an implementation details, and as per https://yed.yworks.com/support/qa/1829/how-do-i-find-the-node-id-of-a-pictured-node also not very easy to get at.


This isn't useful as id's are an implementation details, [...].

The "Edge Grouping" tool does not work with GraphML IDs. Its IDs are the values that you enter in the "Group Id at Source" and "Group Id at Target" fields of the Edge Grouping settings dialog.

E.g. suppose you have a node with three outgoing edges. If you select two of those edges and set "Configuration Method" to "Enter Manually", "Group Id at Source" to e.g. "my-source-group", and "Act On" to "Ports at Selected Edges", the two selected edges will be grouped and their group ID is "my-source-group".
You can use whatever you want for "Group Id at Source" really, the only requirement is that you do not use the same ID for more than one edge group.

Legal Disclosure | Privacy Policy