Reputation: 1553
this might sound totally noob but I am confused about:
var link1=container.append("g").selectAll(".link")
.data(graph.links)
.enter().append("line")
If I use link1 again, would it append another "g" and "line" instead of just choosing them?
Or do i have to do something like link.select....
Upvotes: 1
Views: 43
Reputation: 131
link1 gets assigned to the results of the right hand side, not the right-hand-side as you've typed it. So it'll point to the "line" that got created.
Upvotes: 1