antvis/G6

[Bug]: When the orthogonal router orth configuration is used for discounted polyline, the edge display is not normal, and there will be problems such as occlusion #6696

ChenKun1997 posted onGitHub

Describe the bug / 问题描述

节点是从上到下的关系时,边的末端展示有问题 image

同一行时,边被节点遮住了 image

只有下面这种边从左侧或者右侧出来,目标在左下角或右下角才展示正常() image

https://stackblitz.com/edit/vitejs-vite-udav7vv7?file=src%2FApp.jsx

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

No response

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

感谢您提供详细的描述和复现链接。根据您描述的问题,似乎是在使用正交路由(orth)配置时,折线(polyline)边的展示出现了不正常的情况,尤其是在节点从上到下排列时,边的末端展示有问题,或者在同一行时边被节点遮住。

为了更好地帮助您解决这个问题,我建议您检查以下几点:

  1. 边的层级(z-index):确保边的层级高于节点,以避免被节点遮挡。
  2. 路由配置:检查正交路由的配置,确保配置正确且适合您的布局需求。
  3. 边的样式:尝试调整边的样式,例如宽度、颜色等,看看是否能改善展示效果。

如果这些建议没有解决您的问题,您可以尝试在复现链接中提供更多的代码细节,以便更深入地分析问题。

如果您需要进一步的帮助,请随时告诉我!

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

posted by petercat-assistant[bot] 4 months ago

orth 正交路由和指定连接桩两个特性还没有很好的适配,目前可以用 shortest-path 路由算法来实现。

<img width="389" alt="image" src="https://github.com/user-attachments/assets/2167e077-5734-48fe-85fc-744f8b8cc8ea" />

效果如下:

<img width="522" alt="image" src="https://github.com/user-attachments/assets/375a19e4-6093-494f-a61b-8a0dd4bbbced" />

支持的配置项参考:https://github.com/antvis/G6/blob/v5/packages/g6/src/types/router.ts#L42

posted by yvonneyx 4 months ago

@yvonneyx 为啥这个shortest-path算法也没有实现避障呢,很多线条都穿过了节点

posted by ChenKun1997 4 months ago

@yvonneyx 为啥这个shortest-path算法也没有实现避障呢,很多线条都穿过了节点

默认没开启避障,需要配置一下 enableObstacleAvoidance

posted by yvonneyx 4 months ago

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

posted by github-actions[bot] 3 months ago

@yvonneyx 为啥这个shortest-path算法也没有实现避障呢,很多线条都穿过了节点

默认没开启避障,需要配置一下 enableObstacleAvoidance

如果我想形成其他方向的路径,比如平行四边形,怎么设置

posted by beautifulskymoon 3 months ago

Fund this Issue

$0.00
Funded

Pull requests