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

How to arrange child nodes under the same node from left to right #6573

Closed
zhoulingz opened this issue Nov 28, 2024 · 9 comments
Closed

How to arrange child nodes under the same node from left to right #6573

zhoulingz opened this issue Nov 28, 2024 · 9 comments
Labels
layout Issue about layout status: waiting for author Issue with insufficient information v5

Comments

@zhoulingz
Copy link

Describe the bug / 问题描述

How to arrange child nodes under the same node from left to right instead of having large intervals as shown in the picture
Uploading 微信截图_20241128163959.png…

Reproduction link / 重现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response

@yvonneyx
Copy link
Contributor

yvonneyx commented Dec 2, 2024

@yvonneyx yvonneyx added the Need Improvement Lack of information or incorrect format label Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Please provide more information, or use the standard format, otherwise we will not process this issue.
Reference document:


请提供更多信息,或者使用规范的格式,否则我们不会处理这个 issue。
参考文档:

@zhoulingz
Copy link
Author

I have uploaded an example. Could you please take a look
demo
img-1

@yvonneyx
Copy link
Contributor

yvonneyx commented Dec 3, 2024

I have uploaded an example. Could you please take a look demo img-1

404😭

@zhoulingz
Copy link
Author

Can you see the image? If you can see the image, you can directly create a node based on the current data to take a look

@Aarebecca Aarebecca removed the Need Improvement Lack of information or incorrect format label Dec 4, 2024
@yvonneyx
Copy link
Contributor

yvonneyx commented Dec 4, 2024

如果反馈的问题是节点之间的间隔过大,这是由于 dagre 布局在生成布局时优先考虑了树的平衡性,对节点的 x 坐标进行了调整。要解决这个问题,需要自定义布局。

@zhoulingz
Copy link
Author

如果说是为了考虑树的平衡性,那为什么删除右侧节点的子节点,前面子节点就可以从左向右布局呢?

img-2

@yvonneyx
Copy link
Contributor

yvonneyx commented Dec 4, 2024

可以去看一下 dagre 实现的源码来定位问题。 https://github.com/dagrejs/dagre

@yvonneyx yvonneyx added v5 layout Issue about layout status: waiting for author Issue with insufficient information labels Dec 4, 2024
Copy link

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 天,现已自动关闭。如需重新打开此问题,请提供所缺失的信息。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
layout Issue about layout status: waiting for author Issue with insufficient information v5
Projects
None yet
Development

No branches or pull requests

3 participants