const dataList = [ { value: 43, name: '涂布正极一线' }, { value: 25, name: '涂布正极二线' }, { value: 14, name: '涂布正极三线' }, { value: 14, name: '涂布正极四线' }, { value: 14, name: '涂布负极一线' }, { value: 14, name: '涂布负极二线' }, ]; option = { title: [{ text: '设备报警TOP6', left: 'center', top: '8%', textStyle: { color: "#fff", fontSize: 14, } }], legend: { top: "90%", //通过这个数值调整图例的堆叠 orient: 'vertical', textStyle: { color: '#fff', fontSize: 12, }, }, backgroundColor: '#00333a',////开发的时候注释掉 tooltip: { trigger: 'item', }, series: [ { type: 'pie', color: ['#358172', '#2b8a79', '#45a693', '#72b8a8', '#9cc8bd', '#c3dcd6'], radius: '70%', left: 'center', data: dataList, label: { normal: { show: true, position: 'inside', formatter: '{value|{c}%}', rich: { value: { fontSize: 20, color:'#ffffff', }, }, } }, }, ], };