View source: R/rhtmlSankeyTree.R
SankeyTree | R Documentation |
Create interactive d3.js visualizations of hierarchical data combining Sankey diagrams with tree layout.
SankeyTree(
data = NULL,
name = "name",
id = "id",
value = "size",
childrenName = "children",
maxLabelLength = 25,
nodeHeight = 100,
tooltip = NULL,
treeColors = FALSE,
categoryLegend = FALSE,
terminalDescription = FALSE,
numeric.distribution = TRUE,
width = NULL,
height = NULL
)
data |
Input. Should be a list with fields specified below. |
name |
The variable name of the field that specifies node name in |
id |
Should not change this. |
value |
The variable name of the field that specifies counts in |
childrenName |
The variable name of the field that specifies children in |
maxLabelLength |
Integer. Line wrapping will occur when the label of the node has width more than this value * 8 (pixels per char). Defaults to 25. |
nodeHeight |
Height of each node in pixels. Defaults to 100 pixels. |
tooltip |
Tooltip to attach to each node. |
terminalDescription |
Logical. Add description for terminal nodes? Defaults to FALSE. |
numeric.distribution |
Logical. Show numerical distribution for each node? If regression tree, then a histogram is plotted. If classification tree, then a horizontal bar plot is drawn. Defaults to TRUE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.