/*
 Highcharts JS v7.2.1 (2019-10-31)

 Highcharts funnel module

 (c) 2010-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,v,b,y){a.hasOwnProperty(v)||(a[v]=y.apply(null,b))}a=a?a._modules:{};b(a,"modules/funnel.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,b){var v=b.pick;b=a.seriesType;var y=a.seriesTypes,
I=a.fireEvent,G=a.noop;b("funnel","pie",{animation:!1,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1},states:{select:{color:"#cccccc",borderColor:"#000000"}}},{animate:G,translate:function(){function a(a,c){return/%$/.test(a)?c*parseInt(a,10)/100:parseInt(a,10)}var n=0,c=this,f=c.chart,e=c.options,g=e.reversed,d=e.ignoreHiddenPoint,b=f.plotWidth;f=f.plotHeight;var p=0,q=e.center,h=a(q[0],b),w=a(q[1],f),y=a(e.width,b),
r,t=a(e.height,f),z=a(e.neckWidth,b),F=a(e.neckHeight,f),A=w-t/2+t-F;b=c.data;var C,D,J="left"===e.dataLabels.position?1:0,B,k,E,u,l,x,m;c.getWidthAt=function(a){var c=w-t/2;return a>A||t===F?z:z+(y-z)*(1-(a-c)/(t-F))};c.getX=function(a,d,e){return h+(d?-1:1)*(c.getWidthAt(g?2*w-a:a)/2+e.labelDistance)};c.center=[h,w,t];c.centerX=h;b.forEach(function(a){d&&!1===a.visible||(n+=a.y)});b.forEach(function(a){m=null;D=n?a.y/n:0;k=w-t/2+p*t;l=k+D*t;r=c.getWidthAt(k);B=h-r/2;E=B+r;r=c.getWidthAt(l);u=h-
r/2;x=u+r;k>A?(B=u=h-z/2,E=x=h+z/2):l>A&&(m=l,r=c.getWidthAt(A),u=h-r/2,x=u+r,l=A);g&&(k=2*w-k,l=2*w-l,null!==m&&(m=2*w-m));C=["M",B,k,"L",E,k,x,l];null!==m&&C.push(x,m,u,m);C.push(u,l,"Z");a.shapeType="path";a.shapeArgs={d:C};a.percentage=100*D;a.plotX=h;a.plotY=(k+(m||l))/2;a.tooltipPos=[h,a.plotY];a.dlBox={x:u,y:k,topWidth:E-B,bottomWidth:x-u,height:Math.abs(v(l,m)-k),width:NaN};a.slice=G;a.half=J;d&&!1===a.visible||(p+=D)});I(c,"afterTranslate")},sortByAngle:function(a){a.sort(function(a,c){return a.plotY-
c.plotY})},drawDataLabels:function(){var a=this.data,b=this.options.dataLabels.distance,c,f=a.length;for(this.center[2]-=2*b;f--;){var e=a[f];var g=(c=e.half)?1:-1;var d=e.plotY;e.labelDistance=v(e.options.dataLabels&&e.options.dataLabels.distance,b);this.maxLabelDistance=Math.max(e.labelDistance,this.maxLabelDistance||0);var H=this.getX(d,c,e);e.labelPosition={natural:{x:0,y:d},"final":{},alignment:c?"right":"left",connectorPosition:{breakAt:{x:H+(e.labelDistance-5)*g,y:d},touchingSliceAt:{x:H+e.labelDistance*
g,y:d}}}}y[this.options.dataLabels.inside?"column":"pie"].prototype.drawDataLabels.call(this)},alignDataLabel:function(b,n,c,f,e){var g=b.series;f=g.options.reversed;var d=b.dlBox||b.shapeArgs,v=c.align,p=c.verticalAlign,q=g.center[1];g=g.getWidthAt((f?2*q-b.plotY:b.plotY)-d.height/2+n.height);g="middle"===p?(d.topWidth-d.bottomWidth)/4:(g-d.bottomWidth)/2;q=d.y;var h=d.x;"middle"===p?q=d.y-d.height/2+n.height/2:"top"===p&&(q=d.y-d.height+n.height+c.padding);if("top"===p&&!f||"bottom"===p&&f||"middle"===
p)"right"===v?h=d.x-c.padding+g:"left"===v&&(h=d.x+c.padding-g);f={x:h,y:f?q-d.height:q,width:d.bottomWidth,height:d.height};c.verticalAlign="bottom";a.Series.prototype.alignDataLabel.call(this,b,n,c,f,e);c.inside&&b.contrastColor&&n.css({color:b.contrastColor})}});b("pyramid","funnel",{neckWidth:"0%",neckHeight:"0%",reversed:!0});""});b(a,"masters/modules/funnel.src.js",[],function(){})});
//# sourceMappingURL=funnel.js.map