This is the simplest circle pack diagram I could create. Let me know if you think I can make it tighter.
Build notes:
- It pulls data from a csv file. It uses d3.stratify() to reform links into a hierarchy. (NOTE: I ran into a challenge with
d.size
when moving from json to csv. Whilesize
is a feature of my data, I had to now access it fromd.data.size
.) - To differentiate between local variables and framework objects, I prefix variables with lowercase 'v'.
From https://bl.ocks.org/denjn5/6d5ddd4226506d644bb20062fc60b53f
Thanks for this it was very helpful. I did find one minor problem, on line 40 you don't need the call to d3.hierarchy, since vData is already a hierarchy due to the
stratify
call earlier. This will allow you to remove the reference todata
in thesum
function. Thanks again!