Options
All
  • Public
  • Public/Protected
  • All
Menu

The OrgChart node model

var chart = new OrgChart('#tree', {});
chart.onInit(() => {
let node = chart.getNode(2);
console.log(node);
});
chart.load(nodes)

Hierarchy

  • node

Index

Properties

children?: node[]

array of children nodes, initialized on demand if all children are collpased it will be empty array

childrenIds?: (string | number)[]

array of ids, always initialized

cids?: (string | number)[]

An array of child node ids.

collapsed?: boolean

true if the node is collpased, false if it is not and undefined if not initalized

collapsedChildrenIds?: (string | number)[]

Array of collapsed direct child node IDs.

Contains the IDs of child nodes whose collapsed state is true. Always initialized as an array.

deepChildCount?: number

Total number of descendant nodes (children at all levels).

deepCollapsedChildCount?: number

Total number of collapsed descendant nodes (collapsed at any depth).

h?: number

height of the node, default value undefined

id?: string | number

the same id you provided in the source node

isAssistant?: boolean

if the node is assistant is true if not false if the node is not initialized is undefined

isChildOfPartner?: boolean

indicates if the node is child of partner node

isPartner?: boolean
isSplit?: boolean

for assistant nodes and mixed layout we create dynamic nodes called splits, default value undefined

isTreeListItem?: boolean

Indicates whether this node is rendered as a Tree List item.

When true, the node is displayed using the Tree List layout instead of the standard chart layout.

lcn?: string

layout configuration name, default value undefined

leftNeighbor?: node

a reference to the left node neighbor, the default value is undefined

level?: number

a level of the node starting from zero

min?: boolean

true if the node is minimized, default value undefined

movex?: number

move the the node on x axis

movey?: number

move the the node on y axis

order?: number

it is set only if you define order option, default value undefined

padding?: number

set only if the node contains sub trees and padding is defined in the template, default value undefined

parent?: node

a reference to the parent node, default value is null, if the nodes is collapse this proprty is not initalized and can be null even if pid is not null

partnerSeparation?: number
pid?: string | number

partner parent id, it is the partner parent node id of the partner node, it is the same ppid you provided in the source node, the default value is undefined.

ppid?: string | number

parent id, it is the parent node id, it is the same pid you provided in the source node, the default value is undefined.

rightNeighbor?: node

a reference to the right node neighbor, the default value is undefined

stChildren?: node[]

array of sub tree children root nodes, initialized on demand if the node is minimized it will be empty array

stChildrenIds?: (string | number)[]

array of sub tree children root node ids, always initialized

stContainerNodes?: node[]

sub tree container nodes array, property only for the root node, default value undefined

stParent?: node
  • a reference to the parent node of a sub tree, default value is null, if the parent node is minimized this proprty is not initalized and can be null even if we have stpid
stpid?: string | number

ub tree parent id, it is the parent node id of the root node of the sub tree, it is the same stpid you provided in the source node, the default value is null if not provided or if node with the same id does not exist.

subLevels?: number

sub levels, default value undefined

tags?: string[]

array of string values, the same array you provided in the source node

templateName?: string

template name, you can specify multiple templates with tags in one chart

treeList?: { maxHeight?: number; pinnedIds?: []; scrollTop?: number; scrollTopMax?: number }

TreeList layout state and configuration. Available only when using OrgChart.layout.treeList.

Type declaration

  • Optional maxHeight?: number

    Max height, comes from the template treeListMaxHeight

  • Optional pinnedIds?: []

    Pinned nodes at the top in TreeList layout, works with OrgChart.layout. By default is undefined it is initialized only with OrgChart.layout.treeList lyouts.

  • Optional scrollTop?: number

    Gets the number of pixels by which the TreeList content is scrolled from its top edge. By default is undefined it is initialized only with OrgChart.layout.treeList lyouts.

  • Optional scrollTopMax?: number

    Gets the max number of pixels by which the TreeList content can be scrolled from its top edge. By default is undefined it is initialized only with OrgChart.layout.treeList lyouts.

w?: number

width of the node, default value undefined

x?: number

x position, default value undefined

y?: number

y position, default value undefined

Legend

  • Constructor
  • Property
  • Method
  • Static property
  • Static method
  • Property

Settings

Theme

Generated using TypeDoc