From 49a0571594004796caaa22482991d3ee2dd9cd95 Mon Sep 17 00:00:00 2001 From: "B.Thieurmel" Date: Thu, 22 Dec 2016 12:24:14 +0100 Subject: [PATCH] CRAN clean --- R/visInteraction.R | 5 ++++- R/visLegend.R | 2 +- man/visInteraction.Rd | 3 +-- man/visLegend.Rd | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/R/visInteraction.R b/R/visInteraction.R index ede1423..aec920b 100644 --- a/R/visInteraction.R +++ b/R/visInteraction.R @@ -85,7 +85,7 @@ visInteraction <- function(graph, selectConnectedEdges = NULL, tooltipDelay = NULL, tooltipStay = 300, - tooltipStyle = 'position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);', + tooltipStyle = NULL, zoomView = NULL){ @@ -116,6 +116,9 @@ visInteraction <- function(graph, if(length(interaction) > 0){ graph$x$options$interaction <- mergeLists(graph$x$options$interaction, interaction) } + if(is.null(tooltipStyle)){ + tooltipStyle <- 'position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);' + } x <- list(tooltipStay = tooltipStay, tooltipStyle = tooltipStyle) graph$x <- mergeLists(graph$x, x) } diff --git a/R/visLegend.R b/R/visLegend.R index 173959e..7e2ff55 100644 --- a/R/visLegend.R +++ b/R/visLegend.R @@ -71,7 +71,7 @@ #' visNetwork(nodes, edges) %>% #' visGroups(groupname = "A", color = "red") %>% #' visGroups(groupname = "B", color = "lightblue") %>% -#' visLegend(addNodes = lnodes, useGroups = T, ncol = 2) +#' visLegend(addNodes = lnodes, useGroups = TRUE, ncol = 2) #' #' # for more complex option, you can use a list(of list...) #' # or a data.frame with specific notaion diff --git a/man/visInteraction.Rd b/man/visInteraction.Rd index a718a8a..f4e5fde 100644 --- a/man/visInteraction.Rd +++ b/man/visInteraction.Rd @@ -9,8 +9,7 @@ visInteraction(graph, dragNodes = NULL, dragView = NULL, hoverConnectedEdges = NULL, keyboard = NULL, multiselect = NULL, navigationButtons = NULL, selectable = NULL, selectConnectedEdges = NULL, tooltipDelay = NULL, tooltipStay = 300, - tooltipStyle = "position: fixed;visibility:hidden;padding: 5px;white-space: nowrap;font-family: verdana;font-size:14px;font-color:#000000;background-color: #f5f4ed;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;border: 1px solid #808074;box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);", - zoomView = NULL) + tooltipStyle = NULL, zoomView = NULL) } \arguments{ \item{graph}{: a visNetwork object} diff --git a/man/visLegend.Rd b/man/visLegend.Rd index 9617032..73ee332 100644 --- a/man/visLegend.Rd +++ b/man/visLegend.Rd @@ -91,7 +91,7 @@ visNetwork(nodes, edges) \%>\% visNetwork(nodes, edges) \%>\% visGroups(groupname = "A", color = "red") \%>\% visGroups(groupname = "B", color = "lightblue") \%>\% - visLegend(addNodes = lnodes, useGroups = T, ncol = 2) + visLegend(addNodes = lnodes, useGroups = TRUE, ncol = 2) # for more complex option, you can use a list(of list...) # or a data.frame with specific notaion