答案 0 :(得分:1)
查看您发布的图表,没有直接的d3 laout以这种螺旋方式排列节点。但是,如果您知道需要放置节点的位置,则可以进行力布局。
是的,您可以拖动节点,链接将相应更新。附上一个小提琴你可以即兴创作并将图像添加到节点。节点的数据应该是这样的:
"nodes": [{
"x": 30,// as i said you need to provide the x coordinate where to put the node
"y": 30,
fixed: true,//so that the force layout don't move it
name: "Start", //text to be displayed
display: "none",// set this as none if you dont want the circle
tx: 5, //x placement of text on node
ty: -5 //y placement of text on node
}, {
"x": 200,
"y": 30,
fixed: true,
name: "A"
},
这是我的fiddle。