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
420 stars 114 forks source link

Graph so big nothing is visible unless zooming out, centering around `Layout.setFocusedNode` could be a fix #33

Closed claudiu-bele closed 2 years ago

claudiu-bele commented 3 years ago

Made a video of how the graph looks: https://youtu.be/-oLNpC1voJs

You can see that the top left corner of the graph view (where the graph view seems to always start) is empty, often with every nodes and edge off-screen.

I had to zoom out alot to be able to start seeing some graph data. If we could "focus" on the focusedNode we'd guarantee that this wouldn't happen.

Any other suggestions on making this work so it doesn't look to the user as though there is no graph?

claudiu-bele commented 3 years ago

Alternatively, can we force the zoom to minFactor somehow to show the entire graph? Or update the position at runtime based on selectNode's position?

shreyasparbat commented 3 years ago

+1. Getting the exact same issue image

nabil6391 commented 3 years ago

Hi Guys, yes that was the purpose of focsuedNode, However I did not get time to finish the concept, so as of yet its not possible

michaeldwu commented 2 years ago

Alternatively, shortening the edge length would help tremendously too.

nabil6391 commented 2 years ago

Follow #47 for further discussion