b.max&&(b.max=c);if(0u&&(u=1/u);b.minDiff>u&&1!==u&&(b.minDiff=u)}else u=c-r.dataPoints[p-1].x,0>u&&(u*=-1),b.minDiff>u&&0!==u&&(b.minDiff=u);y(e)||null===r.dataPoints[p-1].y||(a.axisY.logarithmic?0u&&(u=1/u),f.minDiff>u&&1!==u&&(f.minDiff=u)):(u=e-r.dataPoints[p-1].y,0>u&&(u*=-1),f.minDiff>u&&0!==u&&(f.minDiff=u)))}if(cD&&!d)d=!0;else if(c>D&&d)continue;r.dataPoints[p].label&&(a.axisX.labels[c]=r.dataPoints[p].label);
+cb.viewPortMax&&(b.viewPortMax=c);null===e?b.viewPortMin===c&&we&&(l=!0),t[c]=t[c]?t[c]+Math.abs(e):Math.abs(e))}}r.axisX.valueType=r.xValueType=g?"dateTime":"number"}a.axisY.logarithmic?(f.max=y(f.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(f.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),f.min=y(f.viewPortMin)?1:Math.min(f.viewPortMin,1)):h&&!l?(f.max=y(f.viewPortMax)?
+99:Math.max(f.viewPortMax,99),f.min=y(f.viewPortMin)?1:Math.min(f.viewPortMin,1)):h&&l?(f.max=y(f.viewPortMax)?99:Math.max(f.viewPortMax,99),f.min=y(f.viewPortMin)?-99:Math.min(f.viewPortMin,-99)):!h&&l&&(f.max=y(f.viewPortMax)?-1:Math.max(f.viewPortMax,-1),f.min=y(f.viewPortMin)?-99:Math.min(f.viewPortMin,-99));f.viewPortMin=f.min;f.viewPortMax=f.max;a.dataPointYSums=t}};q.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var f=a.axisY.dataInfo,
+b=a.axisX.dataInfo,c,e,g,h,l=!1,t=0;tb.max&&(b.max=c);gf.max&&(f.max=h);0w&&(w=1/w),b.minDiff>w&&1!==w&&(b.minDiff=w)):(w=c-k.dataPoints[r-1].x,0>w&&(w*=-1),b.minDiff>w&&0!==w&&(b.minDiff=w)),e&&(null!==e[0]&&k.dataPoints[r-1].y&&null!==k.dataPoints[r-1].y[0])&&(a.axisY.logarithmic?(w=e[0]/
+k.dataPoints[r-1].y[0],1>w&&(w=1/w),f.minDiff>w&&1!==w&&(f.minDiff=w)):(w=e[0]-k.dataPoints[r-1].y[0],0>w&&(w*=-1),f.minDiff>w&&0!==w&&(f.minDiff=w))));if(!(cu&&!n)n=!0;else if(c>u&&n)continue;k.dataPoints[r].label&&(a.axisX.labels[c]=k.dataPoints[r].label);cb.viewPortMax&&(b.viewPortMax=c);if(b.viewPortMin===c&&e)for(v=0;vf.viewPortMax&&(f.viewPortMax=h))}}k.axisX.valueType=k.xValueType=l?"dateTime":"number"}};q.prototype._processSpecificPlotUnit=function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var f=a.axisY.dataInfo,b=a.axisX.dataInfo,c,e,g=!1,h=0;hb.max&&(b.max=c),l.dataPointEOs[t].cumulativeSumf.max&&(f.max=l.dataPointEOs[t].cumulativeSum),0p&&(p=1/p),b.minDiff>p&&1!==p&&(b.minDiff=p)):(p=c-l.dataPoints[t-1].x,0>p&&(p*=-1),b.minDiff>p&&0!==p&&(b.minDiff=p)),null!==e&&null!==l.dataPoints[t-
+1].y&&(a.axisY.logarithmic?(e=l.dataPointEOs[t].cumulativeSum/l.dataPointEOs[t-1].cumulativeSum,1>e&&(e=1/e),f.minDiff>e&&1!==e&&(f.minDiff=e)):(e=l.dataPointEOs[t].cumulativeSum-l.dataPointEOs[t-1].cumulativeSum,0>e&&(e*=-1),f.minDiff>e&&0!==e&&(f.minDiff=e)))),!(cd&&!r)r=!0;else if(c>d&&r)continue;l.dataPoints[t].label&&(a.axisX.labels[c]=l.dataPoints[t].label);cb.viewPortMax&&(b.viewPortMax=c);0f.viewPortMax&&(f.viewPortMax=l.dataPointEOs[t-1].cumulativeSum));l.dataPointEOs[t].cumulativeSumf.viewPortMax&&(f.viewPortMax=l.dataPointEOs[t].cumulativeSum)}l.axisX.valueType=l.xValueType=g?"dateTime":"number"}};q.prototype.calculateAutoBreaks=function(){function a(a,c,b,e){if(e)return b=
+Math.pow(Math.min(b*a/c,c/a),0.2),1>=b&&(b=Math.pow(1>a?1/a:Math.min(c/a,a),0.25)),{startValue:a*b,endValue:c/b};b=0.2*Math.min(b-c+a,c-a);0>=b&&(b=0.25*Math.min(c-a,Math.abs(a)));return{startValue:a+b,endValue:c-b}}function f(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var c=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,b=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(c||
+b)for(var f=a.axisY.dataInfo,g=a.axisX.dataInfo,k,h=g.min,n=g.max,l=f.min,t=f.max,g=g._dataRanges,f=f._dataRanges,p,r=0,m=0;mv.dataPoints.length))for(r=0;rg[p].max&&(g[p].max=k)),b){var q=
+(t+1-l)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((k="waterfall"===a.type?v.dataPointEOs[r].cumulativeSum:v.dataPoints[r].y)&&k.length)for(var s=0;sf[p].max&&(f[p].max=k[s]);else y(k)||(p=Math.floor((k-l)/q),kf[p].max&&(f[p].max=k))}}}}function b(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)&&a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=
+a.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var c=a.axisX.dataInfo,b=c.min,f=c.max,g=c._dataRanges,k,h=0,n=0;nl.dataPoints.length))for(h=0;hg[k].max&&(g[k].max=c)}}for(var c,e=this,g=!1,h=0;h<
+this._axes.length;h++)if(this._axes[h].scaleBreaks&&this._axes[h].scaleBreaks.autoCalculate&&1<=this._axes[h].scaleBreaks.maxNumberOfAutoBreaks){g=!0;this._axes[h].dataInfo._dataRanges=[];for(var l=0;l<100/Math.max(parseFloat(this._axes[h].scaleBreaks.collapsibleThreshold)||10,10);l++)this._axes[h].dataInfo._dataRanges.push({min:Infinity,max:-Infinity})}if(g){for(h=0;hr[index].max&&(r[index].max=p)));delete this._axes[h].dataInfo.dataPointYPositiveSums}if(this._axes[h].dataInfo.dataPointYNegativeSums){n=
+this._axes[h].dataInfo.dataPointYNegativeSums;r=k;for(l in n)n.hasOwnProperty(l)&&!isNaN(l)&&(p=-1*n[l],y(p)||(index=Math.floor((p-t)/c),pr[index].max&&(r[index].max=p)));delete this._axes[h].dataInfo.dataPointYNegativeSums}for(l=0;lc&&g.push({diff:p,start:r,end:t});break}else l++;if(this._axes[h].scaleBreaks.customBreaks)for(l=0;l=e.x1&&(a<=e.x2&&f>=e.y1&&f<=e.y2)&&(c=e.id)}return c};q.prototype.getAutoFontSize=function(a,f,b){f=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=f?12:10,Math.round(f*(a/400)))};q.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};q.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))};
+q.prototype.attachEvent=function(a){this._events.push(a)};q.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var f=[],b=a.changedTouches,c=b?b[0]:a,e=null;switch(a.type){case "touchstart":case "MSPointerDown":f=["mousemove","mousedown"];this._lastTouchData=Oa(c);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":f=["mousemove"];break;case "touchend":case "MSPointerUp":var g=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:
+0,f="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>g?["mouseup","click"]:["mouseup"];break;default:return}if(!(b&&1g)){this._lastTouchData.scroll=!0;var l=window.parent||window;l&&l.scrollBy&&l.scrollBy(0,-h)}}catch(t){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&
+this.resetOverlayedCanvas(),this.isDrag=!1;else for(b=0;b=e.x1&&f.x<=e.x2&&f.y>=e.y1&&f.y<=e.y2){c[b].call(c.context,
+f.x,f.y);"mousedown"===b&&!0===c.capture?(q.capturedEventParam=c,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===b&&(c.chart.overlaidCanvas.releaseCapture?c.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else c=null;a.target.style.cursor=c&&c.cursor?c.cursor:this._defaultCursor}b=this.plotArea;if(f.x
+b.x2||f.yb.y2)this.toolTip&&this.toolTip.enabled?this.toolTip.hide():this.resetOverlayedCanvas();this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}};q.prototype._plotAreaMouseDown=function(a,f){this.isDrag=!0;this.dragStartPoint={x:a,y:f}};q.prototype._plotAreaMouseUp=function(a,f){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var b=f-this.dragStartPoint.y,c=a-this.dragStartPoint.x,e=0<=this.zoomType.indexOf("x"),
+g=0<=this.zoomType.indexOf("y"),h=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var l=g,g=e,e=l;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(e=g=0;eb.maximum&&(g=b.viewportMaximum/b.maximum,b.sessionVariables.newViewportMinimum=
+b.viewportMinimum/g,b.sessionVariables.newViewportMaximum=b.viewportMaximum/g,h=!0):b.viewportMinimumb.maximum&&(g=b.viewportMaximum-b.maximum,b.sessionVariables.newViewportMinimum=b.viewportMinimum-g,b.sessionVariables.newViewportMaximum=b.viewportMaximum-g,h=!0);else if((!e||2Math.abs(b)&&(this.panEnabled||this.zoomEnabled)?this.toolTip.hide():this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(a,f);if((!e||2d)var w=d,d=n,n=w;if(p.scaleBreaks)for(w=0;!g&&w=d;if(isFinite(p.dataInfo.minDiff))if(w=p.getApparentDifference(n,d,null,!0),!(g||!(this.panEnabled&&p.scaleBreaks&&p.scaleBreaks._appliedBreaks.length)&&
+(p.logarithmic&&wp.maximum))t.push(p),r.push({val1:n,val2:d}),l=!0;else if(!e){l=!1;break}}return{isValid:l,axesWithValidRange:t,axesRanges:r}};q.prototype.preparePlotArea=function(){var a=this.plotArea;!v&&(0b.lineCoordinates.x2?f.x2:b.lineCoordinates.x2;a.y2=f.y2>f.y1?f.y2:b.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0b.lineCoordinates.x2?
+f.x2:b.lineCoordinates.x2,a.y2=f.y2>f.y1?f.y2:b.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else f=this.layoutManager.getFreeSpace(),a.x1=f.x1,a.x2=f.x2,a.y1=f.y1,a.y2=f.y2,a.width=f.width,a.height=f.height;v||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0b.x2||k.point.yb.y2+1)continue}else if("rangearea"===r||"rangesplinearea"===r){if(k.dataPoint.xs.viewportMaximum||Math.max.apply(null,k.dataPoint.y)A.viewportMaximum)continue}else if(0<=r.indexOf("line")||
+0<=r.indexOf("area")||0<=r.indexOf("bubble")||0<=r.indexOf("scatter")){if(k.dataPoint.xs.viewportMaximum||k.dataPoint.yA.viewportMaximum)continue}else if(0<=r.indexOf("column")||"waterfall"===r||"error"===r&&!k.axisSwapped){if(k.dataPoint.xs.viewportMaximum||k.bounds.y1>b.y2||k.bounds.y2s.viewportMaximum||
+k.bounds.x1>b.x2||k.bounds.x2s.viewportMaximum||Math.max.apply(null,k.dataPoint.y)A.viewportMaximum)continue}else if(k.dataPoint.xs.viewportMaximum)continue;e=h=2;"horizontal"===Q?(l=d.width,t=d.height):(t=d.width,l=d.height);if("normal"===this.plotInfo.axisPlacement){if(0<=r.indexOf("line")||0<=r.indexOf("area"))u=
+"auto",h=4;else if(0<=r.indexOf("stacked"))"auto"===u&&(u="inside");else if("bubble"===r||"scatter"===r)u="inside";p=k.point.x-l/2;"inside"!==u?(e=b.y1,g=b.y2,0k.point.y)):(n=k.point.y+h+c,n>g-t-h-c&&(n="auto"===u?Math.min(k.point.y,g)-t-h-c:g-t-h-c,x=ng-t-h&&("bubble"===r||"scatter"===r)&&(n=Math.min(k.point.y+h,b.y2-t-h))),n=Math.min(n,g-t))}else 0<=r.indexOf("line")||0<=r.indexOf("area")||0<=r.indexOf("scatter")?(u="auto",e=4):0<=r.indexOf("stacked")?"auto"===u&&(u="inside"):"bubble"===r&&(u="inside"),n=k.point.y-t/2,"inside"!==u?(h=b.x1,g=b.x2,
+0>q?(p=k.point.x-l-e-c,pk.point.x)):(p=k.point.x+e+c,p>g-l-e-c&&(p="auto"===u?Math.min(k.point.x,g)-l-e-c:g-l-e-c,x=pq?Math.max(k.bounds.x1,b.x1)+l/2+e:Math.min(k.bounds.x2,b.x2)-l/2-e:(Math.max(k.bounds.x1,b.x1)+Math.min(k.bounds.x2,b.x2))/2,p=0>q?Math.max(k.point.x,c)-l/2:Math.min(k.point.x,c)-l/2,p=Math.max(p,h));"vertical"===Q&&(n+=
+t);d.x=p;d.y=n;d.render(!0);D&&("inside"!==u&&(0>r.indexOf("bar")&&("error"!==r||!k.axisSwapped)&&k.point.x>b.x1&&k.point.xr.indexOf("column")&&("error"!==r||k.axisSwapped)&&k.point.y>b.y1&&k.point.y=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var e=this.plotArea;b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();for(var g=[],h,l=0;la.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!q)))if("number"!==typeof r[u].y)0<
+u&&!(k.connectNullData||q||D)&&(b.stroke(),v&&c.stroke()),q=!0;else{Q=a.axisX.convertValueToPixel(Q);H=a.axisY.convertValueToPixel(r[u].y);var s=k.dataPointIds[u];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:u,x1:Q,y1:H};D||q?(!D&&k.connectNullData?(b.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(b.stroke(),b.beginPath(),b.moveTo(h.x,h.y),p=k.nullDataLineDashType,b.setLineDash(n)),b.lineTo(Q,
+H),v&&c.lineTo(Q,H)):(b.beginPath(),b.moveTo(Q,H),v&&(c.beginPath(),c.moveTo(Q,H))),q=D=!1):(b.lineTo(Q,H),v&&c.lineTo(Q,H),0==u%500&&(b.stroke(),b.beginPath(),b.moveTo(Q,H),v&&(c.stroke(),c.beginPath(),c.moveTo(Q,H))));h={x:Q,y:H};ur[u].y===a.axisY.reversed?1:-1,color:w})}b.stroke();v&&c.stroke()}}$.drawMarkers(g);v&&(f.drawImage(this._preRenderCanvas,0,
+0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),c.beginPath());b.restore();b.beginPath();return{source:f,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,
+animationBase:0}}};q.prototype.renderStepLine=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var e=this.plotArea;b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();for(var g=[],h,l=0;la.axisX.dataInfo.viewPortMax&&
+(!k.connectNullData||!q)))if("number"!==typeof r[u].y)0
+r[u].y===a.axisY.reversed?1:-1,color:w})}b.stroke();v&&c.stroke()}}$.drawMarkers(g);v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),c.beginPath());
+b.restore();b.beginPath();return{source:f,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};q.prototype.renderSpline=function(a){function f(a){a=x(a,2);if(0=a.dataSeriesIndexes.length)){var e=
+this._eventManager.ghostCtx;c.save();var g=this.plotArea;c.beginPath();c.rect(g.x1,g.y1,g.width,g.height);c.clip();for(var h=[],l=0;la.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!Q)))if("number"!==typeof r[D].y)0r[D].y===a.axisY.reversed?1:-1,color:w});Q=!1}f(H)}$.drawMarkers(h);
+v&&(b.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(g.x1,g.y1,g.width,g.height),e.beginPath());c.restore();c.beginPath();return{source:b,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,
+easingFunction:O.easing.linear,animationBase:0}}};var X=function(a,f,b,c,e,g,h,l,t,k,r,p,n){"undefined"===typeof n&&(n=1);h=h||0;l=l||"black";var d=15=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=0,h,l,t,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*
+this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>r&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&r<
+g)&&(r=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));pr&&(p=r);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(r=0;ra.axisX.dataInfo.viewPortMax)&&"number"===typeof w[g].y){h=a.axisX.convertValueToPixel(t);l=a.axisY.convertValueToPixel(w[g].y);h=a.axisX.reversed?h+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+r)*p<<0:h-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+r)*p<<0;var D=a.axisX.reversed?h-p<<0:h+p<<0,u;0<=w[g].y?u=k:(u=l,l=k);l>u&&(c=l,l=u,u=c);c=w[g].color?w[g].color:d._colorSet[g%d._colorSet.length];
+X(b,h,l,D,u,c,0,null,m&&0<=w[g].y,0>w[g].y&&m,!1,!1,d.fillOpacity);c=d.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,x1:h,y1:l,x2:D,y2:u};c=R(c);v&&X(this._eventManager.ghostCtx,h,l,D,u,c,0,null,!1,!1,!1,!1);(w[g].indexLabel||d.indexLabel||w[g].indexLabelFormatter||d.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:w[g],dataSeries:d,point:{x:h+(D-h)/2,y:0>w[g].y===a.axisY.reversed?l:u},direction:0>w[g].y===
+a.axisY.reversed?1:-1,bounds:{x1:h,y1:Math.min(l,u),x2:D,y2:Math.max(l,u)},color:c})}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
+b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:ka.axisY.bounds.y2?a.axisY.bounds.y2:k}}};q.prototype.renderStackedColumn=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=[],h=[],l=[],t=[],k=0,r,p,n=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=
+this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var d=a.axisX.dataInfo.minDiff;isFinite(d)||(d=0.3*Math.abs(a.axisX.range));d=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(d)/Math.log(a.axisX.range):Math.abs(d)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
+k>r&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&rr&&(d=r);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;wa.axisX.dataInfo.viewPortMax)&&"number"===typeof u[k].y){r=a.axisX.convertValueToPixel(c);var H=r-a.plotType.plotUnits.length*d/2+a.index*d<<0,s=H+d<<0,q;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=u[k].y)t[c]=u[k].y+(t[c]?t[c]:0),q=a.axisY.convertValueToPixel(t[c]),p="undefined"!==typeof h[c]?h[c]:n,h[c]=q;else if(p=a.axisY.convertValueToPixel(u[k].y),0<=u[k].y){var y="undefined"!==typeof g[c]?g[c]:0;p-=y;q=n-y;g[c]=y+(q-p)}else y=h[c]?h[c]:0,q=p+y,p=n+y,h[c]=y+(q-p);c=u[k].color?u[k].color:D._colorSet[k%D._colorSet.length];
+X(b,H,p,s,q,c,0,null,Q&&0<=u[k].y,0>u[k].y&&Q,!1,!1,D.fillOpacity);c=D.dataPointIds[k];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:k,x1:H,y1:p,x2:s,y2:q};c=R(c);v&&X(this._eventManager.ghostCtx,H,p,s,q,c,0,null,!1,!1,!1,!1);(u[k].indexLabel||D.indexLabel||u[k].indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:u[k],dataSeries:D,point:{x:r,y:0<=u[k].y?p:q},direction:0>u[k].y===a.axisY.reversed?1:
+-1,bounds:{x1:H,y1:Math.min(p,q),x2:s,y2:Math.max(p,q)},color:c})}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
+b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:na.axisY.bounds.y2?a.axisY.bounds.y2:n}}};q.prototype.renderStackedColumn100=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=[],h=[],l=[],t=[],k=0,r,p,n=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),
+k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var d=a.axisX.dataInfo.minDiff;isFinite(d)||(d=0.3*Math.abs(a.axisX.range));d=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(d)/Math.log(a.axisX.range):Math.abs(d)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
+k>r&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&rr&&(d=r);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;wa.axisX.dataInfo.viewPortMax)&&"number"===typeof u[k].y){r=a.axisX.convertValueToPixel(c);p=0!==a.dataPointYSums[c]?100*(u[k].y/a.dataPointYSums[c]):0;var q=r-a.plotType.plotUnits.length*d/2+a.index*d<<0,s=q+d<<0,y;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=l[c])continue;p=a.axisY.convertValueToPixel(l[c]);y=g[c]?g[c]:n;g[c]=p}else if(a.axisY.scaleBreaks&&0=u[k].y)t[c]=p+("undefined"!==typeof t[c]?t[c]:0),y=a.axisY.convertValueToPixel(t[c]),p=h[c]?h[c]:n,h[c]=y;else if(p=a.axisY.convertValueToPixel(p),0<=u[k].y){var A="undefined"!==typeof g[c]?g[c]:0;p-=A;y=n-A;a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.y1-p)&&(p=e.y1);g[c]=A+(y-p)}else A="undefined"!==
+typeof h[c]?h[c]:0,y=p+A,p=n+A,a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.y2-y)&&(y=e.y2),h[c]=A+(y-p);c=u[k].color?u[k].color:D._colorSet[k%D._colorSet.length];X(b,q,p,s,y,c,0,null,Q&&0<=u[k].y,0>u[k].y&&Q,!1,!1,D.fillOpacity);c=D.dataPointIds[k];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:k,x1:q,y1:p,x2:s,y2:y};c=R(c);v&&X(this._eventManager.ghostCtx,q,p,s,y,c,0,null,!1,!1,!1,!1);(u[k].indexLabel||D.indexLabel||u[k].indexLabelFormatter||D.indexLabelFormatter)&&
+this._indexLabels.push({chartType:"stackedColumn100",dataPoint:u[k],dataSeries:D,point:{x:r,y:0<=u[k].y?p:y},direction:0>u[k].y===a.axisY.reversed?1:-1,bounds:{x1:q,y1:Math.min(p,y),x2:s,y2:Math.max(p,y)},color:c})}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
+this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:na.axisY.bounds.y2?a.axisY.bounds.y2:n}}};q.prototype.renderBar=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=
+null,e=this.plotArea,g=0,h,l,t,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.options.dataPointWidth?
+this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>r&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&rr&&(p=r);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);
+b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(r=0;ra.axisX.dataInfo.viewPortMax)&&"number"===typeof w[g].y){l=a.axisX.convertValueToPixel(t);
+h=a.axisY.convertValueToPixel(w[g].y);l=a.axisX.reversed?l+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+r)*p<<0:l-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+r)*p<<0;var D=a.axisX.reversed?l-p<<0:l+p<<0,u;0<=w[g].y?u=k:(u=h,h=k);c=w[g].color?w[g].color:d._colorSet[g%d._colorSet.length];X(b,u,l,h,D,c,0,null,m,!1,!1,!1,d.fillOpacity);c=d.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,x1:u,y1:l,x2:h,y2:D};c=R(c);
+v&&X(this._eventManager.ghostCtx,u,l,h,D,c,0,null,!1,!1,!1,!1);(w[g].indexLabel||d.indexLabel||w[g].indexLabelFormatter||d.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:w[g],dataSeries:d,point:{x:0<=w[g].y?h:u,y:l+(D-l)/2},direction:0>w[g].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(u,h),y1:l,x2:Math.max(u,h),y2:D},color:c})}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,
+0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.xScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:ka.axisY.bounds.x2?a.axisY.bounds.x2:
+k}}};q.prototype.renderStackedBar=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=[],h=[],l=[],t=[],k=0,r,p,n=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<
+0;var d=a.axisX.dataInfo.minDiff;isFinite(d)||(d=0.3*Math.abs(a.axisX.range));d=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(d)/Math.log(a.axisX.range):Math.abs(d)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>p&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&pp&&(d=p);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;wa.axisX.dataInfo.viewPortMax)&&"number"===typeof u[k].y){p=a.axisX.convertValueToPixel(c);var s=p-a.plotType.plotUnits.length*d/2+a.index*d<<0,y=s+d<<0,B;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=u[k].y)t[c]=u[k].y+(t[c]?t[c]:0),r=h[c]?
+h[c]:n,h[c]=B=a.axisY.convertValueToPixel(t[c]);else if(r=a.axisY.convertValueToPixel(u[k].y),0<=u[k].y){var A=g[c]?g[c]:0;B=n+A;r+=A;g[c]=A+(r-B)}else A=h[c]?h[c]:0,B=r-A,r=n-A,h[c]=A+(r-B);c=u[k].color?u[k].color:D._colorSet[k%D._colorSet.length];X(b,B,s,r,y,c,0,null,q,!1,!1,!1,D.fillOpacity);c=D.dataPointIds[k];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:k,x1:B,y1:s,x2:r,y2:y};c=R(c);v&&X(this._eventManager.ghostCtx,B,s,r,y,c,0,null,!1,!1,!1,!1);
+(u[k].indexLabel||D.indexLabel||u[k].indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:u[k],dataSeries:D,point:{x:0<=u[k].y?r:B,y:p},direction:0>u[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(B,r),y1:s,x2:Math.max(B,r),y2:y},color:c})}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,
+0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.xScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:na.axisY.bounds.x2?a.axisY.bounds.x2:n}}};q.prototype.renderStackedBar100=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,
+b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=[],h=[],l=[],t=[],k=0,r,p,n=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0;var d=a.axisX.dataInfo.minDiff;isFinite(d)||(d=0.3*Math.abs(a.axisX.range));d=
+this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(d)/Math.log(a.axisX.range):Math.abs(d)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>p&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&pp&&(d=p);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();
+b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;wa.axisX.dataInfo.viewPortMax)&&"number"===
+typeof u[k].y){p=a.axisX.convertValueToPixel(c);var s;s=0!==a.dataPointYSums[c]?100*(u[k].y/a.dataPointYSums[c]):0;var y=p-a.plotType.plotUnits.length*d/2+a.index*d<<0,B=y+d<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=l[c])continue;s=g[c]?g[c]:n;g[c]=r=a.axisY.convertValueToPixel(l[c])}else if(a.axisY.scaleBreaks&&0=u[k].y)t[c]=s+(t[c]?t[c]:0),r=h[c]?h[c]:n,h[c]=s=a.axisY.convertValueToPixel(t[c]);
+else if(r=a.axisY.convertValueToPixel(s),0<=u[k].y){var A=g[c]?g[c]:0;s=n+A;r+=A;a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.x2-r)&&(r=e.x2);g[c]=A+(r-s)}else A=h[c]?h[c]:0,s=r-A,r=n-A,a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.x1-s)&&(s=e.x1),h[c]=A+(r-s);c=u[k].color?u[k].color:D._colorSet[k%D._colorSet.length];X(b,s,y,r,B,c,0,null,q,!1,!1,!1,D.fillOpacity);c=D.dataPointIds[k];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:k,x1:s,y1:y,x2:r,
+y2:B};c=R(c);v&&X(this._eventManager.ghostCtx,s,y,r,B,c,0,null,!1,!1,!1,!1);(u[k].indexLabel||D.indexLabel||u[k].indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:u[k],dataSeries:D,point:{x:0<=u[k].y?r:s,y:p},direction:0>u[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,r),y1:y,x2:Math.max(s,r),y2:B},color:c})}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,
+0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.xScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:na.axisY.bounds.x2?a.axisY.bounds.x2:
+n}}};q.prototype.renderArea=function(a){var f,b;function c(){A&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?B=y:0>a.axisY.viewportMaximum?B=t.y1:0=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,l=a.axisX.lineCoordinates,t=a.axisY.lineCoordinates,k=[],r=this.plotArea,p;g.save();v&&h.save();g.beginPath();g.rect(r.x1,r.y1,r.width,r.height);g.clip();v&&(h.beginPath(),h.rect(r.x1,r.y1,r.width,r.height),h.clip());for(var n=0;na.axisX.dataInfo.viewPortMax&&(!w.connectNullData||!ca)))if("number"!==typeof m[D].y)w.connectNullData||(ca||f)||c(),ca=!0;else{u=a.axisX.convertValueToPixel(q);s=a.axisY.convertValueToPixel(m[D].y);f||ca?(!f&&w.connectNullData?(g.setLineDash&&(w.options.nullDataLineDashType||b===w.lineDashType&&w.lineDashType!==w.nullDataLineDashType)&&(f=u,b=s,u=p.x,s=p.y,c(),g.moveTo(p.x,p.y),u=f,s=b,A=p,b=w.nullDataLineDashType,g.setLineDash(K)),g.lineTo(u,s),v&&h.lineTo(u,s)):
+(g.beginPath(),g.moveTo(u,s),v&&(h.beginPath(),h.moveTo(u,s)),A={x:u,y:s}),ca=f=!1):(g.lineTo(u,s),v&&h.lineTo(u,s),0==D%250&&c());p={x:u,y:s};Dm[D].y===a.axisY.reversed?1:-1,color:x})}c();$.drawMarkers(k)}}v&&(e.drawImage(this._preRenderCanvas,
+0,0,this.width,this.height),g.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.restore());g.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,
+animationBase:0}}};q.prototype.renderSplineArea=function(a){function f(){var b=x(q,2);if(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?
+u=D:0>a.axisY.viewportMaximum?u=h.y1:0=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,g=a.axisX.lineCoordinates,h=a.axisY.lineCoordinates,l=[],t=this.plotArea;c.save();v&&
+e.save();c.beginPath();c.rect(t.x1,t.y1,t.width,t.height);c.clip();v&&(e.beginPath(),e.rect(t.x1,t.y1,t.width,t.height),e.clip());for(var k=0;ka.axisX.dataInfo.viewPortMax&&(!p.connectNullData||!m)))if("number"!==typeof n[d].y)0n[d].y===a.axisY.reversed?1:-1,color:y});m=!1}f();$.drawMarkers(l)}}v&&(b.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(t.x1,t.y1,t.width,t.height),
+this._eventManager.ghostCtx.restore());c.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};q.prototype.renderStepArea=function(a){var f,b;function c(){A&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?B=y:0>a.axisY.viewportMaximum?B=t.y1:0=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,l=a.axisX.lineCoordinates,t=a.axisY.lineCoordinates,k=[],r=this.plotArea,p;g.save();v&&h.save();g.beginPath();g.rect(r.x1,r.y1,r.width,r.height);g.clip();v&&(h.beginPath(),h.rect(r.x1,r.y1,r.width,r.height),h.clip());for(var n=0;na.axisX.dataInfo.viewPortMax&&(!w.connectNullData||!b))){var aa=s;"number"!==typeof m[D].y?(w.connectNullData||(b||f)||c(),b=!0):(u=a.axisX.convertValueToPixel(q),s=a.axisY.convertValueToPixel(m[D].y),f||b?(!f&&w.connectNullData?(g.setLineDash&&(w.options.nullDataLineDashType||K===w.lineDashType&&w.lineDashType!==w.nullDataLineDashType)&&(f=
+u,b=s,u=p.x,s=p.y,c(),g.moveTo(p.x,p.y),u=f,s=b,A=p,K=w.nullDataLineDashType,g.setLineDash(da)),g.lineTo(u,aa),g.lineTo(u,s),v&&(h.lineTo(u,aa),h.lineTo(u,s))):(g.beginPath(),g.moveTo(u,s),v&&(h.beginPath(),h.moveTo(u,s)),A={x:u,y:s}),b=f=!1):(g.lineTo(u,aa),v&&h.lineTo(u,aa),g.lineTo(u,s),v&&h.lineTo(u,s),0==D%250&&c()),p={x:u,y:s},Dm[D].y===a.axisY.reversed?1:-1,color:x}))}c();$.drawMarkers(k)}}v&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
+0,0,this.width,this.height),g.clearRect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.restore());g.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};q.prototype.renderStackedArea=function(a){function f(){if(!(1>t.length)){for(0=a.dataSeriesIndexes.length)){var e=null,g=[],h=this.plotArea,l=[],t=[],k=[],r=[],p=0,n,d,w,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),D=this._eventManager.ghostCtx,u,s,q;v&&D.beginPath();c.save();v&&D.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();v&&(D.beginPath(),D.rect(h.x1,h.y1,h.width,h.height),D.clip());for(var e=[],y=0;ya.axisX.dataInfo.viewPortMax&&(!A.connectNullData||!ca)))if("number"!==typeof aa.y)A.connectNullData||(ca||s)||f(),ca=!0;else{n=a.axisX.convertValueToPixel(w);var wa=
+l[w]?l[w]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=r[w]&&a.axisY.logarithmic)continue;d=a.axisY.convertValueToPixel(r[w])}else d=a.axisY.convertValueToPixel(aa.y),d-=wa;t.push({x:n,y:m-wa});l[w]=m-d;s||ca?(!s&&A.connectNullData?(c.setLineDash&&(A.options.nullDataLineDashType||q===A.lineDashType&&A.lineDashType!==A.nullDataLineDashType)&&(s=t.pop(),q=t[t.length-1],f(),c.moveTo(u.x,u.y),t.push(q),t.push(s),q=A.nullDataLineDashType,
+c.setLineDash(K)),c.lineTo(n,d),v&&D.lineTo(n,d)):(c.beginPath(),c.moveTo(n,d),v&&(D.beginPath(),D.moveTo(n,d))),ca=s=!1):(c.lineTo(n,d),v&&D.lineTo(n,d),0==p%250&&(f(),c.moveTo(n,d),v&&D.moveTo(n,d),t.push({x:n,y:m-wa})));u={x:n,y:d};px[p].y===a.axisY.reversed?1:-1,color:e})}}f();c.moveTo(n,d);v&&D.moveTo(n,d)}delete A.dataPointIndexes}$.drawMarkers(g);v&&(b.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
+c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),D.restore());c.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};q.prototype.renderStackedArea100=function(a){function f(){for(0=a.dataSeriesIndexes.length)){var e=null,g=this.plotArea,h=[],l=[],t=[],k=[],r=[],p=0,n,d,w,m,s,u,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),y=this._eventManager.ghostCtx;c.save();v&&y.save();c.beginPath();c.rect(g.x1,g.y1,g.width,g.height);c.clip();v&&(y.beginPath(),
+y.rect(g.x1,g.y1,g.width,g.height),y.clip());for(var e=[],x=0;xa.axisX.dataInfo.viewPortMax&&(!A.connectNullData||
+!ca)))if("number"!==typeof aa.y)A.connectNullData||(ca||s)||f(),ca=!0;else{var wa;wa=0!==a.dataPointYSums[w]?100*(aa.y/a.dataPointYSums[w]):0;n=a.axisX.convertValueToPixel(w);var ma=l[w]?l[w]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=r[w]&&a.axisY.logarithmic)continue;d=a.axisY.convertValueToPixel(r[w])}else d=a.axisY.convertValueToPixel(wa),d-=ma;t.push({x:n,y:q-ma});l[w]=q-d;s||ca?(!s&&A.connectNullData?(c.setLineDash&&
+(A.options.nullDataLineDashType||u===A.lineDashType&&A.lineDashType!==A.nullDataLineDashType)&&(s=t.pop(),u=t[t.length-1],f(),c.moveTo(m.x,m.y),t.push(u),t.push(s),u=A.nullDataLineDashType,c.setLineDash(K)),c.lineTo(n,d),v&&y.lineTo(n,d)):(c.beginPath(),c.moveTo(n,d),v&&(y.beginPath(),y.moveTo(n,d))),ca=s=!1):(c.lineTo(n,d),v&&y.lineTo(n,d),0==p%250&&(f(),c.moveTo(n,d),v&&y.moveTo(n,d),t.push({x:n,y:q-ma})));m={x:n,y:d};pz[p].y===a.axisY.reversed?1:-1,color:e})}}f();c.moveTo(n,d);v&&y.moveTo(n,d)}delete A.dataPointIndexes}$.drawMarkers(h);v&&(b.drawImage(this._preRenderCanvas,
+0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(g.x1,g.y1,g.width,g.height),y.restore());c.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,
+animationBase:0}}};q.prototype.renderBubble=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=this.plotArea,e=0,g,h;b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(c.x1,c.y1,c.width,c.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(var l=-Infinity,t=Infinity,k=0;ka.axisX.dataInfo.viewPortMax||"undefined"===typeof n[e].z||(d=n[e].z,d>l&&(l=d),da.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){g=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(n[e].y);var d=n[e].z,s=2*Math.max(Math.sqrt((l===t?m/2:w+(m-w)/(l-t)*(d-t))/Math.PI)<<0,1),d=p.getMarkerProperties(e,b);d.size=s;b.globalAlpha=p.fillOpacity;$.drawMarker(g,h,b,d.type,d.size,d.color,d.borderColor,d.borderThickness);b.globalAlpha=1;var u=p.dataPointIds[e];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",
+dataSeriesIndex:r,dataPointIndex:e,x1:g,y1:h,size:s};s=R(u);v&&$.drawMarker(g,h,this._eventManager.ghostCtx,d.type,d.size,s,s,d.borderThickness);(n[e].indexLabel||p.indexLabel||n[e].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:n[e],dataSeries:p,point:{x:g,y:h},direction:1,bounds:{x1:g-d.size/2,y1:h-d.size/2,x2:g+d.size/2,y2:h+d.size/2},color:null})}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",
+a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};q.prototype.renderScatter=
+function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var c=this.plotArea,e=0,g,h;b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(c.x1,c.y1,c.width,c.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.clip());for(var l=0;la.axisX.dataInfo.viewPortMax)&&"number"===typeof r[e].y){g=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(r[e].y);var d=k.getMarkerProperties(e,g,h,b);b.globalAlpha=k.fillOpacity;$.drawMarker(d.x,d.y,d.ctx,d.type,d.size,d.color,d.borderColor,d.borderThickness);b.globalAlpha=1;Math.sqrt((p-
+g)*(p-g)+(n-h)*(n-h))Math.min(this.plotArea.width,this.plotArea.height)||(p=k.dataPointIds[e],this._eventManager.objectMap[p]={id:p,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:e,x1:g,y1:h},p=R(p),v&&$.drawMarker(d.x,d.y,this._eventManager.ghostCtx,d.type,d.size,p,p,d.borderThickness),(r[e].indexLabel||k.indexLabel||r[e].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:r[e],dataSeries:k,point:{x:g,y:h},direction:1,
+bounds:{x1:g-d.size/2,y1:h-d.size/2,x2:g+d.size/2,y2:h+d.size/2},color:null}),p=g,n=h)}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(c.x1,c.y1,c.width,c.height),this._eventManager.ghostCtx.restore());
+b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};q.prototype.renderCandlestick=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f,c=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,g=null,h=this.plotArea,l=0,t,k,r,p,n,d,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,g=this.options.dataPointMaxWidth?
+this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,w=a.axisX.dataInfo.minDiff;isFinite(w)||(w=0.3*Math.abs(a.axisX.range));w=this.options.dataPointWidth?this.dataPointWidth:0.7*h.width*(a.axisX.logarithmic?Math.log(w)/Math.log(a.axisX.range):Math.abs(w)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>g&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&gg&&(w=g);b.save();v&&c.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();v&&(c.beginPath(),c.rect(h.x1,h.y1,h.width,h.height),c.clip());for(var m=0;ma.axisX.dataInfo.viewPortMax)&&!y(q[l].y)&&q[l].y.length&&
+"number"===typeof q[l].y[0]&&"number"===typeof q[l].y[1]&&"number"===typeof q[l].y[2]&&"number"===typeof q[l].y[3]){t=a.axisX.convertValueToPixel(d);k=a.axisY.convertValueToPixel(q[l].y[0]);r=a.axisY.convertValueToPixel(q[l].y[1]);p=a.axisY.convertValueToPixel(q[l].y[2]);n=a.axisY.convertValueToPixel(q[l].y[3]);var x=t-w/2<<0,B=x+w<<0,g=u.options.fallingColor?u.fallingColor:u._colorSet[0],e=q[l].color?q[l].color:u._colorSet[0],A=Math.round(Math.max(1,0.15*w)),z=0===A%2?0:0.5,C=u.dataPointIds[l];this._eventManager.objectMap[C]=
+{id:C,objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:l,x1:x,y1:k,x2:B,y2:r,x3:t,y3:p,x4:t,y4:n,borderThickness:A,color:e};b.strokeStyle=e;b.beginPath();b.lineWidth=A;c.lineWidth=Math.max(A,4);"candlestick"===u.type?(b.moveTo(t-z,r),b.lineTo(t-z,Math.min(k,n)),b.stroke(),b.moveTo(t-z,Math.max(k,n)),b.lineTo(t-z,p),b.stroke(),X(b,x,Math.min(k,n),B,Math.max(k,n),q[l].y[0]<=q[l].y[3]?u.risingColor:g,A,e,H,H,!1,!1,u.fillOpacity),v&&(e=R(C),c.strokeStyle=e,c.moveTo(t-z,r),c.lineTo(t-z,Math.min(k,
+n)),c.stroke(),c.moveTo(t-z,Math.max(k,n)),c.lineTo(t-z,p),c.stroke(),X(c,x,Math.min(k,n),B,Math.max(k,n),e,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(b.moveTo(t-z,r),b.lineTo(t-z,p),b.stroke(),b.beginPath(),b.moveTo(t,k),b.lineTo(x,k),b.stroke(),b.beginPath(),b.moveTo(t,n),b.lineTo(B,n),b.stroke(),v&&(e=R(C),c.strokeStyle=e,c.moveTo(t-z,r),c.lineTo(t-z,p),c.stroke(),c.beginPath(),c.moveTo(t,k),c.lineTo(x,k),c.stroke(),c.beginPath(),c.moveTo(t,n),c.lineTo(B,n),c.stroke()));(q[l].indexLabel||u.indexLabel||
+q[l].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:u.type,dataPoint:q[l],dataSeries:u,point:{x:x+(B-x)/2,y:a.axisY.reversed?p:r},direction:1,bounds:{x1:x,y1:Math.min(r,p),x2:B,y2:Math.max(r,p)},color:e})}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
+this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),c.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};q.prototype.renderBoxAndWhisker=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f,c=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,g=this.plotArea,
+h=0,l,t,k,r,p,n,d,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,w=a.axisX.dataInfo.minDiff;isFinite(w)||(w=0.3*Math.abs(a.axisX.range));w=this.options.dataPointWidth?this.dataPointWidth:0.7*g.width*(a.axisX.logarithmic?Math.log(w)/Math.log(a.axisX.range):Math.abs(w)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>
+h&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(w=h);b.save();v&&c.save();b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();v&&(c.beginPath(),c.rect(g.x1,g.y1,g.width,g.height),c.clip());for(var m=!1,m=!!a.axisY.reversed,s=0;sa.axisX.dataInfo.viewPortMax)&&!y(H[h].y)&&H[h].y.length&&"number"===typeof H[h].y[0]&&"number"===typeof H[h].y[1]&&"number"===typeof H[h].y[2]&&"number"===typeof H[h].y[3]&&"number"===typeof H[h].y[4]&&5===H[h].y.length){l=a.axisX.convertValueToPixel(d);t=a.axisY.convertValueToPixel(H[h].y[0]);k=a.axisY.convertValueToPixel(H[h].y[1]);r=a.axisY.convertValueToPixel(H[h].y[2]);
+p=a.axisY.convertValueToPixel(H[h].y[3]);n=a.axisY.convertValueToPixel(H[h].y[4]);var B=l-w/2<<0,A=l+w/2<<0,e=H[h].color?H[h].color:q._colorSet[0],z=Math.round(Math.max(1,0.15*w)),C=0===z%2?0:0.5,L=H[h].whiskerColor?H[h].whiskerColor:H[h].color?q.whiskerColor?q.whiskerColor:H[h].color:q.whiskerColor?q.whiskerColor:e,K="number"===typeof H[h].whiskerThickness?H[h].whiskerThickness:"number"===typeof q.options.whiskerThickness?q.whiskerThickness:z,da=H[h].whiskerDashType?H[h].whiskerDashType:q.whiskerDashType,
+ca=y(H[h].whiskerLength)?y(q.options.whiskerLength)?w:q.whiskerLength:H[h].whiskerLength,ca="number"===typeof ca?0>=ca?0:ca>=w?w:ca:"string"===typeof ca?parseInt(ca)*w/100>w?w:parseInt(ca)*w/100:w,aa=1===Math.round(K)%2?0.5:0,wa=H[h].stemColor?H[h].stemColor:H[h].color?q.stemColor?q.stemColor:H[h].color:q.stemColor?q.stemColor:e,ma="number"===typeof H[h].stemThickness?H[h].stemThickness:"number"===typeof q.options.stemThickness?q.stemThickness:z,E=1===Math.round(ma)%2?0.5:0,fb=H[h].stemDashType?H[h].stemDashType:
+q.stemDashType,I=H[h].lineColor?H[h].lineColor:H[h].color?q.lineColor?q.lineColor:H[h].color:q.lineColor?q.lineColor:e,J="number"===typeof H[h].lineThickness?H[h].lineThickness:"number"===typeof q.options.lineThickness?q.lineThickness:z,S=H[h].lineDashType?H[h].lineDashType:q.lineDashType,M=1===Math.round(J)%2?0.5:0,P=q.upperBoxColor,U=q.lowerBoxColor,ra=y(q.options.fillOpacity)?1:q.fillOpacity,N=q.dataPointIds[h];this._eventManager.objectMap[N]={id:N,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:h,
+x1:B,y1:t,x2:A,y2:k,x3:l,y3:r,x4:l,y4:p,y5:n,borderThickness:z,color:e,stemThickness:ma,stemColor:wa,whiskerThickness:K,whiskerLength:ca,whiskerColor:L,lineThickness:J,lineColor:I};b.save();0=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=0,h,l,t,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:
+1;h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;var k=a.axisX.dataInfo.minDiff;isFinite(k)||(k=0.3*Math.abs(a.axisX.range));k=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(k)/Math.log(a.axisX.range):Math.abs(k)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&
+(this.dataPointMinWidth&&hh&&(k=h);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var r=0;ra.axisX.dataInfo.viewPortMax)&&!y(d[g].y)&&d[g].y.length&&"number"===typeof d[g].y[0]&&"number"===typeof d[g].y[1]){c=a.axisX.convertValueToPixel(t);h=a.axisY.convertValueToPixel(d[g].y[0]);l=a.axisY.convertValueToPixel(d[g].y[1]);var m=a.axisX.reversed?c+a.plotType.totalDataSeries*k/2-(a.previousDataSeriesCount+r)*k<<0:c-a.plotType.totalDataSeries*k/2+(a.previousDataSeriesCount+
+r)*k<<0,q=a.axisX.reversed?m-k<<0:m+k<<0,c=d[g].color?d[g].color:n._colorSet[g%n._colorSet.length];if(h>l){var u=h;h=l;l=u}u=n.dataPointIds[g];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:g,x1:m,y1:h,x2:q,y2:l};X(b,m,h,q,l,c,0,c,w,w,!1,!1,n.fillOpacity);c=R(u);v&&X(this._eventManager.ghostCtx,m,h,q,l,c,0,null,!1,!1,!1,!1);if(d[g].indexLabel||n.indexLabel||d[g].indexLabelFormatter||n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",
+dataPoint:d[g],dataSeries:n,indexKeyword:0,point:{x:m+(q-m)/2,y:d[g].y[1]>=d[g].y[0]?l:h},direction:d[g].y[1]>=d[g].y[0]?-1:1,bounds:{x1:m,y1:Math.min(h,l),x2:q,y2:Math.max(h,l)},color:c}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:d[g],dataSeries:n,indexKeyword:1,point:{x:m+(q-m)/2,y:d[g].y[1]>=d[g].y[0]?h:l},direction:d[g].y[1]>=d[g].y[0]?1:-1,bounds:{x1:m,y1:Math.min(h,l),x2:q,y2:Math.max(h,l)},color:c})}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation=
+"source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};q.prototype.renderError=
+function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:f,c=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,g=!1,h=this.plotArea,l=0,t,k,r,p,n,d,w,m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(h.x1,
+h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var q=0,u=0;ul&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&ll&&(u=l);if(0=L.length?0:L.length>=u?u:L.length:"string"===typeof L.length?parseInt(L.length)*u/100>u?u:parseInt(L.length)*u/100>u:u;L.thickness="number"===typeof L.thickness?0>L.thickness?0:Math.round(L.thickness):2;var K={color:B[l].stemColor?B[l].stemColor:B[l].color?x.stemColor?x.stemColor:B[l].color:x.stemColor?x.stemColor:e,thickness:B[l].stemThickness?B[l].stemThickness:x.stemThickness,dashType:B[l].stemDashType?
+B[l].stemDashType:x.stemDashType};K.thickness="number"===typeof K.thickness?0>K.thickness?0:Math.round(K.thickness):2;B[l].getTime?w=B[l].x.getTime():w=B[l].x;if(!(wa.axisX.dataInfo.viewPortMax)&&!y(B[l].y)&&B[l].y.length&&"number"===typeof B[l].y[0]&&"number"===typeof B[l].y[1]){var da=a.axisX.convertValueToPixel(w);c?k=da:t=da;da=a.axisY.convertValueToPixel(B[l].y[0]);c?r=da:n=da;da=a.axisY.convertValueToPixel(B[l].y[1]);c?p=da:d=da;c?(n=a.axisX.reversed?k+(A?q:
+1)*u/2-(A?C-1:0)*u<<0:k-(A?q:1)*u/2+(A?C-1:0)*u<<0,d=a.axisX.reversed?n-u<<0:n+u<<0):(r=a.axisX.reversed?t+(A?q:1)*u/2-(A?C-1:0)*u<<0:t-(A?q:1)*u/2+(A?C-1:0)*u<<0,p=a.axisX.reversed?r-u<<0:r+u<<0);!c&&n>d&&(da=n,n=d,d=da);c&&r>p&&(da=r,r=p,p=da);da=x.dataPointIds[l];this._eventManager.objectMap[da]={id:da,objectType:"dataPoint",dataSeriesIndex:H,dataPointIndex:l,x1:Math.min(r,p),y1:Math.min(n,d),x2:Math.max(p,r),y2:Math.max(d,n),isXYSwapped:c,stemProperties:K,whiskerProperties:L};z(b,Math.min(r,p),
+Math.min(n,d),Math.max(p,r),Math.max(d,n),e,L,K,c);v&&z(this._eventManager.ghostCtx,r,n,p,d,e,L,K,c);if(B[l].indexLabel||x.indexLabel||B[l].indexLabelFormatter||x.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:B[l],dataSeries:x,indexKeyword:0,point:{x:c?B[l].y[1]>=B[l].y[0]?r:p:r+(p-r)/2,y:c?n+(d-n)/2:B[l].y[1]>=B[l].y[0]?d:n},direction:B[l].y[1]>=B[l].y[0]?-1:1,bounds:{x1:c?Math.min(r,p):r,y1:c?n:Math.min(n,d),x2:c?Math.max(r,p):p,y2:c?d:Math.max(n,d)},color:e,axisSwapped:c}),
+this._indexLabels.push({chartType:"error",dataPoint:B[l],dataSeries:x,indexKeyword:1,point:{x:c?B[l].y[1]>=B[l].y[0]?p:r:r+(p-r)/2,y:c?n+(d-n)/2:B[l].y[1]>=B[l].y[0]?n:d},direction:B[l].y[1]>=B[l].y[0]?1:-1,bounds:{x1:c?Math.min(r,p):r,y1:c?n:Math.min(n,d),x2:c?Math.max(r,p):p,y2:c?d:Math.max(n,d)},color:e,axisSwapped:c})}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
+a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};q.prototype.renderRangeBar=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:
+f;if(!(0>=a.dataSeriesIndexes.length)){var c=null,e=this.plotArea,g=0,h,l,t,k,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var r=a.axisX.dataInfo.minDiff;isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?this.dataPointWidth:0.9*
+(e.height*(a.axisX.logarithmic?Math.log(r)/Math.log(a.axisX.range):Math.abs(r)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(r=h);b.save();v&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),
+this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var p=0;pa.axisX.dataInfo.viewPortMax)&&!y(w[g].y)&&w[g].y.length&&"number"===typeof w[g].y[0]&&"number"===typeof w[g].y[1]){h=a.axisY.convertValueToPixel(w[g].y[0]);
+l=a.axisY.convertValueToPixel(w[g].y[1]);t=a.axisX.convertValueToPixel(k);t=a.axisX.reversed?t+a.plotType.totalDataSeries*r/2-(a.previousDataSeriesCount+p)*r<<0:t-a.plotType.totalDataSeries*r/2+(a.previousDataSeriesCount+p)*r<<0;var q=a.axisX.reversed?t-r<<0:t+r<<0;h>l&&(c=h,h=l,l=c);c=w[g].color?w[g].color:d._colorSet[g%d._colorSet.length];X(b,h,t,l,q,c,0,null,m,!1,!1,!1,d.fillOpacity);c=d.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,
+x1:h,y1:t,x2:l,y2:q};c=R(c);v&&X(this._eventManager.ghostCtx,h,t,l,q,c,0,null,!1,!1,!1,!1);if(w[g].indexLabel||d.indexLabel||w[g].indexLabelFormatter||d.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:w[g],dataSeries:d,indexKeyword:0,point:{x:w[g].y[1]>=w[g].y[0]?h:l,y:t+(q-t)/2},direction:w[g].y[1]>=w[g].y[0]?-1:1,bounds:{x1:Math.min(h,l),y1:t,x2:Math.max(h,l),y2:q},color:c}),this._indexLabels.push({chartType:"rangeBar",dataPoint:w[g],dataSeries:d,indexKeyword:1,point:{x:w[g].y[1]>=
+w[g].y[0]?l:h,y:t+(q-t)/2},direction:w[g].y[1]>=w[g].y[0]?1:-1,bounds:{x1:Math.min(h,l),y1:t,x2:Math.max(h,l),y2:q},color:c})}}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(e.x1,
+e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};q.prototype.renderRangeArea=function(a){function f(){if(s){var a=null;0=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,g=[],h=this.plotArea;c.save();v&&e.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();v&&(e.beginPath(),e.rect(h.x1,h.y1,h.width,h.height),e.clip());for(var l=0;la.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!L)))if(null!==p[d].y&&p[d].y.length&&"number"===typeof p[d].y[0]&&"number"===typeof p[d].y[1]){w=a.axisX.convertValueToPixel(u);m=a.axisY.convertValueToPixel(p[d].y[0]);q=a.axisY.convertValueToPixel(p[d].y[1]);n||L?(r.connectNullData&&!n?(c.setLineDash&&(r.options.nullDataLineDashType||A===r.lineDashType&&r.lineDashType!==r.nullDataLineDashType)&&(t[t.length-
+1].newLineDashArray=C,A=r.nullDataLineDashType,c.setLineDash(z)),c.lineTo(w,m),v&&e.lineTo(w,m),t.push({x:w,y:q})):(c.beginPath(),c.moveTo(w,m),s={x:w,y:m},t=[],t.push({x:w,y:q}),v&&(e.beginPath(),e.moveTo(w,m))),L=n=!1):(c.lineTo(w,m),t.push({x:w,y:q}),v&&e.lineTo(w,m),0==d%250&&f());u=r.dataPointIds[d];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:d,x1:w,y1:m,y2:q};dp[d].y[1]===a.axisY.reversed?-1:1,color:y}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[d],dataSeries:r,indexKeyword:1,point:{x:w,
+y:q},direction:p[d].y[0]>p[d].y[1]===a.axisY.reversed?1:-1,color:y})}else L||n||f(),L=!0;f();$.drawMarkers(g)}}v&&(b.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,
+h.width,h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};q.prototype.renderRangeSplineArea=function(a){function f(a,b){var d=x(m,2);if(0=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,g=[],h=this.plotArea;c.save();v&&e.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();v&&(e.beginPath(),e.rect(h.x1,h.y1,h.width,
+h.height),e.clip());for(var l=0;la.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!d)))if(null!==r[p].y&&r[p].y.length&&"number"===typeof r[p].y[0]&&"number"===typeof r[p].y[1]){n=a.axisX.convertValueToPixel(n);d=a.axisY.convertValueToPixel(r[p].y[0]);w=a.axisY.convertValueToPixel(r[p].y[1]);var C=k.dataPointIds[p];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:p,
+x1:n,y1:d,y2:w};m[m.length]={x:n,y:d};q[q.length]={x:n,y:w};p=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx,e=null,g=this.plotArea,h=0,l,t,k,r,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;t=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var n=a.axisX.dataInfo.minDiff;
+isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth?this.dataPointWidth:0.6*(g.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>t&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,t));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&tt&&(n=t);b.save();v&&this._eventManager.ghostCtx.save();
+b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.clip());for(var d=0;dk&&(e=t,t=k,k=e);a.axisY.reversed&&(e=t,t=k,k=e);e=m.dataPointIds[h];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:w,dataPointIndex:h,x1:l,y1:t,x2:la,y2:k};var L=q[h].color?q[h].color:0q[h].y===a.axisY.reversed?
+1:-1,bounds:{x1:l,y1:Math.min(t,k),x2:la,y2:Math.max(t,k)},color:e})}}v&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.restore());
+b.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};var pa=function(a,f,b,c,e,g,h,l,t){if(!(0>b)){"undefined"===typeof l&&(l=1);if(!v){var k=Number((h%(2*Math.PI)).toFixed(8));Number((g%(2*Math.PI)).toFixed(8))===k&&(h-=1E-4)}a.save();a.globalAlpha=l;"pie"===e?(a.beginPath(),a.moveTo(f.x,f.y),a.arc(f.x,f.y,b,g,h,!1),a.fillStyle=c,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),
+a.arc(f.x,f.y,b,g,h,!1),0<=t&&a.arc(f.x,f.y,t*b,h,g,!0),a.closePath(),a.fillStyle=c,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};q.prototype.renderPie=function(a){function f(){if(k&&r){for(var a=0,b=0,c=0,e=0,f=0;fMath.PI/2-u&&l.midAnglel.midAngle)c=f;a++}else if(l.midAngle>3*Math.PI/2-u&&l.midAngle<
+3*Math.PI/2+u){if(0===b||d[e].midAngle>l.midAngle)e=f;b++}l.hemisphere=g>Math.PI/2&&g<=3*Math.PI/2?"left":"right";l.indexLabelTextBlock=new ka(t.plotArea.ctx,{fontSize:l.indexLabelFontSize,fontFamily:l.indexLabelFontFamily,fontColor:l.indexLabelFontColor,fontStyle:l.indexLabelFontStyle,fontWeight:l.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:l.indexLabelBackgroundColor,maxWidth:l.indexLabelMaxWidth,maxHeight:l.indexLabelWrap?5*l.indexLabelFontSize:1.5*l.indexLabelFontSize,text:l.indexLabelText,
+padding:0,textBaseline:"top"});l.indexLabelTextBlock.measureText()}h=g=0;p=!1;for(f=0;fMath.PI/2-u&&l.midAngle3*Math.PI/2-u&&l.midAngle<3*Math.PI/2+u)&&(h<=b/2&&!p?(l.hemisphere="left",h++):(l.hemisphere="right",p=!0))}}function b(a){var b=t.plotArea.ctx;b.clearRect(n.x1,n.y1,n.width,n.height);b.fillStyle=
+t.backgroundColor;b.fillRect(n.x1,n.y1,n.width,n.height);for(b=0;bc){var f=0.07*A*Math.cos(d[b].midAngle),g=0.07*A*Math.sin(d[b].midAngle),h=!1;if(r[b].exploded){if(1E-9a.indexLabelTextBlock.y?e-d:c-f}function e(a){for(var b=null,e=1;ec(d[b],d[a])||("right"===d[a].hemisphere?d[b].indexLabelTextBlock.y>=d[a].indexLabelTextBlock.y:d[b].indexLabelTextBlock.y<=d[a].indexLabelTextBlock.y)))break;else b=null;return b}function g(a,b,f){f=(f||0)+1;if(1E3b&&l.indexLabelTextBlock.yn)return 0;var t=0,p=0,p=t=t=0;0>b?l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2>h&&l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+bn&&(b=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+b-n);b=l.indexLabelTextBlock.y+b;h=
+0;h="right"===l.hemisphere?x.x+Math.sqrt(Math.pow(q,2)-Math.pow(b-x.y,2)):x.x-Math.sqrt(Math.pow(q,2)-Math.pow(b-x.y,2));p=x.x+A*Math.cos(l.midAngle);t=x.y+A*Math.sin(l.midAngle);t=Math.sqrt(Math.pow(h-p,2)+Math.pow(b-t,2));p=Math.acos(A/q);t=Math.acos((q*q+A*A-t*t)/(2*A*q));b=tc(d[h],d[a])||
+("right"===d[a].hemisphere?d[h].indexLabelTextBlock.y<=d[a].indexLabelTextBlock.y:d[h].indexLabelTextBlock.y>=d[a].indexLabelTextBlock.y)))break;else h=null;p=h;t=e(a);n=h=0;0>b?(n="right"===l.hemisphere?p:t,k=b,null!==n&&(p=-b,b=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2-(d[n].indexLabelTextBlock.y+d[n].indexLabelTextBlock.height/2),b-p+h.toFixed(v)&&(k=b>m?-(b-m):-(p-(n-h)))))):0m?b-m:p-(h-n)))));k&&(f=l.indexLabelTextBlock.y+k,b=0,b="right"===l.hemisphere?x.x+Math.sqrt(Math.pow(q,2)-Math.pow(f-x.y,2)):x.x-Math.sqrt(Math.pow(q,2)-Math.pow(f-x.y,2)),l.midAngle>Math.PI/2-u&&l.midAngleh.indexLabelTextBlock.x?
+b=h.indexLabelTextBlock.x-15:"right"===l.hemisphere&&("left"===a.hemisphere&&b3*Math.PI/2-u&&l.midAngle<3*Math.PI/2+u&&(h=(a-1+d.length)%d.length,h=d[h],a=d[(a+1+d.length)%d.length],"right"===l.hemisphere&&"left"===h.hemisphere&&ba.indexLabelTextBlock.x)&&(b=a.indexLabelTextBlock.x-15)),l.indexLabelTextBlock.y=f,l.indexLabelTextBlock.x=
+b,l.indexLabelAngle=Math.atan2(l.indexLabelTextBlock.y-x.y,l.indexLabelTextBlock.x-x.x))}return k}function h(){var a=t.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var b=a=0,f=0,h=!0,b=0;10>b&&(1>b||0B){for(var F=y=0,sa=0;say?l.indexLabelText="":l.indexLabelTextBlock.maxWidth=0.85*y,0.3*l.indexLabelTextBlock.maxWidthf&&(f=z)),z=z=0,0f&&(f=z)));var M=function(a,b,c){for(var e=[],f=0;e.push(d[b]),b!==c;b=(b+1+
+r.length)%r.length);e.sort(function(a,b){return a.y-b.y});for(b=0;bB){n=u.indexLabelTextBlock.x;var t=u.indexLabelTextBlock.y-u.indexLabelTextBlock.height/2,m=u.indexLabelTextBlock.y+u.indexLabelTextBlock.height/
+2,w=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,q=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width,s=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2;n=u.indexLabelTextBlock.x+u.indexLabelTextBlock.widthq+p||t>s+p||ma&&(a=h),k!==a&&(b=k,f+=-B),0===h%Math.max(r.length/10,3)&&(g=!0)):g=!0;g&&(0=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],r=k.dataPoints,p=10,n=this.plotArea,
+d=k.dataPointEOs,m=2,q,s=1.3,u=20/180*Math.PI,v=6,x={x:(n.x2+n.x1)/2,y:(n.y2+n.y1)/2},z=0;a=!1;for(var B=0;Ba&&(e=a,f=!0);var g=r[b].color?r[b].color:k._colorSet[b%k._colorSet.length];e>c&&pa(t.plotArea.ctx,d[b].center,d[b].radius,g,k.type,
+c,e,k.fillOpacity,d[b].percentInnerRadius);if(f)break}l()},function(){t.disableToolTip=!1;t._animator.animate(0,t.animatedRender?500:0,function(a){b(a);l()})})}}};var qa=function(a,f,b,c){"undefined"===typeof b&&(b=1);0>=Math.round(f.y4-f.y1)||(a.save(),a.globalAlpha=b,a.beginPath(),a.moveTo(Math.round(f.x1),Math.round(f.y1)),a.lineTo(Math.round(f.x2),Math.round(f.y2)),a.lineTo(Math.round(f.x3),Math.round(f.y3)),a.lineTo(Math.round(f.x4),Math.round(f.y4)),"undefined"!==f.x5&&(a.lineTo(Math.round(f.x5),
+Math.round(f.y5)),a.lineTo(Math.round(f.x6),Math.round(f.y6))),a.closePath(),a.fillStyle=c?c:f.color,a.fill(),a.globalAplha=1,a.restore())};q.prototype.renderFunnel=function(a){function f(){for(var a=0,b=[],c=0;csqrt?(n=c,k=(b+n)*(e-l)/2,a-=k,k=e-l,l+=e-l,k+=0==n?0:a/n,l+=a/n,t=!0):(k=(Math.abs(ea)*b-Math.sqrt(sqrt))/2,n=b-2*k/Math.abs(ea),l+=k,l>e&&(l-=k,n=c,
+k=(b+n)*(e-l)/2,a-=k,k=e-l,l+=e-l,k+=a/n,l+=a/n,t=!0),b=n)),d.push(k);return d}function c(){if(u&&x){for(var a,b,c,e,f,g,h,k,l,n,t,p,r,m,w=[],q=[],z={percent:null,total:null},A=null,B=0;Bw[B]&&(w[B]=B!==fa?u.reversed?N[B].x3-N[B].x4:N[B].x2-N[B].x1:N[B].x2-N[B].x1,w[B]/=2));r=b.indexLabelMaxWidth?b.indexLabelMaxWidth:u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:w[B];if(r>w[B]||0>r)r=w[B];q[B]="inside"===u.indexLabelPlacement?N[B].height:!1;z=s.getPercentAndTotal(u,b);if(u.indexLabelFormatter||b.indexLabelFormatter)A={chart:s.options,dataSeries:u,dataPoint:b,total:z.total,percent:z.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(A):b.indexLabel?
+s.replaceKeywordsWithValue(b.indexLabel,b,u,B):u.indexLabelFormatter?u.indexLabelFormatter(A):u.indexLabel?s.replaceKeywordsWithValue(u.indexLabel,b,u,B):b.label?b.label:"";0>=n&&(n=0);1E3>r&&1E3-rg?g:u.indexLabelMaxWidth:g,h=G.length-1;0<=h;h--){dataPoint=x[G[h].id];c=G[h];d=c.textBlock;b=(a=n(h)b.y&&(e=!0);c=dataPoint.indexLabelMaxWidth||g;if(c>g||0>c)c=g;f.push(c)}if(e)for(h=G.length-1;0<=h;h--)a=N[h],G[h].textBlock.maxWidth=
+f[f.length-(h+1)],G[h].textBlock.measureText(),G[h].textBlock.x=S-g,c=G[h].textBlock.heightT+C&&(G[h].textBlock.y=T+C-G[h].height),G[h].textBlock.yra+C&&(G[h].textBlock.y=ra+C-G[h].height))}function g(){var a,b,c,e;if("inside"!==u.indexLabelPlacement)for(var f=0;fba?d(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?cT+C&&(G[f].textBlock.y=T+C-G[f].height),G[f].textBlock.yra+C&&(G[f].textBlock.y=ra+C-G[f].height)));else for(f=0;f=c?(b=f!=fa?(a.x4+a.x3)/2-e/2:(a.x5+a.x4)/2-e/2,c=f!=fa?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,G[f].textBlock.x=b,G[f].textBlock.y=
+c):G[f].isDirty=!0)}function h(){function a(b,c){var d;if(0>b||b>=G.length)return 0;var e,f=G[b].textBlock;if(0>c){c*=-1;e=p(b);d=l(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0=c)return f.y+=c,c;if(b==N.length-1)return 0e)&&(k=n(r),!(k>=G.length-1)&&G[r].textBlock.y+G[r].height+ga>G[k].textBlock.y&&(G[r].textBlock.y=G[r].textBlock.y+G[r].height-e>e-G[r].textBlock.y?e+1:e-G[r].height-1))}for(k=N.length-1;0e&&(e=0,G[e].isDirty))break;if(G[k].textBlock.y=f){f=0;h+=G[f].height;break}e=p(f);if(0>e){f=0;h+=G[f].height;
+break}}if(f!=k){g=G[f].textBlock.y;a-=g;a=h-a;g=c(a,d,f);break}}}return g}function c(a,b,d){var e=[],f=0,g=0;for(a=Math.abs(a);d<=b;d++)e.push(N[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d+k.y.toFixed(6))&&(d=g.y+d+ga-k.y,e=a(m,-d),ea?u.reversed?ra-C:T-C:G[a].textBlock.y+G[a].height+ga)}function t(a,b,c){var d,e,f,h=[],l=C,n=[];-1!==b&&(0<=$.indexOf(b)?(e=$.indexOf(b),$.splice(e,1)):($.push(b),$=$.sort(function(a,
+b){return a-b})));if(0===$.length)h=ja;else{e=C*(1!=$.length||0!=$[0]&&$[0]!=N.length-1?2:1)/k();for(var t=0;tn&&(n*=-1),c.y1+=newY-n[d],c.y2+=newY-n[d],c.y3+=newY-n[d],c.y4+=newY-n[d],c.y5&&(c.y5+=newY-n[d],c.y6+=newY-n[d]),n[d]=newY}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ia=!0;d.clearRect(z.x1,z.y1,z.x2-z.x1,z.y2-z.y1);d.fillStyle=a.backgroundColor;d.fillRect(z.x1,z.y1,z.width,z.height);p.changeSection(c,b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[x.length-1-b]:u.dataPoints[b];
+e.index=u.reversed?x.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;ea){b=N[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-
+b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function m(a){for(var b=0;b=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],x=u.dataPoints,z=this.plotArea,C=0.025*z.width,B=0.01*z.width,A=0,J=z.height-2*C,I=Math.min(z.width-2*B,2.8*z.height),L=!1,K=0;KJ?P=J:0>=P&&(P=0),E>a?E=a-0.5:0>=E&&(E=0)):"pyramid"===u.type&&(E=P=0,u.reversed=u.reversed?!1:!0);var B=K+a/2,Y=K,X=K+a,T=u.reversed?aa:ca,M=B-E/
+2,Z=B+E/2,ba=u.reversed?ca+P:aa-P,ra=u.reversed?ca:aa;a=[];var B=[],N=[],I=[],V=ca,fa,ea=(ba-T)/(M-Y),ha=-ea,K="area"===(u.valueRepresents?u.valueRepresents:"height")?b():f();if(-1!==K){if(u.reversed)for(I.push(V),E=K.length-1;0a&&(A=a));for(E=0;E\n');c.document.close();setTimeout(function(){c.focus();c.print();setTimeout(function(){b._canvasJSContainer.removeChild(f)},1E3)},500)};q.prototype.getPercentAndTotal=function(a,f){var b=null,c=null,
+e=null;if(0<=a.type.indexOf("stacked"))c=0,b=f.x.getTime?f.x.getTime():f.x,b in a.plotUnit.yTotals&&(c=a.plotUnit.yTotals[b],e=isNaN(f.y)?0:100*(f.y/c));else if("pie"===a.type||"doughnut"===a.type||"funnel"===a.type||"pyramid"===a.type){for(i=c=0;i=h||"undefined"===typeof h||0>=q||"undefined"===typeof q)){if("horizontal"===
+this.orientation){d.textBlock=new ka(this.ctx,{x:0,y:0,maxWidth:q,maxHeight:this.itemWrap?h:this.lineHeight,angle:0,text:d.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});d.textBlock.measureText();null!==this.itemWidth&&(d.textBlock.width=this.itemWidth-(s+l+("line"===d.chartType||"spline"===d.chartType||"stepLine"===d.chartType?2*0.1*this.lineHeight:0)));if(!n||n.width+
+Math.round(d.textBlock.width+s+l+(0===n.width?0:this.horizontalSpacing)+("line"===d.chartType||"spline"===d.chartType||"stepLine"===d.chartType?2*0.1*this.lineHeight:0))>g)n={items:[],width:0},k.push(n),this.height+=x,x=0;x=Math.max(x,d.textBlock.height)}else d.textBlock=new ka(this.ctx,{x:0,y:0,maxWidth:z,maxHeight:!0===this.itemWrap?h:1.5*this.fontSize,angle:0,text:d.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,
+fontStyle:this.fontStyle,textBaseline:"middle"}),d.textBlock.measureText(),null!==this.itemWidth&&(d.textBlock.width=this.itemWidth-(s+l+("line"===d.chartType||"spline"===d.chartType||"stepLine"===d.chartType?2*0.1*this.lineHeight:0))),this.height>0,0),this.dataPoints.length):0):(r=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,r=
+0>0,0),this.dataPoints.length):0));for(;;){g=0