📄 d3/d3-shape/radial-link

File: radial-link.md | Updated: 11/15/2025

Source: https://d3js.org/d3-shape/radial-link

Skip to content

On this page

Radial links

=====================================================================

A radial link generator is like the Cartesian link generator except the x and y accessors are replaced with angle and radius accessors. Radial links are positioned relative to the origin; use a transform to change the origin.

linkRadial()


Source · Returns a new link generator with radial tangents. For example, to visualize links in a tree diagram rooted in the center of the display, you might say:

js

const link = d3.linkRadial()
    .angle((d) => d.x)
    .radius((d) => d.y);

linkRadial.angle(angle)


Source · Equivalent to link.x , except the accessor returns the angle in radians, with 0 at -y (12 o’clock).

linkRadial.radius(radius)


Source · Equivalent to link.y , except the accessor returns the radius: the distance from the origin.