I'm trying to render a Sankey Diagram based on this example.
TL:DR - The color() function works for coloring the nodes but not the links.
While I got it working and rendering (I'm using latest version of D3 and React inside of Next.js), I'm having a problem coloring the links.
In the example linked above there are multiple coloring options, and for some reason none of them work for me.
They all use the 'color' function (and also the coloring of the nodes is using this function - and it works great in that case) - but I just don't manage to get it working for the links.
If I enter a simple hex value (any value, just not the color() function) it works fine.
My Sankey diagram is based on the example linked at the top, with most links and nodes deleted for less clutter.
This is the code for this component:
https://pastebin.com/xUCJDGWg