option = { tooltip: { trigger: 'item', formatter: function () { var res = ''; var myseries = emerLightOption.series; for (var i = 0; i < myseries.length; i++) { if (!['上部圆', '上部圆1'].includes(myseries[i].name)) { res += myseries[i].name + ' : ' + myseries[i].data[0] + '</br>'; } } return res; } }, grid: { top: '10%', left: '5%', right: '5%', bottom: '10%', }, xAxis: { type: 'value', show: false, }, yAxis: [ { type: 'category', show: false, }, { type: 'category', show: false, }, ], series: [ { name: "上部圆", type: "pictorialBar", silent: true, symbolSize: [10, 10], symbolOffset: [6, 0], symbolPosition: "end", z: 14, label: { show: false, position: "top", fontSize: 15, fontWeight: "bold", color: "#00D176", }, color: "#00FFB2", data: [258], }, { type: 'bar', name: '正常', data: [258], stack: 'income', barWidth: 10, emphasis: { disabled: true, focus: 'none' }, label: { normal: { show: false, position: 'left', //TODO offset: [40, 40], formatter: '{a}\n{c}%' } }, itemStyle: { normal: { borderRadius: [10, 0, 0, 10], color: '#00FFB2', // barBorderRadius: [0, 0, 100, 0], }, shadowColor: '#00D176' }, }, { type: 'bar', name: '异常', data: [50], stack: 'income', barWidth: 10, emphasis: { disabled: true, focus: 'none' }, label: { normal: { show: false, position: 'left', //TODO offset: [40, 40], formatter: '{a}\n{c}%' } }, itemStyle: { normal: { color: '#FFC700', } }, }, { name: "上部圆1", type: "pictorialBar", silent: true, symbolSize: [10, 10], symbolOffset: [6, 0], symbolPosition: "end", z: 14, label: { show: false, position: "top", fontSize: 15, fontWeight: "bold", color: "#E1DFDF", }, color: "#FFC700", data: [258 + 50], }, { type: 'bar', name: '未完成', data: [258], stack: 'income', barWidth: 10, label: { show: false, //color: '#fff', position: 'left', // right inside //TODO offset: [40, 40], formatter: '{a}\n{c}%' }, itemStyle: { normal: { borderRadius: [0, 10, 10, 0], color: '#A5A5A5', } } }, ] };