apache / apache/echarts

[Bug] I set grid-right-0, but there is a large margin on the right

Open
#21,055 4 comments 0 reactions 1 assignee Claimed by @100pah View on GitHub
bug
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.3.3

### Link to Minimal Reproduction

https://codepen.io/xindatu/pen/ZYGVGOm

### Steps to Reproduce

option = {
"grid": {
"left": 0,
"right": 0,
"containLabel": true
},
"xAxis": {
"data": [
{
"value": "2025/05/14"
},
{
"value": "2025/05/15"
},
],
},
"yAxis": [
{
},
{
"scale": true,
"position": "right",
"alignTicks": true
}
],
"series": [
{
"name": "a",
"type": "bar",
"data": [
{
"name": "2025/06/11",
"value": "2.25",
},
{
"name": "2025/06/12",
"value": "2.19",
},
],
"yAxisIndex": 1
}
]
};

![Image](https://github.com/user-attachments/assets/b273a2ca-e347-48eb-b71d-e405aafa5385)

### Current Behavior

grid right 0 failed

### Expected Behavior

except grid right to be 0

### Environment

```markdown
- OS:macOS
- Browser:chrome
- Framework:Vue@3
```

### Any additional comments?

_No response_

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.