0

I have created a a force directed graph that when i click a button it changes to a layout i chose myself and when i click a different button it goes back to force layout.

I have done a transition so it does this over time, but the thing is the links don't move correctly. They move differently to the nodes.

How do i get it so the links are in the same position as the nodes all the time ?

Also, i have a button which goes back to the force layout. But i am unable to go back overtime ? How do i put a delay/duration on bringing the force layout back into play?

rekoDolph
  • 813
  • 1
  • 9
  • 31
  • [This question](http://stackoverflow.com/questions/21122811/transition-from-one-forced-directed-graph-to-another-graph-in-d3js) may be helpful. – Lars Kotthoff Nov 27 '14 at 11:00
  • you fade out the links then fade them back in. How do i get it so i dont have to do that, i just want them to follow where the nodes move to @LarsKotthoff – rekoDolph Nov 27 '14 at 11:02
  • 1
    Use a transition on the position as you're doing with the nodes. – Lars Kotthoff Nov 27 '14 at 11:04
  • how can i be so stupid. i definitely tried that before. i think i got mixed up with the delay/duration. cheers man – rekoDolph Nov 27 '14 at 11:08
  • @LarsKotthoff any idea how to go back to the force layout smoothly ? is there any way to attach a 'duration' to force.start() ? ? – rekoDolph Nov 27 '14 at 11:09
  • See [this question](http://stackoverflow.com/questions/13463053/calm-down-initial-tick-of-a-force-layout). – Lars Kotthoff Nov 27 '14 at 11:10

0 Answers0