Overview
Chord diagrams display relationships and flows between interconnected entities arranged in a circular layout. Each entity is represented as an arc segment along the circle’s perimeter, with ribbons connecting related entities. The width of ribbons and arcs represents the magnitude of relationships or flows, making chord diagrams ideal for visualizing complex network data and multi-directional flows.When to Use
Use chord diagrams when you need to:- Visualize migration or trade flows between regions or countries
- Show relationships in social networks or organizational structures
- Display communication patterns between groups or individuals
- Analyze financial flows between accounts, sectors, or markets
- Represent gene interactions or biological pathways
- Illustrate data transfer between systems or components
- Compare bilateral relationships with directional or bidirectional flows
Basic Configuration
The chord diagram is configured through theChordSeriesOption interface, using a standalone coordinate system.
Complete Example
Key Options
Array of nodes (entities) in the chord diagram. Each node represents an arc segment.
Array of edges (connections) between nodes. Also accepts
links as an alias.Inner and outer radius of the chord ring as
[innerRadius, outerRadius]. Can be percentages or absolute pixel values.Center position of the chord diagram as
[x, y].Starting angle in degrees, where 0° is at 3 o’clock position, rotating clockwise.
Ending angle in degrees. When set to
'auto', completes a full circle based on data.Whether to layout nodes in clockwise direction.
Padding angle between node arcs in degrees. Creates visual separation between nodes.
Minimum angle for a node arc in degrees. Useful to ensure small values are still visible.
Visual style of the ribbons connecting nodes.
Color of edge ribbons:
'source': Use source node color'target': Use target node color- Any color string: Fixed color for all edges
Visual style of node arcs.
Label configuration for node names.
Label configuration for edges (ribbons).
Visual emphasis when hovering over nodes or edges.
Data Format
Chord diagrams require both node and edge data:Advanced Features
Migration Flow Visualization
Custom Color for Each Node
Financial Flow Between Sectors
Symmetric vs Asymmetric Flows
Interactive Chord with Custom Tooltip
Design Best Practices
- Limit Number of Nodes: Chord diagrams work best with 5-15 nodes. Too many nodes create visual clutter.
- Use Meaningful Colors: Assign colors that relate to categories or use a consistent color scheme.
-
Set Appropriate Opacity: Use lower opacity (0.2-0.4) for ribbons to handle overlaps:
-
Enable Focus on Adjacency: Help users explore connections:
-
Add Padding Between Arcs: Improve readability with spacing:
Common Patterns
Migration Analysis
- Node values: Population of origin/destination
- Edge values: Number of migrants
- Color by region or direction
Trade Networks
- Node values: Total trade volume per country
- Edge values: Bilateral trade amounts
- Use
lineStyle.color: 'source'to show export origins
Communication Networks
- Node values: Total messages sent/received
- Edge values: Message count between entities
- Enable
emphasis.focus: 'adjacency'for exploration
Troubleshooting
Problem: Ribbons are too transparent or invisible Solution: IncreaselineStyle.opacity to 0.4-0.6
Problem: Labels overlap or are unreadable
Solution: Increase label.distance, reduce fontSize, or set label.position: 'inside'
Problem: Small nodes are barely visible
Solution: Set minAngle to ensure minimum visibility
Source Reference
The chord diagram implementation can be found in:- Series model:
src/chart/chord/ChordSeries.ts:175-340 - Type definitions:
src/chart/chord/ChordSeries.ts:54-173 - Default options:
src/chart/chord/ChordSeries.ts:292-339 - Node and edge format:
src/chart/chord/ChordSeries.ts:88-115,195-202