antvis / antvis/G6

Unusual drawing occurs when there are a lot of polyline type lines

Open
#6,364 0 comments 0 reactions 0 assignees View on GitHub
v4
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug / 问题描述

polyline类型的连线,如果存在很多会导致绘制异常

[我的场景:我多个节点是水平排列的(y值相同),每个节点之间的连线都是多对多,我将链接桩自定义在节点上方(例如[[0.25,0,[0.5,0]]),连接线使用polyline模式,通过设置offset来保证每条线有一定的间隔
目前问题:在连接线较少的情况下没问题,但是连接线多的情况下就导致绘制乱套了,求指教。

![4A92B559-1AD9-4af2-A9D1-2DE37D33D288](https://github.com/user-attachments/assets/8a2fac42-a0ae-4176-96ae-14612d4e6300)

![25B2EE0C-B416-434f-952B-A9F2CF1C75D7](https://github.com/user-attachments/assets/abfc30e5-e694-4921-a051-55c810db045f)

### Reproduction link / 重现链接

https://stackblitz.com/edit/react-sb7gk6?file=index.js

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

_No response_

### G6 Version / G6 版本

4.x

### Operating System / 操作系统

Windows

### Browser / 浏览器

Chrome

### Additional context / 补充说明

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked StackBlitz reproduction in index.js and compare a few polyline connections with many connections using the described horizontal nodes, custom top ports, and offsets. Trace the rendering path exercised by that reproduction; done means dense links remain separated and render consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.