It’s possible to control the interactions of the network with visInteraction() :
Frozen network
dragNodes
: enable or not the selection and movement of nodes (click on a node, and move your mouse)?dragView
: enable or not the movement of the full network (click everywhere except node, and move your mouse) ?zoomView
: enable or not the zoom (use mouse scroll) ?
visNetwork(nodes, edges, height = "500px", width = "100%") %>%
visInteraction(dragNodes = FALSE,
dragView = FALSE,
zoomView = FALSE) %>%
visLayout(randomSeed = 123)
Hide edges/nodes on drag
Can increase the performance.
hideEdgesOnDrag
: hide egdes when dragging the viewhideNodesOnDrag
: hide nodes when dragging the view
visNetwork(nodes, edges, height = "500px", width = "100%") %>%
visInteraction(hideEdgesOnDrag = TRUE) %>%
visLayout(randomSeed = 123)
And also…
keyboard
: enable keyboard manipulation rather than mouse (click on network before)hover
andhoverConnectedEdges
: control hoverselectable
: disable nodes and edges selectiontooltipDelay
: set delay before show pop-up- …
visNetwork(nodes, edges, height = "500px", width = "100%") %>%
visInteraction(keyboard = TRUE, tooltipDelay = 0)