sigmajs lets you add buttons to trigger events, in static documents, such as this one.
nodes <- sg_make_nodes() edges <- sg_make_edges(nodes, 17) sigmajs() %>% sg_nodes(nodes, id, size, color) %>% sg_edges(edges, id, source, target) %>% sg_force_start() %>% sg_button( "<i class='fa fa-cogs'></i> Layout", # only use icon if document imports fontawesome "force_start", # event to trigger class = "btn btn-success" # class )
A button to export the graph as SVG, not that you can export to an image (png, jpeg, gif or tiff).
Events that can be triggered via a button (corresponding function name minus
You will examples of the above scattered throughout the documentation.