antvis / antvis/G2Plot

🤔 [QUESTION]环形图,使用spider类型的label,类别如果过大会显示不全,该如何做呢?

Open
#3,646 1 comment 0 reactions 0 assignees View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Question description [Please make everyone to understand it]

在使用环形图时,label设置type: 'spider',当其中一个类别如果过大,label标签显示不全。如图所示:

![image](https://github.com/antvis/G2Plot/assets/30929521/3ee49230-94da-46d9-af00-36521e14182e)

### 💻 Link to minimal reproduction

https://codesandbox.io/s/hopeful-jepsen-998wn8

### 🏞 Expected result

希望能自动计算边缘距离,保证label显示正常

### 🚑 Any additional [like screenshots]

* **G2Plot Version**: latest
* **Platform**: Windows Chrome

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and inspect the donut chart's spider-type label behavior in the G2Plot source. Reproduce the case with one oversized category and trace how label edge spacing is calculated. Done means the label remains fully visible while preserving the existing spider layout behavior.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.