Closed UserRunway closed 1 year ago
是的,没法控制子节点展开和折叠。而且当level设置了前几层,后几层的markerCfg里都无法得到外部传入的数据,
这个有什么办法解决没?
我也遇到了相同的问题
这个问题之前已经解决了,参考配置如下:
const level = 3
const config = {
data,
autoFit: false,
level,
nodeCfg: {
getChildren,
},
markerCfg: (cfg) => {
const { children, g_level } = cfg;
return {
show: true,
collapsed: g_level >= level - 1 || !children?.length,
};
},
};
https://charts.ant.design/zh/examples/relation-graph/decomposition-tree-graph#async-load
markerCfg 最初的目的确实只是为了展示marker使用,如果有默认折叠需求,建议使用 level,随后会更新 FlowAnalysisGraph 的level 功能。
🐛 bug 描述 [详细地描述 bug,让大家都能理解]
FlowAnalysisGraph 配置 markerCfg下面的collapsed为ture或者false都不能使关系图初始时为折叠形态。现在看貌似只能控制+-号的变化,并不能收起子分支
📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
🏞 期望结果 [描述你原本期望看到的结果]
期望设置collapsed能够使用代码动态控制关系图的折叠和收起,而不是手动点击
💻 复现代码 [提供可复现的代码,仓库,或线上示例]
官网代码
© 版本信息
🚑 其他信息 [如截图等其他信息可以贴在这里]
希望引起重视!!感谢