d3.js如何使所有节点折叠在可折叠缩进的树中 [英] d3.js How to make all the nodes collapsed in Collapsible indented Tree

查看:543
本文介绍了d3.js如何使所有节点折叠在可折叠缩进的树中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在样本d3折叠树上工作。 mbostock的块#1093025。最初,当窗体加载时,如何使所有的节点最初折叠?

I am trying to work on a sample d3 collapsible tree. mbostock’s block #1093025. Initially when the form is loaded, how do i make all the nodes collapsed initially?

推荐答案

在你的json加载。
检查示例: http://mbostock.github.io/d3 /talk/20111018/tree.html

You have to add a function for that in your json loading. Check that example : http://mbostock.github.io/d3/talk/20111018/tree.html

这篇关于d3.js如何使所有节点折叠在可折叠缩进的树中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆