option = { backgroundColor: '#0E1327', grid: { bottom: '5%', top: '5%', left: '5%', right: '5%', containLabel: true, }, tooltip: { trigger: 'axis', axisPointer: { type: 'none', }, // formatter: function (params) { // return ( // params[0].name + // '<br/>' + // "<span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:rgba(36,207,233,0.9)'></span>" + // params[0].seriesName + // ' : ' + // Number( // (params[0].value.toFixed(4) / 10000).toFixed(2), // ).toLocaleString() + // ' 万元<br/>' // ); // }, }, xAxis: { splitLine: { show: false }, axisLabel: { show: false }, axisTick: { show: false }, axisLine: { show: false }, type: 'value', }, yAxis: [ { type: 'category', inverse: true, //排序 axisLabel: { show: true, textStyle: { color: '#C9D2FA', fontSize: 16, }, }, splitLine: { show: false, }, axisTick: { show: false, }, axisLine: { show: false, }, data: ['物料异常', '欠员', '工艺缺失', '欠料', '机械故障'], }, // { // type: 'category', // inverse: true, // axisTick: 'none', // axisLine: 'none', // show: true, // axisLabel: { // textStyle: { // color: '#ffffff', // fontSize: 12, // }, // // formatter: function (value) { // // if (value >= 10000) { // // return (value / 10000).toLocaleString() + '万'; // // } else { // // return value.toLocaleString(); // // } // // }, // }, // data: [45, 26, 14, 12, 5], // }, ], series: [ { name: '金额', type: 'bar', zlevel: 1, itemStyle: { borderRadius: 30, color: '#2F8FFF', }, label: { show: true, // 显示标签 position: 'right', fontSize: 16, color: '#fff', offset: [10, 0], }, barWidth: 16, data: [45, 26, 14, 12, 5], }, // { // name: '背景', // type: 'bar', // barWidth: 20, // barGap: '-100%', // data: [50000000, 50000000, 50000000, 50000000, 1], // itemStyle: { // normal: { // color: 'rgba(24,31,68,1)', // barBorderRadius: 30, // }, // }, // }, ], }