antvis / antvis/F2

对 xAxis 的 lable 提供碰撞检测,默认计算 rotate, 动态计算 chart 的底部 padding。

Open
#718 0 comments 0 reactions 0 assignees View on GitHub
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 会超出边界。如下图:
![image](https://user-images.githubusercontent.com/13535932/69690221-0041a700-1106-11ea-8153-17b469d52463.png)

### What does the proposed API look like?
不需要提供新的 api ,默认计算 rotate ,同时使用者自己传入的 rotate 配置可以覆盖。

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.