christophergandrud / christophergandrud/networkD3
Some colors ignored in sankeyNetwork(colourScale = ...)
- Dominant language
- R
- Stars
- 659
- Forks
- 259
- PR merge metrics
- No merged PRs in 30d
Description
The following graph should have a green node, but it appears blue. Tested with both the CRAN release and 9c0a9c9ff32c53212d2d43e0ae3cc664137315e6.
```r
nodes <- data.frame(
id = letters[1:3],
label = c("blue", "green", "black"),
status = c("imported", "up to date", "outdated"),
stringsAsFactors = FALSE
)
edges <- data.frame(
src = c(0, 0, 1),
target = c(2, 1, 2),
value = 1
)
color <- "d3.scaleOrdinal() .domain(['imported', 'up to date', 'outdated']) .range(['#1874CD', '#228B22', '#000000'])"
networkD3::sankeyNetwork(
Links = edges,
Nodes = nodes,
NodeID = "label",
Source = "src",
Target = "target",
NodeGroup = "status",
Value = "value",
colourScale = color,
fontSize = 16
)
```

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.