mbostock/d3 — Issue #357: Chord layout could use a different API.
Author: mbostock
Created: 2011-10-28 23:20:32+00:00
State: open
Labels: req

The square matrix used by the chord layout is a bit inconvenient for other applications. For one thing, you can only specify an array of numbers, when in many cases you have other data you might want to use to annotate nodes and links. One hack I've used is to provide a matrix of objects that override valueOf, but this is icky. Example:

It seems like we could use the standard nodes and links-style data used by the other graph layouts (in particular d3.layout.force). Then you could provide a linkValue method for determining the angular size of each link.