UNPKG

highcharts

Version:
105 lines (103 loc) 80 kB
/* Highcharts JS v8.0.1 (2020-03-02) (c) 2009-2018 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/highcharts-more",["highcharts"],function(F){k(F);k.Highcharts=F;return k}):k("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(k){function F(g,a,c,b){g.hasOwnProperty(a)||(g[a]=b.apply(null,c))}k=k?k._modules:{};F(k,"parts-more/Pane.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){function c(d,b){this.init(d,b)}function b(d, b,a){return Math.sqrt(Math.pow(d-a[0],2)+Math.pow(b-a[1],2))<a[2]/2}var v=a.addEvent,u=a.extend,x=a.merge,k=a.pick,y=a.splat,d=g.CenteredSeriesMixin;g.Chart.prototype.collectionsWithUpdate.push("pane");u(c.prototype,{coll:"pane",init:function(d,b){this.chart=b;this.background=[];b.pane.push(this);this.setOptions(d)},setOptions:function(d){this.options=x(this.defaultOptions,this.chart.angular?{background:{}}:void 0,d)},render:function(){var d=this.options,b=this.options.background,a=this.chart.renderer; this.group||(this.group=a.g("pane-group").attr({zIndex:d.zIndex||0}).add());this.updateCenter();if(b)for(b=y(b),d=Math.max(b.length,this.background.length||0),a=0;a<d;a++)b[a]&&this.axis?this.renderBackground(x(this.defaultBackgroundOptions,b[a]),a):this.background[a]&&(this.background[a]=this.background[a].destroy(),this.background.splice(a,1))},renderBackground:function(d,b){var a="animate",m={"class":"highcharts-pane "+(d.className||"")};this.chart.styledMode||u(m,{fill:d.backgroundColor,stroke:d.borderColor, "stroke-width":d.borderWidth});this.background[b]||(this.background[b]=this.chart.renderer.path().add(this.group),a="attr");this.background[b][a]({d:this.axis.getPlotBandPath(d.from,d.to,d)}).attr(m)},defaultOptions:{center:["50%","50%"],size:"85%",innerSize:"0%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE, outerRadius:"105%"},updateCenter:function(b){this.center=(b||this.axis||{}).center=d.getCenter.call(this)},update:function(d,b){x(!0,this.options,d);x(!0,this.chart.options.pane,d);this.setOptions(this.options);this.render();this.chart.axes.forEach(function(d){d.pane===this&&(d.pane=null,d.update({},b))},this)}});g.Pane=c;g.Chart.prototype.getHoverPane=function(d){var a=this,m;d&&a.pane.forEach(function(t){var l=d.chartX-a.plotLeft,r=d.chartY-a.plotTop;b(a.inverted?r:l,a.inverted?l:r,t.center)&&(m= t)});return m};v(g.Chart,"afterIsInsidePlot",function(d){this.polar&&(d.isInsidePlot=this.pane.some(function(a){return b(d.x,d.y,a.center)}))});v(g.Pointer,"beforeGetHoverData",function(d){var b=this.chart;b.polar&&(b.hoverPane=b.getHoverPane(d),d.filter=function(a){return a.visible&&!(!d.shared&&a.directTouch)&&k(a.options.enableMouseTracking,!0)&&(!b.hoverPane||a.xAxis.pane===b.hoverPane)})});v(g.Pointer,"afterGetHoverData",function(d){var a=this.chart;d.hoverPoint&&d.hoverPoint.plotX&&d.hoverPoint.plotY&& a.hoverPane&&!b(d.hoverPoint.plotX,d.hoverPoint.plotY,a.hoverPane.center)&&(d.hoverPoint=void 0)})});F(k,"parts-more/RadialAxis.js",[k["parts/Globals.js"],k["parts/Tick.js"],k["parts/Utilities.js"]],function(g,a,c){var b=c.addEvent,v=c.correctFloat,u=c.defined,x=c.extend,k=c.merge,y=c.pick,d=c.pInt,m=c.relativeLength;c=c.wrap;var t=g.Axis,A=g.noop,w=t.prototype,l=a.prototype;var r={getOffset:A,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},createLabelCollector:function(){return!1}, setScale:A,setCategories:A,setTitle:A};var q={defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultCircularOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null,style:{textOverflow:"none"}},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},defaultRadialOptions:{gridLineInterpolation:"circle", gridLineWidth:1,labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(e){e=this.options=k(this.defaultOptions,this.defaultPolarOptions,e);e.plotBands||(e.plotBands=[]);g.fireEvent(this,"afterSetOptions")},getOffset:function(){w.getOffset.call(this);this.chart.axisOffset[this.side]=0},getLinePath:function(e,h,f){e=this.center;var n=this.chart,r=y(h,e[2]/2-this.offset);"undefined"===typeof f&&(f=this.horiz?0:this.center&&-this.center[3]/2);f&&(r+=f); this.isCircular||"undefined"!==typeof h?(h=this.chart.renderer.symbols.arc(this.left+e[0],this.top+e[1]+(f||0),r,r,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0}),h.xBounds=[this.left+e[0]],h.yBounds=[this.top+e[1]-r]):(h=this.postTranslate(this.angleRad,r),h=["M",e[0]+n.plotLeft,e[1]+n.plotTop,"L",h.x,h.y]);return h},setAxisTranslation:function(){w.setAxisTranslation.call(this);this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1): (this.center[2]-this.center[3])/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0)},beforeSetTickPositions:function(){this.autoConnect=this.isCircular&&"undefined"===typeof y(this.userMax,this.options.max)&&v(this.endAngleRad-this.startAngleRad)===v(2*Math.PI);!this.isCircular&&this.chart.inverted&&this.max++;this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){w.setAxisSize.call(this);this.isRadial&& (this.pane.updateCenter(this),this.isCircular?this.sector=this.endAngleRad-this.startAngleRad:this.center[1]-=this.center[3]/2,this.len=this.width=this.height=(this.center[2]-this.center[3])*y(this.sector,1)/2)},getPosition:function(e,h){e=this.translate(e);return this.postTranslate(this.isCircular?e:this.angleRad,y(this.isCircular?h:0>e?0:e,this.center[2]/2)-this.offset)},postTranslate:function(e,h){var f=this.chart,n=this.center;e=this.startAngleRad+e;return{x:f.plotLeft+n[0]+Math.cos(e)*h,y:f.plotTop+ n[1]+Math.sin(e)*h}},getPlotBandPath:function(e,h,f){var n=this.center,r=this.startAngleRad,E=n[2]/2,p=[y(f.outerRadius,"100%"),f.innerRadius,y(f.thickness,10)],b=Math.min(this.offset,0),a=/%$/;var q=this.isCircular;if("polygon"===this.options.gridLineInterpolation)p=this.getPlotLinePath({value:e}).concat(this.getPlotLinePath({value:h,reverse:!0}));else{e=Math.max(e,this.min);h=Math.min(h,this.max);q||(p[0]=this.translate(e),p[1]=this.translate(h));p=p.map(function(f){a.test(f)&&(f=d(f,10)*E/100); return f});if("circle"!==f.shape&&q)e=r+this.translate(e),h=r+this.translate(h);else{e=-Math.PI/2;h=1.5*Math.PI;var l=!0}p[0]-=b;p[2]-=b;p=this.chart.renderer.symbols.arc(this.left+n[0],this.top+n[1],p[0],p[0],{start:Math.min(e,h),end:Math.max(e,h),innerR:y(p[1],p[0]-p[2]),open:l});q&&(q=(h+e)/2,b=this.left+n[0]+n[2]/2*Math.cos(q),p.xBounds=q>-Math.PI/2&&q<Math.PI/2?[b,this.chart.plotWidth]:[0,b],p.yBounds=[this.top+n[1]+n[2]/2*Math.sin(q)],p.yBounds[0]+=q>-Math.PI&&0>q||q>Math.PI?-10:10)}return p}, getCrosshairPosition:function(e,h,f){var n=e.value,r=this.pane.center;if(this.isCircular){if(u(n))e.point&&(d=e.point.shapeArgs||{},d.start&&(n=this.chart.inverted?this.translate(e.point.rectPlotY,!0):e.point.x));else{var d=e.chartX||0;var p=e.chartY||0;n=this.translate(Math.atan2(p-f,d-h)-this.startAngleRad,!0)}e=this.getPosition(n);d=e.x;p=e.y}else u(n)||(d=e.chartX,p=e.chartY),u(d)&&u(p)&&(f=r[1]+this.chart.plotTop,n=this.translate(Math.min(Math.sqrt(Math.pow(d-h,2)+Math.pow(p-f,2)),r[2]/2)-r[3]/ 2,!0));return[n,d||0,p||0]},getPlotLinePath:function(e){var h=this,f=h.center,n=h.chart,r=n.inverted,d=e.value,p=e.reverse,b=h.getPosition(d),a=h.pane.options.background?h.pane.options.background[0]||h.pane.options.background:{},q=a.innerRadius||"0%",l=a.outerRadius||"100%";a=f[0]+n.plotLeft;var c=f[1]+n.plotTop,t=b.x,w=b.y,A=h.height;b=f[3]/2;var v,u;e.isCrosshair&&(w=this.getCrosshairPosition(e,a,c),d=w[0],t=w[1],w=w[2]);if(h.isCircular){p=Math.sqrt(Math.pow(t-a,2)+Math.pow(w-c,2));q="string"=== typeof q?m(q,1):q/p;l="string"===typeof l?m(l,1):l/p;f&&b&&(f=b/p,q<f&&(q=f),l<f&&(l=f));var g=["M",a+q*(t-a),c-q*(c-w),"L",t-(1-l)*(t-a),w+(1-l)*(c-w)]}else(d=h.translate(d))&&(0>d||d>A)&&(d=0),"circle"===h.options.gridLineInterpolation?g=h.getLinePath(0,d,b):(n[r?"yAxis":"xAxis"].forEach(function(f){f.pane===h.pane&&(v=f)}),g=[],f=v.tickPositions,v.autoConnect&&(f=f.concat([f[0]])),p&&(f=[].concat(f).reverse()),d&&(d+=b),f.forEach(function(f,e){u=v.getPosition(f,d);g.push(e?"L":"M",u.x,u.y)})); return g},getTitlePosition:function(){var e=this.center,h=this.chart,f=this.options.title;return{x:h.plotLeft+e[0]+(f.x||0),y:h.plotTop+e[1]-{high:.5,middle:.25,low:0}[f.align]*e[2]+(f.y||0)}},createLabelCollector:function(){var e=this;return function(){if(e.isRadial&&e.tickPositions&&!0!==e.options.labels.allowOverlap)return e.tickPositions.map(function(h){return e.ticks[h]&&e.ticks[h].label}).filter(function(e){return!!e})}}};b(t,"init",function(e){var h=this.chart,f=h.inverted,n=h.angular,d=h.polar, b=this.isXAxis,p=this.coll,a=n&&b,l,c=h.options;e=e.userOptions.pane||0;e=this.pane=h.pane&&h.pane[e];if("colorAxis"===p)this.isRadial=!1;else{if(n){if(x(this,a?r:q),l=!b)this.defaultPolarOptions=this.defaultRadialGaugeOptions}else d&&(x(this,q),this.defaultPolarOptions=(l=this.horiz)?this.defaultCircularOptions:k("xAxis"===p?this.defaultOptions:this.defaultYAxisOptions,this.defaultRadialOptions),f&&"yAxis"===p&&(this.defaultPolarOptions.stackLabels=this.defaultYAxisOptions.stackLabels));n||d?(this.isRadial= !0,c.chart.zoomType=null,this.labelCollector||(this.labelCollector=this.createLabelCollector()),this.labelCollector&&h.labelCollectors.push(this.labelCollector)):this.isRadial=!1;e&&l&&(e.axis=this);this.isCircular=l}});b(t,"afterInit",function(){var e=this.chart,h=this.options,f=this.pane,n=f&&f.options;e.angular&&this.isXAxis||!f||!e.angular&&!e.polar||(this.angleRad=(h.angle||0)*Math.PI/180,this.startAngleRad=(n.startAngle-90)*Math.PI/180,this.endAngleRad=(y(n.endAngle,n.startAngle+360)-90)*Math.PI/ 180,this.offset=h.offset||0)});b(t,"autoLabelAlign",function(e){this.isRadial&&(e.align=void 0,e.preventDefault())});b(t,"destroy",function(){if(this.chart&&this.chart.labelCollectors){var e=this.chart.labelCollectors.indexOf(this.labelCollector);0<=e&&this.chart.labelCollectors.splice(e,1)}});b(a,"afterGetPosition",function(e){this.axis.getPosition&&x(e.pos,this.axis.getPosition(this.pos))});b(a,"afterGetLabelPosition",function(e){var h=this.axis,f=this.label,n=f.getBBox(),d=h.options.labels,r=d.y, p=20,b=d.align,a=(h.translate(this.pos)+h.startAngleRad+Math.PI/2)/Math.PI*180%360,q=Math.round(a),l="end",c=0>q?q+360:q,w=c,t=0,A=0,v=null===d.y?.3*-n.height:0;if(h.isRadial){var u=h.getPosition(this.pos,h.center[2]/2+m(y(d.distance,-25),h.center[2]/2,-h.center[2]/2));"auto"===d.rotation?f.attr({rotation:a}):null===r&&(r=h.chart.renderer.fontMetrics(f.styles&&f.styles.fontSize).b-n.height/2);null===b&&(h.isCircular?(n.width>h.len*h.tickInterval/(h.max-h.min)&&(p=0),b=a>p&&a<180-p?"left":a>180+p&& a<360-p?"right":"center"):b="center",f.attr({align:b}));if("auto"===b&&2===h.tickPositions.length&&h.isCircular){90<c&&180>c?c=180-c:270<c&&360>=c&&(c=540-c);180<w&&360>=w&&(w=360-w);if(h.pane.options.startAngle===q||h.pane.options.startAngle===q+360||h.pane.options.startAngle===q-360)l="start";b=-90<=q&&90>=q||-360<=q&&-270>=q||270<=q&&360>=q?"start"===l?"right":"left":"start"===l?"left":"right";70<w&&110>w&&(b="center");15>c||180<=c&&195>c?t=.3*n.height:15<=c&&35>=c?t="start"===l?0:.75*n.height: 195<=c&&215>=c?t="start"===l?.75*n.height:0:35<c&&90>=c?t="start"===l?.25*-n.height:n.height:215<c&&270>=c&&(t="start"===l?n.height:.25*-n.height);15>w?A="start"===l?.15*-n.height:.15*n.height:165<w&&180>=w&&(A="start"===l?.15*n.height:.15*-n.height);f.attr({align:b});f.translate(A,t+v)}e.pos.x=u.x+d.x;e.pos.y=u.y+r}});c(l,"getMarkPath",function(e,h,f,n,d,r,p){var b=this.axis;b.isRadial?(e=b.getPosition(this.pos,b.center[2]/2+n),h=["M",h,f,"L",e.x,e.y]):h=e.call(this,h,f,n,d,r,p);return h})});F(k, "parts-more/AreaRangeSeries.js",[k["parts/Globals.js"],k["parts/Point.js"],k["parts/Utilities.js"]],function(g,a,c){var b=c.defined,v=c.extend,u=c.isArray,x=c.isNumber,k=c.pick;c=c.seriesType;var y=g.seriesTypes,d=g.Series.prototype,m=a.prototype;c("arearange","area",{lineWidth:1,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{align:null,verticalAlign:null,xLow:0,xHigh:0, yLow:0,yHigh:0}},{pointArrayMap:["low","high"],pointValKey:"low",deferTranslatePolar:!0,toYData:function(d){return[d.low,d.high]},highToXY:function(d){var b=this.chart,a=this.xAxis.postTranslate(d.rectPlotX,this.yAxis.len-d.plotHigh);d.plotHighX=a.x-b.plotLeft;d.plotHigh=a.y-b.plotTop;d.plotLowX=d.plotX},translate:function(){var d=this,b=d.yAxis,a=!!d.modifyValue;y.area.prototype.translate.apply(d);d.points.forEach(function(l){var r=l.high,q=l.plotY;l.isNull?l.plotY=null:(l.plotLow=q,l.plotHigh=b.translate(a? d.modifyValue(r,l):r,0,1,0,1),a&&(l.yBottom=l.plotHigh))});this.chart.polar&&this.points.forEach(function(b){d.highToXY(b);b.tooltipPos=[(b.plotHighX+b.plotLowX)/2,(b.plotHigh+b.plotLow)/2]})},getGraphPath:function(d){var b=[],a=[],l,r=y.area.prototype.getGraphPath;var q=this.options;var e=this.chart.polar&&!1!==q.connectEnds,h=q.connectNulls,f=q.step;d=d||this.points;for(l=d.length;l--;){var n=d[l];n.isNull||e||h||d[l+1]&&!d[l+1].isNull||a.push({plotX:n.plotX,plotY:n.plotY,doCurve:!1});var C={polarPlotY:n.polarPlotY, rectPlotX:n.rectPlotX,yBottom:n.yBottom,plotX:k(n.plotHighX,n.plotX),plotY:n.plotHigh,isNull:n.isNull};a.push(C);b.push(C);n.isNull||e||h||d[l-1]&&!d[l-1].isNull||a.push({plotX:n.plotX,plotY:n.plotY,doCurve:!1})}d=r.call(this,d);f&&(!0===f&&(f="left"),q.step={left:"right",center:"center",right:"left"}[f]);b=r.call(this,b);a=r.call(this,a);q.step=f;q=[].concat(d,b);this.chart.polar||"M"!==a[0]||(a[0]="L");this.graphPath=q;this.areaPath=d.concat(a);q.isArea=!0;q.xMap=d.xMap;this.areaPath.xMap=d.xMap; return q},drawDataLabels:function(){var b=this.points,a=b.length,c,l=[],r=this.options.dataLabels,q,e=this.chart.inverted;if(u(r))if(1<r.length){var h=r[0];var f=r[1]}else h=r[0],f={enabled:!1};else h=v({},r),h.x=r.xHigh,h.y=r.yHigh,f=v({},r),f.x=r.xLow,f.y=r.yLow;if(h.enabled||this._hasPointLabels){for(c=a;c--;)if(q=b[c]){var n=h.inside?q.plotHigh<q.plotLow:q.plotHigh>q.plotLow;q.y=q.high;q._plotY=q.plotY;q.plotY=q.plotHigh;l[c]=q.dataLabel;q.dataLabel=q.dataLabelUpper;q.below=n;e?h.align||(h.align= n?"right":"left"):h.verticalAlign||(h.verticalAlign=n?"top":"bottom")}this.options.dataLabels=h;d.drawDataLabels&&d.drawDataLabels.apply(this,arguments);for(c=a;c--;)if(q=b[c])q.dataLabelUpper=q.dataLabel,q.dataLabel=l[c],delete q.dataLabels,q.y=q.low,q.plotY=q._plotY}if(f.enabled||this._hasPointLabels){for(c=a;c--;)if(q=b[c])n=f.inside?q.plotHigh<q.plotLow:q.plotHigh>q.plotLow,q.below=!n,e?f.align||(f.align=n?"left":"right"):f.verticalAlign||(f.verticalAlign=n?"bottom":"top");this.options.dataLabels= f;d.drawDataLabels&&d.drawDataLabels.apply(this,arguments)}if(h.enabled)for(c=a;c--;)if(q=b[c])q.dataLabels=[q.dataLabelUpper,q.dataLabel].filter(function(f){return!!f});this.options.dataLabels=r},alignDataLabel:function(){y.column.prototype.alignDataLabel.apply(this,arguments)},drawPoints:function(){var a=this.points.length,c;d.drawPoints.apply(this,arguments);for(c=0;c<a;){var m=this.points[c];m.origProps={plotY:m.plotY,plotX:m.plotX,isInside:m.isInside,negative:m.negative,zone:m.zone,y:m.y};m.lowerGraphic= m.graphic;m.graphic=m.upperGraphic;m.plotY=m.plotHigh;b(m.plotHighX)&&(m.plotX=m.plotHighX);m.y=m.high;m.negative=m.high<(this.options.threshold||0);m.zone=this.zones.length&&m.getZone();this.chart.polar||(m.isInside=m.isTopInside="undefined"!==typeof m.plotY&&0<=m.plotY&&m.plotY<=this.yAxis.len&&0<=m.plotX&&m.plotX<=this.xAxis.len);c++}d.drawPoints.apply(this,arguments);for(c=0;c<a;)m=this.points[c],m.upperGraphic=m.graphic,m.graphic=m.lowerGraphic,v(m,m.origProps),delete m.origProps,c++},setStackedPoints:g.noop}, {setState:function(){var d=this.state,a=this.series,c=a.chart.polar;b(this.plotHigh)||(this.plotHigh=a.yAxis.toPixels(this.high,!0));b(this.plotLow)||(this.plotLow=this.plotY=a.yAxis.toPixels(this.low,!0));a.stateMarkerGraphic&&(a.lowerStateMarkerGraphic=a.stateMarkerGraphic,a.stateMarkerGraphic=a.upperStateMarkerGraphic);this.graphic=this.upperGraphic;this.plotY=this.plotHigh;c&&(this.plotX=this.plotHighX);m.setState.apply(this,arguments);this.state=d;this.plotY=this.plotLow;this.graphic=this.lowerGraphic; c&&(this.plotX=this.plotLowX);a.stateMarkerGraphic&&(a.upperStateMarkerGraphic=a.stateMarkerGraphic,a.stateMarkerGraphic=a.lowerStateMarkerGraphic,a.lowerStateMarkerGraphic=void 0);m.setState.apply(this,arguments)},haloPath:function(){var d=this.series.chart.polar,a=[];this.plotY=this.plotLow;d&&(this.plotX=this.plotLowX);this.isInside&&(a=m.haloPath.apply(this,arguments));this.plotY=this.plotHigh;d&&(this.plotX=this.plotHighX);this.isTopInside&&(a=a.concat(m.haloPath.apply(this,arguments)));return a}, destroyElements:function(){["lowerGraphic","upperGraphic"].forEach(function(d){this[d]&&(this[d]=this[d].destroy())},this);this.graphic=null;return m.destroyElements.apply(this,arguments)},isValid:function(){return x(this.low)&&x(this.high)}});""});F(k,"parts-more/AreaSplineRangeSeries.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){a=a.seriesType;a("areasplinerange","arearange",null,{getPointSpline:g.seriesTypes.spline.prototype.getPointSpline});""});F(k,"parts-more/ColumnRangeSeries.js", [k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){var c=a.clamp,b=a.merge,v=a.pick;a=a.seriesType;var u=g.defaultPlotOptions,x=g.noop,k=g.seriesTypes.column.prototype;a("columnrange","arearange",b(u.column,u.arearange,{pointRange:null,marker:null,states:{hover:{halo:!1}}}),{translate:function(){var a=this,d=a.yAxis,b=a.xAxis,u=b.startAngleRad,g,x=a.chart,l=a.xAxis.isRadial,r=Math.max(x.chartWidth,x.chartHeight)+999,q;k.translate.apply(a);a.points.forEach(function(e){var h=e.shapeArgs, f=a.options.minPointLength;e.plotHigh=q=c(d.translate(e.high,0,1,0,1),-r,r);e.plotLow=c(e.plotY,-r,r);var n=q;var C=v(e.rectPlotY,e.plotY)-q;Math.abs(C)<f?(f-=C,C+=f,n-=f/2):0>C&&(C*=-1,n-=C);l?(g=e.barX+u,e.shapeType="arc",e.shapeArgs=a.polarArc(n+C,n,g,g+e.pointWidth)):(h.height=C,h.y=n,e.tooltipPos=x.inverted?[d.len+d.pos-x.plotLeft-n-C/2,b.len+b.pos-x.plotTop-h.x-h.width/2,C]:[b.left-x.plotLeft+h.x+h.width/2,d.pos-x.plotTop+n+C/2,C])})},directTouch:!0,trackerGroups:["group","dataLabelsGroup"], drawGraph:x,getSymbol:x,crispCol:function(){return k.crispCol.apply(this,arguments)},drawPoints:function(){return k.drawPoints.apply(this,arguments)},drawTracker:function(){return k.drawTracker.apply(this,arguments)},getColumnMetrics:function(){return k.getColumnMetrics.apply(this,arguments)},pointAttribs:function(){return k.pointAttribs.apply(this,arguments)},animate:function(){return k.animate.apply(this,arguments)},polarArc:function(){return k.polarArc.apply(this,arguments)},translate3dPoints:function(){return k.translate3dPoints.apply(this, arguments)},translate3dShapes:function(){return k.translate3dShapes.apply(this,arguments)}},{setState:k.pointClass.prototype.setState});""});F(k,"parts-more/ColumnPyramidSeries.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){var c=a.clamp,b=a.pick;a=a.seriesType;var v=g.seriesTypes.column.prototype;a("columnpyramid","column",{},{translate:function(){var a=this,g=a.chart,k=a.options,y=a.dense=2>a.closestPointRange*a.xAxis.transA;y=a.borderWidth=b(k.borderWidth,y?0:1);var d=a.yAxis, m=k.threshold,t=a.translatedThreshold=d.getThreshold(m),A=b(k.minPointLength,5),w=a.getColumnMetrics(),l=w.width,r=a.barW=Math.max(l,1+2*y),q=a.pointXOffset=w.offset;g.inverted&&(t-=.5);k.pointPadding&&(r=Math.ceil(r));v.translate.apply(a);a.points.forEach(function(e){var h=b(e.yBottom,t),f=999+Math.abs(h),n=c(e.plotY,-f,d.len+f);f=e.plotX+q;var C=r/2,E=Math.min(n,h);h=Math.max(n,h)-E;var p;e.barX=f;e.pointWidth=l;e.tooltipPos=g.inverted?[d.len+d.pos-g.plotLeft-n,a.xAxis.len-f-C,h]:[f+C,n+d.pos-g.plotTop, h];n=m+(e.total||e.y);"percent"===k.stacking&&(n=m+(0>e.y)?-100:100);n=d.toPixels(n,!0);var G=(p=g.plotHeight-n-(g.plotHeight-t))?C*(E-n)/p:0;var v=p?C*(E+h-n)/p:0;p=f-G+C;G=f+G+C;var u=f+v+C;v=f-v+C;var x=E-A;var w=E+h;0>e.y&&(x=E,w=E+h+A);g.inverted&&(u=g.plotWidth-E,p=n-(g.plotWidth-t),G=C*(n-u)/p,v=C*(n-(u-h))/p,p=f+C+G,G=p-2*G,u=f-v+C,v=f+v+C,x=E,w=E+h-A,0>e.y&&(w=E+h+A));e.shapeType="path";e.shapeArgs={x:p,y:x,width:G-p,height:h,d:["M",p,x,"L",G,x,u,w,v,w,"Z"]}})}});""});F(k,"parts-more/GaugeSeries.js", [k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){var c=a.clamp,b=a.isNumber,v=a.merge,u=a.pick,k=a.pInt;a=a.seriesType;var D=g.Series,y=g.TrackerMixin;a("gauge","line",{dataLabels:{borderColor:"#cccccc",borderRadius:3,borderWidth:1,crop:!1,defer:!1,enabled:!0,verticalAlign:"top",y:15,zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1},{angular:!0,directTouch:!0,drawGraph:g.noop,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],translate:function(){var d= this.yAxis,a=this.options,g=d.center;this.generatePoints();this.points.forEach(function(m){var t=v(a.dial,m.dial),l=k(u(t.radius,"80%"))*g[2]/200,r=k(u(t.baseLength,"70%"))*l/100,q=k(u(t.rearLength,"10%"))*l/100,e=t.baseWidth||3,h=t.topWidth||1,f=a.overshoot,n=d.startAngleRad+d.translate(m.y,null,null,null,!0);if(b(f)||!1===a.wrap)f=b(f)?f/180*Math.PI:0,n=c(n,d.startAngleRad-f,d.endAngleRad+f);n=180*n/Math.PI;m.shapeType="path";m.shapeArgs={d:t.path||["M",-q,-e/2,"L",r,-e/2,l,-h/2,l,h/2,r,e/2,-q, e/2,"z"],translateX:g[0],translateY:g[1],rotation:n};m.plotX=g[0];m.plotY=g[1]})},drawPoints:function(){var d=this,a=d.chart,b=d.yAxis.center,c=d.pivot,g=d.options,l=g.pivot,r=a.renderer;d.points.forEach(function(b){var e=b.graphic,h=b.shapeArgs,f=h.d,n=v(g.dial,b.dial);e?(e.animate(h),h.d=f):b.graphic=r[b.shapeType](h).attr({rotation:h.rotation,zIndex:1}).addClass("highcharts-dial").add(d.group);if(!a.styledMode)b.graphic[e?"animate":"attr"]({stroke:n.borderColor||"none","stroke-width":n.borderWidth|| 0,fill:n.backgroundColor||"#000000"})});c?c.animate({translateX:b[0],translateY:b[1]}):(d.pivot=r.circle(0,0,u(l.radius,5)).attr({zIndex:2}).addClass("highcharts-pivot").translate(b[0],b[1]).add(d.group),a.styledMode||d.pivot.attr({"stroke-width":l.borderWidth||0,stroke:l.borderColor||"#cccccc",fill:l.backgroundColor||"#000000"}))},animate:function(d){var a=this;d||(a.points.forEach(function(d){var b=d.graphic;b&&(b.attr({rotation:180*a.yAxis.startAngleRad/Math.PI}),b.animate({rotation:d.shapeArgs.rotation}, a.options.animation))}),a.animate=null)},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);D.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:function(d,a){D.prototype.setData.call(this,d,!1);this.processData();this.generatePoints();u(a,!0)&&this.chart.redraw()},hasData:function(){return!!this.points.length},drawTracker:y&&y.drawTrackerPoint},{setState:function(d){this.state=d}});""});F(k, "parts-more/BoxPlotSeries.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){var c=a.pick;a=a.seriesType;var b=g.noop,v=g.seriesTypes;a("boxplot","column",{threshold:null,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,whiskerWidth:2}, {pointArrayMap:["low","q1","median","q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttribs:function(){return{}},drawDataLabels:b,translate:function(){var a=this.yAxis,b=this.pointArrayMap;v.column.prototype.translate.apply(this);this.points.forEach(function(c){b.forEach(function(b){null!==c[b]&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))});c.plotHigh=c.highPlot})},drawPoints:function(){var a=this,b=a.options,v=a.chart,g=v.renderer,d,m,k,A,w,l,r=0,q,e, h,f,n=!1!==a.doQuartiles,C,E=a.options.whiskerLength;a.points.forEach(function(p){var G=p.graphic,I=G?"animate":"attr",J=p.shapeArgs,u={},t={},H={},B={},z=p.color||a.color;"undefined"!==typeof p.plotY&&(q=J.width,e=Math.floor(J.x),h=e+q,f=Math.round(q/2),d=Math.floor(n?p.q1Plot:p.lowPlot),m=Math.floor(n?p.q3Plot:p.lowPlot),k=Math.floor(p.highPlot),A=Math.floor(p.lowPlot),G||(p.graphic=G=g.g("point").add(a.group),p.stem=g.path().addClass("highcharts-boxplot-stem").add(G),E&&(p.whiskers=g.path().addClass("highcharts-boxplot-whisker").add(G)), n&&(p.box=g.path(void 0).addClass("highcharts-boxplot-box").add(G)),p.medianShape=g.path(void 0).addClass("highcharts-boxplot-median").add(G)),v.styledMode||(t.stroke=p.stemColor||b.stemColor||z,t["stroke-width"]=c(p.stemWidth,b.stemWidth,b.lineWidth),t.dashstyle=p.stemDashStyle||b.stemDashStyle,p.stem.attr(t),E&&(H.stroke=p.whiskerColor||b.whiskerColor||z,H["stroke-width"]=c(p.whiskerWidth,b.whiskerWidth,b.lineWidth),p.whiskers.attr(H)),n&&(u.fill=p.fillColor||b.fillColor||z,u.stroke=b.lineColor|| z,u["stroke-width"]=b.lineWidth||0,p.box.attr(u)),B.stroke=p.medianColor||b.medianColor||z,B["stroke-width"]=c(p.medianWidth,b.medianWidth,b.lineWidth),p.medianShape.attr(B)),l=p.stem.strokeWidth()%2/2,r=e+f+l,p.stem[I]({d:["M",r,m,"L",r,k,"M",r,d,"L",r,A]}),n&&(l=p.box.strokeWidth()%2/2,d=Math.floor(d)+l,m=Math.floor(m)+l,e+=l,h+=l,p.box[I]({d:["M",e,m,"L",e,d,"L",h,d,"L",h,m,"L",e,m,"z"]})),E&&(l=p.whiskers.strokeWidth()%2/2,k+=l,A+=l,C=/%$/.test(E)?f*parseFloat(E)/100:E/2,p.whiskers[I]({d:["M", r-C,k,"L",r+C,k,"M",r-C,A,"L",r+C,A]})),w=Math.round(p.medianPlot),l=p.medianShape.strokeWidth()%2/2,w+=l,p.medianShape[I]({d:["M",e,w,"L",h,w]}))})},setStackedPoints:b});""});F(k,"parts-more/ErrorBarSeries.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){a=a.seriesType;var c=g.noop,b=g.seriesTypes;a("errorbar","boxplot",{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'}, whiskerWidth:null},{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,drawDataLabels:b.arearange?function(){var a=this.pointValKey;b.arearange.prototype.drawDataLabels.call(this);this.data.forEach(function(b){b.y=b[a]})}:c,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||b.column.prototype.getColumnMetrics.call(this)}});""});F(k,"parts-more/WaterfallSeries.js",[k["parts/Globals.js"],k["parts/Point.js"], k["parts/Utilities.js"]],function(g,a,c){var b=c.addEvent,v=c.arrayMax,k=c.arrayMin,x=c.correctFloat,D=c.isNumber,y=c.objectEach,d=c.pick;c=c.seriesType;var m=g.Axis,t=g.Chart,A=g.Series,w=g.StackItem,l=g.seriesTypes;b(m,"afterInit",function(){this.isXAxis||(this.waterfallStacks={changed:!1})});b(m,"afterBuildStacks",function(){this.waterfallStacks.changed=!1;delete this.waterfallStacks.alreadyChanged});b(t,"beforeRedraw",function(){for(var a=this.axes,d=this.series,e=d.length;e--;)d[e].options.stacking&& (a.forEach(function(e){e.isXAxis||(e.waterfallStacks.changed=!0)}),e=0)});b(m,"afterRender",function(){var a=this.options.stackLabels;a&&a.enabled&&this.waterfallStacks&&this.renderWaterfallStackTotals()});m.prototype.renderWaterfallStackTotals=function(){var a=this.waterfallStacks,d=this.stackTotalGroup,e=new w(this,this.options.stackLabels,!1,0,void 0);this.dummyStackItem=e;y(a,function(h){y(h,function(f){e.total=f.stackTotal;f.label&&(e.label=f.label);w.prototype.render.call(e,d);f.label=e.label; delete e.label})});e.total=null};c("waterfall","column",{dataLabels:{inside:!0},lineWidth:1,lineColor:"#333333",dashStyle:"Dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}},{pointValKey:"y",showLine:!0,generatePoints:function(){var a;l.column.prototype.generatePoints.apply(this);var d=0;for(a=this.points.length;d<a;d++){var e=this.points[d];var h=this.processedYData[d];if(e.isIntermediateSum||e.isSum)e.y=x(h)}},translate:function(){var a=this.options,b=this.yAxis,e,h=d(a.minPointLength, 5),f=h/2,n=a.threshold,c=a.stacking,E=b.waterfallStacks[this.stackKey];l.column.prototype.translate.apply(this);var p=e=n;var m=this.points;var v=0;for(a=m.length;v<a;v++){var g=m[v];var k=this.processedYData[v];var t=g.shapeArgs;var u=[0,k];var B=g.y;if(c){if(E){u=E[v];if("overlap"===c){var z=u.stackState[u.stateIndex--];z=0<=B?z:z-B;Object.hasOwnProperty.call(u,"absolutePos")&&delete u.absolutePos;Object.hasOwnProperty.call(u,"absoluteNeg")&&delete u.absoluteNeg}else 0<=B?(z=u.threshold+u.posTotal, u.posTotal-=B):(z=u.threshold+u.negTotal,u.negTotal-=B,z-=B),!u.posTotal&&Object.hasOwnProperty.call(u,"absolutePos")&&(u.posTotal=u.absolutePos,delete u.absolutePos),!u.negTotal&&Object.hasOwnProperty.call(u,"absoluteNeg")&&(u.negTotal=u.absoluteNeg,delete u.absoluteNeg);g.isSum||(u.connectorThreshold=u.threshold+u.stackTotal);b.reversed?(k=0<=B?z-B:z+B,B=z):(k=z,B=z-B);g.below=k<=d(n,0);t.y=b.translate(k,0,1,0,1);t.height=Math.abs(t.y-b.translate(B,0,1,0,1))}if(B=b.dummyStackItem)B.x=v,B.label= E[v].label,B.setOffset(this.pointXOffset||0,this.barW||0,this.stackedYNeg[v],this.stackedYPos[v])}else z=Math.max(p,p+B)+u[0],t.y=b.translate(z,0,1,0,1),g.isSum?(t.y=b.translate(u[1],0,1,0,1),t.height=Math.min(b.translate(u[0],0,1,0,1),b.len)-t.y):g.isIntermediateSum?(0<=B?(k=u[1]+e,B=e):(k=e,B=u[1]+e),b.reversed&&(k^=B,B^=k,k^=B),t.y=b.translate(k,0,1,0,1),t.height=Math.abs(t.y-Math.min(b.translate(B,0,1,0,1),b.len)),e+=u[1]):(t.height=0<k?b.translate(p,0,1,0,1)-t.y:b.translate(p,0,1,0,1)-b.translate(p- k,0,1,0,1),p+=k,g.below=p<d(n,0)),0>t.height&&(t.y+=t.height,t.height*=-1);g.plotY=t.y=Math.round(t.y)-this.borderWidth%2/2;t.height=Math.max(Math.round(t.height),.001);g.yBottom=t.y+t.height;t.height<=h&&!g.isNull?(t.height=h,t.y-=f,g.plotY=t.y,g.minPointLengthOffset=0>g.y?-f:f):(g.isNull&&(t.width=0),g.minPointLengthOffset=0);t=g.plotY+(g.negative?t.height:0);this.chart.inverted?g.tooltipPos[0]=b.len-t:g.tooltipPos[1]=t}},processData:function(a){var b=this.options,e=this.yData,h=b.data,f=e.length, n=b.threshold||0,d,r,p,c,l;for(l=r=d=p=c=0;l<f;l++){var m=e[l];var g=h&&h[l]?h[l]:{};"sum"===m||g.isSum?e[l]=x(r):"intermediateSum"===m||g.isIntermediateSum?(e[l]=x(d),d=0):(r+=m,d+=m);p=Math.min(r,p);c=Math.max(r,c)}A.prototype.processData.call(this,a);b.stacking||(this.dataMin=p+n,this.dataMax=c)},toYData:function(a){return a.isSum?"sum":a.isIntermediateSum?"intermediateSum":a.y},updateParallelArrays:function(a,d){A.prototype.updateParallelArrays.call(this,a,d);if("sum"===this.yData[0]||"intermediateSum"=== this.yData[0])this.yData[0]=null},pointAttribs:function(a,d){var e=this.options.upColor;e&&!a.options.color&&(a.color=0<a.y?e:null);a=l.column.prototype.pointAttribs.call(this,a,d);delete a.dashstyle;return a},getGraphPath:function(){return["M",0,0]},getCrispPath:function(){var a=this.data,d=this.yAxis,e=a.length,h=Math.round(this.graph.strokeWidth())%2/2,f=Math.round(this.borderWidth)%2/2,n=this.xAxis.reversed,b=this.yAxis.reversed,c=this.options.stacking,p=[],l;for(l=1;l<e;l++){var m=a[l].shapeArgs; var g=a[l-1];var v=a[l-1].shapeArgs;var t=d.waterfallStacks[this.stackKey];var u=0<g.y?-v.height:0;if(t){t=t[l-1];c?(t=t.connectorThreshold,u=Math.round(d.translate(t,0,1,0,1)+(b?u:0))-h):u=v.y+g.minPointLengthOffset+f-h;var k=["M",v.x+(n?0:v.width),u,"L",m.x+(n?m.width:0),u]}if(!c&&k&&0>g.y&&!b||0<g.y&&b)k[2]+=v.height,k[5]+=v.height;p=p.concat(k)}return p},drawGraph:function(){A.prototype.drawGraph.call(this);this.graph.attr({d:this.getCrispPath()})},setStackedPoints:function(){function a(f,e,a, h){if(y)for(a;a<y;a++)z.stackState[a]+=h;else z.stackState[0]=f,y=z.stackState.length;z.stackState.push(z.stackState[y-1]+e)}var d=this.options,e=this.yAxis.waterfallStacks,h=d.threshold,f=h||0,n=f,b=this.stackKey,c=this.xData,p=c.length,l,m,g;this.yAxis.usePercentage=!1;var v=m=g=f;if(this.visible||!this.chart.options.chart.ignoreHiddenSeries){var t=e.changed;(l=e.alreadyChanged)&&0>l.indexOf(b)&&(t=!0);e[b]||(e[b]={});l=e[b];for(var u=0;u<p;u++){var k=c[u];if(!l[k]||t)l[k]={negTotal:0,posTotal:0, stackTotal:0,threshold:0,stateIndex:0,stackState:[],label:t&&l[k]?l[k].label:void 0};var z=l[k];var x=this.yData[u];0<=x?z.posTotal+=x:z.negTotal+=x;var w=d.data[u];k=z.absolutePos=z.posTotal;var A=z.absoluteNeg=z.negTotal;z.stackTotal=k+A;var y=z.stackState.length;w&&w.isIntermediateSum?(a(g,m,0,g),g=m,m=h,f^=n,n^=f,f^=n):w&&w.isSum?(a(h,v,y),f=h):(a(f,x,0,v),w&&(v+=x,m+=x));z.stateIndex++;z.threshold=f;f+=z.stackTotal}e.changed=!1;e.alreadyChanged||(e.alreadyChanged=[]);e.alreadyChanged.push(b)}}, getExtremes:function(){var a=this.options.stacking;if(a){var d=this.yAxis;d=d.waterfallStacks;var e=this.stackedYNeg=[];var h=this.stackedYPos=[];"overlap"===a?y(d[this.stackKey],function(f){e.push(k(f.stackState));h.push(v(f.stackState))}):y(d[this.stackKey],function(f){e.push(f.negTotal+f.threshold);h.push(f.posTotal+f.threshold)});this.dataMin=k(e);this.dataMax=v(h)}}},{getClassName:function(){var d=a.prototype.getClassName.call(this);this.isSum?d+=" highcharts-sum":this.isIntermediateSum&&(d+= " highcharts-intermediate-sum");return d},isValid:function(){return D(this.y)||this.isSum||this.isIntermediateSum}});""});F(k,"parts-more/PolygonSeries.js",[k["parts/Globals.js"],k["mixins/legend-symbol.js"],k["parts/Utilities.js"]],function(g,a,c){c=c.seriesType;var b=g.Series,v=g.seriesTypes;c("polygon","scatter",{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:""},trackByArea:!0},{type:"polygon",getGraphPath:function(){for(var a=b.prototype.getGraphPath.call(this), c=a.length+1;c--;)(c===a.length||"M"===a[c])&&0<c&&a.splice(c,0,"z");return this.areaPath=a},drawGraph:function(){this.options.fillColor=this.color;v.area.prototype.drawGraph.call(this)},drawLegendSymbol:a.drawRectangle,drawTracker:b.prototype.drawTracker,setStackedPoints:g.noop});""});F(k,"parts-more/BubbleLegend.js",[k["parts/Globals.js"],k["parts/Color.js"],k["parts/Legend.js"],k["parts/Utilities.js"]],function(g,a,c,b){"";var v=a.parse;a=b.addEvent;var k=b.arrayMax,x=b.arrayMin,D=b.isNumber,y= b.merge,d=b.objectEach,m=b.pick,t=b.stableSort,A=b.wrap,w=g.Series,l=g.Chart,r=g.noop,q=g.setOptions;q({legend:{bubbleLegend:{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:10,color:void 0},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0}, sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}});g.BubbleLegend=function(e,a){this.init(e,a)};g.BubbleLegend.prototype={init:function(e,a){this.options=e;this.visible=!0;this.chart=a.chart;this.legend=a},setState:r,addToLegend:function(e){e.splice(this.options.legendIndex,0,this)},drawLegendSymbol:function(e){var a=this.chart,f=this.options,d=m(e.options.itemDistance,20),b=f.ranges;var c=f.connectorDistance;this.fontMetrics=a.renderer.fontMetrics(f.labels.style.fontSize.toString()+"px"); b&&b.length&&D(b[0].value)?(t(b,function(f,e){return e.value-f.value}),this.ranges=b,this.setOptions(),this.render(),a=this.getMaxLabelSize(),b=this.ranges[0].radius,e=2*b,c=c-b+a.width,c=0<c?c:0,this.maxLabel=a,this.movementX="left"===f.labels.align?c:0,this.legendItemWidth=e+c+d,this.legendItemHeight=e+this.fontMetrics.h/2):e.options.bubbleLegend.autoRanges=!0},setOptions:function(){var e=this.ranges,a=this.options,f=this.chart.series[a.seriesIndex],d=this.legend.baseline,b={"z-index":a.zIndex, "stroke-width":a.borderWidth},c={"z-index":a.zIndex,"stroke-width":a.connectorWidth},p=this.getLabelStyles(),l=f.options.marker.fillOpacity,r=this.chart.styledMode;e.forEach(function(h,n){r||(b.stroke=m(h.borderColor,a.borderColor,f.color),b.fill=m(h.color,a.color,1!==l?v(f.color).setOpacity(l).get("rgba"):f.color),c.stroke=m(h.connectorColor,a.connectorColor,f.color));e[n].radius=this.getRangeRadius(h.value);e[n]=y(e[n],{center:e[0].radius-e[n].radius+d});r||y(!0,e[n],{bubbleStyle:y(!1,b),connectorStyle:y(!1, c),labelStyle:p})},this)},getLabelStyles:function(){var e=this.options,a={},f="left"===e.labels.align,b=this.legend.options.rtl;d(e.labels.style,function(f,e){"color"!==e&&"fontSize"!==e&&"z-index"!==e&&(a[e]=f)});return y(!1,a,{"font-size":e.labels.style.fontSize,fill:m(e.labels.style.color,"#000000"),"z-index":e.zIndex,align:b||f?"right":"left"})},getRangeRadius:function(e){var a=this.options;return this.chart.series[this.options.seriesIndex].getRadius.call(this,a.ranges[a.ranges.length-1].value, a.ranges[0].value,a.minSize,a.maxSize,e)},render:function(){var a=this.chart.renderer,b=this.options.zThreshold;this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]});this.legendSymbol=a.g("bubble-legend");this.legendItem=a.g("bubble-legend-item");this.legendSymbol.translateX=0;this.legendSymbol.translateY=0;this.ranges.forEach(function(f){f.value>=b&&this.renderRange(f)},this);this.legendSymbol.add(this.legendItem);this.legendItem.add(this.legendGroup);this.hideOverlappingLabels()}, renderRange:function(a){var e=this.options,f=e.labels,b=this.chart.renderer,d=this.symbols,c=d.labels,p=a.center,l=Math.abs(a.radius),r=e.connectorDistance,m=f.align,g=f.style.fontSize;r=this.legend.options.rtl||"left"===m?-r:r;f=e.connectorWidth;var q=this.ranges[0].radius,v=p-l-e.borderWidth/2+f/2;g=g/2-(this.fontMetrics.h-g)/2;var k=b.styledMode;"center"===m&&(r=0,e.connectorDistance=0,a.labelStyle.align="center");m=v+e.labels.y;var t=q+r+e.labels.x;d.bubbleItems.push(b.circle(q,p+((v%1?1:.5)- (f%2?0:.5)),l).attr(k?{}:a.bubbleStyle).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-symbol "+(e.className||"")).add(this.legendSymbol));d.connectors.push(b.path(b.crispLine(["M",q,v,"L",q+r,v],e.connectorWidth)).attr(k?{}:a.connectorStyle).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(e.connectorClassName||"")).add(this.legendSymbol));a=b.text(this.formatLabel(a),t,m+g).attr(k?{}:a.labelStyle).addClass("highcharts-bubble-legend-labels "+ (e.labels.className||"")).add(this.legendSymbol);c.push(a);a.placed=!0;a.alignAttr={x:t,y:m+g}},getMaxLabelSize:function(){var a,b;this.symbols.labels.forEach(function(f){b=f.getBBox(!0);a=a?b.width>a.width?b:a:b});return a||{}},formatLabel:function(a){var e=this.options,f=e.labels.formatter;e=e.labels.format;var d=this.chart.numberFormatter;return e?b.format(e,a):f?f.call(a):d(a.value,1)},hideOverlappingLabels:function(){var a=this.chart,b=this.symbols;!this.options.labels.allowOverlap&&b&&(a.hideOverlappingLabels(b.labels), b.labels.forEach(function(f,a){f.newOpacity?f.newOpacity!==f.oldOpacity&&b.connectors[a].show():b.connectors[a].hide()}))},getRanges:function(){var a=this.legend.bubbleLegend,b=a.options.ranges,f,d=Number.MAX_VALUE,c=-Number.MAX_VALUE;a.chart.series.forEach(function(a){a.isBubble&&!a.ignoreSeries&&(f=a.zData.filter(D),f.length&&(d=m(a.options.zMin,Math.min(d,Math.max(x(f),!1===a.options.displayNegative?a.options.zThreshold:-Number.MAX_VALUE))),c=m(a.options.zMax,Math.max(c,k(f)))))});var l=d===c? [{value:c}]:[{value:d},{value:(d+c)/2},{value:c,autoRanges:!0}];b.length&&b[0].radius&&l.reverse();l.forEach(function(f,a){b&&b[a]&&(l[a]=y(!1,b[a],f))});return l},predictBubbleSizes:function(){var a=this.chart,b=this.fontMetrics,f=a.legend.options,d="horizontal"===f.layout,c=d?a.legend.lastLineHeight:0,l=a.plotSizeX,p=a.plotSizeY,r=a.series[this.options.seriesIndex];a=Math.ceil(r.minPxSize);var m=Math.ceil(r.maxPxSize);r=r.options.maxSize;var g=Math.min(p,l);if(f.floating||!/%$/.test(r))b=m;else if(r= parseFloat(r),b=(g+c-b.h/2)*r/100/(r/100+1),d&&p-b>=l||!d&&l-b>=p)b=m;return[a,Math.ceil(b)]},updateRanges:function(a,b){var f=this.legend.options.bubbleLegend;f.minSize=a;f.maxSize=b;f.ranges=this.getRanges()},correctSizes:function(){var a=this.legend,b=this.chart.series[this.options.seriesIndex];1<Math.abs(Math.ceil(b.maxPxSize)-this.options.maxSize)&&(this.updateRanges(this.options.minSize,b.maxPxSize),a.render())}};a(c,"afterGetAllItems",function(a){var b=this.bubbleLegend,f=this.options,e=f.bubbleLegend, d=this.chart.getVisibleBubbleSeriesIndex();b&&b.ranges&&b.ranges.length&&(e.ranges.length&&(e.autoRanges=!!e.ranges[0].autoRanges),this.destroyItem(b));0<=d&&f.enabled&&e.enabled&&(e.seriesIndex=d,this.bubbleLegend=new g.BubbleLegend(e,this),this.bubbleLegend.addToLegend(a.allItems))});l.prototype.getVisibleBubbleSeriesIndex=function(){for(var a=this.series,b=0;b<a.length;){if(a[b]&&a[b].isBubble&&a[b].visible&&a[b].zData.length)return b;b++}return-1};c.prototype.getLinesHeights=function(){var a= this.allItems,b=[],f=a.length,d,c=0;for(d=0;d<f;d++)if(a[d].legendItemHeight&&(a[d].itemHeight=a[d].legendItemHeight),a[d]===a[f-1]||a[d+1]&&a[d]._legendItemPos[1]!==a[d+1]._legendItemPos[1]){b.push({height:0});var l=b[b.length-1];for(c;c<=d;c++)a[c].itemHeight>l.height&&(l.height=a[c].itemHeight);l.step=d}return b};c.prototype.retranslateItems=function(a){var b,f,d,e=this.options.rtl,c=0;this.allItems.forEach(function(n,h){b=n.legendGroup.translateX;f=n._legendItemPos[1];if((d=n.movementX)||e&&n.ranges)d= e?b-n.options.maxSize/2:b+d,n.legendGroup.attr({translateX:d});h>a[c].step&&c++;n.legendGroup.attr({translateY:Math.round(f+a[c].height/2)});n._legendItemPos[1]=f+a[c].height/2})};a(w,"legendItemClick",function(){var a=this.chart,b=this.visible,f=this.chart.legend;f&&f.bubbleLegend&&(this.visible=!b,this.ignoreSeries=b,a=0<=a.getVisibleBubbleSeriesIndex(),f.bubbleLegend.visible!==a&&(f.update({bubbleLegend:{enabled:a}}),f.bubbleLegend.visible=a),this.visible=b)});A(l.prototype,"drawChartBox",function(a, b,f){var e=this.legend,c=0<=this.getVisibleBubbleSeriesIndex();if(e&&e.options.enabled&&e.bubbleLegend&&e.options.bubbleLegend.autoRanges&&c){var h=e.bubbleLegend.options;c=e.bubbleLegend.predictBubbleSizes();e.bubbleLegend.updateRanges(c[0],c[1]);h.placed||(e.group.placed=!1,e.allItems.forEach(function(a){a.legendGroup.translateY=null}));e.render();this.getMargins();this.axes.forEach(function(a){a.visible&&a.render();h.placed||(a.setScale(),a.updateNames(),d(a.ticks,function(a){a.isNew=!0;a.isNewLabel= !0}))});h.placed=!0;this.getMargins();a.call(this,b,f);e.bubbleLegend.correctSizes();e.retranslateItems(e.getLinesHeights())}else a.call(this,b,f),e&&e.options.enabled&&e.bubbleLegend&&(e.render(),e.retranslateItems(e.getLinesHeights()))})});F(k,"parts-more/BubbleSeries.js",[k["parts/Globals.js"],k["parts/Color.js"],k["parts/Point.js"],k["parts/Utilities.js"]],function(g,a,c,b){var v=a.parse,k=b.arrayMax,x=b.arrayMin,D=b.clamp,y=b.extend,d=b.isNumber,m=b.pick,t=b.pInt;a=b.seriesType;b=g.Axis;var A= g.noop,w=g.Series,l=g.seriesTypes;a("bubble","scatter",{dataLabels:{formatter:function(){return this.point.z},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"},{pointArrayMap:["y","z"],parallelArrays:["x","y", "z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",bubblePadding:!0,zoneAxis:"z",directTouch:!0,isBubble:!0,pointAttribs:function(a,b){var d=this.options.marker.fillOpacity;a=w.prototype.pointAttribs.call(this,a,b);1!==d&&(a.fill=v(a.fill).setOpacity(d).get("rgba"));return a},getRadii:function(a,b,d){var e=this.zData,f=this.yData,n=d.minPxSize,c=d.maxPxSize,l=[];var p=0;for(d=e.length;p<d;p++){var r=e[p];l.push(this.getRadius(a,b,n,c,r,f[p]))}this.radii=l},getRadius:function(a,b, e,c,f,n){var h=this.options,l="width"!==h.sizeBy,p=h.zThreshold,r=b-a,m=.5;if(null===n||null===f)return null;if(d(f)){h.sizeByAbsoluteValue&&(f=Math.abs(f-p),r=Math.max(b-p,Math.abs(a-p)),a=0);if(f<a)return e/2-1;0<r&&(m=(f-a)/r)}l&&0<=m&&(m=Math.sqrt(m));return Math.ceil(e+m*(c-e))/2},animate:function(a){!a&&this.points.length<this.options.animationLimit&&(this.points.forEach(function(a){var b=a.graphic;if(b&&b.width){var d={x:b.x,y:b.y,width:b.width,height:b.height};b.attr({x:a.plotX,y:a.plotY, width:1,height:1});b.animate(d,this.options.animation)}},this),this.animate=null)},hasData:function(){return!!this.processedXData.length},translate:function(){var a,b=this.data,e=this.radii;l.scatter.prototype.translate.call(this);for(a=b.length;a--;){var c=b[a];var f=e?e[a]:0;d(f)&&f>=this.minPxSize/2?(c.marker=y(c.marker,{radius:f,width:2*f,height:2*f}),c.dlBox={x:c.plotX-f,y:c.plotY-f,width:2*f,height:2*f}):c.shapeArgs=c.plotY=c.dlBox=void 0}},alignDataLabel:l.column.prototype.alignDataLabel,buildKDTree:A, applyZones:A},{haloPath:function(a){return c.prototype.haloPath.call(this,0===a?0:(this.marker?this.marker.radius||0:0)+a)},ttBelow:!1});b.prototype.beforePadding=function(){var a=this,b=this.len,e=this.chart,c=0,f=b,n=this.isXAxis,l=n?"xData":"yData",g=this.min,p={},v=Math.min(e.plotWidth,e.plotHeight),u=Number.MAX_VALUE,w=-Number.MAX_VALUE,A=this.max-g,y=b/A,H=[];this.series.forEach(function(f){var b=f.options;!f.bubblePadding||!f.visible&&e.options.chart.ignoreHiddenSeries||(a.allowZoomOutside= !0,H.push(f),n&&(["minSize","maxSize"].forEach(function(a){var f=b[a],d=/%$/.test(f);f=t(f);p[a]=d?v*f/100:f}),f.minPxSize=p.minSize,f.maxPxSize=Math.max(p.maxSize,p.minSize),f=f.zData.filter(d),f.length&&(u=m(b.zMin,D(x(f),!1===b.displayNegative?b.zThreshold:-Number.MAX_VALUE,u)),w=m(b.zMax,Math.max(w,k(f))))))});H.forEach(function(b){var e=b[l],h=e.length;n&&b.getRadii(u,w,b);if(0<A)for(;h--;)if(d(e[h])&&a.dataMin<=e[h]&&e[h]<=a.max){var p=b.radii?b.radii[h]:0;c=Math.min((e[h]-g)*y-p,c);f=Math.max((e[h]- g)*y+p,f)}});H.length&&0<A&&!this.isLog&&(f-=b,y*=(b+Math.max(0,c)-Math.min(f,b))/b,[["min","userMin",c],["max","userMax",f]].forEach(function(f){"undefined"===typeof m(a.options[f[0]],a[f[1]])&&(a[f[0]]+=f[2]/y)}))};""});F(k,"modules/networkgraph/integrations.js",[k["parts/Globals.js"]],function(g){g.networkgraphIntegrations={verlet:{attractiveForceFunction:function(a,c){return(c-a)/a},repulsiveForceFunction:function(a,c){return(c-a)/a*(c>a?1:0)},barycenter:function(){var a=this.options.gravitationalConstant, c=this.barycenter.xFactor,b=this.barycenter.yFactor;c=(c-(this.box.left+this.box.width)/2)*a;b=(b-(this.box.top+this.box.height)/2)*a;this.nodes.forEach(function(a){a.fixedPosition||(a.plotX-=c/a.mass/a.degree,a.plotY-=b/a.mass/a.degree)})},repulsive:function(a,c,b){c=c*this.diffTemperature/a.mass/a.degree;a.fixedPosition||(a.plotX+=b.x*c,a.plotY+=b.y*c)},attractive:function(a,c,b){var g=a.getMass(),k=-b.x*c*this.diffTemperature;c=-b.y*c*this.diffTemperature;a.fromNode.fixedPosition||(a.fromNode.plotX-= k*g.fromNode/a.fromNode.degree,a.fromNode.plotY-=c*g.fromNode/a.fromNode.degree);a.toNode.fixedPosition||(a.toNode.plotX+=k*g.toNode/a.toNode.degree,a.toNode.plotY+=c*g.toNode/a.toNode.degree)},integrate:function(a,c){var b=-a.options.friction,g=a.options.maxSpeed,k=(c.plotX+c.dispX-c.prevX)*b;b*=c.plotY+c.dispY-c.prevY;var x=Math.abs,D=x(k)/(k||1);x=x(b)/(b||1);k=D*Math.min(g,Math.abs(k));b=x*Math.min(g,Math.abs(b));c.prevX=c.plotX+c.dispX;c.prevY=c.plotY+c.dispY;c.plotX+=k;c.plotY+=b;c.temperature= a.vectorLength({x:k,y:b})},getK:function(a){return Math.pow(a.box.width*a.box.height/a.nodes.length,.5)}},euler:{attractiveForceFunction:function(a,c){return a*a/c},repulsiveForceFunction:function(a,c){return c*c/a},barycenter:function(){var a=this.options.gravitationalConstant,c=this.barycenter.xFactor,b=this.barycenter.yFactor;this.nodes.forEach(function(g){if(!g.fixedPosition){var k=g.getDegree();k*=1+k/2;g.dispX+=(c-g.plotX)*a*k/g.degree;g.dispY+=(b-g.plotY)*a*k/g.degree}})},repulsive:function(a, c,b,g){a.dispX+=b.x/g*c/a.degree;a.dispY+=b.y/g*c/a.degree},attractive:function(a,c,b,g){var k=a.getMass(),v=b.x/g*c;c*=b.y/g;a.fromNode.fixedPosition||(a.fromNode.dispX-=v*k.fromNode/a.fromNode.degree,a.fromNode.dispY-=c*k.fromNode/a.fromNode.degree);a.toNode.fixedPosition||(a.toNode.dispX+=v*k.toNode/a.toNode.degree,a.toNode.dispY+=c*k.toNode/a.toNode.degree)},integrate:function(a,c){c.dispX+=c.dispX*a.options.friction;c.dispY+=c.dispY*a.options.friction;var b=c.temperature=a.vectorLength({x:c.dispX, y:c.dispY});0!==b&&(c.plotX+=c.dispX/b*Math.min(Math.abs(c.dispX),a.temperature),c.plotY+=c.dispY/b*Math.min(Math.abs(c.dispY),a.temperature))},getK:function(a){return Math.pow(a.box.width*a.box.height/a.nodes.length,.3)}}}});F(k,"modules/networkgraph/QuadTree.js",[k["parts/Globals.js"],k["parts/Utilities.js"]],function(g,a){a=a.extend;var c=g.QuadTreeNode=function(a){this.box=a;this.boxSize=Math.min(a.width,a.height);this.nodes=[];this.body=this.isInternal=!1;this.isEmpty=!0};a(c.prototype,{insert:function(a, g){this.isInternal?this.nodes[this.getBoxPosition(a)].insert(a,g-1):(this.isEmpty=!1,this.body?g?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,g-1),this.body=!0),this.nodes[this.getBoxPosition(a)].insert(a,g-1)):(g=new c({top:a.plotX,left:a.plotY,width:.1,height:.1}),g.body=a,g.isInternal=!1,this.nodes.push(g)):(this.isInternal=!1,this.body=a))},updateMassAndCenter:functi