D3 Treemap issue

34 views
Skip to first unread message

Geetanjali Rana

unread,
Oct 1, 2015, 12:33:54 PM10/1/15
to d3-js
Hi All,


I have created a treemap with zoom functionality. The treemap is colored based on the parent. Now when I click on any of the parent rectangles, it zooms in and shows all the children within it clearly. It is correctly displaying the children, however, I need to maintain the same color which I had used while clicking on the parent to zoom in as the parent remains the same. For instance: Parent 1 has an orange color, parent 2 has a yellow color. Now when I click on parent 1 it should still show the children in orange color and not in any other color. It should be based on the legend provided.

Also, another issue that I am facing is when I try to zoom out i.e. go back it shows me the parent name along with the children name which I do not want. I just want to see the children name( something that we see when we first time open the treemap). For instance : first time when we open the treemap, I am able to see multiple rectangles and each rectangle having some text that text is the child name. Now when i zoom in and then come back, in the left hand corner of each colored rectangle ( there are 9 colored rectagles - Parent) you can see additional text which is the parent text. How can I get rid of that.

How do we restrict the treemap to only one level of navigation?, mine takes up to 2 levels.

Please find below link to get more details about my treemap.http://bl.ocks.org/geetanjalirana/d78c3f81eabf5f8ca7ac



Regards

Geetanjali

Reply all
Reply to author
Forward
0 new messages