Sugiyama explicit ranking #100
-
Suppose I had a bunch of edge data suitable for (copied from private email as requested) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
As stated in the email, the simplex layering operator allows you to specify rank, but it works a little different than in graph-viz. In simplex, rank is a number where two nodes with different ranks must be in that order (regardless of edges), and two nodes with the same rank must be on the same level, e.g. if you wanted two nodes to be on the same level, you could set their rank to be the smallest, and set other nodes you wanted to be below them to be some higher rank. You can also use group to specify nodes be on the same level absent constraints on other nodes. The graph viz option seems like it's for relative ranking of subgraphs rather than independent nodes. A ranking over sub graphs (connected components?) seems pretty easy to implement in any of the layering methods. Expanding ranking or group to non-simplex layerings would be more complicated, but is potentially possible. I'm willing to explore other options, or even implementing something like the graph-viz rank, but it'd be helpful to see an example graph, the current layout, and the desired layout. I also want to point out that layering is composable, if you know what level you want each of your nodes to be on, you can write a custom function for that, and then leave the rest of the layout to d3-dag. |
Beta Was this translation helpful? Give feedback.
As stated in the email, the simplex layering operator allows you to specify rank, but it works a little different than in graph-viz. In simplex, rank is a number where two nodes with different ranks must be in that order (regardless of edges), and two nodes with the same rank must be on the same level, e.g. if you wanted two nodes to be on the same level, you could set their rank to be the smallest, and set other nodes you wanted to be below them to be some higher rank. You can also use group to specify nodes be on the same level absent constraints on other nodes.
The graph viz option seems like it's for relative ranking of subgraphs rather than independent nodes. A ranking over sub graph…