1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Echart:实现堆叠柱状图与折线图混合 图例显示类别 x轴显示年份 双坐标轴

Echart:实现堆叠柱状图与折线图混合 图例显示类别 x轴显示年份 双坐标轴

时间:2023-10-15 17:51:36

相关推荐

Echart:实现堆叠柱状图与折线图混合 图例显示类别 x轴显示年份 双坐标轴

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],}]};

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。