visNetwork icon indicating copy to clipboard operation
visNetwork copied to clipboard

Apply edge highlight color to all edges selected with highlightNearest

Open anjstandearth opened this issue 5 years ago • 1 comments

Is it possible to have the edge highlight color apply to all edges that are highlighted in highlightNearest through VisOptions? For example, in the image of my network below, if I select a node on the second level, the connected nodes and edges all below are highlighted (compared to the rest of the network) but only the nodes directly connected to the selected node turn yellow. I would like all of the connected edges to turn yellow. Is there an option in visEdges or highlightNearest to make this happen? image Here's what I have for my code: visNetwork(JBS_nodes, JBS_edges) %>% visHierarchicalLayout(sortMethod = "directed") %>% visEdges(arrows = "to", color = list(highlight = "yellow", inherit = FALSE)) %>% visOptions(highlightNearest = list(enabled =TRUE, degree = 4, algorithm = "hierarchical"))

Any advice on how to achieve this would be much appreciated! TIA

anjstandearth avatar Oct 05 '21 00:10 anjstandearth

I believe that this Stack Overflow question is effectively asking the same thing. Right?

YoTMo avatar Dec 12 '21 21:12 YoTMo