Interface TreeLayout

Index

Properties

Methods

Properties

public children: { (): (d: any) => any; (children: (d: any) => any): D3.Layout.TreeLayout; }

Gets or sets the specified children accessor function

(): (d: any) => any

Gets the children accessor function

Returns

(d: any) => any

(): TreeLayout

Sets the specified children accessor function

Returns

TreeLayout

public seperation: { (): (a: D3.Layout.GraphNode, b: D3.Layout.GraphNode) => number; (seperation: (a: D3.Layout.GraphNode, b: D3.Layout.GraphNode) => number): D3.Layout.TreeLayout; }

If separation is specified, uses the specified function to compute separation between neighboring nodes. If separation is not specified, returns the current separation function

(): (a: D3.Layout.GraphNode, b: D3.Layout.GraphNode) => number

Gets the current separation function

Returns

(a: D3.Layout.GraphNode, b: D3.Layout.GraphNode) => number

(): TreeLayout

Sets the specified function to compute separation between neighboring nodes

Returns

TreeLayout

public size: { (): number[]; (size: number[]): D3.Layout.TreeLayout; }

Gets or sets the available layout size

(): Array<number>

Gets the available layout size

Returns

Array<number>

(): TreeLayout

Sets the available layout size

Returns

TreeLayout

public sort: { (): (d1: any, d2: any) => number; (comparator: (d1: any, d2: any) => number): D3.Layout.TreeLayout; }

Gets or sets the sort order of sibling nodes for the layout using the specified comparator function

(): (d1: any, d2: any) => number

Gets the sort order function of sibling nodes for the layout

Returns

(d1: any, d2: any) => number

(): TreeLayout

Sets the sort order of sibling nodes for the layout using the specified comparator function

Returns

TreeLayout

Methods

public links(nodes: GraphNode[]): GraphLink[]

Given the specified array of nodes, such as those returned by nodes, returns an array of objects representing the links from parent to child for each node

Parameters

Returns

GraphLink[]

public nodes(root: GraphNode): TreeLayout

Runs the tree layout

Parameters

Returns

TreeLayout