apache / apache/echarts

[Bug] 折线图的y轴最大最小值会根据视图变化而消失,但其它值不会

Open
#20,997 3 comments 0 reactions 0 assignees View on GitHub
bug pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.6

### Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/basic-bar-forked-2jvf59?file=%2Findex.js%3A26%2C14

### Steps to Reproduce

option = {
title: {
text: "",
show: false,
},
tooltip: {
trigger: "axis",
},
legend: {
itemWidth: 8,
itemHeight: 8,
right: "7%",
data: ["税负率",],
},
xAxis: {
type: "category",
data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
},
yAxis: [
{
type: "value",
min: -110,
max: 110,
splitNumber: 10,
position: "left",
axisLabel: {
formatter: "{value} %",
},
},
],
series: [
{
name: "税负率",
type: "line",
barWidth: "15%",
data: [110, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6],
itemStyle: {
color: "#5382f8",
},
},
],
};

### Current Behavior

![Image](https://github.com/user-attachments/assets/841a43ce-ed92-4269-a6cc-168a39e1ba2c)

![Image](https://github.com/user-attachments/assets/e9ca9138-240d-48f1-b569-858a92740071)

![Image](https://github.com/user-attachments/assets/11114ad1-7019-4dba-a4b0-899c7cc3c758)

### Expected Behavior

希望找到y轴最大最小值不消失的设置方法

### Environment

```markdown
- OS:
- Browser:
- Framework:
```

### 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.