(function(){var e=window.AmCharts;e.AmSlicedChart=e.Class({inherits:e.AmChart,construct:function(a){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");e.AmSlicedChart.base.construct.call(this,a);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other"; this.groupedPulled=!1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget= "_self";this.autoMarginOffset=10;this.gradientRatio=[];this.maxLabelWidth=200;this.accessibleLabel="[[title]]: [[percents]]% [[value]] [[description]]";e.applyTheme(this,a,"AmSlicedChart")},initChart:function(){e.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.setLegendData(this.chartData));this.drawChart()},handleLegendEvent:function(a){var b=a.type,c=a.dataItem,d=this.legend;if(c.wedge&&c){var f=c.hidden;a=a.event; switch(b){case "clickMarker":f||d.switchable||this.clickSlice(c,a);break;case "clickLabel":f||this.clickSlice(c,a,!1);break;case "rollOverItem":f||this.rollOverSlice(c,!1,a);break;case "rollOutItem":f||this.rollOutSlice(c,a);break;case "hideItem":this.hideSlice(c,a);break;case "showItem":this.showSlice(c,a)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var a=this.legend;a&&a.invalidateSize()},addEventListeners:function(a,b){var c=this;a.mouseover(function(a){c.rollOverSlice(b, !0,a)}).mouseout(function(a){c.rollOutSlice(b,a)}).touchend(function(a){c.rollOverSlice(b,a)}).mouseup(function(a){c.clickSlice(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)})},formatString:function(a,b,c){a=e.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);var d=this.pf.precision;isNaN(this.tempPrec)||(this.pf.precision=this.tempPrec);a=e.formatValue(a,b,["percents"],this.pf);a=e.massReplace(a,{"[[title]]":b.title,"[[description]]":b.description}); this.pf.precision=d;-1!=a.indexOf("[[")&&(a=e.formatDataContextValue(a,b.dataContext));a=c?e.fixNewLines(a):e.fixBrakes(a);return a=e.cleanFromEmpty(a)},startSlices:function(){var a;for(a=0;athis.hoverAlpha&&a.wedge&&a.wedge.attr({opacity:this.hoverAlpha});var d=a.balloonX,f=a.balloonY;a.pulled&&(d+=a.pullX,f+=a.pullY);var h=this.formatString(this.balloonText,a,!0),k=this.balloonFunction;k&&(h=k(a,h));k=e.adjustLuminosity(a.color,-.15);h?this.showBalloon(h,k,b,d,f):this.hideBalloon();0===a.value&&this.hideBalloon();this.fire({type:"rollOverSlice",dataItem:a,chart:this,event:c})}},rollOutSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.wedge&&a.wedge.attr({opacity:1}); this.hideBalloon();this.fire({type:"rollOutSlice",dataItem:a,chart:this,event:b})},clickSlice:function(a,b,c){this.checkTouchDuration(b)&&(isNaN(a)||(a=this.chartData[a]),a.pulled?this.pullSlice(a,0):this.pullSlice(a,1),e.getURL(a.url,this.urlTarget),c||this.fire({type:"clickSlice",dataItem:a,chart:this,event:b}))},handleRightClick:function(a,b){isNaN(a)||(a=this.chartData[a]);this.fire({type:"rightClickSlice",dataItem:a,chart:this,event:b})},drawTicks:function(){var a=this.chartData,b;for(b=0;b< a.length;b++){var c=a[b];if(c.label&&!c.skipTick){var d=c.ty,d=e.line(this.container,[c.tx0,c.tx,c.tx2],[c.ty0,d,d],this.labelTickColor,this.labelTickAlpha);e.setCN(this,d,this.type+"-tick");e.setCN(this,d,c.className,!0);c.tick=d;c.wedge.push(d);"AmFunnelChart"==this.cname&&d.toBack()}}},initialStart:function(){var a=this,b=a.startDuration,c=setTimeout(function(){a.showLabels.call(a)},1E3*b);a.timeOuts.push(c);a.chartCreated?a.pullSlices(!0):(a.startSlices(),0b&&(b=f);d.remove()}return b}})})();(function(){var e=window.AmCharts;e.AmFunnelChart=e.Class({inherits:e.AmSlicedChart,construct:function(a){this.type="funnel";e.AmFunnelChart.base.construct.call(this,a);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]]";e.applyTheme(this,a,this.cname)},drawChart:function(){e.AmFunnelChart.base.drawChart.call(this); var a=this.chartData;if(e.ifArray(a))if(0c&&(this.neckHeight=this.neckWidth= 0,h?l-=c/2:g-=c/2);var u=k-t-u,E=e.toCoordinate(this.baseWidth,u),I=e.toCoordinate(this.neckWidth,u),D=n-l-g,F=e.toCoordinate(this.neckHeight,D),y=g+D-F;h&&(g=n-l,y=g-D+F);this.firstSliceY=g;e.VML&&(this.startAlpha=1);for(var z=u/2+t,G=(D-F)/((E-I)/2),C=1,v=E/2,E=(D-F)*(E+I)/2+I*F,H=g,M=0,F=0;Fr&&(r=0);p=(Math.sqrt(r)-K)/(2*p);if(!h&&g>=y||h&&g<=y)p=2*-B/I;else if(!h&&g+p>y||h&&g-py||h&&g-py&&(w=0),q.push(g,g,g+w,g+p,g+p,g+w,g)),K=!0):(A.push(z-v,z+v,z+B,z-B),h?q.push(g,g,g-p,g-p):q.push(g,g,g+p,g+p));w=d.set();0c?(q=B/v,A=-1,h|| (A=1),isNaN(C)&&(C=0),A=(new e.Cuboid(d,2*v,A*p,b,c*C,m.color,m.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha,90,0,!1,0,m.pattern,q)).set,A.translate(z-v,g-c/2*C),C*=q):A=e.polygon(d,A,q,m.color,m.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);e.setCN(this,w,"funnel-item");e.setCN(this,A,"funnel-slice");e.setCN(this,w,m.className,!0);w.push(A);this.graphsSet.push(w);h||w.toBack();m.wedge=w;m.index=F;if(q=this.gradientRatio){var r=[],x;for(x=0;x=this.hideLabelsPercent&&(q=this.formatString(this.labelText,m),(A=this.labelFunction)&&(q=A(m,q)),r=m.labelColor,r||(r=this.color),A=this.labelPosition,x="left","center"==A&&(x="middle"),"left"==A&&(x="right"),""!==q&&(q=e.wrappedText(d,q,r,this.fontFamily, this.fontSize,x,!1,this.maxLabelWidth),e.setCN(this,q,"funnel-label"),e.setCN(this,q,m.className,!0),q.node.style.pointerEvents="none",w.push(q),r=z,h?(x=g-p/2,m.ty0=x):(x=g+p/2,m.ty0=x,xn-l&&(x=n-l)),"right"==A&&(r=u+10+t,m.tx0=z+(v-p/2/G),K&&(m.tx0=z+B)),"left"==A&&(m.tx0=z-(v-p/2/G),K&&(m.tx0=z-B),r=t),m.label=q,m.labelX=r,m.labelY=x,m.labelHeight=q.getBBox().height,q.translate(r,x),v=q.getBBox(),H=e.rect(d,v.width+5,v.height+5,"#ffffff",.005),H.translate(r+v.x,x+v.y),w.push(H), m.hitRect=H,M=q.getBBox().height,H=x));(0===m.alpha||0l&&(g=b+c+5):l+u+5>b&&(g=b-5-u);b=g;c=u;n&&(n.translate(t,g),n=n.getBBox(),e.hitRect&&e.hitRect.translate(t+n.x,g+n.y));e.labelY=g;e.tx=t;e.ty=g;e.tx2=t}"center"!=this.labelPosition&&this.drawTicks()}})})();(function(){var e=window.AmCharts;e.Cuboid=e.Class({construct:function(a,b,c,d,e,h,k,n,l,t,u,g,E,I,D,F,y){this.set=a.set();this.container=a;this.h=Math.round(c);this.w=Math.round(b);this.dx=d;this.dy=e;this.colors=h;this.alpha=k;this.bwidth=n;this.bcolor=l;this.balpha=t;this.dashLength=I;this.topRadius=F;this.pattern=D;this.rotate=E;this.bcn=y;E?0>b&&0===u&&(u=180):0>c&&270==u&&(u=90);this.gradientRotation=u;0===d&&0===e&&(this.cornerRadius=g);this.draw()},draw:function(){var a=this.set;a.clear(); var b=this.container,c=b.chart,d=this.w,f=this.h,h=this.dx,k=this.dy,n=this.colors,l=this.alpha,t=this.bwidth,u=this.bcolor,g=this.balpha,E=this.gradientRotation,I=this.cornerRadius,D=this.dashLength,F=this.pattern,y=this.topRadius,z=this.bcn,G=n,C=n;"object"==typeof n&&(G=n[0],C=n[n.length-1]);var v,H,M,m,w,A,q,p,B,K=l;F&&(l=0);var r,x,J,L,N=this.rotate;if(0Math.abs(f)&&(f=0);1>Math.abs(d)&&(d=0);!isNaN(y)&&(0f&&(t=" A"),l+=t+Math.round(d/2-J)+","+Math.round(f-L)+","+Math.round(d/2+J)+","+Math.round(f+L)+",0,"+f+","+d+","+f,l+=" L"+d+",0",l+=t+Math.round(d/ 2+r)+","+Math.round(x)+","+Math.round(d/2-r)+","+Math.round(-x)+","+d+",0,0,0"):(l+="A"+J+","+L+",0,0,0,"+(d-d/2*(1-y))+","+f+"L"+d+",0",l+="A"+r+","+x+",0,0,1,0,0"),r=180),b=b.path(l).attr(n),b.gradient("linearGradient",[G,e.adjustLuminosity(G,-.3),e.adjustLuminosity(G,-.3),G],r),N?b.translate(h/2,0):b.translate(0,k/2)):b=0===f?e.line(b,[0,d],[0,0],u,g,t,D):0===d?e.line(b,[0,0],[0,f],u,g,t,D):0f?[v, B,H,M,m,w,A,q,p,b]:[q,p,H,M,m,w,v,B,A,b]:N?0f?[v,b,q]:[q,b,v];e.setCN(c,b,z+"front");e.setCN(c,H,z+"back");e.setCN(c,q,z+"top");e.setCN(c,v,z+"bottom");e.setCN(c,m,z+"left");e.setCN(c,w,z+"right");for(v=0;v