apache / apache/echarts

[Feature] Support axis.axisLabel.rotate: 'auto'

Open
#20,408 0 comments 1 reaction 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

When we have `axisLabel.interval: 0`, we need to set `axisLabel.rotate` to prevent overlap. The rotation angel usually depends on the element width and number of the labels. Now we need to calculate the rotation manually. It would be more convinient if it could be calculated automatically.

### What does the proposed API look like?

```
xAxis.axisLabel.rotate: 'auto'
yYxis.axisLabel.rotate: 'auto'
```

or

```
xAxis.axisLabel.rotate: (labels, dom) => {} // or some other params
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.