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: ['', '', '', '', '🍌'],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],}]};
1200字范文,内容丰富有趣,写作的好帮手!