Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] In the 5.x version of G6, nodes overlap when using a compact tree layout #6689

Closed
HogoZhang opened this issue Jan 2, 2025 · 3 comments
Labels
waiting for author Further information is requested from the author.

Comments

@HogoZhang
Copy link

Related page

#6060

Kind of issue

Unclear explanations

Issue description

/
result
如图,上方为分层布局的效果,最下面的是使用紧凑树状布局,3条链路关系的节点和边均出现了重叠

Context

请问:
1.是否是树状布局算法不支持渲染由非一个根节点发散出来的图数据
2.是否有办法在使用树状布局时,避免这种多个节点重叠在一起的情况
3.如果无法实现第二点,有其他推荐解决方案,实现比分层布局更流线型的布局方式防止节点重叠

@HogoZhang HogoZhang added documentation 📖 Improvements or additions to documentation waiting for maintainer Triage or intervention needed from a maintainer. labels Jan 2, 2025
Copy link

在 G6 的 5.x 版本中,使用紧凑树状布局时,节点出现重叠的问题可能与以下几个因素有关:

  1. 树状布局算法的限制:树状布局通常假设图是从一个根节点发散出来的。如果你的数据不是这种结构,可能会导致布局不理想。

  2. 避免节点重叠的方法:可以尝试调整布局配置参数,例如节点间距、边距等,以减少重叠的可能性。此外,检查数据结构是否符合树状布局的要求也是必要的。

  3. 其他解决方案:如果紧凑树状布局无法满足需求,可以考虑使用其他布局算法,例如分层布局(Hierarchical Layout)或力导向布局(Force-directed Layout),这些布局可能更适合处理复杂的图结构。

如果这些建议没有解决问题,您可以提供更多的上下文或数据示例,以便我能更好地帮助您。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@github-actions github-actions bot changed the title [docs] G6的5.x版本,使用紧凑树树状布局时,节点出现重叠 [docs] In the 5.x version of G6, nodes overlap when using a compact tree layout Jan 2, 2025
@yvonneyx
Copy link
Contributor

yvonneyx commented Jan 2, 2025

可以参考这个 PR 实现:#6671

@yvonneyx yvonneyx added waiting for author Further information is requested from the author. and removed waiting for maintainer Triage or intervention needed from a maintainer. documentation 📖 Improvements or additions to documentation labels Jan 2, 2025
Copy link

github-actions bot commented Jan 9, 2025

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. | 由于该 issue 缺少关键信息且已闲置 7 天,现已自动关闭。如需重新打开此问题,请提供所缺失的信息。。

@github-actions github-actions bot closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Further information is requested from the author.
Projects
None yet
Development

No branches or pull requests

2 participants