Skip to main content
100%

Force Directed Graph Toggle to Circle

✓ Published0🌍 Public
TThanaporn-sk
Last edited Apr 20, 2017
Created on Apr 17, 2017

This example visualizes character co-occurrence in *Les Misérables*, letting users toggle between an animated force-directed graph and a circular chord-like layout. The nodes transition smoothly between the two arrangements, with links and circles animating to new positions over one second. Built with D3 v3, it uses `d3.layout.force` for the force simulation and `d3.scale.linear` to map node indices to circle coordinates. Radio buttons control the view, and hovering reveals character names via SVG `<title>` elements.

AI-generated description

Based on Mike Bostock's force-directed graph example showing character co-occurence in Les Misérables, this gist shows how to toggle between the animated force-directed graph and a circle formation akin to a chord diagram.

forked from <a href='http://bl.ocks.org/bricof/'>bricof</a>'s block: <a href='http://bl.ocks.org/bricof/5502b02332570c820e4a41db0b165089'>Force Directed Graph Toggle to Circle</a>

gpl-3.0 Licensed

Similar vizzes