With default/some options, render network can take a long time. Here are some ways to improve the performance :

  • By default, and if we don’t pass any information about coordinates, vis.js computes coordinates dynamically and waits for stabilization before rendering. You can disable or control stabilization using visPhysics :
visNetwork(nodes, edges) %>%
  visPhysics(stabilization = FALSE)
  • Another tip is to disable smooth curve for edges. It’s better for performance :
visNetwork(nodes, edges) %>%
  visEdges(smooth = FALSE)
  • It’s possible to make the link between the features of package igraph and those of visNetwork. The best way to increace plotting time is actually to use igraph layout to compute coordinates before with visIgraphLayout() :
visNetwork(nodes, edges) %>%

© 2020-2021 DataStorm

Fork me on GitHub