Circle Packing - Help with transition when switching between 2 datasets

Hi there,

I’d like to get some help regarding a transition between 2 datasets with a circle packing chart.

I worked off the D3 Zoomable Circle Packing Multicolored notebook.
You can actually fork my notebook here

I’ve added a switch to dynamically able to select another dataset. All of this works well, but switching between datasets does not trigger a smooth transition.

I’ve tried many different solutions from stackoverflow, but my grasp of hierarchy, pack & Javascript is rather limited.

I believe I found the best solution was here, but when I tried a similar approach, it did not translate or work properly.

1 Like