Interface DefaultLinkObject

An interface describing the default Link Data structure expected by the Link and LinkRadial generators.

interface DefaultLinkObject {
    source: [number, number];
    target: [number, number];
}

Properties

Properties

source: [number, number]

Source node of the link.

For a link in a Cartesian coordinate system, the two element array contains the coordinates [x, y].

For a radial link, the two element array contains the coordinates [angle, radius]. The angle is stated in radians, with 0 at -y (12 o’clock). The radius measures the distance from the origin ⟨0,0⟩.

target: [number, number]

Target node of the link.

For a link in a Cartesian coordinate system, the two element array contains the coordinates [x, y].

For a radial link, the two element array contains the coordinates [angle, radius]. The angle is stated in radians, with 0 at -y (12 o’clock). The radius measures the distance from the origin ⟨0,0⟩.