Scientific/Css/ichartjs/minify/ichart.pie.minify.js

(完整代码) 3KB

iChart.Pie=iChart.extend(iChart.Chart,{configure:function(){iChart.Pie.superclass.configure.call(this);this.type="pie";this.set({radius:"100%",offset_angle:0,separate_angle:0,bound_event:"click",counterclockwise:!1,intellectLayout:!0,layout_distance:4,pop_animate:!1,mutex:!1,increment:void 0,sub_option:{label:{}}});this.registerEvent("bound","rebound");this.sectors=[];this.components.push(this.sectors);this.ILLUSIVE_COO=!0},toggle:function(a){this.sectors[a||0].toggle()},bound:function(a){this.sectors[a||0].bound()},rebound:function(a){this.sectors[a||0].rebound()},getSectors:function(){return this.sectors},doAnimation:function(a,e,b){var f=0,g=b.oA;b.sectors.each(function(d){f=b.animationArithmetic(a,0,d.get("totalAngle"),e);d.push("startAngle",g);d.push("endAngle",g+=f);b.is3D()||d.drawSector()});b.is3D()&&b.proxy.drawSector()},parse:function(a){a.data.each(function(e,b){a.doParse(a,e,b)},a);a.localizer(a)},doParse:function(a,e,b){var f=e.name+" "+a.getPercent(e.value);a.doActing(a,e,null,b,f);a.push("sub_option.id",b);a.get("sub_option.label")&&a.push("sub_option.label.text",f);a.push("sub_option.listeners.changed",function(b,d){a.fireEvent(a,d?"bound":"rebound",[a,b.get("name")])});a.sectors.push(a.doSector(a,e))},doSector:function(a){return new iChart[a.sub](a.get("sub_option"),a)},dolayout:function(a,e,b,f,g,d){if(a.is3D()?iChart.inEllipse(a.get(a.X)-e,a.topY-b,a.a,a.b):iChart.distanceP2P(a.get(a.X),a.topY,e,b)<a.r)b=a.topY-b,f.push("labelx",a.get(a.X)+(2*Math.sqrt(a.r*a.r-b*b)+g)*(0==d||3==d?1:-1)),f.localizer(f)},localizer:function(a){if(a.get("intellectLayout")){var e=[],b=[],f=a.get("layout_distance"),g,d,h;a.sectors.each(function(a){a.isLabel()&&e.push(a.label)});e.sor(function(a,b){return 0<Math.abs(Math.sin(a.get("angle")))-Math.abs(Math.sin(b.get("angle")))});e.each(function(c){b.each(function(b){d=b.labelx;h=b.labely;if(c.labely<=h&&h-c.labely-1<c.get(a.H)||c.labely>h&&c.labely-h-1<b.get(a.H))if(c.labelx<=d&&d-c.labelx<c.get(a.W)||c.labelx>d&&c.labelx-d<b.get(a.W))g=c.get("quadrantd"),c.push("labely",c.get("labely")+h-c.labely+(c.get(a.H)+f)*(1<g?-1:1)),c.localizer(c),a.dolayout(a,c.get("labelx"),c.get("labely")+c.get(a.H)/2*(2>g?-1:1),c,f,g)},a);b.push(c)})}},doConfig:function(){iChart.Pie.superclass.doConfig.call(this);var a=this._(),e,b=a.get("radius"),f=a.get("sub_option.label")?0.35:0.44,g=2*Math.PI;a.sub=a.is3D()?"Sector3D":"Sector2D";a.sectors.zIndex=a.get("z_index");a.sectors.length=0;a.oA=iChart.angle2Radian(a.get("offset_angle"))%g;a.is3D()&&(f+=0.06);var d=a.data.length,h=iChart.angle2Radian(iChart.between(0,90,a.get("separate_angle"))),c=g-h,h=h/d,i=a.oA+h,j=i;0==a.total&&(e=1/d);a.data.each(function(b,f){i+=(e||b.value/a.total)*c;f==d-1&&(i=g+a.oA);b.startAngle=j;b.endAngle=i;b.totalAngle=i-j;b.middleAngle=(j+i)/2;j=i+h},a);a.r=b=iChart.parsePercent(b,Math.floor(a.get("minDistance")*f));a.topY=a.originXY(a,[b+a.get("l_originx"),a.get("r_originx")-b,a.get("centerx")],[a.get("centery")]).y;iChart.apply(a.get("sub_option"),iChart.clone([a.X,a.Y,"bound_event","mutex","increment"],a.options))}});

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。