Closed av96-HW closed 5 years ago
Available on dev version on github. It's normally now possible to combine highlightNearest
and selectedBy
. You have to :
highlightNearest
highlight
in selectedBy
nodes <- data.frame(id = 1:15, label = paste("Label", 1:15),
group = sample(LETTERS[1:3], 15, replace = TRUE))
edges <- data.frame(from = trunc(runif(15)*(15-1))+1,
to = trunc(runif(15)*(15-1))+1)
visNetwork(nodes, edges) %>%
visOptions(selectedBy = list(variable = "group", highlight = TRUE),
highlightNearest = T)
I am working on a series of graphics depicting subnetworks that are each viewed through the use of selectedBy.
One problem I am encountering is edges connecting to unhighlighted nodes that are not part of the subnetwork. I encountered this issue with highlightNearest, where it is possible to resolve the issue through the use of algorithm = "hierarchical". Is something similar possible for selectedBy? It makes no sense to me that edges that are not part of the subnetwork are highlighted
Code below and data attached.
Thanks very much for your help!
questionData.zip