const option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, textStyle: { color: '#2C3E50' }, legend: { show: true, left: 0, top: '5%', itemWidth: 10, // 图例标记的图形宽度 itemHeight: 4, itemGap: 30, // 图例每项之间的间隔 textStyle: { color: '#333333', fontSize: 14, padding: [0, 8, 0, 8] }, data: ['服务65岁以上老年人人次数', '服务儿童人次数', '服务其他人群人次数'] }, grid: { left: '0%', right: '0%', bottom: '3%', containLabel: true }, xAxis: [ { type: 'category', data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], axisLabel: { color: '#8C8C8C', fontSize: 12 }, axisTick: { show: false }, splitLine: { show: false }, axisLine: { show: true, lineStyle: { color: '#eee' } } } ], yAxis: [ { type: 'value', axisLabel: { color: '#8C8C8C', fontSize: 12 }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { color: '#F5F5F5', type: 'dashed' } }, axisLine: { show: false } } ], color: ['#FFA400', '#00A450', '#386FFF'], series: [ { name: '服务其他人群人次数', type: 'bar', stack: 'user', barWidth: 16, data: [90, 132, 101, 134, 220, 182, 191, 234, 191, 234, 132, 101] }, { name: '服务儿童人次数', type: 'bar', stack: 'user', barWidth: 16, data: [220, 182, 191, 234, 90, 132, 101, 134, 220, 191, 234, 191] }, { name: '服务65岁以上老年人人次数', type: 'bar', stack: 'user', barWidth: 16, data: [150, 232, 90, 132, 101, 134, 220, 201, 154, 232, 90, 132] }, { // 值分隔 name: '电池', type: 'pictorialBar', itemStyle: { normal: { color: '#F6F8FD' } }, symbolRepeat: 'fixed', symbolMargin: 1.2, symbol: 'rect', symbolClip: true, symbolSize: [20, 3], symbolPosition: 'start', symbolOffset: [-4, 0], z: 3, tooltip: { show: false }, data: [700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700] }, { name: '背景', type: 'bar', barWidth: 24, barGap: '-125%', data: [700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700], z: 0, tooltip: { show: false }, itemStyle: { normal: { color: 'rgba(246, 248, 253, 1)' } } } ] };