I am trying to build Sankey diagrams using sankeyNetwork()networkD3 in the 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()")
Rendering works fine, but I would like to change the range of colors to a separate range. Is there a chance to change the colors of SankeyNetwork? I only need a range, for example. 3 colors that I can set myself (not predefined colors).
source
share