chunk-7d5f8c34.0b8015c0.js 3.5 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7d5f8c34"],{"0781":function(t,e,a){},f79a:function(t,e,a){"use strict";var i=a("f2bf"),n=["id"];function r(t,e,a,r,o,l){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"chart",id:o.id},null,8,n)}a("b680");var o=a("4dd6"),l=a("aff4"),s=a("313e"),d={name:"multiple-bar-chart",componentName:"multiple-bar-chart",props:{width:{type:String,default:"100%"},height:{type:String,default:"800px"},bardata:{type:Object,default:function(){return{area:["风场1","风场2","风场3","风场4","风场5","风场6","风场7","风场8","风场9"],legend:["实际电量","计划检修损失","非计划检修损失","限电损失","受累损失","性能损失"],data:[[1320,1302,901,634,1390,1330,1320,1e3,500],[320,302,301,334,390,330,320,100,50],[320,302,301,334,390,330,320,100,50],[1320,1302,901,634,1390,1330,1320,1e3,500],[320,302,301,334,390,330,320,100,50],[320,302,301,334,390,330,320,100,50],[1320,1302,901,634,1390,1330,1320,1e3,500],[320,302,301,334,390,330,320,100,50]]}}},lineData:{type:Array},units:{type:Array,default:function(){return["","风机健康状态数量"]}},showLegend:{type:Boolean,default:!0},color:{type:Array,default:function(){return["#05bb4c","#4b55ae","#e17e23","#02BB4C","#EDB32F","#EDEB2F"]}}},data:function(){return{id:"",chart:null,newbardata:null}},watch:{bardata:{handler:function(t,e){console.warn(t),this.newbardata=t,this.initChart()},deep:!0}},computed:{legend:function(){return this.newbardata.legend}},methods:{initChart:function(){var t=s["c"](this.$el),e={color:this.color,grid:{left:16,right:16,bottom:0,top:32,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"rgba(0,0,0,0.4)",borderColor:l["a"].getColor("gray"),textStyle:{color:"#fff",fontSize:14}},legend:{show:this.showLegend,data:this.newbardata.legend,right:120,icon:"ract",itemWidth:8,itemHeight:8,inactiveColor:l["a"].getColor("gray"),textStyle:{color:l["a"].getColor("grayl"),fontSize:12}},xAxis:[{type:"category",axisLabel:{color:l["a"].getColor("gray")},axisLine:{show:!1},axisTick:{show:!1},data:this.newbardata.area}],yAxis:[{type:"value",min:function(t){return(t.min-1)%1==0?t.min-1:(t.min-1).toFixed(0)},max:function(t){return t.max},name:this.units[0],axisLabel:{formatter:"{value} ",color:l["a"].getColor("gray")},axisLine:{type:"dashed",lineStyle:{color:l["a"].getColor("gray")},width:5},axisTick:{show:!1},splitLine:{lineStyle:{type:"dashed",dashOffset:10,color:l["a"].getColor("gray")+80}}},{type:"value",name:this.units[1],axisLabel:{formatter:"{value} ",color:l["a"].getColor("gray"),align:"left"},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}}],series:[]};this.lineData.length>0&&e.series.push({name:this.units[0],type:"line",data:this.lineData,smooth:!1,yAxisIndex:0,lineStyle:{color:"#1a93cf"},itemStyle:{color:"#1a93cf"}});for(var a=0;a<this.newbardata.legend.length;a++)e.series.push({name:this.newbardata.legend[a],type:"bar",stack:"总量",yAxisIndex:1,barWidth:"10%",label:{show:!1,position:"insideRight"},data:this.newbardata.data[a]});t.setOption(e)}},created:function(){this.id="pie-chart-"+o["a"].newGUID(),this.newbardata=this.bardata},mounted:function(){var t=this;this.$nextTick((function(){t.$el.style.width=t.width,t.$el.style.height=t.height,t.initChart()}))},updated:function(){var t=this;this.$nextTick((function(){t.initChart()}))}},h=(a("ff73"),a("6b0d")),c=a.n(h);const u=c()(d,[["render",r]]);e["a"]=u},ff73:function(t,e,a){"use strict";a("0781")}}]);
  2. //# sourceMappingURL=chunk-7d5f8c34.0b8015c0.js.map