score:1

Accepted answer

In the following part of the code:

  root = d3.hierarchy(root)
  .sum(function(d) { return d.size; })
  .sort(function(a, b) { return b.value - a.value; });

When calling .sum, the attribute size doesn't exists, so D3 is unable to calculate the circle radius, replace it by value and it will work.


Related Query