nabil6391 / graphview

Flutter GraphView is used to display data in graph structures. It can display Tree layout, Directed and Layered graph. Useful for Family Tree, Hierarchy View.
MIT License
415 stars 115 forks source link

Is it possible to position leaf nodes on the same level? #86

Closed mway-niels closed 1 year ago

mway-niels commented 1 year ago

Hello,

I am using graphview to create an organization chart for my company. I am now wondering if it is possible to position all leaf nodes (in my case individual teams) at the same level, regardless of how long the chain of managers above the team is.

I have considered (but not yet tested) using virtual nodes between the team and the manager to move the leaf node down X levels. Is there a better solution to my problem?

I have created a diagram to illustrate my goal:

Current:

Screenshot 2022-07-21 at 10 55 51

Target:

Screenshot 2022-07-21 at 10 56 10
jayaxel commented 1 year ago

try this: Flip the source and target, AND set orientation as ORIENTATION_BOTTOM_TOP

i found this while trying to reverse the arrows with no avail. you can see an illustration in my reported issue: https://github.com/nabil6391/graphview/issues/72

nabil6391 commented 1 year ago

Try out 1.2.0 , added a new CoordinateAssignment to allow users to adjust alignment