Children in difference stage

I want to develop the diagram like what the image shown. The children might be in stage 2 or others stage and the top parent will always present at the top(not middle). Do you have any idea about this? Thanks!

Will the graph be tree-structured? If so, you could use TreeLayout to automatically get the arrangement that you want. I assume the “stage”, i.e. “layer”, is predetermined and thus part of the input to the layout.

If it is not tree-structured you could use LayeredDigraphLayout. But that would require some customization to make sure that the top “row” (actually a “column” in layered-digraph terminology) is fully occupied.

Thanks for your reply. The graph actually will be a tree structured. I think currently there’re no sample reference to do this graft. Could you share some code to do this?

I’ve accessed to Tree Layout page - “Tree Layout” and tried to configure to get the result I want, but the children in stage 3 will alway appear in stage 2. Can we set the stage of all children, so that it will appear in correct stage? Does this gojs library has this function?

Yes, it requires some customization. I’ll see if I can create a sample app for you.

Thanks. Smile

Walter, thanks for your sample app, it’s good. But now i have another problem, if children and parent is in same lane, it will overlap. Please advice how to calculate the height if children and parent is in same lane. Thank you very much.

OK, I have updated the Swim Bands using a Background Part sample.

Thanks Walter, this is exactly what I want.