PieLabel 样式自定义——label居中
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 637
- PR merge metrics
- No merged PRs in 30d
Description
- [x] I have searched the [issues](https://github.com/antvis/f2/issues) of this repository and believe that this is not a duplicate.
### What problem does this feature solve?
业务上对于饼图有特殊的 UI 定制,需要将 label 文本居中在 PieLabel 指示线末端,试了一下调整单个 label1 / label2 的 offsetY,指示线会和文本重叠并且覆盖在文本上方。请问对于这样的 UI 场景,有什么调整的方法吗?
期望结果:
### What does the proposed API look like?
like...
```javascript
chart.PieLabel({
style: 'center'
})
```
?
Contributor guide
Research direction
No source file or test is named. Start by locating the PieLabel implementation and its label1/label2 offset handling, then compare the requested centered-at-line-end appearance with the linked image. Done means the API and resulting label behavior are defined clearly enough to validate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100