D3 Treemap issue

已查看 34 次
跳至第一个未读帖子

Geetanjali Rana

未读,
2015年10月1日 12:33:542015/10/1
收件人 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

回复全部
回复作者
转发
0 个新帖子