title: D3.js Collapsible tree: Adding a label for each level
body: <p>I am working on a project which needs a label for each of the levels of the collapsible tree in D3.js(<a href="https://bl.ocks.org/mbostock/4339083" rel="nofollow noreferrer">https://bl.ocks.org/mbostock/4339083</a>). I am facing tough time in adding the same. The label I require is added in the attached screenshot. The label should populate for each level as soon as click on each level and disappear as it the tree rolls back. Could anyone help me out with this.
   <a href="https://i.stack.imgur.com/jLD0m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jLD0m.png" alt="enter image description here"></a></p>