Module

Tree

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:

View Source widgets/tree.js, line 7

Methods

# setColors(colors)

Set the colors to be used on the chart.

Parameters:
Name Type Description
colors Array.<string>

Array of string colors.

View Source widgets/tree.js, line 66

# setFontColour(color)

Set the font color

Parameters:
Name Type Description
color string

The font color

View Source widgets/tree.js, line 157

# setIsValueCount(isValueCount)

Sets whether to display the count of values or the values.

Parameters:
Name Type Description
isValueCount boolean

Enable the count of value.

View Source widgets/tree.js, line 84

# setIsZoomEnabled(bool)

Set the zoom as enabled or disabled.

Parameters:
Name Type Description
bool boolean

Enabled or disabled the zoom.

View Source widgets/tree.js, line 93

# setKeys(keys)

Set the keys to be displayed in the tree.

Parameters:
Name Type Description
keys Array.<string>

keys to show.

View Source widgets/tree.js, line 46

# setMaxDepth(num)

Set the maximun depth of the tree.

Parameters:
Name Type Description
num number

Depth of the tree

View Source widgets/tree.js, line 75

# setMaxFontSize(num)

Set the maximum font size

Parameters:
Name Type Description
num number

Font size

View Source widgets/tree.js, line 166

# setMaxRadius(num)

Set the max radious.

Parameters:
Name Type Description
num number

The radius.

View Source widgets/tree.js, line 130

# setMinCircleRadius(num)

Set the minimum circle radius of each child node.

Parameters:
Name Type Description
num number

The radius.

View Source widgets/tree.js, line 121

# setMinRadius(num)

Set the minimum connection radius between nodes.

Parameters:
Name Type Description
num number

The radius.

View Source widgets/tree.js, line 112

# setNumMaxElem(num)

Set the maximun number of elements to display.

Parameters:
Name Type Description
num number

The maximum elements

View Source widgets/tree.js, line 148

# 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.

View Source widgets/tree.js, line 57

# setSvgMargin(num)

Sets the container margin with the SVG graphic.

Parameters:
Name Type Description
num number

The margin

View Source widgets/tree.js, line 139

# setValue(value)

Set the key value to show.

Parameters:
Name Type Description
value string

Value to show

View Source widgets/tree.js, line 37