/* CanvasJS HTML5 & JavaScript Charts - v3.4.6 GA - https://canvasjs.com/ Copyright 2021 fenopix --------------------- License Information -------------------- CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details. https://canvasjs.com/license/ */ /*eslint-disable*/ /*jshint ignore:start*/ (function(){function oa(g,l){g.prototype=cb(l.prototype);g.prototype.constructor=g;g.base=l.prototype}function cb(g){function l(){}l.prototype=g;return new l}function Va(g,l,v){"millisecond"===v?g.setMilliseconds(g.getMilliseconds()+1*l):"second"===v?g.setSeconds(g.getSeconds()+1*l):"minute"===v?g.setMinutes(g.getMinutes()+1*l):"hour"===v?g.setHours(g.getHours()+1*l):"day"===v?g.setDate(g.getDate()+1*l):"week"===v?g.setDate(g.getDate()+7*l):"month"===v?g.setMonth(g.getMonth()+1*l):"year"===v&&g.setFullYear(g.getFullYear()+ 1*l);return g}function X(g,l){var v=!1;0>g&&(v=!0,g*=-1);g=""+g;for(l=l?l:1;g.length>16).toString(16),v=((g&65280)>>8).toString(16);g=((g&255)>>0).toString(16);l=2>l.length?"0"+l:l;v=2>v.length?"0"+v:v;g=2>g.length?"0"+g:g;return"#"+l+v+g}function db(g,l){var v=this.length>>>0,s=Number(l)||0,s=0>s?Math.ceil(s): Math.floor(s);for(0>s&&(s+=v);s=(new Date).getTime()-g._dropDownCloseTime.getTime()||(g._dropdownMenu.style.display="block",g._menuButton.blur(),g._dropdownMenu.focus())},g.allDOMEventHandlers,!0);J(g._menuButton,"mouseover",function(){l||(ga(g._menuButton,{backgroundColor:g.toolbar.itemBackgroundColorOnHover,color:g.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&ga(g._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},g.allDOMEventHandlers,!0);J(g._menuButton, "mouseout",function(){l||(ga(g._menuButton,{backgroundColor:g.toolbar.itemBackgroundColor,color:g.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&ga(g._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},g.allDOMEventHandlers,!0)}if(g.exportEnabled&&g._dropdownMenu){ga(g._dropdownMenu,{backgroundColor:g.toolbar.itemBackgroundColor,color:g.toolbar.fontColor});for(var v=g._dropdownMenu.childNodes,s=[g._cultureInfo.printText,g._cultureInfo.saveJPGText,g._cultureInfo.savePNGText], qa=0;qav;v++)if(g[v]!==g[v+4]|g[v]!==g[v+8]| g[v]!==g[v+12]){l=!1;break}return l?g[0]<<16|g[1]<<8|g[2]:0}function la(g,l,v){return g in l?l[g]:v[g]}function La(g,l,v){if(w&&Za){var s=g.getContext("2d");Ma=s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1;ka=Qa/Ma;g.width=l*ka;g.height=v*ka;Qa!==Ma&&(g.style.width=l+"px",g.style.height=v+"px",s.scale(ka,ka))}else g.width=l,g.height=v}function hb(g){if(!ib){var l=!1,v=!1;"undefined"===typeof pa.Chart.creditHref? (g.creditHref=W("iuuqr;..b`ow`rkr/bnl."),g.creditText=W("B`ow`rKR/bnl")):(l=g.updateOption("creditText"),v=g.updateOption("creditHref"));if(g.creditHref&&g.creditText){g._creditLink||(g._creditLink=document.createElement("a"),g._creditLink.setAttribute("class","canvasjs-chart-credit"),g._creditLink.setAttribute("title","JavaScript Charts"),g._creditLink.setAttribute("style","outline:none;margin:0px;position:absolute;right:2px;top:"+(g.height-14)+"px;color:dimgrey;text-decoration:none;font-size:11px;font-family: Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"), g._creditLink.setAttribute("tabIndex",-1),g._creditLink.setAttribute("target","_blank"));if(0===g.renderCount||l||v)g._creditLink.setAttribute("href",g.creditHref),g._creditLink.innerHTML=g.creditText;g._creditLink&&g.creditHref&&g.creditText?(g._creditLink.parentElement||g._canvasJSContainer.appendChild(g._creditLink),g._creditLink.style.top=g.height-14+"px"):g._creditLink.parentElement&&g._canvasJSContainer.removeChild(g._creditLink)}}}function ta(g,l){Ga&&(this.canvasCount|=0,window.console.log(++this.canvasCount)); var v=document.createElement("canvas");v.setAttribute("class","canvasjs-chart-canvas");La(v,g,l);w||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(v);return v}function ga(g,l){for(var v in l)g.style[v]=l[v]}function va(g,l,v){l.getAttribute("state")||(l.style.backgroundColor=g.toolbar.itemBackgroundColor,l.style.color=g.toolbar.fontColor,l.style.border="none",ga(l,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));l.getAttribute("state")!== v&&(l.setAttribute("state",v),l.setAttribute("type","button"),ga(l,{padding:"5px 12px",cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),l.setAttribute("title",g._cultureInfo[v+"Text"]),l.innerHTML=""+g._cultureInfo[v+"Text"]+"")}function Ka(){for(var g=null,l=0;ld?"a":"p";case "tt":return 12>d?"am":"pm";case "T":return 12>d?"A":"P";case "TT":return 12>d?"AM":"PM";case "K":return S?"UTC":(String(F).match(y)||[""]).pop().replace(E,"");case "z":return(0g?!0:!1;s&&(g*=-1);var w=v?v.decimalSeparator:".",y=v?v.digitGroupSeparator:",",E="";l=String(l);var E=1,F=v="",N=-1,M=[],H=[],P=0,J=0,R=0,S=!1,U=0,F=l.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);l=null;for(var K=0;F&&KN)N=K;else{if("%"===l)E*=100;else if("\u2030"===l){E*=1E3;continue}else if(","===l[0]&& "."===l[l.length-1]){E/=Math.pow(1E3,l.length-1);N=K+l.length-1;continue}else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||(S=!0);0>N?(M.push(l),"#"===l||"0"===l?P++:","===l&&R++):(H.push(l),"#"!==l&&"0"!==l||J++)}S&&(l=Math.floor(g),F=-Math.floor(Math.log(g)/Math.LN10+1),U=0===g?0:0===l?-(P+F):String(l).length-P,E/=Math.pow(10,U));0>N&&(N=K);E=(g*E).toFixed(J);l=E.split(".");E=(l[0]+"").split("");g=(l[1]+"").split("");E&&"0"===E[0]&&E.shift();for(S=F=K=J=N=0;0U?l.replace("+", "").replace("-",""):l.replace("-",""),v+=l.replace(/[0]+/,function(a){return X(U,a.length)}));y="";for(M=!1;0U?l.replace("+","").replace("-",""):l.replace("-",""),y+=l.replace(/[0]+/,function(a){return X(U, a.length)}));v+=(M?w:"")+y;return s?"-"+v:v},Na=function(g){var l=0,v=0;g=g||window.event;g.offsetX||0===g.offsetX?(l=g.offsetX,v=g.offsetY):g.layerX||0==g.layerX?(l=g.layerX,v=g.layerY):(l=g.pageX-g.target.offsetLeft,v=g.pageY-g.target.offsetTop);return{x:l,y:v}},Za=!0,Qa=window.devicePixelRatio||1,Ma=1,ka=Za?Qa/Ma:1,ca=function(g,l,v,s,w,y,E,F,N,M,P,S,H){"undefined"===typeof H&&(H=1);E=E||0;F=F||"black";var J=15l)y=F-1;else break}s>l&&1F&&(E=l.pop(),w-=E.height,y=J)}this._wrappedText={lines:l,width:y,height:w};this.width=y+(this.leftPadding+this.rightPadding);this.height=w+(this.topPadding+this.bottomPadding);this.ctx.font=s};ia.prototype._getFontString=function(){var g;g=""+(this.fontStyle?this.fontStyle+" ": "");g+=this.fontWeight?this.fontWeight+" ":"";g+=this.fontSize?this.fontSize+"px ":"";var l=this.fontFamily?this.fontFamily+"":"";!w&&l&&(l=l.split(",")[0],"'"!==l[0]&&'"'!==l[0]&&(l="'"+l+"'"));return g+=l};oa(Sa,U);oa(ya,U);ya.prototype.setLayout=function(){if(this.text){var g=this.dockInsidePlotArea?this.chart.plotArea:this.chart,l=g.layoutManager.getFreeSpace(),w=l.x1,y=l.y1,F=0,J=0,E=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,N,H;"top"===this.verticalAlign|| "bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=l.width-4-E*("center"===this.horizontalAlign?2:1)),J=0.5*l.height-this.margin-2,F=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=l.height-4),J=0.5*l.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&(this.maxWidth=l.width-4),J=0.5*l.height-4));var M;s(this.padding)||"number"!==typeof this.padding?s(this.padding)||"object"!== typeof this.padding||(M=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,M+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):M=2*this.padding;this.wrap||(J=Math.min(J,1.5*this.fontSize+M));J=new ia(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness, backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:J,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"});M=J.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(y=l.y1+2,H="top"):"bottom"===this.verticalAlign&&(y=l.y2-2-M.height,H="bottom"),"left"===this.horizontalAlign?w=l.x1+2:"center"===this.horizontalAlign?w=l.x1+l.width/2-M.width/2:"right"===this.horizontalAlign&&(w=l.x2-2-M.width-E),N=this.horizontalAlign, this.width=M.width,this.height=M.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(w=l.x1+2,y=l.y2-2-(this.maxWidth/2-M.width/2),F=-90,H="left",this.width=M.height,this.height=M.width):"right"===this.horizontalAlign?(w=l.x2-2,y=l.y1+2+(this.maxWidth/2-M.width/2),F=90,H="right",this.width=M.height,this.height=M.width):"center"===this.horizontalAlign&&(y=g.y1+(g.height/2-M.height/2),w=g.x1+(g.width/2-M.width/2),H="center",this.width=M.width,this.height=M.height),N="center");J.x= w;J.y=y;J.angle=F;J.horizontalAlign=N;this._textBlock=J;g.layoutManager.registerSpace(H,{width:this.width+("left"===H||"right"===H?this.margin+2:0),height:this.height+("top"===H||"bottom"===H?this.margin+2:0)});this.bounds={x1:w,y1:y,x2:w+this.width,y2:y+this.height};this.ctx.textBaseline="top"}};ya.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};oa(Ha,U);Ha.prototype.setLayout=ya.prototype.setLayout;Ha.prototype.render=ya.prototype.render;Ta.prototype.get=function(g,l){var w= null;0a[f].x&&0B?{x:a[t].x+B/3,y:a[t].y+b/3}:{x:a[t].x,y:a[t].y+b/9};t=e;f=0===t?0:t-1;p=t===a.length-1?t:t+1;b=Math.abs((a[p].x-a[f].x)/(0===a[t].x-a[f].x?0.01:a[t].x-a[f].x))*(d-1)/2+1;B=(a[p].x-a[f].x)/b;b=(a[p].y-a[f].y)/b;c[c.length]=a[t].x>a[f].x&&0B?{x:a[t].x-B/3,y:a[t].y-b/3}:{x:a[t].x,y:a[t].y-b/9};c[c.length]=a[e]}return c}function y(a,d,c,b,e,f,p,t,B,k){var m=0;k?(p.color=f,t.color=f): k=1;m=B?Math.abs(e-c):Math.abs(b-d);m=0this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this.options.scaleBreaks&&(this.scaleBreaks=new Z(this.chart,this.options.scaleBreaks,++this.chart._eventManager.lastObjectId, this));this.stripLines=[];if(this.options.stripLines&&0=this._appliedBreaks[a+1].startValue&&(this._appliedBreaks[a].endValue=Math.max(this._appliedBreaks[a].endValue,this._appliedBreaks[a+1].endValue),window.console&&window.console.log("CanvasJS Error: Breaks "+a+" and "+(a+1)+" are overlapping."),this._appliedBreaks.splice(a,2),a--)}}function T(a,d,c,b,e,f){T.base.constructor.call(this,"Break",d,c,b,f);this.id=e;this.chart=a;this.ctx=this.chart.ctx;this.scaleBreaks=f;this.optionsName= d;this.isOptionsInArray=!0;this.type=c.type?this.type:f.type;this.fillOpacity=s(c.fillOpacity)?f.fillOpacity:this.fillOpacity;this.lineThickness=s(c.lineThickness)?f.lineThickness:this.lineThickness;this.color=c.color?this.color:f.color;this.lineColor=c.lineColor?this.lineColor:f.lineColor;this.lineDashType=c.lineDashType?this.lineDashType:f.lineDashType;!s(this.startValue)&&this.startValue.getTime&&(this.startValue=this.startValue.getTime());!s(this.endValue)&&this.endValue.getTime&&(this.endValue= this.endValue.getTime());"number"===typeof this.startValue&&("number"===typeof this.endValue&&this.endValue=navigator.userAgent.search("MSIE")&&ga(a._zoomButton.childNodes[0], {WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);J(this._zoomButton,"mouseout",function(){d||(ga(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&ga(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?(ga(this._resetButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+ this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),this._resetButton.title=this._cultureInfo.resetText):(d=!1,ua(this._resetButton=document.createElement("button")),va(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor,this._toolBar.appendChild(this._resetButton),J(this._resetButton,"touchstart",function(a){d=!0},this.allDOMEventHandlers), J(this._resetButton,"click",function(){a.toolTip.hide();a.toolTip&&a.toolTip.enabled&&a.toolTip.dispatchEvent("hidden",{chart:a,toolTip:a.toolTip},a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b=navigator.userAgent.search("MSIE")&&ga(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))}, this.allDOMEventHandlers),J(this._resetButton,"mouseout",function(){d||(ga(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&ga(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers),this.overlaidCanvas.style.cursor=a._defaultCursor);this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText? (this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),Ka(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))}else this.panEnabled=this.zoomEnabled=!1;gb(this);"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?va(a,a._zoomButton,"zoom"):va(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&va(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options= this.options.toolTip);for(var c in this.toolTip.options)this.toolTip.options.hasOwnProperty(c)&&this.toolTip.updateOption(c)};l.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var d=0,c=0;this.options.width?d=this.width:this.width=d=0b.linkedDataSeriesIndex||b.linkedDataSeriesIndex>= this.options.data.length||"number"!==typeof b.linkedDataSeriesIndex||"error"===this.options.data[b.linkedDataSeriesIndex].type)&&(b.linkedDataSeriesIndex=null);null===b.name&&(b.name="DataSeries "+a);null===b.color?1a&&"undefined"!==typeof B.startTimePercent?a>=B.startTimePercent&&B.animationCallback(B.easingFunction(a-B.startTimePercent,0,1,1-B.startTimePercent),B):B.animationCallback(B.easingFunction(a,0,1,1),B);m.dispatchEvent("dataAnimationIterationEnd",{chart:m})},function(){c=[];for(var a=0;aa.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,p=0;pc.max&&(c.max=b);ed.max&&"number"===typeof e&&(d.max=e);if(0r&&(r=1/r);c.minDiff>r&&1!==r&&(c.minDiff=r)}else r=b-t.dataPoints[B-1].x,0>r&& (r*=-1),c.minDiff>r&&0!==r&&(c.minDiff=r);null!==e&&null!==t.dataPoints[B-1].y&&(a.axisY.logarithmic?(r=e/t.dataPoints[B-1].y,1>r&&(r=1/r),d.minDiff>r&&1!==r&&(d.minDiff=r)):(r=e-t.dataPoints[B-1].y,0>r&&(r*=-1),d.minDiff>r&&0!==r&&(d.minDiff=r)))}if(bh&&!m)m=!0;else if(b>h&&m)continue;t.dataPoints[B].label&&(a.axisX.labels[b]=t.dataPoints[B].label);bc.viewPortMax&&(c.viewPortMax=b);null===e?c.viewPortMin=== b&&nd.viewPortMax&&"number"===typeof e&&(d.viewPortMax=e))}}t.axisX.valueType=t.xValueType=f?"dateTime":"number"}};l.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,p=[],t=[],B=Infinity,k=-Infinity,m=0;mc.max&&(c.max=b);if(0x&&(x=1/x);c.minDiff>x&&1!==x&&(c.minDiff= x)}else x=b-n.dataPoints[q-1].x,0>x&&(x*=-1),c.minDiff>x&&0!==x&&(c.minDiff=x);null!==e&&null!==n.dataPoints[q-1].y&&(a.axisY.logarithmic?0x&&(x=1/x),d.minDiff>x&&1!==x&&(d.minDiff=x)):(x=e-n.dataPoints[q-1].y,0>x&&(x*=-1),d.minDiff>x&&0!==x&&(d.minDiff=x)))}if(bu&&!r)r=!0;else if(b>u&&r)continue;n.dataPoints[q].label&&(a.axisX.labels[b]=n.dataPoints[q].label);bc.viewPortMax&&(c.viewPortMax=b);null===n.dataPoints[q].y?c.viewPortMin===b&&gd.max&&(d.max=a),qc.viewPortMax||(ad.viewPortMax&&(d.viewPortMax=a)));for(q in t)t.hasOwnProperty(q)&&!isNaN(q)&&(a=t[q],ad.max&&(d.max=Math.max(a,k)),qc.viewPortMax||(ad.viewPortMax&&(d.viewPortMax=Math.max(a,k))))}};l.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,p=!1,t=!1,B=[],k=0;kc.max&&(c.max=b);if(0u&&(u=1/u);c.minDiff>u&&1!==u&&(c.minDiff=u)}else u=b-m.dataPoints[n-1].x,0>u&&(u*=-1),c.minDiff>u&&0!==u&&(c.minDiff=u);s(e)||null===m.dataPoints[n-1].y|| (a.axisY.logarithmic?0u&&(u=1/u),d.minDiff>u&&1!==u&&(d.minDiff=u)):(u=e-m.dataPoints[n-1].y,0>u&&(u*=-1),d.minDiff>u&&0!==u&&(d.minDiff=u)))}if(bl&&!h)h=!0;else if(b>l&&h)continue;m.dataPoints[n].label&&(a.axisX.labels[b]=m.dataPoints[n].label);bc.viewPortMax&&(c.viewPortMax=b);null===e?c.viewPortMin===b&&re&&(t=!0),B[b]=B[b]?B[b]+Math.abs(e):Math.abs(e))}}m.axisX.valueType=m.xValueType=f?"dateTime":"number"}a.axisY.logarithmic?(d.max=s(d.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(d.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),d.min=s(d.viewPortMin)?1:Math.min(d.viewPortMin,1)):p&&!t?(d.max=s(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=s(d.viewPortMin)?1:Math.min(d.viewPortMin,1)):p&& t?(d.max=s(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=s(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99)):!p&&t&&(d.max=s(d.viewPortMax)?-1:Math.max(d.viewPortMax,-1),d.min=s(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99));d.viewPortMin=d.min;d.viewPortMax=d.max;a.dataPointYSums=B}};l.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f,p,t=!1,B=0;Bc.max&&(c.max=b);fd.max&&(d.max=p);0r&&(r=1/r),c.minDiff>r&&1!==r&&(c.minDiff=r)):(r=b-k.dataPoints[m-1].x,0>r&&(r*=-1),c.minDiff>r&&0!==r&&(c.minDiff=r)),e&&(null!==e[0]&&k.dataPoints[m-1].y&&null!==k.dataPoints[m-1].y[0])&&(a.axisY.logarithmic?(r=e[0]/k.dataPoints[m-1].y[0],1>r&&(r=1/r),d.minDiff>r&&1!==r&&(d.minDiff=r)):(r=e[0]-k.dataPoints[m-1].y[0], 0>r&&(r*=-1),d.minDiff>r&&0!==r&&(d.minDiff=r))));if(!(bu&&!q)q=!0;else if(b>u&&q)continue;k.dataPoints[m].label&&(a.axisX.labels[b]=k.dataPoints[m].label);bc.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&e)for(x=0;xd.viewPortMax&&(d.viewPortMax=p))}}k.axisX.valueType= k.xValueType=t?"dateTime":"number"}};l.prototype._processSpecificPlotUnit=function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,p=0;pc.max&&(c.max=b),t.dataPointEOs[B].cumulativeSumd.max&&(d.max=t.dataPointEOs[B].cumulativeSum),0n&&(n=1/n),c.minDiff>n&&1!==n&&(c.minDiff=n)):(n=b-t.dataPoints[B-1].x,0>n&&(n*=-1),c.minDiff>n&&0!==n&&(c.minDiff=n)),null!==e&&null!==t.dataPoints[B-1].y&&(a.axisY.logarithmic?(e=t.dataPointEOs[B].cumulativeSum/t.dataPointEOs[B-1].cumulativeSum,1>e&& (e=1/e),d.minDiff>e&&1!==e&&(d.minDiff=e)):(e=t.dataPointEOs[B].cumulativeSum-t.dataPointEOs[B-1].cumulativeSum,0>e&&(e*=-1),d.minDiff>e&&0!==e&&(d.minDiff=e)))),!(bh&&!m)m=!0;else if(b>h&&m)continue;t.dataPoints[B].label&&(a.axisX.labels[b]=t.dataPoints[B].label);bc.viewPortMax&&(c.viewPortMax=b);0d.viewPortMax&&(d.viewPortMax=t.dataPointEOs[B-1].cumulativeSum));t.dataPointEOs[B].cumulativeSumd.viewPortMax&&(d.viewPortMax=t.dataPointEOs[B].cumulativeSum)}t.axisX.valueType=t.xValueType=f?"dateTime":"number"}};l.prototype.calculateAutoBreaks=function(){function a(a,b,c,e){if(e)return c=Math.pow(Math.min(c*a/b,b/a),0.2),1>=c&&(c=Math.pow(1>a?1/a:Math.min(b/a,a),0.25)),{startValue:a* c,endValue:b/c};c=0.2*Math.min(c-b+a,b-a);0>=c&&(c=0.25*Math.min(b-a,Math.abs(a)));return{startValue:a+c,endValue:b-c}}function d(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var b=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,c=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(b||c)for(var d=a.axisY.dataInfo,f=a.axisX.dataInfo,h,k=f.min,p=f.max,m=d.min,n=d.max,f=f._dataRanges, d=d._dataRanges,q,t=0,B=0;Bg.dataPoints.length))for(t=0;tf[q].max&&(f[q].max=h)),c){var l=(n+1-m)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((h="waterfall"=== a.type?g.dataPointEOs[t].cumulativeSum:g.dataPoints[t].y)&&h.length)for(var w=0;wd[q].max&&(d[q].max=h[w]);else s(h)||(q=Math.floor((h-m)/l),hd[q].max&&(d[q].max=h))}}}}function c(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)&&a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var b=a.axisX.dataInfo,c=b.min,d=b.max,f=b._dataRanges, h,k=0,p=0;pm.dataPoints.length))for(k=0;kf[h].max&&(f[h].max=b)}}for(var b,e=this,f=!1,p=0;pm[h].max&&(m[h].max=n)}delete this._axes[p].dataInfo.dataPointYPositiveSums}if(this._axes[p].dataInfo.dataPointYNegativeSums){q=this._axes[p].dataInfo.dataPointYNegativeSums;m=k;for(t in q)q.hasOwnProperty(t)&&!isNaN(t)&&(n=-1*q[t],s(n)||(h=Math.floor((n-B)/b),nm[h].max&&(m[h].max=n)));delete this._axes[p].dataInfo.dataPointYNegativeSums}for(t=0;tb&&f.push({diff:n,start:m,end:B});break}else t++;if(this._axes[p].scaleBreaks.customBreaks)for(t=0;t=e.x1&&(a<=e.x2&&d>=e.y1&&d<=e.y2)&&(b=e.id)}return b};l.prototype.getAutoFontSize=lb;l.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)}; l.prototype.clearCanvas=kb;l.prototype.attachEvent=function(a){this._events.push(a)};l.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var d=[],c=a.changedTouches,b=c?c[0]:a,e=null;switch(a.type){case "touchstart":case "MSPointerDown":d=["mousemove","mousedown"];this._lastTouchData=Na(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":d=["mousemove"];break;case "touchend":case "MSPointerUp":var f=this._lastTouchData&&this._lastTouchData.time? new Date-this._lastTouchData.time:0,d="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>f?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1f)this._lastTouchData.scroll=!0}catch(t){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(), this.isDrag=!1;else for(c=0;c=e.x1&&d.x<=e.x2&&d.y>=e.y1&&d.y<=e.y2){b[c].call(b.context,d.x,d.y);"mousedown"===c&&!0===b.capture?(l.capturedEventParam=b,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===c&&(b.chart.overlaidCanvas.releaseCapture? b.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else b=null;a.target.style.cursor=b&&b.cursor?b.cursor:this._defaultCursor}c=this.plotArea;if(d.xc.x2||d.yc.y2){this.toolTip&&this.toolTip.enabled?(this.toolTip.hide(),this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip)):this.resetOverlayedCanvas();for(f=0;fc.maximum&&(f=c.viewportMaximum/c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum/f,c.sessionVariables.newViewportMaximum=c.viewportMaximum/f,p=!0):c.viewportMinimumc.maximum&&(f=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum- f,c.sessionVariables.newViewportMaximum=c.viewportMaximum-f,p=!0);else if((!e||2Math.abs(c)&&(this.panEnabled|| this.zoomEnabled)){this.toolTip.hide();this.toolTip&&this.toolTip.enabled&&this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip);for(var t=0;th)var r=h,h=q,q=r;if(n.scaleBreaks)for(r=0;!f&&r=h;if(isFinite(n.dataInfo.minDiff))if(r= n.getApparentDifference(q,h,null,!0),!(f||!(this.panEnabled&&n.scaleBreaks&&n.scaleBreaks._appliedBreaks.length)&&(n.logarithmic&&rn.maximum))B.push(n),m.push({val1:q,val2:h}),t=!0;else if(!e){t=!1;break}}return{isValid:t,axesWithValidRange:B,axesRanges:m}};l.prototype.preparePlotArea=function(){var a=this.plotArea;!w&&(0c.lineCoordinates.x2?d.x2:c.lineCoordinates.x2;a.y2=d.y2>d.y1?d.y2:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0c.lineCoordinates.x2?d.x2:c.lineCoordinates.x2,a.y2=d.y2>d.y1?d.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else d=this.layoutManager.getFreeSpace(),a.x1=d.x1,a.x2=d.x2,a.y1=d.y1,a.y2=d.y2,a.width=d.width,a.height=d.height;w||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0c.x2||m.point.yc.y2+1)continue}else if("rangearea"===n||"rangesplinearea"===n){if(m.dataPoint.xe.viewportMaximum||Math.max.apply(null,m.dataPoint.y)f.viewportMaximum)continue}else if(0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("bubble")||0<=n.indexOf("scatter")){if(m.dataPoint.xe.viewportMaximum||m.dataPoint.yf.viewportMaximum)continue}else if(0<=n.indexOf("column")||"waterfall"===n||"error"===n&&!m.axisSwapped){if(m.dataPoint.xe.viewportMaximum||m.bounds.y1>c.y2||m.bounds.y2e.viewportMaximum||m.bounds.x1>c.x2||m.bounds.x2e.viewportMaximum||Math.max.apply(null,m.dataPoint.y)f.viewportMaximum)continue}else if(m.dataPoint.x e.viewportMaximum)continue;p=t=2;"horizontal"===C?(B=g.width,k=g.height):(k=g.width,B=g.height);if("normal"===this.plotInfo.axisPlacement){if(0<=n.indexOf("line")||0<=n.indexOf("area"))A="auto",t=4;else if(0<=n.indexOf("stacked"))"auto"===A&&(A="inside");else if("bubble"===n||"scatter"===n)A="inside";q=m.point.x-("horizontal"===C?B/2:B/2-r/2);"inside"!==A?(e=c.y1,f=c.y2,0m.point.y)):(h=m.point.y+ r/2+t+b,h>f-k&&(h="auto"===A?Math.min(m.point.y,f)+r/2-k-t:f+r/2-k,y=hf-k-t&&("bubble"===n||"scatter"=== n)&&(h=Math.min(m.point.y+t,c.y2-k-t))),h=Math.min(h,f))}else 0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("scatter")?(A="auto",p=4):0<=n.indexOf("stacked")?"auto"===A&&(A="inside"):"bubble"===n&&(A="inside"),h=m.point.y+r/2-k/2+t,"inside"!==A?(e=c.x1,f=c.x2,0>v?(q=m.point.x-("horizontal"===C?B:B-r/2)-p-b,qm.point.x)):(q=m.point.x+("horizontal"===C?0:r/2)+p+b,q>f-B-p-b&&(q="auto"===A?Math.min(m.point.x,f)-("horizontal"===C?B:B/2)-p:f- B-p,y=qv?Math.max(m.bounds.x1,c.x1)+r/2+p:Math.min(m.bounds.x2,c.x2)-B/2-p+("horizontal"===C?0:r/2):(Math.max(m.bounds.x1,c.x1)+Math.min(m.bounds.x2,c.x2))/2+("horizontal"===C?0:r/2),q=0>v?Math.max(m.point.x,b)-("horizontal"===C?B/2:0):Math.min(m.point.x,b)-B/2,q=Math.max(q,e));"vertical"===C&&(h+=k-r/2);g.x=q;g.y=h;g.render(!0);x&&("inside"!==A&&(0>n.indexOf("bar")&&("error"!==n||!m.axisSwapped)&& m.point.x>c.x1&&m.point.xn.indexOf("column")&&("error"!==n||m.axisSwapped)&&m.point.y>c.y1&&m.point.y=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var f=[],p,t=0;ta.axisX.dataInfo.viewPortMax&&(!k.connectNullData|| !C)))if("number"!==typeof m[u].y)0m[u].y===a.axisY.reversed?1:-1,color:r})}c.stroke();w&&b.stroke()}}V.drawMarkers(f);w&& (d.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(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation, easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderStepLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var f=[],p,t=0;ta.axisX.dataInfo.viewPortMax&& (!k.connectNullData||!C)))if("number"!==typeof m[u].y)0 m[u].y===a.axisY.reversed?1:-1,color:r})}c.stroke();w&&b.stroke()}}V.drawMarkers(f);w&&(d.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(e.x1,e.y1,e.width,e.height),b.beginPath()); c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderSpline=function(a){function d(a){a=v(a,2);if(0=a.dataSeriesIndexes.length)){var e= this._eventManager.ghostCtx;b.save();var f=this.plotArea;b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();for(var p=[],t=0;ta.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!x)))if("number"!==typeof m[l].y)0m[l].y===a.axisY.reversed?1:-1,color:r});x=!1}d(s)}V.drawMarkers(p); w&&(c.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(f.x1,f.y1,f.width,f.height),e.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation, easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=0,p,t,B,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,m=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,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.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&&f>m&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&& mm&&(n=m);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(m=0;ma.axisX.dataInfo.viewPortMax)&&"number"===typeof r[f].y){p=a.axisX.convertValueToPixel(B);t=a.axisY.convertValueToPixel(r[f].y);p=a.axisX.reversed?p+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+m)*n<<0:p-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+m)*n<<0;var l=a.axisX.reversed?p-n<<0:p+n<<0,u;0<=r[f].y?u=k:(u=t,t=k);t>u&&(b=t,t=u,u=b);b=r[f].color?r[f].color:h._colorSet[f%h._colorSet.length]; ca(c,p,t,l,u,b,0,null,g&&0<=r[f].y,0>r[f].y&&g,!1,!1,h.fillOpacity);b=h.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:f,x1:p,y1:t,x2:l,y2:u};b=P(b);w&&ca(this._eventManager.ghostCtx,p,t,l,u,b,0,null,!1,!1,!1,!1);(r[f].indexLabel||h.indexLabel||r[f].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:r[f],dataSeries:h,point:{x:p+(l-p)/2,y:0>r[f].y===a.axisY.reversed?t:u},direction:0>r[f].y=== a.axisY.reversed?1:-1,bounds:{x1:p,y1:Math.min(t,u),x2:l,y2:Math.max(t,u)},color:b})}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore()); c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.yScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:ka.axisY.bounds.y2?a.axisY.bounds.y2:k}}};l.prototype.renderStackedColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],p=[],t=[],B=[],k=0,m,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k= this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var h=a.axisX.dataInfo.minDiff;isFinite(h)||(h=0.3*Math.abs(a.axisX.range));h=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(h)/Math.log(a.axisX.range):Math.abs(h)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&& k>m&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&mm&&(h=m);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(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)&&"number"===typeof u[k].y){m=a.axisX.convertValueToPixel(b);var s=m-a.plotType.plotUnits.length*h/2+a.index*h<<0,C=s+h<<0,D;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=u[k].y)B[b]=u[k].y+(B[b]?B[b]:0),D=a.axisY.convertValueToPixel(B[b]),n="undefined"!==typeof p[b]?p[b]:q,p[b]=D;else if(n=a.axisY.convertValueToPixel(u[k].y),0<=u[k].y){var z="undefined"!==typeof f[b]?f[b]:0;n-=z;D=q-z;f[b]=z+(D-n)}else z=p[b]?p[b]:0,D=n+z,n=q+z,p[b]=z+(D-n);b=u[k].color?u[k].color:l._colorSet[k%l._colorSet.length]; ca(c,s,n,C,D,b,0,null,x&&0<=u[k].y,0>u[k].y&&x,!1,!1,l.fillOpacity);b=l.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:k,x1:s,y1:n,x2:C,y2:D};b=P(b);w&&ca(this._eventManager.ghostCtx,s,n,C,D,b,0,null,!1,!1,!1,!1);(u[k].indexLabel||l.indexLabel||u[k].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:u[k],dataSeries:l,point:{x:m,y:0<=u[k].y?n:D},direction:0>u[k].y===a.axisY.reversed? 1:-1,bounds:{x1:s,y1:Math.min(n,D),x2:C,y2:Math.max(n,D)},color:b})}}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore()); c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.yScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:qa.axisY.bounds.y2?a.axisY.bounds.y2:q}}};l.prototype.renderStackedColumn100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],p=[],t=[],B=[],k=0,m,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0), k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var h=a.axisX.dataInfo.minDiff;isFinite(h)||(h=0.3*Math.abs(a.axisX.range));h=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(h)/Math.log(a.axisX.range):Math.abs(h)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&& k>m&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&mm&&(h=m);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(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)&&"number"===typeof u[k].y){m=a.axisX.convertValueToPixel(b);n=0!==a.dataPointYSums[b]?100*(u[k].y/a.dataPointYSums[b]):0;var s=m-a.plotType.plotUnits.length*h/2+a.index*h<<0,C=s+h<<0,D;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=t[b])continue;n=a.axisY.convertValueToPixel(t[b]);D=f[b]?f[b]:q;f[b]=n}else if(a.axisY.scaleBreaks&&0=u[k].y)B[b]=n+("undefined"!==typeof B[b]?B[b]:0),D=a.axisY.convertValueToPixel(B[b]),n=p[b]?p[b]:q,p[b]=D;else if(n=a.axisY.convertValueToPixel(n),0<=u[k].y){var z="undefined"!==typeof f[b]?f[b]:0;n-=z;D=q-z;a.dataSeriesIndexes.length-1===r&&1>=Math.abs(e.y1-n)&&(n=e.y1);f[b]=z+(D-n)}else z="undefined"!== typeof p[b]?p[b]:0,D=n+z,n=q+z,a.dataSeriesIndexes.length-1===r&&1>=Math.abs(e.y2-D)&&(D=e.y2),p[b]=z+(D-n);b=u[k].color?u[k].color:l._colorSet[k%l._colorSet.length];ca(c,s,n,C,D,b,0,null,x&&0<=u[k].y,0>u[k].y&&x,!1,!1,l.fillOpacity);b=l.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:k,x1:s,y1:n,x2:C,y2:D};b=P(b);w&&ca(this._eventManager.ghostCtx,s,n,C,D,b,0,null,!1,!1,!1,!1);(u[k].indexLabel||l.indexLabel||u[k].indexLabelFormatter||l.indexLabelFormatter)&& this._indexLabels.push({chartType:"stackedColumn100",dataPoint:u[k],dataSeries:l,point:{x:m,y:0<=u[k].y?n:D},direction:0>u[k].y===a.axisY.reversed?1:-1,bounds:{x1:s,y1:Math.min(n,D),x2:C,y2:Math.max(n,D)},color:b})}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.yScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:qa.axisY.bounds.y2?a.axisY.bounds.y2:q}}};l.prototype.renderBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b= null,e=this.plotArea,f=0,p,t,B,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,m=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,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth? this.dataPointWidth:0.9*(e.height*(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&&f>m&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&mm&&(n=m);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height); c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(m=0;ma.axisX.dataInfo.viewPortMax)&&"number"===typeof r[f].y){t=a.axisX.convertValueToPixel(B); p=a.axisY.convertValueToPixel(r[f].y);t=a.axisX.reversed?t+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+m)*n<<0:t-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+m)*n<<0;var l=a.axisX.reversed?t-n<<0:t+n<<0,u;0<=r[f].y?u=k:(u=p,p=k);b=r[f].color?r[f].color:h._colorSet[f%h._colorSet.length];ca(c,u,t,p,l,b,0,null,g,!1,!1,!1,h.fillOpacity);b=h.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:f,x1:u,y1:t,x2:p,y2:l};b= P(b);w&&ca(this._eventManager.ghostCtx,u,t,p,l,b,0,null,!1,!1,!1,!1);(r[f].indexLabel||h.indexLabel||r[f].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:r[f],dataSeries:h,point:{x:0<=r[f].y?p:u,y:t+(l-t)/2},direction:0>r[f].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(u,p),y1:t,x2:Math.max(u,p),y2:l},color:b})}}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.xScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:ka.axisY.bounds.x2?a.axisY.bounds.x2: k}}};l.prototype.renderStackedBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],p=[],t=[],B=[],k=0,m,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<< 0;var h=a.axisX.dataInfo.minDiff;isFinite(h)||(h=0.3*Math.abs(a.axisX.range));h=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(h)/Math.log(a.axisX.range):Math.abs(h)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>n&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&nn&&(h=n);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(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)&&"number"===typeof u[k].y){n=a.axisX.convertValueToPixel(b);var s=n-a.plotType.plotUnits.length*h/2+a.index*h<<0,C=s+h<<0,D;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=u[k].y)B[b]=u[k].y+(B[b]?B[b]:0),m=p[b]? p[b]:q,p[b]=D=a.axisY.convertValueToPixel(B[b]);else if(m=a.axisY.convertValueToPixel(u[k].y),0<=u[k].y){var z=f[b]?f[b]:0;D=q+z;m+=z;f[b]=z+(m-D)}else z=p[b]?p[b]:0,D=m-z,m=q-z,p[b]=z+(m-D);b=u[k].color?u[k].color:l._colorSet[k%l._colorSet.length];ca(c,D,s,m,C,b,0,null,x,!1,!1,!1,l.fillOpacity);b=l.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:k,x1:D,y1:s,x2:m,y2:C};b=P(b);w&&ca(this._eventManager.ghostCtx,D,s,m,C,b,0,null,!1,!1,!1, !1);(u[k].indexLabel||l.indexLabel||u[k].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:u[k],dataSeries:l,point:{x:0<=u[k].y?m:D,y:n},direction:0>u[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(D,m),y1:s,x2:Math.max(D,m),y2:C},color:b})}}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.xScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:qa.axisY.bounds.x2?a.axisY.bounds.x2:q}}};l.prototype.renderStackedBar100=function(a){var d= a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],p=[],t=[],B=[],k=0,m,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0;var h=a.axisX.dataInfo.minDiff;isFinite(h)|| (h=0.3*Math.abs(a.axisX.range));h=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(h)/Math.log(a.axisX.range):Math.abs(h)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>n&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&nn&&(h=n);c.save();w&&this._eventManager.ghostCtx.save(); c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(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)&& "number"===typeof u[k].y){n=a.axisX.convertValueToPixel(b);var A;A=0!==a.dataPointYSums[b]?100*(u[k].y/a.dataPointYSums[b]):0;var C=n-a.plotType.plotUnits.length*h/2+a.index*h<<0,D=C+h<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=t[b])continue;A=f[b]?f[b]:q;f[b]=m=a.axisY.convertValueToPixel(t[b])}else if(a.axisY.scaleBreaks&&0=u[k].y)B[b]=A+(B[b]?B[b]:0),m=p[b]?p[b]: q,p[b]=A=a.axisY.convertValueToPixel(B[b]);else if(m=a.axisY.convertValueToPixel(A),0<=u[k].y){var z=f[b]?f[b]:0;A=q+z;m+=z;a.dataSeriesIndexes.length-1===r&&1>=Math.abs(e.x2-m)&&(m=e.x2);f[b]=z+(m-A)}else z=p[b]?p[b]:0,A=m-z,m=q-z,a.dataSeriesIndexes.length-1===r&&1>=Math.abs(e.x1-A)&&(A=e.x1),p[b]=z+(m-A);b=u[k].color?u[k].color:l._colorSet[k%l._colorSet.length];ca(c,A,C,m,D,b,0,null,s,!1,!1,!1,l.fillOpacity);b=l.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:g, dataPointIndex:k,x1:A,y1:C,x2:m,y2:D};b=P(b);w&&ca(this._eventManager.ghostCtx,A,C,m,D,b,0,null,!1,!1,!1,!1);(u[k].indexLabel||l.indexLabel||u[k].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:u[k],dataSeries:l,point:{x:0<=u[k].y?m:A,y:n},direction:0>u[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(A,m),y1:C,x2:Math.max(A,m),y2:D},color:b})}}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.xScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:qa.axisY.bounds.x2?a.axisY.bounds.x2:q}}};l.prototype.renderArea=function(a){var d,c;function b(){D&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?C=A:0>a.axisY.viewportMaximum?C=t.y1:0=a.dataSeriesIndexes.length)){var p=this._eventManager.ghostCtx,t=a.axisY.lineCoordinates,B=[],k=this.plotArea,m;f.save();w&&p.save();f.beginPath();f.rect(k.x1,k.y1,k.width,k.height);f.clip();w&&(p.beginPath(),p.rect(k.x1,k.y1,k.width,k.height),p.clip());for(var n=0;na.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!ja)))if("number"!==typeof r[g].y)h.connectNullData||(ja||d)||b(),ja=!0;else{l=a.axisX.convertValueToPixel(s);u=a.axisY.convertValueToPixel(r[g].y);d||ja?(!d&&h.connectNullData?(f.setLineDash&&(h.options.nullDataLineDashType||c===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(d=l,c=u,l=m.x,u=m.y,b(),f.moveTo(m.x,m.y),l=d,u=c,D=m,c=h.nullDataLineDashType,f.setLineDash(Q)),f.lineTo(l,u),w&&p.lineTo(l,u)): (f.beginPath(),f.moveTo(l,u),w&&(p.beginPath(),p.moveTo(l,u)),D={x:l,y:u}),ja=d=!1):(f.lineTo(l,u),w&&p.lineTo(l,u),0==g%250&&b());m={x:l,y:u};gr[g].y===a.axisY.reversed?1:-1,color:z})}b();V.drawMarkers(B)}}w&&(e.drawImage(this._preRenderCanvas, 0,0,this.width,this.height),f.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&f.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&f.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),f.clearRect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());f.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear, animationBase:0}}};l.prototype.renderSplineArea=function(a){function d(){var c=v(s,2);if(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum? l=g:0>a.axisY.viewportMaximum?l=f.y1:0=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,f=a.axisY.lineCoordinates,p=[],t=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(t.x1, t.y1,t.width,t.height);b.clip();w&&(e.beginPath(),e.rect(t.x1,t.y1,t.width,t.height),e.clip());for(var B=0;Ba.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!r)))if("number"!==typeof n[q].y)0 n[q].y===a.axisY.reversed?1:-1,color:A});r=!1}d();V.drawMarkers(p)}}w&&(c.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(t.x1,t.y1,t.width,t.height),this._eventManager.ghostCtx.restore()); b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderStepArea=function(a){var d,c;function b(){D&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?C=A:0>a.axisY.viewportMaximum?C=t.y1:0=a.dataSeriesIndexes.length)){var p=this._eventManager.ghostCtx,t=a.axisY.lineCoordinates,B=[],k=this.plotArea,m;f.save();w&&p.save();f.beginPath();f.rect(k.x1,k.y1,k.width,k.height);f.clip();w&&(p.beginPath(),p.rect(k.x1,k.y1,k.width,k.height),p.clip());for(var n=0;na.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!c))){var Y=u;"number"!==typeof r[g].y?(h.connectNullData||(c||d)||b(),c=!0):(l=a.axisX.convertValueToPixel(s),u=a.axisY.convertValueToPixel(r[g].y),d||c?(!d&&h.connectNullData?(f.setLineDash&&(h.options.nullDataLineDashType||Q===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(d=l,c=u,l=m.x,u=m.y,b(), f.moveTo(m.x,m.y),l=d,u=c,D=m,Q=h.nullDataLineDashType,f.setLineDash(aa)),f.lineTo(l,Y),f.lineTo(l,u),w&&(p.lineTo(l,Y),p.lineTo(l,u))):(f.beginPath(),f.moveTo(l,u),w&&(p.beginPath(),p.moveTo(l,u)),D={x:l,y:u}),c=d=!1):(f.lineTo(l,Y),w&&p.lineTo(l,Y),f.lineTo(l,u),w&&p.lineTo(l,u),0==g%250&&b()),m={x:l,y:u},gr[g].y===a.axisY.reversed?1:-1,color:z}))}b();V.drawMarkers(B)}}w&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),f.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&f.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&f.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),f.clearRect(k.x1, k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());f.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderStackedArea=function(a){function d(){if(!(1>k.length)){for(0=a.dataSeriesIndexes.length)){var e=null,f=null,p=[],t=this.plotArea,g=[],k=[],m=[],n=[],q=0,h,r,l=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),s=this._eventManager.ghostCtx,u,x,A;w&&s.beginPath();b.save();w&&s.save();b.beginPath();b.rect(t.x1,t.y1,t.width,t.height);b.clip();w&&(s.beginPath(),s.rect(t.x1,t.y1,t.width,t.height),s.clip());for(var e=[],C=0;Ca.axisX.dataInfo.viewPortMax&&(!z.connectNullData||!Y)))if("number"!==typeof fa.y)z.connectNullData||(Y||x)||d(),Y=!0;else{h=a.axisX.convertValueToPixel(f);var ma=g[f]?g[f]:0;if(a.axisY.logarithmic|| a.axisY.scaleBreaks&&0=n[f]&&a.axisY.logarithmic)continue;r=a.axisY.convertValueToPixel(n[f])}else r=a.axisY.convertValueToPixel(fa.y),r-=ma;k.push({x:h,y:l-ma});g[f]=l-r;x||Y?(!x&&z.connectNullData?(b.setLineDash&&(z.options.nullDataLineDashType||A===z.lineDashType&&z.lineDashType!==z.nullDataLineDashType)&&(x=k.pop(),A=k[k.length-1],d(),b.moveTo(u.x,u.y),k.push(A),k.push(x),A=z.nullDataLineDashType,b.setLineDash(aa)),b.lineTo(h, r),w&&s.lineTo(h,r)):(b.beginPath(),b.moveTo(h,r),w&&(s.beginPath(),s.moveTo(h,r))),Y=x=!1):(b.lineTo(h,r),w&&s.lineTo(h,r),0==q%250&&(d(),b.moveTo(h,r),w&&s.moveTo(h,r),k.push({x:h,y:l-ma})));u={x:h,y:r};qv[q].y===a.axisY.reversed?1:-1,color:e})}}d();b.moveTo(h,r);w&&s.moveTo(h,r)}delete z.dataPointIndexes}V.drawMarkers(p);w&&(c.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(t.x1,t.y1,t.width,t.height),s.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderStackedArea100=function(a){function d(){for(0=a.dataSeriesIndexes.length)){var e=null,f=null,p=this.plotArea,t=[],g=[],k=[],m=[],n=[],q=0,h,r,l,s,u,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),A=this._eventManager.ghostCtx;b.save();w&&A.save();b.beginPath();b.rect(p.x1,p.y1,p.width,p.height);b.clip();w&&(A.beginPath(),A.rect(p.x1,p.y1,p.width,p.height),A.clip()); for(var e=[],C=0;Ca.axisX.dataInfo.viewPortMax&&(!z.connectNullData||!Y)))if("number"!==typeof fa.y)z.connectNullData|| (Y||s)||d(),Y=!0;else{var ma;ma=0!==a.dataPointYSums[f]?100*(fa.y/a.dataPointYSums[f]):0;h=a.axisX.convertValueToPixel(f);var ba=g[f]?g[f]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0=n[f]&&a.axisY.logarithmic)continue;r=a.axisY.convertValueToPixel(n[f])}else r=a.axisY.convertValueToPixel(ma),r-=ba;k.push({x:h,y:x-ba});g[f]=x-r;s||Y?(!s&&z.connectNullData?(b.setLineDash&&(z.options.nullDataLineDashType||u===z.lineDashType&& z.lineDashType!==z.nullDataLineDashType)&&(s=k.pop(),u=k[k.length-1],d(),b.moveTo(l.x,l.y),k.push(u),k.push(s),u=z.nullDataLineDashType,b.setLineDash(aa)),b.lineTo(h,r),w&&A.lineTo(h,r)):(b.beginPath(),b.moveTo(h,r),w&&(A.beginPath(),A.moveTo(h,r))),Y=s=!1):(b.lineTo(h,r),w&&A.lineTo(h,r),0==q%250&&(d(),b.moveTo(h,r),w&&A.moveTo(h,r),k.push({x:h,y:x-ba})));l={x:h,y:r};qy[q].y===a.axisY.reversed?1:-1,color:e})}}d();b.moveTo(h,r);w&&A.moveTo(h,r)}delete z.dataPointIndexes}V.drawMarkers(t);w&&(c.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(p.x1,p.y1,p.width,p.height),A.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderBubble=function(a){var d= a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,f,p;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var t=-Infinity,g=Infinity,k=0;ka.axisX.dataInfo.viewPortMax||"undefined"===typeof q[e].z||(h=q[e].z,h>t&&(t=h),ha.axisX.dataInfo.viewPortMax)&&"number"===typeof q[e].y){f=a.axisX.convertValueToPixel(f);p=a.axisY.convertValueToPixel(q[e].y);var h=q[e].z,s=2*Math.max(Math.sqrt((t===g?l/2:r+(l-r)/(t-g)*(h-g))/Math.PI)<<0,1),h=n.getMarkerProperties(e,c);h.size=s;c.globalAlpha=n.fillOpacity;V.drawMarker(f,p,c,h.type,h.size,h.color,h.borderColor,h.borderThickness);c.globalAlpha=1;var u=n.dataPointIds[e];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:e,x1:f,y1:p,size:s}; s=P(u);w&&V.drawMarker(f,p,this._eventManager.ghostCtx,h.type,h.size,s,s,h.borderThickness);(q[e].indexLabel||n.indexLabel||q[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[e],dataSeries:n,point:{x:f,y:p},direction:1,bounds:{x1:f-h.size/2,y1:p-h.size/2,x2:f+h.size/2,y2:p+h.size/2},color:null})}w&&(d.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(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};l.prototype.renderScatter=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx, c=w?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,f,p;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var t=0;ta.axisX.dataInfo.viewPortMax)&&"number"===typeof m[e].y){f=a.axisX.convertValueToPixel(f);p=a.axisY.convertValueToPixel(m[e].y);var h=k.getMarkerProperties(e,f,p,c);c.globalAlpha=k.fillOpacity;V.drawMarker(h.x,h.y,h.ctx,h.type,h.size,h.color,h.borderColor,h.borderThickness);c.globalAlpha=1;Math.sqrt((n-f)*(n-f)+(q-p)*(q-p))Math.min(this.plotArea.width, this.plotArea.height)||(n=k.dataPointIds[e],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:e,x1:f,y1:p},n=P(n),w&&V.drawMarker(h.x,h.y,this._eventManager.ghostCtx,h.type,h.size,n,n,h.borderThickness),(m[e].indexLabel||k.indexLabel||m[e].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:m[e],dataSeries:k,point:{x:f,y:p},direction:1,bounds:{x1:f-h.size/2,y1:p-h.size/2,x2:f+h.size/2,y2:p+h.size/2},color:null}), n=f,q=p)}}}w&&(d.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(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx, animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};l.prototype.renderCandlestick=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=null,p=this.plotArea,t=0,g,k,m,n,q,h,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth? this.dataPointWidth:0.015*this.width,r=a.axisX.dataInfo.minDiff;isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?this.dataPointWidth:0.7*p.width*(a.axisX.logarithmic?Math.log(r)/Math.log(a.axisX.range):Math.abs(r)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>f&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&ff&&(r=f);c.save();w&&b.save();c.beginPath();c.rect(p.x1,p.y1,p.width,p.height);c.clip();w&&(b.beginPath(),b.rect(p.x1,p.y1,p.width,p.height),b.clip());for(var l=0;la.axisX.dataInfo.viewPortMax)&&!s(x[t].y)&&x[t].y.length&&"number"===typeof x[t].y[0]&& "number"===typeof x[t].y[1]&&"number"===typeof x[t].y[2]&&"number"===typeof x[t].y[3]){g=a.axisX.convertValueToPixel(h);k=a.axisY.convertValueToPixel(x[t].y[0]);m=a.axisY.convertValueToPixel(x[t].y[1]);n=a.axisY.convertValueToPixel(x[t].y[2]);q=a.axisY.convertValueToPixel(x[t].y[3]);var C=g-r/2<<0,D=C+r<<0,f=u.options.fallingColor?u.fallingColor:u._colorSet[0],e=x[t].color?x[t].color:u._colorSet[0],z=Math.round(Math.max(1,0.15*r)),y=0===z%2?0:0.5,E=u.dataPointIds[t];this._eventManager.objectMap[E]= {id:E,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:t,x1:C,y1:k,x2:D,y2:m,x3:g,y3:n,x4:g,y4:q,borderThickness:z,color:e};c.strokeStyle=e;c.beginPath();c.lineWidth=z;b.lineWidth=Math.max(z,4);"candlestick"===u.type?(c.moveTo(g-y,m),c.lineTo(g-y,Math.min(k,q)),c.stroke(),c.moveTo(g-y,Math.max(k,q)),c.lineTo(g-y,n),c.stroke(),ca(c,C,Math.min(k,q),D,Math.max(k,q),x[t].y[0]<=x[t].y[3]?u.risingColor:f,z,e,A,A,!1,!1,u.fillOpacity),w&&(e=P(E),b.strokeStyle=e,b.moveTo(g-y,m),b.lineTo(g-y,Math.min(k, q)),b.stroke(),b.moveTo(g-y,Math.max(k,q)),b.lineTo(g-y,n),b.stroke(),ca(b,C,Math.min(k,q),D,Math.max(k,q),e,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(c.moveTo(g-y,m),c.lineTo(g-y,n),c.stroke(),c.beginPath(),c.moveTo(g,k),c.lineTo(C,k),c.stroke(),c.beginPath(),c.moveTo(g,q),c.lineTo(D,q),c.stroke(),w&&(e=P(E),b.strokeStyle=e,b.moveTo(g-y,m),b.lineTo(g-y,n),b.stroke(),b.beginPath(),b.moveTo(g,k),b.lineTo(C,k),b.stroke(),b.beginPath(),b.moveTo(g,q),b.lineTo(D,q),b.stroke()));(x[t].indexLabel||u.indexLabel|| x[t].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:u.type,dataPoint:x[t],dataSeries:u,point:{x:C+(D-C)/2,y:a.axisY.reversed?n:m},direction:1,bounds:{x1:C,y1:Math.min(m,n),x2:D,y2:Math.max(m,n)},color:e})}}w&&(d.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(p.x1,p.y1,p.width,p.height),b.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};l.prototype.renderBoxAndWhisker=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=this.plotArea, p=0,t,g,k,m,n,q,h,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,r=a.axisX.dataInfo.minDiff;isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?this.dataPointWidth:0.7*f.width*(a.axisX.logarithmic?Math.log(r)/Math.log(a.axisX.range):Math.abs(r)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e> p&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&pp&&(r=p);c.save();w&&b.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();w&&(b.beginPath(),b.rect(f.x1,f.y1,f.width,f.height),b.clip());for(var l=!1,l=!!a.axisY.reversed,v=0;va.axisX.dataInfo.viewPortMax)&&!s(A[p].y)&&A[p].y.length&&"number"===typeof A[p].y[0]&&"number"===typeof A[p].y[1]&&"number"===typeof A[p].y[2]&&"number"===typeof A[p].y[3]&&"number"===typeof A[p].y[4]&&5===A[p].y.length){t=a.axisX.convertValueToPixel(h);g=a.axisY.convertValueToPixel(A[p].y[0]);k=a.axisY.convertValueToPixel(A[p].y[1]);m=a.axisY.convertValueToPixel(A[p].y[2]); n=a.axisY.convertValueToPixel(A[p].y[3]);q=a.axisY.convertValueToPixel(A[p].y[4]);var D=t-r/2<<0,z=t+r/2<<0,e=A[p].color?A[p].color:x._colorSet[0],y=Math.round(Math.max(1,0.15*r)),E=0===y%2?0:0.5,Q=A[p].whiskerColor?A[p].whiskerColor:A[p].color?x.whiskerColor?x.whiskerColor:A[p].color:x.whiskerColor?x.whiskerColor:e,aa="number"===typeof A[p].whiskerThickness?A[p].whiskerThickness:"number"===typeof x.options.whiskerThickness?x.whiskerThickness:y,F=A[p].whiskerDashType?A[p].whiskerDashType:x.whiskerDashType, Y=s(A[p].whiskerLength)?s(x.options.whiskerLength)?r:x.whiskerLength:A[p].whiskerLength,Y="number"===typeof Y?0>=Y?0:Y>=r?r:Y:"string"===typeof Y?parseInt(Y)*r/100>r?r:parseInt(Y)*r/100:r,fa=1===Math.round(aa)%2?0.5:0,ma=A[p].stemColor?A[p].stemColor:A[p].color?x.stemColor?x.stemColor:A[p].color:x.stemColor?x.stemColor:e,ba="number"===typeof A[p].stemThickness?A[p].stemThickness:"number"===typeof x.options.stemThickness?x.stemThickness:y,G=1===Math.round(ba)%2?0.5:0,J=A[p].stemDashType?A[p].stemDashType: x.stemDashType,H=A[p].lineColor?A[p].lineColor:A[p].color?x.lineColor?x.lineColor:A[p].color:x.lineColor?x.lineColor:e,M="number"===typeof A[p].lineThickness?A[p].lineThickness:"number"===typeof x.options.lineThickness?x.lineThickness:y,S=A[p].lineDashType?A[p].lineDashType:x.lineDashType,L=1===Math.round(M)%2?0.5:0,R=x.upperBoxColor,xa=x.lowerBoxColor,sa=s(x.options.fillOpacity)?1:x.fillOpacity,O=x.dataPointIds[p];this._eventManager.objectMap[O]={id:O,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:p, x1:D,y1:g,x2:z,y2:k,x3:t,y3:m,x4:t,y4:n,y5:q,borderThickness:y,color:e,stemThickness:ba,stemColor:ma,whiskerThickness:aa,whiskerLength:Y,whiskerColor:Q,lineThickness:M,lineColor:H};c.save();0=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=0,p,t,g,f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth: 1;p=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&&f>p&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&& (this.dataPointMinWidth&&pp&&(k=p);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var m=0;ma.axisX.dataInfo.viewPortMax)&&!s(h[f].y)&&h[f].y.length&&"number"===typeof h[f].y[0]&&"number"===typeof h[f].y[1]){b=a.axisX.convertValueToPixel(g);p=a.axisY.convertValueToPixel(h[f].y[0]);t=a.axisY.convertValueToPixel(h[f].y[1]);var l=a.axisX.reversed?b+a.plotType.totalDataSeries*k/2-(a.previousDataSeriesCount+m)*k<<0:b-a.plotType.totalDataSeries*k/2+(a.previousDataSeriesCount+ m)*k<<0,v=a.axisX.reversed?l-k<<0:l+k<<0,b=h[f].color?h[f].color:q._colorSet[f%q._colorSet.length];if(p>t){var u=p;p=t;t=u}u=q.dataPointIds[f];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:f,x1:l,y1:p,x2:v,y2:t};ca(c,l,p,v,t,b,0,b,r,r,!1,!1,q.fillOpacity);b=P(u);w&&ca(this._eventManager.ghostCtx,l,p,v,t,b,0,null,!1,!1,!1,!1);if(h[f].indexLabel||q.indexLabel||h[f].indexLabelFormatter||q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn", dataPoint:h[f],dataSeries:q,indexKeyword:0,point:{x:l+(v-l)/2,y:h[f].y[1]>=h[f].y[0]?t:p},direction:h[f].y[1]>=h[f].y[0]?-1:1,bounds:{x1:l,y1:Math.min(p,t),x2:v,y2:Math.max(p,t)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:h[f],dataSeries:q,indexKeyword:1,point:{x:l+(v-l)/2,y:h[f].y[1]>=h[f].y[0]?p:t},direction:h[f].y[1]>=h[f].y[0]?1:-1,bounds:{x1:l,y1:Math.min(p,t),x2:v,y2:Math.max(p,t)},color:b})}}w&&(d.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(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};l.prototype.renderError= function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:d,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=!1,p=this.plotArea,t=0,g,k,m,n,q,h,r,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(p.x1,p.y1,p.width,p.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(p.x1, p.y1,p.width,p.height),this._eventManager.ghostCtx.clip());for(var v=0,u=0;ut&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,t));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&tt&&(u=t);if(0=Q.length?0:Q.length>=u?u:Q.length:"string"===typeof Q.length?parseInt(Q.length)*u/100>u?u:parseInt(Q.length)*u/100>u:u;Q.thickness="number"===typeof Q.thickness?0>Q.thickness?0:Math.round(Q.thickness):2;var aa={color:D[t].stemColor?D[t].stemColor:D[t].color?C.stemColor?C.stemColor:D[t].color:C.stemColor?C.stemColor:e,thickness:D[t].stemThickness?D[t].stemThickness:C.stemThickness,dashType:D[t].stemDashType? D[t].stemDashType:C.stemDashType};aa.thickness="number"===typeof aa.thickness?0>aa.thickness?0:Math.round(aa.thickness):2;D[t].getTime?r=D[t].x.getTime():r=D[t].x;if(!(ra.axisX.dataInfo.viewPortMax)&&!s(D[t].y)&&D[t].y.length&&"number"===typeof D[t].y[0]&&"number"===typeof D[t].y[1]){var ja=a.axisX.convertValueToPixel(r);b?k=ja:g=ja;ja=a.axisY.convertValueToPixel(D[t].y[0]);b?m=ja:q=ja;ja=a.axisY.convertValueToPixel(D[t].y[1]);b?n=ja:h=ja;b?(q=a.axisX.reversed?k+(z? v:1)*u/2-(z?E-1:0)*u<<0:k-(z?v:1)*u/2+(z?E-1:0)*u<<0,h=a.axisX.reversed?q-u<<0:q+u<<0):(m=a.axisX.reversed?g+(z?v:1)*u/2-(z?E-1:0)*u<<0:g-(z?v:1)*u/2+(z?E-1:0)*u<<0,n=a.axisX.reversed?m-u<<0:m+u<<0);!b&&q>h&&(ja=q,q=h,h=ja);b&&m>n&&(ja=m,m=n,n=ja);ja=C.dataPointIds[t];this._eventManager.objectMap[ja]={id:ja,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:t,x1:Math.min(m,n),y1:Math.min(q,h),x2:Math.max(n,m),y2:Math.max(h,q),isXYSwapped:b,stemProperties:aa,whiskerProperties:Q};y(c,Math.min(m, n),Math.min(q,h),Math.max(n,m),Math.max(h,q),e,Q,aa,b);w&&y(this._eventManager.ghostCtx,m,q,n,h,e,Q,aa,b);if(D[t].indexLabel||C.indexLabel||D[t].indexLabelFormatter||C.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:D[t],dataSeries:C,indexKeyword:0,point:{x:b?D[t].y[1]>=D[t].y[0]?m:n:m+(n-m)/2,y:b?q+(h-q)/2:D[t].y[1]>=D[t].y[0]?h:q},direction:D[t].y[1]>=D[t].y[0]?-1:1,bounds:{x1:b?Math.min(m,n):m,y1:b?q:Math.min(q,h),x2:b?Math.max(m,n):n,y2:b?h:Math.max(q,h)},color:e,axisSwapped:b}), this._indexLabels.push({chartType:"error",dataPoint:D[t],dataSeries:C,indexKeyword:1,point:{x:b?D[t].y[1]>=D[t].y[0]?n:m:m+(n-m)/2,y:b?q+(h-q)/2:D[t].y[1]>=D[t].y[0]?q:h},direction:D[t].y[1]>=D[t].y[0]?1:-1,bounds:{x1:b?Math.min(m,n):m,y1:b?q:Math.min(q,h),x2:b?Math.max(m,n):n,y2:b?h:Math.max(q,h)},color:e,axisSwapped:b})}}}w&&(d.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(p.x1,p.y1,p.width,p.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};l.prototype.renderRangeBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx: d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=0,p,t,g,k,f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=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 m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.9* (e.height*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>p&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&pp&&(m=p);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var n=0;na.axisX.dataInfo.viewPortMax)&&!s(r[f].y)&&r[f].y.length&&"number"===typeof r[f].y[0]&&"number"===typeof r[f].y[1]){p=a.axisY.convertValueToPixel(r[f].y[0]); t=a.axisY.convertValueToPixel(r[f].y[1]);g=a.axisX.convertValueToPixel(k);g=a.axisX.reversed?g+a.plotType.totalDataSeries*m/2-(a.previousDataSeriesCount+n)*m<<0:g-a.plotType.totalDataSeries*m/2+(a.previousDataSeriesCount+n)*m<<0;var v=a.axisX.reversed?g-m<<0:g+m<<0;p>t&&(b=p,p=t,t=b);b=r[f].color?r[f].color:h._colorSet[f%h._colorSet.length];ca(c,p,g,t,v,b,0,null,l,!1,!1,!1,h.fillOpacity);b=h.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:f, x1:p,y1:g,x2:t,y2:v};b=P(b);w&&ca(this._eventManager.ghostCtx,p,g,t,v,b,0,null,!1,!1,!1,!1);if(r[f].indexLabel||h.indexLabel||r[f].indexLabelFormatter||h.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:r[f],dataSeries:h,indexKeyword:0,point:{x:r[f].y[1]>=r[f].y[0]?p:t,y:g+(v-g)/2},direction:r[f].y[1]>=r[f].y[0]?-1:1,bounds:{x1:Math.min(p,t),y1:g,x2:Math.max(p,t),y2:v},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:r[f],dataSeries:h,indexKeyword:1,point:{x:r[f].y[1]>= r[f].y[0]?t:p,y:g+(v-g)/2},direction:r[f].y[1]>=r[f].y[0]?1:-1,bounds:{x1:Math.min(p,t),y1:g,x2:Math.max(p,t),y2:v},color:b})}}}w&&(d.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(e.x1, e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};l.prototype.renderRangeArea=function(a){function d(){if(x){for(var a=null,c=g.length-1;0<=c;c--)a=g[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,f=[],p=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(p.x1,p.y1,p.width,p.height);b.clip();w&&(e.beginPath(),e.rect(p.x1,p.y1,p.width,p.height),e.clip()); for(var t=0;ta.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!Q)))if(null!==n[h].y&&n[h].y.length&&"number"===typeof n[h].y[0]&&"number"===typeof n[h].y[1]){r=a.axisX.convertValueToPixel(u);l=a.axisY.convertValueToPixel(n[h].y[0]);s=a.axisY.convertValueToPixel(n[h].y[1]);q||Q?(m.connectNullData&&!q?(b.setLineDash&&(m.options.nullDataLineDashType||z===m.lineDashType&& m.lineDashType!==m.nullDataLineDashType)&&(g[g.length-1].newLineDashArray=E,z=m.nullDataLineDashType,b.setLineDash(y)),b.lineTo(r,l),w&&e.lineTo(r,l),g.push({x:r,y1:l,y2:s})):(b.beginPath(),b.moveTo(r,l),x={x:r,y:l},g=[],g.push({x:r,y1:l,y2:s}),w&&(e.beginPath(),e.moveTo(r,l))),Q=q=!1):(b.lineTo(r,l),g.push({x:r,y1:l,y2:s}),w&&e.lineTo(r,l),0==h%250&&d());u=m.dataPointIds[h];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:h,x1:r,y1:l,y2:s};hn[h].y[1]===a.axisY.reversed?-1:1,color:v}), this._indexLabels.push({chartType:"rangeArea",dataPoint:n[h],dataSeries:m,indexKeyword:1,point:{x:r,y:s},direction:n[h].y[0]>n[h].y[1]===a.axisY.reversed?1:-1,color:v})}else Q||q||d(),Q=!0;d();V.drawMarkers(f)}}w&&(c.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(p.x1,p.y1,p.width,p.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};l.prototype.renderRangeSplineArea=function(a){function d(a,c){var d=v(l,2);if(0=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,f=[],p=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(p.x1,p.y1,p.width,p.height);b.clip();w&&(e.beginPath(),e.rect(p.x1,p.y1,p.width,p.height),e.clip());for(var t=0;ta.axisX.dataInfo.viewPortMax&&(!k.connectNullData|| !h)))if(null!==m[n].y&&m[n].y.length&&"number"===typeof m[n].y[0]&&"number"===typeof m[n].y[1]){q=a.axisX.convertValueToPixel(q);h=a.axisY.convertValueToPixel(m[n].y[0]);r=a.axisY.convertValueToPixel(m[n].y[1]);var y=k.dataPointIds[n];this._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:n,x1:q,y1:h,y2:r};l[l.length]={x:q,y:h};s[s.length]={x:q,y:r};n=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,e=null,f=this.plotArea,p=0,t,g,k,m,n=a.axisY.convertValueToPixel(a.axisY.logarithmic? a.axisY.viewportMinimum:0),p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;g=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 q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?this.dataPointWidth:0.6*(f.width*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range): Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&p>g&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&gg&&(q=g);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(f.x1, f.y1,f.width,f.height),this._eventManager.ghostCtx.clip());for(var h=0;hk&&(e=g,g=k,k=e);a.axisY.reversed&&(e=g,g=k,k=e);e=s.dataPointIds[p];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:p,x1:t,y1:g,x2:E,y2:k};var Q=v[p].color?v[p].color:0v[p].y===a.axisY.reversed?1:-1,bounds:{x1:t,y1:Math.min(g,k),x2:E,y2:Math.max(g,k)},color:e})}}w&&(d.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(f.x1,f.y1,f.width,f.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad, animationBase:0}}};var W=function(a,d,c,b,e,f,p,g,l){if(!(0>c)){"undefined"===typeof g&&(g=1);if(!w){var k=Number((p%(2*Math.PI)).toFixed(8));Number((f%(2*Math.PI)).toFixed(8))===k&&(p-=1E-4)}a.save();a.globalAlpha=g;"pie"===e?(a.beginPath(),a.moveTo(d.x,d.y),a.arc(d.x,d.y,c,f,p,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(d.x,d.y,c,f,p,!1),0<=l&&a.arc(d.x,d.y,l*c,p,f,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth= 2,a.fill());a.globalAlpha=1;a.restore()}};l.prototype.renderPie=function(a){function d(){if(k&&m){for(var a=0,b=0,c=0,d=0,e=0;eMath.PI/2-u&&g.midAngleg.midAngle)c=e;a++}else if(g.midAngle> 3*Math.PI/2-u&&g.midAngle<3*Math.PI/2+u){if(0===b||h[d].midAngle>g.midAngle)d=e;b++}g.hemisphere=f>Math.PI/2&&f<=3*Math.PI/2?"left":"right";g.indexLabelTextBlock=new ia(l.plotArea.ctx,{fontSize:g.indexLabelFontSize,fontFamily:g.indexLabelFontFamily,fontColor:g.indexLabelFontColor,fontStyle:g.indexLabelFontStyle,fontWeight:g.indexLabelFontWeight,textAlign:g.indexLabelTextAlign,backgroundColor:g.indexLabelBackgroundColor,maxWidth:g.indexLabelMaxWidth,maxHeight:g.indexLabelWrap?5*g.indexLabelFontSize: 1.5*g.indexLabelFontSize,text:g.indexLabelText,padding:0,textBaseline:"top"});g.indexLabelTextBlock.measureText()}p=f=0;n=!1;for(e=0;eMath.PI/2-u&&g.midAngle3*Math.PI/2-u&&g.midAngle<3*Math.PI/2+u)&&(p<=b/2&&!n?(g.hemisphere="left",p++):(g.hemisphere="right",n=!0))}}function c(a){var b=l.plotArea.ctx;b.clearRect(q.x1, q.y1,q.width,q.height);b.fillStyle=l.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(b=0;bc){var e=0.07*z*Math.cos(h[b].midAngle),f=0.07*z*Math.sin(h[b].midAngle),p=!1;if(m[b].exploded){if(1E-9a.indexLabelTextBlock.y?e-d:c-f}function e(a){for(var c=null,d=1;db(h[c],h[a])||("right"===h[a].hemisphere?h[c].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y:h[c].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y)))break;else c=null;return c}function f(a,c,d){d=(d||0)+1;if(1E3c&&n.indexLabelTextBlock.yg)return 0;var q=0,t=0,t=q=q=0;0>c?n.indexLabelTextBlock.y-n.indexLabelTextBlock.height/2>p&&n.indexLabelTextBlock.y-n.indexLabelTextBlock.height/2+cg&&(c=n.indexLabelTextBlock.y+n.indexLabelTextBlock.height/ 2+c-g);c=n.indexLabelTextBlock.y+c;p=0;p="right"===n.hemisphere?A.x+Math.sqrt(Math.pow(w,2)-Math.pow(c-A.y,2)):A.x-Math.sqrt(Math.pow(w,2)-Math.pow(c-A.y,2));t=A.x+z*Math.cos(n.midAngle);q=A.y+z*Math.sin(n.midAngle);q=Math.sqrt(Math.pow(p-t,2)+Math.pow(c-q,2));t=Math.acos(z/w);q=Math.acos((w*w+z*z-q*q)/(2*z*w));c=qb(h[p],h[a])||("right"===h[a].hemisphere?h[p].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y:h[p].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y)))break;else p=null;t=p;q=e(a);g=p=0;0>c?(g="right"===n.hemisphere?t:q,k=c,null!==g&&(t=-c,c=n.indexLabelTextBlock.y-n.indexLabelTextBlock.height/2-(h[g].indexLabelTextBlock.y+h[g].indexLabelTextBlock.height/2),c-t+p.toFixed(x)&&(k=c>r?-(c-r):-(t-(g-p)))))):0r?c-r:t-(p-g)))));k&&(d=n.indexLabelTextBlock.y+k,c=0,c="right"===n.hemisphere?A.x+Math.sqrt(Math.pow(w,2)-Math.pow(d-A.y,2)):A.x-Math.sqrt(Math.pow(w,2)-Math.pow(d-A.y,2)),n.midAngle>Math.PI/2-u&&n.midAnglep.indexLabelTextBlock.x?c=p.indexLabelTextBlock.x-15:"right"===n.hemisphere&&("left"===a.hemisphere&&c3*Math.PI/2-u&&n.midAngle<3*Math.PI/2+u&&(p=(a-1+h.length)%h.length,p=h[p],a=h[(a+1+h.length)%h.length],"right"===n.hemisphere&&"left"===p.hemisphere&&ca.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x- 15)),n.indexLabelTextBlock.y=d,n.indexLabelTextBlock.x=c,n.indexLabelAngle=Math.atan2(n.indexLabelTextBlock.y-A.y,n.indexLabelTextBlock.x-A.x))}return k}function p(){var a=l.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,d=0,p=!0,c=0;10>c&&(1>c||0C){for(var D=u=0,F=0;Fu?g.indexLabelText="":g.indexLabelTextBlock.maxWidth=0.85*u,0.3*g.indexLabelTextBlock.maxWidthd&&(d=s)),s=s=0,0d&&(d=s)));var H=function(a, b,c){for(var d=[],e=0;d.push(h[b]),b!==c;b=(b+1+m.length)%m.length);d.sort(function(a,b){return a.y-b.y});for(b=0;bC){q=t.indexLabelTextBlock.x;var l=t.indexLabelTextBlock.y-t.indexLabelTextBlock.height/ 2,r=t.indexLabelTextBlock.y+t.indexLabelTextBlock.height/2,s=g.indexLabelTextBlock.y-g.indexLabelTextBlock.height/2,u=g.indexLabelTextBlock.x+g.indexLabelTextBlock.width,B=g.indexLabelTextBlock.y+g.indexLabelTextBlock.height/2;q=t.indexLabelTextBlock.x+t.indexLabelTextBlock.widthu+n||l>B+n||ra&&(a=k),p!==a&&(c=p,d+=-C),0===k%Math.max(m.length/10,3)&&(f=!0)):f=!0;f&&(0=a.dataSeriesIndexes.length)){var k= this.data[a.dataSeriesIndexes[0]],m=k.dataPoints,n=10,q=this.plotArea,h=k.dataPointEOs,r=2,w,v=1.3,u=20/180*Math.PI,x=6,A={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},C=0;a=!1;for(var D=0;Db&&(e=b,f=!0);var p=m[c].color?m[c].color:k._colorSet[c%k._colorSet.length];e>d&&W(l.plotArea.ctx,h[c].center,h[c].radius,p,k.type,d,e,k.fillOpacity,h[c].percentInnerRadius);if(f)break}g();l.dispatchEvent("dataAnimationIterationEnd",{chart:l});1<=a&&l.dispatchEvent("dataAnimationEnd",{chart:l})},function(){l.disableToolTip=!1;l._animator.animate(0,l.animatedRender?500:0,function(a){c(a);g();l.dispatchEvent("dataAnimationIterationEnd",{chart:l})});l.dispatchEvent("dataAnimationEnd",{chart:l})})}}}; var pa=function(a,d,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(d.y4-d.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(d.x1),Math.round(d.y1)),a.lineTo(Math.round(d.x2),Math.round(d.y2)),a.lineTo(Math.round(d.x3),Math.round(d.y3)),a.lineTo(Math.round(d.x4),Math.round(d.y4)),"undefined"!==d.x5&&(a.lineTo(Math.round(d.x5),Math.round(d.y5)),a.lineTo(Math.round(d.x6),Math.round(d.y6))),a.closePath(),a.fillStyle=b?b:d.color,a.fill(),a.globalAplha=1,a.restore())};l.prototype.renderFunnel= function(a){function d(){for(var a=0,b=[],c=0;cn?(n=c,p=(b+n)*(e-g)/2,a-=p,m=e-g,g+=e-g,m+=0==n?0:a/n,g+=a/n,p=!0):(m=(Math.abs($)*b-Math.sqrt(n))/2,n=b-2*m/Math.abs($),g+=m,g>e&&(g-=m,n=c,p=(b+n)*(e-g)/2,a-=p,m=e-g,g+=e-g,m+=a/n,g+=a/n,p=!0),b=n)),d.push(m);return d}function b(){if(u&&x){for(var a,b,c,d,e,f,k,p,g,m,n,q,t,l,r,B=[],v=[],A={percent:null,total:null},C=null,z=0;zB[z]&&(B[z]=z!==ca?u.reversed?O[z].x3-O[z].x4:O[z].x2-O[z].x1:O[z].x2-O[z].x1,B[z]/=2));t=b.indexLabelMaxWidth?b.indexLabelMaxWidth: u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:B[z];if(t>B[z]||0>t)t=B[z];v[z]="inside"===u.indexLabelPlacement?O[z].height:!1;A=y.getPercentAndTotal(u,b);if(u.indexLabelFormatter||b.indexLabelFormatter)C={chart:y.options,dataSeries:u,dataPoint:b,total:A.total,percent:A.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(C):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,u,z):u.indexLabelFormatter?u.indexLabelFormatter(C):u.indexLabel?y.replaceKeywordsWithValue(u.indexLabel,b,u,z):b.label? b.label:"";0>=m&&(m=0);1E3>t&&1E3-tk?k:u.indexLabelMaxWidth:k,p=I.length-1;0<=p;p--){h=x[I[p].id];c=I[p];d=c.textBlock;b=(a=q(p)b.y&&(e=!0);c=h.indexLabelMaxWidth||k;if(c>k||0>c)c=k;f.push(c)}if(e)for(p=I.length-1;0<=p;p--)a=O[p],I[p].textBlock.maxWidth=f[f.length-(p+1)],I[p].textBlock.measureText(),I[p].textBlock.x=M-k,c=I[p].textBlock.heightna+C&&(I[p].textBlock.y=na+C-I[p].height),I[p].textBlock.ysa+C&&(I[p].textBlock.y=sa+C-I[p].height))}function f(){var a, b,c,d;if("inside"!==u.indexLabelPlacement)for(var e=0;exa?h(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?cna+C&&(I[e].textBlock.y=na+C-I[e].height),I[e].textBlock.ysa+C&&(I[e].textBlock.y=sa+C-I[e].height)));else for(e=0;e=c?(b=e!=ca?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=ca?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,I[e].textBlock.x=b,I[e].textBlock.y=c):I[e].isDirty=!0)}function p(){function a(b,c){var d;if(0>b||b>=I.length)return 0;var e,f=I[b].textBlock;if(0>c){c*=-1;e= n(b);d=g(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0=c)return f.y+=c,c;if(b==O.length-1)return 0e)&&(p=q(t),!(p>=I.length-1)&&I[t].textBlock.y+I[t].height+da>I[p].textBlock.y&&(I[t].textBlock.y=I[t].textBlock.y+ I[t].height-e>e-I[t].textBlock.y?e+1:e-I[t].height-1))}for(p=O.length-1;0e&&(e=0,I[e].isDirty))break;if(I[p].textBlock.y=f){f=0;k+=I[f].height;break}e=n(f);if(0>e){f=0;k+=I[f].height;break}}if(f!=p){h=I[f].textBlock.y;a-=h;a=k-a;h=c(a,d,f);break}}}return h}function c(a,b,d){var e=[],f=0,h=0;for(a=Math.abs(a);d<= b;d++)e.push(O[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d+p.y.toFixed(6))&&(d=h.y+d+da-p.y, e=a(r,-d),ea?u.reversed?sa-C:na-C:I[a].textBlock.y+I[a].height+da)}function l(a,b,c){var d,e,h,p=[],g=C,n=[];-1!==b&&(0<=W.indexOf(b)?(e=W.indexOf(b),W.splice(e,1)):(W.push(b),W=W.sort(function(a,b){return a-b})));if(0===W.length)p=ga;else{e=C*(1!=W.length||0!=W[0]&&W[0]!=O.length-1?2:1)/k();for(var t=0;tn&&(n*=-1),c.y1+=b-n[d],c.y2+=b-n[d],c.y3+=b-n[d],c.y4+=b-n[d],c.y5&&(c.y5+=b-n[d],c.y6+=b-n[d]),n[d]= b}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ha=!0;d.clearRect(A.x1,A.y1,A.x2-A.x1,A.y2-A.y1);d.fillStyle=a.backgroundColor;d.fillRect(A.x1,A.y1,A.width,A.height);q.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=O[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 r(a){for(var b=0;b=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],x=u.dataPoints,A=this.plotArea,C=0.025*A.width,D=0.01*A.width,z=0,E=A.height-2*C,F=Math.min(A.width-2*D,2.8*A.height),J=!1,H=0;HE?ba=E:0>=ba&&(ba=0),G>a?G=a-0.5:0>=G&&(G=0)):"pyramid"===u.type&&(G=ba=0,u.reversed=u.reversed?!1:!0);var D=H+a/2,X=H,Z=H+a,na=u.reversed?P:Y,L=D-G/2,V=D+G/2,xa=u.reversed?Y+ba:P-ba,sa=u.reversed?Y:P;a=[];var D=[],O=[],F=[],T=Y,ca,$=(xa-na)/(L-X),ea=-$,H="area"===(u.valueRepresents?u.valueRepresents:"height")?c():d();if(-1!==H){if(u.reversed)for(F.push(T), G=H.length-1;0a&&(z=a));for(G=0;G
Please right click on the image and save it to your device
"),d.document.close()}}};l.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),d=document.createElement("iframe"); d.setAttribute("class","canvasjs-chart-print-frame");d.setAttribute("style","position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;");d.style.height=this.height+"px";this._canvasJSContainer.appendChild(d);var c=this,b=d.contentWindow||d.contentDocument.document||d.contentDocument;b.document.open();b.document.write('\n');b.document.close();setTimeout(function(){b.focus(); b.print();setTimeout(function(){c._canvasJSContainer.removeChild(d)},1E3)},500)};l.prototype.getPercentAndTotal=function(a,d){var c=null,b=null,e=c=null;if(0<=a.type.indexOf("stacked"))b=0,c=d.x.getTime?d.x.getTime():d.x,c in a.plotUnit.yTotals&&(b=a.plotUnit.yTotals[c],c=a.plotUnit.yAbsTotals[c],e=isNaN(d.y)?0:0===c?0:100*(d.y/c));else if("pie"===a.type||"doughnut"===a.type||"funnel"===a.type||"pyramid"===a.type){for(c=b=0;c=p||"undefined"===typeof p||0>=v||"undefined"===typeof v)){if("horizontal"===this.orientation){q.textBlock=new ia(this.ctx,{x:0,y:0,maxWidth:v,maxHeight:this.itemWrap?p:this.lineHeight,angle:0,text:q.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor, fontStyle:this.fontStyle,textBaseline:"middle"});q.textBlock.measureText();null!==this.itemWidth&&(q.textBlock.width=this.itemWidth-(w+g+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0)));if(!n||n.width+Math.round(q.textBlock.width+w+g+(0===n.width?0:this.horizontalSpacing)+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))>f)n={items:[],width:0},k.push(n),this.height+=h,h=0;h=Math.max(h,q.textBlock.height)}else q.textBlock= new ia(this.ctx,{x:0,y:0,maxWidth:A,maxHeight:!0===this.itemWrap?p:1.5*this.fontSize,angle:0,text:q.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),q.textBlock.measureText(),null!==this.itemWidth&&(q.textBlock.width=this.itemWidth-(w+g+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))),this.height>0,0),this.dataPoints.length):0):(m=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,m=0>0,0),this.dataPoints.length):0));for(;;){f= 0a?b.x/a:a/b.x:Math.abs(b.x-a);nm-e&&m+e>=this.dataPoints.length)break;-1===p?(e++,p=1):p=-1}return d||(c.dataPoint.x.getTime?c.dataPoint.x.getTime():c.dataPoint.x)!==(a.getTime?a.getTime():a)?d&&null!==c.dataPoint?c:null:c};H.prototype.getDataPointAtXY=function(a,d,c){if(!this.dataPoints||0=== this.dataPoints.length||athis.chart.plotArea.x2||dthis.chart.plotArea.y2)return null;c=c||!1;var b=[],e=0,f=0,p=1,g=!1,l=Infinity,k=0,m=0,n=0;if("none"!==this.chart.plotInfo.axisPlacement)if(n=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:d}),this.axisX.logarithmic)var q=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),n=1>0,0),this.dataPoints.length):0;else q=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0>0,0),this.dataPoints.length):0;for(;;){f=0= q.x1&&(a<=q.x2&&d>=q.y1&&d<=q.y2)&&(b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y1-d),Math.abs(q.y2-d))}),g=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var s=la("markerSize",h,this)||4,w=c?20:s,r=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-d,2));r<=w&&b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:r});q= Math.abs(q.x1-a);q<=l?l=q:0w&&(r=Math.atan2(d-s.y,a-s.x),0>r&&(r+=2*Math.PI),r=Number(((180*(r/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(q.startAngle/Math.PI)%360+360)%360).toFixed(12)),w=Number(((180*(q.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===w&&1=w&&0!==h.y&&(w+=360,rs&&rr.y1&&dr.y6?(f=r.x6+(r.x5-r.x6)/(r.y5-r.y6)*(d-r.y6),r=r.x3+(r.x4-r.x3)/(r.y4-r.y3)*(d-r.y3)):(f=r.x1+(r.x6-r.x1)/(r.y6-r.y1)*(d-r.y1),r=r.x2+(r.x3-r.x2)/(r.y3-r.y2)*(d-r.y2)):(f=r.x1+(r.x4-r.x1)/(r.y4-r.y1)*(d-r.y1),r=r.x2+(r.x3-r.x2)/(r.y3-r.y2)*(d-r.y2)),a>f&&a= q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&d>=q.y4-q.borderThickness/2&&d<=q.y1+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)=q.y1&&d<=q.y4)b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-d),Math.abs(q.y3-d))}),g=!0;break;case "candlestick":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&d>=q.y2-q.borderThickness/2&&d<=q.y3+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)=q.y1&&d<=q.y4)b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-d),Math.abs(q.y3-d))}),g=!0;break;case "ohlc":if(Math.abs(q.x2-a+q.x1-a)=q.y2&&d<=q.y3||a>=q.x1&&a<=(q.x2+q.x1)/2&&d>=q.y1-q.borderThickness/2&&d<=q.y1+q.borderThickness/2||a>=(q.x1+q.x2)/2&&a<=q.x2&&d>=q.y4-q.borderThickness/2&&d<=q.y4+q.borderThickness/2)b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a), Math.abs(q.x2-a),Math.abs(q.y2-d),Math.abs(q.y3-d))}),g=!0}if(g||1E3n-e&&n+e>=this.dataPoints.length)break;-1===p?(e++,p=1):p=-1}a=null;for(d=0;dn[h].endValue;h++);a=h=n[h].startValue&&c<=n[h].endValue;m=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:m,label:this.labels[m]?this.labels[m]:null}):"axisX"===this.type&&this.labels[m]?this.labels[m]:ea(m,this.valueFormatString,this.chart._cultureInfo),a=new ia(this.ctx,{x:0,y:0,maxWidth:f,maxHeight:p,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor, borderColor:this.labelBorderColor,cornerRadius:this.labelCornerRadius,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:m,textBlock:a,effectiveHeight:null}))}h=q;for(c=this.intervalStartPosition;c<=e;c=parseFloat(1E-12>this.interval?this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase, this.interval):c+this.interval:(this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase,this.interval):c+this.interval).toFixed(12))){for(;hn[h].endValue;h++);a=h=n[h].startValue&&c<=n[h].endValue;m=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:m,label:this.labels[m]?this.labels[m]:null}):"axisX"===this.type&&this.labels[m]?this.labels[m]:ea(m,this.valueFormatString,this.chart._cultureInfo),a=new ia(this.ctx,{x:0, y:0,maxWidth:f,maxHeight:p,angle:this.labelAngle,text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:m,textBlock:a,effectiveHeight:null}))}}else for(this.intervalStartPosition= this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),e=Va(new Date(this.viewportMaximum),this.interval,this.intervalType),h=q,c=this.intervalStartPosition;cn[h].endValue;h++);m=a;a=h=n[h].startValue&&a<=n[h].endValue;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:new Date(m),label:this.labels[m]?this.labels[m]:null}):"axisX"===this.type&&this.labels[m]? this.labels[m]:Aa(m,this.valueFormatString,this.chart._cultureInfo),a=new ia(this.ctx,{x:0,y:0,maxWidth:f,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:p,angle:this.labelAngle,text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle, textBaseline:"middle"}),this._labels.push({position:m,textBlock:a,effectiveHeight:null,breaksLabelType:void 0}))}if("bottom"===this._position||"top"===this._position)g=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval? Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*R[this.intervalType+"Duration"]*this.interval,f="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(p="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize);else if("left"===this._position||"right"===this._position)g=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height* Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*R[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(f="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),p="undefined"=== typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize;for(b=0;bthis.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position|| "top"===this._position)if(f=0.9*g>>0,q=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=f;this.sessionVariables.labelMaxHeight=p;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;cq&&(v=c,q=m.width)}c=0;for(c=this.intervalStartPosition>0>2*f&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>f?-25:this.sessionVariables.labelAngle):s(this.options.labelMaxWidth)? (this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=p,this.sessionVariables.labelMaxWidth=f,d&&r.width+d.width>>0>2*f&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=m)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>f?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=p,this.sessionVariables.labelWrap=this.labelWrap);else{if(s(this.options.labelWrap))if(!s(this.options.labelMaxWidth))this.options.labelMaxWidth< f?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=b):(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=p);else if(!s(d))if(b=r.width+d.width>>0,h=this.labelFontSize,qn&&(n=b-2*f,b>=2*f&&b<2.2*f?(this.sessionVariables.labelMaxWidth=f,s(this.options.labelFontSize)&&12=2.2*f&&b<2.8*f?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=m,this.sessionVariables.labelFontSize=h):b>=2.8*f&&b<3.2*f?(this.sessionVariables.labelMaxWidth=Math.max(f,q),this.sessionVariables.labelWrap=!0,s(this.options.labelFontSize)&&12=3.2*f&&b<3.6*f?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=m,this.sessionVariables.labelFontSize=this.labelFontSize):b>3.6*f&&b<5*f?(s(this.options.labelFontSize)&&125*f&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=f,this.sessionVariables.labelFontSize=h,this.sessionVariables.labelMaxHeight=p,this.sessionVariables.labelAngle=this.labelAngle));else if(v===c&&(0===v&&q+this._labels[v+1].textBlock.measureText().width-2*f>n||v===this._labels.length-1&&q+this._labels[v-1].textBlock.measureText().width-2*f>n||0n&& q+this._labels[v-1].textBlock.measureText().width-2*f>n))n=0===v?q+this._labels[v+1].textBlock.measureText().width-2*f:q+this._labels[v-1].textBlock.measureText().width-2*f,this.sessionVariables.labelFontSize=s(this.options.labelFontSize)?h:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=m;else if(0===n)for(this.sessionVariables.labelFontSize=s(this.options.labelFontSize)?h:this.options.labelFontSize,this.sessionVariables.labelWrap= !0,b=0;b>0>2*f&&(this.sessionVariables.labelAngle=-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?p:Math.min((b-f*Math.cos(Math.PI/ 180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),b),m=0!=this.labelAngle?(k-(l+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):f,this.sessionVariables.labelMaxHeight=this.labelWrap?(k-m*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)):1.5*this.labelFontSize,s(this.options.labelWrap))?s(this.options.labelWrap)&&(this.labelWrap&&!s(this.options.labelMaxWidth)? (this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:m,this.sessionVariables.labelMaxHeight=p):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=m,this.sessionVariables.labelMaxHeight=b<0.9*g?0.9*g:b,this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth? this.options.labelMaxWidth:m):(s(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:m,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=p)}for(b=0;b>0:this.options.labelMaxWidth,p="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=f;this.sessionVariables.labelMaxHeight=p;this.sessionVariables.labelAngle=s(this.sessionVariables.labelAngle)? 0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c>0,g-2*p>q&&(q=g-2*p,g>=2*p&&g<2.4*p?(s(this.options.labelFontSize)&&12=2.4*p&&g<2.8*p?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):g>=2.8*p&&g<3.2*p?(this.sessionVariables.labelMaxHeight=p,this.sessionVariables.labelWrap=!0,s(this.options.labelFontSize)&&12=3.2*p&&g<3.6*p?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=this.labelFontSize):g>3.6*p&&g<10*p?(s(this.options.labelFontSize)&&1210*p&&g<50*p&&(s(this.options.labelFontSize)&&12>0:1.5*this.labelFontSize; if("left"===this._position||"right"===this._position)s(f.options.labelWrap)&&!s(this.sessionVariables.stripLineLabelMaxHeight)?y=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=y=f.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;s(f.labelBackgroundColor)&&(f.labelBackgroundColor="#EEEEEE")}else p="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,y=s(f.options.labelWrap)||f.labelWrap?"bottom"===this._position|| "top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,s(f.labelBackgroundColor)&&(s(f.startValue)&&0!==f.startValue?f.labelBackgroundColor=w?"transparent":null:f.labelBackgroundColor="#EEEEEE");a=new ia(this.ctx,{x:0,y:0,backgroundColor:f.labelBackgroundColor,borderColor:f.labelBorderColor,borderThickness:f.labelBorderThickness,cornerRadius:f.labelCornerRadius,maxWidth:f.options.labelMaxWidth?f.options.labelMaxWidth:p,maxHeight:y,angle:this.labelAngle,text:f.labelFormatter? f.labelFormatter({chart:this.chart,axis:this,stripLine:f}):f.label,textAlign:this.labelTextAlign,fontSize:"outside"===f.labelPlacement?f.options.labelFontSize?f.labelFontSize:this.labelFontSize:f.labelFontSize,fontFamily:"outside"===f.labelPlacement?f.options.labelFontFamily?f.labelFontFamily:this.labelFontFamily:f.labelFontFamily,fontWeight:"outside"===f.labelPlacement?f.options.labelFontWeight?f.labelFontWeight:this.labelFontWeight:f.labelFontWeight,fontColor:f.labelFontColor||f.color,fontStyle:"outside"=== f.labelPlacement?f.options.labelFontStyle?f.labelFontStyle:this.fontWeight:f.labelFontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:f.value,textBlock:a,effectiveHeight:null,stripLine:f})}};E.prototype.createLabelsAndCalculateWidth=function(){var a=0,d=0;this._labels=[];this._stripLineLabels=[];var c=this.chart.isNavigator?0:5;if("left"===this._position||"right"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0=this.viewportMinimum&&this._stripLineLabels[d].stripLine.value<=this.viewportMaximum)&& (b=this._stripLineLabels[d].textBlock,e=b.measureText(),f=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(e.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),a=this.viewportMinimum&&this._stripLineLabels[c].stripLine.value<=this.viewportMaximum)&&(d=this._stripLineLabels[c].textBlock,e=d.measureText(),f=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(e.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),aq[h].viewportMaximum);w++)r[w].endValue=q[h].viewPortMinimum&&(q[h].scaleBreaks.lastBreakIndex=w));for(var v=w=0,u=0,x=0,A=0,y=0,D=0,z,E,F=g=0,H,J,K,r=H=J=K=!1,h=0;h w;){var G=0,S=0,U=0,X=0,W=e=0,L=0,Z=0,T=0,V=0,O=0,$=0;if(c&&0m.width-n?m.width-n:f.x2-$-Z);if(a&&0m.width-n?m.width-n:f.x2-$-Z),a[h]._labels&&1l&&(g+=0a[h].labelAngle?z-vl&&(g=E+u/2-l-$),z-va[h].labelAngle&&0m.width-n?m.width-n:f.x2-$-Z),d[h].lineCoordinates.width=Math.abs(l-p),d[h]._labels&&1w;){T=X=S=U=Z=L=W=e=R=P=G=V=0;if(a&&0m.width-10?m.width-10:f.x2-T-W),c[h].labelAutoFit&&!s(x)&&(0c[h].labelAngle?Math.max(p,x):0===c[h].labelAngle?Math.max(p,x/2):p),0b[h].chart.width-10?b[h].chart.width-10:f.x2-T-W),b[h]&&b[h].labelAutoFit&&!s(y)&&(0c[h].chart.height?c[h].chart.height:f.y2),c[h].lineCoordinates.y1=g-(n[h]+c[h].margin+V),c[h].lineCoordinates.y2=g-(n[h]+c[h].margin+V),"inside"===c[h].labelPlacement&&0m.height-Math.max(L,10)?m.height-Math.max(L,10):f.y2-U):f.y2>m.height-Math.max(L,10)?m.height-Math.max(L,10):f.y2;if(c&&0c[L].labelAngle?Math.max(l,x):0===c[L].labelAngle?Math.max(l,x/2):l,p= 0>c[L].labelAngle||0===c[L].labelAngle?l-X:p);if(b&&0m.height-Math.max(L,10)?m.height-Math.max(L,10):f.y2-U):f.y2>m.height-Math.max(L,10)?m.height-Math.max(L,10):f.y2;if(c&&0c[L].labelAngle?Math.max(l,x):0===c[L].labelAngle?Math.max(l,x/2):l,p=0>c[L].labelAngle||0===c[L].labelAngle?l-T:p);if(b&&0d[f].spacing?0:Math.abs(d[f].spacing/c),this.logarithmic&&(d[f].size=Math.pow(this.logarithmBase,d[f].size))};E.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a= this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var d=0;dthis.conversionParameters.maximum);d++)a[d].endValue=this.conversionParameters.minimum&&(a[d].startPixel=this.convertValueToPixel(a[d].startValue),this.scaleBreaks.lastBreakIndex=d),a[d].endValue<=this.conversionParameters.maximum&& (a[d].endPixel=this.convertValueToPixel(a[d].endValue)))}};E.prototype.renderLabelsTicksAndTitle=function(){var a=this,d=!1,c=0,b=0,e=1,f=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,g,l=this.viewportMaximum,s=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length- 1;0<=k;k--){n=this._labels[k];if(n.positionthis.viewportMaximum||!(k===this._labels.length-1||gthis.lineCoordinates.width*e&&this.labelAutoFit&&(d=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],m,l=this.viewportMaximum,s=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];if(n.positionthis.viewportMaximum||!(k===this._labels.length-1||mthis.lineCoordinates.height*e&&this.labelAutoFit&&(d=!0)}}this.logarithmic&&(!this.equidistantInterval&& this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var k=0,n,q;if("bottom"===this._position){for(k=0;kthis.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<< 0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===n.textBlock.angle?(q.x-=n.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y-(("inside"===this.tickPlacement?this.tickLength:0)+n.textBlock.height-n.textBlock.fontSize/2):q.y+("inside"===this.tickPlacement?0:this.tickLength)+n.textBlock.fontSize/2+5):(q.x="inside"===this.labelPlacement?0>this.labelAngle?q.x:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):q.x-(0>this.labelAngle?n.textBlock.width* Math.cos(Math.PI/180*this.labelAngle):0),q.y="inside"===this.labelPlacement?0>this.labelAngle?q.y-("inside"===this.tickPlacement?this.tickLength:0)-5:q.y-("inside"===this.tickPlacement?this.tickLength:0)-Math.abs(n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5):q.y+("inside"===this.tickPlacement?0:this.tickLength)+Math.abs(0>this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),n.textBlock.x=q.x,n.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd", function(){for(k=0;ka.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+ this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height-3,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;kthis.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle= this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===n.textBlock.angle?(q.x-=n.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+n.textBlock.height-n.textBlock.fontSize/2)):(q.x="inside"===this.labelPlacement?0< this.labelAngle?q.x:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):q.x+(n.textBlock.height-this.labelFontSize)*Math.sin(Math.PI/180*this.labelAngle)-(0a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle= a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(k= 0;kthis.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===this.labelAngle?(n.textBlock.y= q.y,n.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(n.textBlock.y="inside"===this.labelPlacement?q.y:q.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:0a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth= a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+1,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"=== this._position){for(k=0;kthis.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===this.labelAngle? (n.textBlock.y=q.y,n.textBlock.x="inside"===this.labelPlacement?q.x-n.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+("inside"===this.tickPlacement?0:this.tickLength)+5):(n.textBlock.y="inside"===this.labelPlacement?q.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0>this.labelAngle?q.y:q.y-(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)- ("inside"===this.tickPlacement?this.tickLength:0)-5:0a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position), a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}f= 0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationEnd",function(){for(k=0;ka.viewportMaximum||d&&0!==f++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),n.textBlock.render(!0),a.ctx.restore())},this);else for(k=0;kthis.viewportMaximum||d&&0!==f++%2&&this.labelAutoFit)||n.textBlock.render(!0)};E.prototype.renderInterlacedColors= function(){var a=this.chart.plotArea.ctx,d,c,b=this.chart.plotArea,e=0;d=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;ethis._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,d.x),b.y1,Math.abs(c.x-d.x),Math.abs(b.y1-b.y2)),d=!1): d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;ethis._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x1,Math.min(c.y,d.y),Math.abs(b.x1-b.x2),Math.abs(d.y-c.y)),d=!1):d=!0;a.beginPath()};E.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&& 0this.viewportMaximum||s(k.value)||isNaN(this.range))||"value"===a&&(k.startValue<=this.viewportMinimum&&k.endValue<=this.viewportMinimum||k.startValue>=this.viewportMaximum&&k.endValue>=this.viewportMaximum||s(k.startValue)||s(k.endValue)||isNaN(this.range))||l.push(k))}for(b=0;bthis.viewportMaximum||isNaN(this.range))){a=this.getPixelCoordinatesOnAxis(c.position);if("outside"===c.stripLine.labelPlacement)if(k&&(this.ctx.strokeStyle=k.color,"pixel"===k._thicknessType&&(this.ctx.lineWidth=k.thickness)),"bottom"===this._position){var m=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0;this.ctx.beginPath();this.ctx.moveTo(m,a.y<<0);this.ctx.lineTo(m,a.y+this.tickLength<<0);this.ctx.stroke(); 0===this.labelAngle?(a.x-=c.textBlock.width/2,a.y+=this.tickLength+c.textBlock.fontSize/2):(a.x-=0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,a.y+=this.tickLength+Math.abs(0>this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5))}else"top"===this._position?(m=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,this.ctx.beginPath(),this.ctx.moveTo(m,a.y<<0),this.ctx.lineTo(m,a.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(a.x-=c.textBlock.width/ 2,a.y-=this.tickLength+c.textBlock.height):(a.x+=(c.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0this.labelAngle?a.y:a.y-(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),a.x=0this.chart.plotArea.x1?s(k.startValue)?a.x-=c.textBlock.height-c.textBlock.fontSize/2:a.x-=c.textBlock.height/2-c.textBlock.fontSize/2+3:(c.textBlock.angle=90,s(k.startValue)?a.x+=c.textBlock.height-c.textBlock.fontSize/2:a.x+=c.textBlock.height/2-c.textBlock.fontSize/2+3),a.y=-90===c.textBlock.angle?"near"=== c.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y1+c.textBlock.width+3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth: this.chart.plotArea.height-3,c.textBlock.measureText(),a.x-c.textBlock.height>this.chart.plotArea.x1?s(k.startValue)?a.x-=c.textBlock.height-c.textBlock.fontSize/2:a.x-=c.textBlock.height/2-c.textBlock.fontSize/2+3:(c.textBlock.angle=90,s(k.startValue)?a.x+=c.textBlock.height-c.textBlock.fontSize/2:a.x+=c.textBlock.height/2-c.textBlock.fontSize/2+3),a.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+c.textBlock.width+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+ this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y2-c.textBlock.width-3):"left"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),a.y-c.textBlock.height>this.chart.plotArea.y1? s(k.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize+3:a.y-c.textBlock.heightthis.chart.plotArea.y1?s(k.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize/2-3:a.y-c.textBlock.heightthis.viewportMaximum||isNaN(this.range))||a[d].render(this.maskCtx);this.maskCtx.restore()}};E.prototype.renderCrosshair=function(a,d){isFinite(this.minimum)&&isFinite(this.maximum)&&(this.crosshair.render(a,d),this.crosshair.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this,value:this.crosshair.value},this))};E.prototype.showCrosshair=function(a){s(a)||(athis.viewportMaximum)||("top"===this._position||"bottom"===this._position?this.crosshair.render(this.convertValueToPixel(a), null,a):this.crosshair.render(null,this.convertValueToPixel(a),a))};E.prototype.renderGrid=function(){if(this.gridThickness&&0this.viewportMaximum|| this._labels[b].breaksLabelType)||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[b].position),d=1===a.lineWidth%2?(d.x<<0)+0.5:d.x<<0,a.moveTo(d,c.y1<<0),a.lineTo(d,c.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var b=0;bthis.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[b].position),d= 1===a.lineWidth%2?(d.y<<0)+0.5:d.y<<0,a.moveTo(c.x1<<0,d),a.lineTo(c.x2<<0,d),a.stroke());a.restore()}};E.prototype.renderAxisLine=function(){var a=this.chart.ctx,d=w?this.chart._preRenderCtx:a,c=Math.ceil(this.tickThickness/(this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),e,f;d.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(e=this.lineCoordinates.x2,f=this.lineCoordinates.x1):(e=this.lineCoordinates.x1,f=this.lineCoordinates.x2); d.lineWidth=this.lineThickness;d.strokeStyle=this.lineColor?this.lineColor:"black";d.setLineDash&&d.setLineDash(N(this.lineDashType,this.lineThickness));var g=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;d.beginPath();if(this.scaleBreaks&&!s(this.scaleBreaks.firstBreakIndex))if(s(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(var l=this.scaleBreaks.firstBreakIndex;l<=this.scaleBreaks.lastBreakIndex;l++)d.moveTo(e, g),d.lineTo(this.scaleBreaks._appliedBreaks[l].startPixel+c,g),e=this.scaleBreaks._appliedBreaks[l].endPixel+b;e&&(d.moveTo(e,g),d.lineTo(f,g));d.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){this.reversed?(e=this.lineCoordinates.y1,f=this.lineCoordinates.y2):(e=this.lineCoordinates.y2,f=this.lineCoordinates.y1);d.lineWidth=this.lineThickness;d.strokeStyle=this.lineColor;d.setLineDash&&d.setLineDash(N(this.lineDashType,this.lineThickness));g=1===this.lineThickness% 2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0;d.beginPath();if(this.scaleBreaks&&!s(this.scaleBreaks.firstBreakIndex))if(s(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+c;else for(l=this.scaleBreaks.firstBreakIndex;l<=this.scaleBreaks.lastBreakIndex;l++)d.moveTo(g,e),d.lineTo(g,this.scaleBreaks._appliedBreaks[l].startPixel+b),e=this.scaleBreaks._appliedBreaks[l].endPixel+c;e&&(d.moveTo(g,e),d.lineTo(g,f));d.stroke()}w&& (a.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx&&this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),d.clearRect(0,0,this.chart.width,this.chart.height));d.restore()};E.prototype.getPixelCoordinatesOnAxis=function(a){var d={};if("bottom"===this._position||"top"===this._position)d.x=this.convertValueToPixel(a),d.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)d.y= this.convertValueToPixel(a),d.x=this.lineCoordinates.x2;return d};E.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var d=0,c=0,b,d=!0,e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;if(this.logarithmic){a=b=Math.pow(this.logarithmBase,(c-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit);if(c<=this.conversionParameters.reference===("left"===this._position|| "right"===this._position)!==this.reversed)for(c=0;ce[c].startValue/this.conversionParameters.minimum){b/=e[c].startValue/this.conversionParameters.minimum;if(be[c].startValue/e[c- 1].endValue){b/=e[c].startValue/e[c-1].endValue;if(bthis.conversionParameters.minimum))if(d)if(e[c].endValue>this.conversionParameters.minimum){if(1 e[c].startValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].startValue/this.conversionParameters.minimum*Math.pow(e[c].size,Math.log(e[c].startValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue))*b,b*=Math.pow(e[c].size,Math.log(this.conversionParameters.minimum/e[c].startValue)/Math.log(e[c].endValue/e[c].startValue));d=!1}else if(b1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size;d=!1}else break;else if(b1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size}else break;d=a*this.viewportMinimum}else{a=b=(c-this.conversionParameters.reference)/ this.conversionParameters.pixelPerUnit;if(c<=this.conversionParameters.reference===("left"===this._position||"right"===this._position)!==this.reversed)for(c=0;c=e[c].size?0:b*(e[c].endValue-e[c].startValue)/e[c].size;break}else a+=e[c].endValue-this.conversionParameters.minimum- e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue),b-=e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue);d=!1}else if(b>e[c].startValue-this.conversionParameters.minimum){b-=e[c].startValue-this.conversionParameters.minimum;if(be[c].startValue-e[c- 1].endValue){b-=e[c].startValue-e[c-1].endValue;if(bthis.conversionParameters.minimum))if(d)if(e[c].endValue>this.conversionParameters.minimum)if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size>e[c].startValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/ e[c].size;break}else a+=e[c].startValue-this.conversionParameters.minimum+e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),b+=e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),d=!1;else if(b-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue- e[c].size;b+=e[c].size;d=!1}else break;else if(b-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-e[c].size;b+=e[c].size}else break;d=this.conversionParameters.minimum+a}return d};E.prototype.convertValueToPixel=function(a){a=this.getApparentDifference(this.conversionParameters.minimum,a,a);return this.logarithmic?this.conversionParameters.reference+ this.conversionParameters.pixelPerUnit*Math.log(a/this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:"axisX"===this.type?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5};E.prototype.getApparentDifference=function(a,d,c,b){var e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[]; if(this.logarithmic){c=s(c)?d/a:c;for(var f=0;fe[f].endValue||(a<=e[f].startValue&&d>=e[f].endValue?c=c/e[f].endValue*e[f].startValue*e[f].size:a>=e[f].startValue&&d>=e[f].endValue?c=c/e[f].endValue*a*Math.pow(e[f].size,Math.log(e[f].endValue/a)/Math.log(e[f].endValue/e[f].startValue)):a<=e[f].startValue&&d<=e[f].endValue?c=c/d*e[f].startValue*Math.pow(e[f].size,Math.log(d/e[f].startValue)/Math.log(e[f].endValue/e[f].startValue)):!b&&(a>e[f].startValue&&de[f].endValue||(a<=e[f].startValue&&d>=e[f].endValue?c=c-e[f].endValue+e[f].startValue+e[f].size:a>e[f].startValue&&d>=e[f].endValue?c=c-e[f].endValue+a+e[f].size*(e[f].endValue-a)/(e[f].endValue-e[f].startValue):a<=e[f].startValue&&de[f].startValue&& da[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&& this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*a[e].startValue,c=0a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*this.viewportMinimum,c=0a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+a[e].startValue,c=0a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+this.viewportMinimum,c=0this.maxWidth?8:6);var a=Math.max(b,Math.floor(this.maxWidth/a)),e,f,g,b=0;!s(this.options.viewportMinimum)&&(!s(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&&(this.viewportMinimum=this.viewportMaximum=null); if(s(this.options.viewportMinimum)&&!s(this.sessionVariables.newViewportMinimum)&&!isNaN(this.sessionVariables.newViewportMinimum))this.viewportMinimum=this.sessionVariables.newViewportMinimum;else if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(s(this.options.viewportMaximum)&&!s(this.sessionVariables.newViewportMaximum)&&!isNaN(this.sessionVariables.newViewportMaximum))this.viewportMaximum=this.sessionVariables.newViewportMaximum;else if(null===this.viewportMaximum|| isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(b=0;b=this.scaleBreaks._appliedBreaks[b].startValue||!s(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[b].startValue||!s(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue)&&(!s(this.sessionVariables.newViewportMaximum)&& this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue||!s(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[b].endValue||!s(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue)){this.scaleBreaks._appliedBreaks.splice(b,1);break}if("axisX"===this.type){if(this.dataSeries&&0f?(b=Math.min(0.01*Math.abs(this.getApparentDifference(f,e,null,!0)),5),0<=f?e=f-b:f=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,f,null,!0)),0.05),0!==f&&(f+=b),0!==e&&(e-= b)),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1f&&(f=0));b=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?e:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum,null,!0);if("axisX"===this.type&&c){this.intervalType|| (b/1<=a?(this.interval=1,this.intervalType="millisecond"):b/2<=a?(this.interval=2,this.intervalType="millisecond"):b/5<=a?(this.interval=5,this.intervalType="millisecond"):b/10<=a?(this.interval=10,this.intervalType="millisecond"):b/20<=a?(this.interval=20,this.intervalType="millisecond"):b/50<=a?(this.interval=50,this.intervalType="millisecond"):b/100<=a?(this.interval=100,this.intervalType="millisecond"):b/200<=a?(this.interval=200,this.intervalType="millisecond"):b/250<=a?(this.interval=250,this.intervalType= "millisecond"):b/300<=a?(this.interval=300,this.intervalType="millisecond"):b/400<=a?(this.interval=400,this.intervalType="millisecond"):b/500<=a?(this.interval=500,this.intervalType="millisecond"):b/(1*R.secondDuration)<=a?(this.interval=1,this.intervalType="second"):b/(2*R.secondDuration)<=a?(this.interval=2,this.intervalType="second"):b/(5*R.secondDuration)<=a?(this.interval=5,this.intervalType="second"):b/(10*R.secondDuration)<=a?(this.interval=10,this.intervalType="second"):b/(15*R.secondDuration)<= a?(this.interval=15,this.intervalType="second"):b/(20*R.secondDuration)<=a?(this.interval=20,this.intervalType="second"):b/(30*R.secondDuration)<=a?(this.interval=30,this.intervalType="second"):b/(1*R.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):b/(2*R.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):b/(5*R.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):b/(10*R.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):b/(15*R.minuteDuration)<= a?(this.interval=15,this.intervalType="minute"):b/(20*R.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):b/(30*R.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):b/(1*R.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):b/(2*R.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):b/(3*R.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):b/(6*R.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):b/(1*R.dayDuration)<=a?(this.interval=1, this.intervalType="day"):b/(2*R.dayDuration)<=a?(this.interval=2,this.intervalType="day"):b/(4*R.dayDuration)<=a?(this.interval=4,this.intervalType="day"):b/(1*R.weekDuration)<=a?(this.interval=1,this.intervalType="week"):b/(2*R.weekDuration)<=a?(this.interval=2,this.intervalType="week"):b/(3*R.weekDuration)<=a?(this.interval=3,this.intervalType="week"):b/(1*R.monthDuration)<=a?(this.interval=1,this.intervalType="month"):b/(2*R.monthDuration)<=a?(this.interval=2,this.intervalType="month"):b/(3*R.monthDuration)<= a?(this.interval=3,this.intervalType="month"):b/(6*R.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=b/(1*R.yearDuration)<=a?1:b/(2*R.yearDuration)<=a?2:b/(4*R.yearDuration)<=a?4:Math.floor(E.getNiceNumber(b/(a-1),!0)/R.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=e-g/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=f+g/2;d?this.autoValueFormatString="MMM DD YYYY HH:mm": "year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString="hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString= "fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";b=E.getNiceNumber(b,!1);this.interval=this.options&&0f?(b=Math.min(0.01*Math.abs(this.getApparentDifference(f, e,null,!0)),5),0<=f?e=f-b:f=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,f,null,!0)),0.05),0!==f&&(f+=b),0!==e&&(e-=b)):(f="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1f&&(f=0)),Math.abs(this.getApparentDifference(e,f,null,!0)),"axisX"===this.type&&c){this.valueType="dateTime";if(null===this.minimum||isNaN(this.minimum))this.minimum=e-g/2,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum);if(null===this.maximum||isNaN(this.maximum))this.maximum=f+g/2,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum|| isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)}else this.intervalType=this.valueType="number",null===this.minimum&&(this.minimum="axisX"===this.type?e-g/2:Math.floor(e/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?f+g/2:Math.ceil(f/this.interval)* this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0===this.options.maximum&&(this.minimum-=10));s(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));s(this.sessionVariables.newViewportMaximum)&&(this.viewportMaximum=Math.min(this.viewportMaximum, this.maximum));this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&c?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/this.interval)*this.interval;this.valueFormatString||(this.valueFormatString=E.generateValueFormatString(this.range,2))}};E.prototype.calculateLogarithmicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),d=Math.log(this.logarithmBase), c;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3),b,e,f,g;g=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(g= 0;g=this.scaleBreaks._appliedBreaks[g].startValue||!s(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[g].startValue||!s(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[g].startValue)&&(!s(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[g].endValue|| !s(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[g].endValue||!s(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[g].endValue)){this.scaleBreaks._appliedBreaks.splice(g,1);break}"axisX"===this.type?(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,1===e/b&&(g=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval? 0.4:this.options.interval),e*=g,b/=g),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=b&&!isFinite(e)?(e="undefined"===typeof this.options.interval?0:this.options.interval,b=1):0>=b?b=e:isFinite(e)||(e=b),1===b&&1===e?(e*=this.logarithmBase- 1/this.logarithmBase,b=1):1===e/b?(g=Math.min(e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),e*=g,b/=g):b>e?(g=Math.min(b/e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=e?b=e/g:e=b*g):(g=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=g),1!==b&&(b/=g)),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null=== this.viewportMinimum||isNaN(this.viewportMinimum))&&1e&&(e=1));g=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);var l=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);this.intervalType= "number";g=Math.pow(this.logarithmBase,E.getNiceNumber(Math.abs(Math.log(g)/d),!1));this.options&&0this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.minimum? this.minimum:this.dataInfo.min,e=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(b)||isFinite(e)?1===b&&1===e?(e*=this.logarithmBase,b/=this.logarithmBase):1===e/b?(g=Math.pow(this.logarithmBase,this.interval),e*=g,b/=g):b>e?(g=Math.min(0.01*(b/e),5),1<=e?b=e/g:e=b*g):(g=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=g),1!==b&&(b/=g)):(e="undefined"===typeof this.options.interval?0:this.options.interval,b=1),f=Infinity!==this.dataInfo.minDiff? this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1e&&(e=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?b/Math.sqrt(f):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/d/this.interval)),s(null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)? "undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)||(this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum))),null===this.maximum&&(this.maximum="axisX"===this.type?e*Math.sqrt(f): Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(e)/d/this.interval)),s(null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)||(this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum? 0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum))),1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum|| this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum=(this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval);this.range= this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&this.rangethis.viewportMaximum||3>a?2:3)){for(d=Math.floor(this.viewportMinimum/c+0.5)*c;dthis.interval&&(this.interval=c,b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval))), this.equidistantInterval=!0,this.intervalStartPosition=b;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){d=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2a&&(b+=Math.floor(Math.abs(Math.log(a)/Math.LN10)),isNaN(b)||!isFinite(b))&&(b=d);for(var e=0;ec?1>=b?1:5>=b?5:10:Math.max(Math.floor(b),1);return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};E.getNiceNumber=function(a,d){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=d?1.5>b?1:3>b?2:7>b?5:10:1>=b?1:2>=b?2:5>=b?5:10;return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};E.prototype.getLabelStartPoint=function(){var a=R[this.intervalType+"Duration"]*this.interval,a= new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,l),this.ctx.lineTo(g,l),this.ctx.lineTo(g,e);else if("wavy"===this.type){s=b;k=e;f=0.5;m=(l-k)/a/3;for(var q=0;q=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(g,e),this.ctx.lineTo(g,l),this.ctx.lineTo(b,l);else if("wavy"===this.type){s=b;k=e;f=0.5;m=(g-s)/a/3;for(q=0;q=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum? a:null);else if("left"===this.parent._position)for(b=0;b=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum?a:null);else{if("right"===this.parent._position)for(b=0;b=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum?a:null)}else if("bottom"===this.parent._position)for(b=0;b=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=0;b=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum?a:null);else if("right"===this.parent._position)for(b= 0;b=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum?a:null);for(b=0;b=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum)&&(d.axisX[b].showCrosshair(a),d.axisX[b].crosshair._updatedValue=a,this===d.axisX[b].crosshair&&(c=!0));for(b=0;b=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum)&&(d.axisX2[b].showCrosshair(a),d.axisX2[b].crosshair._updatedValue=a,this===d.axisX2[b].crosshair&&(c=!0));for(b=0;b=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum)&&(d.axisY[b].showCrosshair(a),d.axisY[b].crosshair._updatedValue=a,this===d.axisY[b].crosshair&&(c=!0));for(b=0;b< d.axisY2.length;b++)a=d.axisY2[b]._crosshairValue,d.axisY2[b].crosshair&&(d.axisY2[b].crosshair.enabled&&!s(a)&&a>=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum)&&(d.axisY2[b].showCrosshair(a),d.axisY2[b].crosshair._updatedValue=a,this===d.axisY2[b].crosshair&&(c=!0));this.chart.toolTip&&this.chart.toolTip._entries&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return c};$.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.renderCrosshairs(this.parent); this._hidden=!0};$.prototype.render=function(a,d,c){var b,e,f,g,l=null,w=null,k=null,m="";if(!this.valueFormatString)if("dateTime"===this.parent.valueType)this.valueFormatString=this.parent.valueFormatString;else{var n=0,n="xySwapped"===this.chart.plotInfo.axisPlacement?50this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0):50this.parent.range?2:10>this.parent.range?1:0);this.valueFormatString=E.generateValueFormatString(this.parent.range,n)}var k=null===this.opacity?1:this.opacity,n=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness),q=this.chart.overlaidCanvasCtx,h=q.globalAlpha;q.globalAlpha=k;q.beginPath();q.strokeStyle=this.color;q.lineWidth=n;q.save();this.labelFontSize=Math.abs(s(this.options.labelFontSize)?this.parent.labelFontSize: this.labelFontSize);this.labelMaxWidth=s(this.options.labelMaxWidth)?0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=s(this.options.labelWrap)||this.labelWrap?0.3*this.chart.height:2*this.labelFontSize;0this.chart.bounds.x2?k.x=this.chart.bounds.x2-k.width:k.xthis.chart.bounds.y2?k.y=this.chart.bounds.y2-k.height:k.ythis.chart.bounds.y2&&(k.y=this.chart.bounds.y2- k.measureText().height+k.fontSize/2);"left"===this.parent._position?k.x=this.parent.lineCoordinates.x2-k.measureText().width:"right"===this.parent._position&&(k.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){r=this.parent.convertPixelToValue({x:a});for(y=0;ythis.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.width);k.xthis.chart.bounds.y2&&(k.y=this.chart.bounds.y2-k.measureText().height+k.fontSize/2);"left"===this.parent._position?k.x=this.parent.lineCoordinates.x2-k.measureText().width:"right"===this.parent._position&&(k.x=this.parent.lineCoordinates.x2)}m=null;if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&k.y-k.fontSize/2this.chart.bounds.y2&&(k.y=this.chart.bounds.y2-k.height+k.fontSize/2+2),b>=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMaximum:this.parent.viewportMinimum)&&e<=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMinimum:this.parent.viewportMaximum)&&(0this.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.measureText().width),g>=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMinimum:this.parent.viewportMaximum)&&f<=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMaximum:this.parent.viewportMinimum)&&(0< n&&(q.moveTo(b,f),q.lineTo(e,g),q.stroke(),this._hidden=!1),q.restore(),!s(k.text)&&("number"===typeof k.text.valueOf()||0this.chart.bounds.y2&& (k.y=this.chart.bounds.y2-k.measureText().height+k.fontSize/2);"left"===this.parent._position?k.x=this.parent.lineCoordinates.x1-k.measureText().width:"right"===this.parent._position&&(k.x=this.parent.lineCoordinates.x2)}else{if("bottom"===this.parent._position||"top"===this.parent._position)k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):s(this.options.label)?ea(c?c:this.parent.convertPixelToValue(a), this.valueFormatString,this.chart._cultureInfo):this.label,k.x=b-k.measureText().width/2,k.x+k.width>this.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.width),k.xthis.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.width);k.xthis.chart.bounds.y2&&(k.y=this.chart.bounds.y2- k.measureText().height+k.fontSize/2),"left"===this.parent._position?k.x=this.parent.lineCoordinates.x2-k.measureText().width:"right"===this.parent._position&&(k.x=this.parent.lineCoordinates.x2);"left"===this.parent._position&&k.xthis.chart.bounds.x2?k.x=this.chart.bounds.x2-k.measureText().width:"top"===this.parent._position&&k.y-k.fontSize/2this.chart.bounds.y2&&(k.y=this.chart.bounds.y2-k.height+k.fontSize/2+2);0(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(a,d))};X.prototype._updateToolTip=function(a,d,c){c="undefined"===typeof c?!0:c;this.container||this._initialize(); this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof d){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;d=this._prevY}else this._prevX=a,this._prevY=d;var b=null,e=null,f=[],g=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"===this.chart.plotInfo.axisPlacement){var l=[];if(this.chart.axisX)for(var v=0;vk.dataSeries.axisY.viewportMaximum&&c++;c-k.dataPoint.y.length&&f.push(k)}else"column"=== e.type||"bar"===e.type?0>k.dataPoint.y?0>k.dataSeries.axisY.viewportMinimum&&k.dataSeries.axisY.viewportMaximum>=k.dataPoint.y&&f.push(k):k.dataSeries.axisY.viewportMinimum<=k.dataPoint.y&&0<=k.dataSeries.axisY.viewportMaximum&&f.push(k):"bubble"===e.type?(c=this.chart._eventManager.objectMap[e.dataPointIds[k.index]].size/2,k.dataPoint.y>=k.dataSeries.axisY.viewportMinimum-c&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum+c&&f.push(k)):"waterfall"===e.type?(c=0,k.cumulativeSumYStartValuek.dataSeries.axisY.viewportMaximum&&c++,k.cumulativeSumk.dataSeries.axisY.viewportMaximum&&c++,2>c&&-2=k.dataSeries.axisY.viewportMinimum&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum)&&f.push(k);else f.push(k)}}if(0a&&(a+=this.container.clientWidth+20);a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth)); d=1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):d:f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);d=-d+10; 0":"X:{axisXIndex}
":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y}",s=c.axisXIndex):"bubble"===c.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y},   {z}"):"rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"=== c.type||"rangeSplineArea"===c.type||"error"===c.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y[0]}, {y[1]}"):"candlestick"===c.type||"ohlc"===c.type?(this.chart.axisX&&1":"X:{axisXIndex}
":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:
Open:   {y[0]}
High:    {y[1]}
Low:   {y[2]}
Close:   {y[3]}"):"boxAndWhisker"===c.type&&(this.chart.axisX&&1":"X:{axisXIndex}
":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:
Minimum:   {y[0]}
Q1:               {y[1]}
Q2:               {y[4]}
Q3:               {y[2]}
Maximum:  {y[3]}"), null===d&&(d=""),!0===this.reversed?(d=this.chart.replaceKeywordsWithValue(f,b,c,e)+d,l"+d)):(d+=this.chart.replaceKeywordsWithValue(f,b,c,e),l")));null!==d&&(d=k+d)}else{c=a[0].dataSeries;b=a[0].dataPoint;e=a[0].index;if(null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent)return null;"line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"=== c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(b.label?"{label}":"{x}")+":  {y}":"bubble"===c.type?f=b.toolTipContent? b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(b.label?"{label}":"{x}")+":  {y},   {z}":"pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(b.name?"{name}:  ":b.label?"{label}:  ":"")+"{y}":"rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type||"error"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(b.label?"{label}":"{x}")+" :  {y[0]},  {y[1]}": "candlestick"===c.type||"ohlc"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(b.label?"{label}":"{x}")+"
Open:   {y[0]}
High:    {y[1]}
Low:     {y[2]}
Close:   {y[3]}":"boxAndWhisker"===c.type&&(f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent: this.content&&"function"!==typeof this.content?this.content:""+(b.label?"{label}":"{x}")+"
Minimum:   {y[0]}
Q1:               {y[1]}
Q2:               {y[4]}
Q3:               {y[2]}
Maximum:  {y[3]}"); null===d&&(d="");d+=this.chart.replaceKeywordsWithValue(f,b,c,e)}return d};X.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=a;this.container.style.MsTransition=a;this.container.style.transition=a;this.container.style.MozTransition=this.mozContainerTransition}};X.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition= "",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};X.prototype.hide=function(a){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};X.prototype.show=function(a,d,c){this._updateToolTip(a,d,"undefined"===typeof c?!1:c)};X.prototype.showAtIndex=function(a,d){};X.prototype.showAtX=function(a,d){if(!this.enabled)return!1; this.chart.clearedOverlayedCanvas=null;var c,b,e,f=[];e=!1;d=!s(d)&&0<=d&&db.dataSeries.axisX.viewportMaximum||b.dataPoint.yb.dataSeries.axisY.viewportMaximum)e=!0;else{e=!1;break}if(e)return this.hide(),!1;this.highlightObjects(f);this._entries=f;b="";b=this.getToolTipInnerHTML({entries:f});if(null!==b){this.contentDiv.innerHTML=b;b=!1;"none"===this.container.style.display&&(b=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:w?"rgba(255,255,255,.9)": "rgb(255,255,255)",this.borderColor="waterfall"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:0c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));f=1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&& "stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y):f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);f=-f+10;0b&&a.push(d),d.animationCallback(b),1<=b&&d.onComplete)d.onComplete();this.animations=a;0g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX= a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;16*c?a+6*(b-a)*c: 1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+ v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute", c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q, n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r')}else e instanceof I?k&&n&&b.push("'):(e=G(a.fillStyle),b.push(''))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]* b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height} function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;bd;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC", bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000", darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082", ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA", mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5", peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"}, H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo= function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d, x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+ c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width= e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("d.x)d.x=f.x;if(null==c.y||f.yd.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a= {};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a, b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize); m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right": "left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('');e?S(this,n):T(this,n,{x:-d,y:0}, {x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('','','');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a, b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",''),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){}; d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR= 13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}(); /*eslint-enable*/ /*jshint ignore:end*/