javascript - D3: how to rescale the pack layout to fit only visible circles? -


i have pack layout multiple levels (depths), out of few first ones made not visible (just in example: http://bl.ocks.org/mbostock/4063269:

enter image description here

... root node hidden).

however, scaling works fitting circles in svg container, not visible ones. leads lost space if few top-cirles made invisible...

what way rescale layout fit visible circles in container? thought checking nodes extreme x/y coordinates , rescaling based on that...


Comments