-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Straight longest path #23
Comments
By design layout was removed from the package in v1.0.0. So positioning nodes on a straight line is something that has to be done after processing the nodes. The library only gives back how nodes can be positioned in an optimized way in relation to each other so to say. It just returns in which column and which row nodes need to fall. I am afraid there is also no automated way to get the correct order of "2" and "8". From an optimization point of view, both results are seen as equal, they are both optimal (looking at columns and rows only). Achieving this result would mean reordering optimized graphs against some rules (e.g. longest path on top, or symmetrical). Not sure if this library is really the best place for it, but I can give it some thoughts. If you have suggestions for the implementation, I am open to it. |
Thanks for the reply. I think I'm probably wanting an optimized graph with the longest path at the vertical center, with other paths symmetrically above and below the center path. At present, the algorithm seems to always make longest path be at the bottom. I have tried re-ordering the nodes vertically as a post-process. However, this then obviously creates lots of crossings. Where is the best place in the code to be looking in order to implement this re-ordering within the algorithm itself? If you have any thoughts as to what would need doing, it would be much appreciated. Thanks. |
In the One way to make a starting point creating a sorting that has the longest path in the middle, and structure all other paths around it. Another point of entry is building in options to force the longest path at the center, or remain at the top, in Biggest downside I see already, is that the algorithm will require more steps to come to an optimized result. In addition, this is definitely not a guarantee for the result that you are looking for. |
Hello
I have been experimenting with this great library and just wondered if there was any way to keep certain nodes that are on the longest path in a straight line when visualising? For example, I have a graph that looks like this:
However, I would quite like all the green nodes in each graph to be in a straight line. For this case, it would mean swapping nodes 2 and 8 and moving node 4 up a slot. e.g.
Is is possible to account for this in the algorithm or is it better done as a post-creation process?
Thanks.
The text was updated successfully, but these errors were encountered: