/* 
 CanvasJS Chart - v3.12.11 GA - https://canvasjs.com/ 
 Copyright 2025 fenopix

 --------------------- License Information --------------------
 CanvasJS Chart 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/


 ---------------------Free for Non-Commercial Use--------------------
 
 For non-commercial purposes you can use the software for free under Creative Commons Attribution-NonCommercial 3.0 License.
 A credit Link is added to the chart which should be preserved. Refer to the following link for further details on the same.
 https://creativecommons.org/licenses/by-nc/3.0/deed.en_US
 */

/*tslint:disable*/
/*eslint-disable*/
/*jshint ignore:start*/
(function(){function oa(g,t){g.prototype=cb(t.prototype);g.prototype.constructor=g;g.base=t.prototype}function cb(g){function t(){}t.prototype=g;return new t}function Wa(g,t,l){"millisecond"===l?g.setMilliseconds(g.getMilliseconds()+1*t):"second"===l?g.setSeconds(g.getSeconds()+1*t):"minute"===l?g.setMinutes(g.getMinutes()+1*t):"hour"===l?g.setHours(g.getHours()+1*t):"day"===l?g.setDate(g.getDate()+1*t):"week"===l?g.setDate(g.getDate()+7*t):"month"===l?g.setMonth(g.getMonth()+1*t):"year"===l&&g.setFullYear(g.getFullYear()+
1*t);return g}function ga(g,t){var l=!1;0>g&&(l=!0,g*=-1);g=""+g;for(t=t?t:1;g.length<t;)g="0"+g;return l?"-"+g:g}function Fa(g){if(!g)return g;g=g.replace(/^\s\s*/,"");for(var t=/\s/,l=g.length;t.test(g.charAt(--l)););return g.slice(0,l+1)}function ya(g){g.roundRect=function(g,l,r,S,na,B,u,C){u&&(this.fillStyle=u);C&&(this.strokeStyle=C);"undefined"===typeof na&&(na=5);na=Math.min(na,Math.min(r,S)/2);this.lineWidth=B;this.beginPath();this.moveTo(g+na,l);this.lineTo(g+r-na,l);this.quadraticCurveTo(g+
r,l,g+r,l+na);this.lineTo(g+r,l+S-na);this.quadraticCurveTo(g+r,l+S,g+r-na,l+S);this.lineTo(g+na,l+S);this.quadraticCurveTo(g,l+S,g,l+S-na);this.lineTo(g,l+na);this.quadraticCurveTo(g,l,g+na,l);this.closePath();u&&this.fill();C&&0<B&&this.stroke()}}function Qa(g,t){return g-t}function T(g){var t=((g&16711680)>>16).toString(16),l=((g&65280)>>8).toString(16);g=((g&255)>>0).toString(16);t=2>t.length?"0"+t:t;l=2>l.length?"0"+l:l;g=2>g.length?"0"+g:g;return"#"+t+l+g}function db(g,t){var l=this.length>>>
0,r=Number(t)||0,r=0>r?Math.ceil(r):Math.floor(r);for(0>r&&(r+=l);r<l;r++)if(r in this&&this[r]===g)return r;return-1}function l(g){return null===g||"undefined"===typeof g}function Ca(g){g.indexOf||(g.indexOf=db);return g}function eb(g){if(ta.fSDec)g[ia("`eeDwdouMhrudods")](ia("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){ta._fTWm&&ta._fTWm(g)})}function Xa(g,t,l){l=l||"normal";var r=g+"_"+t+"_"+l,S=Ya[r];if(isNaN(S)){try{if(!qa){var na=document.body;qa=document.createElement("span");qa.innerHTML="";var B=
document.createTextNode("Mpgyi");qa.appendChild(B);na.appendChild(qa)}qa.style.display="";P(qa,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:g,fontSize:t+"px",fontWeight:l});S=Math.round(qa.offsetHeight);qa.style.display="none"}catch(u){S=Math.ceil(1.1*t)}S=Math.max(S,t);Ya[r]=S}return S}function K(g,t){var l=[];if(l={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],
dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[g||"solid"])for(var r=0;r<l.length;r++)l[r]*=t;else l=[];return l}function M(g,t,wa,r,S){r=r||[];S=l(S)?fb?{passive:!1,capture:!1}:!1:S;r.push([g,t,wa,S]);return g.addEventListener?(g.addEventListener(t,wa,S),wa):g.attachEvent?(r=function(t){t=t||window.event;t.preventDefault=t.preventDefault||function(){t.returnValue=!1};t.stopPropagation=t.stopPropagation||function(){t.cancelBubble=!0};wa.call(g,
t)},g.attachEvent("on"+t,r),r):!1}function gb(g){if(g._menuButton)g.exportEnabled?(P(g._menuButton,{backgroundColor:g.toolbar.itemBackgroundColor,color:g.toolbar.fontColor}),Ka(g._menuButton),ra(g,g._menuButton,"menu"),0>=navigator.userAgent.search("MSIE")&&g._menuButton.childNodes[0]&&P(g._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"})):ua(g._menuButton);else if(g.exportEnabled&&r){var t=!1;g._menuButton=document.createElement("button");ra(g,g._menuButton,"menu");g._toolBar.appendChild(g._menuButton);
M(g._menuButton,"touchstart",function(g){t=!0},g.allDOMEventHandlers);M(g._menuButton,"click",function(){"none"!==g._dropdownMenu.style.display||g._dropDownCloseTime&&500>=(new Date).getTime()-g._dropDownCloseTime.getTime()||(g._dropdownMenu.style.display="block",g._menuButton.blur(),g._dropdownMenu.focus())},g.allDOMEventHandlers,!0);M(g._menuButton,"mousemove",function(){t||(P(g._menuButton,{backgroundColor:g.toolbar.itemBackgroundColorOnHover,color:g.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
P(g._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},g.allDOMEventHandlers,!0);M(g._menuButton,"mouseout",function(){t||(P(g._menuButton,{backgroundColor:g.toolbar.itemBackgroundColor,color:g.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&P(g._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},g.allDOMEventHandlers,!0)}if(g.exportEnabled&&g._dropdownMenu){var l=g.theme&&-1!==g.theme.indexOf("dark")?"black":"#888888";P(g._dropdownMenu,
{backgroundColor:g.toolbar.itemBackgroundColor,color:g.toolbar.fontColor,boxShadow:"2px 2px 10px "+l});for(var l=g._dropdownMenu.childNodes,E=[g._cultureInfo.printText,g._cultureInfo.saveJPGText,g._cultureInfo.savePNGText],S=0;S<E.length;S++)P(l[S],{backgroundColor:g.toolbar.itemBackgroundColor,color:g.toolbar.fontColor}),l[S].innerHTML=E[S]}else!g._dropdownMenu&&(g.exportEnabled&&r)&&(t=!1,g._dropdownMenu=document.createElement("div"),g._dropdownMenu.setAttribute("tabindex",-1),l=g.theme&&-1!==g.theme.indexOf("dark")?
"black":"#888888",P(g._dropdownMenu,{position:"absolute",zIndex:1,userSelect:"none",MozUserSeelct:"none",WebkitUserSelect:"none",msUserSelect:"none",cursor:"pointer",right:"0px",top:"25px",minWidth:"120px",outline:0,fontSize:"14px",fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 0px 5px 0px",textAlign:"left",lineHeight:"10px",backgroundColor:g.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px "+l}),g._dropdownMenu.style.display="none",g._toolBar.appendChild(g._dropdownMenu),M(g._dropdownMenu,
"blur",function(){ua(g._dropdownMenu);g._dropDownCloseTime=new Date},g.allDOMEventHandlers,!0),l=document.createElement("div"),P(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=g._cultureInfo.printText,l.style.backgroundColor=g.toolbar.itemBackgroundColor,l.style.color=g.toolbar.fontColor,g._dropdownMenu.appendChild(l),M(l,"touchstart",function(g){t=!0},g.allDOMEventHandlers),M(l,"mousemove",function(){t||(this.style.backgroundColor=g.toolbar.itemBackgroundColorOnHover,this.style.color=g.toolbar.fontColorOnHover)},
g.allDOMEventHandlers,!0),M(l,"mouseout",function(){t||(this.style.backgroundColor=g.toolbar.itemBackgroundColor,this.style.color=g.toolbar.fontColor)},g.allDOMEventHandlers,!0),M(l,"click",function(){g.print();ua(g._dropdownMenu)},g.allDOMEventHandlers,!0),l=document.createElement("div"),P(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=g._cultureInfo.saveJPGText,l.style.backgroundColor=g.toolbar.itemBackgroundColor,l.style.color=g.toolbar.fontColor,g._dropdownMenu.appendChild(l),M(l,"touchstart",function(g){t=
!0},g.allDOMEventHandlers),M(l,"mousemove",function(){t||(this.style.backgroundColor=g.toolbar.itemBackgroundColorOnHover,this.style.color=g.toolbar.fontColorOnHover)},g.allDOMEventHandlers,!0),M(l,"mouseout",function(){t||(this.style.backgroundColor=g.toolbar.itemBackgroundColor,this.style.color=g.toolbar.fontColor)},g.allDOMEventHandlers,!0),M(l,"click",function(){g.exportChart({format:"jpeg",fileName:g.exportFileName});ua(g._dropdownMenu)},g.allDOMEventHandlers,!0),l=document.createElement("div"),
P(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=g._cultureInfo.savePNGText,l.style.backgroundColor=g.toolbar.itemBackgroundColor,l.style.color=g.toolbar.fontColor,g._dropdownMenu.appendChild(l),M(l,"touchstart",function(g){t=!0},g.allDOMEventHandlers),M(l,"mousemove",function(){t||(this.style.backgroundColor=g.toolbar.itemBackgroundColorOnHover,this.style.color=g.toolbar.fontColorOnHover)},g.allDOMEventHandlers,!0),M(l,"mouseout",function(){t||(this.style.backgroundColor=g.toolbar.itemBackgroundColor,
this.style.color=g.toolbar.fontColor)},g.allDOMEventHandlers,!0),M(l,"click",function(){g.exportChart({format:"png",fileName:g.exportFileName});ua(g._dropdownMenu)},g.allDOMEventHandlers,!0))}function Za(g,t,l){g*=ka;t*=ka;g=l.getImageData(g,t,2,2).data;t=!0;for(l=0;4>l;l++)if(g[l]!==g[l+4]|g[l]!==g[l+8]|g[l]!==g[l+12]){t=!1;break}return t?g[0]<<16|g[1]<<8|g[2]:0}function W(g,t,l){return g in t?t[g]:l[g]}function La(g,t,wa,E){r&&$a?(E=!l(E)&&E?g.getContext("2d",{willReadFrequently:!0}):g.getContext("2d"),
Ma=E.webkitBackingStorePixelRatio||E.mozBackingStorePixelRatio||E.msBackingStorePixelRatio||E.oBackingStorePixelRatio||E.backingStorePixelRatio||1,ka=Ra/Ma,g.width=t*ka,g.height=wa*ka,Ra!==Ma&&(g.style.width=t+"px",g.style.height=wa+"px",E.scale(ka,ka))):(g.width=t,g.height=wa)}function hb(g){if(!ib){var t=!1,l=!1;"undefined"===typeof pa.Chart.creditHref?(g.creditHref=ia("iuuqr;..b`ow`rkr/bnl."),g.creditText=ia("B`ow`rKR/bnl")):(t=g.updateOption("creditText"),l=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"),P(g._creditLink,{outline:"none",margin:"0px",position:"absolute",right:"2px",top:g.height-14+"px",color:"dimgrey",textDecoration:"none",fontSize:"11px",fontFamily:"Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"}),g._creditLink.setAttribute("tabIndex",-1),g._creditLink.setAttribute("target","_blank"));
if(0===g.renderCount||t||l)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 sa(g,t,l){Ga&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var E=document.createElement("canvas");E.setAttribute("class","canvasjs-chart-canvas");
La(E,g,t,l);r||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(E);return E}function P(g,t){for(var l in t)g.style[l]=t[l]}function ab(g){return g.currentStyle?g.currentStyle:window&&window.getComputedStyle?window.getComputedStyle(g,null):g.style}function ra(g,t,l){t.getAttribute("state")||(t.style.backgroundColor=g.toolbar.itemBackgroundColor,t.style.color=g.toolbar.fontColor,t.style.border="none",P(t,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));
t.getAttribute("state")!==l&&(t.setAttribute("state",l),t.setAttribute("type","button"),P(t,{padding:"5px 12px",cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),t.innerHTML="<img src='"+jb[l].image+"' alt='"+g._cultureInfo[l+"Text"]+"' />",P(t.childNodes[0],{height:"95%",pointerEvents:"none"}));t.setAttribute("title",g._cultureInfo[l+"Text"])}function Ka(){for(var g=null,t=0;t<arguments.length;t++)g=arguments[t],g.style&&(g.style.display=
"inline")}function ua(){for(var g=null,t=0;t<arguments.length;t++)(g=arguments[t])&&g.style&&(g.style.display="none")}function Sa(g,t,l,r,S){if(null===g||"undefined"===typeof g)return"undefined"===typeof l?t:l;g=parseFloat(g.toString())*(0<=g.toString().indexOf("%")?t/100:1);"undefined"!==typeof r&&(g=Math.min(r,g),"undefined"!==typeof S&&(g=Math.max(S,g)));return!isNaN(g)&&g<=t&&0<=g?g:"undefined"===typeof l?t:l}function U(g,t,r,E,S){this._defaultsKey=g;this._themeOptionsKey=t;this._index=E;this.parent=
S;this._eventListeners=[];g={};this.theme&&l(this.parent)&&l(t)&&l(E)?g=l(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[t])&&(null===E?g=this.parent.themeOptions[t]:0<this.parent.themeOptions[t].length&&(E=Math.min(this.parent.themeOptions[t].length-1,E),g=this.parent.themeOptions[t][E]));this.themeOptions=g;this.options=r?r:{_isPlaceholder:!0};this.setOptions(this.options,g)}function Da(g,
t,l,r,S){"undefined"===typeof S&&(S=0);this._padding=S;this._x1=g;this._y1=t;this._x2=l;this._y2=r;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function ja(g,t){ja.base.constructor.call(this,"TextBlock",null,t,null,null);this.ctx=g;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Ta(g,t){Ta.base.constructor.call(this,"Toolbar","toolbar",t,null,g);this.chart=g;this.canvas=g.canvas;this.ctx=this.chart.ctx;this.optionsName="toolbar"}function za(g,
t){za.base.constructor.call(this,"Title","title",t,null,g);this.chart=g;this.canvas=g.canvas;this.ctx=this.chart.ctx;this.optionsName="title";if(l(this.options.margin)&&g.options.subtitles)for(var r=g.options.subtitles,E=0;E<r.length;E++)if((l(r[E].horizontalAlign)&&"center"===this.horizontalAlign||r[E].horizontalAlign===this.horizontalAlign)&&(l(r[E].verticalAlign)&&"top"===this.verticalAlign||r[E].verticalAlign===this.verticalAlign)&&!r[E].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=
0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ha(g,t,l){Ha.base.constructor.call(this,"Subtitle","subtitles",t,l,g);this.chart=g;this.canvas=g.canvas;this.ctx=this.chart.ctx;this.optionsName="subtitles";this.isOptionsInArray=!0;"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;
this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ua(){this.pool=[]}function Ia(g){var t;g&&Ja[g]&&(t=Ja[g]);Ia.base.constructor.call(this,"CultureInfo",null,t,null,null)}var Ga=!1,ta={},r=!!document.createElement("canvas").getContext,pa={Chart:{width:500,height:400,zoomEnabled:!1,zoomType:"x",backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,dataPointWidth:null,dataPointMinWidth:null,dataPointMaxWidth:null,colorSet:"colorSet1",culture:"en",creditHref:"",creditText:"CanvasJS",
interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",toolTip:"readWrite",legend:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}},Title:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",
fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:r?"transparent":null,margin:5,wrap:!0,maxWidth:null,textAlign:"center",dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Subtitle:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:14,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,
backgroundColor:null,margin:2,wrap:!0,maxWidth:null,textAlign:"center",dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white",publicProperties:{options:"readWrite",chart:"readOnly"}},Legend:{name:null,verticalAlign:"center",horizontalAlign:"right",fontSize:14,fontFamily:"calibri",fontWeight:"normal",
fontColor:"black",fontStyle:"normal",cursor:null,itemmouseover:null,itemmouseout:null,itemmousemove:null,itemclick:null,dockInsidePlotArea:!1,reversed:!1,backgroundColor:r?"transparent":null,borderColor:r?"transparent":null,borderThickness:0,cornerRadius:0,maxWidth:null,maxHeight:null,markerMargin:null,itemMaxWidth:null,itemWidth:null,itemWrap:!0,itemTextAlign:"left",itemTextFormatter:null,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},ToolTip:{enabled:!0,shared:!1,animationEnabled:!0,
content:null,contentFormatter:null,reversed:!1,backgroundColor:r?"rgba(255,255,255,.9)":"rgb(255,255,255)",borderColor:null,borderThickness:2,cornerRadius:5,fontSize:14,fontColor:"black",fontFamily:"Calibri, Arial, Georgia, serif;",fontWeight:"normal",fontStyle:"italic",updated:null,hidden:null,publicProperties:{options:"readWrite",chart:"readOnly"}},Axis:{minimum:null,maximum:null,viewportMinimum:null,viewportMaximum:null,interval:null,intervalType:null,reversed:!1,logarithmic:!1,logarithmBase:10,
title:null,titleFontColor:"black",titleFontSize:20,titleFontFamily:"arial",titleFontWeight:"normal",titleFontStyle:"normal",titleWrap:!0,titleMaxWidth:null,titleBackgroundColor:r?"transparent":null,titleBorderColor:r?"transparent":null,titleBorderThickness:0,titleCornerRadius:0,titleTextAlign:"left",titlePadding:0,labelAngle:0,labelFontFamily:"arial",labelFontColor:"black",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!0,labelWrap:!0,labelMaxWidth:null,labelFormatter:null,
labelBackgroundColor:r?"transparent":null,labelBorderColor:r?"transparent":null,labelBorderThickness:0,labelPadding:0,labelCornerRadius:0,labelPlacement:"outside",labelTextAlign:"left",prefix:"",suffix:"",includeZero:!1,tickLength:5,tickColor:"black",tickThickness:1,tickPlacement:"outside",lineColor:"black",lineThickness:1,lineDashType:"solid",gridColor:"#A0A0A0",gridThickness:0,gridDashType:"solid",interlacedColor:r?"transparent":null,valueFormatString:null,margin:2,publicProperties:{options:"readWrite",
stripLines:"readWrite",scaleBreaks:"readWrite",crosshair:"readWrite",bounds:"readOnly",chart:"readOnly"}},StripLine:{value:null,startValue:null,endValue:null,color:"orange",opacity:null,thickness:2,lineDashType:"solid",label:"",labelPlacement:"inside",labelAlign:"far",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:null,labelBorderColor:r?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:"arial",labelFontColor:"orange",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",
labelFormatter:null,labelTextAlign:"left",labelPadding:0,showOnTop:!1,publicProperties:{options:"readWrite",axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},ScaleBreaks:{autoCalculate:!1,collapsibleThreshold:"25%",maxNumberOfAutoBreaks:2,spacing:8,type:"straight",color:"#FFFFFF",fillOpacity:0.9,lineThickness:2,lineColor:"#E16E6E",lineDashType:"solid",publicProperties:{options:"readWrite",customBreaks:"readWrite",axis:"readOnly",autoBreaks:"readOnly",bounds:"readOnly",chart:"readOnly"}},Break:{startValue:null,
endValue:null,spacing:8,type:"straight",color:"#FFFFFF",fillOpacity:0.9,lineThickness:2,lineColor:"#E16E6E",lineDashType:"solid",publicProperties:{options:"readWrite",scaleBreaks:"readOnly",bounds:"readOnly",chart:"readOnly"}},Crosshair:{enabled:!1,snapToDataPoint:!1,color:"grey",opacity:null,thickness:2,lineDashType:"solid",label:"",labelWrap:!0,labelMaxWidth:null,labelTextAlign:"left",labelBackgroundColor:r?"grey":null,labelBorderColor:r?"grey":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:r?
"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:12,labelPadding:{top:2,right:3,bottom:2,left:4},labelFontColor:"#fff",labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,valueFormatString:null,updated:null,hidden:null,publicProperties:{options:"readWrite",axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,highlightEnabled:!0,cursor:"default",indexLabel:"",indexLabelPlacement:"auto",indexLabelOrientation:"horizontal",
indexLabelTextAlign:"left",indexLabelFontColor:"black",indexLabelFontSize:12,indexLabelFontStyle:"normal",indexLabelFontFamily:"Arial",indexLabelFontWeight:"normal",indexLabelPadding:0,indexLabelBackgroundColor:null,indexLabelBorderColor:null,indexLabelBorderThickness:0,indexLabelLineColor:"gray",indexLabelLineThickness:1,indexLabelLineDashType:"solid",indexLabelMaxWidth:null,indexLabelWrap:!0,indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1,nullDataLineDashType:"dash",
color:null,lineColor:null,risingColor:"white",fallingColor:"red",fillOpacity:null,startAngle:0,radius:null,innerRadius:null,explodeOnClick:!0,neckHeight:null,neckWidth:null,reversed:!1,valueRepresents:null,linkedDataSeriesIndex:null,whiskerThickness:2,whiskerDashType:"solid",whiskerColor:null,whiskerLength:null,stemThickness:2,stemColor:null,stemDashType:"solid",upperBoxColor:"white",lowerBoxColor:"white",type:"column",xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIndex:0,
xValueFormatString:null,yValueFormatString:null,zValueFormatString:null,percentFormatString:null,showInLegend:!1,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:r?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:r?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",
axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",textAlign:"left",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",
savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},Ja={en:{}},u=r?"Trebuchet MS, Helvetica, sans-serif":"Arial",Ea=r?"Impact, Charcoal, sans-serif":"Arial",Aa={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),
colorSet2:"#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},F,ba,Q,da,ha;ba="#333333";Q="#000000";F="#666666";ha=da="#000000";var fa=20,C=14,Va={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Ea,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",
margin:5},subtitles:[{fontFamily:Ea,fontSize:C,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:u,indexLabelFontSize:C,indexLabelFontColor:ba,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:u,
labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,
labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,
lineDashType:"solid"}}],axisY:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",
labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:u,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},
toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};Q=ba="#F5F5F5";F="#FFFFFF";da="#40BAF1";ha="#F5F5F5";var fa=20,C=14,bb={colorSet:"colorSet2",title:{fontFamily:u,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},subtitles:[{fontFamily:u,fontSize:C,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:u,
indexLabelFontSize:C,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,
color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",
tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:u,
titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:u,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,
fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};Q=ba="#F5F5F5";F="#FFFFFF";da="#40BAF1";ha="#F5F5F5";fa=20;C=14;Ea={colorSet:"colorSet1",backgroundColor:"#2A2A2A",title:{fontFamily:Ea,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ea,fontSize:C,fontColor:ba,fontWeight:"normal",
verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:u,indexLabelFontSize:C,indexLabelFontColor:Q,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,
lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:u,
titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,
lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,
color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,
tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:u,fontSize:14,
fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:Q,backgroundColor:"rgba(0, 0, 0, .7)"}};F="#FFFFFF";Q=ba="#FAFAFA";da="#40BAF1";ha="#F5F5F5";var fa=20,C=14,Na={light1:Va,light2:bb,dark1:Ea,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:u,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:u,fontSize:C,
fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:u,indexLabelFontSize:C,indexLabelFontColor:Q,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,
labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",
color:"#111111"}}],axisX2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",
labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:0,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",
labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:u,titleFontSize:fa,titleFontColor:Q,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:Q,labelFontWeight:"normal",lineThickness:0,
lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ha,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:u,
fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:Q,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:Va,theme2:bb,theme3:Va},V={numberDuration:1,yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")};
(function(){ta.fSDec=function(g){for(var t="",l=0;l<g.length;l++)t+=String.fromCharCode(Math.ceil(g.length/57/5)^g.charCodeAt(l));return t};delete pa[ta.fSDec("Bi`su")][ta.fSDec("bsdehuIsdg")];ta.pro={sCH:pa[ta.fSDec("Bi`su")][ta.fSDec("bsdehuIsdg")]}})();var fb=function(){var g=!1;try{var t=Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){g=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(l){g=
!1}return g}(),Ya={},qa=null,kb=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))},xa=function(g){g.width=1;g.height=1;g.getContext("2d")&&g.getContext("2d").clearRect(0,0,1,1)},lb=function(g,t,l){t=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=t?12:11,Math.round(t*(g/400)))},Ba=function(){var g=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,
t="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),l="Sun Mon Tue Wed Thu Fri Sat".split(" "),r="January February March April May June July August September October November December".split(" "),S="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,B=/[^-+\dA-Z]/g;return function(C,K,F){var T=F?F.days:t,M=F?F.months:r,V=F?F.shortDays:
l,P=F?F.shortMonths:S;F="";var U=!1;C=C&&C.getTime?C:C?new Date(C):new Date;if(isNaN(C))throw SyntaxError("invalid date");"UTC:"===K.slice(0,4)&&(K=K.slice(4),U=!0);F=U?"getUTC":"get";var Q=C[F+"Date"](),O=C[F+"Day"](),X=C[F+"Month"](),a=C[F+"FullYear"](),e=C[F+"Hours"](),c=C[F+"Minutes"](),b=C[F+"Seconds"](),d=C[F+"Milliseconds"](),f=U?0:C.getTimezoneOffset();return F=K.replace(g,function(q){switch(q){case "D":return Q;case "DD":return ga(Q,2);case "DDD":return V[O];case "DDDD":return T[O];case "M":return X+
1;case "MM":return ga(X+1,2);case "MMM":return P[X];case "MMMM":return M[X];case "Y":return parseInt(String(a).slice(-2));case "YY":return ga(String(a).slice(-2),2);case "YYY":return ga(String(a).slice(-3),3);case "YYYY":return ga(a,4);case "h":return e%12||12;case "hh":return ga(e%12||12,2);case "H":return e;case "HH":return ga(e,2);case "m":return c;case "mm":return ga(c,2);case "s":return b;case "ss":return ga(b,2);case "f":return ga(String(d),3).slice(0,1);case "ff":return ga(String(d),3).slice(0,
2);case "fff":return ga(String(d),3).slice(0,3);case "t":return 12>e?"a":"p";case "tt":return 12>e?"am":"pm";case "T":return 12>e?"A":"P";case "TT":return 12>e?"AM":"PM";case "K":return U?"UTC":(String(C).match(u)||[""]).pop().replace(B,"");case "z":return(0<f?"-":"+")+Math.floor(Math.abs(f)/60);case "zz":return(0<f?"-":"+")+ga(Math.floor(Math.abs(f)/60),2);case "zzz":return(0<f?"-":"+")+ga(Math.floor(Math.abs(f)/60),2)+ga(Math.abs(f)%60,2);default:return q.slice(1,q.length-1)}})}}(),mb=function(g){var t=
0>g;if(1>Math.abs(g)){var l=parseInt(g.toString().split("e-")[1]);l&&(g=(t?-1*g:g)*Math.pow(10,l-1),g="0."+Array(l).join("0")+g.toString().substring(2),g=t?"-"+g:g)}else l=parseInt(g.toString().split("+")[1]),20<l&&(l-=20,g/=Math.pow(10,l),g=g.toString()+Array(l+1).join("0"));return String(g)},ea=function(g,l,r){if(null===g)return"";if(!isFinite(g))return g;g=Number(g);var E=0>g?!0:!1;E&&(g*=-1);var S=r?r.decimalSeparator:".",u=r?r.digitGroupSeparator:",",B="";l=String(l);var B=1,C=r="",F=-1,K=[],
T=[],M=0,V=0,P=0,U=!1,Q=0,C=l.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);l=null;for(var O=0;C&&O<C.length;O++)if(l=C[O],"."===l&&0>F)F=O;else{if("%"===l)B*=100;else if("\u2030"===l){B*=1E3;continue}else if(","===l[0]&&"."===l[l.length-1]){B/=Math.pow(1E3,l.length-1);F=O+l.length-1;continue}else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||(U=!0);0>F?(K.push(l),"#"===l||"0"===l?M++:","===l&&P++):(T.push(l),"#"!==l&&"0"!==l||V++)}U&&(l=Math.floor(g),C=-Math.floor(Math.log(g)/Math.LN10+
1),Q=0===g?0:0===l?-(M+C):mb(l).length-M,B/=Math.pow(10,Q));0>F&&(F=O);B=(g*B).toFixed(V);l=B.split(".");B=(l[0]+"").split("");g=(l[1]+"").split("");B&&"0"===B[0]&&B.shift();for(U=C=O=V=F=0;0<K.length;)if(l=K.pop(),"#"===l||"0"===l)if(F++,F===M){var X=B,B=[];if("0"===l)for(l=M-V-(X?X.length:0);0<l;)X.unshift("0"),l--;for(;0<X.length;)r=X.pop()+r,U++,0===U%C&&(O===P&&0<X.length)&&(r=u+r)}else 0<B.length?(r=B.pop()+r,V++,U++):"0"===l&&(r="0"+r,V++,U++),0===U%C&&(O===P&&0<B.length)&&(r=u+r);else"E"!==
l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?","===l?(O++,C=U,U=0,0<B.length&&(r=u+r)):r=1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?l.slice(1,l.length-1)+r:l+r:(l=0>Q?l.replace("+","").replace("-",""):l.replace("-",""),r+=l.replace(/[0]+/,function(a){return ga(Q,a.length)}));u="";for(K=!1;0<T.length;)l=T.shift(),"#"===l||"0"===l?0<g.length&&0!==Number(g.join(""))?(u+=g.shift(),K=!0):"0"===l&&(u+="0",K=!0):1<l.length&&('"'===l[0]&&'"'===l[l.length-
1]||"'"===l[0]&&"'"===l[l.length-1])?u+=l.slice(1,l.length-1):"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?u+=l:(l=0>Q?l.replace("+","").replace("-",""):l.replace("-",""),u+=l.replace(/[0]+/,function(a){return ga(Q,a.length)}));r+=(K?S:"")+u;return E?"-"+r:r},Oa=function(g){var l=0,r=0;g=g||window.event;g.offsetX||0===g.offsetX?(l=g.offsetX,r=g.offsetY):g.layerX||0==g.layerX?(l=g.layerX,r=g.layerY):(l=g.pageX-g.target.offsetLeft,r=g.pageY-g.target.offsetTop);return{x:l,y:r}},
$a=!0,Ra=window.devicePixelRatio||1,Ma=1,ka=$a?Ra/Ma:1,Y=function(g,l,r,E,u,C,B,F,K,T,U,V,M){"undefined"===typeof M&&(M=1);B=B||0;F=F||"black";var P=15<E-l&&15<u-r?8:0.35*Math.min(E-l,u-r);g.beginPath();g.moveTo(l,r);g.save();g.fillStyle=C;g.globalAlpha=M;g.fillRect(l,r,E-l,u-r);g.globalAlpha=1;0<B&&(M=0===B%2?0:0.5,g.beginPath(),g.lineWidth=B,g.strokeStyle=F,g.moveTo(l,r),g.rect(l-M,r-M,E-l+2*M,u-r+2*M),g.stroke());g.restore();!0===K&&(g.save(),g.beginPath(),g.moveTo(l,r),g.lineTo(l+P,r+P),g.lineTo(E-
P,r+P),g.lineTo(E,r),g.closePath(),B=g.createLinearGradient((E+l)/2,r+P,(E+l)/2,r),B.addColorStop(0,C),B.addColorStop(1,"rgba(255, 255, 255, .4)"),g.fillStyle=B,g.fill(),g.restore());!0===T&&(g.save(),g.beginPath(),g.moveTo(l,u),g.lineTo(l+P,u-P),g.lineTo(E-P,u-P),g.lineTo(E,u),g.closePath(),B=g.createLinearGradient((E+l)/2,u-P,(E+l)/2,u),B.addColorStop(0,C),B.addColorStop(1,"rgba(255, 255, 255, .4)"),g.fillStyle=B,g.fill(),g.restore());!0===U&&(g.save(),g.beginPath(),g.moveTo(l,r),g.lineTo(l+P,r+
P),g.lineTo(l+P,u-P),g.lineTo(l,u),g.closePath(),B=g.createLinearGradient(l+P,(u+r)/2,l,(u+r)/2),B.addColorStop(0,C),B.addColorStop(1,"rgba(255, 255, 255, 0.1)"),g.fillStyle=B,g.fill(),g.restore());!0===V&&(g.save(),g.beginPath(),g.moveTo(E,r),g.lineTo(E-P,r+P),g.lineTo(E-P,u-P),g.lineTo(E,u),B=g.createLinearGradient(E-P,(u+r)/2,E,(u+r)/2),B.addColorStop(0,C),B.addColorStop(1,"rgba(255, 255, 255, 0.1)"),g.fillStyle=B,B.addColorStop(0,C),B.addColorStop(1,"rgba(255, 255, 255, 0.1)"),g.fillStyle=B,g.fill(),
g.closePath(),g.restore())},ia=function(g){for(var l="",r=0;r<g.length;r++)l+=String.fromCharCode(Math.ceil(g.length/57/5)^g.charCodeAt(r));return l},ib=window&&(window[ia("mnb`uhno")]&&window[ia("mnb`uhno")].href&&window[ia("mnb`uhno")].href.indexOf&&(-1!==window[ia("mnb`uhno")].href.indexOf(ia("b`ow`rkr/bnl"))||-1!==window[ia("mnb`uhno")].href.indexOf(ia("gdonqhy/bnl"))||-1!==window[ia("mnb`uhno")].href.indexOf(ia("gheemd"))))&&-1===window[ia("mnb`uhno")].href.indexOf(ia("gheemd")),jb={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg=="},
pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC"},
zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII="},
menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"}};
U.prototype.setOptions=function(g,l){if(pa[this._defaultsKey]){var r=pa[this._defaultsKey],E;for(E in r)"publicProperties"!==E&&r.hasOwnProperty(E)&&(this[E]=g&&E in g?g[E]:l&&E in l?l[E]:r[E])}else Ga&&window.console&&console.log("defaults not set")};U.prototype.get=function(g){var l=pa[this._defaultsKey];if("options"===g)return this.options&&this.options._isPlaceholder?null:this.options;if(l.hasOwnProperty(g)||l.publicProperties&&l.publicProperties.hasOwnProperty(g))return this[g];window.console&&
window.console.log('Property "'+g+"\" doesn't exist. Please check for typo.")};U.prototype.set=function(g,l,r){r="undefined"===typeof r?!0:r;var E=pa[this._defaultsKey];if("options"===g)this.createUserOptions(l);else if(E.hasOwnProperty(g)||E.publicProperties&&E.publicProperties.hasOwnProperty(g)&&"readWrite"===E.publicProperties[g])this.options._isPlaceholder&&this.createUserOptions(),this.options[g]=l;else{window.console&&(E.publicProperties&&E.publicProperties.hasOwnProperty(g)&&"readOnly"===E.publicProperties[g]?
window.console.log('Property "'+g+'" is read-only.'):window.console.log('Property "'+g+"\" doesn't exist. Please check for typo."));return}r&&(this.stockChart||this.chart||this).render()};U.prototype.addTo=function(g,l,r,E){E="undefined"===typeof E?!0:E;var u=pa[this._defaultsKey];u.hasOwnProperty(g)||u.publicProperties&&u.publicProperties.hasOwnProperty(g)&&"readWrite"===u.publicProperties[g]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===typeof this.options[g]&&(this.options[g]=
[]),g=this.options[g],r="undefined"===typeof r||null===r?g.length:r,g.splice(r,0,l),E&&(this.stockChart||this.chart||this).render()):window.console&&(u.publicProperties&&u.publicProperties.hasOwnProperty(g)&&"readOnly"===u.publicProperties[g]?window.console.log('Property "'+g+'" is read-only.'):window.console.log('Property "'+g+"\" doesn't exist. Please check for typo."))};U.prototype.createUserOptions=function(g){if("undefined"!==typeof g||this.options._isPlaceholder)if(this.parent&&this.parent.options._isPlaceholder&&
this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var l=this.parent.options[this.optionsName],r=l.length;this.options._isPlaceholder||(Ca(l),r=l.indexOf(this.options));this.options="undefined"===typeof g?{}:g;l[r]=this.options}else this.options="undefined"===typeof g?{}:g,this.parent&&(g=this.parent.options,this.optionsName?l=this.optionsName:(l=this._defaultsKey)&&0!==l.length?(r=l.charAt(0).toLowerCase(),1<l.length&&
(r=r.concat(l.slice(1))),l=r):l=void 0,g[l]=this.options)};U.prototype.remove=function(g){g="undefined"===typeof g?!0:g;if(this.isOptionsInArray){var l=this.parent.options[this.optionsName];Ca(l);var r=l.indexOf(this.options);0<=r&&l.splice(r,1)}else delete this.parent.options[this.optionsName];g&&(this.stockChart||this.chart||this).render()};U.prototype.updateOption=function(g){!pa[this._defaultsKey]&&(Ga&&window.console)&&console.log("defaults not set");var r=pa[this._defaultsKey],u={},E=this[g],
C=this._themeOptionsKey,F=this._index;this.theme&&l(this.parent)&&l(C)&&l(F)?u=l(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&this.parent.themeOptions&&(this.options.theme?"Chart"===this._defaultsKey&&Na[this.options.theme]?u=Na[this.options.theme]:stockThemes[this.options.theme]&&(u=stockThemes[this.options.theme][C]):this.parent.themeOptions[C]&&(null===F?u=this.parent.themeOptions[C]:0<this.parent.themeOptions[C].length&&(u=Math.min(this.parent.themeOptions[C].length-
1,F),u=this.parent.themeOptions[C][u])));this.themeOptions=u;g in r&&(E=g in this.options?this.options[g]:u&&g in u?u[g]:r[g]);if(E===this[g])return!1;this[g]=E;return!0};U.prototype.trackChanges=function(g){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[g]=this.options[g]};U.prototype.isBeingTracked=function(g){this.options._oldOptions||(this.options._oldOptions={});return this.options._oldOptions[g]?!0:!1};U.prototype.hasOptionChanged=function(g){if(!this.sessionVariables)throw"Session Variable Store not set";
return this.sessionVariables[g]!==this.options[g]};U.prototype.addEventListener=function(g,l,r){g&&l&&(this._eventListeners[g]=this._eventListeners[g]||[],this._eventListeners[g].push({context:r||this,eventHandler:l}))};U.prototype.removeEventListener=function(l,r){if(l&&r&&this._eventListeners[l])for(var u=this._eventListeners[l],E=0;E<u.length;E++)if(u[E].eventHandler===r){u[E].splice(E,1);break}};U.prototype.removeAllEventListeners=function(){this._eventListeners=[]};U.prototype.dispatchEvent=
function(l,r,u){if(l&&this._eventListeners[l]){r=r||{};for(var E=this._eventListeners[l],C=0;C<E.length;C++)E[C].eventHandler.call(E[C].context,r)}"function"===typeof this[l]&&this[l].call(u||this.chart,r)};Da.prototype.registerSpace=function(l,r){"top"===l?this._topOccupied+=r.height:"bottom"===l?this._bottomOccupied+=r.height:"left"===l?this._leftOccupied+=r.width:"right"===l&&(this._rightOccupied+=r.width)};Da.prototype.unRegisterSpace=function(l,r){"top"===l?this._topOccupied-=r.height:"bottom"===
l?this._bottomOccupied-=r.height:"left"===l?this._leftOccupied-=r.width:"right"===l&&(this._rightOccupied-=r.width)};Da.prototype.getFreeSpace=function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Da.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=
this._topOccupied=this._padding};oa(ja,U);ja.prototype._initialize=function(){l(this.padding)||"object"!==typeof this.padding?this.topPadding=this.rightPadding=this.bottomPadding=this.leftPadding=Number(this.padding)|0:(this.topPadding=l(this.padding.top)?0:Number(this.padding.top)|0,this.rightPadding=l(this.padding.right)?0:Number(this.padding.right)|0,this.bottomPadding=l(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=l(this.padding.left)?0:Number(this.padding.left)|0)};ja.prototype.render=
function(l){if(0!==this.fontSize){l&&this.ctx.save();var r=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var u=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+u);"middle"===this.textBaseline&&(u=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var E=0,C=this.topPadding,F=null;this.ctx.roundRect||ya(this.ctx);(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,u,this.width,this.height,
this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(u=0;u<this._wrappedText.lines.length;u++)F=this._wrappedText.lines[u],"right"===this.textAlign?E=this.width-F.width-this.rightPadding:"left"===this.textAlign?E=this.leftPadding:"center"===this.textAlign&&(E=(this.width-(this.leftPadding+this.rightPadding))/2-F.width/2+this.leftPadding),this.ctx.fillText(F.text,E,C),C+=F.height;this.ctx.font=r;l&&this.ctx.restore()}};ja.prototype.setText=
function(l){this.text=l;this._isDirty=!0;this._wrappedText=null};ja.prototype.measureText=function(){this._lineHeight=Xa(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};ja.prototype._getLineWithWidth=function(l,r,u){l=String(l);if(!l)return{text:"",width:0};var E=u=0,C=l.length-1,F=Infinity;for(this.ctx.font=this._getFontString();E<=C;){var F=
Math.floor((E+C)/2),B=l.substr(0,F+1);u=this.ctx.measureText(B).width;if(u<r)E=F+1;else if(u>r)C=F-1;else break}u>r&&1<B.length&&(B=B.substr(0,B.length-1),u=this.ctx.measureText(B).width);r=!0;if(B.length===l.length||" "===l[B.length])r=!1;r&&(l=B.split(" "),1<l.length&&l.pop(),B=l.join(" "),u=this.ctx.measureText(B).width);return{text:B,width:u}};ja.prototype._wrapText=function(){var l=new String(Fa(String(this.text))),r=[],u=this.ctx.font,E=0,C=0;this.ctx.font=this._getFontString();if(0===this.frontSize)C=
E=0;else for(;0<l.length;){var F=this.maxHeight-(this.topPadding+this.bottomPadding),B=this._getLineWithWidth(l,this.maxWidth-(this.leftPadding+this.rightPadding),!1);B.height=this._lineHeight;r.push(B);var K=C,C=Math.max(C,B.width),E=E+B.height,l=Fa(l.slice(B.text.length,l.length));F&&E>F&&(B=r.pop(),E-=B.height,C=K)}this._wrappedText={lines:r,width:C,height:E};this.width=C+(this.leftPadding+this.rightPadding);this.height=E+(this.topPadding+this.bottomPadding);this.ctx.font=u};ja.prototype._getFontString=
function(){var l;l=""+(this.fontStyle?this.fontStyle+" ":"");l+=this.fontWeight?this.fontWeight+" ":"";l+=this.fontSize?this.fontSize+"px ":"";var t=this.fontFamily?this.fontFamily+"":"";!r&&t&&(t=t.split(",")[0],"'"!==t[0]&&'"'!==t[0]&&(t="'"+t+"'"));return l+=t};oa(Ta,U);oa(za,U);za.prototype.setLayout=function(){if(this.text){var g=this.dockInsidePlotArea?this.chart.plotArea:this.chart,r=g.layoutManager.getFreeSpace(),u=r.x1,E=r.y1,C=0,E=0,u=this.chart._menuButton&&this.chart.exportEnabled&&"top"===
this.verticalAlign?40:0,F;this.textAlign=l(this.options.textAlign)?this.horizontalAlign:this.textAlign;"center"===this.verticalAlign?"left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=r.height-4),E=0.5*r.width-this.margin-2):(null===this.maxWidth&&(this.maxWidth=r.width-4),E=0.5*r.height-4):(null===this.maxWidth&&(this.maxWidth=r.width-4-u*("center"===this.horizontalAlign?2:1)),E=0.5*r.height-this.margin-2,C=0);l(this.padding)||"number"!==typeof this.padding?
l(this.padding)||"object"!==typeof this.padding||(F=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,F+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):F=2*this.padding;this.wrap||(E=Math.min(E,1.5*this.fontSize+F));var B=new ja(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,textAlign:this.textAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,
borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:E,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"middle"}),K=B.measureText();"center"===this.verticalAlign?("left"===this.horizontalAlign?(u=r.x1+2+B._lineHeight/2,E=r.y2-2-(this.maxWidth/2-K.width/2),C=-90,F="left",this.width=K.height,this.height=K.width):"right"===this.horizontalAlign?(u=r.x2-2-B._lineHeight/2,E=r.y1+2+(this.maxWidth/2-K.width/2),C=90,F="right",
this.width=K.height,this.height=K.width):(E=r.y1+2+(r.height/2-K.height/2)+B._lineHeight/2,u=r.x1+2+(r.width/2-K.width/2),F="center",this.width=K.width,this.height=K.height),r="center"):("bottom"===this.verticalAlign?(E=r.y2-2-K.height+B._lineHeight/2,F="bottom"):(E=r.y1+2+B._lineHeight/2,F="top"),u="left"===this.horizontalAlign?r.x1+2:"right"===this.horizontalAlign?r.x2-2-K.width-u:r.x1+r.width/2-K.width/2,r=this.horizontalAlign,this.width=K.width,this.height=K.height);B.x=u;B.y=E;B.angle=C;B.horizontalAlign=
r;this._textBlock=B;g.layoutManager.registerSpace(F,{width:this.width+("left"===F||"right"===F?this.margin+2:0),height:this.height+("top"===F||"bottom"===F?this.margin+2:0)});this.bounds={x1:u,y1:E-B._lineHeight/2,x2:u+this.width,y2:E+this.height-B._lineHeight/2};"center"===this.verticalAlign&&("left"===this.horizontalAlign&&(this.bounds={x1:u-B._lineHeight/2,y1:E-this.height,x2:u+this.width-B._lineHeight/2,y2:E}),"right"===this.horizontalAlign&&(this.bounds={x1:u-B._lineHeight/2,y1:E,x2:u+this.width-
B._lineHeight/2,y2:E+this.height}));this.ctx.textBaseline="top"}};za.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};oa(Ha,U);Ha.prototype.setLayout=za.prototype.setLayout;Ha.prototype.render=za.prototype.render;Ua.prototype.get=function(l,r){var u=null;0<this.pool.length?(u=this.pool.pop(),La(u,l,r)):u=sa(l,r);return u};Ua.prototype.release=function(l){this.pool.push(l)};oa(Ia,U);var Pa={addTheme:function(l,r){Na[l]=r},addColorSet:function(l,r){Aa[l]=r},addCultureInfo:function(l,
r){Ja[l]=r},formatNumber:function(l,r,u){u=u||"en";if(Ja[u])return ea(l,r||"#,##0.##",new Ia(u));throw"Unknown Culture Name";},formatDate:function(l,r,u){u=u||"en";if(Ja[u])return Ba(l,r||"DD MMM YYYY",new Ia(u));throw"Unknown Culture Name";}};"undefined"!==typeof module&&"undefined"!==typeof module.exports?module.exports=Pa:"function"===typeof define&&define.amd?define([],function(){return Pa}):(window.CanvasJS&&window.console&&window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."),
window.CanvasJS=window.CanvasJS?window.CanvasJS:Pa);u=Pa.Chart=function(){function g(a,e){return a.x-e.x}function t(a,e,c){e=e||{};l(c)?(this.predefinedThemes=Na,this.optionsName=this.parent=this.index=null):(this.parent=c.parent,this.index=c.index,this.predefinedThemes=c.predefinedThemes,this.optionsName=c.optionsName,this.stockChart=c.stockChart,this.panel=a,this.isOptionsInArray=c.isOptionsInArray);this.theme=l(e.theme)||l(this.predefinedThemes[e.theme])?"light1":e.theme;t.base.constructor.call(this,
"Chart",this.optionsName,e,this.index,this.parent);var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=!1;this.renderCount=0;this.disableToolTip=this.animatedRender=!1;this.canvasPool=new Ua;this.allDOMEventHandlers=[];this.panEnabled=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=
[];(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId)?(this.container.innerHTML="",e=a=0,e=ab(this.container),a=this.options.width?this.width:0<this.container.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)?this.container.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight):this.width,e=c&&c.height?c.height:this.options.height?this.height:0<this.container.clientHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)?
this.container.clientHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom):this.height,this.width=a,this.height=e,this.x1=this.y1=0,this.x2=this.width,this.y2=this.height,this.selectedColorSet="undefined"!==typeof Aa[this.colorSet]?Aa[this.colorSet]:Aa.colorSet1,this._canvasJSContainer=document.createElement("div"),this._canvasJSContainer.setAttribute("class","canvasjs-chart-container"),this._canvasJSContainer.style.position="relative",this._canvasJSContainer.style.textAlign="left",this._canvasJSContainer.style.cursor=
"auto",this._canvasJSContainer.style.direction="ltr",r||(this._canvasJSContainer.style.height="0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=sa(a,e),this._preRenderCanvas=sa(a,e),this.canvas.style.position="absolute",this.canvas.style.WebkitUserSelect="none",this.canvas.style.MozUserSelect="none",this.canvas.style.msUserSelect="none",this.canvas.style.userSelect="none",this.canvas.getContext&&(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),
this.ctx.textBaseline="top",ya(this.ctx),this._preRenderCtx=this._preRenderCanvas.getContext("2d"),this._preRenderCtx.textBaseline="top",ya(this._preRenderCtx),r?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=sa(a,e),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),this.overlaidCanvas=sa(a,e),this.overlaidCanvas.style.position=
"absolute",this.overlaidCanvas.style.webkitTapHighlightColor="transparent",this.overlaidCanvas.style.WebkitUserSelect="none",this.overlaidCanvas.style.MozUserSelect="none",this.overlaidCanvas.style.msUserSelect="none",this.overlaidCanvas.style.userSelect="none",this.overlaidCanvas.getContext&&(this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline="top",ya(this.overlaidCanvasCtx)),this._eventManager=
new ha(this),this.windowResizeHandler=M(window,"resize",function(){b._updateSize()&&(b.render(),b.isNavigator&&(b.stockChart&&b.stockChart.navigator&&b.stockChart.navigator.enabled)&&b.stockChart.navigator._updateSlider(b.stockChart._axisXMin,b.stockChart._axisXMax))},this.allDOMEventHandlers),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),P(this._toolBar,{position:"absolute",right:"1px",top:"1px"}),this._canvasJSContainer.appendChild(this._toolBar),
this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},M(this.overlaidCanvas,"click",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),M(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),M(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),M(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);ua(b._dropdownMenu)},this.allDOMEventHandlers),M(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},
this.allDOMEventHandlers),M(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),M(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),M(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),M(this.overlaidCanvas,window.navigator.msPointerEnabled?
"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),this.toolTip=new la(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function u(a,e){for(var c=[],b,d=0;d<a.length;d++)if(0==d)c.push(a[0]);else{var f,q,w;w=d-1;f=0===w?0:w-1;
q=w===a.length-1?w:w+1;b=Math.abs((a[q].x-a[f].x)/(0===a[q].x-a[w].x?0.01:a[q].x-a[w].x))*(e-1)/2+1;var l=(a[q].x-a[f].x)/b;b=(a[q].y-a[f].y)/b;c[c.length]=a[w].x>a[f].x&&0<l||a[w].x<a[f].x&&0>l?{x:a[w].x+l/3,y:a[w].y+b/3}:{x:a[w].x,y:a[w].y+(1===c.length?0:b/9)};w=d;f=0===w?0:w-1;q=w===a.length-1?w:w+1;b=Math.abs((a[q].x-a[f].x)/(0===a[w].x-a[f].x?0.01:a[w].x-a[f].x))*(e-1)/2+1;l=(a[q].x-a[f].x)/b;b=(a[q].y-a[f].y)/b;c[c.length]=a[w].x>a[f].x&&0<l||a[w].x<a[f].x&&0>l?{x:a[w].x-l/3,y:a[w].y-b/3}:
{x:a[w].x,y:a[w].y-b/9};c[c.length]=a[d]}return c}function C(a,e,c,b,d,f,q,w,l,k){var m=0;k?(q.color=f,w.color=f):k=1;m=l?Math.abs(d-c):Math.abs(b-e);m=0<q.trimLength?Math.abs(m*q.trimLength/100):Math.abs(m-q.length);l?(c+=m/2,d-=m/2):(e+=m/2,b-=m/2);var m=1===Math.round(q.thickness)%2?0.5:0,n=1===Math.round(w.thickness)%2?0.5:0;a.save();a.globalAlpha=k;a.strokeStyle=w.color||f;a.lineWidth=w.thickness||2;a.setLineDash&&a.setLineDash(K(w.dashType,w.thickness));a.beginPath();l&&0<w.thickness?(a.moveTo(b-
q.thickness/2,Math.round((c+d)/2)-n),a.lineTo(e+q.thickness/2,Math.round((c+d)/2)-n)):0<w.thickness&&(a.moveTo(Math.round((e+b)/2)-n,c+q.thickness/2),a.lineTo(Math.round((e+b)/2)-n,d-q.thickness/2));a.stroke();a.strokeStyle=q.color||f;a.lineWidth=q.thickness||2;a.setLineDash&&a.setLineDash(K(q.dashType,q.thickness));a.beginPath();l&&0<q.thickness?(a.moveTo(b-m,c),a.lineTo(b-m,d),a.moveTo(e+m,c),a.lineTo(e+m,d)):0<q.thickness&&(a.moveTo(e,c+m),a.lineTo(b,c+m),a.moveTo(e,d-m),a.lineTo(b,d-m));a.stroke();
a.restore()}function F(a,e){F.base.constructor.call(this,"Legend","legend",e,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=Xa(this.fontFamily,this.fontSize,this.fontWeight);
this.horizontalSpacing=this.fontSize}function Q(a,e,c,b){Q.base.constructor.call(this,"DataSeries","data",e,c,a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=c;this.noDataPointsInPlotArea=0;this.id=b;this.chart._eventManager.objectMap[b]={id:b,objectType:"dataSeries",dataSeriesIndex:c};a=e.dataPoints?e.dataPoints.length:0;this.dataPointEOs=[];for(e=0;e<a;e++)this.dataPointEOs[e]={};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=
!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function B(a,e,c,b,d,f){B.base.constructor.call(this,"Axis",e,c,b,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=
this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===d?("left"===f||"bottom"===f?(this.optionsName="axisX",l(this.chart.sessionVariables.axisX[b])&&(this.chart.sessionVariables.axisX[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX[b]):(this.optionsName="axisX2",l(this.chart.sessionVariables.axisX2[b])&&(this.chart.sessionVariables.axisX2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[b]),
this.options.interval||(this.intervalType=null)):"left"===f||"bottom"===f?(this.optionsName="axisY",l(this.chart.sessionVariables.axisY[b])&&(this.chart.sessionVariables.axisY[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY[b]):(this.optionsName="axisY2",l(this.chart.sessionVariables.axisY2[b])&&(this.chart.sessionVariables.axisY2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[b]);"undefined"===typeof this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));
"undefined"===typeof this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=d;"axisX"!==d||c&&"undefined"!==typeof c.gridThickness||(this.gridThickness=0);this._position=f;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this.options.scaleBreaks&&(this.scaleBreaks=
new fa(this.chart,this.options.scaleBreaks,++this.chart._eventManager.lastObjectId,this));this.stripLines=[];if(this.options.stripLines&&0<this.options.stripLines.length)for(a=0;a<this.options.stripLines.length;a++)this.stripLines.push(new ga(this.chart,this.options.stripLines[a],a,++this.chart._eventManager.lastObjectId,this));this.options.crosshair&&(this.crosshair=new da(this.chart,this.options.crosshair,this),this.crosshair._updatedValue=l(this.sessionVariables.crosshairValue)?null:this.sessionVariables.crosshairValue);
this._titleTextBlock=null;this.hasOptionChanged("viewportMinimum")&&null===this.viewportMinimum&&(this.options.viewportMinimum=void 0,this.sessionVariables.viewportMinimum=null);this.hasOptionChanged("viewportMinimum")||isNaN(this.sessionVariables.newViewportMinimum)||null===this.sessionVariables.newViewportMinimum?this.sessionVariables.newViewportMinimum=null:this.viewportMinimum=this.sessionVariables.newViewportMinimum;this.hasOptionChanged("viewportMaximum")&&null===this.viewportMaximum&&(this.options.viewportMaximum=
void 0,this.sessionVariables.viewportMaximum=null);this.hasOptionChanged("viewportMaximum")||isNaN(this.sessionVariables.newViewportMaximum)||null===this.sessionVariables.newViewportMaximum?this.sessionVariables.newViewportMaximum=null:this.viewportMaximum=this.sessionVariables.newViewportMaximum;null!==this.minimum&&null!==this.viewportMinimum&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));null!==this.maximum&&null!==this.viewportMaximum&&(this.viewportMaximum=Math.min(this.viewportMaximum,
this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum")}function fa(a,e,c,b){fa.base.constructor.call(this,"ScaleBreaks","scaleBreaks",e,null,b);this.id=c;this.chart=a;this.ctx=this.chart.ctx;this.axis=b;this.optionsName="scaleBreaks";this.isOptionsInArray=!1;this._appliedBreaks=[];this.customBreaks=[];this.autoBreaks=[];"string"===typeof this.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=isNaN(this.spacing)?8:(10<this.spacing?10:this.spacing)+"%"):"number"!==
typeof this.spacing&&(this.spacing=8);this.autoCalculate&&(this.maxNumberOfAutoBreaks=Math.min(this.maxNumberOfAutoBreaks,5));if(this.options.customBreaks&&0<this.options.customBreaks.length){for(a=0;a<this.options.customBreaks.length;a++)this.customBreaks.push(new ba(this.chart,"customBreaks",this.options.customBreaks[a],a,++this.chart._eventManager.lastObjectId,this)),"number"===typeof this.customBreaks[a].startValue&&("number"===typeof this.customBreaks[a].endValue&&this.customBreaks[a].endValue!==
this.customBreaks[a].startValue)&&this._appliedBreaks.push(this.customBreaks[a]);this._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue});for(a=0;a<this._appliedBreaks.length-1;a++)this._appliedBreaks[a].endValue>=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 ba(a,e,c,b,d,f){ba.base.constructor.call(this,"Break",e,c,b,f);this.id=d;this.chart=a;this.ctx=this.chart.ctx;this.scaleBreaks=f;this.optionsName=e;this.isOptionsInArray=!0;this.type=c.type?this.type:f.type;this.fillOpacity=l(c.fillOpacity)?f.fillOpacity:this.fillOpacity;this.lineThickness=l(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;!l(this.startValue)&&this.startValue.getTime&&(this.startValue=this.startValue.getTime());!l(this.endValue)&&this.endValue.getTime&&(this.endValue=this.endValue.getTime());"number"===typeof this.startValue&&("number"===typeof this.endValue&&this.endValue<this.startValue)&&(a=this.startValue,this.startValue=this.endValue,this.endValue=a);this.spacing="undefined"===typeof c.spacing?f.spacing:c.spacing;"string"===typeof this.options.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=
isNaN(this.spacing)?0:(10<this.spacing?10:this.spacing)+"%"):"number"!==typeof this.options.spacing&&(this.spacing=f.spacing);this.size=f.parent.logarithmic?1:0}function ga(a,e,c,b,d){ga.base.constructor.call(this,"StripLine","stripLines",e,c,d);this.id=b;this.chart=a;this.ctx=this.chart.ctx;this.label=this.label;this.axis=d;this.optionsName="stripLines";this.isOptionsInArray=!0;this._thicknessType="pixel";null!==this.startValue&&null!==this.endValue&&(this.value=d.logarithmic?Math.sqrt((this.startValue.getTime?
this.startValue.getTime():this.startValue)*(this.endValue.getTime?this.endValue.getTime():this.endValue)):((this.startValue.getTime?this.startValue.getTime():this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this._thicknessType=null)}function da(a,e,c){da.base.constructor.call(this,"Crosshair","crosshair",e,null,c);this.chart=a;this.ctx=this.chart.ctx;this.axis=c;this.optionsName="crosshair";this._thicknessType="pixel"}function la(a,e){la.base.constructor.call(this,
"ToolTip","toolTip",e,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._prevY=this._prevX=NaN;this.containerTransitionDuration=0.1;this.mozContainerTransition=this.getContainerTransition(this.containerTransitionDuration);this.optionsName="toolTip";this._initialize()}function ha(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=
sa(this.chart.width,this.chart.height,!0);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function ia(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}oa(t,U);t.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&this._animator.cancelAllAnimations();this._panTimerId&&clearTimeout(this._panTimerId);for(var e=0;e<a.length;e++){var c=a[e][0],b=a[e][1],d=a[e][2],f=a[e][3],f=f||!1;c.removeEventListener?
c.removeEventListener(b,d,f):c.detachEvent&&c.detachEvent("on"+b,d)}this.allDOMEventHandlers=[];for(this.removeAllEventListeners();this._canvasJSContainer&&this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild);for(;this.container&&this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild);for(;this._dropdownMenu&&this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild);this.container=
this._canvasJSContainer=null;this.toolTip.container=null;this.canvas&&xa(this.canvas);this.overlaidCanvas&&xa(this.overlaidCanvas);this._preRenderCanvas&&xa(this._preRenderCanvas);this._breaksCanvas&&xa(this._breaksCanvas);this._eventManager&&this._eventManager.ghostCanvas&&xa(this._eventManager.ghostCanvas);this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=this._zoomButton=null};t.prototype._updateOptions=function(){var a=this;this.updateOption("width");this.updateOption("height");
this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.stockChart&&this.stockChart.options&&"undefined"!==typeof this.stockChart.options.theme&&l(this.options.theme)?this.theme=this.stockChart.theme:l(this.stockChart)&&l(this.theme)&&(this.theme="light1");this.updateOption("colorSet")&&(this.selectedColorSet="undefined"!==typeof Aa[this.colorSet]?Aa[this.colorSet]:Aa.colorSet1);
this.updateOption("backgroundColor");this.stockChart&&(this.stockChart.options&&"undefined"!==typeof this.stockChart.options.backgroundColor&&l(this.options.backgroundColor))&&(this.backgroundColor=this.stockChart.backgroundColor);this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this.stockChart&&l(this.options.culture)&&(this.culture=this.stockChart.culture);this._cultureInfo=new Ia(this.culture);this.updateOption("animationEnabled");this.animationEnabled=
this.animationEnabled&&r;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.toolbar=new Ta(this,this.options.toolbar);if(this.stockChart&&this.stockChart.options&&this.stockChart.options.toolbar&&!this.options.toolbar)for(var e in this.stockChart.options.toolbar)this.toolbar[e]=this.stockChart.options.toolbar[e];if(this.options.zoomEnabled||
this.panEnabled){if(this._zoomButton)P(this._zoomButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&this._zoomButton.childNodes[0]&&P(this._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});else{var c=!1;ua(this._zoomButton=document.createElement("button"));ra(this,this._zoomButton,"pan");this._toolBar.appendChild(this._zoomButton);
this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor;M(this._zoomButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers);M(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,ra(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,ra(a,a._zoomButton,"pan"));a.render()},this.allDOMEventHandlers);M(this._zoomButton,"mousemove",function(){c?c=!1:(P(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,
color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&P(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);M(this._zoomButton,"mouseout",function(){c||(P(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&P(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",
filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?(P(this._resetButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&this._resetButton.childNodes[0]&&P(this._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}),this._resetButton.title=this._cultureInfo.resetText):(c=!1,ua(this._resetButton=document.createElement("button")),
ra(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor,this._toolBar.appendChild(this._resetButton),M(this._resetButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers),M(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,ra(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<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=null,a.sessionVariables.axisX[b].newViewportMaximum=null;if(a.sessionVariables.axisX2)for(b=0;b<a.sessionVariables.axisX2.length;b++)a.sessionVariables.axisX2[b].newViewportMinimum=null,a.sessionVariables.axisX2[b].newViewportMaximum=null;
if(a.sessionVariables.axisY)for(b=0;b<a.sessionVariables.axisY.length;b++)a.sessionVariables.axisY[b].newViewportMinimum=null,a.sessionVariables.axisY[b].newViewportMaximum=null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();0>=navigator.userAgent.search("MSIE")&&P(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});
ua(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter={stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,maximum:null});a._dispatchRangeEvent("rangeChanging","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanging",a.stockChart.dispatchEvent("rangeChanging",a.stockChart._rangeEventParameter,a.stockChart));a.render();a.syncCharts&&a.stockChart&&(a.stockChart.rangeUpdatedBy=!a.stockChart.navigator.slider||l(a.stockChart.navigator.slider.options.minimum)&&
l(a.stockChart.navigator.slider.options.maximum)?!a.stockChart.rangeSelector.enabled||!a.stockChart.rangeSelector.inputFields.enabled||l(a.stockChart.rangeSelector.inputFields.options.startValue)&&l(a.stockChart.rangeSelector.inputFields.options.endValue)?null:"inputFields":"navigator",l(a.stockChart._selectedRangeButtonIndex)||(a.stockChart.rangeUpdatedBy="rangeButton"),a.syncCharts(null,null),a.stockChart.rangeSelector&&a.stockChart.rangeSelector.enabled&&a.stockChart.rangeSelector.render(),"rangeButton"===
a.stockChart.rangeUpdatedBy&&a.stockChart.rangeSelector.selectedRangeButtonIndex<a.stockChart.rangeSelector.buttons.length&&(b=a.stockChart.rangeSelector.buttons[a.stockChart._selectedRangeButtonIndex],b.enabled&&(b.state="on",b.textBlock.fontWeight="bold",b.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect,a.stockChart.rangeSelector.sessionVariables._clickedRangeButtonIndex=null,
b.render())));a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,a.stockChart))},this.allDOMEventHandlers),M(this._resetButton,"mousemove",function(){c||(P(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&P(a._resetButton.childNodes[0],
{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),M(this._resetButton,"mouseout",function(){c||(P(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&P(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?ra(a,a._zoomButton,"zoom"):ra(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&ra(a,a._resetButton,"reset"));this.options.toolTip&&
this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(e in this.toolTip.options)this.toolTip.options.hasOwnProperty(e)&&this.toolTip.updateOption(e)};t.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0,b=ab(this.container);this.options.width?e=this.width:this.width=e=0<this.container.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight)?this.container.clientWidth-parseFloat(b.paddingLeft)-
parseFloat(b.paddingRight):this.width;l(this.stockChart)||l(this.index)?this.options.height?c=this.height:this.height=c=0<this.container.clientHeight-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom)?this.container.clientHeight-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom):this.height:c=this.height=this.stockChart._chartsHeight[this.index];if(this.canvas.width!==e*ka||this.canvas.height!==c*ka){for(b=0;b<a.length;b++)La(a[b],e,c);this.bounds={x1:0,y1:0,x2:this.width,y2:this.height,width:this.width,
height:this.height};a=!0}else a=!1;return a};t.prototype._initialize=function(){this.isNavigator=l(this.parent)||l(this.parent._defaultsKey)||"Navigator"!==this.parent._defaultsKey?!1:!0;this._animator?this._animator.cancelAllAnimations():this._animator=new ia(this);this.removeAllEventListeners();this.disableToolTip=!1;this._axes=[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=r&&this.animationEnabled&&0===this.renderCount;this._updateSize();
this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=[];this._indexLabels=[];this._dataInRenderedOrder=[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,plotTypes:[]};this.layoutManager=new Da(0,0,this.width,this.height,this.isNavigator?0:2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];this.title=null;this.subtitles=[];var a=0,e=null;if(this.options.data){for(var c=0;c<this.options.data.length;c++)if(a++,
!this.options.data[c].type||0<=t._supportedChartTypes.indexOf(this.options.data[c].type)){var b=new Q(this,this.options.data[c],a-1,++this._eventManager.lastObjectId);if(!l(b)&&b.dataPoints)for(var d=0;d<b.dataPoints.length;d++)if(b.dataPoints[d].x&&b.dataPoints[d].x.getTime){b.xValueType="dateTime";break}"error"===b.type&&(b.linkedDataSeriesIndex=l(this.options.data[c].linkedDataSeriesIndex)?c-1:this.options.data[c].linkedDataSeriesIndex,0>b.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?1<this.options.data.length?(b._colorSet=[this.selectedColorSet[b.index%this.selectedColorSet.length]],b.color=this.selectedColorSet[b.index%this.selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===
b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===b.type||"ohlc"===b.type||"waterfall"===b.type||"boxAndWhisker"===b.type?[this.selectedColorSet[0]]:this.selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||
(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(g):b.dataPoints.sort(g));this.data.push(b);var d=b.axisPlacement,e=e||d,f;"normal"===d?"xySwapped"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===d?"normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+
b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===d?"normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):
null===d&&"none"===this.plotInfo.axisPlacement&&(f='You cannot combine "'+b.type+'" with pie chart');if(f&&window.console){window.console.log(f);return}}for(c=0;c<this.data.length;c++){if("none"==e&&"error"===this.data[c].type&&window.console){window.console.log('You cannot combine "'+b.type+'" with error chart');return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=e||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=
!0;this._plotAreaElements=[]};t._supportedChartTypes=Ca("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));t.prototype.setLayout=function(){for(var a=this._plotAreaElements,e=0;e<this.data.length;e++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[e].axisYType||
"primary"===this.data[e].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new B(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new B(this,"axisY",this.options.axisY[c],c,"axisY","bottom"));this.data[e].axisY=this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?
this.data[e].axisYIndex:0];this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?this.data[e].axisYIndex:0].dataSeries.push(this.data[e])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new B(this,"axisY",this.options.axisY,0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new B(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[e].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[e]);
if("secondary"===this.data[e].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(c=0;c<this.options.axisY2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[c]=new B(this,"axisY2",this.options.axisY2[c],c,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new B(this,"axisY2",this.options.axisY2[c],c,"axisY","top"));this.data[e].axisY=this.axisY2[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<
this.axisY2.length?this.data[e].axisYIndex:0];this.axisY2[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY2.length?this.data[e].axisYIndex:0].dataSeries.push(this.data[e])}else this.axisY2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[0]=new B(this,"axisY2",this.options.axisY2,0,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[0]=new B(this,"axisY2",this.options.axisY2,0,"axisY","top"))),this.data[e].axisY=this.axisY2[0],
this.axisY2[0].dataSeries.push(this.data[e]);if(!this.data[e].axisXType||"primary"===this.data[e].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(c=0;c<this.options.axisX.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[c]=new B(this,"axisX",this.options.axisX[c],c,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[c]=new B(this,"axisX",this.options.axisX[c],c,"axisX","left"));this.data[e].axisX=
this.axisX[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX.length?this.data[e].axisXIndex:0];this.axisX[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX.length?this.data[e].axisXIndex:0].dataSeries.push(this.data[e])}else this.axisX.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[0]=new B(this,"axisX",this.options.axisX,0,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[0]=new B(this,"axisX",this.options.axisX,
0,"axisX","left"))),this.data[e].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[e]);if("secondary"===this.data[e].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(c=0;c<this.options.axisX2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[c]=new B(this,"axisX2",this.options.axisX2[c],c,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[c]=new B(this,"axisX2",this.options.axisX2[c],
c,"axisX","right"));this.data[e].axisX=this.axisX2[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX2.length?this.data[e].axisXIndex:0];this.axisX2[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX2.length?this.data[e].axisXIndex:0].dataSeries.push(this.data[e])}else this.axisX2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new B(this,"axisX2",this.options.axisX2,0,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[0]=
new B(this,"axisX2",this.options.axisX2,0,"axisX","right"))),this.data[e].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[e])}if(this.axisY){for(c=1;c<this.axisY.length;c++)"undefined"===typeof this.axisY[c].options.gridThickness&&(this.axisY[c].gridThickness=0);for(c=0;c<this.axisY.length-1;c++)"undefined"===typeof this.axisY[c].options.margin&&(this.axisY[c].margin=10)}if(this.axisY2){for(c=1;c<this.axisY2.length;c++)"undefined"===typeof this.axisY2[c].options.gridThickness&&(this.axisY2[c].gridThickness=
0);for(c=0;c<this.axisY2.length-1;c++)"undefined"===typeof this.axisY2[c].options.margin&&(this.axisY2[c].margin=10)}this.axisY&&0<this.axisY.length&&(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(c=0;c<this.axisX.length;c++)"undefined"===typeof this.axisX[c].options.gridThickness&&
(this.axisX[c].gridThickness=0);if(this.axisX2)for(c=0;c<this.axisX2.length;c++)"undefined"===typeof this.axisX2[c].options.gridThickness&&(this.axisX2[c].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));c=!1;if(0<this._axes.length&&
this.options.zoomEnabled&&(this.zoomEnabled||this.panEnabled))for(e=0;e<this._axes.length;e++)if(!l(this._axes[e].viewportMinimum)||!l(this._axes[e].viewportMaximum)){c=!0;break}c?(Ka(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:
0)+"px solid "+this.toolbar.buttonBorderColor):(ua(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));eb(this);this._processData();this.options.title&&(this.title=new za(this,this.options.title),this.title.dockInsidePlotArea?a.push(this.title):this.title.setLayout());if(this.options.subtitles)for(e=0;e<this.options.subtitles.length;e++)c=new Ha(this,this.options.subtitles[e],
e),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new F(this,this.options.legend);for(e=0;e<this.data.length;e++)(this.data[e].showInLegend||"pie"===this.data[e].type||"doughnut"===this.data[e].type||"funnel"===this.data[e].type||"pyramid"===this.data[e].type)&&this.legend.dataSeries.push(this.data[e]);this.legend.dockInsidePlotArea?a.push(this.legend):this.legend.setLayout();for(e=0;e<this._axes.length;e++)if(this._axes[e].scaleBreaks&&this._axes[e].scaleBreaks._appliedBreaks.length){r?
(this._breaksCanvas=sa(this.width,this.height,!0),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=sa(this.width,this.height);this._preRenderCtx=this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||B.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};t.prototype.renderElements=
function(){if(this.height&&this.width){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var e=0;e<this.subtitles.length;e++)this.subtitles[e].dockInsidePlotArea||this.subtitles[e].render();this.legend.dockInsidePlotArea||this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)B.render(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement);else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();
else return;for(e=0;e<a.length;e++)a[e].setLayout(),a[e].render();var c=[];if(this.animatedRender){var b=sa(this.width,this.height);b.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}hb(this);var a=this.ctx.miterLimit,d;this.ctx.miterLimit=3;r&&this._breaksCanvas&&(this._preRenderCtx.drawImage(this.canvas,0,0,this.width,this.height),this._preRenderCtx.drawImage(this._breaksCanvas,0,0,this.width,this.height),this._breaksCanvasCtx.globalCompositeOperation="source-atop",this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(e=0;e<this.plotInfo.plotTypes.length;e++)for(var f=this.plotInfo.plotTypes[e],q=0;q<f.plotUnits.length;q++){var w=f.plotUnits[q],J=null;w.targetCanvas&&xa(w.targetCanvas);w.targetCanvas=null;this.animatedRender&&(w.targetCanvas=sa(this.width,this.height),w.targetCanvasCtx=w.targetCanvas.getContext("2d"),d=w.targetCanvasCtx.miterLimit,w.targetCanvasCtx.miterLimit=3);"line"===w.type?J=this.renderLine(w):"stepLine"===
w.type?J=this.renderStepLine(w):"spline"===w.type?J=this.renderSpline(w):"column"===w.type?J=this.renderColumn(w):"bar"===w.type?J=this.renderBar(w):"area"===w.type?J=this.renderArea(w):"stepArea"===w.type?J=this.renderStepArea(w):"splineArea"===w.type?J=this.renderSplineArea(w):"stackedColumn"===w.type?J=this.renderStackedColumn(w):"stackedColumn100"===w.type?J=this.renderStackedColumn100(w):"stackedBar"===w.type?J=this.renderStackedBar(w):"stackedBar100"===w.type?J=this.renderStackedBar100(w):"stackedArea"===
w.type?J=this.renderStackedArea(w):"stackedArea100"===w.type?J=this.renderStackedArea100(w):"bubble"===w.type?J=J=this.renderBubble(w):"scatter"===w.type?J=this.renderScatter(w):"pie"===w.type?this.renderPie(w):"doughnut"===w.type?this.renderPie(w):"funnel"===w.type?J=this.renderFunnel(w):"pyramid"===w.type?J=this.renderFunnel(w):"candlestick"===w.type?J=this.renderCandlestick(w):"ohlc"===w.type?J=this.renderCandlestick(w):"rangeColumn"===w.type?J=this.renderRangeColumn(w):"error"===w.type?J=this.renderError(w):
"rangeBar"===w.type?J=this.renderRangeBar(w):"rangeArea"===w.type?J=this.renderRangeArea(w):"rangeSplineArea"===w.type?J=this.renderRangeSplineArea(w):"waterfall"===w.type?J=this.renderWaterfall(w):"boxAndWhisker"===w.type&&(J=this.renderBoxAndWhisker(w));for(var k=0;k<w.dataSeriesIndexes.length;k++)this._dataInRenderedOrder.push(this.data[w.dataSeriesIndexes[k]]);this.animatedRender&&(w.targetCanvasCtx.miterLimit=d,J&&c.push(J))}this.ctx.miterLimit=a;this.animatedRender&&this._breaksCanvasCtx&&c.push({source:this._breaksCanvasCtx,
dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0,startTimePercent:0.7});this.animatedRender&&0<this._indexLabels.length&&(d=sa(this.width,this.height).getContext("2d"),ya(d),c.push(this.renderIndexLabels(d)));var m=this;if(0<c.length)m.disableToolTip=!0,m._animator.animate(200,m.animationDuration,function(a){m.ctx.clearRect(0,0,m.width,m.height);m.ctx.drawImage(b,0,0,Math.floor(m.width*ka),Math.floor(m.height*ka),0,0,m.width,m.height);for(var d=
0;d<c.length;d++)J=c[d],1>a&&"undefined"!==typeof J.startTimePercent?a>=J.startTimePercent&&J.animationCallback(J.easingFunction(a-J.startTimePercent,0,1,1-J.startTimePercent),J):J.animationCallback(J.easingFunction(a,0,1,1),J);m.dispatchEvent("dataAnimationIterationEnd",{chart:m})},function(){c=[];for(var a=0;a<m.plotInfo.plotTypes.length;a++)for(var d=m.plotInfo.plotTypes[a],e=0;e<d.plotUnits.length;e++){var f=d.plotUnits[e];f.targetCanvas&&xa(f.targetCanvas);f.targetCanvas=null}b=null;m.disableToolTip=
!1;m.dispatchEvent("dataAnimationEnd",{chart:m})});else{if(m._breaksCanvas)if(r)m.plotArea.ctx.drawImage(m._breaksCanvas,0,0,this.width,this.height);else for(k=0;k<m._axes.length;k++)m._axes[k].createMask();0<m._indexLabels.length&&m.renderIndexLabels();m.dispatchEvent("dataAnimationIterationEnd",{chart:m});m.dispatchEvent("dataAnimationEnd",{chart:m})}this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||ua(this._zoomButton,
this._resetButton);l(this.toolTip._xValue)||l(this.toolTip._dataSeriesIndex)||(this.toolTip.showAtX(this.toolTip._xValue,this.toolTip._dataSeriesIndex),this.toolTip.highlightObjects(this.toolTip._entries));this.toolTip._updateToolTip();this.toolTip.enabled&&this.toolTip._updatedEventParameters&&!isNaN(this.toolTip._prevX)&&!isNaN(this.toolTip._prevY)&&this.toolTip.container&&this.toolTip.container.style&&this.toolTip.dispatchEvent("none"===this.toolTip.container.style.display?"hidden":"updated",this.toolTip._updatedEventParameters,
this.toolTip);this.renderCount++;Ga&&(m=this,setTimeout(function(){var a=document.getElementById("ghostCanvasCopy");a&&(La(a,m.width,m.height),a.getContext("2d").drawImage(m._eventManager.ghostCanvas,0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx);for(k=0;k<this._axes.length;k++)this._axes[k].maskCanvas&&(delete this._axes[k].maskCanvas,delete this._axes[k].maskCtx)}};t.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();
this._preRenderCanvas&&xa(this._preRenderCanvas)};t.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,mousemove:this._plotAreaMouseMove,cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};t.prototype.categoriseDataSeries=function(){for(var a="",e=0;e<this.data.length;e++)if(a=this.data[e],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=t._supportedChartTypes.indexOf(a.type)){for(var c=
null,b=!1,d=null,f=!1,q=0;q<this.plotInfo.plotTypes.length;q++)if(this.plotInfo.plotTypes[q].type===a.type){b=!0;c=this.plotInfo.plotTypes[q];break}b||(c={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(c));for(q=0;q<c.plotUnits.length;q++)if(c.plotUnits[q].axisYType===a.axisYType&&c.plotUnits[q].axisXType===a.axisXType&&c.plotUnits[q].axisYIndex===a.axisYIndex&&c.plotUnits[q].axisXIndex===a.axisXIndex){f=!0;d=c.plotUnits[q];break}f||(d={type:a.type,previousDataSeriesCount:0,
index:c.plotUnits.length,plotType:c,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===a.axisYType?this.axisY[0<=a.axisYIndex&&a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],
yTotals:[],yAbsTotals:[]},c.plotUnits.push(d));c.totalDataSeries++;d.dataSeriesIndexes.push(e);a.plotUnit=d}for(e=0;e<this.plotInfo.plotTypes.length;e++)for(c=this.plotInfo.plotTypes[e],q=a=0;q<c.plotUnits.length;q++)c.plotUnits[q].previousDataSeriesCount=a,a+=c.plotUnits[q].dataSeriesIndexes.length};t.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var e=this.data[a];if(e.dataPoints)for(var c=e.dataPoints.length,b=0;b<c;b++)e.dataPointIds[b]=++this._eventManager.lastObjectId}};
t.prototype._processData=function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var e=this.plotInfo.plotTypes[a],c=0;c<e.plotUnits.length;c++){var b=e.plotUnits[c];"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type?this._processMultiseriesPlotUnit(b):"stackedColumn"===b.type||"stackedBar"===b.type||
"stackedArea"===b.type?this._processStackedPlotUnit(b):"stackedColumn100"===b.type||"stackedBar100"===b.type||"stackedArea100"===b.type?this._processStacked100PlotUnit(b):"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type||"boxAndWhisker"===b.type?this._processMultiYPlotUnit(b):"waterfall"===b.type&&this._processSpecificPlotUnit(b)}this.calculateAutoBreaks()};t.prototype._processMultiseriesPlotUnit=
function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=0;q<a.dataSeriesIndexes.length;q++){var w=this.data[a.dataSeriesIndexes[q]],l=0,k=!1,m=!1,n;if("normal"===w.axisPlacement||"xySwapped"===w.axisPlacement)var p=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:
a.axisX.logarithmic?0:-Infinity,h=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(w.dataPoints[l].x&&w.dataPoints[l].x.getTime||"dateTime"===w.xValueType)f=!0;for(l=0;l<w.dataPoints.length;l++){"undefined"===typeof w.dataPoints[l].x&&(w.dataPoints[l].x=l+(a.axisX.logarithmic?1:0));w.dataPoints[l].x.getTime?
(f=!0,b=w.dataPoints[l].x.getTime()):b=w.dataPoints[l].x;d=w.dataPoints[l].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);d<e.min&&"number"===typeof d&&(e.min=d);d>e.max&&"number"===typeof d&&(e.max=d);if(0<l){if(a.axisX.logarithmic){var y=b/w.dataPoints[l-1].x;1>y&&(y=1/y);c.minDiff>y&&1!==y&&(c.minDiff=y)}else y=b-w.dataPoints[l-1].x,0>y&&(y*=-1),c.minDiff>y&&0!==y&&(c.minDiff=y);null!==d&&null!==w.dataPoints[l-1].y&&(a.axisY.logarithmic?(y=d/w.dataPoints[l-1].y,1>y&&(y=1/y),e.minDiff>y&&1!==y&&(e.minDiff=
y)):(y=d-w.dataPoints[l-1].y,0>y&&(y*=-1),e.minDiff>y&&0!==y&&(e.minDiff=y)))}if(b<p&&!k)null!==d&&(n=b);else{if(!k&&(k=!0,0<l)){l-=2;continue}if(b>h&&!m)m=!0;else if(b>h&&m)continue;w.dataPoints[l].label&&(a.axisX.labels[b]=w.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&n<b&&(c.viewPortMin=n):(d<e.viewPortMin&&"number"===typeof d&&(e.viewPortMin=d),d>e.viewPortMax&&"number"===typeof d&&(e.viewPortMax=d))}}w.axisX.valueType=
w.xValueType=f?"dateTime":"number"}};t.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=[],w=[],J=Infinity,k=-Infinity,m={},n=0;n<a.dataSeriesIndexes.length;n++){var p=this.data[a.dataSeriesIndexes[n]],h=0,y=!1,g=!1,r;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var s=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&
a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,x=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(p.dataPoints[h].x&&p.dataPoints[h].x.getTime||"dateTime"===p.xValueType)f=!0;for(h=0;h<p.dataPoints.length;h++){"undefined"===
typeof p.dataPoints[h].x&&(p.dataPoints[h].x=h+(a.axisX.logarithmic?1:0));p.dataPoints[h].x.getTime?(f=!0,b=p.dataPoints[h].x.getTime()):b=p.dataPoints[h].x;d=l(p.dataPoints[h].y)?0:p.dataPoints[h].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<h){if(a.axisX.logarithmic){var v=b/p.dataPoints[h-1].x;1>v&&(v=1/v);c.minDiff>v&&1!==v&&(c.minDiff=v)}else v=b-p.dataPoints[h-1].x,0>v&&(v*=-1),c.minDiff>v&&0!==v&&(c.minDiff=v);null!==d&&null!==p.dataPoints[h-1].y&&(a.axisY.logarithmic?0<d&&(v=d/p.dataPoints[h-
1].y,1>v&&(v=1/v),e.minDiff>v&&1!==v&&(e.minDiff=v)):(v=d-p.dataPoints[h-1].y,0>v&&(v*=-1),e.minDiff>v&&0!==v&&(e.minDiff=v)))}if(b<s&&!y)null!==p.dataPoints[h].y&&(r=b);else{if(!y&&(y=!0,0<h)){h-=2;continue}if(b>x&&!g)g=!0;else if(b>x&&g)continue;p.dataPoints[h].label&&(a.axisX.labels[b]=p.dataPoints[h].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===p.dataPoints[h].y?c.viewPortMin===b&&r<b&&(c.viewPortMin=r):(m[b]=(m[b]||0)+p.dataPoints[h].y,p.dataPointEOs[h].cumulativeY=
m[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?q[b]?q[b]+=d:(q[b]=d,J=Math.min(d,J)):w[b]?w[b]+=d:(w[b]=d,k=Math.max(d,k)))}}a.axisY.scaleBreaks&&(a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks)&&(e.dataPointYPositiveSums?(e.dataPointYPositiveSums.push.apply(e.dataPointYPositiveSums,q),e.dataPointYNegativeSums.push.apply(e.dataPointYPositiveSums,w)):(e.dataPointYPositiveSums=q,e.dataPointYNegativeSums=
w));p.axisX.valueType=p.xValueType=f?"dateTime":"number"}for(h in q)q.hasOwnProperty(h)&&!isNaN(h)&&(a=q[h],a<e.min&&(e.min=Math.min(a,J)),a>e.max&&(e.max=a),h<c.viewPortMin||h>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=Math.min(a,J)),a>e.viewPortMax&&(e.viewPortMax=a)));for(h in w)w.hasOwnProperty(h)&&!isNaN(h)&&(a=w[h],a<e.min&&(e.min=a),a>e.max&&(e.max=Math.max(a,k)),h<c.viewPortMin||h>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=a),a>e.viewPortMax&&(e.viewPortMax=Math.max(a,k))))}};t.prototype._processStacked100PlotUnit=
function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=!1,w=!1,J={},k=[],m=0;m<a.dataSeriesIndexes.length;m++){var n=this.data[a.dataSeriesIndexes[m]],p=0,h=!1,y=!1,g;if("normal"===n.axisPlacement||"xySwapped"===n.axisPlacement)var r=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?
a.axisX.options.minimum:-Infinity,s=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)f=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?
(f=!0,b=n.dataPoints[p].x.getTime()):b=n.dataPoints[p].x;d=l(n.dataPoints[p].y)?null:n.dataPoints[p].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<p){if(a.axisX.logarithmic){var x=b/n.dataPoints[p-1].x;1>x&&(x=1/x);c.minDiff>x&&1!==x&&(c.minDiff=x)}else x=b-n.dataPoints[p-1].x,0>x&&(x*=-1),c.minDiff>x&&0!==x&&(c.minDiff=x);l(d)||null===n.dataPoints[p-1].y||(a.axisY.logarithmic?0<d&&(x=d/n.dataPoints[p-1].y,1>x&&(x=1/x),e.minDiff>x&&1!==x&&(e.minDiff=x)):(x=d-n.dataPoints[p-1].y,0>x&&(x*=-1),e.minDiff>
x&&0!==x&&(e.minDiff=x)))}if(b<r&&!h)null!==d&&(g=b);else{if(!h&&(h=!0,0<p)){p-=2;continue}if(b>s&&!y)y=!0;else if(b>s&&y)continue;n.dataPoints[p].label&&(a.axisX.labels[b]=n.dataPoints[p].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&g<b&&(c.viewPortMin=g):(J[b]=(J[b]||0)+n.dataPoints[p].y,n.dataPointEOs[p].cumulativeY=J[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?q=
!0:0>d&&(w=!0),k[b]=k[b]?k[b]+Math.abs(d):Math.abs(d))}}n.axisX.valueType=n.xValueType=f?"dateTime":"number"}a.axisY.logarithmic?(e.max=l(e.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(e.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):q&&!w?(e.max=l(e.viewPortMax)?99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):q&&w?(e.max=l(e.viewPortMax)?99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?
-99:Math.min(e.viewPortMin,-99)):!q&&w&&(e.max=l(e.viewPortMax)?-1:Math.max(e.viewPortMax,-1),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99));e.viewPortMin=e.min;e.viewPortMax=e.max;a.dataPointYSums=k}};t.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f,q,w=!1,l=0;l<a.dataSeriesIndexes.length;l++){var k=this.data[a.dataSeriesIndexes[l]],m=0,n=!1,p=!1,h,y,g;if("normal"===k.axisPlacement||
"xySwapped"===k.axisPlacement)var r=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,s=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?
a.axisX.options.maximum:Infinity;if(k.dataPoints[m].x&&k.dataPoints[m].x.getTime||"dateTime"===k.xValueType)w=!0;for(m=0;m<k.dataPoints.length;m++){"undefined"===typeof k.dataPoints[m].x&&(k.dataPoints[m].x=m+(a.axisX.logarithmic?1:0));k.dataPoints[m].x.getTime?(w=!0,b=k.dataPoints[m].x.getTime()):b=k.dataPoints[m].x;if((d=k.dataPoints[m].y)&&d.length){f=Math.min.apply(null,d);q=Math.max.apply(null,d);y=!0;for(var x=0;x<d.length;x++)null===d.k&&(y=!1);y&&(n||(g=h),h=b)}b<c.min&&(c.min=b);b>c.max&&
(c.max=b);f<e.min&&(e.min=f);q>e.max&&(e.max=q);0<m&&(a.axisX.logarithmic?(y=b/k.dataPoints[m-1].x,1>y&&(y=1/y),c.minDiff>y&&1!==y&&(c.minDiff=y)):(y=b-k.dataPoints[m-1].x,0>y&&(y*=-1),c.minDiff>y&&0!==y&&(c.minDiff=y)),d&&(null!==d[0]&&k.dataPoints[m-1].y&&null!==k.dataPoints[m-1].y[0])&&(a.axisY.logarithmic?(y=d[0]/k.dataPoints[m-1].y[0],1>y&&(y=1/y),e.minDiff>y&&1!==y&&(e.minDiff=y)):(y=d[0]-k.dataPoints[m-1].y[0],0>y&&(y*=-1),e.minDiff>y&&0!==y&&(e.minDiff=y))));if(!(b<r)||n){if(!n&&(n=!0,0<m)){m-=
2;h=g;continue}if(b>s&&!p)p=!0;else if(b>s&&p)continue;k.dataPoints[m].label&&(a.axisX.labels[b]=k.dataPoints[m].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&d)for(x=0;x<d.length;x++)if(null===d[x]&&h<b){c.viewPortMin=h;break}null===d?c.viewPortMin===b&&h<b&&(c.viewPortMin=h):(f<e.viewPortMin&&(e.viewPortMin=f),q>e.viewPortMax&&(e.viewPortMax=q))}}k.axisX.valueType=k.xValueType=w?"dateTime":"number"}};t.prototype._processSpecificPlotUnit=function(a){if("waterfall"===
a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,f=!1,q=0;q<a.dataSeriesIndexes.length;q++){var w=this.data[a.dataSeriesIndexes[q]],l=0,k=!1,m=!1,n=b=0;if("normal"===w.axisPlacement||"xySwapped"===w.axisPlacement)var p=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:
a.axisX.logarithmic?0:-Infinity,h=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(w.dataPoints[l].x&&w.dataPoints[l].x.getTime||"dateTime"===w.xValueType)f=!0;for(l=0;l<w.dataPoints.length;l++)"undefined"!==typeof w.dataPoints[l].isCumulativeSum&&!0===w.dataPoints[l].isCumulativeSum?(w.dataPointEOs[l].cumulativeSumYStartValue=
0,w.dataPointEOs[l].cumulativeSum=0===l?0:w.dataPointEOs[l-1].cumulativeSum,w.dataPoints[l].y=0===l?0:w.dataPointEOs[l-1].cumulativeSum):"undefined"!==typeof w.dataPoints[l].isIntermediateSum&&!0===w.dataPoints[l].isIntermediateSum?(w.dataPointEOs[l].cumulativeSumYStartValue=n,w.dataPointEOs[l].cumulativeSum=0===l?0:w.dataPointEOs[l-1].cumulativeSum,w.dataPoints[l].y=0===l?0:b,n=0===l?0:w.dataPointEOs[l-1].cumulativeSum,b=0):(d="number"!==typeof w.dataPoints[l].y?0:w.dataPoints[l].y,w.dataPointEOs[l].cumulativeSumYStartValue=
0===l?0:w.dataPointEOs[l-1].cumulativeSum,w.dataPointEOs[l].cumulativeSum=0===l?d:w.dataPointEOs[l-1].cumulativeSum+d,b+=d);for(l=0;l<w.dataPoints.length;l++)if("undefined"===typeof w.dataPoints[l].x&&(w.dataPoints[l].x=l+(a.axisX.logarithmic?1:0)),w.dataPoints[l].x.getTime?(f=!0,b=w.dataPoints[l].x.getTime()):b=w.dataPoints[l].x,d=w.dataPoints[l].y,b<c.min&&(c.min=b),b>c.max&&(c.max=b),w.dataPointEOs[l].cumulativeSum<e.min&&(e.min=w.dataPointEOs[l].cumulativeSum),w.dataPointEOs[l].cumulativeSum>
e.max&&(e.max=w.dataPointEOs[l].cumulativeSum),0<l&&(a.axisX.logarithmic?(n=b/w.dataPoints[l-1].x,1>n&&(n=1/n),c.minDiff>n&&1!==n&&(c.minDiff=n)):(n=b-w.dataPoints[l-1].x,0>n&&(n*=-1),c.minDiff>n&&0!==n&&(c.minDiff=n)),null!==d&&null!==w.dataPoints[l-1].y&&(a.axisY.logarithmic?(d=w.dataPointEOs[l].cumulativeSum/w.dataPointEOs[l-1].cumulativeSum,1>d&&(d=1/d),e.minDiff>d&&1!==d&&(e.minDiff=d)):(d=w.dataPointEOs[l].cumulativeSum-w.dataPointEOs[l-1].cumulativeSum,0>d&&(d*=-1),e.minDiff>d&&0!==d&&(e.minDiff=
d)))),!(b<p)||k){if(!k&&(k=!0,0<l)){l-=2;continue}if(b>h&&!m)m=!0;else if(b>h&&m)continue;w.dataPoints[l].label&&(a.axisX.labels[b]=w.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);0<l&&(w.dataPointEOs[l-1].cumulativeSum<e.viewPortMin&&(e.viewPortMin=w.dataPointEOs[l-1].cumulativeSum),w.dataPointEOs[l-1].cumulativeSum>e.viewPortMax&&(e.viewPortMax=w.dataPointEOs[l-1].cumulativeSum));w.dataPointEOs[l].cumulativeSum<e.viewPortMin&&(e.viewPortMin=w.dataPointEOs[l].cumulativeSum);
w.dataPointEOs[l].cumulativeSum>e.viewPortMax&&(e.viewPortMax=w.dataPointEOs[l].cumulativeSum)}w.axisX.valueType=w.xValueType=f?"dateTime":"number"}};t.prototype.calculateAutoBreaks=function(){function a(a,b,c,d){if(d)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*(0<a?Math.min(b-a,Math.abs(a)):b-a));return{startValue:a+c,endValue:b-c}}function e(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 e=a.axisY.dataInfo,h=a.axisX.dataInfo,f,q=h.min,k=h.max,m=e.min,n=e.max,h=h._dataRanges,e=e._dataRanges,p,w=0,g=0;g<a.dataSeriesIndexes.length;g++){var J=d.data[a.dataSeriesIndexes[g]];if(!(4>J.dataPoints.length))for(w=0;w<J.dataPoints.length;w++)if(b&&(p=(k+1-q)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||
10,10)/100,f=J.dataPoints[w].x.getTime?J.dataPoints[w].x.getTime():J.dataPoints[w].x,p=Math.floor((f-q)/p),f<h[p].min&&(h[p].min=f),f>h[p].max&&(h[p].max=f)),c){var r=(n+1-m)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((f="waterfall"===a.type?J.dataPointEOs[w].cumulativeSum:J.dataPoints[w].y)&&f.length)for(var ca=0;ca<f.length;ca++)p=Math.floor((f[ca]-m)/r),f[ca]<e[p].min&&(e[p].min=f[ca]),f[ca]>e[p].max&&(e[p].max=f[ca]);else l(f)||(p=Math.floor((f-m)/r),f<e[p].min&&
(e[p].min=f),f>e[p].max&&(e[p].max=f))}}}}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,e=b.max,h=b._dataRanges,f,q=0,k=0;k<a.dataSeriesIndexes.length;k++){var m=d.data[a.dataSeriesIndexes[k]];if(!(4>m.dataPoints.length))for(q=0;q<m.dataPoints.length;q++)f=(e+1-c)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,b=
m.dataPoints[q].x.getTime?m.dataPoints[q].x.getTime():m.dataPoints[q].x,f=Math.floor((b-c)/f),b<h[f].min&&(h[f].min=b),b>h[f].max&&(h[f].max=b)}}for(var b,d=this,f=!1,q=0;q<this._axes.length;q++)if(this._axes[q].scaleBreaks&&this._axes[q].scaleBreaks.autoCalculate&&1<=this._axes[q].scaleBreaks.maxNumberOfAutoBreaks){f=!0;this._axes[q].dataInfo._dataRanges=[];for(var w=0;w<100/Math.max(parseFloat(this._axes[q].scaleBreaks.collapsibleThreshold)||10,10);w++)this._axes[q].dataInfo._dataRanges.push({min:Infinity,
max:-Infinity})}if(f){for(q=0;q<this.plotInfo.plotTypes.length;q++)for(f=this.plotInfo.plotTypes[q],w=0;w<f.plotUnits.length;w++)b=f.plotUnits[w],"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type||"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===
b.type||"boxAndWhisker"===b.type?e(b):0<=b.type.indexOf("stacked")&&c(b);for(q=0;q<this._axes.length;q++)if(this._axes[q].dataInfo._dataRanges){var g=this._axes[q].dataInfo.min;b=(this._axes[q].dataInfo.max+1-g)*Math.max(parseFloat(this._axes[q].scaleBreaks.collapsibleThreshold)||10,10)/100;var k=this._axes[q].dataInfo._dataRanges,m,n,f=[];if(this._axes[q].dataInfo.dataPointYPositiveSums){var p=this._axes[q].dataInfo.dataPointYPositiveSums;m=k;for(w in p)if(p.hasOwnProperty(w)&&!isNaN(w)&&(n=p[w],
!l(n))){var h=Math.floor((n-g)/b);n<m[h].min&&(m[h].min=n);n>m[h].max&&(m[h].max=n)}delete this._axes[q].dataInfo.dataPointYPositiveSums}if(this._axes[q].dataInfo.dataPointYNegativeSums){p=this._axes[q].dataInfo.dataPointYNegativeSums;m=k;for(w in p)p.hasOwnProperty(w)&&!isNaN(w)&&(n=-1*p[w],l(n)||(h=Math.floor((n-g)/b),n<m[h].min&&(m[h].min=n),n>m[h].max&&(m[h].max=n)));delete this._axes[q].dataInfo.dataPointYNegativeSums}for(w=0;w<k.length-1;w++)if(m=k[w].max,isFinite(m))for(;w<k.length-1;)if(g=
k[w+1].min,isFinite(g)){n=g-m;n>b&&f.push({diff:n,start:m,end:g});break}else w++;if(this._axes[q].scaleBreaks.customBreaks)for(w=0;w<this._axes[q].scaleBreaks.customBreaks.length;w++)for(b=0;b<f.length;b++)if(this._axes[q].scaleBreaks.customBreaks[w].startValue<=f[b].start&&f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].endValue||this._axes[q].scaleBreaks.customBreaks[w].startValue<=f[b].start&&f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].endValue||f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].startValue&&
this._axes[q].scaleBreaks.customBreaks[w].startValue<=f[b].end||f[b].start<=this._axes[q].scaleBreaks.customBreaks[w].endValue&&this._axes[q].scaleBreaks.customBreaks[w].endValue<=f[b].end)f.splice(b,1),b--;f.sort(function(a,b){return b.diff-a.diff});for(w=0;w<Math.min(f.length,this._axes[q].scaleBreaks.maxNumberOfAutoBreaks);w++)b=a(f[w].start,f[w].end,this._axes[q].logarithmic?this._axes[q].dataInfo.max/this._axes[q].dataInfo.min:this._axes[q].dataInfo.max-this._axes[q].dataInfo.min,this._axes[q].logarithmic),
this._axes[q].scaleBreaks.autoBreaks.push(new ba(this,"autoBreaks",b,w,++this._eventManager.lastObjectId,this._axes[q].scaleBreaks)),this._axes[q].scaleBreaks._appliedBreaks.push(this._axes[q].scaleBreaks.autoBreaks[this._axes[q].scaleBreaks.autoBreaks.length-1]);this._axes[q].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};t.prototype.renderCrosshairs=function(a,e){for(var c=0;c<this.axisX.length;c++)if(this.axisX[c]!=a&&this.axisX[c].crosshair&&this.axisX[c].crosshair.enabled&&
!this.axisX[c].crosshair._hidden)if(e&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisX[c].crosshair.render(null,this.sessionVariables.mouseY,this.axisX[c].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX[c].crosshair.render(this.sessionVariables.mouseX,null,this.axisX[c].convertPixelToValue(this.sessionVariables.mouseX));
var b={chart:this,crosshair:this.axisX[c].crosshair.options,axis:this.axisX[c],value:this.axisX[c].crosshair.value};this.axisX[c].crosshair.dispatchEvent("updated",b,this.axisX[c])}else e||this.axisX[c].showCrosshair(this.axisX[c].crosshair._updatedValue);for(c=0;c<this.axisX2.length;c++)this.axisX2[c]!=a&&(this.axisX2[c].crosshair&&this.axisX2[c].crosshair.enabled&&!this.axisX2[c].crosshair._hidden)&&(e&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&
this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2?(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisX2[c].crosshair.render(null,this.sessionVariables.mouseY,this.axisX2[c].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX2[c].crosshair.render(this.sessionVariables.mouseX,null,this.axisX2[c].convertPixelToValue(this.sessionVariables.mouseX)),b={chart:this,crosshair:this.axisX2[c].crosshair.options,axis:this.axisX2[c],value:this.axisX2[c].crosshair.value},
this.axisX2[c].crosshair.dispatchEvent("updated",b,this.axisX2[c])):e||this.axisX2[c].showCrosshair(this.axisX2[c].crosshair._updatedValue));for(c=0;c<this.axisY.length;c++)this.axisY[c]!=a&&(this.axisY[c].crosshair&&this.axisY[c].crosshair.enabled&&!this.axisY[c].crosshair._hidden)&&(e&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2?(this.plotInfo&&"xySwapped"===
this.plotInfo.axisPlacement?this.axisY[c].crosshair.render(this.sessionVariables.mouseX,null,this.axisY[c].convertPixelToValue(this.sessionVariables.mouseX)):this.axisY[c].crosshair.render(null,this.sessionVariables.mouseY,this.axisY[c].convertPixelToValue(this.sessionVariables.mouseY)),b={chart:this,crosshair:this.axisY[c].crosshair.options,axis:this.axisY[c],value:this.axisY[c].crosshair.value},this.axisY[c].crosshair.dispatchEvent("updated",b,this.axisY[c])):e||this.axisY[c].showCrosshair(this.axisY[c].crosshair._updatedValue));
for(c=0;c<this.axisY2.length;c++)this.axisY2[c]!=a&&(this.axisY2[c].crosshair&&this.axisY2[c].crosshair.enabled&&!this.axisY2[c].crosshair._hidden)&&(e&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2?(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisY2[c].crosshair.render(this.sessionVariables.mouseX,null,this.axisY2[c].convertPixelToValue(this.sessionVariables.mouseX)):
this.axisY2[c].crosshair.render(null,this.sessionVariables.mouseY,this.axisY2[c].convertPixelToValue(this.sessionVariables.mouseY)),b={chart:this,crosshair:this.axisY2[c].crosshair.options,axis:this.axisY2[c],value:this.axisY2[c].crosshair.value},this.axisY2[c].crosshair.dispatchEvent("updated",b,this.axisY2[c])):e||this.axisY2[c].showCrosshair(this.axisY2[c].crosshair._updatedValue))};t.prototype.getDataPointAtXY=function(a,e,c){c=c||!1;for(var b=[],d=this._dataInRenderedOrder.length-1;0<=d;d--){var f=
null;(f=this._dataInRenderedOrder[d].getDataPointAtXY(a,e,c))&&b.push(f)}a=null;e=!1;for(c=0;c<b.length;c++)if("line"===b[c].dataSeries.type||"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(d=W("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=d/2){e=!0;break}for(c=0;c<b.length;c++)e&&"line"!==b[c].dataSeries.type&&"stepLine"!==b[c].dataSeries.type&&"area"!==b[c].dataSeries.type&&"stepArea"!==b[c].dataSeries.type||(a?b[c].distance<=
a.distance&&(a=b[c]):a=b[c]);return a};t.prototype.getObjectAtXY=function(a,e,c){var b=null;if(c=this.getDataPointAtXY(a,e,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(r)b=Za(a,e,this._eventManager.ghostCtx);else for(c=0;c<this.legend.items.length;c++){var d=this.legend.items[c];a>=d.x1&&(a<=d.x2&&e>=d.y1&&e<=d.y2)&&(b=d.id)}return b};t.prototype.getAutoFontSize=lb;t.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};t.prototype.clearCanvas=
kb;t.prototype.attachEvent=function(a){this._events.push(a)};t.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var e=[],c=a.changedTouches,b=c?c[0]:a,d=null;switch(a.type){case "touchstart":case "MSPointerDown":e=["mousemove","mousedown"];this._lastTouchData=Oa(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":e=["mousemove"];break;case "touchend":case "MSPointerUp":var f=this._lastTouchData&&this._lastTouchData.time?new Date-
this._lastTouchData.time:0,e="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>f?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1<c.length)){d=Oa(b);d.time=new Date;try{var q=d.y-this._lastTouchData.y,f=d.time-this._lastTouchData.time;if(1<Math.abs(q)&&this._lastTouchData.scroll||5<Math.abs(q)&&250>f)this._lastTouchData.scroll=!0,this.stockChart&&(this.stockChart._chartScroll=!0)}catch(w){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&
this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c<e.length;c++)if(d=e[c],q=document.createEvent("MouseEvent"),q.initMouseEvent(d,!0,!0,window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null),b.target.dispatchEvent(q),!l(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<f||"click"===d)a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.cancelable&&a.preventDefault(),this.stockChart&&(this.stockChart._chartScroll=
null)}}};t.prototype._dispatchRangeEvent=function(a,e){var c={chart:this};c.type=a;c.trigger=e;var b=[];this.axisX&&0<this.axisX.length&&b.push("axisX");this.axisX2&&0<this.axisX2.length&&b.push("axisX2");this.axisY&&0<this.axisY.length&&b.push("axisY");this.axisY2&&0<this.axisY2.length&&b.push("axisY2");for(var d=0;d<b.length;d++)if(l(c[b[d]])&&(c[b[d]]=[]),"axisY"===b[d])for(var f=0;f<this.axisY.length;f++)c[b[d]].push({viewportMinimum:this[b[d]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][f].sessionVariables.newViewportMaximum});
else if("axisY2"===b[d])for(f=0;f<this.axisY2.length;f++)c[b[d]].push({viewportMinimum:this[b[d]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][f].sessionVariables.newViewportMaximum});else if("axisX"===b[d])for(f=0;f<this.axisX.length;f++)c[b[d]].push({viewportMinimum:this[b[d]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][f].sessionVariables.newViewportMaximum});else if("axisX2"===b[d])for(f=0;f<this.axisX2.length;f++)c[b[d]].push({viewportMinimum:this[b[d]][f].sessionVariables.newViewportMinimum,
viewportMaximum:this[b[d]][f].sessionVariables.newViewportMaximum});this.dispatchEvent(a,c,this)};t.prototype._mouseEventHandler=function(a){function e(){t.capturedEventParam&&(d=t.capturedEventParam,q=d.bounds,"mouseup"===b&&(t.capturedEventParam=null,d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",d.chart._mouseEventHandler,!1)),d.hasOwnProperty(b)&&("mouseup"!==b||d.chart.overlaidCanvas.releaseCapture?a.target!==
d.chart.overlaidCanvas&&r||d[b].call(d.context,c.x,c.y):a.target!==d.chart.overlaidCanvas&&(d.chart.isDrag=!1)))}"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var c=Oa(a),b=a.type,d,f;a.which?f=3==a.which:a.button&&(f=2==a.button);if(this._ignoreNextEvent)e(),this._ignoreNextEvent=!1;else if(e(),this.interactivityEnabled){a.preventManipulation&&a.preventManipulation();a.preventDefault&&a.preventDefault();var q;Ga&&window.console&&(window.console.log(b+" --\x3e x: "+c.x+"; y:"+
c.y),f&&window.console.log(a.which),"mouseup"===b&&window.console.log("mouseup"));if(!f){if(!t.capturedEventParam&&this._events){for(f=0;f<this._events.length;f++)if(this._events[f].hasOwnProperty(b))if(d=this._events[f],q=d.bounds,c.x>=q.x1&&c.x<=q.x2&&c.y>=q.y1&&c.y<=q.y2){d[b].call(d.context,c.x,c.y);"mousedown"===b&&!0===d.capture?(t.capturedEventParam=d,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,
!1)):"mouseup"===b&&(d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else d=null;a.target.style.cursor=d&&d.cursor?d.cursor:this._defaultCursor}f=this.plotArea;if(c.x<f.x1||c.x>f.x2||c.y<f.y1||c.y>f.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;f<
this.axisX.length;f++)this.axisX[f].crosshair&&this.axisX[f].crosshair.enabled&&(this.axisX[f].crosshair.hide(),this.axisX[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX[f].options},this.axisX[f].crosshair));for(f=0;f<this.axisX2.length;f++)this.axisX2[f].crosshair&&this.axisX2[f].crosshair.enabled&&(this.axisX2[f].crosshair.hide(),this.axisX2[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[f].options},this.axisX2[f].crosshair));for(f=0;f<this.axisY.length;f++)this.axisY[f].crosshair&&
this.axisY[f].crosshair.enabled&&(this.axisY[f].crosshair.hide(),this.axisY[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[f].options},this.axisY[f].crosshair));for(f=0;f<this.axisY2.length;f++)this.axisY2[f].crosshair&&this.axisY2[f].crosshair.enabled&&(this.axisY2[f].crosshair.hide(),this.axisY2[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[f].options},this.axisY2[f].crosshair))}this.sessionVariables.mouseX=c.x;this.sessionVariables.mouseY=c.y;this.isDrag&&this.zoomEnabled||
!this._eventManager||this._eventManager.mouseEventHandler(a)}}};t.prototype._plotAreaMouseDown=function(a,e){this.isDrag=!0;this.dragStartPoint={x:a,y:e}};t.prototype._plotAreaMouseUp=function(a,e){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var c=e-this.dragStartPoint.y,b=a-this.dragStartPoint.x,d=0<=this.zoomType.indexOf("x"),f=0<=this.zoomType.indexOf("y"),q=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var w=
f,f=d,d=w;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(d=f=0;d<this._axes.length;d++)c=this._axes[d],c.logarithmic?c.viewportMinimum<c.minimum?(f=c.minimum/c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum*f,c.sessionVariables.newViewportMaximum=c.viewportMaximum*f,q=!0):c.viewportMaximum>c.maximum&&(f=c.viewportMaximum/c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum/f,c.sessionVariables.newViewportMaximum=c.viewportMaximum/f,q=!0):c.viewportMinimum<
c.minimum?(f=c.minimum-c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum+f,c.sessionVariables.newViewportMaximum=c.viewportMaximum+f,q=!0):c.viewportMaximum>c.maximum&&(f=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum-f,c.sessionVariables.newViewportMaximum=c.viewportMaximum-f,q=!0);else if((!d||2<Math.abs(b))&&(!f||2<Math.abs(c))&&this.zoomEnabled){if(!this.dragStartPoint)return;c=d?this.dragStartPoint.x:this.plotArea.x1;b=f?this.dragStartPoint.y:
this.plotArea.y1;d=d?a:this.plotArea.x2;f=f?e:this.plotArea.y2;2<Math.abs(c-d)&&2<Math.abs(b-f)&&this._zoomPanToSelectedRegion(c,b,d,f)&&(q=!0)}q&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.stockChart&&(this.stockChart._rangeEventParameter||(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:this.stockChart.sessionVariables._axisXMin,maximum:this.stockChart.sessionVariables._axisXMax}),
this.stockChart._rangeEventParameter.type="rangeChanging",this.stockChart.dispatchEvent("rangeChanging",this.stockChart._rangeEventParameter,this.stockChart)),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),this.stockChart&&(this.stockChart.rangeUpdatedBy="chart",this.stockChart._rangeEventParameter.type="rangeChanged",this.stockChart.dispatchEvent("rangeChanged",this.stockChart._rangeEventParameter,this.stockChart)),q&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(Ka(this._zoomButton,
this._resetButton),ra(this,this._zoomButton,"pan"),ra(this,this._resetButton,"reset")))}}this.isDrag=!1;if("none"!==this.plotInfo.axisPlacement){this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(q=0;q<this.axisX.length;q++)this.axisX[q].crosshair&&this.axisX[q].crosshair.enabled&&this.axisX[q].renderCrosshair(a,e);if(this.axisX2&&0<this.axisX2.length)for(q=0;q<this.axisX2.length;q++)this.axisX2[q].crosshair&&this.axisX2[q].crosshair.enabled&&this.axisX2[q].renderCrosshair(a,e);if(this.axisY&&
0<this.axisY.length)for(q=0;q<this.axisY.length;q++)this.axisY[q].crosshair&&this.axisY[q].crosshair.enabled&&this.axisY[q].renderCrosshair(a,e);if(this.axisY2&&0<this.axisY2.length)for(q=0;q<this.axisY2.length;q++)this.axisY2[q].crosshair&&this.axisY2[q].crosshair.enabled&&this.axisY2[q].renderCrosshair(a,e);if(this.axisX&&0<this.axisX.length)for(q=0;q<this.axisX.length;q++)this.axisX[q].crosshair&&this.axisX[q].crosshair.enabled&&this.axisX[q].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(q=
0;q<this.axisX2.length;q++)this.axisX2[q].crosshair&&this.axisX2[q].crosshair.enabled&&this.axisX2[q].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(q=0;q<this.axisY.length;q++)this.axisY[q].crosshair&&this.axisY[q].crosshair.enabled&&this.axisY[q].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(q=0;q<this.axisY2.length;q++)this.axisY2[q].crosshair&&this.axisY2[q].crosshair.enabled&&this.axisY2[q].crosshair.renderLabel()}};t.prototype._plotAreaMouseMove=function(a,
e){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var c=0,b=0,d=c=null,d=0<=this.zoomType.indexOf("x"),f=0<=this.zoomType.indexOf("y"),q=this;"xySwapped"===this.plotInfo.axisPlacement&&(c=f,f=d,d=c);c=this.dragStartPoint.x-a;b=this.dragStartPoint.y-e;if(2<Math.abs(c)&&8>Math.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 w=0;w<this.axisX.length;w++)this.axisX[w].crosshair&&
this.axisX[w].crosshair.enabled&&(this.axisX[w].crosshair.hide(),this.axisX[w].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX[w].options},this.axisX[w].crosshair));for(w=0;w<this.axisX2.length;w++)this.axisX2[w].crosshair&&this.axisX2[w].crosshair.enabled&&(this.axisX2[w].crosshair.hide(),this.axisX2[w].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[w].options},this.axisX2[w].crosshair));for(w=0;w<this.axisY.length;w++)this.axisY[w].crosshair&&this.axisY[w].crosshair.enabled&&
(this.axisY[w].crosshair.hide(),this.axisY[w].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[w].options},this.axisY[w].crosshair));for(w=0;w<this.axisY2.length;w++)this.axisY2[w].crosshair&&this.axisY2[w].crosshair.enabled&&(this.axisY2[w].crosshair.hide(),this.axisY2[w].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[w].options},this.axisY2[w].crosshair))}else this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(a,e);if((!d||2<Math.abs(c)||!f||2<Math.abs(b))&&
(this.panEnabled||this.zoomEnabled))if(this.panEnabled)d={x1:d?this.plotArea.x1+c:this.plotArea.x1,y1:f?this.plotArea.y1+b:this.plotArea.y1,x2:d?this.plotArea.x2+c:this.plotArea.x2,y2:f?this.plotArea.y2+b:this.plotArea.y2},clearTimeout(q._panTimerId),q._panTimerId=setTimeout(function(b,c,d,h){return function(){q._zoomPanToSelectedRegion(b,c,d,h,!0)&&(q._dispatchRangeEvent("rangeChanging","pan"),q.stockChart&&(q.stockChart._rangeEventParameter.type="rangeChanging",q.stockChart.dispatchEvent("rangeChanging",
q.stockChart._rangeEventParameter,q.stockChart)),q.render(),q._dispatchRangeEvent("rangeChanged","pan"),q.stockChart&&(q.stockChart._rangeEventParameter.type="rangeChanged",q.stockChart.dispatchEvent("rangeChanged",q.stockChart._rangeEventParameter,q.stockChart)),q.dragStartPoint.x=a,q.dragStartPoint.y=e)}}(d.x1,d.y1,d.x2,d.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();c=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle="#A89896";var b=d?this.dragStartPoint.x:this.plotArea.x1,
w=f?this.dragStartPoint.y:this.plotArea.y1,l=d?a-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,k=f?e-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(b,w,d?a:this.plotArea.x2-this.plotArea.x1,f?e:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=0.7;this.overlaidCanvasCtx.fillRect(b,w,l,k);this.overlaidCanvasCtx.globalAlpha=c}}else if(this.toolTip.mouseMoveHandler(a,
e),"none"!==this.plotInfo.axisPlacement){this.sessionVariables.crosshairShownByPixel=!0;if(this.axisX&&0<this.axisX.length)for(d=0;d<this.axisX.length;d++)this.axisX[d].crosshair&&this.axisX[d].crosshair.enabled&&this.axisX[d].renderCrosshair(a,e);if(this.axisX2&&0<this.axisX2.length)for(d=0;d<this.axisX2.length;d++)this.axisX2[d].crosshair&&this.axisX2[d].crosshair.enabled&&this.axisX2[d].renderCrosshair(a,e);if(this.axisY&&0<this.axisY.length)for(d=0;d<this.axisY.length;d++)this.axisY[d].crosshair&&
this.axisY[d].crosshair.enabled&&this.axisY[d].renderCrosshair(a,e);if(this.axisY2&&0<this.axisY2.length)for(d=0;d<this.axisY2.length;d++)this.axisY2[d].crosshair&&this.axisY2[d].crosshair.enabled&&this.axisY2[d].renderCrosshair(a,e);if(this.axisX&&0<this.axisX.length)for(d=0;d<this.axisX.length;d++)this.axisX[d].crosshair&&this.axisX[d].crosshair.enabled&&this.axisX[d].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(d=0;d<this.axisX2.length;d++)this.axisX2[d].crosshair&&this.axisX2[d].crosshair.enabled&&
this.axisX2[d].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(d=0;d<this.axisY.length;d++)this.axisY[d].crosshair&&this.axisY[d].crosshair.enabled&&this.axisY[d].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(d=0;d<this.axisY2.length;d++)this.axisY2[d].crosshair&&this.axisY2[d].crosshair.enabled&&this.axisY2[d].crosshair.renderLabel()}};t.prototype._zoomPanToSelectedRegion=function(a,e,c,b,d){a=this.validateRegion(a,e,c,b,d);e=a.axesWithValidRange;c=a.axesRanges;
if(a.isValid)for(b=0;b<e.length;b++)d=c[b],e[b].setViewPortRange(d.val1,d.val2),this.syncCharts&&"y"!=this.zoomType&&this.syncCharts(d.val1,d.val2),this.stockChart&&(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:d.val1,maximum:d.val2});return a.isValid};t.prototype.validateRegion=function(a,e,c,b,d){d=d||!1;for(var f=0<=this.zoomType.indexOf("x"),q=0<=this.zoomType.indexOf("y"),w=!1,l=[],k=[],m=[],n=0;n<this._axes.length;n++)("axisX"===
this._axes[n].type&&f||"axisY"===this._axes[n].type&&q)&&k.push(this._axes[n]);for(q=0;q<k.length;q++){var n=k[q],f=!1,p=n.convertPixelToValue({x:a,y:e}),h=n.convertPixelToValue({x:c,y:b});if(p>h)var g=h,h=p,p=g;if(n.scaleBreaks)for(g=0;!f&&g<n.scaleBreaks._appliedBreaks.length;g++)f=n.scaleBreaks._appliedBreaks[g].startValue<=p&&n.scaleBreaks._appliedBreaks[g].endValue>=h;if(isFinite(n.dataInfo.minDiff))if(g=n.getApparentDifference(p,h,null,!0),!(f||!(this.panEnabled&&n.scaleBreaks&&n.scaleBreaks._appliedBreaks.length)&&
(n.logarithmic&&g<Math.pow(n.dataInfo.minDiff,3)||!n.logarithmic&&g<3*Math.abs(n.dataInfo.minDiff))||p<n.minimum||h>n.maximum))l.push(n),m.push({val1:p,val2:h}),w=!0;else if(!d){w=!1;break}}return{isValid:w,axesWithValidRange:l,axesRanges:m}};t.prototype.preparePlotArea=function(){var a=this.plotArea;!r&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var e=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;
if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var c=this.axisY[0];a.x1=e.x1<e.x2?e.x1:c.lineCoordinates.x1;a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1;a.x2=e.x2>c.lineCoordinates.x2?e.x2:c.lineCoordinates.x2;a.y2=e.y1>c.lineCoordinates.y2?e.y1:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=e.x1<e.x2?e.x1:c.lineCoordinates.x1,a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1,a.x2=e.x2>c.lineCoordinates.x2?
e.x2:c.lineCoordinates.x2,a.y2=e.y2>c.lineCoordinates.y2?e.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else e=this.layoutManager.getFreeSpace(),a.x1=e.x1,a.x2=e.x2,a.y1=e.y1,a.y2=e.y2,a.width=e.width,a.height=e.height;r||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Da(a.x1,a.y1,a.x2,a.y2,2)};t.prototype.renderIndexLabels=function(a){var e=a||this.plotArea.ctx,
c=this.plotArea,b=0,d=0,f=0,q=d=f=0,w=0,g=b=0,k=0;for(a=0;a<this._indexLabels.length;a++){var m=this._indexLabels[a],n=m.chartType.toLowerCase(),p,h,w=W("indexLabelFontColor",m.dataPoint,m.dataSeries),y=W("indexLabelFontSize",m.dataPoint,m.dataSeries),g=W("indexLabelFontFamily",m.dataPoint,m.dataSeries),k=W("indexLabelFontStyle",m.dataPoint,m.dataSeries);p=W("indexLabelFontWeight",m.dataPoint,m.dataSeries);var A=W("indexLabelBackgroundColor",m.dataPoint,m.dataSeries);h=W("indexLabelBorderColor",m.dataPoint,
m.dataSeries);var f=W("indexLabelBorderThickness",m.dataPoint,m.dataSeries),d=W("indexLabelMaxWidth",m.dataPoint,m.dataSeries),q=W("indexLabelWrap",m.dataPoint,m.dataSeries),z=W("indexLabelLineDashType",m.dataPoint,m.dataSeries),s=W("indexLabelLineColor",m.dataPoint,m.dataSeries),x=l(m.dataPoint.indexLabelLineThickness)?l(m.dataSeries.options.indexLabelLineThickness)?0:m.dataSeries.options.indexLabelLineThickness:m.dataPoint.indexLabelLineThickness,b=0<x?Math.min(10,("normal"===this.plotInfo.axisPlacement?
this.plotArea.height:this.plotArea.width)<<0):0,v=W("indexLabelPadding",m.dataPoint,m.dataSeries),t={percent:null,total:null},D=null;if(0<=m.dataSeries.type.indexOf("stacked")||"pie"===m.dataSeries.type||"doughnut"===m.dataSeries.type)t=this.getPercentAndTotal(m.dataSeries,m.dataPoint);if(m.dataSeries.indexLabelFormatter||m.dataPoint.indexLabelFormatter)D={chart:this,dataSeries:m.dataSeries,dataPoint:m.dataPoint,index:m.indexKeyword,total:t.total,percent:t.percent};var R=m.dataPoint.indexLabelFormatter?
m.dataPoint.indexLabelFormatter(D):m.dataPoint.indexLabel?this.replaceKeywordsWithValue(m.dataPoint.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):m.dataSeries.indexLabelFormatter?m.dataSeries.indexLabelFormatter(D):m.dataSeries.indexLabel?this.replaceKeywordsWithValue(m.dataSeries.indexLabel,m.dataPoint,m.dataSeries,null,m.indexKeyword):null;if(null!==R&&""!==R){var t=W("indexLabelPlacement",m.dataPoint,m.dataSeries),D=W("indexLabelOrientation",m.dataPoint,m.dataSeries),u=W("indexLabelTextAlign",
m.dataPoint,m.dataSeries),B=m.direction,L=m.dataSeries.axisX,N=m.dataSeries.axisY,Z=!1,A=new ja(e,{x:0,y:0,maxWidth:d?d:0.5*this.width,maxHeight:q?5*y:1.5*y,angle:"horizontal"===D?0:-90,text:R,padding:v,backgroundColor:A,borderColor:h,borderThickness:f,textAlign:u,fontSize:y,fontFamily:g,fontWeight:p,fontColor:w,fontStyle:k,textBaseline:"middle"});A.measureText();m.dataSeries.indexLabelMaxWidth=A.maxWidth;if("stackedarea100"===n){if(m.point.x<c.x1||m.point.x>c.x2||m.point.y<c.y1-1||m.point.y>c.y2+
1)continue}else if("rangearea"===n||"rangesplinearea"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<N.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>N.viewportMaximum)continue}else if(0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("bubble")||0<=n.indexOf("scatter")){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||m.dataPoint.y<N.viewportMinimum||m.dataPoint.y>N.viewportMaximum)continue}else if(0<=n.indexOf("column")){if(m.dataPoint.x<
L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||(0<m.dataPoint.y.length?Math.max.apply(null,m.dataPoint.y):m.cumulativeY?m.cumulativeY:m.dataPoint.y)<N.viewportMinimum||(0<m.dataPoint.y.length?Math.min.apply(null,m.dataPoint.y):m.cumulativeY?m.cumulativeY:m.dataPoint.y)>N.viewportMaximum)continue}else if("waterfall"===n||"error"===n&&!m.axisSwapped){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||m.bounds.y1>c.y2||m.bounds.y2<c.y1)continue}else if(0<=n.indexOf("bar")||"error"===
n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||m.bounds.x1>c.x2||m.bounds.x2<c.x1)continue}else if("candlestick"===n||"ohlc"===n){if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum||Math.max.apply(null,m.dataPoint.y)<N.viewportMinimum||Math.min.apply(null,m.dataPoint.y)>N.viewportMaximum)continue}else if(m.dataPoint.x<L.viewportMinimum||m.dataPoint.x>L.viewportMaximum)continue;q=w=2;"horizontal"===D?(g=A.width,k=A.height):(k=A.width,g=A.height);if("normal"===
this.plotInfo.axisPlacement){if(0<=n.indexOf("line")||0<=n.indexOf("area"))t="auto",w=4;else if(0<=n.indexOf("stacked"))"auto"===t&&(t="inside");else if("bubble"===n||"scatter"===n)t="inside";p=m.point.x-g/2+("horizontal"===D?0:A._lineHeight/2);if("inside"!==t)d=c.y1,f=c.y2,0<B?(h=m.point.y+A._lineHeight/2-k-w-b,h<d&&(h="auto"===t?Math.max(m.point.y,d)+A._lineHeight/2+w+b:d+A._lineHeight/2+w+b,Z=h+("horizontal"===D?k-A._lineHeight/2:0)>m.point.y,!Z||(0<=n.indexOf("line")||0<=n.indexOf("area"))||(h-=
b))):(h=m.point.y+A._lineHeight/2+w+b,h>f-k+A._lineHeight/2-w&&(h="auto"===t?Math.min(m.point.y,f)+A._lineHeight/2-k-w-b:f+A._lineHeight/2-k-w-b,Z=h-("horizontal"===D?A._lineHeight/2:k)<m.point.y,!Z||(0<=n.indexOf("line")||0<=n.indexOf("area"))||(h+=b)));else{Math.max(m.bounds.y1,c.y1);f=Math.min(m.bounds.y2,c.y2)-k+A._lineHeight/2;b=0<=n.indexOf("range")||"error"===n?0<B?Math.max(m.bounds.y1,c.y1)+A._lineHeight/2+w:Math.min(m.bounds.y2,c.y2)+A._lineHeight/2-k-w:(Math.max(m.bounds.y1,c.y1)+Math.min(m.bounds.y2,
c.y2))/2-k/2+A._lineHeight/2;if(0<B){if(h=b,"bubble"===n||"scatter"===n)h=m.point.y-k/2+A._lineHeight/2,k>m.bounds.y2-m.bounds.y1&&(h-=k/2+w),0>h-A._lineHeight/2&&(h+=Math.abs(h-A._lineHeight/2)<=(m.bounds.y2-m.bounds.y1)/2+w?Math.abs(h-A._lineHeight/2):(m.bounds.y2-m.bounds.y1)/2+w)}else h=Math.min(m.point.y,b),h>f-k-w&&("bubble"===n||"scatter"===n)&&(h=Math.min(m.point.y+w,c.y2-k-w));h=Math.min(h,f)}}else 0<=n.indexOf("line")||0<=n.indexOf("area")||0<=n.indexOf("scatter")?(t="auto",q=4):0<=n.indexOf("stacked")?
"auto"===t&&(t="inside"):"bubble"===n&&(t="inside"),h=m.point.y+A._lineHeight/2-k/2,"inside"!==t?(f=c.x1,d=c.x2,0>B?(p=m.point.x-g+("horizontal"===D?0:A._lineHeight/2)-q-b,("horizontal"===D?p:p-A._lineHeight/2)<f&&(p="auto"===t?Math.max(m.point.x,f)+("horizontal"===D?0:A._lineHeight/2)+w+b:f+("horizontal"===D?0:A._lineHeight/2)+q,(Z=p+g-("horizontal"===D?0:A._lineHeight/2)>m.point.x)&&(p-=b))):(p=m.point.x+("horizontal"===D?0:A._lineHeight/2)+q+b,("horizontal"===D?p:p-A._lineHeight/2)>d-g-q-b&&(p=
"auto"===t?Math.min(m.point.x,d)-("horizontal"===D?g:g-A._lineHeight/2)-q-b:d-g-q+("horizontal"===D?0:A._lineHeight/2),(Z=p-("horizontal"===D?0:A._lineHeight/2)<m.point.x)&&(p+=b)))):(f=Math.max(m.bounds.x1,c.x1),Math.min(m.bounds.x2,c.x2),b=0<=n.indexOf("range")||"error"===n?0>B?Math.max(m.bounds.x1,c.x1):Math.min(m.bounds.x2,c.x2)-g-q+("horizontal"===D?0:A._lineHeight/2):(Math.max(m.bounds.x1,c.x1)+Math.min(m.bounds.x2,c.x2))/2-g/2+("horizontal"===D?0:A._lineHeight/2),p=0>B?b:Math.min(m.point.x,
b),p=Math.max(p,f+("horizontal"===D?0:A._lineHeight/2+w)));"vertical"===D&&(h+=k-A._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(n)&&(Z=0<B?h+("horizontal"===D?k-A._lineHeight/2:0)>m.point.y:h-("horizontal"===D?A._lineHeight/2:k)<m.point.y),"bubble"===n||"scatter"===n)&&(p+=A._lineHeight/2-y/2);A.x=p;A.y=h;A.render(!0);x&&("inside"!==t&&(0>n.indexOf("bar")&&("error"!==n||!m.axisSwapped)&&m.point.x>c.x1&&m.point.x<c.x2||
!Z)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(n)&&("error"!==n||m.axisSwapped)&&m.point.y>c.y1&&m.point.y<c.y2||!Z))&&(e.lineWidth=x,e.strokeStyle=s?s:"gray",e.setLineDash&&e.setLineDash(K(z,x)),e.beginPath(),e.moveTo(m.point.x,m.point.y),0<=n.indexOf("bar")||"error"===n&&m.axisSwapped?e.lineTo(p+(0<m.direction?0:g)+("vertical"===D?-A._lineHeight/2:0),h+("vertical"===D?-k/2:k/2-A._lineHeight/2)):0<=n.indexOf("column")||"error"===
n&&!m.axisSwapped?e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),h+("vertical"===D?h-k<m.point.y?0:-k:(h-A._lineHeight/2<m.point.y?k:0)-A._lineHeight/2)):0<=n.indexOf("waterfall")?e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),"vertical"===D?0<B&&h<m.point.y?h:0>B&&h-k>m.point.y?h-k:m.point.y:0<B&&h+k-A._lineHeight/2<m.point.y?h+k-A._lineHeight/2:0>B&&h-A._lineHeight/2>m.point.y?h-A._lineHeight/2:m.point.y):e.lineTo(p+g/2-("horizontal"===D?0:A._lineHeight/2),h+("vertical"===D?h-k<m.point.y?
0:-k:(h+k-A._lineHeight/2<m.point.y?k:0)-A._lineHeight/2)),e.stroke())}}e={source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)m=this._indexLabels[a],A=W("indexLabelBackgroundColor",m.dataPoint,m.dataSeries),m.dataSeries.indexLabelBackgroundColor=l(A)?r?"transparent":null:A;return e};t.prototype.renderLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:
e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var f=[],q,w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(c.setLineDash){var p=K(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);c.setLineDash(h)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",
dataSeriesIndex:l};g=T(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var z=!0,s=0,x,v;c.beginPath();if(0<m.length){for(var t=!1,s=0;s<m.length;s++)if(x=m[s].x.getTime?m[s].x.getTime():m[s].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!t)))if("number"!==typeof m[s].y)0<s&&!(k.connectNullData||t||z)&&(c.stroke(),r&&b.stroke()),t=
!0;else{x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(m[s].y);var D=k.dataPointIds[s];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:x,y1:v};z||t?(!z&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||n===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(q.x,q.y),n=k.nullDataLineDashType,c.setLineDash(p)),c.lineTo(x,v),r&&b.lineTo(x,v)):(c.beginPath(),c.moveTo(x,v),r&&(b.beginPath(),
b.moveTo(x,v))),t=z=!1):(c.lineTo(x,v),r&&b.lineTo(x,v),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),r&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));q={x:x,y:v};s<m.length-1&&(A!==(m[s].lineColor||g)||n!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),A=m[s].lineColor||g,c.strokeStyle=A,c.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,c.setLineDash(K(n,k.lineThickness))):(n=k.lineDashType,c.setLineDash(h))));if(0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)){var R=
k.getMarkerProperties(s,x,v,c);f.push(R);D=T(D);r&&f.push({x:x,y:v,ctx:b,type:R.type,size:R.size,color:D,borderColor:D,borderThickness:R.borderThickness})}(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:m[s],dataSeries:k,point:{x:x,y:v},direction:0>m[s].y===a.axisY.reversed?1:-1,color:g})}c.stroke();r&&b.stroke()}}X.drawMarkers(f);r&&(e.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(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderStepLine=
function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var f=[],q,w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];c.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(c.setLineDash){var p=K(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);c.setLineDash(h)}var g=
k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=T(g);b.strokeStyle=g;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];c.strokeStyle=g;var z=!0,s=0,x,v;c.beginPath();if(0<m.length){for(var t=!1,s=0;s<m.length;s++)if(x=m[s].getTime?m[s].x.getTime():m[s].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!t)))if("number"!==typeof m[s].y)0<
s&&!(k.connectNullData||t||z)&&(c.stroke(),r&&b.stroke()),t=!0;else{var D=v;x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(m[s].y);var R=k.dataPointIds[s];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:s,x1:x,y1:v};z||t?(!z&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||n===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(q.x,q.y),n=k.nullDataLineDashType,c.setLineDash(p)),
c.lineTo(x,D),c.lineTo(x,v),r&&(b.lineTo(x,D),b.lineTo(x,v))):(c.beginPath(),c.moveTo(x,v),r&&(b.beginPath(),b.moveTo(x,v))),t=z=!1):(c.lineTo(x,D),r&&b.lineTo(x,D),c.lineTo(x,v),r&&b.lineTo(x,v),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),r&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));q={x:x,y:v};s<m.length-1&&(A!==(m[s].lineColor||g)||n!==(m[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),A=m[s].lineColor||g,c.strokeStyle=A,c.setLineDash&&(m[s].lineDashType?(n=m[s].lineDashType,
c.setLineDash(K(n,k.lineThickness))):(n=k.lineDashType,c.setLineDash(h))));0!==m[s].markerSize&&(0<m[s].markerSize||0<k.markerSize)&&(D=k.getMarkerProperties(s,x,v,c),f.push(D),R=T(R),r&&f.push({x:x,y:v,ctx:b,type:D.type,size:D.size,color:R,borderColor:R,borderThickness:D.borderThickness}));(m[s].indexLabel||k.indexLabel||m[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:m[s],dataSeries:k,point:{x:x,y:v},direction:0>m[s].y===a.axisY.reversed?
1:-1,color:g})}c.stroke();r&&b.stroke()}}X.drawMarkers(f);r&&(e.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(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();
return{source:e,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderSpline=function(a){function e(a){a=u(a,2);if(0<a.length){b.beginPath();r&&d.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);r&&d.moveTo(a[0].x,a[0].y);for(var c=0;c<a.length-3;c+=3)if(b.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),
r&&d.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),0<c&&0===c%3E3||a[c+3].newStrokeStyle||a[c+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[c+3].x,a[c+3].y),a[c+3].newStrokeStyle&&(b.strokeStyle=a[c+3].newStrokeStyle),a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),r&&(d.stroke(),d.beginPath(),d.moveTo(a[c+3].x,a[c+3].y));b.stroke();r&&d.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=
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 q=[],w=0;w<a.dataSeriesIndexes.length;w++){var l=a.dataSeriesIndexes[w],k=this.data[l];b.lineWidth=k.lineThickness;var m=k.dataPoints,n="solid";if(b.setLineDash){var p=K(k.nullDataLineDashType,k.lineThickness),n=k.lineDashType,h=K(n,k.lineThickness);b.setLineDash(h)}var g=k.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=T(g);d.strokeStyle=g;d.lineWidth=
0<k.lineThickness?Math.max(k.lineThickness,4):0;var g=k._colorSet,A=g=k.lineColor=k.options.lineColor?k.options.lineColor:g[0];b.strokeStyle=g;var z=0,s,x,v=[];b.beginPath();if(0<m.length)for(x=!1,z=0;z<m.length;z++)if(s=m[z].getTime?m[z].x.getTime():m[z].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!x)))if("number"!==typeof m[z].y)0<z&&!x&&(k.connectNullData?b.setLineDash&&(0<v.length&&(k.options.nullDataLineDashType||!m[z-1].lineDashType))&&(v[v.length-
1].newLineDashArray=p,n=k.nullDataLineDashType):(e(v),v=[])),x=!0;else{s=a.axisX.convertValueToPixel(s);x=a.axisY.convertValueToPixel(m[z].y);var t=k.dataPointIds[z];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:z,x1:s,y1:x};v[v.length]={x:s,y:x};z<m.length-1&&(A!==(m[z].lineColor||g)||n!==(m[z].lineDashType||k.lineDashType))&&(A=m[z].lineColor||g,v[v.length-1].newStrokeStyle=A,b.setLineDash&&(m[z].lineDashType?(n=m[z].lineDashType,v[v.length-1].newLineDashArray=
K(n,k.lineThickness)):(n=k.lineDashType,v[v.length-1].newLineDashArray=h)));if(0!==m[z].markerSize&&(0<m[z].markerSize||0<k.markerSize)){var D=k.getMarkerProperties(z,s,x,b);q.push(D);t=T(t);r&&q.push({x:s,y:x,ctx:d,type:D.type,size:D.size,color:t,borderColor:t,borderThickness:D.borderThickness})}(m[z].indexLabel||k.indexLabel||m[z].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:m[z],dataSeries:k,point:{x:s,y:x},direction:0>m[z].y===a.axisY.reversed?
1:-1,color:g});x=!1}e(v)}X.drawMarkers(q);r&&(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),d.beginPath());b.restore();b.beginPath();return{source:c,
dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=0,q,w,l,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*(d.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&&m<f)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(m=0;m<a.dataSeriesIndexes.length;m++){var p=a.dataSeriesIndexes[m],
h=this.data[p],g=h.dataPoints;if(0<g.length)for(var A=5<n&&h.bevelEnabled?!0:!1,f=0;f<g.length;f++)if(g[f].getTime?l=g[f].x.getTime():l=g[f].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof g[f].y){q=a.axisX.convertValueToPixel(l);w=a.axisY.convertValueToPixel(g[f].y);q=a.axisX.reversed?q+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+m)*n<<0:q-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+m)*n<<0;var z=a.axisX.reversed?q-n<<0:q+n<<0,s;
0<=g[f].y?s=k:(s=w,w=k);w>s&&(b=w,w=s,s=b);b=g[f].color?g[f].color:h._colorSet[f%h._colorSet.length];Y(c,a.axisX.reversed?z:q,w,a.axisX.reversed?q:z,s,b,0,null,A&&(a.axisY.reversed?0>g[f].y:0<=g[f].y),(a.axisY.reversed?0<=g[f].y:0>g[f].y)&&A,!1,!1,h.fillOpacity);b=h.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:f,x1:q,y1:w,x2:z,y2:s};b=T(b);r&&Y(this._eventManager.ghostCtx,a.axisX.reversed?z:q,w,a.axisX.reversed?q:z,s,b,0,null,!1,!1,
!1,!1);(g[f].indexLabel||h.indexLabel||g[f].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:g[f],dataSeries:h,point:{x:q+(z-q)/2,y:0>g[f].y===a.axisY.reversed?w:s},direction:0>g[f].y===a.axisY.reversed?1:-1,bounds:{x1:q,y1:Math.min(w,s),x2:z,y2:Math.max(w,s)},color:b})}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:k<a.axisY.bounds.y1?a.axisY.bounds.y1:k>a.axisY.bounds.y2?a.axisY.bounds.y2:k}}};t.prototype.renderStackedColumn=
function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=[],q=[],l=[],g=[],k=0,m,n,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,y=a.axisX.dataInfo.minDiff;
isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>h&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<k)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));y<k&&(y=k);y>h&&(y=h);c.save();r&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var A=a.dataSeriesIndexes[h],z=this.data[A],s=z.dataPoints;if(0<s.length){var x=5<y&&z.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&
"number"===typeof s[k].y){m=a.axisX.convertValueToPixel(b);m=m-a.plotType.plotUnits.length*y/2+a.index*y<<0;var v=m+y<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y)l[b]=s[k].y+(l[b]?l[b]:0),0<l[b]&&(n=a.axisY.convertValueToPixel(l[b]),t="undefined"!==typeof f[b]?f[b]:p,f[b]=n);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)g[b]=s[k].y+(g[b]?g[b]:0),t=a.axisY.convertValueToPixel(g[b]),n="undefined"!==typeof q[b]?
q[b]:p,q[b]=t;else if(n=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var D="undefined"!==typeof f[b]?f[b]:0;n-=D;t=p-D;f[b]=D+(t-n)}else D=q[b]?q[b]:0,t=n+D,n=p+D,q[b]=D+(t-n);b=s[k].color?s[k].color:z._colorSet[k%z._colorSet.length];Y(c,m,a.axisY.reversed?t:n,v,a.axisY.reversed?n:t,b,0,null,x&&(a.axisY.reversed?0>s[k].y:0<=s[k].y),(a.axisY.reversed?0<=s[k].y:0>s[k].y)&&x,!1,!1,z.fillOpacity);b=z.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:k,
x1:m,y1:n,x2:v,y2:t};b=T(b);r&&Y(this._eventManager.ghostCtx,m,n,v,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||z.indexLabel||s[k].indexLabelFormatter||z.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:s[k],dataSeries:z,point:{x:m+(v-m)/2,y:0<=s[k].y?n:t},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:m,y1:Math.min(n,t),x2:v,y2:Math.max(n,t)},color:b,cumulativeY:z.dataPointEOs[k].cumulativeY})}}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,
animationBase:p<a.axisY.bounds.y1?a.axisY.bounds.y1:p>a.axisY.bounds.y2?a.axisY.bounds.y2:p}}};t.prototype.renderStackedColumn100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=[],q=[],l=[],g=[],k=0,m,n,p,h=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var y=a.axisX.dataInfo.minDiff;isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>p&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
p<k)&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));y<k&&(y=k);y>p&&(y=p);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var A=0;A<a.dataSeriesIndexes.length;A++){var z=a.dataSeriesIndexes[A],s=this.data[z],x=s.dataPoints;if(0<x.length)for(var v=5<y&&s.bevelEnabled?!0:!1,
k=0;k<x.length;k++)if(p=x[k].x.getTime?x[k].x.getTime():x[k].x,!(p<a.axisX.dataInfo.viewPortMin||p>a.axisX.dataInfo.viewPortMax)&&"number"===typeof x[k].y){m=a.axisX.convertValueToPixel(p);n=0!==a.dataPointYSums[p]?100*(x[k].y/a.dataPointYSums[p]):0;m=m-a.plotType.plotUnits.length*y/2+a.index*y<<0;var t=m+y<<0,D;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<x[k].y){l[p]=n+("undefined"!==typeof l[p]?l[p]:0);if(0>=l[p])continue;n=a.axisY.convertValueToPixel(l[p]);
D=f[p]?f[p]:h;f[p]=n}else a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=x[k].y?(g[p]=n+("undefined"!==typeof g[p]?g[p]:0),D=a.axisY.convertValueToPixel(g[p]),n=q[p]?q[p]:h,q[p]=D):(n=a.axisY.convertValueToPixel(n),0<=x[k].y?(b="undefined"!==typeof f[p]?f[p]:0,n-=b,D=h-b,a.dataSeriesIndexes.length-1===A&&1>=Math.abs(d.y1-n)&&(n=d.y1),f[p]=b+(D-n)):(b="undefined"!==typeof q[p]?q[p]:0,D=n+b,n=h+b,a.dataSeriesIndexes.length-1===A&&1>=Math.abs(d.y2-D)&&(D=d.y2),q[p]=b+(D-n)));b=
x[k].color?x[k].color:s._colorSet[k%s._colorSet.length];Y(c,m,a.axisY.reversed?D:n,t,a.axisY.reversed?n:D,b,0,null,v&&(a.axisY.reversed?0>x[k].y:0<=x[k].y),(a.axisY.reversed?0<=x[k].y:0>x[k].y)&&v,!1,!1,s.fillOpacity);b=s.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:z,dataPointIndex:k,x1:m,y1:n,x2:t,y2:D};b=T(b);r&&Y(this._eventManager.ghostCtx,m,n,t,D,b,0,null,!1,!1,!1,!1);(x[k].indexLabel||s.indexLabel||x[k].indexLabelFormatter||s.indexLabelFormatter)&&
this._indexLabels.push({chartType:"stackedColumn100",dataPoint:x[k],dataSeries:s,point:{x:m+(t-m)/2,y:0<=x[k].y?n:D},direction:0>x[k].y===a.axisY.reversed?1:-1,bounds:{x1:m,y1:Math.min(n,D),x2:t,y2:Math.max(n,D)},color:b,yCumulative:100*(s.dataPointEOs[k].cumulativeY/a.dataPointYSums[p])})}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.yScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:h<a.axisY.bounds.y1?a.axisY.bounds.y1:h>a.axisY.bounds.y2?a.axisY.bounds.y2:h}}};t.prototype.renderBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,
c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=0,q,l,g,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*(d.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&&m<f)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>m&&(n=m);c.save();r&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(m=0;m<a.dataSeriesIndexes.length;m++){var p=a.dataSeriesIndexes[m],h=this.data[p],y=h.dataPoints;if(0<y.length){var A=5<n&&h.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<y.length;f++)if(y[f].getTime?g=y[f].x.getTime():g=y[f].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&
"number"===typeof y[f].y){l=a.axisX.convertValueToPixel(g);q=a.axisY.convertValueToPixel(y[f].y);l=a.axisX.reversed?l+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+m)*n<<0:l-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+m)*n<<0;var z=a.axisX.reversed?l-n<<0:l+n<<0,s;0<=y[f].y?s=k:(s=q,q=k);b=y[f].color?y[f].color:h._colorSet[f%h._colorSet.length];Y(c,a.axisY.reversed?q:s,a.axisX.reversed?z:l,a.axisY.reversed?s:q,a.axisX.reversed?l:z,b,0,null,A,!1,!1,!1,h.fillOpacity);b=h.dataPointIds[f];
this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:f,x1:s,y1:l,x2:q,y2:z};b=T(b);r&&Y(this._eventManager.ghostCtx,s,a.axisX.reversed?z:l,q,a.axisX.reversed?l:z,b,0,null,!1,!1,!1,!1);(y[f].indexLabel||h.indexLabel||y[f].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:y[f],dataSeries:h,point:{x:0<=y[f].y?q:s,y:l+(z-l)/2},direction:0>y[f].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,q),y1:l,x2:Math.max(s,q),
y2:z},color:b})}}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,
animationCallback:O.xScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:k<a.axisY.bounds.x1?a.axisY.bounds.x1:k>a.axisY.bounds.x2?a.axisY.bounds.x2:k}}};t.prototype.renderStackedBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=[],q=[],l=[],g=[],k=0,m,n,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:
this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,y=a.axisX.dataInfo.minDiff;isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>h&&(k=Math.min(this.options.dataPointWidth?
this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<k)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));y<k&&(y=k);y>h&&(y=h);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var A=a.dataSeriesIndexes[h],
z=this.data[A],s=z.dataPoints;if(0<s.length){var x=5<y&&z.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){n=a.axisX.convertValueToPixel(b);n=n-a.plotType.plotUnits.length*y/2+a.index*y<<0;var v=n+y<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y)l[b]=s[k].y+(l[b]?l[b]:0),0<l[b]&&(t=f[b]?f[b]:
p,f[b]=m=a.axisY.convertValueToPixel(l[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)g[b]=s[k].y+(g[b]?g[b]:0),m=q[b]?q[b]:p,q[b]=t=a.axisY.convertValueToPixel(g[b]);else if(m=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var D=f[b]?f[b]:0;t=p+D;m+=D;f[b]=D+(m-t)}else D=q[b]?q[b]:0,t=m-D,m=p-D,q[b]=D+(m-t);b=s[k].color?s[k].color:z._colorSet[k%z._colorSet.length];Y(c,a.axisY.reversed?m:t,n,a.axisY.reversed?t:m,v,b,0,null,x,!1,!1,!1,z.fillOpacity);b=z.dataPointIds[k];
this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:k,x1:t,y1:n,x2:m,y2:v};b=T(b);r&&Y(this._eventManager.ghostCtx,t,n,m,v,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||z.indexLabel||s[k].indexLabelFormatter||z.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:s[k],dataSeries:z,point:{x:0<=s[k].y?m:t,y:n+(v-n)/2},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(t,m),y1:n,x2:Math.max(t,m),y2:v},color:b})}}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.xScaleAnimation,easingFunction:O.easing.easeOutQuart,
animationBase:p<a.axisY.bounds.x1?a.axisY.bounds.x1:p>a.axisY.bounds.x2?a.axisY.bounds.x2:p}}};t.prototype.renderStackedBar100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=[],q=[],l=[],g=[],k=0,m,n,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,y=a.axisX.dataInfo.minDiff;isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>h&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
h<k)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));y<k&&(y=k);y>h&&(y=h);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;h<a.dataSeriesIndexes.length;h++){var A=a.dataSeriesIndexes[h],z=this.data[A],s=z.dataPoints;if(0<s.length){var x=5<y&&z.bevelEnabled?!0:!1;c.strokeStyle=
"#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){n=a.axisX.convertValueToPixel(b);var v;v=0!==a.dataPointYSums[b]?100*(s[k].y/a.dataPointYSums[b]):0;n=n-a.plotType.plotUnits.length*y/2+a.index*y<<0;var t=n+y<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y){l[b]=v+(l[b]?l[b]:0);if(0>=l[b])continue;v=f[b]?f[b]:p;f[b]=m=a.axisY.convertValueToPixel(l[b])}else if(a.axisY.scaleBreaks&&
0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)g[b]=v+(g[b]?g[b]:0),m=q[b]?q[b]:p,q[b]=v=a.axisY.convertValueToPixel(g[b]);else if(m=a.axisY.convertValueToPixel(v),0<=s[k].y){var D=f[b]?f[b]:0;v=p+D;m+=D;a.dataSeriesIndexes.length-1===h&&1>=Math.abs(d.x2-m)&&(m=d.x2);f[b]=D+(m-v)}else D=q[b]?q[b]:0,v=m-D,m=p-D,a.dataSeriesIndexes.length-1===h&&1>=Math.abs(d.x1-v)&&(v=d.x1),q[b]=D+(m-v);b=s[k].color?s[k].color:z._colorSet[k%z._colorSet.length];Y(c,a.axisY.reversed?m:v,n,a.axisY.reversed?v:
m,t,b,0,null,x,!1,!1,!1,z.fillOpacity);b=z.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:k,x1:v,y1:n,x2:m,y2:t};b=T(b);r&&Y(this._eventManager.ghostCtx,v,n,m,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||z.indexLabel||s[k].indexLabelFormatter||z.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:s[k],dataSeries:z,point:{x:0<=s[k].y?m:v,y:n+(t-n)/2},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(v,
m),y1:n,x2:Math.max(v,m),y2:t},color:b})}}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();
return{source:e,dest:this.plotArea.ctx,animationCallback:O.xScaleAnimation,easingFunction:O.easing.easeOutQuart,animationBase:p<a.axisY.bounds.x1?a.axisY.bounds.x1:p>a.axisY.bounds.x2?a.axisY.bounds.x2:p}}};t.prototype.renderArea=function(a){var e,c;function b(){D&&(0<h.lineThickness&&f.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?t=v:0>a.axisY.viewportMaximum?t=l.y1:0<a.axisY.viewportMinimum&&(t=v),f.lineTo(z,t),f.lineTo(D.x,t),f.closePath(),f.globalAlpha=
h.fillOpacity,f.fill(),f.globalAlpha=1,r&&(q.lineTo(z,t),q.lineTo(D.x,t),q.closePath(),q.fill()),f.beginPath(),f.moveTo(z,s),q.beginPath(),q.moveTo(z,s),D={x:z,y:s})}var d=a.targetCanvasCtx||this.plotArea.ctx,f=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var q=this._eventManager.ghostCtx,l=a.axisY.lineCoordinates,g=[],k=this.plotArea,m;f.save();r&&q.save();f.beginPath();f.rect(k.x1,k.y1,k.width,k.height);f.clip();r&&(q.beginPath(),q.rect(k.x1,k.y1,k.width,k.height),q.clip());for(var n=
0;n<a.dataSeriesIndexes.length;n++){var p=a.dataSeriesIndexes[n],h=this.data[p],y=h.dataPoints,g=h.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:p};g=T(g);q.fillStyle=g;g=[];e=!0;var A=0,z,s,x,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),t,D=null;if(0<y.length){var R=h._colorSet[A%h._colorSet.length],u=h.lineColor=h.options.lineColor||R,B=u;f.fillStyle=R;f.strokeStyle=u;f.lineWidth=h.lineThickness;c="solid";if(f.setLineDash){var L=K(h.nullDataLineDashType,
h.lineThickness);c=h.lineDashType;var N=K(c,h.lineThickness);f.setLineDash(N)}for(var Z=!0;A<y.length;A++)if(x=y[A].x.getTime?y[A].x.getTime():y[A].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!Z)))if("number"!==typeof y[A].y)h.connectNullData||(Z||e)||b(),Z=!0;else{z=a.axisX.convertValueToPixel(x);s=a.axisY.convertValueToPixel(y[A].y);e||Z?(!e&&h.connectNullData?(f.setLineDash&&(h.options.nullDataLineDashType||c===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&
(e=z,c=s,z=m.x,s=m.y,b(),f.moveTo(m.x,m.y),z=e,s=c,D=m,c=h.nullDataLineDashType,f.setLineDash(L)),f.lineTo(z,s),r&&q.lineTo(z,s)):(f.beginPath(),f.moveTo(z,s),r&&(q.beginPath(),q.moveTo(z,s)),D={x:z,y:s}),Z=e=!1):(f.lineTo(z,s),r&&q.lineTo(z,s),0==A%250&&b());m={x:z,y:s};A<y.length-1&&(B!==(y[A].lineColor||u)||c!==(y[A].lineDashType||h.lineDashType))&&(b(),B=y[A].lineColor||u,f.strokeStyle=B,f.setLineDash&&(y[A].lineDashType?(c=y[A].lineDashType,f.setLineDash(K(c,h.lineThickness))):(c=h.lineDashType,
f.setLineDash(N))));var $=h.dataPointIds[A];this._eventManager.objectMap[$]={id:$,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:A,x1:z,y1:s};0!==y[A].markerSize&&(0<y[A].markerSize||0<h.markerSize)&&(x=h.getMarkerProperties(A,z,s,f),g.push(x),$=T($),r&&g.push({x:z,y:s,ctx:q,type:x.type,size:x.size,color:$,borderColor:$,borderThickness:x.borderThickness}));(y[A].indexLabel||h.indexLabel||y[A].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:y[A],
dataSeries:h,point:{x:z,y:s},direction:0>y[A].y===a.axisY.reversed?1:-1,color:R})}b();X.drawMarkers(g)}}r&&(d.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:d,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderSplineArea=function(a){function e(){var c=u(x,2);if(0<c.length){if(0<m.lineThickness){b.beginPath();b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var e=0;e<c.length-3;e+=3)if(b.bezierCurveTo(c[e+1].x,
c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y),r&&d.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y),c[e+3].newStrokeStyle||c[e+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(c[e+3].x,c[e+3].y),c[e+3].newStrokeStyle&&(b.strokeStyle=c[e+3].newStrokeStyle),c[e+3].newLineDashArray&&b.setLineDash(c[e+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,c[0].y);r&&(d.beginPath(),d.moveTo(c[0].x,c[0].y));for(e=0;e<c.length-3;e+=3)b.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+
2].x,c[e+2].y,c[e+3].x,c[e+3].y),r&&d.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?z=A:0>a.axisY.viewportMaximum?z=f.y1:0<a.axisY.viewportMinimum&&(z=A);s={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,z);b.lineTo(s.x,z);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();b.globalAlpha=1;r&&(d.lineTo(c[c.length-1].x,z),d.lineTo(s.x,z),d.closePath(),d.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,
b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,f=a.axisY.lineCoordinates,q=[],l=this.plotArea;b.save();r&&d.save();b.beginPath();b.rect(l.x1,l.y1,l.width,l.height);b.clip();r&&(d.beginPath(),d.rect(l.x1,l.y1,l.width,l.height),d.clip());for(var g=0;g<a.dataSeriesIndexes.length;g++){var k=a.dataSeriesIndexes[g],m=this.data[k],n=m.dataPoints,q=m.id;this._eventManager.objectMap[q]={objectType:"dataSeries",dataSeriesIndex:k};q=T(q);d.fillStyle=q;var q=[],
p=0,h,y,A=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),z,s=null,x=[];if(0<n.length){var v=m._colorSet[p%m._colorSet.length],t=m.lineColor=m.options.lineColor||v,D=t;b.fillStyle=v;b.strokeStyle=t;b.lineWidth=m.lineThickness;var R="solid";if(b.setLineDash){var B=K(m.nullDataLineDashType,m.lineThickness),R=m.lineDashType,C=K(R,m.lineThickness);b.setLineDash(C)}for(y=!1;p<n.length;p++)if(h=n[p].x.getTime?n[p].x.getTime():n[p].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax&&
(!m.connectNullData||!y)))if("number"!==typeof n[p].y)0<p&&!y&&(m.connectNullData?b.setLineDash&&(0<x.length&&(m.options.nullDataLineDashType||!n[p-1].lineDashType))&&(x[x.length-1].newLineDashArray=B,R=m.nullDataLineDashType):(e(),x=[])),y=!0;else{h=a.axisX.convertValueToPixel(h);y=a.axisY.convertValueToPixel(n[p].y);var L=m.dataPointIds[p];this._eventManager.objectMap[L]={id:L,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:p,x1:h,y1:y};x[x.length]={x:h,y:y};p<n.length-1&&(D!==(n[p].lineColor||
t)||R!==(n[p].lineDashType||m.lineDashType))&&(D=n[p].lineColor||t,x[x.length-1].newStrokeStyle=D,b.setLineDash&&(n[p].lineDashType?(R=n[p].lineDashType,x[x.length-1].newLineDashArray=K(R,m.lineThickness)):(R=m.lineDashType,x[x.length-1].newLineDashArray=C)));if(0!==n[p].markerSize&&(0<n[p].markerSize||0<m.markerSize)){var N=m.getMarkerProperties(p,h,y,b);q.push(N);L=T(L);r&&q.push({x:h,y:y,ctx:d,type:N.type,size:N.size,color:L,borderColor:L,borderThickness:N.borderThickness})}(n[p].indexLabel||m.indexLabel||
n[p].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:n[p],dataSeries:m,point:{x:h,y:y},direction:0>n[p].y===a.axisY.reversed?1:-1,color:v});y=!1}e();X.drawMarkers(q)}}r&&(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(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderStepArea=function(a){var e,c;function b(){D&&(0<h.lineThickness&&f.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?t=v:0>a.axisY.viewportMaximum?t=l.y1:
0<a.axisY.viewportMinimum&&(t=v),f.lineTo(z,t),f.lineTo(D.x,t),f.closePath(),f.globalAlpha=h.fillOpacity,f.fill(),f.globalAlpha=1,r&&(q.lineTo(z,t),q.lineTo(D.x,t),q.closePath(),q.fill()),f.beginPath(),f.moveTo(z,s),q.beginPath(),q.moveTo(z,s),D={x:z,y:s})}var d=a.targetCanvasCtx||this.plotArea.ctx,f=r?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var q=this._eventManager.ghostCtx,l=a.axisY.lineCoordinates,g=[],k=this.plotArea,m;f.save();r&&q.save();f.beginPath();f.rect(k.x1,k.y1,k.width,
k.height);f.clip();r&&(q.beginPath(),q.rect(k.x1,k.y1,k.width,k.height),q.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var p=a.dataSeriesIndexes[n],h=this.data[p],y=h.dataPoints,g=h.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:p};g=T(g);q.fillStyle=g;g=[];e=!0;var A=0,z,s,x,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),t,D=null;c=!1;if(0<y.length){var R=h._colorSet[A%h._colorSet.length],u=h.lineColor=h.options.lineColor||R,B=u;
f.fillStyle=R;f.strokeStyle=u;f.lineWidth=h.lineThickness;var L="solid";if(f.setLineDash){var N=K(h.nullDataLineDashType,h.lineThickness),L=h.lineDashType,Z=K(L,h.lineThickness);f.setLineDash(Z)}for(;A<y.length;A++)if(x=y[A].x.getTime?y[A].x.getTime():y[A].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!c))){var $=s;"number"!==typeof y[A].y?(h.connectNullData||(c||e)||b(),c=!0):(z=a.axisX.convertValueToPixel(x),s=a.axisY.convertValueToPixel(y[A].y),e||c?(!e&&
h.connectNullData?(f.setLineDash&&(h.options.nullDataLineDashType||L===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(e=z,c=s,z=m.x,s=m.y,b(),f.moveTo(m.x,m.y),z=e,s=c,D=m,L=h.nullDataLineDashType,f.setLineDash(N)),f.lineTo(z,$),f.lineTo(z,s),r&&(q.lineTo(z,$),q.lineTo(z,s))):(f.beginPath(),f.moveTo(z,s),r&&(q.beginPath(),q.moveTo(z,s)),D={x:z,y:s}),c=e=!1):(f.lineTo(z,$),r&&q.lineTo(z,$),f.lineTo(z,s),r&&q.lineTo(z,s),0==A%250&&b()),m={x:z,y:s},A<y.length-1&&(B!==(y[A].lineColor||u)||
L!==(y[A].lineDashType||h.lineDashType))&&(b(),B=y[A].lineColor||u,f.strokeStyle=B,f.setLineDash&&(y[A].lineDashType?(L=y[A].lineDashType,f.setLineDash(K(L,h.lineThickness))):(L=h.lineDashType,f.setLineDash(Z)))),x=h.dataPointIds[A],this._eventManager.objectMap[x]={id:x,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:A,x1:z,y1:s},0!==y[A].markerSize&&(0<y[A].markerSize||0<h.markerSize)&&($=h.getMarkerProperties(A,z,s,f),g.push($),x=T(x),r&&g.push({x:z,y:s,ctx:q,type:$.type,size:$.size,color:x,
borderColor:x,borderThickness:$.borderThickness})),(y[A].indexLabel||h.indexLabel||y[A].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:y[A],dataSeries:h,point:{x:z,y:s},direction:0>y[A].y===a.axisY.reversed?1:-1,color:R}))}b();X.drawMarkers(g)}}r&&(d.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:d,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderStackedArea=function(a){function e(){if(!(1>k.length)){for(0<R.lineThickness&&b.stroke();0<k.length;){var a=
k.pop();b.lineTo(a.x,a.y);r&&z.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=R.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();r&&(z.closePath(),z.fill(),z.beginPath());k=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=null,f=null,q=[],l=this.plotArea,g=[],k=[],m=[],n=[],p=0,h,y,A=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),z=this._eventManager.ghostCtx,s,x,v;r&&z.beginPath();b.save();r&&z.save();b.beginPath();
b.rect(l.x1,l.y1,l.width,l.height);b.clip();r&&(z.beginPath(),z.rect(l.x1,l.y1,l.width,l.height),z.clip());for(var d=[],t=0;t<a.dataSeriesIndexes.length;t++){var D=a.dataSeriesIndexes[t],R=this.data[D],u=R.dataPoints;R.dataPointIndexes=[];for(p=0;p<u.length;p++)D=u[p].x.getTime?u[p].x.getTime():u[p].x,R.dataPointIndexes[D]=p,d[D]||(m.push(D),d[D]=!0);m.sort(Qa)}for(t=0;t<a.dataSeriesIndexes.length;t++){D=a.dataSeriesIndexes[t];R=this.data[D];u=R.dataPoints;x=!0;k=[];p=R.id;this._eventManager.objectMap[p]=
{objectType:"dataSeries",dataSeriesIndex:D};p=T(p);z.fillStyle=p;if(0<m.length){var d=R._colorSet[0],B=R.lineColor=R.options.lineColor||d,L=B;b.fillStyle=d;b.strokeStyle=B;b.lineWidth=R.lineThickness;v="solid";if(b.setLineDash){var N=K(R.nullDataLineDashType,R.lineThickness);v=R.lineDashType;var Z=K(v,R.lineThickness);b.setLineDash(Z)}for(var $=!0,p=0;p<m.length;p++){var f=m[p],ca=null,ca=0<=R.dataPointIndexes[f]?u[R.dataPointIndexes[f]]:{x:f,y:null};if(!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&
(!R.connectNullData||!$)))if("number"!==typeof ca.y)R.connectNullData||($||x)||e(),$=!0;else{h=a.axisX.convertValueToPixel(f);var ma=g[f]?g[f]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){n[f]=ca.y+(n[f]?n[f]:0);if(0>=n[f]&&a.axisY.logarithmic)continue;y=a.axisY.convertValueToPixel(n[f])}else y=a.axisY.convertValueToPixel(ca.y),y-=ma;k.push({x:h,y:A-ma});g[f]=A-y;x||$?(!x&&R.connectNullData?(b.setLineDash&&(R.options.nullDataLineDashType||v===R.lineDashType&&
R.lineDashType!==R.nullDataLineDashType)&&(x=k.pop(),v=k[k.length-1],e(),b.moveTo(s.x,s.y),k.push(v),k.push(x),v=R.nullDataLineDashType,b.setLineDash(N)),b.lineTo(h,y),r&&z.lineTo(h,y)):(b.beginPath(),b.moveTo(h,y),r&&(z.beginPath(),z.moveTo(h,y))),$=x=!1):(b.lineTo(h,y),r&&z.lineTo(h,y),0==p%250&&(e(),b.moveTo(h,y),r&&z.moveTo(h,y),k.push({x:h,y:A-ma})));s={x:h,y:y};p<u.length-1&&(L!==(u[p].lineColor||B)||v!==(u[p].lineDashType||R.lineDashType))&&(e(),b.beginPath(),b.moveTo(h,y),k.push({x:h,y:A-
ma}),L=u[p].lineColor||B,b.strokeStyle=L,b.setLineDash&&(u[p].lineDashType?(v=u[p].lineDashType,b.setLineDash(K(v,R.lineThickness))):(v=R.lineDashType,b.setLineDash(Z))));if(0<=R.dataPointIndexes[f]){var C=R.dataPointIds[R.dataPointIndexes[f]];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:D,dataPointIndex:R.dataPointIndexes[f],x1:h,y1:y}}0<=R.dataPointIndexes[f]&&0!==ca.markerSize&&(0<ca.markerSize||0<R.markerSize)&&(ma=R.getMarkerProperties(R.dataPointIndexes[f],h,
y,b),q.push(ma),f=T(C),r&&q.push({x:h,y:y,ctx:z,type:ma.type,size:ma.size,color:f,borderColor:f,borderThickness:ma.borderThickness}));(ca.indexLabel||R.indexLabel||ca.indexLabelFormatter||R.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:ca,dataSeries:R,point:{x:h,y:y},direction:0>ca.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(h,y);r&&z.moveTo(h,y)}delete R.dataPointIndexes}X.drawMarkers(q);r&&(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(l.x1,l.y1,l.width,l.height),z.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderStackedArea100=function(a){function e(){for(0<
u.lineThickness&&b.stroke();0<k.length;){var a=k.pop();b.lineTo(a.x,a.y);r&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=u.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();r&&(v.closePath(),v.fill(),v.beginPath());k=[]}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=null,f=null,q=this.plotArea,l=[],g=[],k=[],m=[],n=[],p=0,h,y,A,z,s,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;
b.save();r&&v.save();b.beginPath();b.rect(q.x1,q.y1,q.width,q.height);b.clip();r&&(v.beginPath(),v.rect(q.x1,q.y1,q.width,q.height),v.clip());for(var d=[],t=0;t<a.dataSeriesIndexes.length;t++){var D=a.dataSeriesIndexes[t],u=this.data[D],B=u.dataPoints;u.dataPointIndexes=[];for(p=0;p<B.length;p++)D=B[p].x.getTime?B[p].x.getTime():B[p].x,u.dataPointIndexes[D]=p,d[D]||(m.push(D),d[D]=!0);m.sort(Qa)}for(t=0;t<a.dataSeriesIndexes.length;t++){D=a.dataSeriesIndexes[t];u=this.data[D];B=u.dataPoints;z=!0;
d=u.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:D};d=T(d);v.fillStyle=d;k=[];if(0<m.length){var d=u._colorSet[p%u._colorSet.length],C=u.lineColor=u.options.lineColor||d,L=C;b.fillStyle=d;b.strokeStyle=C;b.lineWidth=u.lineThickness;s="solid";if(b.setLineDash){var N=K(u.nullDataLineDashType,u.lineThickness);s=u.lineDashType;var Z=K(s,u.lineThickness);b.setLineDash(Z)}for(var $=!0,p=0;p<m.length;p++){var f=m[p],ca=null,ca=0<=u.dataPointIndexes[f]?B[u.dataPointIndexes[f]]:
{x:f,y:null};if(!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!u.connectNullData||!$)))if("number"!==typeof ca.y)u.connectNullData||($||z)||e(),$=!0;else{var ma;ma=0!==a.dataPointYSums[f]?100*(ca.y/a.dataPointYSums[f]):0;h=a.axisX.convertValueToPixel(f);var E=g[f]?g[f]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){n[f]=ma+(n[f]?n[f]:0);if(0>=n[f]&&a.axisY.logarithmic)continue;y=a.axisY.convertValueToPixel(n[f])}else y=a.axisY.convertValueToPixel(ma),
y-=E;k.push({x:h,y:x-E});g[f]=x-y;z||$?(!z&&u.connectNullData?(b.setLineDash&&(u.options.nullDataLineDashType||s===u.lineDashType&&u.lineDashType!==u.nullDataLineDashType)&&(z=k.pop(),s=k[k.length-1],e(),b.moveTo(A.x,A.y),k.push(s),k.push(z),s=u.nullDataLineDashType,b.setLineDash(N)),b.lineTo(h,y),r&&v.lineTo(h,y)):(b.beginPath(),b.moveTo(h,y),r&&(v.beginPath(),v.moveTo(h,y))),$=z=!1):(b.lineTo(h,y),r&&v.lineTo(h,y),0==p%250&&(e(),b.moveTo(h,y),r&&v.moveTo(h,y),k.push({x:h,y:x-E})));A={x:h,y:y};p<
B.length-1&&(L!==(B[p].lineColor||C)||s!==(B[p].lineDashType||u.lineDashType))&&(e(),b.beginPath(),b.moveTo(h,y),k.push({x:h,y:x-E}),L=B[p].lineColor||C,b.strokeStyle=L,b.setLineDash&&(B[p].lineDashType?(s=B[p].lineDashType,b.setLineDash(K(s,u.lineThickness))):(s=u.lineDashType,b.setLineDash(Z))));if(0<=u.dataPointIndexes[f]){var G=u.dataPointIds[u.dataPointIndexes[f]];this._eventManager.objectMap[G]={id:G,objectType:"dataPoint",dataSeriesIndex:D,dataPointIndex:u.dataPointIndexes[f],x1:h,y1:y}}0<=
u.dataPointIndexes[f]&&0!==ca.markerSize&&(0<ca.markerSize||0<u.markerSize)&&(E=u.getMarkerProperties(u.dataPointIndexes[f],h,y,b),l.push(E),f=T(G),r&&l.push({x:h,y:y,ctx:v,type:E.type,size:E.size,color:f,borderColor:f,borderThickness:E.borderThickness}));(ca.indexLabel||u.indexLabel||ca.indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ca,dataSeries:u,point:{x:h,y:y},direction:0>ca.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(h,y);r&&v.moveTo(h,
y)}delete u.dataPointIndexes}X.drawMarkers(l);r&&(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(q.x1,q.y1,q.width,q.height),v.restore());b.restore();return{source:c,dest:this.plotArea.ctx,
animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderBubble=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,d=0,f,q;c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());
for(var l=-Infinity,g=Infinity,k=0;k<a.dataSeriesIndexes.length;k++)for(var m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,h=0,d=0;d<p.length;d++)f=p[d].getTime?f=p[d].x.getTime():f=p[d].x,f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax||"undefined"===typeof p[d].z||(h=p[d].z,h>l&&(l=h),h<g&&(g=h));for(var y=25*Math.PI,A=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,y),k=0;k<a.dataSeriesIndexes.length;k++)if(m=a.dataSeriesIndexes[k],n=this.data[m],p=n.dataPoints,
0<p.length)for(c.strokeStyle="#4572A7 ",d=0;d<p.length;d++)if(f=p[d].getTime?f=p[d].x.getTime():f=p[d].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[d].y){f=a.axisX.convertValueToPixel(f);q=a.axisY.convertValueToPixel(p[d].y);var h=p[d].z,z=2*Math.max(Math.sqrt((l===g?A/2:y+(A-y)/(l-g)*(h-g))/Math.PI)<<0,1),h=n.getMarkerProperties(d,c);h.size=z;c.globalAlpha=n.fillOpacity;X.drawMarker(f,q,c,h.type,h.size,h.color,h.borderColor,h.borderThickness);c.globalAlpha=
1;var s=n.dataPointIds[d];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:d,x1:f,y1:q,size:z};z=T(s);r&&X.drawMarker(f,q,this._eventManager.ghostCtx,h.type,h.size,z,z,h.borderThickness);(p[d].indexLabel||n.indexLabel||p[d].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:p[d],dataSeries:n,point:{x:f,y:q},direction:1,bounds:{x1:f-h.size/2,y1:q-h.size/2,x2:f+h.size/2,y2:q+h.size/2},color:null})}r&&(e.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:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,
animationBase:0}}};t.prototype.renderScatter=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,d=0,f,q;c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var l=0;l<a.dataSeriesIndexes.length;l++){var g=a.dataSeriesIndexes[l],
k=this.data[g],m=k.dataPoints;if(0<m.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var n=0,p=0,d=0;d<m.length;d++)if(f=m[d].getTime?f=m[d].x.getTime():f=m[d].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof m[d].y){f=a.axisX.convertValueToPixel(f);q=a.axisY.convertValueToPixel(m[d].y);var h=k.getMarkerProperties(d,f,q,c);c.globalAlpha=k.fillOpacity;X.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)+(p-q)*(p-q))<Math.min(h.size,5)&&m.length>Math.min(this.plotArea.width,this.plotArea.height)||(n=k.dataPointIds[d],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:d,x1:f,y1:q},n=T(n),r&&X.drawMarker(h.x,h.y,this._eventManager.ghostCtx,h.type,h.size,n,n,h.borderThickness),(m[d].indexLabel||k.indexLabel||m[d].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:m[d],dataSeries:k,
point:{x:f,y:q},direction:1,bounds:{x1:f-h.size/2,y1:q-h.size/2,x2:f+h.size/2,y2:q+h.size/2},color:null}),n=f,p=q)}}}r&&(e.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:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};t.prototype.renderCandlestick=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=null,f=null,q=this.plotArea,w=0,g,k,m,n,p,h,d=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,y=a.axisX.dataInfo.minDiff;isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.7*q.width*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&d>f&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&
(this.dataPointMinWidth&&f<d)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));y<d&&(y=d);y>f&&(y=f);c.save();r&&b.save();c.beginPath();c.rect(q.x1,q.y1,q.width,q.height);c.clip();r&&(b.beginPath(),b.rect(q.x1,q.y1,q.width,q.height),b.clip());for(var A=0;A<a.dataSeriesIndexes.length;A++){var z=a.dataSeriesIndexes[A],s=this.data[z],x=s.dataPoints;if(0<x.length)for(var v=5<y&&s.bevelEnabled?!0:!1,w=0;w<x.length;w++)if(x[w].getTime?h=x[w].x.getTime():h=x[w].x,!(h<a.axisX.dataInfo.viewPortMin||
h>a.axisX.dataInfo.viewPortMax)&&!l(x[w].y)&&x[w].y.length&&"number"===typeof x[w].y[0]&&"number"===typeof x[w].y[1]&&"number"===typeof x[w].y[2]&&"number"===typeof x[w].y[3]){g=a.axisX.convertValueToPixel(h);k=a.axisY.convertValueToPixel(x[w].y[0]);m=a.axisY.convertValueToPixel(x[w].y[1]);n=a.axisY.convertValueToPixel(x[w].y[2]);p=a.axisY.convertValueToPixel(x[w].y[3]);var t=g-y/2<<0,u=t+y<<0,f=s.options.fallingColor?s.fallingColor:s._colorSet[0],d=x[w].color?x[w].color:s._colorSet[0],B=Math.round(Math.max(1,
0.15*y)),C=0===B%2?0:0.5,E=s.dataPointIds[w];this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:z,dataPointIndex:w,x1:t,y1:k,x2:u,y2:m,x3:g,y3:n,x4:g,y4:p,borderThickness:B,color:d};c.strokeStyle=d;c.beginPath();c.lineWidth=B;b.lineWidth=Math.max(B,4);"candlestick"===s.type?(c.moveTo(g-C,m),c.lineTo(g-C,Math.min(k,p)),c.stroke(),c.moveTo(g-C,Math.max(k,p)),c.lineTo(g-C,n),c.stroke(),Y(c,t,Math.min(k,p),u,Math.max(k,p),x[w].y[0]<=x[w].y[3]?s.risingColor:f,B,d,v,v,!1,!1,s.fillOpacity),
r&&(d=T(E),b.strokeStyle=d,b.moveTo(g-C,m),b.lineTo(g-C,Math.min(k,p)),b.stroke(),b.moveTo(g-C,Math.max(k,p)),b.lineTo(g-C,n),b.stroke(),Y(b,t,Math.min(k,p),u,Math.max(k,p),d,0,null,!1,!1,!1,!1))):"ohlc"===s.type&&(c.moveTo(g-C,m),c.lineTo(g-C,n),c.stroke(),c.beginPath(),c.moveTo(g,k),c.lineTo(t,k),c.stroke(),c.beginPath(),c.moveTo(g,p),c.lineTo(u,p),c.stroke(),r&&(d=T(E),b.strokeStyle=d,b.moveTo(g-C,m),b.lineTo(g-C,n),b.stroke(),b.beginPath(),b.moveTo(g,k),b.lineTo(t,k),b.stroke(),b.beginPath(),
b.moveTo(g,p),b.lineTo(u,p),b.stroke()));(x[w].indexLabel||s.indexLabel||x[w].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:s.type,dataPoint:x[w],dataSeries:s,point:{x:t+(u-t)/2,y:a.axisY.reversed?n:m},direction:1,bounds:{x1:t,y1:Math.min(m,n),x2:u,y2:Math.max(m,n)},color:d})}}r&&(e.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(q.x1,q.y1,q.width,q.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};t.prototype.renderBoxAndWhisker=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=
a.dataSeriesIndexes.length)){var d=null,f=this.plotArea,q=0,g,J,k,m,n,p,h,d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,q=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,y=a.axisX.dataInfo.minDiff;isFinite(y)||(y=0.3*Math.abs(a.axisX.range));y=this.options.dataPointWidth?this.dataPointWidth:0.7*f.width*(a.axisX.logarithmic?Math.log(y)/Math.log(a.axisX.range):Math.abs(y)/
Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&d>q&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<d)&&(q=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));y<d&&(y=d);y>q&&(y=q);c.save();r&&b.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();r&&(b.beginPath(),b.rect(f.x1,f.y1,f.width,f.height),b.clip());for(var A=!1,A=!!a.axisY.reversed,z=0;z<a.dataSeriesIndexes.length;z++){var s=
a.dataSeriesIndexes[z],x=this.data[s],v=x.dataPoints;if(0<v.length)for(var t=5<y&&x.bevelEnabled?!0:!1,q=0;q<v.length;q++)if(v[q].getTime?h=v[q].x.getTime():h=v[q].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&!l(v[q].y)&&v[q].y.length&&"number"===typeof v[q].y[0]&&"number"===typeof v[q].y[1]&&"number"===typeof v[q].y[2]&&"number"===typeof v[q].y[3]&&"number"===typeof v[q].y[4]&&5===v[q].y.length){g=a.axisX.convertValueToPixel(h);J=a.axisY.convertValueToPixel(v[q].y[0]);k=a.axisY.convertValueToPixel(v[q].y[1]);
m=a.axisY.convertValueToPixel(v[q].y[2]);n=a.axisY.convertValueToPixel(v[q].y[3]);p=a.axisY.convertValueToPixel(v[q].y[4]);var u=g-y/2<<0,B=g+y/2<<0,d=v[q].color?v[q].color:x._colorSet[0],C=Math.round(Math.max(1,0.15*y)),E=0===C%2?0:0.5,L=v[q].whiskerColor?v[q].whiskerColor:v[q].color?x.whiskerColor?x.whiskerColor:v[q].color:x.whiskerColor?x.whiskerColor:d,N="number"===typeof v[q].whiskerThickness?v[q].whiskerThickness:"number"===typeof x.options.whiskerThickness?x.whiskerThickness:C,Z=v[q].whiskerDashType?
v[q].whiskerDashType:x.whiskerDashType,$=l(v[q].whiskerLength)?l(x.options.whiskerLength)?y:x.whiskerLength:v[q].whiskerLength,$="number"===typeof $?0>=$?0:$>=y?y:$:"string"===typeof $?parseInt($)*y/100>y?y:parseInt($)*y/100:y,ca=1===Math.round(N)%2?0.5:0,ma=v[q].stemColor?v[q].stemColor:v[q].color?x.stemColor?x.stemColor:v[q].color:x.stemColor?x.stemColor:d,F="number"===typeof v[q].stemThickness?v[q].stemThickness:"number"===typeof x.options.stemThickness?x.stemThickness:C,G=1===Math.round(F)%2?
0.5:0,P=v[q].stemDashType?v[q].stemDashType:x.stemDashType,M=v[q].lineColor?v[q].lineColor:v[q].color?x.lineColor?x.lineColor:v[q].color:x.lineColor?x.lineColor:d,Q="number"===typeof v[q].lineThickness?v[q].lineThickness:"number"===typeof x.options.lineThickness?x.lineThickness:C,U=v[q].lineDashType?v[q].lineDashType:x.lineDashType,aa=1===Math.round(Q)%2?0.5:0,V=x.upperBoxColor,va=x.lowerBoxColor,S=l(x.options.fillOpacity)?1:x.fillOpacity,H=x.dataPointIds[q];this._eventManager.objectMap[H]={id:H,
objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:q,x1:u,y1:J,x2:B,y2:k,x3:g,y3:m,x4:g,y4:n,y5:p,borderThickness:C,color:d,stemThickness:F,stemColor:ma,whiskerThickness:N,whiskerLength:$,whiskerColor:L,lineThickness:Q,lineColor:M};c.save();0<F&&(c.beginPath(),c.strokeStyle=ma,c.lineWidth=F,c.setLineDash&&c.setLineDash(K(P,F)),c.moveTo(g-G,k),c.lineTo(g-G,J),c.stroke(),c.moveTo(g-G,n),c.lineTo(g-G,m),c.stroke());c.restore();b.lineWidth=Math.max(C,4);c.beginPath();Y(c,u,Math.min(p,k),B,Math.max(k,
p),va,0,d,A?t:!1,A?!1:t,!1,!1,S);c.beginPath();Y(c,u,Math.min(m,p),B,Math.max(p,m),V,0,d,A?!1:t,A?t:!1,!1,!1,S);c.beginPath();c.lineWidth=C;c.strokeStyle=d;c.rect(u-E,Math.min(k,m)-E,B-u+2*E,Math.max(k,m)-Math.min(k,m)+2*E);c.stroke();c.save();0<Q&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(K(U,Q)),c.strokeStyle=M,c.lineWidth=Q,c.moveTo(u,p-aa),c.lineTo(B,p-aa),c.stroke());c.restore();c.save();0<N&&(c.beginPath(),c.setLineDash&&c.setLineDash(K(Z,N)),c.strokeStyle=L,c.lineWidth=N,
c.moveTo(g-$/2<<0,n-ca),c.lineTo(g+$/2<<0,n-ca),c.stroke(),c.moveTo(g-$/2<<0,J+ca),c.lineTo(g+$/2<<0,J+ca),c.stroke());c.restore();r&&(d=T(H),b.strokeStyle=d,b.lineWidth=F,0<F&&(b.moveTo(g-E-G,k),b.lineTo(g-E-G,Math.max(J,n)),b.stroke(),b.moveTo(g-E-G,Math.min(J,n)),b.lineTo(g-E-G,m),b.stroke()),Y(b,u,Math.max(k,m),B,Math.min(k,m),d,0,null,!1,!1,!1,!1),0<N&&(b.beginPath(),b.lineWidth=N,b.moveTo(g+$/2,n-ca),b.lineTo(g-$/2,n-ca),b.stroke(),b.moveTo(g+$/2,J+ca),b.lineTo(g-$/2,J+ca),b.stroke()));(v[q].indexLabel||
x.indexLabel||v[q].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:x.type,dataPoint:v[q],dataSeries:x,point:{x:u+(B-u)/2,y:a.axisY.reversed?J:n},direction:1,bounds:{x1:u,y1:Math.min(J,n),x2:B,y2:Math.max(J,n)},color:d})}}r&&(e.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),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};t.prototype.renderRangeColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=0,q,g,J,f=this.options.dataPointMinWidth?
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;q=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*(d.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>q&&(f=Math.min(this.options.dataPointWidth?
this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<f)&&(q=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));k<f&&(k=f);k>q&&(k=q);c.save();r&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var m=0;m<a.dataSeriesIndexes.length;m++){var n=a.dataSeriesIndexes[m],
p=this.data[n],h=p.dataPoints;if(0<h.length)for(var y=5<k&&p.bevelEnabled?!0:!1,f=0;f<h.length;f++)if(h[f].getTime?J=h[f].x.getTime():J=h[f].x,!(J<a.axisX.dataInfo.viewPortMin||J>a.axisX.dataInfo.viewPortMax)&&!l(h[f].y)&&h[f].y.length&&"number"===typeof h[f].y[0]&&"number"===typeof h[f].y[1]){b=a.axisX.convertValueToPixel(J);q=a.axisY.convertValueToPixel(h[f].y[0]);g=a.axisY.convertValueToPixel(h[f].y[1]);var A=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,z=a.axisX.reversed?A-k<<0:A+k<<0,b=h[f].color?h[f].color:p._colorSet[f%p._colorSet.length];if(q>g){var s=q;q=g;g=s}s=p.dataPointIds[f];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:f,x1:A,y1:q,x2:z,y2:g};Y(c,a.axisX.reversed?z:A,q,a.axisX.reversed?A:z,g,b,0,b,y,y,!1,!1,p.fillOpacity);b=T(s);r&&Y(this._eventManager.ghostCtx,a.axisX.reversed?z:A,q,a.axisX.reversed?A:z,g,b,0,null,!1,!1,
!1,!1);if(h[f].indexLabel||p.indexLabel||h[f].indexLabelFormatter||p.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:h[f],dataSeries:p,indexKeyword:0,point:{x:A+(z-A)/2,y:h[f].y[1]>=h[f].y[0]?g:q},direction:h[f].y[1]>=h[f].y[0]?-1:1,bounds:{x1:A,y1:Math.min(q,g),x2:z,y2:Math.max(q,g)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:h[f],dataSeries:p,indexKeyword:1,point:{x:A+(z-A)/2,y:h[f].y[1]>=h[f].y[0]?q:g},direction:h[f].y[1]>=h[f].y[0]?1:-1,bounds:{x1:A,
y1:Math.min(q,g),x2:z,y2:Math.max(q,g)},color:b})}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();
return{source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};t.prototype.renderError=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var d=null,f=!1,q=this.plotArea,g=0,J,k,m,n,p,h,y,A=a.axisX.dataInfo.minDiff;isFinite(A)||(A=0.3*Math.abs(a.axisX.range));c.save();r&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(q.x1,q.y1,q.width,q.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(q.x1,q.y1,q.width,q.height),this._eventManager.ghostCtx.clip());for(var z=0,s=0;s<this.data.length;s++)!this.data[s].type.match(/(bar|column)/ig)||!this.data[s].visible||this.data[s].type.match(/(stacked)/ig)&&z||z++;for(var x=0;x<a.dataSeriesIndexes.length;x++){var v=a.dataSeriesIndexes[x],t=this.data[v],u=t.dataPoints,B=l(t._linkedSeries)?!1:t._linkedSeries.type.match(/(bar|column)/ig)&&
t._linkedSeries.visible?!0:!1,F=0;if(B)for(d=t._linkedSeries.id,s=0;s<d;s++)!this.data[s].type.match(/(bar|column)/ig)||!this.data[s].visible||this.data[s].type.match(/(stacked)/ig)&&F||(this.data[s].type.match(/(range)/ig)&&(f=!0),F++);d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;g=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/
(B?z:1)))<<0:0.3*this.width;f&&(g=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(B?z:1)))<<0:0.03*this.width);s=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?q.height:q.width)*(a.axisX.logarithmic?Math.log(A)/Math.log(a.axisX.range):Math.abs(A)/Math.abs(a.axisX.range))/(B?z:1))<<0;this.dataPointMaxWidth&&d>g&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,g));
!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<d)&&(g=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));s<d&&(s=d);s>g&&(s=g);if(0<u.length)for(var K=t._colorSet,g=0;g<u.length;g++){var d=t.lineColor=t.options.color?t.options.color:K[0],L={color:u[g].whiskerColor?u[g].whiskerColor:u[g].color?t.whiskerColor?t.whiskerColor:u[g].color:t.whiskerColor?t.whiskerColor:d,thickness:l(u[g].whiskerThickness)?t.whiskerThickness:u[g].whiskerThickness,dashType:u[g].whiskerDashType?u[g].whiskerDashType:
t.whiskerDashType,length:l(u[g].whiskerLength)?l(t.options.whiskerLength)?s:t.options.whiskerLength:u[g].whiskerLength,trimLength:l(u[g].whiskerLength)?l(t.options.whiskerLength)?50:0:0};L.length="number"===typeof L.length?0>=L.length?0:L.length>=s?s:L.length:"string"===typeof L.length?parseInt(L.length)*s/100>s?s:parseInt(L.length)*s/100>s:s;L.thickness="number"===typeof L.thickness?0>L.thickness?0:Math.round(L.thickness):2;var N={color:u[g].stemColor?u[g].stemColor:u[g].color?t.stemColor?t.stemColor:
u[g].color:t.stemColor?t.stemColor:d,thickness:u[g].stemThickness?u[g].stemThickness:t.stemThickness,dashType:u[g].stemDashType?u[g].stemDashType:t.stemDashType};N.thickness="number"===typeof N.thickness?0>N.thickness?0:Math.round(N.thickness):2;u[g].getTime?y=u[g].x.getTime():y=u[g].x;if(!(y<a.axisX.dataInfo.viewPortMin||y>a.axisX.dataInfo.viewPortMax)&&!l(u[g].y)&&u[g].y.length&&"number"===typeof u[g].y[0]&&"number"===typeof u[g].y[1]){var Z=a.axisX.convertValueToPixel(y);b?k=Z:J=Z;Z=a.axisY.convertValueToPixel(u[g].y[0]);
b?m=Z:p=Z;Z=a.axisY.convertValueToPixel(u[g].y[1]);b?n=Z:h=Z;b?(p=a.axisX.reversed?k+(B?z:1)*s/2-(B?F-1:0)*s<<0:k-(B?z:1)*s/2+(B?F-1:0)*s<<0,h=a.axisX.reversed?p-s<<0:p+s<<0):(m=a.axisX.reversed?J+(B?z:1)*s/2-(B?F-1:0)*s<<0:J-(B?z:1)*s/2+(B?F-1:0)*s<<0,n=a.axisX.reversed?m-s<<0:m+s<<0);!b&&p>h&&(Z=p,p=h,h=Z);b&&m>n&&(Z=m,m=n,n=Z);Z=t.dataPointIds[g];this._eventManager.objectMap[Z]={id:Z,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:g,x1:Math.min(m,n),y1:Math.min(p,h),x2:Math.max(n,m),y2:Math.max(h,
p),isXYSwapped:b,stemProperties:N,whiskerProperties:L};C(c,Math.min(m,n),Math.min(p,h),Math.max(n,m),Math.max(h,p),d,L,N,b);r&&C(this._eventManager.ghostCtx,m,p,n,h,d,L,N,b);if(u[g].indexLabel||t.indexLabel||u[g].indexLabelFormatter||t.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:u[g],dataSeries:t,indexKeyword:0,point:{x:b?u[g].y[1]>=u[g].y[0]?m:n:m+(n-m)/2,y:b?p+(h-p)/2:u[g].y[1]>=u[g].y[0]?h:p},direction:u[g].y[1]>=u[g].y[0]?-1:1,bounds:{x1:b?Math.min(m,n):m,y1:b?p:Math.min(p,
h),x2:b?Math.max(m,n):n,y2:b?h:Math.max(p,h)},color:d,axisSwapped:b}),this._indexLabels.push({chartType:"error",dataPoint:u[g],dataSeries:t,indexKeyword:1,point:{x:b?u[g].y[1]>=u[g].y[0]?n:m:m+(n-m)/2,y:b?p+(h-p)/2:u[g].y[1]>=u[g].y[0]?p:h},direction:u[g].y[1]>=u[g].y[0]?1:-1,bounds:{x1:b?Math.min(m,n):m,y1:b?p:Math.min(p,h),x2:b?Math.max(m,n):n,y2:b?h:Math.max(p,h)},color:d,axisSwapped:b})}}}r&&(e.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(q.x1,q.y1,q.width,q.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};t.prototype.renderRangeBar=
function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,f=0,q,g,J,k,f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;q=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*(d.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>q&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<f)&&(q=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));m<f&&(m=f);m>q&&(m=q);c.save();r&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var p=a.dataSeriesIndexes[n],h=this.data[p],y=h.dataPoints;if(0<y.length){var A=5<m&&h.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<y.length;f++)if(y[f].getTime?k=y[f].x.getTime():k=y[f].x,!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax)&&
!l(y[f].y)&&y[f].y.length&&"number"===typeof y[f].y[0]&&"number"===typeof y[f].y[1]){q=a.axisY.convertValueToPixel(y[f].y[0]);g=a.axisY.convertValueToPixel(y[f].y[1]);J=a.axisX.convertValueToPixel(k);J=a.axisX.reversed?J+a.plotType.totalDataSeries*m/2-(a.previousDataSeriesCount+n)*m<<0:J-a.plotType.totalDataSeries*m/2+(a.previousDataSeriesCount+n)*m<<0;var t=a.axisX.reversed?J-m<<0:J+m<<0;q>g&&(b=q,q=g,g=b);b=y[f].color?y[f].color:h._colorSet[f%h._colorSet.length];Y(c,q,a.axisX.reversed?t:J,g,a.axisX.reversed?
J:t,b,0,null,A,!1,!1,!1,h.fillOpacity);b=h.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:f,x1:q,y1:J,x2:g,y2:t};b=T(b);r&&Y(this._eventManager.ghostCtx,q,a.axisX.reversed?t:J,g,a.axisX.reversed?J:t,b,0,null,!1,!1,!1,!1);if(y[f].indexLabel||h.indexLabel||y[f].indexLabelFormatter||h.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:y[f],dataSeries:h,indexKeyword:0,point:{x:y[f].y[1]>=y[f].y[0]?q:g,y:J+(t-J)/2},
direction:y[f].y[1]>=y[f].y[0]?-1:1,bounds:{x1:Math.min(q,g),y1:J,x2:Math.max(q,g),y2:t},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:y[f],dataSeries:h,indexKeyword:1,point:{x:y[f].y[1]>=y[f].y[0]?g:q,y:J+(t-J)/2},direction:y[f].y[1]>=y[f].y[0]?1:-1,bounds:{x1:Math.min(q,g),y1:J,x2:Math.max(q,g),y2:t},color:b})}}}r&&(e.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(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};t.prototype.renderRangeArea=function(a){function e(){if(x){for(var a=null,c=g.length-
1;0<=c;c--)a=g[c],b.lineTo(a.x,a.y2),d.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();b.globalAlpha=1;d.fill();if(0<m.lineThickness){b.beginPath();b.moveTo(a.x,a.y2);for(c=0;c<g.length;c++)a=g[c],b.lineTo(a.x,a.y2);b.moveTo(g[0].x,g[0].y1);for(c=0;c<g.length;c++)a=g[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(y,A);d.beginPath();d.moveTo(y,A);x={x:y,y:A};g=[];g.push({x:y,y1:A,y2:t})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=
this._eventManager.ghostCtx,f=[],q=this.plotArea;b.save();r&&d.save();b.beginPath();b.rect(q.x1,q.y1,q.width,q.height);b.clip();r&&(d.beginPath(),d.rect(q.x1,q.y1,q.width,q.height),d.clip());for(var l=0;l<a.dataSeriesIndexes.length;l++){var g=[],k=a.dataSeriesIndexes[l],m=this.data[k],n=m.dataPoints,f=m.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:k};f=T(f);d.fillStyle=f;var f=[],p=!0,h=0,y,A,t,s,x=null;if(0<n.length){var v=m._colorSet[h%m._colorSet.length],u=m.lineColor=
m.options.lineColor||v,B=u;b.fillStyle=v;b.strokeStyle=u;b.lineWidth=m.lineThickness;var C="solid";if(b.setLineDash){var E=K(m.nullDataLineDashType,m.lineThickness),C=m.lineDashType,F=K(C,m.lineThickness);b.setLineDash(F)}for(var L=!0;h<n.length;h++)if(s=n[h].x.getTime?n[h].x.getTime():n[h].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!L)))if(null!==n[h].y&&n[h].y.length&&"number"===typeof n[h].y[0]&&"number"===typeof n[h].y[1]){y=a.axisX.convertValueToPixel(s);
A=a.axisY.convertValueToPixel(n[h].y[0]);t=a.axisY.convertValueToPixel(n[h].y[1]);p||L?(m.connectNullData&&!p?(b.setLineDash&&(m.options.nullDataLineDashType||C===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(g[g.length-1].newLineDashArray=F,C=m.nullDataLineDashType,b.setLineDash(E)),b.lineTo(y,A),r&&d.lineTo(y,A),g.push({x:y,y1:A,y2:t})):(b.beginPath(),b.moveTo(y,A),x={x:y,y:A},g=[],g.push({x:y,y1:A,y2:t}),r&&(d.beginPath(),d.moveTo(y,A))),L=p=!1):(b.lineTo(y,A),g.push({x:y,y1:A,y2:t}),
r&&d.lineTo(y,A),0==h%250&&e());s=m.dataPointIds[h];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:h,x1:y,y1:A,y2:t};h<n.length-1&&(B!==(n[h].lineColor||u)||C!==(n[h].lineDashType||m.lineDashType))&&(e(),B=n[h].lineColor||u,g[g.length-1].newStrokeStyle=B,b.strokeStyle=B,b.setLineDash&&(n[h].lineDashType?(C=n[h].lineDashType,g[g.length-1].newLineDashArray=K(C,m.lineThickness),b.setLineDash(g[g.length-1].newLineDashArray)):(C=m.lineDashType,g[g.length-
1].newLineDashArray=F,b.setLineDash(F))));if(0!==n[h].markerSize&&(0<n[h].markerSize||0<m.markerSize)){var N=m.getMarkerProperties(h,y,t,b);f.push(N);var Z=T(s);r&&f.push({x:y,y:t,ctx:d,type:N.type,size:N.size,color:Z,borderColor:Z,borderThickness:N.borderThickness});N=m.getMarkerProperties(h,y,A,b);f.push(N);Z=T(s);r&&f.push({x:y,y:A,ctx:d,type:N.type,size:N.size,color:Z,borderColor:Z,borderThickness:N.borderThickness})}if(n[h].indexLabel||m.indexLabel||n[h].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",
dataPoint:n[h],dataSeries:m,indexKeyword:0,point:{x:y,y:A},direction:n[h].y[0]>n[h].y[1]===a.axisY.reversed?-1:1,color:v}),this._indexLabels.push({chartType:"rangeArea",dataPoint:n[h],dataSeries:m,indexKeyword:1,point:{x:y,y:t},direction:n[h].y[0]>n[h].y[1]===a.axisY.reversed?1:-1,color:v})}else L||p||e(),L=!0;e();X.drawMarkers(f)}}r&&(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(q.x1,q.y1,q.width,q.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderRangeSplineArea=function(a){function e(a,c){var e=u(A,2);if(0<e.length){if(0<
k.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(e[0].x,e[0].y);for(var h=0;h<e.length-3;h+=3){if(e[h].newStrokeStyle||e[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[h].x,e[h].y),e[h].newStrokeStyle&&(b.strokeStyle=e[h].newStrokeStyle),e[h].newLineDashArray&&b.setLineDash(e[h].newLineDashArray);b.bezierCurveTo(e[h+1].x,e[h+1].y,e[h+2].x,e[h+2].y,e[h+3].x,e[h+3].y)}}b.beginPath();b.moveTo(e[0].x,e[0].y);r&&(d.beginPath(),d.moveTo(e[0].x,e[0].y));for(h=
0;h<e.length-3;h+=3)b.bezierCurveTo(e[h+1].x,e[h+1].y,e[h+2].x,e[h+2].y,e[h+3].x,e[h+3].y),r&&d.bezierCurveTo(e[h+1].x,e[h+1].y,e[h+2].x,e[h+2].y,e[h+3].x,e[h+3].y);e=u(t,2);b.lineTo(t[t.length-1].x,t[t.length-1].y);for(h=e.length-1;2<h;h-=3)b.bezierCurveTo(e[h-1].x,e[h-1].y,e[h-2].x,e[h-2].y,e[h-3].x,e[h-3].y),r&&d.bezierCurveTo(e[h-1].x,e[h-1].y,e[h-2].x,e[h-2].y,e[h-3].x,e[h-3].y);b.closePath();b.globalAlpha=k.fillOpacity;b.fill();r&&(d.closePath(),d.fill());b.globalAlpha=1;if(0<k.lineThickness){b.strokeStyle=
c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(e[0].x,e[0].y);for(var f=h=0;h<e.length-3;h+=3,f++){if(A[f].newStrokeStyle||A[f].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[h].x,e[h].y),A[f].newStrokeStyle&&(b.strokeStyle=A[f].newStrokeStyle),A[f].newLineDashArray&&b.setLineDash(A[f].newLineDashArray);b.bezierCurveTo(e[h+1].x,e[h+1].y,e[h+2].x,e[h+2].y,e[h+3].x,e[h+3].y)}e=u(A,2);b.moveTo(e[0].x,e[0].y);for(f=h=0;h<e.length-3;h+=3,f++){if(A[f].newStrokeStyle||A[f].newLineDashArray)b.stroke(),
b.beginPath(),b.moveTo(e[h].x,e[h].y),A[f].newStrokeStyle&&(b.strokeStyle=A[f].newStrokeStyle),A[f].newLineDashArray&&b.setLineDash(A[f].newLineDashArray);b.bezierCurveTo(e[h+1].x,e[h+1].y,e[h+2].x,e[h+2].y,e[h+3].x,e[h+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=r?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,f=[],q=this.plotArea;b.save();r&&d.save();b.beginPath();b.rect(q.x1,q.y1,q.width,q.height);b.clip();r&&(d.beginPath(),
d.rect(q.x1,q.y1,q.width,q.height),d.clip());for(var l=0;l<a.dataSeriesIndexes.length;l++){var g=a.dataSeriesIndexes[l],k=this.data[g],m=k.dataPoints,f=k.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:g};f=T(f);d.fillStyle=f;var f=[],n=0,p,h,y,A=[],t=[];if(0<m.length){var s=k._colorSet[n%k._colorSet.length],x=k.lineColor=k.options.lineColor||s,v=x;b.fillStyle=s;b.lineWidth=k.lineThickness;var B="solid",D;if(b.setLineDash){var C=K(k.nullDataLineDashType,k.lineThickness),
B=k.lineDashType;D=K(B,k.lineThickness)}for(h=!1;n<m.length;n++)if(p=m[n].x.getTime?m[n].x.getTime():m[n].x,!(p<a.axisX.dataInfo.viewPortMin||p>a.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]){p=a.axisX.convertValueToPixel(p);h=a.axisY.convertValueToPixel(m[n].y[0]);y=a.axisY.convertValueToPixel(m[n].y[1]);var E=k.dataPointIds[n];this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:g,
dataPointIndex:n,x1:p,y1:h,y2:y};A[A.length]={x:p,y:h};t[t.length]={x:p,y:y};n<m.length-1&&(v!==(m[n].lineColor||x)||B!==(m[n].lineDashType||k.lineDashType))&&(v=m[n].lineColor||x,A[A.length-1].newStrokeStyle=v,b.setLineDash&&(m[n].lineDashType?(B=m[n].lineDashType,A[A.length-1].newLineDashArray=K(B,k.lineThickness)):(B=k.lineDashType,A[A.length-1].newLineDashArray=D)));if(0!==m[n].markerSize&&(0<m[n].markerSize||0<k.markerSize)){var F=k.getMarkerProperties(n,p,h,b);f.push(F);var L=T(E);r&&f.push({x:p,
y:h,ctx:d,type:F.type,size:F.size,color:L,borderColor:L,borderThickness:F.borderThickness});F=k.getMarkerProperties(n,p,y,b);f.push(F);L=T(E);r&&f.push({x:p,y:y,ctx:d,type:F.type,size:F.size,color:L,borderColor:L,borderThickness:F.borderThickness})}if(m[n].indexLabel||k.indexLabel||m[n].indexLabelFormatter||k.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:m[n],dataSeries:k,indexKeyword:0,point:{x:p,y:h},direction:m[n].y[0]<=m[n].y[1]?-1:1,color:s}),this._indexLabels.push({chartType:"rangeSplineArea",
dataPoint:m[n],dataSeries:k,indexKeyword:1,point:{x:p,y:y},direction:m[n].y[0]<=m[n].y[1]?1:-1,color:s});h=!1}else 0<n&&!h&&(k.connectNullData?b.setLineDash&&(0<A.length&&(k.options.nullDataLineDashType||!m[n-1].lineDashType))&&(A[A.length-1].newLineDashArray=C,B=k.nullDataLineDashType):(e(D,x),A=[],t=[])),h=!0;e(D,x);X.drawMarkers(f)}}r&&(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(q.x1,q.y1,q.width,q.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:O.xClipAnimation,easingFunction:O.easing.linear,animationBase:0}}};t.prototype.renderWaterfall=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=r?this._preRenderCtx:
e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=null,f=this.plotArea,q=0,l,g,k,m,n=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),q=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 p=a.axisX.dataInfo.minDiff;
isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.options.dataPointWidth?this.dataPointWidth:0.6*(f.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&q>g&&(q=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<q)&&(g=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,q));p<q&&(p=q);p>g&&(p=g);c.save();r&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();r&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(f.x1,f.y1,f.width,f.height),this._eventManager.ghostCtx.clip());for(var h=0;h<a.dataSeriesIndexes.length;h++){var y=a.dataSeriesIndexes[h],t=this.data[y],z=t.dataPoints,d=t._colorSet[0];t.risingColor=t.options.risingColor?t.options.risingColor:d;t.fallingColor=t.options.fallingColor?t.options.fallingColor:"#e40a0a";var s="number"===typeof t.options.lineThickness?Math.round(t.lineThickness):
1,x=1===Math.round(s)%2?-0.5:0;if(0<z.length)for(var v=5<p&&t.bevelEnabled?!0:!1,u=!1,B=null,C=null,q=0;q<z.length;q++)if(z[q].getTime?m=z[q].x.getTime():m=z[q].x,"number"!==typeof z[q].y){if(0<q&&!u&&t.connectNullData)var E=t.options.nullDataLineDashType||!z[q-1].lineDashType?t.nullDataLineDashType:z[q-1].lineDashType;u=!0}else{l=a.axisX.convertValueToPixel(m);g=0===t.dataPointEOs[q].cumulativeSum?n:a.axisY.convertValueToPixel(t.dataPointEOs[q].cumulativeSum);k=0===t.dataPointEOs[q].cumulativeSumYStartValue?
n:a.axisY.convertValueToPixel(t.dataPointEOs[q].cumulativeSumYStartValue);l=a.axisX.reversed?l+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+h)*p<<0:l-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+h)*p<<0;var F=a.axisX.reversed?l-p<<0:l+p<<0;g>k&&(d=g,g=k,k=d);a.axisY.reversed&&(d=g,g=k,k=d);d=t.dataPointIds[q];this._eventManager.objectMap[d]={id:d,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:q,x1:l,y1:g,x2:F,y2:k};var L=z[q].color?z[q].color:0<z[q].y?t.risingColor:
t.fallingColor;Y(c,a.axisX.reversed?F:l,a.axisY.reversed?k:g,a.axisX.reversed?l:F,a.axisY.reversed?g:k,L,0,L,v,v,!1,!1,t.fillOpacity);d=T(d);r&&Y(this._eventManager.ghostCtx,a.axisX.reversed?F:l,g,a.axisX.reversed?l:F,k,d,0,null,!1,!1,!1,!1);var N,L=l;N="undefined"!==typeof z[q].isIntermediateSum&&!0===z[q].isIntermediateSum||"undefined"!==typeof z[q].isCumulativeSum&&!0===z[q].isCumulativeSum?0<z[q].y?g:k:0<z[q].y?k:g;0<q&&B&&(!u||t.connectNullData)&&(u&&c.setLineDash&&c.setLineDash(K(E,s)),c.beginPath(),
c.moveTo(B,C-x),c.lineTo(L,N-x),0<s&&c.stroke(),r&&(b.beginPath(),b.moveTo(B,C-x),b.lineTo(L,N-x),0<s&&b.stroke()));u=!1;B=F;C=0<z[q].y?g:k;L=z[q].lineDashType?z[q].lineDashType:t.options.lineDashType?t.options.lineDashType:"shortDash";c.strokeStyle=z[q].lineColor?z[q].lineColor:t.options.lineColor?t.options.lineColor:"#9e9e9e";c.lineWidth=s;c.setLineDash&&(L=K(L,s),c.setLineDash(L));(z[q].indexLabel||t.indexLabel||z[q].indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",
dataPoint:z[q],dataSeries:t,point:{x:l+(F-l)/2,y:0<=z[q].y?g:k},direction:0>z[q].y===a.axisY.reversed?1:-1,bounds:{x1:l,y1:Math.min(g,k),x2:F,y2:Math.max(g,k)},color:d})}}r&&(e.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:e,dest:this.plotArea.ctx,animationCallback:O.fadeInAnimation,easingFunction:O.easing.easeInQuad,animationBase:0}}};var pa=function(a,e,c,b,d,f,q,l,g){if(!(0>c)){"undefined"===typeof l&&(l=1);if(!r){var k=Number((q%(2*Math.PI)).toFixed(8));Number((f%(2*Math.PI)).toFixed(8))===k&&(q-=1E-4)}a.save();a.globalAlpha=l;"pie"===d?(a.beginPath(),a.moveTo(e.x,e.y),a.arc(e.x,e.y,
c,f,q,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===d&&(a.beginPath(),a.arc(e.x,e.y,c,f,q,!1),0<=g&&a.arc(e.x,e.y,g*c,q,f,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};t.prototype.renderPie=function(a){function e(){if(k&&m){var a=0,b=0,c=0,e=0;l(k.options.indexLabelMaxWidth)&&(k.indexLabelMaxWidth=0.33*p.width);for(var d=0;d<m.length;d++){var f=m[d],q=k.dataPointIds[d];h[d].id=q;h[d].objectType=
"dataPoint";h[d].dataPointIndex=d;h[d].dataSeriesIndex=0;var g=h[d],n={percent:null,total:null},w=null,n=t.getPercentAndTotal(k,f);if(k.indexLabelFormatter||f.indexLabelFormatter)w={chart:t.options,dataSeries:k,dataPoint:f,total:n.total,percent:n.percent};n=f.indexLabelFormatter?f.indexLabelFormatter(w):f.indexLabel?t.replaceKeywordsWithValue(f.indexLabel,f,k,d):k.indexLabelFormatter?k.indexLabelFormatter(w):k.indexLabel?t.replaceKeywordsWithValue(k.indexLabel,f,k,d):f.label?f.label:"";t._eventManager.objectMap[q]=
g;g.center={x:v.x,y:v.y};g.y=f.y;g.radius=C;g.percentInnerRadius=F;g.indexLabelText=n;g.indexLabelPlacement=k.indexLabelPlacement;g.indexLabelLineColor=f.indexLabelLineColor?f.indexLabelLineColor:k.options.indexLabelLineColor?k.options.indexLabelLineColor:f.color?f.color:k._colorSet[d%k._colorSet.length];g.indexLabelLineThickness=l(f.indexLabelLineThickness)?k.indexLabelLineThickness:f.indexLabelLineThickness;g.indexLabelLineDashType=f.indexLabelLineDashType?f.indexLabelLineDashType:k.indexLabelLineDashType;
g.indexLabelFontColor=f.indexLabelFontColor?f.indexLabelFontColor:k.indexLabelFontColor;g.indexLabelFontStyle=f.indexLabelFontStyle?f.indexLabelFontStyle:k.indexLabelFontStyle;g.indexLabelFontWeight=f.indexLabelFontWeight?f.indexLabelFontWeight:k.indexLabelFontWeight;g.indexLabelFontSize=l(f.indexLabelFontSize)?k.indexLabelFontSize:f.indexLabelFontSize;g.indexLabelFontFamily=f.indexLabelFontFamily?f.indexLabelFontFamily:k.indexLabelFontFamily;g.indexLabelBackgroundColor=f.indexLabelBackgroundColor?
f.indexLabelBackgroundColor:k.options.indexLabelBackgroundColor?k.options.indexLabelBackgroundColor:k.indexLabelBackgroundColor;g.indexLabelBorderColor=f.indexLabelBorderColor?f.indexLabelBorderColor:k.options.indexLabelBorderColor?k.options.indexLabelBorderColor:k.indexLabelBorderColor;g.indexLabelBorderThickness=f.indexLabelBorderThickness?f.indexLabelBorderThickness:k.options.indexLabelBorderThickness?k.options.indexLabelBorderThickness:k.indexLabelBorderThickness;g.indexLabelPadding=f.indexLabelPadding?
f.indexLabelPadding:k.options.indexLabelPadding?k.options.indexLabelPadding:k.indexLabelPadding;g.indexLabelMaxWidth=f.indexLabelMaxWidth?f.indexLabelMaxWidth:k.indexLabelMaxWidth;g.indexLabelWrap="undefined"!==typeof f.indexLabelWrap?f.indexLabelWrap:k.indexLabelWrap;g.indexLabelTextAlign=f.indexLabelTextAlign?f.indexLabelTextAlign:k.indexLabelTextAlign?k.indexLabelTextAlign:"left";g.startAngle=0===d?k.startAngle?k.startAngle/180*Math.PI:0:h[d-1].endAngle;g.startAngle=(g.startAngle+2*Math.PI)%(2*
Math.PI);g.endAngle=g.startAngle+2*Math.PI/u*Math.abs(f.y);f=(g.endAngle+g.startAngle)/2;f=(f+2*Math.PI)%(2*Math.PI);g.midAngle=f;if(g.midAngle>Math.PI/2-s&&g.midAngle<Math.PI/2+s){if(0===a||h[c].midAngle>g.midAngle)c=d;a++}else if(g.midAngle>3*Math.PI/2-s&&g.midAngle<3*Math.PI/2+s){if(0===b||h[e].midAngle>g.midAngle)e=d;b++}g.hemisphere=f>Math.PI/2&&f<=3*Math.PI/2?"left":"right";g.indexLabelTextBlock=new ja(t.plotArea.ctx,{fontSize:g.indexLabelFontSize,fontFamily:g.indexLabelFontFamily,fontColor:g.indexLabelFontColor,
fontStyle:g.indexLabelFontStyle,fontWeight:g.indexLabelFontWeight,textAlign:g.indexLabelTextAlign,backgroundColor:g.indexLabelBackgroundColor,borderColor:g.indexLabelBorderColor,borderThickness:g.indexLabelBorderThickness,maxWidth:g.indexLabelMaxWidth,maxHeight:g.indexLabelWrap?5*g.indexLabelFontSize:1.5*g.indexLabelFontSize,text:g.indexLabelText,padding:g.indexLabelPadding,textBaseline:"middle"});g.indexLabelTextBlock.measureText()}q=f=0;n=!1;for(d=0;d<m.length;d++)g=h[(c+d)%m.length],1<a&&(g.midAngle>
Math.PI/2-s&&g.midAngle<Math.PI/2+s)&&(f<=a/2&&!n?(g.hemisphere="right",f++):(g.hemisphere="left",n=!0));n=!1;for(d=0;d<m.length;d++)g=h[(e+d)%m.length],1<b&&(g.midAngle>3*Math.PI/2-s&&g.midAngle<3*Math.PI/2+s)&&(q<=b/2&&!n?(g.hemisphere="left",q++):(g.hemisphere="right",n=!0))}}function c(a,b){var c=t.plotArea.ctx;c.clearRect(p.x1,p.y1,p.width,p.height);c.fillStyle=t.backgroundColor;c.fillRect(p.x1,p.y1,p.width,p.height);for(c=0;c<m.length;c++){var e=h[c].startAngle,d=h[c].endAngle;if(d>e){var f=
0.07*C*Math.cos(h[c].midAngle),q=0.07*C*Math.sin(h[c].midAngle),g=!1;if(m[c].exploded){if(1E-9<Math.abs(h[c].center.x-(v.x+f))||1E-9<Math.abs(h[c].center.y-(v.y+q)))h[c].center.x=v.x+f*a,h[c].center.y=v.y+q*a,g=!0}else if(0<Math.abs(h[c].center.x-v.x)||0<Math.abs(h[c].center.y-v.y))h[c].center.x=v.x+f*(1-a),h[c].center.y=v.y+q*(1-a),g=!0;g&&b&&(f={},f.dataSeries=k,f.dataPoint=k.dataPoints[c],f.index=c,t.toolTip.highlightObjects([f]));pa(t.plotArea.ctx,h[c].center,h[c].radius,m[c].color?m[c].color:
k._colorSet[c%k._colorSet.length],k.type,e,d,k.fillOpacity,h[c].percentInnerRadius)}}c=t.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(e=e=0;e<m.length;e++)d=h[e],d.indexLabelText&&(d.indexLabelTextBlock.y-=d.indexLabelTextBlock.height/2-d.indexLabelTextBlock._lineHeight/2,f=0,f="left"===d.hemisphere?"inside"!==k.indexLabelPlacement?-(d.indexLabelTextBlock.width+n):-d.indexLabelTextBlock.width/2:"inside"!==k.indexLabelPlacement?n:-d.indexLabelTextBlock.width/
2,d.indexLabelTextBlock.x+=f,d.indexLabelTextBlock.render(!0),d.indexLabelTextBlock.x-=f,d.indexLabelTextBlock.y+=d.indexLabelTextBlock.height/2-d.indexLabelTextBlock._lineHeight/2,"inside"!==d.indexLabelPlacement&&0<d.indexLabelLineThickness&&(f=d.center.x+C*Math.cos(d.midAngle),q=d.center.y+C*Math.sin(d.midAngle),c.strokeStyle=d.indexLabelLineColor,c.lineWidth=d.indexLabelLineThickness,c.setLineDash&&c.setLineDash(K(d.indexLabelLineDashType,d.indexLabelLineThickness)),c.beginPath(),c.moveTo(f,q),
c.lineTo(d.indexLabelTextBlock.x,d.indexLabelTextBlock.y),c.lineTo(d.indexLabelTextBlock.x+("left"===d.hemisphere?-n:n),d.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,h=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-
h}function d(a){for(var c=null,d=1;d<m.length;d++)if(c=(a+d+h.length)%h.length,h[c].hemisphere!==h[a].hemisphere){c=null;break}else if(h[c].indexLabelText&&c!==a&&(0>b(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,e){e=(e||0)+1;if(1E3<e)return 0;c=c||0;var q=0,k=v.y-1*r,g=v.y+1*r;if(0<=a&&a<m.length){var l=h[a];if(0>c&&l.indexLabelTextBlock.y<k||0<c&&l.indexLabelTextBlock.y>
g)return 0;var n=0,p=0,p=n=n=0;0>c?l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2>k&&l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+c<k&&(c=-(k-(l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+c))):l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2<k&&l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c>g&&(c=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c-g);c=l.indexLabelTextBlock.y+c;k=0;k="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(r,2)-Math.pow(c-v.y,
2)):v.x-Math.sqrt(Math.pow(r,2)-Math.pow(c-v.y,2));p=v.x+C*Math.cos(l.midAngle);n=v.y+C*Math.sin(l.midAngle);n=Math.sqrt(Math.pow(k-p,2)+Math.pow(c-n,2));p=Math.acos(C/r);n=Math.acos((r*r+C*C-n*n)/(2*C*r));c=n<p?c-l.indexLabelTextBlock.y:0;k=null;for(g=1;g<m.length;g++)if(k=(a-g+h.length)%h.length,h[k].hemisphere!==h[a].hemisphere){k=null;break}else if(h[k].indexLabelText&&h[k].hemisphere===h[a].hemisphere&&k!==a&&(0>b(h[k],h[a])||("right"===h[a].hemisphere?h[k].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y:
h[k].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y)))break;else k=null;p=k;n=d(a);g=k=0;0>c?(g="right"===l.hemisphere?p:n,q=c,null!==g&&(p=-c,c=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2-(h[g].indexLabelTextBlock.y+h[g].indexLabelTextBlock.height/2),c-p<y&&(k=-p,g=f(g,k,e+1),+g.toFixed(x)>+k.toFixed(x)&&(q=c>y?-(c-y):-(p-(g-k)))))):0<c&&(g="right"===l.hemisphere?n:p,q=c,null!==g&&(p=c,c=h[g].indexLabelTextBlock.y-h[g].indexLabelTextBlock.height/2-(l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/
2),c-p<y&&(k=p,g=f(g,k,e+1),+g.toFixed(x)<+k.toFixed(x)&&(q=c>y?c-y:p-(k-g)))));q&&(e=l.indexLabelTextBlock.y+q,c=0,c="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(r,2)-Math.pow(e-v.y,2)):v.x-Math.sqrt(Math.pow(r,2)-Math.pow(e-v.y,2)),l.midAngle>Math.PI/2-s&&l.midAngle<Math.PI/2+s?(k=(a-1+h.length)%h.length,k=h[k],a=h[(a+1+h.length)%h.length],"left"===l.hemisphere&&"right"===k.hemisphere&&c>k.indexLabelTextBlock.x?c=k.indexLabelTextBlock.x-15:"right"===l.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&
(c=a.indexLabelTextBlock.x+15)):l.midAngle>3*Math.PI/2-s&&l.midAngle<3*Math.PI/2+s&&(k=(a-1+h.length)%h.length,k=h[k],a=h[(a+1+h.length)%h.length],"right"===l.hemisphere&&"left"===k.hemisphere&&c<k.indexLabelTextBlock.x?c=k.indexLabelTextBlock.x+15:"left"===l.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),l.indexLabelTextBlock.y=e,l.indexLabelTextBlock.x=c,l.indexLabelAngle=Math.atan2(l.indexLabelTextBlock.y-v.y,l.indexLabelTextBlock.x-v.x))}return q}
function q(){var a=t.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,e=0,q=!0,c=0;10>c&&(1>c||0<e);c++){if(k.radius||!k.radius&&"undefined"!==typeof k.innerRadius&&null!==k.innerRadius&&C-e<=E)q=!1;q&&(C-=e);e=0;if("inside"!==k.indexLabelPlacement){r=C*z;for(a=0;a<m.length;a++){var g=h[a];g.indexLabelTextBlock.x=v.x+r*Math.cos(g.midAngle);g.indexLabelTextBlock.y=v.y+r*Math.sin(g.midAngle);g.indexLabelAngle=g.midAngle;g.radius=C;g.percentInnerRadius=
F}for(var l,s,a=0;a<m.length;a++){var g=h[a],w=d(a);if(null!==w){l=h[a];s=h[w];var u=0,u=b(l,s)-y;if(0>u){for(var B=s=0,D=0;D<m.length;D++)D!==a&&h[D].hemisphere===g.hemisphere&&(h[D].indexLabelTextBlock.y<g.indexLabelTextBlock.y?s++:B++);s=u/(s+B||1)*B;var B=-1*(u-s),K=D=0;"right"===g.hemisphere?(D=f(a,s),B=-1*(u-D),K=f(w,B),+K.toFixed(x)<+B.toFixed(x)&&+D.toFixed(x)<=+s.toFixed(x)&&f(a,-(B-K))):(D=f(w,s),B=-1*(u-D),K=f(a,B),+K.toFixed(x)<+B.toFixed(x)&&+D.toFixed(x)<=+s.toFixed(x)&&f(w,-(B-K)))}}}}else for(a=
0;a<m.length;a++)g=h[a],r="pie"===k.type?0.7*C:0.85*C,w=v.x+r*Math.cos(g.midAngle),s=v.y+r*Math.sin(g.midAngle),g.indexLabelTextBlock.x=w,g.indexLabelTextBlock.y=s;for(a=0;a<m.length;a++)if(g=h[a],w=g.indexLabelTextBlock.measureText(),0!==w.height&&0!==w.width)w=w=0,"right"===g.hemisphere?(w=p.x2-(g.indexLabelTextBlock.x+g.indexLabelTextBlock.width+n),w*=-1):w=p.x1-(g.indexLabelTextBlock.x-g.indexLabelTextBlock.width-n),0<w&&(!q&&g.indexLabelText&&(s="right"===g.hemisphere?p.x2-g.indexLabelTextBlock.x:
g.indexLabelTextBlock.x-p.x1,0.3*g.indexLabelTextBlock.maxWidth>s?g.indexLabelText="":g.indexLabelTextBlock.maxWidth=0.85*s,0.3*g.indexLabelTextBlock.maxWidth<s&&(g.indexLabelTextBlock.x-="right"===g.hemisphere?2:-2)),Math.abs(g.indexLabelTextBlock.y-g.indexLabelTextBlock.height/2-v.y)<C||Math.abs(g.indexLabelTextBlock.y+g.indexLabelTextBlock.height/2-v.y)<C)&&(w/=Math.abs(Math.cos(g.indexLabelAngle)),9<w&&(w*=0.3),w>e&&(e=w)),w=w=0,0<g.indexLabelAngle&&g.indexLabelAngle<Math.PI?(w=p.y2-(g.indexLabelTextBlock.y+
g.indexLabelTextBlock.height/2+5),w*=-1):w=p.y1-(g.indexLabelTextBlock.y-g.indexLabelTextBlock.height/2-5),0<w&&(!q&&g.indexLabelText&&(s=0<g.indexLabelAngle&&g.indexLabelAngle<Math.PI?-1:1,0===f(a,w*s)&&f(a,2*s)),Math.abs(g.indexLabelTextBlock.x-v.x)<C&&(w/=Math.abs(Math.sin(g.indexLabelAngle)),9<w&&(w*=0.3),w>e&&(e=w)));var O=function(a,b,c){for(var e=[],d=0;e.push(h[b]),b!==c;b=(b+1+m.length)%m.length);e.sort(function(a,b){return a.y-b.y});for(b=0;b<e.length;b++)if(c=e[b],d<0.7*a)d+=c.indexLabelTextBlock.height,
c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,e=0,f=!1,q=0;q<m.length;q++)if(f=!1,l=h[q],l.indexLabelText){var k=d(q);if(null!==k){var g=h[k];u=0;u=b(l,g);var p;if(p=0>u){p=l.indexLabelTextBlock.x;var w=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,s=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2,t=g.indexLabelTextBlock.y-g.indexLabelTextBlock.height/2,y=g.indexLabelTextBlock.x+g.indexLabelTextBlock.width,
r=g.indexLabelTextBlock.y+g.indexLabelTextBlock.height/2;p=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width<g.indexLabelTextBlock.x-n||p>y+n||w>r+n||s<t-n?!1:!0}p?(0>a&&(a=q),k!==a&&(c=k,e+=-u),0===q%Math.max(m.length/10,3)&&(f=!0)):f=!0;f&&(0<e&&0<=a&&0<=c)&&(O(e,a,c),c=a=-1,e=0)}}0<e&&O(e,a,c)})()}}function g(){t.plotArea.layoutManager.reset();t.title&&(t.title.dockInsidePlotArea||"center"===t.title.horizontalAlign&&"center"===t.title.verticalAlign)&&t.title.render();if(t.subtitles)for(var a=
0;a<t.subtitles.length;a++){var b=t.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}t.legend&&(t.legend.dockInsidePlotArea||"center"===t.legend.horizontalAlign&&"center"===t.legend.verticalAlign)&&(t.legend.setLayout(),t.legend.render())}var t=this;if(!(0>=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],m=k.dataPoints,n=10,p=this.plotArea,h=k.dataPointEOs,y=2,r,z=1.3,s=20/180*Math.PI,x=6,v={x:(p.x2+p.x1)/2,y:(p.y2+p.y1)/
2},u=0;a=!1;for(var B=0;B<m.length;B++)u+=Math.abs(m[B].y),!a&&("undefined"!==typeof m[B].indexLabel&&null!==m[B].indexLabel&&0<m[B].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof m[B].label&&null!==m[B].label&&0<m[B].label.toString().length)&&(a=!0);if(0!==u){a=a||"undefined"!==typeof k.indexLabel&&null!==k.indexLabel&&0<k.indexLabel.toString().length;var C="inside"!==k.indexLabelPlacement&&a?0.75*Math.min(p.width,p.height)/2:0.92*Math.min(p.width,p.height)/2;k.radius&&(C=Sa(k.radius,
C));var E="undefined"!==typeof k.innerRadius&&null!==k.innerRadius?Sa(k.innerRadius,C):0.7*C,F=Math.min(E/C,(C-1)/C);this.pieDoughnutClickHandler=function(a){t.isAnimating||!l(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&t._animator.animate(0,500,function(a){c(a,!0);g();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});t.dispatchEvent("dataAnimationEnd",{chart:t})}))};e();q();q();q();q();this.disableToolTip=!0;this._animator.animate(0,
this.animatedRender?this.animationDuration:0,function(a){var b=t.plotArea.ctx;b.clearRect(p.x1,p.y1,p.width,p.height);b.fillStyle=t.backgroundColor;b.fillRect(p.x1,p.y1,p.width,p.height);for(var b=h[0].startAngle+2*Math.PI*a,c=0;c<m.length;c++){var e=0===c?h[c].startAngle:d,d=e+(h[c].endAngle-h[c].startAngle),f=!1;d>b&&(d=b,f=!0);var q=m[c].color?m[c].color:k._colorSet[c%k._colorSet.length];d>e&&pa(t.plotArea.ctx,h[c].center,h[c].radius,q,k.type,e,d,k.fillOpacity,h[c].percentInnerRadius);if(f)break}g();
t.dispatchEvent("dataAnimationIterationEnd",{chart:t});1<=a&&t.dispatchEvent("dataAnimationEnd",{chart:t})},function(){t.disableToolTip=!1;t._animator.animate(0,t.animatedRender?500:0,function(a){c(a,!1);g();t.dispatchEvent("dataAnimationIterationEnd",{chart:t})});t.dispatchEvent("dataAnimationEnd",{chart:t})});k.radius=C;"doughnut"===k.type&&(k.innerRadius=E)}}};var qa=function(a,e,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(e.y4-e.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(e.x1),
Math.round(e.y1)),a.lineTo(Math.round(e.x2),Math.round(e.y2)),a.lineTo(Math.round(e.x3),Math.round(e.y3)),a.lineTo(Math.round(e.x4),Math.round(e.y4)),"undefined"!==e.x5&&(a.lineTo(Math.round(e.x5),Math.round(e.y5)),a.lineTo(Math.round(e.x6),Math.round(e.y6))),a.closePath(),a.fillStyle=b?b:e.color,a.fill(),a.globalAplha=1,a.restore())};t.prototype.renderFunnel=function(a){function e(){for(var a=0,b=[],c=0;c<x.length;c++){if("undefined"===typeof x[c].y)return-1;x[c].y="number"===typeof x[c].y?x[c].y:
0;a+=Math.abs(x[c].y)}if(0===a)return-1;for(c=b[0]=0;c<x.length;c++)b.push(Math.abs(x[c].y)*E/a);return b}function c(){var a=V,b=T,c=aa,e=X,d,f;d=$;f=P-M;e=Math.abs((f-d)*(b-a+(e-c))/2);c=X-aa;d=f-d;f=c*(f-P);f=Math.abs(f);f=e+f;for(var e=[],h=0,q=0;q<x.length;q++){if("undefined"===typeof x[q].y)return-1;x[q].y="number"===typeof x[q].y?x[q].y:0;h+=Math.abs(x[q].y)}if(0===h)return-1;for(var k=e[0]=0,g=0,l,m,b=b-a,k=!1,q=0;q<x.length;q++)a=Math.abs(x[q].y)*f/h,k?l=0==Number(c.toFixed(3))?0:a/c:(m=da*
da*b*b-4*Math.abs(da)*a,0>m?(m=c,k=(b+m)*(d-g)/2,a-=k,l=d-g,g+=d-g,l+=0==m?0:a/m,g+=a/m,k=!0):(l=(Math.abs(da)*b-Math.sqrt(m))/2,m=b-2*l/Math.abs(da),g+=l,g>d&&(g-=l,m=c,k=(b+m)*(d-g)/2,a-=k,l=d-g,g+=d-g,l+=a/m,g+=a/m,k=!0),b=m)),e.push(l);return e}function b(){if(s&&x){for(var a,b,c,e,d,f,q,g,k,m,n,p,w,t,y,v,u,A,J=[],B=[],C={percent:null,total:null},E=null,D=0;D<x.length;D++)A=H[D],A="undefined"!==typeof A.x5?(A.y2+A.y4)/2:(A.y2+A.y3)/2,A=h(A).x2+1,J[D]=Z-(isNaN(A)?0:A)-U;A=0.5*U;for(var D=0,F=x.length-
1;D<x.length||0<=F;D++,F--){b=s.reversed?x[F]:x[D];a=b.color?b.color:s.reversed?s._colorSet[(x.length-1-D)%s._colorSet.length]:s._colorSet[D%s._colorSet.length];c=b.indexLabelPlacement||s.indexLabelPlacement||"outside";u=b.indexLabelTextAlign||s.indexLabelTextAlign||"left";e=b.indexLabelBackgroundColor||s.indexLabelBackgroundColor||(r?"transparent":null);d=b.indexLabelBorderColor||s.indexLabelBorderColor||(r?"transparent":null);f=l(b.indexLabelBorderThickness)?s.indexLabelBorderThickness:b.indexLabelBorderThickness;
q=l(b.indexLabelPadding)?s.options.indexLabelPadding?s.options.indexLabelPadding:s.indexLabelPadding:b.indexLabelPadding;g=b.indexLabelFontColor||s.indexLabelFontColor||"#979797";k=l(b.indexLabelFontSize)?s.indexLabelFontSize:b.indexLabelFontSize;m=b.indexLabelFontStyle||s.indexLabelFontStyle||"normal";n=b.indexLabelFontFamily||s.indexLabelFontFamily||"arial";p=b.indexLabelFontWeight||s.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||s.options.indexLabelLineColor||a;w="number"===typeof b.indexLabelLineThickness?
b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;t=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";y="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;v=s.dataPointIds[D];z._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataPointIndex:D,dataSeriesIndex:0,funnelSection:H[s.reversed?x.length-1-D:D]};"inside"===s.indexLabelPlacement&&(J[D]=D!==ea?s.reversed?H[D].x2-H[D].x1:
H[D].x3-H[D].x4:H[D].x3-H[D].x6,20>J[D]&&(J[D]=D!==ea?s.reversed?H[D].x3-H[D].x4:H[D].x2-H[D].x1:H[D].x2-H[D].x1,J[D]/=2));v=b.indexLabelMaxWidth?b.indexLabelMaxWidth:s.options.indexLabelMaxWidth?s.indexLabelMaxWidth:J[D];if(v>J[D]||0>v)v=J[D];B[D]="inside"===s.indexLabelPlacement?y?Math.max(H[D].height,k):1.5*k+("object"===typeof q?(q.top||0)+(q.bottom||0):2*q):!1;C=z.getPercentAndTotal(s,b);if(s.indexLabelFormatter||b.indexLabelFormatter)E={chart:z.options,dataSeries:s,dataPoint:b,total:C.total,
percent:C.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(E):b.indexLabel?z.replaceKeywordsWithValue(b.indexLabel,b,s,D):s.indexLabelFormatter?s.indexLabelFormatter(E):s.indexLabel?z.replaceKeywordsWithValue(s.indexLabel,b,s,D):b.label?b.label:"";0>=w&&(w=0);1E3>v&&1E3-v<A&&(v+=1E3-v);l(s.options.indexLabelMaxWidth)&&(s.indexLabelMaxWidth=l(s.indexLabelMaxWidth)?v:Math.max(v,s.indexLabelMaxWidth));Q.roundRect||ya(Q);c=new ja(Q,{fontSize:k,fontFamily:n,fontColor:g,fontStyle:m,fontWeight:p,horizontalAlign:c,
textAlign:u,backgroundColor:e,borderColor:d,borderThickness:f,maxWidth:v,maxHeight:!1===B[D]?(y?4.28571429*k:1.5*k)+("object"===typeof q?(q.top||0)+(q.bottom||0):2*q):B[D],text:b,padding:q,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;I.push({textBlock:c,id:s.reversed?F:D,isDirty:!1,lineColor:a,lineThickness:w,lineDashType:t,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}
function d(){var a,b,c,e,d,f=[];d=!1;c=0;for(var h,q=Z-T-U/2,q=s.options.indexLabelMaxWidth?s.indexLabelMaxWidth>q?q:s.indexLabelMaxWidth:q,k=I.length-1;0<=k;k--){h=x[I[k].id];c=I[k];e=c.textBlock;b=(a=p(k)<H.length?I[p(k)]:null)?a.textBlock:null;c=c.height;a&&e.y+c+fa>b.y&&(d=!0);c=h.indexLabelMaxWidth||q;if(c>q||0>c)c=q;f.push(c)}if(d)for(k=I.length-1;0<=k;k--)a=H[k],I[k].textBlock.maxWidth=f[f.length-(k+1)],I[k].textBlock.measureText(),I[k].textBlock.height=I[k].textBlock.height===2*I[k].textBlock.padding?
0:I[k].textBlock.height,I[k].textBlock.width=I[k].textBlock.width===2*I[k].textBlock.padding?0:I[k].textBlock.width,I[k].textBlock.x=Z-q,c=I[k].textBlock.height<I[k].textBlock.maxHeight?I[k].textBlock.height:I[k].textBlock.maxHeight,d=I[k].textBlock.width<I[k].textBlock.maxWidth?I[k].textBlock.width:I[k].textBlock.maxWidth,I[k].height=c,I[k].width=d,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,I[k].textBlock.y=c-I[k].height/2,s.reversed?(I[k].textBlock.y+I[k].height>S+u&&(I[k].textBlock.y=
S+u-I[k].height),I[k].textBlock.y<Y-u&&(I[k].textBlock.y=Y-u)):(I[k].textBlock.y<S-u&&(I[k].textBlock.y=S-u),I[k].textBlock.y+I[k].height>Y+u&&(I[k].textBlock.y=Y+u-I[k].height))}function f(){var a,b,c,e;if("inside"!==s.indexLabelPlacement)for(var d=0;d<H.length;d++)0==I[d].textBlock.text.length?I[d].isDirty=!0:(a=H[d],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=s.reversed?"undefined"!==typeof a.x5?c>va?h(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<va?h(c).x2+
1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,I[d].textBlock.x=b+U,I[d].textBlock.y=c-I[d].height/2,s.reversed?(I[d].textBlock.y+I[d].height>S+u&&(I[d].textBlock.y=S+u-I[d].height),I[d].textBlock.y<Y-u&&(I[d].textBlock.y=Y-u)):(I[d].textBlock.y<S-u&&(I[d].textBlock.y=S-u),I[d].textBlock.y+I[d].height>Y+u&&(I[d].textBlock.y=Y+u-I[d].height)));else for(d=0;d<H.length;d++)0==I[d].textBlock.text.length?I[d].isDirty=!0:(a=H[d],b=a.height,c=I[d].height,e=I[d].width,b>=c?(b=d!=ea?(a.x4+a.x3)/2-e/2:(a.x5+a.x4)/2-e/2,
c=d!=ea?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,I[d].textBlock.x=b,I[d].textBlock.y=c):I[d].isDirty=!0)}function q(){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<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=d);return d}e=p(b);d=g(b,e);if(d>=c)return f.y+=c,c;if(b==H.length-1)return 0<d&&(f.y+=d),d;d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,d,e,f,h=0,q;f=(P-$+2*u)/l;q=l;for(var k,g=1;g<q;g++){e=g*
f;for(var m=I.length-1;0<=m;m--)!I[m].isDirty&&(I[m].textBlock.y<e&&I[m].textBlock.y+I[m].height>e)&&(k=p(m),!(k>=I.length-1)&&I[m].textBlock.y+I[m].height+fa>I[k].textBlock.y&&(I[m].textBlock.y=I[m].textBlock.y+I[m].height-e>e-I[m].textBlock.y?e+1:e-I[m].height-1))}for(k=H.length-1;0<k;k--)if(!I[k].isDirty){e=n(k);if(0>e&&(e=0,I[e].isDirty))break;if(I[k].textBlock.y<I[e].textBlock.y+I[e].height){d=d||k;f=k;for(q=0;I[f].textBlock.y<I[e].textBlock.y+I[e].height+fa;){a=a||I[f].textBlock.y+I[f].height;
q+=I[f].height;q+=fa;f=e;if(0>=f){f=0;q+=I[f].height;break}e=n(f);if(0>e){f=0;q+=I[f].height;break}}if(f!=k){h=I[f].textBlock.y;a-=h;a=q-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(H[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=e[d],f<a)h++,f+=I[b.id].height+fa,I[b.id].textBlock.text="",I[b.id].indexLabelText="",I[b.id].isDirty=!0,I[b.id].textBlock.measureText();else break;return h}for(var d,e,f,h,q,k,l=1,m=
0;m<2*l;m++){for(var s=I.length-1;0<=s&&!(0<=n(s)&&n(s),f=I[s],h=f.textBlock,k=(q=p(s)<H.length?I[p(s)]:null)?q.textBlock:null,d=+f.height.toFixed(6),e=+h.y.toFixed(6),!f.isDirty&&(q&&e+d+fa>+k.y.toFixed(6))&&(d=h.y+d+fa-k.y,e=a(s,-d),e<d&&(0<e&&(d-=e),e=a(p(s),d),e!=d)));s--);b()}}function g(a,b){return(b<H.length?I[b].textBlock.y:s.reversed?S+u:Y+u)-(0>a?s.reversed?Y-u:S-u:I[a].textBlock.y+I[a].height+fa)}function t(a,b,c){var d,e,h,q=[],g=u,l=[];-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)q=ia;else{e=u*(1!=W.length||0!=W[0]&&W[0]!=H.length-1?2:1)/k();for(var n=0;n<H.length;n++){if(1==W.length&&0==W[0]){if(0===n){q.push(ia[n]);d=g;continue}}else 0===n&&(d=-1*g);q.push(ia[n]+d);if(0<=W.indexOf(n)||n<H.length&&0<=W.indexOf(n+1))d+=e}}h=function(){for(var a=[],b=0;b<H.length;b++)a.push(q[b]-H[b].y1);return a}();var p={startTime:(new Date).getTime(),duration:c||500,easingFunction:function(a,b,c,d){return O.easing.easeOutQuart(a,
b,c,d)},changeSection:function(a){for(var b,c,d=0;d<H.length;d++)b=h[d],c=H[d],b*=a,"undefined"===typeof l[d]&&(l[d]=0),0>l&&(l*=-1),c.y1+=b-l[d],c.y2+=b-l[d],c.y3+=b-l[d],c.y4+=b-l[d],c.y5&&(c.y5+=b-l[d],c.y6+=b-l[d]),l[d]=b}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ha=!0;d.clearRect(v.x1,v.y1,v.x2-v.x1,v.y2-v.y1);d.fillStyle=a.backgroundColor;d.fillRect(v.x1,v.y1,v.width,v.height);p.changeSection(c,b);var e={};e.dataSeries=s;e.dataPoint=s.reversed?s.dataPoints[x.length-1-
b]:s.dataPoints[b];e.index=s.reversed?x.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<H.length;e++)qa(d,H[e],s.fillOpacity);A(d);L&&("inside"!==s.indexLabelPlacement?m(d):f(),y(d));1<=c&&(ha=!1)},null,O.easing.easeOutQuart)}function k(){for(var a=0,b=0;b<H.length-1;b++)(0<=W.indexOf(b)||0<=W.indexOf(b+1))&&a++;return a}function m(a){for(var b,c,d,e,f=0;f<H.length;f++)e=1===I[f].lineThickness%2?0.5:0,c=((H[f].y2+H[f].y4)/2<<0)+e,b=h(c).x2-1,isNaN(b)&&(Math.round(H[f].x1)===Math.round(H[f].x4)&&
Math.round(H[f].x2)===Math.round(H[f].x3))&&(b=H[f].x2),d=I[f].textBlock.x,e=(I[f].textBlock.y+I[f].height/2<<0)+e,I[f].isDirty||0==I[f].lineThickness||(a.strokeStyle=I[f].lineColor,a.lineWidth=I[f].lineThickness,a.setLineDash&&a.setLineDash(K(I[f].lineDashType,I[f].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function n(a){for(a-=1;-1<=a&&-1!=a&&I[a].isDirty;a--);return a}function p(a){for(a+=1;a<=H.length&&a!=H.length&&I[a].isDirty;a++);return a}function h(a){for(var b,
c=0;c<x.length;c++)if(H[c].y1<a&&H[c].y4>a){b=H[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 y(a){for(var b=0;b<H.length;b++)I[b].isDirty||(a&&(I[b].textBlock.ctx=a),I[b].textBlock.y+=I[b].textBlock._lineHeight/2,I[b].textBlock.render(!0),I[b].textBlock.y-=I[b].textBlock._lineHeight/2)}function A(a){z.plotArea.layoutManager.reset();a.roundRect||ya(a);z.title&&(z.title.dockInsidePlotArea||
"center"===z.title.horizontalAlign&&"center"===z.title.verticalAlign)&&(z.title.ctx=a,z.title.render());if(z.subtitles)for(var b=0;b<z.subtitles.length;b++){var c=z.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)z.subtitles.ctx=a,c.render()}z.legend&&(z.legend.dockInsidePlotArea||"center"===z.legend.horizontalAlign&&"center"===z.legend.verticalAlign)&&(z.legend.ctx=a,z.legend.setLayout(),z.legend.render());ta.fNg&&ta.fNg(z)}var z=this;if(!(0>=a.dataSeriesIndexes.length)){for(var s=
this.data[a.dataSeriesIndexes[0]],x=s.dataPoints,v=this.plotArea,u=0.025*v.width,B=0.01*v.width,C=0,E=v.height-2*u-4,F=Math.min(v.width-2*B,2.8*v.height),L=!1,N=0;N<x.length;N++)if(!L&&("undefined"!==typeof x[N].indexLabel&&null!==x[N].indexLabel&&0<x[N].indexLabel.toString().length)&&(L=!0),!L&&("undefined"!==typeof x[N].label&&null!==x[N].label&&0<x[N].label.toString().length)&&(L=!0),!L&&"function"===typeof s.indexLabelFormatter||"function"===typeof x[N].indexLabelFormatter)L=!0;L=L||"undefined"!==
typeof s.indexLabel&&null!==s.indexLabel&&0<s.indexLabel.toString().length;"inside"!==s.indexLabelPlacement&&L||(B=(v.width-0.75*F)/2);var N=v.x1+B,Z=v.x2-B,$=v.y1+u+2,P=v.y2-u-2,Q=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=s.length&&(s.dataPoints&&s.visible)&&0!==x.length){var M,G;a=75*F/100;var U=30*(Z-a)/100;"funnel"===s.type?(M=l(s.options.neckHeight)?0.35*E:s.neckHeight,G=l(s.options.neckWidth)?0.25*a:s.neckWidth,"string"===typeof M&&M.match(/%$/)?(M=parseInt(M),M=M*E/100):M=parseInt(M),
"string"===typeof G&&G.match(/%$/)?(G=parseInt(G),G=G*a/100):G=parseInt(G),M>E?M=E:0>=M&&(M=0),G>a?G=a-0.5:0>=G&&(G=0)):"pyramid"===s.type&&(G=M=0,s.reversed=s.reversed?!1:!0);var B=N+a/2,V=N,T=N+a,S=s.reversed?P:$,aa=B-G/2,X=B+G/2,va=s.reversed?$+M:P-M,Y=s.reversed?$:P;G=s.valueRepresents=s.valueRepresents?s.valueRepresents:"height";N=[];a=[];var H=[],B=[],ba=$,ea,da=(va-S)/(aa-V),ga=-da,F="area"===G?c():e();if(-1!==F){if(s.reversed)for(B.push(ba),G=F.length-1;0<G;G--)ba+=F[G],B.push(Math.round(ba));
else for(G=0;G<F.length;G++)ba+=F[G],B.push(Math.round(ba));if(s.reversed)for(G=0;G<F.length;G++)B[G]<va?(N.push(aa),a.push(X),ea=G):(N.push((B[G]-S+da*V)/da),a.push((B[G]-S+ga*T)/ga));else for(G=0;G<F.length;G++)B[G]<va?(N.push((B[G]-S+da*V)/da),a.push((B[G]-S+ga*T)/ga),ea=G):(N.push(aa),a.push(X));for(G=0;G<F.length-1;G++)ba=s.reversed?x[x.length-1-G].color?x[x.length-1-G].color:s._colorSet[(x.length-1-G)%s._colorSet.length]:x[G].color?x[G].color:s._colorSet[G%s._colorSet.length],G===ea?H.push({x1:N[G],
y1:B[G],x2:a[G],y2:B[G],x3:X,y3:va,x4:a[G+1],y4:B[G+1],x5:N[G+1],y5:B[G+1],x6:aa,y6:va,id:G,height:B[G+1]-B[G],color:ba}):H.push({x1:N[G],y1:B[G],x2:a[G],y2:B[G],x3:a[G+1],y3:B[G+1],x4:N[G+1],y4:B[G+1],id:G,height:B[G+1]-B[G],color:ba}),s.dataPointEOs[G]&&H[G]&&(s.dataPointEOs[G].sectionsofFunnel=H[G]);var fa=2,I=[],ha=!1,W=[],ia=[],N=!1;a=a=0;Ca(W);for(G=0;G<x.length;G++)x[G].exploded&&(N=!0,s.reversed?W.push(x.length-1-G):W.push(G));Q.clearRect(v.x1,v.y1,v.width,v.height);Q.fillStyle=z.backgroundColor;
Q.fillRect(v.x1,v.y1,v.width,v.height);if(L&&s.visible&&(b(),f(),"inside"!==s.indexLabelPlacement)){d();q();for(G=0;G<x.length;G++)I[G].isDirty||(a=I[G].textBlock.x+I[G].width,a=(Z-a)/2,0==G&&(C=a),C>a&&(C=a));for(G=0;G<H.length;G++)H[G].x1+=C,H[G].x2+=C,H[G].x3+=C,H[G].x4+=C,H[G].x5&&(H[G].x5+=C,H[G].x6+=C),I[G].textBlock.x+=C}for(G=0;G<H.length;G++)C=H[G],qa(Q,C,s.fillOpacity),ia.push(C.y1);A(Q);L&&s.visible&&("inside"===s.indexLabelPlacement||z.animationEnabled||m(Q),z.animationEnabled||y());if(!L)for(G=
0;G<x.length;G++)C=s.dataPointIds[G],a={id:C,objectType:"dataPoint",dataPointIndex:G,dataSeriesIndex:0,funnelSection:H[s.reversed?x.length-1-G:G]},z._eventManager.objectMap[C]=a;!z.animationEnabled&&N?t(z,-1,0):z.animationEnabled&&!z.animatedRender&&t(z,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ha&&!z.isAnimating&&(l(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=s.reversed?x.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===s.type||"pyramid"===
s.type)s.reversed?x[x.length-1-a].exploded=x[x.length-1-a].exploded?!1:!0:x[a].exploded=x[a].exploded?!1:!0;t(z,b,500)}};return{source:Q,dest:this.plotArea.ctx,animationCallback:function(a,b){O.fadeInAnimation(a,b);1<=a&&(t(z,-1,500),A(z.plotArea.ctx||z.ctx))},easingFunction:O.easing.easeInQuad,animationBase:0}}}}};t.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||
function(a){window.setTimeout(a,1E3/60)}}();t.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;t.prototype.set=function(a,e,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=e,c&&this.render()):t.base.set.call(this,a,e,c)};t.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var e=a.format?a.format:
"png",c=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+e);var b=this.canvas;if(b&&e&&c){c=c+"."+e;a="image/"+e;var b=b.toDataURL(a),d=!1,f=document.createElement("a");f.download=c;f.href=b;if("undefined"!==typeof Blob&&new Blob){for(var q=b.replace(/^data:[a-z\/]*;base64,/,""),q=atob(q),g=new ArrayBuffer(q.length),g=new Uint8Array(g),l=0;l<q.length;l++)g[l]=q.charCodeAt(l);e=new Blob([g.buffer],{type:"image/"+e});try{window.navigator.msSaveBlob(e,c),
d=!0}catch(k){f.dataset.downloadurl=[a,f.download,f.href].join(":"),f.href=window.URL.createObjectURL(e)}}if(!d)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),f.dispatchEvent?f.dispatchEvent(event):f.fireEvent&&f.fireEvent("onclick")}catch(m){e=window.open(),e.document.write("<img src='"+b+"'></img><div>Please right click on the image and save it to your device</div>"),e.document.close()}}};t.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),
e=document.createElement("iframe");e.setAttribute("class","canvasjs-chart-print-frame");P(e,{position:"absolute",width:"100%",border:"0px",margin:"0px 0px 0px 0px",padding:"0px 0px 0px 0px"});e.style.height=this.height+"px";this._canvasJSContainer.appendChild(e);var c=this,b=e.contentWindow||e.contentDocument.document||e.contentDocument;b.document.open();b.document.write('<!DOCTYPE HTML>\n<html><body><img src="'+a+'"/><body/></html>');b.document.body&&b.document.body.style&&(b.document.body.style.margin=
"0px 0px 0px 0px",b.document.body.style.padding="0px 0px 0px 0px");b.document.close();setTimeout(function(){b.focus();b.print();setTimeout(function(){c._canvasJSContainer.removeChild(e)},1E3)},500)};t.prototype.getPercentAndTotal=function(a,e){var c=null,b=null,d=c=null;if(0<=a.type.indexOf("stacked"))b=0,c=e.x.getTime?e.x.getTime():e.x,c in a.plotUnit.yTotals&&(b=a.plotUnit.yTotals[c],c=a.plotUnit.yAbsTotals[c],d=isNaN(e.y)?0:0===c?0:100*(e.y/c));else if("pie"===a.type||"doughnut"===a.type||"funnel"===
a.type||"pyramid"===a.type){for(c=b=0;c<a.dataPoints.length;c++)isNaN(a.dataPoints[c].y)||(b+=a.dataPoints[c].y);d=isNaN(e.y)?0:100*(e.y/b)}return{percent:d,total:b}};t.prototype.replaceKeywordsWithValue=function(a,e,c,b,d){var f=this;d="undefined"===typeof d?0:d;if((0<=c.type.indexOf("stacked")||"pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var q="#percent",g="#total",l=this.getPercentAndTotal(c,e),g=isNaN(l.total)?
g:l.total,q=isNaN(l.percent)?q:l.percent;do{l="";if(c.percentFormatString)l=c.percentFormatString;else{var l="#,##0.",k=Math.max(Math.ceil(Math.log(1/Math.abs(q))/Math.LN10),2);if(isNaN(k)||!isFinite(k))k=2;for(var m=0;m<k;m++)l+="#";c.percentFormatString=l}a=a.replace("#percent",ea(q,l,f._cultureInfo));a=a.replace("#total",ea(g,c.yValueFormatString?c.yValueFormatString:"#,##0.########",f._cultureInfo))}while(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))}return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,
function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=Fa(a.slice(1,a.length-1));a=a.replace("#index",d);var q=null;try{var h=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);h&&0<h.length&&(q=Fa(h[2]),a=Fa(h[1]))}catch(k){}h=null;if("color"===a)return"waterfall"===c.type?e.color?e.color:0<e.y?c.risingColor:c.fallingColor:"error"===c.type?c.color?c.color:c._colorSet[q%c._colorSet.length]:e.color?e.color:c.color?c.color:c._colorSet[b%c._colorSet.length];if(e.hasOwnProperty(a))h=
e;else if(c.hasOwnProperty(a))h=c;else return"";h=h[a];null!==q&&(h=h[q]);return"x"===a?(c.axisX&&"dateTime"===c.axisX.valueType||"dateTime"===c.xValueType||e.x&&e.x.getTime)&&!c.axisX.logarithmic?Ba(h,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString=f.axisX&&f.axisX.autoValueFormatString?f.axisX.autoValueFormatString:"DD MMM YY",f._cultureInfo):ea(h,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString=
"#,##0.########",f._cultureInfo):"y"===a?ea(h,e.yValueFormatString?e.yValueFormatString:c.yValueFormatString?c.yValueFormatString:c.yValueFormatString="#,##0.########",f._cultureInfo):"z"===a?ea(h,e.zValueFormatString?e.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",f._cultureInfo):h})};oa(F,U);F.prototype.setLayout=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,e=a.layoutManager.getFreeSpace(),c=null,b=0,d=0,f=0,q=0,g=this.markerMargin=
this.chart.options.legend&&!l(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:0.3*this.fontSize;this.height=0;var t=[],k=[];if("top"===this.verticalAlign||"bottom"===this.verticalAlign)this.orientation="horizontal",c=this.verticalAlign,f=this.maxWidth=null!==this.maxWidth?this.maxWidth:e.width,q=this.maxHeight=null!==this.maxHeight?this.maxHeight:0.5*e.height;else if("center"===this.verticalAlign){this.orientation="vertical";if("left"===this.horizontalAlign||"center"===
this.horizontalAlign||"right"===this.horizontalAlign)c=this.horizontalAlign;f=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*e.width;q=this.maxHeight=null!==this.maxHeight?this.maxHeight:e.height}this.errorMarkerColor=[];for(var m=0;m<this.dataSeries.length;m++){var n=this.dataSeries[m];if(n.dataPoints&&n.dataPoints.length){if("pie"!==n.type&&"doughnut"!==n.type&&"funnel"!==n.type&&"pyramid"!==n.type){var p=n.legendMarkerType=n.legendMarkerType?n.legendMarkerType:"line"!==n.type&&"stepLine"!==
n.type&&"spline"!==n.type&&"scatter"!==n.type&&"bubble"!==n.type||!n.markerType?"error"===n.type&&n._linkedSeries?n._linkedSeries.legendMarkerType?n._linkedSeries.legendMarkerType:Q.getDefaultLegendMarker(n._linkedSeries.type):Q.getDefaultLegendMarker(n.type):n.markerType,h=n.legendText?n.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:n,dataPoint:null}):n.name,y=n.legendMarkerColor=n.legendMarkerColor?n.legendMarkerColor:n.markerColor?n.markerColor:
"error"===n.type?l(n.whiskerColor)?n._colorSet[0]:n.whiskerColor:n._colorSet[0],r=n.markerSize||"line"!==n.type&&"stepLine"!==n.type&&"spline"!==n.type?0.75*this.lineHeight:0,u=n.legendMarkerBorderColor?n.legendMarkerBorderColor:n.markerBorderColor,s=n.legendMarkerBorderThickness?n.legendMarkerBorderThickness:n.markerBorderThickness?Math.max(1,Math.round(0.2*r)):0;"error"===n.type&&this.errorMarkerColor.push(y);h=n.legendText=this.chart.replaceKeywordsWithValue(h,n.dataPoints[0],n,m);p={markerType:p,
markerColor:y,text:h,textBlock:null,chartType:n.type,markerSize:r,lineColor:n._colorSet[0],dataSeriesIndex:n.index,dataPointIndex:null,markerBorderColor:u,markerBorderThickness:s};t.push(p)}else for(var x=0;x<n.dataPoints.length;x++){var v=n.dataPoints[x],p=v.legendMarkerType?v.legendMarkerType:n.legendMarkerType?n.legendMarkerType:Q.getDefaultLegendMarker(n.type),h=v.legendText?v.legendText:v.name?v.name:n.legendText?n.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,
dataSeries:n,dataPoint:v}):v.name?v.name:"DataPoint: "+(x+1),y=v.legendMarkerColor?v.legendMarkerColor:n.legendMarkerColor?n.legendMarkerColor:v.color?v.color:n.color?n.color:n._colorSet[x%n._colorSet.length],r=0.75*this.lineHeight,u=v.legendMarkerBorderColor?v.legendMarkerBorderColor:n.legendMarkerBorderColor?n.legendMarkerBorderColor:v.markerBorderColor?v.markerBorderColor:n.markerBorderColor,s=v.legendMarkerBorderThickness?v.legendMarkerBorderThickness:n.legendMarkerBorderThickness?n.legendMarkerBorderThickness:
v.markerBorderThickness||n.markerBorderThickness?Math.max(1,Math.round(0.2*r)):0,h=this.chart.replaceKeywordsWithValue(h,v,n,x),p={markerType:p,markerColor:y,text:h,textBlock:null,chartType:n.type,markerSize:r,dataSeriesIndex:m,dataPointIndex:x,markerBorderColor:u,markerBorderThickness:s};(v.showInLegend||n.showInLegend&&!1!==v.showInLegend)&&t.push(p)}l(n.legendText)&&(n.legendText=n.name)}}!0===this.reversed&&t.reverse();if(0<t.length){n=null;h=v=x=0;v=null!==this.itemWidth?null!==this.itemMaxWidth?
Math.min(this.itemWidth,this.itemMaxWidth,f):this.itemMaxWidth=Math.min(this.itemWidth,f):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,f):this.itemMaxWidth=f;r=0===r?0.75*this.lineHeight:r;v=(this.itemMaxWidth?this.itemMaxWidth:v)-(r+g);for(m=0;m<t.length;m++){p=t[m];y=v;if("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType)y-=2*0.1*this.lineHeight;if(!(0>=q||"undefined"===typeof q||0>=y||"undefined"===typeof y))if("horizontal"===this.orientation){p.textBlock=new ja(this.ctx,
{x:0,y:0,maxWidth:y,maxHeight:this.itemWrap?q:this.lineHeight,angle:0,text:p.text,textAlign:this.itemTextAlign,fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});p.textBlock.measureText();null!==this.itemWidth&&(p.textBlock.width=this.itemWidth-(r+g+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?2*0.1*this.lineHeight:0)));if(!n||n.width+Math.round(p.textBlock.width+r+g+(0===
n.width?0:this.horizontalSpacing)+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?2*0.1*this.lineHeight:0))>f)n={items:[],width:0},k.push(n),this.height+=h,h=0;h=Math.max(h,p.textBlock.height?p.textBlock.height:this.lineHeight);p.textBlock.x=n.width;p.textBlock.y=0;n.width+=Math.round(p.textBlock.width+r+g+(0===n.width?0:this.horizontalSpacing)+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?2*0.1*this.lineHeight:0));n.items.push(p);this.width=Math.max(n.width,
this.width)}else p.textBlock=new ja(this.ctx,{x:0,y:0,maxWidth:v,maxHeight:!0===this.itemWrap?q:1.5*this.fontSize,angle:0,text:p.text,textAlign:this.itemTextAlign,fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),p.textBlock.measureText(),null!==this.itemWidth&&(p.textBlock.width=this.itemWidth-(r+g+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?2*0.1*this.lineHeight:0))),
this.height<q-this.lineHeight?(n={items:[],width:0},k.push(n)):(n=k[x],x=(x+1)%k.length),n&&(this.height+=p.textBlock.height?p.textBlock.height:this.lineHeight,p.textBlock.x=n.width,p.textBlock.y=0,n.width+=Math.round(p.textBlock.width+r+g+(0===n.width?0:this.horizontalSpacing)+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?2*0.1*this.lineHeight:0)),n.items.push(p),this.width=Math.max(n.width,this.width))}this.height=!1===this.itemWrap?k.length*this.lineHeight:this.height+
h;this.height=Math.min(q,this.height);this.width=Math.min(f,this.width)}"top"===this.verticalAlign?(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,b=e.y1):"center"===this.verticalAlign?(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,b=e.y1+e.height/2-this.height/2):"bottom"===this.verticalAlign&&(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-
this.width:e.x1+e.width/2-this.width/2,b=e.y2-this.height);this.items=t;for(m=0;m<this.items.length;m++)p=t[m],p.id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[p.id]={id:p.id,objectType:"legendItem",legendItemIndex:m,dataSeriesIndex:p.dataSeriesIndex,dataPointIndex:p.dataPointIndex};this.markerSize=r;this.rows=k;0<t.length&&a.layoutManager.registerSpace(c,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:d,y1:b,x2:d+this.width,y2:b+this.height}};F.prototype.render=
function(){var a=this.bounds.x1,e=this.bounds.y1,c=this.markerMargin,b=this.maxWidth,d=this.maxHeight,f=this.markerSize,q=this.rows;(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(a,e,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var g=0,l=0;l<q.length;l++){for(var k=q[l],m=0,n=0;n<k.items.length;n++){var p=k.items[n],h=p.textBlock.x+a+(0===n?0.2*f:this.horizontalSpacing),t=e+g,r=h;this.chart.data[p.dataSeriesIndex].visible||
(this.ctx.globalAlpha=0.5);this.ctx.save();this.ctx.beginPath();this.ctx.rect(a,e,b,Math.max(d-d%this.lineHeight,0));this.ctx.clip();if("line"===p.chartType||"stepLine"===p.chartType||"spline"===p.chartType)this.ctx.strokeStyle=p.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(h-0.1*this.lineHeight,t+this.lineHeight/2),this.ctx.lineTo(h+0.85*this.lineHeight,t+this.lineHeight/2),this.ctx.stroke(),r-=0.1*this.lineHeight;if("error"===p.chartType){this.ctx.strokeStyle=
this.errorMarkerColor[0];this.ctx.lineWidth=f/8;this.ctx.beginPath();var u=h-0.08*this.lineHeight+0.1*this.lineHeight,s=t+0.15*this.lineHeight,x=0.7*this.lineHeight,v=x+0.02*this.lineHeight;this.ctx.moveTo(u,s);this.ctx.lineTo(u+x,s);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(u+x/2,s);this.ctx.lineTo(u+x/2,s+v);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(u,s+v);this.ctx.lineTo(u+x,s+v);this.ctx.stroke();this.errorMarkerColor.shift()}X.drawMarker(h+f/2,t+this.lineHeight/2,this.ctx,
p.markerType,"error"===p.chartType||"line"===p.chartType||"spline"===p.chartType?p.markerSize/2:p.markerSize,p.markerColor,p.markerBorderColor,p.markerBorderThickness);p.textBlock.x=h+c+f;if("line"===p.chartType||"stepLine"===p.chartType||"spline"===p.chartType)p.textBlock.x+=0.1*this.lineHeight;p.textBlock.y=Math.round(t+this.lineHeight/2);p.textBlock.render(!0);this.ctx.restore();m=0<n?Math.max(m,p.textBlock.height?p.textBlock.height:this.lineHeight):p.textBlock.height?p.textBlock.height:this.lineHeight;
this.chart.data[p.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);h=T(p.id);this.ghostCtx.fillStyle=h;this.ghostCtx.beginPath();this.ghostCtx.fillRect(r,p.textBlock.y-this.lineHeight/2,p.textBlock.x+p.textBlock.width-r,p.textBlock.height?p.textBlock.height:this.lineHeight);p.x1=this.chart._eventManager.objectMap[p.id].x1=r;p.y1=this.chart._eventManager.objectMap[p.id].y1=p.textBlock.y-this.lineHeight/2;p.x2=this.chart._eventManager.objectMap[p.id].x2=p.textBlock.x+p.textBlock.width;p.y2=this.chart._eventManager.objectMap[p.id].y2=
p.textBlock.y+(p.textBlock.height?p.textBlock.height:this.lineHeight)-this.lineHeight/2}g+=m}};oa(Q,U);Q.prototype.getDefaultAxisPlacement=function(){var a=this.type;if("column"===a||"line"===a||"stepLine"===a||"spline"===a||"area"===a||"stepArea"===a||"splineArea"===a||"stackedColumn"===a||"stackedLine"===a||"bubble"===a||"scatter"===a||"stackedArea"===a||"stackedColumn100"===a||"stackedLine100"===a||"stackedArea100"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeArea"===a||"rangeSplineArea"===
a||"boxAndWhisker"===a||"waterfall"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===a)return"xySwapped";if("pie"===a||"doughnut"===a||"funnel"===a||"pyramid"===a)return"none";"error"!==a&&window.console.log("Unknown Chart Type: "+a);return null};Q.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||
"stepArea"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===a||"waterfall"===a)return"square";if("line"===a||"stepLine"===a||"spline"===a||"pie"===a||"doughnut"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===a||"stackedArea100"===a||"funnel"===a||"pyramid"===a)return"triangle";if("error"===a)return"none";window.console.log("Unknown Chart Type: "+a);return null};Q.prototype.getDataPointAtX=function(a,
e,c){if(!this.dataPoints||0===this.dataPoints.length)return null;var b={dataPoint:null,distance:Infinity,index:NaN},d=null,f=0,q=0,g=1,t=Infinity,k=0,m=0,n=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?(n=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),n=1<n?Math.min(Math.max((this.dataPoints.length-1)/n*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(n=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0<n?Math.min(Math.max((this.dataPoints.length-
1)/n*(a-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0));for(;;){q=0<g?n+f:n-f;if(0<=q&&q<this.dataPoints.length){var d=this.dataPoints[q],p=this.axisX&&this.axisX.logarithmic?d.x>a?d.x/a:a/d.x:Math.abs(d.x-a);p<b.distance&&(l(c)||c&&!l(d.y))&&(b.dataPoint=d,b.distance=p,b.index=q);d=p;d<=t?t=d:0<g?k++:m++;if(1E3<k&&1E3<m)break}else if(0>n-f&&n+f>=this.dataPoints.length)break;-1===g?(f++,g=1):g=-1}return e||(b.dataPoint.x.getTime?b.dataPoint.x.getTime():b.dataPoint.x)!==(a.getTime?a.getTime():
a)?e&&null!==b.dataPoint?b:null:b};Q.prototype.getDataPointAtXY=function(a,e,c){if(!this.dataPoints||0===this.dataPoints.length||a<this.chart.plotArea.x1||a>this.chart.plotArea.x2||e<this.chart.plotArea.y1||e>this.chart.plotArea.y2)return null;c=c||!1;var b=[],d=0,f=0,q=1,g=!1,t=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:e}),this.axisX.logarithmic)var p=Math.log(this.dataPoints[this.dataPoints.length-
1].x/this.dataPoints[0].x),n=1<p?Math.min(Math.max((this.dataPoints.length-1)/p*Math.log(n/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;else p=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0<p?Math.min(Math.max((this.dataPoints.length-1)/p*(n-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;for(;;){f=0<q?n+d:n-d;if(0<=f&&f<this.dataPoints.length){var p=this.chart._eventManager.objectMap[this.dataPointIds[f]],h=this.dataPoints[f],r=null;if(p){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":case "waterfall":case "error":a>=
p.x1&&(a<=p.x2&&e>=p.y1&&e<=p.y2)&&(b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(p.x1-a),Math.abs(p.x2-a),Math.abs(p.y1-e),Math.abs(p.y2-e))}),g=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var u=W("markerSize",h,this)||4,z=c?20:u,r=Math.sqrt(Math.pow(p.x1-a,2)+Math.pow(p.y1-e,2));r<=z&&b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:r});p=Math.abs(p.x1-
a);p<=t?t=p:0<q?k++:m++;r<=u/2&&(g=!0);break;case "rangeArea":case "rangeSplineArea":u=W("markerSize",h,this)||4;z=c?20:u;r=Math.min(Math.sqrt(Math.pow(p.x1-a,2)+Math.pow(p.y1-e,2)),Math.sqrt(Math.pow(p.x1-a,2)+Math.pow(p.y2-e,2)));r<=z&&b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:r});p=Math.abs(p.x1-a);p<=t?t=p:0<q?k++:m++;r<=u/2&&(g=!0);break;case "bubble":u=p.size;r=Math.sqrt(Math.pow(p.x1-a,2)+Math.pow(p.y1-e,2));r<=u/2&&(b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,
distance:r}),g=!0);break;case "pie":case "doughnut":u=p.center;z="doughnut"===this.type?p.percentInnerRadius*p.radius:0;r=Math.sqrt(Math.pow(u.x-a,2)+Math.pow(u.y-e,2));r<p.radius&&r>z&&(r=Math.atan2(e-u.y,a-u.x),0>r&&(r+=2*Math.PI),r=Number(((180*(r/Math.PI)%360+360)%360).toFixed(12)),u=Number(((180*(p.startAngle/Math.PI)%360+360)%360).toFixed(12)),z=Number(((180*(p.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===z&&1<p.endAngle&&(z=360),u>=z&&(0!==h.y&&!l(h.y))&&(z+=360,r<u&&(r+=360)),r>u&&r<z&&
(b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:0}),g=!0));break;case "funnel":case "pyramid":r=p.funnelSection;e>r.y1&&e<r.y4&&(r.y6?e>r.y6?(f=r.x6+(r.x5-r.x6)/(r.y5-r.y6)*(e-r.y6),r=r.x3+(r.x4-r.x3)/(r.y4-r.y3)*(e-r.y3)):(f=r.x1+(r.x6-r.x1)/(r.y6-r.y1)*(e-r.y1),r=r.x2+(r.x3-r.x2)/(r.y3-r.y2)*(e-r.y2)):(f=r.x1+(r.x4-r.x1)/(r.y4-r.y1)*(e-r.y1),r=r.x2+(r.x3-r.x2)/(r.y3-r.y2)*(e-r.y2)),a>f&&a<r&&(b.push({dataPoint:h,dataPointIndex:p.dataPointIndex,dataSeries:this,distance:0}),g=!0));
break;case "boxAndWhisker":if(a>=p.x1-p.borderThickness/2&&a<=p.x2+p.borderThickness/2&&e>=p.y4-p.borderThickness/2&&e<=p.y1+p.borderThickness/2||Math.abs(p.x2-a+p.x1-a)<p.borderThickness&&e>=p.y1&&e<=p.y4)b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(p.x1-a),Math.abs(p.x2-a),Math.abs(p.y2-e),Math.abs(p.y3-e))}),g=!0;break;case "candlestick":if(a>=p.x1-p.borderThickness/2&&a<=p.x2+p.borderThickness/2&&e>=p.y2-p.borderThickness/2&&e<=p.y3+p.borderThickness/2||Math.abs(p.x2-
a+p.x1-a)<p.borderThickness&&e>=p.y1&&e<=p.y4)b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(p.x1-a),Math.abs(p.x2-a),Math.abs(p.y2-e),Math.abs(p.y3-e))}),g=!0;break;case "ohlc":if(Math.abs(p.x2-a+p.x1-a)<p.borderThickness&&e>=p.y2&&e<=p.y3||a>=p.x1&&a<=(p.x2+p.x1)/2&&e>=p.y1-p.borderThickness/2&&e<=p.y1+p.borderThickness/2||a>=(p.x1+p.x2)/2&&a<=p.x2&&e>=p.y4-p.borderThickness/2&&e<=p.y4+p.borderThickness/2)b.push({dataPoint:h,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(p.x1-
a),Math.abs(p.x2-a),Math.abs(p.y2-e),Math.abs(p.y3-e))}),g=!0}if(g||1E3<k&&1E3<m)break}}else if(0>n-d&&n+d>=this.dataPoints.length)break;-1===q?(d++,q=1):q=-1}a=null;for(e=0;e<b.length;e++)a?b[e].distance<=a.distance&&(a=b[e]):a=b[e];return a};Q.prototype.getMarkerProperties=function(a,e,c,b){var d=this.dataPoints,f=d[a].markerColor?d[a].markerColor:this.markerColor?this.markerColor:d[a].color?d[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],q=d[a].markerBorderColor?d[a].markerBorderColor:
this.markerBorderColor?this.markerBorderColor:null,g=l(d[a].markerBorderThickness)?this.markerBorderThickness?this.markerBorderThickness:null:d[a].markerBorderThickness,r=d[a].markerType?d[a].markerType:this.markerType;a=l(d[a].markerSize)?this.markerSize:d[a].markerSize;return{x:e,y:c,ctx:b,type:r,size:a,color:f,borderColor:q,borderThickness:g}};oa(B,U);B.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var e=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/
Math.log(e/this.viewportMinimum)<this.noTicks-1){for(var c=B.getNiceNumber((e-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),b=Math.ceil(this.viewportMinimum/c)*c;b<e;b+=c)b<this.viewportMinimum||this.logLabelValues.push(b);this.logLabelValues.sort(Qa);this.createExtraLabelsForLog(a)}}};B.prototype.createLabels=function(){var a,e,c=0,b=0,d,f=0,q=0,b=0,b=this.interval,g=0,t,k=0.6*this.chart.height,m;a=!1;var n=this.scaleBreaks?this.scaleBreaks._appliedBreaks:
[],p=n.length?l(this.scaleBreaks.firstBreakIndex)?0:this.scaleBreaks.firstBreakIndex:0;if("axisX"!==this.type||"dateTime"!==this.valueType||this.logarithmic){d=this.viewportMaximum;if(this.labels){a=Math.ceil(b);for(var b=Math.ceil(this.intervalStartPosition),h=!1,c=b;c<this.viewportMaximum;c+=a)if(this.labels[c])h=!0;else{h=!1;break}h&&(this.interval=a,this.intervalStartPosition=b)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog()),
b=0,h=p;b<this.logLabelValues.length;b++)if(c=this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;h<n.length&&c>n[h].endValue;h++);a=h<n.length&&c>=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 ja(this.ctx,{x:0,y:0,maxWidth:f,maxHeight:q,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:this.labelBorderThickness,padding:this.labelPadding}),this._labels.push({position:m,textBlock:a,effectiveHeight:null}))}h=p;for(c=this.intervalStartPosition;c<=
d;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(;h<n.length&&c>n[h].endValue;h++);a=h<n.length&&c>=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 ja(this.ctx,{x:0,y:0,maxWidth:f,maxHeight:q,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",padding:this.labelPadding}),this._labels.push({position:m,textBlock:a,effectiveHeight:null}))}}else for(this.intervalStartPosition=this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),d=Wa(new Date(this.viewportMaximum),this.interval,this.intervalType),h=p,c=this.intervalStartPosition;c<d;Wa(c,b,this.intervalType)){for(a=c.getTime();h<n.length&&a>n[h].endValue;h++);m=a;a=h<n.length&&a>=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]:Ba(m,this.valueFormatString,this.chart._cultureInfo),a=new ja(this.ctx,{x:0,y:0,maxWidth:f,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:q,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",padding:this.labelPadding}),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))*V[this.intervalType+"Duration"]*this.interval,f="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(q="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>
0:1.5*this.labelFontSize+("object"===typeof this.labelPadding?(this.labelPadding.top||0)+(this.labelPadding.bottom||0):2*this.labelPadding));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))*V[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(f="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),q="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize;for(b=0;b<this._labels.length;b++){a=this._labels[b].textBlock;a.maxWidth=f;a.maxHeight=q;var u=a.measureText();
t=u.height}d=[];p=n=0;if(this.labelAutoFit||this.options.labelAutoFit)if(l(this.labelAngle)||(this.labelAngle=(this.labelAngle%360+360)%360,90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||"top"===this._position)if(f=Math.floor(0.9*g),p=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=f;this.sessionVariables.labelMaxHeight=
q;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;for(var A,h=a.text.split(" "),b=0;b<h.length;b++)m=h[b],this.ctx.font=a.fontStyle+" "+a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,m=this.ctx.measureText(m),m.width>p&&(A=c,p=m.width)}c=0;for(c=this.intervalStartPosition<this.viewportMinimum?1:0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=
this._labels[c].textBlock;u=a.measureText();for(h=c+1;h<this._labels.length;h++)if(!this._labels[h].breaksLabelType){e=this._labels[h].textBlock;e=e.measureText();break}d.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,d);Math.cos(Math.PI/180*Math.abs(this.labelAngle));Math.sin(Math.PI/180*Math.abs(this.labelAngle));b=f*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(q-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));if(l(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&
0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?q:Math.min((b-f*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),b),m=(k-(t+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/180*Math.abs(-25)),!l(this.options.labelWrap))this.labelWrap?l(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=Math.min(Math.max(f,p),m),this.sessionVariables.labelWrap=this.labelWrap,e&&u.width+e.width>>
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):l(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=q,this.sessionVariables.labelMaxWidth=f,e&&u.width+e.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=q,this.sessionVariables.labelWrap=this.labelWrap);else{if(l(this.options.labelWrap))if(!l(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=q);else if(!l(e))if(b=u.width+e.width>>0,h=this.labelFontSize,p<f)b-2*f>n&&(n=b-2*f,b>=2*f&&b<2.2*f?(this.sessionVariables.labelMaxWidth=f,l(this.options.labelFontSize)&&12<h&&(h=Math.floor(12/13*h),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?h:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):b>=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,p),this.sessionVariables.labelWrap=!0,l(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?h:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):b>=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?(l(this.options.labelFontSize)&&12<h&&(h=Math.floor(12/13*h),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?h:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=m):b>5*f&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=
f,this.sessionVariables.labelFontSize=h,this.sessionVariables.labelMaxHeight=q,this.sessionVariables.labelAngle=this.labelAngle));else if(A===c&&(0===A&&p+this._labels[A+1].textBlock.measureText().width-2*f>n||A===this._labels.length-1&&p+this._labels[A-1].textBlock.measureText().width-2*f>n||0<A&&A<this._labels.length-1&&p+this._labels[A+1].textBlock.measureText().width-2*f>n&&p+this._labels[A-1].textBlock.measureText().width-2*f>n))n=0===A?p+this._labels[A+1].textBlock.measureText().width-2*f:p+
this._labels[A-1].textBlock.measureText().width-2*f,this.sessionVariables.labelFontSize=l(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=l(this.options.labelFontSize)?h:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.sessionVariables.labelMaxWidth=
Math.min(Math.max(f,p),m),u=a.measureText(),b<this._labels.length-1&&(h=b+1,e=this._labels[h].textBlock,e.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(f,p),m),e=e.measureText(),u.width+e.width>>0>2*f&&(this.sessionVariables.labelAngle=-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?q: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-(t+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,l(this.options.labelWrap))?l(this.options.labelWrap)&&(this.labelWrap&&!l(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?
this.options.labelMaxWidth:m,this.sessionVariables.labelMaxHeight=q):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=m,this.sessionVariables.labelMaxHeight=Math.max(b,0.9*g),this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:m):(l(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?
this.options.labelMaxWidth:m,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=q)}this.sessionVariables.labelMaxHeight=Math.max(this.sessionVariables.labelMaxHeight,1.5*this.labelFontSize);for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,
a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=l(this.options.labelMaxWidth)?l(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=f:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=l(this.options.labelFontSize)?l(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:
this.options.labelFontSize,a.angle=this.labelAngle=l(this.options.labelAngle)?l(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=l(this.options.labelWrap)?l(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=l(this.sessionVariables.labelMaxHeight)?this.sessionVariables.labelMaxHeight=q:this.sessionVariables.labelMaxHeight,
a.measureText();else if("left"===this._position||"right"===this._position)if(f=l(this.options.labelMaxWidth)?0.3*this.chart.width>>0:this.options.labelMaxWidth,q="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=q;this.sessionVariables.labelAngle=l(this.sessionVariables.labelAngle)?
0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;u=a.measureText();for(h=c+1;h<this._labels.length;h++)if(!this._labels[h].breaksLabelType){e=this._labels[h].textBlock;e=e.measureText();break}d.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,d);b=f*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(q-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));
Math.cos(Math.PI/180*Math.abs(this.labelAngle));Math.sin(Math.PI/180*Math.abs(this.labelAngle));l(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle?l(this.options.labelWrap)?l(this.options.labelWrap)&&(l(this.options.labelMaxWidth)?l(e)||(g=u.height+e.height>>0,g-2*q>p&&(p=g-2*q,g>=2*q&&g<2.4*q?(l(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelMaxHeight=q,this.sessionVariables.labelFontSize=
l(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize):g>=2.4*q&&g<2.8*q?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):g>=2.8*q&&g<3.2*q?(this.sessionVariables.labelMaxHeight=q,this.sessionVariables.labelWrap=!0,l(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?
this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=l(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):g>=3.2*q&&g<3.6*q?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=this.labelFontSize):g>3.6*q&&g<10*q?(l(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?
this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxWidth=f,this.sessionVariables.labelMaxHeight=q,this.sessionVariables.labelAngle=l(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):g>10*q&&g<50*q&&(l(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxHeight=
q,this.sessionVariables.labelMaxWidth=f,this.sessionVariables.labelAngle=l(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle))):(this.sessionVariables.labelMaxHeight=q,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth)):(this.sessionVariables.labelMaxWidth=this.labelWrap?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:this.labelMaxWidth?this.options.labelMaxWidth?
this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:f,this.sessionVariables.labelMaxHeight=q):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=0===this.labelAngle?f:Math.min((b-q*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)),q),l(this.options.labelWrap))?l(this.options.labelWrap)&&(this.labelWrap&&!l(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:
this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=b):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:f,this.sessionVariables.labelMaxHeight=0===this.labelAngle?q:b,l(this.options.labelMaxWidth)&&(this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?q:b,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=
f):(this.sessionVariables.labelMaxHeight=q,l(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap)}for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=
this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(l(this.chart.stockChart)||this.chart.isNavigator||(this.sessionVariables.labelMaxHeight=q),c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=l(this.options.labelMaxWidth)?l(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=f:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=l(this.options.labelFontSize)?
l(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:this.options.labelFontSize,a.angle=this.labelAngle=l(this.options.labelAngle)?l(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=l(this.options.labelWrap)?l(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:
this.options.labelWrap,a.maxHeight=l(this.sessionVariables.labelMaxHeight)?this.sessionVariables.labelMaxHeight=q:this.sessionVariables.labelMaxHeight,a.measureText();for(c=0;c<this.stripLines.length;c++){var f=this.stripLines[c],z;f.labelFontSize="outside"===f.labelPlacement&&l(f.options.labelFontSize)?this.labelFontSize:f.labelFontSize;f.labelFontFamily="outside"===f.labelPlacement&&l(f.options.labelFontFamily)?this.labelFontFamily:f.labelFontFamily;f.labelFontWeight="outside"===f.labelPlacement&&
l(f.options.labelFontWeight)?this.labelFontWeight:f.labelFontWeight;f.labelFontStyle="outside"===f.labelPlacement&&l(f.options.labelFontStyle)?this.labelFontStyle:f.labelFontStyle;if("outside"===f.labelPlacement){q=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)l(f.options.labelWrap)&&!l(this.sessionVariables.stripLineLabelMaxHeight)?z=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=z=f.labelWrap?0.8*this.chart.height>>
0:1.5*f.labelFontSize+("object"===typeof f.labelPadding?(f.labelPadding.top||0)+(f.labelPadding.bottom||0):2*f.labelPadding);if("left"===this._position||"right"===this._position)l(f.options.labelWrap)&&!l(this.sessionVariables.stripLineLabelMaxHeight)?z=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=z=f.labelWrap?0.8*this.chart.width>>0:1.5*f.labelFontSize+("object"===typeof f.labelPadding?(f.labelPadding.top||0)+(f.labelPadding.bottom||0):2*f.labelPadding);
l(f.labelBackgroundColor)&&(f.labelBackgroundColor="#EEEEEE")}else q="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,z=l(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*f.labelFontSize+("object"===typeof f.labelPadding?(f.labelPadding.top||0)+(f.labelPadding.bottom||0):2*f.labelPadding),l(f.labelBackgroundColor)&&(l(f.startValue)&&0!==f.startValue?f.labelBackgroundColor=
r?"transparent":null:f.labelBackgroundColor="#EEEEEE");a=new ja(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:q,maxHeight:z,angle:this.labelAngle,text:f.labelFormatter?f.labelFormatter({chart:this.chart,axis:this,stripLine:f}):f.label,textAlign:f.labelTextAlign,fontSize:f.labelFontSize,fontFamily:f.labelFontFamily,fontWeight:f.labelFontWeight,
fontColor:f.labelFontColor||f.color,fontStyle:f.labelFontStyle,textBaseline:"middle",padding:f.labelPadding});this._stripLineLabels.push({position:f.value,textBlock:a,effectiveHeight:null,stripLine:f})}};B.prototype.createLabelsAndCalculateWidth=function(){var a=0,e=0;this._labels=[];this._stripLineLabels=[];var c=this.chart.isNavigator?0:5;this.labelEffectiveWidth=l(this.labelEffectiveWidth)?0:this.labelEffectiveWidth;if("left"===this._position||"right"===this._position){this.createLabels();for(e=
0;e<this._labels.length;e++){var b=this._labels[e].textBlock,b=b.measureText(),d=0,d=0===this.labelAngle?b.width:b.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+b.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<=d&&(this.labelEffectiveWidth=a=d);this._labels[e].effectiveWidth=d}for(e=0;e<this._stripLineLabels.length;e++)"outside"===this._stripLineLabels[e].stripLine.labelPlacement&&(this._stripLineLabels[e].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[e].stripLine.value<=
this.viewportMaximum)&&(b=this._stripLineLabels[e].textBlock,b=b.measureText(),d=0===this.labelAngle?b.width:b.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+b.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),"inside"===this.tickPlacement&&(d+=this.tickLength),"inside"===this.labelPlacement&&(a+=d+c),a<=d&&(a=d),this.stripLineLabelEffectiveWidth=this._stripLineLabels[e].effectiveWidth=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+this.tickLength+c};B.prototype.createLabelsAndCalculateHeight=
function(){var a=0;this._labels=[];this._stripLineLabels=[];var e,c=0,b=this.chart.isNavigator?0:5;this.labelEffectiveHeight=l(this.labelEffectiveHeight)?0:this.labelEffectiveHeight;if("bottom"===this._position||"top"===this._position){this.createLabels();for(c=0;c<this._labels.length;c++){e=this._labels[c].textBlock;e=e.measureText();var d=0,d=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+e.height*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<=d&&(this.labelEffectiveHeight=
a=d);this._labels[c].effectiveHeight=d}for(c=0;c<this._stripLineLabels.length;c++)"outside"===this._stripLineLabels[c].stripLine.labelPlacement&&(this._stripLineLabels[c].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[c].stripLine.value<=this.viewportMaximum)&&(e=this._stripLineLabels[c].textBlock,e=e.measureText(),d=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+e.height*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),"inside"===this.tickPlacement&&
(d+=this.tickLength),"inside"===this.labelPlacement&&(a+=d+b),a<=d&&(a=d),this.stripLineLabelEffectiveHeight=this._stripLineLabels[c].effectiveHeight=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+this.tickLength+b};B.setLayout=function(a,e,c,b,d,f){var q,g,r,k,m=a[0]?a[0].chart:e[0].chart,n=m.isNavigator?0:10,p=m._axes;if(a&&0<a.length)for(var h=0;h<a.length;h++)a[h]&&a[h].calculateAxisParameters();if(e&&0<e.length)for(h=0;h<e.length;h++)e[h].calculateAxisParameters();if(c&&
0<c.length)for(h=0;h<c.length;h++)c[h].calculateAxisParameters();if(b&&0<b.length)for(h=0;h<b.length;h++)b[h].calculateAxisParameters();for(h=0;h<p.length;h++)if(p[h]&&p[h].scaleBreaks&&p[h].scaleBreaks._appliedBreaks.length)for(var t=p[h].scaleBreaks._appliedBreaks,u=0;u<t.length&&!(t[u].startValue>p[h].viewportMaximum);u++)t[u].endValue<p[h].viewportMinimum||(l(p[h].scaleBreaks.firstBreakIndex)&&(p[h].scaleBreaks.firstBreakIndex=u),t[u].startValue>=p[h].viewPortMinimum&&(p[h].scaleBreaks.lastBreakIndex=
u));for(var z=u=0,s=0,x=0,v=0,B=0,C=0,E,F,K=g=0,L,N,O,t=L=N=O=!1,h=0;h<p.length;h++)p[h]&&p[h].title&&(p[h]._titleTextBlock=new ja(p[h].ctx,{text:p[h].title,fontSize:p[h].titleFontSize,fontFamily:p[h].titleFontFamily,fontWeight:p[h].titleFontWeight,fontColor:p[h].titleFontColor,fontStyle:p[h].titleFontStyle,borderColor:p[h].titleBorderColor,borderThickness:p[h].titleBorderThickness,backgroundColor:p[h].titleBackgroundColor,cornerRadius:p[h].titleCornerRadius,textBaseline:"middle",textAlign:p[h].titleTextAlign,
padding:p[h].titlePadding}));for(h=0;h<p.length;h++)if(p[h].title){var M=1.5*p[h].titleFontSize+("object"===typeof p[h].titlePadding?(p[h].titlePadding.top||0)+(p[h].titlePadding.bottom||0):2*p[h].titlePadding);p[h]._titleTextBlock.maxWidth=p[h].titleMaxWidth||f.height;p[h]._titleTextBlock.maxHeight=p[h].titleWrap?0.8*f.width:Math.min(M,0.8*f.width);switch(p[h]._position){case "left":p[h]._titleTextBlock.angle=-90;break;case "right":p[h]._titleTextBlock.angle=90;break;default:p[h]._titleTextBlock.maxWidth=
p[h].titleMaxWidth||f.width,p[h]._titleTextBlock.maxHeight=p[h].titleWrap?0.8*f.height:Math.min(M,0.8*f.height),p[h]._titleTextBlock.angle=0}}if("normal"===d){for(var x=[],v=[],B=[],C=[],P=[],Q=[],S=[],G=[];4>u;){var U=0,V=0,T=0,W=0,aa=M=d=0,X=g=0,Y=0,ba=q=0;if(c&&0<c.length)for(B=[],h=q=0;h<c.length;h++)B.push(Math.ceil(c[h]?c[h].createLabelsAndCalculateWidth():0)),q+=B[h],aa+=c[h]&&!m.isNavigator?c[h].margin:0;else B.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));S.push(B);if(b&&0<
b.length)for(C=[],h=ba=0;h<b.length;h++)C.push(Math.ceil(b[h]?b[h].createLabelsAndCalculateWidth():0)),ba+=C[h],g+=b[h]?b[h].margin:0;else C.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));G.push(C);q=Math.round(f.x1+q+aa-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0));r=Math.round(Math.min(f.x2-ba-g+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===
b[0].tickPlacement?b[0].tickLength:0):0),m.width-n));if(a&&0<a.length)for(x=[],h=X=0;h<a.length;h++)a[h]&&(a[h].lineCoordinates={}),a[h].lineCoordinates.width=Math.abs(r-q),a[h].title&&(a[h]._titleTextBlock.maxWidth=0<a[h].titleMaxWidth&&a[h].titleMaxWidth<a[h].lineCoordinates.width?a[h].titleMaxWidth:a[h].lineCoordinates.width),x.push(Math.ceil(a[h]?a[h].createLabelsAndCalculateHeight():0)),X+=x[h],d+=a[h]&&!m.isNavigator?a[h].margin:0;else x.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():
0));P.push(x);if(e&&0<e.length)for(v=[],h=Y=0;h<e.length;h++)e[h]&&(e[h].lineCoordinates={}),e[h].lineCoordinates.width=Math.abs(r-q),e[h].title&&(e[h]._titleTextBlock.maxWidth=0<e[h].titleMaxWidth&&e[h].titleMaxWidth<e[h].lineCoordinates.width?e[h].titleMaxWidth:e[h].lineCoordinates.width),v.push(Math.ceil(e[h]?e[h].createLabelsAndCalculateHeight():0)),Y+=v[h],M+=e[h]&&!m.isNavigator?e[h].margin:0;else v.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));Q.push(v);if(a&&0<a.length)for(h=
0;h<a.length;h++){if(a[h]){a[h].lineCoordinates.x1=q;a[h].lineCoordinates.x2=r;if(a[h]._labels&&1<a[h]._labels.length){var H=g=0;g=a[h]._labels[1];H="dateTime"===a[h].valueType?a[h]._labels[a[h]._labels.length-2]:a[h]._labels[a[h]._labels.length-1];z=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle));s=H.textBlock.width*Math.cos(Math.PI/180*Math.abs(H.textBlock.angle))+H.textBlock.height*
Math.sin(Math.PI/180*Math.abs(H.textBlock.angle))}!a[h]||(!a[h].labelAutoFit||l(E)||l(F)||m.isNavigator||m.stockChart)||(g=0,0<a[h].labelAngle?(k=s-(H.textBlock.height-H.textBlock._lineHeight/2)*Math.sin(Math.PI/180*H.textBlock.angle),F+k>r&&(a[h].convertPixelToValue(F)>=a[h].viewportMinimum&&a[h].convertPixelToValue(F)<=a[h].viewportMaximum)&&(g+=F+k-r-ba)):0>a[h].labelAngle?E-z<q&&E-z<a[h].viewportMinimum&&(K=q-(aa+a[h].tickLength+B+E-z+a[h].labelFontSize/2)):0===a[h].labelAngle&&(F+s>r&&(a[h].convertPixelToValue(F)>=
a[h].viewportMinimum&&a[h].convertPixelToValue(F)<=a[h].viewportMaximum)&&(g=F+s/2-r-ba),E-z<q&&E-z<a[h].viewportMinimum&&(K=q-aa-a[h].tickLength-B-E+z/2)),a[h].viewportMaximum===a[h].maximum&&a[h].viewportMinimum===a[h].minimum&&0<a[h].labelAngle&&0<g?r-=g:a[h].viewportMaximum===a[h].maximum&&a[h].viewportMinimum===a[h].minimum&&0>a[h].labelAngle&&0<K?q+=K:a[h].viewportMaximum===a[h].maximum&&a[h].viewportMinimum===a[h].minimum&&0===a[h].labelAngle&&(0<K&&(q+=K),0<g&&(r-=g)));m.panEnabled?X=l(m.sessionVariables.axisX.height)||
m.stockChart?m.sessionVariables.axisX.height=X:m.sessionVariables.axisX.height:m.sessionVariables.axisX.height=X;g=Math.round(f.y2-X-d+U);k=Math.round(f.y2);a[h].lineCoordinates.width=r-q;a[h].lineCoordinates.y1=g;a[h].lineCoordinates.y2=g;a[h].bounds={x1:q,y1:g,x2:r,y2:k-(X+d-x[h]-U),width:r-q};a[h].bounds.height=a[h].bounds.y2-a[h].bounds.y1;"inside"===a[h].labelPlacement&&(a[h].lineCoordinates.y1=a[0].bounds.y1+U+(a[h].labelEffectiveHeight||0)+(m.isNavigator?0:5),a[h].lineCoordinates.y2=a[h].lineCoordinates.y1+
a[h].lineThickness/2);"inside"===a[h].tickPlacement&&(a[h].lineCoordinates.y1+=a[h].tickLength,a[h].lineCoordinates.y2=a[h].lineCoordinates.y1+a[h].lineThickness/2)}U+=x[h]+a[h].margin}if(e&&0<e.length)for(h=0;h<e.length;h++)e[h].lineCoordinates.x1=q,e[h].lineCoordinates.x2=r,e[h].lineCoordinates.width=Math.abs(r-q),e[h]._labels&&1<e[h]._labels.length&&(g=e[h]._labels[1],H="dateTime"===e[h].valueType?e[h]._labels[e[h]._labels.length-2]:e[h]._labels[e[h]._labels.length-1],z=g.textBlock.width*Math.cos(Math.PI/
180*Math.abs(g.textBlock.angle))+(g.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)),s=H.textBlock.width*Math.cos(Math.PI/180*Math.abs(H.textBlock.angle))+(H.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(H.textBlock.angle))),m.panEnabled?Y=l(m.sessionVariables.axisX2.height)||m.stockChart?m.sessionVariables.axisX2.height=Y:m.sessionVariables.axisX2.height:m.sessionVariables.axisX2.height=Y,g=Math.round(f.y1),k=e[h].lineCoordinates.y1=
g+Y+M-V,e[h].lineCoordinates.y2=g,e[h].bounds={x1:q,y1:g+(Y+M-v[h]-V),x2:r,y2:k,width:r-q},e[h].bounds.height=e[h].bounds.y2-e[h].bounds.y1,"inside"===e[h].labelPlacement&&(e[h].lineCoordinates.y1=e[0].bounds.y2-V-(e[h].labelEffectiveHeight||0)-5),"inside"===e[h].tickPlacement&&(e[h].lineCoordinates.y1-=e[h].tickLength),V+=v[h]+e[h].margin;if(c&&0<c.length)for(h=0;h<c.length;h++)aa=m.isNavigator?0:10,c[h]&&(q=r=Math.round((a[0]?a[0].lineCoordinates.x1:e[0].lineCoordinates.x1)+(c[0]?("inside"===c[0].labelPlacement?
c[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0)),aa=c[h]._labels&&0<c[h]._labels.length?c[h]._labels[c[h]._labels.length-1].textBlock._lineHeight/2:n,g=Math.round(Math.max(f.y1+Y+M-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+5:0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),Math.max(aa,n))),aa=0<a.length?0:c[h]._labels&&0<c[h]._labels.length?c[h]._labels[0].textBlock.height/2:n,k=Math.round(f.y2-X+(a[0]?("inside"===a[0].labelPlacement?
a[0].labelEffectiveHeight+(m.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)-d-aa),c[h].lineCoordinates={x1:q-T,y1:g,x2:r-T,y2:k,height:Math.abs(k-g)},c[h].bounds={x1:q-(B[h]+T),y1:g,x2:r-T,y2:k,height:k-g},c[h].bounds.width=c[h].bounds.x2-c[h].bounds.x1,"inside"===c[h].labelPlacement&&(c[h].lineCoordinates.x1=c[0].bounds.x1+B[0]-T-(c[h].labelEffectiveWidth||0)-5,c[h].lineCoordinates.x2=c[h].lineCoordinates.x1+c[h].lineThickness/2),"inside"===c[h].tickPlacement&&(c[h].lineCoordinates.x1-=
c[h].tickLength,c[h].lineCoordinates.x2=c[h].lineCoordinates.x1+c[h].lineThickness/2),c[h].title&&(c[h]._titleTextBlock.maxWidth=0<c[h].titleMaxWidth&&c[h].titleMaxWidth<c[h].lineCoordinates.height?c[h].titleMaxWidth:c[h].lineCoordinates.height),T+=B[h]+c[h].margin);if(b&&0<b.length)for(h=0;h<b.length;h++)b[h]&&(q=r=Math.round((a[0]?a[0].lineCoordinates.x2:e[0].lineCoordinates.x2)-(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?
b[0].tickLength:0):0)),aa=b[h]._labels&&0<b[h]._labels.length?b[h]._labels[b[h]._labels.length-1].textBlock.height/2:0,g=Math.round(Math.max(f.y1+Y+M-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(m.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),Math.max(aa,n))),aa=0<a.length?0:b[h]._labels&&0<b[h]._labels.length?b[h]._labels[0].textBlock.height/2:0,k=Math.round(f.y2-(X+d+aa)+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(m.isNavigator?
0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)),b[h].lineCoordinates={x1:q+W,y1:g,x2:q+W,y2:k,height:Math.abs(k-g)},b[h].bounds={x1:q+W,y1:g,x2:r+C[h]+W,y2:k,height:k-g},b[h].bounds.width=b[h].bounds.x2-b[h].bounds.x1,"inside"===b[h].labelPlacement&&(b[h].lineCoordinates.x1=b[0].bounds.x1+W+(b[h].labelEffectiveWidth||0)+(m.isNavigator?0:5),b[h].lineCoordinates.x2=b[h].lineCoordinates.x1+b[h].lineThickness/2),"inside"===b[h].tickPlacement&&(b[h].lineCoordinates.x1+=b[h].tickLength,b[h].lineCoordinates.x2=
b[h].lineCoordinates.x1+b[h].lineThickness/2),b[h].title&&(b[h]._titleTextBlock.maxWidth=0<b[h].titleMaxWidth&&b[h].titleMaxWidth<b[h].lineCoordinates.height?b[h].titleMaxWidth:b[h].lineCoordinates.height),W+=C[h]+b[h].margin);if(a&&0<a.length)for(h=0;h<a.length;h++)a[h]&&(a[h].calculateValueToPixelConversionParameters(),a[h].calculateBreaksSizeInValues(),a[h]._labels&&1<a[h]._labels.length&&(E=(a[h].logarithmic?Math.log(a[h]._labels[1].position/a[h].viewportMinimum)/a[h].conversionParameters.lnLogarithmBase:
a[h]._labels[1].position-a[h].viewportMinimum)*Math.abs(a[h].conversionParameters.pixelPerUnit)+a[h].lineCoordinates.x1,q=a[h]._labels[a[h]._labels.length-("dateTime"===a[h].valueType?2:1)].position,q=a[h].getApparentDifference(a[h].viewportMinimum,q),F=a[h].logarithmic?(1<q?Math.log(q)/a[h].conversionParameters.lnLogarithmBase*Math.abs(a[h].conversionParameters.pixelPerUnit):0)+a[h].lineCoordinates.x1:(0<q?q*Math.abs(a[h].conversionParameters.pixelPerUnit):0)+a[h].lineCoordinates.x1));if(e&&0<e.length)for(h=
0;h<e.length;h++)e[h].calculateValueToPixelConversionParameters(),e[h].calculateBreaksSizeInValues(),e[h]._labels&&1<e[h]._labels.length&&(E=(e[h].logarithmic?Math.log(e[h]._labels[1].position/e[h].viewportMinimum)/e[h].conversionParameters.lnLogarithmBase:e[h]._labels[1].position-e[h].viewportMinimum)*Math.abs(e[h].conversionParameters.pixelPerUnit)+e[h].lineCoordinates.x1,q=e[h]._labels[e[h]._labels.length-("dateTime"===e[h].valueType?2:1)].position,q=e[h].getApparentDifference(e[h].viewportMinimum,
q),F=e[h].logarithmic?(1<q?Math.log(q)/e[h].conversionParameters.lnLogarithmBase*Math.abs(e[h].conversionParameters.pixelPerUnit):0)+e[h].lineCoordinates.x1:(0<q?q*Math.abs(e[h].conversionParameters.pixelPerUnit):0)+e[h].lineCoordinates.x1);for(h=0;h<p.length;h++)"axisY"===p[h].type&&(p[h].calculateValueToPixelConversionParameters(),p[h].calculateBreaksSizeInValues());if(0<u){if(a&&0<a.length)for(h=0;h<a.length;h++)t=P[u-1][h]===P[u][h]?!0:!1;else t=!0;if(e&&0<e.length)for(h=0;h<e.length;h++)L=Q[u-
1][h]===Q[u][h]?!0:!1;else L=!0;if(c&&0<c.length)for(h=0;h<c.length;h++)N=S[u-1][h]===S[u][h]?!0:!1;else N=!0;if(b&&0<b.length)for(h=0;h<b.length;h++)O=G[u-1][h]===G[u][h]?!0:!1;else O=!0}if(t&&L&&N&&O)break;u++}if(a&&0<a.length)for(h=0;h<a.length;h++)a[h].calculateStripLinesThicknessInValues(),a[h].calculateBreaksInPixels();if(e&&0<e.length)for(h=0;h<e.length;h++)e[h].calculateStripLinesThicknessInValues(),e[h].calculateBreaksInPixels();if(c&&0<c.length)for(h=0;h<c.length;h++)c[h].calculateStripLinesThicknessInValues(),
c[h].calculateBreaksInPixels();if(b&&0<b.length)for(h=0;h<b.length;h++)b[h].calculateStripLinesThicknessInValues(),b[h].calculateBreaksInPixels()}else{n=[];E=[];K=[];z=[];s=[];F=[];P=[];for(Q=[];4>u;){X=W=T=g=aa=M=d=G=S=U=Y=0;if(a&&0<a.length)for(K=[],h=W=0;h<a.length;h++)K.push(Math.ceil(a[h]?a[h].createLabelsAndCalculateWidth():0)),W+=K[h],d+=a[h]&&!m.isNavigator?a[h].margin:0;else K.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));P.push(K);if(e&&0<e.length)for(z=[],h=X=0;h<e.length;h++)z.push(Math.ceil(e[h]?
e[h].createLabelsAndCalculateWidth():0)),X+=z[h],M+=e[h]?e[h].margin:0;else z.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateWidth():0));Q.push(z);if(c&&0<c.length)for(h=0;h<c.length;h++)c[h].lineCoordinates={},q=Math.round(f.x1+W+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)),r=Math.round(Math.min(f.x2-X-M+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===
e[0].tickPlacement?e[0].tickLength:0):0),m.width-10)),c[h].labelAutoFit&&!l(x)&&(0<!a.length&&(q=0>c[h].labelAngle?Math.max(q,x):0===c[h].labelAngle?Math.max(q,x/2):q),0<!e.length&&(r=0<c[h].labelAngle?r-v/2:0===c[h].labelAngle?r-v/2:r)),c[h].lineCoordinates.x1=q,c[h].lineCoordinates.x2=r,c[h].lineCoordinates.width=Math.abs(r-q),c[h].title&&(c[h]._titleTextBlock.maxWidth=0<c[h].titleMaxWidth&&c[h].titleMaxWidth<c[h].lineCoordinates.width?c[h].titleMaxWidth:c[h].lineCoordinates.width);if(b&&0<b.length)for(h=
0;h<b.length;h++)b[h].lineCoordinates={},q=Math.round(f.x1+W+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)),r=Math.round(Math.min(f.x2-X-M+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),b[h].chart.width-10)),b[h]&&b[h].labelAutoFit&&!l(B)&&(0<!a.length&&(q=0<b[h].labelAngle?Math.max(q,B):0===b[h].labelAngle?Math.max(q,
B/2):q),0<!e.length&&(r-=C/2)),b[h].lineCoordinates.x1=q,b[h].lineCoordinates.x2=r,b[h].lineCoordinates.width=Math.abs(r-q),b[h].title&&(b[h]._titleTextBlock.maxWidth=0<b[h].titleMaxWidth&&b[h].titleMaxWidth<b[h].lineCoordinates.width?b[h].titleMaxWidth:b[h].lineCoordinates.width);if(c&&0<c.length)for(n=[],h=T=0;h<c.length;h++)n.push(Math.ceil(c[h]?c[h].createLabelsAndCalculateHeight():0)),T+=n[h]+c[h].margin,aa+=c[h].margin;else n.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));s.push(n);
if(b&&0<b.length)for(E=[],h=0;h<b.length;h++)E.push(Math.ceil(b[h]?b[h].createLabelsAndCalculateHeight():0)),g+=b[h].margin;else E.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));F.push(E);if(c&&0<c.length)for(h=0;h<c.length;h++)0<c[h]._labels.length&&(g=c[h]._labels[0],H=c[h]._labels[c[h]._labels.length-1],x=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)),v=H.textBlock.width*
Math.cos(Math.PI/180*Math.abs(H.textBlock.angle))+(H.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(H.textBlock.angle)));if(b&&0<b.length)for(h=0;h<b.length;h++)b[h]&&0<b[h]._labels.length&&(g=b[h]._labels[0],H=b[h]._labels[b[h]._labels.length-1],B=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)),C=H.textBlock.width*Math.cos(Math.PI/180*Math.abs(H.textBlock.angle))+
(H.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(H.textBlock.angle)));if(m.panEnabled)for(h=0;h<c.length;h++)n[h]=l(m.sessionVariables.axisY[h].height)?m.sessionVariables.axisY[h].height=n[h]:m.sessionVariables.axisY[h].height;else for(h=0;h<c.length;h++)m.sessionVariables.axisY[h].height=n[h];if(c&&0<c.length)for(h=c.length-1;0<=h;h--)g=Math.round(f.y2),k=Math.round(f.y2>c[h].chart.height?c[h].chart.height:f.y2),c[h].lineCoordinates.y1=g-(n[h]+c[h].margin+Y),c[h].lineCoordinates.y2=
g-(n[h]+c[h].margin+Y),"inside"===c[h].labelPlacement&&(c[h].lineCoordinates.y1=c[h].lineCoordinates.y1+c[h].labelEffectiveHeight+(m.isNavigator?0:5),c[h].lineCoordinates.y2=c[h].lineCoordinates.y1+c[h].lineThickness/2),"inside"===c[h].tickPlacement&&(c[h].lineCoordinates.y1+=c[h].tickLength,c[h].lineCoordinates.y2=c[h].lineCoordinates.y1+c[h].lineThickness/2),c[h].bounds={x1:q,y1:g-(n[h]+Y+c[h].margin),x2:r,y2:k-(Y+c[h].margin),width:r-q,height:n[h]},c[h].title&&(c[h]._titleTextBlock.maxWidth=0<
c[h].titleMaxWidth&&c[h].titleMaxWidth<c[h].lineCoordinates.width?c[h].titleMaxWidth:c[h].lineCoordinates.width),Y+=n[h]+c[h].margin;if(b&&0<b.length)for(h=b.length-1;0<=h;h--)b[h]&&(g=Math.round(f.y1),k=Math.round(f.y1+(E[h]+b[h].margin+U)),b[h].lineCoordinates.y1=k,b[h].lineCoordinates.y2=k,"inside"===b[h].labelPlacement&&(b[h].lineCoordinates.y1=k-b[h].labelEffectiveHeight-5,b[h].lineCoordinates.y2=b[h].lineCoordinates.y1-b[h].lineThickness/2),"inside"===b[h].tickPlacement&&(b[h].lineCoordinates.y1-=
b[h].tickLength,b[h].lineCoordinates.y2=b[h].lineCoordinates.y1-b[h].lineThickness/2),b[h].bounds={x1:q,y1:g+(b[h].margin+U),x2:r,y2:k,width:r-q},b[h].bounds.height=b[h].bounds.y2-b[h].bounds.y1,b[h].title&&(b[h]._titleTextBlock.maxWidth=0<b[h].titleMaxWidth&&b[h].titleMaxWidth<b[h].lineCoordinates.width?b[h].titleMaxWidth:b[h].lineCoordinates.width),U+=E[h]+b[h].margin);if(a&&0<a.length)for(h=0;h<a.length;h++){aa=a[h]._labels&&0<a[h]._labels.length?a[h]._labels[0].textBlock.fontSize/2:0;q=Math.round(f.x1+
d);g=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:f.y1<Math.max(aa,10)?Math.max(aa,10):f.y1):f.y1<Math.max(aa,10)?Math.max(aa,10):f.y1;r=Math.round(f.x1+W+d);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:f.y2-T>m.height-Math.max(aa,10)?m.height-Math.max(aa,10):f.y2-T):f.y2>m.height-Math.max(aa,10)?m.height-Math.max(aa,10):f.y2;if(c&&0<c.length)for(H=0;H<c.length;H++)c[H]&&c[H].labelAutoFit&&(r=c[H].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+
(m.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),q=0>c[H].labelAngle||0===c[H].labelAngle?r-W:q);if(b&&0<b.length)for(H=0;H<b.length;H++)b[H]&&b[H].labelAutoFit&&(r=b[H].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),q=r-W);a[h].lineCoordinates={x1:r-S,y1:g,x2:r-S,y2:k,height:Math.abs(k-g)};"inside"===a[h].labelPlacement&&(a[h].lineCoordinates.x1=a[h].lineCoordinates.x1-
a[h].labelEffectiveWidth-5,a[h].lineCoordinates.x2=a[h].lineCoordinates.x1+a[h].lineThickness/2);"inside"===a[h].tickPlacement&&(a[h].lineCoordinates.x1-=a[h].tickLength,a[h].lineCoordinates.x2=a[h].lineCoordinates.x1+a[h].lineThickness/2);a[h].bounds={x1:r-(K[h]+S),y1:g,x2:r-S,y2:k,height:k-g};a[h].bounds.width=a[h].bounds.x2-a[h].bounds.x1;a[h].title&&(a[h]._titleTextBlock.maxWidth=0<a[h].titleMaxWidth&&a[h].titleMaxWidth<a[h].lineCoordinates.height?a[h].titleMaxWidth:a[h].lineCoordinates.height);
a[h].calculateValueToPixelConversionParameters();a[h].calculateBreaksSizeInValues();S+=K[h]+a[h].margin}if(e&&0<e.length)for(h=0;h<e.length;h++){aa=e[h]._labels&&0<e[h]._labels.length?e[h]._labels[0].textBlock.fontSize/2:0;r=Math.round(f.x1-M);g=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:f.y1<Math.max(aa,10)?Math.max(aa,10):f.y1):f.y1<Math.max(aa,10)?Math.max(aa,10):f.y1;q=Math.round(f.x2-X-M);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:f.y2-T>m.height-Math.max(aa,10)?m.height-
Math.max(aa,10):f.y2-T):f.y2>m.height-Math.max(aa,10)?m.height-Math.max(aa,10):f.y2;if(c&&0<c.length)for(H=0;H<c.length;H++)c[H]&&c[H].labelAutoFit&&(q=c[H].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(m.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),r=0>c[H].labelAngle||0===c[H].labelAngle?q+X:q);if(b&&0<b.length)for(H=0;H<b.length;H++)b[H]&&b[H].labelAutoFit&&(q=b[H].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+
(m.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),r=q+X);e[h].lineCoordinates={x1:q+G,y1:g,x2:q+G,y2:k,height:Math.abs(k-g)};"inside"===e[h].labelPlacement&&(e[h].lineCoordinates.x1=e[h].lineCoordinates.x1+e[h].labelEffectiveWidth+(m.isNavigator?0:5),e[h].lineCoordinates.x2=e[h].lineCoordinates.x1+e[h].lineThickness/2);"inside"===e[h].tickPlacement&&(e[h].lineCoordinates.x1+=e[h].tickLength,e[h].lineCoordinates.x2=e[h].lineCoordinates.x1+e[h].lineThickness/2);e[h].bounds=
{x1:q+G,y1:g,x2:q+z[h]+G,y2:k,height:k-g};e[h].bounds.width=e[h].bounds.x2-e[h].bounds.x1;e[h].title&&(e[h]._titleTextBlock.maxWidth=0<e[h].titleMaxWidth&&e[h].titleMaxWidth<e[h].lineCoordinates.height?e[h].titleMaxWidth:e[h].lineCoordinates.height);e[h].calculateValueToPixelConversionParameters();e[h].calculateBreaksSizeInValues();G+=z[h]+e[h].margin}for(h=0;h<p.length;h++)"axisY"===p[h].type&&(p[h].calculateValueToPixelConversionParameters(),p[h].calculateBreaksSizeInValues());if(0<u){if(a&&0<a.length)for(h=
0;h<a.length;h++)t=P[u-1][h]===P[u][h]?!0:!1;else t=!0;if(e&&0<e.length)for(h=0;h<e.length;h++)L=Q[u-1][h]===Q[u][h]?!0:!1;else L=!0;if(c&&0<c.length)for(h=0;h<c.length;h++)N=s[u-1][h]===s[u][h]?!0:!1;else N=!0;if(b&&0<b.length)for(h=0;h<b.length;h++)O=F[u-1][h]===F[u][h]?!0:!1;else O=!0}if(t&&L&&N&&O)break;u++}if(c&&0<c.length)for(h=0;h<c.length;h++)c[h].calculateStripLinesThicknessInValues(),c[h].calculateBreaksInPixels();if(b&&0<b.length)for(h=0;h<b.length;h++)b[h].calculateStripLinesThicknessInValues(),
b[h].calculateBreaksInPixels();if(a&&0<a.length)for(h=0;h<a.length;h++)a[h].calculateStripLinesThicknessInValues(),a[h].calculateBreaksInPixels();if(e&&0<e.length)for(h=0;h<e.length;h++)e[h].calculateStripLinesThicknessInValues(),e[h].calculateBreaksInPixels()}};B.render=function(a,e,c,b,d){d=a[0]?a[0].chart:e[0].chart;var f=d.ctx;d.alignVerticalAxes&&d.alignVerticalAxes();f.save();f.beginPath();a&&a.length&&f.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2);e&&e.length&&f.rect(2,
e[e.length-1].bounds.y1,e[0].chart.width-4,e[0].bounds.y2);f.clip();if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g].renderLabelsTicksAndTitle();if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].renderLabelsTicksAndTitle();f.restore();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderLabelsTicksAndTitle();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderLabelsTicksAndTitle();d.preparePlotArea();g=d.plotArea;f.save();f.beginPath();f.rect(g.x1,g.y1,Math.abs(g.x2-g.x1),Math.abs(g.y2-g.y1));f.clip();if(a&&
0<a.length)for(g=0;g<a.length;g++)a[g].renderStripLinesOfThicknessType("value");if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].renderStripLinesOfThicknessType("value");if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderInterlacedColors();if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].renderInterlacedColors();if(c&&0<c.length)for(g=
0;g<c.length;g++)c[g].renderInterlacedColors();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderInterlacedColors();f.restore();if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderGrid(),r&&(a[g].createMask(),a[g].renderBreaksBackground());if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].renderGrid(),r&&(e[g].createMask(),e[g].renderBreaksBackground());if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderGrid(),r&&(c[g].createMask(),c[g].renderBreaksBackground());if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderGrid(),
r&&(b[g].createMask(),b[g].renderBreaksBackground());if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderAxisLine();if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].renderAxisLine();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderAxisLine();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderAxisLine();f=!1;if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderStripLinesOfThicknessType("pixel"),a[g].crosshair&&a[g].crosshair.enabled&&(f=!0,d.clearedOverlayedCanvas=a[g].type);if(e&&0<e.length)for(g=0;g<
e.length;g++)e[g].renderStripLinesOfThicknessType("pixel"),e[g].crosshair&&e[g].crosshair.enabled&&(f=!0,d.clearedOverlayedCanvas=e[g].type);if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderStripLinesOfThicknessType("pixel"),c[g].crosshair&&c[g].crosshair.enabled&&(f=!0,d.clearedOverlayedCanvas=c[g].type);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderStripLinesOfThicknessType("pixel"),b[g].crosshair&&b[g].crosshair.enabled&&(f=!0,d.clearedOverlayedCanvas=b[g].type);if(f||!f&&d.clearedOverlayedCanvas&&
0<=d.clearedOverlayedCanvas.indexOf("axis"))d.resetOverlayedCanvas(),d.renderCrosshairs(null,l(d.sessionVariables.crosshairShownByPixel)||d.sessionVariables.crosshairShownByPixel?!0:d.sessionVariables.crosshairShownByPixel)};B.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var e=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,
this.stripLines[a].endValue),b=this.getApparentDifference(e,c);this.stripLines[a].value=this.convertPixelToValue((this.convertValueToPixel(e)+this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};B.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:
[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),b=this.scaleBreaks&&!l(this.scaleBreaks.options.spacing),d,f=0;f<e.length;f++)d=b||!l(e[f].options.spacing),e[f].spacing=Sa(e[f].spacing,a,8,d?0.1*a:8,d?0:3)<<0,e[f].size=0>e[f].spacing?0:Math.abs(e[f].spacing/c),this.logarithmic&&(e[f].size=Math.pow(this.logarithmBase,e[f].size))};B.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 e=0;e<a.length&&!(a[e].startValue>this.conversionParameters.maximum);e++)a[e].endValue<this.conversionParameters.minimum||(l(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=e),a[e].startValue>=this.conversionParameters.minimum&&(a[e].startPixel=this.convertValueToPixel(a[e].startValue),
this.scaleBreaks.lastBreakIndex=e),a[e].endValue<=this.conversionParameters.maximum&&(a[e].endPixel=this.convertValueToPixel(a[e].endValue)))}};B.prototype.renderLabelsTicksAndTitle=function(){var a=this,e=!1,c=0,b=0,d=1,f=0;0!==this.labelAngle&&360!==this.labelAngle&&(d=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=[],d=0!==this.labelAngle&&360!==this.labelAngle?
1:1.2,g,l=this.viewportMaximum,r=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(k===this._labels.length-1||g<Math.log(l/n.position)*r/d)||(c.push(n),l=n.position,g=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<
this.viewportMinimum||(g=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=g);c>this.lineCoordinates.width*d&&this.labelAutoFit&&(e=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],m,l=this.viewportMaximum,r=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){n=this._labels[k];if(n.position<this.viewportMinimum)break;
n.position>this.viewportMaximum||!(k===this._labels.length-1||m<Math.log(l/n.position)*r)||(c.push(n),l=n.position,m=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||(m=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=m);b>this.lineCoordinates.height*
d&&this.labelAutoFit&&(e=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var k=0,n,p;if("bottom"===this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(p=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?(p.x<<0)+0.5:p.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,p.y<<0),this.ctx.lineTo(b,p.y+this.tickLength<<0),this.ctx.stroke()),e&&0!==f++%2&&this.labelAutoFit||(0===n.textBlock.angle?(p.x-=n.textBlock.width/2,p.y="inside"===this.labelPlacement?p.y-(("inside"===this.tickPlacement?this.tickLength:0)+n.textBlock.height-n.textBlock._lineHeight/2+5):p.y+("inside"===this.tickPlacement?0:this.tickLength)+n.textBlock._lineHeight/2+5):0>this.labelAngle?(p.x=p.x-("inside"===this.labelPlacement?0:n.textBlock.width*
Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),p.y="inside"===this.labelPlacement?p.y-("inside"===this.tickPlacement?this.tickLength:0)-5-(n.textBlock.height-n.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle):p.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-n.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle))):(p.x=p.x-("inside"===this.labelPlacement?
n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)+n.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),p.y="inside"===this.labelPlacement?p.y-("inside"===this.tickPlacement?this.tickLength:0)-5-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(n.textBlock.height-n.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle):p.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(n.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle))),n.textBlock.x=p.x,
n.textBlock.y=p.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(n=a._labels[k],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(p=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(p.x<<0)+0.5:p.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,p.y<<0);a.ctx.lineTo(b,p.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+this._titleTextBlock._lineHeight/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||
(p=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?(p.x<<0)+0.5:p.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,p.y<<0),this.ctx.lineTo(b,p.y-this.tickLength<<0),this.ctx.stroke()),e&&0!==f++%2&&this.labelAutoFit||(0===n.textBlock.angle?(p.x-=n.textBlock.width/2,p.y="inside"===this.labelPlacement?p.y+n.textBlock._lineHeight/2+("inside"===this.tickPlacement?
this.tickLength:0)+5:p.y-(("inside"===this.tickPlacement?0:this.tickLength)+n.textBlock.height-n.textBlock._lineHeight/2)-5):0>this.labelAngle?(p.x=p.x-("inside"===this.labelPlacement?n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)+n.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),p.y="inside"===this.labelPlacement?p.y+("inside"===this.tickPlacement?this.tickLength:0)+5-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+n.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle):
p.y-("inside"===this.tickPlacement?0:this.tickLength)-5-(n.textBlock.height-n.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle)):(p.x=p.x-("inside"===this.labelPlacement?0:n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),p.y="inside"===this.labelPlacement?p.y+("inside"===this.tickPlacement?this.tickLength:0)+5+n.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle):p.y-("inside"===this.tickPlacement?0:this.tickLength)-
5-((n.textBlock.height-n.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle)+n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),n.textBlock.x=p.x,n.textBlock.y=p.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(n=a._labels[k],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(p=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
a.tickColor;var b=1===a.ctx.lineWidth%2?(p.x<<0)+0.5:p.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,p.y<<0);a.ctx.lineTo(b,p.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+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===
this._position){for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(p=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?(p.y<<0)+0.5:p.y<<0,this.ctx.beginPath(),this.ctx.moveTo(p.x<<0,b),this.ctx.lineTo(p.x-this.tickLength<<0,b),this.ctx.stroke()),e&&0!==f++%2&&this.labelAutoFit||(0===this.labelAngle?
(n.textBlock.y=p.y-n.textBlock.topPadding,n.textBlock.x="inside"===this.labelPlacement?p.x+("inside"===this.tickPlacement?this.tickLength:0)+5:p.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):0>this.labelAngle?(n.textBlock.y=("inside"===this.labelPlacement?p.y:p.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))-n.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?p.x-n.textBlock.fontSize/
2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:p.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(n.textBlock.y=("inside"===this.labelPlacement?p.y:p.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))-n.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?
p.x+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:p.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-n.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(n=a._labels[k],!(n.position<a.viewportMinimum||n.position>
a.viewportMaximum)&&(p=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(p.y<<0)+0.5:p.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(p.x<<0,b);a.ctx.lineTo(p.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock._lineHeight/2,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;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(p=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?(p.y<<0)+0.5:p.y<<0,this.ctx.beginPath(),this.ctx.moveTo(p.x<<
0,b),this.ctx.lineTo(p.x+this.tickLength<<0,b),this.ctx.stroke()),e&&0!==f++%2&&this.labelAutoFit||(0===this.labelAngle?(n.textBlock.y=p.y-n.textBlock.topPadding,n.textBlock.x="inside"===this.labelPlacement?p.x-n.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:p.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(n.textBlock.y=("inside"===this.labelPlacement?p.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):p.y)-n.textBlock.topPadding*Math.cos(Math.PI/
180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?p.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:p.x-n.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(n.textBlock.y=("inside"===this.labelPlacement?p.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):p.y)-n.textBlock.topPadding*
Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?p.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-n.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:p.x+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=
0;k<a._labels.length;k++)if(n=a._labels[k],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(p=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(p.y<<0)+0.5:p.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(p.x<<0,b);a.ctx.lineTo(p.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock._lineHeight/
2,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("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)n=a._labels[k],n.position<a.viewportMinimum||(n.position>a.viewportMaximum||e&&0!==f++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),n.textBlock.render(!0),a.ctx.restore())},
this);else for(k=0;k<this._labels.length;k++)n=this._labels[k],n.position<this.viewportMinimum||(n.position>this.viewportMaximum||e&&0!==f++%2&&this.labelAutoFit)||n.textBlock.render(!0)};B.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,e,c,b=this.chart.plotArea,d=0;e=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,d=0;d<this._labels.length;d++)e?(e=this.getPixelCoordinatesOnAxis(this._labels[d].position),
c=d+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[d+1].position),a.fillRect(Math.min(c.x,e.x),b.y1,Math.abs(c.x-e.x),Math.abs(b.y1-b.y2)),e=!1):e=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,d=0;d<this._labels.length;d++)e?(c=this.getPixelCoordinatesOnAxis(this._labels[d].position),e=d+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):
this.getPixelCoordinatesOnAxis(this._labels[d+1].position),a.fillRect(b.x1,Math.min(c.y,e.y),Math.abs(b.x1-b.x2),Math.abs(e.y-c.y)),e=!1):e=!0;a.beginPath()};B.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var e=this,c,b,d=0,f=0,g=!1;b=!1;for(var r=[],t=[],k=!1,m,d=0;d<this.stripLines.length;d++){var n=this.stripLines[d];n._thicknessType===a&&("pixel"===a&&(n.value<this.viewportMinimum||n.value>this.viewportMaximum||l(n.value)||isNaN(this.range))||
"value"===a&&(n.startValue<=this.viewportMinimum&&n.endValue<=this.viewportMinimum||n.startValue>=this.viewportMaximum&&n.endValue>=this.viewportMaximum||l(n.startValue)||l(n.endValue)||isNaN(this.range))||r.push(n))}for(d=0;d<this._stripLineLabels.length;d++)if(n=this.stripLines[d],c=this._stripLineLabels[d],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){n&&(this.ctx.strokeStyle=
n.color,this.ctx.lineWidth="pixel"===n._thicknessType?n.thickness:this.tickThickness,l(n.opacity)||"pixel"!==n._thicknessType||(m=n.ctx.globalAlpha,n.ctx.globalAlpha=n.opacity));if("bottom"===this._position){var p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,b.y<<0);this.ctx.lineTo(p,b.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y+=this.tickLength+c.textBlock.fontSize/2+5):(b.x-=(0>this.labelAngle?c.textBlock.width*
Math.cos(Math.PI/180*this.labelAngle):0)-c.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),b.y+=this.tickLength+5+(0>this.labelAngle?Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,b.y<<0),this.ctx.lineTo(p,b.y-this.tickLength<<
0),this.ctx.stroke(),0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y-=this.tickLength+c.textBlock.height-c.textBlock.fontSize/2):(b.x-=(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)-c.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),b.y-=this.tickLength+2+(0<this.labelAngle?(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/
180*this.labelAngle)))):"left"===this._position?(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,p),this.ctx.lineTo(b.x-this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?(b.x=b.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5,b.y-=c.textBlock.topPadding):(b.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+c.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),b.x-=this.tickLength+5+(0<this.labelAngle?c.textBlock.width*
Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle):c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)))):"right"===this._position&&(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,p),this.ctx.lineTo(b.x+this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?(b.x=b.x+this.tickLength+5,b.y-=c.textBlock.topPadding):(b.y-=
c.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),b.x=this.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle))));m&&(n.ctx.globalAlpha=m);c.textBlock.x=b.x;c.textBlock.y=b.y;t.push(c)}else n._thicknessType===a&&(c.textBlock.angle=-90,"bottom"===this._position?(c.textBlock.maxWidth=this.options.stripLines[d].labelMaxWidth?this.options.stripLines[d].labelMaxWidth:
this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-n.thickness/2>this.chart.plotArea.x1?l(n.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,l(n.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.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[d].labelMaxWidth?this.options.stripLines[d].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-
n.thickness/2>this.chart.plotArea.x1?l(n.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,l(n.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.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[d].labelMaxWidth?this.options.stripLines[d].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),b.y-c.textBlock.height-n.thickness/2>this.chart.plotArea.y1?l(n.startValue)?
b.y-=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2:l(n.startValue)?b.y+=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.y+=c.textBlock.height/2-c.textBlock.fontSize+3,b.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x2-c.textBlock.width-3):"right"===this._position&&(c.textBlock.maxWidth=this.options.stripLines[d].labelMaxWidth?
this.options.stripLines[d].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),b.y-c.textBlock.height-n.thickness/2>this.chart.plotArea.y1?l(n.startValue)?b.y-=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2:l(n.startValue)?b.y+=c.textBlock.height-c.textBlock.fontSize/2+n.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2+3,b.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x2-c.textBlock.width-
3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x1+3),c.textBlock.x=b.x,c.textBlock.y=b.y,t.push(c));if(!k){b=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(d=0;d<r.length;d++)n=r[d],n.showOnTop?g||(g=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();
this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(f=0;f<r.length;f++)n=r[f],n.showOnTop&&n.render();this.ctx.restore()},n)):n.render();for(d=0;d<t.length;d++)c=t[d],c.stripLine.showOnTop?b||(b=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(f=0;f<t.length;f++)c=t[f],"inside"===c.stripLine.labelPlacement&&c.stripLine.showOnTop&&(e.ctx.save(),e.ctx.beginPath(),e.ctx.rect(e.chart.plotArea.x1,
e.chart.plotArea.y1,e.chart.plotArea.width,e.chart.plotArea.height),e.ctx.clip(),c.textBlock.render(!0),e.ctx.restore())},c.textBlock)):"inside"===c.stripLine.labelPlacement&&c.textBlock.render(!0);this.ctx.restore();k=!0}if(k)for(b=!1,d=0;d<t.length;d++)c=t[d],"outside"===c.stripLine.labelPlacement&&c.textBlock.render(!0)}};B.prototype.renderBreaksBackground=function(){this.chart._breaksCanvas&&(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length&&this.maskCanvas)&&(this.chart._breaksCanvasCtx.save(),
this.chart._breaksCanvasCtx.beginPath(),this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height),this.chart._breaksCanvasCtx.clip(),this.chart._breaksCanvasCtx.drawImage(this.maskCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx.restore())};B.prototype.createMask=function(){if(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;r?(this.maskCanvas=sa(this.chart.width,
this.chart.height),this.maskCtx=this.maskCanvas.getContext("2d")):(this.maskCanvas=this.chart.plotArea.canvas,this.maskCtx=this.chart.plotArea.ctx);this.maskCtx.save();this.maskCtx.beginPath();this.maskCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.maskCtx.clip();for(var e=0;e<a.length;e++)a[e].endValue<this.viewportMinimum||(a[e].startValue>this.viewportMaximum||isNaN(this.range))||a[e].render(this.maskCtx);this.maskCtx.restore()}};
B.prototype.renderCrosshair=function(a,e){isFinite(this.minimum)&&isFinite(this.maximum)&&this.crosshair.render(a,e)};B.prototype.showCrosshair=function(a){l(a)||(a<this.viewportMinimum||a>this.viewportMaximum)||("top"===this._position||"bottom"===this._position?this.crosshair.render(this.convertValueToPixel(a),null,a):this.crosshair.render(null,this.convertValueToPixel(a),a))};B.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var e,c=this.chart.plotArea;
a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(K(this.gridDashType,this.gridThickness));if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),e=this.getPixelCoordinatesOnAxis(this._labels[b].position),e=1===a.lineWidth%2?(e.x<<0)+0.5:e.x<<0,a.moveTo(e,c.y1<<0),a.lineTo(e,c.y2<<0),a.stroke());
else if("left"===this._position||"right"===this._position)for(var b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),e=this.getPixelCoordinatesOnAxis(this._labels[b].position),e=1===a.lineWidth%2?(e.y<<0)+0.5:e.y<<0,a.moveTo(c.x1<<0,e),a.lineTo(c.x2<<0,e),a.stroke());a.restore()}};B.prototype.renderAxisLine=function(){var a=this.chart.ctx,e=r?this.chart._preRenderCtx:a,c=Math.ceil(this.tickThickness/
(this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),d,f;e.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(d=this.lineCoordinates.x2,f=this.lineCoordinates.x1):(d=this.lineCoordinates.x1,f=this.lineCoordinates.x2);e.lineWidth=this.lineThickness;e.strokeStyle=this.lineColor?this.lineColor:"black";e.setLineDash&&e.setLineDash(K(this.lineDashType,this.lineThickness));var g=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:
this.lineCoordinates.y1<<0;e.beginPath();if(this.scaleBreaks&&!l(this.scaleBreaks.firstBreakIndex))if(l(this.scaleBreaks.lastBreakIndex))d=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(var t=this.scaleBreaks.firstBreakIndex;t<=this.scaleBreaks.lastBreakIndex;t++)e.moveTo(d,g),e.lineTo(this.scaleBreaks._appliedBreaks[t].startPixel+c,g),d=this.scaleBreaks._appliedBreaks[t].endPixel+b;d&&(e.moveTo(d,g),e.lineTo(f,g));e.stroke()}}else if(("left"===this._position||
"right"===this._position)&&this.lineThickness){this.reversed?(d=this.lineCoordinates.y1,f=this.lineCoordinates.y2):(d=this.lineCoordinates.y2,f=this.lineCoordinates.y1);e.lineWidth=this.lineThickness;e.strokeStyle=this.lineColor;e.setLineDash&&e.setLineDash(K(this.lineDashType,this.lineThickness));g=1===this.lineThickness%2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0;e.beginPath();if(this.scaleBreaks&&!l(this.scaleBreaks.firstBreakIndex))if(l(this.scaleBreaks.lastBreakIndex))d=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+
c;else for(t=this.scaleBreaks.firstBreakIndex;t<=this.scaleBreaks.lastBreakIndex;t++)e.moveTo(g,d),e.lineTo(g,this.scaleBreaks._appliedBreaks[t].startPixel+b),d=this.scaleBreaks._appliedBreaks[t].endPixel+c;d&&(e.moveTo(g,d),e.lineTo(g,f));e.stroke()}r&&(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),e.clearRect(0,0,this.chart.width,
this.chart.height));e.restore()};B.prototype.getPixelCoordinatesOnAxis=function(a){var e={};if("bottom"===this._position||"top"===this._position)e.x=this.convertValueToPixel(a),e.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)e.y=this.convertValueToPixel(a),e.x=this.lineCoordinates.x2;return e};B.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var e=0,c=0,b,e=!0,d=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;c<d.length;c++){if(!(d[c].endValue<this.conversionParameters.minimum))if(e)if(d[c].startValue<this.conversionParameters.minimum){if(1<d[c].size&&this.conversionParameters.minimum*Math.pow(d[c].endValue/
d[c].startValue,Math.log(b)/Math.log(d[c].size))<d[c].endValue){a=Math.pow(d[c].endValue/d[c].startValue,Math.log(b)/Math.log(d[c].size));break}else a*=d[c].endValue/this.conversionParameters.minimum/Math.pow(d[c].size,Math.log(d[c].endValue/this.conversionParameters.minimum)/Math.log(d[c].endValue/d[c].startValue)),b/=Math.pow(d[c].size,Math.log(d[c].endValue/this.conversionParameters.minimum)/Math.log(d[c].endValue/d[c].startValue));e=!1}else if(b>d[c].startValue/this.conversionParameters.minimum){b/=
d[c].startValue/this.conversionParameters.minimum;if(b<d[c].size){a*=Math.pow(d[c].endValue/d[c].startValue,1===d[c].size?1:Math.log(b)/Math.log(d[c].size))/b;break}else a*=d[c].endValue/d[c].startValue/d[c].size;b/=d[c].size;e=!1}else break;else if(b>d[c].startValue/d[c-1].endValue){b/=d[c].startValue/d[c-1].endValue;if(b<d[c].size){a*=Math.pow(d[c].endValue/d[c].startValue,1===d[c].size?1:Math.log(b)/Math.log(d[c].size))/b;break}else a*=d[c].endValue/d[c].startValue/d[c].size;b/=d[c].size}else break}else for(c=
d.length-1;0<=c;c--)if(!(d[c].startValue>this.conversionParameters.minimum))if(e)if(d[c].endValue>this.conversionParameters.minimum){if(1<d[c].size&&this.conversionParameters.minimum*Math.pow(d[c].endValue/d[c].startValue,Math.log(b)/Math.log(d[c].size))>d[c].startValue){a=Math.pow(d[c].endValue/d[c].startValue,Math.log(b)/Math.log(d[c].size));break}else a*=d[c].startValue/this.conversionParameters.minimum*Math.pow(d[c].size,Math.log(d[c].startValue/this.conversionParameters.minimum)/Math.log(d[c].endValue/
d[c].startValue))*b,b*=Math.pow(d[c].size,Math.log(this.conversionParameters.minimum/d[c].startValue)/Math.log(d[c].endValue/d[c].startValue));e=!1}else if(b<d[c].endValue/this.conversionParameters.minimum){b/=d[c].endValue/this.conversionParameters.minimum;if(b>1/d[c].size){a*=Math.pow(d[c].endValue/d[c].startValue,1>=d[c].size?1:Math.log(b)/Math.log(d[c].size))*b;break}else a/=d[c].endValue/d[c].startValue/d[c].size;b*=d[c].size;e=!1}else break;else if(b<d[c].endValue/d[c+1].startValue){b/=d[c].endValue/
d[c+1].startValue;if(b>1/d[c].size){a*=Math.pow(d[c].endValue/d[c].startValue,1>=d[c].size?1:Math.log(b)/Math.log(d[c].size))*b;break}else a/=d[c].endValue/d[c].startValue/d[c].size;b*=d[c].size}else break;e=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<d.length;c++){if(!(d[c].endValue<this.conversionParameters.minimum))if(e)if(d[c].startValue<
this.conversionParameters.minimum){if(d[c].size&&this.conversionParameters.minimum+b*(d[c].endValue-d[c].startValue)/d[c].size<d[c].endValue){a=0>=d[c].size?0:b*(d[c].endValue-d[c].startValue)/d[c].size;break}else a+=d[c].endValue-this.conversionParameters.minimum-d[c].size*(d[c].endValue-this.conversionParameters.minimum)/(d[c].endValue-d[c].startValue),b-=d[c].size*(d[c].endValue-this.conversionParameters.minimum)/(d[c].endValue-d[c].startValue);e=!1}else if(b>d[c].startValue-this.conversionParameters.minimum){b-=
d[c].startValue-this.conversionParameters.minimum;if(b<d[c].size){a+=(d[c].endValue-d[c].startValue)*(0===d[c].size?1:b/d[c].size)-b;break}else a+=d[c].endValue-d[c].startValue-d[c].size;b-=d[c].size;e=!1}else break;else if(b>d[c].startValue-d[c-1].endValue){b-=d[c].startValue-d[c-1].endValue;if(b<d[c].size){a+=(d[c].endValue-d[c].startValue)*(0===d[c].size?1:b/d[c].size)-b;break}else a+=d[c].endValue-d[c].startValue-d[c].size;b-=d[c].size}else break}else for(c=d.length-1;0<=c;c--)if(!(d[c].startValue>
this.conversionParameters.minimum))if(e)if(d[c].endValue>this.conversionParameters.minimum)if(d[c].size&&this.conversionParameters.minimum+b*(d[c].endValue-d[c].startValue)/d[c].size>d[c].startValue){a=0>=d[c].size?0:b*(d[c].endValue-d[c].startValue)/d[c].size;break}else a+=d[c].startValue-this.conversionParameters.minimum+d[c].size*(this.conversionParameters.minimum-d[c].startValue)/(d[c].endValue-d[c].startValue),b+=d[c].size*(this.conversionParameters.minimum-d[c].startValue)/(d[c].endValue-d[c].startValue),
e=!1;else if(b<d[c].endValue-this.conversionParameters.minimum){b-=d[c].endValue-this.conversionParameters.minimum;if(b>-1*d[c].size){a+=(d[c].endValue-d[c].startValue)*(0===d[c].size?1:b/d[c].size)+b;break}else a-=d[c].endValue-d[c].startValue-d[c].size;b+=d[c].size;e=!1}else break;else if(b<d[c].endValue-d[c+1].startValue){b-=d[c].endValue-d[c+1].startValue;if(b>-1*d[c].size){a+=(d[c].endValue-d[c].startValue)*(0===d[c].size?1:b/d[c].size)+b;break}else a-=d[c].endValue-d[c].startValue-d[c].size;
b+=d[c].size}else break;e=this.conversionParameters.minimum+a}return e};B.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};B.prototype.getApparentDifference=function(a,e,c,b){var d=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];if(this.logarithmic){c=l(c)?e/a:c;for(var f=0;f<d.length&&!(e<d[f].startValue);f++)a>d[f].endValue||(a<=d[f].startValue&&e>=d[f].endValue?c=c/d[f].endValue*d[f].startValue*d[f].size:a>=d[f].startValue&&e>=d[f].endValue?c=c/d[f].endValue*a*Math.pow(d[f].size,Math.log(d[f].endValue/
a)/Math.log(d[f].endValue/d[f].startValue)):a<=d[f].startValue&&e<=d[f].endValue?c=c/e*d[f].startValue*Math.pow(d[f].size,Math.log(e/d[f].startValue)/Math.log(d[f].endValue/d[f].startValue)):!b&&(a>d[f].startValue&&e<d[f].endValue)&&(c=a*Math.pow(d[f].size,Math.log(e/a)/Math.log(d[f].endValue/d[f].startValue))))}else for(c=l(c)?Math.abs(e-a):c,f=0;f<d.length&&!(e<d[f].startValue);f++)a>d[f].endValue||(a<=d[f].startValue&&e>=d[f].endValue?c=c-d[f].endValue+d[f].startValue+d[f].size:a>d[f].startValue&&
e>=d[f].endValue?c=c-d[f].endValue+a+d[f].size*(d[f].endValue-a)/(d[f].endValue-d[f].startValue):a<=d[f].startValue&&e<d[f].endValue?c=c-e+d[f].startValue+d[f].size*(e-d[f].startValue)/(d[f].endValue-d[f].startValue):!b&&(a>d[f].startValue&&e<d[f].endValue)&&(c=a+d[f].size*(e-a)/(d[f].endValue-d[f].startValue)));return c};B.prototype.setViewPortRange=function(a,e){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,e);this.sessionVariables.newViewportMaximum=this.viewportMaximum=
Math.max(a,e)};B.prototype.getXValueAt=function(a){if(!a)return null;var e=null;"left"===this._position?e=this.convertPixelToValue(a.y):"bottom"===this._position&&(e=this.convertPixelToValue(a.x));return e};B.prototype.calculateValueToPixelConversionParameters=function(a){a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];var e={pixelPerUnit:null,minimum:null,reference:null},c=this.lineCoordinates.width,b=this.lineCoordinates.height,c="bottom"===this._position||"top"===this._position?c:b,b=Math.abs(this.range);
if(this.logarithmic)for(var d=0;d<a.length&&!(this.viewportMaximum<a[d].startValue);d++)this.viewportMinimum>a[d].endValue||(this.viewportMinimum>=a[d].startValue&&this.viewportMaximum<=a[d].endValue?c=0:this.viewportMinimum<=a[d].startValue&&this.viewportMaximum>=a[d].endValue?(b=b/a[d].endValue*a[d].startValue,c=0<a[d].spacing.toString().indexOf("%")?c*(1-parseFloat(a[d].spacing)/100):c-Math.min(a[d].spacing,0.1*c)):this.viewportMinimum>a[d].startValue&&this.viewportMaximum>=a[d].endValue?(b=b/
a[d].endValue*this.viewportMinimum,c=0<a[d].spacing.toString().indexOf("%")?c*(1-parseFloat(a[d].spacing)/100*Math.log(a[d].endValue/this.viewportMinimum)/Math.log(a[d].endValue/a[d].startValue)):c-Math.min(a[d].spacing,0.1*c)*Math.log(a[d].endValue/this.viewportMinimum)/Math.log(a[d].endValue/a[d].startValue)):this.viewportMinimum<=a[d].startValue&&this.viewportMaximum<a[d].endValue&&(b=b/this.viewportMaximum*a[d].startValue,c=0<a[d].spacing.toString().indexOf("%")?c*(1-parseFloat(a[d].spacing)/
100*Math.log(this.viewportMaximum/a[d].startValue)/Math.log(a[d].endValue/a[d].startValue)):c-Math.min(a[d].spacing,0.1*c)*Math.log(this.viewportMaximum/a[d].startValue)/Math.log(a[d].endValue/a[d].startValue)));else for(d=0;d<a.length&&!(this.viewportMaximum<a[d].startValue);d++)this.viewportMinimum>a[d].endValue||(this.viewportMinimum>=a[d].startValue&&this.viewportMaximum<=a[d].endValue?c=0:this.viewportMinimum<=a[d].startValue&&this.viewportMaximum>=a[d].endValue?(b=b-a[d].endValue+a[d].startValue,
c=0<a[d].spacing.toString().indexOf("%")?c*(1-parseFloat(a[d].spacing)/100):c-Math.min(a[d].spacing,0.1*c)):this.viewportMinimum>a[d].startValue&&this.viewportMaximum>=a[d].endValue?(b=b-a[d].endValue+this.viewportMinimum,c=0<a[d].spacing.toString().indexOf("%")?c*(1-parseFloat(a[d].spacing)/100*(a[d].endValue-this.viewportMinimum)/(a[d].endValue-a[d].startValue)):c-Math.min(a[d].spacing,0.1*c)*(a[d].endValue-this.viewportMinimum)/(a[d].endValue-a[d].startValue)):this.viewportMinimum<=a[d].startValue&&
this.viewportMaximum<a[d].endValue&&(b=b-this.viewportMaximum+a[d].startValue,c=0<a[d].spacing.toString().indexOf("%")?c*(1-parseFloat(a[d].spacing)/100*(this.viewportMaximum-a[d].startValue)/(a[d].endValue-a[d].startValue)):c-Math.min(a[d].spacing,0.1*c)*(this.viewportMaximum-a[d].startValue)/(a[d].endValue-a[d].startValue)));e.minimum=this.viewportMinimum;e.maximum=this.viewportMaximum;e.range=b;if("bottom"===this._position||"top"===this._position)this.logarithmic?(e.lnLogarithmBase=Math.log(this.logarithmBase),
e.pixelPerUnit=(this.reversed?-1:1)*c*e.lnLogarithmBase/Math.log(Math.abs(b))):e.pixelPerUnit=(this.reversed?-1:1)*c/Math.abs(b),e.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)this.logarithmic?(e.lnLogarithmBase=Math.log(this.logarithmBase),e.pixelPerUnit=(this.reversed?1:-1)*c*e.lnLogarithmBase/Math.log(Math.abs(b))):e.pixelPerUnit=(this.reversed?1:-1)*c/Math.abs(b),e.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;
this.conversionParameters=e};B.prototype.calculateAxisParameters=function(){if(this.logarithmic)this.calculateLogarithmicAxisParameters();else{var a=this.chart.layoutManager.getFreeSpace(),e=!1,c=!1;"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?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40,b=4;"axisX"===this.type&&
(b=600>this.maxWidth?8:6);var a=Math.max(b,Math.floor(this.maxWidth/a)),d,f,g,b=0;!l(this.options.viewportMinimum)&&(!l(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&&(this.viewportMinimum=this.viewportMaximum=null);if(l(this.options.viewportMinimum)&&!l(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(l(this.options.viewportMaximum)&&!l(this.sessionVariables.newViewportMaximum)&&!isNaN(this.sessionVariables.newViewportMaximum))this.viewportMaximum=this.sessionVariables.newViewportMaximum;else if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;!l(this.minimum)&&this.viewportMinimum<this.minimum&&(this.viewportMinimum=this.minimum);!l(this.maximum)&&this.viewportMaximum>this.maximum&&(this.viewportMaximum=this.maximum);if(this.scaleBreaks)for(b=
0;b<this.scaleBreaks._appliedBreaks.length;b++)if((!l(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue||!l(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[b].startValue||!l(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue)&&(!l(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue||
!l(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[b].endValue||!l(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue)){this.scaleBreaks._appliedBreaks.splice(b,1);break}if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(d=0;d<this.dataSeries.length;d++)"dateTime"===this.dataSeries[d].xValueType&&(c=!0);d=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin;f=null!==this.viewportMaximum?
this.viewportMaximum:this.dataInfo.viewPortMax;0===f-d&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,f+=b,d-=b);Infinity!==this.dataInfo.minDiff?g=this.dataInfo.minDiff:1<f-d?g=0.5*Math.abs(f-d):(g=1,c&&(e=!0))}else"axisY"===this.type&&(d=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(d)||isFinite(f)?isFinite(d)?isFinite(f)||(f=d):d=f:(f="undefined"===typeof this.options.interval?
-Infinity:this.options.interval,d="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),0===d&&0===f?(f+=9,d=0):0===f-d?(b=Math.min(Math.abs(0.01*Math.abs(f)),5),f+=b,d-=b):d>f?(b=Math.min(0.01*Math.abs(this.getApparentDifference(f,d,null,!0)),5),0<=f?d=f-b:f=isFinite(d)?d+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(d,f,null,!0)),0.05),0!==f&&(f+=b),0!==d&&(d-=b)),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<f-d?0.5*Math.abs(f-d):1,this.includeZero&&
(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<d&&(d=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>f&&(f=0));b=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?d:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum,null,!0);if("axisX"===this.type&&c){this.valueType="dateTime";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*V.secondDuration)<=a?(this.interval=1,this.intervalType="second"):b/(2*V.secondDuration)<=a?(this.interval=2,this.intervalType="second"):b/(5*V.secondDuration)<=a?(this.interval=5,this.intervalType="second"):b/(10*V.secondDuration)<=a?(this.interval=10,this.intervalType="second"):b/(15*V.secondDuration)<=a?(this.interval=15,this.intervalType="second"):b/(20*V.secondDuration)<=
a?(this.interval=20,this.intervalType="second"):b/(30*V.secondDuration)<=a?(this.interval=30,this.intervalType="second"):b/(1*V.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):b/(2*V.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):b/(5*V.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):b/(10*V.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):b/(15*V.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):b/(20*V.minuteDuration)<=
a?(this.interval=20,this.intervalType="minute"):b/(30*V.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):b/(1*V.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):b/(2*V.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):b/(3*V.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):b/(6*V.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):b/(1*V.dayDuration)<=a?(this.interval=1,this.intervalType="day"):b/(2*V.dayDuration)<=a?(this.interval=2,this.intervalType=
"day"):b/(4*V.dayDuration)<=a?(this.interval=4,this.intervalType="day"):b/(1*V.weekDuration)<=a?(this.interval=1,this.intervalType="week"):b/(2*V.weekDuration)<=a?(this.interval=2,this.intervalType="week"):b/(3*V.weekDuration)<=a?(this.interval=3,this.intervalType="week"):b/(1*V.monthDuration)<=a?(this.interval=1,this.intervalType="month"):b/(2*V.monthDuration)<=a?(this.interval=2,this.intervalType="month"):b/(3*V.monthDuration)<=a?(this.interval=3,this.intervalType="month"):b/(6*V.monthDuration)<=
a?(this.interval=6,this.intervalType="month"):(this.interval=b/(1*V.yearDuration)<=a?1:b/(2*V.yearDuration)<=a?2:b/(4*V.yearDuration)<=a?4:Math.floor(B.getNiceNumber(b/(a-1),!0)/V.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=d-g/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=f+g/2;e?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=B.getNiceNumber(b,!1);this.interval=this.options&&0<this.options.interval?this.options.interval:B.getNiceNumber(b/(a-1),!0);if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?d-g/2:Math.floor(d/this.interval)*this.interval;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?f+g/2:Math.ceil(f/this.interval)*this.interval;
0===this.viewportMaximum&&0===this.viewportMinimum&&(0===this.options.viewportMinimum?this.viewportMaximum+=10:0===this.options.viewportMaximum&&(this.viewportMinimum-=10),this.options&&"undefined"===typeof this.options.interval&&(this.interval=B.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)))}if(null===this.minimum||null===this.maximum)if("axisX"===this.type?(d=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,0===f-d&&(b=
"undefined"===typeof this.options.interval?0.4:this.options.interval,f+=b,d-=b),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<f-d?0.5*Math.abs(f-d):1):"axisY"===this.type&&(d=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(d)||isFinite(f)?0===d&&0===f?(f+=9,d=0):0===f-d?(b=Math.min(Math.abs(0.01*Math.abs(f)),5),f+=b,d-=b):d>f?(b=Math.min(0.01*Math.abs(this.getApparentDifference(f,d,null,!0)),5),0<=f?d=f-b:f=isFinite(d)?
d+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(d,f,null,!0)),0.05),0!==f&&(f+=b),0!==d&&(d-=b)):(f="undefined"===typeof this.options.interval?-Infinity:this.options.interval,d="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),g=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<f-d?0.5*Math.abs(f-d):1,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&0<d&&(d=0),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&0>f&&(f=
0)),Math.abs(this.getApparentDifference(d,f,null,!0)),"axisX"===this.type&&c){this.valueType="dateTime";if(null===this.minimum||isNaN(this.minimum))this.minimum=d-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?d-g/2:Math.floor(d/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));l(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));l(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=B.generateValueFormatString(this.range,2))}};B.prototype.calculateLogarithmicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),e=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,d,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.length;g++)if((!l(this.sessionVariables.newViewportMinimum)&&
this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[g].startValue||!l(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[g].startValue||!l(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[g].startValue)&&(!l(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[g].endValue||!l(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[g].endValue||
!l(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,d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,1===d/b&&(g=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),d*=g,b/=g),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:
d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=b&&!isFinite(d)?(d="undefined"===typeof this.options.interval?0:this.options.interval,b=1):0>=b?b=d:isFinite(d)||(d=b),1===b&&1===d?(d*=this.logarithmBase-1/this.logarithmBase,b=1):1===d/b?(g=Math.min(d*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,
5)),d*=g,b/=g):b>d?(g=Math.min(b/d*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=d?b=d/g:d=b*g):(g=Math.min(d/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==d&&(d*=g),1!==b&&(b/=g)),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1<b&&(b=1),this.includeZero&&(null===this.viewportMaximum||
isNaN(this.viewportMaximum))&&1>d&&(d=1));g=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?d:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);var r=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?d:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);this.intervalType="number";g=Math.pow(this.logarithmBase,B.getNiceNumber(Math.abs(Math.log(g)/e),!1));this.options&&0<this.options.interval?
this.interval=this.options.interval:(this.interval=B.getNiceExponent(Math.log(g)/e/(a-1),!0),c=B.getNiceNumber(r/(a-1),!0));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?b/Math.sqrt(f):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/e/this.interval));if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?d*Math.sqrt(f):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(d)/
e/this.interval));1===this.viewportMaximum&&1===this.viewportMinimum&&(1===this.options.viewportMinimum?this.viewportMaximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.viewportMaximum&&(this.viewportMinimum/=this.logarithmBase-1/this.logarithmBase),this.options&&"undefined"===typeof this.options.interval&&(this.interval=B.getNiceExponent(Math.ceil(Math.log(g)/e)/(a-1)),c=B.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)));if(null===this.minimum||null===this.maximum)"axisX"===
this.type?(b=null!==this.minimum?this.minimum:this.dataInfo.min,d=null!==this.maximum?this.maximum:this.dataInfo.max,1===d/b&&(g=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),d*=g,b/=g),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.minimum?this.minimum:this.dataInfo.min,d=null!==this.maximum?this.maximum:this.dataInfo.max,
isFinite(b)||isFinite(d)?1===b&&1===d?(d*=this.logarithmBase,b/=this.logarithmBase):1===d/b?(g=Math.pow(this.logarithmBase,this.interval),d*=g,b/=g):b>d?(g=Math.min(0.01*(b/d),5),1<=d?b=d/g:d=b*g):(g=Math.min(d/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==d&&(d*=g),1!==b&&(b/=g)):(d="undefined"===typeof this.options.interval?0:this.options.interval,b=1),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):
this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<b&&(b=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>d&&(d=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)/e/this.interval)),l(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?d*Math.sqrt(f):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(d)/
e/this.interval)),l(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)/(e*this.interval)+0.2)*this.interval);this.range=this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&
this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>a?2:3)){for(e=Math.floor(this.viewportMinimum/c+0.5)*c;e<this.viewportMinimum;)e+=c;this.equidistantInterval=!1;this.intervalStartPosition=e;this.interval=c}else this.options.interval||(c=Math.ceil(this.interval),this.range>this.interval&&(this.interval=c,b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(e*this.interval)+0.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=b;if(!this.valueFormatString&&
(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){e=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(e)||!isFinite(e))e=2;if(2<e)for(g=0;g<e-2;g++)this.valueFormatString+="#"}};B.generateValueFormatString=function(a,e){var c="#,##0.",b=e;1>a&&(b+=Math.floor(Math.abs(Math.log(a)/Math.LN10)),isNaN(b)||!isFinite(b))&&(b=e);for(var d=0;d<b;d++)c+="#";return c};B.getNiceExponent=function(a,e){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=0>c?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))};B.getNiceNumber=function(a,e){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=e?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))};B.prototype.getLabelStartPoint=function(){var a=V[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===
this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||
0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+(7-a.getDay())),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),
a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0));return a};oa(fa,U);oa(ba,U);ba.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var e=0;this.parent.options._isPlaceholder&&
this.parent.createUserOptions();this.options._isPlaceholder||(Ca(this.parent[this.optionsName]),e=this.parent.options[this.optionsName].indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options[this.optionsName][e]=this.options}};ba.prototype.render=function(a){if(0!==this.spacing||0!==this.options.lineThickness&&("undefined"!==typeof this.options.lineThickness||0!==this.parent.lineThickness)){var e=this.ctx,c=this.ctx.globalAlpha;this.ctx=a||this.ctx;this.ctx.save();this.ctx.beginPath();
this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();var b=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue),d=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;T(this.id);var f,g,l,r,k,m;a=Math.max(this.spacing,3);var n=Math.max(0,this.lineThickness);this.ctx.lineWidth=n;this.ctx.setLineDash&&
this.ctx.setLineDash(K(this.lineDashType,n));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===n%2?(b.x<<0)+0.5:b.x<<0,g=1===n%2?(d.x<<0)+0.5:d.x<<0,"top"===this.scaleBreaks.parent._position?(d=this.chart.plotArea.y1,l=this.chart.plotArea.y2+n/2+0.5<<0):(d=this.chart.plotArea.y2,l=this.chart.plotArea.y1-n/2+0.5<<0,a*=-1),this.bounds={x1:b-n/2,y1:d,x2:g+n/2,y2:l},this.ctx.moveTo(b,d),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&
0>=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,l),this.ctx.lineTo(g,l),this.ctx.lineTo(g,d);else if("wavy"===this.type){r=b;k=d;f=0.5;m=(l-k)/a/3;for(var p=0;p<m;p++)this.ctx.bezierCurveTo(r+f*a,k+a,r+f*a,k+2*a,r,k+3*a),k+=3*a,f*=-1;this.ctx.bezierCurveTo(r+f*a,k+a,r+f*a,k+2*a,r,k+3*a);r=g;f*=-1;this.ctx.lineTo(r,k);for(p=0;p<m;p++)this.ctx.bezierCurveTo(r+f*a,k-a,r+f*a,k-2*a,r,k-3*a),k-=3*a,f*=-1}else{if("zigzag"===this.type){f=-1;k=d+a;r=b+a;m=(l-k)/a/2;for(p=0;p<m;p++)this.ctx.lineTo(r,
k),r+=2*f*a,k+=2*a,f*=-1;this.ctx.lineTo(r,k);r+=g-b;for(p=0;p<m+1;p++)this.ctx.lineTo(r,k),r+=2*f*a,k-=2*a,f*=-1;this.ctx.lineTo(r+f*a,k+a)}}else if("left"===this.scaleBreaks.parent._position||"right"===this.scaleBreaks.parent._position)if(d=1===n%2?(d.y<<0)+0.5:d.y<<0,l=1===n%2?(b.y<<0)+0.5:b.y<<0,"left"===this.scaleBreaks.parent._position?(b=this.chart.plotArea.x1,g=this.chart.plotArea.x2+n/2+0.5<<0):(b=this.chart.plotArea.x2,g=this.chart.plotArea.x1-n/2+0.5<<0,a*=-1),this.bounds={x1:b,y1:d-n/
2,x2:g,y2:l+n/2},this.ctx.moveTo(b,d),"straight"===this.type||"left"===this.scaleBreaks.parent._position&&0>=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(g,d),this.ctx.lineTo(g,l),this.ctx.lineTo(b,l);else if("wavy"===this.type){r=b;k=d;f=0.5;m=(g-r)/a/3;for(p=0;p<m;p++)this.ctx.bezierCurveTo(r+a,k+f*a,r+2*a,k+f*a,r+3*a,k),r+=3*a,f*=-1;this.ctx.bezierCurveTo(r+a,k+f*a,r+2*a,k+f*a,r+3*a,k);k=l;f*=-1;this.ctx.lineTo(r,k);for(p=0;p<m;p++)this.ctx.bezierCurveTo(r-a,k+f*a,r-2*a,
k+f*a,r-3*a,k),r-=3*a,f*=-1}else if("zigzag"===this.type){f=1;k=d-a;r=b+a;m=(g-r)/a/2;for(p=0;p<m;p++)this.ctx.lineTo(r,k),k+=2*f*a,r+=2*a,f*=-1;this.ctx.lineTo(r,k);k+=l-d;for(p=0;p<m+1;p++)this.ctx.lineTo(r,k),k+=2*f*a,r-=2*a,f*=-1;this.ctx.lineTo(r+a,k+f*a)}0<n&&this.ctx.stroke();this.ctx.closePath();this.ctx.globalAlpha=this.fillOpacity;this.ctx.globalCompositeOperation="destination-over";this.ctx.fill();this.ctx.restore();this.ctx.globalAlpha=c;this.ctx=e}};oa(ga,U);ga.prototype.createUserOptions=
function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var e=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Ca(this.parent.stripLines),e=this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[e]=this.options}};ga.prototype.render=function(){this.ctx.save();var a=this.parent.getPixelCoordinatesOnAxis(this.value),e=Math.abs("pixel"===this._thicknessType?this.thickness:
Math.abs(this.parent.convertValueToPixel(this.endValue)-this.parent.convertValueToPixel(this.startValue)));if(0<e){var c=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;T(this.id);var d,f,g,l;this.ctx.lineWidth=e;this.ctx.setLineDash&&this.ctx.setLineDash(K(this.lineDashType,e));if("bottom"===this.parent._position||"top"===this.parent._position)d=f=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,g=this.chart.plotArea.y1,
l=this.chart.plotArea.y2,this.bounds={x1:d-e/2,y1:g,x2:f+e/2,y2:l};else if("left"===this.parent._position||"right"===this.parent._position)g=l=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,d=this.chart.plotArea.x1,f=this.chart.plotArea.x2,this.bounds={x1:d,y1:g-e/2,x2:f,y2:l+e/2};this.ctx.moveTo(d,g);this.ctx.lineTo(f,l);this.ctx.stroke();this.ctx.globalAlpha=b}this.ctx.restore()};oa(da,U);da.prototype.showAt=function(a){if(!this.enabled)return!1;var e=this.chart,c=!1;e.resetOverlayedCanvas();e.clearedOverlayedCanvas=
this.parent.type;this.chart.renderCrosshairs(this.parent);if("xySwapped"===e.plotInfo.axisPlacement)if("bottom"===this.parent._position)for(var b=0;b<e.axisY.length;b++)this.parent===e.axisY[b]&&(e.axisY[b]._crosshairValue=a>=e.axisY[b].viewportMinimum&&a<=e.axisY[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<e.axisY2.length;b++)this.parent===e.axisY2[b]&&(e.axisY2[b]._crosshairValue=a>=e.axisY2[b].viewportMinimum&&a<=e.axisY2[b].viewportMaximum?a:null);else if("left"===
this.parent._position)for(b=0;b<e.axisX.length;b++)this.parent===e.axisX[b]&&(e.axisX[b]._crosshairValue=a>=e.axisX[b].viewportMinimum&&a<=e.axisX[b].viewportMaximum?a:null);else{if("right"===this.parent._position)for(b=0;b<e.axisX2.length;b++)this.parent===e.axisX2[b]&&(e.axisX2[b]._crosshairValue=a>=e.axisX2[b].viewportMinimum&&a<=e.axisX2[b].viewportMaximum?a:null)}else if("bottom"===this.parent._position)for(b=0;b<e.axisX.length;b++)this.parent===e.axisX[b]&&(e.axisX[b]._crosshairValue=a>=e.axisX[b].viewportMinimum&&
a<=e.axisX[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<e.axisX2.length;b++)this.parent===e.axisX2[b]&&(e.axisX2[b]._crosshairValue=a>=e.axisX2[b].viewportMinimum&&a<=e.axisX2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=0;b<e.axisY.length;b++)this.parent===e.axisY[b]&&(e.axisY[b]._crosshairValue=a>=e.axisY[b].viewportMinimum&&a<=e.axisY[b].viewportMaximum?a:null);else if("right"===this.parent._position)for(b=0;b<e.axisY2.length;b++)this.parent===
e.axisY2[b]&&(e.axisY2[b]._crosshairValue=a>=e.axisY2[b].viewportMinimum&&a<=e.axisY2[b].viewportMaximum?a:null);for(b=0;b<e.axisX.length;b++)a=e.axisX[b]._crosshairValue,e.axisX[b].crosshair&&e.axisX[b].crosshair.enabled&&(!l(a)&&a>=e.axisX[b].viewportMinimum&&a<=e.axisX[b].viewportMaximum?(e.axisX[b].showCrosshair(a),e.axisX[b].sessionVariables.crosshairValue=e.axisX[b].crosshair._updatedValue=a,this===e.axisX[b].crosshair&&(c=!0)):void 0!==a&&(e.axisX[b].sessionVariables.crosshairValue=e.axisX[b].crosshair._updatedValue=
null));for(b=0;b<e.axisX2.length;b++)a=e.axisX2[b]._crosshairValue,e.axisX2[b].crosshair&&e.axisX2[b].crosshair.enabled&&(!l(a)&&a>=e.axisX2[b].viewportMinimum&&a<=e.axisX2[b].viewportMaximum?(e.axisX2[b].showCrosshair(a),e.axisX2[b].sessionVariables.crosshairValue=e.axisX2[b].crosshair._updatedValue=a,this===e.axisX2[b].crosshair&&(c=!0)):void 0!==a&&(e.axisX2[b].sessionVariables.crosshairValue=e.axisX2[b].crosshair._updatedValue=null));for(b=0;b<e.axisY.length;b++)a=e.axisY[b]._crosshairValue,e.axisY[b].crosshair&&
e.axisY[b].crosshair.enabled&&(!l(a)&&a>=e.axisY[b].viewportMinimum&&a<=e.axisY[b].viewportMaximum?(e.axisY[b].showCrosshair(a),e.axisY[b].sessionVariables.crosshairValue=e.axisY[b].crosshair._updatedValue=a,this===e.axisY[b].crosshair&&(c=!0)):void 0!==a&&(e.axisY[b].sessionVariables.crosshairValue=e.axisY[b].crosshair._updatedValue=null));for(b=0;b<e.axisY2.length;b++)a=e.axisY2[b]._crosshairValue,e.axisY2[b].crosshair&&e.axisY2[b].crosshair.enabled&&(!l(a)&&a>=e.axisY2[b].viewportMinimum&&a<=e.axisY2[b].viewportMaximum?
(e.axisY2[b].showCrosshair(a),e.axisY2[b].sessionVariables.crosshairValue=e.axisY2[b].crosshair._updatedValue=a,this===e.axisY2[b].crosshair&&(c=!0)):void 0!==a&&(e.axisY2[b].sessionVariables.crosshairValue=e.axisY2[b].crosshair._updatedValue=null));this.chart.toolTip&&this.chart.toolTip._entries&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);e.sessionVariables.crosshairShownByPixel=!1;return c};da.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.renderCrosshairs(this.parent);
this._hidden=!0};da.prototype.render=function(a,e,c){var b,d,f,g,r=null,t=null,k=null,m="";this.valueFormatString||("dateTime"===this.parent.valueType?this.valueFormatString=this.parent.valueFormatString:(k=0,k="xySwapped"===this.chart.plotInfo.axisPlacement?50<this.parent.range?0:500<this.chart.width&&25>this.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):50<this.parent.range?0:Math.floor(Math.abs(Math.log(this.parent.range)/
Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0),this.valueFormatString=B.generateValueFormatString(this.parent.range,k)));var n=null===this.opacity?1:this.opacity,p=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness),h=this.chart.overlaidCanvasCtx,u=h.globalAlpha;h.beginPath();h.strokeStyle=this.color;h.lineWidth=p;h.save();this.labelFontSize=Math.abs(l(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize);
this.labelMaxWidth=l(this.options.labelMaxWidth)?0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=l(this.options.labelWrap)||this.labelWrap?0.3*this.chart.height:1.5*this.labelFontSize+("object"===typeof this.labelPadding?(this.labelPadding.top||0)+(this.labelPadding.bottom||0):2*this.labelPadding);0<p&&h.setLineDash&&h.setLineDash(K(this.lineDashType,p));k=new ja(h,{x:0,y:0,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,
cornerRadius:this.labelCornerRadius,maxWidth:this.labelMaxWidth,maxHeight:this.labelMaxHeight,angle:this.labelAngle,text:m,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,padding:this.labelPadding,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"});if(this.snapToDataPoint){var A=0,m=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var z=null;if("bottom"===this.parent._position||"top"===
this.parent._position)A=this.parent.dataSeries[0].axisX.convertPixelToValue({y:e});else if("left"===this.parent._position||"right"===this.parent._position)A=this.parent.convertPixelToValue({y:e});for(var s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0,!0))&&0<=z.index&&(z.dataSeries=this.parent.dataSeries[s],null!==z.dataPoint.y&&z.dataSeries.visible&&m.push(z));z=null;if(0===m.length)return;m.sort(function(a,b){return a.distance-b.distance});var x=z=0;yPercent=
cumulativeY=0;for(var A=Infinity,v,s=0;s<m.length;s++){if("rangeBar"===m[s].dataSeries.type||"error"===m[s].dataSeries.type){if(m[s].dataPoint.y)for(var C=0;C<m[s].dataPoint.y.length;C++)x=Math.abs(a-this.parent.convertValueToPixel(m[s].dataPoint.y[C])),x<=A&&(A=x,z=s)}else"stackedBar"===m[s].dataSeries.type?(cumulativeY=m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY,x=Math.abs(a-this.parent.convertValueToPixel(cumulativeY)),x<=A&&(A=x,z=s)):"stackedBar100"===m[s].dataSeries.type?(x=m[0].dataPoint.x.getTime?
m[0].dataPoint.x.getTime():m[0].dataPoint.x,l(v)&&(v=Math.abs(a-this.parent.convertValueToPixel(100*(m[0].dataSeries.dataPointEOs[m[0].index].cumulativeY/m[0].dataSeries.plotUnit.dataPointYSums[x])))),cumulativeY=m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY,x=m[s].dataPoint.x.getTime?m[s].dataPoint.x.getTime():m[s].dataPoint.x,yPercent=100*(cumulativeY/m[s].dataSeries.plotUnit.dataPointYSums[x]),x=Math.abs(a-this.parent.convertValueToPixel(yPercent)),x<=v&&(v=x,z=s)):(x=Math.abs(a-this.parent.convertValueToPixel(m[s].dataPoint.y)),
x<=A&&(A=x,z=s));l(v)||(A=Math.min(A,v))}v=m[z];s=0;if("bottom"===this.parent._position||"top"===this.parent._position){if("rangeBar"===v.dataSeries.type||"error"===v.dataSeries.type){A=Math.abs(a-this.parent.convertValueToPixel(v.dataPoint.y[0]));for(m=0;m<v.dataPoint.y.length;m++)x=Math.abs(a-this.parent.convertValueToPixel(v.dataPoint.y[m])),x<A&&(A=x,s=m);r=1===h.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y[s])<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y[s])<<0;this.value=
v.dataPoint.y[s];k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.y[s]}):l(this.options.label)?ea(l(c)?v.dataPoint.y[s]:c,this.valueFormatString,this.chart._cultureInfo):this.label}else"stackedBar"===v.dataSeries.type?(A=Math.abs(a-this.parent.convertValueToPixel(m[0].dataPoint.y)),cumulativeY=v.dataSeries.dataPointEOs[v.index].cumulativeY,r=1===h.lineWidth%2?(this.parent.convertValueToPixel(cumulativeY)<<0)+0.5:this.parent.convertValueToPixel(cumulativeY)<<
0,this.value=cumulativeY,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:cumulativeY}):l(this.options.label)?ea(l(c)?cumulativeY:c,this.valueFormatString,this.chart._cultureInfo):this.label):"stackedBar100"===v.dataSeries.type?(A=Math.abs(a-this.parent.convertValueToPixel(m[0].dataPoint.y)),cumulativeY=v.dataSeries.dataPointEOs[v.index].cumulativeY,x=v.dataPoint.x.getTime?v.dataPoint.x.getTime():v.dataPoint.x,yPercent=100*(cumulativeY/
v.dataSeries.plotUnit.dataPointYSums[x]),r=1===h.lineWidth%2?(this.parent.convertValueToPixel(yPercent)<<0)+0.5:this.parent.convertValueToPixel(yPercent)<<0,this.value=yPercent,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:yPercent}):l(this.options.label)?ea(l(c)?yPercent:c,this.valueFormatString,this.chart._cultureInfo):this.label):(r=1===h.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y)<<
0,this.value=v.dataPoint.y,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.y}):l(this.options.label)?ea(l(c)?v.dataPoint.y:c,this.valueFormatString,this.chart._cultureInfo):this.label);b=d=r;f=this.chart.plotArea.y1;g=this.chart.plotArea.y2;this.bounds={x1:b-p/2,y1:f,x2:d+p/2,y2:g};k.x=b-k.measureText().width/2;k.x+k.width>this.chart.bounds.x2?k.x=this.chart.bounds.x2-k.width:k.x<this.chart.bounds.x1&&(k.x=this.chart.bounds.x1);
k.y=this.parent.lineCoordinates.y2+("top"===this.parent._position?-k.height+this.parent.tickLength:k.fontSize/2)+2;k.y+k.height>this.chart.bounds.y2?k.y=this.chart.bounds.y2-k.height:k.y<this.chart.bounds.y1&&(k.y=this.chart.bounds.y1)}else if("left"===this.parent._position||"right"===this.parent._position){f=g=t=1===h.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.x)<<0;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds=
{x1:b,y1:f-p/2,x2:d,y2:g+p/2};s=!1;if(this.parent.labels)for(A=Math.ceil(this.parent.interval),m=0;m<this.parent.viewportMaximum;m+=A)if(this.parent.labels[m])s=!0;else{s=!1;break}if(s){if("axisX"===this.parent.type)for(A=this.parent.convertPixelToValue({y:e}),z=null,s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0,!0))&&0<=z.index&&(k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.x}):
l(this.options.label)?z.dataPoint.label:this.label)}else k.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?ea(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?Ba(v.dataPoint.x,
this.valueFormatString,this.chart._cultureInfo):this.label;this.value=v.dataPoint.x;k.y=g+k.fontSize/2-k.measureText().height/2+2;k.y-k.fontSize/2<this.chart.bounds.y1?k.y=this.chart.bounds.y1+k.fontSize/2+2:k.y+k.measureText().height-k.fontSize/2>this.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){A=this.parent.convertPixelToValue({x:a});for(s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0,!0))&&0<=z.index&&(z.dataSeries=this.parent.dataSeries[s],null!==z.dataPoint.y&&z.dataSeries.visible&&m.push(z));if(0===m.length)return;m.sort(function(a,b){return a.distance-b.distance});v=m[0];b=d=r=1===h.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.x)<<
0;f=this.chart.plotArea.y1;g=this.chart.plotArea.y2;this.bounds={x1:b-p/2,y1:f,x2:d+p/2,y2:g};s=!1;if(this.parent.labels)for(A=Math.ceil(this.parent.interval),m=0;m<this.parent.viewportMaximum;m+=A)if(this.parent.labels[m])s=!0;else{s=!1;break}if(s){if("axisX"===this.parent.type)for(A=this.parent.convertPixelToValue({x:a}),z=null,s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0,!0))&&0<=z.index&&(k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,
axis:this.parent.options,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?z.dataPoint.label:this.label)}else k.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?ea(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,
crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?Ba(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=v.dataPoint.x;k.x=b-k.measureText().width/2;k.x+k.width>this.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.width);k.x<this.chart.bounds.x1&&(k.x=this.chart.bounds.x1);"bottom"===this.parent._position?k.y=this.parent.lineCoordinates.y2+k.fontSize/2+2:"top"===this.parent._position&&(k.y=this.parent.lineCoordinates.y1-k.height+k.fontSize/2+2)}else if("left"===
this.parent._position||"right"===this.parent._position){!l(this.parent.dataSeries)&&0<this.parent.dataSeries.length&&(A=this.parent.dataSeries[0].axisX.convertPixelToValue({x:a}));for(s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0,!0))&&0<=z.index&&(z.dataSeries=this.parent.dataSeries[s],null!==z.dataPoint.y&&z.dataSeries.visible&&m.push(z));if(0===m.length)return;m.sort(function(a,b){return a.distance-b.distance});x=z=0;A=Infinity;for(s=0;s<m.length;s++){if("rangeColumn"===
m[s].dataSeries.type||"rangeArea"===m[s].dataSeries.type||"error"===m[s].dataSeries.type||"rangeSplineArea"===m[s].dataSeries.type||"candlestick"===m[s].dataSeries.type||"ohlc"===m[s].dataSeries.type||"boxAndWhisker"===m[s].dataSeries.type){if(m[s].dataPoint.y)for(C=0;C<m[s].dataPoint.y.length;C++)x=Math.abs(e-this.parent.convertValueToPixel(m[s].dataPoint.y[C])),x<=A&&(A=x,z=s)}else"stackedColumn"===m[s].dataSeries.type?(b=m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY,x=Math.abs(e-this.parent.convertValueToPixel(b)),
x<=A&&(A=x,z=s)):"stackedArea"===m[s].dataSeries.type?(b=m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY,x=Math.abs(e-this.parent.convertValueToPixel(b)),x<=A&&(A=x,z=s)):"stackedColumn100"===m[s].dataSeries.type||"stackedArea100"===m[s].dataSeries.type?(x=m[0].dataPoint.x.getTime?m[0].dataPoint.x.getTime():m[0].dataPoint.x,l(v)&&(v=Math.abs(e-this.parent.convertValueToPixel(100*(m[0].dataSeries.dataPointEOs[m[0].index].cumulativeY/m[0].dataSeries.plotUnit.dataPointYSums[x])))),"stackedColumn100"===
m[s].dataSeries.type?(t=m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY,x=m[s].dataPoint.x.getTime?m[s].dataPoint.x.getTime():m[s].dataPoint.x,b=100*(t/m[s].dataSeries.plotUnit.dataPointYSums[x]),x=Math.abs(e-this.parent.convertValueToPixel(b)),x<=v&&(v=x,z=s)):"stackedArea100"===m[s].dataSeries.type&&(t=m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY,x=m[s].dataPoint.x.getTime?m[s].dataPoint.x.getTime():m[s].dataPoint.x,b=100*(t/m[s].dataSeries.plotUnit.dataPointYSums[x]),x=Math.abs(e-
this.parent.convertValueToPixel(b)),x<=v&&(v=x,z=s))):"waterfall"===m[s].dataSeries.type?(x=Math.abs(e-this.parent.convertValueToPixel(m[s].dataSeries.dataPointEOs[m[s].index].cumulativeSum)),x<=A&&(v=A=x,z=s)):(x=Math.abs(e-this.parent.convertValueToPixel(m[s].dataPoint.y)),x<=A&&(A=x,z=s));l(v)||(A=Math.min(A,v))}v=m[z];s=0;if("rangeColumn"===v.dataSeries.type||"rangeArea"===v.dataSeries.type||"error"===v.dataSeries.type||"rangeSplineArea"===v.dataSeries.type||"candlestick"===v.dataSeries.type||
"ohlc"===v.dataSeries.type||"boxAndWhisker"===v.dataSeries.type){A=Math.abs(e-this.parent.convertValueToPixel(v.dataPoint.y[0]));for(m=0;m<v.dataPoint.y.length;m++)x=Math.abs(e-this.parent.convertValueToPixel(v.dataPoint.y[m])),x<A&&(A=x,s=m);t=1===h.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y[s])<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y[s])<<0;k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataPoint.y[s]}):
l(this.options.label)?ea(l(c)?v.dataPoint.y[s]:c,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=v.dataPoint.y[s]}else"stackedColumn"===v.dataSeries.type?(b=v.dataSeries.dataPointEOs[v.index].cumulativeY,t=1===h.lineWidth%2?(this.parent.convertValueToPixel(b)<<0)+0.5:this.parent.convertValueToPixel(b)<<0,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:b}):l(this.options.label)?ea(l(c)?b:c,this.valueFormatString,
this.chart._cultureInfo):this.label,this.value=b):"stackedArea"===v.dataSeries.type?(b=v.dataSeries.dataPointEOs[v.index].cumulativeY,t=1===h.lineWidth%2?(this.parent.convertValueToPixel(b)<<0)+0.5:this.parent.convertValueToPixel(b)<<0,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:b}):l(this.options.label)?ea(l(c)?b:c,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=b):"stackedColumn100"===v.dataSeries.type?
(t=v.dataSeries.dataPointEOs[v.index].cumulativeY,x=v.dataPoint.x.getTime?v.dataPoint.x.getTime():v.dataPoint.x,b=100*(t/v.dataSeries.plotUnit.dataPointYSums[x]),t=1===h.lineWidth%2?(this.parent.convertValueToPixel(b)<<0)+0.5:this.parent.convertValueToPixel(b)<<0,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:b}):l(this.options.label)?ea(l(c)?b:c,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=b):"stackedArea100"===
v.dataSeries.type?(t=v.dataSeries.dataPointEOs[v.index].cumulativeY,x=v.dataPoint.x.getTime?v.dataPoint.x.getTime():v.dataPoint.x,b=100*(t/v.dataSeries.plotUnit.dataPointYSums[x]),t=1===h.lineWidth%2?(this.parent.convertValueToPixel(b)<<0)+0.5:this.parent.convertValueToPixel(b)<<0,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:b}):l(this.options.label)?ea(l(c)?b:c,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=
b):"waterfall"===v.dataSeries.type?(t=1===h.lineWidth%2?(this.parent.convertValueToPixel(v.dataSeries.dataPointEOs[v.index].cumulativeSum)<<0)+0.5:this.parent.convertValueToPixel(v.dataSeries.dataPointEOs[v.index].cumulativeSum)<<0,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v.dataSeries.dataPointEOs[v.index].cumulativeSum}):l(this.options.label)?ea(l(c)?v.dataSeries.dataPointEOs[v.index].cumulativeSum:c,this.valueFormatString,
this.chart._cultureInfo):this.label,this.value=v.dataSeries.dataPointEOs[v.index].cumulativeSum):(t=1===h.lineWidth%2?(l(a)?e:this.parent.convertValueToPixel(v.dataPoint.y)<<0)+0.5:l(a)?e:this.parent.convertValueToPixel(v.dataPoint.y)<<0,k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:l(c)?v.dataPoint.y:c}):l(this.options.label)?ea(l(c)?v.dataPoint.y:c,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=v.dataPoint.y);
f=g=t;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds={x1:b,y1:f-p/2,x2:d,y2:g+p/2};k.y=g+k.fontSize/2-k.measureText().height/2+2;k.y-k.fontSize/2<this.chart.bounds.y1?k.y=this.chart.bounds.y1+k.fontSize/2+2:k.y+k.measureText().height-k.fontSize/2>this.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;h.globalAlpha=n;if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&k.y-k.fontSize/2<this.chart.bounds.y1&&(k.y=this.chart.bounds.y1+k.fontSize/2),"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+k.measureText().height>this.chart.bounds.y2&&(k.y=this.chart.bounds.y2-k.height+k.fontSize/2+2),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&
0<p&&(h.moveTo(b,f),h.lineTo(d,g),h.stroke(),this._hidden=!1);if("left"===this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&k.x<this.chart.bounds.x1&&(k.x=this.chart.bounds.x1),"right"===this.parent._position&&k.x+k.measureText().width>this.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.measureText().width),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&
0<p&&(h.moveTo(b,f),h.lineTo(d,g),h.stroke(),this._hidden=!1)}else{if("bottom"===this.parent._position||"top"===this.parent._position)b=d=r=1===h.lineWidth%2?(a<<0)+0.5:a<<0,f=this.chart.plotArea.y1,g=this.chart.plotArea.y2,this.bounds={x1:b-p/2,y1:f,x2:d+p/2,y2:g};else if("left"===this.parent._position||"right"===this.parent._position)f=g=t=1===h.lineWidth%2?(e<<0)+0.5:e<<0,b=this.chart.plotArea.x1,d=this.chart.plotArea.x2,this.bounds={x1:b,y1:f-p/2,x2:d,y2:g+p/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===
this.parent._position||"right"===this.parent._position){s=!1;if(this.parent.labels)for(A=Math.ceil(this.parent.interval),m=0;m<this.parent.viewportMaximum;m+=A)if(this.parent.labels[m])s=!0;else{s=!1;break}if(s){if("axisX"===this.parent.type)for(A=this.parent.convertPixelToValue({y:e}),z=null,s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0))&&0<=z.index&&(k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,
value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?z.dataPoint.label:this.label)}else k.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(e):c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(e):c,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,
axis:this.parent.options,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(e):c}):l(this.options.label)?Ba(l(c)?this.parent.convertPixelToValue(e):c,this.valueFormatString,this.chart._cultureInfo):this.label;k.y=e+k.fontSize/2-k.measureText().height/2+2;k.y-k.fontSize/2<this.chart.bounds.y1?k.y=this.chart.bounds.y1+k.fontSize/2+2:k.y+k.measureText().height-k.fontSize/2>this.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:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(a):c,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.x<this.chart.bounds.x1&&(k.x=this.chart.bounds.x1),"bottom"===this.parent._position?k.y=this.parent.lineCoordinates.y2+k.fontSize/2+2:"top"===this.parent._position&&(k.y=this.parent.lineCoordinates.y1-k.height+k.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){s=!1;m="";if(this.parent.labels)for(A=Math.ceil(this.parent.interval),m=0;m<this.parent.viewportMaximum;m+=A)if(this.parent.labels[m])s=
!0;else{s=!1;break}if(s){if("axisX"===this.parent.type)for(A=this.parent.convertPixelToValue({x:a}),z=null,s=0;s<this.parent.dataSeries.length;s++)(z=this.parent.dataSeries[s].getDataPointAtX(A,!0))&&0<=z.index&&(k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?l(c)?z.dataPoint.label:c:this.label)}else k.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?
this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:l(c)?0<this.parent.dataSeries.length?this.parent.convertPixelToValue(a):"":c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(a):c,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?Ba(l(c)?
this.parent.convertPixelToValue(a):c,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.x<this.chart.bounds.x1&&(k.x=this.chart.bounds.x1);"bottom"===this.parent._position?k.y=this.parent.lineCoordinates.y2+k.fontSize/2+2:"top"===this.parent._position&&(k.y=this.parent.lineCoordinates.y1-k.height+k.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position)k.text=
this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(e):c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(e):c,this.valueFormatString,this.chart._cultureInfo):this.label,k.y=e+k.fontSize/2-k.measureText().height/2+2,k.y-k.fontSize/2<this.chart.bounds.y1?k.y=this.chart.bounds.y1+k.fontSize/2+2:k.y+k.measureText().height-k.fontSize/2>this.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.x<this.chart.bounds.x1?k.x=this.chart.bounds.x1:"right"===this.parent._position&&k.x+k.measureText().width>this.chart.bounds.x2?k.x=this.chart.bounds.x2-k.measureText().width:"top"===this.parent._position&&k.y-k.fontSize/2<this.chart.bounds.y1?k.y=this.chart.bounds.y1+k.fontSize/2:"bottom"===this.parent._position&&
this.parent.lineCoordinates.y2+k.measureText().height>this.chart.bounds.y2&&(k.y=this.chart.bounds.y2-k.height+k.fontSize/2+2);h.globalAlpha=n;0<p&&(h.moveTo(b,f),h.lineTo(d,g),h.stroke(),this._hidden=!1);this.value="bottom"===this.parent._position||"top"===this.parent._position?this.parent.convertPixelToValue(a):this.parent.convertPixelToValue(e)}if("bottom"===this.parent._position||"top"===this.parent._position)this.parent.sessionVariables.crosshairValue=this._updatedValue=this.parent.convertPixelToValue(r);
if("left"===this.parent._position||"right"===this.parent._position)this.parent.sessionVariables.crosshairValue=this._updatedValue=this.parent.convertPixelToValue(t);this._textBlock=k;this._label=c;l(c)||this.renderLabel();h.restore();h.globalAlpha=u};da.prototype.renderLabel=function(){this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&(l(this._textBlock)||(l(this._textBlock.text)||!("number"===
typeof this._textBlock.text.valueOf()||0<this._textBlock.text.length)||this._hidden)||this._textBlock.render(!0),l(this._label)&&this.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this.parent,value:this.value},this.parent))};oa(la,U);la.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("shared");this.updateOption("animationEnabled");this.updateOption("content");this.updateOption("contentFormatter");this.updateOption("reversed");this.updateOption("backgroundColor");
this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("cornerRadius");this.updateOption("fontSize");this.updateOption("fontColor");this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("fontStyle")};la.prototype._initialize=function(){this.updateOption("updated");this.updateOption("hidden");if(this.enabled){this.container=document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position=
"absolute";this.container.style.height="auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";this.container.style.zIndex="1000";this.container.style.pointerEvents="none";this.container.style.display="none";var a=document.createElement("div");a.style.width="auto";a.style.height="auto";a.style.minWidth="50px";a.style.lineHeight="normal";a.style.margin="0px 0px 0px 0px";a.style.padding="5px";a.style.fontFamily="Calibri, Arial, Georgia, serif";a.style.fontWeight="normal";a.style.fontStyle=
r?"italic":"normal";a.style.fontSize="14px";a.style.color="#000000";a.style.textShadow="1px 1px 1px rgba(0, 0, 0, 0.1)";a.style.textAlign="left";a.style.border="2px solid gray";a.style.background=r?"rgba(255,255,255,.9)":"rgb(255,255,255)";a.style.textIndent="0px";a.style.whiteSpace="nowrap";a.style.borderRadius="5px";a.style.MozUserSelect="none";a.style.WebkitUserSelect="none";a.style.msUserSelect="none";a.style.userSelect="none";r||(a.style.filter="alpha(opacity = 90)",a.style.filter="progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666')");
a.innerText="Sample Tooltip";this.container.appendChild(a);this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};la.prototype.mouseMoveHandler=function(a,e){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(a,e),this.enabled&&this._updatedEventParameters&&!isNaN(this._prevX)&&!isNaN(this._prevY)&&
this.container&&this.container.style&&this.dispatchEvent("none"===this.container.style.display?"hidden":"updated",this._updatedEventParameters,this))};la.prototype._updateToolTip=function(a,e,c){c="undefined"===typeof c?!0:c;this._updateOptions();this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof e){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;e=this._prevY}else this._prevX=a,this._prevY=e;var b=
null,d=null,f=[],g=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){var t=[];if(this.chart.axisX)for(var u=0;u<this.chart.axisX.length;u++){for(var g="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX[u].convertPixelToValue({y:e}):this.chart.axisX[u].convertPixelToValue({x:a}),k=null,b=0;b<this.chart.axisX[u].dataSeries.length;b++)(k=this.chart.axisX[u].dataSeries[b].getDataPointAtX(g,c,!0))&&0<=k.index&&(k.dataSeries=this.chart.axisX[u].dataSeries[b],null!==
k.dataPoint.y&&k.dataSeries.visible&&t.push(k));k=null}if(this.chart.axisX2)for(u=0;u<this.chart.axisX2.length;u++){g="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX2[u].convertPixelToValue({y:e}):this.chart.axisX2[u].convertPixelToValue({x:a});k=null;for(b=0;b<this.chart.axisX2[u].dataSeries.length;b++)(k=this.chart.axisX2[u].dataSeries[b].getDataPointAtX(g,c,!0))&&0<=k.index&&(k.dataSeries=this.chart.axisX2[u].dataSeries[b],null!==k.dataPoint.y&&k.dataSeries.visible&&t.push(k));
k=null}if(0===t.length)return;t.sort(function(a,b){return a.dataSeries.axisX.logarithmic||b.dataSeries.axisX.logarithmic?a.distance-b.distance:a.distance/a.dataSeries.axisX.range-b.distance/b.dataSeries.axisX.range});c=t[0];for(b=0;b<t.length;b++)t[b].dataPoint.x.valueOf()===c.dataPoint.x.valueOf()&&f.push(t[b]);t=null}else{if(b=this.chart.getDataPointAtXY(a,e,c))this.currentDataPointIndex=b.dataPointIndex,this.currentSeriesIndex=b.dataSeries.index;else if(r)if(b=Za(a,e,this.chart._eventManager.ghostCtx),
0<b&&"undefined"!==typeof this.chart._eventManager.objectMap[b]){b=this.chart._eventManager.objectMap[b];if("legendItem"===b.objectType)return;this.currentSeriesIndex=b.dataSeriesIndex;this.currentDataPointIndex=0<=b.dataPointIndex?b.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){d=this.chart.data[this.currentSeriesIndex];k={};if(0<=this.currentDataPointIndex)b=d.dataPoints[this.currentDataPointIndex],k.dataSeries=d,k.dataPoint=
b,k.index=this.currentDataPointIndex,k.distance=Math.abs(b.x-g),"waterfall"===d.type&&(k.cumulativeSumYStartValue=d.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue,k.cumulativeSum=d.dataPointEOs[this.currentDataPointIndex].cumulativeSum);else if(this.enabled&&d&&("line"===d.type||"stepLine"===d.type||"spline"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===d.type||"stackedArea"===d.type||"stackedArea100"===d.type||"rangeArea"===d.type||"rangeSplineArea"===d.type||
"candlestick"===d.type||"ohlc"===d.type||"boxAndWhisker"===d.type))g=d.axisX.convertPixelToValue({x:a}),k=d.getDataPointAtX(g,c,!0),l(k)||(k.dataSeries=d,this.currentDataPointIndex=k.index,b=k.dataPoint);else{"toolTip"===this.chart.clearedOverlayedCanvas&&(this.chart.resetOverlayedCanvas(),this.chart.clearedOverlayedCanvas=null,this.container&&(this.container.style.display="none"));return}if(!l(k)&&!l(k.dataPoint)&&!l(k.dataPoint.y))if(k.dataSeries.axisY)if(0<k.dataPoint.y.length){for(b=c=0;b<k.dataPoint.y.length;b++)k.dataPoint.y[b]<
k.dataSeries.axisY.viewportMinimum?c--:k.dataPoint.y[b]>k.dataSeries.axisY.viewportMaximum&&c++;c<k.dataPoint.y.length&&c>-k.dataPoint.y.length&&f.push(k)}else"column"===d.type||"bar"===d.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"===d.type?(c=this.chart._eventManager.objectMap[d.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"===d.type?(c=0,k.cumulativeSumYStartValue<k.dataSeries.axisY.viewportMinimum?c--:k.cumulativeSumYStartValue>k.dataSeries.axisY.viewportMaximum&&c++,k.cumulativeSum<k.dataSeries.axisY.viewportMinimum?c--:k.cumulativeSum>k.dataSeries.axisY.viewportMaximum&&c++,2>c&&-2<c&&f.push(k)):(0<=k.dataSeries.type.indexOf("100")||"stackedColumn"===d.type||"stackedBar"===d.type||"stackedArea"===d.type||
k.dataPoint.y>=k.dataSeries.axisY.viewportMinimum&&k.dataPoint.y<=k.dataSeries.axisY.viewportMaximum)&&f.push(k);else f.push(k)}}if(0<f.length){if(this.highlightObjects(f),this.enabled){c="";c=this.getToolTipInnerHTML({entries:f});if(null!==c){this.contentDiv.innerHTML=c;if(this.isToolTipDefinedInData&&l(this.options.content)&&l(this.options.contentFormatter))for(g=this.contentDiv.getElementsByTagName("span"),b=0;b<g.length;b++)g[b]&&(g[b].style.color=g[b].getAttribute("data-color"));g=!1;"none"===
this.container.style.display&&(g=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:r?"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:0<f[0].dataPoint.y?f[0].dataSeries.risingColor:f[0].dataSeries.fallingColor:
"error"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[d.index%f[0].dataSeries._colorSet.length]: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:
f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=
this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:r?"italic":"normal"}catch(m){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type||"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type||"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||
"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,a-=10);0>a&&(a=Math.max(0,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));e=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):e:f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);e=-e+10;0<e+this.container.clientHeight+5&&(e-=e+this.container.clientHeight+
5-0);this.fixMozTransitionDelay(a,e);!this.animationEnabled||g?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.positionLeft=a;this.positionBottom=e;this.container.style.left=a+"px";this.container.style.bottom=e+"px"}else this.hide(!1),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);e=[];for(b=0;b<f.length;b++)e.push({xValue:f[b].dataPoint.x,dataPoint:f[b].dataPoint,dataSeries:f[b].dataSeries,dataPointIndex:f[b].index,
dataSeriesIndex:f[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,content:c,entries:e};this._entries=f}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);this._dataSeriesIndex=this._xValue=null}};la.prototype.highlightObjects=function(a){var e=this.chart.overlaidCanvasCtx;(l(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas)&&this.container&&this.container.style&&"block"!=this.container.style.display?
(this.chart.resetOverlayedCanvas(),e.clearRect(0,0,this.chart.width,this.chart.height),this.chart.clearedOverlayedCanvas="toolTip"):this.chart.clearedOverlayedCanvas=null;e.save();var c=this.chart.plotArea,b=0;e.beginPath();e.rect(c.x1,c.y1,c.x2-c.x1,c.y2-c.y1);e.clip();for(c=0;c<a.length;c++){var d=a[c];if((d=this.chart._eventManager.objectMap[d.dataSeries.dataPointIds[d.index]])&&d.objectType&&"dataPoint"===d.objectType){var b=this.chart.data[d.dataSeriesIndex],f=b.dataPoints[d.dataPointIndex],
g=d.dataPointIndex;!1===f.highlightEnabled||!0!==b.highlightEnabled&&!0!==f.highlightEnabled||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type?(f=b.getMarkerProperties(g,d.x1,d.y1,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||
Math.ceil(0.1*f.size),X.drawMarkers([f]),"undefined"!==typeof d.y2&&(f=b.getMarkerProperties(g,d.x1,d.y2,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||Math.ceil(0.1*f.size),X.drawMarkers([f]))):"bubble"===b.type?(f=b.getMarkerProperties(g,d.x1,d.y1,this.chart.overlaidCanvasCtx),f.size=d.size,f.color="white",f.borderColor="white",e.globalAlpha=0.3,X.drawMarkers([f]),e.globalAlpha=1):"column"===b.type||"stackedColumn"===
b.type||"stackedColumn100"===b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?Y(e,d.x1,d.y1,d.x2,d.y2,"white",0,null,!1,!1,!1,!1,0.3):"pie"===b.type||"doughnut"===b.type?pa(e,d.center,d.radius,"white",b.type,d.startAngle,d.endAngle,0.3,d.percentInnerRadius):"funnel"===b.type||"pyramid"===b.type?qa(e,d.funnelSection,0.3,"white"):"candlestick"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,
b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,Math.min(d.y2,d.y3)),e.lineTo(d.x3-b,Math.min(d.y1,d.y4)),e.stroke(),e.beginPath(),e.moveTo(d.x3-b,Math.max(d.y1,d.y4)),e.lineTo(d.x3-b,Math.max(d.y2,d.y3)),e.stroke(),Y(e,d.x1,Math.min(d.y1,d.y4),d.x2,Math.max(d.y1,d.y4),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1):"ohlc"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,d.y2),e.lineTo(d.x3-
b,d.y3),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y1),e.lineTo(d.x1,d.y1),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4),e.lineTo(d.x2,d.y4),e.stroke(),e.globalAlpha=1):"boxAndWhisker"===b.type?(e.save(),e.globalAlpha=1,e.strokeStyle=d.stemColor,e.lineWidth=2*d.stemThickness,0<d.stemThickness&&(e.beginPath(),e.moveTo(d.x3,d.y2+d.borderThickness/2),e.lineTo(d.x3,d.y1+d.whiskerThickness/2),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4-d.whiskerThickness/2),e.lineTo(d.x3,d.y3-d.borderThickness/2),e.stroke()),
e.beginPath(),Y(e,d.x1,Math.max(d.y2,d.y3),d.x2,Math.min(d.y2,d.y3),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1,e.strokeStyle=d.whiskerColor,e.lineWidth=2*d.whiskerThickness,0<d.whiskerThickness&&(e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y4),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y4),e.stroke(),e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y1),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y1),e.stroke()),e.globalAlpha=1,e.strokeStyle=
d.lineColor,e.lineWidth=2*d.lineThickness,0<d.lineThickness&&(e.beginPath(),e.moveTo(d.x1,d.y5),e.lineTo(d.x2,d.y5),e.stroke()),e.restore(),e.globalAlpha=1):"error"===b.type&&C(e,d.x1,d.y1,d.x2,d.y2,"white",d.whiskerProperties,d.stemProperties,d.isXYSwapped,0.3))}}e.restore();e.globalAlpha=1;e.beginPath()};la.prototype.getToolTipInnerHTML=function(a){a=a.entries;var e=null,c=null,b=null,d=0,f="";this.isToolTipDefinedInData=!0;for(var g=0;g<a.length;g++)if(a[g].dataSeries.toolTipContent||a[g].dataPoint.toolTipContent){this.isToolTipDefinedInData=
!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))a={chart:this.chart,toolTip:this.options,entries:a},e=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var l=null,r="",g=0;g<a.length;g++){c=a[g].dataSeries;b=a[g].dataPoint;d=a[g].index;f="";if(0===g&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?r+="undefined"!==
typeof this.chart.axisX[0].labels[b.x]?this.chart.axisX[0].labels[b.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(r+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}");r+="</br>";if(!c.visible)continue;r=this.chart.replaceKeywordsWithValue(r,b,c,d)}null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent||("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?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+
(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}",l=c.axisXIndex):"bubble"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}"):"rangeColumn"===
c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type||"error"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}"):"candlestick"===c.type||"ohlc"===
c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low:&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}"):"boxAndWhisker"===c.type&&
(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Minimum: &nbsp;{y[0]}<br/>Q1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}"),
null===e&&(e=""),c.visible&&(!0===this.reversed?(e=this.chart.replaceKeywordsWithValue(f,b,c,d)+e,g<a.length-1&&(e="</br>"+e)):(e+=this.chart.replaceKeywordsWithValue(f,b,c,d),g<a.length-1&&(e+="</br>"))))}null!==e&&(e=r+e)}else{c=a[0].dataSeries;b=a[0].dataPoint;d=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:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}":"bubble"===c.type?
f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{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:"<span data-color='\""+(this.options.fontColor?
"":"'{color}'")+"\"'>"+(b.name?"{name}:</span>&nbsp;&nbsp;":b.label?"{label}:</span>&nbsp;&nbsp;":"</span>")+"{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:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{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:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+"</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low: &nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}":"boxAndWhisker"===c.type&&(f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&
"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+"</span><br/>Minimum: &nbsp;{y[0]}<br/>Q1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}");null===e&&(e="");e+=this.chart.replaceKeywordsWithValue(f,
b,c,d)}return e};la.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}};la.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",
this.container.style.MsTransition="",this.container.style.transition="")};la.prototype.hide=function(a){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._entries=this._dataSeriesIndex=this._xValue=null,this._prevY=this._prevX=NaN,this._updatedEventParameters=null,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};la.prototype.show=function(a,e,c){this._updateToolTip(a,e,"undefined"===typeof c?!1:c)};la.prototype.showAtIndex=function(a,e){};la.prototype.showAtX=
function(a,e){if(!this.enabled)return!1;!l(this.chart.clearedOverlayedCanvas)&&this.chart.clearedOverlayedCanvas.indexOf("axis")&&(this.chart.clearedOverlayedCanvas=null);this._updateOptions();var c,b,d,f=[];d=!1;e=!l(e)&&0<=e&&e<this.chart.data.length?e:0;if(this.shared)for(var g=0;g<this.chart.data.length;g++)c=this.chart.data[g],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!l(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,this.chart.data[e].axisX.convertValueToPixel(a)===c.axisX.convertValueToPixel(b.dataPoint.x)&&
f.push(b));else c=this.chart.data[e],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!l(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,f.push(b));if(0<f.length){for(g=0;g<f.length;g++)if(b=f[g],(this.shared||0<=b.dataSeries.type.indexOf("100"))&&b.dataSeries.axisX&&b.dataPoint.x>=b.dataSeries.axisX.viewportMinimum&&b.dataPoint.x<=b.dataSeries.axisX.viewportMaximum){d=!1;break}else if(b.dataSeries.axisX&&b.dataSeries.axisY&&(b.dataPoint.x<b.dataSeries.axisX.viewportMinimum||b.dataPoint.x>b.dataSeries.axisX.viewportMaximum||
b.dataPoint.y<b.dataSeries.axisY.viewportMinimum||b.dataPoint.y>b.dataSeries.axisY.viewportMaximum))d=!0;else{d=!1;break}if(d)return this.hide(),!1;this._entries=f;g="";g=this.getToolTipInnerHTML({entries:f});if(null!==g){this.contentDiv.innerHTML=g;if(this.isToolTipDefinedInData&&l(this.options.content)&&l(this.options.contentFormatter))for(b=this.contentDiv.getElementsByTagName("span"),g=0;g<b.length;g++)b[g]&&(b[g].style.color=b[g].getAttribute("data-color"));g=!1;"none"===this.container.style.display&&
(g=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:r?"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:0<f[0].dataPoint.y?f[0].dataSeries.risingColor:f[0].dataSeries.fallingColor:"error"===
f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[c.index%f[0].dataSeries._colorSet.length]: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:f[0].dataSeries.color?
f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?
this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:r?"italic":"normal"}catch(t){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?c=f[0].dataSeries.dataPointEOs[f[0].index].center.x+f[0].dataSeries.radius*Math.cos(f[0].dataSeries.dataPointEOs[f[0].index].midAngle)+-("left"===f[0].dataSeries.dataPointEOs[f[0].index].hemisphere?
0:this.container.clientWidth):"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].sectionsofFunnel,c=(b.x1+b.x2-this.container.clientWidth)/2):(c="bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?f[0].dataPoint.y[f[0].dataPoint.y.length-1]:f[0].dataPoint.y)-this.container.clientWidth<<
0:f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(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));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?"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].center.y+f[0].dataSeries.radius*Math.sin(f[0].dataSeries.dataPointEOs[f[0].index].midAngle),b<f[0].dataSeries.dataPointEOs[f[0].index].center.y&&(b+=this.container.clientHeight)):"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].dataSeries.reversed?f[0].dataSeries.dataPointEOs.length-
1-f[0].index:f[0].index].sectionsofFunnel,b="undefined"!==typeof b.x5?(b.y2+b.y4)/2:(b.y2+b.y3)/2+this.container.clientHeight/2):b="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.length?f[0].dataPoint.y[f[0].dataPoint.y.length-1]:f[0].dataPoint.y):b=f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);
b=-b+10;0<b+this.container.clientHeight+5&&(b-=b+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,b);!this.animationEnabled||g?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=b+"px"}else return this.hide(!1),!1}else return this.hide(),!1;this._xValue=a;this._dataSeriesIndex=e;this._prevY=this._prevX=NaN;return!0};la.prototype.fixMozTransitionDelay=function(a,e){if(20<
this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-e,2))?this.mozContainerTransition=this.getContainerTransition(0.1):this.mozContainerTransition=this.getContainerTransition(0)}};la.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ha.prototype.reset=
function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];r&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ha.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ha.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var e=[],c=Oa(a),b=null;if((b=this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=
this.objectMap[b],"dataPoint"===b.objectType){var d=this.chart.data[b.dataSeriesIndex],f=d.dataPoints[b.dataPointIndex],g=b.dataPointIndex;b.eventParameter={x:c.x,y:c.y,dataPoint:f,dataSeries:d.options,dataPointIndex:g,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:f,userContext:f,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};e.push(b);b=this.objectMap[d.id];b.eventParameter={x:c.x,y:c.y,dataPoint:f,dataSeries:d.options,dataPointIndex:g,dataSeriesIndex:d.index,
chart:this.chart};b.eventContext={context:d,userContext:d.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};e.push(this.objectMap[d.id])}else"legendItem"===b.objectType&&(d=this.chart.data[b.dataSeriesIndex],f=null!==b.dataPointIndex?d.dataPoints[b.dataPointIndex]:null,b.eventParameter={x:c.x,y:c.y,dataSeries:d.options,dataPoint:f,dataPointIndex:b.dataPointIndex,dataSeriesIndex:b.dataSeriesIndex,chart:this.chart},b.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,
mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},e.push(b));d=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){f=!0;for(b=0;b<e.length;b++)if(e[b].id===this.mouseoveredObjectMaps[c].id){f=!1;break}f?this.fireEvent(this.mouseoveredObjectMaps[c],"mouseout",a):d.push(this.mouseoveredObjectMaps[c])}this.mouseoveredObjectMaps=d;for(c=0;c<e.length;c++){d=!1;for(b=0;b<this.mouseoveredObjectMaps.length;b++)if(e[c].id===this.mouseoveredObjectMaps[b].id){d=!0;
break}d||(this.fireEvent(e[c],"mouseover",a),this.mouseoveredObjectMaps.push(e[c]));"click"===a.type?this.fireEvent(e[c],"click",a):"mousemove"===a.type&&this.fireEvent(e[c],"mousemove",a)}}};ha.prototype.fireEvent=function(a,e,c){if(a&&e){var b=a.eventParameter,d=a.eventContext,f=a.eventContext.userContext;f&&(d&&f[d[e]])&&f[d[e]].call(f,b);"mouseout"!==e?f.cursor&&f.cursor!==c.target.style.cursor&&(c.target.style.cursor=f.cursor):(c.target.style.cursor=this.chart.panEnabled?"itemmouseout"!==d.mouseout||
f.dockInsidePlotArea?"move":this.chart._defaultCursor:this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===e&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],b);"click"===e&&("dataPoint"===a.objectType&&this.chart.funnelPyramidClickHandler)&&this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex],b)}};ia.prototype.animate=function(a,e,c,b,d){var f=this;this.chart.isAnimating=
!0;d=d||O.easing.linear;c&&this.animations.push({startTime:(new Date).getTime()+(a?a:0),duration:e,animationCallback:c,onComplete:b});for(a=[];0<this.animations.length;)if(e=this.animations.shift(),c=(new Date).getTime(),b=0,e.startTime<=c&&(b=d(Math.min(c-e.startTime,e.duration),0,1,e.duration),b=Math.min(b,1),isNaN(b)||!isFinite(b))&&(b=1),1>b&&a.push(e),e.animationCallback(b),1<=b&&e.onComplete)e.onComplete();this.animations=a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,
function(){f.animate.call(f)}):this.chart.isAnimating=!1};ia.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var O={yScaleAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas,d=e.animationBase;c.drawImage(b,0,0,b.width,b.height,0,d-d*a,c.canvas.width/ka,a*c.canvas.height/ka)}},xScaleAnimation:function(a,e){if(0!==a){var c=e.dest,
b=e.source.canvas,d=e.animationBase;c.drawImage(b,0,0,b.width,b.height,d-d*a,0,a*c.canvas.width/ka,c.canvas.height/ka)}},xClipAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ka,b.height/ka);c.restore()}},fadeInAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ka,c.canvas.height/ka);c.restore()}},easing:{linear:function(a,e,
c,b){return c*a/b+e},easeOutQuad:function(a,e,c,b){return-c*(a/=b)*(a-2)+e},easeOutQuart:function(a,e,c,b){return-c*((a=a/b-1)*a*a*a-1)+e},easeInQuad:function(a,e,c,b){return c*(a/=b)*a+e},easeInQuart:function(a,e,c,b){return c*(a/=b)*a*a*a+e}}},X={drawMarker:function(a,e,c,b,d,f,g,l){if(c){var r=1;c.fillStyle=f?f:"#000000";c.strokeStyle=g?g:"#000000";c.lineWidth=l?l:0;c.setLineDash&&c.setLineDash(K("solid",l));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),f&&c.fill(),l&&
(g?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"square"===b?(c.beginPath(),c.rect(a-d/2,e-d/2,d,d),f&&c.fill(),l&&(g?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"triangle"===b?(c.beginPath(),c.moveTo(a-d/2,e+d/2),c.lineTo(a+d/2,e+d/2),c.lineTo(a,e-d/2),c.closePath(),f&&c.fill(),l&&(g?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r)),c.beginPath()):
"cross"===b&&(c.strokeStyle=f,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];X.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();u.version="v3.12.11 GA";window.CanvasJS&&(u&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=u)})();

/*
  excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.

  Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
  Licensed under the Apache License, Version 2.0
*/
document.createElement("canvas").getContext||function(){function V(){return this.context_||(this.context_=new C(this))}function W(a,b,c){var g=M.call(arguments,2);return function(){return a.apply(b,g.concat(M.call(arguments)))}}function N(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function O(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
a.styleSheets.ex_canvas_||(a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function X(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
"px"}}function Y(a){a=a.srcElement;a.firstChild&&(a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px")}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function t(a,b){for(var c=D(),g=0;3>g;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++;1<c&&c--;return 1>6*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("<g_vml_:stroke",
' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',$[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',g,'" />')}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<d;r++){var t=f[r];n.push(t.offset*m+u+" "+t.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',p,'"',' color2="',c,'"',' colors="',n.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',k,'"',' angle="',h,'"',' focusposition="',g,",",l,'" />')}else e instanceof
I?k&&n&&b.push("<g_vml_:fill",' position="',-c.x/k*f*f,",",-c.y/n*d*d,'"',' type="tile"',' src="',e.src_,'" />'):(e=G(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}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;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
V;O(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",X);a.attachEvent("onresize",Y);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};U.init();for(var v=[],d=0;16>d;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(" <g_vml_:group",' coordsize="',10*q,",",10*q,'"',' coordorigin="0,0"',' style="width:',
10,"px;height:",10,"px;position:absolute;");if(1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var t=[];t.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(m.x/q),",","Dy=",k(m.y/q),"");var v=s(this,c+e,g),w=s(this,c,g+d);c=s(this,c+e,g+d);m.x=x.max(m.x,v.x,w.x,c.x);m.y=x.max(m.y,v.y,w.y,c.y);p.push("padding:0 ",k(m.x/q),"px ",k(m.y/q),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",t.join(""),", sizingmethod='clip');")}else p.push("top:",
k(m.y/q),"px;left:",k(m.x/q),"px;");p.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',q*e,"px;"," height:",q*d,'px"',' cropleft="',r/l,'"',' croptop="',y/u,'"',' cropright="',(l-r-n)/l,'"',' cropbottom="',(u-y-h)/u,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*q,",",10*q,'"',
' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e];switch(f.type){case "moveTo":b.push(" m ",k(f.x),",",k(f.y));break;case "lineTo":b.push(" l ",k(f.x),",",k(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",k(f.cp1x),",",k(f.cp1y),",",k(f.cp2x),",",k(f.cp2y),",",k(f.x),",",k(f.y));break;case "at":case "wa":b.push(" ",f.type," ",k(f.x-this.arcScaleX_*f.radius),",",k(f.y-this.arcScaleY_*
f.radius)," ",k(f.x+this.arcScaleX_*f.radius),",",k(f.y+this.arcScaleY_*f.radius)," ",k(f.xStart),",",k(f.yStart)," ",k(f.xEnd),",",k(f.yEnd))}if(f){if(null==c.x||f.x<c.x)c.x=f.x;if(null==d.x||f.x>d.x)d.x=f.x;if(null==c.y||f.y<c.y)c.y=f.y;if(null==d.y||f.y>d.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("</g_vml_:shape>");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('<g_vml_:line from="',-d,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');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('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',N(a),'" style="v-text-align:',l,";font:",N(p),'" /></g_vml_:line>');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",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),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}();
/*tslint:enable*/
/*eslint-enable*/
/*jshint ignore:end*/