microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.36k stars 304 forks source link

Nodes ordered by layer value #104

Open geniewithsolder opened 7 years ago

geniewithsolder commented 7 years ago

I am trying to get a graph where the nodes are ordered top to bottom dependant upon their layer value.

I am happily attaching nodes to the same layer but then msagl then puts them on the same visual layer. I am trying to get layer like: --------1 --------2 3--- 3-----3----- 3 4----4-----4-----4

But I get something like

1----2----3----3----3-----3 -----------4---4-----4-----4

Is there anyway to do this?

levnach commented 7 years ago

It is possible. Have a look at LayerConstraintsFromGeometrySample.csproj in Samples.