apply d3.nest rollup to nested pie chart (to vary the size of the pies)
I'd like to modify Mike Bostock's nested pies example
http://bl.ocks.org/mbostock/1305337 to have different pie sizes per the
number of flights in each airport; to have a visual idea of how busy each
airport is. My guess is to sum up the number of flights via
.rollup(function(leaves) { return {"total_flights": d3.sum(leaves,
function(d) {return +(d.flights);})} }) (from
http://bl.ocks.org/phoebebright/raw/3176159/) and apply it somehow to r
(radius) but as I'm still learning, I don't know where to inject it.
Appreciate your tips/help.
No comments:
Post a Comment