block by eesur a0c31af31b4ae022f61b50af22aa4d30

d3js | sankey chart replicating a chord chart

Full Screen

sankey chart to replicate a chord chart

click on either the left or right stacked bars to select/highlight paths—double click to reset


notes:

this chart takes data as per sampleData.js:

const sampleData = [
  {
    label: 'Region-a',
    values: [
      {label: 'Ash', value: 4},
      {label: 'Birch', value: 3},
      {label: 'Maple', value: 1}
    ]
  },
  ...

script.js

index.html

createDOM.js

dist.css

listInfo.js

nodesAndLinks.js

sampleData.js

style.styl

updateTitle.js