This widget produces tidy node-link diagrams of trees using the Reingold–Tilford “tidy” algorithm.
It is based on Interactive D3 Tree layout diagram library.
- Tutorials:
- See:
Methods
# setColors(colors)
Set the colors to be used on the chart.
Parameters:
Name | Type | Description |
---|---|---|
colors |
Array.<string>
|
Array of string colors. |
# setFontColour(color)
Set the font color
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
The font color |
# setIsValueCount(isValueCount)
Sets whether to display the count of values or the values.
Parameters:
Name | Type | Description |
---|---|---|
isValueCount |
boolean
|
Enable the count of value. |
# setIsZoomEnabled(bool)
Set the zoom as enabled or disabled.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Enabled or disabled the zoom. |
# setKeys(keys)
Set the keys to be displayed in the tree.
Parameters:
Name | Type | Description |
---|---|---|
keys |
Array.<string>
|
keys to show. |
# setMaxDepth(num)
Set the maximun depth of the tree.
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
Depth of the tree |
# setMaxFontSize(num)
Set the maximum font size
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
Font size |
# setMinCircleRadius(num)
Set the minimum circle radius of each child node.
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
The radius. |
# setMinRadius(num)
Set the minimum connection radius between nodes.
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
The radius. |
# setNumMaxElem(num)
Set the maximun number of elements to display.
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
The maximum elements |
# setOn(event)
Attach an event handler function for one event to the widget.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object
|
Event ot array of events with the handler. |
on |
string
|
Name of the event to listen. |
perform |
function
|
Function to execute when the event is triggered. |
# setSvgMargin(num)
Sets the container margin with the SVG graphic.
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
The margin |
# setValue(value)
Set the key value to show.
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
Value to show |