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!