How to change node and link colors in R googleVis sankey chart
How can node and link colors be changed in R googleVis sankey chart? And link having the same color as its originating node? library(googleVis) datSK <- data.frame(From=c(rep("A",3), rep("B", 3)), To=c(rep(c("X", "Y", "Z"),2)), Weight=c(5,7,6,2,9,4)) Sankey <- gvisSankey(datSK, from="From", to="To", weight="Weight", options=list( sankey="{link: {color: { fill: '#d799ae' } }, node: { color: { fill: '#a61d4c' }, label: { color: '#871b47' } }}")) plot(Sankey) As soon as you have to color links from 2 originated nodes you'll need 2 colors for links. Also you have 5 nodes in total, so you'll need 5