echarts icon indicating copy to clipboard operation
echarts copied to clipboard

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

Open qp666 opened this issue 6 months ago • 3 comments

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

Image

Image

Expected Behavior

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

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

qp666 avatar May 27 '25 08:05 qp666

@qp666 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] The maximum and minimum value of the y-axis of the line chart will disappear according to the view changes, but other values ​​will not

echarts-bot[bot] avatar May 27 '25 08:05 echarts-bot[bot]

use axisLabel: {showMinLabel: true, showMaxLabel: true, ...} 📌 please close issue if problem solved.

helgasoft avatar May 28 '25 04:05 helgasoft

use axisLabel: {showMinLabel: true, showMaxLabel: true, ...} 📌 please close issue if problem solved.

Image After adding it, the other one disappeared. How can this be solved?

qp666 avatar Jun 03 '25 09:06 qp666