Reputation: 201
I am new to d3.
Following is the link in which i want to increase the radius of the center node.
var node = svg.selectAll(".node")
.data(graph.nodes)
.enter().append("circle")
.attr("class", "node")
.attr("r", 8)
.style("fill", function (d) {
return color(d.owner);
})
for(var counter in graph.nodes);
d3.select(node[0][counter]).attr("r",10);
EDIT: Now it has become dynamic. Thanks for the help.
Upvotes: 0
Views: 823
Reputation: 6992
you can also vary radius dynamicly by json values like in your case
.attr("r", function(d){ return (d.application_name == 'paragon')?20:10; })
here the fiddle http://jsfiddle.net/k2NL5/82/
Upvotes: 1
Reputation: 2908
Try this
d3.select(node[0][8]).attr("r",10);
JsFiddle: http://jsfiddle.net/k2NL5/80/
Upvotes: 2