AmCharts.AmFunnelChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(u){this.type="funnel";AmCharts.AmFunnelChart.base.construct.call(this,u);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,u,this.cname)},drawChart:function(){AmCharts.AmFunnelChart.base.drawChart.call(this); var u=this.chartData;if(AmCharts.ifArray(u))if(0b&&(b=0);b=(Math.sqrt(b)-C)/(2*d);if(!k&&a>=r||k&&a<=r)b=2*-p/l;else if(!k&&a+b>r||k&&a-br||k&&a-br&&(d=0),e.push(a,a,a+d,a+b,a+b,a+d,a)),C=!0):(n.push(h-m,h+m,h+p,h-p),k?e.push(a,a,a-b,a-b):e.push(a,a,a+b,a+b));t.set();d=t.set();n=AmCharts.polygon(t,n,e,c.color,c.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);d.push(n);this.graphsSet.push(d);c.wedge=d;c.index=w;if(e=this.gradientRatio){var s=[],f;for(f=0;f=this.hideLabelsPercent&&(e=this.formatString(this.labelText,c),(n=this.labelFunction)&&(e=n(c,e)),s=c.labelColor,s||(s=this.color),n=this.labelPosition,f="left","center"==n&&(f="middle"),"left"==n&&(f="right"),e=AmCharts.wrappedText(t,e,s,this.fontFamily,this.fontSize, f,!1,this.maxLabelWidth),e.node.style.pointerEvents="none",d.push(e),s=h,k?(f=a-b/2,c.ty0=f):(f=a+b/2,c.ty0=f,fg-q&&(f=g-q)),"right"==n&&(s=v+10+A,c.tx0=h+(m-b/2/E),C&&(c.tx0=h+p)),"left"==n&&(c.tx0=h-(m-b/2/E),C&&(c.tx0=h-p),s=A),c.label=e,c.labelX=s,c.labelY=f,c.labelHeight=e.getBBox().height,e.translate(s,f),m=e.getBBox(),B=AmCharts.rect(t,m.width+5,m.height+5,"#ffffff",.005),B.translate(s+m.x,f+m.y),d.push(B),c.hitRect=B,F=e.getBBox().height,B=f);(0===c.alpha||0v&&(l=t+D+5):v+y+5>t&&(l=t-5-y);t=l;D=y;if(A){A.translate(a,l);var z=A.getBBox()}g.hitRect.translate(a+z.x,l+z.y);g.labelY=l;g.tx=a;g.ty=l;g.tx2=a}"center"!=this.labelPosition&&this.drawTicks()}});