webpackJsonp([21],{"1l2c":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("WR23"),r=i.n(n),o=i("ifQC"),a={name:"donut",props:{id:String},data:function(){return{chart:null,data:[{item:"事例一",count:40},{item:"事例二",count:21},{item:"事例三",count:17},{item:"事例四",count:13},{item:"事例五",count:9}]}},computed:{isCollapse:function(){return this.$store.state.sys.isCollapse}},watch:{isCollapse:{handler:function(){var t=this;setTimeout(function(){t.chart.forceFit()},400)}}},methods:{_chart:function(){var t=new o.DataView;t.source(this.data).transform({type:"percent",field:"count",dimension:"item",as:"percent"}),this.chart=new r.a.Chart({container:this.id,forceFit:!0,height:350,animate:!1}),this.chart.source(t,{percent:{formatter:function(t){return t=100*t+"%"}}}),this.chart.coord("theta",{radius:.75,innerRadius:.6}),this.chart.tooltip({showTitle:!1,itemTpl:'<li><span style="background-color:{color};" class="g2-tooltip-marker"></span>{name}: {value}</li>'}),this.chart.guide().html({position:["50%","50%"],html:'<div style="color:#8c8c8c;font-size: 14px;text-align: center;width: 10em;">主机<br><span style="color:#8c8c8c;font-size:20px">200</span>台</div>',alignX:"middle",alignY:"middle"});var e=this.chart.intervalStack().position("percent").color("item").label("percent",{formatter:function(t,e){return e.point.item+": "+t}}).tooltip("item*percent",function(t,e){return{name:t,value:e=100*e+"%"}}).style({lineWidth:1,stroke:"#fff"});this.chart.render(),e.setSelected(t.rows[0])}},mounted:function(){var t=this;this.$nextTick(function(){t._chart()})}},c={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{attrs:{id:this.id}})},staticRenderFns:[]},s=i("VU/8")(a,c,!1,null,null,null);e.default=s.exports}});