I am trying to plot Sankey diagrams using sankeyNetwork()
in networkD3 package.
sankeyNetwork(Links = Flow_data, Nodes = Nodes_data,
Source = "Source_ID", Target = "Target",
Value = "value", NodeID = "Nodes_name",
width = 1000, height=600, fontsize = 16, nodeWidth = 50,
colourScale = "d3.scale.category20c()")
The visualization works great but I would like to change the colour range to an individual range. Is there any chance to change the colours of the SankeyNetwork? I need a range of only e.g. 3 colours which I can set by myself (not the predefined colourScales of d3.scale).