Network vs. chord diagrams: choose a view for relationships
A node-link network shows connections between entities; a chord diagram summarizes directed flow in a matrix around a circle. Choose based on the relation and scale.
Use a node-link network when readers need to trace individual entities and connections. Consider a chord diagram when the task is to summarize flows among a small set of groups. A network shows nodes and links directly; a chord diagram places groups around a circle and uses ribbons for flows. If exact source-to-target values matter, a matrix table or heatmap may be clearer.
What question does each layout answer?
A network draws entities as nodes and relationships as links. It suits questions about neighbors, paths and individual relationships. As links accumulate, overlap can make specific connections hard to follow.
A chord diagram summarizes pairwise flow among a finite set of categories. A ribbon can represent flow in both directions between two groups, so it gives an overview of exchange but can make exact values difficult to read when ribbons cross.
| View | Input structure | Useful task | Main limitation |
|---|---|---|---|
| Node-link network | Entities and individual source/target links | Inspect neighbors, paths and graph structure | Dense links overlap. |
| Chord diagram | Square directed-flow matrix with the same category order in rows and columns | Summarize exchange among a limited number of groups | Crossings and small arcs make exact comparisons difficult. |
| Matrix table/heatmap | Values with source rows and target columns | Compare each directed pair exactly | Many categories make labels and scanning harder. |
Define nodes, links and weights
Before drawing, define what a node represents and what one link row means. Decide whether links are directed, how repeated events are aggregated, and whether width represents count, money or another unit. For a login log, for example, a node might be a person or a service; define whether an arrow means an attempted login or a request.
Give each node a stable unique ID. Check that each link's source and target exist, and decide how to handle self-links, duplicate links and isolated nodes. For an undirected relationship, do not count A–B and B–A as two separate edges. For a directed relationship, keep the reverse direction separate.
A chord matrix uses the same category list and order for rows and columns. For n categories, it is an n×n matrix. In D3, matrix[i][j] is flow from category i to category j, and each value must be non-negative. The diagonal matrix[i][i] is self-flow; retain it only when that has meaning, or set it to zero/exclude it under a documented rule.
Read an asymmetric example
This fictional matrix records transactions among groups A, B and C. Rows are sources; columns are destinations.
| From / To | A | B | C | Row total |
|---|---|---|---|---|
| A | 2 | 5 | 3 | 10 |
| B | 1 | 4 | 5 | 10 |
| C | 3 | 2 | 0 | 5 |
A→B is 5 while B→A is 1; they are different directed values. D3's chord layout combines the two directions between a pair into one chord while retaining a subgroup for each direction. The official example colors a ribbon using the category with the larger directional value. That is an example color rule, not an arrow. Use a legend and tooltip or table so readers can identify both directions.
Row totals are outgoing flow; column totals are incoming flow. They may differ because flows are asymmetric. If you add matrix[i][j] and matrix[j][i] in advance, you lose which direction was larger. Decide whether you need total exchange or direction-specific values.
Prepare D3 data and a network layout
This sequence is based on official D3 documentation; no code or BI interface is claimed as tested.
Define node IDs, link source/target, direction and weight unit. Verify each link points to a known node.
For a chord view, make a square matrix with identical category order in rows and columns. Check non-negative values and the meaning of the diagonal.
Pass the matrix to D3's chord layout to compute group and chord angles. Because opposite flows become one chord, expose direction subgroups in tooltips or a table.
A force-based network layout is a simulation that computes screen coordinates. D3's link force pulls linked nodes toward or pushes them away from a target distance; the default simulation starts automatically and changes node state. A computed position is an algorithm result, not proof of physical distance, causation or a validated community.
D3 can replace string or numeric link IDs with node references and mutate the supplied link objects. Copy the data first if another process needs the original form, and inspect source/target before and after layout.
Manage density and access
For a dense network, filter links or show a focused subset, and pair counts or weights with a table. For a chord diagram, many categories can create crossing ribbons; group categories only by a justified rule and document what was combined. Do not merge categories merely to make the chart look cleaner.
Use consistent units for line width and ribbon width. Give color one clear meaning, such as category or direction. Do not communicate direction through color alone; add arrows, labels, tooltips and a table. A table should include group names, direction, value and aggregation period so keyboard and assistive-technology users can access the same information.
Validate before sharing
Are node IDs unique and all link endpoints valid?
Are duplicate undirected edges and reverse directed edges treated differently?
Are weight units, period, repeated-event rules and self-links documented?
Do matrix rows and columns use the same category order, with non-negative values and a defined diagonal?
Do row totals, column totals and grand total reconcile to the source?
Does the legend explain color, width and how the two directions are shown?
Choose a network for path tracing, a chord for flows among a few groups, and a matrix when exact pairwise comparison matters.
Sources
[D3: Link Force](https://d3js.org/d3-force/link) — forces and source/target references.
[D3: Force Simulations](https://d3js.org/d3-force/simulation) — coordinate updates and node mutation.
[D3: Chord](https://d3js.org/d3-chord) — directed-flow matrix, non-negative values and diagonal.
[D3: Chord Layout](https://d3js.org/d3-chord/chord) — how the layout combines bidirectional flows.
[W3C WCAG 2.2: Use of Color](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color) — provide a cue beyond color.