antvis/G6




The issue has been closed
想绘制一个双向的dagre流程图 #4978
zhubin1992 posted onGitHub
问题描述
dagre只能绘制单向的流程图,如rankdir: 'TB'。 现在想使用流水线子图布局添加另一个方向的流程图,rankdir: 'BT',并且两棵‘树’的起始节点相同。
实际与预期不符:
重现链接
https://codesandbox.io/s/wizardly-jepsen-5gqn92?file=/src/App.js
重现步骤
layout: {
pipes: [
{
type: "dagre",
rankdir: "TB",
nodesFilter: (node) => node.id <= 5,
nodesepFunc: (d) => {
if (d.id === "3") {
return 500;
}
return 50;
},
ranksep: 70,
controlPoints: true
},
{
type: "dagre",
rankdir: "BT",
nodesFilter: (node) => node.id > 5 || node.id === 1,
nodesepFunc: (d) => {
if (d.id === "3") {
return 500;
}
return 50;
},
ranksep: 70,
controlPoints: true
}
]
},
预期行为
预期图:
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response