Skip to content

Instantly share code, notes, and snippets.

View grazulis's full-sized avatar

Gary Leeming grazulis

  • University of Liverpool
  • Liverpool
View GitHub Profile
@sghall
sghall / gist:7859113
Last active August 3, 2018 11:37
Helper function for creating a d3 chord diagram
// blog-post - http://www.delimited.io/blog/2013/12/8/chord-diagrams-in-d3
//*******************************************************************
// CHORD MAPPER
//*******************************************************************
function chordMpr (data) {
var mpr = {}, mmap = {}, n = 0,
matrix = [], filter, accessor;
mpr.setFilter = function (fun) {
filter = fun;