@canvasjs/charts 3.15.6 → 3.15.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/canvasjs.min.js +313 -312
  3. package/package.json +1 -1
package/canvasjs.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- CanvasJS Chart - v3.15.6 GA - https://canvasjs.com/
2
+ CanvasJS Chart - v3.15.8 GA - https://canvasjs.com/
3
3
  Copyright 2026 fenopix
4
4
 
5
5
  --------------------- License Information --------------------
@@ -18,27 +18,27 @@
18
18
  /*eslint-disable*/
19
19
  /*jshint ignore:start*/
20
20
  (function(){function ra(n,C){n.prototype=fb(C.prototype);n.prototype.constructor=n;n.base=C.prototype}function fb(n){function C(){}C.prototype=n;return new C}function Ta(n,C,l){"millisecond"===l?n.setMilliseconds(n.getMilliseconds()+1*C):"second"===l?n.setSeconds(n.getSeconds()+1*C):"minute"===l?n.setMinutes(n.getMinutes()+1*C):"hour"===l?n.setHours(n.getHours()+1*C):"day"===l?n.setDate(n.getDate()+1*C):"week"===l?n.setDate(n.getDate()+7*C):"month"===l?n.setMonth(n.getMonth()+1*C):"year"===l&&n.setFullYear(n.getFullYear()+
21
- 1*C);return n}function ia(n,C){var l=!1;0>n&&(l=!0,n*=-1);n=""+n;for(C=C?C:1;n.length<C;)n="0"+n;return l?"-"+n:n}function Ia(n){if(!n)return n;n=n.replace(/^\s\s*/,"");for(var C=/\s/,l=n.length;C.test(n.charAt(--l)););return n.slice(0,l+1)}function Ba(n){n.roundRect=function(n,l,t,X,pa,z,s,y){s&&(this.fillStyle=s);y&&(this.strokeStyle=y);"undefined"===typeof pa&&(pa=5);pa=Math.min(pa,Math.min(t,X)/2);this.lineWidth=z;this.beginPath();this.moveTo(n+pa,l);this.lineTo(n+t-pa,l);this.quadraticCurveTo(n+
21
+ 1*C);return n}function ha(n,C){var l=!1;0>n&&(l=!0,n*=-1);n=""+n;for(C=C?C:1;n.length<C;)n="0"+n;return l?"-"+n:n}function Ia(n){if(!n)return n;n=n.replace(/^\s\s*/,"");for(var C=/\s/,l=n.length;C.test(n.charAt(--l)););return n.slice(0,l+1)}function Ba(n){n.roundRect=function(n,l,t,X,pa,z,s,y){s&&(this.fillStyle=s);y&&(this.strokeStyle=y);"undefined"===typeof pa&&(pa=5);pa=Math.min(pa,Math.min(t,X)/2);this.lineWidth=z;this.beginPath();this.moveTo(n+pa,l);this.lineTo(n+t-pa,l);this.quadraticCurveTo(n+
22
22
  t,l,n+t,l+pa);this.lineTo(n+t,l+X-pa);this.quadraticCurveTo(n+t,l+X,n+t-pa,l+X);this.lineTo(n+pa,l+X);this.quadraticCurveTo(n,l+X,n,l+X-pa);this.lineTo(n,l+pa);this.quadraticCurveTo(n,l,n+pa,l);this.closePath();s&&this.fill();y&&0<z&&this.stroke()}}function Ua(n,C){return n-C}function R(n){var C=((n&16711680)>>16).toString(16),l=((n&65280)>>8).toString(16);n=((n&255)>>0).toString(16);C=2>C.length?"0"+C:C;l=2>l.length?"0"+l:l;n=2>n.length?"0"+n:n;return"#"+C+l+n}function gb(n,C){var l=this.length>>>
23
23
  0,t=Number(C)||0,t=0>t?Math.ceil(t):Math.floor(t);for(0>t&&(t+=l);t<l;t++)if(t in this&&this[t]===n)return t;return-1}function l(n){return null===n||"undefined"===typeof n}function Ca(n){n.indexOf||(n.indexOf=gb);return n}function hb(n){if(U.fSDec)n[ma("`eeDwdouMhrudods")](ma("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){U._fTWm&&U._fTWm(n)})}function $a(n,C,l){l=l||"normal";var t=n+"_"+C+"_"+l,X=ab[t];if(isNaN(X)){try{if(!ta){var pa=document.body;ta=document.createElement("span");ta.innerHTML="";var z=
24
- document.createTextNode("Mpgyi");ta.appendChild(z);pa.appendChild(ta)}ta.style.display="";Q(ta,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:n,fontSize:C+"px",fontWeight:l});X=Math.round(ta.offsetHeight);ta.style.display="none"}catch(s){X=Math.ceil(1.1*C)}X=Math.max(X,C);ab[t]=X}return X}function J(n,C){var l=[];if(l={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],
25
- 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]}[n||"solid"])for(var t=0;t<l.length;t++)l[t]*=C;else l=[];return l}function K(n,C,za,t,X){t=t||[];X=l(X)?ib?{passive:!1,capture:!1}:!1:X;t.push([n,C,za,X]);return n.addEventListener?(n.addEventListener(C,za,X),za):n.attachEvent?(t=function(C){C=C||window.event;C.preventDefault=C.preventDefault||function(){C.returnValue=!1};C.stopPropagation=C.stopPropagation||function(){C.cancelBubble=!0};za.call(n,
24
+ document.createTextNode("Mpgyi");ta.appendChild(z);pa.appendChild(ta)}ta.style.display="";Q(ta,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:n,fontSize:C+"px",fontWeight:l});X=Math.round(ta.offsetHeight);ta.style.display="none"}catch(s){X=Math.ceil(1.1*C)}X=Math.max(X,C);ab[t]=X}return X}function K(n,C){var l=[];if(l={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],
25
+ 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]}[n||"solid"])for(var t=0;t<l.length;t++)l[t]*=C;else l=[];return l}function L(n,C,za,t,X){t=t||[];X=l(X)?ib?{passive:!1,capture:!1}:!1:X;t.push([n,C,za,X]);return n.addEventListener?(n.addEventListener(C,za,X),za):n.attachEvent?(t=function(C){C=C||window.event;C.preventDefault=C.preventDefault||function(){C.returnValue=!1};C.stopPropagation=C.stopPropagation||function(){C.cancelBubble=!0};za.call(n,
26
26
  C)},n.attachEvent("on"+C,t),t):!1}function jb(n){if(n._menuButton)n.exportEnabled?(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),Na(n._menuButton),va(n,n._menuButton,"menu"),0>=navigator.userAgent.search("MSIE")&&n._menuButton.childNodes[0]&&Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"})):xa(n._menuButton);else if(n.exportEnabled&&t){var C=!1;n._menuButton=document.createElement("button");va(n,n._menuButton,"menu");n._toolBar.appendChild(n._menuButton);
27
- K(n._menuButton,"touchstart",function(n){C=!0},n.allDOMEventHandlers);K(n._menuButton,"click",function(){"none"!==n._dropdownMenu.style.display||n._dropDownCloseTime&&500>=(new Date).getTime()-n._dropDownCloseTime.getTime()||(n._dropdownMenu.style.display="block",n._menuButton.blur(),n._dropdownMenu.focus())},n.allDOMEventHandlers,!0);K(n._menuButton,"mousemove",function(){C||(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColorOnHover,color:n.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
28
- Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},n.allDOMEventHandlers,!0);K(n._menuButton,"mouseout",function(){C||(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},n.allDOMEventHandlers,!0)}if(n.exportEnabled&&n._dropdownMenu){var l=n.theme&&-1!==n.theme.indexOf("dark")?"black":"#888888";Q(n._dropdownMenu,
27
+ L(n._menuButton,"touchstart",function(n){C=!0},n.allDOMEventHandlers);L(n._menuButton,"click",function(){"none"!==n._dropdownMenu.style.display||n._dropDownCloseTime&&500>=(new Date).getTime()-n._dropDownCloseTime.getTime()||(n._dropdownMenu.style.display="block",n._menuButton.blur(),n._dropdownMenu.focus())},n.allDOMEventHandlers,!0);L(n._menuButton,"mousemove",function(){C||(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColorOnHover,color:n.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
28
+ Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},n.allDOMEventHandlers,!0);L(n._menuButton,"mouseout",function(){C||(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},n.allDOMEventHandlers,!0)}if(n.exportEnabled&&n._dropdownMenu){var l=n.theme&&-1!==n.theme.indexOf("dark")?"black":"#888888";Q(n._dropdownMenu,
29
29
  {backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor,boxShadow:"2px 2px 10px "+l});for(var l=n._dropdownMenu.childNodes,B=[n._cultureInfo.printText,n._cultureInfo.saveJPGText,n._cultureInfo.savePNGText],X=0;X<B.length;X++)Q(l[X],{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),l[X].innerHTML=B[X]}else!n._dropdownMenu&&(n.exportEnabled&&t)&&(C=!1,n._dropdownMenu=document.createElement("div"),n._dropdownMenu.setAttribute("tabindex",-1),l=n.theme&&-1!==n.theme.indexOf("dark")?
30
- "black":"#888888",Q(n._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:n.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px "+l}),n._dropdownMenu.style.display="none",n._toolBar.appendChild(n._dropdownMenu),K(n._dropdownMenu,
31
- "blur",function(){xa(n._dropdownMenu);n._dropDownCloseTime=new Date},n.allDOMEventHandlers,!0),l=document.createElement("div"),Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.printText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),K(l,"touchstart",function(n){C=!0},n.allDOMEventHandlers),K(l,"mousemove",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},
32
- n.allDOMEventHandlers,!0),K(l,"mouseout",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),K(l,"click",function(){n.print();xa(n._dropdownMenu)},n.allDOMEventHandlers,!0),l=document.createElement("div"),Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.saveJPGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),K(l,"touchstart",function(n){C=
33
- !0},n.allDOMEventHandlers),K(l,"mousemove",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},n.allDOMEventHandlers,!0),K(l,"mouseout",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),K(l,"click",function(){n.exportChart({format:"jpeg",fileName:n.exportFileName});xa(n._dropdownMenu)},n.allDOMEventHandlers,!0),l=document.createElement("div"),
34
- Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.savePNGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),K(l,"touchstart",function(n){C=!0},n.allDOMEventHandlers),K(l,"mousemove",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},n.allDOMEventHandlers,!0),K(l,"mouseout",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,
35
- this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),K(l,"click",function(){n.exportChart({format:"png",fileName:n.exportFileName});xa(n._dropdownMenu)},n.allDOMEventHandlers,!0))}function bb(n,C,l){n*=ka;C*=ka;n=l.getImageData(n,C,2,2).data;C=!0;for(l=0;4>l;l++)if(n[l]!==n[l+4]|n[l]!==n[l+8]|n[l]!==n[l+12]){C=!1;break}return C?n[0]<<16|n[1]<<8|n[2]:0}function aa(n,C,l){return n in C?C[n]:l[n]}function Oa(n,C,za,B){t&&cb?(B=!l(B)&&B?n.getContext("2d",{willReadFrequently:!0}):n.getContext("2d"),
30
+ "black":"#888888",Q(n._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:n.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px "+l}),n._dropdownMenu.style.display="none",n._toolBar.appendChild(n._dropdownMenu),L(n._dropdownMenu,
31
+ "blur",function(){xa(n._dropdownMenu);n._dropDownCloseTime=new Date},n.allDOMEventHandlers,!0),l=document.createElement("div"),Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.printText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){C=!0},n.allDOMEventHandlers),L(l,"mousemove",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},
32
+ n.allDOMEventHandlers,!0),L(l,"mouseout",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.print();xa(n._dropdownMenu)},n.allDOMEventHandlers,!0),l=document.createElement("div"),Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.saveJPGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){C=
33
+ !0},n.allDOMEventHandlers),L(l,"mousemove",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},n.allDOMEventHandlers,!0),L(l,"mouseout",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.exportChart({format:"jpeg",fileName:n.exportFileName});xa(n._dropdownMenu)},n.allDOMEventHandlers,!0),l=document.createElement("div"),
34
+ Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.savePNGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){C=!0},n.allDOMEventHandlers),L(l,"mousemove",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},n.allDOMEventHandlers,!0),L(l,"mouseout",function(){C||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,
35
+ this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.exportChart({format:"png",fileName:n.exportFileName});xa(n._dropdownMenu)},n.allDOMEventHandlers,!0))}function bb(n,C,l){n*=ka;C*=ka;n=l.getImageData(n,C,2,2).data;C=!0;for(l=0;4>l;l++)if(n[l]!==n[l+4]|n[l]!==n[l+8]|n[l]!==n[l+12]){C=!1;break}return C?n[0]<<16|n[1]<<8|n[2]:0}function V(n,C,l){return n in C?C[n]:l[n]}function Oa(n,C,za,B){t&&cb?(B=!l(B)&&B?n.getContext("2d",{willReadFrequently:!0}):n.getContext("2d"),
36
36
  Pa=B.webkitBackingStorePixelRatio||B.mozBackingStorePixelRatio||B.msBackingStorePixelRatio||B.oBackingStorePixelRatio||B.backingStorePixelRatio||1,ka=Va/Pa,n.width=C*ka,n.height=za*ka,Va!==Pa&&(n.style.width=C+"px",n.style.height=za+"px",B.scale(ka,ka))):(n.width=C,n.height=za)}function kb(n){if(!lb){var C=!1,l=!1;"undefined"===typeof sa.Chart.creditHref?(n.creditHref=ma("iuuqr;..b`ow`rkr/bnl."),n.creditText=ma("B`ow`rKR/bnl")):(C=n.updateOption("creditText"),l=n.updateOption("creditHref"));if(n.creditHref&&
37
37
  n.creditText){n._creditLink||(n._creditLink=document.createElement("a"),n._creditLink.setAttribute("class","canvasjs-chart-credit"),n._creditLink.setAttribute("title","JavaScript Charts"),Q(n._creditLink,{outline:"none",margin:"0px",position:"absolute",right:"2px",top:n.height-14+"px",color:"dimgrey",textDecoration:"none",fontSize:"11px",fontFamily:"Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"}),n._creditLink.setAttribute("tabIndex",-1),n._creditLink.setAttribute("target","_blank"));
38
38
  if(0===n.renderCount||C||l)n._creditLink.setAttribute("href",n.creditHref),n._creditLink.innerHTML=n.creditText;n._creditLink&&n.creditHref&&n.creditText?(n._creditLink.parentElement||n._canvasJSContainer.appendChild(n._creditLink),n._creditLink.style.top=n.height-14+"px"):n._creditLink.parentElement&&n._canvasJSContainer.removeChild(n._creditLink)}}}function wa(n,C,l){Ja&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var B=document.createElement("canvas");B.setAttribute("class","canvasjs-chart-canvas");
39
39
  Oa(B,n,C,l);t||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(B);return B}function Q(n,C){for(var l in C)n.style[l]=C[l]}function db(n){return n.currentStyle?n.currentStyle:window&&window.getComputedStyle?window.getComputedStyle(n,null):n.style}function va(n,C,l){C.getAttribute("state")||(C.style.backgroundColor=n.toolbar.itemBackgroundColor,C.style.color=n.toolbar.fontColor,C.style.border="none",Q(C,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));
40
40
  C.getAttribute("state")!==l&&(C.setAttribute("state",l),C.setAttribute("type","button"),Q(C,{padding:"5px 12px",cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),C.innerHTML="<img src='"+mb[l].image+"' alt='"+n._cultureInfo[l+"Text"]+"' />",Q(C.childNodes[0],{height:"95%",pointerEvents:"none"}));C.setAttribute("title",n._cultureInfo[l+"Text"])}function Na(){for(var n=null,C=0;C<arguments.length;C++)n=arguments[C],n.style&&(n.style.display=
41
- "inline")}function xa(){for(var n=null,C=0;C<arguments.length;C++)(n=arguments[C])&&n.style&&(n.style.display="none")}function Wa(n,C,l,t,X){if(null===n||"undefined"===typeof n)return"undefined"===typeof l?C:l;n=parseFloat(n.toString())*(0<=n.toString().indexOf("%")?C/100:1);"undefined"!==typeof t&&(n=Math.min(t,n),"undefined"!==typeof X&&(n=Math.max(X,n)));return!isNaN(n)&&n<=C&&0<=n?n:"undefined"===typeof l?C:l}function V(n,C,t,B,X){this._defaultsKey=n;this._themeOptionsKey=C;this._index=B;this.parent=
41
+ "inline")}function xa(){for(var n=null,C=0;C<arguments.length;C++)(n=arguments[C])&&n.style&&(n.style.display="none")}function Wa(n,C,l,t,X){if(null===n||"undefined"===typeof n)return"undefined"===typeof l?C:l;n=parseFloat(n.toString())*(0<=n.toString().indexOf("%")?C/100:1);"undefined"!==typeof t&&(n=Math.min(t,n),"undefined"!==typeof X&&(n=Math.max(X,n)));return!isNaN(n)&&n<=C&&0<=n?n:"undefined"===typeof l?C:l}function W(n,C,t,B,X){this._defaultsKey=n;this._themeOptionsKey=C;this._index=B;this.parent=
42
42
  X;this._eventListeners=[];n={};this.theme&&l(this.parent)&&l(C)&&l(B)?n=l(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[C])&&(null===B?n=this.parent.themeOptions[C]:0<this.parent.themeOptions[C].length&&(B=Math.min(this.parent.themeOptions[C].length-1,B),n=this.parent.themeOptions[C][B]));this.themeOptions=n;this.options=t?t:{_isPlaceholder:!0};this.setOptions(this.options,n)}function Ga(n,
43
43
  l,t,B,X){"undefined"===typeof X&&(X=0);this._padding=X;this._x1=n;this._y1=l;this._x2=t;this._y2=B;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function la(n,l){la.base.constructor.call(this,"TextBlock",null,l,null,null);this.ctx=n;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Xa(n,l){Xa.base.constructor.call(this,"Toolbar","toolbar",l,null,n);this.chart=n;this.canvas=n.canvas;this.ctx=this.chart.ctx;this.optionsName="toolbar"}function Da(n,
44
44
  C){Da.base.constructor.call(this,"Title","title",C,null,n);this.chart=n;this.canvas=n.canvas;this.ctx=this.chart.ctx;this.optionsName="title";if(l(this.options.margin)&&n.options.subtitles)for(var t=n.options.subtitles,B=0;B<t.length;B++)if((l(t[B].horizontalAlign)&&"center"===this.horizontalAlign||t[B].horizontalAlign===this.horizontalAlign)&&(l(t[B].verticalAlign)&&"top"===this.verticalAlign||t[B].verticalAlign===this.verticalAlign)&&!t[B].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=
@@ -60,80 +60,80 @@ indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1
60
60
  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:t?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:t?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,
61
61
  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:",",
62
62
  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(" ")}},Ma={en:{}},s=t?"Trebuchet MS, Helvetica, sans-serif":
63
- "Arial",Ha=t?"Impact, Charcoal, sans-serif":"Arial",Ea={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(" ")},E,Y,T,da,ja;Y="#333333";T="#000000";E="#666666";
64
- ja=da="#000000";var fa=20,y=14,Za={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Ha,fontSize:32,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ha,fontSize:y,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:s,indexLabelFontSize:y,indexLabelFontColor:Y,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:s,
65
- labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",
66
- lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",
67
- labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",
68
- labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",
69
- lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,
70
- fontSize:14,fontColor:Y,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=Y="#F5F5F5";E="#FFFFFF";da="#40BAF1";ja="#F5F5F5";var fa=20,y=14,eb={colorSet:"colorSet2",title:{fontFamily:s,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",
63
+ "Arial",Ha=t?"Impact, Charcoal, sans-serif":"Arial",Ea={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(" ")},E,ba,T,da,ia;ba="#333333";T="#000000";E="#666666";
64
+ ia=da="#000000";var fa=20,y=14,Za={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Ha,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ha,fontSize:y,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:s,indexLabelFontSize:y,indexLabelFontColor:ba,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,
65
+ labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",
66
+ lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",
67
+ labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",
68
+ labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",
69
+ lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,
70
+ fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=ba="#F5F5F5";E="#FFFFFF";da="#40BAF1";ia="#F5F5F5";var fa=20,y=14,eb={colorSet:"colorSet2",title:{fontFamily:s,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",
71
71
  verticalAlign:"top",margin:5},subtitles:[{fontFamily:s,fontSize:y,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:s,indexLabelFontSize:y,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,
72
72
  tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,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:s,
73
73
  titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
74
74
  labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:y,
75
75
  labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,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:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,
76
76
  labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",
77
- spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=Y="#F5F5F5";E="#FFFFFF";da="#40BAF1";ja="#F5F5F5";
78
- fa=20;y=14;Ha={colorSet:"colorSet1",backgroundColor:"#2A2A2A",title:{fontFamily:Ha,fontSize:32,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ha,fontSize:y,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:s,indexLabelFontSize:y,indexLabelFontColor:T,
77
+ spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=ba="#F5F5F5";E="#FFFFFF";da="#40BAF1";ia="#F5F5F5";
78
+ fa=20;y=14;Ha={colorSet:"colorSet1",backgroundColor:"#2A2A2A",title:{fontFamily:Ha,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ha,fontSize:y,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:s,indexLabelFontSize:y,indexLabelFontColor:T,
79
79
  indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,
80
- labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,
81
- labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,
82
- labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
80
+ labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,
81
+ labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,
82
+ labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
83
83
  lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",
84
- labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:Y,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}};E="#FFFFFF";T=Y="#FAFAFA";da="#40BAF1";ja="#F5F5F5";
85
- var fa=20,y=14,Qa={light1:Za,light2:eb,dark1:Ha,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:s,fontSize:32,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:s,fontSize:y,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:s,
84
+ labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}};E="#FFFFFF";T=ba="#FAFAFA";da="#40BAF1";ia="#F5F5F5";
85
+ var fa=20,y=14,Qa={light1:Za,light2:eb,dark1:Ha,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:s,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:s,fontSize:y,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:s,
86
86
  indexLabelFontSize:y,indexLabelFontColor:T,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,
87
- labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,
88
- labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,
89
- labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:0,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
87
+ labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:E,tickThickness:1,tickColor:E,gridThickness:0,gridColor:E,stripLines:[{labelFontFamily:s,
88
+ labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,
89
+ labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:0,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
90
90
  lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:y,labelFontColor:T,labelFontWeight:"normal",lineThickness:0,lineColor:E,tickThickness:1,tickColor:E,gridThickness:1,gridColor:E,stripLines:[{labelFontFamily:s,labelFontSize:y,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:y,labelFontColor:"#000000",
91
- labelFontWeight:"normal",labelBackgroundColor:ja,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:Y,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:Za,theme2:eb,theme3:Za},S={numberDuration:1,
91
+ labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:Za,theme2:eb,theme3:Za},S={numberDuration:1,
92
92
  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(){U.fSDec=function(n){for(var l="",t=0;t<n.length;t++)l+=String.fromCharCode(Math.ceil(n.length/57/5)^n.charCodeAt(t));return l};delete sa[U.fSDec("Bi`su")][U.fSDec("bsdehuIsdg")];U.pro={sCH:sa[U.fSDec("Bi`su")][U.fSDec("bsdehuIsdg")]};U._fTWm=
93
93
  function(n){if("undefined"===typeof U.pro.sCH&&!nb)try{var l,t=n[U.fSDec("buy")];t[U.fSDec("udyuC`rdmhod")]=U.fSDec("unq");t[U.fSDec("gnou")]=11+U.fSDec("qy!B`mhcsh-!Mtbhe`!Fs`oed-!Mtbhe`!R`or!Tohbned-!@sh`m-!r`or,rdshg");l=n.height-11;t[U.fSDec("bmd`sSdbu")](0,l,t[U.fSDec("ld`rtsdUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno")).width,11);t[U.fSDec("ghmmRuxmd")]=n.backgroundColor;t[U.fSDec("ghmmSdbu")](0,l,t[U.fSDec("ld`rtsdUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno")).width,11);t[U.fSDec("ghmmRuxmd")]=U.fSDec("fsdx");
94
94
  t[U.fSDec("ghmmUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno"),0,l)}catch(B){}}})();var ib=function(){var n=!1;try{var l=Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){n=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,l),window.removeEventListener("test",null,l))}catch(t){n=!1}return n}(),ab={},ta=null,ob=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,
95
95
  this.height))},Aa=function(n){n.width=1;n.height=1;n.getContext("2d")&&n.getContext("2d").clearRect(0,0,1,1)},pb=function(n,l,t){l=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=l?12:11,Math.round(l*(n/400)))},Fa=function(){var n=/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,l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),t="Sun Mon Tue Wed Thu Fri Sat".split(" "),B="January February March April May June July August September October November December".split(" "),
96
- X="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(y,J,E){var R=E?E.days:l,Q=E?E.months:B,S=E?E.shortDays:t,K=E?E.shortMonths:X;E="";var U=!1;y=y&&y.getTime?y:y?new Date(y):new Date;if(isNaN(y))throw SyntaxError("invalid date");"UTC:"===J.slice(0,4)&&(J=J.slice(4),U=!0);E=U?"getUTC":"get";var V=y[E+"Date"](),M=y[E+"Day"](),
97
- W=y[E+"Month"](),a=y[E+"FullYear"](),e=y[E+"Hours"](),c=y[E+"Minutes"](),b=y[E+"Seconds"](),d=y[E+"Milliseconds"](),g=U?0:y.getTimezoneOffset();return E=J.replace(n,function(h){switch(h){case "D":return V;case "DD":return ia(V,2);case "DDD":return S[M];case "DDDD":return R[M];case "M":return W+1;case "MM":return ia(W+1,2);case "MMM":return K[W];case "MMMM":return Q[W];case "Y":return parseInt(String(a).slice(-2));case "YY":return ia(String(a).slice(-2),2);case "YYY":return ia(String(a).slice(-3),
98
- 3);case "YYYY":return ia(a,4);case "h":return e%12||12;case "hh":return ia(e%12||12,2);case "H":return e;case "HH":return ia(e,2);case "m":return c;case "mm":return ia(c,2);case "s":return b;case "ss":return ia(b,2);case "f":return ia(String(d),3).slice(0,1);case "ff":return ia(String(d),3).slice(0,2);case "fff":return ia(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(y).match(s)||
99
- [""]).pop().replace(z,"");case "z":return(0<g?"-":"+")+Math.floor(Math.abs(g)/60);case "zz":return(0<g?"-":"+")+ia(Math.floor(Math.abs(g)/60),2);case "zzz":return(0<g?"-":"+")+ia(Math.floor(Math.abs(g)/60),2)+ia(Math.abs(g)%60,2);default:return h.slice(1,h.length-1)}})}}(),qb=function(n){var l=0>n;if(1>Math.abs(n)){var t=parseInt(n.toString().split("e-")[1]);t&&(n=(l?-1*n:n)*Math.pow(10,t-1),n="0."+Array(t).join("0")+n.toString().substring(2),n=l?"-"+n:n)}else t=parseInt(n.toString().split("+")[1]),
100
- 20<t&&(t-=20,n/=Math.pow(10,t),n=n.toString()+Array(t+1).join("0"));return String(n)},ea=function(n,l,t){if(null===n)return"";if(!isFinite(n))return n;n=Number(n);var B=0>n?!0:!1;B&&(n*=-1);var X=t?t.decimalSeparator:".",s=t?t.digitGroupSeparator:",",z="";l=String(l);var z=1,y=t="",E=-1,J=[],R=[],Q=0,S=0,K=0,U=!1,V=0,y=l.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);l=null;for(var M=0;y&&M<y.length;M++)if(l=y[M],"."===l&&0>E)E=M;else{if("%"===l)z*=100;else if("\u2030"===l){z*=1E3;continue}else if(","===
101
- l[0]&&"."===l[l.length-1]){z/=Math.pow(1E3,l.length-1);E=M+l.length-1;continue}else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||(U=!0);0>E?(J.push(l),"#"===l||"0"===l?Q++:","===l&&K++):(R.push(l),"#"!==l&&"0"!==l||S++)}U&&(l=Math.floor(n),y=-Math.floor(Math.log(n)/Math.LN10+1),V=0===n?0:0===l?-(Q+y):qb(l).length-Q,z/=Math.pow(10,V));0>E&&(E=M);z=(n*z).toFixed(S);l=z.split(".");z=(l[0]+"").split("");n=(l[1]+"").split("");z&&"0"===z[0]&&z.shift();for(U=y=M=S=E=0;0<J.length;)if(l=J.pop(),"#"===l||"0"===
102
- l)if(E++,E===Q){var W=z,z=[];if("0"===l)for(l=Q-S-(W?W.length:0);0<l;)W.unshift("0"),l--;for(;0<W.length;)t=W.pop()+t,U++,0===U%y&&(M===K&&0<W.length)&&(t=s+t)}else 0<z.length?(t=z.pop()+t,S++,U++):"0"===l&&(t="0"+t,S++,U++),0===U%y&&(M===K&&0<z.length)&&(t=s+t);else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?","===l?(M++,y=U,U=0,0<z.length&&(t=s+t)):t=1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?l.slice(1,l.length-1)+t:l+t:(l=0>V?l.replace("+",
103
- "").replace("-",""):l.replace("-",""),t+=l.replace(/[0]+/,function(a){return ia(V,a.length)}));s="";for(J=!1;0<R.length;)l=R.shift(),"#"===l||"0"===l?0<n.length&&0!==Number(n.join(""))?(s+=n.shift(),J=!0):"0"===l&&(s+="0",J=!0):1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?s+=l.slice(1,l.length-1):"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?s+=l:(l=0>V?l.replace("+","").replace("-",""):l.replace("-",""),s+=l.replace(/[0]+/,function(a){return ia(V,
104
- a.length)}));t+=(J?X:"")+s;return B?"-"+t:t},Ra=function(n){var l=0,t=0;n=n||window.event;n.offsetX||0===n.offsetX?(l=n.offsetX,t=n.offsetY):n.layerX||0==n.layerX?(l=n.layerX,t=n.layerY):(l=n.pageX-n.target.offsetLeft,t=n.pageY-n.target.offsetTop);return{x:l,y:t}},cb=!0,Va=window.devicePixelRatio||1,Pa=1,ka=cb?Va/Pa:1,ba=function(n,l,t,B,s,y,z,E,J,R,U,S,Q){"undefined"===typeof Q&&(Q=1);z=z||0;E=E||"black";var K=15<B-l&&15<s-t?8:0.35*Math.min(B-l,s-t);n.beginPath();n.moveTo(l,t);n.save();n.fillStyle=
105
- y;n.globalAlpha=Q;n.fillRect(l,t,B-l,s-t);n.globalAlpha=1;0<z&&(Q=0===z%2?0:0.5,n.beginPath(),n.lineWidth=z,n.strokeStyle=E,n.moveTo(l,t),n.rect(l-Q,t-Q,B-l+2*Q,s-t+2*Q),n.stroke());n.restore();!0===J&&(n.save(),n.beginPath(),n.moveTo(l,t),n.lineTo(l+K,t+K),n.lineTo(B-K,t+K),n.lineTo(B,t),n.closePath(),z=n.createLinearGradient((B+l)/2,t+K,(B+l)/2,t),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, .4)"),n.fillStyle=z,n.fill(),n.restore());!0===R&&(n.save(),n.beginPath(),n.moveTo(l,s),n.lineTo(l+
106
- K,s-K),n.lineTo(B-K,s-K),n.lineTo(B,s),n.closePath(),z=n.createLinearGradient((B+l)/2,s-K,(B+l)/2,s),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, .4)"),n.fillStyle=z,n.fill(),n.restore());!0===U&&(n.save(),n.beginPath(),n.moveTo(l,t),n.lineTo(l+K,t+K),n.lineTo(l+K,s-K),n.lineTo(l,s),n.closePath(),z=n.createLinearGradient(l+K,(s+t)/2,l,(s+t)/2),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,n.fill(),n.restore());!0===S&&(n.save(),n.beginPath(),n.moveTo(B,
107
- t),n.lineTo(B-K,t+K),n.lineTo(B-K,s-K),n.lineTo(B,s),z=n.createLinearGradient(B-K,(s+t)/2,B,(s+t)/2),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,n.fill(),n.closePath(),n.restore())},ma=function(n){for(var l="",t=0;t<n.length;t++)l+=String.fromCharCode(Math.ceil(n.length/57/5)^n.charCodeAt(t));return l},nb=(s=window&&window[ma("mnb`uhno")]&&window[ma("mnb`uhno")].href)&&(-1!==s.indexOf(ma("b`ow`rkr/bnl"))||
96
+ X="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(y,K,E){var R=E?E.days:l,Q=E?E.months:B,S=E?E.shortDays:t,L=E?E.shortMonths:X;E="";var U=!1;y=y&&y.getTime?y:y?new Date(y):new Date;if(isNaN(y))throw SyntaxError("invalid date");"UTC:"===K.slice(0,4)&&(K=K.slice(4),U=!0);E=U?"getUTC":"get";var W=y[E+"Date"](),M=y[E+"Day"](),
97
+ Y=y[E+"Month"](),a=y[E+"FullYear"](),e=y[E+"Hours"](),c=y[E+"Minutes"](),b=y[E+"Seconds"](),d=y[E+"Milliseconds"](),g=U?0:y.getTimezoneOffset();return E=K.replace(n,function(h){switch(h){case "D":return W;case "DD":return ha(W,2);case "DDD":return S[M];case "DDDD":return R[M];case "M":return Y+1;case "MM":return ha(Y+1,2);case "MMM":return L[Y];case "MMMM":return Q[Y];case "Y":return parseInt(String(a).slice(-2));case "YY":return ha(String(a).slice(-2),2);case "YYY":return ha(String(a).slice(-3),
98
+ 3);case "YYYY":return ha(a,4);case "h":return e%12||12;case "hh":return ha(e%12||12,2);case "H":return e;case "HH":return ha(e,2);case "m":return c;case "mm":return ha(c,2);case "s":return b;case "ss":return ha(b,2);case "f":return ha(String(d),3).slice(0,1);case "ff":return ha(String(d),3).slice(0,2);case "fff":return ha(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(y).match(s)||
99
+ [""]).pop().replace(z,"");case "z":return(0<g?"-":"+")+Math.floor(Math.abs(g)/60);case "zz":return(0<g?"-":"+")+ha(Math.floor(Math.abs(g)/60),2);case "zzz":return(0<g?"-":"+")+ha(Math.floor(Math.abs(g)/60),2)+ha(Math.abs(g)%60,2);default:return h.slice(1,h.length-1)}})}}(),qb=function(n){var l=0>n;if(1>Math.abs(n)){var t=parseInt(n.toString().split("e-")[1]);t&&(n=(l?-1*n:n)*Math.pow(10,t-1),n="0."+Array(t).join("0")+n.toString().substring(2),n=l?"-"+n:n)}else t=parseInt(n.toString().split("+")[1]),
100
+ 20<t&&(t-=20,n/=Math.pow(10,t),n=n.toString()+Array(t+1).join("0"));return String(n)},ea=function(n,l,t){if(null===n)return"";if(!isFinite(n))return n;n=Number(n);var B=0>n?!0:!1;B&&(n*=-1);var X=t?t.decimalSeparator:".",s=t?t.digitGroupSeparator:",",z="";l=String(l);var z=1,y=t="",E=-1,K=[],R=[],Q=0,S=0,L=0,U=!1,W=0,y=l.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);l=null;for(var M=0;y&&M<y.length;M++)if(l=y[M],"."===l&&0>E)E=M;else{if("%"===l)z*=100;else if("\u2030"===l){z*=1E3;continue}else if(","===
101
+ l[0]&&"."===l[l.length-1]){z/=Math.pow(1E3,l.length-1);E=M+l.length-1;continue}else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||(U=!0);0>E?(K.push(l),"#"===l||"0"===l?Q++:","===l&&L++):(R.push(l),"#"!==l&&"0"!==l||S++)}U&&(l=Math.floor(n),y=-Math.floor(Math.log(n)/Math.LN10+1),W=0===n?0:0===l?-(Q+y):qb(l).length-Q,z/=Math.pow(10,W));0>E&&(E=M);z=(n*z).toFixed(S);l=z.split(".");z=(l[0]+"").split("");n=(l[1]+"").split("");z&&"0"===z[0]&&z.shift();for(U=y=M=S=E=0;0<K.length;)if(l=K.pop(),"#"===l||"0"===
102
+ l)if(E++,E===Q){var Y=z,z=[];if("0"===l)for(l=Q-S-(Y?Y.length:0);0<l;)Y.unshift("0"),l--;for(;0<Y.length;)t=Y.pop()+t,U++,0===U%y&&(M===L&&0<Y.length)&&(t=s+t)}else 0<z.length?(t=z.pop()+t,S++,U++):"0"===l&&(t="0"+t,S++,U++),0===U%y&&(M===L&&0<z.length)&&(t=s+t);else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?","===l?(M++,y=U,U=0,0<z.length&&(t=s+t)):t=1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?l.slice(1,l.length-1)+t:l+t:(l=0>W?l.replace("+",
103
+ "").replace("-",""):l.replace("-",""),t+=l.replace(/[0]+/,function(a){return ha(W,a.length)}));s="";for(K=!1;0<R.length;)l=R.shift(),"#"===l||"0"===l?0<n.length&&0!==Number(n.join(""))?(s+=n.shift(),K=!0):"0"===l&&(s+="0",K=!0):1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?s+=l.slice(1,l.length-1):"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?s+=l:(l=0>W?l.replace("+","").replace("-",""):l.replace("-",""),s+=l.replace(/[0]+/,function(a){return ha(W,
104
+ a.length)}));t+=(K?X:"")+s;return B?"-"+t:t},Ra=function(n){var l=0,t=0;n=n||window.event;n.offsetX||0===n.offsetX?(l=n.offsetX,t=n.offsetY):n.layerX||0==n.layerX?(l=n.layerX,t=n.layerY):(l=n.pageX-n.target.offsetLeft,t=n.pageY-n.target.offsetTop);return{x:l,y:t}},cb=!0,Va=window.devicePixelRatio||1,Pa=1,ka=cb?Va/Pa:1,aa=function(n,l,t,B,s,y,z,E,K,R,U,S,Q){"undefined"===typeof Q&&(Q=1);z=z||0;E=E||"black";var L=15<B-l&&15<s-t?8:0.35*Math.min(B-l,s-t);n.beginPath();n.moveTo(l,t);n.save();n.fillStyle=
105
+ y;n.globalAlpha=Q;n.fillRect(l,t,B-l,s-t);n.globalAlpha=1;0<z&&(Q=0===z%2?0:0.5,n.beginPath(),n.lineWidth=z,n.strokeStyle=E,n.moveTo(l,t),n.rect(l-Q,t-Q,B-l+2*Q,s-t+2*Q),n.stroke());n.restore();!0===K&&(n.save(),n.beginPath(),n.moveTo(l,t),n.lineTo(l+L,t+L),n.lineTo(B-L,t+L),n.lineTo(B,t),n.closePath(),z=n.createLinearGradient((B+l)/2,t+L,(B+l)/2,t),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, .4)"),n.fillStyle=z,n.fill(),n.restore());!0===R&&(n.save(),n.beginPath(),n.moveTo(l,s),n.lineTo(l+
106
+ L,s-L),n.lineTo(B-L,s-L),n.lineTo(B,s),n.closePath(),z=n.createLinearGradient((B+l)/2,s-L,(B+l)/2,s),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, .4)"),n.fillStyle=z,n.fill(),n.restore());!0===U&&(n.save(),n.beginPath(),n.moveTo(l,t),n.lineTo(l+L,t+L),n.lineTo(l+L,s-L),n.lineTo(l,s),n.closePath(),z=n.createLinearGradient(l+L,(s+t)/2,l,(s+t)/2),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,n.fill(),n.restore());!0===S&&(n.save(),n.beginPath(),n.moveTo(B,
107
+ t),n.lineTo(B-L,t+L),n.lineTo(B-L,s-L),n.lineTo(B,s),z=n.createLinearGradient(B-L,(s+t)/2,B,(s+t)/2),z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,z.addColorStop(0,y),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,n.fill(),n.closePath(),n.restore())},ma=function(n){for(var l="",t=0;t<n.length;t++)l+=String.fromCharCode(Math.ceil(n.length/57/5)^n.charCodeAt(t));return l},nb=(s=window&&window[ma("mnb`uhno")]&&window[ma("mnb`uhno")].href)&&(-1!==s.indexOf(ma("b`ow`rkr/bnl"))||
108
108
  -1!==s.indexOf(ma("gdonqhy/bnl"))||-1!==s.indexOf(ma("gheemd"))||-1!==s.indexOf(ma("bnedqdo"))||-1!==s.indexOf(ma("beqo"))),lb=s&&(-1!==s.indexOf(ma("b`ow`rkr/bnl"))||-1!==s.indexOf(ma("gdonqhy/bnl"))),mb={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=="},
109
109
  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"},
110
110
  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="},
111
111
  menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"}};
112
- V.prototype.setOptions=function(l,t){if(sa[this._defaultsKey]){var s=sa[this._defaultsKey],B;for(B in s)"publicProperties"!==B&&s.hasOwnProperty(B)&&(this[B]=l&&B in l?l[B]:t&&B in t?t[B]:s[B])}else Ja&&window.console&&console.log("defaults not set")};V.prototype.get=function(l){var t=sa[this._defaultsKey];if("options"===l)return this.options&&this.options._isPlaceholder?null:this.options;if(t.hasOwnProperty(l)||t.publicProperties&&t.publicProperties.hasOwnProperty(l))return this[l];window.console&&
113
- window.console.log('Property "'+l+"\" doesn't exist. Please check for typo.")};V.prototype.set=function(l,t,s){s="undefined"===typeof s?!0:s;var B=sa[this._defaultsKey];if("options"===l)this.createUserOptions(t);else if(B.hasOwnProperty(l)||B.publicProperties&&B.publicProperties.hasOwnProperty(l)&&"readWrite"===B.publicProperties[l])this.options._isPlaceholder&&this.createUserOptions(),this.options[l]=t;else{window.console&&(B.publicProperties&&B.publicProperties.hasOwnProperty(l)&&"readOnly"===B.publicProperties[l]?
114
- window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."));return}s&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};V.prototype.addTo=function(l,t,s,B){B="undefined"===typeof B?!0:B;var y=sa[this._defaultsKey];y.hasOwnProperty(l)||y.publicProperties&&y.publicProperties.hasOwnProperty(l)&&"readWrite"===y.publicProperties[l]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===
115
- typeof this.options[l]&&(this.options[l]=[]),l=this.options[l],s="undefined"===typeof s||null===s?l.length:s,l.splice(s,0,t),B&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()):window.console&&(y.publicProperties&&y.publicProperties.hasOwnProperty(l)&&"readOnly"===y.publicProperties[l]?window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."))};V.prototype.createUserOptions=function(l){if("undefined"!==
112
+ W.prototype.setOptions=function(l,t){if(sa[this._defaultsKey]){var s=sa[this._defaultsKey],B;for(B in s)"publicProperties"!==B&&s.hasOwnProperty(B)&&(this[B]=l&&B in l?l[B]:t&&B in t?t[B]:s[B])}else Ja&&window.console&&console.log("defaults not set")};W.prototype.get=function(l){var t=sa[this._defaultsKey];if("options"===l)return this.options&&this.options._isPlaceholder?null:this.options;if(t.hasOwnProperty(l)||t.publicProperties&&t.publicProperties.hasOwnProperty(l))return this[l];window.console&&
113
+ window.console.log('Property "'+l+"\" doesn't exist. Please check for typo.")};W.prototype.set=function(l,t,s){s="undefined"===typeof s?!0:s;var B=sa[this._defaultsKey];if("options"===l)this.createUserOptions(t);else if(B.hasOwnProperty(l)||B.publicProperties&&B.publicProperties.hasOwnProperty(l)&&"readWrite"===B.publicProperties[l])this.options._isPlaceholder&&this.createUserOptions(),this.options[l]=t;else{window.console&&(B.publicProperties&&B.publicProperties.hasOwnProperty(l)&&"readOnly"===B.publicProperties[l]?
114
+ window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."));return}s&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};W.prototype.addTo=function(l,t,s,B){B="undefined"===typeof B?!0:B;var y=sa[this._defaultsKey];y.hasOwnProperty(l)||y.publicProperties&&y.publicProperties.hasOwnProperty(l)&&"readWrite"===y.publicProperties[l]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===
115
+ typeof this.options[l]&&(this.options[l]=[]),l=this.options[l],s="undefined"===typeof s||null===s?l.length:s,l.splice(s,0,t),B&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()):window.console&&(y.publicProperties&&y.publicProperties.hasOwnProperty(l)&&"readOnly"===y.publicProperties[l]?window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."))};W.prototype.createUserOptions=function(l){if("undefined"!==
116
116
  typeof l||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 t=this.parent.options[this.optionsName],s=t.length;this.options._isPlaceholder||(Ca(t),s=t.indexOf(this.options));this.options="undefined"===typeof l?{}:l;t[s]=this.options}else this.options="undefined"===typeof l?{}:l,this.parent&&(l=this.parent.options,this.optionsName?
117
- t=this.optionsName:(t=this._defaultsKey)&&0!==t.length?(s=t.charAt(0).toLowerCase(),1<t.length&&(s=s.concat(t.slice(1))),t=s):t=void 0,l[t]=this.options)};V.prototype.remove=function(l){l="undefined"===typeof l?!0:l;if(this.isOptionsInArray){var t=this.parent.options[this.optionsName];Ca(t);var s=t.indexOf(this.options);0<=s&&t.splice(s,1)}else delete this.parent.options[this.optionsName];l&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};V.prototype.updateOption=
117
+ t=this.optionsName:(t=this._defaultsKey)&&0!==t.length?(s=t.charAt(0).toLowerCase(),1<t.length&&(s=s.concat(t.slice(1))),t=s):t=void 0,l[t]=this.options)};W.prototype.remove=function(l){l="undefined"===typeof l?!0:l;if(this.isOptionsInArray){var t=this.parent.options[this.optionsName];Ca(t);var s=t.indexOf(this.options);0<=s&&t.splice(s,1)}else delete this.parent.options[this.optionsName];l&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};W.prototype.updateOption=
118
118
  function(n){!sa[this._defaultsKey]&&(Ja&&window.console)&&console.log("defaults not set");var t=sa[this._defaultsKey],s={},B=this[n],y=this._themeOptionsKey,E=this._index;this.theme&&l(this.parent)&&l(y)&&l(E)?s=l(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&this.parent.themeOptions&&(this.options.theme?"Chart"===this._defaultsKey&&Qa[this.options.theme]?s=Qa[this.options.theme]:stockThemes[this.options.theme]&&(s=stockThemes[this.options.theme][y]):
119
- this.parent.themeOptions[y]&&(null===E?s=this.parent.themeOptions[y]:0<this.parent.themeOptions[y].length&&(s=Math.min(this.parent.themeOptions[y].length-1,E),s=this.parent.themeOptions[y][s])));this.themeOptions=s;n in t&&(B=n in this.options?this.options[n]:s&&n in s?s[n]:t[n]);if(B===this[n])return!1;this[n]=B;return!0};V.prototype.trackChanges=function(l){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[l]=this.options[l]};V.prototype.isBeingTracked=function(l){this.options._oldOptions||
120
- (this.options._oldOptions={});return this.options._oldOptions[l]?!0:!1};V.prototype.hasOptionChanged=function(l){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[l]!==this.options[l]};V.prototype.addEventListener=function(l,t,s){l&&t&&(this._eventListeners[l]=this._eventListeners[l]||[],this._eventListeners[l].push({context:s||this,eventHandler:t}))};V.prototype.removeEventListener=function(l,t){if(l&&t&&this._eventListeners[l])for(var s=this._eventListeners[l],
121
- B=0;B<s.length;B++)if(s[B].eventHandler===t){s[B].splice(B,1);break}};V.prototype.removeAllEventListeners=function(){this._eventListeners=[]};V.prototype.dispatchEvent=function(l,t,s){if(l&&this._eventListeners[l]){t=t||{};for(var B=this._eventListeners[l],y=0;y<B.length;y++)B[y].eventHandler.call(B[y].context,t)}"function"===typeof this[l]&&this[l].call(s||this.chart,t)};Ga.prototype.registerSpace=function(l,t){"top"===l?this._topOccupied+=t.height:"bottom"===l?this._bottomOccupied+=t.height:"left"===
119
+ this.parent.themeOptions[y]&&(null===E?s=this.parent.themeOptions[y]:0<this.parent.themeOptions[y].length&&(s=Math.min(this.parent.themeOptions[y].length-1,E),s=this.parent.themeOptions[y][s])));this.themeOptions=s;n in t&&(B=n in this.options?this.options[n]:s&&n in s?s[n]:t[n]);if(B===this[n])return!1;this[n]=B;return!0};W.prototype.trackChanges=function(l){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[l]=this.options[l]};W.prototype.isBeingTracked=function(l){this.options._oldOptions||
120
+ (this.options._oldOptions={});return this.options._oldOptions[l]?!0:!1};W.prototype.hasOptionChanged=function(l){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[l]!==this.options[l]};W.prototype.addEventListener=function(l,t,s){l&&t&&(this._eventListeners[l]=this._eventListeners[l]||[],this._eventListeners[l].push({context:s||this,eventHandler:t}))};W.prototype.removeEventListener=function(l,t){if(l&&t&&this._eventListeners[l])for(var s=this._eventListeners[l],
121
+ B=0;B<s.length;B++)if(s[B].eventHandler===t){s[B].splice(B,1);break}};W.prototype.removeAllEventListeners=function(){this._eventListeners=[]};W.prototype.dispatchEvent=function(l,t,s){if(l&&this._eventListeners[l]){t=t||{};for(var B=this._eventListeners[l],y=0;y<B.length;y++)B[y].eventHandler.call(B[y].context,t)}"function"===typeof this[l]&&this[l].call(s||this.chart,t)};Ga.prototype.registerSpace=function(l,t){"top"===l?this._topOccupied+=t.height:"bottom"===l?this._bottomOccupied+=t.height:"left"===
122
122
  l?this._leftOccupied+=t.width:"right"===l&&(this._rightOccupied+=t.width)};Ga.prototype.unRegisterSpace=function(l,t){"top"===l?this._topOccupied-=t.height:"bottom"===l?this._bottomOccupied-=t.height:"left"===l?this._leftOccupied-=t.width:"right"===l&&(this._rightOccupied-=t.width)};Ga.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,
123
- height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Ga.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};ra(la,V);la.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)|
123
+ height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Ga.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};ra(la,W);la.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)|
124
124
  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)};la.prototype.render=function(l){if(0!==this.fontSize){l&&this.ctx.save();var t=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var s=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+s);"middle"===this.textBaseline&&(s=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var B=
125
- 0,y=this.topPadding,E=null;this.ctx.roundRect||Ba(this.ctx);this.borderDashType=this.borderDashType||"solid";this.ctx.setLineDash&&this.ctx.setLineDash(J(this.borderDashType,this.borderThickness));(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,s,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(s=0;s<this._wrappedText.lines.length;s++)E=this._wrappedText.lines[s],"right"===
125
+ 0,y=this.topPadding,E=null;this.ctx.roundRect||Ba(this.ctx);this.borderDashType=this.borderDashType||"solid";this.ctx.setLineDash&&this.ctx.setLineDash(K(this.borderDashType,this.borderThickness));(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,s,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(s=0;s<this._wrappedText.lines.length;s++)E=this._wrappedText.lines[s],"right"===
126
126
  this.textAlign?B=this.width-E.width-this.rightPadding:"left"===this.textAlign?B=this.leftPadding:"center"===this.textAlign&&(B=(this.width-(this.leftPadding+this.rightPadding))/2-E.width/2+this.leftPadding),this.ctx.fillText(E.text,B,y),y+=E.height;this.ctx.font=t;l&&this.ctx.restore()}};la.prototype.setText=function(l){this.text=l;this._isDirty=!0;this._wrappedText=null};la.prototype.measureText=function(){this._lineHeight=$a(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";
127
127
  this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};la.prototype._getLineWithWidth=function(l,t,s){l=String(l);if(!l)return{text:"",width:0};var B=s=0,y=l.length-1,E=Infinity;for(this.ctx.font=this._getFontString();B<=y;){var E=Math.floor((B+y)/2),z=l.substr(0,E+1);s=this.ctx.measureText(z).width;if(s<t)B=E+1;else if(s>t)y=E-1;else break}s>t&&1<z.length&&(z=z.substr(0,z.length-1),s=this.ctx.measureText(z).width);t=!0;if(z.length===l.length||" "===l[z.length])t=!1;
128
- t&&(l=z.split(" "),1<l.length&&l.pop(),z=l.join(" "),s=this.ctx.measureText(z).width);return{text:z,width:s}};la.prototype._wrapText=function(){var l=new String(Ia(String(this.text))),t=[],s=this.ctx.font,B=0,y=0;this.ctx.font=this._getFontString();if(0===this.frontSize)y=B=0;else for(;0<l.length;){var E=this.maxHeight-(this.topPadding+this.bottomPadding),z=this._getLineWithWidth(l,this.maxWidth-(this.leftPadding+this.rightPadding),!1);z.height=this._lineHeight;t.push(z);var J=y,y=Math.max(y,z.width),
129
- B=B+z.height,l=Ia(l.slice(z.text.length,l.length));E&&B>E&&(z=t.pop(),B-=z.height,y=J)}this._wrappedText={lines:t,width:y,height:B};this.width=y+(this.leftPadding+this.rightPadding);this.height=B+(this.topPadding+this.bottomPadding);this.ctx.font=s};la.prototype._getFontString=function(){var l;l=""+(this.fontStyle?this.fontStyle+" ":"");l+=this.fontWeight?this.fontWeight+" ":"";l+=this.fontSize?this.fontSize+"px ":"";var C=this.fontFamily?this.fontFamily+"":"";!t&&C&&(C=C.split(",")[0],"'"!==C[0]&&
130
- '"'!==C[0]&&(C="'"+C+"'"));return l+=C};ra(Xa,V);ra(Da,V);Da.prototype.setLayout=function(){var n=this.dockInsidePlotArea?this.chart.plotArea:this.chart,t=n.layoutManager.getFreeSpace(),s=t.x1,B=t.y1,y=0,B=0,s=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?40:0,E;this.textAlign=l(this.options.textAlign)?this.horizontalAlign:this.textAlign;"center"===this.verticalAlign?"left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=
128
+ t&&(l=z.split(" "),1<l.length&&l.pop(),z=l.join(" "),s=this.ctx.measureText(z).width);return{text:z,width:s}};la.prototype._wrapText=function(){var l=new String(Ia(String(this.text))),t=[],s=this.ctx.font,B=0,y=0;this.ctx.font=this._getFontString();if(0===this.frontSize)y=B=0;else for(;0<l.length;){var E=this.maxHeight-(this.topPadding+this.bottomPadding),z=this._getLineWithWidth(l,this.maxWidth-(this.leftPadding+this.rightPadding),!1);z.height=this._lineHeight;t.push(z);var K=y,y=Math.max(y,z.width),
129
+ B=B+z.height,l=Ia(l.slice(z.text.length,l.length));E&&B>E&&(z=t.pop(),B-=z.height,y=K)}this._wrappedText={lines:t,width:y,height:B};this.width=y+(this.leftPadding+this.rightPadding);this.height=B+(this.topPadding+this.bottomPadding);this.ctx.font=s};la.prototype._getFontString=function(){var l;l=""+(this.fontStyle?this.fontStyle+" ":"");l+=this.fontWeight?this.fontWeight+" ":"";l+=this.fontSize?this.fontSize+"px ":"";var C=this.fontFamily?this.fontFamily+"":"";!t&&C&&(C=C.split(",")[0],"'"!==C[0]&&
130
+ '"'!==C[0]&&(C="'"+C+"'"));return l+=C};ra(Xa,W);ra(Da,W);Da.prototype.setLayout=function(){var n=this.dockInsidePlotArea?this.chart.plotArea:this.chart,t=n.layoutManager.getFreeSpace(),s=t.x1,B=t.y1,y=0,B=0,s=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?40:0,E;this.textAlign=l(this.options.textAlign)?this.horizontalAlign:this.textAlign;"center"===this.verticalAlign?"left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=
131
131
  t.height-4),B=0.5*t.width-this.margin-2):(null===this.maxWidth&&(this.maxWidth=t.width-4),B=0.5*t.height-4):(null===this.maxWidth&&(this.maxWidth=t.width-4-s*("center"===this.horizontalAlign?2:1)),B=0.5*t.height-this.margin-2,y=0);if(this.text){l(this.padding)||"number"!==typeof this.padding?l(this.padding)||"object"!==typeof this.padding||(E=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,E+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):
132
132
  E=2*this.padding;this.wrap||(B=Math.min(B,1.5*this.fontSize+E));var z=new la(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:B,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"middle"}),
133
- J=z.measureText();"center"===this.verticalAlign?("left"===this.horizontalAlign?(s=t.x1+2+z._lineHeight/2,B=t.y2-2-(this.maxWidth/2-J.width/2),y=-90,E="left",this.width=J.height,this.height=J.width):"right"===this.horizontalAlign?(s=t.x2-2-z._lineHeight/2,B=t.y1+2+(this.maxWidth/2-J.width/2),y=90,E="right",this.width=J.height,this.height=J.width):(B=t.y1+2+(t.height/2-J.height/2)+z._lineHeight/2,s=t.x1+2+(t.width/2-J.width/2),E="center",this.width=J.width,this.height=J.height),t="center"):("bottom"===
134
- this.verticalAlign?(B=t.y2-2-J.height+z._lineHeight/2,E="bottom"):(B=t.y1+2+z._lineHeight/2,E="top"),s="left"===this.horizontalAlign?t.x1+2:"right"===this.horizontalAlign?t.x2-2-J.width-s:t.x1+t.width/2-J.width/2,t=this.horizontalAlign,this.width=J.width,this.height=J.height);z.x=s;z.y=B;z.angle=y;z.horizontalAlign=t;this._textBlock=z;n.layoutManager.registerSpace(E,{width:this.width+("left"===E||"right"===E?this.margin+2:0),height:this.height+("top"===E||"bottom"===E?this.margin+2:0)});this.bounds=
135
- {x1:s,y1:B-z._lineHeight/2,x2:s+this.width,y2:B+this.height-z._lineHeight/2};"center"===this.verticalAlign&&("left"===this.horizontalAlign&&(this.bounds={x1:s-z._lineHeight/2,y1:B-this.height,x2:s+this.width-z._lineHeight/2,y2:B}),"right"===this.horizontalAlign&&(this.bounds={x1:s-z._lineHeight/2,y1:B,x2:s+this.width-z._lineHeight/2,y2:B+this.height}));this.ctx.textBaseline="top"}};Da.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};ra(Ka,V);Ka.prototype.setLayout=Da.prototype.setLayout;
136
- Ka.prototype.render=Da.prototype.render;Ya.prototype.get=function(l,t){var s=null;0<this.pool.length?(s=this.pool.pop(),Oa(s,l,t)):s=wa(l,t);return s};Ya.prototype.release=function(l){this.pool.push(l)};ra(La,V);var Sa={addTheme:function(l,t){Qa[l]=t},addColorSet:function(l,t){Ea[l]=t},addCultureInfo:function(l,t){Ma[l]=t},formatNumber:function(l,t,s){s=s||"en";if(Ma[s])return ea(l,t||"#,##0.##",new La(s));throw"Unknown Culture Name";},formatDate:function(l,t,s){s=s||"en";if(Ma[s])return Fa(l,t||
133
+ K=z.measureText();"center"===this.verticalAlign?("left"===this.horizontalAlign?(s=t.x1+2+z._lineHeight/2,B=t.y2-2-(this.maxWidth/2-K.width/2),y=-90,E="left",this.width=K.height,this.height=K.width):"right"===this.horizontalAlign?(s=t.x2-2-z._lineHeight/2,B=t.y1+2+(this.maxWidth/2-K.width/2),y=90,E="right",this.width=K.height,this.height=K.width):(B=t.y1+2+(t.height/2-K.height/2)+z._lineHeight/2,s=t.x1+2+(t.width/2-K.width/2),E="center",this.width=K.width,this.height=K.height),t="center"):("bottom"===
134
+ this.verticalAlign?(B=t.y2-2-K.height+z._lineHeight/2,E="bottom"):(B=t.y1+2+z._lineHeight/2,E="top"),s="left"===this.horizontalAlign?t.x1+2:"right"===this.horizontalAlign?t.x2-2-K.width-s:t.x1+t.width/2-K.width/2,t=this.horizontalAlign,this.width=K.width,this.height=K.height);z.x=s;z.y=B;z.angle=y;z.horizontalAlign=t;this._textBlock=z;n.layoutManager.registerSpace(E,{width:this.width+("left"===E||"right"===E?this.margin+2:0),height:this.height+("top"===E||"bottom"===E?this.margin+2:0)});this.bounds=
135
+ {x1:s,y1:B-z._lineHeight/2,x2:s+this.width,y2:B+this.height-z._lineHeight/2};"center"===this.verticalAlign&&("left"===this.horizontalAlign&&(this.bounds={x1:s-z._lineHeight/2,y1:B-this.height,x2:s+this.width-z._lineHeight/2,y2:B}),"right"===this.horizontalAlign&&(this.bounds={x1:s-z._lineHeight/2,y1:B,x2:s+this.width-z._lineHeight/2,y2:B+this.height}));this.ctx.textBaseline="top"}};Da.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};ra(Ka,W);Ka.prototype.setLayout=Da.prototype.setLayout;
136
+ Ka.prototype.render=Da.prototype.render;Ya.prototype.get=function(l,t){var s=null;0<this.pool.length?(s=this.pool.pop(),Oa(s,l,t)):s=wa(l,t);return s};Ya.prototype.release=function(l){this.pool.push(l)};ra(La,W);var Sa={addTheme:function(l,t){Qa[l]=t},addColorSet:function(l,t){Ea[l]=t},addCultureInfo:function(l,t){Ma[l]=t},formatNumber:function(l,t,s){s=s||"en";if(Ma[s])return ea(l,t||"#,##0.##",new La(s));throw"Unknown Culture Name";},formatDate:function(l,t,s){s=s||"en";if(Ma[s])return Fa(l,t||
137
137
  "DD MMM YYYY",new La(s));throw"Unknown Culture Name";}};"undefined"!==typeof module&&"undefined"!==typeof module.exports?module.exports=Sa:"function"===typeof define&&define.amd?define([],function(){return Sa}):(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:Sa);s=Sa.Chart=function(){function n(a,
138
138
  e){return a.x-e.x}function s(a,e,c){e=e||{};l(c)?(this.predefinedThemes=Qa,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;s.base.constructor.call(this,"Chart",this.optionsName,e,this.index,this.parent);var b=this;this._containerId=
139
139
  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 Ya;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):
@@ -141,32 +141,32 @@ this._containerId)?(this.container.innerHTML="",e=a=0,e=db(this.container),a=thi
141
141
  this.width=a,this.height=e,this.x1=this.y1=0,this.x2=this.width,this.y2=this.height,this.selectedColorSet="undefined"!==typeof Ea[this.colorSet]?Ea[this.colorSet]:Ea.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",t||(this._canvasJSContainer.style.height=
142
142
  "0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=wa(a,e),this._preRenderCanvas=wa(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",Ba(this.ctx),this._preRenderCtx=this._preRenderCanvas.getContext("2d"),
143
143
  this._preRenderCtx.textBaseline="top",Ba(this._preRenderCtx),t?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=wa(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=wa(a,e),this.overlaidCanvas.style.position="absolute",this.overlaidCanvas.style.webkitTapHighlightColor="transparent",this.overlaidCanvas.style.WebkitUserSelect=
144
- "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",Ba(this.overlaidCanvasCtx)),this._eventManager=new ja(this),this.windowResizeHandler=K(window,"resize",function(){b._updateSize()&&(b.render(),b.isNavigator&&(b.stockChart&&
145
- 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"),Q(this._toolBar,{position:"absolute",right:"1px",top:"1px",webkitTapHighlightColor:"transparent"}),this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},K(this.overlaidCanvas,"click",
146
- function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);xa(b._dropdownMenu)},this.allDOMEventHandlers),K(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,window.navigator.msPointerEnabled?
147
- "MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),K(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},
144
+ "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",Ba(this.overlaidCanvasCtx)),this._eventManager=new ia(this),this.windowResizeHandler=L(window,"resize",function(){b._updateSize()&&(b.render(),b.isNavigator&&(b.stockChart&&
145
+ 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"),Q(this._toolBar,{position:"absolute",right:"1px",top:"1px",webkitTapHighlightColor:"transparent"}),this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},L(this.overlaidCanvas,"click",
146
+ function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);xa(b._dropdownMenu)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?
147
+ "MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},
148
148
  this.allDOMEventHandlers),this.toolTip=new na(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 y(a,e){for(var c=[],b,d=0;d<a.length;d++)if(0==d)c.push(a[0]);else{var g,h,k;k=d-1;g=0===k?0:k-1;h=k===a.length-1?k:k+1;b=Math.abs((a[h].x-a[g].x)/(0===a[h].x-a[k].x?
149
149
  0.01:a[h].x-a[k].x))*(e-1)/2+1;var l=(a[h].x-a[g].x)/b;b=(a[h].y-a[g].y)/b;c[c.length]=a[k].x>a[g].x&&0<l||a[k].x<a[g].x&&0>l?{x:a[k].x+l/3,y:a[k].y+b/3}:{x:a[k].x,y:a[k].y+(1===c.length?0:b/9)};k=d;g=0===k?0:k-1;h=k===a.length-1?k:k+1;b=Math.abs((a[h].x-a[g].x)/(0===a[k].x-a[g].x?0.01:a[k].x-a[g].x))*(e-1)/2+1;l=(a[h].x-a[g].x)/b;b=(a[h].y-a[g].y)/b;c[c.length]=a[k].x>a[g].x&&0<l||a[k].x<a[g].x&&0>l?{x:a[k].x-l/3,y:a[k].y-b/3}:{x:a[k].x,y:a[k].y-b/9};c[c.length]=a[d]}return c}function B(a,e,c,b,
150
- d,g,h,k,l,m){var r=0;m?(h.color=g,k.color=g):m=1;r=l?Math.abs(d-c):Math.abs(b-e);r=0<h.trimLength?Math.abs(r*h.trimLength/100):Math.abs(r-h.length);l?(c+=r/2,d-=r/2):(e+=r/2,b-=r/2);var r=1===Math.round(h.thickness)%2?0.5:0,p=1===Math.round(k.thickness)%2?0.5:0;a.save();a.globalAlpha=m;a.strokeStyle=k.color||g;a.lineWidth=k.thickness||2;a.setLineDash&&a.setLineDash(J(k.dashType,k.thickness));a.beginPath();l&&0<k.thickness?(a.moveTo(b-h.thickness/2,Math.round((c+d)/2)-p),a.lineTo(e+h.thickness/2,Math.round((c+
151
- d)/2)-p)):0<k.thickness&&(a.moveTo(Math.round((e+b)/2)-p,c+h.thickness/2),a.lineTo(Math.round((e+b)/2)-p,d-h.thickness/2));a.stroke();a.strokeStyle=h.color||g;a.lineWidth=h.thickness||2;a.setLineDash&&a.setLineDash(J(h.dashType,h.thickness));a.beginPath();l&&0<h.thickness?(a.moveTo(b-r,c),a.lineTo(b-r,d),a.moveTo(e+r,c),a.lineTo(e+r,d)):0<h.thickness&&(a.moveTo(e,c+r),a.lineTo(b,c+r),a.moveTo(e,d-r),a.lineTo(b,d-r));a.stroke();a.restore()}function E(a,e){E.base.constructor.call(this,"Legend","legend",
150
+ d,g,h,k,l,m){var r=0;m?(h.color=g,k.color=g):m=1;r=l?Math.abs(d-c):Math.abs(b-e);r=0<h.trimLength?Math.abs(r*h.trimLength/100):Math.abs(r-h.length);l?(c+=r/2,d-=r/2):(e+=r/2,b-=r/2);var r=1===Math.round(h.thickness)%2?0.5:0,p=1===Math.round(k.thickness)%2?0.5:0;a.save();a.globalAlpha=m;a.strokeStyle=k.color||g;a.lineWidth=k.thickness||2;a.setLineDash&&a.setLineDash(K(k.dashType,k.thickness));a.beginPath();l&&0<k.thickness?(a.moveTo(b-h.thickness/2,Math.round((c+d)/2)-p),a.lineTo(e+h.thickness/2,Math.round((c+
151
+ d)/2)-p)):0<k.thickness&&(a.moveTo(Math.round((e+b)/2)-p,c+h.thickness/2),a.lineTo(Math.round((e+b)/2)-p,d-h.thickness/2));a.stroke();a.strokeStyle=h.color||g;a.lineWidth=h.thickness||2;a.setLineDash&&a.setLineDash(K(h.dashType,h.thickness));a.beginPath();l&&0<h.thickness?(a.moveTo(b-r,c),a.lineTo(b-r,d),a.moveTo(e+r,c),a.lineTo(e+r,d)):0<h.thickness&&(a.moveTo(e,c+r),a.lineTo(b,c+r),a.moveTo(e,d-r),a.lineTo(b,d-r));a.stroke();a.restore()}function E(a,e){E.base.constructor.call(this,"Legend","legend",
152
152
  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=$a(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function T(a,e,c,b){T.base.constructor.call(this,
153
153
  "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=
154
154
  0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function z(a,e,c,b,d,g){z.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,
155
155
  viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===d?("left"===g||"bottom"===g?(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=
156
156
  null)):"left"===g||"bottom"===g?(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"===
157
157
  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=g;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,
158
- 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 ia(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);
158
+ 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 ha(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);
159
159
  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=
160
160
  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,
161
161
  this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum");l(this.options.tickLength)&&(this.tickLength="left"===g||"right"===g?Math.min(this.tickLength,0.3*this.chart.width):Math.min(this.tickLength,0.3*this.chart.height))}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=[];
162
- 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 Y(this.chart,"customBreaks",this.options.customBreaks[a],a,++this.chart._eventManager.lastObjectId,
162
+ 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,
163
163
  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+
164
- 1].endValue),window.console&&window.console.log("CanvasJS Error: Breaks "+a+" and "+(a+1)+" are overlapping."),this._appliedBreaks.splice(a,2),a--)}}function Y(a,e,c,b,d,g){Y.base.constructor.call(this,"Break",e,c,b,g);this.id=d;this.chart=a;this.ctx=this.chart.ctx;this.scaleBreaks=g;this.optionsName=e;this.isOptionsInArray=!0;this.type=c.type?this.type:g.type;this.fillOpacity=l(c.fillOpacity)?g.fillOpacity:this.fillOpacity;this.lineThickness=l(c.lineThickness)?g.lineThickness:this.lineThickness;
164
+ 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,g){ba.base.constructor.call(this,"Break",e,c,b,g);this.id=d;this.chart=a;this.ctx=this.chart.ctx;this.scaleBreaks=g;this.optionsName=e;this.isOptionsInArray=!0;this.type=c.type?this.type:g.type;this.fillOpacity=l(c.fillOpacity)?g.fillOpacity:this.fillOpacity;this.lineThickness=l(c.lineThickness)?g.lineThickness:this.lineThickness;
165
165
  this.color=c.color?this.color:g.color;this.lineColor=c.lineColor?this.lineColor:g.lineColor;this.lineDashType=c.lineDashType?this.lineDashType:g.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=
166
- "undefined"===typeof c.spacing?g.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=g.spacing);this.size=g.parent.logarithmic?1:0}function ia(a,e,c,b,d){ia.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=
166
+ "undefined"===typeof c.spacing?g.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=g.spacing);this.size=g.parent.logarithmic?1:0}function ha(a,e,c,b,d){ha.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=
167
167
  !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);this.tickLength=l(e.tickLength)?d.tickLength:e.tickLength}function da(a,e,c){da.base.constructor.call(this,
168
168
  "Crosshair","crosshair",e,null,c);this.chart=a;this.ctx=this.chart.ctx;this.axis=c;this.optionsName="crosshair";this._thicknessType="pixel"}function na(a,e){na.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=
169
- "toolTip";this._initialize()}function ja(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=wa(this.chart.width,this.chart.height,!0);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function ma(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}ra(s,V);s.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&
169
+ "toolTip";this._initialize()}function ia(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=wa(this.chart.width,this.chart.height,!0);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function ma(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}ra(s,W);s.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&
170
170
  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],g=a[e][3],g=g||!1;c.removeEventListener?c.removeEventListener(b,d,g):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);
171
171
  for(;this._dropdownMenu&&this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild);this.container=this._canvasJSContainer=null;this.toolTip.container=null;this.canvas&&Aa(this.canvas);this.overlaidCanvas&&Aa(this.overlaidCanvas);this._preRenderCanvas&&Aa(this._preRenderCanvas);this._breaksCanvas&&Aa(this._breaksCanvas);this._eventManager&&this._eventManager.ghostCanvas&&Aa(this._eventManager.ghostCanvas);this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=
172
172
  this._zoomButton=null};s.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=
@@ -174,30 +174,31 @@ this._zoomButton=null};s.prototype._updateOptions=function(){var a=this;this.upd
174
174
  this.stockChart.culture);this._cultureInfo=new La(this.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&t;this.updateOption("animationDuration");this.stockChart&&(this.stockChart.options&&!l(this.stockChart.options.animationEnabled))&&(this.animationEnabled=this.stockChart.animationEnabled&&t);this.stockChart&&(this.stockChart.options&&!l(this.stockChart.options.animationDuration))&&(this.animationDuration=this.stockChart.animationDuration);this.updateOption("rangeChanging");
175
175
  this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.toolbar=new Xa(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)Q(this._zoomButton,{border:this.toolbar.buttonBorderThickness+
176
176
  "px solid "+this.toolbar.buttonBorderColor,height:2*this.toolbar.buttonBorderThickness+25+"px",width:2*this.toolbar.buttonBorderThickness+40+"px",backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&this._zoomButton.childNodes[0]&&Q(this._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});else{var c=!1;xa(this._zoomButton=document.createElement("button"));va(this,this._zoomButton,"pan");this._toolBar.appendChild(this._zoomButton);
177
- Q(this._zoomButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,height:2*this.toolbar.buttonBorderThickness+25+"px",width:2*this.toolbar.buttonBorderThickness+40+"px",backgroundClip:"padding-box"});K(this._zoomButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers);K(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,va(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"));a.render()},
178
- this.allDOMEventHandlers);K(this._zoomButton,"mousemove",function(){c?c=!1:(Q(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);K(this._zoomButton,"mouseout",function(){c||(Q(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,
177
+ Q(this._zoomButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,height:2*this.toolbar.buttonBorderThickness+25+"px",width:2*this.toolbar.buttonBorderThickness+40+"px",backgroundClip:"padding-box"});L(this._zoomButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers);L(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,va(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"));a.render()},
178
+ this.allDOMEventHandlers);L(this._zoomButton,"mousemove",function(){c?c=!1:(Q(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);L(this._zoomButton,"mouseout",function(){c||(Q(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,
179
179
  transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?(Q(this._resetButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,borderLeft:"none",height:2*this.toolbar.buttonBorderThickness+25+"px",width:this.toolbar.buttonBorderThickness+40+"px",backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),
180
180
  0>=navigator.userAgent.search("MSIE")&&this._resetButton.childNodes[0]&&Q(this._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}),this._resetButton.title=this._cultureInfo.resetText):(c=!1,xa(this._resetButton=document.createElement("button")),va(this,this._resetButton,"reset"),Q(this._resetButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,borderLeft:"none",height:2*this.toolbar.buttonBorderThickness+25+"px",width:this.toolbar.buttonBorderThickness+
181
- 40+"px",backgroundClip:"padding-box"}),this._toolBar.appendChild(this._resetButton),K(this._resetButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers),K(this._resetButton,"click",function(){a.toolTip.hide();a.toolTip&&a.toolTip.enabled&&a.toolTip.dispatchEvent("hidden",{chart:a,toolTip:a.toolTip},a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=
181
+ 40+"px",backgroundClip:"padding-box"}),this._toolBar.appendChild(this._resetButton),L(this._resetButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers),L(this._resetButton,"click",function(){a.toolTip.hide();a.toolTip&&a.toolTip.enabled&&a.toolTip.dispatchEvent("hidden",{chart:a,toolTip:a.toolTip},a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=
182
182
  !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=
183
183
  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")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});xa(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter={stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,
184
184
  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||
185
185
  l(a.stockChart.rangeSelector.inputFields.options.startValue)&&l(a.stockChart.rangeSelector.inputFields.options.endValue)?null:"inputFields":"navigator",a.stockChart.rangeUpdatedBy=null,a.stockChart.rangeSelector.sessionVariables._clickedRangeButtonIndex=null,a.syncCharts(null,null),!l(a.stockChart._selectedRangeButtonIndex)&&a.stockChart._selectedRangeButtonIndex<a.stockChart.rangeSelector.buttons.length&&(b=a.stockChart.rangeSelector.buttons[a.stockChart._selectedRangeButtonIndex],b.enabled&&(b.state=
186
186
  "on",b.textBlock.fontWeight="bold",b.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect,b.render())),a.stockChart.rangeSelector&&a.stockChart.rangeSelector.enabled&&a.stockChart.rangeSelector.render());a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,
187
- a.stockChart))},this.allDOMEventHandlers),K(this._resetButton,"mousemove",function(){c||(Q(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),K(this._resetButton,"mouseout",function(){c||(Q(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,
187
+ a.stockChart))},this.allDOMEventHandlers),L(this._resetButton,"mousemove",function(){c||(Q(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),L(this._resetButton,"mouseout",function(){c||(Q(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,
188
188
  transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(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),Na(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=
189
- !1))}else this.panEnabled=this.zoomEnabled=!1;jb(this);"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?va(a,a._zoomButton,"zoom"):va(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&va(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(e in this.toolTip.options)this.toolTip.options.hasOwnProperty(e)&&this.toolTip.updateOption(e)};s.prototype._updateSize=
190
- function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0,b=db(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-
191
- 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++)Oa(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};s.prototype._initialize=function(){this.isNavigator=l(this.parent)||l(this.parent._defaultsKey)||"Navigator"!==this.parent._defaultsKey?!1:!0;this._animator?this._animator.cancelAllAnimations():
192
- this._animator=new ma(this);this.removeAllEventListeners();this.disableToolTip=this.sessionVariables.disableToolTip||!1;this._axes=[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=t&&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();
193
- this.plotInfo={axisPlacement:null,plotTypes:[]};this.layoutManager=new Ga(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<=s._supportedChartTypes.indexOf(this.options.data[c].type)){var b=new T(this,this.options.data[c],a-1,++this._eventManager.lastObjectId);if(!l(b)&&b.dataPoints)for(var d=
194
- 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===
195
- 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]):"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?(b._colorSet=[this.selectedColorSet[0]],
196
- b.color=this.selectedColorSet[0]):b._colorSet=this.selectedColorSet:b._colorSet=[b.color];if("boxAndWhisker"===b.type||"error"===b.type)b.whiskerColor=null===b.whiskerColor?b.color:b.whiskerColor,b.stemColor=null===b.stemColor?b.color:b.stemColor;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||
197
- (b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(n):b.dataPoints.sort(n));this.data.push(b);var d=b.axisPlacement,e=e||d,g;"normal"===d?"xySwapped"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===d?"normal"===this.plotInfo.axisPlacement?g='You cannot combine "'+
198
- b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===d?"normal"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):
199
- null===d&&"none"===this.plotInfo.axisPlacement&&(g='You cannot combine "'+b.type+'" with pie chart');if(g&&window.console){window.console.log(g);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=
200
- !0;this._plotAreaElements=[]};s._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(" "));s.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||
189
+ !1))}else this.panEnabled=this.zoomEnabled=!1;jb(this);this._toolBar&&(this._zoomButton&&this._zoomButton.parentNode===this._toolBar&&this._toolBar.appendChild(this._zoomButton),this._resetButton&&this._resetButton.parentNode===this._toolBar&&this._toolBar.appendChild(this._resetButton),this._menuButton&&this._menuButton.parentNode===this._toolBar&&this._toolBar.appendChild(this._menuButton));"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?va(a,a._zoomButton,"zoom"):va(a,
190
+ a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&va(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(e in this.toolTip.options)this.toolTip.options.hasOwnProperty(e)&&this.toolTip.updateOption(e)};s.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0,b=db(this.container);this.options.width?e=this.width:this.width=
191
+ 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!==
192
+ e*ka||this.canvas.height!==c*ka){for(b=0;b<a.length;b++)Oa(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};s.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 ma(this);this.removeAllEventListeners();this.disableToolTip=this.sessionVariables.disableToolTip||!1;this._axes=
193
+ [];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=t&&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 Ga(0,0,this.width,this.height,this.isNavigator?
194
+ 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<=s._supportedChartTypes.indexOf(this.options.data[c].type)){var b=new T(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";
195
+ 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]],
196
+ b.color=this.selectedColorSet[b.index%this.selectedColorSet.length]):"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?(b._colorSet=[this.selectedColorSet[0]],b.color=this.selectedColorSet[0]):b._colorSet=this.selectedColorSet:b._colorSet=[b.color];
197
+ if("boxAndWhisker"===b.type||"error"===b.type)b.whiskerColor=null===b.whiskerColor?b.color:b.whiskerColor,b.stemColor=null===b.stemColor?b.color:b.stemColor;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(n):
198
+ b.dataPoints.sort(n));this.data.push(b);var d=b.axisPlacement,e=e||d,g;"normal"===d?"xySwapped"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===d?"normal"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?
199
+ g='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===d?"normal"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===d&&"none"===this.plotInfo.axisPlacement&&(g='You cannot combine "'+b.type+'" with pie chart');
200
+ if(g&&window.console){window.console.log(g);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=[]};s._supportedChartTypes=
201
+ 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(" "));s.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||
201
202
  "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 z(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new z(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?
202
203
  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 z(this,"axisY",this.options.axisY,0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new z(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[e].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[e]);
203
204
  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 z(this,"axisY2",this.options.axisY2[c],c,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new z(this,"axisY2",this.options.axisY2[c],c,"axisY","top"));this.data[e].axisY=this.axisY2[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<
@@ -232,24 +233,24 @@ function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a
232
233
  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()};s.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&
233
234
  !(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=0;h<a.dataSeriesIndexes.length;h++){var k=this.data[a.dataSeriesIndexes[h]],l=0,m=!1,r=!1,p;if("normal"===k.axisPlacement||"xySwapped"===k.axisPlacement)var q=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?
234
235
  0:-Infinity,f=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[l].x&&k.dataPoints[l].x.getTime||"dateTime"===k.xValueType)g=!0;for(l=0;l<k.dataPoints.length;l++){"undefined"===typeof k.dataPoints[l].x&&(k.dataPoints[l].x=l+(a.axisX.logarithmic?1:0));k.dataPoints[l].x.getTime?(g=!0,b=k.dataPoints[l].x.getTime()):
235
- b=k.dataPoints[l].x;d=k.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 L=b/k.dataPoints[l-1].x;1>L&&(L=1/L);c.minDiff>L&&1!==L&&(c.minDiff=L)}else L=b-k.dataPoints[l-1].x,0>L&&(L*=-1),c.minDiff>L&&0!==L&&(c.minDiff=L);null!==d&&null!==k.dataPoints[l-1].y&&(a.axisY.logarithmic?(L=d/k.dataPoints[l-1].y,1>L&&(L=1/L),e.minDiff>L&&1!==L&&(e.minDiff=L)):(L=d-k.dataPoints[l-1].y,0>L&&
236
- (L*=-1),e.minDiff>L&&0!==L&&(e.minDiff=L)))}if(b<q&&!m)null!==d&&(p=b);else{if(!m&&(m=!0,0<l)){l-=2;continue}if(b>f&&!r)r=!0;else if(b>f&&r)continue;k.dataPoints[l].label&&(a.axisX.labels[b]=k.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&p<b&&(c.viewPortMin=p):(d<e.viewPortMin&&"number"===typeof d&&(e.viewPortMin=d),d>e.viewPortMax&&"number"===typeof d&&(e.viewPortMax=d))}}k.axisX.valueType=k.xValueType=g?"dateTime":"number"}};
237
- s.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=[],k=[],N=Infinity,m=-Infinity,r={},p=0;p<a.dataSeriesIndexes.length;p++){var q=this.data[a.dataSeriesIndexes[p]],f=0,L=!1,I=!1,n;if("normal"===q.axisPlacement||"xySwapped"===q.axisPlacement)var u=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:
236
+ b=k.dataPoints[l].x;d=k.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 I=b/k.dataPoints[l-1].x;1>I&&(I=1/I);c.minDiff>I&&1!==I&&(c.minDiff=I)}else I=b-k.dataPoints[l-1].x,0>I&&(I*=-1),c.minDiff>I&&0!==I&&(c.minDiff=I);null!==d&&null!==k.dataPoints[l-1].y&&(a.axisY.logarithmic?(I=d/k.dataPoints[l-1].y,1>I&&(I=1/I),e.minDiff>I&&1!==I&&(e.minDiff=I)):(I=d-k.dataPoints[l-1].y,0>I&&
237
+ (I*=-1),e.minDiff>I&&0!==I&&(e.minDiff=I)))}if(b<q&&!m)null!==d&&(p=b);else{if(!m&&(m=!0,0<l)){l-=2;continue}if(b>f&&!r)r=!0;else if(b>f&&r)continue;k.dataPoints[l].label&&(a.axisX.labels[b]=k.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&p<b&&(c.viewPortMin=p):(d<e.viewPortMin&&"number"===typeof d&&(e.viewPortMin=d),d>e.viewPortMax&&"number"===typeof d&&(e.viewPortMax=d))}}k.axisX.valueType=k.xValueType=g?"dateTime":"number"}};
238
+ s.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=[],k=[],N=Infinity,m=-Infinity,r={},p=0;p<a.dataSeriesIndexes.length;p++){var q=this.data[a.dataSeriesIndexes[p]],f=0,I=!1,J=!1,n;if("normal"===q.axisPlacement||"xySwapped"===q.axisPlacement)var u=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:
238
239
  a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,t=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(q.dataPoints[f].x&&q.dataPoints[f].x.getTime||"dateTime"===q.xValueType)g=!0;for(f=0;f<q.dataPoints.length;f++){"undefined"===typeof q.dataPoints[f].x&&(q.dataPoints[f].x=f+(a.axisX.logarithmic?
239
240
  1:0));q.dataPoints[f].x.getTime?(g=!0,b=q.dataPoints[f].x.getTime()):b=q.dataPoints[f].x;d=l(q.dataPoints[f].y)?0:q.dataPoints[f].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<f){if(a.axisX.logarithmic){var v=b/q.dataPoints[f-1].x;1>v&&(v=1/v);c.minDiff>v&&1!==v&&(c.minDiff=v)}else v=b-q.dataPoints[f-1].x,0>v&&(v*=-1),c.minDiff>v&&0!==v&&(c.minDiff=v);null!==d&&null!==q.dataPoints[f-1].y&&(a.axisY.logarithmic?0<d&&(v=d/q.dataPoints[f-1].y,1>v&&(v=1/v),e.minDiff>v&&1!==v&&(e.minDiff=v)):(v=d-q.dataPoints[f-
240
- 1].y,0>v&&(v*=-1),e.minDiff>v&&0!==v&&(e.minDiff=v)))}if(b<u&&!L)null!==q.dataPoints[f].y&&(n=b);else{if(!L&&(L=!0,0<f)){f-=2;continue}if(b>t&&!I)I=!0;else if(b>t&&I)continue;q.dataPoints[f].label&&(a.axisX.labels[b]=q.dataPoints[f].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===q.dataPoints[f].y?c.viewPortMin===b&&n<b&&(c.viewPortMin=n):(r[b]=(r[b]||0)+q.dataPoints[f].y,q.dataPointEOs[f].cumulativeY=r[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=
241
+ 1].y,0>v&&(v*=-1),e.minDiff>v&&0!==v&&(e.minDiff=v)))}if(b<u&&!I)null!==q.dataPoints[f].y&&(n=b);else{if(!I&&(I=!0,0<f)){f-=2;continue}if(b>t&&!J)J=!0;else if(b>t&&J)continue;q.dataPoints[f].label&&(a.axisX.labels[b]=q.dataPoints[f].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===q.dataPoints[f].y?c.viewPortMin===b&&n<b&&(c.viewPortMin=n):(r[b]=(r[b]||0)+q.dataPoints[f].y,q.dataPointEOs[f].cumulativeY=r[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=
241
242
  (a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?h[b]?h[b]+=d:(h[b]=d,N=Math.min(d,N)):k[b]?k[b]+=d:(k[b]=d,m=Math.max(d,m)))}}a.axisY.scaleBreaks&&(a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks)&&(e.dataPointYPositiveSums?(e.dataPointYPositiveSums.push.apply(e.dataPointYPositiveSums,h),e.dataPointYNegativeSums.push.apply(e.dataPointYPositiveSums,k)):(e.dataPointYPositiveSums=h,e.dataPointYNegativeSums=k));q.axisX.valueType=q.xValueType=g?"dateTime":"number"}for(f in h)h.hasOwnProperty(f)&&
242
243
  !isNaN(f)&&(a=h[f],a<e.min&&(e.min=Math.min(a,N)),a>e.max&&(e.max=a),f<c.viewPortMin||f>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=Math.min(a,N)),a>e.viewPortMax&&(e.viewPortMax=a)));for(f in k)k.hasOwnProperty(f)&&!isNaN(f)&&(a=k[f],a<e.min&&(e.min=a),a>e.max&&(e.max=Math.max(a,m)),f<c.viewPortMin||f>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=a),a>e.viewPortMax&&(e.viewPortMax=Math.max(a,m))))}};s.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=
243
- a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=!1,k=!1,N={},m=[],r=0;r<a.dataSeriesIndexes.length;r++){var p=this.data[a.dataSeriesIndexes[r]],q=0,f=!1,L=!1,I;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var n=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,u=a.axisX.sessionVariables.newViewportMaximum?
244
+ a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=!1,k=!1,N={},m=[],r=0;r<a.dataSeriesIndexes.length;r++){var p=this.data[a.dataSeriesIndexes[r]],q=0,f=!1,I=!1,J;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var n=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,u=a.axisX.sessionVariables.newViewportMaximum?
244
245
  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[q].x&&p.dataPoints[q].x.getTime||"dateTime"===p.xValueType)g=!0;for(q=0;q<p.dataPoints.length;q++){"undefined"===typeof p.dataPoints[q].x&&(p.dataPoints[q].x=q+(a.axisX.logarithmic?1:0));p.dataPoints[q].x.getTime?(g=!0,b=p.dataPoints[q].x.getTime()):b=p.dataPoints[q].x;d=l(p.dataPoints[q].y)?
245
246
  null:p.dataPoints[q].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<q){if(a.axisX.logarithmic){var t=b/p.dataPoints[q-1].x;1>t&&(t=1/t);c.minDiff>t&&1!==t&&(c.minDiff=t)}else t=b-p.dataPoints[q-1].x,0>t&&(t*=-1),c.minDiff>t&&0!==t&&(c.minDiff=t);l(d)||null===p.dataPoints[q-1].y||(a.axisY.logarithmic?0<d&&(t=d/p.dataPoints[q-1].y,1>t&&(t=1/t),e.minDiff>t&&1!==t&&(e.minDiff=t)):(t=d-p.dataPoints[q-1].y,0>t&&(t*=-1),e.minDiff>t&&0!==t&&(e.minDiff=t)))}m[b]=m[b]?m[b]+Math.abs(d):Math.abs(d);if(b<n&&!f)null!==
246
- d&&(I=b);else{if(!f&&(f=!0,0<q)){m[b]-=Math.abs(d);m[g&&p.dataPoints[q-1].x.getTime?p.dataPoints[q-1].x.getTime():p.dataPoints[q-1].x]-=Math.abs(p.dataPoints[q-1].y||0);q-=2;continue}if(b>u&&!L)L=!0;else if(b>u&&L)continue;p.dataPoints[q].label&&(a.axisX.labels[b]=p.dataPoints[q].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&I<b&&(c.viewPortMin=I):(N[b]=(N[b]||0)+p.dataPoints[q].y,p.dataPointEOs[q].cumulativeY=N[b],a.yTotals[b]=(a.yTotals[b]?
247
+ d&&(J=b);else{if(!f&&(f=!0,0<q)){m[b]-=Math.abs(d);m[g&&p.dataPoints[q-1].x.getTime?p.dataPoints[q-1].x.getTime():p.dataPoints[q-1].x]-=Math.abs(p.dataPoints[q-1].y||0);q-=2;continue}if(b>u&&!I)I=!0;else if(b>u&&I)continue;p.dataPoints[q].label&&(a.axisX.labels[b]=p.dataPoints[q].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&J<b&&(c.viewPortMin=J):(N[b]=(N[b]||0)+p.dataPoints[q].y,p.dataPointEOs[q].cumulativeY=N[b],a.yTotals[b]=(a.yTotals[b]?
247
248
  a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?h=!0:0>d&&(k=!0))}}p.axisX.valueType=p.xValueType=g?"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)):h&&!k?(e.max=l(e.viewPortMax)?99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):h&&k?(e.max=l(e.viewPortMax)?
248
249
  99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99)):!h&&k&&(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=m}};s.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g,h,k=!1,l=0;l<a.dataSeriesIndexes.length;l++){var m=this.data[a.dataSeriesIndexes[l]],
249
- r=0,p=!1,q=!1,f,L,t;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var n=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,u=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:
250
- a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(m.dataPoints[r].x&&m.dataPoints[r].x.getTime||"dateTime"===m.xValueType)k=!0;for(r=0;r<m.dataPoints.length;r++){"undefined"===typeof m.dataPoints[r].x&&(m.dataPoints[r].x=r+(a.axisX.logarithmic?1:0));m.dataPoints[r].x.getTime?(k=!0,b=m.dataPoints[r].x.getTime()):b=m.dataPoints[r].x;if((d=m.dataPoints[r].y)&&d.length){g=Math.min.apply(null,d);h=Math.max.apply(null,d);L=!0;for(var w=0;w<d.length;w++)null===d.k&&(L=!1);L&&(p||
251
- (t=f),f=b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);g<e.min&&(e.min=g);h>e.max&&(e.max=h);0<r&&(a.axisX.logarithmic?(L=b/m.dataPoints[r-1].x,1>L&&(L=1/L),c.minDiff>L&&1!==L&&(c.minDiff=L)):(L=b-m.dataPoints[r-1].x,0>L&&(L*=-1),c.minDiff>L&&0!==L&&(c.minDiff=L)),d&&(null!==d[0]&&m.dataPoints[r-1].y&&null!==m.dataPoints[r-1].y[0])&&(a.axisY.logarithmic?(L=d[0]/m.dataPoints[r-1].y[0],1>L&&(L=1/L),e.minDiff>L&&1!==L&&(e.minDiff=L)):(L=d[0]-m.dataPoints[r-1].y[0],0>L&&(L*=-1),e.minDiff>L&&0!==L&&(e.minDiff=
252
- L))));if(!(b<n)||p){if(!p&&(p=!0,0<r)){r-=2;f=t;continue}if(b>u&&!q)q=!0;else if(b>u&&q)continue;m.dataPoints[r].label&&(a.axisX.labels[b]=m.dataPoints[r].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&d)for(w=0;w<d.length;w++)if(null===d[w]&&f<b){c.viewPortMin=f;break}null===d?c.viewPortMin===b&&f<b&&(c.viewPortMin=f):(g<e.viewPortMin&&(e.viewPortMin=g),h>e.viewPortMax&&(e.viewPortMax=h))}}m.axisX.valueType=m.xValueType=k?"dateTime":"number"}};
250
+ r=0,p=!1,q=!1,f,I,t;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var n=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,u=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:
251
+ a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(m.dataPoints[r].x&&m.dataPoints[r].x.getTime||"dateTime"===m.xValueType)k=!0;for(r=0;r<m.dataPoints.length;r++){"undefined"===typeof m.dataPoints[r].x&&(m.dataPoints[r].x=r+(a.axisX.logarithmic?1:0));m.dataPoints[r].x.getTime?(k=!0,b=m.dataPoints[r].x.getTime()):b=m.dataPoints[r].x;if((d=m.dataPoints[r].y)&&d.length){g=Math.min.apply(null,d);h=Math.max.apply(null,d);I=!0;for(var w=0;w<d.length;w++)null===d.k&&(I=!1);I&&(p||
252
+ (t=f),f=b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);g<e.min&&(e.min=g);h>e.max&&(e.max=h);0<r&&(a.axisX.logarithmic?(I=b/m.dataPoints[r-1].x,1>I&&(I=1/I),c.minDiff>I&&1!==I&&(c.minDiff=I)):(I=b-m.dataPoints[r-1].x,0>I&&(I*=-1),c.minDiff>I&&0!==I&&(c.minDiff=I)),d&&(null!==d[0]&&m.dataPoints[r-1].y&&null!==m.dataPoints[r-1].y[0])&&(a.axisY.logarithmic?(I=d[0]/m.dataPoints[r-1].y[0],1>I&&(I=1/I),e.minDiff>I&&1!==I&&(e.minDiff=I)):(I=d[0]-m.dataPoints[r-1].y[0],0>I&&(I*=-1),e.minDiff>I&&0!==I&&(e.minDiff=
253
+ I))));if(!(b<n)||p){if(!p&&(p=!0,0<r)){r-=2;f=t;continue}if(b>u&&!q)q=!0;else if(b>u&&q)continue;m.dataPoints[r].label&&(a.axisX.labels[b]=m.dataPoints[r].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&d)for(w=0;w<d.length;w++)if(null===d[w]&&f<b){c.viewPortMin=f;break}null===d?c.viewPortMin===b&&f<b&&(c.viewPortMin=f):(g<e.viewPortMin&&(e.viewPortMin=g),h>e.viewPortMax&&(e.viewPortMax=h))}}m.axisX.valueType=m.xValueType=k?"dateTime":"number"}};
253
254
  s.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,g=!1,h=0;h<a.dataSeriesIndexes.length;h++){var k=this.data[a.dataSeriesIndexes[h]],l=0,m=!1,r=!1,p=b=0;if("normal"===k.axisPlacement||"xySwapped"===k.axisPlacement)var q=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:
254
255
  a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,f=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[l].x&&k.dataPoints[l].x.getTime||"dateTime"===k.xValueType)g=!0;for(l=0;l<k.dataPoints.length;l++)"undefined"!==typeof k.dataPoints[l].isCumulativeSum&&
255
256
  !0===k.dataPoints[l].isCumulativeSum?(k.dataPointEOs[l].cumulativeSumYStartValue=0,k.dataPointEOs[l].cumulativeSum=0===l?0:k.dataPointEOs[l-1].cumulativeSum,k.dataPoints[l].y=0===l?0:k.dataPointEOs[l-1].cumulativeSum):"undefined"!==typeof k.dataPoints[l].isIntermediateSum&&!0===k.dataPoints[l].isIntermediateSum?(k.dataPointEOs[l].cumulativeSumYStartValue=p,k.dataPointEOs[l].cumulativeSum=0===l?0:k.dataPointEOs[l-1].cumulativeSum,k.dataPoints[l].y=0===l?0:b,p=0===l?0:k.dataPointEOs[l-1].cumulativeSum,
@@ -266,7 +267,7 @@ b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===b.type||"box
266
267
  r=m;for(k in q)if(q.hasOwnProperty(k)&&!isNaN(k)&&(p=q[k],!l(p))){var f=Math.floor((p-N)/b);p<r[f].min&&(r[f].min=p);p>r[f].max&&(r[f].max=p)}delete this._axes[h].dataInfo.dataPointYPositiveSums}if(this._axes[h].dataInfo.dataPointYNegativeSums){q=this._axes[h].dataInfo.dataPointYNegativeSums;r=m;for(k in q)q.hasOwnProperty(k)&&!isNaN(k)&&(p=-1*q[k],l(p)||(f=Math.floor((p-N)/b),p<r[f].min&&(r[f].min=p),p>r[f].max&&(r[f].max=p)));delete this._axes[h].dataInfo.dataPointYNegativeSums}for(k=0;k<m.length-
267
268
  1;k++)if(r=m[k].max,isFinite(r))for(;k<m.length-1;)if(N=m[k+1].min,isFinite(N)){p=N-r;p>b&&g.push({diff:p,start:r,end:N});break}else k++;if(this._axes[h].scaleBreaks.customBreaks)for(k=0;k<this._axes[h].scaleBreaks.customBreaks.length;k++)for(b=0;b<g.length;b++)if(this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].start&&g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].endValue||this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].start&&g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].endValue||
268
269
  g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].startValue&&this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].end||g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].endValue&&this._axes[h].scaleBreaks.customBreaks[k].endValue<=g[b].end)g.splice(b,1),b--;g.sort(function(a,b){return b.diff-a.diff});for(k=0;k<Math.min(g.length,this._axes[h].scaleBreaks.maxNumberOfAutoBreaks);k++)b=a(g[k].start,g[k].end,this._axes[h].logarithmic?this._axes[h].dataInfo.max/this._axes[h].dataInfo.min:
269
- this._axes[h].dataInfo.max-this._axes[h].dataInfo.min,this._axes[h].logarithmic),this._axes[h].scaleBreaks.autoBreaks.push(new Y(this,"autoBreaks",b,k,++this._eventManager.lastObjectId,this._axes[h].scaleBreaks)),this._axes[h].scaleBreaks._appliedBreaks.push(this._axes[h].scaleBreaks.autoBreaks[this._axes[h].scaleBreaks.autoBreaks.length-1]);this._axes[h].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};s.prototype.renderCrosshairs=function(a,e){for(var c,b=0;b<
270
+ this._axes[h].dataInfo.max-this._axes[h].dataInfo.min,this._axes[h].logarithmic),this._axes[h].scaleBreaks.autoBreaks.push(new ba(this,"autoBreaks",b,k,++this._eventManager.lastObjectId,this._axes[h].scaleBreaks)),this._axes[h].scaleBreaks._appliedBreaks.push(this._axes[h].scaleBreaks.autoBreaks[this._axes[h].scaleBreaks.autoBreaks.length-1]);this._axes[h].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};s.prototype.renderCrosshairs=function(a,e){for(var c,b=0;b<
270
271
  this.axisX.length;b++)if(c=this.axisX[b].sessionVariables.crosshairShownByPixel,this.axisX[b]!=a&&this.axisX[b].crosshair&&this.axisX[b].crosshair.enabled&&!this.axisX[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisX[b].crosshair.render(null,this.sessionVariables.mouseY,
271
272
  this.axisX[b].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisX[b].convertPixelToValue(this.sessionVariables.mouseX)),l(e)||e)c={chart:this,crosshair:this.axisX[b].crosshair.options,axis:this.axisX[b],value:this.axisX[b].crosshair.value},this.axisX[b].crosshair.dispatchEvent("updated",c,this.axisX[b])}else l(c)||c||this.axisX[b].showCrosshair(this.axisX[b].crosshair._updatedValue);for(b=0;b<this.axisX2.length;b++)if(c=this.axisX2[b].sessionVariables.crosshairShownByPixel,
272
273
  this.axisX2[b]!=a&&this.axisX2[b].crosshair&&this.axisX2[b].crosshair.enabled&&!this.axisX2[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisX2[b].crosshair.render(null,this.sessionVariables.mouseY,this.axisX2[b].convertPixelToValue(this.sessionVariables.mouseY)):
@@ -275,7 +276,7 @@ a&&this.axisY[b].crosshair&&this.axisY[b].crosshair.enabled&&!this.axisY[b].sess
275
276
  this.sessionVariables.mouseY,this.axisY[b].convertPixelToValue(this.sessionVariables.mouseY)),l(e)||e)c={chart:this,crosshair:this.axisY[b].crosshair.options,axis:this.axisY[b],value:this.axisY[b].crosshair.value},this.axisY[b].crosshair.dispatchEvent("updated",c,this.axisY[b])}else l(c)||c||this.axisY[b].showCrosshair(this.axisY[b].crosshair._updatedValue);for(b=0;b<this.axisY2.length;b++)if(c=this.axisY2[b].sessionVariables.crosshairShownByPixel,this.axisY2[b]!=a&&this.axisY2[b].crosshair&&this.axisY2[b].crosshair.enabled&&
276
277
  !this.axisY2[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisY2[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseX)):this.axisY2[b].crosshair.render(null,this.sessionVariables.mouseY,
277
278
  this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseY)),l(e)||e)c={chart:this,crosshair:this.axisY2[b].crosshair.options,axis:this.axisY2[b],value:this.axisY2[b].crosshair.value},this.axisY2[b].crosshair.dispatchEvent("updated",c,this.axisY2[b])}else l(c)||c||this.axisY2[b].showCrosshair(this.axisY2[b].crosshair._updatedValue)};s.prototype.getDataPointAtXY=function(a,e,c){c=c||!1;for(var b=[],d=this._dataInRenderedOrder.length-1;0<=d;d--){var g=null;(g=this._dataInRenderedOrder[d].getDataPointAtXY(a,
278
- e,c))&&b.push(g)}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=aa("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};s.prototype.getObjectAtXY=
279
+ e,c))&&b.push(g)}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=V("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};s.prototype.getObjectAtXY=
279
280
  function(a,e,c){var b=null;if(c=this.getDataPointAtXY(a,e,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(t)b=bb(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};s.prototype.getAutoFontSize=pb;s.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};s.prototype.clearCanvas=ob;s.prototype.attachEvent=function(a){this._events.push(a)};
280
281
  s.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=Ra(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":e=["mousemove"];break;case "touchend":case "MSPointerUp":var g=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,e="touchstart"===this._lastTouchEventType||
281
282
  "MSPointerDown"===this._lastTouchEventType||300>g?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1<c.length)){d=Ra(b);d.time=new Date;try{var h=d.y-this._lastTouchData.y,g=d.time-this._lastTouchData.time;if(1<Math.abs(h)&&this._lastTouchData.scroll||5<Math.abs(h)&&250>g)this._lastTouchData.scroll=!0,this.stockChart&&(this.stockChart._chartScroll=!0)}catch(k){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=
@@ -311,211 +312,211 @@ k,d?a:this.plotArea.x2-this.plotArea.x1,g?e:this.plotArea.y2-this.plotArea.y1,"x
311
312
  (this.axisY[k].sessionVariables.crosshairShownByPixel=!0,this.axisY[k].renderCrosshair(a,e));if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&(this.axisY2[k].sessionVariables.crosshairShownByPixel=!0,this.axisY2[k].renderCrosshair(a,e));if(this.axisX&&0<this.axisX.length)for(k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&this.axisX[k].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(k=
312
313
  0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&this.axisX2[k].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&this.axisY[k].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&this.axisY2[k].crosshair.renderLabel()}};s.prototype._zoomPanToSelectedRegion=function(a,
313
314
  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=e[b];var g=c[b];d.setViewPortRange(g.val1,g.val2);this.syncCharts&&("axisX"===d.type&&"y"!=this.zoomType)&&this.syncCharts(g.val1,g.val2);this.stockChart&&(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:g.val1,maximum:g.val2})}return a.isValid};s.prototype.validateRegion=function(a,e,c,b,d){d=d||!1;
314
- for(var g=0<=this.zoomType.indexOf("x"),h=0<=this.zoomType.indexOf("y"),k=!1,l=[],m=[],r=[],p=0;p<this._axes.length;p++)("axisX"===this._axes[p].type&&g||"axisY"===this._axes[p].type&&h)&&m.push(this._axes[p]);for(h=0;h<m.length;h++){var p=m[h],g=!1,q=p.convertPixelToValue({x:a,y:e}),f=p.convertPixelToValue({x:c,y:b});if(q>f)var L=f,f=q,q=L;if(p.scaleBreaks)for(L=0;!g&&L<p.scaleBreaks._appliedBreaks.length;L++)g=p.scaleBreaks._appliedBreaks[L].startValue<=q&&p.scaleBreaks._appliedBreaks[L].endValue>=
315
- f;if(isFinite(p.dataInfo.minDiff))if(L=p.getApparentDifference(q,f,null,!0),!(g||!(this.panEnabled&&p.scaleBreaks&&p.scaleBreaks._appliedBreaks.length)&&(p.logarithmic&&L<Math.pow(p.dataInfo.minDiff,3)||!p.logarithmic&&L<3*Math.abs(p.dataInfo.minDiff))||q<p.minimum||f>p.maximum))l.push(p),r.push({val1:q,val2:f}),k=!0;else if(!d){k=!1;break}}return{isValid:k,axesWithValidRange:l,axesRanges:r}};s.prototype.preparePlotArea=function(){var a=this.plotArea;!t&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);
315
+ for(var g=0<=this.zoomType.indexOf("x"),h=0<=this.zoomType.indexOf("y"),k=!1,l=[],m=[],r=[],p=0;p<this._axes.length;p++)("axisX"===this._axes[p].type&&g||"axisY"===this._axes[p].type&&h)&&m.push(this._axes[p]);for(h=0;h<m.length;h++){var p=m[h],g=!1,q=p.convertPixelToValue({x:a,y:e}),f=p.convertPixelToValue({x:c,y:b});if(q>f)var I=f,f=q,q=I;if(p.scaleBreaks)for(I=0;!g&&I<p.scaleBreaks._appliedBreaks.length;I++)g=p.scaleBreaks._appliedBreaks[I].startValue<=q&&p.scaleBreaks._appliedBreaks[I].endValue>=
316
+ f;if(isFinite(p.dataInfo.minDiff))if(I=p.getApparentDifference(q,f,null,!0),!(g||!(this.panEnabled&&p.scaleBreaks&&p.scaleBreaks._appliedBreaks.length)&&(p.logarithmic&&I<Math.pow(p.dataInfo.minDiff,3)||!p.logarithmic&&I<3*Math.abs(p.dataInfo.minDiff))||q<p.minimum||f>p.maximum))l.push(p),r.push({val1:q,val2:f}),k=!0;else if(!d){k=!1;break}}return{isValid:k,axesWithValidRange:l,axesRanges:r}};s.prototype.preparePlotArea=function(){var a=this.plotArea;!t&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);
316
317
  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<c.lineCoordinates.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<
317
318
  this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=e.x1<c.lineCoordinates.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;t||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=
318
- 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 Ga(a.x1,a.y1,a.x2,a.y2,2)};s.prototype.renderIndexLabels=function(a){var e=a||this.plotArea.ctx,c=this.plotArea,b=0,d=0,g=0,h=d=g=0,k=0,N=b=0,m=0;for(a=0;a<this._indexLabels.length;a++){var r=this._indexLabels[a],p=r.chartType.toLowerCase(),q,f,k=aa("indexLabelFontColor",r.dataPoint,r.dataSeries),L=aa("indexLabelFontSize",r.dataPoint,r.dataSeries),N=aa("indexLabelFontFamily",r.dataPoint,r.dataSeries),
319
- m=aa("indexLabelFontStyle",r.dataPoint,r.dataSeries);q=aa("indexLabelFontWeight",r.dataPoint,r.dataSeries);var n=aa("indexLabelBackgroundColor",r.dataPoint,r.dataSeries);f=aa("indexLabelBorderColor",r.dataPoint,r.dataSeries);var g=aa("indexLabelBorderThickness",r.dataPoint,r.dataSeries),d=aa("indexLabelMaxWidth",r.dataPoint,r.dataSeries),h=aa("indexLabelWrap",r.dataPoint,r.dataSeries),x=aa("indexLabelLineDashType",r.dataPoint,r.dataSeries),u=aa("indexLabelLineColor",r.dataPoint,r.dataSeries),w=l(r.dataPoint.indexLabelLineThickness)?
320
- l(r.dataSeries.options.indexLabelLineThickness)?0:r.dataSeries.options.indexLabelLineThickness:r.dataPoint.indexLabelLineThickness,b=0<w?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,v=aa("indexLabelPadding",r.dataPoint,r.dataSeries),s={percent:null,total:null},A=null;if(0<=r.dataSeries.type.indexOf("stacked")||"pie"===r.dataSeries.type||"doughnut"===r.dataSeries.type)s=this.getPercentAndTotal(r.dataSeries,r.dataPoint);if(r.dataSeries.indexLabelFormatter||
319
+ 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 Ga(a.x1,a.y1,a.x2,a.y2,2)};s.prototype.renderIndexLabels=function(a){var e=a||this.plotArea.ctx,c=this.plotArea,b=0,d=0,g=0,h=d=g=0,k=0,N=b=0,m=0;for(a=0;a<this._indexLabels.length;a++){var r=this._indexLabels[a],p=r.chartType.toLowerCase(),q,f,k=V("indexLabelFontColor",r.dataPoint,r.dataSeries),I=V("indexLabelFontSize",r.dataPoint,r.dataSeries),N=V("indexLabelFontFamily",r.dataPoint,r.dataSeries),
320
+ m=V("indexLabelFontStyle",r.dataPoint,r.dataSeries);q=V("indexLabelFontWeight",r.dataPoint,r.dataSeries);var n=V("indexLabelBackgroundColor",r.dataPoint,r.dataSeries);f=V("indexLabelBorderColor",r.dataPoint,r.dataSeries);var g=V("indexLabelBorderThickness",r.dataPoint,r.dataSeries),d=V("indexLabelMaxWidth",r.dataPoint,r.dataSeries),h=V("indexLabelWrap",r.dataPoint,r.dataSeries),x=V("indexLabelLineDashType",r.dataPoint,r.dataSeries),u=V("indexLabelLineColor",r.dataPoint,r.dataSeries),w=l(r.dataPoint.indexLabelLineThickness)?
321
+ l(r.dataSeries.options.indexLabelLineThickness)?0:r.dataSeries.options.indexLabelLineThickness:r.dataPoint.indexLabelLineThickness,b=0<w?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,v=V("indexLabelPadding",r.dataPoint,r.dataSeries),s={percent:null,total:null},A=null;if(0<=r.dataSeries.type.indexOf("stacked")||"pie"===r.dataSeries.type||"doughnut"===r.dataSeries.type)s=this.getPercentAndTotal(r.dataSeries,r.dataPoint);if(r.dataSeries.indexLabelFormatter||
321
322
  r.dataPoint.indexLabelFormatter)A={chart:this,dataSeries:r.dataSeries,dataPoint:r.dataPoint,index:r.indexKeyword,total:s.total,percent:s.percent};var D=r.dataPoint.indexLabelFormatter?r.dataPoint.indexLabelFormatter(A):r.dataPoint.indexLabel?this.replaceKeywordsWithValue(r.dataPoint.indexLabel,r.dataPoint,r.dataSeries,null,r.indexKeyword):r.dataSeries.indexLabelFormatter?r.dataSeries.indexLabelFormatter(A):r.dataSeries.indexLabel?this.replaceKeywordsWithValue(r.dataSeries.indexLabel,r.dataPoint,r.dataSeries,
322
- null,r.indexKeyword):null;if(!l(D)&&""!==D){var s=aa("indexLabelPlacement",r.dataPoint,r.dataSeries),A=aa("indexLabelOrientation",r.dataPoint,r.dataSeries),z=aa("indexLabelTextAlign",r.dataPoint,r.dataSeries),y=r.direction,P=r.dataSeries.axisX,O=r.dataSeries.axisY,ca=!1,n=new la(e,{x:0,y:0,maxWidth:d?d:0.5*this.width,maxHeight:(h?5*L:1.5*L)+("object"===typeof v?(v.top||0)+(v.bottom||0):2*v),angle:"horizontal"===A?0:-90,text:D,padding:v,backgroundColor:n,borderColor:f,borderThickness:g,textAlign:z,
323
- fontSize:L,fontFamily:N,fontWeight:q,fontColor:k,fontStyle:m,textBaseline:"middle"});n.measureText();r.dataSeries.indexLabelMaxWidth=n.maxWidth;if("stackedarea100"===p){if(r.point.x<c.x1||r.point.x>c.x2||r.point.y<c.y1-1||r.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum||Math.max.apply(null,r.dataPoint.y)<O.viewportMinimum||Math.min.apply(null,r.dataPoint.y)>O.viewportMaximum)continue}else if(0<=p.indexOf("line")||
324
- 0<=p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum||r.dataPoint.y<O.viewportMinimum||r.dataPoint.y>O.viewportMaximum)continue}else if(0<=p.indexOf("column")){if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum||(0<r.dataPoint.y.length?Math.max.apply(null,r.dataPoint.y):r.cumulativeY?r.cumulativeY:r.dataPoint.y)<O.viewportMinimum||(0<r.dataPoint.y.length?Math.min.apply(null,r.dataPoint.y):r.cumulativeY?
325
- r.cumulativeY-r.dataPoint.y:0)>O.viewportMaximum)continue}else if("waterfall"===p||"error"===p&&!r.axisSwapped){if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum||r.bounds.y1>c.y2||r.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum||r.bounds.x1>c.x2||r.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum||Math.max.apply(null,
326
- r.dataPoint.y)<O.viewportMinimum||Math.min.apply(null,r.dataPoint.y)>O.viewportMaximum)continue}else if(r.dataPoint.x<P.viewportMinimum||r.dataPoint.x>P.viewportMaximum)continue;h=k=2;"horizontal"===A?(N=n.width,m=n.height):(m=n.width,N=n.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))s="auto",k=4;else if(0<=p.indexOf("stacked"))"auto"===s&&(s="inside");else if("bubble"===p||"scatter"===p)s="inside";q=r.point.x-N/2+("horizontal"===A?0:n._lineHeight/
323
+ null,r.indexKeyword):null;if(!l(D)&&""!==D){var s=V("indexLabelPlacement",r.dataPoint,r.dataSeries),A=V("indexLabelOrientation",r.dataPoint,r.dataSeries),z=V("indexLabelTextAlign",r.dataPoint,r.dataSeries),y=r.direction,O=r.dataSeries.axisX,P=r.dataSeries.axisY,ca=!1,n=new la(e,{x:0,y:0,maxWidth:d?d:0.5*this.width,maxHeight:(h?5*I:1.5*I)+("object"===typeof v?(v.top||0)+(v.bottom||0):2*v),angle:"horizontal"===A?0:-90,text:D,padding:v,backgroundColor:n,borderColor:f,borderThickness:g,textAlign:z,fontSize:I,
324
+ fontFamily:N,fontWeight:q,fontColor:k,fontStyle:m,textBaseline:"middle"});n.measureText();r.dataSeries.indexLabelMaxWidth=n.maxWidth;if("stackedarea100"===p){if(r.point.x<c.x1||r.point.x>c.x2||r.point.y<c.y1-1||r.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum||Math.max.apply(null,r.dataPoint.y)<P.viewportMinimum||Math.min.apply(null,r.dataPoint.y)>P.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=
325
+ p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum||r.dataPoint.y<P.viewportMinimum||r.dataPoint.y>P.viewportMaximum)continue}else if(0<=p.indexOf("column")){if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum||(0<r.dataPoint.y.length?Math.max.apply(null,r.dataPoint.y):r.cumulativeY?r.cumulativeY:r.dataPoint.y)<P.viewportMinimum||(0<r.dataPoint.y.length?Math.min.apply(null,r.dataPoint.y):r.cumulativeY?
326
+ r.cumulativeY-r.dataPoint.y:0)>P.viewportMaximum)continue}else if("waterfall"===p||"error"===p&&!r.axisSwapped){if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum||r.bounds.y1>c.y2||r.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum||r.bounds.x1>c.x2||r.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum||Math.max.apply(null,
327
+ r.dataPoint.y)<P.viewportMinimum||Math.min.apply(null,r.dataPoint.y)>P.viewportMaximum)continue}else if(r.dataPoint.x<O.viewportMinimum||r.dataPoint.x>O.viewportMaximum)continue;h=k=2;"horizontal"===A?(N=n.width,m=n.height):(m=n.width,N=n.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))s="auto",k=4;else if(0<=p.indexOf("stacked"))"auto"===s&&(s="inside");else if("bubble"===p||"scatter"===p)s="inside";q=r.point.x-N/2+("horizontal"===A?0:n._lineHeight/
327
328
  2);if("inside"!==s)d=c.y1,g=c.y2,0<y?(f=r.point.y+n._lineHeight/2-m-k-b,f<d&&(f="auto"===s?Math.max(r.point.y,d)+n._lineHeight/2+k+b:d+n._lineHeight/2+k+b,ca=f+("horizontal"===A?m-n._lineHeight/2:0)>r.point.y,!ca||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f-=b))):(f=r.point.y+n._lineHeight/2+k+b,f>g-m+n._lineHeight/2-k&&(f="auto"===s?Math.min(r.point.y,g)+n._lineHeight/2-m-k-b:g+n._lineHeight/2-m-k-b,ca=f-("horizontal"===A?n._lineHeight/2:m)<r.point.y,!ca||(0<=p.indexOf("line")||0<=p.indexOf("area"))||
328
329
  (f+=b)));else{Math.max(r.bounds.y1,c.y1);g=Math.min(r.bounds.y2,c.y2)-m+n._lineHeight/2;b=0<=p.indexOf("range")||"error"===p?0<y?Math.max(r.bounds.y1,c.y1)+n._lineHeight/2+k:Math.min(r.bounds.y2,c.y2)+n._lineHeight/2-m-k:(Math.max(r.bounds.y1,c.y1)+Math.min(r.bounds.y2,c.y2))/2-m/2+n._lineHeight/2;if(0<y){if(f=b,"bubble"===p||"scatter"===p)f=r.point.y-m/2+n._lineHeight/2,m>r.bounds.y2-r.bounds.y1&&(f-=m/2+k),0>f-n._lineHeight/2&&(f+=Math.abs(f-n._lineHeight/2)<=(r.bounds.y2-r.bounds.y1)/2+k?Math.abs(f-
329
330
  n._lineHeight/2):(r.bounds.y2-r.bounds.y1)/2+k)}else f=Math.min(r.point.y,b),f>g-m-k&&("bubble"===p||"scatter"===p)&&(f=Math.min(r.point.y+k,c.y2-m-k));f=Math.min(f,g)}}else 0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("scatter")?(s="auto",h=4):0<=p.indexOf("stacked")?"auto"===s&&(s="inside"):"bubble"===p&&(s="inside"),f=r.point.y+n._lineHeight/2-m/2,"inside"!==s?(g=c.x1,d=c.x2,0>y?(q=r.point.x-N+("horizontal"===A?0:n._lineHeight/2)-h-b,("horizontal"===A?q:q-n._lineHeight/2)<g&&(q="auto"===
330
331
  s?Math.max(r.point.x,g)+("horizontal"===A?0:n._lineHeight/2)+k+b:g+("horizontal"===A?0:n._lineHeight/2)+h,(ca=q+N-("horizontal"===A?0:n._lineHeight/2)>r.point.x)&&(q-=b))):(q=r.point.x+("horizontal"===A?0:n._lineHeight/2)+h+b,("horizontal"===A?q:q-n._lineHeight/2)>d-N-h-b&&(q="auto"===s?Math.min(r.point.x,d)-("horizontal"===A?N:N-n._lineHeight/2)-h-b:d-N-h+("horizontal"===A?0:n._lineHeight/2),(ca=q-("horizontal"===A?0:n._lineHeight/2)<r.point.x)&&(q+=b)))):(g=Math.max(r.bounds.x1,c.x1),Math.min(r.bounds.x2,
331
332
  c.x2),b=0<=p.indexOf("range")||"error"===p?0>y?Math.max(r.bounds.x1,c.x1):Math.min(r.bounds.x2,c.x2)-N-h+("horizontal"===A?0:n._lineHeight/2):(Math.max(r.bounds.x1,c.x1)+Math.min(r.bounds.x2,c.x2))/2-N/2+("horizontal"===A?0:n._lineHeight/2),q=0>y?b:Math.min(r.point.x,b),q=Math.max(q,g+("horizontal"===A?0:n._lineHeight/2+k)));"vertical"===A&&(f+=m-n._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&(ca=0<y?f+("horizontal"===
332
- A?m-n._lineHeight/2:0)>r.point.y:f-("horizontal"===A?n._lineHeight/2:m)<r.point.y),"bubble"===p||"scatter"===p)&&(q+=n._lineHeight/2-L/2);n.x=q;n.y=f;n.render(!0);w&&("inside"!==s&&(0>p.indexOf("bar")&&("error"!==p||!r.axisSwapped)&&r.point.x>c.x1&&r.point.x<c.x2||!ca)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&("error"!==p||r.axisSwapped)&&r.point.y>c.y1&&r.point.y<c.y2||!ca))&&(e.lineWidth=w,e.strokeStyle=u?u:"gray",e.setLineDash&&
333
- e.setLineDash(J(x,w)),e.beginPath(),e.moveTo(r.point.x,r.point.y),0<=p.indexOf("bar")||"error"===p&&r.axisSwapped?e.lineTo(q+(0<r.direction?0:N)+("vertical"===A?-n._lineHeight/2:0),f+("vertical"===A?-m/2:m/2-n._lineHeight/2)):0<=p.indexOf("column")||"error"===p&&!r.axisSwapped?e.lineTo(q+N/2-("horizontal"===A?0:n._lineHeight/2),f+("vertical"===A?f-m<r.point.y?0:-m:(f-n._lineHeight/2<r.point.y?m:0)-n._lineHeight/2)):0<=p.indexOf("waterfall")?e.lineTo(q+N/2-("horizontal"===A?0:n._lineHeight/2),"vertical"===
333
+ A?m-n._lineHeight/2:0)>r.point.y:f-("horizontal"===A?n._lineHeight/2:m)<r.point.y),"bubble"===p||"scatter"===p)&&(q+=n._lineHeight/2-I/2);n.x=q;n.y=f;n.render(!0);w&&("inside"!==s&&(0>p.indexOf("bar")&&("error"!==p||!r.axisSwapped)&&r.point.x>c.x1&&r.point.x<c.x2||!ca)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&("error"!==p||r.axisSwapped)&&r.point.y>c.y1&&r.point.y<c.y2||!ca))&&(e.lineWidth=w,e.strokeStyle=u?u:"gray",e.setLineDash&&
334
+ e.setLineDash(K(x,w)),e.beginPath(),e.moveTo(r.point.x,r.point.y),0<=p.indexOf("bar")||"error"===p&&r.axisSwapped?e.lineTo(q+(0<r.direction?0:N)+("vertical"===A?-n._lineHeight/2:0),f+("vertical"===A?-m/2:m/2-n._lineHeight/2)):0<=p.indexOf("column")||"error"===p&&!r.axisSwapped?e.lineTo(q+N/2-("horizontal"===A?0:n._lineHeight/2),f+("vertical"===A?f-m<r.point.y?0:-m:(f-n._lineHeight/2<r.point.y?m:0)-n._lineHeight/2)):0<=p.indexOf("waterfall")?e.lineTo(q+N/2-("horizontal"===A?0:n._lineHeight/2),"vertical"===
334
335
  A?0<y&&f<r.point.y?f:0>y&&f-m>r.point.y?f-m:r.point.y:0<y&&f+m-n._lineHeight/2<r.point.y?f+m-n._lineHeight/2:0>y&&f-n._lineHeight/2>r.point.y?f-n._lineHeight/2:r.point.y):e.lineTo(q+N/2-("horizontal"===A?0:n._lineHeight/2),f+("vertical"===A?f-m<r.point.y?0:-m:(f+m-n._lineHeight/2<r.point.y?m:0)-n._lineHeight/2)),e.stroke())}}e={source:e,dest:this.plotArea.ctx,animationCallback:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)r=
335
- this._indexLabels[a],n=aa("indexLabelBackgroundColor",r.dataPoint,r.dataSeries),r.dataSeries.indexLabelBackgroundColor=l(n)?t?"transparent":null:n;return e};s.prototype.renderLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?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 g=[],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=
336
- this.data[l];c.lineWidth=m.lineThickness;var r=m.dataPoints,p="solid";if(c.setLineDash){var q=J(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=J(p,m.lineThickness);c.setLineDash(f)}var n=m.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:l};n=R(n);b.strokeStyle=n;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var n=m._colorSet,I=n=m.lineColor=m.options.lineColor?m.options.lineColor:n[0];c.strokeStyle=n;var x=!0,u=0,w,v;c.beginPath();if(0<r.length){for(var s=
336
+ this._indexLabels[a],n=V("indexLabelBackgroundColor",r.dataPoint,r.dataSeries),r.dataSeries.indexLabelBackgroundColor=l(n)?t?"transparent":null:n;return e};s.prototype.renderLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?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 g=[],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=
337
+ this.data[l];c.lineWidth=m.lineThickness;var r=m.dataPoints,p="solid";if(c.setLineDash){var q=K(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=K(p,m.lineThickness);c.setLineDash(f)}var n=m.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:l};n=R(n);b.strokeStyle=n;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var n=m._colorSet,J=n=m.lineColor=m.options.lineColor?m.options.lineColor:n[0];c.strokeStyle=n;var x=!0,u=0,w,v;c.beginPath();if(0<r.length){for(var s=
337
338
  !1,u=0;u<r.length;u++)if(w=r[u].x.getTime?r[u].x.getTime():r[u].x,!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!s)))if("number"!==typeof r[u].y)0<u&&!(m.connectNullData||s||x)&&(c.stroke(),t&&b.stroke()),s=!0;else{w=a.axisX.convertValueToPixel(w);v=a.axisY.convertValueToPixel(r[u].y);var A=m.dataPointIds[u];this._eventManager.objectMap[A]={id:A,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:u,x1:w,y1:v};x||s?(!x&&m.connectNullData?(c.setLineDash&&
338
- (m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(h.x,h.y),p=m.nullDataLineDashType,c.setLineDash(q)),c.lineTo(w,v),t&&b.lineTo(w,v)):(c.beginPath(),c.moveTo(w,v),t&&(b.beginPath(),b.moveTo(w,v))),s=x=!1):(c.lineTo(w,v),t&&b.lineTo(w,v),0==u%500&&(c.stroke(),c.beginPath(),c.moveTo(w,v),t&&(b.stroke(),b.beginPath(),b.moveTo(w,v))));h={x:w,y:v};u<r.length-1&&(I!==(r[u].lineColor||n)||p!==(r[u].lineDashType||m.lineDashType))&&
339
- (c.stroke(),c.beginPath(),c.moveTo(w,v),I=r[u].lineColor||n,c.strokeStyle=I,c.setLineDash&&(r[u].lineDashType?(p=r[u].lineDashType,c.setLineDash(J(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(f))));if(0!==r[u].markerSize&&(0<r[u].markerSize||0<m.markerSize)){var D=m.getMarkerProperties(u,w,v,c);g.push(D);A=R(A);t&&g.push({x:w,y:v,ctx:b,type:D.type,size:D.size,color:A,borderColor:A,borderThickness:D.borderThickness})}(r[u].indexLabel||m.indexLabel||r[u].indexLabelFormatter||m.indexLabelFormatter)&&
340
- this._indexLabels.push({chartType:"line",dataPoint:r[u],dataSeries:m,point:{x:w,y:v},direction:0>r[u].y===a.axisY.reversed?1:-1,color:n})}c.stroke();t&&b.stroke()}}W.drawMarkers(g);t&&(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,
339
+ (m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(h.x,h.y),p=m.nullDataLineDashType,c.setLineDash(q)),c.lineTo(w,v),t&&b.lineTo(w,v)):(c.beginPath(),c.moveTo(w,v),t&&(b.beginPath(),b.moveTo(w,v))),s=x=!1):(c.lineTo(w,v),t&&b.lineTo(w,v),0==u%500&&(c.stroke(),c.beginPath(),c.moveTo(w,v),t&&(b.stroke(),b.beginPath(),b.moveTo(w,v))));h={x:w,y:v};u<r.length-1&&(J!==(r[u].lineColor||n)||p!==(r[u].lineDashType||m.lineDashType))&&
340
+ (c.stroke(),c.beginPath(),c.moveTo(w,v),J=r[u].lineColor||n,c.strokeStyle=J,c.setLineDash&&(r[u].lineDashType?(p=r[u].lineDashType,c.setLineDash(K(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(f))));if(0!==r[u].markerSize&&(0<r[u].markerSize||0<m.markerSize)){var D=m.getMarkerProperties(u,w,v,c);g.push(D);A=R(A);t&&g.push({x:w,y:v,ctx:b,type:D.type,size:D.size,color:A,borderColor:A,borderThickness:D.borderThickness})}(r[u].indexLabel||m.indexLabel||r[u].indexLabelFormatter||m.indexLabelFormatter)&&
341
+ this._indexLabels.push({chartType:"line",dataPoint:r[u],dataSeries:m,point:{x:w,y:v},direction:0>r[u].y===a.axisY.reversed?1:-1,color:n})}c.stroke();t&&b.stroke()}}Y.drawMarkers(g);t&&(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,
341
342
  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:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderStepLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?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 g=
342
- [],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];c.lineWidth=m.lineThickness;var r=m.dataPoints,p="solid";if(c.setLineDash){var q=J(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=J(p,m.lineThickness);c.setLineDash(f)}var n=m.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:l};n=R(n);b.strokeStyle=n;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var n=m._colorSet,I=n=m.lineColor=m.options.lineColor?m.options.lineColor:
343
+ [],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];c.lineWidth=m.lineThickness;var r=m.dataPoints,p="solid";if(c.setLineDash){var q=K(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=K(p,m.lineThickness);c.setLineDash(f)}var n=m.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:l};n=R(n);b.strokeStyle=n;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var n=m._colorSet,J=n=m.lineColor=m.options.lineColor?m.options.lineColor:
343
344
  n[0];c.strokeStyle=n;var x=!0,u=0,w,v;c.beginPath();if(0<r.length){for(var s=!1,u=0;u<r.length;u++)if(w=r[u].getTime?r[u].x.getTime():r[u].x,!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!s)))if("number"!==typeof r[u].y)0<u&&!(m.connectNullData||s||x)&&(c.stroke(),t&&b.stroke()),s=!0;else{var A=v;w=a.axisX.convertValueToPixel(w);v=a.axisY.convertValueToPixel(r[u].y);var D=m.dataPointIds[u];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:l,
344
345
  dataPointIndex:u,x1:w,y1:v};x||s?(!x&&m.connectNullData?(c.setLineDash&&(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(h.x,h.y),p=m.nullDataLineDashType,c.setLineDash(q)),c.lineTo(w,A),c.lineTo(w,v),t&&(b.lineTo(w,A),b.lineTo(w,v))):(c.beginPath(),c.moveTo(w,v),t&&(b.beginPath(),b.moveTo(w,v))),s=x=!1):(c.lineTo(w,A),t&&b.lineTo(w,A),c.lineTo(w,v),t&&b.lineTo(w,v),0==u%500&&(c.stroke(),c.beginPath(),c.moveTo(w,v),t&&
345
- (b.stroke(),b.beginPath(),b.moveTo(w,v))));h={x:w,y:v};u<r.length-1&&(I!==(r[u].lineColor||n)||p!==(r[u].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(w,v),I=r[u].lineColor||n,c.strokeStyle=I,c.setLineDash&&(r[u].lineDashType?(p=r[u].lineDashType,c.setLineDash(J(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(f))));0!==r[u].markerSize&&(0<r[u].markerSize||0<m.markerSize)&&(A=m.getMarkerProperties(u,w,v,c),g.push(A),D=R(D),t&&g.push({x:w,y:v,ctx:b,type:A.type,size:A.size,
346
- color:D,borderColor:D,borderThickness:A.borderThickness}));(r[u].indexLabel||m.indexLabel||r[u].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:r[u],dataSeries:m,point:{x:w,y:v},direction:0>r[u].y===a.axisY.reversed?1:-1,color:n})}c.stroke();t&&b.stroke()}}W.drawMarkers(g);t&&(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),
346
+ (b.stroke(),b.beginPath(),b.moveTo(w,v))));h={x:w,y:v};u<r.length-1&&(J!==(r[u].lineColor||n)||p!==(r[u].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(w,v),J=r[u].lineColor||n,c.strokeStyle=J,c.setLineDash&&(r[u].lineDashType?(p=r[u].lineDashType,c.setLineDash(K(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(f))));0!==r[u].markerSize&&(0<r[u].markerSize||0<m.markerSize)&&(A=m.getMarkerProperties(u,w,v,c),g.push(A),D=R(D),t&&g.push({x:w,y:v,ctx:b,type:A.type,size:A.size,
347
+ color:D,borderColor:D,borderThickness:A.borderThickness}));(r[u].indexLabel||m.indexLabel||r[u].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:r[u],dataSeries:m,point:{x:w,y:v},direction:0>r[u].y===a.axisY.reversed?1:-1,color:n})}c.stroke();t&&b.stroke()}}Y.drawMarkers(g);t&&(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),
347
348
  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:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderSpline=function(a){function e(a){a=y(a,2);if(0<a.length){b.beginPath();t&&d.beginPath();b.moveTo(a[0].x,
348
349
  a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);t&&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),t&&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),
349
350
  a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),t&&(d.stroke(),d.beginPath(),d.moveTo(a[c+3].x,a[c+3].y));b.stroke();t&&d.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx;b.save();var g=this.plotArea;b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();for(var h=[],k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];b.lineWidth=m.lineThickness;var r=
350
- m.dataPoints,p="solid";if(b.setLineDash){var q=J(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=J(p,m.lineThickness);b.setLineDash(f)}var n=m.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:l};n=R(n);d.strokeStyle=n;d.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var n=m._colorSet,I=n=m.lineColor=m.options.lineColor?m.options.lineColor:n[0];b.strokeStyle=n;var x=0,u,w,v=[];b.beginPath();if(0<r.length)for(w=!1,x=0;x<r.length;x++)if(u=r[x].getTime?
351
+ m.dataPoints,p="solid";if(b.setLineDash){var q=K(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=K(p,m.lineThickness);b.setLineDash(f)}var n=m.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:l};n=R(n);d.strokeStyle=n;d.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var n=m._colorSet,J=n=m.lineColor=m.options.lineColor?m.options.lineColor:n[0];b.strokeStyle=n;var x=0,u,w,v=[];b.beginPath();if(0<r.length)for(w=!1,x=0;x<r.length;x++)if(u=r[x].getTime?
351
352
  r[x].x.getTime():r[x].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!w)))if("number"!==typeof r[x].y)0<x&&!w&&(m.connectNullData?b.setLineDash&&(0<v.length&&(m.options.nullDataLineDashType||!r[x-1].lineDashType))&&(v[v.length-1].newLineDashArray=q,p=m.nullDataLineDashType):(e(v),v=[])),w=!0;else{u=a.axisX.convertValueToPixel(u);w=a.axisY.convertValueToPixel(r[x].y);var s=m.dataPointIds[x];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:l,
352
- dataPointIndex:x,x1:u,y1:w};v[v.length]={x:u,y:w};x<r.length-1&&(I!==(r[x].lineColor||n)||p!==(r[x].lineDashType||m.lineDashType))&&(I=r[x].lineColor||n,v[v.length-1].newStrokeStyle=I,b.setLineDash&&(r[x].lineDashType?(p=r[x].lineDashType,v[v.length-1].newLineDashArray=J(p,m.lineThickness)):(p=m.lineDashType,v[v.length-1].newLineDashArray=f)));if(0!==r[x].markerSize&&(0<r[x].markerSize||0<m.markerSize)){var A=m.getMarkerProperties(x,u,w,b);h.push(A);s=R(s);t&&h.push({x:u,y:w,ctx:d,type:A.type,size:A.size,
353
- color:s,borderColor:s,borderThickness:A.borderThickness})}(r[x].indexLabel||m.indexLabel||r[x].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:r[x],dataSeries:m,point:{x:u,y:w},direction:0>r[x].y===a.axisY.reversed?1:-1,color:n});w=!1}e(v)}W.drawMarkers(h);t&&(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&&
353
+ dataPointIndex:x,x1:u,y1:w};v[v.length]={x:u,y:w};x<r.length-1&&(J!==(r[x].lineColor||n)||p!==(r[x].lineDashType||m.lineDashType))&&(J=r[x].lineColor||n,v[v.length-1].newStrokeStyle=J,b.setLineDash&&(r[x].lineDashType?(p=r[x].lineDashType,v[v.length-1].newLineDashArray=K(p,m.lineThickness)):(p=m.lineDashType,v[v.length-1].newLineDashArray=f)));if(0!==r[x].markerSize&&(0<r[x].markerSize||0<m.markerSize)){var A=m.getMarkerProperties(x,u,w,b);h.push(A);s=R(s);t&&h.push({x:u,y:w,ctx:d,type:A.type,size:A.size,
354
+ color:s,borderColor:s,borderThickness:A.borderThickness})}(r[x].indexLabel||m.indexLabel||r[x].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:r[x],dataSeries:m,point:{x:u,y:w},direction:0>r[x].y===a.axisY.reversed?1:-1,color:n});w=!1}e(v)}Y.drawMarkers(h);t&&(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&&
354
355
  b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),d.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=
355
356
  null,d=this.plotArea,g=0,h,k,l,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff,q=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;
356
357
  isFinite(p)||(p=0.3*Math.abs(q));p=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(p)/Math.log(q):Math.abs(p)/Math.abs(q))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>r&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&r<g)&&(r=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));p<g&&(p=g);p>r&&(p=r);c.save();t&&this._eventManager.ghostCtx.save();
357
- c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(r=0;r<a.dataSeriesIndexes.length;r++){var q=a.dataSeriesIndexes[r],f=this.data[q],n=f.dataPoints;if(0<n.length)for(var I=5<p&&f.bevelEnabled?!0:!1,g=0;g<n.length;g++)if(n[g].getTime?l=n[g].x.getTime():l=n[g].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[g].y){h=
358
- a.axisX.convertValueToPixel(l);k=a.axisY.convertValueToPixel(n[g].y);h=a.axisX.reversed?h+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+r)*p<<0:h-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+r)*p<<0;var x=a.axisX.reversed?h-p<<0:h+p<<0,u;if(0<=n[g].y){if(u=m,k>u){var w=k;k=u;u=w}}else u=k,k=m,k>u&&(w=k,k=u,u=w);var w=Math.max(k,d.y1),v=Math.min(u,d.y2),b=n[g].color?n[g].color:f._colorSet[g%f._colorSet.length];ba(c,a.axisX.reversed?x:h,w,a.axisX.reversed?h:x,v,b,0,null,I&&
359
- (a.axisY.reversed?0>n[g].y:0<=n[g].y),(a.axisY.reversed?0<=n[g].y:0>n[g].y)&&I,!1,!1,f.fillOpacity);b=f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:g,x1:h,y1:w,x2:x,y2:v};b=R(b);t&&ba(this._eventManager.ghostCtx,a.axisX.reversed?x:h,w,a.axisX.reversed?h:x,v,b,0,null,!1,!1,!1,!1);(n[g].indexLabel||f.indexLabel||n[g].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:n[g],dataSeries:f,point:{x:h+
358
+ c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(r=0;r<a.dataSeriesIndexes.length;r++){var q=a.dataSeriesIndexes[r],f=this.data[q],n=f.dataPoints;if(0<n.length)for(var J=5<p&&f.bevelEnabled?!0:!1,g=0;g<n.length;g++)if(n[g].getTime?l=n[g].x.getTime():l=n[g].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[g].y){h=
359
+ a.axisX.convertValueToPixel(l);k=a.axisY.convertValueToPixel(n[g].y);h=a.axisX.reversed?h+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+r)*p<<0:h-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+r)*p<<0;var x=a.axisX.reversed?h-p<<0:h+p<<0,u;if(0<=n[g].y){if(u=m,k>u){var w=k;k=u;u=w}}else u=k,k=m,k>u&&(w=k,k=u,u=w);var w=Math.max(k,d.y1),v=Math.min(u,d.y2),b=n[g].color?n[g].color:f._colorSet[g%f._colorSet.length];aa(c,a.axisX.reversed?x:h,w,a.axisX.reversed?h:x,v,b,0,null,J&&
360
+ (a.axisY.reversed?0>n[g].y:0<=n[g].y),(a.axisY.reversed?0<=n[g].y:0>n[g].y)&&J,!1,!1,f.fillOpacity);b=f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:g,x1:h,y1:w,x2:x,y2:v};b=R(b);t&&aa(this._eventManager.ghostCtx,a.axisX.reversed?x:h,w,a.axisX.reversed?h:x,v,b,0,null,!1,!1,!1,!1);(n[g].indexLabel||f.indexLabel||n[g].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:n[g],dataSeries:f,point:{x:h+
360
361
  (x-h)/2,y:0>n[g].y===a.axisY.reversed?k:u},direction:0>n[g].y===a.axisY.reversed?1:-1,bounds:{x1:h,y1:Math.min(k,u),x2:x,y2:Math.max(k,u)},color:b})}}t&&(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,
361
362
  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:M.yScaleAnimation,easingFunction:M.easing.easeOutQuart,animationBase:m<a.axisY.bounds.y1?a.axisY.bounds.y1:m>a.axisY.bounds.y2?a.axisY.bounds.y2:m}}};s.prototype.renderStackedColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],
362
- l=[],m=0,r,p,q,f=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,I=a.axisX.dataInfo.minDiff,x=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(I)||(I=0.3*Math.abs(x));I=this.options.dataPointWidth?this.dataPointWidth:
363
- 0.9*(d.width*(a.axisX.logarithmic?Math.log(I)/Math.log(x):Math.abs(I)/Math.abs(x))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>n&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<m)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));I<m&&(I=m);I>n&&(I=n);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
364
- this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var x=a.dataSeriesIndexes[n],u=this.data[x],w=u.dataPoints;if(0<w.length){var v=5<I&&u.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<w.length;m++)if(q=w[m].x.getTime?w[m].x.getTime():w[m].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax)&&"number"===typeof w[m].y){r=a.axisX.convertValueToPixel(q);r=r-a.plotType.plotUnits.length*I/2+a.index*
365
- I<<0;var s=r+I<<0,A;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<w[m].y)k[q]=w[m].y+(k[q]?k[q]:0),0<k[q]&&(p=a.axisY.convertValueToPixel(k[q]),A="undefined"!==typeof g[q]?g[q]:f,g[q]=p);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=w[m].y)l[q]=w[m].y+(l[q]?l[q]:0),A=a.axisY.convertValueToPixel(l[q]),p="undefined"!==typeof h[q]?h[q]:f,h[q]=A;else if(p=a.axisY.convertValueToPixel(w[m].y),0<=w[m].y){var D="undefined"!==typeof g[q]?
366
- g[q]:0;p-=D;A=f-D;g[q]=D+(A-p)}else D=h[q]?h[q]:0,A=p+D,p=f+D,h[q]=D+(A-p);b=w[m].color?w[m].color:u._colorSet[m%u._colorSet.length];q=Math.max(p,d.y1);D=Math.min(A,d.y2);ba(c,r,a.axisY.reversed?D:q,s,a.axisY.reversed?q:D,b,0,null,v&&(a.axisY.reversed?0>w[m].y:0<=w[m].y),(a.axisY.reversed?0<=w[m].y:0>w[m].y)&&v,!1,!1,u.fillOpacity);b=u.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:m,x1:r,y1:q,x2:s,y2:D};b=R(b);t&&ba(this._eventManager.ghostCtx,
363
+ l=[],m=0,r,p,q,f=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,J=a.axisX.dataInfo.minDiff,x=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(J)||(J=0.3*Math.abs(x));J=this.options.dataPointWidth?this.dataPointWidth:
364
+ 0.9*(d.width*(a.axisX.logarithmic?Math.log(J)/Math.log(x):Math.abs(J)/Math.abs(x))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>n&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<m)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));J<m&&(J=m);J>n&&(J=n);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
365
+ this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var x=a.dataSeriesIndexes[n],u=this.data[x],w=u.dataPoints;if(0<w.length){var v=5<J&&u.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<w.length;m++)if(q=w[m].x.getTime?w[m].x.getTime():w[m].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax)&&"number"===typeof w[m].y){r=a.axisX.convertValueToPixel(q);r=r-a.plotType.plotUnits.length*J/2+a.index*
366
+ J<<0;var s=r+J<<0,A;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<w[m].y)k[q]=w[m].y+(k[q]?k[q]:0),0<k[q]&&(p=a.axisY.convertValueToPixel(k[q]),A="undefined"!==typeof g[q]?g[q]:f,g[q]=p);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=w[m].y)l[q]=w[m].y+(l[q]?l[q]:0),A=a.axisY.convertValueToPixel(l[q]),p="undefined"!==typeof h[q]?h[q]:f,h[q]=A;else if(p=a.axisY.convertValueToPixel(w[m].y),0<=w[m].y){var D="undefined"!==typeof g[q]?
367
+ g[q]:0;p-=D;A=f-D;g[q]=D+(A-p)}else D=h[q]?h[q]:0,A=p+D,p=f+D,h[q]=D+(A-p);b=w[m].color?w[m].color:u._colorSet[m%u._colorSet.length];q=Math.max(p,d.y1);D=Math.min(A,d.y2);aa(c,r,a.axisY.reversed?D:q,s,a.axisY.reversed?q:D,b,0,null,v&&(a.axisY.reversed?0>w[m].y:0<=w[m].y),(a.axisY.reversed?0<=w[m].y:0>w[m].y)&&v,!1,!1,u.fillOpacity);b=u.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:m,x1:r,y1:q,x2:s,y2:D};b=R(b);t&&aa(this._eventManager.ghostCtx,
367
368
  r,q,s,D,b,0,null,!1,!1,!1,!1);(w[m].indexLabel||u.indexLabel||w[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:w[m],dataSeries:u,point:{x:r+(s-r)/2,y:0<=w[m].y?p:A},direction:0>w[m].y===a.axisY.reversed?1:-1,bounds:{x1:r,y1:Math.min(p,A),x2:s,y2:Math.max(p,A)},color:b,cumulativeY:u.dataPointEOs[m].cumulativeY})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&
368
369
  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:M.yScaleAnimation,easingFunction:M.easing.easeOutQuart,animationBase:f<a.axisY.bounds.y1?a.axisY.bounds.y1:f>a.axisY.bounds.y2?
369
370
  a.axisY.bounds.y2:f}}};s.prototype.renderStackedColumn100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,r,p,q,f=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;q=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
370
- 0.15*this.width<<0;var n=a.axisX.dataInfo.minDiff,I=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(I));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(n)/Math.log(I):Math.abs(n)/Math.abs(I))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>q&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<m)&&(q=Math.max(this.options.dataPointWidth?
371
- this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>q&&(n=q);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(I=0;I<a.dataSeriesIndexes.length;I++){var x=a.dataSeriesIndexes[I],u=this.data[x],w=u.dataPoints;if(0<w.length)for(var v=5<n&&u.bevelEnabled?!0:!1,m=0;m<w.length;m++)if(q=w[m].x.getTime?w[m].x.getTime():
371
+ 0.15*this.width<<0;var n=a.axisX.dataInfo.minDiff,J=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(J));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(n)/Math.log(J):Math.abs(n)/Math.abs(J))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>q&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<m)&&(q=Math.max(this.options.dataPointWidth?
372
+ this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>q&&(n=q);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(J=0;J<a.dataSeriesIndexes.length;J++){var x=a.dataSeriesIndexes[J],u=this.data[x],w=u.dataPoints;if(0<w.length)for(var v=5<n&&u.bevelEnabled?!0:!1,m=0;m<w.length;m++)if(q=w[m].x.getTime?w[m].x.getTime():
372
373
  w[m].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax)&&"number"===typeof w[m].y){r=a.axisX.convertValueToPixel(q);p=0!==a.dataPointYSums[q]?100*(w[m].y/a.dataPointYSums[q]):0;r=r-a.plotType.plotUnits.length*n/2+a.index*n<<0;var s=r+n<<0,A;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<w[m].y){k[q]=p+("undefined"!==typeof k[q]?k[q]:0);if(0>=k[q])continue;p=a.axisY.convertValueToPixel(k[q]);A=g[q]?g[q]:f;g[q]=p}else a.axisY.scaleBreaks&&
373
- 0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=w[m].y?(l[q]=p+("undefined"!==typeof l[q]?l[q]:0),A=a.axisY.convertValueToPixel(l[q]),p=h[q]?h[q]:f,h[q]=A):(p=a.axisY.convertValueToPixel(p),0<=w[m].y?(b="undefined"!==typeof g[q]?g[q]:0,p-=b,A=f-b,a.dataSeriesIndexes.length-1===I&&1>=Math.abs(d.y1-p)&&(p=d.y1),g[q]=b+(A-p)):(b="undefined"!==typeof h[q]?h[q]:0,A=p+b,p=f+b,a.dataSeriesIndexes.length-1===I&&1>=Math.abs(d.y2-A)&&(A=d.y2),h[q]=b+(A-p)));b=w[m].color?w[m].color:u._colorSet[m%u._colorSet.length];
374
- ba(c,r,a.axisY.reversed?A:p,s,a.axisY.reversed?p:A,b,0,null,v&&(a.axisY.reversed?0>w[m].y:0<=w[m].y),(a.axisY.reversed?0<=w[m].y:0>w[m].y)&&v,!1,!1,u.fillOpacity);b=u.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:m,x1:r,y1:p,x2:s,y2:A};b=R(b);t&&ba(this._eventManager.ghostCtx,r,p,s,A,b,0,null,!1,!1,!1,!1);(w[m].indexLabel||u.indexLabel||w[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",
374
+ 0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=w[m].y?(l[q]=p+("undefined"!==typeof l[q]?l[q]:0),A=a.axisY.convertValueToPixel(l[q]),p=h[q]?h[q]:f,h[q]=A):(p=a.axisY.convertValueToPixel(p),0<=w[m].y?(b="undefined"!==typeof g[q]?g[q]:0,p-=b,A=f-b,a.dataSeriesIndexes.length-1===J&&1>=Math.abs(d.y1-p)&&(p=d.y1),g[q]=b+(A-p)):(b="undefined"!==typeof h[q]?h[q]:0,A=p+b,p=f+b,a.dataSeriesIndexes.length-1===J&&1>=Math.abs(d.y2-A)&&(A=d.y2),h[q]=b+(A-p)));b=w[m].color?w[m].color:u._colorSet[m%u._colorSet.length];
375
+ aa(c,r,a.axisY.reversed?A:p,s,a.axisY.reversed?p:A,b,0,null,v&&(a.axisY.reversed?0>w[m].y:0<=w[m].y),(a.axisY.reversed?0<=w[m].y:0>w[m].y)&&v,!1,!1,u.fillOpacity);b=u.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:m,x1:r,y1:p,x2:s,y2:A};b=R(b);t&&aa(this._eventManager.ghostCtx,r,p,s,A,b,0,null,!1,!1,!1,!1);(w[m].indexLabel||u.indexLabel||w[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",
375
376
  dataPoint:w[m],dataSeries:u,point:{x:r+(s-r)/2,y:0<=w[m].y?p:A},direction:0>w[m].y===a.axisY.reversed?1:-1,bounds:{x1:r,y1:Math.min(p,A),x2:s,y2:Math.max(p,A)},color:b,yCumulative:100*(u.dataPointEOs[m].cumulativeY/a.dataPointYSums[q])})}}t&&(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),
376
377
  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:M.yScaleAnimation,easingFunction:M.easing.easeOutQuart,animationBase:f<a.axisY.bounds.y1?a.axisY.bounds.y1:f>a.axisY.bounds.y2?a.axisY.bounds.y2:f}}};s.prototype.renderBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:
377
378
  e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,l,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff,q=a.axisX.conversionParameters.range?
378
379
  a.axisX.conversionParameters.range:a.axisX.range;isFinite(p)||(p=0.3*Math.abs(q));p=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(p)/Math.log(q):Math.abs(p)/Math.abs(q))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>r&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&r<g)&&(r=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));p<g&&(p=g);p>r&&(p=r);
379
- c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(r=0;r<a.dataSeriesIndexes.length;r++){var q=a.dataSeriesIndexes[r],f=this.data[q],n=f.dataPoints;if(0<n.length){var I=5<p&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(g=0;g<n.length;g++)if(n[g].getTime?l=n[g].x.getTime():l=n[g].x,!(l<a.axisX.dataInfo.viewPortMin||
380
- l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[g].y){k=a.axisX.convertValueToPixel(l);h=a.axisY.convertValueToPixel(n[g].y);k=a.axisX.reversed?k+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+r)*p<<0:k-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+r)*p<<0;var x=a.axisX.reversed?k-p<<0:k+p<<0,u;0<=n[g].y?u=m:(u=h,h=m);b=n[g].color?n[g].color:f._colorSet[g%f._colorSet.length];ba(c,a.axisY.reversed?h:u,a.axisX.reversed?x:k,a.axisY.reversed?u:h,a.axisX.reversed?k:x,b,0,null,
381
- I,!1,!1,!1,f.fillOpacity);b=f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:g,x1:u,y1:k,x2:h,y2:x};b=R(b);t&&ba(this._eventManager.ghostCtx,u,a.axisX.reversed?x:k,h,a.axisX.reversed?k:x,b,0,null,!1,!1,!1,!1);(n[g].indexLabel||f.indexLabel||n[g].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:n[g],dataSeries:f,point:{x:0<=n[g].y?h:u,y:k+(x-k)/2},direction:0>n[g].y===a.axisY.reversed?1:-1,
380
+ c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(r=0;r<a.dataSeriesIndexes.length;r++){var q=a.dataSeriesIndexes[r],f=this.data[q],n=f.dataPoints;if(0<n.length){var J=5<p&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(g=0;g<n.length;g++)if(n[g].getTime?l=n[g].x.getTime():l=n[g].x,!(l<a.axisX.dataInfo.viewPortMin||
381
+ l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[g].y){k=a.axisX.convertValueToPixel(l);h=a.axisY.convertValueToPixel(n[g].y);k=a.axisX.reversed?k+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+r)*p<<0:k-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+r)*p<<0;var x=a.axisX.reversed?k-p<<0:k+p<<0,u;0<=n[g].y?u=m:(u=h,h=m);b=n[g].color?n[g].color:f._colorSet[g%f._colorSet.length];aa(c,a.axisY.reversed?h:u,a.axisX.reversed?x:k,a.axisY.reversed?u:h,a.axisX.reversed?k:x,b,0,null,
382
+ J,!1,!1,!1,f.fillOpacity);b=f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:g,x1:u,y1:k,x2:h,y2:x};b=R(b);t&&aa(this._eventManager.ghostCtx,u,a.axisX.reversed?x:k,h,a.axisX.reversed?k:x,b,0,null,!1,!1,!1,!1);(n[g].indexLabel||f.indexLabel||n[g].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:n[g],dataSeries:f,point:{x:0<=n[g].y?h:u,y:k+(x-k)/2},direction:0>n[g].y===a.axisY.reversed?1:-1,
382
383
  bounds:{x1:Math.min(u,h),y1:k,x2:Math.max(u,h),y2:x},color:b})}}}t&&(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());
383
384
  c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:M.xScaleAnimation,easingFunction:M.easing.easeOutQuart,animationBase:m<a.axisY.bounds.x1?a.axisY.bounds.x1:m>a.axisY.bounds.x2?a.axisY.bounds.x2:m}}};s.prototype.renderStackedBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,r,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?
384
- this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,I=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(I));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(n)/Math.log(I):Math.abs(n)/Math.abs(I))/a.plotType.plotUnits.length)<<
385
+ this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,J=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(J));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(n)/Math.log(J):Math.abs(n)/Math.abs(J))/a.plotType.plotUnits.length)<<
385
386
  0;this.dataPointMaxWidth&&m>f&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<m)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>f&&(n=f);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());
386
- for(f=0;f<a.dataSeriesIndexes.length;f++){var I=a.dataSeriesIndexes[f],x=this.data[I],u=x.dataPoints;if(0<u.length){var w=5<n&&x.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<u.length;m++)if(b=u[m].x.getTime?u[m].x.getTime():u[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof u[m].y){p=a.axisX.convertValueToPixel(b);p=p-a.plotType.plotUnits.length*n/2+a.index*n<<0;var v=p+n<<0,s;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
387
- 0<u[m].y)k[b]=u[m].y+(k[b]?k[b]:0),0<k[b]&&(s=g[b]?g[b]:q,g[b]=r=a.axisY.convertValueToPixel(k[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=u[m].y)l[b]=u[m].y+(l[b]?l[b]:0),r=h[b]?h[b]:q,h[b]=s=a.axisY.convertValueToPixel(l[b]);else if(r=a.axisY.convertValueToPixel(u[m].y),0<=u[m].y){var A=g[b]?g[b]:0;s=q+A;r+=A;g[b]=A+(r-s)}else A=h[b]?h[b]:0,s=r-A,r=q-A,h[b]=A+(r-s);b=u[m].color?u[m].color:x._colorSet[m%x._colorSet.length];ba(c,a.axisY.reversed?r:s,p,a.axisY.reversed?
388
- s:r,v,b,0,null,w,!1,!1,!1,x.fillOpacity);b=x.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:I,dataPointIndex:m,x1:s,y1:p,x2:r,y2:v};b=R(b);t&&ba(this._eventManager.ghostCtx,s,p,r,v,b,0,null,!1,!1,!1,!1);(u[m].indexLabel||x.indexLabel||u[m].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:u[m],dataSeries:x,point:{x:0<=u[m].y?r:s,y:p+(v-p)/2},direction:0>u[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,
387
+ for(f=0;f<a.dataSeriesIndexes.length;f++){var J=a.dataSeriesIndexes[f],x=this.data[J],u=x.dataPoints;if(0<u.length){var w=5<n&&x.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<u.length;m++)if(b=u[m].x.getTime?u[m].x.getTime():u[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof u[m].y){p=a.axisX.convertValueToPixel(b);p=p-a.plotType.plotUnits.length*n/2+a.index*n<<0;var v=p+n<<0,s;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
388
+ 0<u[m].y)k[b]=u[m].y+(k[b]?k[b]:0),0<k[b]&&(s=g[b]?g[b]:q,g[b]=r=a.axisY.convertValueToPixel(k[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=u[m].y)l[b]=u[m].y+(l[b]?l[b]:0),r=h[b]?h[b]:q,h[b]=s=a.axisY.convertValueToPixel(l[b]);else if(r=a.axisY.convertValueToPixel(u[m].y),0<=u[m].y){var A=g[b]?g[b]:0;s=q+A;r+=A;g[b]=A+(r-s)}else A=h[b]?h[b]:0,s=r-A,r=q-A,h[b]=A+(r-s);b=u[m].color?u[m].color:x._colorSet[m%x._colorSet.length];aa(c,a.axisY.reversed?r:s,p,a.axisY.reversed?
389
+ s:r,v,b,0,null,w,!1,!1,!1,x.fillOpacity);b=x.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:J,dataPointIndex:m,x1:s,y1:p,x2:r,y2:v};b=R(b);t&&aa(this._eventManager.ghostCtx,s,p,r,v,b,0,null,!1,!1,!1,!1);(u[m].indexLabel||x.indexLabel||u[m].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:u[m],dataSeries:x,point:{x:0<=u[m].y?r:s,y:p+(v-p)/2},direction:0>u[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,
389
390
  r),y1:p,x2:Math.max(s,r),y2:v},color:b})}}}t&&(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();
390
391
  return{source:e,dest:this.plotArea.ctx,animationCallback:M.xScaleAnimation,easingFunction:M.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};s.prototype.renderStackedBar100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,r,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?
391
- this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,I=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(I));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(n)/Math.log(I):Math.abs(n)/Math.abs(I))/a.plotType.plotUnits.length)<<
392
+ this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,J=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(J));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(n)/Math.log(J):Math.abs(n)/Math.abs(J))/a.plotType.plotUnits.length)<<
392
393
  0;this.dataPointMaxWidth&&m>f&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<m)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>f&&(n=f);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());
393
- for(f=0;f<a.dataSeriesIndexes.length;f++){var I=a.dataSeriesIndexes[f],x=this.data[I],u=x.dataPoints;if(0<u.length){var w=5<n&&x.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<u.length;m++)if(b=u[m].x.getTime?u[m].x.getTime():u[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof u[m].y){p=a.axisX.convertValueToPixel(b);var v;v=0!==a.dataPointYSums[b]?100*(u[m].y/a.dataPointYSums[b]):0;p=p-a.plotType.plotUnits.length*n/2+a.index*n<<0;var s=p+n<<0;if(a.axisY.logarithmic||
394
+ for(f=0;f<a.dataSeriesIndexes.length;f++){var J=a.dataSeriesIndexes[f],x=this.data[J],u=x.dataPoints;if(0<u.length){var w=5<n&&x.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<u.length;m++)if(b=u[m].x.getTime?u[m].x.getTime():u[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof u[m].y){p=a.axisX.convertValueToPixel(b);var v;v=0!==a.dataPointYSums[b]?100*(u[m].y/a.dataPointYSums[b]):0;p=p-a.plotType.plotUnits.length*n/2+a.index*n<<0;var s=p+n<<0;if(a.axisY.logarithmic||
394
395
  a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<u[m].y){k[b]=v+(k[b]?k[b]:0);if(0>=k[b])continue;v=g[b]?g[b]:q;g[b]=r=a.axisY.convertValueToPixel(k[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=u[m].y)l[b]=v+(l[b]?l[b]:0),r=h[b]?h[b]:q,h[b]=v=a.axisY.convertValueToPixel(l[b]);else if(r=a.axisY.convertValueToPixel(v),0<=u[m].y){var A=g[b]?g[b]:0;v=q+A;r+=A;a.dataSeriesIndexes.length-1===f&&1>=Math.abs(d.x2-r)&&(r=d.x2);g[b]=A+(r-v)}else A=h[b]?
395
- h[b]:0,v=r-A,r=q-A,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(d.x1-v)&&(v=d.x1),h[b]=A+(r-v);b=u[m].color?u[m].color:x._colorSet[m%x._colorSet.length];ba(c,a.axisY.reversed?r:v,p,a.axisY.reversed?v:r,s,b,0,null,w,!1,!1,!1,x.fillOpacity);b=x.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:I,dataPointIndex:m,x1:v,y1:p,x2:r,y2:s};b=R(b);t&&ba(this._eventManager.ghostCtx,v,p,r,s,b,0,null,!1,!1,!1,!1);(u[m].indexLabel||x.indexLabel||u[m].indexLabelFormatter||
396
+ h[b]:0,v=r-A,r=q-A,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(d.x1-v)&&(v=d.x1),h[b]=A+(r-v);b=u[m].color?u[m].color:x._colorSet[m%x._colorSet.length];aa(c,a.axisY.reversed?r:v,p,a.axisY.reversed?v:r,s,b,0,null,w,!1,!1,!1,x.fillOpacity);b=x.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:J,dataPointIndex:m,x1:v,y1:p,x2:r,y2:s};b=R(b);t&&aa(this._eventManager.ghostCtx,v,p,r,s,b,0,null,!1,!1,!1,!1);(u[m].indexLabel||x.indexLabel||u[m].indexLabelFormatter||
396
397
  x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:u[m],dataSeries:x,point:{x:0<=u[m].y?r:v,y:p+(s-p)/2},direction:0>u[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(v,r),y1:p,x2:Math.max(v,r),y2:s},color:b})}}}t&&(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),
397
398
  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:M.xScaleAnimation,easingFunction:M.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};s.prototype.renderArea=function(a){var e,c;function b(){A&&(0<f.lineThickness&&g.stroke(),a.axisY.logarithmic||
398
399
  0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?s=v:0>a.axisY.viewportMaximum?s=k.y1:0<a.axisY.viewportMinimum&&(s=v),g.lineTo(x,s),g.lineTo(A.x,s),g.closePath(),g.globalAlpha=f.fillOpacity,g.fill(),g.globalAlpha=1,t&&(h.lineTo(x,s),h.lineTo(A.x,s),h.closePath(),h.fill()),g.beginPath(),g.moveTo(x,u),h.beginPath(),h.moveTo(x,u),A={x:x,y:u})}var d=a.targetCanvasCtx||this.plotArea.ctx,g=t?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,k=a.axisY.lineCoordinates,
399
- l=[],m=this.plotArea,r;g.save();t&&h.save();g.beginPath();g.rect(m.x1,m.y1,m.width,m.height);g.clip();t&&(h.beginPath(),h.rect(m.x1,m.y1,m.width,m.height),h.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],n=f.dataPoints,l=f.id;this._eventManager.objectMap[l]={objectType:"dataSeries",dataSeriesIndex:q};l=R(l);h.fillStyle=l;l=[];e=!0;var I=0,x,u,w,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),s,A=null;if(0<n.length){var D=
400
- f._colorSet[I%f._colorSet.length],z=f.lineColor=f.options.lineColor||D,y=z;g.fillStyle=D;g.strokeStyle=z;g.lineWidth=f.lineThickness;c="solid";if(g.setLineDash){var P=J(f.nullDataLineDashType,f.lineThickness);c=f.lineDashType;var O=J(c,f.lineThickness);g.setLineDash(O)}for(var ca=!0;I<n.length;I++)if(w=n[I].x.getTime?n[I].x.getTime():n[I].x,!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!ca)))if("number"!==typeof n[I].y)f.connectNullData||(ca||e)||b(),ca=!0;
401
- else{x=a.axisX.convertValueToPixel(w);u=a.axisY.convertValueToPixel(n[I].y);e||ca?(!e&&f.connectNullData?(g.setLineDash&&(f.options.nullDataLineDashType||c===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(e=x,c=u,x=r.x,u=r.y,b(),g.moveTo(r.x,r.y),x=e,u=c,A=r,c=f.nullDataLineDashType,g.setLineDash(P)),g.lineTo(x,u),t&&h.lineTo(x,u)):(g.beginPath(),g.moveTo(x,u),t&&(h.beginPath(),h.moveTo(x,u)),A={x:x,y:u}),ca=e=!1):(g.lineTo(x,u),t&&h.lineTo(x,u),0==I%250&&b());r={x:x,y:u};I<n.length-1&&
402
- (y!==(n[I].lineColor||z)||c!==(n[I].lineDashType||f.lineDashType))&&(b(),y=n[I].lineColor||z,g.strokeStyle=y,g.setLineDash&&(n[I].lineDashType?(c=n[I].lineDashType,g.setLineDash(J(c,f.lineThickness))):(c=f.lineDashType,g.setLineDash(O))));var Z=f.dataPointIds[I];this._eventManager.objectMap[Z]={id:Z,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:I,x1:x,y1:u};0!==n[I].markerSize&&(0<n[I].markerSize||0<f.markerSize)&&(w=f.getMarkerProperties(I,x,u,g),l.push(w),Z=R(Z),t&&l.push({x:x,y:u,ctx:h,
403
- type:w.type,size:w.size,color:Z,borderColor:Z,borderThickness:w.borderThickness}));(n[I].indexLabel||f.indexLabel||n[I].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:n[I],dataSeries:f,point:{x:x,y:u},direction:0>n[I].y===a.axisY.reversed?1:-1,color:D})}b();W.drawMarkers(l)}}t&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
400
+ l=[],m=this.plotArea,r;g.save();t&&h.save();g.beginPath();g.rect(m.x1,m.y1,m.width,m.height);g.clip();t&&(h.beginPath(),h.rect(m.x1,m.y1,m.width,m.height),h.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],n=f.dataPoints,l=f.id;this._eventManager.objectMap[l]={objectType:"dataSeries",dataSeriesIndex:q};l=R(l);h.fillStyle=l;l=[];e=!0;var J=0,x,u,w,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),s,A=null;if(0<n.length){var D=
401
+ f._colorSet[J%f._colorSet.length],z=f.lineColor=f.options.lineColor||D,y=z;g.fillStyle=D;g.strokeStyle=z;g.lineWidth=f.lineThickness;c="solid";if(g.setLineDash){var O=K(f.nullDataLineDashType,f.lineThickness);c=f.lineDashType;var P=K(c,f.lineThickness);g.setLineDash(P)}for(var ca=!0;J<n.length;J++)if(w=n[J].x.getTime?n[J].x.getTime():n[J].x,!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!ca)))if("number"!==typeof n[J].y)f.connectNullData||(ca||e)||b(),ca=!0;
402
+ else{x=a.axisX.convertValueToPixel(w);u=a.axisY.convertValueToPixel(n[J].y);e||ca?(!e&&f.connectNullData?(g.setLineDash&&(f.options.nullDataLineDashType||c===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(e=x,c=u,x=r.x,u=r.y,b(),g.moveTo(r.x,r.y),x=e,u=c,A=r,c=f.nullDataLineDashType,g.setLineDash(O)),g.lineTo(x,u),t&&h.lineTo(x,u)):(g.beginPath(),g.moveTo(x,u),t&&(h.beginPath(),h.moveTo(x,u)),A={x:x,y:u}),ca=e=!1):(g.lineTo(x,u),t&&h.lineTo(x,u),0==J%250&&b());r={x:x,y:u};J<n.length-1&&
403
+ (y!==(n[J].lineColor||z)||c!==(n[J].lineDashType||f.lineDashType))&&(b(),y=n[J].lineColor||z,g.strokeStyle=y,g.setLineDash&&(n[J].lineDashType?(c=n[J].lineDashType,g.setLineDash(K(c,f.lineThickness))):(c=f.lineDashType,g.setLineDash(P))));var Z=f.dataPointIds[J];this._eventManager.objectMap[Z]={id:Z,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:J,x1:x,y1:u};0!==n[J].markerSize&&(0<n[J].markerSize||0<f.markerSize)&&(w=f.getMarkerProperties(J,x,u,g),l.push(w),Z=R(Z),t&&l.push({x:x,y:u,ctx:h,
404
+ type:w.type,size:w.size,color:Z,borderColor:Z,borderThickness:w.borderThickness}));(n[J].indexLabel||f.indexLabel||n[J].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:n[J],dataSeries:f,point:{x:x,y:u},direction:0>n[J].y===a.axisY.reversed?1:-1,color:D})}b();Y.drawMarkers(l)}}t&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
404
405
  a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());g.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderSplineArea=function(a){function e(){var c=y(w,2);if(0<c.length){if(0<r.lineThickness){b.beginPath();
405
406
  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 f=0;f<c.length-3;f+=3)if(b.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),t&&d.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),c[f+3].newStrokeStyle||c[f+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(c[f+3].x,c[f+3].y),c[f+3].newStrokeStyle&&(b.strokeStyle=c[f+3].newStrokeStyle),c[f+3].newLineDashArray&&
406
407
  b.setLineDash(c[f+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,c[0].y);t&&(d.beginPath(),d.moveTo(c[0].x,c[0].y));for(f=0;f<c.length-3;f+=3)b.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),t&&d.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?x=s:0>a.axisY.viewportMaximum?x=g.y1:0<a.axisY.viewportMinimum&&(x=s);u={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,x);b.lineTo(u.x,
407
408
  x);b.closePath();b.globalAlpha=r.fillOpacity;b.fill();b.globalAlpha=1;t&&(d.lineTo(c[c.length-1].x,x),d.lineTo(u.x,x),d.closePath(),d.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,g=a.axisY.lineCoordinates,h=[],k=this.plotArea;b.save();t&&d.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(var l=0;l<a.dataSeriesIndexes.length;l++){var m=
408
- a.dataSeriesIndexes[l],r=this.data[m],p=r.dataPoints,h=r.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=R(h);d.fillStyle=h;var h=[],q=0,f,n,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x,u=null,w=[];if(0<p.length){var v=r._colorSet[q%r._colorSet.length],z=r.lineColor=r.options.lineColor||v,A=z;b.fillStyle=v;b.strokeStyle=z;b.lineWidth=r.lineThickness;var D="solid";if(b.setLineDash){var B=J(r.nullDataLineDashType,r.lineThickness),D=
409
- r.lineDashType,C=J(D,r.lineThickness);b.setLineDash(C)}for(n=!1;q<p.length;q++)if(f=p[q].x.getTime?p[q].x.getTime():p[q].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!n)))if("number"!==typeof p[q].y)0<q&&!n&&(r.connectNullData?b.setLineDash&&(0<w.length&&(r.options.nullDataLineDashType||!p[q-1].lineDashType))&&(w[w.length-1].newLineDashArray=B,D=r.nullDataLineDashType):(e(),w=[])),n=!0;else{f=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(p[q].y);
410
- var P=r.dataPointIds[q];this._eventManager.objectMap[P]={id:P,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:q,x1:f,y1:n};w[w.length]={x:f,y:n};q<p.length-1&&(A!==(p[q].lineColor||z)||D!==(p[q].lineDashType||r.lineDashType))&&(A=p[q].lineColor||z,w[w.length-1].newStrokeStyle=A,b.setLineDash&&(p[q].lineDashType?(D=p[q].lineDashType,w[w.length-1].newLineDashArray=J(D,r.lineThickness)):(D=r.lineDashType,w[w.length-1].newLineDashArray=C)));if(0!==p[q].markerSize&&(0<p[q].markerSize||0<r.markerSize)){var O=
411
- r.getMarkerProperties(q,f,n,b);h.push(O);P=R(P);t&&h.push({x:f,y:n,ctx:d,type:O.type,size:O.size,color:P,borderColor:P,borderThickness:O.borderThickness})}(p[q].indexLabel||r.indexLabel||p[q].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[q],dataSeries:r,point:{x:f,y:n},direction:0>p[q].y===a.axisY.reversed?1:-1,color:v});n=!1}e();W.drawMarkers(h)}}t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation=
409
+ a.dataSeriesIndexes[l],r=this.data[m],p=r.dataPoints,h=r.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=R(h);d.fillStyle=h;var h=[],q=0,f,n,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x,u=null,w=[];if(0<p.length){var v=r._colorSet[q%r._colorSet.length],z=r.lineColor=r.options.lineColor||v,A=z;b.fillStyle=v;b.strokeStyle=z;b.lineWidth=r.lineThickness;var D="solid";if(b.setLineDash){var B=K(r.nullDataLineDashType,r.lineThickness),D=
410
+ r.lineDashType,C=K(D,r.lineThickness);b.setLineDash(C)}for(n=!1;q<p.length;q++)if(f=p[q].x.getTime?p[q].x.getTime():p[q].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!n)))if("number"!==typeof p[q].y)0<q&&!n&&(r.connectNullData?b.setLineDash&&(0<w.length&&(r.options.nullDataLineDashType||!p[q-1].lineDashType))&&(w[w.length-1].newLineDashArray=B,D=r.nullDataLineDashType):(e(),w=[])),n=!0;else{f=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(p[q].y);
411
+ var O=r.dataPointIds[q];this._eventManager.objectMap[O]={id:O,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:q,x1:f,y1:n};w[w.length]={x:f,y:n};q<p.length-1&&(A!==(p[q].lineColor||z)||D!==(p[q].lineDashType||r.lineDashType))&&(A=p[q].lineColor||z,w[w.length-1].newStrokeStyle=A,b.setLineDash&&(p[q].lineDashType?(D=p[q].lineDashType,w[w.length-1].newLineDashArray=K(D,r.lineThickness)):(D=r.lineDashType,w[w.length-1].newLineDashArray=C)));if(0!==p[q].markerSize&&(0<p[q].markerSize||0<r.markerSize)){var P=
412
+ r.getMarkerProperties(q,f,n,b);h.push(P);O=R(O);t&&h.push({x:f,y:n,ctx:d,type:P.type,size:P.size,color:O,borderColor:O,borderThickness:P.borderThickness})}(p[q].indexLabel||r.indexLabel||p[q].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[q],dataSeries:r,point:{x:f,y:n},direction:0>p[q].y===a.axisY.reversed?1:-1,color:v});n=!1}e();Y.drawMarkers(h)}}t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation=
412
413
  "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(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderStepArea=
413
414
  function(a){var e,c;function b(){A&&(0<f.lineThickness&&g.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?z=v:0>a.axisY.viewportMaximum?z=k.y1:0<a.axisY.viewportMinimum&&(z=v),g.lineTo(x,z),g.lineTo(A.x,z),g.closePath(),g.globalAlpha=f.fillOpacity,g.fill(),g.globalAlpha=1,t&&(h.lineTo(x,z),h.lineTo(A.x,z),h.closePath(),h.fill()),g.beginPath(),g.moveTo(x,u),h.beginPath(),h.moveTo(x,u),A={x:x,y:u})}var d=a.targetCanvasCtx||this.plotArea.ctx,g=t?this._preRenderCtx:
414
415
  d;if(!(0>=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,k=a.axisY.lineCoordinates,l=[],m=this.plotArea,r;g.save();t&&h.save();g.beginPath();g.rect(m.x1,m.y1,m.width,m.height);g.clip();t&&(h.beginPath(),h.rect(m.x1,m.y1,m.width,m.height),h.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],n=f.dataPoints,l=f.id;this._eventManager.objectMap[l]={objectType:"dataSeries",dataSeriesIndex:q};l=R(l);h.fillStyle=l;l=[];e=!0;var s=0,x,u,w,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?
415
- a.axisY.viewportMinimum:0),z,A=null;c=!1;if(0<n.length){var D=f._colorSet[s%f._colorSet.length],y=f.lineColor=f.options.lineColor||D,B=y;g.fillStyle=D;g.strokeStyle=y;g.lineWidth=f.lineThickness;var P="solid";if(g.setLineDash){var O=J(f.nullDataLineDashType,f.lineThickness),P=f.lineDashType,ca=J(P,f.lineThickness);g.setLineDash(ca)}for(;s<n.length;s++)if(w=n[s].x.getTime?n[s].x.getTime():n[s].x,!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!c))){var Z=u;"number"!==
416
- typeof n[s].y?(f.connectNullData||(c||e)||b(),c=!0):(x=a.axisX.convertValueToPixel(w),u=a.axisY.convertValueToPixel(n[s].y),e||c?(!e&&f.connectNullData?(g.setLineDash&&(f.options.nullDataLineDashType||P===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(e=x,c=u,x=r.x,u=r.y,b(),g.moveTo(r.x,r.y),x=e,u=c,A=r,P=f.nullDataLineDashType,g.setLineDash(O)),g.lineTo(x,Z),g.lineTo(x,u),t&&(h.lineTo(x,Z),h.lineTo(x,u))):(g.beginPath(),g.moveTo(x,u),t&&(h.beginPath(),h.moveTo(x,u)),A={x:x,y:u}),c=e=
417
- !1):(g.lineTo(x,Z),t&&h.lineTo(x,Z),g.lineTo(x,u),t&&h.lineTo(x,u),0==s%250&&b()),r={x:x,y:u},s<n.length-1&&(B!==(n[s].lineColor||y)||P!==(n[s].lineDashType||f.lineDashType))&&(b(),B=n[s].lineColor||y,g.strokeStyle=B,g.setLineDash&&(n[s].lineDashType?(P=n[s].lineDashType,g.setLineDash(J(P,f.lineThickness))):(P=f.lineDashType,g.setLineDash(ca)))),w=f.dataPointIds[s],this._eventManager.objectMap[w]={id:w,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:s,x1:x,y1:u},0!==n[s].markerSize&&(0<n[s].markerSize||
418
- 0<f.markerSize)&&(Z=f.getMarkerProperties(s,x,u,g),l.push(Z),w=R(w),t&&l.push({x:x,y:u,ctx:h,type:Z.type,size:Z.size,color:w,borderColor:w,borderThickness:Z.borderThickness})),(n[s].indexLabel||f.indexLabel||n[s].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:n[s],dataSeries:f,point:{x:x,y:u},direction:0>n[s].y===a.axisY.reversed?1:-1,color:D}))}b();W.drawMarkers(l)}}t&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation=
416
+ a.axisY.viewportMinimum:0),z,A=null;c=!1;if(0<n.length){var D=f._colorSet[s%f._colorSet.length],y=f.lineColor=f.options.lineColor||D,B=y;g.fillStyle=D;g.strokeStyle=y;g.lineWidth=f.lineThickness;var O="solid";if(g.setLineDash){var P=K(f.nullDataLineDashType,f.lineThickness),O=f.lineDashType,ca=K(O,f.lineThickness);g.setLineDash(ca)}for(;s<n.length;s++)if(w=n[s].x.getTime?n[s].x.getTime():n[s].x,!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!c))){var Z=u;"number"!==
417
+ typeof n[s].y?(f.connectNullData||(c||e)||b(),c=!0):(x=a.axisX.convertValueToPixel(w),u=a.axisY.convertValueToPixel(n[s].y),e||c?(!e&&f.connectNullData?(g.setLineDash&&(f.options.nullDataLineDashType||O===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(e=x,c=u,x=r.x,u=r.y,b(),g.moveTo(r.x,r.y),x=e,u=c,A=r,O=f.nullDataLineDashType,g.setLineDash(P)),g.lineTo(x,Z),g.lineTo(x,u),t&&(h.lineTo(x,Z),h.lineTo(x,u))):(g.beginPath(),g.moveTo(x,u),t&&(h.beginPath(),h.moveTo(x,u)),A={x:x,y:u}),c=e=
418
+ !1):(g.lineTo(x,Z),t&&h.lineTo(x,Z),g.lineTo(x,u),t&&h.lineTo(x,u),0==s%250&&b()),r={x:x,y:u},s<n.length-1&&(B!==(n[s].lineColor||y)||O!==(n[s].lineDashType||f.lineDashType))&&(b(),B=n[s].lineColor||y,g.strokeStyle=B,g.setLineDash&&(n[s].lineDashType?(O=n[s].lineDashType,g.setLineDash(K(O,f.lineThickness))):(O=f.lineDashType,g.setLineDash(ca)))),w=f.dataPointIds[s],this._eventManager.objectMap[w]={id:w,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:s,x1:x,y1:u},0!==n[s].markerSize&&(0<n[s].markerSize||
419
+ 0<f.markerSize)&&(Z=f.getMarkerProperties(s,x,u,g),l.push(Z),w=R(w),t&&l.push({x:x,y:u,ctx:h,type:Z.type,size:Z.size,color:w,borderColor:w,borderThickness:Z.borderThickness})),(n[s].indexLabel||f.indexLabel||n[s].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:n[s],dataSeries:f,point:{x:x,y:u},direction:0>n[s].y===a.axisY.reversed?1:-1,color:D}))}b();Y.drawMarkers(l)}}t&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation=
419
420
  "source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());g.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderStackedArea=
420
421
  function(a){function e(){if(!(1>m.length)){for(0<D.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);t&&x.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=D.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();t&&(x.closePath(),x.fill(),x.beginPath());m=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=null,h=[],k=this.plotArea,l=[],m=[],r=[],p=[],q=0,f,n,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:
421
422
  0),x=this._eventManager.ghostCtx,u,w,v;t&&x.beginPath();b.save();t&&x.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();t&&(x.beginPath(),x.rect(k.x1,k.y1,k.width,k.height),x.clip());for(var d=[],z=0;z<a.dataSeriesIndexes.length;z++){var A=a.dataSeriesIndexes[z],D=this.data[A],y=D.dataPoints;D.dataPointIndexes=[];for(q=0;q<y.length;q++)A=y[q].x.getTime?y[q].x.getTime():y[q].x,D.dataPointIndexes[A]=q,d[A]||(r.push(A),d[A]=!0);r.sort(Ua)}for(z=0;z<a.dataSeriesIndexes.length;z++){A=a.dataSeriesIndexes[z];
422
- D=this.data[A];y=D.dataPoints;w=!0;m=[];q=D.id;this._eventManager.objectMap[q]={objectType:"dataSeries",dataSeriesIndex:A};q=R(q);x.fillStyle=q;if(0<r.length){var d=D._colorSet[0],B=D.lineColor=D.options.lineColor||d,P=B;b.fillStyle=d;b.strokeStyle=B;b.lineWidth=D.lineThickness;v="solid";if(b.setLineDash){var O=J(D.nullDataLineDashType,D.lineThickness);v=D.lineDashType;var ca=J(v,D.lineThickness);b.setLineDash(ca)}for(var Z=!0,q=0;q<r.length;q++){var g=r[q],ga=null,ga=0<=D.dataPointIndexes[g]?y[D.dataPointIndexes[g]]:
423
+ D=this.data[A];y=D.dataPoints;w=!0;m=[];q=D.id;this._eventManager.objectMap[q]={objectType:"dataSeries",dataSeriesIndex:A};q=R(q);x.fillStyle=q;if(0<r.length){var d=D._colorSet[0],B=D.lineColor=D.options.lineColor||d,O=B;b.fillStyle=d;b.strokeStyle=B;b.lineWidth=D.lineThickness;v="solid";if(b.setLineDash){var P=K(D.nullDataLineDashType,D.lineThickness);v=D.lineDashType;var ca=K(v,D.lineThickness);b.setLineDash(ca)}for(var Z=!0,q=0;q<r.length;q++){var g=r[q],ga=null,ga=0<=D.dataPointIndexes[g]?y[D.dataPointIndexes[g]]:
423
424
  {x:g,y:null};if(!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!D.connectNullData||!Z)))if("number"!==typeof ga.y)D.connectNullData||(Z||w)||e(),Z=!0;else{f=a.axisX.convertValueToPixel(g);var oa=l[g]?l[g]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[g]=ga.y+(p[g]?p[g]:0);if(0>=p[g]&&a.axisY.logarithmic)continue;n=a.axisY.convertValueToPixel(p[g])}else n=a.axisY.convertValueToPixel(ga.y),n-=oa;m.push({x:f,y:s-oa});l[g]=s-n;w||Z?(!w&&
424
- D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||v===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(w=m.pop(),v=m[m.length-1],e(),b.moveTo(u.x,u.y),m.push(v),m.push(w),v=D.nullDataLineDashType,b.setLineDash(O)),b.lineTo(f,n),t&&x.lineTo(f,n)):(b.beginPath(),b.moveTo(f,n),t&&(x.beginPath(),x.moveTo(f,n))),Z=w=!1):(b.lineTo(f,n),t&&x.lineTo(f,n),0==q%250&&(e(),b.moveTo(f,n),t&&x.moveTo(f,n),m.push({x:f,y:s-oa})));u={x:f,y:n};q<y.length-1&&(P!==(y[q].lineColor||B)||v!==
425
- (y[q].lineDashType||D.lineDashType))&&(e(),b.beginPath(),b.moveTo(f,n),m.push({x:f,y:s-oa}),P=y[q].lineColor||B,b.strokeStyle=P,b.setLineDash&&(y[q].lineDashType?(v=y[q].lineDashType,b.setLineDash(J(v,D.lineThickness))):(v=D.lineDashType,b.setLineDash(ca))));if(0<=D.dataPointIndexes[g]){var C=D.dataPointIds[D.dataPointIndexes[g]];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:D.dataPointIndexes[g],x1:f,y1:n}}0<=D.dataPointIndexes[g]&&0!==ga.markerSize&&
426
- (0<ga.markerSize||0<D.markerSize)&&(oa=D.getMarkerProperties(D.dataPointIndexes[g],f,n,b),h.push(oa),g=R(C),t&&h.push({x:f,y:n,ctx:x,type:oa.type,size:oa.size,color:g,borderColor:g,borderThickness:oa.borderThickness}));(ga.indexLabel||D.indexLabel||ga.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:ga,dataSeries:D,point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&x.moveTo(f,n)}delete D.dataPointIndexes}W.drawMarkers(h);
425
+ D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||v===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(w=m.pop(),v=m[m.length-1],e(),b.moveTo(u.x,u.y),m.push(v),m.push(w),v=D.nullDataLineDashType,b.setLineDash(P)),b.lineTo(f,n),t&&x.lineTo(f,n)):(b.beginPath(),b.moveTo(f,n),t&&(x.beginPath(),x.moveTo(f,n))),Z=w=!1):(b.lineTo(f,n),t&&x.lineTo(f,n),0==q%250&&(e(),b.moveTo(f,n),t&&x.moveTo(f,n),m.push({x:f,y:s-oa})));u={x:f,y:n};q<y.length-1&&(O!==(y[q].lineColor||B)||v!==
426
+ (y[q].lineDashType||D.lineDashType))&&(e(),b.beginPath(),b.moveTo(f,n),m.push({x:f,y:s-oa}),O=y[q].lineColor||B,b.strokeStyle=O,b.setLineDash&&(y[q].lineDashType?(v=y[q].lineDashType,b.setLineDash(K(v,D.lineThickness))):(v=D.lineDashType,b.setLineDash(ca))));if(0<=D.dataPointIndexes[g]){var C=D.dataPointIds[D.dataPointIndexes[g]];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:D.dataPointIndexes[g],x1:f,y1:n}}0<=D.dataPointIndexes[g]&&0!==ga.markerSize&&
427
+ (0<ga.markerSize||0<D.markerSize)&&(oa=D.getMarkerProperties(D.dataPointIndexes[g],f,n,b),h.push(oa),g=R(C),t&&h.push({x:f,y:n,ctx:x,type:oa.type,size:oa.size,color:g,borderColor:g,borderThickness:oa.borderThickness}));(ga.indexLabel||D.indexLabel||ga.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:ga,dataSeries:D,point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&x.moveTo(f,n)}delete D.dataPointIndexes}Y.drawMarkers(h);
427
428
  t&&(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(k.x1,k.y1,k.width,k.height),x.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,
428
429
  easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderStackedArea100=function(a){function e(){for(0<D.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);t&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=D.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();t&&(v.closePath(),v.fill(),v.beginPath());m=[]}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=null,h=this.plotArea,k=[],l=[],m=[],r=[],p=[],q=
429
430
  0,f,n,s,x,u,w=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;b.save();t&&v.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(v.beginPath(),v.rect(h.x1,h.y1,h.width,h.height),v.clip());for(var d=[],z=0;z<a.dataSeriesIndexes.length;z++){var A=a.dataSeriesIndexes[z],D=this.data[A],y=D.dataPoints;D.dataPointIndexes=[];for(q=0;q<y.length;q++)A=y[q].x.getTime?y[q].x.getTime():y[q].x,D.dataPointIndexes[A]=q,d[A]||(r.push(A),d[A]=
430
- !0);r.sort(Ua)}for(z=0;z<a.dataSeriesIndexes.length;z++){A=a.dataSeriesIndexes[z];D=this.data[A];y=D.dataPoints;x=!0;d=D.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:A};d=R(d);v.fillStyle=d;m=[];if(0<r.length){var d=D._colorSet[q%D._colorSet.length],B=D.lineColor=D.options.lineColor||d,P=B;b.fillStyle=d;b.strokeStyle=B;b.lineWidth=D.lineThickness;u="solid";if(b.setLineDash){var O=J(D.nullDataLineDashType,D.lineThickness);u=D.lineDashType;var ca=J(u,D.lineThickness);
431
+ !0);r.sort(Ua)}for(z=0;z<a.dataSeriesIndexes.length;z++){A=a.dataSeriesIndexes[z];D=this.data[A];y=D.dataPoints;x=!0;d=D.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:A};d=R(d);v.fillStyle=d;m=[];if(0<r.length){var d=D._colorSet[q%D._colorSet.length],B=D.lineColor=D.options.lineColor||d,O=B;b.fillStyle=d;b.strokeStyle=B;b.lineWidth=D.lineThickness;u="solid";if(b.setLineDash){var P=K(D.nullDataLineDashType,D.lineThickness);u=D.lineDashType;var ca=K(u,D.lineThickness);
431
432
  b.setLineDash(ca)}for(var Z=!0,q=0;q<r.length;q++){var g=r[q],ga=null,ga=0<=D.dataPointIndexes[g]?y[D.dataPointIndexes[g]]:{x:g,y:null};if(!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!D.connectNullData||!Z)))if("number"!==typeof ga.y)D.connectNullData||(Z||x)||e(),Z=!0;else{var oa;oa=0!==a.dataPointYSums[g]?100*(ga.y/a.dataPointYSums[g]):0;f=a.axisX.convertValueToPixel(g);var C=l[g]?l[g]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[g]=
432
- oa+(p[g]?p[g]:0);if(0>=p[g]&&a.axisY.logarithmic)continue;n=a.axisY.convertValueToPixel(p[g])}else n=a.axisY.convertValueToPixel(oa),n-=C;m.push({x:f,y:w-C});l[g]=w-n;x||Z?(!x&&D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||u===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(x=m.pop(),u=m[m.length-1],e(),b.moveTo(s.x,s.y),m.push(u),m.push(x),u=D.nullDataLineDashType,b.setLineDash(O)),b.lineTo(f,n),t&&v.lineTo(f,n)):(b.beginPath(),b.moveTo(f,n),t&&(v.beginPath(),v.moveTo(f,
433
- n))),Z=x=!1):(b.lineTo(f,n),t&&v.lineTo(f,n),0==q%250&&(e(),b.moveTo(f,n),t&&v.moveTo(f,n),m.push({x:f,y:w-C})));s={x:f,y:n};q<y.length-1&&(P!==(y[q].lineColor||B)||u!==(y[q].lineDashType||D.lineDashType))&&(e(),b.beginPath(),b.moveTo(f,n),m.push({x:f,y:w-C}),P=y[q].lineColor||B,b.strokeStyle=P,b.setLineDash&&(y[q].lineDashType?(u=y[q].lineDashType,b.setLineDash(J(u,D.lineThickness))):(u=D.lineDashType,b.setLineDash(ca))));if(0<=D.dataPointIndexes[g]){var F=D.dataPointIds[D.dataPointIndexes[g]];this._eventManager.objectMap[F]=
433
+ oa+(p[g]?p[g]:0);if(0>=p[g]&&a.axisY.logarithmic)continue;n=a.axisY.convertValueToPixel(p[g])}else n=a.axisY.convertValueToPixel(oa),n-=C;m.push({x:f,y:w-C});l[g]=w-n;x||Z?(!x&&D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||u===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(x=m.pop(),u=m[m.length-1],e(),b.moveTo(s.x,s.y),m.push(u),m.push(x),u=D.nullDataLineDashType,b.setLineDash(P)),b.lineTo(f,n),t&&v.lineTo(f,n)):(b.beginPath(),b.moveTo(f,n),t&&(v.beginPath(),v.moveTo(f,
434
+ n))),Z=x=!1):(b.lineTo(f,n),t&&v.lineTo(f,n),0==q%250&&(e(),b.moveTo(f,n),t&&v.moveTo(f,n),m.push({x:f,y:w-C})));s={x:f,y:n};q<y.length-1&&(O!==(y[q].lineColor||B)||u!==(y[q].lineDashType||D.lineDashType))&&(e(),b.beginPath(),b.moveTo(f,n),m.push({x:f,y:w-C}),O=y[q].lineColor||B,b.strokeStyle=O,b.setLineDash&&(y[q].lineDashType?(u=y[q].lineDashType,b.setLineDash(K(u,D.lineThickness))):(u=D.lineDashType,b.setLineDash(ca))));if(0<=D.dataPointIndexes[g]){var F=D.dataPointIds[D.dataPointIndexes[g]];this._eventManager.objectMap[F]=
434
435
  {id:F,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:D.dataPointIndexes[g],x1:f,y1:n}}0<=D.dataPointIndexes[g]&&0!==ga.markerSize&&(0<ga.markerSize||0<D.markerSize)&&(C=D.getMarkerProperties(D.dataPointIndexes[g],f,n,b),k.push(C),g=R(F),t&&k.push({x:f,y:n,ctx:v,type:C.type,size:C.size,color:g,borderColor:g,borderThickness:C.borderThickness}));(ga.indexLabel||D.indexLabel||ga.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ga,dataSeries:D,
435
- point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&v.moveTo(f,n)}delete D.dataPointIndexes}W.drawMarkers(k);t&&(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,
436
+ point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&v.moveTo(f,n)}delete D.dataPointIndexes}Y.drawMarkers(k);t&&(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,
436
437
  this.height),b.clearRect(h.x1,h.y1,h.width,h.height),v.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderBubble=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,d=0,g,h;c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
437
438
  this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var k=-Infinity,l=Infinity,m=0;m<a.dataSeriesIndexes.length;m++)for(var r=a.dataSeriesIndexes[m],p=this.data[r],q=p.dataPoints,f=0,d=0;d<q.length;d++)g=q[d].getTime?g=q[d].x.getTime():g=q[d].x,g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax||"undefined"===typeof q[d].z||(f=q[d].z,f>k&&(k=f),f<l&&(l=f));for(var n=25*Math.PI,s=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,
438
439
  n),m=0;m<a.dataSeriesIndexes.length;m++)if(r=a.dataSeriesIndexes[m],p=this.data[r],q=p.dataPoints,0<q.length)for(c.strokeStyle="#4572A7 ",d=0;d<q.length;d++)if(g=q[d].getTime?g=q[d].x.getTime():g=q[d].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[d].y){g=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(q[d].y);var f=q[d].z,x=2*Math.max(Math.sqrt((k===l?s/2:n+(s-n)/(k-l)*(f-l))/Math.PI)<<0,1),f=p.getMarkerProperties(d,c);f.size=x;c.globalAlpha=
439
- p.fillOpacity;W.drawMarker(g,h,c,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;var u=p.dataPointIds[d];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:d,x1:g,y1:h,size:x};x=R(u);t&&W.drawMarker(g,h,this._eventManager.ghostCtx,f.type,f.size,x,x,f.borderThickness);(q[d].indexLabel||p.indexLabel||q[d].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[d],dataSeries:p,point:{x:g,y:h},
440
+ p.fillOpacity;Y.drawMarker(g,h,c,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;var u=p.dataPointIds[d];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:d,x1:g,y1:h,size:x};x=R(u);t&&Y.drawMarker(g,h,this._eventManager.ghostCtx,f.type,f.size,x,x,f.borderThickness);(q[d].indexLabel||p.indexLabel||q[d].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[d],dataSeries:p,point:{x:g,y:h},
440
441
  direction:1,bounds:{x1:g-f.size/2,y1:h-f.size/2,x2:g+f.size/2,y2:h+f.size/2},color:null})}t&&(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());
441
442
  c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0}}};s.prototype.renderScatter=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,d=0,g,h;c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,
442
443
  b.width,b.height),this._eventManager.ghostCtx.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],r=m.dataPoints;if(0<r.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var p=0,q=0,d=0;d<r.length;d++)if(g=r[d].getTime?g=r[d].x.getTime():g=r[d].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&"number"===typeof r[d].y){g=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(r[d].y);var f=m.getMarkerProperties(d,
443
- g,h,c);c.globalAlpha=m.fillOpacity;W.drawMarker(f.x,f.y,f.ctx,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;Math.sqrt((p-g)*(p-g)+(q-h)*(q-h))<Math.min(f.size,5)&&r.length>Math.min(this.plotArea.width,this.plotArea.height)||(p=m.dataPointIds[d],this._eventManager.objectMap[p]={id:p,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:d,x1:g,y1:h},p=R(p),t&&W.drawMarker(f.x,f.y,this._eventManager.ghostCtx,f.type,f.size,p,p,f.borderThickness),(r[d].indexLabel||m.indexLabel||
444
+ g,h,c);c.globalAlpha=m.fillOpacity;Y.drawMarker(f.x,f.y,f.ctx,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;Math.sqrt((p-g)*(p-g)+(q-h)*(q-h))<Math.min(f.size,5)&&r.length>Math.min(this.plotArea.width,this.plotArea.height)||(p=m.dataPointIds[d],this._eventManager.objectMap[p]={id:p,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:d,x1:g,y1:h},p=R(p),t&&Y.drawMarker(f.x,f.y,this._eventManager.ghostCtx,f.type,f.size,p,p,f.borderThickness),(r[d].indexLabel||m.indexLabel||
444
445
  r[d].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:r[d],dataSeries:m,point:{x:g,y:h},direction:1,bounds:{x1:g-f.size/2,y1:h-f.size/2,x2:g+f.size/2,y2:h+f.size/2},color:null}),p=g,q=h)}}}t&&(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),
445
446
  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:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0}}};s.prototype.renderCandlestick=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=
446
447
  null,g=null,h=this.plotArea,k=0,n,m,r,p,q,f,d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,g=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,s=a.axisX.dataInfo.minDiff;isFinite(s)||(s=0.3*Math.abs(a.axisX.range));s=this.options.dataPointWidth?this.dataPointWidth:0.7*h.width*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))<<0;
447
- 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);c.save();t&&b.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var I=0;I<a.dataSeriesIndexes.length;I++){var x=a.dataSeriesIndexes[I],u=this.data[x],w=u.dataPoints;
448
+ 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);c.save();t&&b.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var J=0;J<a.dataSeriesIndexes.length;J++){var x=a.dataSeriesIndexes[J],u=this.data[x],w=u.dataPoints;
448
449
  if(0<w.length)for(var v=5<s&&u.bevelEnabled?!0:!1,k=0;k<w.length;k++)if(w[k].getTime?f=w[k].x.getTime():f=w[k].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!l(w[k].y)&&w[k].y.length&&"number"===typeof w[k].y[0]&&"number"===typeof w[k].y[1]&&"number"===typeof w[k].y[2]&&"number"===typeof w[k].y[3]){n=a.axisX.convertValueToPixel(f);m=a.axisY.convertValueToPixel(w[k].y[0]);r=a.axisY.convertValueToPixel(w[k].y[1]);p=a.axisY.convertValueToPixel(w[k].y[2]);q=a.axisY.convertValueToPixel(w[k].y[3]);
449
450
  var z=n-s/2<<0,A=z+s<<0,g=u.options.fallingColor?u.fallingColor:u._colorSet[0],d=w[k].color?w[k].color:u._colorSet[0],D=Math.round(Math.max(1,0.15*s)),y=0===D%2?0:0.5,B=u.dataPointIds[k];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:k,x1:z,y1:m,x2:A,y2:r,x3:n,y3:p,x4:n,y4:q,borderThickness:D,color:d};c.strokeStyle=d;c.beginPath();c.lineWidth=D;b.lineWidth=Math.max(D,4);"candlestick"===u.type?(c.moveTo(n-y,r),c.lineTo(n-y,Math.min(m,q)),c.stroke(),c.moveTo(n-
450
- y,Math.max(m,q)),c.lineTo(n-y,p),c.stroke(),ba(c,z,Math.min(m,q),A,Math.max(m,q),w[k].y[0]<=w[k].y[3]?u.risingColor:g,D,d,v,v,!1,!1,u.fillOpacity),t&&(d=R(B),b.strokeStyle=d,b.beginPath(),b.moveTo(n-y,r),b.lineTo(n-y,Math.min(m,q)),b.stroke(),b.moveTo(n-y,Math.max(m,q)),b.lineTo(n-y,p),b.stroke(),ba(b,z,Math.min(m,q),A,Math.max(m,q),d,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(c.moveTo(n-y,r),c.lineTo(n-y,p),c.stroke(),c.beginPath(),c.moveTo(n,m),c.lineTo(z,m),c.stroke(),c.beginPath(),c.moveTo(n,q),
451
+ y,Math.max(m,q)),c.lineTo(n-y,p),c.stroke(),aa(c,z,Math.min(m,q),A,Math.max(m,q),w[k].y[0]<=w[k].y[3]?u.risingColor:g,D,d,v,v,!1,!1,u.fillOpacity),t&&(d=R(B),b.strokeStyle=d,b.beginPath(),b.moveTo(n-y,r),b.lineTo(n-y,Math.min(m,q)),b.stroke(),b.moveTo(n-y,Math.max(m,q)),b.lineTo(n-y,p),b.stroke(),aa(b,z,Math.min(m,q),A,Math.max(m,q),d,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(c.moveTo(n-y,r),c.lineTo(n-y,p),c.stroke(),c.beginPath(),c.moveTo(n,m),c.lineTo(z,m),c.stroke(),c.beginPath(),c.moveTo(n,q),
451
452
  c.lineTo(A,q),c.stroke(),t&&(b.beginPath(),d=R(B),b.strokeStyle=d,b.moveTo(n-y,r),b.lineTo(n-y,p),b.stroke(),b.beginPath(),b.moveTo(n,m),b.lineTo(z,m),b.stroke(),b.beginPath(),b.moveTo(n,q),b.lineTo(A,q),b.stroke()));(w[k].indexLabel||u.indexLabel||w[k].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:u.type,dataPoint:w[k],dataSeries:u,point:{x:z+(A-z)/2,y:a.axisY.reversed?p:r},direction:1,bounds:{x1:z,y1:Math.min(r,p),x2:A,y2:Math.max(r,p)},color:d})}}t&&(e.drawImage(this._preRenderCanvas,
452
453
  0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,
453
454
  animationBase:0}}};s.prototype.renderBoxAndWhisker=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=this.plotArea,h=0,k,n,m,r,p,q,f,d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,s=a.axisX.dataInfo.minDiff;isFinite(s)||
454
455
  (s=0.3*Math.abs(a.axisX.range));s=this.options.dataPointWidth?this.dataPointWidth:0.7*g.width*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&d>h&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<d)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));s<d&&(s=d);s>h&&(s=h);c.save();t&&b.save();c.beginPath();c.rect(g.x1,g.y1,g.width,
455
- g.height);c.clip();t&&(b.beginPath(),b.rect(g.x1,g.y1,g.width,g.height),b.clip());for(var I=!1,I=!!a.axisY.reversed,x=0;x<a.dataSeriesIndexes.length;x++){var u=a.dataSeriesIndexes[x],w=this.data[u],v=w.dataPoints;w.whiskerLength=l(w.options.whiskerLength)?s:w.options.whiskerLength;if(0<v.length)for(var z=5<s&&w.bevelEnabled?!0:!1,h=0;h<v.length;h++)if(v[h].getTime?f=v[h].x.getTime():f=v[h].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!l(v[h].y)&&v[h].y.length&&"number"===typeof v[h].y[0]&&
456
- "number"===typeof v[h].y[1]&&"number"===typeof v[h].y[2]&&"number"===typeof v[h].y[3]&&"number"===typeof v[h].y[4]&&5===v[h].y.length){k=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(v[h].y[0]);m=a.axisY.convertValueToPixel(v[h].y[1]);r=a.axisY.convertValueToPixel(v[h].y[2]);p=a.axisY.convertValueToPixel(v[h].y[3]);q=a.axisY.convertValueToPixel(v[h].y[4]);var A=k-s/2<<0,D=k+s/2<<0,d=v[h].color?v[h].color:w._colorSet[0],y=Math.round(Math.max(1,0.15*s)),B=0===y%2?0:0.5,P=v[h].whiskerColor?
457
- v[h].whiskerColor:v[h].color?w.whiskerColor?w.whiskerColor:v[h].color:w.whiskerColor?w.whiskerColor:d,O="number"===typeof v[h].whiskerThickness?v[h].whiskerThickness:"number"===typeof w.options.whiskerThickness?w.whiskerThickness:y,ca=v[h].whiskerDashType?v[h].whiskerDashType:w.whiskerDashType,Z=l(v[h].whiskerLength)?l(w.options.whiskerLength)?s:w.whiskerLength:v[h].whiskerLength,Z="number"===typeof Z?0>=Z?0:Z>=s?s:Z:"string"===typeof Z?parseInt(Z)*s/100>s?s:parseInt(Z)*s/100:s,ga=1===Math.round(O)%
458
- 2?0.5:0,oa=v[h].stemColor?v[h].stemColor:v[h].color?w.stemColor?w.stemColor:v[h].color:w.stemColor?w.stemColor:d,C="number"===typeof v[h].stemThickness?v[h].stemThickness:"number"===typeof w.options.stemThickness?w.stemThickness:y,F=1===Math.round(C)%2?0.5:0,E=v[h].stemDashType?v[h].stemDashType:w.stemDashType,K=v[h].lineColor?v[h].lineColor:v[h].color?w.lineColor?w.lineColor:v[h].color:w.lineColor?w.lineColor:d,Q="number"===typeof v[h].lineThickness?v[h].lineThickness:"number"===typeof w.options.lineThickness?
459
- w.lineThickness:y,U=v[h].lineDashType?v[h].lineDashType:w.lineDashType,$=1===Math.round(Q)%2?0.5:0,S=w.upperBoxColor,ya=w.lowerBoxColor,ua=l(w.options.fillOpacity)?1:w.fillOpacity,X=w.dataPointIds[h];this._eventManager.objectMap[X]={id:X,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:h,x1:A,y1:n,x2:D,y2:m,x3:k,y3:r,x4:k,y4:p,y5:q,borderThickness:y,color:d,stemThickness:C,stemColor:oa,whiskerThickness:O,whiskerLength:Z,whiskerColor:P,lineThickness:Q,lineColor:K};c.save();0<C&&(c.beginPath(),
460
- c.strokeStyle=oa,c.lineWidth=C,c.setLineDash&&c.setLineDash(J(E,C)),c.moveTo(k-F,m),c.lineTo(k-F,n),c.stroke(),c.moveTo(k-F,p),c.lineTo(k-F,r),c.stroke());c.restore();b.lineWidth=Math.max(y,4);c.beginPath();ba(c,A,Math.max(Math.min(q,m),g.y1-y/2),D,Math.min(Math.max(m,q),g.y2+y/2),ya,0,d,I?z:!1,I?!1:z,!1,!1,ua);c.beginPath();ba(c,A,Math.max(Math.min(r,q),g.y1-y/2),D,Math.min(Math.max(q,r),g.y2+y/2),S,0,d,I?!1:z,I?z:!1,!1,!1,ua);c.beginPath();c.lineWidth=y;c.strokeStyle=d;c.rect(A-B,Math.max(Math.min(m,
461
- r)-B,g.y1-y/2),D-A+2*B,Math.min(Math.max(m,r),g.y2+y/2)-Math.max(Math.min(m,r)-B,g.y1-y/2)+2*B);c.stroke();c.save();0<Q&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(J(U,Q)),c.strokeStyle=K,c.lineWidth=Q,c.moveTo(A,q-$),c.lineTo(D,q-$),c.stroke());c.restore();c.save();0<O&&(c.beginPath(),c.setLineDash&&c.setLineDash(J(ca,O)),c.strokeStyle=P,c.lineWidth=O,c.moveTo(k-Z/2<<0,p-ga),c.lineTo(k+Z/2<<0,p-ga),c.stroke(),c.moveTo(k-Z/2<<0,n+ga),c.lineTo(k+Z/2<<0,n+ga),c.stroke());c.restore();
462
- t&&(d=R(X),b.strokeStyle=d,b.lineWidth=C,0<C&&(b.beginPath(),b.moveTo(k-B-F,m),b.lineTo(k-B-F,Math.max(n,p)),b.stroke(),b.moveTo(k-B-F,Math.min(n,p)),b.lineTo(k-B-F,r),b.stroke()),ba(b,A,Math.max(m,r),D,Math.min(m,r),d,0,null,!1,!1,!1,!1),0<O&&(b.beginPath(),b.lineWidth=O,b.moveTo(k+Z/2,p-ga),b.lineTo(k-Z/2,p-ga),b.stroke(),b.moveTo(k+Z/2,n+ga),b.lineTo(k-Z/2,n+ga),b.stroke()));(v[h].indexLabel||w.indexLabel||v[h].indexLabelFormatter||w.indexLabelFormatter)&&this._indexLabels.push({chartType:w.type,
456
+ g.height);c.clip();t&&(b.beginPath(),b.rect(g.x1,g.y1,g.width,g.height),b.clip());for(var J=!1,J=!!a.axisY.reversed,x=0;x<a.dataSeriesIndexes.length;x++){var u=a.dataSeriesIndexes[x],w=this.data[u],v=w.dataPoints;w.whiskerLength=l(w.options.whiskerLength)?s:w.options.whiskerLength;if(0<v.length)for(var z=5<s&&w.bevelEnabled?!0:!1,h=0;h<v.length;h++)if(v[h].getTime?f=v[h].x.getTime():f=v[h].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!l(v[h].y)&&v[h].y.length&&"number"===typeof v[h].y[0]&&
457
+ "number"===typeof v[h].y[1]&&"number"===typeof v[h].y[2]&&"number"===typeof v[h].y[3]&&"number"===typeof v[h].y[4]&&5===v[h].y.length){k=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(v[h].y[0]);m=a.axisY.convertValueToPixel(v[h].y[1]);r=a.axisY.convertValueToPixel(v[h].y[2]);p=a.axisY.convertValueToPixel(v[h].y[3]);q=a.axisY.convertValueToPixel(v[h].y[4]);var A=k-s/2<<0,D=k+s/2<<0,d=v[h].color?v[h].color:w._colorSet[0],y=Math.round(Math.max(1,0.15*s)),B=0===y%2?0:0.5,O=v[h].whiskerColor?
458
+ v[h].whiskerColor:v[h].color?w.whiskerColor?w.whiskerColor:v[h].color:w.whiskerColor?w.whiskerColor:d,P="number"===typeof v[h].whiskerThickness?v[h].whiskerThickness:"number"===typeof w.options.whiskerThickness?w.whiskerThickness:y,ca=v[h].whiskerDashType?v[h].whiskerDashType:w.whiskerDashType,Z=l(v[h].whiskerLength)?l(w.options.whiskerLength)?s:w.whiskerLength:v[h].whiskerLength,Z="number"===typeof Z?0>=Z?0:Z>=s?s:Z:"string"===typeof Z?parseInt(Z)*s/100>s?s:parseInt(Z)*s/100:s,ga=1===Math.round(P)%
459
+ 2?0.5:0,oa=v[h].stemColor?v[h].stemColor:v[h].color?w.stemColor?w.stemColor:v[h].color:w.stemColor?w.stemColor:d,C="number"===typeof v[h].stemThickness?v[h].stemThickness:"number"===typeof w.options.stemThickness?w.stemThickness:y,F=1===Math.round(C)%2?0.5:0,E=v[h].stemDashType?v[h].stemDashType:w.stemDashType,L=v[h].lineColor?v[h].lineColor:v[h].color?w.lineColor?w.lineColor:v[h].color:w.lineColor?w.lineColor:d,Q="number"===typeof v[h].lineThickness?v[h].lineThickness:"number"===typeof w.options.lineThickness?
460
+ w.lineThickness:y,U=v[h].lineDashType?v[h].lineDashType:w.lineDashType,$=1===Math.round(Q)%2?0.5:0,S=w.upperBoxColor,ya=w.lowerBoxColor,ua=l(w.options.fillOpacity)?1:w.fillOpacity,X=w.dataPointIds[h];this._eventManager.objectMap[X]={id:X,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:h,x1:A,y1:n,x2:D,y2:m,x3:k,y3:r,x4:k,y4:p,y5:q,borderThickness:y,color:d,stemThickness:C,stemColor:oa,whiskerThickness:P,whiskerLength:Z,whiskerColor:O,lineThickness:Q,lineColor:L};c.save();0<C&&(c.beginPath(),
461
+ c.strokeStyle=oa,c.lineWidth=C,c.setLineDash&&c.setLineDash(K(E,C)),c.moveTo(k-F,m),c.lineTo(k-F,n),c.stroke(),c.moveTo(k-F,p),c.lineTo(k-F,r),c.stroke());c.restore();b.lineWidth=Math.max(y,4);c.beginPath();aa(c,A,Math.max(Math.min(q,m),g.y1-y/2),D,Math.min(Math.max(m,q),g.y2+y/2),ya,0,d,J?z:!1,J?!1:z,!1,!1,ua);c.beginPath();aa(c,A,Math.max(Math.min(r,q),g.y1-y/2),D,Math.min(Math.max(q,r),g.y2+y/2),S,0,d,J?!1:z,J?z:!1,!1,!1,ua);c.beginPath();c.lineWidth=y;c.strokeStyle=d;c.rect(A-B,Math.max(Math.min(m,
462
+ r)-B,g.y1-y/2),D-A+2*B,Math.min(Math.max(m,r),g.y2+y/2)-Math.max(Math.min(m,r)-B,g.y1-y/2)+2*B);c.stroke();c.save();0<Q&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(K(U,Q)),c.strokeStyle=L,c.lineWidth=Q,c.moveTo(A,q-$),c.lineTo(D,q-$),c.stroke());c.restore();c.save();0<P&&(c.beginPath(),c.setLineDash&&c.setLineDash(K(ca,P)),c.strokeStyle=O,c.lineWidth=P,c.moveTo(k-Z/2<<0,p-ga),c.lineTo(k+Z/2<<0,p-ga),c.stroke(),c.moveTo(k-Z/2<<0,n+ga),c.lineTo(k+Z/2<<0,n+ga),c.stroke());c.restore();
463
+ t&&(d=R(X),b.strokeStyle=d,b.lineWidth=C,0<C&&(b.beginPath(),b.moveTo(k-B-F,m),b.lineTo(k-B-F,Math.max(n,p)),b.stroke(),b.moveTo(k-B-F,Math.min(n,p)),b.lineTo(k-B-F,r),b.stroke()),aa(b,A,Math.max(m,r),D,Math.min(m,r),d,0,null,!1,!1,!1,!1),0<P&&(b.beginPath(),b.lineWidth=P,b.moveTo(k+Z/2,p-ga),b.lineTo(k-Z/2,p-ga),b.stroke(),b.moveTo(k+Z/2,n+ga),b.lineTo(k-Z/2,n+ga),b.stroke()));(v[h].indexLabel||w.indexLabel||v[h].indexLabelFormatter||w.indexLabelFormatter)&&this._indexLabels.push({chartType:w.type,
463
464
  dataPoint:v[h],dataSeries:w,point:{x:A+(D-A)/2,y:a.axisY.reversed?n:p},direction:1,bounds:{x1:A,y1:Math.min(n,p),x2:D,y2:Math.max(n,p)},color:d})}}t&&(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,
464
465
  this.height),c.clearRect(g.x1,g.y1,g.width,g.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0}}};s.prototype.renderRangeColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,n,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;h=this.options.dataPointMaxWidth?
465
466
  this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;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.width*(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&&g>h&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
466
467
  h<g)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));m<g&&(m=g);m>h&&(m=h);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var r=0;r<a.dataSeriesIndexes.length;r++){var p=a.dataSeriesIndexes[r],q=this.data[p],f=q.dataPoints;if(0<f.length)for(var s=5<m&&q.bevelEnabled?!0:!1,
467
- g=0;g<f.length;g++)if(f[g].getTime?n=f[g].x.getTime():n=f[g].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&!l(f[g].y)&&f[g].y.length&&"number"===typeof f[g].y[0]&&"number"===typeof f[g].y[1]){b=a.axisX.convertValueToPixel(n);h=a.axisY.convertValueToPixel(f[g].y[0]);k=a.axisY.convertValueToPixel(f[g].y[1]);var I=a.axisX.reversed?b+a.plotType.totalDataSeries*m/2-(a.previousDataSeriesCount+r)*m<<0:b-a.plotType.totalDataSeries*m/2+(a.previousDataSeriesCount+r)*m<<0,x=a.axisX.reversed?
468
- I-m<<0:I+m<<0,b=f[g].color?f[g].color:q._colorSet[g%q._colorSet.length];if(h>k){var u=h;h=k;k=u}var u=Math.max(h,d.y1),w=Math.min(k,d.y2),v=q.dataPointIds[g];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:g,x1:I,y1:u,x2:x,y2:w};ba(c,a.axisX.reversed?x:I,u,a.axisX.reversed?I:x,w,b,0,b,s,s,!1,!1,q.fillOpacity);b=R(v);t&&ba(this._eventManager.ghostCtx,a.axisX.reversed?x:I,u,a.axisX.reversed?I:x,w,b,0,null,!1,!1,!1,!1);if(f[g].indexLabel||q.indexLabel||f[g].indexLabelFormatter||
469
- q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:f[g],dataSeries:q,indexKeyword:0,point:{x:I+(x-I)/2,y:f[g].y[1]>=f[g].y[0]?k:h},direction:f[g].y[1]>=f[g].y[0]?-1:1,bounds:{x1:I,y1:Math.min(h,k),x2:x,y2:Math.max(h,k)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:f[g],dataSeries:q,indexKeyword:1,point:{x:I+(x-I)/2,y:f[g].y[1]>=f[g].y[0]?h:k},direction:f[g].y[1]>=f[g].y[0]?1:-1,bounds:{x1:I,y1:Math.min(h,k),x2:x,y2:Math.max(h,k)},color:b})}}t&&(e.drawImage(this._preRenderCanvas,
468
+ g=0;g<f.length;g++)if(f[g].getTime?n=f[g].x.getTime():n=f[g].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&!l(f[g].y)&&f[g].y.length&&"number"===typeof f[g].y[0]&&"number"===typeof f[g].y[1]){b=a.axisX.convertValueToPixel(n);h=a.axisY.convertValueToPixel(f[g].y[0]);k=a.axisY.convertValueToPixel(f[g].y[1]);var J=a.axisX.reversed?b+a.plotType.totalDataSeries*m/2-(a.previousDataSeriesCount+r)*m<<0:b-a.plotType.totalDataSeries*m/2+(a.previousDataSeriesCount+r)*m<<0,x=a.axisX.reversed?
469
+ J-m<<0:J+m<<0,b=f[g].color?f[g].color:q._colorSet[g%q._colorSet.length];if(h>k){var u=h;h=k;k=u}var u=Math.max(h,d.y1),w=Math.min(k,d.y2),v=q.dataPointIds[g];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:g,x1:J,y1:u,x2:x,y2:w};aa(c,a.axisX.reversed?x:J,u,a.axisX.reversed?J:x,w,b,0,b,s,s,!1,!1,q.fillOpacity);b=R(v);t&&aa(this._eventManager.ghostCtx,a.axisX.reversed?x:J,u,a.axisX.reversed?J:x,w,b,0,null,!1,!1,!1,!1);if(f[g].indexLabel||q.indexLabel||f[g].indexLabelFormatter||
470
+ q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:f[g],dataSeries:q,indexKeyword:0,point:{x:J+(x-J)/2,y:f[g].y[1]>=f[g].y[0]?k:h},direction:f[g].y[1]>=f[g].y[0]?-1:1,bounds:{x1:J,y1:Math.min(h,k),x2:x,y2:Math.max(h,k)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:f[g],dataSeries:q,indexKeyword:1,point:{x:J+(x-J)/2,y:f[g].y[1]>=f[g].y[0]?h:k},direction:f[g].y[1]>=f[g].y[0]?1:-1,bounds:{x1:J,y1:Math.min(h,k),x2:x,y2:Math.max(h,k)},color:b})}}t&&(e.drawImage(this._preRenderCanvas,
470
471
  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:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,
471
- animationBase:0}}};s.prototype.renderError=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?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,g=!1,h=this.plotArea,k=0,n,m,r,p,q,f,s,I=a.axisX.dataInfo.minDiff;isFinite(I)||(I=0.3*Math.abs(a.axisX.range));c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
472
+ animationBase:0}}};s.prototype.renderError=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?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,g=!1,h=this.plotArea,k=0,n,m,r,p,q,f,s,J=a.axisX.dataInfo.minDiff;isFinite(J)||(J=0.3*Math.abs(a.axisX.range));c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
472
473
  this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var x=0,u=0;u<this.data.length;u++)!this.data[u].type.match(/(bar|column)/ig)||!this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&x||x++;for(var w=0;w<a.dataSeriesIndexes.length;w++){var v=a.dataSeriesIndexes[w],y=this.data[v],A=y.dataPoints,D=l(y._linkedSeries)?!1:y._linkedSeries.type.match(/(bar|column)/ig)&&y._linkedSeries.visible?!0:!1,z=0;if(D)for(d=y._linkedSeries.id,u=0;u<d;u++)!this.data[u].type.match(/(bar|column)/ig)||
473
474
  !this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&z||(this.data[u].type.match(/(range)/ig)&&(g=!0),z++);d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?x:1)))<<0:0.3*this.width;g&&(k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
474
- b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?x:1)))<<0:0.03*this.width);u=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?h.height:h.width)*(a.axisX.logarithmic?Math.log(I)/Math.log(a.axisX.range):Math.abs(I)/Math.abs(a.axisX.range))/(D?x:1))<<0;this.dataPointMaxWidth&&d>k&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<d)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));u<d&&
475
- (u=d);u>k&&(u=k);y.whiskerLength=l(y.options.whiskerLength)?u:y.options.whiskerLength;if(0<A.length)for(var C=y._colorSet,k=0;k<A.length;k++){var d=y.lineColor=y.options.color?y.options.color:C[0],P={color:A[k].whiskerColor?A[k].whiskerColor:A[k].color?y.whiskerColor?y.whiskerColor:A[k].color:y.whiskerColor?y.whiskerColor:d,thickness:l(A[k].whiskerThickness)?y.whiskerThickness:A[k].whiskerThickness,dashType:A[k].whiskerDashType?A[k].whiskerDashType:y.whiskerDashType,length:l(A[k].whiskerLength)?l(y.options.whiskerLength)?
476
- u:y.options.whiskerLength:A[k].whiskerLength,trimLength:l(A[k].whiskerLength)?l(y.options.whiskerLength)?50:0:0};P.length="number"===typeof P.length?0>=P.length?0:P.length>=u?u:P.length:"string"===typeof P.length?parseInt(P.length)*u/100>u?u:parseInt(P.length)*u/100>u:u;P.thickness="number"===typeof P.thickness?0>P.thickness?0:Math.round(P.thickness):2;var O={color:A[k].stemColor?A[k].stemColor:A[k].color?y.stemColor?y.stemColor:A[k].color:y.stemColor?y.stemColor:d,thickness:A[k].stemThickness?A[k].stemThickness:
477
- y.stemThickness,dashType:A[k].stemDashType?A[k].stemDashType:y.stemDashType};O.thickness="number"===typeof O.thickness?0>O.thickness?0:Math.round(O.thickness):2;A[k].getTime?s=A[k].x.getTime():s=A[k].x;if(!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax)&&!l(A[k].y)&&A[k].y.length&&"number"===typeof A[k].y[0]&&"number"===typeof A[k].y[1]){var ca=a.axisX.convertValueToPixel(s);b?m=ca:n=ca;ca=a.axisY.convertValueToPixel(A[k].y[0]);b?r=ca:q=ca;ca=a.axisY.convertValueToPixel(A[k].y[1]);
478
- b?p=ca:f=ca;b?(q=a.axisX.reversed?m+(D?x:1)*u/2-(D?z-1:0)*u<<0:m-(D?x:1)*u/2+(D?z-1:0)*u<<0,f=a.axisX.reversed?q-u<<0:q+u<<0):(r=a.axisX.reversed?n+(D?x:1)*u/2-(D?z-1:0)*u<<0:n-(D?x:1)*u/2+(D?z-1:0)*u<<0,p=a.axisX.reversed?r-u<<0:r+u<<0);!b&&q>f&&(ca=q,q=f,f=ca);b&&r>p&&(ca=r,r=p,p=ca);ca=y.dataPointIds[k];this._eventManager.objectMap[ca]={id:ca,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:Math.min(r,p),y1:Math.min(q,f),x2:Math.max(p,r),y2:Math.max(f,q),isXYSwapped:b,stemProperties:O,
479
- whiskerProperties:P};B(c,Math.min(r,p),Math.min(q,f),Math.max(p,r),Math.max(f,q),d,P,O,b);t&&B(this._eventManager.ghostCtx,r,q,p,f,d,P,O,b);if(A[k].indexLabel||y.indexLabel||A[k].indexLabelFormatter||y.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:A[k],dataSeries:y,indexKeyword:0,point:{x:b?A[k].y[1]>=A[k].y[0]?r:p:r+(p-r)/2,y:b?q+(f-q)/2:A[k].y[1]>=A[k].y[0]?f:q},direction:A[k].y[1]>=A[k].y[0]?-1:1,bounds:{x1:b?Math.min(r,p):r,y1:b?q:Math.min(q,f),x2:b?Math.max(r,p):p,y2:b?
475
+ b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?x:1)))<<0:0.03*this.width);u=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?h.height:h.width)*(a.axisX.logarithmic?Math.log(J)/Math.log(a.axisX.range):Math.abs(J)/Math.abs(a.axisX.range))/(D?x:1))<<0;this.dataPointMaxWidth&&d>k&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<d)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));u<d&&
476
+ (u=d);u>k&&(u=k);y.whiskerLength=l(y.options.whiskerLength)?u:y.options.whiskerLength;if(0<A.length)for(var C=y._colorSet,k=0;k<A.length;k++){var d=y.lineColor=y.options.color?y.options.color:C[0],O={color:A[k].whiskerColor?A[k].whiskerColor:A[k].color?y.whiskerColor?y.whiskerColor:A[k].color:y.whiskerColor?y.whiskerColor:d,thickness:l(A[k].whiskerThickness)?y.whiskerThickness:A[k].whiskerThickness,dashType:A[k].whiskerDashType?A[k].whiskerDashType:y.whiskerDashType,length:l(A[k].whiskerLength)?l(y.options.whiskerLength)?
477
+ u:y.options.whiskerLength:A[k].whiskerLength,trimLength:l(A[k].whiskerLength)?l(y.options.whiskerLength)?50:0:0};O.length="number"===typeof O.length?0>=O.length?0:O.length>=u?u:O.length:"string"===typeof O.length?parseInt(O.length)*u/100>u?u:parseInt(O.length)*u/100>u:u;O.thickness="number"===typeof O.thickness?0>O.thickness?0:Math.round(O.thickness):2;var P={color:A[k].stemColor?A[k].stemColor:A[k].color?y.stemColor?y.stemColor:A[k].color:y.stemColor?y.stemColor:d,thickness:A[k].stemThickness?A[k].stemThickness:
478
+ y.stemThickness,dashType:A[k].stemDashType?A[k].stemDashType:y.stemDashType};P.thickness="number"===typeof P.thickness?0>P.thickness?0:Math.round(P.thickness):2;A[k].getTime?s=A[k].x.getTime():s=A[k].x;if(!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax)&&!l(A[k].y)&&A[k].y.length&&"number"===typeof A[k].y[0]&&"number"===typeof A[k].y[1]){var ca=a.axisX.convertValueToPixel(s);b?m=ca:n=ca;ca=a.axisY.convertValueToPixel(A[k].y[0]);b?r=ca:q=ca;ca=a.axisY.convertValueToPixel(A[k].y[1]);
479
+ b?p=ca:f=ca;b?(q=a.axisX.reversed?m+(D?x:1)*u/2-(D?z-1:0)*u<<0:m-(D?x:1)*u/2+(D?z-1:0)*u<<0,f=a.axisX.reversed?q-u<<0:q+u<<0):(r=a.axisX.reversed?n+(D?x:1)*u/2-(D?z-1:0)*u<<0:n-(D?x:1)*u/2+(D?z-1:0)*u<<0,p=a.axisX.reversed?r-u<<0:r+u<<0);!b&&q>f&&(ca=q,q=f,f=ca);b&&r>p&&(ca=r,r=p,p=ca);ca=y.dataPointIds[k];this._eventManager.objectMap[ca]={id:ca,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:Math.min(r,p),y1:Math.min(q,f),x2:Math.max(p,r),y2:Math.max(f,q),isXYSwapped:b,stemProperties:P,
480
+ whiskerProperties:O};B(c,Math.min(r,p),Math.min(q,f),Math.max(p,r),Math.max(f,q),d,O,P,b);t&&B(this._eventManager.ghostCtx,r,q,p,f,d,O,P,b);if(A[k].indexLabel||y.indexLabel||A[k].indexLabelFormatter||y.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:A[k],dataSeries:y,indexKeyword:0,point:{x:b?A[k].y[1]>=A[k].y[0]?r:p:r+(p-r)/2,y:b?q+(f-q)/2:A[k].y[1]>=A[k].y[0]?f:q},direction:A[k].y[1]>=A[k].y[0]?-1:1,bounds:{x1:b?Math.min(r,p):r,y1:b?q:Math.min(q,f),x2:b?Math.max(r,p):p,y2:b?
480
481
  f:Math.max(q,f)},color:d,axisSwapped:b}),this._indexLabels.push({chartType:"error",dataPoint:A[k],dataSeries:y,indexKeyword:1,point:{x:b?A[k].y[1]>=A[k].y[0]?p:r:r+(p-r)/2,y:b?q+(f-q)/2:A[k].y[1]>=A[k].y[0]?q:f},direction:A[k].y[1]>=A[k].y[0]?1:-1,bounds:{x1:b?Math.min(r,p):r,y1:b?q:Math.min(q,f),x2:b?Math.max(r,p):p,y2:b?f:Math.max(q,f)},color:d,axisSwapped:b})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,
481
482
  0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0}}};s.prototype.renderRangeBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,
482
483
  c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,n,m,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var r=a.axisX.dataInfo.minDiff;isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?
483
484
  this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(r)/Math.log(a.axisX.range):Math.abs(r)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<g)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));r<g&&(r=g);r>h&&(r=h);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);
484
- c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],s=f.dataPoints;if(0<s.length){var I=5<r&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(g=0;g<s.length;g++)if(s[g].getTime?m=s[g].x.getTime():m=s[g].x,!(m<a.axisX.dataInfo.viewPortMin||m>a.axisX.dataInfo.viewPortMax)&&!l(s[g].y)&&s[g].y.length&&"number"===typeof s[g].y[0]&&
485
- "number"===typeof s[g].y[1]){h=a.axisY.convertValueToPixel(s[g].y[0]);k=a.axisY.convertValueToPixel(s[g].y[1]);n=a.axisX.convertValueToPixel(m);n=a.axisX.reversed?n+a.plotType.totalDataSeries*r/2-(a.previousDataSeriesCount+p)*r<<0:n-a.plotType.totalDataSeries*r/2+(a.previousDataSeriesCount+p)*r<<0;var x=a.axisX.reversed?n-r<<0:n+r<<0;h>k&&(b=h,h=k,k=b);b=s[g].color?s[g].color:f._colorSet[g%f._colorSet.length];ba(c,h,a.axisX.reversed?x:n,k,a.axisX.reversed?n:x,b,0,null,I,!1,!1,!1,f.fillOpacity);b=
486
- f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:g,x1:h,y1:n,x2:k,y2:x};b=R(b);t&&ba(this._eventManager.ghostCtx,h,a.axisX.reversed?x:n,k,a.axisX.reversed?n:x,b,0,null,!1,!1,!1,!1);if(s[g].indexLabel||f.indexLabel||s[g].indexLabelFormatter||f.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:s[g],dataSeries:f,indexKeyword:0,point:{x:s[g].y[1]>=s[g].y[0]?h:k,y:n+(x-n)/2},direction:s[g].y[1]>=s[g].y[0]?-1:1,bounds:{x1:Math.min(h,
485
+ c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],s=f.dataPoints;if(0<s.length){var J=5<r&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(g=0;g<s.length;g++)if(s[g].getTime?m=s[g].x.getTime():m=s[g].x,!(m<a.axisX.dataInfo.viewPortMin||m>a.axisX.dataInfo.viewPortMax)&&!l(s[g].y)&&s[g].y.length&&"number"===typeof s[g].y[0]&&
486
+ "number"===typeof s[g].y[1]){h=a.axisY.convertValueToPixel(s[g].y[0]);k=a.axisY.convertValueToPixel(s[g].y[1]);n=a.axisX.convertValueToPixel(m);n=a.axisX.reversed?n+a.plotType.totalDataSeries*r/2-(a.previousDataSeriesCount+p)*r<<0:n-a.plotType.totalDataSeries*r/2+(a.previousDataSeriesCount+p)*r<<0;var x=a.axisX.reversed?n-r<<0:n+r<<0;h>k&&(b=h,h=k,k=b);b=s[g].color?s[g].color:f._colorSet[g%f._colorSet.length];aa(c,h,a.axisX.reversed?x:n,k,a.axisX.reversed?n:x,b,0,null,J,!1,!1,!1,f.fillOpacity);b=
487
+ f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:g,x1:h,y1:n,x2:k,y2:x};b=R(b);t&&aa(this._eventManager.ghostCtx,h,a.axisX.reversed?x:n,k,a.axisX.reversed?n:x,b,0,null,!1,!1,!1,!1);if(s[g].indexLabel||f.indexLabel||s[g].indexLabelFormatter||f.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:s[g],dataSeries:f,indexKeyword:0,point:{x:s[g].y[1]>=s[g].y[0]?h:k,y:n+(x-n)/2},direction:s[g].y[1]>=s[g].y[0]?-1:1,bounds:{x1:Math.min(h,
487
488
  k),y1:n,x2:Math.max(h,k),y2:x},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:s[g],dataSeries:f,indexKeyword:1,point:{x:s[g].y[1]>=s[g].y[0]?k:h,y:n+(x-n)/2},direction:s[g].y[1]>=s[g].y[0]?1:-1,bounds:{x1:Math.min(h,k),y1:n,x2:Math.max(h,k),y2:x},color:b})}}}t&&(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,
488
489
  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:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0}}};s.prototype.renderRangeArea=function(a){function e(){if(w){for(var a=null,c=l.length-1;0<=c;c--)a=l[c],b.lineTo(a.x,a.y2),d.lineTo(a.x,a.y2);b.closePath();
489
490
  b.globalAlpha=r.fillOpacity;b.fill();b.globalAlpha=1;d.fill();if(0<r.lineThickness){b.beginPath();b.moveTo(a.x,a.y2);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y2);b.moveTo(l[0].x,l[0].y1);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(n,s);d.beginPath();d.moveTo(n,s);w={x:n,y:s};l=[];l.push({x:n,y1:s,y2:x})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,g=[],h=this.plotArea;
490
491
  b.save();t&&d.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(d.beginPath(),d.rect(h.x1,h.y1,h.width,h.height),d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=[],m=a.dataSeriesIndexes[k],r=this.data[m],p=r.dataPoints,g=r.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:m};g=R(g);d.fillStyle=g;var g=[],q=!0,f=0,n,s,x,u,w=null;if(0<p.length){var v=r._colorSet[f%r._colorSet.length],y=r.lineColor=r.options.lineColor||v,A=y;b.fillStyle=v;b.strokeStyle=
491
- y;b.lineWidth=r.lineThickness;var D="solid";if(b.setLineDash){var z=J(r.nullDataLineDashType,r.lineThickness),D=r.lineDashType,B=J(D,r.lineThickness);b.setLineDash(B)}for(var P=!0;f<p.length;f++)if(u=p[f].x.getTime?p[f].x.getTime():p[f].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!P)))if(null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){n=a.axisX.convertValueToPixel(u);s=a.axisY.convertValueToPixel(p[f].y[0]);x=a.axisY.convertValueToPixel(p[f].y[1]);
492
- q||P?(r.connectNullData&&!q?(b.setLineDash&&(r.options.nullDataLineDashType||D===r.lineDashType&&r.lineDashType!==r.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=B,D=r.nullDataLineDashType,b.setLineDash(z)),b.lineTo(n,s),t&&d.lineTo(n,s),l.push({x:n,y1:s,y2:x})):(b.beginPath(),b.moveTo(n,s),w={x:n,y:s},l=[],l.push({x:n,y1:s,y2:x}),t&&(d.beginPath(),d.moveTo(n,s))),P=q=!1):(b.lineTo(n,s),l.push({x:n,y1:s,y2:x}),t&&d.lineTo(n,s),0==f%250&&e());u=r.dataPointIds[f];this._eventManager.objectMap[u]=
493
- {id:u,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,x1:n,y1:s,y2:x};f<p.length-1&&(A!==(p[f].lineColor||y)||D!==(p[f].lineDashType||r.lineDashType))&&(e(),A=p[f].lineColor||y,l[l.length-1].newStrokeStyle=A,b.strokeStyle=A,b.setLineDash&&(p[f].lineDashType?(D=p[f].lineDashType,l[l.length-1].newLineDashArray=J(D,r.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):(D=r.lineDashType,l[l.length-1].newLineDashArray=B,b.setLineDash(B))));if(0!==p[f].markerSize&&(0<p[f].markerSize||
494
- 0<r.markerSize)){var O=r.getMarkerProperties(f,n,x,b);g.push(O);var C=R(u);t&&g.push({x:n,y:x,ctx:d,type:O.type,size:O.size,color:C,borderColor:C,borderThickness:O.borderThickness});O=r.getMarkerProperties(f,n,s,b);g.push(O);C=R(u);t&&g.push({x:n,y:s,ctx:d,type:O.type,size:O.size,color:C,borderColor:C,borderThickness:O.borderThickness})}if(p[f].indexLabel||r.indexLabel||p[f].indexLabelFormatter||r.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:r,indexKeyword:0,
495
- point:{x:n,y:s},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?-1:1,color:v}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:r,indexKeyword:1,point:{x:n,y:x},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?1:-1,color:v})}else P||q||e(),P=!0;e();W.drawMarkers(g)}}t&&(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,
492
+ y;b.lineWidth=r.lineThickness;var D="solid";if(b.setLineDash){var z=K(r.nullDataLineDashType,r.lineThickness),D=r.lineDashType,B=K(D,r.lineThickness);b.setLineDash(B)}for(var O=!0;f<p.length;f++)if(u=p[f].x.getTime?p[f].x.getTime():p[f].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!O)))if(null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){n=a.axisX.convertValueToPixel(u);s=a.axisY.convertValueToPixel(p[f].y[0]);x=a.axisY.convertValueToPixel(p[f].y[1]);
493
+ q||O?(r.connectNullData&&!q?(b.setLineDash&&(r.options.nullDataLineDashType||D===r.lineDashType&&r.lineDashType!==r.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=B,D=r.nullDataLineDashType,b.setLineDash(z)),b.lineTo(n,s),t&&d.lineTo(n,s),l.push({x:n,y1:s,y2:x})):(b.beginPath(),b.moveTo(n,s),w={x:n,y:s},l=[],l.push({x:n,y1:s,y2:x}),t&&(d.beginPath(),d.moveTo(n,s))),O=q=!1):(b.lineTo(n,s),l.push({x:n,y1:s,y2:x}),t&&d.lineTo(n,s),0==f%250&&e());u=r.dataPointIds[f];this._eventManager.objectMap[u]=
494
+ {id:u,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,x1:n,y1:s,y2:x};f<p.length-1&&(A!==(p[f].lineColor||y)||D!==(p[f].lineDashType||r.lineDashType))&&(e(),A=p[f].lineColor||y,l[l.length-1].newStrokeStyle=A,b.strokeStyle=A,b.setLineDash&&(p[f].lineDashType?(D=p[f].lineDashType,l[l.length-1].newLineDashArray=K(D,r.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):(D=r.lineDashType,l[l.length-1].newLineDashArray=B,b.setLineDash(B))));if(0!==p[f].markerSize&&(0<p[f].markerSize||
495
+ 0<r.markerSize)){var P=r.getMarkerProperties(f,n,x,b);g.push(P);var C=R(u);t&&g.push({x:n,y:x,ctx:d,type:P.type,size:P.size,color:C,borderColor:C,borderThickness:P.borderThickness});P=r.getMarkerProperties(f,n,s,b);g.push(P);C=R(u);t&&g.push({x:n,y:s,ctx:d,type:P.type,size:P.size,color:C,borderColor:C,borderThickness:P.borderThickness})}if(p[f].indexLabel||r.indexLabel||p[f].indexLabelFormatter||r.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:r,indexKeyword:0,
496
+ point:{x:n,y:s},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?-1:1,color:v}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:r,indexKeyword:1,point:{x:n,y:x},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?1:-1,color:v})}else O||q||e(),O=!0;e();Y.drawMarkers(g)}}t&&(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,
496
497
  0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderRangeSplineArea=function(a){function e(a,c){var f=y(s,2);if(0<f.length){if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);
497
498
  b.beginPath();b.moveTo(f[0].x,f[0].y);for(var e=0;e<f.length-3;e+=3){if(f[e].newStrokeStyle||f[e].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[e].x,f[e].y),f[e].newStrokeStyle&&(b.strokeStyle=f[e].newStrokeStyle),f[e].newLineDashArray&&b.setLineDash(f[e].newLineDashArray);b.bezierCurveTo(f[e+1].x,f[e+1].y,f[e+2].x,f[e+2].y,f[e+3].x,f[e+3].y)}}b.beginPath();b.moveTo(f[0].x,f[0].y);t&&(d.beginPath(),d.moveTo(f[0].x,f[0].y));for(e=0;e<f.length-3;e+=3)b.bezierCurveTo(f[e+1].x,f[e+1].y,f[e+2].x,
498
499
  f[e+2].y,f[e+3].x,f[e+3].y),t&&d.bezierCurveTo(f[e+1].x,f[e+1].y,f[e+2].x,f[e+2].y,f[e+3].x,f[e+3].y);f=y(x,2);b.lineTo(x[x.length-1].x,x[x.length-1].y);for(e=f.length-1;2<e;e-=3)b.bezierCurveTo(f[e-1].x,f[e-1].y,f[e-2].x,f[e-2].y,f[e-3].x,f[e-3].y),t&&d.bezierCurveTo(f[e-1].x,f[e-1].y,f[e-2].x,f[e-2].y,f[e-3].x,f[e-3].y);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();t&&(d.closePath(),d.fill());b.globalAlpha=1;if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();
499
500
  b.moveTo(f[0].x,f[0].y);for(var g=e=0;e<f.length-3;e+=3,g++){if(s[g].newStrokeStyle||s[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[e].x,f[e].y),s[g].newStrokeStyle&&(b.strokeStyle=s[g].newStrokeStyle),s[g].newLineDashArray&&b.setLineDash(s[g].newLineDashArray);b.bezierCurveTo(f[e+1].x,f[e+1].y,f[e+2].x,f[e+2].y,f[e+3].x,f[e+3].y)}f=y(s,2);b.moveTo(f[0].x,f[0].y);for(g=e=0;e<f.length-3;e+=3,g++){if(s[g].newStrokeStyle||s[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[e].x,f[e].y),
500
501
  s[g].newStrokeStyle&&(b.strokeStyle=s[g].newStrokeStyle),s[g].newLineDashArray&&b.setLineDash(s[g].newLineDashArray);b.bezierCurveTo(f[e+1].x,f[e+1].y,f[e+2].x,f[e+2].y,f[e+3].x,f[e+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,g=[],h=this.plotArea;b.save();t&&d.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(d.beginPath(),d.rect(h.x1,h.y1,h.width,h.height),
501
- d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],r=m.dataPoints,g=m.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=R(g);d.fillStyle=g;var g=[],p=0,q,f,n,s=[],x=[];if(0<r.length){var u=m._colorSet[p%m._colorSet.length],w=m.lineColor=m.options.lineColor||u,v=w;b.fillStyle=u;b.lineWidth=m.lineThickness;var z="solid",A;if(b.setLineDash){var D=J(m.nullDataLineDashType,m.lineThickness),z=m.lineDashType;A=J(z,m.lineThickness)}for(f=
502
+ d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],r=m.dataPoints,g=m.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=R(g);d.fillStyle=g;var g=[],p=0,q,f,n,s=[],x=[];if(0<r.length){var u=m._colorSet[p%m._colorSet.length],w=m.lineColor=m.options.lineColor||u,v=w;b.fillStyle=u;b.lineWidth=m.lineThickness;var z="solid",A;if(b.setLineDash){var D=K(m.nullDataLineDashType,m.lineThickness),z=m.lineDashType;A=K(z,m.lineThickness)}for(f=
502
503
  !1;p<r.length;p++)if(q=r[p].x.getTime?r[p].x.getTime():r[p].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!f)))if(null!==r[p].y&&r[p].y.length&&"number"===typeof r[p].y[0]&&"number"===typeof r[p].y[1]){q=a.axisX.convertValueToPixel(q);f=a.axisY.convertValueToPixel(r[p].y[0]);n=a.axisY.convertValueToPixel(r[p].y[1]);var B=m.dataPointIds[p];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:p,x1:q,y1:f,y2:n};s[s.length]=
503
- {x:q,y:f};x[x.length]={x:q,y:n};p<r.length-1&&(v!==(r[p].lineColor||w)||z!==(r[p].lineDashType||m.lineDashType))&&(v=r[p].lineColor||w,s[s.length-1].newStrokeStyle=v,b.setLineDash&&(r[p].lineDashType?(z=r[p].lineDashType,s[s.length-1].newLineDashArray=J(z,m.lineThickness)):(z=m.lineDashType,s[s.length-1].newLineDashArray=A)));if(0!==r[p].markerSize&&(0<r[p].markerSize||0<m.markerSize)){var C=m.getMarkerProperties(p,q,f,b);g.push(C);var P=R(B);t&&g.push({x:q,y:f,ctx:d,type:C.type,size:C.size,color:P,
504
- borderColor:P,borderThickness:C.borderThickness});C=m.getMarkerProperties(p,q,n,b);g.push(C);P=R(B);t&&g.push({x:q,y:n,ctx:d,type:C.type,size:C.size,color:P,borderColor:P,borderThickness:C.borderThickness})}if(r[p].indexLabel||m.indexLabel||r[p].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:r[p],dataSeries:m,indexKeyword:0,point:{x:q,y:f},direction:r[p].y[0]<=r[p].y[1]?-1:1,color:u}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:r[p],
505
- dataSeries:m,indexKeyword:1,point:{x:q,y:n},direction:r[p].y[0]<=r[p].y[1]?1:-1,color:u});f=!1}else 0<p&&!f&&(m.connectNullData?b.setLineDash&&(0<s.length&&(m.options.nullDataLineDashType||!r[p-1].lineDashType))&&(s[s.length-1].newLineDashArray=D,z=m.nullDataLineDashType):(e(A,w),s=[],x=[])),f=!0;e(A,w);W.drawMarkers(g)}}t&&(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),
504
+ {x:q,y:f};x[x.length]={x:q,y:n};p<r.length-1&&(v!==(r[p].lineColor||w)||z!==(r[p].lineDashType||m.lineDashType))&&(v=r[p].lineColor||w,s[s.length-1].newStrokeStyle=v,b.setLineDash&&(r[p].lineDashType?(z=r[p].lineDashType,s[s.length-1].newLineDashArray=K(z,m.lineThickness)):(z=m.lineDashType,s[s.length-1].newLineDashArray=A)));if(0!==r[p].markerSize&&(0<r[p].markerSize||0<m.markerSize)){var C=m.getMarkerProperties(p,q,f,b);g.push(C);var O=R(B);t&&g.push({x:q,y:f,ctx:d,type:C.type,size:C.size,color:O,
505
+ borderColor:O,borderThickness:C.borderThickness});C=m.getMarkerProperties(p,q,n,b);g.push(C);O=R(B);t&&g.push({x:q,y:n,ctx:d,type:C.type,size:C.size,color:O,borderColor:O,borderThickness:C.borderThickness})}if(r[p].indexLabel||m.indexLabel||r[p].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:r[p],dataSeries:m,indexKeyword:0,point:{x:q,y:f},direction:r[p].y[0]<=r[p].y[1]?-1:1,color:u}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:r[p],
506
+ dataSeries:m,indexKeyword:1,point:{x:q,y:n},direction:r[p].y[0]<=r[p].y[1]?1:-1,color:u});f=!1}else 0<p&&!f&&(m.connectNullData?b.setLineDash&&(0<s.length&&(m.options.nullDataLineDashType||!r[p-1].lineDashType))&&(s[s.length-1].newLineDashArray=D,z=m.nullDataLineDashType):(e(A,w),s=[],x=[])),f=!0;e(A,w);Y.drawMarkers(g)}}t&&(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),
506
507
  a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:M.xClipAnimation,easingFunction:M.easing.linear,animationBase:0}}};s.prototype.renderWaterfall=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:
507
508
  e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=null,g=this.plotArea,h=0,k,l,m,r,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;
508
509
  isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?this.dataPointWidth:0.6*(g.width*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>l&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<h)&&(l=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));q<h&&(q=h);q>l&&(q=l);c.save();t&&this._eventManager.ghostCtx.save();
509
510
  c.beginPath();c.rect(g.x1,g.y1,g.width,g.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var n=a.dataSeriesIndexes[f],s=this.data[n],x=s.dataPoints,d=s._colorSet[0];s.risingColor=s.options.risingColor?s.options.risingColor:d;s.fallingColor=s.options.fallingColor?s.options.fallingColor:"#e40a0a";var u="number"===typeof s.options.lineThickness?Math.round(s.lineThickness):
510
- 1,w=1===Math.round(u)%2?-0.5:0;if(0<x.length)for(var v=5<q&&s.bevelEnabled?!0:!1,y=!1,A=null,D=null,h=0;h<x.length;h++)if(x[h].getTime?r=x[h].x.getTime():r=x[h].x,"number"!==typeof x[h].y){if(0<h&&!y&&s.connectNullData)var z=s.options.nullDataLineDashType||!x[h-1].lineDashType?s.nullDataLineDashType:x[h-1].lineDashType;y=!0}else{k=a.axisX.convertValueToPixel(r);l=0===s.dataPointEOs[h].cumulativeSum?p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSum);m=0===s.dataPointEOs[h].cumulativeSumYStartValue?
511
- p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSumYStartValue);k=a.axisX.reversed?k+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+f)*q<<0:k-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+f)*q<<0;var B=a.axisX.reversed?k-q<<0:k+q<<0;l>m&&(d=l,l=m,m=d);a.axisY.reversed&&(d=l,l=m,m=d);d=s.dataPointIds[h];this._eventManager.objectMap[d]={id:d,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:h,x1:k,y1:l,x2:B,y2:m};var P=x[h].color?x[h].color:0<x[h].y?s.risingColor:
512
- s.fallingColor;ba(c,a.axisX.reversed?B:k,a.axisY.reversed?m:l,a.axisX.reversed?k:B,a.axisY.reversed?l:m,P,0,P,v,v,!1,!1,s.fillOpacity);d=R(d);t&&ba(this._eventManager.ghostCtx,a.axisX.reversed?B:k,l,a.axisX.reversed?k:B,m,d,0,null,!1,!1,!1,!1);var C,P=k;C="undefined"!==typeof x[h].isIntermediateSum&&!0===x[h].isIntermediateSum||"undefined"!==typeof x[h].isCumulativeSum&&!0===x[h].isCumulativeSum?0<x[h].y?l:m:0<x[h].y?m:l;0<h&&A&&(!y||s.connectNullData)&&(y&&c.setLineDash&&c.setLineDash(J(z,u)),c.beginPath(),
513
- c.moveTo(A,D-w),c.lineTo(P,C-w),0<u&&c.stroke(),t&&(b.beginPath(),b.moveTo(A,D-w),b.lineTo(P,C-w),0<u&&b.stroke()));y=!1;A=B;D=0<x[h].y?l:m;P=x[h].lineDashType?x[h].lineDashType:s.options.lineDashType?s.options.lineDashType:"shortDash";c.strokeStyle=x[h].lineColor?x[h].lineColor:s.options.lineColor?s.options.lineColor:"#9e9e9e";c.lineWidth=u;c.setLineDash&&(P=J(P,u),c.setLineDash(P));(x[h].indexLabel||s.indexLabel||x[h].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",
514
- dataPoint:x[h],dataSeries:s,point:{x:k+(B-k)/2,y:0<=x[h].y?l:m},direction:0>x[h].y===a.axisY.reversed?1:-1,bounds:{x1:k,y1:Math.min(l,m),x2:B,y2:Math.max(l,m)},color:d})}}t&&(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,
511
+ 1,w=1===Math.round(u)%2?-0.5:0;if(0<x.length)for(var v=5<q&&s.bevelEnabled?!0:!1,y=!1,A=null,z=null,h=0;h<x.length;h++)if(x[h].getTime?r=x[h].x.getTime():r=x[h].x,"number"!==typeof x[h].y){if(0<h&&!y&&s.connectNullData)var B=s.options.nullDataLineDashType||!x[h-1].lineDashType?s.nullDataLineDashType:x[h-1].lineDashType;y=!0}else{k=a.axisX.convertValueToPixel(r);l=0===s.dataPointEOs[h].cumulativeSum?p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSum);m=0===s.dataPointEOs[h].cumulativeSumYStartValue?
512
+ p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSumYStartValue);k=a.axisX.reversed?k+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+f)*q<<0:k-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+f)*q<<0;var C=a.axisX.reversed?k-q<<0:k+q<<0;l>m&&(d=l,l=m,m=d);a.axisY.reversed&&(d=l,l=m,m=d);d=s.dataPointIds[h];this._eventManager.objectMap[d]={id:d,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:h,x1:k,y1:l,x2:C,y2:m};var O=x[h].color?x[h].color:0<x[h].y?s.risingColor:
513
+ s.fallingColor;aa(c,a.axisX.reversed?C:k,a.axisY.reversed?m:l,a.axisX.reversed?k:C,a.axisY.reversed?l:m,O,0,O,v,v,!1,!1,s.fillOpacity);d=R(d);t&&aa(this._eventManager.ghostCtx,a.axisX.reversed?C:k,l,a.axisX.reversed?k:C,m,d,0,null,!1,!1,!1,!1);var P,O=k;P="undefined"!==typeof x[h].isIntermediateSum&&!0===x[h].isIntermediateSum||"undefined"!==typeof x[h].isCumulativeSum&&!0===x[h].isCumulativeSum?0<x[h].y?l:m:0<x[h].y?m:l;0<h&&A&&(!y||s.connectNullData)&&(y&&c.setLineDash&&c.setLineDash(K(B,u)),c.beginPath(),
514
+ c.moveTo(A,z-w),c.lineTo(O,P-w),0<u&&c.stroke(),t&&(b.beginPath(),b.moveTo(A,z-w),b.lineTo(O,P-w),0<u&&b.stroke()));y=!1;A=C;z=0<x[h].y?l:m;O=x[h].lineDashType?x[h].lineDashType:s.options.lineDashType?s.options.lineDashType:"shortDash";c.strokeStyle=x[h].lineColor?x[h].lineColor:s.options.lineColor?s.options.lineColor:"#9e9e9e";c.lineWidth=u;c.setLineDash&&(O=K(O,u),c.setLineDash(O));(x[h].indexLabel||s.indexLabel||x[h].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",
515
+ dataPoint:x[h],dataSeries:s,point:{x:k+(C-k)/2,y:0<=x[h].y?l:m},direction:0>x[h].y===a.axisY.reversed?1:-1,bounds:{x1:k,y1:Math.min(l,m),x2:C,y2:Math.max(l,m)},color:d})}}t&&(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,
515
516
  0,0,this.width,this.height),c.clearRect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:M.fadeInAnimation,easingFunction:M.easing.easeInQuad,animationBase:0}}};var sa=function(a,e,c,b,d,g,h,k,l){if(!(0>c)){"undefined"===typeof k&&(k=1);if(!t){var m=Number((h%(2*Math.PI)).toFixed(8));Number((g%(2*Math.PI)).toFixed(8))===m&&(h-=1E-4)}a.save();a.globalAlpha=k;"pie"===d?(a.beginPath(),a.moveTo(e.x,e.y),a.arc(e.x,e.y,
516
517
  c,g,h,!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,g,h,!1),0<=l&&a.arc(e.x,e.y,l*c,h,g,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};s.prototype.renderPie=function(a){function e(){if(m&&r){var a=0,b=0,c=0,d=0;l(m.options.indexLabelMaxWidth)&&(m.indexLabelMaxWidth=0.33*q.width);for(var e=0;e<r.length;e++){var g=r[e],h=m.dataPointIds[e];f[e].id=h;f[e].objectType=
517
- "dataPoint";f[e].dataPointIndex=e;f[e].dataSeriesIndex=0;var k=f[e],p={percent:null,total:null},s=null,p=n.getPercentAndTotal(m,g);if(m.indexLabelFormatter||g.indexLabelFormatter)s={chart:n,dataSeries:m,dataPoint:g,total:p.total,percent:p.percent};p=g.indexLabelFormatter?g.indexLabelFormatter(s):g.indexLabel?n.replaceKeywordsWithValue(g.indexLabel,g,m,e):m.indexLabelFormatter?m.indexLabelFormatter(s):m.indexLabel?n.replaceKeywordsWithValue(m.indexLabel,g,m,e):g.label?g.label:"";n._eventManager.objectMap[h]=
518
- k;k.center={x:v.x,y:v.y};k.y=g.y;k.radius=z;k.percentInnerRadius=C;k.indexLabelText=p;k.indexLabelPlacement=m.indexLabelPlacement;k.indexLabelLineColor=g.indexLabelLineColor?g.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:g.color?g.color:m._colorSet[e%m._colorSet.length];k.indexLabelLineThickness=l(g.indexLabelLineThickness)?m.indexLabelLineThickness:g.indexLabelLineThickness;k.indexLabelLineDashType=g.indexLabelLineDashType?g.indexLabelLineDashType:m.indexLabelLineDashType;
518
+ "dataPoint";f[e].dataPointIndex=e;f[e].dataSeriesIndex=0;var k=f[e],p={percent:null,total:null},s=null,p=n.getPercentAndTotal(m,g);if(m.indexLabelFormatter||g.indexLabelFormatter)s={chart:n,dataSeries:m,dataPoint:g,total:p.total,percent:p.percent};p=(p=g.indexLabelFormatter?g.indexLabelFormatter(s):g.indexLabel?n.replaceKeywordsWithValue(g.indexLabel,g,m,e):m.indexLabelFormatter?m.indexLabelFormatter(s):m.indexLabel?n.replaceKeywordsWithValue(m.indexLabel,g,m,e):g.label)||"";n._eventManager.objectMap[h]=
519
+ k;k.center={x:v.x,y:v.y};k.y=g.y;k.radius=z;k.percentInnerRadius=B;k.indexLabelText=p;k.indexLabelPlacement=m.indexLabelPlacement;k.indexLabelLineColor=g.indexLabelLineColor?g.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:g.color?g.color:m._colorSet[e%m._colorSet.length];k.indexLabelLineThickness=l(g.indexLabelLineThickness)?m.indexLabelLineThickness:g.indexLabelLineThickness;k.indexLabelLineDashType=g.indexLabelLineDashType?g.indexLabelLineDashType:m.indexLabelLineDashType;
519
520
  k.indexLabelFontColor=g.indexLabelFontColor?g.indexLabelFontColor:m.indexLabelFontColor;k.indexLabelFontStyle=g.indexLabelFontStyle?g.indexLabelFontStyle:m.indexLabelFontStyle;k.indexLabelFontWeight=g.indexLabelFontWeight?g.indexLabelFontWeight:m.indexLabelFontWeight;k.indexLabelFontSize=l(g.indexLabelFontSize)?m.indexLabelFontSize:g.indexLabelFontSize;k.indexLabelFontFamily=g.indexLabelFontFamily?g.indexLabelFontFamily:m.indexLabelFontFamily;k.indexLabelBackgroundColor=g.indexLabelBackgroundColor?
520
521
  g.indexLabelBackgroundColor:m.options.indexLabelBackgroundColor?m.options.indexLabelBackgroundColor:m.indexLabelBackgroundColor;k.indexLabelBorderColor=g.indexLabelBorderColor?g.indexLabelBorderColor:m.options.indexLabelBorderColor?m.options.indexLabelBorderColor:m.indexLabelBorderColor;k.indexLabelBorderThickness=g.indexLabelBorderThickness?g.indexLabelBorderThickness:m.options.indexLabelBorderThickness?m.options.indexLabelBorderThickness:m.indexLabelBorderThickness;k.indexLabelPadding=g.indexLabelPadding?
521
522
  g.indexLabelPadding:m.options.indexLabelPadding?m.options.indexLabelPadding:m.indexLabelPadding;k.indexLabelMaxWidth=g.indexLabelMaxWidth?g.indexLabelMaxWidth:m.indexLabelMaxWidth;k.indexLabelWrap="undefined"!==typeof g.indexLabelWrap?g.indexLabelWrap:m.indexLabelWrap;k.indexLabelTextAlign=g.indexLabelTextAlign?g.indexLabelTextAlign:m.indexLabelTextAlign?m.indexLabelTextAlign:"left";k.startAngle=0===e?m.startAngle?m.startAngle/180*Math.PI:0:f[e-1].endAngle;k.startAngle=(k.startAngle+2*Math.PI)%(2*
@@ -524,7 +525,7 @@ fontStyle:k.indexLabelFontStyle,fontWeight:k.indexLabelFontWeight,textAlign:k.in
524
525
  Math.PI/2-u&&k.midAngle<Math.PI/2+u)&&(g<=a/2&&!p?(k.hemisphere="right",g++):(k.hemisphere="left",p=!0));p=!1;for(e=0;e<r.length;e++)k=f[(d+e)%r.length],1<b&&(k.midAngle>3*Math.PI/2-u&&k.midAngle<3*Math.PI/2+u)&&(h<=b/2&&!p?(k.hemisphere="left",h++):(k.hemisphere="right",p=!0))}}function c(a,b){var c=n.plotArea.ctx;c.clearRect(q.x1,q.y1,q.width,q.height);c.fillStyle=n.backgroundColor;c.fillRect(q.x1,q.y1,q.width,q.height);for(c=0;c<r.length;c++){var d=f[c].startAngle,e=f[c].endAngle;if(e>d){var g=
525
526
  0.07*z*Math.cos(f[c].midAngle),h=0.07*z*Math.sin(f[c].midAngle),k=!1;if(r[c].exploded){if(1E-9<Math.abs(f[c].center.x-(v.x+g))||1E-9<Math.abs(f[c].center.y-(v.y+h)))f[c].center.x=v.x+g*a,f[c].center.y=v.y+h*a,k=!0}else if(0<Math.abs(f[c].center.x-v.x)||0<Math.abs(f[c].center.y-v.y))f[c].center.x=v.x+g*(1-a),f[c].center.y=v.y+h*(1-a),k=!0;k&&b&&(g={},g.dataSeries=m,g.dataPoint=m.dataPoints[c],g.index=c,n.toolTip.highlightObjects([g]));sa(n.plotArea.ctx,f[c].center,f[c].radius,r[c].color?r[c].color:
526
527
  m._colorSet[c%m._colorSet.length],m.type,d,e,m.fillOpacity,f[c].percentInnerRadius)}}c=n.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(d=d=0;d<r.length;d++)e=f[d],e.indexLabelText&&(e.indexLabelTextBlock.y-=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,g=0,g="left"===e.hemisphere?"inside"!==m.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==m.indexLabelPlacement?p:-e.indexLabelTextBlock.width/
527
- 2,e.indexLabelTextBlock.x+=g,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=g,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(g=e.center.x+z*Math.cos(e.midAngle),h=e.center.y+z*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(J(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(g,h),
528
+ 2,e.indexLabelTextBlock.x+=g,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=g,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(g=e.center.x+z*Math.cos(e.midAngle),h=e.center.y+z*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(K(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(g,h),
528
529
  c.lineTo(e.indexLabelTextBlock.x,e.indexLabelTextBlock.y),c.lineTo(e.indexLabelTextBlock.x+("left"===e.hemisphere?-p:p),e.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,f=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-
529
530
  f}function d(a){for(var c=null,d=1;d<r.length;d++)if(c=(a+d+f.length)%f.length,f[c].hemisphere!==f[a].hemisphere){c=null;break}else if(f[c].indexLabelText&&c!==a&&(0>b(f[c],f[a])||("right"===f[a].hemisphere?f[c].indexLabelTextBlock.y>=f[a].indexLabelTextBlock.y:f[c].indexLabelTextBlock.y<=f[a].indexLabelTextBlock.y)))break;else c=null;return c}function g(a,c,e){e=(e||0)+1;if(1E3<e)return 0;c=c||0;var h=0,k=v.y-1*t,m=v.y+1*t;if(0<=a&&a<r.length){var l=f[a];if(0>c&&l.indexLabelTextBlock.y<k||0<c&&l.indexLabelTextBlock.y>
530
531
  m)return 0;var p=0,q=0,q=p=p=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>m&&(c=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c-m);c=l.indexLabelTextBlock.y+c;k=0;k="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(t,2)-Math.pow(c-v.y,
@@ -532,60 +533,60 @@ m)return 0;var p=0,q=0,q=p=p=0;0>c?l.indexLabelTextBlock.y-l.indexLabelTextBlock
532
533
  f[k].indexLabelTextBlock.y>=f[a].indexLabelTextBlock.y)))break;else k=null;q=k;p=d(a);m=k=0;0>c?(m="right"===l.hemisphere?q:p,h=c,null!==m&&(q=-c,c=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2-(f[m].indexLabelTextBlock.y+f[m].indexLabelTextBlock.height/2),c-q<s&&(k=-q,m=g(m,k,e+1),+m.toFixed(w)>+k.toFixed(w)&&(h=c>s?-(c-s):-(q-(m-k)))))):0<c&&(m="right"===l.hemisphere?p:q,h=c,null!==m&&(q=c,c=f[m].indexLabelTextBlock.y-f[m].indexLabelTextBlock.height/2-(l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/
533
534
  2),c-q<s&&(k=q,m=g(m,k,e+1),+m.toFixed(w)<+k.toFixed(w)&&(h=c>s?c-s:q-(k-m)))));h&&(e=l.indexLabelTextBlock.y+h,c=0,c="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(t,2)-Math.pow(e-v.y,2)):v.x-Math.sqrt(Math.pow(t,2)-Math.pow(e-v.y,2)),l.midAngle>Math.PI/2-u&&l.midAngle<Math.PI/2+u?(k=(a-1+f.length)%f.length,k=f[k],a=f[(a+1+f.length)%f.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)&&
534
535
  (c=a.indexLabelTextBlock.x+15)):l.midAngle>3*Math.PI/2-u&&l.midAngle<3*Math.PI/2+u&&(k=(a-1+f.length)%f.length,k=f[k],a=f[(a+1+f.length)%f.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 h}
535
- function h(){var a=n.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,e=0,k=!0,c=0;10>c&&(1>c||0<e);c++){if(m.radius||!m.radius&&"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&z-e<=B)k=!1;k&&(z-=e);e=0;if("inside"!==m.indexLabelPlacement){t=z*x;for(a=0;a<r.length;a++){var h=f[a];h.indexLabelTextBlock.x=v.x+t*Math.cos(h.midAngle);h.indexLabelTextBlock.y=v.y+t*Math.sin(h.midAngle);h.indexLabelAngle=h.midAngle;h.radius=z;h.percentInnerRadius=
536
- C}for(var l,u,a=0;a<r.length;a++){var h=f[a],y=d(a);if(null!==y){l=f[a];u=f[y];var A=0,A=b(l,u)-s;if(0>A){for(var E=u=0,J=0;J<r.length;J++)J!==a&&f[J].hemisphere===h.hemisphere&&(f[J].indexLabelTextBlock.y<h.indexLabelTextBlock.y?u++:E++);u=A/(u+E||1)*E;var E=-1*(A-u),M=J=0;"right"===h.hemisphere?(J=g(a,u),E=-1*(A-J),M=g(y,E),+M.toFixed(w)<+E.toFixed(w)&&+J.toFixed(w)<=+u.toFixed(w)&&g(a,-(E-M))):(J=g(y,u),E=-1*(A-J),M=g(a,E),+M.toFixed(w)<+E.toFixed(w)&&+J.toFixed(w)<=+u.toFixed(w)&&g(y,-(E-M)))}}}}else for(a=
536
+ function h(){var a=n.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,e=0,k=!0,c=0;10>c&&(1>c||0<e);c++){if(m.radius||!m.radius&&"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&z-e<=C)k=!1;k&&(z-=e);e=0;if("inside"!==m.indexLabelPlacement){t=z*x;for(a=0;a<r.length;a++){var h=f[a];h.indexLabelTextBlock.x=v.x+t*Math.cos(h.midAngle);h.indexLabelTextBlock.y=v.y+t*Math.sin(h.midAngle);h.indexLabelAngle=h.midAngle;h.radius=z;h.percentInnerRadius=
537
+ B}for(var l,u,a=0;a<r.length;a++){var h=f[a],y=d(a);if(null!==y){l=f[a];u=f[y];var A=0,A=b(l,u)-s;if(0>A){for(var E=u=0,K=0;K<r.length;K++)K!==a&&f[K].hemisphere===h.hemisphere&&(f[K].indexLabelTextBlock.y<h.indexLabelTextBlock.y?u++:E++);u=A/(u+E||1)*E;var E=-1*(A-u),M=K=0;"right"===h.hemisphere?(K=g(a,u),E=-1*(A-K),M=g(y,E),+M.toFixed(w)<+E.toFixed(w)&&+K.toFixed(w)<=+u.toFixed(w)&&g(a,-(E-M))):(K=g(y,u),E=-1*(A-K),M=g(a,E),+M.toFixed(w)<+E.toFixed(w)&&+K.toFixed(w)<=+u.toFixed(w)&&g(y,-(E-M)))}}}}else for(a=
537
538
  0;a<r.length;a++)h=f[a],t="pie"===m.type?0.7*z:0.85*z,y=v.x+t*Math.cos(h.midAngle),u=v.y+t*Math.sin(h.midAngle),h.indexLabelTextBlock.x=y,h.indexLabelTextBlock.y=u;for(a=0;a<r.length;a++)if(h=f[a],y=h.indexLabelTextBlock.measureText(),0!==y.height&&0!==y.width)y=y=0,"right"===h.hemisphere?(y=q.x2-(h.indexLabelTextBlock.x+h.indexLabelTextBlock.width+p),y*=-1):y=q.x1-(h.indexLabelTextBlock.x-h.indexLabelTextBlock.width-p),0<y&&(!k&&h.indexLabelText&&(u="right"===h.hemisphere?q.x2-h.indexLabelTextBlock.x:
538
539
  h.indexLabelTextBlock.x-q.x1,0.3*h.indexLabelTextBlock.maxWidth>u?h.indexLabelText="":h.indexLabelTextBlock.maxWidth=0.85*u,0.3*h.indexLabelTextBlock.maxWidth<u&&(h.indexLabelTextBlock.x-="right"===h.hemisphere?2:-2)),Math.abs(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-v.y)<z||Math.abs(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2-v.y)<z)&&(y/=Math.abs(Math.cos(h.indexLabelAngle)),9<y&&(y*=0.3),y>e&&(e=y)),y=y=0,0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?(y=q.y2-(h.indexLabelTextBlock.y+
539
- h.indexLabelTextBlock.height/2+5),y*=-1):y=q.y1-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-5),0<y&&(!k&&h.indexLabelText&&(u=0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?-1:1,0===g(a,y*u)&&g(a,2*u)),Math.abs(h.indexLabelTextBlock.x-v.x)<z&&(y/=Math.abs(Math.sin(h.indexLabelAngle)),9<y&&(y*=0.3),y>e&&(e=y)));var K=function(a,b,c){for(var d=[],e=0;d.push(f[b]),b!==c;b=(b+1+r.length)%r.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,
540
+ h.indexLabelTextBlock.height/2+5),y*=-1):y=q.y1-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-5),0<y&&(!k&&h.indexLabelText&&(u=0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?-1:1,0===g(a,y*u)&&g(a,2*u)),Math.abs(h.indexLabelTextBlock.x-v.x)<z&&(y/=Math.abs(Math.sin(h.indexLabelAngle)),9<y&&(y*=0.3),y>e&&(e=y)));var L=function(a,b,c){for(var d=[],e=0;d.push(f[b]),b!==c;b=(b+1+r.length)%r.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,
540
541
  c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,e=0,g=!1,h=0;h<r.length;h++)if(g=!1,l=f[h],l.indexLabelText){var k=d(h);if(null!==k){var m=f[k];A=0;A=b(l,m);var q;if(q=0>A){q=l.indexLabelTextBlock.x;var n=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,u=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2,s=m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2,t=m.indexLabelTextBlock.x+m.indexLabelTextBlock.width,
541
- v=m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2;q=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width<m.indexLabelTextBlock.x-p||q>t+p||n>v+p||u<s-p?!1:!0}q?(0>a&&(a=h),k!==a&&(c=k,e+=-A),0===h%Math.max(r.length/10,3)&&(g=!0)):g=!0;g&&(0<e&&0<=a&&0<=c)&&(K(e,a,c),c=a=-1,e=0)}}0<e&&K(e,a,c)})()}}function k(){n.plotArea.layoutManager.reset();n.title&&(n.title.dockInsidePlotArea||"center"===n.title.horizontalAlign&&"center"===n.title.verticalAlign)&&n.title.render();if(n.subtitles)for(var a=
542
+ v=m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2;q=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width<m.indexLabelTextBlock.x-p||q>t+p||n>v+p||u<s-p?!1:!0}q?(0>a&&(a=h),k!==a&&(c=k,e+=-A),0===h%Math.max(r.length/10,3)&&(g=!0)):g=!0;g&&(0<e&&0<=a&&0<=c)&&(L(e,a,c),c=a=-1,e=0)}}0<e&&L(e,a,c)})()}}function k(){n.plotArea.layoutManager.reset();n.title&&(n.title.dockInsidePlotArea||"center"===n.title.horizontalAlign&&"center"===n.title.verticalAlign)&&n.title.render();if(n.subtitles)for(var a=
542
543
  0;a<n.subtitles.length;a++){var b=n.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}n.legend&&(n.legend.dockInsidePlotArea||"center"===n.legend.horizontalAlign&&"center"===n.legend.verticalAlign)&&(n.legend.setLayout(),n.legend.render())}var n=this;if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],r=m.dataPoints,p=10,q=this.plotArea,f=m.dataPointEOs,s=2,t,x=1.3,u=20/180*Math.PI,w=6,v={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/
543
544
  2},y=0;a=!1;for(var A=0;A<r.length;A++)y+=Math.abs(r[A].y),!a&&("undefined"!==typeof r[A].indexLabel&&null!==r[A].indexLabel&&0<r[A].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof r[A].label&&null!==r[A].label&&0<r[A].label.toString().length)&&(a=!0);if(0!==y){a=a||"undefined"!==typeof m.indexLabel&&null!==m.indexLabel&&0<m.indexLabel.toString().length;var z="inside"!==m.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;m.radius&&(z=Wa(m.radius,
544
- z));var B="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Wa(m.innerRadius,z,0.7*z):0.7*z,C=Math.min(B/z,(z-1)/z);this.pieDoughnutClickHandler=function(a){n.isAnimating||!l(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&n._animator.animate(0,500,function(a){c(a,!0);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n});n.dispatchEvent("dataAnimationEnd",{chart:n})}))};e();h();h();h();h();this.disableToolTip=!0;this._animator.animate(0,
545
+ z));var C="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Wa(m.innerRadius,z,0.7*z):0.7*z,B=Math.min(C/z,(z-1)/z);this.pieDoughnutClickHandler=function(a){n.isAnimating||!l(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&n._animator.animate(0,500,function(a){c(a,!0);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n});n.dispatchEvent("dataAnimationEnd",{chart:n})}))};e();h();h();h();h();this.disableToolTip=!0;this._animator.animate(0,
545
546
  this.animatedRender?this.animationDuration:0,function(a){var b=n.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=n.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(var b=f[0].startAngle+2*Math.PI*a,c=0;c<r.length;c++){var d=0===c?f[c].startAngle:e,e=d+(f[c].endAngle-f[c].startAngle),g=!1;e>b&&(e=b,g=!0);var h=r[c].color?r[c].color:m._colorSet[c%m._colorSet.length];e>d&&sa(n.plotArea.ctx,f[c].center,f[c].radius,h,m.type,d,e,m.fillOpacity,f[c].percentInnerRadius);if(g)break}k();
546
- n.dispatchEvent("dataAnimationIterationEnd",{chart:n});1<=a&&n.dispatchEvent("dataAnimationEnd",{chart:n})},function(){n.disableToolTip=!1;n._animator.animate(0,n.animatedRender?500:0,function(a){c(a,!1);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n})});n.dispatchEvent("dataAnimationEnd",{chart:n})});m.radius=z;"doughnut"===m.type&&(m.innerRadius=B)}}};var ta=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),
547
+ n.dispatchEvent("dataAnimationIterationEnd",{chart:n});1<=a&&n.dispatchEvent("dataAnimationEnd",{chart:n})},function(){n.disableToolTip=!1;n._animator.animate(0,n.animatedRender?500:0,function(a){c(a,!1);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n})});n.dispatchEvent("dataAnimationEnd",{chart:n})});m.radius=z;"doughnut"===m.type&&(m.innerRadius=C)}}};var ta=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),
547
548
  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())};s.prototype.renderFunnel=function(a){function e(){for(var a=0,b=[],c=0;c<w.length;c++){if("undefined"===typeof w[c].y)return-1;w[c].y="number"===typeof w[c].y?w[c].y:
548
- 0;a+=Math.abs(w[c].y)}if(0===a)return-1;for(c=b[0]=0;c<w.length;c++)b.push(Math.abs(w[c].y)*B/a);return b}function c(){var a=T,b=V,c=$,d=W,e,f;e=Z;f=Q-R;d=Math.abs((f-e)*(b-a+(d-c))/2);c=W-$;e=f-e;f=c*(f-Q);f=Math.abs(f);f=d+f;for(var d=[],g=0,h=0;h<w.length;h++){if("undefined"===typeof w[h].y)return-1;w[h].y="number"===typeof w[h].y?w[h].y:0;g+=Math.abs(w[h].y)}if(0===g)return-1;for(var k=d[0]=0,m=0,l,p,b=b-a,k=!1,h=0;h<w.length;h++)a=Math.abs(w[h].y)*f/g,k?l=0==Number(c.toFixed(3))?0:a/c:(p=da*
549
- da*b*b-4*Math.abs(da)*a,0>p?(p=c,k=(b+p)*(e-m)/2,a-=k,l=e-m,m+=e-m,l+=0==p?0:a/p,m+=a/p,k=!0):(l=(Math.abs(da)*b-Math.sqrt(p))/2,p=b-2*l/Math.abs(da),m+=l,m>e&&(m-=l,p=c,k=(b+p)*(e-m)/2,a-=k,l=e-m,m+=e-m,l+=a/p,m+=a/p,k=!0),b=p)),d.push(l);return d}function b(){if(u&&w){for(var a,b,c,d,e,g,h,k,m,p,q,n,r,s,v,y,N,z,A=[],I=[],D={percent:null,total:null},C=null,B=0;B<w.length;B++)z=H[B],z="undefined"!==typeof z.x5?(z.y2+z.y4)/2:(z.y2+z.y3)/2,z=f(z).x2+1,A[B]=K-(isNaN(z)?0:z)-X;z=0.5*X;for(var B=0,L=w.length-
550
- 1;B<w.length||0<=L;B++,L--){b=u.reversed?w[L]:w[B];a=b.color?b.color:u.reversed?u._colorSet[(w.length-1-B)%u._colorSet.length]:u._colorSet[B%u._colorSet.length];c=b.indexLabelPlacement||u.indexLabelPlacement||"outside";N=b.indexLabelTextAlign||u.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||u.indexLabelBackgroundColor||(t?"transparent":null);e=b.indexLabelBorderColor||u.indexLabelBorderColor||(t?"transparent":null);g=l(b.indexLabelBorderThickness)?u.indexLabelBorderThickness:b.indexLabelBorderThickness;
549
+ 0;a+=Math.abs(w[c].y)}if(0===a)return-1;for(c=b[0]=0;c<w.length;c++)b.push(Math.abs(w[c].y)*C/a);return b}function c(){var a=T,b=W,c=$,d=Y,e,f;e=Z;f=Q-R;d=Math.abs((f-e)*(b-a+(d-c))/2);c=Y-$;e=f-e;f=c*(f-Q);f=Math.abs(f);f=d+f;for(var d=[],g=0,h=0;h<w.length;h++){if("undefined"===typeof w[h].y)return-1;w[h].y="number"===typeof w[h].y?w[h].y:0;g+=Math.abs(w[h].y)}if(0===g)return-1;for(var k=d[0]=0,m=0,l,p,b=b-a,k=!1,h=0;h<w.length;h++)a=Math.abs(w[h].y)*f/g,k?l=0==Number(c.toFixed(3))?0:a/c:(p=da*
550
+ da*b*b-4*Math.abs(da)*a,0>p?(p=c,k=(b+p)*(e-m)/2,a-=k,l=e-m,m+=e-m,l+=0==p?0:a/p,m+=a/p,k=!0):(l=(Math.abs(da)*b-Math.sqrt(p))/2,p=b-2*l/Math.abs(da),m+=l,m>e&&(m-=l,p=c,k=(b+p)*(e-m)/2,a-=k,l=e-m,m+=e-m,l+=a/p,m+=a/p,k=!0),b=p)),d.push(l);return d}function b(){if(u&&w){for(var a,b,c,d,e,g,h,k,m,p,q,n,r,s,v,y,N,z,A=[],J=[],D={percent:null,total:null},B=null,I=0;I<w.length;I++)z=H[I],z="undefined"!==typeof z.x5?(z.y2+z.y4)/2:(z.y2+z.y3)/2,z=f(z).x2+1,A[I]=L-(isNaN(z)?0:z)-X;z=0.5*X;for(var I=0,C=w.length-
551
+ 1;I<w.length||0<=C;I++,C--){b=u.reversed?w[C]:w[I];a=b.color?b.color:u.reversed?u._colorSet[(w.length-1-I)%u._colorSet.length]:u._colorSet[I%u._colorSet.length];c=b.indexLabelPlacement||u.indexLabelPlacement||"outside";N=b.indexLabelTextAlign||u.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||u.indexLabelBackgroundColor||(t?"transparent":null);e=b.indexLabelBorderColor||u.indexLabelBorderColor||(t?"transparent":null);g=l(b.indexLabelBorderThickness)?u.indexLabelBorderThickness:b.indexLabelBorderThickness;
551
552
  h=l(b.indexLabelPadding)?u.options.indexLabelPadding?u.options.indexLabelPadding:u.indexLabelPadding:b.indexLabelPadding;k=b.indexLabelFontColor||u.indexLabelFontColor||"#979797";m=l(b.indexLabelFontSize)?u.indexLabelFontSize:b.indexLabelFontSize;p=b.indexLabelFontStyle||u.indexLabelFontStyle||"normal";q=b.indexLabelFontFamily||u.indexLabelFontFamily||"arial";n=b.indexLabelFontWeight||u.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||u.options.indexLabelLineColor||a;r="number"===typeof b.indexLabelLineThickness?
552
- b.indexLabelLineThickness:"number"===typeof u.indexLabelLineThickness?u.indexLabelLineThickness:2;s=b.indexLabelLineDashType||u.indexLabelLineDashType||"solid";v="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof u.indexLabelWrap?u.indexLabelWrap:!0;y=u.dataPointIds[B];x._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:H[u.reversed?w.length-1-B:B]};"inside"===u.indexLabelPlacement&&(A[B]=B!==ea?u.reversed?H[B].x2-H[B].x1:
553
- H[B].x3-H[B].x4:H[B].x3-H[B].x6,20>A[B]&&(A[B]=B!==ea?u.reversed?H[B].x3-H[B].x4:H[B].x2-H[B].x1:H[B].x2-H[B].x1,A[B]/=2));y=b.indexLabelMaxWidth?b.indexLabelMaxWidth:u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:A[B];if(y>A[B]||0>y)y=A[B];I[B]="inside"===u.indexLabelPlacement?v?Math.max(H[B].height,m):1.5*m+("object"===typeof h?(h.top||0)+(h.bottom||0):2*h):!1;D=x.getPercentAndTotal(u,b);if(u.indexLabelFormatter||b.indexLabelFormatter)C={chart:x,dataSeries:u,dataPoint:b,total:D.total,percent:D.percent};
554
- b=b.indexLabelFormatter?b.indexLabelFormatter(C):b.indexLabel?x.replaceKeywordsWithValue(b.indexLabel,b,u,B):u.indexLabelFormatter?u.indexLabelFormatter(C):u.indexLabel?x.replaceKeywordsWithValue(u.indexLabel,b,u,B):b.label?b.label:"";0>=r&&(r=0);1E3>y&&1E3-y<z&&(y+=1E3-y);l(u.options.indexLabelMaxWidth)&&(u.indexLabelMaxWidth=l(u.indexLabelMaxWidth)?y:Math.max(y,u.indexLabelMaxWidth));S.roundRect||Ba(S);c=new la(S,{fontSize:m,fontFamily:q,fontColor:k,fontStyle:p,fontWeight:n,horizontalAlign:c,textAlign:N,
555
- backgroundColor:d,borderColor:e,borderThickness:g,maxWidth:y,maxHeight:!1===I[B]?(v?4.28571429*m:1.5*m)+("object"===typeof h?(h.top||0)+(h.bottom||0):2*h):I[B],text:b,padding:h,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;G.push({textBlock:c,id:u.reversed?L:B,isDirty:!1,lineColor:a,lineThickness:r,lineDashType:s,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function d(){var a,
556
- b,c,d,e,f=[];e=!1;c=0;for(var g,h=K-V-X/2,h=u.options.indexLabelMaxWidth?u.indexLabelMaxWidth>h?h:u.indexLabelMaxWidth:h,k=G.length-1;0<=k;k--){g=w[G[k].id];c=G[k];d=c.textBlock;b=(a=q(k)<H.length?G[q(k)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+fa>b.y&&(e=!0);c=g.indexLabelMaxWidth||h;if(c>h||0>c)c=h;f.push(c)}if(e)for(k=G.length-1;0<=k;k--)a=H[k],G[k].textBlock.maxWidth=f[f.length-(k+1)],G[k].textBlock.measureText(),G[k].textBlock.height=G[k].textBlock.height===2*G[k].textBlock.padding?0:G[k].textBlock.height,
557
- G[k].textBlock.width=G[k].textBlock.width===2*G[k].textBlock.padding?0:G[k].textBlock.width,G[k].textBlock.x=K-h,c=G[k].textBlock.height<G[k].textBlock.maxHeight?G[k].textBlock.height:G[k].textBlock.maxHeight,e=G[k].textBlock.width<G[k].textBlock.maxWidth?G[k].textBlock.width:G[k].textBlock.maxWidth,G[k].height=c,G[k].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,G[k].textBlock.y=c-G[k].height/2,u.reversed?(G[k].textBlock.y+G[k].height>qa+z&&(G[k].textBlock.y=qa+z-G[k].height),G[k].textBlock.y<
553
+ b.indexLabelLineThickness:"number"===typeof u.indexLabelLineThickness?u.indexLabelLineThickness:2;s=b.indexLabelLineDashType||u.indexLabelLineDashType||"solid";v="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof u.indexLabelWrap?u.indexLabelWrap:!0;y=u.dataPointIds[I];x._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataPointIndex:I,dataSeriesIndex:0,funnelSection:H[u.reversed?w.length-1-I:I]};"inside"===u.indexLabelPlacement&&(A[I]=I!==ea?u.reversed?H[I].x2-H[I].x1:
554
+ H[I].x3-H[I].x4:H[I].x3-H[I].x6,20>A[I]&&(A[I]=I!==ea?u.reversed?H[I].x3-H[I].x4:H[I].x2-H[I].x1:H[I].x2-H[I].x1,A[I]/=2));y=b.indexLabelMaxWidth?b.indexLabelMaxWidth:u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:A[I];if(y>A[I]||0>y)y=A[I];J[I]="inside"===u.indexLabelPlacement?v?Math.max(H[I].height,m):1.5*m+("object"===typeof h?(h.top||0)+(h.bottom||0):2*h):!1;D=x.getPercentAndTotal(u,b);if(u.indexLabelFormatter||b.indexLabelFormatter)B={chart:x,dataSeries:u,dataPoint:b,total:D.total,percent:D.percent};
555
+ b=b.indexLabelFormatter?b.indexLabelFormatter(B):b.indexLabel?x.replaceKeywordsWithValue(b.indexLabel,b,u,I):u.indexLabelFormatter?u.indexLabelFormatter(B):u.indexLabel?x.replaceKeywordsWithValue(u.indexLabel,b,u,I):b.label?b.label:"";0>=r&&(r=0);1E3>y&&1E3-y<z&&(y+=1E3-y);l(u.options.indexLabelMaxWidth)&&(u.indexLabelMaxWidth=l(u.indexLabelMaxWidth)?y:Math.max(y,u.indexLabelMaxWidth));S.roundRect||Ba(S);c=new la(S,{fontSize:m,fontFamily:q,fontColor:k,fontStyle:p,fontWeight:n,horizontalAlign:c,textAlign:N,
556
+ backgroundColor:d,borderColor:e,borderThickness:g,maxWidth:y,maxHeight:!1===J[I]?(v?4.28571429*m:1.5*m)+("object"===typeof h?(h.top||0)+(h.bottom||0):2*h):J[I],text:b,padding:h,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;G.push({textBlock:c,id:u.reversed?C:I,isDirty:!1,lineColor:a,lineThickness:r,lineDashType:s,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function d(){var a,
557
+ b,c,d,e,f=[];e=!1;c=0;for(var g,h=L-W-X/2,h=u.options.indexLabelMaxWidth?u.indexLabelMaxWidth>h?h:u.indexLabelMaxWidth:h,k=G.length-1;0<=k;k--){g=w[G[k].id];c=G[k];d=c.textBlock;b=(a=q(k)<H.length?G[q(k)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+fa>b.y&&(e=!0);c=g.indexLabelMaxWidth||h;if(c>h||0>c)c=h;f.push(c)}if(e)for(k=G.length-1;0<=k;k--)a=H[k],G[k].textBlock.maxWidth=f[f.length-(k+1)],G[k].textBlock.measureText(),G[k].textBlock.height=G[k].textBlock.height===2*G[k].textBlock.padding?0:G[k].textBlock.height,
558
+ G[k].textBlock.width=G[k].textBlock.width===2*G[k].textBlock.padding?0:G[k].textBlock.width,G[k].textBlock.x=L-h,c=G[k].textBlock.height<G[k].textBlock.maxHeight?G[k].textBlock.height:G[k].textBlock.maxHeight,e=G[k].textBlock.width<G[k].textBlock.maxWidth?G[k].textBlock.width:G[k].textBlock.maxWidth,G[k].height=c,G[k].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,G[k].textBlock.y=c-G[k].height/2,u.reversed?(G[k].textBlock.y+G[k].height>qa+z&&(G[k].textBlock.y=qa+z-G[k].height),G[k].textBlock.y<
558
559
  ua-z&&(G[k].textBlock.y=ua-z)):(G[k].textBlock.y<qa-z&&(G[k].textBlock.y=qa-z),G[k].textBlock.y+G[k].height>ua+z&&(G[k].textBlock.y=ua+z-G[k].height))}function g(){var a,b,c,e;if("inside"!==u.indexLabelPlacement)for(var d=0;d<H.length;d++)l(G[d].textBlock)||(l(G[d].textBlock.text)||0!=G[d].textBlock.text.length)&&!l(G[d].textBlock.text)?(a=H[d],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=u.reversed?"undefined"!==typeof a.x5?c>ya?f(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==
559
560
  typeof a.x5?c<ya?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,G[d].textBlock.x=b+X,G[d].textBlock.y=c-G[d].height/2,u.reversed?(G[d].textBlock.y+G[d].height>qa+z&&(G[d].textBlock.y=qa+z-G[d].height),G[d].textBlock.y<ua-z&&(G[d].textBlock.y=ua-z)):(G[d].textBlock.y<qa-z&&(G[d].textBlock.y=qa-z),G[d].textBlock.y+G[d].height>ua+z&&(G[d].textBlock.y=ua+z-G[d].height))):G[d].isDirty=!0;else for(d=0;d<H.length;d++)l(G[d].textBlock)||(l(G[d].textBlock.text)||0!=G[d].textBlock.text.length)&&!l(G[d].textBlock.text)?
560
561
  (a=H[d],b=a.height,c=G[d].height,e=G[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,G[d].textBlock.x=b,G[d].textBlock.y=c):G[d].isDirty=!0):G[d].isDirty=!0}function h(){function a(b,c){var d;if(0>b||b>=G.length)return 0;var e,f=G[b].textBlock;if(0>c){c*=-1;e=p(b);d=k(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=q(b);d=k(b,e);if(d>=c)return f.y+=c,c;if(b==H.length-1)return 0<d&&(f.y+=d),d;
561
562
  d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,d,e,f,g=0,h;f=(Q-Z+2*z)/l;h=l;for(var k,m=1;m<h;m++){e=m*f;for(var n=G.length-1;0<=n;n--)!G[n].isDirty&&(G[n].textBlock.y<e&&G[n].textBlock.y+G[n].height>e)&&(k=q(n),!(k>=G.length-1)&&G[n].textBlock.y+G[n].height+fa>G[k].textBlock.y&&(G[n].textBlock.y=G[n].textBlock.y+G[n].height-e>e-G[n].textBlock.y?e+1:e-G[n].height-1))}for(k=H.length-1;0<k;k--)if(!G[k].isDirty){e=p(k);if(0>e&&(e=0,G[e].isDirty))break;if(G[k].textBlock.y<G[e].textBlock.y+G[e].height){d=
562
563
  d||k;f=k;for(h=0;G[f].textBlock.y<G[e].textBlock.y+G[e].height+fa;){a=a||G[f].textBlock.y+G[f].height;h+=G[f].height;h+=fa;f=e;if(0>=f){f=0;h+=G[f].height;break}e=p(f);if(0>e){f=0;h+=G[f].height;break}}if(f!=k){g=G[f].textBlock.y;a-=g;a=h-a;g=c(a,d,f);break}}}return g}function c(a,b,d){var e=[],f=0,g=0;for(a=Math.abs(a);d<=b;d++)e.push(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)g++,f+=G[b.id].height+fa,G[b.id].textBlock.text="",G[b.id].indexLabelText=
563
564
  "",G[b.id].isDirty=!0,G[b.id].textBlock.measureText();else break;return g}for(var d,e,f,g,h,m,l=1,n=0;n<2*l;n++){for(var r=G.length-1;0<=r&&!(0<=p(r)&&p(r),f=G[r],g=f.textBlock,m=(h=q(r)<H.length?G[q(r)]:null)?h.textBlock:null,d=+f.height.toFixed(6),e=+g.y.toFixed(6),!f.isDirty&&(h&&e+d+fa>+m.y.toFixed(6))&&(d=g.y+d+fa-m.y,e=a(r,-d),e<d&&(0<e&&(d-=e),e=a(q(r),d),e!=d)));r--);b()}}function k(a,b){return(b<H.length?G[b].textBlock.y:u.reversed?qa+z:ua+z)-(0>a?u.reversed?ua-z:qa-z:G[a].textBlock.y+G[a].height+
564
- fa)}function n(a,b,c){var d,e,f,h=[],k=z,l=[];-1!==b&&(0<=aa.indexOf(b)?(e=aa.indexOf(b),aa.splice(e,1)):(aa.push(b),aa=aa.sort(function(a,b){return a-b})));if(0===aa.length)h=ka;else{e=z*(1!=aa.length||0!=aa[0]&&aa[0]!=H.length-1?2:1)/m();for(var p=0;p<H.length;p++){if(1==aa.length&&0==aa[0]){if(0===p){h.push(ka[p]);d=k;continue}}else 0===p&&(d=-1*k);h.push(ka[p]+d);if(0<=aa.indexOf(p)||p<H.length&&0<=aa.indexOf(p+1))d+=e}}f=function(){for(var a=[],b=0;b<H.length;b++)a.push(h[b]-H[b].y1);return a}();
565
- var q={startTime:(new Date).getTime(),duration:c||500,easingFunction:function(a,b,c,d){return M.easing.easeOutQuart(a,b,c,d)},changeSection:function(a){for(var b,c,d=0;d<H.length;d++)b=f[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;ja=!0;d.clearRect(v.x1,v.y1,v.x2-v.x1,v.y2-v.y1);d.fillStyle=a.backgroundColor;d.fillRect(v.x1,
566
- v.y1,v.width,v.height);q.changeSection(c,b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[w.length-1-b]:u.dataPoints[b];e.index=u.reversed?w.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<H.length;e++)ta(d,H[e],u.fillOpacity);y(d);E&&("inside"!==u.indexLabelPlacement?r(d):g(),s(d));1<=c&&(ja=!1)},null,M.easing.easeOutQuart)}function m(){for(var a=0,b=0;b<H.length-1;b++)(0<=aa.indexOf(b)||0<=aa.indexOf(b+1))&&a++;return a}function r(a){for(var b,c,d,e,g=0;g<H.length;g++)e=1===
567
- G[g].lineThickness%2?0.5:0,c=((H[g].y2+H[g].y4)/2<<0)+e,b=f(c).x2-1,isNaN(b)&&(Math.round(H[g].x1)===Math.round(H[g].x4)&&Math.round(H[g].x2)===Math.round(H[g].x3))&&(b=H[g].x2),d=G[g].textBlock.x,e=(G[g].textBlock.y+G[g].height/2<<0)+e,G[g].isDirty||0==G[g].lineThickness||(a.strokeStyle=G[g].lineColor,a.lineWidth=G[g].lineThickness,a.setLineDash&&a.setLineDash(J(G[g].lineDashType,G[g].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&G[a].isDirty;a--);
568
- return a}function q(a){for(a+=1;a<=H.length&&a!=H.length&&G[a].isDirty;a++);return a}function f(a){for(var b,c=0;c<w.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 s(a){for(var b=0;b<H.length;b++)G[b].isDirty||(a&&(G[b].textBlock.ctx=a),G[b].textBlock.y+=G[b].textBlock._lineHeight/2,G[b].textBlock.render(!0),G[b].textBlock.y-=G[b].textBlock._lineHeight/
569
- 2)}function y(a){x.plotArea.layoutManager.reset();a.roundRect||Ba(a);x.title&&(x.title.dockInsidePlotArea||"center"===x.title.horizontalAlign&&"center"===x.title.verticalAlign)&&(x.title.ctx=a,x.title.render());if(x.subtitles)for(var b=0;b<x.subtitles.length;b++){var c=x.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)x.subtitles.ctx=a,c.render()}x.legend&&(x.legend.dockInsidePlotArea||"center"===x.legend.horizontalAlign&&"center"===x.legend.verticalAlign)&&
570
- (x.legend.ctx=a,x.legend.setLayout(),x.legend.render());U.fNg&&U.fNg(x)}var x=this;if(!(0>=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],w=u.dataPoints,v=this.plotArea,z=0.025*v.width,A=0.01*v.width,D=0,B=v.height-2*z-4,C=Math.min(v.width-2*A,2.8*v.height),E=!1,O=0;O<w.length;O++)if(!E&&("undefined"!==typeof w[O].indexLabel&&null!==w[O].indexLabel&&0<w[O].indexLabel.toString().length)&&(E=!0),!E&&("undefined"!==typeof w[O].label&&null!==w[O].label&&0<w[O].label.toString().length)&&
571
- (E=!0),!E&&"function"===typeof u.indexLabelFormatter||"function"===typeof w[O].indexLabelFormatter)E=!0;E=E||"undefined"!==typeof u.indexLabel&&null!==u.indexLabel&&0<u.indexLabel.toString().length;"inside"!==u.indexLabelPlacement&&E||(A=(v.width-0.75*C)/2);var O=v.x1+A,K=v.x2-A,Z=v.y1+z+2,Q=v.y2-z-2,S=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=u.length&&(u.dataPoints&&u.visible)&&0!==w.length){var R,F;a=75*C/100;var X=30*(K-a)/100;"funnel"===u.type?(R=l(u.options.neckHeight)?0.35*B:u.neckHeight,
572
- F=l(u.options.neckWidth)?0.25*a:u.neckWidth,"string"===typeof R&&R.match(/%$/)?(R=parseInt(R),R=R*B/100):R=parseInt(R),"string"===typeof F&&F.match(/%$/)?(F=parseInt(F),F=F*a/100):F=parseInt(F),R>B?R=B:0>=R&&(R=0),F>a?F=a-0.5:0>=F&&(F=0)):"pyramid"===u.type&&(F=R=0,u.reversed=u.reversed?!1:!0);var C=O+a/2,T=O,V=O+a,qa=u.reversed?Q:Z,$=C-F/2,W=C+F/2,ya=u.reversed?Z+R:Q-R,ua=u.reversed?Z:Q;F=u.valueRepresents=u.valueRepresents?u.valueRepresents:"height";var ba,O=[],C=[],H=[],ha=[],Y=Z,ea,da=(ya-qa)/
573
- ($-T),ia=-da;ba="area"===F?c():e();if(-1!==ba){if(u.reversed)for(ha.push(Y),F=ba.length-1;0<F;F--)Y+=ba[F],ha.push(Math.round(Y));else for(F=0;F<ba.length;F++)Y+=ba[F],ha.push(Math.round(Y));if(u.reversed)for(F=0;F<ba.length;F++)ha[F]<ya?(O.push($),C.push(W),ea=F):(O.push((ha[F]-qa+da*T)/da),C.push((ha[F]-qa+ia*V)/ia));else for(F=0;F<ba.length;F++)ha[F]<ya?(O.push((ha[F]-qa+da*T)/da),C.push((ha[F]-qa+ia*V)/ia),ea=F):(O.push($),C.push(W));for(F=0;F<ba.length-1;F++)Y=u.reversed?w[w.length-1-F].color?
574
- w[w.length-1-F].color:u._colorSet[(w.length-1-F)%u._colorSet.length]:w[F].color?w[F].color:u._colorSet[F%u._colorSet.length],F===ea?H.push({x1:O[F],y1:ha[F],x2:C[F],y2:ha[F],x3:W,y3:ya,x4:C[F+1],y4:ha[F+1],x5:O[F+1],y5:ha[F+1],x6:$,y6:ya,id:F,height:ha[F+1]-ha[F],color:Y}):H.push({x1:O[F],y1:ha[F],x2:C[F],y2:ha[F],x3:C[F+1],y3:ha[F+1],x4:O[F+1],y4:ha[F+1],id:F,height:ha[F+1]-ha[F],color:Y}),u.dataPointEOs[F]&&H[F]&&(u.dataPointEOs[F].sectionsofFunnel=H[F]);var fa=2,G=[],ja=!1,aa=[],ka=[],O=!1,ha=
575
- ha=0;Ca(aa);for(F=0;F<w.length;F++)w[F].exploded&&(O=!0,u.reversed?aa.push(w.length-1-F):aa.push(F));S.clearRect(v.x1,v.y1,v.width,v.height);S.fillStyle=x.backgroundColor;S.fillRect(v.x1,v.y1,v.width,v.height);if(E&&u.visible&&(b(),g(),"inside"!==u.indexLabelPlacement)){d();h();C=!1;for(F=0;F<w.length;F++)G[F].isDirty||(C=!0,ha=G[F].textBlock.x+G[F].width,ha=(K-ha)/2,0==F&&(D=ha),D>ha&&(D=ha));C||(D=(v.width-a)/2-A);for(F=0;F<H.length;F++)H[F].x1+=D,H[F].x2+=D,H[F].x3+=D,H[F].x4+=D,H[F].x5&&(H[F].x5+=
576
- D,H[F].x6+=D),G[F].textBlock.x+=D}for(F=0;F<H.length;F++)A=H[F],ta(S,A,u.fillOpacity),ka.push(A.y1);y(S);E&&u.visible&&("inside"===u.indexLabelPlacement||x.animationEnabled||r(S),x.animationEnabled||s());if(!E)for(F=0;F<w.length;F++)A=u.dataPointIds[F],D={id:A,objectType:"dataPoint",dataPointIndex:F,dataSeriesIndex:0,funnelSection:H[u.reversed?w.length-1-F:F]},x._eventManager.objectMap[A]=D;!x.animationEnabled&&O?n(x,-1,0):x.animationEnabled&&!x.animatedRender&&n(x,-1,0);this.funnelPyramidClickHandler=
577
- function(a){var b=-1;if(!ja&&!x.isAnimating&&(l(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=u.reversed?w.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===u.type||"pyramid"===u.type)u.reversed?w[w.length-1-a].exploded=w[w.length-1-a].exploded?!1:!0:w[a].exploded=w[a].exploded?!1:!0;n(x,b,500)}};return{source:S,dest:this.plotArea.ctx,animationCallback:function(a,b){M.fadeInAnimation(a,b);1<=a&&(n(x,-1,500),y(x.plotArea.ctx||x.ctx))},easingFunction:M.easing.easeInQuad,
578
- animationBase:0}}}}};s.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();s.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;
579
- s.prototype.set=function(a,e,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=e,c&&this.render()):s.base.set.call(this,a,e,c)};s.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,g=document.createElement("a");g.download=c;g.href=b;if("undefined"!==typeof Blob&&new Blob){for(var h=
580
- b.replace(/^data:[a-z\/]*;base64,/,""),h=atob(h),k=new ArrayBuffer(h.length),k=new Uint8Array(k),l=0;l<h.length;l++)k[l]=h.charCodeAt(l);e=new Blob([k.buffer],{type:"image/"+e});try{window.navigator.msSaveBlob(e,c),d=!0}catch(m){g.dataset.downloadurl=[a,g.download,g.href].join(":"),g.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),g.dispatchEvent?g.dispatchEvent(event):g.fireEvent&&g.fireEvent("onclick")}catch(n){e=
581
- 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()}}};s.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),e=document.createElement("iframe");e.setAttribute("class","canvasjs-chart-print-frame");Q(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||
582
- 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)};s.prototype.getPercentAndTotal=function(a,e){var c=null,b=null,d=c=null;if(0<=a.type.indexOf("stacked"))b=
583
- 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}};s.prototype.replaceKeywordsWithValue=function(a,e,c,b,d){var g=this;d="undefined"===typeof d?0:d;if((0<=c.type.indexOf("stacked")||
584
- "pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var h="#percent",k="#total",l=this.getPercentAndTotal(c,e),k=isNaN(l.total)?k:l.total,h=isNaN(l.percent)?h:l.percent;do{l="";if(c.percentFormatString)l=c.percentFormatString;else{var l="#,##0.",m=Math.max(Math.ceil(Math.log(1/Math.abs(h))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var n=0;n<m;n++)l+="#";c.percentFormatString=l}a=a.replace("#percent",ea(h,l,g._cultureInfo));
585
- a=a.replace("#total",ea(k,c.yValueFormatString?c.yValueFormatString:"#,##0.########",g._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=Ia(a.slice(1,a.length-1));a=a.replace("#index",d);var h=null;try{var f=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);f&&0<f.length&&(h=Ia(f[2]),a=Ia(f[1]))}catch(k){}f=null;if("color"===a)return"waterfall"===
586
- c.type?e.color?e.color:0<e.y?c.risingColor:c.fallingColor:"error"===c.type?c.color?c.color:c._colorSet[h%c._colorSet.length]:e.color?e.color:c.color?c.color:c._colorSet[b%c._colorSet.length];if(e.hasOwnProperty(a))f=e;else if(c.hasOwnProperty(a))f=c;else return"";f=f[a];null!==h&&(f=f[h]);return"x"===a?(c.axisX&&"dateTime"===c.axisX.valueType||"dateTime"===c.xValueType||e.x&&e.x.getTime)&&!c.axisX.logarithmic?Fa(f,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:
587
- c.xValueFormatString=g.axisX&&g.axisX.autoValueFormatString?g.axisX.autoValueFormatString:"DD MMM YY",g._cultureInfo):ea(f,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString="#,##0.########",g._cultureInfo):"y"===a?ea(f,e.yValueFormatString?e.yValueFormatString:c.yValueFormatString?c.yValueFormatString:c.yValueFormatString=c.axisY&&c.axisY.logarithmic&&"number"===typeof f&&0<f&&(1E-7>Math.abs(f)||1E7<Math.abs(f))?"0.##E+0":"#,##0.########",g._cultureInfo):
588
- "z"===a?ea(f,e.zValueFormatString?e.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",g._cultureInfo):f})};ra(E,V);E.prototype.setLayout=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,e=a.layoutManager.getFreeSpace(),c=null,b=0,d=0,g=0,h=0,k=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 n=[],m=[];if("top"===this.verticalAlign||
565
+ fa)}function n(a,b,c){var d,e,f,h=[],k=z,l=[];-1!==b&&(0<=V.indexOf(b)?(e=V.indexOf(b),V.splice(e,1)):(V.push(b),V=V.sort(function(a,b){return a-b})));if(0===V.length)h=ka;else{e=z*(1!=V.length||0!=V[0]&&V[0]!=H.length-1?2:1)/m();for(var p=0;p<H.length;p++){if(1==V.length&&0==V[0]){if(0===p){h.push(ka[p]);d=k;continue}}else 0===p&&(d=-1*k);h.push(ka[p]+d);if(0<=V.indexOf(p)||p<H.length&&0<=V.indexOf(p+1))d+=e}}f=function(){for(var a=[],b=0;b<H.length;b++)a.push(h[b]-H[b].y1);return a}();var q={startTime:(new Date).getTime(),
566
+ duration:c||500,easingFunction:function(a,b,c,d){return M.easing.easeOutQuart(a,b,c,d)},changeSection:function(a){for(var b,c,d=0;d<H.length;d++)b=f[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;ia=!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);q.changeSection(c,
567
+ b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[w.length-1-b]:u.dataPoints[b];e.index=u.reversed?w.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<H.length;e++)ta(d,H[e],u.fillOpacity);y(d);E&&("inside"!==u.indexLabelPlacement?r(d):g(),s(d));1<=c&&(ia=!1)},null,M.easing.easeOutQuart)}function m(){for(var a=0,b=0;b<H.length-1;b++)(0<=V.indexOf(b)||0<=V.indexOf(b+1))&&a++;return a}function r(a){for(var b,c,d,e,g=0;g<H.length;g++)e=1===G[g].lineThickness%2?0.5:0,c=((H[g].y2+H[g].y4)/
568
+ 2<<0)+e,b=f(c).x2-1,isNaN(b)&&(Math.round(H[g].x1)===Math.round(H[g].x4)&&Math.round(H[g].x2)===Math.round(H[g].x3))&&(b=H[g].x2),d=G[g].textBlock.x,e=(G[g].textBlock.y+G[g].height/2<<0)+e,G[g].isDirty||0==G[g].lineThickness||(a.strokeStyle=G[g].lineColor,a.lineWidth=G[g].lineThickness,a.setLineDash&&a.setLineDash(K(G[g].lineDashType,G[g].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&G[a].isDirty;a--);return a}function q(a){for(a+=1;a<=
569
+ H.length&&a!=H.length&&G[a].isDirty;a++);return a}function f(a){for(var b,c=0;c<w.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 s(a){for(var b=0;b<H.length;b++)G[b].isDirty||(a&&(G[b].textBlock.ctx=a),G[b].textBlock.y+=G[b].textBlock._lineHeight/2,G[b].textBlock.render(!0),G[b].textBlock.y-=G[b].textBlock._lineHeight/2)}function y(a){x.plotArea.layoutManager.reset();
570
+ a.roundRect||Ba(a);x.title&&(x.title.dockInsidePlotArea||"center"===x.title.horizontalAlign&&"center"===x.title.verticalAlign)&&(x.title.ctx=a,x.title.render());if(x.subtitles)for(var b=0;b<x.subtitles.length;b++){var c=x.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)x.subtitles.ctx=a,c.render()}x.legend&&(x.legend.dockInsidePlotArea||"center"===x.legend.horizontalAlign&&"center"===x.legend.verticalAlign)&&(x.legend.ctx=a,x.legend.setLayout(),x.legend.render());
571
+ U.fNg&&U.fNg(x)}var x=this;if(!(0>=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],w=u.dataPoints,v=this.plotArea,z=0.025*v.width,A=0.01*v.width,D=0,C=v.height-2*z-4,B=Math.min(v.width-2*A,2.8*v.height),E=!1,P=0;P<w.length;P++)if(!E&&("undefined"!==typeof w[P].indexLabel&&null!==w[P].indexLabel&&0<w[P].indexLabel.toString().length)&&(E=!0),!E&&("undefined"!==typeof w[P].label&&null!==w[P].label&&0<w[P].label.toString().length)&&(E=!0),!E&&"function"===typeof u.indexLabelFormatter||
572
+ "function"===typeof w[P].indexLabelFormatter)E=!0;E=E||"undefined"!==typeof u.indexLabel&&null!==u.indexLabel&&0<u.indexLabel.toString().length;"inside"!==u.indexLabelPlacement&&E||(A=(v.width-0.75*B)/2);var P=v.x1+A,L=v.x2-A,Z=v.y1+z+2,Q=v.y2-z-2,S=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=u.length&&(u.dataPoints&&u.visible)&&0!==w.length){var R,F;a=75*B/100;var X=30*(L-a)/100;"funnel"===u.type?(R=l(u.options.neckHeight)?0.35*C:u.neckHeight,F=l(u.options.neckWidth)?0.25*a:u.neckWidth,
573
+ "string"===typeof R&&R.match(/%$/)?(R=parseInt(R),R=R*C/100):R=parseInt(R),"string"===typeof F&&F.match(/%$/)?(F=parseInt(F),F=F*a/100):F=parseInt(F),R>C?R=C:0>=R&&(R=0),F>a?F=a-0.5:0>=F&&(F=0)):"pyramid"===u.type&&(F=R=0,u.reversed=u.reversed?!1:!0);var B=P+a/2,T=P,W=P+a,qa=u.reversed?Q:Z,$=B-F/2,Y=B+F/2,ya=u.reversed?Z+R:Q-R,ua=u.reversed?Z:Q;F=u.valueRepresents=u.valueRepresents?u.valueRepresents:"height";var aa,P=[],B=[],H=[],ja=[],ba=Z,ea,da=(ya-qa)/($-T),ha=-da;aa="area"===F?c():e();if(-1!==
574
+ aa){if(u.reversed)for(ja.push(ba),F=aa.length-1;0<F;F--)ba+=aa[F],ja.push(Math.round(ba));else for(F=0;F<aa.length;F++)ba+=aa[F],ja.push(Math.round(ba));if(u.reversed)for(F=0;F<aa.length;F++)ja[F]<ya?(P.push($),B.push(Y),ea=F):(P.push((ja[F]-qa+da*T)/da),B.push((ja[F]-qa+ha*W)/ha));else for(F=0;F<aa.length;F++)ja[F]<ya?(P.push((ja[F]-qa+da*T)/da),B.push((ja[F]-qa+ha*W)/ha),ea=F):(P.push($),B.push(Y));for(F=0;F<aa.length-1;F++)ba=u.reversed?w[w.length-1-F].color?w[w.length-1-F].color:u._colorSet[(w.length-
575
+ 1-F)%u._colorSet.length]:w[F].color?w[F].color:u._colorSet[F%u._colorSet.length],F===ea?H.push({x1:P[F],y1:ja[F],x2:B[F],y2:ja[F],x3:Y,y3:ya,x4:B[F+1],y4:ja[F+1],x5:P[F+1],y5:ja[F+1],x6:$,y6:ya,id:F,height:ja[F+1]-ja[F],color:ba}):H.push({x1:P[F],y1:ja[F],x2:B[F],y2:ja[F],x3:B[F+1],y3:ja[F+1],x4:P[F+1],y4:ja[F+1],id:F,height:ja[F+1]-ja[F],color:ba}),u.dataPointEOs[F]&&H[F]&&(u.dataPointEOs[F].sectionsofFunnel=H[F]);var fa=2,G=[],ia=!1,V=[],ka=[],P=!1;aa=aa=0;Ca(V);for(F=0;F<w.length;F++)w[F].exploded&&
576
+ (P=!0,u.reversed?V.push(w.length-1-F):V.push(F));S.clearRect(v.x1,v.y1,v.width,v.height);S.fillStyle=x.backgroundColor;S.fillRect(v.x1,v.y1,v.width,v.height);if(E&&u.visible&&(b(),g(),"inside"!==u.indexLabelPlacement)){d();h();B=!1;ja=Infinity;for(F=0;F<w.length;F++)G[F].isDirty||(B=!0,aa=G[F].textBlock.x+G[F].width,aa=(L-aa)/2,aa<ja&&(ja=aa));Infinity!==ja&&(D=ja);B||(D=(v.width-a)/2-A);for(F=0;F<H.length;F++)H[F].x1+=D,H[F].x2+=D,H[F].x3+=D,H[F].x4+=D,H[F].x5&&(H[F].x5+=D,H[F].x6+=D),G[F].textBlock.x+=
577
+ D}for(F=0;F<H.length;F++)A=H[F],ta(S,A,u.fillOpacity),ka.push(A.y1);y(S);E&&u.visible&&("inside"===u.indexLabelPlacement||x.animationEnabled||r(S),x.animationEnabled||s());if(!E)for(F=0;F<w.length;F++)A=u.dataPointIds[F],D={id:A,objectType:"dataPoint",dataPointIndex:F,dataSeriesIndex:0,funnelSection:H[u.reversed?w.length-1-F:F]},x._eventManager.objectMap[A]=D;!x.animationEnabled&&P?n(x,-1,0):x.animationEnabled&&!x.animatedRender&&n(x,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ia&&
578
+ !x.isAnimating&&(l(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=u.reversed?w.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===u.type||"pyramid"===u.type)u.reversed?w[w.length-1-a].exploded=w[w.length-1-a].exploded?!1:!0:w[a].exploded=w[a].exploded?!1:!0;n(x,b,500)}};return{source:S,dest:this.plotArea.ctx,animationCallback:function(a,b){M.fadeInAnimation(a,b);1<=a&&(n(x,-1,500),y(x.plotArea.ctx||x.ctx))},easingFunction:M.easing.easeInQuad,animationBase:0}}}}};s.prototype.requestAnimFrame=
579
+ function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();s.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;s.prototype.set=function(a,e,c){c="undefined"===
580
+ typeof c?!0:c;"options"===a?(this.options=e,c&&this.render()):s.base.set.call(this,a,e,c)};s.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,g=document.createElement("a");g.download=c;g.href=b;if("undefined"!==typeof Blob&&new Blob){for(var h=b.replace(/^data:[a-z\/]*;base64,/,
581
+ ""),h=atob(h),k=new ArrayBuffer(h.length),k=new Uint8Array(k),l=0;l<h.length;l++)k[l]=h.charCodeAt(l);e=new Blob([k.buffer],{type:"image/"+e});try{window.navigator.msSaveBlob(e,c),d=!0}catch(m){g.dataset.downloadurl=[a,g.download,g.href].join(":"),g.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),g.dispatchEvent?g.dispatchEvent(event):g.fireEvent&&g.fireEvent("onclick")}catch(n){e=window.open(),
582
+ e.document.write("<img src='"+b+"'></img><div>Please right click on the image and save it to your device</div>"),e.document.close()}}};s.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),e=document.createElement("iframe");e.setAttribute("class","canvasjs-chart-print-frame");Q(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||
583
+ 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)};s.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?
584
+ 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}};s.prototype.replaceKeywordsWithValue=function(a,e,c,b,d){var g=this;d="undefined"===typeof d?0:d;if((0<=c.type.indexOf("stacked")||"pie"===c.type||
585
+ "doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var h="#percent",k="#total",l=this.getPercentAndTotal(c,e),k=isNaN(l.total)?k:l.total,h=isNaN(l.percent)?h:l.percent;do{l="";if(c.percentFormatString)l=c.percentFormatString;else{var l="#,##0.",m=Math.max(Math.ceil(Math.log(1/Math.abs(h))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var n=0;n<m;n++)l+="#";c.percentFormatString=l}a=a.replace("#percent",ea(h,l,g._cultureInfo));a=a.replace("#total",
586
+ ea(k,c.yValueFormatString?c.yValueFormatString:"#,##0.########",g._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=Ia(a.slice(1,a.length-1));a=a.replace("#index",d);var h=null;try{var f=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);f&&0<f.length&&(h=Ia(f[2]),a=Ia(f[1]))}catch(k){}f=null;if("color"===a)return"waterfall"===c.type?e.color?
587
+ e.color:0<e.y?c.risingColor:c.fallingColor:"error"===c.type?c.color?c.color:c._colorSet[h%c._colorSet.length]:e.color?e.color:c.color?c.color:c._colorSet[b%c._colorSet.length];if(e.hasOwnProperty(a))f=e;else if(c.hasOwnProperty(a))f=c;else return"";f=f[a];null!==h&&(f=f[h]);return"x"===a?(c.axisX&&"dateTime"===c.axisX.valueType||"dateTime"===c.xValueType||e.x&&e.x.getTime)&&!c.axisX.logarithmic?Fa(f,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString=
588
+ g.axisX&&g.axisX.autoValueFormatString?g.axisX.autoValueFormatString:"DD MMM YY",g._cultureInfo):ea(f,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString="#,##0.########",g._cultureInfo):"y"===a?ea(f,e.yValueFormatString?e.yValueFormatString:c.yValueFormatString?c.yValueFormatString:c.yValueFormatString=c.axisY&&c.axisY.logarithmic&&"number"===typeof f&&0<f&&(1E-7>Math.abs(f)||1E7<Math.abs(f))?"0.##E+0":"#,##0.########",g._cultureInfo):"z"===a?
589
+ ea(f,e.zValueFormatString?e.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",g._cultureInfo):f})};ra(E,W);E.prototype.setLayout=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,e=a.layoutManager.getFreeSpace(),c=null,b=0,d=0,g=0,h=0,k=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 n=[],m=[];if("top"===this.verticalAlign||
589
590
  "bottom"===this.verticalAlign)this.orientation="horizontal",c=this.verticalAlign,g=this.maxWidth=null!==this.maxWidth?this.maxWidth:e.width,h=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;g=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*e.width;h=this.maxHeight=null!==this.maxHeight?this.maxHeight:
590
591
  e.height}this.errorMarkerColor=[];for(var r=0;r<this.dataSeries.length;r++){var p=this.dataSeries[r];if(p.dataPoints&&p.dataPoints.length){if("pie"!==p.type&&"doughnut"!==p.type&&"funnel"!==p.type&&"pyramid"!==p.type){var q=p.legendMarkerType=p.legendMarkerType?p.legendMarkerType:"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type&&"scatter"!==p.type&&"bubble"!==p.type||!p.markerType?"error"===p.type&&p._linkedSeries?p._linkedSeries.legendMarkerType?p._linkedSeries.legendMarkerType:T.getDefaultLegendMarker(p._linkedSeries.type):
591
592
  T.getDefaultLegendMarker(p.type):p.markerType,f=p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:null}):p.name,s=p.legendMarkerColor=p.legendMarkerColor?p.legendMarkerColor:p.markerColor?p.markerColor:"error"===p.type?l(p.whiskerColor)?p._colorSet[0]:p.whiskerColor:p._colorSet[0],t=p.markerSize||"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type?0.75*this.lineHeight:0,x=p.legendMarkerBorderColor?p.legendMarkerBorderColor:
@@ -602,9 +603,9 @@ e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y1):"center"===this.verticalAl
602
603
  {id:q.id,objectType:"legendItem",legendItemIndex:r,dataSeriesIndex:q.dataSeriesIndex,dataPointIndex:q.dataPointIndex};this.markerSize=t;this.rows=m;0<n.length&&0<this.height&&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}};E.prototype.render=function(){var a=this.bounds.x1,e=this.bounds.y1,c=this.markerMargin,b=this.maxWidth,d=this.maxHeight,g=this.markerSize,h=this.rows;(0<this.borderThickness&&this.borderColor||
603
604
  this.backgroundColor)&&this.ctx.roundRect(a,e,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var k=0,l=0;l<h.length;l++){for(var m=h[l],n=0,p=0;p<m.items.length;p++){var q=m.items[p],f=q.textBlock.x+a+(0===p?0.2*g:this.horizontalSpacing),s=e+k,t=f;this.chart.data[q.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"===q.chartType||
604
605
  "stepLine"===q.chartType||"spline"===q.chartType)this.ctx.strokeStyle=q.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(f-0.1*this.lineHeight,s+this.lineHeight/2),this.ctx.lineTo(f+0.85*this.lineHeight,s+this.lineHeight/2),this.ctx.stroke(),t-=0.1*this.lineHeight;if("error"===q.chartType){this.ctx.strokeStyle=this.errorMarkerColor[0];this.ctx.lineWidth=g/8;this.ctx.beginPath();var x=f-0.08*this.lineHeight+0.1*this.lineHeight,u=s+0.15*this.lineHeight,
605
- w=0.7*this.lineHeight,v=w+0.02*this.lineHeight;this.ctx.moveTo(x,u);this.ctx.lineTo(x+w,u);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(x+w/2,u);this.ctx.lineTo(x+w/2,u+v);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(x,u+v);this.ctx.lineTo(x+w,u+v);this.ctx.stroke();this.errorMarkerColor.shift()}W.drawMarker(f+g/2,s+this.lineHeight/2,this.ctx,q.markerType,"error"===q.chartType||"line"===q.chartType||"spline"===q.chartType?q.markerSize/2:q.markerSize,q.markerColor,q.markerBorderColor,
606
+ w=0.7*this.lineHeight,v=w+0.02*this.lineHeight;this.ctx.moveTo(x,u);this.ctx.lineTo(x+w,u);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(x+w/2,u);this.ctx.lineTo(x+w/2,u+v);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(x,u+v);this.ctx.lineTo(x+w,u+v);this.ctx.stroke();this.errorMarkerColor.shift()}Y.drawMarker(f+g/2,s+this.lineHeight/2,this.ctx,q.markerType,"error"===q.chartType||"line"===q.chartType||"spline"===q.chartType?q.markerSize/2:q.markerSize,q.markerColor,q.markerBorderColor,
606
607
  q.markerBorderThickness);q.textBlock.x=f+c+g;if("line"===q.chartType||"stepLine"===q.chartType||"spline"===q.chartType)q.textBlock.x+=0.1*this.lineHeight;q.textBlock.y=Math.round(s+this.lineHeight/2);q.textBlock.render(!0);this.ctx.restore();n=0<p?Math.max(n,q.textBlock.height?q.textBlock.height:this.lineHeight):q.textBlock.height?q.textBlock.height:this.lineHeight;this.chart.data[q.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);f=R(q.id);this.ghostCtx.fillStyle=f;this.ghostCtx.beginPath();this.ghostCtx.fillRect(t,
607
- q.textBlock.y-this.lineHeight/2,q.textBlock.x+q.textBlock.width-t,q.textBlock.height?q.textBlock.height:this.lineHeight);q.x1=this.chart._eventManager.objectMap[q.id].x1=t;q.y1=this.chart._eventManager.objectMap[q.id].y1=q.textBlock.y-this.lineHeight/2;q.x2=this.chart._eventManager.objectMap[q.id].x2=q.textBlock.x+q.textBlock.width;q.y2=this.chart._eventManager.objectMap[q.id].y2=q.textBlock.y+(q.textBlock.height?q.textBlock.height:this.lineHeight)-this.lineHeight/2}k+=n}};ra(T,V);T.prototype.getDefaultAxisPlacement=
608
+ q.textBlock.y-this.lineHeight/2,q.textBlock.x+q.textBlock.width-t,q.textBlock.height?q.textBlock.height:this.lineHeight);q.x1=this.chart._eventManager.objectMap[q.id].x1=t;q.y1=this.chart._eventManager.objectMap[q.id].y1=q.textBlock.y-this.lineHeight/2;q.x2=this.chart._eventManager.objectMap[q.id].x2=q.textBlock.x+q.textBlock.width;q.y2=this.chart._eventManager.objectMap[q.id].y2=q.textBlock.y+(q.textBlock.height?q.textBlock.height:this.lineHeight)-this.lineHeight/2}k+=n}};ra(T,W);T.prototype.getDefaultAxisPlacement=
608
609
  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";
609
610
  if("pie"===a||"doughnut"===a||"funnel"===a||"pyramid"===a)return"none";"error"!==a&&window.console.log("Unknown Chart Type: "+a);return null};T.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"===
610
611
  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};T.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,g=0,h=0,k=1,n=
@@ -612,14 +613,14 @@ Infinity,m=0,r=0,p=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.log
612
613
  this.dataPoints[h],q=this.axisX&&this.axisX.logarithmic?d.x>a?d.x/a:a/d.x:Math.abs(d.x-a);q<b.distance&&(l(c)||c&&!l(d.y))&&(b.dataPoint=d,b.distance=q,b.index=h);d=q;d<=n?n=d:0<k?m++:r++;if(1E3<m&&1E3<r)break}else if(0>p-g&&p+g>=this.dataPoints.length)break;-1===k?(g++,k=1):k=-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};T.prototype.getDataPointAtXY=function(a,e,c){if(!this.dataPoints||0===this.dataPoints.length||
613
614
  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,g=0,h=1,k=!1,n=Infinity,m=0,r=0,p=0;if("none"!==this.chart.plotInfo.axisPlacement)if(p=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:e}),this.axisX.logarithmic)var q=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<q?Math.min(Math.max((this.dataPoints.length-1)/q*Math.log(p/this.dataPoints[0].x)>>0,
614
615
  0),this.dataPoints.length):0;else q=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<q?Math.min(Math.max((this.dataPoints.length-1)/q*(p-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;for(;;){g=0<h?p+d:p-d;if(0<=g&&g<this.dataPoints.length){var q=this.chart._eventManager.objectMap[this.dataPointIds[g]],f=this.dataPoints[g],s=null;if(q){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":case "waterfall":case "error":a>=
615
- q.x1&&(a<=q.x2&&e>=q.y1&&e<=q.y2)&&(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y1-e),Math.abs(q.y2-e))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var t=aa("markerSize",f,this)||4,x=c?20:t,s=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-e,2));s<=x&&b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:s});q=
616
- Math.abs(q.x1-a);q<=n?n=q:0<h?m++:r++;s<=t/2&&(k=!0);break;case "rangeArea":case "rangeSplineArea":t=aa("markerSize",f,this)||4;x=c?20:t;s=Math.min(Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-e,2)),Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y2-e,2)));s<=x&&b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:s});q=Math.abs(q.x1-a);q<=n?n=q:0<h?m++:r++;s<=t/2&&(k=!0);break;case "bubble":t=q.size;s=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-e,2));s<=t/2&&(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,
616
+ q.x1&&(a<=q.x2&&e>=q.y1&&e<=q.y2)&&(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y1-e),Math.abs(q.y2-e))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var t=V("markerSize",f,this)||4,x=c?20:t,s=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-e,2));s<=x&&b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:s});q=Math.abs(q.x1-
617
+ a);q<=n?n=q:0<h?m++:r++;s<=t/2&&(k=!0);break;case "rangeArea":case "rangeSplineArea":t=V("markerSize",f,this)||4;x=c?20:t;s=Math.min(Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-e,2)),Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y2-e,2)));s<=x&&b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:s});q=Math.abs(q.x1-a);q<=n?n=q:0<h?m++:r++;s<=t/2&&(k=!0);break;case "bubble":t=q.size;s=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-e,2));s<=t/2&&(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,
617
618
  distance:s}),k=!0);break;case "pie":case "doughnut":t=q.center;x="doughnut"===this.type?q.percentInnerRadius*q.radius:0;s=Math.sqrt(Math.pow(t.x-a,2)+Math.pow(t.y-e,2));s<q.radius&&s>x&&(s=Math.atan2(e-t.y,a-t.x),0>s&&(s+=2*Math.PI),s=Number(((180*(s/Math.PI)%360+360)%360).toFixed(12)),t=Number(((180*(q.startAngle/Math.PI)%360+360)%360).toFixed(12)),x=Number(((180*(q.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===x&&1<q.endAngle&&(x=360),t>=x&&(0!==f.y&&!l(f.y))&&(x+=360,s<t&&(s+=360)),s>t&&s<x&&
618
619
  (b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:0}),k=!0));break;case "funnel":case "pyramid":s=q.funnelSection;e>=s.y1&&e<s.y4&&(s.y6?e>=s.y6?(g=s.x6+(s.x5-s.x6)/(s.y5-s.y6)*(e-s.y6),s=s.x3+(s.x4-s.x3)/(s.y4-s.y3)*(e-s.y3)):(g=s.x1+(s.x6-s.x1)/(s.y6-s.y1)*(e-s.y1),s=s.x2+(s.x3-s.x2)/(s.y3-s.y2)*(e-s.y2)):(g=s.x1+(s.x4-s.x1)/(s.y4-s.y1)*(e-s.y1),s=s.x2+(s.x3-s.x2)/(s.y3-s.y2)*(e-s.y2)),a>g&&a<s&&(b.push({dataPoint:f,dataPointIndex:q.dataPointIndex,dataSeries:this,distance:0}),k=!0));
619
620
  break;case "boxAndWhisker":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&e>=q.y4-q.borderThickness/2&&e<=q.y1+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&e>=q.y1&&e<=q.y4)b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-e),Math.abs(q.y3-e))}),k=!0;break;case "candlestick":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&e>=q.y2-q.borderThickness/2&&e<=q.y3+q.borderThickness/2||Math.abs(q.x2-
620
621
  a+q.x1-a)<q.borderThickness&&e>=q.y1&&e<=q.y4)b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-e),Math.abs(q.y3-e))}),k=!0;break;case "ohlc":if(Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&e>=q.y2&&e<=q.y3||a>=q.x1&&a<=(q.x2+q.x1)/2&&e>=q.y1-q.borderThickness/2&&e<=q.y1+q.borderThickness/2||a>=(q.x1+q.x2)/2&&a<=q.x2&&e>=q.y4-q.borderThickness/2&&e<=q.y4+q.borderThickness/2)b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(q.x1-
621
622
  a),Math.abs(q.x2-a),Math.abs(q.y2-e),Math.abs(q.y3-e))}),k=!0}if(k||1E3<m&&1E3<r)break}}else if(0>p-d&&p+d>=this.dataPoints.length)break;-1===h?(d++,h=1):h=-1}a=null;for(e=0;e<b.length;e++)a?b[e].distance<=a.distance&&(a=b[e]):a=b[e];return a};T.prototype.getMarkerProperties=function(a,e,c,b){var d=this.dataPoints,g=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],h=d[a].markerBorderColor?d[a].markerBorderColor:
622
- this.markerBorderColor?this.markerBorderColor:null,k=l(d[a].markerBorderThickness)?this.markerBorderThickness?this.markerBorderThickness:null:d[a].markerBorderThickness,n=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:n,size:a,color:g,borderColor:h,borderThickness:k}};ra(z,V);z.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var e=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/
623
+ this.markerBorderColor?this.markerBorderColor:null,k=l(d[a].markerBorderThickness)?this.markerBorderThickness?this.markerBorderThickness:null:d[a].markerBorderThickness,n=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:n,size:a,color:g,borderColor:h,borderThickness:k}};ra(z,W);z.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var e=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/
623
624
  Math.log(e/this.viewportMinimum)<this.noTicks-1){for(var c=z.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(Ua);this.createExtraLabelsForLog(a)}}};z.prototype.createLabels=function(){var a,e,c=0,b=0,d,g=0,h=0,k=0,b=this.interval,n=0,m,r=0.6*this.chart.height,p;a=!1;var q=this.scaleBreaks?this.scaleBreaks._appliedBreaks:
624
625
  [],f=q.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&&l(this.options.interval)){a=Math.ceil(b);k=Math.ceil(this.intervalStartPosition);b=!1;for(c=k;c<this.viewportMaximum;c+=a)if(this.labels[c])b=!0;else{b=!1;break}b&&(this.interval=a,this.intervalStartPosition=k)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=
625
626
  [],this.createExtraLabelsForLog()),b=0,k=f;b<this.logLabelValues.length;b++)if(c=this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;k<q.length&&c>q[k].endValue;k++);a=k<q.length&&c>=q[k].startValue&&c<=q[k].endValue;p=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:ea(p,this.valueFormatString,this.chart._cultureInfo),a=new la(this.ctx,{x:0,y:0,maxWidth:g,
@@ -676,54 +677,54 @@ this._position&&"outside"===this.labelPlacement?2:5;this.labelEffectiveHeight=l(
676
677
  Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<=h&&(this.labelEffectiveHeight=a=h);this._labels[b].effectiveHeight=h}for(b=0;b<this._stripLineLabels.length;b++)"outside"===this._stripLineLabels[b].stripLine.labelPlacement&&(this._stripLineLabels[b].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[b].stripLine.value<=this.viewportMaximum)&&(c=this._stripLineLabels[b].textBlock,c=c.measureText(),h=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+c.height*
677
678
  Math.cos(Math.PI/180*Math.abs(this.labelAngle)),e=Math.max(e,this._stripLineLabels[b].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<g.length?Math.max.apply(null,g):0,a+=Math.max(h,0<g.length?Math.max.apply(null,g):h)),a<=h&&(a=h),this.stripLineLabelEffectiveHeight=this._stripLineLabels[b].effectiveHeight=h,g.push(h));"inside"===this.labelPlacement&&(a+=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?e+this.tickLength:Math.max(e,this.tickLength))+
678
679
  d};z.setLayout=function(a,e,c,b,d,g){var h,k,n,m,r=a[0]?a[0].chart:e[0].chart,p=r.isNavigator?0:10,q=r._axes;if(a&&0<a.length)for(var f=0;f<a.length;f++)a[f]&&a[f].calculateAxisParameters();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateAxisParameters();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateAxisParameters();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateAxisParameters();for(f=0;f<q.length;f++)if(q[f]&&q[f].scaleBreaks&&q[f].scaleBreaks._appliedBreaks.length)for(var s=
679
- q[f].scaleBreaks._appliedBreaks,t=0;t<s.length&&!(s[t].startValue>q[f].viewportMaximum);t++)s[t].endValue<q[f].viewportMinimum||(l(q[f].scaleBreaks.firstBreakIndex)&&(q[f].scaleBreaks.firstBreakIndex=t),s[t].startValue>=q[f].viewPortMinimum&&(q[f].scaleBreaks.lastBreakIndex=t));for(var x=t=0,u=0,w=0,v=0,y=0,z=0,B,C,E=k=0,J,O,M,s=J=O=M=!1,f=0;f<q.length;f++)q[f]&&q[f].title&&(q[f]._titleTextBlock=new la(q[f].ctx,{text:q[f].title,fontSize:q[f].titleFontSize,fontFamily:q[f].titleFontFamily,fontWeight:q[f].titleFontWeight,
680
- fontColor:q[f].titleFontColor,fontStyle:q[f].titleFontStyle,borderColor:q[f].titleBorderColor,borderThickness:q[f].titleBorderThickness,backgroundColor:q[f].titleBackgroundColor,cornerRadius:q[f].titleCornerRadius,textBaseline:"middle",textAlign:q[f].titleTextAlign,padding:q[f].titlePadding}));for(f=0;f<q.length;f++)if(q[f].title){var K=1.5*q[f].titleFontSize+("object"===typeof q[f].titlePadding?(q[f].titlePadding.top||0)+(q[f].titlePadding.bottom||0):2*q[f].titlePadding);q[f]._titleTextBlock.maxWidth=
681
- q[f].titleMaxWidth||g.height;q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*g.width:Math.min(K,0.8*g.width);switch(q[f]._position){case "left":q[f]._titleTextBlock.angle=-90;break;case "right":q[f]._titleTextBlock.angle=90;break;default:q[f]._titleTextBlock.maxWidth=q[f].titleMaxWidth||g.width,q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*g.height:Math.min(K,0.8*g.height),q[f]._titleTextBlock.angle=0}}if("normal"===d){for(var w=[],v=[],y=[],z=[],Q=[],R=[],S=[],F=[];4>t;){var X=0,U=0,T=0,V=
682
- 0,$=K=d=0,aa=0,W=0,Y=0,ba=h=0;if(c&&0<c.length)for(y=[],f=h=0;f<c.length;f++)y.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateWidth():0)),h+=y[f],$+=c[f]&&!r.isNavigator?c[f].margin:0;else y.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));S.push(y);if(b&&0<b.length)for(z=[],f=ba=0;f<b.length;f++)z.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateWidth():0)),ba+=z[f],aa+=b[f]?b[f].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));F.push(z);h=Math.round(g.x1+
683
- h+$-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0))+(!c.length||"inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5);n=Math.round(Math.min(g.x2-ba-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0),r.width-p));if(a&&0<a.length)for(w=[],f=W=0;f<a.length;f++)a[f]&&
684
- (a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(n-h),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:a[f].lineCoordinates.width),w.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateHeight():0)),W+=w[f],d+=a[f]&&!r.isNavigator?a[f].margin:0;else w.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(w);if(e&&0<e.length)for(v=[],f=Y=0;f<e.length;f++)e[f]&&(e[f].lineCoordinates={}),e[f].lineCoordinates.width=
685
- Math.abs(n-h),e[f].title&&(e[f]._titleTextBlock.maxWidth=0<e[f].titleMaxWidth&&e[f].titleMaxWidth<e[f].lineCoordinates.width?e[f].titleMaxWidth:e[f].lineCoordinates.width),v.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateHeight():0)),Y+=v[f],K+=e[f]&&!r.isNavigator?e[f].margin:0;else v.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));R.push(v);if(a&&0<a.length){for(f=0;f<a.length;f++){if(a[f]){a[f].lineCoordinates.x1=h;n=Math.round(Math.min(g.x2-ba-aa+(b[0]?("inside"===b[0].labelPlacement?
680
+ q[f].scaleBreaks._appliedBreaks,t=0;t<s.length&&!(s[t].startValue>q[f].viewportMaximum);t++)s[t].endValue<q[f].viewportMinimum||(l(q[f].scaleBreaks.firstBreakIndex)&&(q[f].scaleBreaks.firstBreakIndex=t),s[t].startValue>=q[f].viewPortMinimum&&(q[f].scaleBreaks.lastBreakIndex=t));for(var x=t=0,u=0,w=0,v=0,y=0,z=0,D,B,C=k=0,E,K,M,s=E=K=M=!1,f=0;f<q.length;f++)q[f]&&q[f].title&&(q[f]._titleTextBlock=new la(q[f].ctx,{text:q[f].title,fontSize:q[f].titleFontSize,fontFamily:q[f].titleFontFamily,fontWeight:q[f].titleFontWeight,
681
+ fontColor:q[f].titleFontColor,fontStyle:q[f].titleFontStyle,borderColor:q[f].titleBorderColor,borderThickness:q[f].titleBorderThickness,backgroundColor:q[f].titleBackgroundColor,cornerRadius:q[f].titleCornerRadius,textBaseline:"middle",textAlign:q[f].titleTextAlign,padding:q[f].titlePadding}));for(f=0;f<q.length;f++)if(q[f].title){var L=1.5*q[f].titleFontSize+("object"===typeof q[f].titlePadding?(q[f].titlePadding.top||0)+(q[f].titlePadding.bottom||0):2*q[f].titlePadding);q[f]._titleTextBlock.maxWidth=
682
+ q[f].titleMaxWidth||g.height;q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*g.width:Math.min(L,0.8*g.width);switch(q[f]._position){case "left":q[f]._titleTextBlock.angle=-90;break;case "right":q[f]._titleTextBlock.angle=90;break;default:q[f]._titleTextBlock.maxWidth=q[f].titleMaxWidth||g.width,q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*g.height:Math.min(L,0.8*g.height),q[f]._titleTextBlock.angle=0}}if("normal"===d){for(var w=[],v=[],y=[],z=[],Q=[],R=[],S=[],F=[];4>t;){var X=0,U=0,T=0,W=
683
+ 0,$=L=d=0,aa=0,V=0,Y=0,ba=h=0;if(c&&0<c.length)for(y=[],f=h=0;f<c.length;f++)y.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateWidth():0)),h+=y[f],$+=c[f]&&!r.isNavigator?c[f].margin:0;else y.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));S.push(y);if(b&&0<b.length)for(z=[],f=ba=0;f<b.length;f++)z.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateWidth():0)),ba+=z[f],aa+=b[f]?b[f].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));F.push(z);h=Math.round(g.x1+
684
+ h+$-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0))+(!c.length||"inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5);n=Math.round(Math.min(g.x2-ba-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0),r.width-p));if(a&&0<a.length)for(w=[],f=V=0;f<a.length;f++)a[f]&&
685
+ (a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(n-h),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:a[f].lineCoordinates.width),w.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateHeight():0)),V+=w[f],d+=a[f]&&!r.isNavigator?a[f].margin:0;else w.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(w);if(e&&0<e.length)for(v=[],f=Y=0;f<e.length;f++)e[f]&&(e[f].lineCoordinates={}),e[f].lineCoordinates.width=
686
+ Math.abs(n-h),e[f].title&&(e[f]._titleTextBlock.maxWidth=0<e[f].titleMaxWidth&&e[f].titleMaxWidth<e[f].lineCoordinates.width?e[f].titleMaxWidth:e[f].lineCoordinates.width),v.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateHeight():0)),Y+=v[f],L+=e[f]&&!r.isNavigator?e[f].margin:0;else v.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));R.push(v);if(a&&0<a.length){for(f=0;f<a.length;f++){if(a[f]){a[f].lineCoordinates.x1=h;n=Math.round(Math.min(g.x2-ba-aa+(b[0]?("inside"===b[0].labelPlacement?
686
687
  b[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)-(!b.length||"inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),r.width-p));if(a[f]._labels&&1<a[f]._labels.length){var H=k=0;k=a[f]._labels[1];H="dateTime"===a[f].valueType?a[f]._labels[a[f]._labels.length-2]:a[f]._labels[a[f]._labels.length-1];x=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-
687
- k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle));u=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[f]||(!a[f].labelAutoFit||l(B)||l(C)||r.isNavigator||r.stockChart)||(k=0,0<a[f].labelAngle?(m=u-(H.textBlock.height-H.textBlock._lineHeight/2)*Math.sin(Math.PI/180*H.textBlock.angle),C+m>n&&(a[f].convertPixelToValue(C)>=a[f].viewportMinimum&&a[f].convertPixelToValue(C)<=a[f].viewportMaximum)&&
688
- (k+=C+m-n-ba)):0>a[f].labelAngle?B-x<h&&B-x<a[f].viewportMinimum&&(E=h-($+a[f].tickLength+y+B-x+a[f].labelFontSize/2)):0===a[f].labelAngle&&(C+u>n&&(a[f].convertPixelToValue(C)>=a[f].viewportMinimum&&a[f].convertPixelToValue(C)<=a[f].viewportMaximum)&&(k=C+u/2-n-ba),B-x<h&&B-x<a[f].viewportMinimum&&(E=h-$-a[f].tickLength-y-B+x/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<k?n-=k:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&
689
- 0>a[f].labelAngle&&0<E?h+=E:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0===a[f].labelAngle&&(0<E&&(h+=E),0<k&&(n-=k)));r.panEnabled?W=l(r.sessionVariables.axisX.height)||r.stockChart?r.sessionVariables.axisX.height=W:r.sessionVariables.axisX.height:r.sessionVariables.axisX.height=W;k=Math.round(g.y2-W-d+X)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5);m=Math.round(g.y2)-("inside"!==a[a.length-
690
- 1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5);a[f].lineCoordinates.x2=n;a[f].lineCoordinates.width=n-h;a[f].lineCoordinates.y1=k;a[f].lineCoordinates.y2=k;a[f].bounds={x1:h,y1:k,x2:n,y2:m-(W+d-w[f]-X),width:n-h};a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1;"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.y1=a[0].bounds.y1+X+(a[f].labelEffectiveHeight||0)+(r.isNavigator?0:2),a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/
688
+ k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle));u=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[f]||(!a[f].labelAutoFit||l(D)||l(B)||r.isNavigator||r.stockChart)||(k=0,0<a[f].labelAngle?(m=u-(H.textBlock.height-H.textBlock._lineHeight/2)*Math.sin(Math.PI/180*H.textBlock.angle),B+m>n&&(a[f].convertPixelToValue(B)>=a[f].viewportMinimum&&a[f].convertPixelToValue(B)<=a[f].viewportMaximum)&&
689
+ (k+=B+m-n-ba)):0>a[f].labelAngle?D-x<h&&D-x<a[f].viewportMinimum&&(C=h-($+a[f].tickLength+y+D-x+a[f].labelFontSize/2)):0===a[f].labelAngle&&(B+u>n&&(a[f].convertPixelToValue(B)>=a[f].viewportMinimum&&a[f].convertPixelToValue(B)<=a[f].viewportMaximum)&&(k=B+u/2-n-ba),D-x<h&&D-x<a[f].viewportMinimum&&(C=h-$-a[f].tickLength-y-D+x/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<k?n-=k:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&
690
+ 0>a[f].labelAngle&&0<C?h+=C:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0===a[f].labelAngle&&(0<C&&(h+=C),0<k&&(n-=k)));r.panEnabled?V=l(r.sessionVariables.axisX.height)||r.stockChart?r.sessionVariables.axisX.height=V:r.sessionVariables.axisX.height:r.sessionVariables.axisX.height=V;k=Math.round(g.y2-V-d+X)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5);m=Math.round(g.y2)-("inside"!==a[a.length-
691
+ 1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5);a[f].lineCoordinates.x2=n;a[f].lineCoordinates.width=n-h;a[f].lineCoordinates.y1=k;a[f].lineCoordinates.y2=k;a[f].bounds={x1:h,y1:k,x2:n,y2:m-(V+d-w[f]-X),width:n-h};a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1;"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.y1=a[0].bounds.y1+X+(a[f].labelEffectiveHeight||0)+(r.isNavigator?0:2),a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/
691
692
  2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.y1+=a[f].tickLength,a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2)}X+=w[f]+a[f].margin}$=0===a[0].dataSeries.length;if(!$)for(f=0;f<a[0].dataSeries.length;f++){if(a[0].dataSeries[f].dataPoints){$=!1;break}$=!0}if($)for($=!1,f=1;f<a.length;f++)0!==a[f].dataSeries.length&&($?a[f].lineCoordinates.x2>a[0].lineCoordinates.x2&&(a[0].lineCoordinates.x2=a[f].lineCoordinates.x2):(a[0].lineCoordinates.x2=a[f].lineCoordinates.x2,
692
693
  $=!0),a[0].lineCoordinates.width=a[0].lineCoordinates.x2-a[0].lineCoordinates.x1)}if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].lineCoordinates.x1=h,e[f].lineCoordinates.x2=n,e[f].lineCoordinates.width=Math.abs(n-h),e[f]._labels&&1<e[f]._labels.length&&(k=e[f]._labels[1],H="dateTime"===e[f].valueType?e[f]._labels[e[f]._labels.length-2]:e[f]._labels[e[f]._labels.length-1],x=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/
693
694
  180*Math.abs(k.textBlock.angle)),u=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))),r.panEnabled?Y=l(r.sessionVariables.axisX2.height)||r.stockChart?r.sessionVariables.axisX2.height=Y:r.sessionVariables.axisX2.height:r.sessionVariables.axisX2.height=Y,k=Math.round(g.y1)+("inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||r.isNavigator?
694
- 0:5),m=e[f].lineCoordinates.y1=k+Y+K-U,e[f].lineCoordinates.y2=k,e[f].bounds={x1:h,y1:k+(Y+K-v[f]-U),x2:n,y2:m,width:n-h},e[f].bounds.height=e[f].bounds.y2-e[f].bounds.y1,"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.y1=e[0].bounds.y2-U-(e[f].labelEffectiveHeight||0)-5),"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.y1-=e[f].tickLength),U+=v[f]+e[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)$=r.isNavigator?0:10,c[f]&&(h=n=Math.round((a[0]?a[0].lineCoordinates.x1:e[0].lineCoordinates.x1)+
695
- (c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0)),$=Math.max(c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock._lineHeight/2:p,p),k=Math.round(Math.max(g.y1+Y+K-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+5:0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),0<e.length?0:$))+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-
696
- 1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),$=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,m=Math.round(g.y2-W+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(r.isNavigator?0:2):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)-d-$)-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),c[f].lineCoordinates={x1:h-T,y1:k,x2:n-T,y2:m,height:Math.abs(m-
695
+ 0:5),m=e[f].lineCoordinates.y1=k+Y+L-U,e[f].lineCoordinates.y2=k,e[f].bounds={x1:h,y1:k+(Y+L-v[f]-U),x2:n,y2:m,width:n-h},e[f].bounds.height=e[f].bounds.y2-e[f].bounds.y1,"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.y1=e[0].bounds.y2-U-(e[f].labelEffectiveHeight||0)-5),"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.y1-=e[f].tickLength),U+=v[f]+e[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)$=r.isNavigator?0:10,c[f]&&(h=n=Math.round((a[0]?a[0].lineCoordinates.x1:e[0].lineCoordinates.x1)+
696
+ (c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0)),$=Math.max(c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock._lineHeight/2:p,p),k=Math.round(Math.max(g.y1+Y+L-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+5:0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),0<e.length?0:$))+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-
697
+ 1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),$=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,m=Math.round(g.y2-V+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(r.isNavigator?0:2):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)-d-$)-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),c[f].lineCoordinates={x1:h-T,y1:k,x2:n-T,y2:m,height:Math.abs(m-
697
698
  k)},c[f].bounds={x1:h-(y[f]+T),y1:k,x2:n-T,y2:m,height:m-k},c[f].bounds.width=c[f].bounds.x2-c[f].bounds.x1,"inside"===c[f].labelPlacement&&(c[f].lineCoordinates.x1=Math.round(c[0].bounds.x1+y[0]-T-(c[f].labelEffectiveWidth||0)-5),c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&(c[f].lineCoordinates.x1-=c[f].tickLength,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&
698
699
  c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),T+=y[f]+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&(h=n=Math.round((a[0]?a[0].lineCoordinates.x2:e[0].lineCoordinates.x2)-(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)),$=Math.max(b[f]._labels&&0<b[f]._labels.length?b[f]._labels[b[f]._labels.length-1].textBlock.height/2:0,p),k=Math.round(Math.max(g.y1+
699
- Y+K-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),0<e.length?0:$)),$=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,m=Math.round(g.y2-(W+d+$)+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(r.isNavigator?0:2):0)+("inside"===
700
- a[0].tickPlacement?a[0].tickLength:0):0))-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),b[f].lineCoordinates={x1:h+V,y1:k,x2:h+V,y2:m,height:Math.abs(m-k)},b[f].bounds={x1:h+V,y1:k,x2:n+z[f]+V,y2:m,height:m-k},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,"inside"===b[f].labelPlacement&&(b[f].lineCoordinates.x1=Math.round(b[0].bounds.x1+V+(b[f].labelEffectiveWidth||0)+(r.isNavigator?0:5)),b[f].lineCoordinates.x2=
701
- b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?b[f].titleMaxWidth:b[f].lineCoordinates.height),V+=z[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].calculateValueToPixelConversionParameters(),a[f].calculateBreaksSizeInValues(),
702
- a[f]._labels&&1<a[f]._labels.length&&(B=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,h=a[f]._labels[a[f]._labels.length-("dateTime"===a[f].valueType?2:1)].position,h=a[f].getApparentDifference(a[f].viewportMinimum,h),C=a[f].logarithmic?(1<h?Math.log(h)/a[f].conversionParameters.lnLogarithmBase*Math.abs(a[f].conversionParameters.pixelPerUnit):
703
- 0)+a[f].lineCoordinates.x1:(0<h?h*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateValueToPixelConversionParameters(),e[f].calculateBreaksSizeInValues(),e[f]._labels&&1<e[f]._labels.length&&(B=(e[f].logarithmic?Math.log(e[f]._labels[1].position/e[f].viewportMinimum)/e[f].conversionParameters.lnLogarithmBase:e[f]._labels[1].position-e[f].viewportMinimum)*Math.abs(e[f].conversionParameters.pixelPerUnit)+e[f].lineCoordinates.x1,
704
- h=e[f]._labels[e[f]._labels.length-("dateTime"===e[f].valueType?2:1)].position,h=e[f].getApparentDifference(e[f].viewportMinimum,h),C=e[f].logarithmic?(1<h?Math.log(h)/e[f].conversionParameters.lnLogarithmBase*Math.abs(e[f].conversionParameters.pixelPerUnit):0)+e[f].lineCoordinates.x1:(0<h?h*Math.abs(e[f].conversionParameters.pixelPerUnit):0)+e[f].lineCoordinates.x1);for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<
705
- t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)J=R[t-1][f]===R[t][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)O=S[t-1][f]===S[t][f]?!0:!1;else O=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)M=F[t-1][f]===F[t][f]?!0:!1;else M=!0}if(s&&J&&O&&M)break;t++}if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateStripLinesThicknessInValues(),
706
- e[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels()}else{p=[];B=[];E=[];x=[];u=[];C=[];Q=[];for(R=[];4>t;){W=V=T=aa=$=K=d=F=S=U=Y=0;if(a&&0<a.length)for(E=[],f=V=0;f<a.length;f++)E.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateWidth():0)),V+=E[f],d+=a[f]&&!r.isNavigator?a[f].margin:0;else E.push(Math.ceil(a[0]?
707
- a[0].createLabelsAndCalculateWidth():0));Q.push(E);if(e&&0<e.length)for(x=[],f=W=0;f<e.length;f++)x.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateWidth():0)),W+=x[f],K+=e[f]?e[f].margin:0;else x.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateWidth():0));R.push(x);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},h=Math.round(g.x1+V+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))+(!a.length||
708
- "inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),n=Math.round(Math.min(g.x2-W-K+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)-(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),r.width-10)),c[f].labelAutoFit&&!l(w)&&(0<!a.length&&(h=0>c[f].labelAngle?
709
- Math.max(h,w):0===c[f].labelAngle?Math.max(h,w/2):h),0<!e.length&&(n=0<c[f].labelAngle?n-v/2:0===c[f].labelAngle?n-v/2:n)),c[f].lineCoordinates.x1=h,c[f].lineCoordinates.x2=n,c[f].lineCoordinates.width=Math.abs(n-h),c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},h=Math.round(g.x1+V+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+
710
- (r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))+(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),n=Math.round(Math.min(g.x2-W-K+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)-(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveWidth||
700
+ Y+L-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),0<e.length?0:$)),$=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,m=Math.round(g.y2-(V+d+$)+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(r.isNavigator?0:2):0)+("inside"===
701
+ a[0].tickPlacement?a[0].tickLength:0):0))-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),b[f].lineCoordinates={x1:h+W,y1:k,x2:h+W,y2:m,height:Math.abs(m-k)},b[f].bounds={x1:h+W,y1:k,x2:n+z[f]+W,y2:m,height:m-k},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,"inside"===b[f].labelPlacement&&(b[f].lineCoordinates.x1=Math.round(b[0].bounds.x1+W+(b[f].labelEffectiveWidth||0)+(r.isNavigator?0:5)),b[f].lineCoordinates.x2=
702
+ b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?b[f].titleMaxWidth:b[f].lineCoordinates.height),W+=z[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].calculateValueToPixelConversionParameters(),a[f].calculateBreaksSizeInValues(),
703
+ a[f]._labels&&1<a[f]._labels.length&&(D=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,h=a[f]._labels[a[f]._labels.length-("dateTime"===a[f].valueType?2:1)].position,h=a[f].getApparentDifference(a[f].viewportMinimum,h),B=a[f].logarithmic?(1<h?Math.log(h)/a[f].conversionParameters.lnLogarithmBase*Math.abs(a[f].conversionParameters.pixelPerUnit):
704
+ 0)+a[f].lineCoordinates.x1:(0<h?h*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateValueToPixelConversionParameters(),e[f].calculateBreaksSizeInValues(),e[f]._labels&&1<e[f]._labels.length&&(D=(e[f].logarithmic?Math.log(e[f]._labels[1].position/e[f].viewportMinimum)/e[f].conversionParameters.lnLogarithmBase:e[f]._labels[1].position-e[f].viewportMinimum)*Math.abs(e[f].conversionParameters.pixelPerUnit)+e[f].lineCoordinates.x1,
705
+ h=e[f]._labels[e[f]._labels.length-("dateTime"===e[f].valueType?2:1)].position,h=e[f].getApparentDifference(e[f].viewportMinimum,h),B=e[f].logarithmic?(1<h?Math.log(h)/e[f].conversionParameters.lnLogarithmBase*Math.abs(e[f].conversionParameters.pixelPerUnit):0)+e[f].lineCoordinates.x1:(0<h?h*Math.abs(e[f].conversionParameters.pixelPerUnit):0)+e[f].lineCoordinates.x1);for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<
706
+ t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)E=R[t-1][f]===R[t][f]?!0:!1;else E=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)K=S[t-1][f]===S[t][f]?!0:!1;else K=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)M=F[t-1][f]===F[t][f]?!0:!1;else M=!0}if(s&&E&&K&&M)break;t++}if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateStripLinesThicknessInValues(),
707
+ e[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels()}else{p=[];D=[];C=[];x=[];u=[];B=[];Q=[];for(R=[];4>t;){V=W=T=aa=$=L=d=F=S=U=Y=0;if(a&&0<a.length)for(C=[],f=W=0;f<a.length;f++)C.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateWidth():0)),W+=C[f],d+=a[f]&&!r.isNavigator?a[f].margin:0;else C.push(Math.ceil(a[0]?
708
+ a[0].createLabelsAndCalculateWidth():0));Q.push(C);if(e&&0<e.length)for(x=[],f=V=0;f<e.length;f++)x.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateWidth():0)),V+=x[f],L+=e[f]?e[f].margin:0;else x.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateWidth():0));R.push(x);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},h=Math.round(g.x1+W+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))+(!a.length||
709
+ "inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),n=Math.round(Math.min(g.x2-V-L+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)-(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),r.width-10)),c[f].labelAutoFit&&!l(w)&&(0<!a.length&&(h=0>c[f].labelAngle?
710
+ Math.max(h,w):0===c[f].labelAngle?Math.max(h,w/2):h),0<!e.length&&(n=0<c[f].labelAngle?n-v/2:0===c[f].labelAngle?n-v/2:n)),c[f].lineCoordinates.x1=h,c[f].lineCoordinates.x2=n,c[f].lineCoordinates.width=Math.abs(n-h),c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},h=Math.round(g.x1+W+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+
711
+ (r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))+(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||r.isNavigator?0:5),n=Math.round(Math.min(g.x2-V-L+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)-(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveWidth||
711
712
  r.isNavigator?0:5),b[f].chart.width-10)),b[f]&&b[f].labelAutoFit&&!l(y)&&(0<!a.length&&(h=0<b[f].labelAngle?Math.max(h,y):0===b[f].labelAngle?Math.max(h,y/2):h),0<!e.length&&(n-=z/2)),b[f].lineCoordinates.x1=h,b[f].lineCoordinates.x2=n,b[f].lineCoordinates.width=Math.abs(n-h),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width);if(c&&0<c.length)for(p=[],f=T=0;f<c.length;f++)p.push(Math.ceil(c[f]?
712
- c[f].createLabelsAndCalculateHeight():0)),T+=p[f]+c[f].margin,$+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));u.push(p);if(b&&0<b.length)for(B=[],f=0;f<b.length;f++)B.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateHeight():0)),aa+=b[f].margin;else B.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));C.push(B);if(c&&0<c.length)for(f=0;f<c.length;f++)0<c[f]._labels.length&&(k=c[f]._labels[0],H=c[f]._labels[c[f]._labels.length-1],w=k.textBlock.width*Math.cos(Math.PI/
713
+ c[f].createLabelsAndCalculateHeight():0)),T+=p[f]+c[f].margin,$+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));u.push(p);if(b&&0<b.length)for(D=[],f=0;f<b.length;f++)D.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateHeight():0)),aa+=b[f].margin;else D.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));B.push(D);if(c&&0<c.length)for(f=0;f<c.length;f++)0<c[f]._labels.length&&(k=c[f]._labels[0],H=c[f]._labels[c[f]._labels.length-1],w=k.textBlock.width*Math.cos(Math.PI/
713
714
  180*Math.abs(k.textBlock.angle))+(k.textBlock.height-H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.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(f=0;f<b.length;f++)b[f]&&0<b[f]._labels.length&&(k=b[f]._labels[0],H=b[f]._labels[b[f]._labels.length-1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-
714
715
  H.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),z=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(r.panEnabled)for(f=0;f<c.length;f++)p[f]=l(r.sessionVariables.axisY[f].height)?r.sessionVariables.axisY[f].height=p[f]:r.sessionVariables.axisY[f].height;else for(f=0;f<c.length;f++)r.sessionVariables.axisY[f].height=p[f];if(c&&0<c.length)for(f=c.length-1;0<=
715
716
  f;f--)k=Math.round(g.y2)-("inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),m=Math.round(g.y2>c[f].chart.height?c[f].chart.height:g.y2)-("inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),c[f].lineCoordinates.y1=k-(p[f]+c[f].margin+Y),c[f].lineCoordinates.y2=k-(p[f]+c[f].margin+Y),"inside"===c[f].labelPlacement&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+
716
717
  c[f].labelEffectiveHeight+(r.isNavigator?0:2),c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&(c[f].lineCoordinates.y1+=c[f].tickLength,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:h,y1:k-(p[f]+Y+c[f].margin),x2:n,y2:m-(Y+c[f].margin),width:n-h,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),
717
- Y+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(k=Math.round(g.y1)+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),m=Math.round(g.y1+(B[f]+b[f].margin+U))+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),b[f].lineCoordinates.y1=m,b[f].lineCoordinates.y2=m,"inside"===b[f].labelPlacement&&(b[f].lineCoordinates.y1=m-b[f].labelEffectiveHeight-
718
- 5,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.y1-=b[f].tickLength,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:h,y1:k+(b[f].margin+U),x2:n,y2:m,width:n-h},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),U+=B[f]+b[f].margin);
719
- if(a&&0<a.length)for(f=0;f<a.length;f++){$=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1+d);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;n=Math.round(g.x1+V+d);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2-T):g.y2>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2;if(c&&0<c.length)for(H=0;H<
720
- c.length;H++)c[H]&&c[H].labelAutoFit&&(n=c[H].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),h=0>c[H].labelAngle||0===c[H].labelAngle?n-V:h);if(b&&0<b.length)for(H=0;H<b.length;H++)b[H]&&b[H].labelAutoFit&&(n=b[H].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),h=n-V);a[f].lineCoordinates=
721
- {x1:n-S,y1:k,x2:n-S,y2:m,height:Math.abs(m-k)};"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-a[f].labelEffectiveWidth-5,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);a[f].bounds={x1:n-(E[f]+S),y1:k,x2:n-S,y2:m,height:m-k};a[f].bounds.width=a[f].bounds.x2-a[f].bounds.x1;a[f].title&&(a[f]._titleTextBlock.maxWidth=
722
- 0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();S+=E[f]+a[f].margin}if(e&&0<e.length)for(f=0;f<e.length;f++){$=e[f]._labels&&0<e[f]._labels.length?e[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(g.x1-K);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;h=Math.round(g.x2-
723
- W-K);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2-T):g.y2>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2;if(c&&0<c.length)for(H=0;H<c.length;H++)c[H]&&c[H].labelAutoFit&&(h=c[H].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),n=0>c[H].labelAngle||0===c[H].labelAngle?h+W:h);if(b&&0<b.length)for(H=0;H<b.length;H++)b[H]&&
724
- b[H].labelAutoFit&&(h=b[H].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),n=h+W);e[f].lineCoordinates={x1:h+F,y1:k,x2:h+F,y2:m,height:Math.abs(m-k)};"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.x1=e[f].lineCoordinates.x1+e[f].labelEffectiveWidth+(r.isNavigator?0:5),e[f].lineCoordinates.x2=e[f].lineCoordinates.x1+e[f].lineThickness/2);"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.x1+=
718
+ Y+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(k=Math.round(g.y1)+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),m=Math.round(g.y1+(D[f]+b[f].margin+U))+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||r.isNavigator?0:5),b[f].lineCoordinates.y1=m,b[f].lineCoordinates.y2=m,"inside"===b[f].labelPlacement&&(b[f].lineCoordinates.y1=m-b[f].labelEffectiveHeight-
719
+ 5,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.y1-=b[f].tickLength,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:h,y1:k+(b[f].margin+U),x2:n,y2:m,width:n-h},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),U+=D[f]+b[f].margin);
720
+ if(a&&0<a.length)for(f=0;f<a.length;f++){$=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1+d);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;n=Math.round(g.x1+W+d);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2-T):g.y2>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2;if(c&&0<c.length)for(H=0;H<
721
+ c.length;H++)c[H]&&c[H].labelAutoFit&&(n=c[H].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),h=0>c[H].labelAngle||0===c[H].labelAngle?n-W:h);if(b&&0<b.length)for(H=0;H<b.length;H++)b[H]&&b[H].labelAutoFit&&(n=b[H].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),h=n-W);a[f].lineCoordinates=
722
+ {x1:n-S,y1:k,x2:n-S,y2:m,height:Math.abs(m-k)};"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-a[f].labelEffectiveWidth-5,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);a[f].bounds={x1:n-(C[f]+S),y1:k,x2:n-S,y2:m,height:m-k};a[f].bounds.width=a[f].bounds.x2-a[f].bounds.x1;a[f].title&&(a[f]._titleTextBlock.maxWidth=
723
+ 0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();S+=C[f]+a[f].margin}if(e&&0<e.length)for(f=0;f<e.length;f++){$=e[f]._labels&&0<e[f]._labels.length?e[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(g.x1-L);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;h=Math.round(g.x2-
724
+ V-L);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2-T):g.y2>r.height-Math.max($,10)?r.height-Math.max($,10):g.y2;if(c&&0<c.length)for(H=0;H<c.length;H++)c[H]&&c[H].labelAutoFit&&(h=c[H].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),n=0>c[H].labelAngle||0===c[H].labelAngle?h+V:h);if(b&&0<b.length)for(H=0;H<b.length;H++)b[H]&&
725
+ b[H].labelAutoFit&&(h=b[H].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(r.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),n=h+V);e[f].lineCoordinates={x1:h+F,y1:k,x2:h+F,y2:m,height:Math.abs(m-k)};"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.x1=e[f].lineCoordinates.x1+e[f].labelEffectiveWidth+(r.isNavigator?0:5),e[f].lineCoordinates.x2=e[f].lineCoordinates.x1+e[f].lineThickness/2);"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.x1+=
725
726
  e[f].tickLength,e[f].lineCoordinates.x2=e[f].lineCoordinates.x1+e[f].lineThickness/2);e[f].bounds={x1:h+F,y1:k,x2:h+x[f]+F,y2:m,height:m-k};e[f].bounds.width=e[f].bounds.x2-e[f].bounds.x1;e[f].title&&(e[f]._titleTextBlock.maxWidth=0<e[f].titleMaxWidth&&e[f].titleMaxWidth<e[f].lineCoordinates.height?e[f].titleMaxWidth:e[f].lineCoordinates.height);e[f].calculateValueToPixelConversionParameters();e[f].calculateBreaksSizeInValues();F+=x[f]+e[f].margin}for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),
726
- q[f].calculateBreaksSizeInValues());if(0<t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)J=R[t-1][f]===R[t][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)O=u[t-1][f]===u[t][f]?!0:!1;else O=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)M=C[t-1][f]===C[t][f]?!0:!1;else M=!0}if(s&&J&&O&&M)break;t++}if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&
727
+ q[f].calculateBreaksSizeInValues());if(0<t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)E=R[t-1][f]===R[t][f]?!0:!1;else E=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)K=u[t-1][f]===u[t][f]?!0:!1;else K=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)M=B[t-1][f]===B[t][f]?!0:!1;else M=!0}if(s&&E&&K&&M)break;t++}if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&
727
728
  0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateStripLinesThicknessInValues(),e[f].calculateBreaksInPixels()}for(f=0;f<q.length;f++)q[f]&&l(q[f].options.titleMaxWidth)&&(q[f].titleMaxWidth="left"===q[f]._position||"right"===q[f]._position?q[f].bounds.height:q[f].bounds.width,
728
729
  q[f].title&&(q[f]._titleTextBlock.maxWidth=q[f].titleMaxWidth||g.height))};z.render=function(a,e,c,b,d){var g=a[0]?a[0].chart:e[0].chart,h=g.ctx,k=[];k.push.apply(k,a);k.push.apply(k,e);k.push.apply(k,c);k.push.apply(k,b);g.alignVerticalAxes&&g.alignVerticalAxes();h.save();"normal"===d&&(h.beginPath(),a&&a.length&&h.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2),e&&e.length&&h.rect(2,e[e.length-1].bounds.y1,e[0].chart.width-4,e[0].bounds.y2),h.clip());if(a&&0<a.length)for(d=0;d<
729
730
  a.length;d++)a[d].renderLabelsTicksAndTitle();if(e&&0<e.length)for(d=0;d<e.length;d++)e[d].renderLabelsTicksAndTitle();h.restore();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderLabelsTicksAndTitle();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderLabelsTicksAndTitle();g.preparePlotArea();a=g.plotArea;h.save();h.beginPath();h.rect(a.x1,a.y1,Math.abs(a.x2-a.x1),Math.abs(a.y2-a.y1));h.clip();if(k&&0<k.length){for(d=0;d<k.length;d++)k[d].renderStripLinesOfThicknessType("value");for(d=0;d<k.length;d++)k[d].renderInterlacedColors()}h.restore();
@@ -780,11 +781,11 @@ e.chart.plotArea.y1,e.chart.plotArea.width,e.chart.plotArea.height),e.ctx.clip()
780
781
  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())};z.prototype.createMask=function(){if(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;t?(this.maskCanvas=wa(this.chart.width,
781
782
  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()}};
782
783
  z.prototype.renderCrosshair=function(a,e){isFinite(this.minimum)&&isFinite(this.maximum)&&this.crosshair.render(a,e)};z.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))};z.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var e,c=this.chart.plotArea;
783
- a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(J(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());
784
+ 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());
784
785
  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()}};z.prototype.renderAxisLine=function(){var a=this.chart.ctx,e=t?this.chart._preRenderCtx:a,c=Math.ceil(this.tickThickness/
785
- (this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),d,g;e.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(d=this.lineCoordinates.x2,g=this.lineCoordinates.x1):(d=this.lineCoordinates.x1,g=this.lineCoordinates.x2);e.lineWidth=this.lineThickness;e.strokeStyle=this.lineColor?this.lineColor:"black";e.setLineDash&&e.setLineDash(J(this.lineDashType,this.lineThickness));var h=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:
786
+ (this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),d,g;e.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(d=this.lineCoordinates.x2,g=this.lineCoordinates.x1):(d=this.lineCoordinates.x1,g=this.lineCoordinates.x2);e.lineWidth=this.lineThickness;e.strokeStyle=this.lineColor?this.lineColor:"black";e.setLineDash&&e.setLineDash(K(this.lineDashType,this.lineThickness));var h=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:
786
787
  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 k=this.scaleBreaks.firstBreakIndex;k<=this.scaleBreaks.lastBreakIndex;k++)e.moveTo(d,h),e.lineTo(this.scaleBreaks._appliedBreaks[k].startPixel+c,h),d=this.scaleBreaks._appliedBreaks[k].endPixel+b;d&&(e.moveTo(d,h),e.lineTo(g,h));e.stroke()}}else if(("left"===this._position||
787
- "right"===this._position)&&this.lineThickness){this.reversed?(d=this.lineCoordinates.y1,g=this.lineCoordinates.y2):(d=this.lineCoordinates.y2,g=this.lineCoordinates.y1);e.lineWidth=this.lineThickness;e.strokeStyle=this.lineColor;e.setLineDash&&e.setLineDash(J(this.lineDashType,this.lineThickness));h=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+
788
+ "right"===this._position)&&this.lineThickness){this.reversed?(d=this.lineCoordinates.y1,g=this.lineCoordinates.y2):(d=this.lineCoordinates.y2,g=this.lineCoordinates.y1);e.lineWidth=this.lineThickness;e.strokeStyle=this.lineColor;e.setLineDash&&e.setLineDash(K(this.lineDashType,this.lineThickness));h=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+
788
789
  c;else for(k=this.scaleBreaks.firstBreakIndex;k<=this.scaleBreaks.lastBreakIndex;k++)e.moveTo(h,d),e.lineTo(h,this.scaleBreaks._appliedBreaks[k].startPixel+b),d=this.scaleBreaks._appliedBreaks[k].endPixel+c;d&&(e.moveTo(h,d),e.lineTo(h,g));e.stroke()}t&&(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,
789
790
  this.chart.height));e.restore()};z.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};z.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?
790
791
  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/
@@ -852,17 +853,17 @@ if(2<e)for(h=0;h<e-2;h++)this.valueFormatString+="#"}};z.generateValueFormatStri
852
853
  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))};z.prototype.getLabelStartPoint=function(){var a=S[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()||
853
854
  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<
854
855
  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()||
855
- 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};ra(fa,V);ra(Y,V);Y.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));
856
- this.options="undefined"===typeof a?{}:a;this.parent.options[this.optionsName][e]=this.options}};Y.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),
857
- d=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;R(this.id);var g,h,k,l,m,n;a=Math.max(this.spacing,3);var p=Math.max(0,this.lineThickness);this.ctx.lineWidth=p;this.ctx.setLineDash&&this.ctx.setLineDash(J(this.lineDashType,p));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===p%2?(b.x<<0)+0.5:b.x<<0,h=1===p%2?(d.x<<0)+0.5:
856
+ 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};ra(fa,W);ra(ba,W);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));
857
+ 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),
858
+ d=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;R(this.id);var g,h,k,l,m,n;a=Math.max(this.spacing,3);var p=Math.max(0,this.lineThickness);this.ctx.lineWidth=p;this.ctx.setLineDash&&this.ctx.setLineDash(K(this.lineDashType,p));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===p%2?(b.x<<0)+0.5:b.x<<0,h=1===p%2?(d.x<<0)+0.5:
858
859
  d.x<<0,"top"===this.scaleBreaks.parent._position?(d=this.chart.plotArea.y1,k=this.chart.plotArea.y2+p/2+0.5<<0):(d=this.chart.plotArea.y2,k=this.chart.plotArea.y1-p/2+0.5<<0,a*=-1),this.bounds={x1:b-p/2,y1:d,x2:h+p/2,y2:k},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,k),this.ctx.lineTo(h,k),this.ctx.lineTo(h,d);else if("wavy"===this.type){l=b;m=d;g=0.5;n=(k-m)/a/3;for(var q=0;q<n;q++)this.ctx.bezierCurveTo(l+
859
860
  g*a,m+a,l+g*a,m+2*a,l,m+3*a),m+=3*a,g*=-1;this.ctx.bezierCurveTo(l+g*a,m+a,l+g*a,m+2*a,l,m+3*a);l=h;g*=-1;this.ctx.lineTo(l,m);for(q=0;q<n;q++)this.ctx.bezierCurveTo(l+g*a,m-a,l+g*a,m-2*a,l,m-3*a),m-=3*a,g*=-1}else{if("zigzag"===this.type){g=-1;m=d+a;l=b+a;n=(k-m)/a/2;for(q=0;q<n;q++)this.ctx.lineTo(l,m),l+=2*g*a,m+=2*a,g*=-1;this.ctx.lineTo(l,m);l+=h-b;for(q=0;q<n+1;q++)this.ctx.lineTo(l,m),l+=2*g*a,m-=2*a,g*=-1;this.ctx.lineTo(l+g*a,m+a)}}else if("left"===this.scaleBreaks.parent._position||"right"===
860
861
  this.scaleBreaks.parent._position)if(d=1===p%2?(d.y<<0)+0.5:d.y<<0,k=1===p%2?(b.y<<0)+0.5:b.y<<0,"left"===this.scaleBreaks.parent._position?(b=this.chart.plotArea.x1,h=this.chart.plotArea.x2+p/2+0.5<<0):(b=this.chart.plotArea.x2,h=this.chart.plotArea.x1-p/2+0.5<<0,a*=-1),this.bounds={x1:b,y1:d-p/2,x2:h,y2:k+p/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(h,d),this.ctx.lineTo(h,k),
861
862
  this.ctx.lineTo(b,k);else if("wavy"===this.type){l=b;m=d;g=0.5;n=(h-l)/a/3;for(q=0;q<n;q++)this.ctx.bezierCurveTo(l+a,m+g*a,l+2*a,m+g*a,l+3*a,m),l+=3*a,g*=-1;this.ctx.bezierCurveTo(l+a,m+g*a,l+2*a,m+g*a,l+3*a,m);m=k;g*=-1;this.ctx.lineTo(l,m);for(q=0;q<n;q++)this.ctx.bezierCurveTo(l-a,m+g*a,l-2*a,m+g*a,l-3*a,m),l-=3*a,g*=-1}else if("zigzag"===this.type){g=1;m=d-a;l=b+a;n=(h-l)/a/2;for(q=0;q<n;q++)this.ctx.lineTo(l,m),m+=2*g*a,l+=2*a,g*=-1;this.ctx.lineTo(l,m);m+=k-d;for(q=0;q<n+1;q++)this.ctx.lineTo(l,
862
- m),m+=2*g*a,l-=2*a,g*=-1;this.ctx.lineTo(l+a,m+g*a)}0<p&&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}};ra(ia,V);ia.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=
863
- this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[e]=this.options}};ia.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();
864
- var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;R(this.id);var d,g,h,k;this.ctx.lineWidth=e;this.ctx.setLineDash&&this.ctx.setLineDash(J(this.lineDashType,e));if("bottom"===this.parent._position||"top"===this.parent._position)a="pixel"===this._thicknessType?a.x:(this.parent.convertValueToPixel(this.endValue)+this.parent.convertValueToPixel(this.startValue))/2,d=g=1===this.ctx.lineWidth%2?(a<<0)+0.5:a<<0,h=this.chart.plotArea.y1,k=this.chart.plotArea.y2,this.bounds={x1:d-e/2,y1:h,x2:g+e/2,y2:k};
865
- else if("left"===this.parent._position||"right"===this.parent._position)a="pixel"===this._thicknessType?a.y:(this.parent.convertValueToPixel(this.endValue)+this.parent.convertValueToPixel(this.startValue))/2,h=k=1===this.ctx.lineWidth%2?(a<<0)+0.5:a<<0,d=this.chart.plotArea.x1,g=this.chart.plotArea.x2,this.bounds={x1:d,y1:h-e/2,x2:g,y2:k+e/2};this.ctx.moveTo(d,h);this.ctx.lineTo(g,k);this.ctx.stroke();this.ctx.globalAlpha=b}this.ctx.restore()};ra(da,V);da.prototype.showAt=function(a){if(!this.enabled)return!1;
863
+ m),m+=2*g*a,l-=2*a,g*=-1;this.ctx.lineTo(l+a,m+g*a)}0<p&&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}};ra(ha,W);ha.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=
864
+ this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[e]=this.options}};ha.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();
865
+ var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;R(this.id);var d,g,h,k;this.ctx.lineWidth=e;this.ctx.setLineDash&&this.ctx.setLineDash(K(this.lineDashType,e));if("bottom"===this.parent._position||"top"===this.parent._position)a="pixel"===this._thicknessType?a.x:(this.parent.convertValueToPixel(this.endValue)+this.parent.convertValueToPixel(this.startValue))/2,d=g=1===this.ctx.lineWidth%2?(a<<0)+0.5:a<<0,h=this.chart.plotArea.y1,k=this.chart.plotArea.y2,this.bounds={x1:d-e/2,y1:h,x2:g+e/2,y2:k};
866
+ else if("left"===this.parent._position||"right"===this.parent._position)a="pixel"===this._thicknessType?a.y:(this.parent.convertValueToPixel(this.endValue)+this.parent.convertValueToPixel(this.startValue))/2,h=k=1===this.ctx.lineWidth%2?(a<<0)+0.5:a<<0,d=this.chart.plotArea.x1,g=this.chart.plotArea.x2,this.bounds={x1:d,y1:h-e/2,x2:g,y2:k+e/2};this.ctx.moveTo(d,h);this.ctx.lineTo(g,k);this.ctx.stroke();this.ctx.globalAlpha=b}this.ctx.restore()};ra(da,W);da.prototype.showAt=function(a){if(!this.enabled)return!1;
866
867
  var e=this.chart,c=!1;e.resetOverlayedCanvas();e.clearedOverlayedCanvas=this.parent.type;this.chart.renderCrosshairs(this.parent,!1);var b,d="xySwapped"===e.plotInfo.axisPlacement;"bottom"===this.parent._position?b=d?e.axisY:e.axisX:"top"===this.parent._position?b=d?e.axisY2:e.axisX2:"left"===this.parent._position?b=d?e.axisX:e.axisY:"right"===this.parent._position&&(b=d?e.axisX2:e.axisY2);if(b)for(d=0;d<b.length;d++)this.parent===b[d]&&(b[d]._crosshairValue=a>=b[d].viewportMinimum&&a<=b[d].viewportMaximum?
867
868
  a:null);b=["axisX","axisX2","axisY","axisY2"];for(d=0;d<b.length;d++)for(var g=b[d],h=0;h<e[g].length;h++){var k=e[g][h],n=k._crosshairValue;k.crosshair&&k.crosshair.enabled&&(this.parent===k&&(k.sessionVariables.crosshairShownByPixel=!1,k.sessionVariables.crosshairValue=k.crosshair._updatedValue=n||a),!l(n)&&n>=k.viewportMinimum&&n<=k.viewportMaximum?(k.showCrosshair(n),this===k.crosshair&&(c=!0)):void 0!==n&&(k.sessionVariables.crosshairValue=null,k.crosshair._updatedValue=null))}this.chart.toolTip&&
868
869
  (this.chart.toolTip._entries&&this.chart.sessionVariables._dataHighlighted)&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return c};da.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.toolTip&&(this.chart.toolTip._entries&&this.chart.sessionVariables._dataHighlighted)&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);this.chart.renderCrosshairs(this.parent,!1);this.parent.sessionVariables._crosshairHidden=this._hidden=!0};da.prototype.render=
@@ -904,7 +905,7 @@ this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.
904
905
  1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataSeries.dataPointEOs[v.index].cumulativeSum}):l(this.options.label)?ea(v.dataSeries.dataPointEOs[v.index].cumulativeSum,this.valueFormatString,this.chart._cultureInfo):
905
906
  this.label,this.value=v.dataSeries.dataPointEOs[v.index].cumulativeSum):(n=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y)<<0,0!==v.dataPoint.y%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,
906
907
  axis:this.parent,crosshair:this.options,value:v.dataPoint.y}):l(this.options.label)?ea(v.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=v.dataPoint.y);g=h=n;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds={x1:b,y1:g-q/2,x2:d,y2:h+q/2};m.y=h+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+
907
- m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}r=null;f.globalAlpha=p;0<q&&f.setLineDash&&f.setLineDash(J(this.lineDashType,q));if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1+m.fontSize/2),"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>
908
+ m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}r=null;f.globalAlpha=p;0<q&&f.setLineDash&&f.setLineDash(K(this.lineDashType,q));if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1+m.fontSize/2),"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>
908
909
  this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<q&&(f.moveTo(b,g),f.lineTo(d,h),f.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1);if("left"===this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1),"right"===
909
910
  this.parent._position&&m.x+m.measureText().width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.measureText().width),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<q&&(f.moveTo(b,g),f.lineTo(d,h),f.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1)}else{if("bottom"===this.parent._position||"top"===this.parent._position)b=d=k=1===f.lineWidth%2?(a<<0)+0.5:a<<0,g=this.chart.plotArea.y1,
910
911
  h=this.chart.plotArea.y2,this.bounds={x1:b-q/2,y1:g,x2:d+q/2,y2:h};else if("left"===this.parent._position||"right"===this.parent._position)g=h=n=1===f.lineWidth%2?(e<<0)+0.5:e<<0,b=this.chart.plotArea.x1,d=this.chart.plotArea.x2,this.bounds={x1:b,y1:g-q/2,x2:d,y2:h+q/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){u=!1;if(this.parent.labels)for(t=Math.ceil(this.parent.interval),r=0;r<this.parent.viewportMaximum;r+=t)if(this.parent.labels[r])u=
@@ -917,10 +918,10 @@ this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,va
917
918
  c,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?Fa(l(c)?this.parent.convertPixelToValue(a):c,this.valueFormatString,this.chart._cultureInfo):this.label;m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.width);m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1);"bottom"===this.parent._position?
918
919
  m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position)m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,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,m.y=e+
919
920
  m.fontSize/2-m.measureText().height/2+2,m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2),"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2);"left"===this.parent._position&&m.x<this.chart.bounds.x1?m.x=this.chart.bounds.x1:"right"===this.parent._position&&
920
- m.x+m.measureText().width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.measureText().width:"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2);f.globalAlpha=p;0<q&&("bottom"!==this.parent._position||d<=this.parent.lineCoordinates.x2)&&(f.setLineDash&&f.setLineDash(J(this.lineDashType,
921
+ m.x+m.measureText().width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.measureText().width:"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2);f.globalAlpha=p;0<q&&("bottom"!==this.parent._position||d<=this.parent.lineCoordinates.x2)&&(f.setLineDash&&f.setLineDash(K(this.lineDashType,
921
922
  q)),f.moveTo(b,g),f.lineTo(d,h),f.stroke(),this.parent.sessionVariables._crosshairHidden=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(k);if("left"===this.parent._position||"right"===this.parent._position)this.parent.sessionVariables.crosshairValue=
922
923
  this._updatedValue=this.parent.convertPixelToValue(n);this._textBlock=m;this._label=c;l(c)||this.renderLabel();f.restore();f.globalAlpha=s};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),
923
- l(this._label)&&this.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this.parent,value:this.value},this.parent))};ra(na,V);na.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");
924
+ l(this._label)&&this.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this.parent,value:this.value},this.parent))};ra(na,W);na.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");
924
925
  this.updateOption("fontSize");this.updateOption("fontColor");this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("fontStyle")};na.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)";
925
926
  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=t?"italic":"normal";a.style.fontSize="14px";a.style.color="#000000";a.style.textShadow="1px 1px 1px rgba(0, 0, 0, 0.1)";
926
927
  a.style.textAlign="left";a.style.border="2px solid gray";a.style.background=t?"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";t||(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);
@@ -944,12 +945,12 @@ this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness
944
945
  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<g.length;b++)e.push({xValue:g[b].dataPoint.x,dataPoint:g[b].dataPoint,dataSeries:g[b].dataSeries,dataPointIndex:g[b].index,dataSeriesIndex:g[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,
945
946
  content:c,entries:e}}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);this._dataSeriesIndex=this._xValue=null}};na.prototype.highlightObjects=function(a){var e=this.chart.overlaidCanvasCtx;l(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas?(this.chart.resetOverlayedCanvas(),e.clearRect(0,0,this.chart.width,this.chart.height),this.chart.clearedOverlayedCanvas="toolTip",this.chart.sessionVariables._dataHighlighted=!1):
946
947
  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],g=b.dataPoints[d.dataPointIndex],h=d.dataPointIndex;!1===g.highlightEnabled||!0!==b.highlightEnabled&&!0!==g.highlightEnabled||("line"===b.type||"stepLine"===b.type||
947
- "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?(g=b.getMarkerProperties(h,d.x1,d.y1,this.chart.overlaidCanvasCtx),g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),W.drawMarkers([g]),"undefined"!==typeof d.y2&&(g=b.getMarkerProperties(h,d.x1,d.y2,this.chart.overlaidCanvasCtx),
948
- g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),W.drawMarkers([g])),this.chart.sessionVariables._dataHighlighted=!0):"bubble"===b.type?(g=b.getMarkerProperties(h,d.x1,d.y1,this.chart.overlaidCanvasCtx),g.size=d.size,g.color="white",g.borderColor="white",e.globalAlpha=0.3,W.drawMarkers([g]),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===
949
- b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?(ba(e,d.x1,d.y1,d.x2,d.y2,"white",0,null,!1,!1,!1,!1,0.3),this.chart.sessionVariables._dataHighlighted=!0):"pie"===b.type||"doughnut"===b.type?(sa(e,d.center,d.radius,"white",b.type,d.startAngle,d.endAngle,0.3,d.percentInnerRadius),this.chart.sessionVariables._dataHighlighted=!0):"funnel"===b.type||"pyramid"===b.type?(ta(e,d.funnelSection,0.3,"white"),this.chart.sessionVariables._dataHighlighted=
950
- !0):"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(),ba(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,this.chart.sessionVariables._dataHighlighted=!0):"ohlc"===
948
+ "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?(g=b.getMarkerProperties(h,d.x1,d.y1,this.chart.overlaidCanvasCtx),g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),Y.drawMarkers([g]),"undefined"!==typeof d.y2&&(g=b.getMarkerProperties(h,d.x1,d.y2,this.chart.overlaidCanvasCtx),
949
+ g.size=Math.max(1.5*g.size<<0,10),g.borderColor=g.borderColor||"#FFFFFF",g.borderThickness=g.borderThickness||Math.ceil(0.1*g.size),Y.drawMarkers([g])),this.chart.sessionVariables._dataHighlighted=!0):"bubble"===b.type?(g=b.getMarkerProperties(h,d.x1,d.y1,this.chart.overlaidCanvasCtx),g.size=d.size,g.color="white",g.borderColor="white",e.globalAlpha=0.3,Y.drawMarkers([g]),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===
950
+ b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?(aa(e,d.x1,d.y1,d.x2,d.y2,"white",0,null,!1,!1,!1,!1,0.3),this.chart.sessionVariables._dataHighlighted=!0):"pie"===b.type||"doughnut"===b.type?(sa(e,d.center,d.radius,"white",b.type,d.startAngle,d.endAngle,0.3,d.percentInnerRadius),this.chart.sessionVariables._dataHighlighted=!0):"funnel"===b.type||"pyramid"===b.type?(ta(e,d.funnelSection,0.3,"white"),this.chart.sessionVariables._dataHighlighted=
951
+ !0):"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(),aa(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,this.chart.sessionVariables._dataHighlighted=!0):"ohlc"===
951
952
  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,this.chart.sessionVariables._dataHighlighted=!0):"boxAndWhisker"===b.type?(e.save(),e.globalAlpha=1,e.strokeStyle=d.stemColor,e.lineWidth=2*d.stemThickness,0<d.stemThickness&&(e.beginPath(),
952
- 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(),ba(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+
953
+ 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(),aa(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+
953
954
  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,this.chart.sessionVariables._dataHighlighted=!0):"error"===b.type&&(B(e,d.x1,d.y1,d.x2,d.y2,"white",d.whiskerProperties,d.stemProperties,d.isXYSwapped,0.3),
954
955
  this.chart.sessionVariables._dataHighlighted=!0))}}e.restore();e.globalAlpha=1;e.beginPath()};na.prototype.getToolTipInnerHTML=function(a){var e=a.entries,c=null,b=null,d=null,g=0;a="";this.isToolTipDefinedInData=!0;for(var h=0;h<e.length;h++)if(e[h].dataSeries.toolTipContent||e[h].dataPoint.toolTipContent){this.isToolTipDefinedInData=!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))e={chart:this.chart,toolTip:this.options,entries:e},
955
956
  c=this.contentFormatter?this.contentFormatter(e):this.content(e);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var k=null,l="",h=0;h<e.length;h++){b=e[h].dataSeries;d=e[h].dataPoint;g=e[h].index;a="";if(0===h&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?l+="undefined"!==typeof this.chart.axisX[0].labels[d.x]?this.chart.axisX[0].labels[d.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(l+="undefined"!==typeof this.chart.axisX2[0].labels[d.x]?
@@ -980,19 +981,19 @@ Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.
980
981
  g[0].dataSeries.radius*Math.sin(g[0].dataSeries.dataPointEOs[g[0].index].midAngle),b<g[0].dataSeries.dataPointEOs[g[0].index].center.y&&(b+=this.container.clientHeight)):"funnel"===g[0].dataSeries.type||"pyramid"===g[0].dataSeries.type?(b=g[0].dataSeries.dataPointEOs[g[0].dataSeries.reversed?g[0].dataSeries.dataPointEOs.length-1-g[0].index:g[0].index].sectionsofFunnel,b="undefined"!==typeof b.x5?(b.y2+b.y4)/2:(b.y2+b.y3)/2+this.container.clientHeight/2):b="bar"===g[0].dataSeries.type||"rangeBar"===
981
982
  g[0].dataSeries.type||"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x):g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y.length?g[0].dataPoint.y[g[0].dataPoint.y.length-1]:g[0].dataPoint.y):b=g[0].dataSeries.axisY.convertValueToPixel(g[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||h?this.disableAnimation():
982
983
  (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};na.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)?
983
- 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)}};na.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ja.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=
984
- [];t&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ja.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ja.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var e=[],c=Ra(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],g=d.dataPoints[b.dataPointIndex],h=b.dataPointIndex;
984
+ 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)}};na.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ia.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=
985
+ [];t&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ia.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ia.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var e=[],c=Ra(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],g=d.dataPoints[b.dataPointIndex],h=b.dataPointIndex;
985
986
  b.eventParameter={x:c.x,y:c.y,dataPoint:g,dataSeries:d.options,dataPointIndex:h,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:g,userContext:g,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:g,dataSeries:d.options,dataPointIndex:h,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:d,userContext:d.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",
986
987
  click:"click"};e.push(this.objectMap[d.id])}else"legendItem"===b.objectType&&(d=this.chart.data[b.dataSeriesIndex],g=null!==b.dataPointIndex?d.dataPoints[b.dataPointIndex]:null,b.eventParameter={x:c.x,y:c.y,dataSeries:d.options,dataPoint:g,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));
987
988
  d=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){g=!0;for(b=0;b<e.length;b++)if(e[b].id===this.mouseoveredObjectMaps[c].id){g=!1;break}g?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],
988
- "click",a):"mousemove"===a.type&&this.fireEvent(e[c],"mousemove",a)}}};ja.prototype.fireEvent=function(a,e,c){if(a&&e){var b=a.eventParameter,d=a.eventContext,g=a.eventContext.userContext;g&&(d&&g[d[e]])&&g[d[e]].call(g,b);"mouseout"!==e?g.cursor&&g.cursor!==c.target.style.cursor&&(c.target.style.cursor=g.cursor):(c.target.style.cursor=this.chart.panEnabled?"itemmouseout"!==d.mouseout||g.dockInsidePlotArea?"move":this.chart._defaultCursor:this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);
989
+ "click",a):"mousemove"===a.type&&this.fireEvent(e[c],"mousemove",a)}}};ia.prototype.fireEvent=function(a,e,c){if(a&&e){var b=a.eventParameter,d=a.eventContext,g=a.eventContext.userContext;g&&(d&&g[d[e]])&&g[d[e]].call(g,b);"mouseout"!==e?g.cursor&&g.cursor!==c.target.style.cursor&&(c.target.style.cursor=g.cursor):(c.target.style.cursor=this.chart.panEnabled?"itemmouseout"!==d.mouseout||g.dockInsidePlotArea?"move":this.chart._defaultCursor:this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);
989
990
  "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)}};ma.prototype.animate=function(a,e,c,b,d){var g=this;this.chart.isAnimating=!0;d=d||M.easing.linear;c&&this.animations.push({startTime:(new Date).getTime()+(a?a:0),duration:e,animationCallback:c,
990
991
  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(){g.animate.call(g)}):this.chart.isAnimating=!1};ma.prototype.cancelAllAnimations=function(){this.animations=
991
992
  [];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var M={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/
992
993
  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*
993
- ((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}}},W={drawMarker:function(a,e,c,b,d,g,h,k){if(c){var l=1;c.fillStyle=g?g:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=k?k:0;c.setLineDash&&c.setLineDash(J("solid",k));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"square"===b?
994
+ ((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}}},Y={drawMarker:function(a,e,c,b,d,g,h,k){if(c){var l=1;c.fillStyle=g?g:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=k?k:0;c.setLineDash&&c.setLineDash(K("solid",k));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"square"===b?
994
995
  (c.beginPath(),c.rect(a-d/2,e-d/2,d,d),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"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(),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l)),c.beginPath()):"cross"===b&&(c.strokeStyle=g,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),
995
- 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];W.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return s}();s.version="v3.15.6 GA";window.CanvasJS&&(s&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=s)})();
996
+ 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];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return s}();s.version="v3.15.8 GA";window.CanvasJS&&(s&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=s)})();
996
997
 
997
998
  /*
998
999
  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.