Skip to content

arlas-d3 > "donuts/utils/DonutUtils" > DonutNode

Interface: DonutNode

Hierarchy

HierarchyRectangularNode<any>

↳ DonutNode

Index

Properties

Methods


Properties

<Optional> children

● children: this[]

Inherited from HierarchyNode.children

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:51

An array of child nodes, if any; undefined for leaf nodes.


data

● data: any

Inherited from HierarchyNode.data

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:31

The associated data, as specified to the constructor.


depth

● depth: number

Inherited from HierarchyNode.depth

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:36

Zero for the root node, and increasing by one for each descendant generation.


endAngle

● endAngle: number

Defined in donuts/utils/DonutUtils.ts:60


height

● height: number

Inherited from HierarchyNode.height

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:41

Zero for leaf nodes, and the greatest distance from any descendant leaf for internal nodes.


<Optional> id

● id: string

Inherited from HierarchyNode.id

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:61

Optional node id string set by StratifyOperator, if hierarchical data was created from tabular data using stratify().


innerRadius

● innerRadius: number

Defined in donuts/utils/DonutUtils.ts:57


isSelected

● isSelected: boolean

Defined in donuts/utils/DonutUtils.ts:56


outerRadius

● outerRadius: number

Defined in donuts/utils/DonutUtils.ts:58


parent

● parent: this | null

Inherited from HierarchyNode.parent

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:46

The parent node, or null for the root node.


startAngle

● startAngle: number

Defined in donuts/utils/DonutUtils.ts:59


<Optional> value

● value: number

Inherited from HierarchyNode.value

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:56

Aggregated numeric value as calculated by sum(value) or count(), if previously invoked.


x0

● x0: number

Inherited from HierarchyRectangularNode.x0

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:372

The left edge of the rectangle.


x1

● x1: number

Inherited from HierarchyRectangularNode.x1

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:382

The right edge of the rectangle.


y0

● y0: number

Inherited from HierarchyRectangularNode.y0

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:377

The top edge of the rectangle


y1

● y1: number

Inherited from HierarchyRectangularNode.y1

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:387

The bottom edge of the rectangle.


Methods

ancestors

ancestors(): this[]

Inherited from HierarchyNode.ancestors

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:66

Returns the array of ancestors nodes, starting with this node, then followed by each parent up to the root.

Returns: this[]


copy

copy(): this

Inherited from HierarchyNode.copy

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:146

Return a deep copy of the subtree starting at this node. The returned deep copy shares the same data, however. The returned node is the root of a new tree; the returned node’s parent is always null and its depth is always zero.

Returns: this


count

count(): this

Inherited from HierarchyNode.count

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:104

Computes the number of leaves under this node and assigns it to node.value, and similarly for every descendant of node. If this node is a leaf, its count is one. Returns this node.

Returns: this


descendants

descendants(): this[]

Inherited from HierarchyNode.descendants

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:71

Returns the array of descendant nodes, starting with this node, then followed by each child in topological order.

Returns: this[]


each

each(func: function): this

Inherited from HierarchyNode.each

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:124

Invokes the specified function for node and each descendant in breadth-first order, such that a given node is only visited if all nodes of lesser depth have already been visited, as well as all preceding nodes of the same depth.

Parameters:

Name Type Description
func function The specified function is passed the current node.

Returns: this


eachAfter

eachAfter(func: function): this

Inherited from HierarchyNode.eachAfter

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:132

Invokes the specified function for node and each descendant in post-order traversal, such that a given node is only visited after all of its descendants have already been visited.

Parameters:

Name Type Description
func function The specified function is passed the current node.

Returns: this


eachBefore

eachBefore(func: function): this

Inherited from HierarchyNode.eachBefore

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:140

Invokes the specified function for node and each descendant in pre-order traversal, such that a given node is only visited after all of its ancestors have already been visited.

Parameters:

Name Type Description
func function The specified function is passed the current node.

Returns: this


leaves

leaves(): this[]

Inherited from HierarchyNode.leaves

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:76

Returns the array of leaf nodes in traversal order; leaves are nodes with no children.

Returns: this[]


links(): Array<HierarchyRectangularLink<any>>

Inherited from HierarchyRectangularNode.links

Overrides HierarchyNode.links

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:393

Returns an array of links for this node, where each link is an object that defines source and target properties. The source of each link is the parent node, and the target is a child node.

Returns: Array<HierarchyRectangularLink<any>>


path

path(target: this): this[]

Inherited from HierarchyNode.path

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:84

Returns the shortest path through the hierarchy from this node to the specified target node. The path starts at this node, ascends to the least common ancestor of this node and the target node, and then descends to the target node.

Parameters:

Name Type Description
target this The target node.

Returns: this[]


sort

sort(compare: function): this

Inherited from HierarchyNode.sort

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:115

Sorts the children of this node, if any, and each of this node’s descendants’ children, in pre-order traversal using the specified compare function, and returns this node.

Parameters:

Name Type Description
compare function The compare function is passed two nodes a and b to compare. If a should be before b, the function must return a value less than zero; if b should be before a, the function must return a value greater than zero; otherwise, the relative order of a and b are not specified. See `array.sort` for more.

Returns: this


sum

sum(value: function): this

Inherited from HierarchyNode.sum

Defined in /docs/node_modules/@types/d3-hierarchy/index.d.ts:98

Evaluates the specified value function for this node and each descendant in post-order traversal, and returns this node. The node.value property of each node is set to the numeric value returned by the specified function plus the combined value of all descendants.

Parameters:

Name Type Description
value function The value function is passed the node’s data, and must return a non-negative number.

Returns: this