diff --git a/files/www/js/jquery.canvasjs.min.js b/files/www/js/jquery.canvasjs.min.js index c3bd5013..bda42288 100644 --- a/files/www/js/jquery.canvasjs.min.js +++ b/files/www/js/jquery.canvasjs.min.js @@ -1,416 +1,444 @@ /* - CanvasJS HTML5 & JavaScript Charts - v1.7.0 GA - http://canvasjs.com/ + CanvasJS HTML5 & JavaScript Charts - v1.8.0 GA - http://canvasjs.com/ Copyright 2013 fenopix */ -(function(){function O(a,b){a.prototype=Ba(b.prototype);a.prototype.constructor=a;a.base=b.prototype}function Ba(a){function b(){}b.prototype=a;return new b}function ua(a,b,c){"millisecond"===c?a.setMilliseconds(a.getMilliseconds()+1*b):"second"===c?a.setSeconds(a.getSeconds()+1*b):"minute"===c?a.setMinutes(a.getMinutes()+1*b):"hour"===c?a.setHours(a.getHours()+1*b):"day"===c?a.setDate(a.getDate()+1*b):"week"===c?a.setDate(a.getDate()+7*b):"month"===c?a.setMonth(a.getMonth()+1*b):"year"===c&&a.setFullYear(a.getFullYear()+ -1*b);return a}function $(a,b){return B[b+"Duration"]*a}function L(a,b){var c=!1;0>a&&(c=!0,a*=-1);a=""+a;for(b=b?b:1;a.length>16).toString(16),c=((a&65280)>>8).toString(16);a=((a&255)>>0).toString(16);b=2>b.length?"0"+b:b;c=2>c.length?"0"+c:c;a=2>a.length?"0"+a:a;return"#"+b+c+a}function Ea(a, -b){var c=this.length>>>0,d=Number(b)||0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);dc;c++)if(a[c]!==a[c+4]|a[c]!==a[c+8]|a[c]!==a[c+12]){b=!1;break}return b?a[0]<<16|a[1]<<8|a[2]:0}function N(a, -b,c){return a in b?b[a]:c[a]}function ga(a,b,c){if(t&&ya){var d=a.getContext("2d");ha=d.webkitBackingStorePixelRatio||d.mozBackingStorePixelRatio||d.msBackingStorePixelRatio||d.oBackingStorePixelRatio||d.backingStorePixelRatio||1;J=oa/ha;a.width=b*J;a.height=c*J;oa!==ha&&(a.style.width=b+"px",a.style.height=c+"px",d.scale(J,J))}else a.width=b,a.height=c}function V(a,b){var c=document.createElement("canvas");c.setAttribute("class","canvasjs-chart-canvas");ga(c,a,b);t||"undefined"===typeof G_vmlCanvasManager|| -G_vmlCanvasManager.initElement(c);return c}function za(a,b,c){if(a&&b&&c){c=c+"."+("jpeg"===b?"jpg":b);var d="image/"+b;a=a.toDataURL(d);var e=!1,f=document.createElement("a");f.download=c;f.href=a;f.target="_blank";if("undefined"!==typeof Blob&&new Blob){for(var g=a.replace(/^data:[a-z/]*;base64,/,""),g=atob(g),k=new ArrayBuffer(g.length),p=new Uint8Array(k),l=0;l
Please right click on the image and save it to your device
"),b.document.close()}}}function P(a,b,c){b.getAttribute("state")!==c&&(b.setAttribute("state",c), -b.setAttribute("type","button"),b.style.position="relative",b.style.margin="0px 0px 0px 0px",b.style.padding="3px 4px 0px 4px",b.style.cssFloat="left",b.setAttribute("title",a._cultureInfo[c+"Text"]),b.innerHTML=""+a._cultureInfo[c+"Text"]+"")}function pa(){for(var a=null,b=0;b=this.labelAngle?this.labelAngle-=180:180=this.labelAngle?this.labelAngle-=180:270=this.labelAngle&&(this.labelAngle-=360);if(this._options.stripLines&& -0C?"a":"p";case "tt":return 12>C?"am":"pm";case "T":return 12>C?"A":"P";case "TT":return 12>C?"AM":"PM";case "K":return r?"UTC":(String(k).match(f)||[""]).pop().replace(g,"");case "z":return(0a?!0:!1;d&&(a*=-1);var e=c?c.decimalSeparator:".",f=c?c.digitGroupSeparator:",",g="";b=String(b);var g=1,k=c="",p=-1,l=[],h=[],n=0,m=0,q=0,r=!1,s=0,k=b.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);b=null;for(var t=0;k&&tp)p=t;else{if("%"===b)g*=100;else if("\u2030"===b){g*=1E3;continue}else if(","===b[0]&&"."===b[b.length-1]){g/=Math.pow(1E3,b.length- -1);p=t+b.length-1;continue}else"E"!==b[0]&&"e"!==b[0]||"0"!==b[b.length-1]||(r=!0);0>p?(l.push(b),"#"===b||"0"===b?n++:","===b&&q++):(h.push(b),"#"!==b&&"0"!==b||m++)}r&&(b=Math.floor(a),s=(0===b?"":String(b)).length-n,g/=Math.pow(10,s));0>p&&(p=t);g=(a*g).toFixed(m);b=g.split(".");g=(b[0]+"").split("");a=(b[1]+"").split("");g&&"0"===g[0]&&g.shift();for(t=r=k=m=p=0;0s?b.replace("+","").replace("-",""):b.replace("-",""),c+=b.replace(/[0]+/,function(a){return L(s, -a.length)}));d="";for(f=!1;0s?b.replace("+","").replace("-",""):b.replace("-",""),d+=b.replace(/[0]+/,function(a){return L(s,a.length)}));return c+((f?e:"")+d)},na=function(a){var b=0,c=0;a=a||window.event; -a.offsetX||0===a.offsetX?(b=a.offsetX,c=a.offsetY):a.layerX||0==a.layerX?(b=a.layerX,c=a.layerY):(b=a.pageX-a.target.offsetLeft,c=a.pageY-a.target.offsetTop);return{x:b,y:c}},ya=!0,oa=window.devicePixelRatio||1,ha=1,J=ya?oa/ha:1,Fa={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAKRSURBVEiJrdY/iF1FFMfxzwnZrGISUSR/JLGIhoh/QiRNBLWxMLIWEkwbgiAoFgoW2mhlY6dgpY2IlRBRxBSKhSAKIklWJRYuMZKAhiyopAiaTY7FvRtmZ+/ed9/zHRjezLw5v/O9d86cuZGZpmURAfdn5o9DfdZNLXpjz+LziPgyIl6MiG0jPTJzZBuyDrP4BVm0P/AKbljTb4ToY/gGewYA7KyCl+1b3DUYANvwbiHw0gCAGRzBOzjTAXEOu0cC4Ch+r5x/HrpdrcZmvIDFSucMtnYCYC++6HmNDw8FKDT34ETrf639/azOr5vwRk/g5fbeuABtgC04XWk9VQLciMP4EH/3AFzErRNC7MXlQmsesSoHsGPE23hmEoBW+61K66HMXFmIMvN8myilXS36R01ub+KfYvw43ZXwYDX+AHP4BAci4pFJomfmr/ihmNofESsBImJGk7mlncrM45n5JPbhz0kAWpsv+juxaX21YIPmVJS2uNzJMS6ZNexC0d+I7fUWXLFyz2kSZlpWPvASlmqAf/FXNXf3FAF2F/1LuFifAlionB6dRuSI2IwHi6lzmXmp6xR8XY0fiIh7psAwh+3FuDkRHQVjl+a8lkXjo0kLUKH7XaV5oO86PmZ1FTzyP4K/XGl9v/zwfbW7BriiuETGCP5ch9bc9f97HF/vcFzCa5gdEPgWq+t/4v0V63oE1uF4h0DiFJ7HnSWMppDdh1dxtsPvJ2wcBNAKbsJXa0Ck5opdaBPsRNu/usba09i1KsaAVzmLt3sghrRjuK1Tf4xkegInxwy8gKf7dKMVH2QRsV5zXR/Cftyu+aKaKbbkQrsdH+PTzLzcqzkOQAVzM+7FHdiqqe2/YT4zF/t8S/sPmawyvC974vcAAAAASUVORK5CYII="}, +(function(){function O(a,b){a.prototype=Ca(b.prototype);a.prototype.constructor=a;a.base=b.prototype}function Ca(a){function b(){}b.prototype=a;return new b}function ta(a,b,c){"millisecond"===c?a.setMilliseconds(a.getMilliseconds()+1*b):"second"===c?a.setSeconds(a.getSeconds()+1*b):"minute"===c?a.setMinutes(a.getMinutes()+1*b):"hour"===c?a.setHours(a.getHours()+1*b):"day"===c?a.setDate(a.getDate()+1*b):"week"===c?a.setDate(a.getDate()+7*b):"month"===c?a.setMonth(a.getMonth()+1*b):"year"===c&&a.setFullYear(a.getFullYear()+ +1*b);return a}function L(a,b){var c=!1;0>a&&(c=!0,a*=-1);a=""+a;for(b=b?b:1;a.length>16).toString(16),c=((a&65280)>>8).toString(16);a=((a&255)>>0).toString(16);b=2>b.length?"0"+b:b;c=2>c.length?"0"+c:c;a=2>a.length?"0"+a:a;return"#"+b+c+a}function Ea(a,b){var c=this.length>>>0,d=Number(b)|| +0,d=0>d?Math.ceil(d):Math.floor(d);for(0>d&&(d+=c);dc;c++)if(a[c]!==a[c+4]|a[c]!==a[c+8]|a[c]!==a[c+12]){b=!1;break}return b?a[0]<<16|a[1]<<8|a[2]:0}function N(a, +b,c){return a in b?b[a]:c[a]}function fa(a,b,c){if(t&&ya){var d=a.getContext("2d");ga=d.webkitBackingStorePixelRatio||d.mozBackingStorePixelRatio||d.msBackingStorePixelRatio||d.oBackingStorePixelRatio||d.backingStorePixelRatio||1;J=oa/ga;a.width=b*J;a.height=c*J;oa!==ga&&(a.style.width=b+"px",a.style.height=c+"px",d.scale(J,J))}else a.width=b,a.height=c}function V(a,b){var c=document.createElement("canvas");c.setAttribute("class","canvasjs-chart-canvas");fa(c,a,b);t||"undefined"===typeof G_vmlCanvasManager|| +G_vmlCanvasManager.initElement(c);return c}function za(a,b,c){if(a&&b&&c){c=c+"."+b;var d="image/"+b;a=a.toDataURL(d);var e=!1,f=document.createElement("a");f.download=c;f.href=a;f.target="_blank";if("undefined"!==typeof Blob&&new Blob){for(var g=a.replace(/^data:[a-z/]*;base64,/,""),g=atob(g),k=new ArrayBuffer(g.length),k=new Uint8Array(k),p=0;p
Please right click on the image and save it to your device
"),b.document.close()}}}function Q(a,b,c){b.getAttribute("state")!==c&&(b.setAttribute("state",c),b.setAttribute("type", +"button"),b.style.position="relative",b.style.margin="0px 0px 0px 0px",b.style.padding="3px 4px 0px 4px",b.style.cssFloat="left",b.setAttribute("title",a._cultureInfo[c+"Text"]),b.innerHTML=""+a._cultureInfo[c+"Text"]+"")}function ha(){for(var a=null,b=0;b=this.labelAngle?this.labelAngle-=180:180=this.labelAngle?this.labelAngle-=180:270=this.labelAngle&&(this.labelAngle-=360);if(this._options.stripLines&&0t?"a":"p";case "tt":return 12> +t?"am":"pm";case "T":return 12>t?"A":"P";case "TT":return 12>t?"AM":"PM";case "K":return r?"UTC":(String(k).match(f)||[""]).pop().replace(g,"");case "z":return(0a?!0:!1;d&&(a*=-1);var e=c?c.decimalSeparator:".",f=c? +c.digitGroupSeparator:",",g="";b=String(b);var g=1,k=c="",p=-1,h=[],l=[],m=0,n=0,q=0,r=!1,s=0,k=b.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);b=null;for(var w=0;k&&wp)p=w;else{if("%"===b)g*=100;else if("\u2030"===b){g*=1E3;continue}else if(","===b[0]&&"."===b[b.length-1]){g/=Math.pow(1E3,b.length-1);p=w+b.length-1;continue}else"E"!==b[0]&&"e"!==b[0]||"0"!==b[b.length-1]||(r=!0);0>p?(h.push(b),"#"===b||"0"===b?m++:","===b&&q++):(l.push(b),"#"!==b&&"0"!== +b||n++)}r&&(b=Math.floor(a),s=(0===b?"":String(b)).length-m,g/=Math.pow(10,s));0>p&&(p=w);g=(a*g).toFixed(n);b=g.split(".");g=(b[0]+"").split("");a=(b[1]+"").split("");g&&"0"===g[0]&&g.shift();for(w=r=k=n=p=0;0s?b.replace("+","").replace("-",""):b.replace("-",""),c+=b.replace(/[0]+/,function(a){return L(s,a.length)}));d="";for(f=!1;0s?b.replace("+","").replace("-",""):b.replace("-",""),d+=b.replace(/[0]+/,function(a){return L(s,a.length)}));return c+((f?e:"")+d)},na=function(a){var b=0,c=0;a=a||window.event;a.offsetX||0===a.offsetX?(b=a.offsetX,c=a.offsetY):a.layerX||0==a.layerX?(b=a.layerX,c=a.layerY):(b=a.pageX-a.target.offsetLeft,c=a.pageY-a.target.offsetTop); +return{x:b,y:c}},ya=!0,oa=window.devicePixelRatio||1,ga=1,J=ya?oa/ga:1,Fa={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAKRSURBVEiJrdY/iF1FFMfxzwnZrGISUSR/JLGIhoh/QiRNBLWxMLIWEkwbgiAoFgoW2mhlY6dgpY2IlRBRxBSKhSAKIklWJRYuMZKAhiyopAiaTY7FvRtmZ+/ed9/zHRjezLw5v/O9d86cuZGZpmURAfdn5o9DfdZNLXpjz+LziPgyIl6MiG0jPTJzZBuyDrP4BVm0P/AKbljTb4ToY/gGewYA7KyCl+1b3DUYANvwbiHw0gCAGRzBOzjTAXEOu0cC4Ch+r5x/HrpdrcZmvIDFSucMtnYCYC++6HmNDw8FKDT34ETrf639/azOr5vwRk/g5fbeuABtgC04XWk9VQLciMP4EH/3AFzErRNC7MXlQmsesSoHsGPE23hmEoBW+61K66HMXFmIMvN8myilXS36R01ub+KfYvw43ZXwYDX+AHP4BAci4pFJomfmr/ihmNofESsBImJGk7mlncrM45n5JPbhz0kAWpsv+juxaX21YIPmVJS2uNzJMS6ZNexC0d+I7fUWXLFyz2kSZlpWPvASlmqAf/FXNXf3FAF2F/1LuFifAlionB6dRuSI2IwHi6lzmXmp6xR8XY0fiIh7psAwh+3FuDkRHQVjl+a8lkXjo0kLUKH7XaV5oO86PmZ1FTzyP4K/XGl9v/zwfbW7BriiuETGCP5ch9bc9f97HF/vcFzCa5gdEPgWq+t/4v0V63oE1uF4h0DiFJ7HnSWMppDdh1dxtsPvJ2wcBNAKbsJXa0Ck5opdaBPsRNu/usba09i1KsaAVzmLt3sghrRjuK1Tf4xkegInxwy8gKf7dKMVH2QRsV5zXR/Cftyu+aKaKbbkQrsdH+PTzLzcqzkOQAVzM+7FHdiqqe2/YT4zF/t8S/sPmawyvC974vcAAAAASUVORK5CYII="}, pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAJVSURBVFiFvZe7a1RBGMV/x2hWI4JpfKCIiSBKOoOCkID/wP4BFqIIFkE02ChIiC8QDKlSiI3YqRBsBVGwUNAUdiIEUgjiAzQIIsuKJsfizsXr5t7d+8jmwLDfzHz3nLOzc7+ZxTZlGyDgZiWOCuJ9wH2gCUyuqQFgF/AGcKJNrYkBYBj40CIet+muGQi/96kM4WS7C/Tm5VUg7whJg8BkEGkCR4BDYfodsADUgP6wErO5iCtswsuJb32hdbXy8qzL5TIdmzJinHdZoZIBZcSFkGlAKs1Z3YCketZcBtouuaQNkrblMiBpBrhme7mAgU4wMCvpcFsDkq4C54DFVRTH9h+i6vlE0r5UA5ImgCuh28jB28iIs7BIVCOeStoZD64P4uPAjUTygKSx2FsK2TIwkugfk9Qkfd/E+yMWHQCeSRqx/R3gOp3LazfaS2C4B5gHDgD7U9x3E3uAH7KNpC3AHHAwTL4FHgM9GQ8vAaPA0dB/Abxqk2/gBLA9MXba9r1k/d4LfA3JtwueBeM58ucS+edXnAW23wP10N3advEi9CXizTnyN4bPS7Zn4sH/dq3t18AY4e1YLYSy3g/csj2VnFshZPuOpOeSKHCodUINuGj7YetE6je1PV9QoNPJ9StNHKodx7nRbiWrGHBGXAi5DUiqtQwtpcWK0Jubt8CltA5MEV1IfwO7+VffPwGfia5m34CT4bXujIIX0Qna1/cGMNqV/wUJE2czxD8CQ4X5Sl7Jz7SILwCDpbjKPBRMHAd+EtX4HWV5Spdc2w8kDQGPbH8py/MXMygM69/FKz4AAAAASUVORK5CYII="}, zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAMqSURBVFiFvdfbj91TFMDxz57U6GUEMS1aYzyMtCSSDhWjCZMInpAI3khE/QHtgzdRkXgSCS8SES9epKLi0oRKNETjRahREq2KS1stdRujtDPtbA97n5zdn9+5zJxTK9k5v3POXmt991p7r71+IcaoGwkhTOIebMRqzOBTvIG3Y4zTXRmqSoyx5cAKbMJOHMFJnMZ8/jyFaXyMR7G6nb1aH22cP4BvcBxziG3GKfyTIR9D6BYg1KUghPBCDveFlb/24Av8iuUYw41YVsz5G7uxKcZ4aMEpwGt5NY3V/YbHsQ6rcAHOw/kYxigewr5CZw4fYGxBKcCLOFEYehXrMdRhr5yLETxVScsOLOkKAPfn1TYMPIvLFrShUlS2FDZm8XRHACzFAWl3R2xbqPMCYhmeLCAOYEMngAczbcTvuHYxzguIy/FesR9e6gSwU/OoPYHBHgHgviIKX2Flq7k34KhmcVnbi/PC8JX4MgMcxb118wZwdz5aISscqx7VRcox7MrPQ7i+btIAJrAkf9+bI9EPmZY2IAxiTSuAldLq4Y9+AcSUh78KP0tbAcwU35cXMD1JCIFUoGiehlqAz6TNB1f1C0DK+0h+nsNPrQC2a4bqGmlD9kOGcWt+Po6pVgDvSxfJaSkFd4UQBvoAsBYbCoB3a2flM7slA0R8iyt6rAFDeDPbm8eOTpVwGD9qVq7nLbIaZnmksPU1JtsCZMXNmpdRxFasWITzh6Xj3LCzra1OxcD2QjHiGVzdpfORnMqZio2PcF23ABdJF1Np4BPptlyPi6WzPYBzpJZtHe7A6xW9cnyP8TqA//SEIYRL8Bxul7rihvwgtVn78WcGGZXa9HGd5TDujDHuOePXNiHdKjWgZX/YbsxLx/ktqbjVzTlcjUSnvI5JrdlUVp6WesZZ6R1hRrpq9+EVTGS9jTjYAuKIouGpbcurEkIYxC051KNSamazsc+xK8b4S0VnEi/j0hqTP+M27O258egQwZuzs7pI7Mf4WQXIEDc5s9sux+5+1Py2EmP8UOq6GvWhIScxfdYjUERiAt9Jd84J6a16zf8JEKT3yCm8g1UxRv8CC4pyRhzR1uUAAAAASUVORK5CYII="}, -menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMTUvMTTPsvU0AAAAP0lEQVRIie2SMQoAIBDDUvH/X667g8sJJ9KOhYYOkW0qGaU1MPdC0vGSbV19EACo3YMPAFH5BUBUjsqfAPpVXtNgGDfxEDCtAAAAAElFTkSuQmCC"}};F.prototype.setOptions=function(a,b){if(ma[this._defaultsKey]){var c=ma[this._defaultsKey],d;for(d in c)this[d]=a&&d in a?a[d]:b&&d in b?b[d]:c[d]}};F.prototype.updateOption= -function(a){var b=ma[this._defaultsKey],c=this._options.theme?this._options.theme:this.chart&&this.chart._options.theme?this.chart._options.theme:"theme1",d={},e=this[a];c&&(Y[c]&&Y[c][this._defaultsKey])&&(d=Y[c][this._defaultsKey]);a in b&&(e=a in this._options?this._options[a]:d&&a in d?d[a]:b[a]);if(e===this[a])return!1;this[a]=e;return!0};F.prototype.trackChanges=function(a){this._options._oldOptions||(this._options._oldOptions={});this._options._oldOptions[a]=this._options[a]};F.prototype.isBeingTracked= -function(a){this._options._oldOptions||(this._options._oldOptions={});return this._options._oldOptions[a]?!0:!1};F.prototype.hasOptionChanged=function(a){this._options._oldOptions||(this._options._oldOptions={});return this._options._oldOptions[a]!==this._options[a]};F.prototype.addEventListener=function(a,b,c){a&&b&&(this._eventListeners[a]=this._eventListeners[a]||[],this._eventListeners[a].push({context:c||this,eventHandler:b}))};F.prototype.removeEventListener=function(a,b){if(a&&b&&this._eventListeners[a])for(var c= -this._eventListeners[a],d=0;d=(new Date).getTime()-a._dropDownCloseTime.getTime()||(a._dropdownMenu.style.display="block",a._menuButton.blur(),a._dropdownMenu.focus())},!0));if(!this._dropdownMenu&&this.exportEnabled&&t){this._dropdownMenu=document.createElement("div");this._dropdownMenu.setAttribute("tabindex", --1);this._dropdownMenu.style.cssText="position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 1px;top: 25px;min-width: 120px;outline: 0;border: 1px solid silver;font-size: 14px;font-family: Calibri, Verdana, sans-serif;padding: 5px 0px 5px 0px;text-align: left;background-color: #fff;line-height: 20px;box-shadow: 2px 2px 10px #888888;";a._dropdownMenu.style.display="none";this._toolBar.appendChild(this._dropdownMenu);E(this._dropdownMenu, -"blur",function(){T(a._dropdownMenu);a._dropDownCloseTime=new Date},!0);var b=document.createElement("div");b.style.cssText="padding: 2px 15px 2px 10px";b.innerHTML=this._cultureInfo.saveJPGText;this._dropdownMenu.appendChild(b);E(b,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);E(b,"mouseout",function(){this.style.backgroundColor="transparent"},!0);E(b,"click",function(){za(a.canvas,"jpg",a.exportFileName);T(a._dropdownMenu)},!0);b=document.createElement("div");b.style.cssText= -"padding: 2px 15px 2px 10px";b.innerHTML=this._cultureInfo.savePNGText;this._dropdownMenu.appendChild(b);E(b,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);E(b,"mouseout",function(){this.style.backgroundColor="transparent"},!0);E(b,"click",function(){za(a.canvas,"png",a.exportFileName);T(a._dropdownMenu)},!0)}"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?P(a,a._zoomButton,"zoom"):P(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&& -P(a,a._resetButton,"reset"));if("undefined"===typeof ma.Chart.creditHref)this.creditHref="http://canvasjs.com/",this.creditText="CanvasJS.com";else var c=this.updateOption("creditText"),d=this.updateOption("creditHref");if(0===this.renderCount||c||d)this._creditLink.setAttribute("href",this.creditHref),this._creditLink.innerHTML=this.creditText;this.creditHref&&this.creditText?this._creditLink.parentElement||this._canvasJSContainer.appendChild(this._creditLink):this._creditLink.parentElement&&this._canvasJSContainer.removeChild(this._creditLink); -this._options.toolTip&&this._toolTip._options!==this._options.toolTip&&(this._toolTip._options=this._options.toolTip);for(var e in this._toolTip._options)this._toolTip._options.hasOwnProperty(e)&&this._toolTip.updateOption(e)};w.prototype._updateSize=function(){var a=0,b=0;this._options.width?a=this.width:this.width=a=0a&&"undefined"!==typeof g.startTimePercent?a>=g.startTimePercent&&g.animationCallback(g.easingFunction(a- -g.startTimePercent,0,1,1-g.startTimePercent),g):g.animationCallback(g.easingFunction(a,0,1,1),g);p.dispatchEvent("dataAnimationIterationEnd",{chart:p})},function(){d=[];for(var a=0;aa.dataSeriesIndexes.length))for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f=!1,g=0;gc.max&&(c.max=d);eb.max&&(b.max=e);if(0q&&(q*=-1);c.minDiff>q&&0!==q&&(c.minDiff=q)}if(!(dm&&!h)h=!0;else if(d>m&&h)continue;k.dataPoints[p].label&&(a.axisX.labels[d]=k.dataPoints[p].label);dc.viewPortMax&&(c.viewPortMax=d);null!==e&&(eb.viewPortMax&&(b.viewPortMax=e))}}this.plotInfo.axisXValueType=k.xValueType=f?"dateTime":"number"}};w.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&& -!(1>a.dataSeriesIndexes.length)){for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f=!1,g=[],k=[],p=0;pc.max&&(c.max=d);if(0s&&(s*=-1);c.minDiff>s&&0!==s&&(c.minDiff=s)}if(!(dr&&!m)m=!0;else if(d>r&&m)continue;l.dataPoints[h].label&&(a.axisX.labels[d]=l.dataPoints[h].label);dc.viewPortMax&&(c.viewPortMax=d);null!==e&&(a.yTotals[d]=(a.yTotals[d]?a.yTotals[d]:0)+Math.abs(e),0<=e?g[d]=g[d]?g[d]+e:e:k[d]=k[d]?k[d]+e:e)}}this.plotInfo.axisXValueType=l.xValueType=f?"dateTime":"number"}for(h in g)isNaN(h)||(a=g[h],ab.max&&(b.max=a),hc.viewPortMax||(ab.viewPortMax&&(b.viewPortMax=a)));for(h in k)isNaN(h)||(a=k[h],ab.max&&(b.max=a),hc.viewPortMax||(ab.viewPortMax&&(b.viewPortMax=a)))}};w.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f=!1,g=!1,k=!1,p=[],l=0;lc.max&&(c.max=d);if(0t&&(t*=-1);c.minDiff>t&&0!==t&&(c.minDiff=t)}if(!(ds&&!q)q=!0;else if(d>s&&q)continue;h.dataPoints[n].label&&(a.axisX.labels[d]=h.dataPoints[n].label);dc.viewPortMax&&(c.viewPortMax=d);null!== -e&&(a.yTotals[d]=(a.yTotals[d]?a.yTotals[d]:0)+Math.abs(e),0<=e?g=!0:k=!0,p[d]=p[d]?p[d]+Math.abs(e):Math.abs(e))}}this.plotInfo.axisXValueType=h.xValueType=f?"dateTime":"number"}g&&!k?(b.max=99,b.min=1):g&&k?(b.max=99,b.min=-99):!g&&k&&(b.max=-1,b.min=-99);b.viewPortMin=b.min;b.viewPortMax=b.max;a.dataPointYSums=p}};w.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f,g,k=!1,p=0;pc.max&&(c.max=d);fb.max&&(b.max=g);if(0s&&(s*=-1);c.minDiff>s&&0!==s&&(c.minDiff=s)}if(!(d -r&&!m)m=!0;else if(d>r&&m)continue;l.dataPoints[h].label&&(a.axisX.labels[d]=l.dataPoints[h].label);dc.viewPortMax&&(c.viewPortMax=d);null!==e&&(fb.viewPortMax&&(b.viewPortMax=g))}}this.plotInfo.axisXValueType=l.xValueType=k?"dateTime":"number"}};w.prototype.getDataPointAtXY=function(a,b,c){c=c||!1;for(var d=[],e=this._dataInRenderedOrder.length-1;0<=e;e--){var f=null;(f=this._dataInRenderedOrder[e].getDataPointAtXY(a,b,c))&& -d.push(f)}a=null;b=!1;for(c=0;c=e.x1&&(a<=e.x2&&b>=e.y1&&b<=e.y2)&&(d=e.id)}return d};w.prototype.getAutoFontSize=function(a,b,c){a/=400;return Math.round(Math.min(this.width,this.height)*a)};w.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};w.prototype.clearCanvas= -function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))};w.prototype.attachEvent=function(a){this._events.push(a)};w.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var b=[],c=a.changedTouches,d=c?c[0]:a,e=null;switch(a.type){case "touchstart":case "MSPointerDown":b=["mousemove","mousedown"];this._lastTouchData=na(d);this._lastTouchData.time=new Date; -break;case "touchmove":case "MSPointerMove":b=["mousemove"];break;case "touchend":case "MSPointerUp":b="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1g)){this._lastTouchData.scroll=!0;var k=window.parent||window;k&&k.scrollBy&&k.scrollBy(0,-f)}}catch(p){}this._lastTouchEventType= -a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c=f.x1&&b.x<=f.x2&&b.y>=f.y1&&b.y<=f.y2){d[c].call(d.context,b.x,b.y);"mousedown"===c&&!0===d.capture?(w.capturedEventParam=d,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.body.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===c&&(d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture(): -document.body.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else d=null}a.target.style.cursor=d&&d.cursor?d.cursor:this._defaultCursor}this._toolTip&&this._toolTip.enabled&&(c=this.plotArea,(b.xc.x2||b.yc.y2)&&this._toolTip.hide());this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}}};w.prototype._plotAreaMouseDown=function(a,b){this.isDrag=!0;this.dragStartPoint="none"!==this.plotInfo.axisPlacement?{x:a,y:b,xMinimum:this.axisX.minimum, -xMaximum:this.axisX.maximum}:{x:a,y:b}};w.prototype._plotAreaMouseUp=function(a,b){var c,d;if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var e=0,e=this.axisX.lineCoordinates,e="xySwapped"===this.plotInfo.axisPlacement?b-this.dragStartPoint.y:this.dragStartPoint.x-a;Math.abs(this.axisX.maximum-this.axisX.minimum);if(2this.axisX._absoluteMaximum&&(d=this.axisX.sessionVariables.internalMaximum-this.axisX._absoluteMaximum,this.axisX.sessionVariables.internalMaximum-=d,this.axisX.sessionVariables.internalMinimum-=d,e=!0),e&&this.render();else if(this.zoomEnabled){this.resetOverlayedCanvas();if(!this.dragStartPoint)return;"xySwapped"=== -this.plotInfo.axisPlacement?(c=Math.min(this.dragStartPoint.y,b),d=Math.max(this.dragStartPoint.y,b),12*Math.abs(this.axisX.dataInfo.minDiff)&&(this.axisX.sessionVariables.internalMinimum=d,this.axisX.sessionVariables.internalMaximum= -e,this.render()))):"normal"===this.plotInfo.axisPlacement&&(d=Math.min(this.dragStartPoint.x,a),c=Math.max(this.dragStartPoint.x,a),12*Math.abs(this.axisX.dataInfo.minDiff)&&(this.axisX.sessionVariables.internalMinimum= -d,this.axisX.sessionVariables.internalMaximum=e,this.render())))}this._ignoreNextEvent=!0;this.zoomEnabled&&"none"===this._zoomButton.style.display&&(pa(this._zoomButton,this._resetButton),P(this,this._zoomButton,"pan"),P(this,this._resetButton,"reset"))}}this.isDrag=!1};w.prototype._plotAreaMouseMove=function(a,b){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var c=0,d=0,d=this.axisX.lineCoordinates;"xySwapped"===this.plotInfo.axisPlacement?(c=b-this.dragStartPoint.y,d=Math.abs(this.axisX.maximum- -this.axisX.minimum)/d.height*c):(c=this.dragStartPoint.x-a,d=Math.abs(this.axisX.maximum-this.axisX.minimum)/d.width*c);2Math.abs(c)&&(this.panEnabled||this.zoomEnabled)?this._toolTip.hide():this.panEnabled||this.zoomEnabled||this._toolTip.mouseMoveHandler(a,b);if(2this.axisX._absoluteMaximum+$(this.axisX.interval,this.axisX.intervalType)&&(c=this.axisX.sessionVariables.internalMaximum- -(this.axisX._absoluteMaximum+$(this.axisX.interval,this.axisX.intervalType)),this.axisX.sessionVariables.internalMaximum-=c,this.axisX.sessionVariables.internalMinimum-=c);var e=this;clearTimeout(this._panTimerId);this._panTimerId=setTimeout(function(){e.render()},0)}else this.zoomEnabled&&(c=this.plotArea,this.resetOverlayedCanvas(),d=this.overlaidCanvasCtx.globalAlpha,this.overlaidCanvasCtx.globalAlpha=0.7,this.overlaidCanvasCtx.fillStyle="#A0ABB8","xySwapped"===this.plotInfo.axisPlacement?this.overlaidCanvasCtx.fillRect(c.x1, -this.dragStartPoint.y,c.x2-c.x1,b-this.dragStartPoint.y):"normal"===this.plotInfo.axisPlacement&&this.overlaidCanvasCtx.fillRect(this.dragStartPoint.x,c.y1,a-this.dragStartPoint.x,c.y2-c.y1),this.overlaidCanvasCtx.globalAlpha=d)}else this._toolTip.mouseMoveHandler(a,b)};w.prototype.preparePlotArea=function(){var a=this.plotArea,b=this.axisY?this.axisY:this.axisY2;!t&&(0b.lineCoordinates.x2?this.axisX.lineCoordinates.x2:b.lineCoordinates.x2,a.y2=this.axisX.lineCoordinates.y2>this.axisX.lineCoordinates.y1?this.axisX.lineCoordinates.y2:b.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1):(b=this.layoutManager.getFreeSpace(),a.x1=b.x1,a.x2=b.x2,a.y1=b.y1,a.y2=b.y2,a.width=b.width,a.height=b.height); -t||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0u.maximum||l.dataPoint.yv.maximum)continue}else if(l.dataPoint.xu.maximum)continue;e=g=2;"horizontal"===r?(d=m.width,k=m.height):(k=m.width,d=m.height); -if("normal"===this.plotInfo.axisPlacement){if(0<=f.indexOf("line")||0<=f.indexOf("area"))c="auto",g=4;else if(0<=f.indexOf("stacked"))"auto"===c&&(c="inside");else if("bubble"===f||"scatter"===f)c="inside";h=l.point.x-d/2;"inside"!==c?(d=b.y1,e=b.y2,0e-k-g&&(n="auto"===c?Math.min(l.point.y,e)-k-g:e-k-g))):(d=Math.max(l.bounds.y1,b.y1),e=Math.min(l.bounds.y2,b.y2),c=0<=f.indexOf("range")?0e-k-g&&("bubble"===f||"scatter"===f)&&(n=Math.min(l.point.y+g,b.y2-k-g))))}else 0<=f.indexOf("line")||0<=f.indexOf("area")||0<=f.indexOf("scatter")?(c="auto",e=4):0<=f.indexOf("stacked")?"auto"===c&&(c="inside"):"bubble"===f&&(c="inside"),n=l.point.y-k/2,"inside"!== -c?(f=b.x1,g=b.x2,0>s?(h=l.point.x-d-e,hg-d-e&&(h="auto"===c?Math.min(l.point.x,g)-d-e:g-d-e))):(Math.max(l.bounds.x1,b.x1),Math.min(l.bounds.x2,b.x2),c=0<=f.indexOf("range")?0>s?Math.max(l.bounds.x1,b.x1)+d/2+e:Math.min(l.bounds.x2,b.x2)-d/2-e:(Math.max(l.bounds.x1,b.x1)+Math.min(l.bounds.x2,b.x2))/2,h=0>s?Math.max(l.point.x,c)-d/2:Math.min(l.point.x,c)-d/2);"vertical"===r&&(n+=k);m.x=h;m.y=n;m.render(!0)}}return{source:a,dest:this.plotArea.ctx, -animationCallback:y.fadeInAnimation,easingFunction:y.easing.easeInQuad,animationBase:0,startTimePercent:0.7}};w.prototype.renderLine=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var d=this.plotArea;b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();for(var d=[],e=0;ea.axisX.dataInfo.viewPortMax))if("number"!==typeof k[h].y)0=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var d=this.plotArea;b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();for(var d=[],e=0;ea.axisX.dataInfo.viewPortMax))if("number"!== -typeof k[h].y)0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var e=[],f=0;fa.axisX.dataInfo.viewPortMax))if("number"!== -typeof p[h].y)0=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,e=this.dataPointMaxWidth?this.dataPointMaxWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,l=a.axisX.dataInfo.minDiff,h=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(l)/ -a.plotType.totalDataSeries)<<0;h>e?h=e:Infinity===l?h=0.9*(e/a.plotType.totalDataSeries):1>h&&(h=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(d=0;da.axisX.dataInfo.viewPortMax)&&"number"===typeof m[e].y){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(k-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(m[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;f=f-a.plotType.totalDataSeries*h/2+(a.previousDataSeriesCount+d)*h<<0;var r=f+h<<0,s;0<=m[e].y?s=p:(s=g,g=p);g>s&&(s=g=s);c=m[e].color? -m[e].color:n._colorSet[e%n._colorSet.length];I(b,f,g,r,s,c,0,null,q&&0<=m[e].y,0>m[e].y&&q,!1,!1,n.fillOpacity);c=n.dataPointIds[e];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:e,x1:f,y1:g,x2:r,y2:s};c=A(c);t&&I(this._eventManager.ghostCtx,f,g,r,s,c,0,null,!1,!1,!1,!1);(m[e].indexLabel||n.indexLabel||m[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:m[e],dataSeries:n,point:{x:f+(r-f)/2,y:0<=m[e].y? -g:s},direction:0<=m[e].y?1:-1,bounds:{x1:f,y1:Math.min(g,s),x2:r,y2:Math.max(g,s)},color:c})}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.min(p,a.axisY.boundingRect.y2);return{source:b,dest:this.plotArea.ctx,animationCallback:y.yScaleAnimation,easingFunction:y.easing.easeOutQuart,animationBase:a}}};w.prototype.renderStackedColumn=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+ -a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,l=a.axisX.dataInfo.minDiff,h=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(l)/a.plotType.plotUnits.length)<<0;h>g?h=g:Infinity===l?h=g:1>h&&(h=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip()); -for(l=0;la.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+ -a.axisY.conversionParameters.pixelPerUnit*(q[g].y-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=s+h<<0,u;if(0<=q[g].y){var v=e[c]?e[c]:0;k-=v;u=p-v;e[c]=v+(u-k)}else v=f[c]?f[c]:0,u=k+v,k=p+v,f[c]=v+(u-k);c=q[g].color?q[g].color:m._colorSet[g%m._colorSet.length];I(b,s,k,z,u,c,0,null,r&&0<=q[g].y,0>q[g].y&&r,!1,!1,m.fillOpacity);c=m.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,x1:s,y1:k, -x2:z,y2:u};c=A(c);t&&I(this._eventManager.ghostCtx,s,k,z,u,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||m.indexLabel||q[g].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:q[g],dataSeries:m,point:{x:d,y:0<=q[g].y?k:u},direction:0<=q[g].y?1:-1,bounds:{x1:s,y1:Math.min(k,u),x2:z,y2:Math.max(k,u)},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.min(p,a.axisY.boundingRect.y2);return{source:b,dest:this.plotArea.ctx,animationCallback:y.yScaleAnimation, -easingFunction:y.easing.easeOutQuart,animationBase:a}}};w.prototype.renderStackedColumn100=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,l=a.axisX.dataInfo.minDiff,h=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)* -Math.abs(l)/a.plotType.plotUnits.length)<<0;h>g?h=g:Infinity===l?h=g:1>h&&(h=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(l=0;la.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*((0!==a.dataPointYSums[c]?100*(q[g].y/a.dataPointYSums[c]):0)-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=s+h<<0,u;if(0<=q[g].y){var v=e[c]?e[c]:0;k-= -v;u=p-v;e[c]=v+(u-k)}else v=f[c]?f[c]:0,u=k+v,k=p+v,f[c]=v+(u-k);c=q[g].color?q[g].color:m._colorSet[g%m._colorSet.length];I(b,s,k,z,u,c,0,null,r&&0<=q[g].y,0>q[g].y&&r,!1,!1,m.fillOpacity);c=m.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,x1:s,y1:k,x2:z,y2:u};c=A(c);t&&I(this._eventManager.ghostCtx,s,k,z,u,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||m.indexLabel||q[g].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100", -dataPoint:q[g],dataSeries:m,point:{x:d,y:0<=q[g].y?k:u},direction:0<=q[g].y?1:-1,bounds:{x1:s,y1:Math.min(k,u),x2:z,y2:Math.max(k,u)},color:c})}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.min(p,a.axisY.boundingRect.y2);return{source:b,dest:this.plotArea.ctx,animationCallback:y.yScaleAnimation,easingFunction:y.easing.easeOutQuart,animationBase:a}}};w.prototype.renderBar=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea, -e=0,f,g,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,e=this.dataPointMaxWidth?this.dataPointMaxWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,l=a.axisX.dataInfo.minDiff,h=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(l)/a.plotType.totalDataSeries)<<0;h>e?h=e:Infinity===l?h=0.9*(e/a.plotType.totalDataSeries):1>h&&(h=1);b.save();t&&this._eventManager.ghostCtx.save(); -b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(d=0;da.axisX.dataInfo.viewPortMax)&&"number"===typeof m[e].y){g=a.axisX.conversionParameters.reference+ -a.axisX.conversionParameters.pixelPerUnit*(k-a.axisX.conversionParameters.minimum)+0.5<<0;f=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(m[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;g=g-a.plotType.totalDataSeries*h/2+(a.previousDataSeriesCount+d)*h<<0;var r=g+h<<0,s;0<=m[e].y?s=p:(s=f,f=p);c=m[e].color?m[e].color:n._colorSet[e%n._colorSet.length];I(b,s,g,f,r,c,0,null,q,!1,!1,!1,n.fillOpacity);c=n.dataPointIds[e];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint", -dataSeriesIndex:l,dataPointIndex:e,x1:s,y1:g,x2:f,y2:r};c=A(c);t&&I(this._eventManager.ghostCtx,s,g,f,r,c,0,null,!1,!1,!1,!1);(m[e].indexLabel||n.indexLabel||m[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:m[e],dataSeries:n,point:{x:0<=m[e].y?f:s,y:g+(r-g)/2},direction:0<=m[e].y?1:-1,bounds:{x1:Math.min(s,f),y1:g,x2:Math.max(s,f),y2:r},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.max(p,a.axisX.boundingRect.x2);return{source:b, -dest:this.plotArea.ctx,animationCallback:y.xScaleAnimation,easingFunction:y.easing.easeOutQuart,animationBase:a}}};w.prototype.renderStackedBar=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.height<<0,l=a.axisX.dataInfo.minDiff, -h=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(l)/a.plotType.plotUnits.length)<<0;h>g?h=g:Infinity===l?h=g:1>h&&(h=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(l=0;la.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(q[g].y-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=s+h<<0,u;if(0<= -q[g].y){var v=e[c]?e[c]:0;u=p+v;k+=v;e[c]=v+(k-u)}else v=f[c]?f[c]:0,u=k-v,k=p-v,f[c]=v+(k-u);c=q[g].color?q[g].color:m._colorSet[g%m._colorSet.length];I(b,u,s,k,z,c,0,null,r,!1,!1,!1,m.fillOpacity);c=m.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,x1:u,y1:s,x2:k,y2:z};c=A(c);t&&I(this._eventManager.ghostCtx,u,s,k,z,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||m.indexLabel||q[g].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar", -dataPoint:q[g],dataSeries:m,point:{x:0<=q[g].y?k:u,y:d},direction:0<=q[g].y?1:-1,bounds:{x1:Math.min(u,k),y1:s,x2:Math.max(u,k),y2:z},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.max(p,a.axisX.boundingRect.x2);return{source:b,dest:this.plotArea.ctx,animationCallback:y.xScaleAnimation,easingFunction:y.easing.easeOutQuart,animationBase:a}}};w.prototype.renderStackedBar100=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null, -d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.height<<0,l=a.axisX.dataInfo.minDiff,h=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(l)/a.plotType.plotUnits.length)<<0;h>g?h=g:Infinity===l?h=g:1>h&&(h=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1, -d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(l=0;la.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+ -0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*((0!==a.dataPointYSums[c]?100*(q[g].y/a.dataPointYSums[c]):0)-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*h/2+a.index*h<<0,z=s+h<<0,u;if(0<=q[g].y){var v=e[c]?e[c]:0;u=p+v;k+=v;e[c]=v+(k-u)}else v=f[c]?f[c]:0,u=k-v,k=p-v,f[c]=v+(k-u);c=q[g].color?q[g].color:m._colorSet[g%m._colorSet.length];I(b,u,s,k,z,c,0,null,r,!1,!1,!1,m.fillOpacity);c=m.dataPointIds[g];this._eventManager.objectMap[c]= -{id:c,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:g,x1:u,y1:s,x2:k,y2:z};c=A(c);t&&I(this._eventManager.ghostCtx,u,s,k,z,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||m.indexLabel||q[g].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:q[g],dataSeries:m,point:{x:0<=q[g].y?k:u,y:d},direction:0<=q[g].y?1:-1,bounds:{x1:Math.min(u,k),y1:s,x2:Math.max(u,k),y2:z},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.max(p,a.axisX.boundingRect.x2); -return{source:b,dest:this.plotArea.ctx,animationCallback:y.xScaleAnimation,easingFunction:y.easing.easeOutQuart,animationBase:a}}};w.prototype.renderArea=function(a){function b(){v&&(0=a.axisY.minimum&&0<=a.axisY.maximum?u=z:0>a.axisY.maximum?u=f.y1:0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=a.axisX.lineCoordinates,f=a.axisY.lineCoordinates,g=[],k=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(k=0;ka.axisX.dataInfo.viewPortMax))if("number"!== -typeof h[m].y)b(),H=!0;else{q=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(s-a.axisX.conversionParameters.minimum)+0.5<<0;r=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(h[m].y-a.axisY.conversionParameters.minimum)+0.5<<0;n||H?(c.beginPath(),c.moveTo(q,r),v={x:q,y:r},t&&(d.beginPath(),d.moveTo(q,r)),H=n=!1):(c.lineTo(q,r),t&&d.lineTo(q,r),0==m%250&&b());var D=l.dataPointIds[m];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint", -dataSeriesIndex:p,dataPointIndex:m,x1:q,y1:r};0!==h[m].markerSize&&(0=a.axisY.minimum&&0<=a.axisY.maximum?s=r:0>a.axisY.maximum?s=f.y1:0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=a.axisX.lineCoordinates,f=a.axisY.lineCoordinates,g=[], -k=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(k=0;ka.axisX.dataInfo.viewPortMax))if("number"!==typeof h[n].y)0=a.axisY.minimum&&0<= -a.axisY.maximum?u=z:0>a.axisY.maximum?u=f.y1:0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=a.axisX.lineCoordinates,f=a.axisY.lineCoordinates,g=[],k=this.plotArea;c.save();t&&d.save(); -c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(k=0;ka.axisX.dataInfo.viewPortMax)){var w=r;"number"!==typeof h[m].y?(b(),C=!0):(q=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(s-a.axisX.conversionParameters.minimum)+0.5<<0,r=a.axisY.conversionParameters.reference+ -a.axisY.conversionParameters.pixelPerUnit*(h[m].y-a.axisY.conversionParameters.minimum)+0.5<<0,n||C?(c.beginPath(),c.moveTo(q,r),v={x:q,y:r},t&&(d.beginPath(),d.moveTo(q,r)),C=n=!1):(c.lineTo(q,w),t&&d.lineTo(q,w),c.lineTo(q,r),t&&d.lineTo(q,r),0==m%250&&b()),w=l.dataPointIds[m],this._eventManager.objectMap[w]={id:w,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:m,x1:q,y1:r},0!==h[m].markerSize&&(0=a.dataSeriesIndexes.length)){var c=null,d=[],e=this.plotArea,f=[],g=[],k=0,p,l,h,n=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,m=this._eventManager.ghostCtx;t&&m.beginPath();b.save();t&&m.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();t&&(m.beginPath(),m.rect(e.x1,e.y1,e.width,e.height),m.clip());xValuePresent=[];for(e=0;ea.axisX.dataInfo.viewPortMax)&&"number"===typeof v.y){p=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(h-a.axisX.conversionParameters.minimum)+0.5<<0;l=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit* -(v.y-a.axisY.conversionParameters.minimum);var C=f[h]?f[h]:0;l-=C;u.push({x:p,y:n-C});f[h]=n-l;if(z)b.beginPath(),b.moveTo(p,l),t&&(m.beginPath(),m.moveTo(p,l)),z=!1;else if(b.lineTo(p,l),t&&m.lineTo(p,l),0==k%250){for(0=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=[],k=0,p,l,h,n=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,m=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,q=a.axisX.dataInfo.minDiff,q=0.9*d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)* -Math.abs(q)<<0,r=this._eventManager.ghostCtx;b.save();t&&r.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(r.beginPath(),r.rect(d.x1,d.y1,d.width,d.height),r.clip());xValuePresent=[];for(d=0;dq?q=1:q>m&&(q=m);var C=[];if(0a.axisX.dataInfo.viewPortMax)&&"number"===typeof w.y){l=0!==a.dataPointYSums[h]?100*(w.y/a.dataPointYSums[h]):0;p=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(h-a.axisX.conversionParameters.minimum)+0.5<<0;l=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(l-a.axisY.conversionParameters.minimum);var D=f[h]?f[h]:0;l-=D;C.push({x:p,y:n-D});f[h]=n-l;if(v)b.beginPath(),b.moveTo(p,l),t&&(r.beginPath(),r.moveTo(p,l)),v=!1;else if(b.lineTo(p, -l),t&&r.lineTo(p,l),0==k%250){for(0=c)){var d=this.plotArea,e=0,f,g,k=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,e=a.axisX.dataInfo.minDiff,c=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(e)/c)<<0;b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=-Infinity,l=Infinity,h=0;ha.axisX.dataInfo.viewPortMax||"undefined"===typeof q[e].z||(r=q[e].z,r>p&&(p=r),rc?c=1:c>k&&(c=k),0a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[e].y){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(f-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(q[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;var r=q[e].z,z=2*Math.max(Math.sqrt((p===l?d/2:s+(d-s)/(p-l)*(r-l))/Math.PI)<<0,1),r=m.getMarkerProperties(e, -b);r.size=z;b.globalAlpha=m.fillOpacity;K.drawMarker(f,g,b,r.type,r.size,r.color,r.borderColor,r.borderThickness);b.globalAlpha=1;var u=m.dataPointIds[e];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:e,x1:f,y1:g,size:z};z=A(u);t&&K.drawMarker(f,g,this._eventManager.ghostCtx,r.type,r.size,z,z,r.borderThickness);(q[e].indexLabel||m.indexLabel||q[e].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[e],dataSeries:m, -point:{x:f,y:g},direction:1,bounds:{x1:f-r.size/2,y1:g-r.size/2,x2:f+r.size/2,y2:g+r.size/2},color:null})}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:y.fadeInAnimation,easingFunction:y.easing.easeInQuad,animationBase:0}}};w.prototype.renderScatter=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx,c=a.dataSeriesIndexes.length;if(!(0>=c)){var d=this.plotArea,e=0,f,g,k=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<< -0,e=a.axisX.dataInfo.minDiff,c=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(e)/c)<<0;b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;pc?c=1:c>k&&(c=k);if(0a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(f-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(n[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;var r=h.getMarkerProperties(e, -f,g,b);b.globalAlpha=h.fillOpacity;K.drawMarker(r.x,r.y,r.ctx,r.type,r.size,r.color,r.borderColor,r.borderThickness);b.globalAlpha=1;Math.sqrt((m-f)*(m-f)+(q-g)*(q-g))Math.min(this.plotArea.width,this.plotArea.height)||(m=h.dataPointIds[e],this._eventManager.objectMap[m]={id:m,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:e,x1:f,y1:g},m=A(m),t&&K.drawMarker(r.x,r.y,this._eventManager.ghostCtx,r.type,r.size,m,m,r.borderThickness),(n[e].indexLabel||h.indexLabel|| -n[e].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:n[e],dataSeries:h,point:{x:f,y:g},direction:1,bounds:{x1:f-r.size/2,y1:g-r.size/2,x2:f+r.size/2,y2:g+r.size/2},color:null}),m=f,q=g)}}}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:y.fadeInAnimation,easingFunction:y.easing.easeInQuad,animationBase:0}}};w.prototype.renderCandlestick=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx, -c=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=null,d=this.plotArea,e=0,f,g,k,p,l,h,e=this.dataPointMaxWidth?this.dataPointMaxWidth:0.015*this.width;f=a.axisX.dataInfo.minDiff;var n=0.7*d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)<<0;n>e?n=e:Infinity===f?n=e:1>n&&(n=1);b.save();t&&c.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(c.rect(d.x1,d.y1,d.width,d.height),c.clip());for(var m=0;ma.axisX.dataInfo.viewPortMax)&&null!==s[e].y&&s[e].y.length&&"number"===typeof s[e].y[0]&&"number"===typeof s[e].y[1]&&"number"===typeof s[e].y[2]&&"number"===typeof s[e].y[3]){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(h-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+ -a.axisY.conversionParameters.pixelPerUnit*(s[e].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(s[e].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(s[e].y[2]-a.axisY.conversionParameters.minimum)+0.5<<0;l=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(s[e].y[3]-a.axisY.conversionParameters.minimum)+ -0.5<<0;var u=f-n/2<<0,v=u+n<<0,d=s[e].color?s[e].color:r._colorSet[0],C=Math.round(Math.max(1,0.15*n)),w=0===C%2?0:0.5,D=r.dataPointIds[e];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:e,x1:u,y1:g,x2:v,y2:k,x3:f,y3:p,x4:f,y4:l,borderThickness:C,color:d};b.strokeStyle=d;b.beginPath();b.lineWidth=C;c.lineWidth=Math.max(C,4);"candlestick"===r.type?(b.moveTo(f-w,k),b.lineTo(f-w,Math.min(g,l)),b.stroke(),b.moveTo(f-w,Math.max(g,l)),b.lineTo(f-w,p),b.stroke(), -I(b,u,Math.min(g,l),v,Math.max(g,l),s[e].y[0]<=s[e].y[3]?r.risingColor:d,C,d,z,z,!1,!1,r.fillOpacity),t&&(d=A(D),c.strokeStyle=d,c.moveTo(f-w,k),c.lineTo(f-w,Math.min(g,l)),c.stroke(),c.moveTo(f-w,Math.max(g,l)),c.lineTo(f-w,p),c.stroke(),I(c,u,Math.min(g,l),v,Math.max(g,l),d,0,null,!1,!1,!1,!1))):"ohlc"===r.type&&(b.moveTo(f-w,k),b.lineTo(f-w,p),b.stroke(),b.beginPath(),b.moveTo(f,g),b.lineTo(u,g),b.stroke(),b.beginPath(),b.moveTo(f,l),b.lineTo(v,l),b.stroke(),t&&(d=A(D),c.strokeStyle=d,c.moveTo(f- -w,k),c.lineTo(f-w,p),c.stroke(),c.beginPath(),c.moveTo(f,g),c.lineTo(u,g),c.stroke(),c.beginPath(),c.moveTo(f,l),c.lineTo(v,l),c.stroke()));(s[e].indexLabel||r.indexLabel||s[e].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:r.type,dataPoint:s[e],dataSeries:r,point:{x:u+(v-u)/2,y:k},direction:1,bounds:{x1:u,y1:Math.min(k,p),x2:v,y2:Math.max(k,p)},color:d})}}b.restore();t&&c.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:y.fadeInAnimation,easingFunction:y.easing.easeInQuad, -animationBase:0}}};w.prototype.renderRangeColumn=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,e=this.dataPointMaxWidth?this.dataPointMaxWidth:0.03*this.width;f=a.axisX.dataInfo.minDiff;var k=0.9*(d.width/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)/a.plotType.totalDataSeries)<<0;k>e?k=e:Infinity===f?k=0.9*(e/a.plotType.totalDataSeries):1>k&&(k=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath(); -b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;pa.axisX.dataInfo.viewPortMax)&&null!==n[e].y&&n[e].y.length&&"number"===typeof n[e].y[0]&&"number"===typeof n[e].y[1]){c= -a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(g-a.axisX.conversionParameters.minimum)+0.5<<0;d=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(n[e].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;f=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(n[e].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;var q=c-a.plotType.totalDataSeries*k/2+(a.previousDataSeriesCount+p)*k<<0,r=q+k<<0,c=n[e].color? -n[e].color:h._colorSet[e%h._colorSet.length];if(d>f){var s=d,d=f;f=s}s=h.dataPointIds[e];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:e,x1:q,y1:d,x2:r,y2:f};I(b,q,d,r,f,c,0,c,m,m,!1,!1,h.fillOpacity);c=A(s);t&&I(this._eventManager.ghostCtx,q,d,r,f,c,0,null,!1,!1,!1,!1);if(n[e].indexLabel||h.indexLabel||n[e].indexLabelFormatter||h.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:n[e],dataSeries:h,indexKeyword:0,point:{x:q+ -(r-q)/2,y:n[e].y[1]>=n[e].y[0]?f:d},direction:n[e].y[1]>=n[e].y[0]?-1:1,bounds:{x1:q,y1:Math.min(d,f),x2:r,y2:Math.max(d,f)},color:c}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:n[e],dataSeries:h,indexKeyword:1,point:{x:q+(r-q)/2,y:n[e].y[1]>=n[e].y[0]?d:f},direction:n[e].y[1]>=n[e].y[0]?1:-1,bounds:{x1:q,y1:Math.min(d,f),x2:r,y2:Math.max(d,f)},color:c})}}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:y.fadeInAnimation, -easingFunction:y.easing.easeInQuad,animationBase:0}}};w.prototype.renderRangeBar=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,k,e=this.dataPointMaxWidth?this.dataPointMaxWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;f=a.axisX.dataInfo.minDiff;var p=0.9*(d.height/Math.abs(a.axisX.maximum-a.axisX.minimum)*Math.abs(f)/a.plotType.totalDataSeries)<<0;p>e?p=e:Infinity===f?p=0.9* -(e/a.plotType.totalDataSeries):1>p&&(p=1);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var l=0;la.axisX.dataInfo.viewPortMax)&&null!==m[e].y&&m[e].y.length&&"number"===typeof m[e].y[0]&&"number"===typeof m[e].y[1]){d=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(m[e].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;f=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(m[e].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;g=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(k-a.axisX.conversionParameters.minimum)+ -0.5<<0;g=g-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+l)*p<<0;var r=g+p<<0;d>f&&(c=d,d=f,f=c);c=m[e].color?m[e].color:n._colorSet[e%n._colorSet.length];I(b,d,g,f,r,c,0,null,q,!1,!1,!1,n.fillOpacity);c=n.dataPointIds[e];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:e,x1:d,y1:g,x2:f,y2:r};c=A(c);t&&I(this._eventManager.ghostCtx,d,g,f,r,c,0,null,!1,!1,!1,!1);if(m[e].indexLabel||n.indexLabel||m[e].indexLabelFormatter||n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar", -dataPoint:m[e],dataSeries:n,indexKeyword:0,point:{x:m[e].y[1]>=m[e].y[0]?d:f,y:g+(r-g)/2},direction:m[e].y[1]>=m[e].y[0]?-1:1,bounds:{x1:Math.min(d,f),y1:g,x2:Math.max(d,f),y2:r},color:c}),this._indexLabels.push({chartType:"rangeBar",dataPoint:m[e],dataSeries:n,indexKeyword:1,point:{x:m[e].y[1]>=m[e].y[0]?f:d,y:g+(r-g)/2},direction:m[e].y[1]>=m[e].y[0]?1:-1,bounds:{x1:Math.min(d,f),y1:g,x2:Math.max(d,f),y2:r},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx, -animationCallback:y.fadeInAnimation,easingFunction:y.easing.easeInQuad,animationBase:0}}};w.prototype.renderRangeArea=function(a){function b(){if(z){var a=null;0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=[],f=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();t&&(d.beginPath(),d.rect(f.x1,f.y1,f.width,f.height),d.clip());for(f=0;fa.axisX.dataInfo.viewPortMax))if(null!==l[n].y&&l[n].y.length&&"number"===typeof l[n].y[0]&&"number"===typeof l[n].y[1]){m=a.axisX.conversionParameters.reference+ -a.axisX.conversionParameters.pixelPerUnit*(s-a.axisX.conversionParameters.minimum)+0.5<<0;q=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(l[n].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;r=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(l[n].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;h||v?(c.beginPath(),c.moveTo(m,q),z={x:m,y:q},g=[],g.push({x:m,y:r}),t&&(d.beginPath(),d.moveTo(m,q)),v=h=!1):(c.lineTo(m,q),g.push({x:m, -y:r}),t&&d.lineTo(m,q),0==n%250&&b());s=p.dataPointIds[n];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:n,x1:m,y1:q,y2:r};if(0!==l[n].markerSize&&(0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=[],f=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();t&&(d.beginPath(),d.rect(f.x1,f.y1,f.width,f.height),d.clip());for(f=0;fa.axisX.dataInfo.viewPortMax))if(null!==p[l].y&&p[l].y.length&&"number"===typeof p[l].y[0]&&"number"===typeof p[l].y[1]){h=a.axisX.conversionParameters.reference+ -a.axisX.conversionParameters.pixelPerUnit*(h-a.axisX.conversionParameters.minimum)+0.5<<0;n=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(p[l].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;m=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(p[l].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;var s=k.dataPointIds[l];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:l,x1:h,y1:n,y2:m}; -q[q.length]={x:h,y:n};r[r.length]={x:h,y:m};if(0!==p[l].markerSize&&(0Math.PI/2-v&&g.midAngleg.midAngle)c=x;a++}else if(g.midAngle>3*Math.PI/2-v&&g.midAngle<3*Math.PI/2+v){if(0===b||s[d].midAngle>g.midAngle)d=x;b++}g.hemisphere=e>Math.PI/2&&e<=3*Math.PI/2?"left":"right";g.indexLabelTextBlock=new G(l.plotArea.ctx,{fontSize:g.indexLabelFontSize,fontFamily:g.indexLabelFontFamily,fontColor:g.indexLabelFontColor, -fontStyle:g.indexLabelFontStyle,fontWeight:g.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:g.indexLabelBackgroundColor,maxWidth:g.indexLabelMaxWidth,maxHeight:g.indexLabelWrap?5*g.indexLabelFontSize:1.5*g.indexLabelFontSize,text:g.indexLabelText,padding:0,textBaseline:"top"});g.indexLabelTextBlock.measureText()}f=e=0;k=!1;for(x=0;xMath.PI/2-v&&g.midAngle3*Math.PI/2-v&&g.midAngle<3*Math.PI/2+v)&&(f<=b/2&&!k?(g.hemisphere="left",f++):(g.hemisphere="right",k=!0))}}function c(a){var b=l.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=l.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(b=0;bc){var e=0.07*D*Math.cos(s[b].midAngle),f=0.07*D*Math.sin(s[b].midAngle),g=!1;if(n[b].exploded){if(1E-9g+m||d>h+m||ea.indexLabelTextBlock.y?e-d:c-f}function f(a){for(var b=null,c=1;ce(s[b],s[a])||("right"===s[a].hemisphere?s[b].indexLabelTextBlock.y>=s[a].indexLabelTextBlock.y:s[b].indexLabelTextBlock.y<=s[a].indexLabelTextBlock.y)))break; -else b=null;return b}function g(a,b){b=b||0;var c=0,d=y.y-1*B,h=y.y+1*B;if(0<=a&&ab&&l.indexLabelTextBlock.yh)return 0;var k=b,m=0,q=0,q=m=m=0;0>k?l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2>d&&l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+kh&&(k=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+k-h);k=l.indexLabelTextBlock.y+k;d=0;d="right"===l.hemisphere?y.x+Math.sqrt(Math.pow(B,2)-Math.pow(k-y.y,2)):y.x-Math.sqrt(Math.pow(B,2)-Math.pow(k-y.y,2));q=y.x+D*Math.cos(l.midAngle);m=y.y+D*Math.sin(l.midAngle);m=Math.sqrt(Math.pow(d-q,2)+Math.pow(k-m,2));q=Math.acos(D/B);m=Math.acos((B*B+D*D-m*m)/(2*D*B));k=me(s[d],s[a])||("right"===s[a].hemisphere?s[d].indexLabelTextBlock.y<=s[a].indexLabelTextBlock.y:s[d].indexLabelTextBlock.y>=s[a].indexLabelTextBlock.y)))break;else d=null;q=d;m=f(a);h=d=0;0>k?(h="right"===l.hemisphere?q:m,c=k,null!==h&&(q=-k,k=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2-(s[h].indexLabelTextBlock.y+s[h].indexLabelTextBlock.height/2),k-q+d.toFixed(w)&& -(c=k>t?-(k-t):-(q-(h-d)))))):0t?k-t:q-(d-h)))));c&&(k=l.indexLabelTextBlock.y+c,d=0,d="right"===l.hemisphere?y.x+Math.sqrt(Math.pow(B,2)-Math.pow(k-y.y,2)):y.x-Math.sqrt(Math.pow(B,2)-Math.pow(k-y.y,2)),l.midAngle>Math.PI/2-v&&l.midAngleh.indexLabelTextBlock.x?d=h.indexLabelTextBlock.x-15:"right"===l.hemisphere&&("left"===q.hemisphere&&d3*Math.PI/2-v&&l.midAngle<3*Math.PI/2+v&&(h=(a-1+s.length)%s.length,h=s[h],q=s[(a+1+s.length)%s.length],"right"===l.hemisphere&&"left"===h.hemisphere&&dq.indexLabelTextBlock.x)&&(d=q.indexLabelTextBlock.x-15)),l.indexLabelTextBlock.y=k,l.indexLabelTextBlock.x=d,l.indexLabelAngle=Math.atan2(l.indexLabelTextBlock.y-y.y,l.indexLabelTextBlock.x-y.x))}return c}function k(){var a=l.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var b=0,c=a=0,a=0;10>a&&(1>a||0x){for(var A=r=p=0;Ac&&(c=x)),x=x=0,0c&&(c=x)));b=function(a,b,c){for(var d=[],e=0;d.push(s[b]),b!==c;b=(b+1+n.length)%n.length);d.sort(function(a,b){return a.y-b.y});for(b=0;bx&&d(p,r)?(0>k&&(k=A),F!==k&&(v=F),E+=-x):0=a.dataSeriesIndexes.length)){for(var h= -this.data[a.dataSeriesIndexes[0]],n=h.dataPoints,m=10,q=this.plotArea,r=0,s=[],t=2,u=1.3,v=20/180*Math.PI,w=6,y={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},D="inside"===h.indexLabelPlacement?0.92*Math.min(q.width,q.height)/2:0.8*Math.min(q.width,q.height)/2,B=D*u,A=0,x=0;xa&&(d=a,e=!0);var f=n[b].color?n[b].color:h._colorSet[b%h._colorSet.length];d>c&&ta(l.plotArea.ctx,s[b].center,s[b].radius,f,h.type,c,d,h.fillOpacity);if(e)break}p()}, -function(){l.disableToolTip=!1;l._animator.animate(0,l.animatedRender?500:0,function(a){c(a);p()})}))}};w.prototype.animationRequestId=null;w.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();w.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame|| -window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;Z.prototype.registerSpace=function(a,b){"top"===a?this._topOccupied+=b.height:"bottom"===a?this._bottomOccupied+=b.height:"left"===a?this._leftOccupied+=b.width:"right"===a&&(this._rightOccupied+=b.width)};Z.prototype.unRegisterSpace=function(a,b){"top"===a?this._topOccupied-=b.height:"bottom"===a?this._bottomOccupied-=b.height:"left"===a?this._leftOccupied-=b.width:"right"===a&&(this._rightOccupied-=b.width)}; -Z.prototype.getFreeSpace=function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Z.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};O(G,F);G.prototype.render=function(a){a&&this.ctx.save();var b=this.ctx.font;this.ctx.textBaseline= -this.textBaseline;var c=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+c);"middle"===this.textBaseline&&(c=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var d=0,e=this.padding,f=null;(0b)e=f-1;else break}c>b&&1f&&(g=b.pop(),d-=g.height)}this._wrappedText= -{lines:b,width:e,height:d};this.width=e+2*this.padding;this.height=d+2*this.padding;this.ctx.font=c};G.prototype._getFontString=function(){var a;a=""+(this.fontStyle?this.fontStyle+" ":"");a+=this.fontWeight?this.fontWeight+" ":"";a+=this.fontSize?this.fontSize+"px ":"";var b=this.fontFamily?this.fontFamily+"":"";!t&&b&&(b=b.split(",")[0],"'"!==b[0]&&'"'!==b[0]&&(b="'"+b+"'"));return a+=b};O(ca,F);ca.prototype.render=function(){if(this.text){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart, -b=a.layoutManager.getFreeSpace(),c=b.x1,d=b.y1,e=0,f=0,g=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,k,p;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=b.width-4-g*("center"===this.horizontalAlign?2:1)),f=0.5*b.height-this.margin-2,e=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=b.height-4),f=0.5*b.width-this.margin-2):"center"=== -this.horizontalAlign&&(null===this.maxWidth&&(this.maxWidth=b.width-4),f=0.5*b.height-4));this.wrap||(f=Math.min(f,Math.max(1.5*this.fontSize,this.fontSize+2.5*this.padding)));var f=new G(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth, -maxHeight:f,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"}),l=f.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(d=b.y1+2,p="top"):"bottom"===this.verticalAlign&&(d=b.y2-2-l.height,p="bottom"),"left"===this.horizontalAlign?c=b.x1+2:"center"===this.horizontalAlign?c=b.x1+b.width/2-l.width/2:"right"===this.horizontalAlign&&(c=b.x2-2-l.width-g),k=this.horizontalAlign,this.width=l.width,this.height=l.height):"center"=== -this.verticalAlign&&("left"===this.horizontalAlign?(c=b.x1+2,d=b.y2-2-(this.maxWidth/2-l.width/2),e=-90,p="left",this.width=l.height,this.height=l.width):"right"===this.horizontalAlign?(c=b.x2-2,d=b.y1+2+(this.maxWidth/2-l.width/2),e=90,p="right",this.width=l.height,this.height=l.width):"center"===this.horizontalAlign&&(d=a.y1+(a.height/2-l.height/2),c=a.x1+(a.width/2-l.width/2),p="center",this.width=l.width,this.height=l.height),k="center");f.x=c;f.y=d;f.angle=e;f.horizontalAlign=k;f.render(!0); -a.layoutManager.registerSpace(p,{width:this.width+("left"===p||"right"===p?this.margin+2:0),height:this.height+("top"===p||"bottom"===p?this.margin+2:0)});this.bounds={x1:c,y1:d,x2:c+this.width,y2:d+this.height};this.ctx.textBaseline="top"}};O(ja,F);ja.prototype.render=ca.prototype.render;O(ka,F);ka.prototype.render=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,b=a.layoutManager.getFreeSpace(),c=null,d=0,e=0,f=0,g=0,k=[],p=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign? -(this.orientation="horizontal",c=this.verticalAlign,f=null!==this.maxWidth?this.maxWidth:0.7*b.width,g=null!==this.maxHeight?this.maxHeight:0.5*b.height):"center"===this.verticalAlign&&(this.orientation="vertical",c=this.horizontalAlign,f=null!==this.maxWidth?this.maxWidth:0.5*b.width,g=null!==this.maxHeight?this.maxHeight:0.7*b.height);for(var l=0;l= -g||"undefined"===typeof g||0>=m||"undefined"===typeof m)){if("horizontal"===this.orientation){n.textBlock=new G(this.ctx,{x:0,y:0,maxWidth:m,maxHeight:this.itemWrap?g:this.lineHeight,angle:0,text:n.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"});n.textBlock.measureText();null!==this.itemWidth&&(n.textBlock.width=this.itemWidth-(r+0.1*this.horizontalSpacing+("line"===n.chartType|| -"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0)));if(!h||h.width+Math.round(n.textBlock.width+0.1*this.horizontalSpacing+r+(0===h.width?0:this.horizontalSpacing)+("line"===n.chartType||"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0))>f)h={items:[],width:0},p.push(h),this.height+=u,u=0;u=Math.max(u,n.textBlock.height)}else n.textBlock=new G(this.ctx,{x:0,y:0,maxWidth:m,maxHeight:!0===this.itemWrap?g:1.5*this.fontSize,angle:0,text:n.text,horizontalAlign:"left", -fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"}),n.textBlock.measureText(),null!==this.itemWidth&&(n.textBlock.width=this.itemWidth-(r+0.1*this.horizontalSpacing+("line"===n.chartType||"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0))),this.height<=g?(h={items:[],width:0},p.push(h)):(h=p[v],v=(v+1)%p.length),this.height+=n.textBlock.height;n.textBlock.x=h.width;n.textBlock.y= -0;h.width+=Math.round(n.textBlock.width+0.1*this.horizontalSpacing+r+(0===h.width?0:this.horizontalSpacing)+("line"===n.chartType||"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0));h.items.push(n);this.width=Math.max(h.width,this.width)}}this.height=!1===this.itemWrap?p.length*this.lineHeight:this.height+u;this.height=Math.min(g,this.height);this.width=Math.min(f,this.width)}"top"===this.verticalAlign?(e="left"===this.horizontalAlign?b.x1:"right"===this.horizontalAlign?b.x2- -this.width:b.x1+b.width/2-this.width/2,d=b.y1):"center"===this.verticalAlign?(e="left"===this.horizontalAlign?b.x1:"right"===this.horizontalAlign?b.x2-this.width:b.x1+b.width/2-this.width/2,d=b.y1+b.height/2-this.height/2):"bottom"===this.verticalAlign&&(e="left"===this.horizontalAlign?b.x1:"right"===this.horizontalAlign?b.x2-this.width:b.x1+b.width/2-this.width/2,d=b.y2-this.height);this.items=k;for(l=0;l> -0,0),this.dataPoints.length):0);for(;;){f=0h-e&&h+e>=this.dataPoints.length)break;-1===g?(e++,g=1):g=-1}return b||c.dataPoint.x!==a?b&&null!==c.dataPoint?c:null:c};R.prototype.getDataPointAtXY=function(a,b,c){if(!this.dataPoints||0===this.dataPoints.length)return null;c=c||!1;var d=[],e= -0,f=0,g=1,k=!1,p=Infinity,l=0,h=0,n=0;"none"!==this.chart.plotInfo.axisPlacement&&(n=this.chart.axisX.getXValueAt({x:a,y:b}),f=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0>0,0),this.dataPoints.length):0);for(;;){f=0= -m.x1&&(a<=m.x2&&b>=m.y1&&b<=m.y2)&&(d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(m.x1-a),Math.abs(m.x2-a),Math.abs(m.y1-b),Math.abs(m.y2-b))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var s=N("markerSize",q,this)||4,t=c?20:s,r=Math.sqrt(Math.pow(m.x1-a,2)+Math.pow(m.y1-b,2));r<=t&&d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:r});f=Math.abs(m.x1- -a);f<=p?p=f:0t&&(r=Math.atan2(b-s.y,a-s.x),0>r&&(r+=2*Math.PI),r=Number(((180*(r/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(m.startAngle/Math.PI)%360+360)%360).toFixed(12)),t=Number(((180*(m.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===t&&1=t&&0!==q.y&&(t+=360,rs&&r=m.x1-m.borderThickness/2&&a<=m.x2+m.borderThickness/2&&b>=m.y2-m.borderThickness/2&&b<=m.y3+m.borderThickness/2||Math.abs(m.x2-a+m.x1-a)=m.y1&&b<=m.y4)d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(m.x1-a),Math.abs(m.x2-a),Math.abs(m.y2-b),Math.abs(m.y3-b))}),k=!0;break;case "ohlc":if(Math.abs(m.x2-a+m.x1-a)=m.y2&&b<=m.y3||a>=m.x1&&a<=(m.x2+m.x1)/2&&b>=m.y1- -m.borderThickness/2&&b<=m.y1+m.borderThickness/2||a>=(m.x1+m.x2)/2&&a<=m.x2&&b>=m.y4-m.borderThickness/2&&b<=m.y4+m.borderThickness/2)d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(m.x1-a),Math.abs(m.x2-a),Math.abs(m.y2-b),Math.abs(m.y3-b))}),k=!0}if(k||1E3n-e&&n+e>=this.dataPoints.length)break;-1===g?(e++,g=1):g=-1}a=null;for(b=0;b>0:this.labelMaxWidth:"undefined"===typeof this._options.labelMaxWidth?0.7*this.chart.width>>0:this.labelMaxWidth,e="undefined"===typeof this._options.labelWrap||this.labelWrap?0.5*this.chart.height>> -0:1.5*this.labelFontSize;else if("left"===this._position||"right"===this._position)b=this.lineCoordinates.height/Math.abs(this.maximum-this.minimum)*this.interval,d=this.labelAutoFit?"undefined"===typeof this._options.labelMaxWidth?0.3*this.chart.width>>0:this.labelMaxWidth:"undefined"===typeof this._options.labelMaxWidth?0.5*this.chart.width>>0:this.labelMaxWidth,e="undefined"===typeof this._options.labelWrap||this.labelWrap?2*b>>0:1.5*this.labelFontSize;if("axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType)for(c= -ua(new Date(this.maximum),this.interval,this.intervalType),b=this.intervalstartTimePercent;bh?c.maximum=c.interval*k+c.minimum:h>k&&(b.maximum=b.interval*h+b.minimum)}h=b?b.margin:0;if("normal"===d){a.lineCoordinates={};var n=Math.ceil(b?b.createLabelsAndCalculateWidth():0);f=Math.round(e.x1+ -n+h);a.lineCoordinates.x1=f;h=Math.ceil(c?c.createLabelsAndCalculateWidth():0);g=Math.round(e.x2-h>a.chart.width-10?a.chart.width-10:e.x2-h);a.lineCoordinates.x2=g;a.lineCoordinates.width=Math.abs(g-f);var m=Math.ceil(a.createLabelsAndCalculateHeight());d=Math.round(e.y2-m-a.margin);k=Math.round(e.y2-a.margin);a.lineCoordinates.y1=d;a.lineCoordinates.y2=d;a.boundingRect={x1:f,y1:d,x2:g,y2:k,width:g-f,height:k-d};b&&(f=Math.round(e.x1+b.margin),d=Math.round(10>e.y1?10:e.y1),g=Math.round(e.x1+n+b.margin), -k=Math.round(e.y2-m-a.margin),b.lineCoordinates={x1:g,y1:d,x2:g,y2:k,height:Math.abs(k-d)},b.boundingRect={x1:f,y1:d,x2:g,y2:k,width:g-f,height:k-d});c&&(f=Math.round(a.lineCoordinates.x2),d=Math.round(10>e.y1?10:e.y1),g=Math.round(f+h+c.margin),k=Math.round(e.y2-m-a.margin),c.lineCoordinates={x1:f,y1:d,x2:f,y2:k,height:Math.abs(k-d)},c.boundingRect={x1:f,y1:d,x2:g,y2:k,width:g-f,height:k-d});a.calculateValueToPixelconversionParameters();b&&b.calculateValueToPixelconversionParameters();c&&c.calculateValueToPixelconversionParameters(); -l.save();l.rect(5,a.boundingRect.y1,a.chart.width-10,a.boundingRect.height);l.clip();a.renderLabelsTicksAndTitle();l.restore();b&&b.renderLabelsTicksAndTitle();c&&c.renderLabelsTicksAndTitle()}else{n=Math.ceil(a.createLabelsAndCalculateWidth());b&&(b.lineCoordinates={},f=Math.round(e.x1+n+a.margin),g=Math.round(e.x2>b.chart.width-10?b.chart.width-10:e.x2),b.lineCoordinates.x1=f,b.lineCoordinates.x2=g,b.lineCoordinates.width=Math.abs(g-f));c&&(c.lineCoordinates={},f=Math.round(e.x1+n+a.margin),g=Math.round(e.x2> -c.chart.width-10?c.chart.width-10:e.x2),c.lineCoordinates.x1=f,c.lineCoordinates.x2=g,c.lineCoordinates.width=Math.abs(g-f));var m=Math.ceil(b?b.createLabelsAndCalculateHeight():0),q=Math.ceil(c?c.createLabelsAndCalculateHeight():0);b&&(d=Math.round(e.y2-m-b.margin),k=Math.round(e.y2-h>b.chart.height-10?b.chart.height-10:e.y2-h),b.lineCoordinates.y1=d,b.lineCoordinates.y2=d,b.boundingRect={x1:f,y1:d,x2:g,y2:k,width:g-f,height:m});c&&(d=Math.round(e.y1+c.margin),k=e.y1+c.margin+q,c.lineCoordinates.y1= -k,c.lineCoordinates.y2=k,c.boundingRect={x1:f,y1:d,x2:g,y2:k,width:g-f,height:q});f=Math.round(e.x1+a.margin);d=Math.round(c?c.lineCoordinates.y2:10>e.y1?10:e.y1);g=Math.round(e.x1+n+a.margin);k=Math.round(b?b.lineCoordinates.y1:e.y2-h>a.chart.height-10?a.chart.height-10:e.y2-h);a.lineCoordinates={x1:g,y1:d,x2:g,y2:k,height:Math.abs(k-d)};a.boundingRect={x1:f,y1:d,x2:g,y2:k,width:g-f,height:k-d};a.calculateValueToPixelconversionParameters();b&&b.calculateValueToPixelconversionParameters();c&&c.calculateValueToPixelconversionParameters(); -b&&b.renderLabelsTicksAndTitle();c&&c.renderLabelsTicksAndTitle();a.renderLabelsTicksAndTitle()}p.preparePlotArea();e=a.chart.plotArea;l.save();l.rect(e.x1,e.y1,Math.abs(e.x2-e.x1),Math.abs(e.y2-e.y1));l.clip();a.renderStripLinesOfThicknessType("value");b&&b.renderStripLinesOfThicknessType("value");c&&c.renderStripLinesOfThicknessType("value");a.renderInterlacedColors();b&&b.renderInterlacedColors();c&&c.renderInterlacedColors();l.restore();a.renderGrid();b&&b.renderGrid();c&&c.renderGrid();a.renderAxisLine(); -b&&b.renderAxisLine();c&&c.renderAxisLine();a.renderStripLinesOfThicknessType("pixel");b&&b.renderStripLinesOfThicknessType("pixel");c&&c.renderStripLinesOfThicknessType("pixel")};x.prototype.renderLabelsTicksAndTitle=function(){var a=!1,b=0,c=1,d=0;0!==this.labelAngle&&360!==this.labelAngle&&(c=1.2);if("undefined"===typeof this._options.interval){if("bottom"===this._position||"top"===this._position){for(e=0;ethis.lineCoordinates.width*c&&(a=!0)}if("left"===this._position||"right"===this._position){for(e=0;ethis.lineCoordinates.height*c&&(a=!0)}}if("bottom"===this._position){for(var e=0,f,e=0;ethis.maximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine?(c=this._labels[e].stripLine,this.ctx.lineWidth=c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(), -this.ctx.moveTo(c,b.y<<0),this.ctx.lineTo(c,b.y+this.tickLength<<0),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)0===f.textBlock.angle?(b.x-=f.textBlock.width/2,b.y+=this.tickLength+f.textBlock.fontSize/2):(b.x-=0>this.labelAngle?f.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+Math.abs(0>this.labelAngle?f.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),f.textBlock.x=b.x,f.textBlock.y=b.y,f.textBlock.render(!0)}this.title&&(this._titleTextBlock= -new G(this.ctx,{x:this.lineCoordinates.x1,y:this.boundingRect.y2-this.titleFontSize-5,maxWidth:this.lineCoordinates.width,maxHeight:1.5*this.titleFontSize,angle:0,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/ -2,this._titleTextBlock.y=this.boundingRect.y2-this._titleTextBlock.height-3,this._titleTextBlock.render(!0))}else if("top"===this._position){for(e=0;ethis.maximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine?(c=this._labels[e].stripLine,this.ctx.lineWidth=c.thickness, -this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,b.y<<0),this.ctx.lineTo(c,b.y-this.tickLength<<0),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)0===f.textBlock.angle?(b.x-=f.textBlock.width/2,b.y-=this.tickLength+f.textBlock.height/2):(b.x-=0this.maximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine? -(c=this._labels[e].stripLine,this.ctx.lineWidth=c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x-this.tickLength<<0,c),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)f.textBlock.x=b.x-f.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5,f.textBlock.y=0===this.labelAngle?b.y:b.y-f.textBlock.width* -Math.sin(Math.PI/180*this.labelAngle),f.textBlock.render(!0)}this.title&&(this._titleTextBlock=new G(this.ctx,{x:this.boundingRect.x1+1,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:-90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y= -this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}else if("right"===this._position){for(e=0;ethis.maximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine?(c=this._labels[e].stripLine,this.ctx.lineWidth= -c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x+this.tickLength<<0,c),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)f.textBlock.x=b.x+this.tickLength+5,f.textBlock.y=b.y,f.textBlock.render(!0)}this.title&&(this._titleTextBlock=new G(this.ctx,{x:this.boundingRect.x2-1,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height, -maxHeight:1.5*this.titleFontSize,angle:90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}};x.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx, -b,c,d=this.chart.plotArea,e=0;b=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e=this._labels.length-1?this.getPixelCoordinatesOnAxis(this.maximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x,d.y1,Math.abs(c.x-b.x),Math.abs(d.y1-d.y2)),b=!1):b=!0);else if(("left"===this._position|| -"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e=this._labels.length-1?this.getPixelCoordinatesOnAxis(this.maximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(d.x1,b.y,Math.abs(d.x1-d.x2),Math.abs(b.y-c.y)),b=!1):b=!0);a.beginPath()};x.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0< -this.stripLines.length&&a)for(var b=0,b=0;bthis.maximum)||(c.showOnTop?this.chart.addEventListener("dataAnimationIterationEnd",c.render,c):c.render()))}};x.prototype.renderGrid=function(){if(this.gridThickness&&0this.maximum||(a.beginPath(),b=this.getPixelCoordinatesOnAxis(this._labels[d].position),b=1===a.lineWidth%2?(b.x<<0)+0.5:b.x<<0,a.moveTo(b,c.y1<<0),a.lineTo(b,c.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var d=0;dthis.maximum)||(a.beginPath(),b=this.getPixelCoordinatesOnAxis(this._labels[d].position),b=1===a.lineWidth%2?(b.y<<0)+0.5:b.y<<0,a.moveTo(c.x1<<0,b),a.lineTo(c.x2<<0,b),a.stroke())}};x.prototype.renderAxisLine=function(){var a=this.chart.ctx;if("bottom"===this._position||"top"===this._position){if(this.lineThickness){a.lineWidth=this.lineThickness;a.strokeStyle= -this.lineColor?this.lineColor:"black";a.setLineDash&&a.setLineDash(M(this.lineDashType,this.lineThickness));var b=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;a.beginPath();a.moveTo(this.lineCoordinates.x1,b);a.lineTo(this.lineCoordinates.x2,b);a.stroke()}}else"left"!==this._position&&"right"!==this._position||!this.lineThickness||(a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor,a.setLineDash&&a.setLineDash(M(this.lineDashType,this.lineThickness)), -b=1===this.lineThickness%2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0,a.beginPath(),a.moveTo(b,this.lineCoordinates.y1),a.lineTo(b,this.lineCoordinates.y2),a.stroke())};x.prototype.getPixelCoordinatesOnAxis=function(a){var b={},c=this.lineCoordinates.width,d=this.lineCoordinates.height;if("bottom"===this._position||"top"===this._position)c/=Math.abs(this.maximum-this.minimum),b.x=this.lineCoordinates.x1+c*(a-this.minimum),b.y=this.lineCoordinates.y1;if("left"===this._position||"right"=== -this._position)c=d/Math.abs(this.maximum-this.minimum),b.y=this.lineCoordinates.y2-c*(a-this.minimum),b.x=this.lineCoordinates.x2;return b};x.prototype.getXValueAt=function(a){if(!a)return null;var b=null;"left"===this._position?b=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-a.y)+this.chart.axisX.minimum:"bottom"===this._position&&(b=(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width* -(a.x-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum);return b};x.prototype.calculateValueToPixelconversionParameters=function(a){a={pixelPerUnit:null,minimum:null,reference:null};var b=this.lineCoordinates.width,c=this.lineCoordinates.height;a.minimum=this.minimum;if("bottom"===this._position||"top"===this._position)a.pixelPerUnit=b/Math.abs(this.maximum-this.minimum),a.reference=this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)a.pixelPerUnit=-1*c/Math.abs(this.maximum- -this.minimum),a.reference=this.lineCoordinates.y2;this.conversionParameters=a};x.prototype.calculateAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),b=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?8:Math.max(6,Math.floor(this.maxWidth/62)):Math.max(Math.floor(this.maxWidth/40),2),c,d,e,f;f=0;"axisX"===this.type?(c=null!==this.sessionVariables.internalMinimum? -this.sessionVariables.internalMinimum:this.dataInfo.viewPortMin,d=null!==this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:this.dataInfo.viewPortMax,0===d-c&&(f="undefined"===typeof this._options.interval?0.4:this._options.interval,d+=f,c-=f),Infinity!==this.dataInfo.minDiff?e=this.dataInfo.minDiff:1d?(f=Math.min(Math.abs(0.01*Math.abs(d-c)),5),0<=d?c=d-f:d=c+f):(f=Math.min(Math.abs(0.01*Math.abs(d-c)),0.05),0!==d&&(d+=f),0!==c&&(c-=f)):(d="undefined"===typeof this._options.interval?-Infinity:this._options.interval, -c=0),!this.includeZero||"undefined"!==typeof this._options.minimum&&null!==this._options.minimum||0d&&(d=0));"axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType?(f=d-c,this.intervalType||(f/1<=a?(this.interval=1,this.intervalType="millisecond"):f/2<=a?(this.interval=2,this.intervalType="millisecond"):f/5<=a?(this.interval=5,this.intervalType="millisecond"):f/10<=a?(this.interval= -10,this.intervalType="millisecond"):f/20<=a?(this.interval=20,this.intervalType="millisecond"):f/50<=a?(this.interval=50,this.intervalType="millisecond"):f/100<=a?(this.interval=100,this.intervalType="millisecond"):f/200<=a?(this.interval=200,this.intervalType="millisecond"):f/250<=a?(this.interval=250,this.intervalType="millisecond"):f/300<=a?(this.interval=300,this.intervalType="millisecond"):f/400<=a?(this.interval=400,this.intervalType="millisecond"):f/500<=a?(this.interval=500,this.intervalType= -"millisecond"):f/(1*B.secondDuration)<=a?(this.interval=1,this.intervalType="second"):f/(2*B.secondDuration)<=a?(this.interval=2,this.intervalType="second"):f/(5*B.secondDuration)<=a?(this.interval=5,this.intervalType="second"):f/(10*B.secondDuration)<=a?(this.interval=10,this.intervalType="second"):f/(15*B.secondDuration)<=a?(this.interval=15,this.intervalType="second"):f/(20*B.secondDuration)<=a?(this.interval=20,this.intervalType="second"):f/(30*B.secondDuration)<=a?(this.interval=30,this.intervalType= -"second"):f/(1*B.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):f/(2*B.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):f/(5*B.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):f/(10*B.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):f/(15*B.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):f/(20*B.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):f/(30*B.minuteDuration)<=a?(this.interval=30,this.intervalType= -"minute"):f/(1*B.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):f/(2*B.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):f/(3*B.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):f/(6*B.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):f/(1*B.dayDuration)<=a?(this.interval=1,this.intervalType="day"):f/(2*B.dayDuration)<=a?(this.interval=2,this.intervalType="day"):f/(4*B.dayDuration)<=a?(this.interval=4,this.intervalType="day"):f/(1*B.weekDuration)<=a?(this.interval= -1,this.intervalType="week"):f/(2*B.weekDuration)<=a?(this.interval=2,this.intervalType="week"):f/(3*B.weekDuration)<=a?(this.interval=3,this.intervalType="week"):f/(1*B.monthDuration)<=a?(this.interval=1,this.intervalType="month"):f/(2*B.monthDuration)<=a?(this.interval=2,this.intervalType="month"):f/(3*B.monthDuration)<=a?(this.interval=3,this.intervalType="month"):f/(6*B.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=f/(1*B.yearDuration)<=a?1:f/(2*B.yearDuration)<= -a?2:f/(4*B.yearDuration)<=a?4:Math.floor(x.getNiceNumber(f/(a-1),!0)/B.yearDuration),this.intervalType="year")),this.minimum=null!==this.sessionVariables.internalMinimum?this.sessionVariables.internalMinimum:c-e/2,this.maximum=null!==this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:d+e/2,this.valueFormatString||(b?this.valueFormatString="MMM DD YYYY HH:mm":"year"===this.intervalType?this.valueFormatString="YYYY":"month"===this.intervalType?this.valueFormatString="MMM YYYY": -"week"===this.intervalType?this.valueFormatString="MMM DD YYYY":"day"===this.intervalType?this.valueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.valueFormatString="hh:mm TT":"minute"===this.intervalType?this.valueFormatString="hh:mm TT":"second"===this.intervalType?this.valueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.valueFormatString="fff'ms'")),this.intervalstartTimePercent=this.getLabelStartPoint(new Date(this.minimum),this.intervalType,this.interval)):(this.intervalType= -"number",f=x.getNiceNumber(d-c,!1),this.interval=this._options&&this._options.interval?this._options.interval:x.getNiceNumber(f/(a-1),!0),this.minimum=null!==this.sessionVariables.internalMinimum?this.sessionVariables.internalMinimum:Math.floor(c/this.interval)*this.interval,this.maximum=null!==this.sessionVariables.internalMaximum?this.sessionVariables.internalMaximum:Math.ceil(d/this.interval)*this.interval,0===this.maximum&&0===this.minimum&&(0===this._options.minimum?this.maximum+=10:0===this._options.maximum&& -(this.minimum-=10),this._options&&"undefined"===typeof this._options.interval&&(this.interval=x.getNiceNumber((this.maximum-this.minimum)/(a-1),!0))),"axisX"===this.type?(null===this.sessionVariables.internalMinimum&&(this.minimum=c-e/2),null===this.sessionVariables.internalMaximum&&(this.maximum=d+e/2),this.intervalstartTimePercent=Math.floor((this.minimum+0.2*this.interval)/this.interval)*this.interval):"axisY"===this.type&&(this.intervalstartTimePercent=this.minimum));"axisX"===this.type&&(this._absoluteMinimum= -this._options&&"undefined"!==typeof this._options.minimum?this._options.minimum:this.dataInfo.min-e/2,this._absoluteMaximum=this._options&&"undefined"!==typeof this._options.maximum?this._options.maximum:this.dataInfo.max+e/2);if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",f=Math.abs(this.maximum-this.minimum),1>f)){b=Math.floor(Math.abs(Math.log(f)/Math.LN10))+2;if(isNaN(b)||!isFinite(b))b=2;if(2d?1:3>d?2:7>d?5:10:1>=d?1:2>=d?2:5>=d?5:10)*Math.pow(10,c)).toFixed(20))};x.prototype.getLabelStartPoint=function(){var a=$(this.interval,this.intervalType),a=new Date(Math.floor(this.minimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0(new Date).getTime()- -this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this._updateToolTip(a,b))};Q.prototype._updateToolTip=function(a,b){if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof b){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;b=this._prevY}else this._prevX=a,this._prevY=b;var c=null,d=null,e=[],f=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){f="xySwapped"===this.chart.plotInfo.axisPlacement?(this.chart.axisX.maximum-this.chart.axisX.minimum)/ -this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-b)+this.chart.axisX.minimum:(this.chart.axisX.maximum-this.chart.axisX.minimum)/this.chart.axisX.lineCoordinates.width*(a-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.minimum;c=[];for(d=0;dtoolTipLeft&&(toolTipLeft+=this.container.clientWidth+20);toolTipLeft+this.container.clientWidth>this.chart._container.clientWidth&& -(toolTipLeft=Math.max(0,this.chart._container.clientWidth-this.container.clientWidth));toolTipLeft+="px";e=1!==e.length||this.shared||"line"!==e[0].dataSeries.type&&"stepLine"!==e[0].dataSeries.type&&"spline"!==e[0].dataSeries.type&&"area"!==e[0].dataSeries.type&&"stepArea"!==e[0].dataSeries.type&&"splineArea"!==e[0].dataSeries.type&&"stackedArea"!==e[0].dataSeries.type&&"stackedArea100"!==e[0].dataSeries.type?"bar"===e[0].dataSeries.type||"rangeBar"===e[0].dataSeries.type||"stackedBar"===e[0].dataSeries.type|| -"stackedBar100"===e[0].dataSeries.type?e[0].dataSeries.axisX.lineCoordinates.y2-e[0].dataSeries.axisX.lineCoordinates.height/Math.abs(e[0].dataSeries.axisX.maximum-e[0].dataSeries.axisX.minimum)*Math.abs(e[0].dataPoint.x-e[0].dataSeries.axisX.minimum)+0.5<<0:b:e[0].dataSeries.axisY.lineCoordinates.y2-e[0].dataSeries.axisY.lineCoordinates.height/Math.abs(e[0].dataSeries.axisY.maximum-e[0].dataSeries.axisY.minimum)*Math.abs(e[0].dataPoint.y-e[0].dataSeries.axisY.minimum)+0.5<<0;e=-e+10;0{name}:  {y}";else if("bubble"===c.type)f+=d.toolTipContent?d.toolTipContent: -c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y},   {z}";else if("pie"===c.type||"doughnut"===c.type||"funnel"===c.type)f+=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"  {y}";else if("rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)f+=d.toolTipContent? -d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y[0]}, {y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)f+=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:
Open:   {y[0]}
High:    {y[1]}
Low:   {y[2]}
Close:   {y[3]}"; -null===b&&(b="");!0===this.reversed?(b=this.chart.replaceKeywordsWithValue(f,d,c,e)+b,k"+b)):(b+=this.chart.replaceKeywordsWithValue(f,d,c,e),k"))}null!==b&&(b=p+b)}else{c=a[0].dataSeries;d=a[0].dataPoint;e=a[0].index;if(null===d.toolTipContent||"undefined"===typeof d.toolTipContent&&null===c._options.toolTipContent)return null;if("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"=== -c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+" :  {y}";else if("bubble"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent: -this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+":  {y},   {z}";else if("pie"===c.type||"doughnut"===c.type||"funnel"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:(d.name?"{name}:  ":d.label?"{label}:  ":"")+"{y}";else if("rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type|| -"rangeSplineArea"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+" :  {y[0]},  {y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+ -"
Open:   {y[0]}
High:    {y[1]}
Low:     {y[2]}
Close:   {y[3]}";null===b&&(b="");b+=this.chart.replaceKeywordsWithValue(f,d,c,e)}return b};Q.prototype.enableAnimation=function(){this.container.style.WebkitTransition||(this.container.style.WebkitTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MozTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MsTransition="left .2s ease-out, bottom .2s ease-out", -this.container.style.transition="left .2s ease-out, bottom .2s ease-out")};Q.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};Q.prototype.hide=function(a){this.enabled&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())}; -w.prototype.getPercentAndTotal=function(a,b){var c=null,d=null,e=null;if(0<=a.type.indexOf("stacked"))d=0,c=b.x.getTime?b.x.getTime():b.x,c in a.plotUnit.yTotals&&(d=a.plotUnit.yTotals[c],e=isNaN(b.y)?0:0===d?0:100*(b.y/d));else if("pie"===a.type||"doughnut"===a.type){for(i=d=0;id&&a.push(b),b.animationCallback(d),1<=d&&b.onComplete)b.onComplete();this.animations=a;0=(new Date).getTime()-a._dropDownCloseTime.getTime()||(a._dropdownMenu.style.display="block",a._menuButton.blur(),a._dropdownMenu.focus())},!0));if(!this._dropdownMenu&&this.exportEnabled&& +t){this._dropdownMenu=document.createElement("div");this._dropdownMenu.setAttribute("tabindex",-1);this._dropdownMenu.style.cssText="position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 1px;top: 25px;min-width: 120px;outline: 0;border: 1px solid silver;font-size: 14px;font-family: Calibri, Verdana, sans-serif;padding: 5px 0px 5px 0px;text-align: left;background-color: #fff;line-height: 20px;box-shadow: 2px 2px 10px #888888;"; +a._dropdownMenu.style.display="none";this._toolBar.appendChild(this._dropdownMenu);F(this._dropdownMenu,"blur",function(){S(a._dropdownMenu);a._dropDownCloseTime=new Date},!0);var b=document.createElement("div");b.style.cssText="padding: 2px 15px 2px 10px";b.innerHTML=this._cultureInfo.saveJPGText;this._dropdownMenu.appendChild(b);F(b,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);F(b,"mouseout",function(){this.style.backgroundColor="transparent"},!0);F(b,"click",function(){za(a.canvas, +"jpeg",a.exportFileName);S(a._dropdownMenu)},!0);b=document.createElement("div");b.style.cssText="padding: 2px 15px 2px 10px";b.innerHTML=this._cultureInfo.savePNGText;this._dropdownMenu.appendChild(b);F(b,"mouseover",function(){this.style.backgroundColor="#EEEEEE"},!0);F(b,"mouseout",function(){this.style.backgroundColor="transparent"},!0);F(b,"click",function(){za(a.canvas,"png",a.exportFileName);S(a._dropdownMenu)},!0)}"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?Q(a, +a._zoomButton,"zoom"):Q(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&Q(a,a._resetButton,"reset"));if("undefined"===typeof ma.Chart.creditHref)this.creditHref="http://canvasjs.com/",this.creditText="CanvasJS.com";else var c=this.updateOption("creditText"),d=this.updateOption("creditHref");if(0===this.renderCount||c||d)this._creditLink.setAttribute("href",this.creditHref),this._creditLink.innerHTML=this.creditText;this.creditHref&&this.creditText?this._creditLink.parentElement|| +this._canvasJSContainer.appendChild(this._creditLink):this._creditLink.parentElement&&this._canvasJSContainer.removeChild(this._creditLink);this._options.toolTip&&this._toolTip._options!==this._options.toolTip&&(this._toolTip._options=this._options.toolTip);for(var e in this._toolTip._options)this._toolTip._options.hasOwnProperty(e)&&this._toolTip.updateOption(e)};u.prototype._updateSize=function(){var a=0,b=0;this._options.width?a=this.width:this.width=a=0a&&"undefined"!==typeof g.startTimePercent?a>=g.startTimePercent&&g.animationCallback(g.easingFunction(a-g.startTimePercent,0,1,1-g.startTimePercent),g):g.animationCallback(g.easingFunction(a,0,1,1),g);p.dispatchEvent("dataAnimationIterationEnd",{chart:p})},function(){d=[];for(var a=0;aa.dataSeriesIndexes.length))for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f=!1,g=0;gc.max&&(c.max=d);eb.max&&(b.max=e);if(0q&&(q*=-1);c.minDiff>q&&0!==q&&(c.minDiff=q);null!==e&&null!==k.dataPoints[p-1].y&&(q=e-k.dataPoints[p-1].y, +0>q&&(q*=-1),b.minDiff>q&&0!==q&&(b.minDiff=q))}if(!(dn&&!l)l=!0;else if(d>n&&l)continue;k.dataPoints[p].label&&(a.axisX.labels[d]=k.dataPoints[p].label);dc.viewPortMax&&(c.viewPortMax=d);null!==e&&(eb.viewPortMax&&(b.viewPortMax=e))}}this.plotInfo.axisXValueType=k.xValueType=f?"dateTime":"number"}};u.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var b= +a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f=!1,g=[],k=[],p=Infinity,h=0;hc.max&&(c.max=d);if(0w&&(w*=-1);c.minDiff>w&&0!==w&&(c.minDiff=w);null!==e&&null!==l.dataPoints[m-1].y&&(w=e-l.dataPoints[m-1].y,0>w&&(w*=-1),b.minDiff>w&&0!==w&&(b.minDiff=w))}if(!(ds&&!q)q=!0;else if(d>s&&q)continue;l.dataPoints[m].label&&(a.axisX.labels[d]=l.dataPoints[m].label);dc.viewPortMax&&(c.viewPortMax=d);null!==e&&(a.yTotals[d]=(a.yTotals[d]?a.yTotals[d]:0)+Math.abs(e),0<=e?g[d]=g[d]?g[d]+e:e:k[d]=k[d]?k[d]+e:e)}}this.plotInfo.axisXValueType=l.xValueType=f?"dateTime":"number"}for(m in g)g.hasOwnProperty(m)&&!isNaN(m)&&(a=g[m],ab.max&&(b.max=a),mc.viewPortMax||(ab.viewPortMax&&(b.viewPortMax=a)));for(m in k)k.hasOwnProperty(m)&&!isNaN(m)&&(a=k[m],ab.max&&(b.max=a),mc.viewPortMax||(ab.viewPortMax&&(b.viewPortMax=a)))}};u.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f=!1,g=!1,k=!1,p=[],h=0;hc.max&&(c.max=d);if(0w&&(w*=-1);c.minDiff>w&&0!==w&&(c.minDiff=w);P(e)||null===l.dataPoints[m-1].y||(w=e-l.dataPoints[m-1].y,0>w&&(w*=-1),b.minDiff> +w&&0!==w&&(b.minDiff=w))}if(!(ds&&!q)q=!0;else if(d>s&&q)continue;l.dataPoints[m].label&&(a.axisX.labels[d]=l.dataPoints[m].label);dc.viewPortMax&&(c.viewPortMax=d);null!==e&&(a.yTotals[d]=(a.yTotals[d]?a.yTotals[d]:0)+Math.abs(e),0<=e?g=!0:0>e&&(k=!0),p[d]=p[d]?p[d]+Math.abs(e):Math.abs(e))}}this.plotInfo.axisXValueType=l.xValueType=f?"dateTime":"number"}g&&!k?(b.max=P(b.viewPortMax)?99:Math.max(b.viewPortMax,99),b.min= +P(b.viewPortMin)?1:Math.min(b.viewPortMin,1)):g&&k?(b.max=P(b.viewPortMax)?99:Math.max(b.viewPortMax,99),b.min=P(b.viewPortMin)?-99:Math.min(b.viewPortMin,-99)):!g&&k&&(b.max=P(b.viewPortMax)?-1:Math.max(b.viewPortMax,-1),b.min=P(b.viewPortMin)?-99:Math.min(b.viewPortMin,-99));b.viewPortMin=b.min;b.viewPortMax=b.max;a.dataPointYSums=p}};u.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var b=a.axisY.dataInfo,c=a.axisX.dataInfo,d,e,f,g,k=!1, +p=0;pc.max&&(c.max=d);fb.max&&(b.max=g);if(0s&&(s*=-1);c.minDiff>s&&0!==s&&(c.minDiff=s);null!==e[0]&&null!==h.dataPoints[l-1].y[0]&&(s=e[0]-h.dataPoints[l-1].y[0],0>s&&(s*=-1),b.minDiff>s&&0!==s&&(b.minDiff=s))}if(!(dr&&!n)n=!0;else if(d>r&&n)continue;h.dataPoints[l].label&&(a.axisX.labels[d]=h.dataPoints[l].label);dc.viewPortMax&&(c.viewPortMax= +d);null!==e&&(fb.viewPortMax&&(b.viewPortMax=g))}}this.plotInfo.axisXValueType=h.xValueType=k?"dateTime":"number"}};u.prototype.getDataPointAtXY=function(a,b,c){c=c||!1;for(var d=[],e=this._dataInRenderedOrder.length-1;0<=e;e--){var f=null;(f=this._dataInRenderedOrder[e].getDataPointAtXY(a,b,c))&&d.push(f)}a=null;b=!1;for(c=0;c=e.x1&&(a<=e.x2&&b>=e.y1&&b<=e.y2)&&(d=e.id)}return d};u.prototype.getAutoFontSize=function(a,b,c){a/=400;return Math.round(Math.min(this.width,this.height)*a)};u.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};u.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))};u.prototype.attachEvent= +function(a){this._events.push(a)};u.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var b=[],c=a.changedTouches,d=c?c[0]:a,e=null;switch(a.type){case "touchstart":case "MSPointerDown":b=["mousemove","mousedown"];this._lastTouchData=na(d);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":b=["mousemove"];break;case "touchend":case "MSPointerUp":b="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType?["mouseup", +"click"]:["mouseup"];break;default:return}if(!(c&&1g)){this._lastTouchData.scroll=!0;var k=window.parent||window;k&&k.scrollBy&&k.scrollBy(0,-f)}}catch(p){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c=f.x1&&b.x<=f.x2&&b.y>=f.y1&&b.y<=f.y2){d[c].call(d.context,b.x,b.y);"mousedown"===c&&!0===d.capture? +(u.capturedEventParam=d,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.body.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===c&&(d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.body.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else d=null}a.target.style.cursor=d&&d.cursor?d.cursor:this._defaultCursor}this._toolTip&&this._toolTip.enabled&&(c=this.plotArea,(b.xc.x2||b.yc.y2)&& +this._toolTip.hide());this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}}};u.prototype._plotAreaMouseDown=function(a,b){this.isDrag=!0;this.dragStartPoint={x:a,y:b}};u.prototype._plotAreaMouseUp=function(a,b){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var c=b-this.dragStartPoint.y,d=a-this.dragStartPoint.x,e=0<=this.zoomType.indexOf("x"),f=0<=this.zoomType.indexOf("y"),g=!1;this.resetOverlayedCanvas(); +if("xySwapped"===this.plotInfo.axisPlacement)var k=f,f=e,e=k;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(e=f=0;ec.maximum&&(f=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum-f,c.sessionVariables.newViewportMaximum= +c.viewportMaximum-f,g=!0);else if((!e||2Math.abs(c)&&(this.panEnabled||this.zoomEnabled)? +this._toolTip.hide():this.panEnabled||this.zoomEnabled||this._toolTip.mouseMoveHandler(a,b);(!e||2n)var q=n,n=m,m=q;if(isFinite(l.dataInfo.minDiff))if(!(Math.abs(n-m)<3*Math.abs(l.dataInfo.minDiff)||ml.maximum))h.push(l), +f.push({val1:m,val2:n}),k=!0;else if(!e){k=!1;break}}if(k)for(g=0;gb.lineCoordinates.x2?this.axisX.lineCoordinates.x2:b.lineCoordinates.x2,a.y2=this.axisX.lineCoordinates.y2>this.axisX.lineCoordinates.y1?this.axisX.lineCoordinates.y2:b.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1):(b=this.layoutManager.getFreeSpace(),a.x1=b.x1,a.x2=b.x2,a.y1=b.y1,a.y2=b.y2,a.width=b.width,a.height=b.height);t||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0v.viewportMaximum||h.dataPoint.yx.viewportMaximum)continue}else if(0<=g.indexOf("column")){if(h.dataPoint.xv.viewportMaximum||h.bounds.y1>b.y2||h.bounds.y2v.viewportMaximum|| +h.bounds.x1>b.x2||h.bounds.x2v.viewportMaximum)continue;e=f=2;"horizontal"===r?(d=n.width,k=n.height):(k=n.width,d=n.height);if("normal"===this.plotInfo.axisPlacement){if(0<=g.indexOf("line")||0<=g.indexOf("area"))c="auto",f=4;else if(0<=g.indexOf("stacked"))"auto"===c&&(c="inside");else if("bubble"===g||"scatter"===g)c="inside";l=h.point.x-d/2;"inside"!==c?(d=b.y1,e=b.y2,0e-k-f&&(m="auto"===c?Math.min(h.point.y,e)-k-f:e-k-f))):(d=Math.max(h.bounds.y1,b.y1),e=Math.min(h.bounds.y2,b.y2),c=0<=g.indexOf("range")?0e-k-f&&("bubble"===g||"scatter"===g)&&(m=Math.min(h.point.y+f,b.y2-k-f))), +m=Math.min(m,e-k))}else 0<=g.indexOf("line")||0<=g.indexOf("area")||0<=g.indexOf("scatter")?(c="auto",e=4):0<=g.indexOf("stacked")?"auto"===c&&(c="inside"):"bubble"===g&&(c="inside"),m=h.point.y-k/2,"inside"!==c?(f=b.x1,g=b.x2,0>s?(l=h.point.x-d-e,lg-d-e&&(l="auto"===c?Math.min(h.point.x,g)-d-e:g-d-e))):(f=Math.max(h.bounds.x1,b.x1),Math.min(h.bounds.x2,b.x2),c=0<=g.indexOf("range")?0>s?Math.max(h.bounds.x1,b.x1)+d/2+e:Math.min(h.bounds.x2, +b.x2)-d/2-e:(Math.max(h.bounds.x1,b.x1)+Math.min(h.bounds.x2,b.x2))/2,l=0>s?Math.max(h.point.x,c)-d/2:Math.min(h.point.x,c)-d/2,l=Math.max(l,f));"vertical"===r&&(m+=k);n.x=l;n.y=m;n.render(!0)}}return{source:a,dest:this.plotArea.ctx,animationCallback:A.fadeInAnimation,easingFunction:A.easing.easeInQuad,animationBase:0,startTimePercent:0.7}};u.prototype.renderLine=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save(); +var d=this.plotArea;b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();for(var d=[],e=0;ea.axisX.dataInfo.viewPortMax))if("number"!==typeof k[l].y)0=a.dataSeriesIndexes.length)){var c=this._eventManager.ghostCtx;b.save();var d=this.plotArea;b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();for(var d=[],e=0;ea.axisX.dataInfo.viewPortMax))if("number"!==typeof k[l].y)0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var e=[],f=0;fa.axisX.dataInfo.viewPortMax))if("number"!==typeof p[l].y)0=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,k,p=a.axisY.conversionParameters.reference+ +a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,e=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,h=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));l=this.dataPointWidth?this.dataPointWidth:0.9*(d.width/ +Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(l)/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&e>h&&(e=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(l=h);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height), +this._eventManager.ghostCtx.clip());for(d=0;da.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(k-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+ +a.axisY.conversionParameters.pixelPerUnit*(n[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;f=f-a.plotType.totalDataSeries*l/2+(a.previousDataSeriesCount+d)*l<<0;var r=f+l<<0,s;0<=n[e].y?s=p:(s=g,g=p);g>s&&(s=g=s);c=n[e].color?n[e].color:m._colorSet[e%m._colorSet.length];I(b,f,g,r,s,c,0,null,q&&0<=n[e].y,0>n[e].y&&q,!1,!1,m.fillOpacity);c=m.dataPointIds[e];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:e,x1:f,y1:g,x2:r,y2:s};c=B(c);t&&I(this._eventManager.ghostCtx, +f,g,r,s,c,0,null,!1,!1,!1,!1);(n[e].indexLabel||m.indexLabel||n[e].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:n[e],dataSeries:m,point:{x:f+(r-f)/2,y:0<=n[e].y?g:s},direction:0<=n[e].y?1:-1,bounds:{x1:f,y1:Math.min(g,s),x2:r,y2:Math.max(g,s)},color:c})}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.min(p,a.axisY.boundingRect.y2);return{source:b,dest:this.plotArea.ctx,animationCallback:A.yScaleAnimation,easingFunction:A.easing.easeOutQuart, +animationBase:a}}};u.prototype.renderStackedColumn=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,h=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.width<< +0,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));l=this.dataPointWidth?this.dataPointWidth:0.9*(d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(l)/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(l=h); +b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;ha.axisX.dataInfo.viewPortMax)&& +"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(q[g].y-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*l/2+a.index*l<<0,w=s+l<<0,v;if(0<=q[g].y){var x=e[c]?e[c]:0;k-=x;v=p-x;e[c]=x+(v-k)}else x=f[c]?f[c]:0,v=k+x,k=p+x,f[c]=x+(v-k);c=q[g].color?q[g].color:n._colorSet[g%n._colorSet.length]; +I(b,s,k,w,v,c,0,null,r&&0<=q[g].y,0>q[g].y&&r,!1,!1,n.fillOpacity);c=n.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:g,x1:s,y1:k,x2:w,y2:v};c=B(c);t&&I(this._eventManager.ghostCtx,s,k,w,v,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||n.indexLabel||q[g].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:q[g],dataSeries:n,point:{x:d,y:0<=q[g].y?k:v},direction:0<=q[g].y?1:-1,bounds:{x1:s,y1:Math.min(k, +v),x2:w,y2:Math.max(k,v)},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.min(p,a.axisY.boundingRect.y2);return{source:b,dest:this.plotArea.ctx,animationCallback:A.yScaleAnimation,easingFunction:A.easing.easeOutQuart,animationBase:a}}};u.prototype.renderStackedColumn100=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit* +(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,h=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));l=this.dataPointWidth?this.dataPointWidth:0.9*(d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(l)/a.plotType.plotUnits.length)<< +0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(l=h);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;ha.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*((0!==a.dataPointYSums[c]?100*(q[g].y/a.dataPointYSums[c]): +0)-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*l/2+a.index*l<<0,w=s+l<<0,v;if(0<=q[g].y){var x=e[c]?e[c]:0;k-=x;v=p-x;e[c]=x+(v-k)}else x=f[c]?f[c]:0,v=k+x,k=p+x,f[c]=x+(v-k);c=q[g].color?q[g].color:n._colorSet[g%n._colorSet.length];I(b,s,k,w,v,c,0,null,r&&0<=q[g].y,0>q[g].y&&r,!1,!1,n.fillOpacity);c=n.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:g,x1:s,y1:k,x2:w,y2:v};c=B(c);t&&I(this._eventManager.ghostCtx, +s,k,w,v,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||n.indexLabel||q[g].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:q[g],dataSeries:n,point:{x:d,y:0<=q[g].y?k:v},direction:0<=q[g].y?1:-1,bounds:{x1:s,y1:Math.min(k,v),x2:w,y2:Math.max(k,v)},color:c})}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.min(p,a.axisY.boundingRect.y2);return{source:b,dest:this.plotArea.ctx,animationCallback:A.yScaleAnimation,easingFunction:A.easing.easeOutQuart, +animationBase:a}}};u.prototype.renderBar=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,e=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,h=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height, +0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));l=this.dataPointWidth?this.dataPointWidth:0.9*(d.height/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(l)/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&e>h&&(e=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(l=h);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(d=0;da.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){g=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(k-a.axisX.conversionParameters.minimum)+0.5<<0;f=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(n[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;g=g-a.plotType.totalDataSeries*l/2+(a.previousDataSeriesCount+d)*l<<0;var r=g+l<<0,s;0<=n[e].y?s=p:(s=f,f=p);c=n[e].color?n[e].color:m._colorSet[e% +m._colorSet.length];I(b,s,g,f,r,c,0,null,q,!1,!1,!1,m.fillOpacity);c=m.dataPointIds[e];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:e,x1:s,y1:g,x2:f,y2:r};c=B(c);t&&I(this._eventManager.ghostCtx,s,g,f,r,c,0,null,!1,!1,!1,!1);(n[e].indexLabel||m.indexLabel||n[e].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:n[e],dataSeries:m,point:{x:0<=n[e].y?f:s,y:g+(r-g)/2},direction:0<=n[e].y?1:-1,bounds:{x1:Math.min(s, +f),y1:g,x2:Math.max(s,f),y2:r},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.max(p,a.axisX.boundingRect.x2);return{source:b,dest:this.plotArea.ctx,animationCallback:A.xScaleAnimation,easingFunction:A.easing.easeOutQuart,animationBase:a}}};u.prototype.renderStackedBar=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit* +(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,h=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));l=this.dataPointWidth?this.dataPointWidth:0.9*(d.height/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(l)/a.plotType.plotUnits.length)<< +0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(l=h);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;ha.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(q[g].y-a.axisY.conversionParameters.minimum); +var s=d-a.plotType.plotUnits.length*l/2+a.index*l<<0,w=s+l<<0,v;if(0<=q[g].y){var x=e[c]?e[c]:0;v=p+x;k+=x;e[c]=x+(k-v)}else x=f[c]?f[c]:0,v=k-x,k=p-x,f[c]=x+(k-v);c=q[g].color?q[g].color:n._colorSet[g%n._colorSet.length];I(b,v,s,k,w,c,0,null,r,!1,!1,!1,n.fillOpacity);c=n.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:g,x1:v,y1:s,x2:k,y2:w};c=B(c);t&&I(this._eventManager.ghostCtx,v,s,k,w,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||n.indexLabel|| +q[g].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:q[g],dataSeries:n,point:{x:0<=q[g].y?k:v,y:d},direction:0<=q[g].y?1:-1,bounds:{x1:Math.min(v,k),y1:s,x2:Math.max(v,k),y2:w},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();a=Math.max(p,a.axisX.boundingRect.x2);return{source:b,dest:this.plotArea.ctx,animationCallback:A.xScaleAnimation,easingFunction:A.easing.easeOutQuart,animationBase:a}}};u.prototype.renderStackedBar100=function(a){var b= +a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=0,k,p=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,g=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1,h=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.viewportMaximum- +a.axisX.viewportMinimum));l=this.dataPointWidth?this.dataPointWidth:0.9*(d.height/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(l)/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&hh&&(l=h);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width, +d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(h=0;ha.axisX.dataInfo.viewPortMax)&&"number"===typeof q[g].y){d=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit* +(c-a.axisX.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*((0!==a.dataPointYSums[c]?100*(q[g].y/a.dataPointYSums[c]):0)-a.axisY.conversionParameters.minimum);var s=d-a.plotType.plotUnits.length*l/2+a.index*l<<0,w=s+l<<0,v;if(0<=q[g].y){var x=e[c]?e[c]:0;v=p+x;k+=x;e[c]=x+(k-v)}else x=f[c]?f[c]:0,v=k-x,k=p-x,f[c]=x+(k-v);c=q[g].color?q[g].color:n._colorSet[g%n._colorSet.length];I(b,v,s,k,w,c,0,null,r,!1,!1,!1,n.fillOpacity);c= +n.dataPointIds[g];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:g,x1:v,y1:s,x2:k,y2:w};c=B(c);t&&I(this._eventManager.ghostCtx,v,s,k,w,c,0,null,!1,!1,!1,!1);(q[g].indexLabel||n.indexLabel||q[g].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:q[g],dataSeries:n,point:{x:0<=q[g].y?k:v,y:d},direction:0<=q[g].y?1:-1,bounds:{x1:Math.min(v,k),y1:s,x2:Math.max(v,k),y2:w},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore(); +a=Math.max(p,a.axisX.boundingRect.x2);return{source:b,dest:this.plotArea.ctx,animationCallback:A.xScaleAnimation,easingFunction:A.easing.easeOutQuart,animationBase:a}}};u.prototype.renderArea=function(a){function b(){x&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?v=w:0>a.axisY.viewportMaximum?v=f.y1:0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=a.axisX.lineCoordinates,f=a.axisY.lineCoordinates,g=[],k=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(k=0;ka.axisX.dataInfo.viewPortMax))if("number"!==typeof l[n].y)b(),y=!0;else{q=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(s-a.axisX.conversionParameters.minimum)+0.5<<0;r=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(l[n].y-a.axisY.conversionParameters.minimum)+0.5<<0;m||y?(c.beginPath(),c.moveTo(q,r),x={x:q,y:r},t&&(d.beginPath(),d.moveTo(q,r)),y=m=!1):(c.lineTo(q,r), +t&&d.lineTo(q,r),0==n%250&&b());var z=h.dataPointIds[n];this._eventManager.objectMap[z]={id:z,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:n,x1:q,y1:r};0!==l[n].markerSize&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?s=r:0>a.axisY.viewportMaximum?s=f.y1:0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=a.axisX.lineCoordinates,f=a.axisY.lineCoordinates,g=[],k=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(k=0;ka.axisX.dataInfo.viewPortMax))if("number"!==typeof l[m].y)0< +m&&(b(),v=[]);else{n=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(n-a.axisX.conversionParameters.minimum)+0.5<<0;q=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(l[m].y-a.axisY.conversionParameters.minimum)+0.5<<0;var x=h.dataPointIds[m];this._eventManager.objectMap[x]={id:x,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:m,x1:n,y1:q};v[v.length]={x:n,y:q};if(0!==l[m].markerSize&&(0=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?v=w:0>a.axisY.viewportMaximum?v=f.y1:0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=a.axisX.lineCoordinates,f=a.axisY.lineCoordinates,g=[],k=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(k=0;ka.axisX.dataInfo.viewPortMax)){var z=r;"number"!==typeof l[n].y? +(b(),E=!0):(q=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(s-a.axisX.conversionParameters.minimum)+0.5<<0,r=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(l[n].y-a.axisY.conversionParameters.minimum)+0.5<<0,m||E?(c.beginPath(),c.moveTo(q,r),x={x:q,y:r},t&&(d.beginPath(),d.moveTo(q,r)),E=m=!1):(c.lineTo(q,z),t&&d.lineTo(q,z),c.lineTo(q,r),t&&d.lineTo(q,r),0==n%250&&b()),z=h.dataPointIds[n],this._eventManager.objectMap[z]={id:z, +objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:n,x1:q,y1:r},0!==l[n].markerSize&&(0=a.dataSeriesIndexes.length)){var c=null,d=[],e=this.plotArea,f=[],g=[],k=0,p,h,l,m=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(0-a.axisY.conversionParameters.minimum)<<0,n=this._eventManager.ghostCtx;t&&n.beginPath(); +b.save();t&&n.save();b.beginPath();b.rect(e.x1,e.y1,e.width,e.height);b.clip();t&&(n.beginPath(),n.rect(e.x1,e.y1,e.width,e.height),n.clip());xValuePresent=[];for(e=0;ea.axisX.dataInfo.viewPortMax)&&"number"===typeof x.y){p=a.axisX.conversionParameters.reference+ +a.axisX.conversionParameters.pixelPerUnit*(l-a.axisX.conversionParameters.minimum)+0.5<<0;h=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(x.y-a.axisY.conversionParameters.minimum);var E=f[l]?f[l]:0;h-=E;v.push({x:p,y:m-E});f[l]=m-h;if(w)b.beginPath(),b.moveTo(p,h),t&&(n.beginPath(),n.moveTo(p,h)),w=!1;else if(b.lineTo(p,h),t&&n.lineTo(p,h),0==k%250){for(0=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=[],f=[],g=[],k=0,p,h,l,m=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit* +(0-a.axisY.conversionParameters.minimum)<<0,n=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,q=a.axisX.dataInfo.minDiff,q=0.9*d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(q)<<0,r=this._eventManager.ghostCtx;b.save();t&&r.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(r.beginPath(),r.rect(d.x1,d.y1,d.width,d.height),r.clip());xValuePresent=[];for(d=0;dq?q=1:q>n&&(q=n);var E=[];if(0a.axisX.dataInfo.viewPortMax)&&"number"===typeof y.y){h=0!==a.dataPointYSums[l]?100*(y.y/a.dataPointYSums[l]):0;p=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(l-a.axisX.conversionParameters.minimum)+0.5<<0;h=a.axisY.conversionParameters.reference+ +a.axisY.conversionParameters.pixelPerUnit*(h-a.axisY.conversionParameters.minimum);var z=f[l]?f[l]:0;h-=z;E.push({x:p,y:m-z});f[l]=m-h;if(x)b.beginPath(),b.moveTo(p,h),t&&(r.beginPath(),r.moveTo(p,h)),x=!1;else if(b.lineTo(p,h),t&&r.lineTo(p,h),0==k%250){for(0=c)){var d=this.plotArea,e=0,f,g,k=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,e=a.axisX.dataInfo.minDiff,c=0.9*(d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(e)/c)<<0;b.save();t&&this._eventManager.ghostCtx.save(); +b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=-Infinity,h=Infinity,l=0;la.axisX.dataInfo.viewPortMax||"undefined"===typeof q[e].z||(r=q[e].z,r>p&&(p=r),rc?c=1:c>k&&(c=k),0a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[e].y){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(f-a.axisX.conversionParameters.minimum)+ +0.5<<0;g=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(q[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;var r=q[e].z,w=2*Math.max(Math.sqrt((p===h?d/2:s+(d-s)/(p-h)*(r-h))/Math.PI)<<0,1),r=n.getMarkerProperties(e,b);r.size=w;b.globalAlpha=n.fillOpacity;K.drawMarker(f,g,b,r.type,r.size,r.color,r.borderColor,r.borderThickness);b.globalAlpha=1;var v=n.dataPointIds[e];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:e, +x1:f,y1:g,size:w};w=B(v);t&&K.drawMarker(f,g,this._eventManager.ghostCtx,r.type,r.size,w,w,r.borderThickness);(q[e].indexLabel||n.indexLabel||q[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[e],dataSeries:n,point:{x:f,y:g},direction:1,bounds:{x1:f-r.size/2,y1:g-r.size/2,x2:f+r.size/2,y2:g+r.size/2},color:null})}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:A.fadeInAnimation,easingFunction:A.easing.easeInQuad, +animationBase:0}}};u.prototype.renderScatter=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx,c=a.dataSeriesIndexes.length;if(!(0>=c)){var d=this.plotArea,e=0,f,g,k=this.dataPointMaxWidth?this.dataPointMaxWidth:0.15*this.width<<0,e=a.axisX.dataInfo.minDiff,c=0.9*(d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(e)/c)<<0;b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1, +d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;pc?c=1:c>k&&(c=k);if(0a.axisX.dataInfo.viewPortMax)&&"number"===typeof m[e].y){f=a.axisX.conversionParameters.reference+ +a.axisX.conversionParameters.pixelPerUnit*(f-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(m[e].y-a.axisY.conversionParameters.minimum)+0.5<<0;var r=l.getMarkerProperties(e,f,g,b);b.globalAlpha=l.fillOpacity;K.drawMarker(r.x,r.y,r.ctx,r.type,r.size,r.color,r.borderColor,r.borderThickness);b.globalAlpha=1;Math.sqrt((n-f)*(n-f)+(q-g)*(q-g))Math.min(this.plotArea.width,this.plotArea.height)|| +(n=l.dataPointIds[e],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:e,x1:f,y1:g},n=B(n),t&&K.drawMarker(r.x,r.y,this._eventManager.ghostCtx,r.type,r.size,n,n,r.borderThickness),(m[e].indexLabel||l.indexLabel||m[e].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:m[e],dataSeries:l,point:{x:f,y:g},direction:1,bounds:{x1:f-r.size/2,y1:g-r.size/2,x2:f+r.size/2,y2:g+r.size/2},color:null}),n=f,q=g)}}}b.restore(); +t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:A.fadeInAnimation,easingFunction:A.easing.easeInQuad,animationBase:0}}};u.prototype.renderCandlestick=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx,c=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=null,d=this.plotArea,e=0,f,g,k,p,h,l,e=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;f=this.dataPointMaxWidth?this.dataPointMaxWidth: +this.dataPointWidth?this.dataPointWidth:0.015*this.width;var m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));m=this.dataPointWidth?this.dataPointWidth:0.7*d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(m)<<0;this.dataPointMaxWidth&&e>f&&(e=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&ff&&(m=f);b.save();t&&c.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(c.rect(d.x1,d.y1,d.width,d.height),c.clip());for(var n=0;na.axisX.dataInfo.viewPortMax)&&null!==s[e].y&&s[e].y.length&&"number"===typeof s[e].y[0]&&"number"=== +typeof s[e].y[1]&&"number"===typeof s[e].y[2]&&"number"===typeof s[e].y[3]){f=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(l-a.axisX.conversionParameters.minimum)+0.5<<0;g=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(s[e].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;k=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(s[e].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;p=a.axisY.conversionParameters.reference+ +a.axisY.conversionParameters.pixelPerUnit*(s[e].y[2]-a.axisY.conversionParameters.minimum)+0.5<<0;h=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(s[e].y[3]-a.axisY.conversionParameters.minimum)+0.5<<0;var v=f-m/2<<0,x=v+m<<0,d=s[e].color?s[e].color:r._colorSet[0],E=Math.round(Math.max(1,0.15*m)),u=0===E%2?0:0.5,z=r.dataPointIds[e];this._eventManager.objectMap[z]={id:z,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:e,x1:v,y1:g,x2:x,y2:k,x3:f,y3:p,x4:f,y4:h, +borderThickness:E,color:d};b.strokeStyle=d;b.beginPath();b.lineWidth=E;c.lineWidth=Math.max(E,4);"candlestick"===r.type?(b.moveTo(f-u,k),b.lineTo(f-u,Math.min(g,h)),b.stroke(),b.moveTo(f-u,Math.max(g,h)),b.lineTo(f-u,p),b.stroke(),I(b,v,Math.min(g,h),x,Math.max(g,h),s[e].y[0]<=s[e].y[3]?r.risingColor:d,E,d,w,w,!1,!1,r.fillOpacity),t&&(d=B(z),c.strokeStyle=d,c.moveTo(f-u,k),c.lineTo(f-u,Math.min(g,h)),c.stroke(),c.moveTo(f-u,Math.max(g,h)),c.lineTo(f-u,p),c.stroke(),I(c,v,Math.min(g,h),x,Math.max(g, +h),d,0,null,!1,!1,!1,!1))):"ohlc"===r.type&&(b.moveTo(f-u,k),b.lineTo(f-u,p),b.stroke(),b.beginPath(),b.moveTo(f,g),b.lineTo(v,g),b.stroke(),b.beginPath(),b.moveTo(f,h),b.lineTo(x,h),b.stroke(),t&&(d=B(z),c.strokeStyle=d,c.moveTo(f-u,k),c.lineTo(f-u,p),c.stroke(),c.beginPath(),c.moveTo(f,g),c.lineTo(v,g),c.stroke(),c.beginPath(),c.moveTo(f,h),c.lineTo(x,h),c.stroke()));(s[e].indexLabel||r.indexLabel||s[e].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:r.type,dataPoint:s[e], +dataSeries:r,point:{x:v+(x-v)/2,y:k},direction:1,bounds:{x1:v,y1:Math.min(k,p),x2:x,y2:Math.max(k,p)},color:d})}}b.restore();t&&c.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:A.fadeInAnimation,easingFunction:A.easing.easeInQuad,animationBase:0}}};u.prototype.renderRangeColumn=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,e=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth: +1;f=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth?this.dataPointWidth:0.03*this.width;var k=a.axisX.dataInfo.minDiff;isFinite(k)||(k=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));k=this.dataPointWidth?this.dataPointWidth:0.9*(d.width/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(k)/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&e>f&&(e=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&& +ff&&(k=f);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;pa.axisX.dataInfo.viewPortMax)&&null!==m[e].y&&m[e].y.length&&"number"===typeof m[e].y[0]&&"number"===typeof m[e].y[1]){c=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(g-a.axisX.conversionParameters.minimum)+0.5<<0;d=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(m[e].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;f=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit* +(m[e].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;var q=c-a.plotType.totalDataSeries*k/2+(a.previousDataSeriesCount+p)*k<<0,r=q+k<<0,c=m[e].color?m[e].color:l._colorSet[e%l._colorSet.length];if(d>f){var s=d,d=f;f=s}s=l.dataPointIds[e];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:e,x1:q,y1:d,x2:r,y2:f};I(b,q,d,r,f,c,0,c,n,n,!1,!1,l.fillOpacity);c=B(s);t&&I(this._eventManager.ghostCtx,q,d,r,f,c,0,null,!1,!1,!1,!1);if(m[e].indexLabel||l.indexLabel|| +m[e].indexLabelFormatter||l.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:m[e],dataSeries:l,indexKeyword:0,point:{x:q+(r-q)/2,y:m[e].y[1]>=m[e].y[0]?f:d},direction:m[e].y[1]>=m[e].y[0]?-1:1,bounds:{x1:q,y1:Math.min(d,f),x2:r,y2:Math.max(d,f)},color:c}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:m[e],dataSeries:l,indexKeyword:1,point:{x:q+(r-q)/2,y:m[e].y[1]>=m[e].y[0]?d:f},direction:m[e].y[1]>=m[e].y[0]?1:-1,bounds:{x1:q,y1:Math.min(d,f),x2:r,y2:Math.max(d, +f)},color:c})}}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:A.fadeInAnimation,easingFunction:A.easing.easeInQuad,animationBase:0}}};u.prototype.renderRangeBar=function(a){var b=a.targetCanvasCtx||this.plotArea.ctx;if(!(0>=a.dataSeriesIndexes.length)){var c=null,d=this.plotArea,e=0,f,g,k,e=this.dataPointMinWidth?this.dataPointMinWidth:this.dataPointWidth?this.dataPointWidth:1;f=this.dataPointMaxWidth?this.dataPointMaxWidth:this.dataPointWidth? +this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum));p=this.dataPointWidth?this.dataPointWidth:0.9*(d.height/Math.abs(a.axisX.viewportMaximum-a.axisX.viewportMinimum)*Math.abs(p)/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&e>f&&(e=Math.min(this.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&& +ff&&(p=f);b.save();t&&this._eventManager.ghostCtx.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();t&&(this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var h=0;ha.axisX.dataInfo.viewPortMax)&&null!==n[e].y&&n[e].y.length&&"number"===typeof n[e].y[0]&&"number"===typeof n[e].y[1]){d=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(n[e].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;f=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(n[e].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;g=a.axisX.conversionParameters.reference+ +a.axisX.conversionParameters.pixelPerUnit*(k-a.axisX.conversionParameters.minimum)+0.5<<0;g=g-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+h)*p<<0;var r=g+p<<0;d>f&&(c=d,d=f,f=c);c=n[e].color?n[e].color:m._colorSet[e%m._colorSet.length];I(b,d,g,f,r,c,0,null,q,!1,!1,!1,m.fillOpacity);c=m.dataPointIds[e];this._eventManager.objectMap[c]={id:c,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:e,x1:d,y1:g,x2:f,y2:r};c=B(c);t&&I(this._eventManager.ghostCtx,d,g,f,r,c,0,null,!1,!1,!1,!1); +if(n[e].indexLabel||m.indexLabel||n[e].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:n[e],dataSeries:m,indexKeyword:0,point:{x:n[e].y[1]>=n[e].y[0]?d:f,y:g+(r-g)/2},direction:n[e].y[1]>=n[e].y[0]?-1:1,bounds:{x1:Math.min(d,f),y1:g,x2:Math.max(d,f),y2:r},color:c}),this._indexLabels.push({chartType:"rangeBar",dataPoint:n[e],dataSeries:m,indexKeyword:1,point:{x:n[e].y[1]>=n[e].y[0]?f:d,y:g+(r-g)/2},direction:n[e].y[1]>=n[e].y[0]?1:-1,bounds:{x1:Math.min(d, +f),y1:g,x2:Math.max(d,f),y2:r},color:c})}}}b.restore();t&&this._eventManager.ghostCtx.restore();return{source:b,dest:this.plotArea.ctx,animationCallback:A.fadeInAnimation,easingFunction:A.easing.easeInQuad,animationBase:0}}};u.prototype.renderRangeArea=function(a){function b(){if(w){var a=null;0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=[],f=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();t&&(d.beginPath(),d.rect(f.x1,f.y1,f.width,f.height),d.clip());for(f=0;fa.axisX.dataInfo.viewPortMax))if(null!==h[m].y&&h[m].y.length&& +"number"===typeof h[m].y[0]&&"number"===typeof h[m].y[1]){n=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(s-a.axisX.conversionParameters.minimum)+0.5<<0;q=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(h[m].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;r=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(h[m].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;l||x?(c.beginPath(),c.moveTo(n,q), +w={x:n,y:q},g=[],g.push({x:n,y:r}),t&&(d.beginPath(),d.moveTo(n,q)),x=l=!1):(c.lineTo(n,q),g.push({x:n,y:r}),t&&d.lineTo(n,q),0==m%250&&b());s=p.dataPointIds[m];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:m,x1:n,y1:q,y2:r};if(0!==h[m].markerSize&&(0=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,e=[],f=this.plotArea;c.save();t&&d.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();t&&(d.beginPath(),d.rect(f.x1,f.y1,f.width,f.height),d.clip());for(f=0;fa.axisX.dataInfo.viewPortMax))if(null!== +p[h].y&&p[h].y.length&&"number"===typeof p[h].y[0]&&"number"===typeof p[h].y[1]){l=a.axisX.conversionParameters.reference+a.axisX.conversionParameters.pixelPerUnit*(l-a.axisX.conversionParameters.minimum)+0.5<<0;m=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(p[h].y[0]-a.axisY.conversionParameters.minimum)+0.5<<0;n=a.axisY.conversionParameters.reference+a.axisY.conversionParameters.pixelPerUnit*(p[h].y[1]-a.axisY.conversionParameters.minimum)+0.5<<0;var s=k.dataPointIds[h]; +this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:h,x1:l,y1:m,y2:n};q[q.length]={x:l,y:m};r[r.length]={x:l,y:n};if(0!==p[h].markerSize&&(0Math.PI/2-t&&g.midAngleg.midAngle)c=y;a++}else if(g.midAngle>3*Math.PI/2-t&&g.midAngle<3*Math.PI/2+t){if(0===b||q[d].midAngle>g.midAngle)d= +y;b++}g.hemisphere=e>Math.PI/2&&e<=3*Math.PI/2?"left":"right";g.indexLabelTextBlock=new H(p.plotArea.ctx,{fontSize:g.indexLabelFontSize,fontFamily:g.indexLabelFontFamily,fontColor:g.indexLabelFontColor,fontStyle:g.indexLabelFontStyle,fontWeight:g.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:g.indexLabelBackgroundColor,maxWidth:g.indexLabelMaxWidth,maxHeight:g.indexLabelWrap?5*g.indexLabelFontSize:1.5*g.indexLabelFontSize,text:g.indexLabelText,padding:0,textBaseline:"top"});g.indexLabelTextBlock.measureText()}f= +e=0;k=!1;for(y=0;yMath.PI/2-t&&g.midAngle3*Math.PI/2-t&&g.midAngle<3*Math.PI/2+t)&&(f<=b/2&&!k?(g.hemisphere="left",f++):(g.hemisphere="right",k=!0))}}function c(a){var b=p.plotArea.ctx;b.clearRect(n.x1,n.y1,n.width,n.height);b.fillStyle=p.backgroundColor;b.fillRect(n.x1,n.y1,n.width,n.height);for(b=0;b< +l.length;b++){var c=q[b].startAngle,d=q[b].endAngle;if(d>c){var e=0.07*z*Math.cos(q[b].midAngle),f=0.07*z*Math.sin(q[b].midAngle),g=!1;if(l[b].exploded){if(1E-9a.indexLabelTextBlock.y? +e-d:c-f}function e(a){for(var b=null,c=1;cd(q[b],q[a])||("right"===q[a].hemisphere?q[b].indexLabelTextBlock.y>=q[a].indexLabelTextBlock.y:q[b].indexLabelTextBlock.y<=q[a].indexLabelTextBlock.y)))break;else b=null;return b}function f(a,b,c){c=(c||0)+1;if(1E3 +b&&m.indexLabelTextBlock.yk)return 0;var n=0,p=0,p=n=n=0;0>b?m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2>h&&m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2+bk&&(b=m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2+b-k);b=m.indexLabelTextBlock.y+b;h=0;h="right"=== +m.hemisphere?x.x+Math.sqrt(Math.pow(indexLabelRadius,2)-Math.pow(b-x.y,2)):x.x-Math.sqrt(Math.pow(indexLabelRadius,2)-Math.pow(b-x.y,2));p=x.x+z*Math.cos(m.midAngle);n=x.y+z*Math.sin(m.midAngle);n=Math.sqrt(Math.pow(h-p,2)+Math.pow(b-n,2));p=Math.acos(z/indexLabelRadius);n=Math.acos((indexLabelRadius*indexLabelRadius+z*z-n*n)/(2*z*indexLabelRadius));b=nd(q[h],q[a])||("right"===q[a].hemisphere?q[h].indexLabelTextBlock.y<=q[a].indexLabelTextBlock.y:q[h].indexLabelTextBlock.y>=q[a].indexLabelTextBlock.y)))break;else h=null;p=h;n=e(a);k=h=0;0>b?(k="right"===m.hemisphere?p:n,g=b,null!==k&&(p=-b,b=m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2-(q[k].indexLabelTextBlock.y+q[k].indexLabelTextBlock.height/2),b-p+h.toFixed(v)&&(g=b>r?-(b-r):-(p-(k-h)))))):0r?b-r:p-(h-k)))));g&&(c=m.indexLabelTextBlock.y+g,b=0,b="right"===m.hemisphere?x.x+Math.sqrt(Math.pow(indexLabelRadius,2)-Math.pow(c-x.y,2)):x.x-Math.sqrt(Math.pow(indexLabelRadius,2)-Math.pow(c-x.y,2)),m.midAngle>Math.PI/2-t&&m.midAngleh.indexLabelTextBlock.x?b=h.indexLabelTextBlock.x-15:"right"===m.hemisphere&&("left"===a.hemisphere&&b3*Math.PI/2-t&&m.midAngle<3*Math.PI/2+t&&(h=(a-1+q.length)%q.length,h=q[h],a=q[(a+1+q.length)%q.length],"right"===m.hemisphere&&"left"===h.hemisphere&&ba.indexLabelTextBlock.x)&&(b=a.indexLabelTextBlock.x-15)),m.indexLabelTextBlock.y=c,m.indexLabelTextBlock.x=b,m.indexLabelAngle=Math.atan2(m.indexLabelTextBlock.y-x.y,m.indexLabelTextBlock.x-x.x))}return g}function g(){var a=p.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var b=a=0,c=0,g=!0,b=0;10>b&&(1>b||0y){for(var B=w=0,C=0;Cw?k.indexLabelText="":k.indexLabelTextBlock.maxWidth=0.85*w,0.3*k.indexLabelTextBlock.maxWidthc&&(c=u)),u=u=0,0c&&(c=u)));var F=function(a,b,c){for(var d=[],e=0;d.push(q[b]),b!==c;b=(b+1+l.length)%l.length);d.sort(function(a,b){return a.y-b.y});for(b=0;by){n=t.indexLabelTextBlock.x;var p=t.indexLabelTextBlock.y-t.indexLabelTextBlock.height/2,r=t.indexLabelTextBlock.y+t.indexLabelTextBlock.height/2,s=k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2,w=k.indexLabelTextBlock.x+k.indexLabelTextBlock.width,v=k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2;n=t.indexLabelTextBlock.x+t.indexLabelTextBlock.widthw+m||p>v+m||ra&&(a=g),h!==a&&(b=h,c+=-y),0===g%Math.max(l.length/ +10,3)&&(f=!0)):f=!0;f&&(0=a.dataSeriesIndexes.length)){var h=this.data[a.dataSeriesIndexes[0]],l=h.dataPoints,m=10,n=this.plotArea,q=[],r=2,s=1.3,t=20/180*Math.PI,v=6,x={x:(n.x2+n.x1)/2,y:(n.y2+n.y1)/2},u=0;a=!1;for(var y=0;ya&&(d=a,e=!0);var f=l[b].color?l[b].color:h._colorSet[b%h._colorSet.length];d>c&&sa(p.plotArea.ctx, +q[b].center,q[b].radius,f,h.type,c,d,h.fillOpacity,q[b].percentInnerRadius);if(e)break}k()},function(){p.disableToolTip=!1;p._animator.animate(0,p.animatedRender?500:0,function(a){c(a);k()})})}}};u.prototype.animationRequestId=null;u.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();u.prototype.cancelRequestAnimFrame= +window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;Z.prototype.registerSpace=function(a,b){"top"===a?this._topOccupied+=b.height:"bottom"===a?this._bottomOccupied+=b.height:"left"===a?this._leftOccupied+=b.width:"right"===a&&(this._rightOccupied+=b.width)};Z.prototype.unRegisterSpace=function(a,b){"top"===a?this._topOccupied-=b.height:"bottom"===a?this._bottomOccupied-= +b.height:"left"===a?this._leftOccupied-=b.width:"right"===a&&(this._rightOccupied-=b.width)};Z.prototype.getFreeSpace=function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Z.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}; +O(H,G);H.prototype.render=function(a){a&&this.ctx.save();var b=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var c=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+c);"middle"===this.textBaseline&&(c=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var d=0,e=this.padding,f=null;(0b)e=f-1;else break}c>b&&1f&&(g=b.pop(),d-=g.height)}this._wrappedText={lines:b,width:e,height:d};this.width=e+2*this.padding;this.height=d+2*this.padding;this.ctx.font=c};H.prototype._getFontString=function(){var a;a=""+(this.fontStyle?this.fontStyle+" ":"");a+=this.fontWeight?this.fontWeight+" ":"";a+=this.fontSize?this.fontSize+"px ":"";var b=this.fontFamily?this.fontFamily+"":"";!t&&b&&(b=b.split(",")[0],"'"!==b[0]&&'"'!==b[0]&&(b="'"+b+"'")); +return a+=b};O(ba,G);ba.prototype.render=function(){if(this.text){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,b=a.layoutManager.getFreeSpace(),c=b.x1,d=b.y1,e=0,f=0,g=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,k,p;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=b.width-4-g*("center"===this.horizontalAlign?2:1)),f=0.5*b.height-this.margin-2,e=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign|| +"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=b.height-4),f=0.5*b.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&(this.maxWidth=b.width-4),f=0.5*b.height-4));this.wrap||(f=Math.min(f,Math.max(1.5*this.fontSize,this.fontSize+2.5*this.padding)));var f=new H(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign, +borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:f,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"}),h=f.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(d=b.y1+2,p="top"):"bottom"===this.verticalAlign&&(d=b.y2-2-h.height,p="bottom"),"left"===this.horizontalAlign?c=b.x1+2:"center"===this.horizontalAlign?c=b.x1+b.width/2-h.width/ +2:"right"===this.horizontalAlign&&(c=b.x2-2-h.width-g),k=this.horizontalAlign,this.width=h.width,this.height=h.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(c=b.x1+2,d=b.y2-2-(this.maxWidth/2-h.width/2),e=-90,p="left",this.width=h.height,this.height=h.width):"right"===this.horizontalAlign?(c=b.x2-2,d=b.y1+2+(this.maxWidth/2-h.width/2),e=90,p="right",this.width=h.height,this.height=h.width):"center"===this.horizontalAlign&&(d=a.y1+(a.height/2-h.height/2),c=a.x1+(a.width/2- +h.width/2),p="center",this.width=h.width,this.height=h.height),k="center");f.x=c;f.y=d;f.angle=e;f.horizontalAlign=k;f.render(!0);a.layoutManager.registerSpace(p,{width:this.width+("left"===p||"right"===p?this.margin+2:0),height:this.height+("top"===p||"bottom"===p?this.margin+2:0)});this.bounds={x1:c,y1:d,x2:c+this.width,y2:d+this.height};this.ctx.textBaseline="top"}};O(ja,G);ja.prototype.render=ba.prototype.render;O(ka,G);ka.prototype.render=function(){var a=this.dockInsidePlotArea?this.chart.plotArea: +this.chart,b=a.layoutManager.getFreeSpace(),c=null,d=0,e=0,f=0,g=0,k=[],p=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign?(this.orientation="horizontal",c=this.verticalAlign,f=null!==this.maxWidth?this.maxWidth:0.7*b.width,g=null!==this.maxHeight?this.maxHeight:0.5*b.height):"center"===this.verticalAlign&&(this.orientation="vertical",c=this.horizontalAlign,f=null!==this.maxWidth?this.maxWidth:0.5*b.width,g=null!==this.maxHeight?this.maxHeight:0.7*b.height);for(var h=0;h=g||"undefined"===typeof g||0>=n||"undefined"===typeof n)){if("horizontal"===this.orientation){m.textBlock=new H(this.ctx,{x:0,y:0,maxWidth:n,maxHeight:this.itemWrap?g:this.lineHeight,angle:0,text:m.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle, +textBaseline:"top"});m.textBlock.measureText();null!==this.itemWidth&&(m.textBlock.width=this.itemWidth-(r+0.1*this.horizontalSpacing+("line"===m.chartType||"spline"===m.chartType||"stepLine"===m.chartType?2*0.1*this.lineHeight:0)));if(!l||l.width+Math.round(m.textBlock.width+0.1*this.horizontalSpacing+r+(0===l.width?0:this.horizontalSpacing)+("line"===m.chartType||"spline"===m.chartType||"stepLine"===m.chartType?2*0.1*this.lineHeight:0))>f)l={items:[],width:0},p.push(l),this.height+=v,v=0;v=Math.max(v, +m.textBlock.height)}else m.textBlock=new H(this.ctx,{x:0,y:0,maxWidth:n,maxHeight:!0===this.itemWrap?g:1.5*this.fontSize,angle:0,text:m.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"top"}),m.textBlock.measureText(),null!==this.itemWidth&&(m.textBlock.width=this.itemWidth-(r+0.1*this.horizontalSpacing+("line"===m.chartType||"spline"===m.chartType||"stepLine"===m.chartType?2*0.1* +this.lineHeight:0))),this.height<=g?(l={items:[],width:0},p.push(l)):(l=p[u],u=(u+1)%p.length),this.height+=m.textBlock.height;m.textBlock.x=l.width;m.textBlock.y=0;l.width+=Math.round(m.textBlock.width+0.1*this.horizontalSpacing+r+(0===l.width?0:this.horizontalSpacing)+("line"===m.chartType||"spline"===m.chartType||"stepLine"===m.chartType?2*0.1*this.lineHeight:0));l.items.push(m);this.width=Math.max(l.width,this.width)}}this.height=!1===this.itemWrap?p.length*this.lineHeight:this.height+v;this.height= +Math.min(g,this.height);this.width=Math.min(f,this.width)}"top"===this.verticalAlign?(e="left"===this.horizontalAlign?b.x1:"right"===this.horizontalAlign?b.x2-this.width:b.x1+b.width/2-this.width/2,d=b.y1):"center"===this.verticalAlign?(e="left"===this.horizontalAlign?b.x1:"right"===this.horizontalAlign?b.x2-this.width:b.x1+b.width/2-this.width/2,d=b.y1+b.height/2-this.height/2):"bottom"===this.verticalAlign&&(e="left"===this.horizontalAlign?b.x1:"right"===this.horizontalAlign?b.x2-this.width:b.x1+ +b.width/2-this.width/2,d=b.y2-this.height);this.items=k;for(h=0;h>0,0),this.dataPoints.length):0);for(;;){f=0l-e&&l+e>=this.dataPoints.length)break;-1===g?(e++,g=1):g=-1}return b||c.dataPoint.x!==a?b&&null!== +c.dataPoint?c:null:c};T.prototype.getDataPointAtXY=function(a,b,c){if(!this.dataPoints||0===this.dataPoints.length||athis.chart.plotArea.x2||bthis.chart.plotArea.y2)return null;c=c||!1;var d=[],e=0,f=0,g=1,k=!1,p=Infinity,h=0,l=0,m=0;"none"!==this.chart.plotInfo.axisPlacement&&(m=this.chart.axisX.getXValueAt({x:a,y:b}),f=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,m=0> +0,0),this.dataPoints.length):0);for(;;){f=0=n.x1&&(a<=n.x2&&b>=n.y1&&b<=n.y2)&&(d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(n.x1-a),Math.abs(n.x2-a),Math.abs(n.y1- +b),Math.abs(n.y2-b))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var s=N("markerSize",q,this)||4,t=c?20:s,r=Math.sqrt(Math.pow(n.x1-a,2)+Math.pow(n.y1-b,2));r<=t&&d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:r});f=Math.abs(n.x1-a);f<=p?p=f:0t&&(r=Math.atan2(b-s.y,a-s.x),0>r&&(r+=2*Math.PI),r=Number(((180*(r/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(n.startAngle/Math.PI)%360+360)%360).toFixed(12)),t=Number(((180*(n.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===t&&1=t&&0!==q.y&&(t+=360,rs&&r=n.x1-n.borderThickness/2&&a<=n.x2+n.borderThickness/2&&b>=n.y2-n.borderThickness/ +2&&b<=n.y3+n.borderThickness/2||Math.abs(n.x2-a+n.x1-a)=n.y1&&b<=n.y4)d.push({dataPoint:q,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(n.x1-a),Math.abs(n.x2-a),Math.abs(n.y2-b),Math.abs(n.y3-b))}),k=!0;break;case "ohlc":if(Math.abs(n.x2-a+n.x1-a)=n.y2&&b<=n.y3||a>=n.x1&&a<=(n.x2+n.x1)/2&&b>=n.y1-n.borderThickness/2&&b<=n.y1+n.borderThickness/2||a>=(n.x1+n.x2)/2&&a<=n.x2&&b>=n.y4-n.borderThickness/2&&b<=n.y4+n.borderThickness/2)d.push({dataPoint:q, +dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(n.x1-a),Math.abs(n.x2-a),Math.abs(n.y2-b),Math.abs(n.y3-b))}),k=!0}if(k||1E3m-e&&m+e>=this.dataPoints.length)break;-1===g?(e++,g=1):g=-1}a=null;for(b=0;b>0:this.labelMaxWidth:"undefined"===typeof this._options.labelMaxWidth?0.7*this.chart.width>>0:this.labelMaxWidth,e="undefined"===typeof this._options.labelWrap||this.labelWrap?0.5*this.chart.height>>0:1.5*this.labelFontSize;else if("left"===this._position||"right"===this._position)b=this.lineCoordinates.height/Math.abs(this.viewportMaximum- +this.viewportMinimum)*this.interval,d=this.labelAutoFit?"undefined"===typeof this._options.labelMaxWidth?0.3*this.chart.width>>0:this.labelMaxWidth:"undefined"===typeof this._options.labelMaxWidth?0.5*this.chart.width>>0:this.labelMaxWidth,e="undefined"===typeof this._options.labelWrap||this.labelWrap?2*b>>0:1.5*this.labelFontSize;if("axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType)for(c=ta(new Date(this.viewportMaximum),this.interval,this.intervalType),b=this.intervalStartPosition;b< +c;ta(b,this.interval,this.intervalType))a=b.getTime(),a=this.labelFormatter?this.labelFormatter({chart:this.chart._publicChartReference,axis:this._options,value:b,label:this.labels[b]?this.labels[b]:null}):"axisX"===this.type&&this.labels[a]?this.labels[a]:ra(b,this.valueFormatString,this.chart._cultureInfo),a=new H(this.ctx,{x:0,y:0,maxWidth:d,maxHeight:e,angle:this.labelAngle,text:this.prefix+a+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight, +fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:b.getTime(),textBlock:a,effectiveHeight:null});else{c=this.viewportMaximum;if(this.labels&&this.labels.length){a=Math.ceil(this.interval);for(var f=Math.ceil(this.intervalStartPosition),g=!1,b=f;ba.chart.width-10?a.chart.width-10:e.x2-l-g);a.lineCoordinates.x2=k;a.lineCoordinates.width=Math.abs(k-f);var n=Math.ceil(a.createLabelsAndCalculateHeight());g=Math.round(e.y2-n-a.margin);d=Math.round(e.y2-a.margin);a.lineCoordinates.y1=g;a.lineCoordinates.y2=g;a.boundingRect={x1:f,y1:g,x2:k,y2:d,width:k-f,height:d-g};b&&(f=Math.round(e.x1+b.margin),g=Math.round(10>e.y1?10:e.y1),k=Math.round(e.x1+ +m+b.margin),d=Math.round(e.y2-n-a.margin),b.lineCoordinates={x1:k,y1:g,x2:k,y2:d,height:Math.abs(d-g)},b.boundingRect={x1:f,y1:g,x2:k,y2:d,width:k-f,height:d-g});c&&(f=Math.round(a.lineCoordinates.x2),g=Math.round(10>e.y1?10:e.y1),k=Math.round(f+l),d=Math.round(e.y2-n-a.margin),c.lineCoordinates={x1:f,y1:g,x2:f,y2:d,height:Math.abs(d-g)},c.boundingRect={x1:f,y1:g,x2:k,y2:d,width:k-f,height:d-g});a.calculateValueToPixelConversionParameters();b&&b.calculateValueToPixelConversionParameters();c&&c.calculateValueToPixelConversionParameters(); +h.save();h.rect(5,a.boundingRect.y1,a.chart.width-10,a.boundingRect.height);h.clip();a.renderLabelsTicksAndTitle();h.restore();b&&b.renderLabelsTicksAndTitle();c&&c.renderLabelsTicksAndTitle()}else{m=Math.ceil(a.createLabelsAndCalculateWidth());b&&(b.lineCoordinates={},f=Math.round(e.x1+m+a.margin),k=Math.round(e.x2>b.chart.width-10?b.chart.width-10:e.x2),b.lineCoordinates.x1=f,b.lineCoordinates.x2=k,b.lineCoordinates.width=Math.abs(k-f));c&&(c.lineCoordinates={},f=Math.round(e.x1+m+a.margin),k=Math.round(e.x2> +c.chart.width-10?c.chart.width-10:e.x2),c.lineCoordinates.x1=f,c.lineCoordinates.x2=k,c.lineCoordinates.width=Math.abs(k-f));var n=Math.ceil(b?b.createLabelsAndCalculateHeight():0),q=Math.ceil(c?c.createLabelsAndCalculateHeight():0);b&&(g=Math.round(e.y2-n-b.margin),d=Math.round(e.y2-l>b.chart.height-10?b.chart.height-10:e.y2-l),b.lineCoordinates.y1=g,b.lineCoordinates.y2=g,b.boundingRect={x1:f,y1:g,x2:k,y2:d,width:k-f,height:n});c&&(g=Math.round(e.y1+c.margin),d=e.y1+c.margin+q,c.lineCoordinates.y1= +d,c.lineCoordinates.y2=d,c.boundingRect={x1:f,y1:g,x2:k,y2:d,width:k-f,height:q});f=Math.round(e.x1+a.margin);g=Math.round(c?c.lineCoordinates.y2:10>e.y1?10:e.y1);k=Math.round(e.x1+m+a.margin);d=Math.round(b?b.lineCoordinates.y1:e.y2-l>a.chart.height-10?a.chart.height-10:e.y2-l);a.lineCoordinates={x1:k,y1:g,x2:k,y2:d,height:Math.abs(d-g)};a.boundingRect={x1:f,y1:g,x2:k,y2:d,width:k-f,height:d-g};a.calculateValueToPixelConversionParameters();b&&b.calculateValueToPixelConversionParameters();c&&c.calculateValueToPixelConversionParameters(); +b&&b.renderLabelsTicksAndTitle();c&&c.renderLabelsTicksAndTitle();a.renderLabelsTicksAndTitle()}p.preparePlotArea();e=a.chart.plotArea;h.save();h.rect(e.x1,e.y1,Math.abs(e.x2-e.x1),Math.abs(e.y2-e.y1));h.clip();a.renderStripLinesOfThicknessType("value");b&&b.renderStripLinesOfThicknessType("value");c&&c.renderStripLinesOfThicknessType("value");a.renderInterlacedColors();b&&b.renderInterlacedColors();c&&c.renderInterlacedColors();h.restore();a.renderGrid();b&&b.renderGrid();c&&c.renderGrid();a.renderAxisLine(); +b&&b.renderAxisLine();c&&c.renderAxisLine();a.renderStripLinesOfThicknessType("pixel");b&&b.renderStripLinesOfThicknessType("pixel");c&&c.renderStripLinesOfThicknessType("pixel")};C.prototype.renderLabelsTicksAndTitle=function(){var a=!1,b=0,c=1,d=0;0!==this.labelAngle&&360!==this.labelAngle&&(c=1.2);if("undefined"===typeof this._options.interval){if("bottom"===this._position||"top"===this._position){for(e=0;ethis.lineCoordinates.width*c&&(a=!0)}if("left"===this._position||"right"===this._position){for(e=0;ethis.lineCoordinates.height*c&&(a=!0)}}if("bottom"===this._position){for(var e= +0,f,e=0;ethis.viewportMaximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine?(c=this._labels[e].stripLine,this.ctx.lineWidth=c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth% +2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,b.y<<0),this.ctx.lineTo(c,b.y+this.tickLength<<0),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)0===f.textBlock.angle?(b.x-=f.textBlock.width/2,b.y+=this.tickLength+f.textBlock.fontSize/2):(b.x-=0>this.labelAngle?f.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+Math.abs(0>this.labelAngle?f.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),f.textBlock.x=b.x,f.textBlock.y=b.y,f.textBlock.render(!0)}this.title&& +(this._titleTextBlock=new H(this.ctx,{x:this.lineCoordinates.x1,y:this.boundingRect.y2-this.titleFontSize-5,maxWidth:this.lineCoordinates.width,maxHeight:1.5*this.titleFontSize,angle:0,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/ +2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.boundingRect.y2-this._titleTextBlock.height-3,this._titleTextBlock.render(!0))}else if("top"===this._position){for(e=0;ethis.viewportMaximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine?(c=this._labels[e].stripLine, +this.ctx.lineWidth=c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(c,b.y<<0),this.ctx.lineTo(c,b.y-this.tickLength<<0),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)0===f.textBlock.angle?(b.x-=f.textBlock.width/2,b.y-=this.tickLength+f.textBlock.height/2):(b.x-=0this.viewportMaximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&& +"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine?(c=this._labels[e].stripLine,this.ctx.lineWidth=c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x-this.tickLength<<0,c),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)f.textBlock.x=b.x-f.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)- +this.tickLength-5,f.textBlock.y=0===this.labelAngle?b.y:b.y-f.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),f.textBlock.render(!0)}this.title&&(this._titleTextBlock=new H(this.ctx,{x:this.boundingRect.x1+1,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:-90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle, +textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}else if("right"===this._position){for(e=0;ethis.viewportMaximum)){b=this.getPixelCoordinatesOnAxis(f.position);if(this.tickThickness&&!this._labels[e].stripLine||this._labels[e].stripLine&&"pixel"===this._labels[e].stripLine._thicknessType)this._labels[e].stripLine? +(c=this._labels[e].stripLine,this.ctx.lineWidth=c.thickness,this.ctx.strokeStyle=c.color):(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor),c=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,c),this.ctx.lineTo(b.x+this.tickLength<<0,c),this.ctx.stroke();if(!a||0===d++%2||this._labels[e].stripLine)f.textBlock.x=b.x+this.tickLength+5,f.textBlock.y=b.y,f.textBlock.render(!0)}this.title&&(this._titleTextBlock=new H(this.ctx,{x:this.boundingRect.x2- +1,y:this.lineCoordinates.y2,maxWidth:this.lineCoordinates.height,maxHeight:1.5*this.titleFontSize,angle:90,text:this.title,horizontalAlign:"center",fontSize:this.titleFontSize,fontFamily:this.titleFontFamily,fontWeight:this.titleFontWeight,fontColor:this.titleFontColor,fontStyle:this.titleFontStyle,textBaseline:"top"}),this._titleTextBlock.measureText(),this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this._titleTextBlock.render(!0))}};C.prototype.renderInterlacedColors= +function(){var a=this.chart.plotArea.ctx,b,c,d=this.chart.plotArea,e=0;b=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e=this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x,d.y1,Math.abs(c.x-b.x),Math.abs(d.y1- +d.y2)),b=!1):b=!0);else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e=this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(d.x1,b.y,Math.abs(d.x1-d.x2),Math.abs(b.y-c.y)),b=!1):b=!0);a.beginPath()};C.prototype.renderStripLinesOfThicknessType= +function(a){if(this.stripLines&&0this.viewportMaximum)||(c.showOnTop?this.chart.addEventListener("dataAnimationIterationEnd",c.render,c):c.render()))}};C.prototype.renderGrid=function(){if(this.gridThickness&&0this.viewportMaximum||(a.beginPath(),b=this.getPixelCoordinatesOnAxis(this._labels[d].position),b=1===a.lineWidth%2?(b.x<<0)+0.5:b.x<<0,a.moveTo(b,c.y1<<0),a.lineTo(b,c.y2<<0),a.stroke());else if("left"===this._position||"right"=== +this._position)for(var d=0;dthis.viewportMaximum)||(a.beginPath(),b=this.getPixelCoordinatesOnAxis(this._labels[d].position),b=1===a.lineWidth%2?(b.y<<0)+0.5:b.y<<0,a.moveTo(c.x1<<0,b),a.lineTo(c.x2<<0,b),a.stroke());a.restore()}};C.prototype.renderAxisLine=function(){var a=this.chart.ctx;a.save(); +if("bottom"===this._position||"top"===this._position){if(this.lineThickness){a.lineWidth=this.lineThickness;a.strokeStyle=this.lineColor?this.lineColor:"black";a.setLineDash&&a.setLineDash(M(this.lineDashType,this.lineThickness));var b=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;a.beginPath();a.moveTo(this.lineCoordinates.x1,b);a.lineTo(this.lineCoordinates.x2,b);a.stroke()}}else"left"!==this._position&&"right"!==this._position||!this.lineThickness||(a.lineWidth= +this.lineThickness,a.strokeStyle=this.lineColor,a.setLineDash&&a.setLineDash(M(this.lineDashType,this.lineThickness)),b=1===this.lineThickness%2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0,a.beginPath(),a.moveTo(b,this.lineCoordinates.y1),a.lineTo(b,this.lineCoordinates.y2),a.stroke());a.restore()};C.prototype.getPixelCoordinatesOnAxis=function(a){var b={};if("bottom"===this._position||"top"===this._position){var c=this.conversionParameters.pixelPerUnit;b.x=this.conversionParameters.reference+ +c*(a-this.viewportMinimum);b.y=this.lineCoordinates.y1}if("left"===this._position||"right"===this._position)c=-this.conversionParameters.pixelPerUnit,b.y=this.conversionParameters.reference-c*(a-this.viewportMinimum),b.x=this.lineCoordinates.x2;return b};C.prototype.convertPixelToValue=function(a){if(!a)return null;var b=0;return b=this.conversionParameters.minimum+(("left"===this._position||"right"===this._position?a.y:a.x)-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit}; +C.prototype.setViewPortRange=function(a,b){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,b);this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(a,b)};C.prototype.getXValueAt=function(a){if(!a)return null;var b=null;"left"===this._position?b=(this.chart.axisX.viewportMaximum-this.chart.axisX.viewportMinimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-a.y)+this.chart.axisX.viewportMinimum:"bottom"===this._position&&(b=(this.chart.axisX.viewportMaximum- +this.chart.axisX.viewportMinimum)/this.chart.axisX.lineCoordinates.width*(a.x-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.viewportMinimum);return b};C.prototype.calculateValueToPixelConversionParameters=function(a){this.reversed=!1;a={pixelPerUnit:null,minimum:null,reference:null};var b=this.lineCoordinates.width,c=this.lineCoordinates.height;a.minimum=this.viewportMinimum;if("bottom"===this._position||"top"===this._position)a.pixelPerUnit=(this.reversed?-1:1)*b/Math.abs(this.viewportMaximum- +this.viewportMinimum),a.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)a.pixelPerUnit=(this.reversed?1:-1)*c/Math.abs(this.viewportMaximum-this.viewportMinimum),a.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;this.conversionParameters=a};C.prototype.calculateAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),b=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth= +a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?8:Math.max(6,Math.floor(this.maxWidth/62)):Math.max(Math.floor(this.maxWidth/40),2),c,d,e,f;f=0;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;"axisX"===this.type?(c=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin, +d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0===d-c&&(f="undefined"===typeof this._options.interval?0.4:this._options.interval,d+=f,c-=f),Infinity!==this.dataInfo.minDiff?e=this.dataInfo.minDiff:1d?(f=Math.min(Math.abs(0.01*Math.abs(d-c)),5),0<=d?c=d-f:d=c+f):(f=Math.min(Math.abs(0.01*Math.abs(d-c)),0.05),0!==d&&(d+=f),0!==c&&(c-=f)),e=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1d&&(d=0));f=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?d:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?c:this.viewportMinimum);if("axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType){this.intervalType||(f/1<=a?(this.interval=1,this.intervalType="millisecond"):f/2<=a?(this.interval=2,this.intervalType="millisecond"):f/5<=a?(this.interval=5,this.intervalType= +"millisecond"):f/10<=a?(this.interval=10,this.intervalType="millisecond"):f/20<=a?(this.interval=20,this.intervalType="millisecond"):f/50<=a?(this.interval=50,this.intervalType="millisecond"):f/100<=a?(this.interval=100,this.intervalType="millisecond"):f/200<=a?(this.interval=200,this.intervalType="millisecond"):f/250<=a?(this.interval=250,this.intervalType="millisecond"):f/300<=a?(this.interval=300,this.intervalType="millisecond"):f/400<=a?(this.interval=400,this.intervalType="millisecond"):f/500<= +a?(this.interval=500,this.intervalType="millisecond"):f/(1*D.secondDuration)<=a?(this.interval=1,this.intervalType="second"):f/(2*D.secondDuration)<=a?(this.interval=2,this.intervalType="second"):f/(5*D.secondDuration)<=a?(this.interval=5,this.intervalType="second"):f/(10*D.secondDuration)<=a?(this.interval=10,this.intervalType="second"):f/(15*D.secondDuration)<=a?(this.interval=15,this.intervalType="second"):f/(20*D.secondDuration)<=a?(this.interval=20,this.intervalType="second"):f/(30*D.secondDuration)<= +a?(this.interval=30,this.intervalType="second"):f/(1*D.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):f/(2*D.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):f/(5*D.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):f/(10*D.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):f/(15*D.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):f/(20*D.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):f/(30*D.minuteDuration)<= +a?(this.interval=30,this.intervalType="minute"):f/(1*D.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):f/(2*D.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):f/(3*D.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):f/(6*D.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):f/(1*D.dayDuration)<=a?(this.interval=1,this.intervalType="day"):f/(2*D.dayDuration)<=a?(this.interval=2,this.intervalType="day"):f/(4*D.dayDuration)<=a?(this.interval=4,this.intervalType= +"day"):f/(1*D.weekDuration)<=a?(this.interval=1,this.intervalType="week"):f/(2*D.weekDuration)<=a?(this.interval=2,this.intervalType="week"):f/(3*D.weekDuration)<=a?(this.interval=3,this.intervalType="week"):f/(1*D.monthDuration)<=a?(this.interval=1,this.intervalType="month"):f/(2*D.monthDuration)<=a?(this.interval=2,this.intervalType="month"):f/(3*D.monthDuration)<=a?(this.interval=3,this.intervalType="month"):f/(6*D.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=f/ +(1*D.yearDuration)<=a?1:f/(2*D.yearDuration)<=a?2:f/(4*D.yearDuration)<=a?4:Math.floor(C.getNiceNumber(f/(a-1),!0)/D.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=c-e/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=d+e/2;b?this.autoValueFormatString="MMM DD YYYY HH:mm":"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY": +"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString="hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString="fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType= +"number";f=C.getNiceNumber(f,!1);this.interval=this._options&&0d?(f=Math.min(Math.abs(0.01*Math.abs(d-c)),5),0<=d?c=d-f:d=c+f):(f=Math.min(Math.abs(0.01*Math.abs(d-c)),0.05),0!==d&&(d+=f),0!==c&&(c-=f)):(d="undefined"===typeof this._options.interval? +-Infinity:this._options.interval,c=0),e=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1d&&(d=0)),"axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType){if(null===this.minimum||isNaN(this.minimum))this.minimum=c-e/2;if(null===this.maximum||isNaN(this.maximum))this.maximum=d+e/2}else this.intervalType="number",null=== +this.minimum&&(this.minimum="axisX"===this.type?c-e/2:Math.floor(c/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?d+e/2:Math.ceil(d/this.interval)*this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity: +this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this._options.minimum?this.maximum+=10:0===this._options.maximum&&(this.minimum-=10));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum);this.intervalStartPosition="axisX"===this.type&&"dateTime"===this.chart.plotInfo.axisXValueType?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+ +0.2*this.interval)/this.interval)*this.interval;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",f=Math.abs(this.viewportMaximum-this.viewportMinimum),1>f)){b=Math.floor(Math.abs(Math.log(f)/Math.LN10))+2;if(isNaN(b)||!isFinite(b))b=2;if(2d?1:3>d?2:7>d?5:10:1>=d?1:2>=d?2:5>=d?5:10)*Math.pow(10,c)).toFixed(20))};C.prototype.getLabelStartPoint= +function(){var a=D[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this._updateToolTip(a,b))};R.prototype._updateToolTip=function(a,b){if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"=== +typeof b){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;b=this._prevY}else this._prevX=a,this._prevY=b;var c=null,d=null,e=[],f=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){f="xySwapped"===this.chart.plotInfo.axisPlacement?(this.chart.axisX.viewportMaximum-this.chart.axisX.viewportMinimum)/this.chart.axisX.lineCoordinates.height*(this.chart.axisX.lineCoordinates.y2-b)+this.chart.axisX.viewportMinimum:(this.chart.axisX.viewportMaximum-this.chart.axisX.viewportMinimum)/ +this.chart.axisX.lineCoordinates.width*(a-this.chart.axisX.lineCoordinates.x1)+this.chart.axisX.viewportMinimum;d=[];for(c=0;cg.dataSeries.axisY.viewportMaximum&&f++;f-g.dataPoint.y.length&& +e.push(g)}else"column"===d.type||"bar"===d.type?0>g.dataPoint.y?0>g.dataSeries.axisY.viewportMinimum&&g.dataSeries.axisY.viewportMaximum>=g.dataPoint.y&&e.push(g):g.dataSeries.axisY.viewportMinimum<=g.dataPoint.y&&0<=g.dataSeries.axisY.viewportMaximum&&e.push(g):"bubble"===d.type?(f=this.chart._eventManager.objectMap[d.dataPointIds[g.index]].size/2,g.dataPoint.y>=g.dataSeries.axisY.viewportMinimum-f&&g.dataPoint.y<=g.dataSeries.axisY.viewportMaximum+f&&e.push(g)):(0<=g.dataSeries.type.indexOf("100")|| +"stackedColumn"===d.type||"stackedBar"===d.type||g.dataPoint.y>=g.dataSeries.axisY.viewportMinimum&&g.dataPoint.y<=g.dataSeries.axisY.viewportMaximum)&&e.push(g);else e.push(g)}}if(0toolTipLeft&&(toolTipLeft+=this.container.clientWidth+20);toolTipLeft+this.container.clientWidth>Math.max(this.chart._container.clientWidth,this.chart.width)&&(toolTipLeft=Math.max(0,Math.max(this.chart._container.clientWidth,this.chart.width)-this.container.clientWidth));toolTipLeft+="px";e=1!==e.length||this.shared||"line"!==e[0].dataSeries.type&&"stepLine"!==e[0].dataSeries.type&&"spline"!==e[0].dataSeries.type&&"area"!==e[0].dataSeries.type&&"stepArea"!== +e[0].dataSeries.type&&"splineArea"!==e[0].dataSeries.type&&"stackedArea"!==e[0].dataSeries.type&&"stackedArea100"!==e[0].dataSeries.type?"bar"===e[0].dataSeries.type||"rangeBar"===e[0].dataSeries.type||"stackedBar"===e[0].dataSeries.type||"stackedBar100"===e[0].dataSeries.type?e[0].dataSeries.axisX.conversionParameters.reference+e[0].dataSeries.axisX.conversionParameters.pixelPerUnit*(e[0].dataPoint.x-e[0].dataSeries.axisX.viewportMinimum)+0.5<<0:b:e[0].dataSeries.axisY.conversionParameters.reference+ +e[0].dataSeries.axisY.conversionParameters.pixelPerUnit*(e[0].dataPoint.y-e[0].dataSeries.axisY.viewportMinimum)+0.5<<0;e=-e+10;0{name}:  {y}";else if("bubble"===c.type)f+=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y},   {z}";else if("rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)f+=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:  {y[0]}, {y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)f+=d.toolTipContent? +d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"{name}:
Open:   {y[0]}
High:    {y[1]}
Low:   {y[2]}
Close:   {y[3]}";null===b&&(b="");!0===this.reversed?(b=this.chart.replaceKeywordsWithValue(f,d,c,e)+b,k"+b)):(b+=this.chart.replaceKeywordsWithValue(f,d,c,e),k"))}null!== +b&&(b=p+b)}else{c=a[0].dataSeries;d=a[0].dataPoint;e=a[0].index;if(null===d.toolTipContent||"undefined"===typeof d.toolTipContent&&null===c._options.toolTipContent)return null;if("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type)f= +d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+":  {y}";else if("bubble"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+":  {y},   {z}"; +else if("pie"===c.type||"doughnut"===c.type||"funnel"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.name?"{name}:  ":d.label?"{label}:  ":"")+"{y}";else if("rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent? +c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+" :  {y[0]},  {y[1]}";else if("candlestick"===c.type||"ohlc"===c.type)f=d.toolTipContent?d.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:""+(d.label?"{label}":"{x}")+"
Open:   {y[0]}
High:    {y[1]}
Low:     {y[2]}
Close:   {y[3]}"; +null===b&&(b="");b+=this.chart.replaceKeywordsWithValue(f,d,c,e)}return b};R.prototype.enableAnimation=function(){this.container.style.WebkitTransition||(this.container.style.WebkitTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MozTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.MsTransition="left .2s ease-out, bottom .2s ease-out",this.container.style.transition="left .2s ease-out, bottom .2s ease-out")};R.prototype.disableAnimation=function(){this.container.style.WebkitTransition&& +(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};R.prototype.hide=function(a){this.enabled&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};u.prototype.getPercentAndTotal=function(a,b){var c=null,d=null,e=null;if(0<=a.type.indexOf("stacked"))d=0,c=b.x.getTime?b.x.getTime():b.x,c in a.plotUnit.yTotals&& +(d=a.plotUnit.yTotals[c],e=isNaN(b.y)?0:0===d?0:100*(b.y/d));else if("pie"===a.type||"doughnut"===a.type){for(i=d=0;id&&a.push(b),b.animationCallback(d),1<=d&&b.onComplete)b.onComplete();this.animations=a;0