Or *_*r A 5 label d3.js force-layout
我正在尝试找到一种方法来在D3的圆圈中包含图像,并在其旁边添加文本。
我正在使用力导向图,如果有任何区别。
到目前为止,我只能找到部分解决方案(只有图像,只有文本,只有圆),但是没有将它们全部结合在一起。
任何的想法?
这个例子有帮助吗? http://bl.ocks.org/mbostock/950642
相关代码在这里:
node.append("image")
.attr("xlink:href", "https://github.com/favicon.ico")
.attr("x", -8)
.attr("y", -8)
.attr("width", 16)
.attr("height", 16);
Run Code Online (Sandbox Code Playgroud)