详细参考 git issue: https://github.com/apache/echarts/issues/19255#event-10840503924
option = { | |
title: { | |
text: 'Stacked Line' | |
}, | |
tooltip: { | |
trigger: 'axis' | |
}, | |
legend: { | |
data: ['Email', 'Union Ads'] | |
}, | |
grid: { | |
left: '3%', | |
right: '4%', | |
bottom: '10%', | |
containLabel: true | |
}, | |
toolbox: { | |
feature: { | |
saveAsImage: {} | |
} | |
}, | |
xAxis: { | |
type: 'category', | |
boundaryGap: false, | |
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] | |
}, | |
yAxis: { | |
type: 'value' | |
}, | |
dataZoom: [ | |
{ | |
type: 'slider', | |
showDataShadow:true, | |
}, | |
{ | |
type: 'inside' | |
} | |
], | |
series: [ | |
{ | |
name: 'Email', | |
type: 'bar', | |
stack: 'Total', | |
data: [120, 132, 101, 134, 90, 230, 210] | |
}, | |
{ | |
name: 'Union Ads', | |
type: 'bar', | |
stack: 'Total', | |
data: [220, 182, 191, 134, 290, 230, 150] | |
}, | |
] | |
}; |