Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

drag

drag: function

Type declaration

    • (): any
    • Returns any

event

event: any = d3.dispatch(EventType[EventType.start], EventType[EventType.tick], EventType[EventType.end])

Methods

alpha

  • alpha(): number
  • alpha(x: number): this

avoidOverlaps

  • avoidOverlaps(): boolean
  • avoidOverlaps(v: boolean): this
  • if true, the layout will not permit overlaps of the node bounding boxes (defined by the width and height properties on nodes)

    property

    avoidOverlaps

    type

    bool

    default

    false

    Returns boolean

  • Parameters

    • v: boolean

    Returns this

constraints

  • constraints(): Array<any>
  • constraints(c: Array<any>): this

convergenceThreshold

  • convergenceThreshold(): number
  • convergenceThreshold(x: number): this

defaultNodeSize

  • defaultNodeSize(): number
  • defaultNodeSize(x: number): this

distanceMatrix

  • distanceMatrix(): Array<Array<number>>
  • distanceMatrix(d: Array<Array<number>>): this
  • Matrix of ideal distances between all pairs of nodes. If unspecified, the ideal distances for pairs of nodes will be based on the shortest path distance between them.

    property

    distanceMatrix

    type

    {Array of Array of Number}

    default

    null

    Returns Array<Array<number>>

  • Parameters

    • d: Array<Array<number>>

    Returns this

flowLayout

  • flowLayout(axis: string, minSeparation: number | function): this
  • causes constraints to be generated such that directed graphs are laid out either from left-to-right or top-to-bottom. a separation constraint is generated in the selected axis for each edge that is not involved in a cycle (part of a strongly connected component)

    Parameters

    • axis: string

      'x' for left-to-right, 'y' for top-to-bottom

    • minSeparation: number | function

      either a number specifying a minimum spacing required across all links or a function to return the minimum spacing for each link

    Returns this

getLinkLength

  • getLinkLength(link: Link<Node | number>): number

getLinkType

  • getLinkType(link: Link<Node | number>): number

groupCompactness

  • groupCompactness(): number
  • groupCompactness(x: number): this

groups

  • groups(): Array<Group>
  • groups(x: Array<Group>): this

handleDisconnected

  • handleDisconnected(): boolean
  • handleDisconnected(v: boolean): this
  • if true, the final step of the start method will be to nicely pack connected components of the graph. works best if start() is called with a reasonable number of iterations specified and each node has a bounding box (defined by the width and height properties on nodes).

    property

    handleDisconnected

    type

    bool

    default

    true

    Returns boolean

  • Parameters

    • v: boolean

    Returns this

jaccardLinkLengths

  • jaccardLinkLengths(idealLength: number, w?: number): this
  • compute an ideal length for each link based on the graph structure around that link. you can use this (for example) to create extra space around hub-nodes in dense graphs. In particular this calculation is based on the "symmetric difference" in the neighbour sets of the source and target: i.e. if neighbours of source is a and neighbours of target are b then calculation is: |a intersection b|/|a union b| Actual computation based on inspection of link structure occurs in start(), so links themselves don't have to have been assigned before invoking this function.

    Parameters

    • idealLength: number
    • Default value w: number = 1

    Returns this

kick

  • kick(): void

linkDistance

linkType

  • linkType(f: Function | number): this

links

  • links(): Array<Link<Node | number>>
  • links(x: Array<Link<Node | number>>): this

nodes

  • the list of nodes. If nodes has not been set, but links has, then we instantiate a nodes list here, of the correct size, before returning it.

    property

    nodes {Array}

    default

    empty list

    Returns Array<Node>

  • Parameters

    Returns this

on

  • on(eventType: EventType | string, listener: function): this

powerGraphGroups

  • powerGraphGroups(f: Function): this

prepareEdgeRouting

  • prepareEdgeRouting(nodeMargin?: number): void

resume

  • resume(): this

routeEdge

  • routeEdge(edge: any, ah?: number, draw: any): any[]
  • find a route avoiding node bounds for the given edge. assumes the visibility graph has been created (by prepareEdgeRouting method) and also assumes that nodes have an index property giving their position in the node array. This index property is created by the start() method.

    Parameters

    • edge: any
    • Default value ah: number = 5
    • draw: any

    Returns any[]

size

  • size(): Array<number>
  • size(x: Array<number>): this
  • Size of the layout canvas dimensions [x,y]. Currently only used to determine the midpoint which is taken as the starting position for nodes with no preassigned x and y.

    property

    size

    type

    {Array of Number}

    Returns Array<number>

  • Parameters

    • x: Array<number>

    Returns this

start

  • start(initialUnconstrainedIterations?: number, initialUserConstraintIterations?: number, initialAllConstraintsIterations?: number, gridSnapIterations?: number, keepRunning?: boolean, centerGraph?: boolean): this
  • start the layout process

    method

    start

    Parameters

    • Default value initialUnconstrainedIterations: number = 0
    • Default value initialUserConstraintIterations: number = 0
    • Default value initialAllConstraintsIterations: number = 0
    • Default value gridSnapIterations: number = 0
    • Default value keepRunning: boolean = true
    • Default value centerGraph: boolean = true

    Returns this

stop

  • stop(): this

symmetricDiffLinkLengths

  • symmetricDiffLinkLengths(idealLength: number, w?: number): this
  • compute an ideal length for each link based on the graph structure around that link. you can use this (for example) to create extra space around hub-nodes in dense graphs. In particular this calculation is based on the "symmetric difference" in the neighbour sets of the source and target: i.e. if neighbours of source is a and neighbours of target are b then calculation is: sqrt(|a union b| - |a intersection b|) Actual computation based on inspection of link structure occurs in start(), so links themselves don't have to have been assigned before invoking this function.

    Parameters

    • idealLength: number
    • Default value w: number = 1

    Returns this

Protected tick

  • tick(): boolean
  • iterate the layout. Returns true when layout converged.

    Returns boolean

trigger

  • trigger(e: Event): void

Static drag

  • drag(d: Node | Group, position: object): void

Static dragEnd

  • dragEnd(d: any): void

Static dragOrigin

Static dragStart

Static getSourceIndex

  • getSourceIndex(e: Link<Node | number>): number

Static getTargetIndex

  • getTargetIndex(e: Link<Node | number>): number

Static linkId

  • linkId(e: Link<Node | number>): string

Static mouseOut

  • mouseOut(d: any): void

Static mouseOver

  • mouseOver(d: any): void

Static setLinkLength

  • setLinkLength(link: Link<Node | number>, length: number): void

Object literals

linkAccessor

linkAccessor: object

getSourceIndex

getSourceIndex: getSourceIndex = Layout.getSourceIndex

getTargetIndex

getTargetIndex: getTargetIndex = Layout.getTargetIndex

setLength

setLength: setLinkLength = Layout.setLinkLength

getType

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc