Skip to main content
100%

D3 Lines - Radial Lines

✓ Published2🌍 Public
SSubhendu Karmakar
Last edited Dec 29, 2023
Created on Dec 29, 2023

This example shows how D3’s radial line generator maps polar coordinates to Cartesian paths, tracing a series of points around a circle. An SVG group is translated to the center, and a path is drawn with a stroke, connecting points with varying radii—most at 80 units and one at 30—to create a spiked, star-like shape. The code uses `d3.radialLine()` to generate the path data from an array of angle–radius pairs, then appends it to the SVG via `d3.select`. The rendering is static, relying on D3 v7 and SVG output.

AI-generated description

D3 Scales - scaleTime()

MIT Licensed

Similar vizzes