antvis / antvis/G6

Triangle大小、位置和其他图形有偏差

Open
#5,637 3 comments 0 reactions 0 assignees View on GitHub
bug 🐛
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

根据文档上三角形的size是边长,复现链接里能看到等边三角形和正方形、圆形的宽度无法完全重合上,但相同size的正方形和圆形是可以正常重合的。
还有三角形和圆设置相同的x、y但实际显示中心好像对不齐,复现链接的例子放大能看到圆的中心要比三角形的中心更靠上。

是我对文档的理解有偏差吗

### 重现链接

https://stackblitz.com/edit/stackblitz-starters-x4xmmy?file=script.js

### 重现步骤

进入页面

### 预期行为

三角形与圆形的中心对齐、三角形的size

### 平台

- 操作系统: [Windows]
- 网页浏览器: [Google Chrome]
- G6 版本: [4.3.11]

### 屏幕截图或视频(可选)

![1712893155404](https://github.com/antvis/G6/assets/74341337/784dc045-256e-469e-8ae0-4788565f7b28)

### 补充说明(可选)

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the StackBlitz reproduction from script.js and compare the triangle, circle, and square rendering in G6 4.3.11, focusing on equal size values and identical x/y coordinates. Done means the triangle and circle centers align and the triangle's size matches the documented behavior relative to the other shapes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.