Creating hover buttons in R igraph

I am trying to create nodes that change color when I hover over it.

I used R (igraph) to build nodes and create a network.

Then I create an html template using cat ().

However, I'm not sure how to link the css sheet to create a hover button that should lie on top of the nodes.

require(igraph) htmlfile = file.path('~/Dropbox/Cambridge/PhD/ICAR/AIG/Map/html/', "page1.html") cat("<html><h1>My first HTML page from R</h1>",file = htmlfile) cat("\n<br>Hello Web World!", append = TRUE, file = htmlfile) set.seed(1) E.circuit.2 <- graph_from_literal(1--2:3:4:5, 2--3,3--2, 4--5) E.circuit.2 coordinates <- layout_with_dh(E.circuit.2) coordinates plot(E.circuit.2) cat('\n<p><img src="map.png", align="center"></p>', append = TRUE, file = htmlfile) cat("\n</html>", append = TRUE,file = htmlfile) 
+5
source share
1 answer

If I understand correctly, you need to add: <head><link rel="stylesheet" type="text/css" href="mystyle.css"></head> after the <html> . Where do you change mystyle.css to the stylesheet that you would like to use.

0
source

Source: https://habr.com/ru/post/1233098/


All Articles