/*
 Highcharts JS v8.0.4 (2020-03-10)

 Item series type for Highcharts

 (c) 2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/item-series",["highcharts"],function(d){b(d);b.Highcharts=d;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function d(b,c,d,D){b.hasOwnProperty(c)||(b[c]=D.apply(null,d))}b=b?b._modules:{};d(b,"modules/item-series.btx.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,c){var d=c.defined,D=c.extend,B=c.isNumber,
E=c.merge,F=c.objectEach,G=c.pick;c=c.seriesType;var H=b.fireEvent,m=b.seriesTypes.pie.prototype.pointClass.prototype;c("item","pie",{endAngle:void 0,innerSize:"40%",itemPadding:.1,layout:"vertical",marker:E(b.defaultOptions.plotOptions.line.marker,{radius:null}),rows:void 0,showInLegend:!0,startAngle:void 0},{markerAttribs:void 0,translate:function(){this.slots||(this.slots=[]);B(this.options.startAngle)&&B(this.options.endAngle)?(b.seriesTypes.pie.prototype.translate.call(this),this.slots=this.getSlots()):
(this.generatePoints(),H(this,"afterTranslate"))},getSlots:function(){function a(a){0<C&&(a.row.colCount--,C--)}for(var b=this.center,c=b[2],d=b[3],r,n=this.slots,t,y,u,v,w,e,k,x,g=0,p,z=this.endAngleRad-this.startAngleRad,q=Number.MAX_VALUE,A,l,h,f=this.options.rows,m=(c-d)/c;q>this.total;)for(A=q,q=n.length=0,l=h,h=[],g++,p=c/g/2,f?(d=(p-f)/p*c,0<=d?p=f:(d=0,m=1)):p=Math.floor(p*m),r=p;0<r;r--)u=(d+r/p*(c-d-g))/2,v=z*u,w=Math.ceil(v/g),h.push({rowRadius:u,rowLength:v,colCount:w}),q+=w+1;if(l){for(var C=
A-this.total;0<C;)l.map(function(a){return{angle:a.colCount/a.rowLength,row:a}}).sort(function(a,b){return b.angle-a.angle}).slice(0,Math.min(C,Math.ceil(l.length/2))).forEach(a);l.forEach(function(a){var c=a.rowRadius;e=(a=a.colCount)?z/a:0;for(x=0;x<=a;x+=1)k=this.startAngleRad+x*e,t=b[0]+Math.cos(k)*c,y=b[1]+Math.sin(k)*c,n.push({x:t,y:y,angle:k})},this);n.sort(function(a,b){return a.angle-b.angle});this.itemSize=g;return n}},getRows:function(){var a=this.options.rows;if(!a){var b=this.chart.plotWidth/
this.chart.plotHeight;a=Math.sqrt(this.total);if(1<b)for(a=Math.ceil(a);0<a;){var c=this.total/a;if(c/a>b)break;a--}else for(a=Math.floor(a);a<this.total;){c=this.total/a;if(c/a<b)break;a++}}return a},drawPoints:function(){var a=this,b=this.options,c=a.chart.renderer,m=b.marker,r=this.borderWidth%2?.5:1,n=0,t=this.getRows(),y=Math.ceil(this.total/t),u=this.chart.plotWidth/y,v=this.chart.plotHeight/t,w=this.itemSize||Math.min(u,v);this.points.forEach(function(e){var k,x,g=e.marker||{},p=g.symbol||
m.symbol;g=G(g.radius,m.radius);var z=d(g)?2*g:w,q=z*b.itemPadding,A;e.graphics=k=e.graphics||{};a.chart.styledMode||(x=a.pointAttribs(e,e.selected&&"select"));if(!e.isNull&&e.visible){e.graphic||(e.graphic=c.g("point").add(a.group));for(var l=0;l<e.y;l++){if(a.center&&a.slots){var h=a.slots.shift();var f=h.x-w/2;h=h.y-w/2}else"horizontal"===b.layout?(f=n%y*u,h=v*Math.floor(n/y)):(f=u*Math.floor(n/t),h=n%t*v);f+=q;h+=q;var B=A=Math.round(z-2*q);a.options.crisp&&(f=Math.round(f)-r,h=Math.round(h)+
r);f={x:f,y:h,width:A,height:B};"undefined"!==typeof g&&(f.r=g);k[l]?k[l].animate(f):k[l]=c.symbol(p,null,null,null,null,{backgroundSize:"within"}).attr(D(f,x)).add(e.graphic);k[l].isActive=!0;n++}}F(k,function(a,b){a.isActive?a.isActive=!1:(a.destroy(),delete k[b])})})},drawDataLabels:function(){this.center&&this.slots?b.seriesTypes.pie.prototype.drawDataLabels.call(this):this.points.forEach(function(a){a.destroyElements({dataLabel:1})})},animate:function(a){a?this.group.attr({opacity:0}):this.group.animate({opacity:1},
this.options.animation)}},{connectorShapes:m.connectorShapes,getConnectorPath:m.getConnectorPath,setVisible:m.setVisible,getTranslate:m.getTranslate});""});d(b,"masters/modules/item-series.btx.js",[],function(){})});
//# sourceMappingURL=item-series.js.map