问题描述
我正在尝试将图表中某些节点的形状更改为矩形而不是圆形。我一直在使用 d3,但使用 d3plus 库我似乎在附加元素/样式元素方面没有相同的控制?很可能我误会了什么!
在此先感谢您的帮助!
CodePen 链接:rough example
var nodes = [
{ id: "Practice 1",x: 1,y: 1 },{ id: "Practice 2",y: 2 },{ id: "Practice 3",y: 3 },{ id: "Text A",x: 2,{ id: "Text B",y: 1.75 },{ id: "Text C",x: 3,y: 1.5 },{ id: "Text D",y: 2.2 },];
var links = [
{ source: "Practice 1",target: "Text A" },{ source: "Practice 1",target: "Text B" },{ source: "Text B",target: "Text C" },target: "Text D" },];
new d3plus.Network()
.links(links)
.nodes(nodes)
.render();
body{
background-color: rgb(228,224,218);
}
circle{
fill: rgb(204,192,177)!important;
stroke: rgb(172,122,31);
stroke-width: 0;
width: 500px;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)