https://github.com/Klortho/d3-flextree?tab=readme-ov-file
This plugin provides a more general version of the D3 tree layout module
.
Unlike tree
, this plugin allows for nodes of variable sizes
; like tree, the algorithm is fast
, running in O(n) time
.
这个插件提供了一个更通用的版本的
D3树布局模块
。与
tree
不同,这个插件允许节点大小可变
;与tree
一样,该算法是快速
的,运行时间为O(n)
。
flextree() is a factory function
that returns a layout instance
.
A layout is a function
that
computes the positions of nodes in a tree diagram
.
Properties attached
to the layout control various parameters of the algorithm
.
Try d3-flextree
in your browser.
flextree()
是一个工厂函数
,它返回一个布局实例
。layout是一个
函数
,用于
计算树状图中节点的位置
。
控制算法的各种参数
附加到layout的属性
。在您的浏览器中尝试
d3-flextree
。https://npm.runkit.com/d3-flextree
Installing
If you use npm, npm install d3-flextree
.
Otherwise, download the latest release.
AMD
, CommonJS
, and browser environments
are supported.
Alternatively,
you can use it straight from the jsdelivr CDN
at https://cdn.jsdelivr.net/npm/d3-flextree@2.0.0/build/d3-flextree.min.js
.
or
d3-flextree.js
如果您使用npm,请
npm install d3-flextree
。否则,请下载最新版本。
支持
AMD
、CommonJS
和浏览器环境
。或者,
您可以直接从jsdelivr CDN
使用它在
https://cdn.jsdelivr.net/npm/d3-flextree@2.0.0/build/d3-flextree.min.js
。或者
d3-flextree.js