Collaborations between MCU Avengers
This chord diagram visualizes how often the original six Avengers appear together in MCU movies up to Thor: Ragnarok. Each chord’s thickness reflects the number of co-appearances, with a gradient from one Avenger’s color to the other’s. Built with D3.js 3.5.6, it uses a custom `customChordLayout` (adapted from `d3.layout.chord`) to reduce chord overlap, `d3.svg.arc` and `d3.svg.chord` for rendering, and SVG `linearGradient` elements to color each link. Tooltips are powered by Bootstrap and jQuery.
AI-generated descriptionThis Chord diagram shows the final result of the example used in my blog on Data-based orientations for gradients in a d3.js Chord Diagram
What you see here are movie collaborations between the Avengers in the MCU (up until & including Thor Ragnarok). Because collaborations are symmetrical, the chords are all as thick at the beginnen as at the end. Therefore, I wanted each chord to represent both the Avengers that it connects through a gradient. Because all the chords run in different directions, I had to set up the orientation of each gradient by using the chord.chords() dataset
In this end result I've made the Avenger names wrap around the arcs (as explained in another blog on Placing Texts on Arcs with D3.js ) and added a simple tooltip on a hover
You can find the steps leading up to this one here
- Step 1 A normal Chord diagram with the Avengers dataset
- Step 2 A Chord diagram with gradients running across the chords
- Step 3 A Chord diagram where a custom chord ordering is applied to reduce overlap
forked from <a href='http://bl.ocks.org/nbremer/'>nbremer</a>'s block: <a href='http://bl.ocks.org/nbremer/864b11eb83aac3a1f6a2'>Data based orientations in SVG Gradients - Final example - Avenger Movie Collaborations</a>