antvis/G6





The issue has been closed
树状布局TB状态下,子节点希望可以支持自定义布局 #5062
KTBOY posted onGitHub
问题描述
这段代码对子节点自定义布局没有效果
treeGraph.node(function (node) {
return {
label: node.id,
labelCfg: {
offset: 10,
position: node.children && node.children.length > 0 ? "" : "right"
}
};
});
重现链接
https://codesandbox.io/embed/sleepy-khorana-8jqxhd?fontsize=14&hidenavigation=1&theme=dark
重现步骤
1.点击进行页面 2.搜索treeGraph.node
预期行为
类似实现效果图1:
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response