=u&&(o[d-m]||l)<=p,h&&l)if(h=c.length)for(;h--;)"number"===typeof c[h]&&(r[a++]=c[h]);else r[a++]=c;this.dataMin=s(r),this.dataMax=n(r)},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i,n,s=this.options,r=s.stacking,a=this.xAxis,l=a.categories,c=this.yAxis,d=this.points,p=d.length,f=!!this.modifyValue,m=s.pointPlacement,v="between"===m||g(m),x=s.threshold,b=s.startFromThreshold?x:0,k=Number.MAX_VALUE;for("between"===m&&(m=.5),g(m)&&(m*=y(s.pointRange||a.pointRange)),s=0;s=S&&(w.isNull=!0),w.plotX=t=o(Math.min(Math.max(-1e5,a.translate(M,0,0,0,1,m,"flags"===this.type)),1e5)),r&&this.visible&&!w.isNull&&A&&A[M]&&(n=this.getStackIndicator(n,M,this.index),T=A[M],S=T.points[n.key],e=S[0],S=S[1],e===b&&n.key===A[M].base&&(e=y(g(x)&&x,c.min)),c.positiveValuesOnly&&0>=e&&(e=null),w.total=w.stackTotal=T.total,w.percentage=T.total&&w.y/T.total*100,w.stackY=S,T.setOffset(this.pointXOffset||0,this.barW||0)),w.yBottom=h(e)?Math.min(Math.max(-1e5,c.translate(e,0,1,0,1)),1e5):null,f&&(S=this.modifyValue(S,w)),w.plotY=e="number"===typeof S&&1/0!==S?Math.min(Math.max(-1e5,c.translate(S,0,1,0,1)),1e5):void 0,w.isInside=void 0!==e&&0<=e&&e<=c.len&&0<=t&&t<=a.len,w.clientX=v?o(a.translate(M,0,0,0,1,m)):t,w.negative=w.y<(x||0),w.category=l&&void 0!==l[w.x]?l[w.x]:w.x,w.isNull||(void 0!==i&&(k=Math.min(k,Math.abs(t-i))),i=t),w.zone=this.zones.length&&w.getZone()}this.closestPointRangePx=k,u(this,"afterTranslate")},getValidPoints:function(t,e){var i=this.chart;return p(t||this.points||[],function(t){return!(e&&!i.isInsidePlot(t.plotX,t.plotY,i.inverted))&&!t.isNull})},setClip:function(t){var e=this.chart,i=this.options,n=e.renderer,s=e.inverted,o=this.clipBox,r=o||e.clipBox,a=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,r.height,i.xAxis,i.yAxis].join(),h=e[a],l=e[a+"m"];h||(t&&(r.width=0,s&&(r.x=e.plotSizeX),e[a+"m"]=l=n.clipRect(s?e.plotSizeX+99:-99,s?-e.plotLeft:-e.plotTop,99,s?e.chartWidth:e.chartHeight)),e[a]=h=n.clipRect(r),h.count={length:0}),t&&!h.count[this.index]&&(h.count[this.index]=!0,h.count.length+=1),!1!==i.clip&&(this.group.clip(t||o?h:e.clipRect),this.markerGroup.clip(l),this.sharedClipKey=a),t||(h.count[this.index]&&(delete h.count[this.index],--h.count.length),0===h.count.length&&a&&e[a]&&(o||(e[a]=e[a].destroy()),e[a+"m"]&&(e[a+"m"]=e[a+"m"].destroy())))},animate:function(t){var e,n=this.chart,s=i(this.options.animation);t?this.setClip(s):(e=this.sharedClipKey,(t=n[e])&&t.animate({width:n.plotSizeX,x:0},s),n[e+"m"]&&n[e+"m"].animate({width:n.plotSizeX+99,x:0},s),this.animate=null)},afterAnimate:function(){this.setClip(),u(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var t,e,i,n,s,o,r,a,h=this.points,l=this.chart,c=this.options.marker,d=this[this.specialGroup]||this.markerGroup,u=y(c.enabled,!!this.xAxis.isRadial||null,this.closestPointRangePx>=c.enabledThreshold*c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(t=0;ts&&e.shadow)),r&&(r.startX=i.xMap,r.isArea=i.isArea)})},getZonesGraphs:function(t){return l(this.zones,function(e,i){t.push(["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||""),e.color||this.color,e.dashStyle||this.options.dashStyle])},this),t},applyZones:function(){var t,e,i,n,s,o,r,a,h,c=this,d=this.chart,u=d.renderer,p=this.zones,f=this.clips||[],g=this.graph,m=this.area,v=Math.max(d.chartWidth,d.chartHeight),x=this[(this.zoneAxis||"y")+"Axis"],b=d.inverted,k=!1;p.length&&(g||m)&&x&&void 0!==x.min&&(s=x.reversed,o=x.horiz,g&&!this.showLine&&g.hide(),m&&m.hide(),n=x.getExtremes(),l(p,function(l,p){t=s?o?d.plotWidth:0:o?0:x.toPixels(n.min),t=Math.min(Math.max(y(e,t),0),v),e=Math.min(Math.max(Math.round(x.toPixels(y(l.value,n.max),!0)),0),v),k&&(t=e=x.toPixels(n.max)),r=Math.abs(t-e),a=Math.min(t,e),h=Math.max(t,e),x.isXAxis?(i={x:b?h:a,y:0,width:r,height:v},o||(i.x=d.plotHeight-i.x)):(i={x:0,y:b?h:a,width:v,height:r},o&&(i.y=d.plotWidth-i.y)),b&&u.isVML&&(i=x.isXAxis?{x:0,y:s?a:h,height:i.width,width:d.chartWidth}:{x:i.y-d.plotLeft-d.spacingBox.x,y:0,width:i.height,height:d.chartHeight}),f[p]?f[p].animate(i):(f[p]=u.clipRect(i),g&&c["zone-graph-"+p].clip(f[p]),m&&c["zone-area-"+p].clip(f[p])),k=l.value>n.max,c.resetZones&&0===e&&(e=void 0)}),this.clips=f)},invertGroups:function(t){function i(){l(["group","markerGroup"],function(e){s[e]&&(o.renderer.isVML&&s[e].attr({width:s.yAxis.len,height:s.xAxis.len}),s[e].width=s.yAxis.len,s[e].height=s.xAxis.len,s[e].invert(t))})}var n,s=this,o=s.chart;s.xAxis&&(n=e(o,"resize",i),e(s,"destroy",n),i(),s.invertGroups=i)},plotGroup:function(t,e,i,n,s){var o=this[t],r=!o;return r&&(this[t]=o=this.chart.renderer.g().attr({zIndex:n||.1}).add(s)),o.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(h(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr({visibility:i})[r?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,n=e.chart,s=e.options,o=!!e.animate&&n.renderer.isSVG&&i(s.animation).duration,r=e.visible?"inherit":"hidden",a=s.zIndex,h=e.hasRendered,l=n.seriesGroup,c=n.inverted;t=e.plotGroup("group","series",r,a,l),e.markerGroup=e.plotGroup("markerGroup","markers",r,a,l),o&&e.animate(!0),t.inverted=!!e.isCartesian&&c,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(c),!1===s.clip||e.sharedClipKey||h||t.clip(n.clipRect),o&&e.animate(),h||(e.animationTimeout=M(function(){e.afterAnimate()},o)),e.isDirty=!1,e.hasRendered=!0,u(e,"afterRender")},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,n=this.xAxis,s=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:y(n&&n.left,t.plotLeft),translateY:y(s&&s.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,n=this.yAxis,s=this.chart.inverted;return this.searchKDTree({clientX:s?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:s?n.len-t.chartX+n.pos:t.chartY-n.pos},e)},buildKDTree:function(){function t(i,n,s){var o,r;if(r=i&&i.length)return o=e.kdAxisArray[n%s],i.sort(function(t,e){return t[o]-e[o]}),r=Math.floor(r/2),{point:i[r],left:t(i.slice(0,r),n+1,s),right:t(i.slice(r+1),n+1,s)}}this.buildingKdTree=!0;var e=this,i=-1p?"left":"right",d=0>p?"right":"left",e[c]&&(c=i(t,e[c],a+1,l),f=c[r]a;)r--;this.updateParallelArrays(s,"splice",r,0,0),this.updateParallelArrays(s,r),d&&s.name&&(d[a]=s.name),u.splice(r,0,t),o&&(this.data.splice(r,0,null),this.processData()),"point"===h.legendType&&this.generatePoints(),i&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(s,"shift"),u.shift())),this.isDirtyData=this.isDirty=!0,e&&c.redraw(n)},removePoint:function(t,e,i){var n=this,s=n.data,o=s[t],r=n.points,a=n.chart,h=function(){r&&r.length===s.length&&r.splice(t,1),s.splice(t,1),n.options.data.splice(t,1),n.updateParallelArrays(o||{series:n},"splice",t,1),o&&o.destroy(),n.isDirty=!0,n.isDirtyData=!0,e&&a.redraw()};k(i,a),e=v(e,!0),o?o.firePointEvent("remove",null,h):h()},remove:function(t,e,i){function n(){s.destroy(),s.remove=null,o.isDirtyLegend=o.isDirtyBox=!0,o.linkSeries(),v(t,!0)&&o.redraw(e)}var s=this,o=s.chart;!1!==i?c(s,"remove",null,n):n()},update:function(e,i){var n,s=this,o=s.chart,r=s.userOptions,h=s.oldType||s.type,u=e.type||r.type||o.options.chart.type,p=b[h].prototype,f=["group","markerGroup","dataLabelsGroup"],m=["navigatorSeries","baseSeries"],x=s.finishedAnimating&&{animation:!1},y=["data","name","turboThreshold"],k=t.keys(e),w=0t&&h>o?(h=Math.max(t,o),c=2*o-h):hn&&c>o?(c=Math.max(n,o),h=2*o-c):c=Math.abs(e)&&.5t.closestPointRange*t.xAxis.transA,s=t.borderWidth=h(i.borderWidth,s?0:1),r=t.yAxis,a=i.threshold,c=t.translatedThreshold=r.getThreshold(a),d=h(i.minPointLength,5),u=t.getColumnMetrics(),p=u.width,f=t.barW=Math.max(p,1+2*s),g=t.pointXOffset=u.offset;e.inverted&&(c-=.5),i.pointPadding&&(f=Math.ceil(f)),l.prototype.translate.apply(t),n(t.points,function(i){var n,s=h(i.yBottom,c),l=999+Math.abs(s),u=p,l=Math.min(Math.max(-l,i.plotY),r.len+l),m=i.plotX+g,v=f,x=Math.min(l,s),y=Math.max(l,s)-x;d&&Math.abs(y)d?s-d:c-(n?d:0)),o(i.options.pointWidth)&&(u=v=Math.ceil(i.options.pointWidth),m-=Math.round((u-p)/2)),i.barX=m,i.pointWidth=u,i.tooltipPos=e.inverted?[r.len+r.pos-e.plotLeft-l,t.xAxis.len-m-v/2,y]:[m+v/2,l+r.pos-e.plotTop,y],i.shapeType="rect",i.shapeArgs=t.crispCol.apply(t,i.isNull?[m,c,v,0]:[m,x,v,y])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var n,s=this.options,o=this.pointAttrToOptions||{};n=o.stroke||"borderColor";var r=o["stroke-width"]||"borderWidth",h=t&&t.color||this.color,l=t&&t[n]||s[n]||this.color||h,c=t&&t[r]||s[r]||this[r]||0,o=s.dashStyle;return t&&this.zones.length&&(h=t.getZone(),h=t.options.color||h&&h.color||this.color),e&&(t=a(s.states[e],t.options.states&&t.options.states[e]||{}),e=t.brightness,h=t.color||void 0!==e&&i(h).brighten(t.brightness).get()||h,l=t[n]||l,c=t[r]||c,o=t.dashStyle||o),n={fill:h,stroke:l,"stroke-width":c},o&&(n.dashstyle=o),n},drawPoints:function(){var t,e=this,i=this.chart,s=e.options,o=i.renderer,h=s.animationLimit||250;n(e.points,function(n){var l=n.graphic,c=l&&i.pointCount\u25cf