Description Usage Arguments See Also Examples
Build force network
Plot force directed graph.
1 2 3 4 5 6 7 8 9 10 11 | eforce(p, name = NULL, large = FALSE, center = list("50%", "50%"),
roam = FALSE, size = "100%", minRadius = 10, maxRadius = 20,
linkSymbol = "none", linkSymbolSize = list(10, 15), scaling = 1,
gravity = 1, draggable = TRUE, useWorker = TRUE, steps = 1, z = 2,
zlevel = 0, ...)
eforce_(p, name = NULL, large = FALSE, center = list("50%", "50%"),
roam = FALSE, size = "100%", minRadius = 10, maxRadius = 20,
linkSymbol = "none", linkSymbolSize = list(10, 15), scaling = 1,
gravity = 1, draggable = TRUE, useWorker = TRUE, steps = 1, z = 2,
zlevel = 0, ...)
|
p |
an echart objects. |
name |
name of network. |
large |
set to |
center |
center of network. |
roam |
set to |
size |
size of layout. |
minRadius, maxRadius |
minimum and maximum radius of nodes. |
linkSymbol |
can be set to |
linkSymbolSize |
size of |
scaling |
scaling factor. |
gravity |
centripetal force coefficient. |
draggable |
set to |
useWorker |
specifies whether to put layout calculation into web worker when the browser supports web worker. |
steps |
the number of iterations of each frame layout calculation. |
z, zlevel |
first and second grade cascading control, the higher z the closer to the top. |
... |
any other options to pass to serie. |
1 2 3 4 5 6 7 8 9 10 11 | let <- LETTERS[1:20]
edges <- data.frame(source = sample(let, 20), target = sample(let, 20),
weight = runif(20, 5, 20))
nodes <- data.frame(name = let, value = runif(20, 5, 25), group = rep(LETTERS[1:4], 5))
echart() %>%
eforce(itemStyle = list(normal = list(label = list(show = TRUE)))) %>% # show labels
enodes(nodes, name, value = value, category = group) %>%
elinks(edges, source, target)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.