Display Edge Label only when Hovering Over it with Cursor - VisNetwork Igraph
<p>Referring back to one of my previous post which contains the full reproducible code: <a href="https://stackoverflow.com/questions/39882153/visnetwork-from-igraph-cant-implement-cluster-colors-to-vertices">VisNetwork from IGraph - Can&#39;t Implement Cluster Colors to Vertices</a> </p>

<p>My goal here is to change some of the visualization options from the <code>visNetwork</code> package graph. There are too many labels currently when I zoom in and it is very tough to distinguish which node belongs to which label. Is it possible to remove the labels from the <code>visNetwork</code> graph, and only display the labels when I hover over a node? </p>

<p>I have tried setting <code>idToLabel = FALSE</code>, but the labels come back when I include <code>selectedBy = "group"</code>.</p>

<pre><code>library('visNetwork')
col = c("#80FF00FF", "#FF0000FF", "#FF0000FF", "#00FFFFFF",
      "#FF0000FF", "#8000FFFF", "#FF0000FF", "#FF0000FF",
      "#FF0000FF", "#FF0000FF")
i96e = graph.adjacency(g96e, mode = "undirected", weighted = TRUE, diag=FALSE)
i96e &lt;- set.vertex.attribute(i96e, name = "group",value = col)

visIgraph(i96e, idToLabel = TRUE, layout = "layout_nicely") %&gt;%
visOptions(highlightNearest = TRUE, selectedBy = "group")
</code></pre>

<p>I feel like I practically completed what I wanted to do with this project, but it is just this last final step of only displaying the nodes when hovering over it with the cursor seems to be the issue. </p>

<p>Any help would be great, thanks!</p>