WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

A D3 chord diagram Layout to visualize relationships or network flow with an aesthetically-pleasing circular layout.

The relationships are represented as a square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes.

Hierarchy

  • ChordLayout

Callable

  • __call(matrix: number[]): Chords
  • Computes the chord layout for the specified square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes.

    The relationships are represented as a square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes.

    Parameters

    • matrix: number[]

      An (n x n) matrix representing the directed flow amongst a network (a complete digraph) of n nodes.The given matrix must be an array of length n, where each element matrix[i] is an array of n numbers, where each matrix[i][j] represents the flow from the ith node in the network to the jth node. Each number matrix[i][j] must be nonnegative, though it can be zero if there is no flow from node i to node j.

    Returns Chords

Index

Methods

padAngle

  • padAngle(): number
  • padAngle(angle: number)
  • Returns the current pad angle in radians, which defaults to zero.

    Returns number

  • Sets the pad angle between adjacent groups to the specified number in radians and returns this chord layout.

    The default is zero.

    Parameters

    • angle: number

      Pad angle between adjecent groups in radians.

sortChords

  • sortChords(): function | null
  • sortChords(compare: null)
  • sortChords(compare: function)
  • Returns the current chord comparator, which defaults to null.

    Returns function | null

  • Removes the current chord comparator and returns this chord layout.

    Parameters

    • compare: null

      Use null to remove the current comparator function, if any.

  • Sets the chord comparator to the specified function and returns this chord layout.

    If the chord comparator is non-null, it is used to sort the chords by their combined flow; this only affects the z-order of the chords. See also d3.ascending and d3.descending.

    Parameters

    • compare: function

      A comparator function, e.g. d3.ascending or d3.descending.

        • (a: number, b: number): number
        • Parameters

          • a: number
          • b: number

          Returns number

sortGroups

  • sortGroups(): function | null
  • sortGroups(compare: null)
  • sortGroups(compare: function)
  • Returns the current group comparator, which defaults to null.

    Returns function | null

  • Removes the current group comparator and returns this chord layout.

    Parameters

    • compare: null

      Use null to remove the current comparator function, if any.

  • Sets the group comparator to the specified function and returns this chord layout.

    If the group comparator is non-null, it is used to sort the groups by their total outflow. See also d3.ascending and d3.descending.

    Parameters

    • compare: function

      A comparator function, e.g. d3.ascending or d3.descending.

        • (a: number, b: number): number
        • Parameters

          • a: number
          • b: number

          Returns number

sortSubgroups

  • sortSubgroups(): function | null
  • sortSubgroups(compare: null)
  • sortSubgroups(compare: function)
  • Returns the current subgroup comparator, which defaults to null.

    Returns function | null

  • Removes the current subgroup comparator and returns this chord layout.

    Parameters

    • compare: null

      Use null to remove the current comparator function, if any.

  • Sets the subgroup comparator to the specified function and returns this chord layout.

    If the subgroup comparator is non-null, it is used to sort the subgroups corresponding to matrix[i][0 … n - 1] for a given group i by their total outflow. See also d3.ascending and d3.descending.

    Parameters

    • compare: function

      A comparator function, e.g. d3.ascending or d3.descending.

        • (a: number, b: number): number
        • Parameters

          • a: number
          • b: number

          Returns number

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