antvis / antvis/G6

Using the shortest path router generates weird-shaped edges

Open
#6,443 0 comments 0 reactions 0 assignees View on GitHub
bug 🐛 element layout v5
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug / 问题描述

[没有使用自动避障的正交路由的运行链接](https://codesandbox.io/p/sandbox/avoid-node-3n46c8)
生成的流程图如图:
![image](https://github.com/user-attachments/assets/12aace9e-0317-4401-9f30-cdcc64732ecb)
因为正交路由生成的边不能避开节点,所以换成了最短路径路由。
`shortest-path` 生成的边避开了节点,但是形状很怪异,不知道这是为什么。
使用 `shortest-path` 路由生成的边如图:
![image](https://github.com/user-attachments/assets/e7e916cd-2d2e-4933-a4b6-73eab9c570eb)

### Reproduction link / 重现链接

https://codesandbox.io/p/sandbox/shortest-path-cm26wc

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

_No response_

### G6 Version / G6 版本

🆕 5.x

### Operating System / 操作系统

Windows

### Browser / 浏览器

Chrome

### Additional context / 补充说明

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the shortest-path reproduction in the linked CodeSandbox and compare its edge shapes with the attached screenshots. Trace the shortest-path router entry point to determine why the generated edges look irregular while avoiding nodes. Done means the reproduced graph avoids nodes and produces sensible edge shapes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.