https://github.com/Klortho/d3-flextree
The existing D3 tree layout is based on an algorithm developed originally by Reingold and Tilford
in their paper from 1981
, Tidier Drawings of Trees
.
现有的D3树布局是基于
Reingold和Tilford
在1981年
的论文《Tidier Drawings of Trees
》中最初开发的算法。
The algorithm was improved over time by others, including Walker
, in a paper in 1989
, A Node-Positioning Algorithm for General Trees
, and the latest improvement by Bucheim
, Junger
, and Leipert
in 2002, described in their paper, Improving Walker's Algorithm to Run in Linear Time
.
该算法随后被其他人改进,包括
Walker
在1989年
的论文《A Node-Positioning Algorithm for General Trees
》中的改进,以及Bucheim
、Junger
和Leipert
在2002年的最新改进,他们在论文《Improving Walker's Algorithm to Run in Linear Time
》中进行了描述。
A limitation
of that algorithm is that it applies to trees in which all of the nodes are the same size
.
该算法的一个
局限性
是它仅适用于所有节点大小都相同
的树。
This is adequate
for many applications, but a more general solution, allowing variable node sizes
, is often preferable
.
这对于许多应用来说是
足够的
,但一个更通用的解决方案,允许节点大小可变
,通常是更可取的
。
In a paper from 2013
, A.J. van der Ploeg
enhanced the algorithm to allow for variable-sized nodes
, while keeping its linear runtime nature
.
在
2013年
的一篇论文中,A.J. van der Ploeg
改进了该算法以允许节点大小可变
,同时保持其线性运行时间特性
。
He described the algorithm in his paper, Drawing Non-layered Tidy Trees
in Linear Time
.
他在论文《
Drawing Non-layered Tidy Trees in Linear Time
》中描述了该算法。
The author also provided a working Java application
on GitHub at cwi-swat/non-layered-tidy-trees
.
作者还在GitHub上的
cwi-swat/non-layered-tidy-trees
项目中提供了一个可运行的Java应用程序
。
This module is a port
from that Java code into JavaScript.
本模块是从该Java代码
移植
到JavaScript的。