Description Usage Arguments Details See Also Examples
Add nodes for eforce
.
Add nodes for eforce
.
1 2 3 4 5 6 |
p |
an echart object. |
nodes |
nodes data.frame. |
name |
name column. |
label |
nodes label column. |
value |
nodes value (size). |
category |
nodes group column. |
symbolSize |
nodes symbol size column. |
depth |
depth of nodes. |
ignore |
whether to ignore nodes. |
symbol |
nodes symbol, see details for valid values. |
fixX, fixY |
whether to fix x and y axis position. |
Valid values for symbol
:
circle
rectangle
triangle
diamond
emptyCircle
emptyRectangle
emptyTriangle
emptyDiamond
heart
droplet
pin
arrow
star
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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)
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.