Working implementation of collapsable d3 tree