Highlight node neighbours on click.

sg_neighbours(sg)

sg_neighbors(sg)

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

Examples

nodes <- sg_make_nodes() edges <- sg_make_edges(nodes, 17) sigmajs() %>% sg_nodes(nodes, id, size, color) %>% sg_edges(edges, id, source, target) %>% sg_layout() %>% sg_neighbours()