score:7

Accepted answer

Yes -- changing the definition of a gradient is no different to changing the position of a circle or something like that as far as D3 is concerned. You could do what you want for example with the following code.

gradient.select("stop")
        .transition()
        .attr("stop-color", "blue");

Related Query