Description Usage Arguments Examples
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.
1 2 | 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 |
1 2 3 4 5 6 7 8 9 10 11 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.