Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/visConfigure.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param graph : a visNetwork object
#' @param enabled : Boolean. Default to true. Toggle the configuration interface on or off. This is an optional parameter. If left undefined and any of the other properties of this object are defined, this will be set to true.
#' @param filter : String, Array, Boolean, Function. Default to true. When a boolean, true gives you all options, false will not show any. If a string is supplied, any combination of the following is allowed: nodes, edges, layout, interaction, manipulation, physics, selection, renderer. Feel free to come up with a fun seperating character. Finally, when supplied an array of strings, any of the previously mentioned fields are accepted.
#' @param filter : String, Array, Boolean, Function. Default to true. When a boolean, true gives you all options, false will not show any. If a string is supplied, any combination of the following is allowed: nodes, edges, layout, interaction, manipulation, physics, selection, renderer. Feel free to come up with a fun separating character. Finally, when supplied an array of strings, any of the previously mentioned fields are accepted.
#' @param container : DOM element. This allows you to put the configure list in another HTML container than below the network.
#' @param showButton : Boolean. Default to true. Show the generate options button at the bottom of the configurator.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/visEdges.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#' \item "vadjust, multi, bold, ital, boldital, mono" See \link[visNetwork]{visDocumentation}
#'}
#'
#' @param arrows : Named list or String. To draw an arrow with default settings a string can be supplied. For example: 'to, from,middle' or 'to;from', any combination with any seperating symbol is fine.
#' @param arrows : Named list or String. To draw an arrow with default settings a string can be supplied. For example: 'to, from,middle' or 'to;from', any combination with any separating symbol is fine.
#' If you want to control the size of the arrowheads, you can supply an object. See \link[visNetwork]{visDocumentation}
#'
#' @param arrowStrikethrough : Boolean. Default to True. When false, the edge stops at the arrow. This can be useful if you have thick lines and you want the arrow to end in a point. Middle arrows are not affected by this.
Expand Down
2 changes: 1 addition & 1 deletion R/visExport.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'@param name : name of imgage, default to "network"
#'@param label : Label on button, default to "Export as png/jpeg/pdf"
#'@param background : background color, default to white (#fff). Work only if network background is transparent.
#'@param float : button postion, default to "right"
#'@param float : button position, default to "right"
#'@param style : button css style.
#'@param loadDependencies / Boolean. TRUE by default. Load libraries for export (fileSaver, Blob, canvastoBlob, html2canvas, jsPDF)
#'@param ... : arguments for \link[visNetwork]{addExport}
Expand Down
2 changes: 1 addition & 1 deletion R/visGetUtils.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ visGetSelection <- function(graph, input = paste0(graph$id, "_selection")){

#' Function to get current scale of network, with shiny only.
#'
#' Function to get current scale of network, with shiny only. Returns the current scale of the network. 1.0 is comparible to full, 0 is zoomed out infinitely.
#' Function to get current scale of network, with shiny only. Returns the current scale of the network. 1.0 is comparable to full, 0 is zoomed out infinitely.
#'
#' @param graph : a \code{ \link[visNetwork]{visNetworkProxy}} object
#' @param input : name of shiny input created. Default to paste0(graph$id, "_scale")
Expand Down
4 changes: 2 additions & 2 deletions R/visHclust.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#' @param main Title. See \link[visNetwork]{visNetwork}
#' @param submain Subtitle. See \link[visNetwork]{visNetwork}
#' @param footer Footer. See \link[visNetwork]{visNetwork}
#' @param distColumns \code{numeric}, indice of columns used for compute distance.
#' @param distColumns \code{numeric}, indices of columns used for compute distance.
#' If \code{NULL} (default), keep all \code{numeric} and \code{integer} columns.
#' If Not \code{NULL}, keep only \code{numeric} and \code{integer} columns
#' @param distMethod \code{character}, the distance measure to be used for \code{\link[stats]{dist}} function. Default to 'euclidean'.
#' @param hclustMethod \code{character}, the agglomeration method to be used for \code{\link[stats]{hclust}} function. Default to 'complete'.
#' @param cutree \code{numeric} or \code{integer}, desired number of groups. Default to 0.
#' @param tooltipColumns \code{numeric}, adding mini-graphics in tooltips using \code{sparkline} ? Indice of columns used in tooltip. All by default.
#' @param tooltipColumns \code{numeric}, adding mini-graphics in tooltips using \code{sparkline} ? indices of columns used in tooltip. All by default.
#' So, we add boxplot / pie focus on sub-population vs all population using \code{sparkline} package. \code{NULL} to disable.
#' @param colorEdges \code{character}, color of edges. Default to 'black'.
#' @param colorGroups \code{character}, color for group in hexa ("#00FF00"). Default rainbow.
Expand Down
2 changes: 1 addition & 1 deletion R/visHierarchicalLayout.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'@param treeSpacing : Number. Default to 200. Distance between different trees (independent networks). This is only for the initial layout. If you enable physics, the repulsion model will denote the distance between the trees.
#'@param blockShifting : Boolean. Default to true. Method for reducing whitespace. Can be used alone or together with edge minimization. Each node will check for whitespace and will shift it's branch along with it for as far as it can, respecting the nodeSpacing on any level. This is mainly for the initial layout. If you enable physics, they layout will be determined by the physics. This will greatly speed up the stabilization time though!
#'@param edgeMinimization : Boolean. Default to true. Method for reducing whitespace. Can be used alone or together with block shifting. Enabling block shifting will usually speed up the layout process. Each node will try to move along its free axis to reduce the total length of it's edges. This is mainly for the initial layout. If you enable physics, they layout will be determined by the physics. This will greatly speed up the stabilization time though!
#'@param parentCentralization : Boolean. Default to true. When true, the parents nodes will be centered again after the the layout algorithm has been finished.
#'@param parentCentralization : Boolean. Default to true. When true, the parents nodes will be centered again after the layout algorithm has been finished.
#'@param direction : String. Default to 'UD'. The direction of the hierarchical layout. The available options are: UD, DU, LR, RL. To simplify: up-down, down-up, left-right, right-left.
#'@param sortMethod : String. Default to 'hubsize'. The algorithm used to ascertain the levels of the nodes based on the data. The possible options are: hubsize, directed.
#'@param shakeTowards : String. Default to 'roots'. Controls whether in directed layout should all the roots be lined up at the top and their child nodes as close to their roots as possible (roots) or all the leaves lined up at the bottom and their parents as close to their children as possible (leaves, default
Expand Down
2 changes: 1 addition & 1 deletion R/visNetworkEvents.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' @param zoom : Fired when the user zooms in or out. The properties tell you which direction the zoom is in. The scale is a number greater than 0, which is the same that you get with network.getScale().
#' @param showPopup : Fired when the popup (tooltip) is shown.
#' @param hidePopup : Fired when the popup (tooltip) is hidden.
#' @param startStabilizing : Fired when stabilization starts. This is also the case when you drag a node and the physics simulation restarts to stabilize again. Stabilization does not neccesarily imply 'without showing'.
#' @param startStabilizing : Fired when stabilization starts. This is also the case when you drag a node and the physics simulation restarts to stabilize again. Stabilization does not neccessarily imply 'without showing'.
#' @param stabilizationProgress : Fired when a multiple of the updateInterval number of iterations is reached. This only occurs in the 'hidden' stabilization. Passes an object with properties structured as:
#' @param stabilizationIterationsDone : Fired when the 'hidden' stabilization finishes. This does not necessarily mean the network is stabilized; it could also mean that the amount of iterations defined in the options has been reached.
#' @param stabilized : Fired when the network has stabilized or when the stopSimulation() has been called. The amount of iterations it took could be used to tweak the maximum amount of iterations needed to stabilize the network.
Expand Down
8 changes: 4 additions & 4 deletions R/visPhysics.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' \item "theta" Number. Default to 0.5. This parameter determines the boundary between consolidated long range forces and individual short range forces. To oversimplify higher values are faster but generate more errors, lower values are slower but with less errors.
#' \item "gravitationalConstant" Number. Default to -2000. Gravity attracts. We like repulsion. So the value is negative. If you want the repuzsion to be stronger, decrease the value (so -10000, -50000).
#' \item "centralGravity" Number. Default to 0.3. There is a central gravity attractor to pull the entire network back to the center.
#' \item "springLength" Number. Default to 95. The edges are modelled as springs. This springLength here is the the rest length of the spring.
#' \item "springLength" Number. Default to 95. The edges are modelled as springs. This springLength here is the rest length of the spring.
#' \item "springConstant" Number. Default to 0.04. This is how 'sturdy' the springs are. Higher values mean stronger springs.
#' \item "damping" Number. Default to 0.09. Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
#' \item "avoidOverlap" Number. Default to 0. Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.
Expand All @@ -24,7 +24,7 @@
#' \item "theta" Number. Default to 0.5. This parameter determines the boundary between consolidated long range forces and individual short range forces. To oversimplify higher values are faster but generate more errors, lower values are slower but with less errors.
#' \item "gravitationalConstant" Number. Default to -50. Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000).
#' \item "centralGravity" Number. Default to 0.01. There is a central gravity attractor to pull the entire network back to the center.
#' \item "springLength" Number. Default to 100. The edges are modelled as springs. This springLength here is the the rest length of the spring.
#' \item "springLength" Number. Default to 100. The edges are modelled as springs. This springLength here is the rest length of the spring.
#' \item "springConstant" Number. Default to 0.08. This is how 'sturdy' the springs are. Higher values mean stronger springs.
#' \item "damping" Number. Default to 0.4. Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
#' \item "avoidOverlap" Number. Default to 0. Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.
Expand All @@ -34,7 +34,7 @@
#'\itemize{
#' \item "nodeDistance" Number. Default to 100. This is the range of influence for the repulsion.
#' \item "centralGravity" Number. Default to 0.2. There is a central gravity attractor to pull the entire network back to the center.
#' \item "springLength" Number. Default to 200. The edges are modelled as springs. This springLength here is the the rest length of the spring.
#' \item "springLength" Number. Default to 200. The edges are modelled as springs. This springLength here is the rest length of the spring.
#' \item "springConstant" Number. Default to 0.05. This is how 'sturdy' the springs are. Higher values mean stronger springs.
#' \item "damping" Number. Default to 0.09. Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
#'}
Expand All @@ -43,7 +43,7 @@
#'\itemize{
#' \item "nodeDistance" Number. Default to 120. This is the range of influence for the repulsion.
#' \item "centralGravity" Number. Default to 0.0. There is a central gravity attractor to pull the entire network back to the center.
#' \item "springLength" Number. Default to 100. The edges are modelled as springs. This springLength here is the the rest length of the spring.
#' \item "springLength" Number. Default to 100. The edges are modelled as springs. This springLength here is the rest length of the spring.
#' \item "springConstant" Number. Default to 0.01. This is how 'sturdy' the springs are. Higher values mean stronger springs.
#' \item "damping" Number. Default to 0.09. Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
#' \item "avoidOverlap" Number. Default to 0. Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.
Expand Down
2 changes: 1 addition & 1 deletion R/visSave.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Save a a visNetwork object to an HTML file
#'
#' Save a a visNetwork object to an HTML file for sharing with others. The HTML can
#' include it's dependencies in an adjacent directory or can bundle all
#' include its dependencies in an adjacent directory or can bundle all
#' dependencies into the HTML file (via base64 encoding).
#'
#' @param graph : a visNetwork object
Expand Down
4 changes: 2 additions & 2 deletions R/visTree.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param object \code{rpart}, rpart object
#' @param data \code{data.frame}, adding mini-graphics in tooltips using \code{sparkline} and \code{tooltipColumns} ?
#' @param tooltipColumns \code{numeric}, indice of columns used in tooltip. All by default.
#' @param tooltipColumns \code{numeric}, indices of columns used in tooltip. All by default.
#' So, we add boxplot / pie focus on sub-population vs all population using \code{sparkline} package. \code{NULL} to disable.
#' @param main Title. See \link[visNetwork]{visNetwork}
#' @param submain Subtitle. See \link[visNetwork]{visNetwork}
Expand Down Expand Up @@ -37,7 +37,7 @@
#' @param legendPosition \code{character}, one of "left" (Default) or "right"
#' @param highlightNearest \code{list}, Highlight nearest nodes. See \link[visNetwork]{visOptions}
#' @param collapse \code{list}, collapse or not using double click on a node ? See \link[visNetwork]{visOptions}
#' @param updateShape \code{boolean}, in case of collapse, udpate cluster node shape as terminal node ? Default to TRUE
#' @param updateShape \code{boolean}, in case of collapse, update cluster node shape as terminal node ? Default to TRUE
#' @param tooltipDelay \code{numeric}, delay for tooltips in millisecond. Default 500
#' @param rules \code{boolean}, add rules in tooltips ? Default to TRUE
#' @param simplifyRules \code{boolean}, simplify rules writing
Expand Down
2 changes: 1 addition & 1 deletion inst/docjs/network/edges.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ <h3>Options</h3>
<td>
To draw an arrow with default settings a string can be supplied. For
example: <code>arrows:'to, from, middle'</code> or
<code>'to;from'</code>, any combination with any seperating symbol
<code>'to;from'</code>, any combination with any separating symbol
is fine. If you want to control the size of the arrowheads, you can
supply an object.
</td>
Expand Down
4 changes: 2 additions & 2 deletions inst/htmlwidgets/lib/export/html2canvas/html2canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ function documentFromHTML(src) {
doc.close();
} catch(ee) {
log("createHTMLDocument write not supported, falling back to document.body.innerHTML");
doc.body.innerHTML = html; // ie9 doesnt support writing to documentElement
doc.body.innerHTML = html; // ie9 doesn't support writing to documentElement
}
}

Expand Down Expand Up @@ -1383,7 +1383,7 @@ ImageLoader.prototype.fetch = function(nodes) {
this.images = nodes.reduce(bind(this.findBackgroundImage, this), this.findImages(nodes));
this.images.forEach(function(image, index) {
image.promise.then(function() {
log("Succesfully loaded image #"+ (index+1), image);
log("Successfully loaded image #"+ (index+1), image);
}, function(e) {
log("Failed loading image #"+ (index+1), image, e);
});
Expand Down
Loading