How can I use DoubleTree Layout with Groups


I’m trying to implement the DoubleTree layout example in my project. It works great for nodes but I am trying to get it working for groups also.

When I don’t use group:

I want the diagram to look like this when I introduce Gruops

But It doesn’t work.If I just changed the data, removing the field “parents” from the data and using “groups” instead, it would even break the layout and not show groups.

Are you using TreeModel? You have to use GraphLinksModel if you want to use Groups.

Thank you for your reply.

As you said, I’m using TreeModel.But if I use GraphLinksModel, can I construct the DoubleTree?

Yes, you can create a tree with a GraphLinksModel, but it can create structures that TreeModel cannot.

Try it.