How to initialize fixed nodes positions in force-directed layout

51 views
Skip to first unread message

Roy I

unread,
Sep 22, 2015, 2:16:26 PM9/22/15
to vega-js
for property "fixed" of force transform:

"The name of a data set containing nodes whose layout should be fixed. 
This data set may be populated in response to interactions
in order to make nodes stay at a specific coordinate."

This assumes the nodes (with their x,y position) are selected by user interaction (mouse click).
The "force_drag" example in http://vega.github.io/vega-editor/ shows how this works.

Question:
Is there a way to assign certain nodes to have specific fixed x,y positions
at the start of a force-directed layout?

Reply all
Reply to author
Forward
0 new messages