A library for tree data visualization.
@vis-tree/core
contains the main logic of tree data visualization, the layout strategy follows the idea of A Node-Positioning Algorithm for General Trees.
- Support users to use custom components to render nodes and connecting lines
- Support multiple layout methods
- Support dynamic insertion/removal of nodes
- Support virtual rendering, saving performance overhead
- Support animation, virtual rendering will also be used during animation
@vis-tree/core
is written in pure typescript, based on it, you can encapsulate a tree-data visualization component with any fontend framework. But you should maintain the following DOM structure:
<div class="tree-canvas">
<div class="tree-anchor">
<div class="tree-node-wrapper">
<div class="tree-node-content" />
<div class="tree-node-head-line" />
<div class="tree-node-tail-line" />
</div>
<div class="tree-junction-line" />
<div class="tree-custom-line" />
</div>
</div>
.tree-canvas {
position: relative;
overflow: hidden;
cursor: move;
}
.tree-anchor {
position: absolute;
top: 0;
left: 0;
}
.tree-node-wrapper {
position: absolute;
cursor: auto;
}
.tree-node-content {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
.tree-node-head-line,
.tree-node-tail-line,
.tree-junction-line,
.tree-custom-line {
position: absolute;
cursor: auto;
}
@vis-tree/react
is the react version of vis-tree.
To see more details, please go to here.
@vis-tree/vue
is the vue version of vis-tree.
To see more details, please go to here.