sigma.js comes with countless plugins; the vast majority is available in the package.

Plugins integrated

  • Animate
  • foceAtlas2
  • Gexf
  • Drag nodes
  • Relative size
  • Custom edge shapes
  • Custom node shapes
  • Edge labels
  • Edge dots

Example

  • foceAtlas2
  • No overlap
  • Custom edge shapes
  • Relative size
  • Drag nodes
nodes <- sg_make_nodes(100)
edges <- sg_make_edges(nodes, 75)

# add type
TYPES <- c("dashed", "dotted", "tapered", "parallel", "curve")
edges$type <- sample(TYPES, nrow(edges), replace = TRUE)

sigmajs() %>%
  sg_nodes(nodes, id, color) %>%
  sg_edges(edges, id, source, target, type) %>%
  sg_force() %>% # start forceAtlas2
  sg_relative_size() %>% # size node relative to one another
  sg_drag_nodes() %>% # enable drag nodes
  sg_force_stop(10000) # stop layout algo after 10 seconds

Custom shapes

Use custom shapes and image as nodes.

Download

Allow users to download the graph to SVG.

Neighbours

Highlight node neighbours on click.

nodes <- sg_make_nodes(50)
edges <- sg_make_edges(nodes)

sigmajs() %>% 
  sg_nodes(nodes, id, size, color) %>% 
  sg_edges(edges, id, source, target) %>%
  sg_layout() %>% 
  sg_neighbours()