apache / apache/echarts

axis name and label overlaps when the nameLocation is 'center' or 'middle'

Open
#12,415 13 comments 16 reactions 0 assignees View on GitHub
discussion-required en enhancement
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
15h 17m
Merged PRs (30d)
5

Description

### Version
4.7.0

### Steps to reproduce
in this example https://echarts.apache.org/examples/en/editor.html?c=watermark
add these lines to yAxis:
```
name:'some longe name',
nameLocation:'center',
```
![image](https://user-images.githubusercontent.com/45719816/79036389-0b8cff00-7bdd-11ea-85f1-31ae93e7c463.png)

### What is expected?
the name comes after the longest label name automatically

### What is actually happening?
the name and label overlaps

---
we can fix it by nameGap for a certain resolution
but it is not dynamic and on different resolution the it may be wrong
besides when using a dynamic charts when the label length is unknown we can not be sure how much nameGap we must consider

Contributor guide

Open the contributing guide

Research direction

Start with the linked ECharts watermark example and reproduce the yAxis configuration using a long name and nameLocation set to center. Trace the axis layout handling for labels, name, and nameGap; the issue names no source file or test. Done means the centered axis name no longer overlaps the longest label across dynamic chart sizes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
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.