

option = {
legend: {
show: true,
formatter: function (name) {
const list = {
test_1: '品类A',
test_2: '品类B',
test_3: '品类C',
test_4: '品类D',
music: '音乐'
};
return list[name];
}
},
xAxis: [
{
type: 'category',
data: ['2011', '2012', '2013', '2014', '2015🍌'],
axisTick: {
show: false
},
axisLabel: {
color: '#A0B2D3',
fontSize: 20
},
axisLine: {
show: false
}
}
],
yAxis: [
{
type: 'value',
position: 'left'
},
{
type: 'value',
position: 'right'
}
],
series: [
{
name: 'test_1',
data: [10, 5, 7, 7, 3],
type: 'bar',
yAxisIndex: 0,
stack: 'Mon',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
},
{
name: 'test_4',
data: [2, 4, 6, 10, 6],
type: 'bar',
stack: 'Mon',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
},
{
name: 'test_2',
data: [1, 3, 1, 6, 8],
type: 'bar',
stack: 'Mon',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
},
{
name: 'test_3',
data: [1, 20, 10, 22, 0],
type: 'bar',
stack: 'Mon',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
},
{
name: 'music',
type: 'line',
yAxisIndex: 1,
data: [23, 12, 25, 31, 9],
}
]
};