Questions tagged [visnetwork]

visNetwork is an R package for network visualization that uses vis.js JavaScript library. Avoid using this tag for vis.js network created with JavaScript directly (not in R)

Site of visNetwok: http://datastorm-open.github.io/visNetwork/

Site of vis.js: http://visjs.org/ Vis.js network docs: http://visjs.org/docs/network/

181 questions
12
votes
0 answers

How to create a second dropdown list based on a group of edges with visNetwork in R?

Similar in spirit to Groups of edges and select in visNetwork in R, I'm wondering how to create a dropdown list based on the edges as opposed to my nodes using the visNetwork package. I think this is possible with the visSetSelection function, but…
Ben G
  • 4,148
  • 2
  • 22
  • 42
11
votes
1 answer

R visNetwork + igraph weighted network visualization with visEdges

I have a very simple question regarding combining igraph with visNetwork. I want to weight the edges with visEdges(value=E(graph)$weight), but that does not work. Here is a toy example to illustrate the problem: test [,1] [,2] [,3] [,4]…
user436994
  • 601
  • 5
  • 15
10
votes
1 answer

igraph/visNetwork with R: How to disable forward linking?

The following code produces a nice network diagram: library(igraph);library(visNetwork);library(dplyr) set.seed(123) nnodes <- 10 nnedges <- 20 nodes <- data.frame(id = 1:nnodes) edges <- data.frame(from = sample(1:nnodes, nnedges, replace = T), …
moabit21
  • 639
  • 8
  • 20
8
votes
1 answer

R: Display "popup" information when mouse hovers over (graph) visnetwork

I simulated some data and created a graph network in R using visnetwork: library(igraph) library(dplyr) library(visNetwork) #create file from which to sample from x5 <- sample(1:100, 1100, replace=T) #convert to data frame x5 =…
stats_noob
  • 5,401
  • 4
  • 27
  • 83
7
votes
1 answer

visNetwork with R: How to prevent nodes from overlapping with edges

I am using visNetwork (for its dynamic visualizations) to visualize a bipartite graph with 47 nodes. visNetwork(nodes, edges) %>% visIgraphLayout(layout = 'layout.davidson.harel') The image above is what it looks like currently and it's the…
iamnarra
  • 147
  • 2
  • 7
6
votes
2 answers

Fixing Cluttered Titles on Graphs

I made the following 25 network graphs (all of these graphs are copies for simplicity - in reality, they will all be different): library(tidyverse) library(igraph) set.seed(123) n=15 data = data.frame(tibble(d = paste(1:n))) relations =…
stats_noob
  • 5,401
  • 4
  • 27
  • 83
6
votes
3 answers

useRef current getting its value only on second update

I have the following components: const ParentComponent: React.FC = () => { const networkRef: any = useRef(); // Somewhere in the code, I call this networkRef.current.filter(["id0, id1, id2"]); return ( ...
iPhoneJavaDev
  • 821
  • 5
  • 33
  • 78
6
votes
1 answer

How to highlight the nearest nodes when a group is selected

When I select a group of nodes from the dropdown, I want the nearest nodes one degree away to also be highlighted. Currently, only the nodes in the group are highlighted. I thought the highlightNearest with degree = 1 would help, but that only seems…
Simon
  • 480
  • 1
  • 3
  • 11
6
votes
1 answer

How to extract and save visNetwork manipulation changes in Shiny?

I'm trying to make an interactive network/mind map application in shiny with visNetwork. visNetwork allows for interactive creation and manipulation of a network graph, how can I save these results in the R data.frame? I have looked at the…
Allan A
  • 427
  • 8
  • 17
6
votes
0 answers

R visNetwork: how to set labels bold and increase margins around labels

I created a network graph using the visNetwork package (I have little knowledge of other languages, sorry). I want two points (Please look at the left below image) To make labels bold. To increase space between labels and border. Can I do them…
cuttlefish44
  • 6,586
  • 2
  • 17
  • 34
6
votes
0 answers

Read a graphML file created by yEd into R

I have this graphML file, which was created with yworks yEd. Now I want to read this file into R to plot it via visNetwork. But reading the file into R using the igraph::read_graph function fails: library(igraph) example <-…
needRhelp
  • 2,948
  • 2
  • 24
  • 48
6
votes
0 answers

Visnetwork pie chart nodes

How could I replace the vertex shape in a visnetwork rendered graph with pie charts? I know igraph can make this through the plot function and the vertex shape pie http://igraph.org/r/doc/vertex.shape.pie.html. What would be the equivalent in…
faustovrz
  • 71
  • 4
5
votes
1 answer

r convert igraph into visNetwork

I found a way to convert igraph into visNetwork (refer to Interactive arules with arulesViz and visNetwork). Suppose before and after conversion from igraph to visNetwork should be the same, but my result shows after convert into visNetwork, the…
yc.koong
  • 175
  • 2
  • 10
5
votes
0 answers

Create a visNetwork diagram where edge labels do not overlap

Is there any way to make a directed visNetwork chart where labels of edges do not overlap? (e5 & e4 overlap on the chart below) library(visNetwork) nodes = data.frame(id = c(0, 1, 2, 3, 4), X = c("x0", "x1", "x2", "x3", "x4"), …
Serhii
  • 362
  • 4
  • 15
4
votes
1 answer

Understanding "list" and "do.call" commands

Over here (Directly Adding Titles and Labels to Visnetwork), I learned how to directly add titles to graphs made using the "visIgraph()" function: library(tidyverse) library(igraph) library(visNetwork) set.seed(123) n=15 data = data.frame(tibble(d…
stats_noob
  • 5,401
  • 4
  • 27
  • 83
1
2 3
12 13