[英]add color to node dagre d3
I have created a tree structure following the link Reading DOT files in javascript/d3 我已经按照javascript / d3中的读取DOT文件的链接创建了一个树形结构
I need to fill the nodes with color. 我需要用颜色填充节点。
Tree data: 树数据:
I tried adding 我尝试添加
[label="abcd" labelStyle="font: 300 14px" style=filled fillcolor=red]
[label="abcd" style=filled color=red]
Could anyone please suggest or point me in right direction. 任何人都可以提出建议或指出正确的方向。
Thanks 谢谢
In you CSS section add this 在您的CSS部分中添加此
.node rect {
stroke: #333;
fill: #ff0000;
}
This will make your node color red. 这将使您的节点颜色变为红色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.