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

How to stop the graph from reorganizing #41

Open quasar-pankaj opened 3 years ago

quasar-pankaj commented 3 years ago

Hello Nabil,

I am using GraphView in one of my projects and found it awesome. But I have a question not exactly an issue because I might be missing something. The question is - Each time the graph is refreshed it rearranges itself which becomes quite awkward when the graph is large as visually finding the nodes becomes quite daunting using FruchtermanReingold algorithm. I tried setting the x and y values of the nodes but it is apparently having no effect.

Regards, Pankaj

nabil6391 commented 2 years ago

I have updated the code in 1.0.0. now you can animate the views for fruchterman reignold and it won't jump around

Deeksha-Pandit commented 2 years ago

Hi, I am using directed graphs of GraphView package and I had a similar question. When the page loads for the first time or is refreshed the graph reorganizes and then settles in one place. However, I do not want this to happen. I want the graph to be static. I am using GraphView version 1.0.0 and I also tried implementing animated: true or animated: false as a parameter to GraphView() but it is still the same. The graph still moves around at the beginning. Please guide.

Thanks & Regards, Deeksha

michaeldwu commented 2 years ago

^bump on this, how do you animate the views for fruchterman reignold such that it does not jump around?

nabil6391 commented 2 years ago

Fruchterman Reignold should already be animated now if you use 1.0.0

matejvagic commented 7 months ago

@Deeksha-Pandit did you figure out how to stop it from reorganizing?