while working with chords
you have to keep in mind that each chord data object has a source
and a tagert
with the exact same structure and these properties have information about the link to another group, this link is one-way which mean for every chord you have to change the style of the group to achieve your request, and that can be done with something like :
var colorlist = [ "#d7d50bff", "#2876b9ff", "#37b578ff", "#64d882ff"]
svg.selectAll("name of your group").append("path")
.style("fill", function(d,i){ return colorslist[i] })
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…