/* Highcharts JS v8.0.0 (2019-12-10) (c) 2009-2019 Torstein Honsi License: www.highcharts.com/license */ (function(k){"object"===typeof module&&module.exports?(k["default"]=k,module.exports=k):"function"===typeof define&&define.amd?define("highcharts/modules/series-label",["highcharts"],function(x){k(x);k.Highcharts=x;return k}):k("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(k){function x(k,r,y,z){k.hasOwnProperty(r)||(k[r]=z.apply(null,y))}k=k?k._modules:{};x(k,"modules/series-label.src.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(k,r){function y(c,d,a,l,f,b){c=(b-d)* (a-c)-(l-d)*(f-c);return 0c)}function z(c,d,a,l,f,b,g,p){return y(c,d,f,b,g,p)!==y(a,l,f,b,g,p)&&y(c,d,a,l,f,b)!==y(c,d,a,l,g,p)}function x(c,d,a,l,f,b,g,p){return z(c,d,c+a,d,f,b,g,p)||z(c+a,d,c+a,d+l,f,b,g,p)||z(c,d+l,c+a,d+l,f,b,g,p)||z(c,d,c,d+l,f,b,g,p)}function F(c){var d=this,a=B(d.renderer.globalAnimation).duration;d.labelSeries=[];d.labelSeriesMaxSum=0;k.clearTimeout(d.seriesLabelTimer);d.series.forEach(function(l){var f=l.options.label,b=l.labelBySeries,g=b&&b.closest;f.enabled&& l.visible&&(l.graph||l.area)&&!l.isSeriesBoosting&&(d.labelSeries.push(l),f.minFontSize&&f.maxFontSize&&(l.sum=l.yData.reduce(function(a,b){return(a||0)+(b||0)},0),d.labelSeriesMaxSum=Math.max(d.labelSeriesMaxSum,l.sum)),"load"===c.type&&(a=Math.max(a,B(l.options.animation).duration)),g&&("undefined"!==typeof g[0].plotX?b.animate({x:g[0].plotX+g[1],y:g[0].plotY+g[2]}):b.attr({opacity:0})))});d.seriesLabelTimer=H(function(){d.series&&d.labelSeries&&d.drawSeriesLabels()},d.renderer.forExport||!a?0: a)}var B=r.animObject,G=r.extend,C=r.isNumber,A=r.pick,H=r.syncTimeout;r=k.addEvent;var D=k.Series,I=k.SVGRenderer,E=k.Chart;k.setOptions({plotOptions:{series:{label:{enabled:!0,connectorAllowed:!1,connectorNeighbourDistance:24,minFontSize:null,maxFontSize:null,onArea:null,style:{fontWeight:"bold"},boxesToAvoid:[]}}}});I.prototype.symbols.connector=function(c,d,a,l,f){var b=f&&f.anchorX;f=f&&f.anchorY;var g=a/2;if(C(b)&&C(f)){var p=["M",b,f];var h=d-f;0>h&&(h=-l-h);hd+l?p.push("L", c+g,d+l):fc+a&&p.push("L",c+a,d+l/2)}return p||[]};D.prototype.getPointsOnGraph=function(){function c(b){var c=Math.round(b.plotX/8)+","+Math.round(b.plotY/8);m[c]||(m[c]=1,a.push(b))}if(this.xAxis||this.yAxis){var d=this.points,a=[],l;var f=this.graph||this.area;var b=f.element;var g=this.chart.inverted,p=this.xAxis;var h=this.yAxis;var k=g?h.pos:p.pos;g=g?p.pos:h.pos;p=A(this.options.label.onArea,!!this.area);var w=h.getThreshold(this.options.threshold), m={};if(this.getPointSpline&&b.getPointAtLength&&!p&&d.lengthm.right||em.bottom||u=c-16&&m[e-1].chartX<=c+a.width+16){if(x(c,d,a.width,a.height,m[e-1].chartX,m[e-1].chartY,m[e].chartX, m[e].chartY))return!1;this===v&&!g&&l&&(g=x(c-16,d-16,a.width+32,a.height+32,m[e-1].chartX,m[e-1].chartY,m[e].chartX,m[e].chartY))}if((h||g)&&(this!==v||p)){u=c+a.width/2-m[e].chartX;var r=d+a.height/2-m[e].chartY;f=Math.min(f,u*u+r*r)}}if(!p&&h&&this===v&&(l&&!g||fd&&a<=e-c.width&&b>=r&&b<=r+m-c.height}if(a.xAxis||a.yAxis){var f=[],b,g,k=a.options.label,h=(g=c.inverted)?a.yAxis.pos:a.xAxis.pos,r=g?a.xAxis.pos:a.yAxis.pos,w=c.inverted?a.yAxis.len:a.xAxis.len,m=c.inverted?a.xAxis.len:a.yAxis.len,e=a.interpolatedPoints,v=A(k.onArea,!!a.area),u=a.labelBySeries,x=!u;var n=k.minFontSize;var q=k.maxFontSize;var t="highcharts-color-"+A(a.colorIndex,"none");if(v&&!g){g=[a.xAxis.toPixels(a.xData[0]), a.xAxis.toPixels(a.xData[a.xData.length-1])];var y=Math.min.apply(Math,g);var z=Math.max.apply(Math,g)}if(a.visible&&!a.isSeriesBoosting&&e){u||(a.labelBySeries=u=c.renderer.label(a.name,0,-9999,"connector").addClass("highcharts-series-label highcharts-series-label-"+a.index+" "+(a.options.className||"")+t),c.renderer.styledMode||u.css(G({color:v?c.renderer.getContrast(a.color):a.color},a.options.label.style)),n&&q&&u.css({fontSize:a.labelFontSize(n,q)}),u.attr({padding:0,opacity:c.renderer.forExport? 1:0,stroke:a.color,"stroke-width":1,zIndex:3}).add());n=u.getBBox();n.width=Math.round(n.width);for(g=e.length-1;0=h;q-=16)for(t=r;t=f&&(e={x:k.x,y:k.y},k={}),a.labelBySeries.attr(G(k,{anchorX:b.connectorPoint&&b.connectorPoint.plotX+h,anchorY:b.connectorPoint&&b.connectorPoint.plotY+r})).animate(e,x?.2*B(a.options.animation).duration:c.renderer.globalAnimation),a.options.kdNow=!0,a.buildKDTree(),a=a.searchPoint({chartX:b.x,chartY:b.y},!0),u.closest=[a,b.x-a.plotX,b.y-a.plotY]}else u&&(a.labelBySeries=u.destroy())}else u&&(a.labelBySeries=u.destroy())}});k.fireEvent(c,"afterDrawSeriesLabels")};r(E,"load",F);r(E, "redraw",F)});x(k,"masters/modules/series-label.src.js",[],function(){})}); //# sourceMappingURL=series-label.js.map