CircleTree
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(options: object) |
Method Summary
Public Methods | ||
public |
getDisplayText(nodeDataItem: object): string Gets the display text for a given data item. |
|
public |
initialize(): * |
|
public |
setDisplayTextAccessor(newDisplayTextAccessor: displayTextAccessorCallBack): * Sets the display text accessor, used to get the display text for the nodes. |
|
public |
validateSettings(): * |
Private Methods | ||
private |
|
|
private |
_getNodeSize(): undefined[] |
|
private |
_linkEnter(source: *, linkEnter: *, links: *, linkPathGenerator: *): * |
|
private |
_linkExit(source: *, linkExit: *, linkExitTransition: *, links: *, linkPathGenerator: *): * |
|
private |
_linkUpdate(source: *, linkUpdate: *, linkUpdateTransition: *, links: *, linkPathGenerator: *): * |
|
private |
_nodeEnter(nodeEnter: *, nodes: *): * |
|
private |
_nodeExit(nodeExit: *, nodeExitTransition: *, nodes: *): * |
|
private |
_nodeUpdate(nodeUpdate: *, nodeUpdateTransition: *, nodes: *): * |
Inherited Summary
From class BaseTree | ||
public |
|
|
public |
nodeSettings: * |
|
private |
_allowFocus: * |
|
private |
|
|
private |
_allowPan: * |
|
private |
_allowZoom: * |
|
private |
_data: * |
|
private |
_duration: * |
|
private |
_element: * |
|
private |
_getChildren: * |
|
private |
_getId: * |
|
private |
_getParentId: * |
|
private |
|
|
private |
_isFlatData: * |
|
private |
|
|
private |
_links: * |
|
private |
_margins: * |
|
private |
_maxScale: * |
|
private |
_minScale: * |
|
private |
|
|
private |
|
|
private |
_orientation: * |
|
private |
|
|
private |
_root: * |
|
private |
_svg: * |
|
private |
_theme: * |
|
private |
|
|
private |
_view: * |
|
private |
|
|
private |
|
|
private |
|
|
public |
centerNode(nodeDataItem: *): object Center the view to a D3 tree node. |
|
public |
Collapses the given node data item. |
|
public |
collapseRecursively(nodeDataItem: object): object Collapses the given node data item, and its children and descendants. |
|
public |
Expands the given node data item. |
|
public |
expandRecursively(nodeDataItem: object): object Expands the given node data item, and its children and descendants. |
|
public |
focusToNode(idOrNodeDataItem: *): object Focuses and expands all the way through to a node. |
|
public |
Gets the boolean value indicating whether to focus to the clicked node or not. |
|
public |
Gets the boolean value indicating whether to pan to a clicked node. |
|
public |
Gets the boolean value indicating whether the drag-to-pan pan feature is enabled or not. |
|
public |
Gets the boolean value indicating whether the mouse wheel to zoom in/out feature is enabled or not. |
|
public |
getChildren(dataItem: object): object[] Gets the children data items for a given data item. |
|
public |
Gets the data items used to render the nodes. |
|
public |
getDataItem(id: *): object Get a single data item given an id. |
|
public |
Gets the duration of animations for the tree. |
|
public |
getElement(): object Gets the container DOM element. |
|
public |
Gets the height of SVG, including the margins. |
|
public |
Gets the height of the SVG for the tree diagram. |
|
public |
Gets the ID for a given data item. |
|
public |
Returns a boolean whether the tree is using flat data or not. |
|
public |
Get the array of D3 link data items the D3 tree has generated. |
|
public |
Gets the load on demand settings object. |
|
public |
getMargins(): object Gets the margins for the tree diagram. |
|
public |
Gets the maximum zoom scaling. |
|
public |
Gets the minimum zoom scaling. |
|
public |
Get a single node given an id or a data item. |
|
public |
Gets the node depth multiplier that affects the distance between the parent node and the child node. |
|
public |
Gets the node settings object. |
|
public |
Get the array of D3 node data items the D3 tree has generated. |
|
public |
Gets the tree orientation. |
|
public |
Gets the D3 selection object for the panning container element. |
|
public |
getParentId(dataItem: object): * Gets the parent ID for a given data item. |
|
public |
Gets the root node object. |
|
public |
Gets the D3 selection object for the SVG element. |
|
public |
Gets the tree theme. |
|
public |
Gets the D3 generator object used to generate the tree nodes coordinates. |
|
public |
Gets the D3 selection object for the view element. |
|
public |
getVisibleNodes(): object[] Get the array of visible D3 node data items the D3 tree has generated. |
|
public |
Gets the width of SVG, including the margins. |
|
public |
Gets the width of the SVG for the tree diagram. |
|
public |
Gets the D3 zoom listener used for the panning, zooming and focus features. |
|
public |
hideSiblings(nodeDataItem: object): object Hide the siblings nodes for a given node. |
|
public |
initialize(): object Creates and set up the the tree diagram. |
|
public |
Focuses to a node, given a node data item. |
|
public |
nodeToggle(nodeDataItem: *): object Toggles the children visibility for a given node data item. |
|
public |
Regenerates the node data. |
|
public |
removeSelection(nodeDataItem: object): object Remove node selections for a given node and it's children. |
|
public |
setAllowFocus(newAllowFocus: boolean): object Sets the boolean value indicating whether to focus to the clicked node or not. |
|
public |
setAllowNodeCentering(newAllowNodeCentering: boolean): object Whether to pan to a clicked node. |
|
public |
setAllowPan(newAllowPan: *): object Sets the boolean value indicating whether the drag-to-pan pan feature is enabled or not. |
|
public |
setAllowZoom(newAllowZoom: boolean): object Sets the boolean value indicating whether the mouse wheel to zoom in/out feature is enabled or not. |
|
public |
setChildrenAccessor(newChildrenAccessor: getChildrenCallBack): object Sets the children accessor callback function, defining how to get the children data items from a given data item. |
|
public |
Sets the data items the tree should use to render the nodes. |
|
public |
setDuration(newDuration: *): object Sets the duration of animations for the tree. |
|
public |
setElement(newElement: object): object Sets the container DOM element |
|
public |
setHeightWithoutMargins(newHeightWithoutMargin: *): object Sets the height of the SVG for the tree diagram. |
|
public |
setIdAccessor(newIdAccessor: getIdCallBack): object Sets the ID accessor callback function, defining how to get a unique ID from a given data item. |
|
public |
setIsFlatData(newIsFlatData: boolean): * Sets the is flat data flag. |
|
public |
setMargins(newMargins: object): object Sets the margins for the tree diagram. |
|
public |
setMaxScale(newMaxScale: *): object Sets the maximum zoom scaling. |
|
public |
setMinScale(newMinScale: *): object Sets the minimum zoom scaling. |
|
public |
setNodeDepthMultiplier(newNodeDepthMultiplier: number): object Sets the node depth multiplier value. |
|
public |
setOrientation(orientation: string): object Sets the tree orientation. |
|
public |
setParentIdAccessor(newParentIdAccessor: getParentIdCallBack): object Sets the parent ID accessor callback function, defining how to get the parent ID from a given data item. |
|
public |
Sets the tree theme. |
|
public |
setWidthWithoutMargins(newWidthWithoutMargin: *): object Sets the width of the SVG for the tree diagram. |
|
public |
Updates the tree given a D3 tree node. |
|
public |
Updates the dimensions of the SVG. |
|
public |
updateTreeWithFocusOnNode(nodeDataItem: object): object Updates the tree diagram so only the relevant focused node and direct parent hierarchies are shown. |
|
public |
Validates the settings to ensure the tree diagram is ready to be generated. |
|
private |
_addUnderlyingChildNode(parentNodeDataItem: object, dataItem: object): object Creates and adds a child D3 tree node to a given parent D3 tree node. |
|
private |
_createNode(parentNodeDataItem: object, dataItem: object): object Creates a child D3 tree node. |
|
private |
Gets the path generator used to render the links between the nodes. |
|
private |
_getNodeSize(): number[] Called when updating dimensions when node settings is configured to be 'nodesize'. |
|
private |
_linkEnter(source: *, linkEnter: *, links: *, linkPathGenerator: *): object Defines how to create the links for newly added data objects. |
|
private |
_linkExit(source: object, linkExit: *, linkExitTransition: *, links: *, linkPathGenerator: *): object Defines how to remove the links for the removed data objects. |
|
private |
_linkUpdate(source: *, linkUpdate: *, linkUpdateTransition: *, links: *, linkPathGenerator: *): object Defines how to update the links for the data objects. |
|
private |
_nodeEnter(nodeEnter: *, nodes: *): object Defines how to create the nodes for newly added data objects. |
|
private |
Defines how to remove the nodes for the removed data objects. |
|
private |
_nodeUpdate(nodeUpdate: *, nodeUpdateTransition: *, nodes: *): object Defines how to update the nodes for the data objects. |
|
private |
_onNodeClick(nodeDataItem: object, index: number, arr: object[]): boolean Triggers the nodeClick event when a D3 node is clicked on, and proceeds to focus/expand/collapse the node. |
|
private |
_populateUnderlyingChildren(nodeDataItem: object): object Populates the node's children to a hidden property. |
|
private |
_processLoadedDataForNodeFocus(nodeDataItem: object, result: object[]): object Process the loaded data from AJAX resulting from a node expand. |
|
private |
_processLoadedDataForNodeToggle(nodeDataItem: object, result: object[]): object Process the loaded data from AJAX resulting from a node toggle. |
|
private |
_updateLinks(nodeDataItem: object, links: object[]): object Updates the tree node links given a D3 tree node. |
|
private |
_updateNodes(nodeDataItem: object, nodes: object[]): object Updates the tree nodes given a D3 tree node. |
Public Constructors
public constructor(options: object) source
Override:
BaseTree#constructorParams:
Name | Type | Attribute | Description |
options | object |
|
The options object. |
options.getDisplayText | displayTextAccessorCallBack |
|
Determines how to obtain the text to display for a node corresponding to a data item. |
Public Methods
public getDisplayText(nodeDataItem: object): string source
Gets the display text for a given data item.
Params:
Name | Type | Attribute | Description |
nodeDataItem | object | The data item to get the display text from. |
public initialize(): * source
Creates and set up the the tree diagram.
Override:
BaseTree#initializeReturn:
* |
public setDisplayTextAccessor(newDisplayTextAccessor: displayTextAccessorCallBack): * source
Sets the display text accessor, used to get the display text for the nodes.
Params:
Name | Type | Attribute | Description |
newDisplayTextAccessor | displayTextAccessorCallBack |
Return:
* |
public validateSettings(): * source
Validates the settings to ensure the tree diagram is ready to be generated.
Override:
BaseTree#validateSettingsReturn:
* |
Private Methods
private _getLinkPathGenerator(): * source
Gets the path generator used to render the links between the nodes.
Override:
BaseTree#_getLinkPathGeneratorReturn:
* |
private _getNodeSize(): undefined[] source
Called when updating dimensions when node settings is configured to be 'nodesize'.
Override:
BaseTree#_getNodeSizeprivate _linkEnter(source: *, linkEnter: *, links: *, linkPathGenerator: *): * source
Defines how to create the links for newly added data objects.
Override:
BaseTree#_linkEnterParams:
Name | Type | Attribute | Description |
source | * | ||
linkEnter | * | ||
links | * | ||
linkPathGenerator | * |
Return:
* |
private _linkExit(source: *, linkExit: *, linkExitTransition: *, links: *, linkPathGenerator: *): * source
Defines how to remove the links for the removed data objects.
Override:
BaseTree#_linkExitParams:
Name | Type | Attribute | Description |
source | * | ||
linkExit | * | ||
linkExitTransition | * | ||
links | * | ||
linkPathGenerator | * |
Return:
* |
private _linkUpdate(source: *, linkUpdate: *, linkUpdateTransition: *, links: *, linkPathGenerator: *): * source
Defines how to update the links for the data objects.
Override:
BaseTree#_linkUpdateParams:
Name | Type | Attribute | Description |
source | * | ||
linkUpdate | * | ||
linkUpdateTransition | * | ||
links | * | ||
linkPathGenerator | * |
Return:
* |
private _nodeEnter(nodeEnter: *, nodes: *): * source
Defines how to create the nodes for newly added data objects.
Override:
BaseTree#_nodeEnterParams:
Name | Type | Attribute | Description |
nodeEnter | * | ||
nodes | * |
Return:
* |
private _nodeExit(nodeExit: *, nodeExitTransition: *, nodes: *): * source
Defines how to remove the nodes for the removed data objects.
Override:
BaseTree#_nodeExitParams:
Name | Type | Attribute | Description |
nodeExit | * | ||
nodeExitTransition | * | ||
nodes | * |
Return:
* |
private _nodeUpdate(nodeUpdate: *, nodeUpdateTransition: *, nodes: *): * source
Defines how to update the nodes for the data objects.
Override:
BaseTree#_nodeUpdateParams:
Name | Type | Attribute | Description |
nodeUpdate | * | ||
nodeUpdateTransition | * | ||
nodes | * |
Return:
* |