import{_ as d}from"./barChart.0f07440b.js";import{_ as p,aa as y,o as n,c as x,l as h,n as v}from"./index.82404a61.js";const g={class:"facility_ratio"},f={__name:"facility_ratio",props:{data:{type:Object,default:()=>({})}},setup(l){const r=l,{data:e}=r,i=e.targetyAxis.map(t=>t*1>0?t*1:0),a=e.realityyAxis.map(t=>t*1>0?t*1:0),s=y({xAxisData:e.xaxis,yAxisOption:{min:0,max:Math.ceil(Math.max(...i,...a)/100)*100||10},seriesData:[{type:"bar",name:"\u76EE\u6807",barWidth:16,barMinHeight:2,itemStyle:{color:"#5470c6"},label:{show:!0,color:"black",position:"top",distance:0,fontWeight:"bold"},data:i},{type:"bar",name:"\u8BBE\u8BA1",barWidth:16,barMinHeight:2,barGap:"60%",itemStyle:{color:"#91cc75"},label:{show:!0,color:"black",position:"top",distance:0,fontWeight:"bold"},data:a}]}),c=t=>{const o=t[0].dataIndex;return` <div style="margin: 0px 0 0;line-height:1;min-width: 120px"> <div>${t[0].axisValue}</div> <div style="margin-top:10px"> <div style="display: flex;align-items: center;justify-content: space-between"> <div style="display: flex;align-items: center;"> <span style="background-color: ${t[0].color};width:10px;height:10px;margin-right:5px;border-radius: 50%"></span> <span>${t[0].seriesName}</span> </div> <div style="color:#666;font-weight:900;font-size:14px">${t[0].value}</div> </div> </div> <div style="margin-top:10px"> <div style="display: flex;align-items: center;justify-content: space-between"> <div style="display: flex;align-items: center;"> <span style="background-color: ${t[1].color};width:10px;height:10px;margin-right:5px;border-radius: 50%"></span> <span>${t[1].seriesName}</span> </div> <div style="color:#666;font-weight:900;font-size:14px">${t[1].value}</div> </div> </div> <div style="margin-top:10px"> <div style="display: flex;align-items: center;justify-content: space-between"> <div style="display: flex;align-items: center;"> <span style="background-color: #fac858;width:10px;height:10px;margin-right:5px;border-radius: 50%"></span> <span>\u662F\u5426\u8FBE\u6807</span> </div> <div style="color:#666;font-weight:900;font-size:14px">${e.resultyAxis[o]}</div> </div> </div> </div>`};return(t,o)=>(n(),x("div",g,[s.xAxisData.length?(n(),h(d,{key:0,echartData:s,yAxisName:"\u767E\u5206\u6BD4/%",tooltipFormatter:c,ref:"barChartRef"},null,8,["echartData"])):v("",!0)]))}},u=p(f,[["__scopeId","data-v-09627d67"]]);export{u as default};