Update D3.js Zoomable Sunburst Levels / Kids

I am trying to implement scalable sunburst with d3.js, but the idea is to dynamically update the levels / child nodes of partitions. For example, when loading, you see only the root and children, but when I click on these children, I want to increase these children and add children from this node (grandchildren from the root). I tried to adapt different examples, but with no luck. Right now, by the d3.json function, I am doing this to limit children at the beginning:

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

But not sure how to update this.

You can see my example here here

Thanks for the help!

+4
source share

No one has answered this question yet.


All Articles