diff --git a/R/diagonalNetwork.R b/R/diagonalNetwork.R index 638d1111..c0107574 100644 --- a/R/diagonalNetwork.R +++ b/R/diagonalNetwork.R @@ -6,6 +6,8 @@ #' @param width numeric width for the network graph's frame area in pixels (if #' \code{NULL} then width is automatically determined based on context) #' @param fontSize numeric font size in pixels for the node text labels. +#' @param fontSizeTransition numeric font size in pixels for the node text +#' labels after mouseover transition is complete. #' @param fontFamily font family for the node text labels. #' @param linkColour character string specifying the colour you want the link #' lines to be. Multiple formats supported (e.g. hexadecimal). @@ -92,6 +94,7 @@ diagonalNetwork <- function( height = NULL, width = NULL, fontSize = 10, + fontSizeTransition = 25, fontFamily = "serif", linkColour = "#ccc", nodeColour = "#fff", @@ -112,6 +115,7 @@ diagonalNetwork <- function( height = height, width = width, fontSize = fontSize, + fontSizeTransition = fontSizeTransition, fontFamily = fontFamily, linkColour = linkColour, nodeColour = nodeColour, diff --git a/inst/htmlwidgets/diagonalNetwork.js b/inst/htmlwidgets/diagonalNetwork.js index b7b5db5d..fda24dff 100755 --- a/inst/htmlwidgets/diagonalNetwork.js +++ b/inst/htmlwidgets/diagonalNetwork.js @@ -169,7 +169,7 @@ HTMLWidgets.widget({ d3.select(this).select("text").transition() .duration(750) .style("stroke-width", ".5px") - .style("font", "25px " + x.options.fontFamily) + .style("font", x.options.fontSizeTransition + "px " + x.options.fontFamily) .style("opacity", 1); } diff --git a/man/diagonalNetwork.Rd b/man/diagonalNetwork.Rd index 2bc47050..71f487ed 100644 --- a/man/diagonalNetwork.Rd +++ b/man/diagonalNetwork.Rd @@ -10,10 +10,20 @@ IEEE Transactions on Software Engineering, SE-7(2), 223-228. Mike Bostock: \url{http://bl.ocks.org/mbostock/4339083}. } \usage{ -diagonalNetwork(List, height = NULL, width = NULL, fontSize = 10, - fontFamily = "serif", linkColour = "#ccc", nodeColour = "#fff", - nodeStroke = "steelblue", textColour = "#111", opacity = 0.9, - margin = NULL) +diagonalNetwork( + List, + height = NULL, + width = NULL, + fontSize = 10, + fontSizeTransition = 25, + fontFamily = "serif", + linkColour = "#ccc", + nodeColour = "#fff", + nodeStroke = "steelblue", + textColour = "#111", + opacity = 0.9, + margin = NULL +) } \arguments{ \item{List}{a hierarchical list object with a root node and children.} @@ -26,6 +36,9 @@ diagonalNetwork(List, height = NULL, width = NULL, fontSize = 10, \item{fontSize}{numeric font size in pixels for the node text labels.} +\item{fontSizeTransition}{numeric font size in pixels for the node text +labels after mouseover transition is complete.} + \item{fontFamily}{font family for the node text labels.} \item{linkColour}{character string specifying the colour you want the link