[英]Another D3 add text to Forced Directed Graph
.link {
stroke: #999;
stroke-opacity: .2;
}
.node {
stroke: #000;
stroke-width: 1.5px;
font: 10px sans-serif;
}
Now you can get the rest from: http://bl.ocks.org/mbostock/950642 现在您可以从以下网站获得其余信息: http : //bl.ocks.org/mbostock/950642
But here is what I want to do: I want to get rid of the github image in the example above, replace it with a black circle (see image), and have the name to the right of the circle and if the circle is dragged it moves along with the circle (to the right). 但是,这是我想要做的:我想摆脱上面示例中的github图像,将其替换为黑色圆圈(参见图片),并在圆圈的右侧以及是否拖动了圆圈的名称它与圆一起移动(向右)。
I cannot figure out how to do this. 我不知道该怎么做。 I can get the names displayed, but I cannot get the circles to display.
我可以显示名称,但是无法显示圆圈。 And it happens that the names are to the right of where the black circles should be, but I just got lucky.
碰巧,名字在黑圈应该出现的位置的右边,但是我很幸运。 (Side question: how would you get them to the left?)
(旁问:如何将它们向左移?)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.