Thus, transitioning multiple attributes is a simple part of this question. Like a regular selection, you can set several attributes at a time during the transition:
selectedNodeCircles.transition().duration(500) .attr("r", function(d){ return rRange(d.rSize); }) .attr("stroke", 'red');
This will move your radius and the color of your line. A transition is a property of the DOM element (in this case, the circle), and it will move as many DOM attributes as possible. Remember that there is only one transition object per DOM element. Therefore, if you create another, you will overwrite the old one.
This can be very useful because you donβt have to worry about interrupting the animation that is running, and figuring out how much they are moving forward, and then starting a new animation - this will usually be done automatically.
In your case, you want to move the edge lengths to your graph. They are determined by the positional attributes of the nodes. Judging by your finished product, these attributes are already animated, because you update the DOM at each iteration of the layout algorithm (not through transitions), probably in the tick () callback.
Thus, you can use transitions inside your tick callback, which may seem strange and can be difficult to synchronize with radius transitions (you will need to set both attributes on the transition). But this may be exactly what you need.
Alternatively, if you can wait, do not update the DOM in the tick callback. Let the layout complete - it works much faster when it does not render on every tick - and once it is complete, you can animate the radius and x and y attributes to their final positions. Of course, this means that you need a good starting position.