sg_add_nodes_delay_p

0th

Percentile

Add nodes or edges with a delay

Proxies to dynamically add multiple nodes or edges to an already existing graph with a *delay* between each addition.

Usage
sg_add_nodes_delay_p(proxy, data, delay, ..., refresh = TRUE,
  cumsum = TRUE)

sg_add_edges_delay_p(proxy, data, delay, ..., refresh = TRUE, cumsum = TRUE)

Arguments
proxy

An object of class sigmajsProxy as returned by sigmajsProxy.

data

A data.frame of _one_ node or edge.

delay

Column name containing delay in milliseconds.

...

any column.

refresh

Whether to refresh the graph after node is dropped, required to take effect, if you are running force the algorithm is killed and restarted at every iteration.

cumsum

Whether to compute the cumulative sum of the delay.

Details

The delay helps for build dynamic visualisations where nodes and edges do not appear all at the same time. How the delay works depends on the cumsum parameter. if TRUE the function computes the cumulative sum of the delay to effectively add each row one after the other: delay is thus applied at each row (number of seconds to wait before the row is added *since the previous row*). If FALSE this is the number of milliseconds to wait before the node or edge is added to the visualisation; delay is used as passed to the function.

Note

Have the parameters from your initial graph match that of the node you add, i.e.: if you pass size in your initial chart, make sure you also have it in your proxy.

Aliases
  • sg_add_nodes_delay_p
  • sg_add_edges_delay_p
Examples
# NOT RUN {
demo("add-nodes-delay", package = "sigmajs") # add nodes with a delay
demo("add-edges-delay", package = "sigmajs") # add edges with a delay
demo("add-delay", package = "sigmajs") # add nodes and edges with a delay
# }
# NOT RUN {
# }
Documentation reproduced from package sigmajs, version 0.1.3, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.