Skip to main content
100%

Gist 939947

✓ Published0🌍 Public
CCaged
Last edited Apr 26, 2011
Created on Apr 24, 2011

This example shows a small social network as a circular chord diagram, mapping five people (Jane, Sue, Sally, Tom, and Bob) and their connections between slices of an inner ring. The visualization displays the network structure first, then reveals the mechanics: data is hard-coded in a JavaScript array, with each person assigned an angular band. Using D3’s ordinal scale and SVG arc generator for the ring segments, the code draws chords via the d3.svg.chord API, connecting midpoints of arcs to represent each directed relationship. Labels are placed using arc.centroid, and the entire graphic is rendered in a 300×300 SVG within an HTML page, with path styling controlled by CSS.

AI-generated description

Similar vizzes