Hello,
I have this very basic sankeyNetwork I want to change. I want to be able to have the labels white but also for the background black. It seems there is way to customise the widget with html directly? If so, how?
library(networkD3)
nodes = data.frame("name" =
c("Male", # Node 0
"Female", # Node 1
"Dog", # Node 2
"Cat"))# Node 3
links = as.data.frame(matrix(c(
0, 2, 10, # Each row represents a link. The first number
0, 3, 20, # represents the node being conntected from.
1, 2, 30, # the second number represents the node connected to.
1, 3, 40),# The third number is the value of the node
byrow = TRUE, ncol = 3))
names(links) = c("source", "target", "value")
sankeyNetwork(Links = links, Nodes = nodes,
Source = "source", Target = "target",
Value = "value", NodeID = "name",
fontSize= 12, nodeWidth = 30)