对 xAxis 的 lable 提供碰撞检测,默认计算 rotate, 动态计算 chart 的底部 padding。
- 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?
解决了使用者需要自己计算 label 的 rotate ,同时还要自己计算 chart 的 padding ,因为在 rotate 之后,底部的空间占用会变大,如果不增加底部的 padding ,label 会超出边界。如下图:

### What does the proposed API look like?
不需要提供新的 api ,默认计算 rotate ,同时使用者自己传入的 rotate 配置可以覆盖。
Contributor guide
Research direction
Start by locating the xAxis label layout and chart bottom-padding entry points, then reproduce the label-collision scenario described in the issue. Done means labels receive a default rotation and sufficient bottom padding to stay within the chart, while an explicitly supplied rotate value overrides the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100