| sigmajs | R Documentation |
Creates an htmlwidget that renders a GEXF graph using
sigma.js v3 and
graphology. Node positions, colours, and
sizes are read from the viz:* attributes embedded in the GEXF document.
Nodes are drawn with a thin border ring whose colour is controlled by
borderColor.
sigmajs(
gexf = system.file("gexf-graphs/lesmiserables.gexf", package = "rgexf"),
width = NULL,
height = NULL,
borderColor = NULL,
borderSize = 0.15
)
sigmajsOutput(outputId, width = "100%", height = "400px")
renderSigmajs(expr, env = parent.frame(), quoted = FALSE)
gexf |
Either a |
width, height |
Widget dimensions in pixels. Defaults to |
borderColor |
A CSS colour string for the node border ring. Defaults
to |
borderSize |
Border ring thickness as a fraction of the node radius
(0–1). Only used when |
outputId |
Shiny output ID. |
expr |
An expression that returns a |
env |
The environment in which to evaluate |
quoted |
Logical scalar. Is |
An htmlwidget object.
if (interactive()) {
path <- system.file("gexf-graphs/lesmiserables.gexf", package = "rgexf")
sigmajs(path)
# White border ring
sigmajs(path, borderColor = "#ffffff", borderSize = 0.15)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.