This post follows the 2 previous posts on chord diagram: most basic chord and adding labels. It shows how to attribute a color to each group of the dataset. See the chord section for more examples. This example works with d3.js v4 and v6
v4
v6