1

In earlier versions of d3 (such as version 3), you could add a fixed=true property to a node, and the force directed layout algorithm would not move that node. Mike Bostock did an example showing this behavior.

However, in version 5, this property has been removed, and there doesn't appear to be any way to do this now.

Any ideas on how to do this?

chris_st
  • 51
  • 2
  • With fx and fy properties to position both x and y. See: https://stackoverflow.com/a/44644069/710608 – Andrew Reid Jul 16 '18 at 13:59
  • Thanks AndrewReid! If you want to make this a "real" answer, instead of just a comment, I'll mark it as the official answer to give you credit. – chris_st Jul 16 '18 at 14:12
  • 1
    I shouldn't really as it's a duplicate, I'd just be copying that answer really. – Andrew Reid Jul 16 '18 at 14:21

0 Answers0