option = { color: ['#EF4864', '#F4A419','#3CBE89',], tooltip: { confine: true, trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow', // 默认为直线,可选为:'line' | 'shadow' }, }, grid: { left: '5%', right: '4%', bottom: '10%', top: '10%', }, legend: { icon: 'rect', orient: 'horizontal', left: 'right', itemWidth: 12, itemHeight: 12, formatter: ['{a|{name}}'].join('\n'), textStyle: { fontSize: 12, color: '#6A93B9', height: 8, rich: { a: { verticalAlign: 'bottom', }, }, }, data: ['绿码', '黄码','红码'], }, xAxis: { type: 'category', axisLine: { lineStyle: { color: 'rgba(255,255,255,0.45)', }, }, axisLabel: { // interval:0, fontSize: 12, color: '#6A93B9', }, // axisTick: { // show: false, // }, data: ['周一', '周二', '周三', '周四', '周五', '周六','周日'], }, yAxis: { type: 'value', // min: 0, // minInterval: 1, nameTextStyle: { fontSize: 12, color: '#BAE7FF', align: 'center', }, axisLine: { show: false }, axisTick: { show: false }, splitArea: { show: false }, splitLine: { lineStyle: { color: 'rgba(255, 255, 255, 0.15)', // type: 'dashed', // dotted 虚线 }, }, axisLabel: { fontSize: 12, color: '#6A93B9', fontFamily: 'Bebas', }, }, series: [ { name: '红码', type: 'bar', barWidth: 25, stack: 'total', data: [6, 8, 9, 3, 2, 5, 8,10] ,}, { name: '黄码', type: 'bar', barWidth: 25, stack: 'total', data: [6, 8, 9, 3, 2, 5, 8,10] ,}, { name: '绿码', type: 'bar', barWidth: 25, stack: 'total', data: [7, 4, 2, 9, 5, 7, 8,9] }, ], };