Closed jiao006 closed 2 weeks ago
5.5.1
https://echarts.apache.org/examples/zh/editor.html?c=line-stack
option = { title: { text: 'Stacked Line' }, tooltip: { trigger: 'axis' }, legend: { data: ['2023', '2024'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [ { name: '2023', type: 'line', stack: 'Total', data: [120, 132, 101, 134, 90, 230, 210] }, { name: '2024', type: 'line', stack: 'Total', data: [0,0,0,0,0,0,0] } ] };
using this option (the second group data is all 0) on examples page, we will see two lines overlapping.
when unchecked the 2023 series, the line for 2024 will be correct.
if change the sequence of the data,the chart will be correct. I hope the chart can display normally no matter how the order changes.
attach the correct chart
- OS: - Browser: - Framework:
No response
not-a-bug, that's how zeroes stack to positive values: 120 + 0 = 120 📌 please close issue if problem solved.
Version
5.5.1
Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?c=line-stack
Steps to Reproduce
option = { title: { text: 'Stacked Line' }, tooltip: { trigger: 'axis' }, legend: { data: ['2023', '2024'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [ { name: '2023', type: 'line', stack: 'Total', data: [120, 132, 101, 134, 90, 230, 210] }, { name: '2024', type: 'line', stack: 'Total', data: [0,0,0,0,0,0,0] } ] };
using this option (the second group data is all 0) on examples page, we will see two lines overlapping.
Current Behavior
when unchecked the 2023 series, the line for 2024 will be correct.
Expected Behavior
if change the sequence of the data,the chart will be correct. I hope the chart can display normally no matter how the order changes.
attach the correct chart
Environment
Any additional comments?
No response