AmCharts.AmFunnelChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(g){this.type="funnel";AmCharts.AmFunnelChart.base.construct.call(this,g);this.cname="AmFunnelChart";this.startX=this.startY=0;this.baseWidth="100%";this.neckHeight=this.neckWidth=0;this.rotate=!1;this.valueRepresents="height";this.pullDistance=30;this.labelPosition="center";this.labelText="[[title]]: [[value]]";this.balloonText="[[title]]: [[value]]\n[[description]]";AmCharts.applyTheme(this,g,this.cname)},drawChart:function(){AmCharts.AmFunnelChart.base.drawChart.call(this); var g=this.chartData;if(AmCharts.ifArray(g))if(0a&&(this.neckHeight= this.neckWidth=0,e?l-=a/2:c-=a/2);var p=u-s-p,E=AmCharts.toCoordinate(this.baseWidth,p),C=AmCharts.toCoordinate(this.neckWidth,p),F=f-l-c,y=AmCharts.toCoordinate(this.neckHeight,F),w=c+F-y;e&&(c=f-l,w=c-F+y);this.firstSliceY=c;AmCharts.VML&&(this.startAlpha=1);for(var q=p/2+s,D=(F-y)/((E-C)/2),G=1,z=E/2,E=(F-y)*(E+C)/2+C*y,H=c,I=0,y=0;yk&&(k=0);k=(Math.sqrt(k)-B)/(2*m);if(!e&&c>=w||e&&c<=w)k=2*-r/C;else if(!e&&c+k>w||e&&c-kw||e&&c-kw&&(m=0),t.push(c,c,c+m,c+k,c+k,c+m,c)),B=!0):(A.push(q-z,q+z,q+r,q-r),e?t.push(c,c,c-k,c-k):t.push(c,c,c+k,c+k));b.set();m=b.set();0a?(A=r/z,t=-1,e||(t=1),isNaN(G)&& (G=0),wedgeGraphics=(new AmCharts.Cuboid(b,2*z,t*k,d,a*G,h.color,h.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha,90,0,!1,0,h.pattern,A)).set,wedgeGraphics.translate(q-z,c-a/2*G),G*=A):wedgeGraphics=AmCharts.polygon(b,A,t,h.color,h.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);m.push(wedgeGraphics);this.graphsSet.push(m);e||m.toBack();h.wedge=m;h.index=y;if(A=this.gradientRatio){var t=[],v;for(v=0;v=this.hideLabelsPercent){t=this.formatString(this.labelText,h);(A=this.labelFunction)&&(t=A(h,t));v=h.labelColor;v||(v=this.color);var A=this.labelPosition,x="left";"center"==A&&(x="middle");"left"==A&&(x="right");t=AmCharts.wrappedText(b,t,v,this.fontFamily, this.fontSize,x,!1,this.maxLabelWidth);t.node.style.pointerEvents="none";m.push(t);v=q;e?(x=c-k/2,h.ty0=x):(x=c+k/2,h.ty0=x,xf-l&&(x=f-l));"right"==A&&(v=p+10+s,h.tx0=q+(z-k/2/D),B&&(h.tx0=q+r));"left"==A&&(h.tx0=q-(z-k/2/D),B&&(h.tx0=q-r),v=s);h.label=t;h.labelX=v;h.labelY=x;h.labelHeight=t.getBBox().height;t.translate(v,x);z=t.getBBox();H=AmCharts.rect(b,z.width+5,z.height+5,"#ffffff",.005);H.translate(v+z.x,x+z.y);m.push(H);h.hitRect=H;I=t.getBBox().height;H=x}(0===h.alpha|| 0l&&(c=d+a+5):l+p+5>d&&(c=d-5-p);d=c;a=p;if(f){f.translate(s,c);var E=f.getBBox()}e.hitRect&&e.hitRect.translate(s+E.x,c+E.y);e.labelY=c;e.tx=s;e.ty=c;e.tx2=s}"center"!=this.labelPosition&&this.drawTicks()}});AmCharts.Cuboid=AmCharts.Class({construct:function(g,d,a,b,n,e,u,f,l,s,p,c,E,C,F,y){this.set=g.set();this.container=g;this.h=Math.round(a);this.w=Math.round(d);this.dx=b;this.dy=n;this.colors=e;this.alpha=u;this.bwidth=f;this.bcolor=l;this.balpha=s;this.dashLength=C;this.topRadius=y;this.pattern=F;(this.rotate=E)?0>d&&0===p&&(p=180):0>a&&270==p&&(p=90);this.gradientRotation=p;0===b&&0===n&&(this.cornerRadius=c);this.draw()},draw:function(){var g=this.set;g.clear();var d=this.container,a=this.w,b= this.h,n=this.dx,e=this.dy,u=this.colors,f=this.alpha,l=this.bwidth,s=this.bcolor,p=this.balpha,c=this.gradientRotation,E=this.cornerRadius,C=this.dashLength,F=this.pattern,y=this.topRadius,w=u,q=u;"object"==typeof u&&(w=u[0],q=u[u.length-1]);var D,G,z,H,I,h,m,A,t,k=f;F&&(f=0);var r,B,v,x,J=this.rotate;if(0Math.abs(b)&&(b=0);1>Math.abs(a)&&(a=0);!isNaN(y)&&(0b&&(l=" A"),f+=l+Math.round(a/2-v)+","+Math.round(b-x)+","+Math.round(a/2+v)+","+ Math.round(b+x)+",0,"+b+","+a+","+b,f+=" L"+a+",0",f+=l+Math.round(a/2+r)+","+Math.round(B)+","+Math.round(a/2-r)+","+Math.round(-B)+","+a+",0,0,0"):(f+="A"+v+","+x+",0,0,0,"+(a-a/2*(1-y))+","+b+"L"+a+",0",f+="A"+r+","+B+",0,0,1,0,0"),r=180),d=d.path(f).attr(u),d.gradient("linearGradient",[w,AmCharts.adjustLuminosity(w,-.3),AmCharts.adjustLuminosity(w,-.3),w],r),J?d.translate(n/2,0):d.translate(0,e/2)):d=0===b?AmCharts.line(d,[0,a],[0,0],s,p,l,C):0===a?AmCharts.line(d,[0,0],[0,b],s,p,l,C):0b?[D,t,G,z,H,I,h,m,A,d]:[m,A,G,z,H,I,D,t,h,d]:J?0b?[D,d,m]:[m,d,D];for(b=0;b