score:0

In D3, selection.transition creates a transition from a initial state to a final state. For instance...

selection.attr("foo", 1)//initial state
    .transition()
    .attr("foo", 20)//final state

... transitions the attribute foo from 1 to 20. By the way since we didn't set any duration, the default 250 milliseconds duration will be applied.

In your case...

var linkTopicComments = vis.selectAll(".linktopics")
    .data(topicLinks)
    .transition();

... you're not transition anything, since there is nothing in the chain after transition(), and the semicolon corroborates that.

The solution is quite simple: explicitly tell D3 what do you want to transition. For instance:

var linkTopicComments = vis.selectAll(".linktopics")
    .data(topicLinks)
    .transition()
    .attr("d", topicDiagonal);

Related Query