score:1

Maybe you can use Collapsible Force Layout, see example at mbostock block. With that example and the following json file (changed his readme.json file):

{
 "name": "example",
 "children": [
  {
   "name": "group1",
   "children": [
      {"name": "node1", "size": 3000},
      {"name": "node2", "size": 3000},
      {"name": "node3", "size": 3000}
   ]
  },
  {
   "name": "node4", "size": 5000
  },
  {
    "name": "node5", "size": 10000
  }
 ]
}

you can get something similar. You get one root element with 3 children, one has 3 nodes. See enter image description here

If you select root node everything colapse.


Related Query