Modify the interactivity of a 'sigmaNet' object using the below options. By default, visualizations include on-click neighbor events, double-click zoom, and mouse-wheel zoom. These can all be disabled or modified per the below options.
addInteraction(sigmaObj, neighborEvent = "onClick", doubleClickZoom = TRUE, mouseWheelZoom = TRUE)
sigmaObj | A 'sigmaNet' object - created using the 'sigmaFromIgraph' function |
---|---|
neighborEvent | Enable/disable event that highlights a node's neighbors. Can either be onClick, onHover, or None. |
doubleClickZoom | Enable/disable zoom event on double click |
mouseWheelZoom | Enable/disable zoom event on mouse wheel |
library(igraph) library(sigmaNet) library(magrittr) data(lesMis) l <- layout_nicely(lesMis) #change neighbor highlighting to on-hover, disable double-click zoom, enable mouse-wheel zoom sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>% addInteraction(neighborEvent = 'onHover', doubleClickZoom = FALSE, mouseWheelZoom = TRUE) sig