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
424 stars 117 forks source link

Use BuchheimWalkerConfiguration to show tree merge node has problem #8

Closed zhangxinagjunHJH closed 3 years ago

zhangxinagjunHJH commented 3 years ago

I use BuchheimWalkerConfiguration like this, there are 2 branch and one merge node, it's OK

`graph.addEdge(node1, node2, paint: Paint()..color = Colors.red); graph.addEdge(node2, node6); graph.addEdge(node6, node5);

graph.addEdge(node2, node3); graph.addEdge(node3, node4); graph.addEdge(node4, node5);` image

but if i change the order like this, it will show wrong connect line

`graph.addEdge(node1, node2, paint: Paint()..color = Colors.red); graph.addEdge(node2, node3); graph.addEdge(node3, node4); graph.addEdge(node4, node5);

graph.addEdge(node2, node6); graph.addEdge(node6, node5);` image

nabil6391 commented 3 years ago

Basically BuchheimWalker is for treelayouts only, if you want merged nodes, suggest you use Sugiyama

zhangxinagjunHJH commented 3 years ago

@nabil6391 Yes, I checked code both Sugiyama and FruchtermanReingoldAlgorithm, but i found they don't support change orientation to horizontal. can add this feature to them?

nabil6391 commented 3 years ago

Hm that is correct, yes I would prefer to add them but do not think it can be done soon.

zhangxinagjunHJH commented 3 years ago

@nabil6391 OK, Thank you very much! I will continue to pay attention and wait.

nabil6391 commented 3 years ago

Added support for different orientation in 0.6.5. Try it out. Closing for now.