I am trying to add the same color for parent and child. But couldn't figure out how to achieve it. So, far I tried to read the d3 Sankey documentation but haven't got any luck. Same thing I have achieved in Highcharts as attached in the below image. How can I add the same colors for both parent and child.
What I mean by parent and child is Brazil is a parent and it is divided into two nodes(x,y children) so for all three links I want the same color. Similarly for India, I have two parent links and one of the parent nodes is divided into two links. So, for all the four links I need the same color
Any help will be appreciated.