4

I'm trying to implement the zoomable sunburst with d3.js, but the idea is to update dynamically the levels/children of the partition nodes. For example, on load you just see the root and the children, but when I you click on that children I want to zoom that children and add the children from that node(grandchildren from the root). I tried to adapt different examples but without any luck. Right now, on the d3.json function, I'm doing this for limit the children at the beginning:

partition.children(function(d, depth) { return depth < 1 ? d.children : null; });

But not sure how to update that.

You could see my example here Here

Thanks for the help!

andy_314
  • 431
  • 5
  • 17
  • Found a solution? looking for the same thing – Endless Aug 06 '16 at 00:43
  • I created a [code sample of a zoomable sunburst with a fixed depth](https://bl.ocks.org/gmculp/1cd9ef817aac13fe537f9d1dc6ccced3). It is based on Mike Bostock's [Bilevel Partition](https://bl.ocks.org/mbostock/5944371) example. I also borrowed from Jason Davies' [coffee flavour](https://www.jasondavies.com/coffee-wheel/) wheel for the labeling. – gmculp Jul 13 '17 at 13:50

0 Answers0