This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
hello, I find that there are several layout algorithms in the library, I need to create a diagram like the attachment picture, we have some nodes, and some of them has inputs and outputs, and some of them are independent, the attached picture is small example, do you know which layout algorithm is proper for this kind of diagram, and how to set the parameters of the algorithm? Thanks |
|
|
Hello jzhou We don't have a layout algorithm that does this exact kind of layout. But we could provide you with a horizontal tree layout algorithm. On your application, apply the TreeLayoutAlgorithm. Now imagine this layout going from left to right rather than top to bottom. Will this be a suitable layout? If so, we can add the option to the TreeLayoutAlgorithm to change the layout direction. Keep in mind that the separate clusters of nodes will be arrange on top of each other rather than beside each other like in the image you posted. If a horizontal tree layout will not suffice, your best bet would be to implement your own layout algorithm specific for your application. Let me know which of these two routes you'd like to follow. Jason Fauchelle |
|
|
Hello Jason, I think the tree layout algorithm with an horizontal option is suitable, the direction of the separate clusters does not matter. It would be very nice of you to have direction option for tree layout algorithm. Thanks. |
|
|
Hello jzhou The next nightly build will include a LayoutDirection property on the TreeLayoutAlgorithm. You can set this to LayoutDirection.LeftToRight to get the effect you want. While your exploring layout algorithms, you may also like to try out the GridLayoutAlgorithm which could also work for your scenario. Compare the results of those 2 layout algorithms and pick which one works best for your application. Jason Fauchelle |
|
|
Hello Jason, I do some test and find that the tree layout algorithm works better. Is it possible to to sort the nodes of in one layer, so that the the connection lines don't cross each other, please see the attached picture, this is the result of the tree layout algorithm, if the node 1 and 2 are sorted so that the connection line don't cross each other. Thanks. |
|
|
Hello jzhou The next nightly build will have more advanced node sorting to support this scenario more appropriately. Let us know how it goes. Jason Fauchelle |
|