@canvasjs/charts 3.8.11 → 3.8.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/canvasjs.min.js +354 -353
- package/package.json +1 -1
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.8.
|
|
2
|
+
CanvasJS Chart - v3.8.12 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
/*eslint-disable*/
|
|
19
19
|
/*jshint ignore:start*/
|
|
20
20
|
(function(){function pa(d,m){d.prototype=eb(m.prototype);d.prototype.constructor=d;d.base=m.prototype}function eb(d){function m(){}m.prototype=d;return new m}function Ya(d,m,S){"millisecond"===S?d.setMilliseconds(d.getMilliseconds()+1*m):"second"===S?d.setSeconds(d.getSeconds()+1*m):"minute"===S?d.setMinutes(d.getMinutes()+1*m):"hour"===S?d.setHours(d.getHours()+1*m):"day"===S?d.setDate(d.getDate()+1*m):"week"===S?d.setDate(d.getDate()+7*m):"month"===S?d.setMonth(d.getMonth()+1*m):"year"===S&&d.setFullYear(d.getFullYear()+
|
|
21
|
-
1*m);return d}function da(d,m){var S=!1;0>d&&(S=!0,d*=-1);d=""+d;for(m=m?m:1;d.length<m;)d="0"+d;return S?"-"+d:d}function Ga(d){if(!d)return d;d=d.replace(/^\s\s*/,"");for(var m=/\s/,S=d.length;m.test(d.charAt(--S)););return d.slice(0,S+1)}function za(d){d.roundRect=function(d,S,n,w,ra,
|
|
22
|
-
n,S+w-ra);this.quadraticCurveTo(d+n,S+w,d+n-ra,S+w);this.lineTo(d+ra,S+w);this.quadraticCurveTo(d,S+w,d,S+w-ra);this.lineTo(d,S+ra);this.quadraticCurveTo(d,S,d+ra,S);this.closePath();t&&this.fill();
|
|
23
|
-
Math.floor(n);for(0>n&&(n+=S);n<S;n++)if(n in this&&this[n]===d)return n;return-1}function n(d){return null===d||"undefined"===typeof d}function Da(d){d.indexOf||(d.indexOf=fb);return d}function gb(d){if(va.fSDec)d[ia("`eeDwdouMhrudods")](ia("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){va._fTWm&&va._fTWm(d)})}function Za(d,m,n){n=n||"normal";var w=d+"_"+m+"_"+n,Y=$a[w];if(isNaN(Y)){try{if(!xa){var ra=document.body;xa=document.createElement("span");xa.innerHTML="";var
|
|
24
|
-
xa.appendChild(
|
|
21
|
+
1*m);return d}function da(d,m){var S=!1;0>d&&(S=!0,d*=-1);d=""+d;for(m=m?m:1;d.length<m;)d="0"+d;return S?"-"+d:d}function Ga(d){if(!d)return d;d=d.replace(/^\s\s*/,"");for(var m=/\s/,S=d.length;m.test(d.charAt(--S)););return d.slice(0,S+1)}function za(d){d.roundRect=function(d,S,n,w,ra,C,t,A){t&&(this.fillStyle=t);A&&(this.strokeStyle=A);"undefined"===typeof ra&&(ra=5);this.lineWidth=C;this.beginPath();this.moveTo(d+ra,S);this.lineTo(d+n-ra,S);this.quadraticCurveTo(d+n,S,d+n,S+ra);this.lineTo(d+
|
|
22
|
+
n,S+w-ra);this.quadraticCurveTo(d+n,S+w,d+n-ra,S+w);this.lineTo(d+ra,S+w);this.quadraticCurveTo(d,S+w,d,S+w-ra);this.lineTo(d,S+ra);this.quadraticCurveTo(d,S,d+ra,S);this.closePath();t&&this.fill();A&&0<C&&this.stroke()}}function Sa(d,m){return d-m}function X(d){var m=((d&16711680)>>16).toString(16),S=((d&65280)>>8).toString(16);d=((d&255)>>0).toString(16);m=2>m.length?"0"+m:m;S=2>S.length?"0"+S:S;d=2>d.length?"0"+d:d;return"#"+m+S+d}function fb(d,m){var S=this.length>>>0,n=Number(m)||0,n=0>n?Math.ceil(n):
|
|
23
|
+
Math.floor(n);for(0>n&&(n+=S);n<S;n++)if(n in this&&this[n]===d)return n;return-1}function n(d){return null===d||"undefined"===typeof d}function Da(d){d.indexOf||(d.indexOf=fb);return d}function gb(d){if(va.fSDec)d[ia("`eeDwdouMhrudods")](ia("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){va._fTWm&&va._fTWm(d)})}function Za(d,m,n){n=n||"normal";var w=d+"_"+m+"_"+n,Y=$a[w];if(isNaN(Y)){try{if(!xa){var ra=document.body;xa=document.createElement("span");xa.innerHTML="";var C=document.createTextNode("Mpgyi");
|
|
24
|
+
xa.appendChild(C);ra.appendChild(xa)}xa.style.display="";O(xa,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:d,fontSize:m+"px",fontWeight:n});Y=Math.round(xa.offsetHeight);xa.style.display="none"}catch(t){Y=Math.ceil(1.1*m)}Y=Math.max(Y,m);$a[w]=Y}return Y}function G(d,m){var n=[];if(n={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],dot:[1,2],dash:[4,2],dashDot:[4,
|
|
25
25
|
2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[d||"solid"])for(var w=0;w<n.length;w++)n[w]*=m;else n=[];return n}function H(d,m,S,w,Y){w=w||[];Y=n(Y)?hb?{passive:!1,capture:!1}:!1:Y;w.push([d,m,S,Y]);return d.addEventListener?(d.addEventListener(m,S,Y),S):d.attachEvent?(w=function(m){m=m||window.event;m.preventDefault=m.preventDefault||function(){m.returnValue=!1};m.stopPropagation=m.stopPropagation||function(){m.cancelBubble=!0};S.call(d,m)},d.attachEvent("on"+m,w),w):
|
|
26
26
|
!1}function ib(d){if(d._menuButton)d.exportEnabled?(O(d._menuButton,{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor}),La(d._menuButton),sa(d,d._menuButton,"menu"),0>=navigator.userAgent.search("MSIE")&&d._menuButton.childNodes[0]&&O(d._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"})):wa(d._menuButton);else if(d.exportEnabled&&w){var m=!1;d._menuButton=document.createElement("button");sa(d,d._menuButton,"menu");d._toolBar.appendChild(d._menuButton);
|
|
27
27
|
H(d._menuButton,"touchstart",function(d){m=!0},d.allDOMEventHandlers);H(d._menuButton,"click",function(){"none"!==d._dropdownMenu.style.display||d._dropDownCloseTime&&500>=(new Date).getTime()-d._dropDownCloseTime.getTime()||(d._dropdownMenu.style.display="block",d._menuButton.blur(),d._dropdownMenu.focus())},d.allDOMEventHandlers,!0);H(d._menuButton,"mousemove",function(){m||(O(d._menuButton,{backgroundColor:d.toolbar.itemBackgroundColorOnHover,color:d.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
|
|
@@ -60,77 +60,77 @@ xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIn
|
|
|
60
60
|
toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",textAlign:"left",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",
|
|
61
61
|
zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},Ka={en:{}},t=w?"Trebuchet MS, Helvetica, sans-serif":
|
|
62
62
|
"Arial",Fa=w?"Impact, Charcoal, sans-serif":"Arial",Ba={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),colorSet2:"#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},P,ca,V,ha,$;ca="#333333";V="#000000";P="#666666";
|
|
63
|
-
$=ha="#000000";var ea=20,
|
|
64
|
-
labelFontSize:
|
|
65
|
-
lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:ca,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
66
|
-
labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:ca,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
67
|
-
labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:
|
|
68
|
-
lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:
|
|
69
|
-
fontSize:14,fontColor:ca,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:t,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};V=ca="#F5F5F5";P="#FFFFFF";ha="#40BAF1";$="#F5F5F5";var ea=20,
|
|
70
|
-
verticalAlign:"top",margin:5},subtitles:[{fontFamily:t,fontSize:
|
|
71
|
-
tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:t,labelFontSize:
|
|
72
|
-
titleFontSize:ea,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
73
|
-
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
74
|
-
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:
|
|
75
|
-
labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:t,labelFontSize:
|
|
63
|
+
$=ha="#000000";var ea=20,A=14,Xa={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Fa,fontSize:32,fontColor:ca,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Fa,fontSize:A,fontColor:ca,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:t,indexLabelFontSize:A,indexLabelFontColor:ca,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:ca,titleFontWeight:"normal",labelFontFamily:t,
|
|
64
|
+
labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:0,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",
|
|
65
|
+
lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:ca,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:0,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",
|
|
66
|
+
labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:ca,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",
|
|
67
|
+
labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:ca,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",
|
|
68
|
+
lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:t,
|
|
69
|
+
fontSize:14,fontColor:ca,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:t,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};V=ca="#F5F5F5";P="#FFFFFF";ha="#40BAF1";$="#F5F5F5";var ea=20,A=14,cb={colorSet:"colorSet2",title:{fontFamily:t,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",
|
|
70
|
+
verticalAlign:"top",margin:5},subtitles:[{fontFamily:t,fontSize:A,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:t,indexLabelFontSize:A,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,
|
|
71
|
+
tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:t,
|
|
72
|
+
titleFontSize:ea,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
|
|
73
|
+
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:t,labelFontSize:A,
|
|
74
|
+
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,
|
|
75
|
+
labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",
|
|
76
76
|
spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:t,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:t,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};V=ca="#F5F5F5";P="#FFFFFF";ha="#40BAF1";$="#F5F5F5";
|
|
77
|
-
ea=20;
|
|
78
|
-
indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
79
|
-
labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
80
|
-
labelFontSize:
|
|
81
|
-
labelFontSize:
|
|
82
|
-
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
77
|
+
ea=20;A=14;Fa={colorSet:"colorSet1",backgroundColor:"#2A2A2A",title:{fontFamily:Fa,fontSize:32,fontColor:ca,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Fa,fontSize:A,fontColor:ca,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:t,indexLabelFontSize:A,indexLabelFontColor:V,
|
|
78
|
+
indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:0,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,
|
|
79
|
+
labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:0,gridColor:P,stripLines:[{labelFontFamily:t,
|
|
80
|
+
labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,
|
|
81
|
+
labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
|
|
82
|
+
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#000000",
|
|
83
83
|
labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:t,fontSize:14,fontColor:ca,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:t,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:V,backgroundColor:"rgba(0, 0, 0, .7)"}};P="#FFFFFF";V=ca="#FAFAFA";ha="#40BAF1";$="#F5F5F5";
|
|
84
|
-
var ea=20,
|
|
85
|
-
indexLabelFontSize:
|
|
86
|
-
labelFontSize:
|
|
87
|
-
labelFontSize:
|
|
88
|
-
labelFontSize:
|
|
89
|
-
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:
|
|
84
|
+
var ea=20,A=14,Oa={light1:Xa,light2:cb,dark1:Fa,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:t,fontSize:32,fontColor:ca,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:t,fontSize:A,fontColor:ca,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:t,
|
|
85
|
+
indexLabelFontSize:A,indexLabelFontColor:V,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:0,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,
|
|
86
|
+
labelFontSize:A,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:1,lineColor:P,tickThickness:1,tickColor:P,gridThickness:0,gridColor:P,stripLines:[{labelFontFamily:t,
|
|
87
|
+
labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,
|
|
88
|
+
labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:0,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
|
|
89
|
+
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:t,titleFontSize:ea,titleFontColor:V,titleFontWeight:"normal",labelFontFamily:t,labelFontSize:A,labelFontColor:V,labelFontWeight:"normal",lineThickness:0,lineColor:P,tickThickness:1,tickColor:P,gridThickness:1,gridColor:P,stripLines:[{labelFontFamily:t,labelFontSize:A,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:t,labelFontSize:A,labelFontColor:"#000000",
|
|
90
90
|
labelFontWeight:"normal",labelBackgroundColor:$,color:ha,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:t,fontSize:14,fontColor:ca,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:t,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:V,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:Xa,theme2:cb,theme3:Xa},L={numberDuration:1,
|
|
91
91
|
yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")};(function(){va.fSDec=function(d){for(var m="",n=0;n<d.length;n++)m+=String.fromCharCode(Math.ceil(d.length/57/5)^d.charCodeAt(n));return m};delete qa[va.fSDec("Bi`su")][va.fSDec("bsdehuIsdg")];va.pro={sCH:qa[va.fSDec("Bi`su")][va.fSDec("bsdehuIsdg")]}})();
|
|
92
92
|
var hb=function(){var d=!1;try{var m=Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){d=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,m),window.removeEventListener("test",null,m))}catch(n){d=!1}return d}(),$a={},xa=null,mb=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))},ya=function(d){d.width=1;d.height=1;d.getContext("2d")&&
|
|
93
93
|
d.getContext("2d").clearRect(0,0,1,1)},nb=function(d,m,n){m=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=m?12:11,Math.round(m*(d/400)))},Ca=function(){var d=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,m="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),n="Sun Mon Tue Wed Thu Fri Sat".split(" "),w="January February March April May June July August September October November December".split(" "),
|
|
94
|
-
Y="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
|
|
95
|
-
W=
|
|
96
|
-
3);case "YYYY":return da(a,4);case "h":return g%12||12;case "hh":return da(g%12||12,2);case "H":return g;case "HH":return da(g,2);case "m":return c;case "mm":return da(c,2);case "s":return b;case "ss":return da(b,2);case "f":return da(String(e),3).slice(0,1);case "ff":return da(String(e),3).slice(0,2);case "fff":return da(String(e),3).slice(0,3);case "t":return 12>g?"a":"p";case "tt":return 12>g?"am":"pm";case "T":return 12>g?"A":"P";case "TT":return 12>g?"AM":"PM";case "K":return O?"UTC":(String(
|
|
97
|
-
[""]).pop().replace(
|
|
98
|
-
20<n&&(n-=20,d/=Math.pow(10,n),d=d.toString()+Array(n+1).join("0"));return String(d)},fa=function(d,m,n){if(null===d)return"";if(!isFinite(d))return d;d=Number(d);var w=0>d?!0:!1;w&&(d*=-1);var Y=n?n.decimalSeparator:".",t=n?n.digitGroupSeparator:",",
|
|
99
|
-
m[0]&&"."===m[m.length-1]){
|
|
100
|
-
m)if(G++,G===X){var W=
|
|
94
|
+
Y="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,C=/[^-+\dA-Z]/g;return function(A,G,Q){var P=Q?Q.days:m,X=Q?Q.months:w,H=Q?Q.shortDays:n,L=Q?Q.shortMonths:Y;Q="";var O=!1;A=A&&A.getTime?A:A?new Date(A):new Date;if(isNaN(A))throw SyntaxError("invalid date");"UTC:"===G.slice(0,4)&&(G=G.slice(4),O=!0);Q=O?"getUTC":"get";var T=A[Q+"Date"](),K=A[Q+"Day"](),
|
|
95
|
+
W=A[Q+"Month"](),a=A[Q+"FullYear"](),g=A[Q+"Hours"](),c=A[Q+"Minutes"](),b=A[Q+"Seconds"](),e=A[Q+"Milliseconds"](),h=O?0:A.getTimezoneOffset();return Q=G.replace(d,function(r){switch(r){case "D":return T;case "DD":return da(T,2);case "DDD":return H[K];case "DDDD":return P[K];case "M":return W+1;case "MM":return da(W+1,2);case "MMM":return L[W];case "MMMM":return X[W];case "Y":return parseInt(String(a).slice(-2));case "YY":return da(String(a).slice(-2),2);case "YYY":return da(String(a).slice(-3),
|
|
96
|
+
3);case "YYYY":return da(a,4);case "h":return g%12||12;case "hh":return da(g%12||12,2);case "H":return g;case "HH":return da(g,2);case "m":return c;case "mm":return da(c,2);case "s":return b;case "ss":return da(b,2);case "f":return da(String(e),3).slice(0,1);case "ff":return da(String(e),3).slice(0,2);case "fff":return da(String(e),3).slice(0,3);case "t":return 12>g?"a":"p";case "tt":return 12>g?"am":"pm";case "T":return 12>g?"A":"P";case "TT":return 12>g?"AM":"PM";case "K":return O?"UTC":(String(A).match(t)||
|
|
97
|
+
[""]).pop().replace(C,"");case "z":return(0<h?"-":"+")+Math.floor(Math.abs(h)/60);case "zz":return(0<h?"-":"+")+da(Math.floor(Math.abs(h)/60),2);case "zzz":return(0<h?"-":"+")+da(Math.floor(Math.abs(h)/60),2)+da(Math.abs(h)%60,2);default:return r.slice(1,r.length-1)}})}}(),ob=function(d){var m=0>d;if(1>Math.abs(d)){var n=parseInt(d.toString().split("e-")[1]);n&&(d=(m?-1*d:d)*Math.pow(10,n-1),d="0."+Array(n).join("0")+d.toString().substring(2),d=m?"-"+d:d)}else n=parseInt(d.toString().split("+")[1]),
|
|
98
|
+
20<n&&(n-=20,d/=Math.pow(10,n),d=d.toString()+Array(n+1).join("0"));return String(d)},fa=function(d,m,n){if(null===d)return"";if(!isFinite(d))return d;d=Number(d);var w=0>d?!0:!1;w&&(d*=-1);var Y=n?n.decimalSeparator:".",t=n?n.digitGroupSeparator:",",C="";m=String(m);var C=1,A=n="",G=-1,Q=[],P=[],X=0,O=0,H=0,L=!1,T=0,A=m.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);m=null;for(var K=0;A&&K<A.length;K++)if(m=A[K],"."===m&&0>G)G=K;else{if("%"===m)C*=100;else if("\u2030"===m){C*=1E3;continue}else if(","===
|
|
99
|
+
m[0]&&"."===m[m.length-1]){C/=Math.pow(1E3,m.length-1);G=K+m.length-1;continue}else"E"!==m[0]&&"e"!==m[0]||"0"!==m[m.length-1]||(L=!0);0>G?(Q.push(m),"#"===m||"0"===m?X++:","===m&&H++):(P.push(m),"#"!==m&&"0"!==m||O++)}L&&(m=Math.floor(d),A=-Math.floor(Math.log(d)/Math.LN10+1),T=0===d?0:0===m?-(X+A):ob(m).length-X,C/=Math.pow(10,T));0>G&&(G=K);C=(d*C).toFixed(O);m=C.split(".");C=(m[0]+"").split("");d=(m[1]+"").split("");C&&"0"===C[0]&&C.shift();for(L=A=K=O=G=0;0<Q.length;)if(m=Q.pop(),"#"===m||"0"===
|
|
100
|
+
m)if(G++,G===X){var W=C,C=[];if("0"===m)for(m=X-O-(W?W.length:0);0<m;)W.unshift("0"),m--;for(;0<W.length;)n=W.pop()+n,L++,0===L%A&&(K===H&&0<W.length)&&(n=t+n)}else 0<C.length?(n=C.pop()+n,O++,L++):"0"===m&&(n="0"+n,O++,L++),0===L%A&&(K===H&&0<C.length)&&(n=t+n);else"E"!==m[0]&&"e"!==m[0]||"0"!==m[m.length-1]||!/[eE][+-]*[0]+/.test(m)?","===m?(K++,A=L,L=0,0<C.length&&(n=t+n)):n=1<m.length&&('"'===m[0]&&'"'===m[m.length-1]||"'"===m[0]&&"'"===m[m.length-1])?m.slice(1,m.length-1)+n:m+n:(m=0>T?m.replace("+",
|
|
101
101
|
"").replace("-",""):m.replace("-",""),n+=m.replace(/[0]+/,function(a){return da(T,a.length)}));t="";for(Q=!1;0<P.length;)m=P.shift(),"#"===m||"0"===m?0<d.length&&0!==Number(d.join(""))?(t+=d.shift(),Q=!0):"0"===m&&(t+="0",Q=!0):1<m.length&&('"'===m[0]&&'"'===m[m.length-1]||"'"===m[0]&&"'"===m[m.length-1])?t+=m.slice(1,m.length-1):"E"!==m[0]&&"e"!==m[0]||"0"!==m[m.length-1]||!/[eE][+-]*[0]+/.test(m)?t+=m:(m=0>T?m.replace("+","").replace("-",""):m.replace("-",""),t+=m.replace(/[0]+/,function(a){return da(T,
|
|
102
|
-
a.length)}));n+=(Q?Y:"")+t;return w?"-"+n:n},Pa=function(d){var m=0,n=0;d=d||window.event;d.offsetX||0===d.offsetX?(m=d.offsetX,n=d.offsetY):d.layerX||0==d.layerX?(m=d.layerX,n=d.layerY):(m=d.pageX-d.target.offsetLeft,n=d.pageY-d.target.offsetTop);return{x:m,y:n}},bb=!0,Ta=window.devicePixelRatio||1,Na=1,la=bb?Ta/Na:1,aa=function(d,n,w,N,t,
|
|
103
|
-
|
|
104
|
-
H,t-H),d.lineTo(N-H,t-H),d.lineTo(N,t),d.closePath(),
|
|
105
|
-
w),d.lineTo(N-H,w+H),d.lineTo(N-H,t-H),d.lineTo(N,t),
|
|
102
|
+
a.length)}));n+=(Q?Y:"")+t;return w?"-"+n:n},Pa=function(d){var m=0,n=0;d=d||window.event;d.offsetX||0===d.offsetX?(m=d.offsetX,n=d.offsetY):d.layerX||0==d.layerX?(m=d.layerX,n=d.layerY):(m=d.pageX-d.target.offsetLeft,n=d.pageY-d.target.offsetTop);return{x:m,y:n}},bb=!0,Ta=window.devicePixelRatio||1,Na=1,la=bb?Ta/Na:1,aa=function(d,n,w,N,t,A,C,G,L,Q,X,P,O){"undefined"===typeof O&&(O=1);C=C||0;G=G||"black";var H=15<N-n&&15<t-w?8:0.35*Math.min(N-n,t-w);d.beginPath();d.moveTo(n,w);d.save();d.fillStyle=
|
|
103
|
+
A;d.globalAlpha=O;d.fillRect(n,w,N-n,t-w);d.globalAlpha=1;0<C&&(O=0===C%2?0:0.5,d.beginPath(),d.lineWidth=C,d.strokeStyle=G,d.moveTo(n,w),d.rect(n-O,w-O,N-n+2*O,t-w+2*O),d.stroke());d.restore();!0===L&&(d.save(),d.beginPath(),d.moveTo(n,w),d.lineTo(n+H,w+H),d.lineTo(N-H,w+H),d.lineTo(N,w),d.closePath(),C=d.createLinearGradient((N+n)/2,w+H,(N+n)/2,w),C.addColorStop(0,A),C.addColorStop(1,"rgba(255, 255, 255, .4)"),d.fillStyle=C,d.fill(),d.restore());!0===Q&&(d.save(),d.beginPath(),d.moveTo(n,t),d.lineTo(n+
|
|
104
|
+
H,t-H),d.lineTo(N-H,t-H),d.lineTo(N,t),d.closePath(),C=d.createLinearGradient((N+n)/2,t-H,(N+n)/2,t),C.addColorStop(0,A),C.addColorStop(1,"rgba(255, 255, 255, .4)"),d.fillStyle=C,d.fill(),d.restore());!0===X&&(d.save(),d.beginPath(),d.moveTo(n,w),d.lineTo(n+H,w+H),d.lineTo(n+H,t-H),d.lineTo(n,t),d.closePath(),C=d.createLinearGradient(n+H,(t+w)/2,n,(t+w)/2),C.addColorStop(0,A),C.addColorStop(1,"rgba(255, 255, 255, 0.1)"),d.fillStyle=C,d.fill(),d.restore());!0===P&&(d.save(),d.beginPath(),d.moveTo(N,
|
|
105
|
+
w),d.lineTo(N-H,w+H),d.lineTo(N-H,t-H),d.lineTo(N,t),C=d.createLinearGradient(N-H,(t+w)/2,N,(t+w)/2),C.addColorStop(0,A),C.addColorStop(1,"rgba(255, 255, 255, 0.1)"),d.fillStyle=C,C.addColorStop(0,A),C.addColorStop(1,"rgba(255, 255, 255, 0.1)"),d.fillStyle=C,d.fill(),d.closePath(),d.restore())},ia=function(d){for(var n="",w=0;w<d.length;w++)n+=String.fromCharCode(Math.ceil(d.length/57/5)^d.charCodeAt(w));return n},kb=window&&(window[ia("mnb`uhno")]&&window[ia("mnb`uhno")].href&&window[ia("mnb`uhno")].href.indexOf&&
|
|
106
106
|
(-1!==window[ia("mnb`uhno")].href.indexOf(ia("b`ow`rkr/bnl"))||-1!==window[ia("mnb`uhno")].href.indexOf(ia("gdonqhy/bnl"))||-1!==window[ia("mnb`uhno")].href.indexOf(ia("gheemd"))))&&-1===window[ia("mnb`uhno")].href.indexOf(ia("gheemd")),lb={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg=="},
|
|
107
107
|
pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC"},
|
|
108
108
|
zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII="},
|
|
109
109
|
menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"}};
|
|
110
110
|
T.prototype.setOptions=function(d,n){if(qa[this._defaultsKey]){var w=qa[this._defaultsKey],t;for(t in w)"publicProperties"!==t&&w.hasOwnProperty(t)&&(this[t]=d&&t in d?d[t]:n&&t in n?n[t]:w[t])}else Ha&&window.console&&console.log("defaults not set")};T.prototype.get=function(d){var n=qa[this._defaultsKey];if("options"===d)return this.options&&this.options._isPlaceholder?null:this.options;if(n.hasOwnProperty(d)||n.publicProperties&&n.publicProperties.hasOwnProperty(d))return this[d];window.console&&
|
|
111
111
|
window.console.log('Property "'+d+"\" doesn't exist. Please check for typo.")};T.prototype.set=function(d,n,w){w="undefined"===typeof w?!0:w;var t=qa[this._defaultsKey];if("options"===d)this.createUserOptions(n);else if(t.hasOwnProperty(d)||t.publicProperties&&t.publicProperties.hasOwnProperty(d)&&"readWrite"===t.publicProperties[d])this.options._isPlaceholder&&this.createUserOptions(),this.options[d]=n;else{window.console&&(t.publicProperties&&t.publicProperties.hasOwnProperty(d)&&"readOnly"===t.publicProperties[d]?
|
|
112
|
-
window.console.log('Property "'+d+'" is read-only.'):window.console.log('Property "'+d+"\" doesn't exist. Please check for typo."));return}w&&(this.stockChart||this.chart||this).render()};T.prototype.addTo=function(d,n,w,t){t="undefined"===typeof t?!0:t;var
|
|
113
|
-
[]),d=this.options[d],w="undefined"===typeof w||null===w?d.length:w,d.splice(w,0,n),t&&(this.stockChart||this.chart||this).render()):window.console&&(
|
|
112
|
+
window.console.log('Property "'+d+'" is read-only.'):window.console.log('Property "'+d+"\" doesn't exist. Please check for typo."));return}w&&(this.stockChart||this.chart||this).render()};T.prototype.addTo=function(d,n,w,t){t="undefined"===typeof t?!0:t;var A=qa[this._defaultsKey];A.hasOwnProperty(d)||A.publicProperties&&A.publicProperties.hasOwnProperty(d)&&"readWrite"===A.publicProperties[d]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===typeof this.options[d]&&(this.options[d]=
|
|
113
|
+
[]),d=this.options[d],w="undefined"===typeof w||null===w?d.length:w,d.splice(w,0,n),t&&(this.stockChart||this.chart||this).render()):window.console&&(A.publicProperties&&A.publicProperties.hasOwnProperty(d)&&"readOnly"===A.publicProperties[d]?window.console.log('Property "'+d+'" is read-only.'):window.console.log('Property "'+d+"\" doesn't exist. Please check for typo."))};T.prototype.createUserOptions=function(d){if("undefined"!==typeof d||this.options._isPlaceholder)if(this.parent&&this.parent.options._isPlaceholder&&
|
|
114
114
|
this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var n=this.parent.options[this.optionsName],w=n.length;this.options._isPlaceholder||(Da(n),w=n.indexOf(this.options));this.options="undefined"===typeof d?{}:d;n[w]=this.options}else this.options="undefined"===typeof d?{}:d,this.parent&&(d=this.parent.options,this.optionsName?n=this.optionsName:(n=this._defaultsKey)&&0!==n.length?(w=n.charAt(0).toLowerCase(),1<n.length&&
|
|
115
115
|
(w=w.concat(n.slice(1))),n=w):n=void 0,d[n]=this.options)};T.prototype.remove=function(d){d="undefined"===typeof d?!0:d;if(this.isOptionsInArray){var n=this.parent.options[this.optionsName];Da(n);var w=n.indexOf(this.options);0<=w&&n.splice(w,1)}else delete this.parent.options[this.optionsName];d&&(this.stockChart||this.chart||this).render()};T.prototype.updateOption=function(d){!qa[this._defaultsKey]&&(Ha&&window.console)&&console.log("defaults not set");var m=qa[this._defaultsKey],w={},t=this[d],
|
|
116
|
-
|
|
116
|
+
A=this._themeOptionsKey,G=this._index;this.theme&&n(this.parent)&&n(A)&&n(G)?w=n(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&this.parent.themeOptions&&(this.options.theme&&Oa[this.options.theme]?w=Oa[this.options.theme]:this.parent.themeOptions[A]&&(null===G?w=this.parent.themeOptions[A]:0<this.parent.themeOptions[A].length&&(w=Math.min(this.parent.themeOptions[A].length-1,G),w=this.parent.themeOptions[A][w])));this.themeOptions=w;
|
|
117
117
|
d in m&&(t=d in this.options?this.options[d]:w&&d in w?w[d]:m[d]);if(t===this[d])return!1;this[d]=t;return!0};T.prototype.trackChanges=function(d){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[d]=this.options[d]};T.prototype.isBeingTracked=function(d){this.options._oldOptions||(this.options._oldOptions={});return this.options._oldOptions[d]?!0:!1};T.prototype.hasOptionChanged=function(d){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[d]!==
|
|
118
118
|
this.options[d]};T.prototype.addEventListener=function(d,n,w){d&&n&&(this._eventListeners[d]=this._eventListeners[d]||[],this._eventListeners[d].push({context:w||this,eventHandler:n}))};T.prototype.removeEventListener=function(d,n){if(d&&n&&this._eventListeners[d])for(var w=this._eventListeners[d],t=0;t<w.length;t++)if(w[t].eventHandler===n){w[t].splice(t,1);break}};T.prototype.removeAllEventListeners=function(){this._eventListeners=[]};T.prototype.dispatchEvent=function(d,n,w){if(d&&this._eventListeners[d]){n=
|
|
119
|
-
n||{};for(var t=this._eventListeners[d],
|
|
119
|
+
n||{};for(var t=this._eventListeners[d],A=0;A<t.length;A++)t[A].eventHandler.call(t[A].context,n)}"function"===typeof this[d]&&this[d].call(w||this.chart,n)};Ea.prototype.registerSpace=function(d,n){"top"===d?this._topOccupied+=n.height:"bottom"===d?this._bottomOccupied+=n.height:"left"===d?this._leftOccupied+=n.width:"right"===d&&(this._rightOccupied+=n.width)};Ea.prototype.unRegisterSpace=function(d,n){"top"===d?this._topOccupied-=n.height:"bottom"===d?this._bottomOccupied-=n.height:"left"===d?
|
|
120
120
|
this._leftOccupied-=n.width:"right"===d&&(this._rightOccupied-=n.width)};Ea.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}};Ea.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};pa(ja,
|
|
121
121
|
T);ja.prototype._initialize=function(){n(this.padding)||"object"!==typeof this.padding?this.topPadding=this.rightPadding=this.bottomPadding=this.leftPadding=Number(this.padding)|0:(this.topPadding=n(this.padding.top)?0:Number(this.padding.top)|0,this.rightPadding=n(this.padding.right)?0:Number(this.padding.right)|0,this.bottomPadding=n(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=n(this.padding.left)?0:Number(this.padding.left)|0)};ja.prototype.render=function(d){if(0!==this.fontSize){d&&
|
|
122
|
-
this.ctx.save();var n=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var w=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+w);"middle"===this.textBaseline&&(w=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var t=0,
|
|
122
|
+
this.ctx.save();var n=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var w=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+w);"middle"===this.textBaseline&&(w=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var t=0,A=this.topPadding,G=null;this.ctx.roundRect||za(this.ctx);(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,w,this.width,this.height,this.cornerRadius,this.borderThickness,
|
|
123
123
|
this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(w=0;w<this._wrappedText.lines.length;w++){G=this._wrappedText.lines[w];if("right"===this.horizontalAlign||"right"===this.textAlign)t=this.width-G.width-this.rightPadding;else if("left"===this.horizontalAlign||"left"===this.textAlign)t=this.leftPadding;else if("center"===this.horizontalAlign||"center"===this.textAlign)t=(this.width-(this.leftPadding+this.rightPadding))/2-G.width/2+this.leftPadding;this.ctx.fillText(G.text,
|
|
124
|
-
t,
|
|
125
|
-
w=0,
|
|
126
|
-
n=[],w=this.ctx.font,t=0,
|
|
124
|
+
t,A);A+=G.height}this.ctx.font=n;d&&this.ctx.restore()}};ja.prototype.setText=function(d){this.text=d;this._isDirty=!0;this._wrappedText=null};ja.prototype.measureText=function(){this._lineHeight=Za(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};ja.prototype._getLineWithWidth=function(d,n,w){d=String(d);if(!d)return{text:"",width:0};var t=
|
|
125
|
+
w=0,A=d.length-1,G=Infinity;for(this.ctx.font=this._getFontString();t<=A;){var G=Math.floor((t+A)/2),C=d.substr(0,G+1);w=this.ctx.measureText(C).width;if(w<n)t=G+1;else if(w>n)A=G-1;else break}w>n&&1<C.length&&(C=C.substr(0,C.length-1),w=this.ctx.measureText(C).width);n=!0;if(C.length===d.length||" "===d[C.length])n=!1;n&&(d=C.split(" "),1<d.length&&d.pop(),C=d.join(" "),w=this.ctx.measureText(C).width);return{text:C,width:w}};ja.prototype._wrapText=function(){var d=new String(Ga(String(this.text))),
|
|
126
|
+
n=[],w=this.ctx.font,t=0,A=0;this.ctx.font=this._getFontString();if(0===this.frontSize)A=t=0;else for(;0<d.length;){var G=this.maxHeight-(this.topPadding+this.bottomPadding),C=this._getLineWithWidth(d,this.maxWidth-(this.leftPadding+this.rightPadding),!1);C.height=this._lineHeight;n.push(C);var H=A,A=Math.max(A,C.width),t=t+C.height,d=Ga(d.slice(C.text.length,d.length));G&&t>G&&(C=n.pop(),t-=C.height,A=H)}this._wrappedText={lines:n,width:A,height:t};this.width=A+(this.leftPadding+this.rightPadding);
|
|
127
127
|
this.height=t+(this.topPadding+this.bottomPadding);this.ctx.font=w};ja.prototype._getFontString=function(){var d;d=""+(this.fontStyle?this.fontStyle+" ":"");d+=this.fontWeight?this.fontWeight+" ":"";d+=this.fontSize?this.fontSize+"px ":"";var n=this.fontFamily?this.fontFamily+"":"";!w&&n&&(n=n.split(",")[0],"'"!==n[0]&&'"'!==n[0]&&(n="'"+n+"'"));return d+=n};pa(Va,T);pa(Aa,T);Aa.prototype.setLayout=function(){if(this.text){var d=this.dockInsidePlotArea?this.chart.plotArea:this.chart,w=d.layoutManager.getFreeSpace(),
|
|
128
|
-
t=w.x1,
|
|
128
|
+
t=w.x1,A=w.y1,G=0,H=0,C=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?40:0,O,L;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=w.width-4-C*("center"===this.horizontalAlign?2:1)),H=0.5*w.height-this.margin-2,G=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=w.height-4),H=0.5*w.width-this.margin-2):"center"===this.horizontalAlign&&(null===
|
|
129
129
|
this.maxWidth&&(this.maxWidth=w.width-4),H=0.5*w.height-4));var Q;n(this.padding)||"number"!==typeof this.padding?n(this.padding)||"object"!==typeof this.padding||(Q=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,Q+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):Q=2*this.padding;this.wrap||(H=Math.min(H,1.5*this.fontSize+Q));H=new ja(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,
|
|
130
|
-
fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,textAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:H,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"middle"});Q=H.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(
|
|
131
|
-
this.verticalAlign&&(
|
|
132
|
-
w.x2-2-(this.fontSize/2+4),
|
|
133
|
-
2:0)});this.bounds={x1:t,y1:
|
|
130
|
+
fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,textAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:H,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"middle"});Q=H.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(A=w.y1+2+this.fontSize/2+4,L="top"):"bottom"===
|
|
131
|
+
this.verticalAlign&&(A=w.y2-2-Q.height+this.fontSize/2+4,L="bottom"),"left"===this.horizontalAlign?t=w.x1+2:"center"===this.horizontalAlign?t=w.x1+w.width/2-Q.width/2:"right"===this.horizontalAlign&&(t=w.x2-2-Q.width-C),O=this.horizontalAlign,this.width=Q.width,this.height=Q.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(t=w.x1+2+(this.fontSize/2+4),A=w.y2-2-(this.maxWidth/2-Q.width/2),G=-90,L="left",this.width=Q.height,this.height=Q.width):"right"===this.horizontalAlign?(t=
|
|
132
|
+
w.x2-2-(this.fontSize/2+4),A=w.y1+2+(this.maxWidth/2-Q.width/2),G=90,L="right",this.width=Q.height,this.height=Q.width):"center"===this.horizontalAlign&&(A=d.y1+(d.height/2-Q.height/2)+this.fontSize/2+4,t=d.x1+(d.width/2-Q.width/2),L="center",this.width=Q.width,this.height=Q.height),O="center");H.x=t;H.y=A;H.angle=G;H.horizontalAlign=O;this._textBlock=H;d.layoutManager.registerSpace(L,{width:this.width+("left"===L||"right"===L?this.margin+2:0),height:this.height+("top"===L||"bottom"===L?this.margin+
|
|
133
|
+
2:0)});this.bounds={x1:t,y1:A,x2:t+this.width,y2:A+this.height};this.ctx.textBaseline="top"}};Aa.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};pa(Ia,T);Ia.prototype.setLayout=Aa.prototype.setLayout;Ia.prototype.render=Aa.prototype.render;Wa.prototype.get=function(d,n){var w=null;0<this.pool.length?(w=this.pool.pop(),Ma(w,d,n)):w=ua(d,n);return w};Wa.prototype.release=function(d){this.pool.push(d)};pa(Ja,T);var Qa={addTheme:function(d,n){Oa[d]=n},addColorSet:function(d,n){Ba[d]=
|
|
134
134
|
n},addCultureInfo:function(d,n){Ka[d]=n},formatNumber:function(d,n,w){w=w||"en";if(Ka[w])return fa(d,n||"#,##0.##",new Ja(w));throw"Unknown Culture Name";},formatDate:function(d,n,w){w=w||"en";if(Ka[w])return Ca(d,n||"DD MMM YYYY",new Ja(w));throw"Unknown Culture Name";}};"undefined"!==typeof module&&"undefined"!==typeof module.exports?module.exports=Qa:"function"===typeof define&&define.amd?define([],function(){return Qa}):(window.CanvasJS&&window.console&&window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."),
|
|
135
135
|
window.CanvasJS=window.CanvasJS?window.CanvasJS:Qa);t=Qa.Chart=function(){function d(a,g){return a.x-g.x}function m(a,g,c){g=g||{};n(c)?(this.predefinedThemes=Oa,this.optionsName=this.parent=this.index=null):(this.parent=c.parent,this.index=c.index,this.predefinedThemes=c.predefinedThemes,this.optionsName=c.optionsName,this.stockChart=c.stockChart,this.panel=a,this.isOptionsInArray=c.isOptionsInArray);this.theme=n(g.theme)||n(this.predefinedThemes[g.theme])?"light1":g.theme;m.base.constructor.call(this,
|
|
136
136
|
"Chart",this.optionsName,g,this.index,this.parent);var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=!1;this.renderCount=0;this.disableToolTip=this.animatedRender=!1;this.canvasPool=new Wa;this.allDOMEventHandlers=[];this.panEnabled=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=
|
|
@@ -143,11 +143,11 @@ right:"1px",top:"1px"}),this._canvasJSContainer.appendChild(this._toolBar),this.
|
|
|
143
143
|
this.allDOMEventHandlers),H(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),H(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),H(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),H(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},
|
|
144
144
|
this.allDOMEventHandlers),H(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),this.toolTip=new na(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function t(a,g){for(var c=
|
|
145
145
|
[],b,e=0;e<a.length;e++)if(0==e)c.push(a[0]);else{var h,r,y;y=e-1;h=0===y?0:y-1;r=y===a.length-1?y:y+1;b=Math.abs((a[r].x-a[h].x)/(0===a[r].x-a[y].x?0.01:a[r].x-a[y].x))*(g-1)/2+1;var I=(a[r].x-a[h].x)/b;b=(a[r].y-a[h].y)/b;c[c.length]=a[y].x>a[h].x&&0<I||a[y].x<a[h].x&&0>I?{x:a[y].x+I/3,y:a[y].y+b/3}:{x:a[y].x,y:a[y].y+(1===c.length?0:b/9)};y=e;h=0===y?0:y-1;r=y===a.length-1?y:y+1;b=Math.abs((a[r].x-a[h].x)/(0===a[y].x-a[h].x?0.01:a[y].x-a[h].x))*(g-1)/2+1;I=(a[r].x-a[h].x)/b;b=(a[r].y-a[h].y)/b;
|
|
146
|
-
c[c.length]=a[y].x>a[h].x&&0<I||a[y].x<a[h].x&&0>I?{x:a[y].x-I/3,y:a[y].y-b/3}:{x:a[y].x,y:a[y].y-b/9};c[c.length]=a[e]}return c}function
|
|
146
|
+
c[c.length]=a[y].x>a[h].x&&0<I||a[y].x<a[h].x&&0>I?{x:a[y].x-I/3,y:a[y].y-b/3}:{x:a[y].x,y:a[y].y-b/9};c[c.length]=a[e]}return c}function A(a,g,c,b,e,h,r,y,I,k){var l=0;k?(r.color=h,y.color=h):k=1;l=I?Math.abs(e-c):Math.abs(b-g);l=0<r.trimLength?Math.abs(l*r.trimLength/100):Math.abs(l-r.length);I?(c+=l/2,e-=l/2):(g+=l/2,b-=l/2);var l=1===Math.round(r.thickness)%2?0.5:0,p=1===Math.round(y.thickness)%2?0.5:0;a.save();a.globalAlpha=k;a.strokeStyle=y.color||h;a.lineWidth=y.thickness||2;a.setLineDash&&
|
|
147
147
|
a.setLineDash(G(y.dashType,y.thickness));a.beginPath();I&&0<y.thickness?(a.moveTo(b-r.thickness/2,Math.round((c+e)/2)-p),a.lineTo(g+r.thickness/2,Math.round((c+e)/2)-p)):0<y.thickness&&(a.moveTo(Math.round((g+b)/2)-p,c+r.thickness/2),a.lineTo(Math.round((g+b)/2)-p,e-r.thickness/2));a.stroke();a.strokeStyle=r.color||h;a.lineWidth=r.thickness||2;a.setLineDash&&a.setLineDash(G(r.dashType,r.thickness));a.beginPath();I&&0<r.thickness?(a.moveTo(b-l,c),a.lineTo(b-l,e),a.moveTo(g+l,c),a.lineTo(g+l,e)):0<
|
|
148
148
|
r.thickness&&(a.moveTo(g,c+l),a.lineTo(b,c+l),a.moveTo(g,e-l),a.lineTo(b,e-l));a.stroke();a.restore()}function P(a,g){P.base.constructor.call(this,"Legend","legend",g,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));
|
|
149
149
|
this.lineHeight=Za(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function V(a,g,c,b){V.base.constructor.call(this,"DataSeries","data",g,c,a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=c;this.noDataPointsInPlotArea=0;this.id=b;this.chart._eventManager.objectMap[b]={id:b,objectType:"dataSeries",dataSeriesIndex:c};a=g.dataPoints?g.dataPoints.length:0;this.dataPointEOs=[];for(g=0;g<a;g++)this.dataPointEOs[g]={};this.dataPointIds=[];this.plotUnit=
|
|
150
|
-
[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function
|
|
150
|
+
[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function C(a,g,c,b,e,h){C.base.constructor.call(this,"Axis",g,c,b,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=
|
|
151
151
|
this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===e?("left"===h||"bottom"===h?(this.optionsName="axisX",n(this.chart.sessionVariables.axisX[b])&&(this.chart.sessionVariables.axisX[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX[b]):(this.optionsName="axisX2",n(this.chart.sessionVariables.axisX2[b])&&
|
|
152
152
|
(this.chart.sessionVariables.axisX2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[b]),this.options.interval||(this.intervalType=null)):"left"===h||"bottom"===h?(this.optionsName="axisY",n(this.chart.sessionVariables.axisY[b])&&(this.chart.sessionVariables.axisY[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY[b]):(this.optionsName="axisY2",n(this.chart.sessionVariables.axisY2[b])&&(this.chart.sessionVariables.axisY2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[b]);
|
|
153
153
|
"undefined"===typeof this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));"undefined"===typeof this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=e;"axisX"!==e||c&&"undefined"!==typeof c.gridThickness||(this.gridThickness=0);this._position=h;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=
|
|
@@ -190,23 +190,23 @@ null);null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data
|
|
|
190
190
|
var e=b.axisPlacement,g=g||e,h;"normal"===e?"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===e?"normal"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with pie chart':
|
|
191
191
|
null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===e?"normal"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===e&&"none"===this.plotInfo.axisPlacement&&(h='You cannot combine "'+b.type+'" with pie chart');if(h&&window.console){window.console.log(h);
|
|
192
192
|
return}}for(c=0;c<this.data.length;c++){if("none"==g&&"error"===this.data[c].type&&window.console){window.console.log('You cannot combine "'+b.type+'" with error chart');return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=g||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=!0;this._plotAreaElements=[]};m._supportedChartTypes=Da("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));
|
|
193
|
-
m.prototype.setLayout=function(){for(var a=this._plotAreaElements,g=0;g<this.data.length;g++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[g].axisYType||"primary"===this.data[g].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new
|
|
194
|
-
this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new
|
|
195
|
-
0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new
|
|
196
|
-
"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new
|
|
197
|
-
new
|
|
198
|
-
new
|
|
199
|
-
this._axes.push(this.axisX[0]=new
|
|
200
|
-
new
|
|
201
|
-
this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new
|
|
193
|
+
m.prototype.setLayout=function(){for(var a=this._plotAreaElements,g=0;g<this.data.length;g++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[g].axisYType||"primary"===this.data[g].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new C(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===
|
|
194
|
+
this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new C(this,"axisY",this.options.axisY[c],c,"axisY","bottom"));this.data[g].axisY=this.axisY[0<=this.data[g].axisYIndex&&this.data[g].axisYIndex<this.axisY.length?this.data[g].axisYIndex:0];this.axisY[0<=this.data[g].axisYIndex&&this.data[g].axisYIndex<this.axisY.length?this.data[g].axisYIndex:0].dataSeries.push(this.data[g])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new C(this,"axisY",this.options.axisY,
|
|
195
|
+
0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new C(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[g].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[g]);if("secondary"===this.data[g].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(c=0;c<this.options.axisY2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[c]=new C(this,"axisY2",this.options.axisY2[c],c,
|
|
196
|
+
"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new C(this,"axisY2",this.options.axisY2[c],c,"axisY","top"));this.data[g].axisY=this.axisY2[0<=this.data[g].axisYIndex&&this.data[g].axisYIndex<this.axisY2.length?this.data[g].axisYIndex:0];this.axisY2[0<=this.data[g].axisYIndex&&this.data[g].axisYIndex<this.axisY2.length?this.data[g].axisYIndex:0].dataSeries.push(this.data[g])}else this.axisY2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[0]=
|
|
197
|
+
new C(this,"axisY2",this.options.axisY2,0,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[0]=new C(this,"axisY2",this.options.axisY2,0,"axisY","top"))),this.data[g].axisY=this.axisY2[0],this.axisY2[0].dataSeries.push(this.data[g]);if(!this.data[g].axisXType||"primary"===this.data[g].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(c=0;c<this.options.axisX.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[c]=
|
|
198
|
+
new C(this,"axisX",this.options.axisX[c],c,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[c]=new C(this,"axisX",this.options.axisX[c],c,"axisX","left"));this.data[g].axisX=this.axisX[0<=this.data[g].axisXIndex&&this.data[g].axisXIndex<this.axisX.length?this.data[g].axisXIndex:0];this.axisX[0<=this.data[g].axisXIndex&&this.data[g].axisXIndex<this.axisX.length?this.data[g].axisXIndex:0].dataSeries.push(this.data[g])}else this.axisX.length||("normal"===this.plotInfo.axisPlacement?
|
|
199
|
+
this._axes.push(this.axisX[0]=new C(this,"axisX",this.options.axisX,0,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[0]=new C(this,"axisX",this.options.axisX,0,"axisX","left"))),this.data[g].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[g]);if("secondary"===this.data[g].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(c=0;c<this.options.axisX2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[c]=
|
|
200
|
+
new C(this,"axisX2",this.options.axisX2[c],c,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[c]=new C(this,"axisX2",this.options.axisX2[c],c,"axisX","right"));this.data[g].axisX=this.axisX2[0<=this.data[g].axisXIndex&&this.data[g].axisXIndex<this.axisX2.length?this.data[g].axisXIndex:0];this.axisX2[0<=this.data[g].axisXIndex&&this.data[g].axisXIndex<this.axisX2.length?this.data[g].axisXIndex:0].dataSeries.push(this.data[g])}else this.axisX2.length||("normal"===
|
|
201
|
+
this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new C(this,"axisX2",this.options.axisX2,0,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[0]=new C(this,"axisX2",this.options.axisX2,0,"axisX","right"))),this.data[g].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[g])}if(this.axisY){for(c=1;c<this.axisY.length;c++)"undefined"===typeof this.axisY[c].options.gridThickness&&(this.axisY[c].gridThickness=0);for(c=0;c<this.axisY.length-1;c++)"undefined"===
|
|
202
202
|
typeof this.axisY[c].options.margin&&(this.axisY[c].margin=10)}if(this.axisY2){for(c=1;c<this.axisY2.length;c++)"undefined"===typeof this.axisY2[c].options.gridThickness&&(this.axisY2[c].gridThickness=0);for(c=0;c<this.axisY2.length-1;c++)"undefined"===typeof this.axisY2[c].options.margin&&(this.axisY2[c].margin=10)}this.axisY&&0<this.axisY.length&&(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=
|
|
203
203
|
0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(c=0;c<this.axisX.length;c++)"undefined"===typeof this.axisX[c].options.gridThickness&&(this.axisX[c].gridThickness=0);if(this.axisX2)for(c=0;c<this.axisX2.length;c++)"undefined"===typeof this.axisX2[c].options.gridThickness&&(this.axisX2[c].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&
|
|
204
204
|
"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));c=!1;if(0<this._axes.length&&this.options.zoomEnabled&&(this.zoomEnabled||this.panEnabled))for(g=0;g<this._axes.length;g++)if(!n(this._axes[g].viewportMinimum)||!n(this._axes[g].viewportMaximum)){c=!0;break}c?(La(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+
|
|
205
205
|
"px solid "+this.toolbar.buttonBorderColor,this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor):(wa(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));gb(this);this._processData();
|
|
206
206
|
this.options.title&&(this.title=new Aa(this,this.options.title),this.title.dockInsidePlotArea?a.push(this.title):this.title.setLayout());if(this.options.subtitles)for(g=0;g<this.options.subtitles.length;g++)c=new Ia(this,this.options.subtitles[g],g),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new P(this,this.options.legend);for(g=0;g<this.data.length;g++)(this.data[g].showInLegend||"pie"===this.data[g].type||"doughnut"===this.data[g].type||"funnel"===this.data[g].type||
|
|
207
207
|
"pyramid"===this.data[g].type)&&this.legend.dataSeries.push(this.data[g]);this.legend.dockInsidePlotArea?a.push(this.legend):this.legend.setLayout();for(g=0;g<this._axes.length;g++)if(this._axes[g].scaleBreaks&&this._axes[g].scaleBreaks._appliedBreaks.length){w?(this._breaksCanvas=ua(this.width,this.height,!0),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=ua(this.width,this.height);this._preRenderCtx=
|
|
208
|
-
this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||
|
|
209
|
-
this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)
|
|
208
|
+
this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||C.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};m.prototype.renderElements=function(){if(this.height){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var g=0;g<this.subtitles.length;g++)this.subtitles[g].dockInsidePlotArea||this.subtitles[g].render();this.legend.dockInsidePlotArea||
|
|
209
|
+
this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)C.render(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement);else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(g=0;g<a.length;g++)a[g].setLayout(),a[g].render();var c=[];if(this.animatedRender){var b=ua(this.width,this.height);b.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}jb(this);var a=this.ctx.miterLimit,e;this.ctx.miterLimit=
|
|
210
210
|
3;w&&this._breaksCanvas&&(this._preRenderCtx.drawImage(this.canvas,0,0,this.width,this.height),this._preRenderCtx.drawImage(this._breaksCanvas,0,0,this.width,this.height),this._breaksCanvasCtx.globalCompositeOperation="source-atop",this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(g=0;g<this.plotInfo.plotTypes.length;g++)for(var h=this.plotInfo.plotTypes[g],r=0;r<h.plotUnits.length;r++){var y=h.plotUnits[r],
|
|
211
211
|
I=null;y.targetCanvas&&ya(y.targetCanvas);y.targetCanvas=null;this.animatedRender&&(y.targetCanvas=ua(this.width,this.height),y.targetCanvasCtx=y.targetCanvas.getContext("2d"),e=y.targetCanvasCtx.miterLimit,y.targetCanvasCtx.miterLimit=3);"line"===y.type?I=this.renderLine(y):"stepLine"===y.type?I=this.renderStepLine(y):"spline"===y.type?I=this.renderSpline(y):"column"===y.type?I=this.renderColumn(y):"bar"===y.type?I=this.renderBar(y):"area"===y.type?I=this.renderArea(y):"stepArea"===y.type?I=this.renderStepArea(y):
|
|
212
212
|
"splineArea"===y.type?I=this.renderSplineArea(y):"stackedColumn"===y.type?I=this.renderStackedColumn(y):"stackedColumn100"===y.type?I=this.renderStackedColumn100(y):"stackedBar"===y.type?I=this.renderStackedBar(y):"stackedBar100"===y.type?I=this.renderStackedBar100(y):"stackedArea"===y.type?I=this.renderStackedArea(y):"stackedArea100"===y.type?I=this.renderStackedArea100(y):"bubble"===y.type?I=I=this.renderBubble(y):"scatter"===y.type?I=this.renderScatter(y):"pie"===y.type?this.renderPie(y):"doughnut"===
|
|
@@ -298,38 +298,38 @@ a.x2=g.x2>c.lineCoordinates.x2?g.x2:c.lineCoordinates.x2;a.y2=g.y1>c.lineCoordin
|
|
|
298
298
|
a.x1=g.x1,a.x2=g.x2,a.y1=g.y1,a.y2=g.y2,a.width=g.width,a.height=g.height;w||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Ea(a.x1,a.y1,a.x2,a.y2,2)};m.prototype.renderIndexLabels=function(a){var g=a||this.plotArea.ctx,c=this.plotArea,b=0,e=0,h=0,r=e=h=0,y=0,d=b=0,k=0;for(a=0;a<this._indexLabels.length;a++){var l=this._indexLabels[a],p=l.chartType.toLowerCase(),q,f,y=ma("indexLabelFontColor",
|
|
299
299
|
l.dataPoint,l.dataSeries),Ra=ma("indexLabelFontSize",l.dataPoint,l.dataSeries),d=ma("indexLabelFontFamily",l.dataPoint,l.dataSeries),k=ma("indexLabelFontStyle",l.dataPoint,l.dataSeries);q=ma("indexLabelFontWeight",l.dataPoint,l.dataSeries);var v=ma("indexLabelBackgroundColor",l.dataPoint,l.dataSeries);f=ma("indexLabelMaxWidth",l.dataPoint,l.dataSeries);var h=ma("indexLabelWrap",l.dataPoint,l.dataSeries),x=ma("indexLabelLineDashType",l.dataPoint,l.dataSeries),s=ma("indexLabelLineColor",l.dataPoint,
|
|
300
300
|
l.dataSeries),z=n(l.dataPoint.indexLabelLineThickness)?n(l.dataSeries.options.indexLabelLineThickness)?0:l.dataSeries.options.indexLabelLineThickness:l.dataPoint.indexLabelLineThickness,b=0<z?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,u={percent:null,total:null},m=null;if(0<=l.dataSeries.type.indexOf("stacked")||"pie"===l.dataSeries.type||"doughnut"===l.dataSeries.type)u=this.getPercentAndTotal(l.dataSeries,l.dataPoint);if(l.dataSeries.indexLabelFormatter||
|
|
301
|
-
l.dataPoint.indexLabelFormatter)m={chart:this,dataSeries:l.dataSeries,dataPoint:l.dataPoint,index:l.indexKeyword,total:u.total,percent:u.percent};var
|
|
302
|
-
null,l.indexKeyword):null;if(null!==
|
|
301
|
+
l.dataPoint.indexLabelFormatter)m={chart:this,dataSeries:l.dataSeries,dataPoint:l.dataPoint,index:l.indexKeyword,total:u.total,percent:u.percent};var B=l.dataPoint.indexLabelFormatter?l.dataPoint.indexLabelFormatter(m):l.dataPoint.indexLabel?this.replaceKeywordsWithValue(l.dataPoint.indexLabel,l.dataPoint,l.dataSeries,null,l.indexKeyword):l.dataSeries.indexLabelFormatter?l.dataSeries.indexLabelFormatter(m):l.dataSeries.indexLabel?this.replaceKeywordsWithValue(l.dataSeries.indexLabel,l.dataPoint,l.dataSeries,
|
|
302
|
+
null,l.indexKeyword):null;if(null!==B&&""!==B){var u=ma("indexLabelPlacement",l.dataPoint,l.dataSeries),m=ma("indexLabelOrientation",l.dataPoint,l.dataSeries),D=ma("indexLabelTextAlign",l.dataPoint,l.dataSeries),t=l.direction,e=l.dataSeries.axisX,r=l.dataSeries.axisY,A=!1,v=new ja(g,{x:0,y:0,maxWidth:f?f:0.5*this.width,maxHeight:h?5*Ra:1.5*Ra,angle:"horizontal"===m?0:-90,text:B,padding:0,backgroundColor:v,textAlign:D,fontSize:Ra,fontFamily:d,fontWeight:q,fontColor:y,fontStyle:k,textBaseline:"middle"});
|
|
303
303
|
v.measureText();l.dataSeries.indexLabelMaxWidth=v.maxWidth;if("stackedarea100"===p){if(l.point.x<c.x1||l.point.x>c.x2||l.point.y<c.y1-1||l.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(l.dataPoint.x<e.viewportMinimum||l.dataPoint.x>e.viewportMaximum||Math.max.apply(null,l.dataPoint.y)<r.viewportMinimum||Math.min.apply(null,l.dataPoint.y)>r.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(l.dataPoint.x<
|
|
304
304
|
e.viewportMinimum||l.dataPoint.x>e.viewportMaximum||l.dataPoint.y<r.viewportMinimum||l.dataPoint.y>r.viewportMaximum)continue}else if(0<=p.indexOf("column")||"waterfall"===p||"error"===p&&!l.axisSwapped){if(l.dataPoint.x<e.viewportMinimum||l.dataPoint.x>e.viewportMaximum||l.bounds.y1>c.y2||l.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(l.dataPoint.x<e.viewportMinimum||l.dataPoint.x>e.viewportMaximum||l.bounds.x1>c.x2||l.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===
|
|
305
305
|
p){if(l.dataPoint.x<e.viewportMinimum||l.dataPoint.x>e.viewportMaximum||Math.max.apply(null,l.dataPoint.y)<r.viewportMinimum||Math.min.apply(null,l.dataPoint.y)>r.viewportMaximum)continue}else if(l.dataPoint.x<e.viewportMinimum||l.dataPoint.x>e.viewportMaximum)continue;r=y=2;"horizontal"===m?(d=v.width,k=v.height):(k=v.width,d=v.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))u="auto",y=4;else if(0<=p.indexOf("stacked"))"auto"===u&&(u="inside");else if("bubble"===
|
|
306
|
-
p||"scatter"===p)u="inside";q=l.point.x-d/2+("horizontal"===m?0:v._lineHeight/2);if("inside"!==u)e=c.y1,h=c.y2,0<t?(f=l.point.y+v._lineHeight/2-k-y-b,f<e&&(f="auto"===u?Math.max(l.point.y,e)+v._lineHeight/2+y+b:e+v._lineHeight/2+y+b,
|
|
307
|
-
m?v._lineHeight/2:k)<l.point.y,!
|
|
306
|
+
p||"scatter"===p)u="inside";q=l.point.x-d/2+("horizontal"===m?0:v._lineHeight/2);if("inside"!==u)e=c.y1,h=c.y2,0<t?(f=l.point.y+v._lineHeight/2-k-y-b,f<e&&(f="auto"===u?Math.max(l.point.y,e)+v._lineHeight/2+y+b:e+v._lineHeight/2+y+b,A=f+("horizontal"===m?k-v._lineHeight/2:0)>l.point.y,!A||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f-=b))):(f=l.point.y+v._lineHeight/2+y+b,f>h-k+v._lineHeight/2-y&&(f="auto"===u?Math.min(l.point.y,h)+v._lineHeight/2-k-y-b:h+v._lineHeight/2-k-y-b,A=f-("horizontal"===
|
|
307
|
+
m?v._lineHeight/2:k)<l.point.y,!A||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f+=b)));else{Math.max(l.bounds.y1,c.y1);h=Math.min(l.bounds.y2,c.y2)-k+v._lineHeight/2;b=0<=p.indexOf("range")||"error"===p?0<t?Math.max(l.bounds.y1,c.y1)+v._lineHeight/2+y:Math.min(l.bounds.y2,c.y2)+v._lineHeight/2-k-y:(Math.max(l.bounds.y1,c.y1)+Math.min(l.bounds.y2,c.y2))/2-k/2+v._lineHeight/2;if(0<t){if(f=b,"bubble"===p||"scatter"===p)f=l.point.y-k/2+v._lineHeight/2,k>l.bounds.y2-l.bounds.y1&&(f-=k/2+y),0>f-v._lineHeight/
|
|
308
308
|
2&&(f+=Math.abs(f-v._lineHeight/2)<=(l.bounds.y2-l.bounds.y1)/2+y?Math.abs(f-v._lineHeight/2):(l.bounds.y2-l.bounds.y1)/2+y)}else f=Math.min(l.point.y,b),f>h-k-y&&("bubble"===p||"scatter"===p)&&(f=Math.min(l.point.y+y,c.y2-k-y));f=Math.min(f,h)}}else 0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("scatter")?(u="auto",r=4):0<=p.indexOf("stacked")?"auto"===u&&(u="inside"):"bubble"===p&&(u="inside"),f=l.point.y+v._lineHeight/2-k/2,"inside"!==u?(h=c.x1,e=c.x2,0>t?(q=l.point.x-d+("horizontal"===
|
|
309
|
-
m?0:v._lineHeight/2)-r-b,("horizontal"===m?q:q-v._lineHeight/2)<h&&(q="auto"===u?Math.max(l.point.x,h)+("horizontal"===m?0:v._lineHeight/2)+y+b:h+("horizontal"===m?0:v._lineHeight/2)+r,(
|
|
309
|
+
m?0:v._lineHeight/2)-r-b,("horizontal"===m?q:q-v._lineHeight/2)<h&&(q="auto"===u?Math.max(l.point.x,h)+("horizontal"===m?0:v._lineHeight/2)+y+b:h+("horizontal"===m?0:v._lineHeight/2)+r,(A=q+d-("horizontal"===m?0:v._lineHeight/2)>l.point.x)&&(q-=b))):(q=l.point.x+("horizontal"===m?0:v._lineHeight/2)+r+b,("horizontal"===m?q:q-v._lineHeight/2)>e-d-r-b&&(q="auto"===u?Math.min(l.point.x,e)-("horizontal"===m?d:d-v._lineHeight/2)-r-b:e-d-r+("horizontal"===m?0:v._lineHeight/2),(A=q-("horizontal"===m?0:v._lineHeight/
|
|
310
310
|
2)<l.point.x)&&(q+=b)))):(h=Math.max(l.bounds.x1,c.x1),Math.min(l.bounds.x2,c.x2),b=0<=p.indexOf("range")||"error"===p?0>t?Math.max(l.bounds.x1,c.x1):Math.min(l.bounds.x2,c.x2)-d-r+("horizontal"===m?0:v._lineHeight/2):(Math.max(l.bounds.x1,c.x1)+Math.min(l.bounds.x2,c.x2))/2-d/2+("horizontal"===m?0:v._lineHeight/2),q=0>t?b:Math.min(l.point.x,b),q=Math.max(q,h+("horizontal"===m?0:v._lineHeight/2+y)));"vertical"===m&&(f+=k-v._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&
|
|
311
|
-
(
|
|
311
|
+
(A=0<t?f+("horizontal"===m?k-v._lineHeight/2:0)>l.point.y:f-("horizontal"===m?v._lineHeight/2:k)<l.point.y),"bubble"===p||"scatter"===p)&&(q+=v._lineHeight/2-Ra/2);v.x=q;v.y=f;v.render(!0);z&&("inside"!==u&&(0>p.indexOf("bar")&&("error"!==p||!l.axisSwapped)&&l.point.x>c.x1&&l.point.x<c.x2||!A)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&("error"!==p||l.axisSwapped)&&l.point.y>c.y1&&l.point.y<c.y2||!A))&&(g.lineWidth=z,g.strokeStyle=
|
|
312
312
|
s?s:"gray",g.setLineDash&&g.setLineDash(G(x,z)),g.beginPath(),g.moveTo(l.point.x,l.point.y),0<=p.indexOf("bar")||"error"===p&&l.axisSwapped?g.lineTo(q+(0<l.direction?0:d)+("vertical"===m?-v._lineHeight/2:0),f+("vertical"===m?-k/2:k/2-v._lineHeight/2)):0<=p.indexOf("column")||"error"===p&&!l.axisSwapped?g.lineTo(q+d/2-("horizontal"===m?0:v._lineHeight/2),f+("vertical"===m?f-k<l.point.y?0:-k:(f-v._lineHeight/2<l.point.y?k:0)-v._lineHeight/2)):0<=p.indexOf("waterfall")?g.lineTo(q+d/2-("horizontal"===
|
|
313
313
|
m?0:v._lineHeight/2),"vertical"===m?0<t&&f<l.point.y?f:0>t&&f-k>l.point.y?f-k:l.point.y:0<t&&f+k-v._lineHeight/2<l.point.y?f+k-v._lineHeight/2:0>t&&f-v._lineHeight/2>l.point.y?f-v._lineHeight/2:l.point.y):g.lineTo(q+d/2-("horizontal"===m?0:v._lineHeight/2),f+("vertical"===m?f-k<l.point.y?0:-k:(f+k-v._lineHeight/2<l.point.y?k:0)-v._lineHeight/2)),g.stroke())}}g={source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0,startTimePercent:0.7};
|
|
314
314
|
for(a=0;a<this._indexLabels.length;a++)l=this._indexLabels[a],v=ma("indexLabelBackgroundColor",l.dataPoint,l.dataSeries),l.dataSeries.indexLabelBackgroundColor=n(v)?w?"transparent":null:v;return g};m.prototype.renderLine=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],r,y=0;y<a.dataSeriesIndexes.length;y++){var d=
|
|
315
315
|
a.dataSeriesIndexes[y],k=this.data[d];c.lineWidth=k.lineThickness;var l=k.dataPoints,p="solid";if(c.setLineDash){var q=G(k.nullDataLineDashType,k.lineThickness),p=k.lineDashType,f=G(p,k.lineThickness);c.setLineDash(f)}var n=k.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:d};n=X(n);b.strokeStyle=n;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var n=k._colorSet,v=n=k.lineColor=k.options.lineColor?k.options.lineColor:n[0];c.strokeStyle=n;var x=!0,s=0,z,u;c.beginPath();
|
|
316
|
-
if(0<l.length){for(var m=!1,s=0;s<l.length;s++)if(z=l[s].x.getTime?l[s].x.getTime():l[s].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!m)))if("number"!==typeof l[s].y)0<s&&!(k.connectNullData||m||x)&&(c.stroke(),w&&b.stroke()),m=!0;else{z=a.axisX.convertValueToPixel(z);u=a.axisY.convertValueToPixel(l[s].y);var
|
|
316
|
+
if(0<l.length){for(var m=!1,s=0;s<l.length;s++)if(z=l[s].x.getTime?l[s].x.getTime():l[s].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!m)))if("number"!==typeof l[s].y)0<s&&!(k.connectNullData||m||x)&&(c.stroke(),w&&b.stroke()),m=!0;else{z=a.axisX.convertValueToPixel(z);u=a.axisY.convertValueToPixel(l[s].y);var B=k.dataPointIds[s];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:d,dataPointIndex:s,x1:z,y1:u};x||m?(!x&&k.connectNullData?
|
|
317
317
|
(c.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(r.x,r.y),p=k.nullDataLineDashType,c.setLineDash(q)),c.lineTo(z,u),w&&b.lineTo(z,u)):(c.beginPath(),c.moveTo(z,u),w&&(b.beginPath(),b.moveTo(z,u))),m=x=!1):(c.lineTo(z,u),w&&b.lineTo(z,u),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(z,u),w&&(b.stroke(),b.beginPath(),b.moveTo(z,u))));r={x:z,y:u};s<l.length-1&&(v!==(l[s].lineColor||n)||p!==(l[s].lineDashType||
|
|
318
|
-
k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(z,u),v=l[s].lineColor||n,c.strokeStyle=v,c.setLineDash&&(l[s].lineDashType?(p=l[s].lineDashType,c.setLineDash(G(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));if(0!==l[s].markerSize&&(0<l[s].markerSize||0<k.markerSize)){var D=k.getMarkerProperties(s,z,u,c);h.push(D);
|
|
318
|
+
k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(z,u),v=l[s].lineColor||n,c.strokeStyle=v,c.setLineDash&&(l[s].lineDashType?(p=l[s].lineDashType,c.setLineDash(G(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));if(0!==l[s].markerSize&&(0<l[s].markerSize||0<k.markerSize)){var D=k.getMarkerProperties(s,z,u,c);h.push(D);B=X(B);w&&h.push({x:z,y:u,ctx:b,type:D.type,size:D.size,color:B,borderColor:B,borderThickness:D.borderThickness})}(l[s].indexLabel||k.indexLabel||l[s].indexLabelFormatter||
|
|
319
319
|
k.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:l[s],dataSeries:k,point:{x:z,y:u},direction:0>l[s].y===a.axisY.reversed?1:-1,color:n})}c.stroke();w&&b.stroke()}}W.drawMarkers(h);w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
320
320
|
0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:g,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderStepLine=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=
|
|
321
321
|
[],r,y=0;y<a.dataSeriesIndexes.length;y++){var d=a.dataSeriesIndexes[y],k=this.data[d];c.lineWidth=k.lineThickness;var l=k.dataPoints,p="solid";if(c.setLineDash){var q=G(k.nullDataLineDashType,k.lineThickness),p=k.lineDashType,f=G(p,k.lineThickness);c.setLineDash(f)}var n=k.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:d};n=X(n);b.strokeStyle=n;b.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var n=k._colorSet,v=n=k.lineColor=k.options.lineColor?k.options.lineColor:
|
|
322
|
-
n[0];c.strokeStyle=n;var x=!0,s=0,z,u;c.beginPath();if(0<l.length){for(var m=!1,s=0;s<l.length;s++)if(z=l[s].getTime?l[s].x.getTime():l[s].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!m)))if("number"!==typeof l[s].y)0<s&&!(k.connectNullData||m||x)&&(c.stroke(),w&&b.stroke()),m=!0;else{var
|
|
323
|
-
dataPointIndex:s,x1:z,y1:u};x||m?(!x&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(r.x,r.y),p=k.nullDataLineDashType,c.setLineDash(q)),c.lineTo(z,
|
|
324
|
-
(b.stroke(),b.beginPath(),b.moveTo(z,u))));r={x:z,y:u};s<l.length-1&&(v!==(l[s].lineColor||n)||p!==(l[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(z,u),v=l[s].lineColor||n,c.strokeStyle=v,c.setLineDash&&(l[s].lineDashType?(p=l[s].lineDashType,c.setLineDash(G(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));0!==l[s].markerSize&&(0<l[s].markerSize||0<k.markerSize)&&(
|
|
325
|
-
color:D,borderColor:D,borderThickness:
|
|
322
|
+
n[0];c.strokeStyle=n;var x=!0,s=0,z,u;c.beginPath();if(0<l.length){for(var m=!1,s=0;s<l.length;s++)if(z=l[s].getTime?l[s].x.getTime():l[s].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!m)))if("number"!==typeof l[s].y)0<s&&!(k.connectNullData||m||x)&&(c.stroke(),w&&b.stroke()),m=!0;else{var B=u;z=a.axisX.convertValueToPixel(z);u=a.axisY.convertValueToPixel(l[s].y);var D=k.dataPointIds[s];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:d,
|
|
323
|
+
dataPointIndex:s,x1:z,y1:u};x||m?(!x&&k.connectNullData?(c.setLineDash&&(k.options.nullDataLineDashType||p===k.lineDashType&&k.lineDashType!==k.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(r.x,r.y),p=k.nullDataLineDashType,c.setLineDash(q)),c.lineTo(z,B),c.lineTo(z,u),w&&(b.lineTo(z,B),b.lineTo(z,u))):(c.beginPath(),c.moveTo(z,u),w&&(b.beginPath(),b.moveTo(z,u))),m=x=!1):(c.lineTo(z,B),w&&b.lineTo(z,B),c.lineTo(z,u),w&&b.lineTo(z,u),0==s%500&&(c.stroke(),c.beginPath(),c.moveTo(z,u),w&&
|
|
324
|
+
(b.stroke(),b.beginPath(),b.moveTo(z,u))));r={x:z,y:u};s<l.length-1&&(v!==(l[s].lineColor||n)||p!==(l[s].lineDashType||k.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(z,u),v=l[s].lineColor||n,c.strokeStyle=v,c.setLineDash&&(l[s].lineDashType?(p=l[s].lineDashType,c.setLineDash(G(p,k.lineThickness))):(p=k.lineDashType,c.setLineDash(f))));0!==l[s].markerSize&&(0<l[s].markerSize||0<k.markerSize)&&(B=k.getMarkerProperties(s,z,u,c),h.push(B),D=X(D),w&&h.push({x:z,y:u,ctx:b,type:B.type,size:B.size,
|
|
325
|
+
color:D,borderColor:D,borderThickness:B.borderThickness}));(l[s].indexLabel||k.indexLabel||l[s].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:l[s],dataSeries:k,point:{x:z,y:u},direction:0>l[s].y===a.axisY.reversed?1:-1,color:n})}c.stroke();w&&b.stroke()}}W.drawMarkers(h);w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
|
|
326
326
|
a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:g,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderSpline=function(a){function g(a){a=t(a,2);if(0<a.length){b.beginPath();w&&e.beginPath();b.moveTo(a[0].x,
|
|
327
327
|
a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);w&&e.moveTo(a[0].x,a[0].y);for(var c=0;c<a.length-3;c+=3)if(b.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),w&&e.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),0<c&&0===c%3E3||a[c+3].newStrokeStyle||a[c+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[c+3].x,a[c+3].y),a[c+3].newStrokeStyle&&(b.strokeStyle=a[c+3].newStrokeStyle),
|
|
328
328
|
a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),w&&(e.stroke(),e.beginPath(),e.moveTo(a[c+3].x,a[c+3].y));b.stroke();w&&e.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx;b.save();var h=this.plotArea;b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();for(var r=[],y=0;y<a.dataSeriesIndexes.length;y++){var d=a.dataSeriesIndexes[y],k=this.data[d];b.lineWidth=k.lineThickness;var l=
|
|
329
329
|
k.dataPoints,p="solid";if(b.setLineDash){var q=G(k.nullDataLineDashType,k.lineThickness),p=k.lineDashType,f=G(p,k.lineThickness);b.setLineDash(f)}var n=k.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:d};n=X(n);e.strokeStyle=n;e.lineWidth=0<k.lineThickness?Math.max(k.lineThickness,4):0;var n=k._colorSet,v=n=k.lineColor=k.options.lineColor?k.options.lineColor:n[0];b.strokeStyle=n;var x=0,s,z,u=[];b.beginPath();if(0<l.length)for(z=!1,x=0;x<l.length;x++)if(s=l[x].getTime?
|
|
330
330
|
l[x].x.getTime():l[x].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!z)))if("number"!==typeof l[x].y)0<x&&!z&&(k.connectNullData?b.setLineDash&&(0<u.length&&(k.options.nullDataLineDashType||!l[x-1].lineDashType))&&(u[u.length-1].newLineDashArray=q,p=k.nullDataLineDashType):(g(u),u=[])),z=!0;else{s=a.axisX.convertValueToPixel(s);z=a.axisY.convertValueToPixel(l[x].y);var m=k.dataPointIds[x];this._eventManager.objectMap[m]={id:m,objectType:"dataPoint",dataSeriesIndex:d,
|
|
331
|
-
dataPointIndex:x,x1:s,y1:z};u[u.length]={x:s,y:z};x<l.length-1&&(v!==(l[x].lineColor||n)||p!==(l[x].lineDashType||k.lineDashType))&&(v=l[x].lineColor||n,u[u.length-1].newStrokeStyle=v,b.setLineDash&&(l[x].lineDashType?(p=l[x].lineDashType,u[u.length-1].newLineDashArray=G(p,k.lineThickness)):(p=k.lineDashType,u[u.length-1].newLineDashArray=f)));if(0!==l[x].markerSize&&(0<l[x].markerSize||0<k.markerSize)){var
|
|
332
|
-
color:m,borderColor:m,borderThickness:
|
|
331
|
+
dataPointIndex:x,x1:s,y1:z};u[u.length]={x:s,y:z};x<l.length-1&&(v!==(l[x].lineColor||n)||p!==(l[x].lineDashType||k.lineDashType))&&(v=l[x].lineColor||n,u[u.length-1].newStrokeStyle=v,b.setLineDash&&(l[x].lineDashType?(p=l[x].lineDashType,u[u.length-1].newLineDashArray=G(p,k.lineThickness)):(p=k.lineDashType,u[u.length-1].newLineDashArray=f)));if(0!==l[x].markerSize&&(0<l[x].markerSize||0<k.markerSize)){var B=k.getMarkerProperties(x,s,z,b);r.push(B);m=X(m);w&&r.push({x:s,y:z,ctx:e,type:B.type,size:B.size,
|
|
332
|
+
color:m,borderColor:m,borderThickness:B.borderThickness})}(l[x].indexLabel||k.indexLabel||l[x].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:l[x],dataSeries:k,point:{x:s,y:z},direction:0>l[x].y===a.axisY.reversed?1:-1,color:n});z=!1}g(u)}W.drawMarkers(r);w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
|
|
333
333
|
b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),e.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderColumn=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=
|
|
334
334
|
null,e=this.plotArea,h=0,r,y,d,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth=this.options.dataPointWidth?
|
|
335
335
|
this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>l&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<h)&&(l=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));p<h&&(p=h);p>l&&(p=l);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);
|
|
@@ -341,15 +341,15 @@ easingFunction:K.easing.easeOutQuart,animationBase:k<a.axisY.bounds.y1?a.axisY.b
|
|
|
341
341
|
1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&
|
|
342
342
|
(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));n<k&&(n=k);n>f&&(n=f);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var v=a.dataSeriesIndexes[f],x=this.data[v],s=x.dataPoints;if(0<s.length){var z=5<n&&x.bevelEnabled?
|
|
343
343
|
!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){l=a.axisX.convertValueToPixel(b);l=l-a.plotType.plotUnits.length*n/2+a.index*n<<0;var u=l+n<<0,m;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<s[k].y)y[b]=s[k].y+(y[b]?y[b]:0),0<y[b]&&(p=a.axisY.convertValueToPixel(y[b]),m="undefined"!==typeof h[b]?h[b]:q,h[b]=p);
|
|
344
|
-
else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)d[b]=s[k].y+(d[b]?d[b]:0),m=a.axisY.convertValueToPixel(d[b]),p="undefined"!==typeof r[b]?r[b]:q,r[b]=m;else if(p=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var
|
|
344
|
+
else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)d[b]=s[k].y+(d[b]?d[b]:0),m=a.axisY.convertValueToPixel(d[b]),p="undefined"!==typeof r[b]?r[b]:q,r[b]=m;else if(p=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var B="undefined"!==typeof h[b]?h[b]:0;p-=B;m=q-B;h[b]=B+(m-p)}else B=r[b]?r[b]:0,m=p+B,p=q+B,r[b]=B+(m-p);b=s[k].color?s[k].color:x._colorSet[k%x._colorSet.length];aa(c,l,a.axisY.reversed?m:p,u,a.axisY.reversed?p:m,b,0,null,z&&(a.axisY.reversed?0>s[k].y:0<=
|
|
345
345
|
s[k].y),(a.axisY.reversed?0<=s[k].y:0>s[k].y)&&z,!1,!1,x.fillOpacity);b=x.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:l,y1:p,x2:u,y2:m};b=X(b);w&&aa(this._eventManager.ghostCtx,l,p,u,m,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||x.indexLabel||s[k].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:s[k],dataSeries:x,point:{x:l+(u-l)/2,y:0<=s[k].y?p:m},direction:0>s[k].y===a.axisY.reversed?
|
|
346
346
|
1:-1,bounds:{x1:l,y1:Math.min(p,m),x2:u,y2:Math.max(p,m)},color:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
|
|
347
347
|
c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.yScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};m.prototype.renderStackedColumn100=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],r=[],y=[],d=[],k=0,l,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),
|
|
348
348
|
k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
|
|
349
349
|
k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));n<k&&(n=k);n>f&&(n=f);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var v=
|
|
350
350
|
a.dataSeriesIndexes[f],x=this.data[v],s=x.dataPoints;if(0<s.length)for(var m=5<n&&x.bevelEnabled?!0:!1,k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){l=a.axisX.convertValueToPixel(b);p=0!==a.dataPointYSums[b]?100*(s[k].y/a.dataPointYSums[b]):0;l=l-a.plotType.plotUnits.length*n/2+a.index*n<<0;var u=l+n<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
351
|
-
0<s[k].y){y[b]=p+("undefined"!==typeof y[b]?y[b]:0);if(0>=y[b])continue;p=a.axisY.convertValueToPixel(y[b]);t=h[b]?h[b]:q;h[b]=p}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)d[b]=p+("undefined"!==typeof d[b]?d[b]:0),t=a.axisY.convertValueToPixel(d[b]),p=r[b]?r[b]:q,r[b]=t;else if(p=a.axisY.convertValueToPixel(p),0<=s[k].y){var
|
|
352
|
-
typeof r[b]?r[b]:0,t=p+
|
|
351
|
+
0<s[k].y){y[b]=p+("undefined"!==typeof y[b]?y[b]:0);if(0>=y[b])continue;p=a.axisY.convertValueToPixel(y[b]);t=h[b]?h[b]:q;h[b]=p}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)d[b]=p+("undefined"!==typeof d[b]?d[b]:0),t=a.axisY.convertValueToPixel(d[b]),p=r[b]?r[b]:q,r[b]=t;else if(p=a.axisY.convertValueToPixel(p),0<=s[k].y){var B="undefined"!==typeof h[b]?h[b]:0;p-=B;t=q-B;a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.y1-p)&&(p=e.y1);h[b]=B+(t-p)}else B="undefined"!==
|
|
352
|
+
typeof r[b]?r[b]:0,t=p+B,p=q+B,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.y2-t)&&(t=e.y2),r[b]=B+(t-p);b=s[k].color?s[k].color:x._colorSet[k%x._colorSet.length];aa(c,l,a.axisY.reversed?t:p,u,a.axisY.reversed?p:t,b,0,null,m&&(a.axisY.reversed?0>s[k].y:0<=s[k].y),(a.axisY.reversed?0<=s[k].y:0>s[k].y)&&m,!1,!1,x.fillOpacity);b=x.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:l,y1:p,x2:u,y2:t};b=X(b);w&&aa(this._eventManager.ghostCtx,
|
|
353
353
|
l,p,u,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||x.indexLabel||s[k].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:s[k],dataSeries:x,point:{x:l+(u-l)/2,y:0<=s[k].y?p:t},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:l,y1:Math.min(p,t),x2:u,y2:Math.max(p,t)},color:b})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,
|
|
354
354
|
this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.yScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};m.prototype.renderBar=
|
|
355
355
|
function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,r,d,n,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<
|
|
@@ -362,54 +362,54 @@ this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plo
|
|
|
362
362
|
a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<
|
|
363
363
|
0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));m<k&&(m=k);m>f&&(m=f);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());
|
|
364
364
|
for(f=0;f<a.dataSeriesIndexes.length;f++){var v=a.dataSeriesIndexes[f],x=this.data[v],s=x.dataPoints;if(0<s.length){var z=5<m&&x.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){p=a.axisX.convertValueToPixel(b);p=p-a.plotType.plotUnits.length*m/2+a.index*m<<0;var u=p+m<<0,t;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
365
|
-
0<s[k].y)d[b]=s[k].y+(d[b]?d[b]:0),0<d[b]&&(t=h[b]?h[b]:q,h[b]=l=a.axisY.convertValueToPixel(d[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)n[b]=s[k].y+(n[b]?n[b]:0),l=r[b]?r[b]:q,r[b]=t=a.axisY.convertValueToPixel(n[b]);else if(l=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var
|
|
365
|
+
0<s[k].y)d[b]=s[k].y+(d[b]?d[b]:0),0<d[b]&&(t=h[b]?h[b]:q,h[b]=l=a.axisY.convertValueToPixel(d[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)n[b]=s[k].y+(n[b]?n[b]:0),l=r[b]?r[b]:q,r[b]=t=a.axisY.convertValueToPixel(n[b]);else if(l=a.axisY.convertValueToPixel(s[k].y),0<=s[k].y){var B=h[b]?h[b]:0;t=q+B;l+=B;h[b]=B+(l-t)}else B=r[b]?r[b]:0,t=l-B,l=q-B,r[b]=B+(l-t);b=s[k].color?s[k].color:x._colorSet[k%x._colorSet.length];aa(c,a.axisY.reversed?l:t,p,a.axisY.reversed?
|
|
366
366
|
t:l,u,b,0,null,z,!1,!1,!1,x.fillOpacity);b=x.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:t,y1:p,x2:l,y2:u};b=X(b);w&&aa(this._eventManager.ghostCtx,t,p,l,u,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||x.indexLabel||s[k].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:s[k],dataSeries:x,point:{x:0<=s[k].y?l:t,y:p+(u-p)/2},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(t,
|
|
367
367
|
l),y1:p,x2:Math.max(t,l),y2:u},color:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();
|
|
368
368
|
return{source:g,dest:this.plotArea.ctx,animationCallback:K.xScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};m.prototype.renderStackedBar100=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],r=[],d=[],n=[],k=0,l,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),k=this.options.dataPointMinWidth?
|
|
369
369
|
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&k>f&&(k=Math.min(this.options.dataPointWidth?
|
|
370
370
|
this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<k)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));m<k&&(m=k);m>f&&(m=f);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(f=0;f<a.dataSeriesIndexes.length;f++){var v=a.dataSeriesIndexes[f],
|
|
371
371
|
x=this.data[v],s=x.dataPoints;if(0<s.length){var z=5<m&&x.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<s.length;k++)if(b=s[k].x.getTime?s[k].x.getTime():s[k].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof s[k].y){p=a.axisX.convertValueToPixel(b);var u;u=0!==a.dataPointYSums[b]?100*(s[k].y/a.dataPointYSums[b]):0;p=p-a.plotType.plotUnits.length*m/2+a.index*m<<0;var t=p+m<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
372
|
-
0<s[k].y){d[b]=u+(d[b]?d[b]:0);if(0>=d[b])continue;u=h[b]?h[b]:q;h[b]=l=a.axisY.convertValueToPixel(d[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)n[b]=u+(n[b]?n[b]:0),l=r[b]?r[b]:q,r[b]=u=a.axisY.convertValueToPixel(n[b]);else if(l=a.axisY.convertValueToPixel(u),0<=s[k].y){var
|
|
373
|
-
u)&&(u=e.x1),r[b]=
|
|
372
|
+
0<s[k].y){d[b]=u+(d[b]?d[b]:0);if(0>=d[b])continue;u=h[b]?h[b]:q;h[b]=l=a.axisY.convertValueToPixel(d[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=s[k].y)n[b]=u+(n[b]?n[b]:0),l=r[b]?r[b]:q,r[b]=u=a.axisY.convertValueToPixel(n[b]);else if(l=a.axisY.convertValueToPixel(u),0<=s[k].y){var B=h[b]?h[b]:0;u=q+B;l+=B;a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.x2-l)&&(l=e.x2);h[b]=B+(l-u)}else B=r[b]?r[b]:0,u=l-B,l=q-B,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(e.x1-
|
|
373
|
+
u)&&(u=e.x1),r[b]=B+(l-u);b=s[k].color?s[k].color:x._colorSet[k%x._colorSet.length];aa(c,a.axisY.reversed?l:u,p,a.axisY.reversed?u:l,t,b,0,null,z,!1,!1,!1,x.fillOpacity);b=x.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:u,y1:p,x2:l,y2:t};b=X(b);w&&aa(this._eventManager.ghostCtx,u,p,l,t,b,0,null,!1,!1,!1,!1);(s[k].indexLabel||x.indexLabel||s[k].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",
|
|
374
374
|
dataPoint:s[k],dataSeries:x,point:{x:0<=s[k].y?l:u,y:p+(t-p)/2},direction:0>s[k].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(u,l),y1:p,x2:Math.max(u,l),y2:t},color:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
375
|
-
0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.xScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};m.prototype.renderArea=function(a){var g,c;function b(){
|
|
376
|
-
t=d.y1:0<a.axisY.viewportMinimum&&(t=u),h.lineTo(x,t),h.lineTo(
|
|
377
|
-
k.width,k.height);h.clip();w&&(r.beginPath(),r.rect(k.x1,k.y1,k.width,k.height),r.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],m=f.dataPoints,n=f.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:q};n=X(n);r.fillStyle=n;n=[];g=!0;var v=0,x,s,z,u=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),t,
|
|
378
|
-
A
|
|
379
|
-
g||ba?(!g&&f.connectNullData?(h.setLineDash&&(f.options.nullDataLineDashType||c===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(g=x,c=s,x=l.x,s=l.y,b(),h.moveTo(l.x,l.y),x=g,s=c,
|
|
380
|
-
m[v].lineColor||
|
|
375
|
+
0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.xScaleAnimation,easingFunction:K.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};m.prototype.renderArea=function(a){var g,c;function b(){B&&(0<f.lineThickness&&h.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?t=u:0>a.axisY.viewportMaximum?
|
|
376
|
+
t=d.y1:0<a.axisY.viewportMinimum&&(t=u),h.lineTo(x,t),h.lineTo(B.x,t),h.closePath(),h.globalAlpha=f.fillOpacity,h.fill(),h.globalAlpha=1,w&&(r.lineTo(x,t),r.lineTo(B.x,t),r.closePath(),r.fill()),h.beginPath(),h.moveTo(x,s),r.beginPath(),r.moveTo(x,s),B={x:x,y:s})}var e=a.targetCanvasCtx||this.plotArea.ctx,h=w?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var r=this._eventManager.ghostCtx,d=a.axisY.lineCoordinates,n=[],k=this.plotArea,l;h.save();w&&r.save();h.beginPath();h.rect(k.x1,k.y1,
|
|
377
|
+
k.width,k.height);h.clip();w&&(r.beginPath(),r.rect(k.x1,k.y1,k.width,k.height),r.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],m=f.dataPoints,n=f.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:q};n=X(n);r.fillStyle=n;n=[];g=!0;var v=0,x,s,z,u=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),t,B=null;if(0<m.length){var D=f._colorSet[v%f._colorSet.length],A=f.lineColor=f.options.lineColor||D,
|
|
378
|
+
C=A;h.fillStyle=D;h.strokeStyle=A;h.lineWidth=f.lineThickness;c="solid";if(h.setLineDash){var J=G(f.nullDataLineDashType,f.lineThickness);c=f.lineDashType;var U=G(c,f.lineThickness);h.setLineDash(U)}for(var ba=!0;v<m.length;v++)if(z=m[v].x.getTime?m[v].x.getTime():m[v].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!ba)))if("number"!==typeof m[v].y)f.connectNullData||(ba||g)||b(),ba=!0;else{x=a.axisX.convertValueToPixel(z);s=a.axisY.convertValueToPixel(m[v].y);
|
|
379
|
+
g||ba?(!g&&f.connectNullData?(h.setLineDash&&(f.options.nullDataLineDashType||c===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(g=x,c=s,x=l.x,s=l.y,b(),h.moveTo(l.x,l.y),x=g,s=c,B=l,c=f.nullDataLineDashType,h.setLineDash(J)),h.lineTo(x,s),w&&r.lineTo(x,s)):(h.beginPath(),h.moveTo(x,s),w&&(r.beginPath(),r.moveTo(x,s)),B={x:x,y:s}),ba=g=!1):(h.lineTo(x,s),w&&r.lineTo(x,s),0==v%250&&b());l={x:x,y:s};v<m.length-1&&(C!==(m[v].lineColor||A)||c!==(m[v].lineDashType||f.lineDashType))&&(b(),C=
|
|
380
|
+
m[v].lineColor||A,h.strokeStyle=C,h.setLineDash&&(m[v].lineDashType?(c=m[v].lineDashType,h.setLineDash(G(c,f.lineThickness))):(c=f.lineDashType,h.setLineDash(U))));var Z=f.dataPointIds[v];this._eventManager.objectMap[Z]={id:Z,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:v,x1:x,y1:s};0!==m[v].markerSize&&(0<m[v].markerSize||0<f.markerSize)&&(z=f.getMarkerProperties(v,x,s,h),n.push(z),Z=X(Z),w&&n.push({x:x,y:s,ctx:r,type:z.type,size:z.size,color:Z,borderColor:Z,borderThickness:z.borderThickness}));
|
|
381
381
|
(m[v].indexLabel||f.indexLabel||m[v].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:m[v],dataSeries:f,point:{x:x,y:s},direction:0>m[v].y===a.axisY.reversed?1:-1,color:D})}b();W.drawMarkers(n)}}w&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&h.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&h.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
|
|
382
382
|
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.clearRect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());h.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderSplineArea=function(a){function g(){var c=t(z,2);if(0<c.length){if(0<l.lineThickness){b.beginPath();b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);
|
|
383
383
|
c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var f=0;f<c.length-3;f+=3)if(b.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),w&&e.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),c[f+3].newStrokeStyle||c[f+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(c[f+3].x,c[f+3].y),c[f+3].newStrokeStyle&&(b.strokeStyle=c[f+3].newStrokeStyle),c[f+3].newLineDashArray&&b.setLineDash(c[f+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,
|
|
384
384
|
c[0].y);w&&(e.beginPath(),e.moveTo(c[0].x,c[0].y));for(f=0;f<c.length-3;f+=3)b.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),w&&e.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?x=v:0>a.axisY.viewportMaximum?x=h.y1:0<a.axisY.viewportMinimum&&(x=v);s={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,x);b.lineTo(s.x,x);b.closePath();b.globalAlpha=l.fillOpacity;b.fill();b.globalAlpha=1;
|
|
385
385
|
w&&(e.lineTo(c[c.length-1].x,x),e.lineTo(s.x,x),e.closePath(),e.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=a.axisY.lineCoordinates,r=[],d=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(e.beginPath(),e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var k=a.dataSeriesIndexes[n],l=this.data[k],p=l.dataPoints,
|
|
386
|
-
r=l.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:k};r=X(r);e.fillStyle=r;var r=[],q=0,f,m,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x,s=null,z=[];if(0<p.length){var u=l._colorSet[q%l._colorSet.length],
|
|
387
|
-
!1;q<p.length;q++)if(f=p[q].x.getTime?p[q].x.getTime():p[q].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!m)))if("number"!==typeof p[q].y)0<q&&!m&&(l.connectNullData?b.setLineDash&&(0<z.length&&(l.options.nullDataLineDashType||!p[q-1].lineDashType))&&(z[z.length-1].newLineDashArray=
|
|
388
|
-
{id:J,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:q,x1:f,y1:m};z[z.length]={x:f,y:m};q<p.length-1&&(
|
|
386
|
+
r=l.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:k};r=X(r);e.fillStyle=r;var r=[],q=0,f,m,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x,s=null,z=[];if(0<p.length){var u=l._colorSet[q%l._colorSet.length],A=l.lineColor=l.options.lineColor||u,B=A;b.fillStyle=u;b.strokeStyle=A;b.lineWidth=l.lineThickness;var D="solid";if(b.setLineDash){var C=G(l.nullDataLineDashType,l.lineThickness),D=l.lineDashType,db=G(D,l.lineThickness);b.setLineDash(db)}for(m=
|
|
387
|
+
!1;q<p.length;q++)if(f=p[q].x.getTime?p[q].x.getTime():p[q].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!m)))if("number"!==typeof p[q].y)0<q&&!m&&(l.connectNullData?b.setLineDash&&(0<z.length&&(l.options.nullDataLineDashType||!p[q-1].lineDashType))&&(z[z.length-1].newLineDashArray=C,D=l.nullDataLineDashType):(g(),z=[])),m=!0;else{f=a.axisX.convertValueToPixel(f);m=a.axisY.convertValueToPixel(p[q].y);var J=l.dataPointIds[q];this._eventManager.objectMap[J]=
|
|
388
|
+
{id:J,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:q,x1:f,y1:m};z[z.length]={x:f,y:m};q<p.length-1&&(B!==(p[q].lineColor||A)||D!==(p[q].lineDashType||l.lineDashType))&&(B=p[q].lineColor||A,z[z.length-1].newStrokeStyle=B,b.setLineDash&&(p[q].lineDashType?(D=p[q].lineDashType,z[z.length-1].newLineDashArray=G(D,l.lineThickness)):(D=l.lineDashType,z[z.length-1].newLineDashArray=db)));if(0!==p[q].markerSize&&(0<p[q].markerSize||0<l.markerSize)){var U=l.getMarkerProperties(q,f,m,b);r.push(U);
|
|
389
389
|
J=X(J);w&&r.push({x:f,y:m,ctx:e,type:U.type,size:U.size,color:J,borderColor:J,borderThickness:U.borderThickness})}(p[q].indexLabel||l.indexLabel||p[q].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[q],dataSeries:l,point:{x:f,y:m},direction:0>p[q].y===a.axisY.reversed?1:-1,color:u});m=!1}g();W.drawMarkers(r)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,
|
|
390
|
-
0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderStepArea=function(a){var g,c;function b(){
|
|
391
|
-
h.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?t=u:0>a.axisY.viewportMaximum?t=d.y1:0<a.axisY.viewportMinimum&&(t=u),h.lineTo(x,t),h.lineTo(
|
|
390
|
+
0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderStepArea=function(a){var g,c;function b(){B&&(0<f.lineThickness&&
|
|
391
|
+
h.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?t=u:0>a.axisY.viewportMaximum?t=d.y1:0<a.axisY.viewportMinimum&&(t=u),h.lineTo(x,t),h.lineTo(B.x,t),h.closePath(),h.globalAlpha=f.fillOpacity,h.fill(),h.globalAlpha=1,w&&(r.lineTo(x,t),r.lineTo(B.x,t),r.closePath(),r.fill()),h.beginPath(),h.moveTo(x,s),r.beginPath(),r.moveTo(x,s),B={x:x,y:s})}var e=a.targetCanvasCtx||this.plotArea.ctx,h=w?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var r=this._eventManager.ghostCtx,
|
|
392
392
|
d=a.axisY.lineCoordinates,n=[],k=this.plotArea,l;h.save();w&&r.save();h.beginPath();h.rect(k.x1,k.y1,k.width,k.height);h.clip();w&&(r.beginPath(),r.rect(k.x1,k.y1,k.width,k.height),r.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],f=this.data[q],m=f.dataPoints,n=f.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:q};n=X(n);r.fillStyle=n;n=[];g=!0;var v=0,x,s,z,u=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),
|
|
393
|
-
t,
|
|
394
|
-
(c||g)||b(),c=!0):(x=a.axisX.convertValueToPixel(z),s=a.axisY.convertValueToPixel(m[v].y),g||c?(!g&&f.connectNullData?(h.setLineDash&&(f.options.nullDataLineDashType||J===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(g=x,c=s,x=l.x,s=l.y,b(),h.moveTo(l.x,l.y),x=g,s=c,
|
|
395
|
-
Z),h.lineTo(x,s),w&&r.lineTo(x,s),0==v%250&&b()),l={x:x,y:s},v<m.length-1&&(
|
|
393
|
+
t,B=null;c=!1;if(0<m.length){var D=f._colorSet[v%f._colorSet.length],A=f.lineColor=f.options.lineColor||D,C=A;h.fillStyle=D;h.strokeStyle=A;h.lineWidth=f.lineThickness;var J="solid";if(h.setLineDash){var U=G(f.nullDataLineDashType,f.lineThickness),J=f.lineDashType,ba=G(J,f.lineThickness);h.setLineDash(ba)}for(;v<m.length;v++)if(z=m[v].x.getTime?m[v].x.getTime():m[v].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!c))){var Z=s;"number"!==typeof m[v].y?(f.connectNullData||
|
|
394
|
+
(c||g)||b(),c=!0):(x=a.axisX.convertValueToPixel(z),s=a.axisY.convertValueToPixel(m[v].y),g||c?(!g&&f.connectNullData?(h.setLineDash&&(f.options.nullDataLineDashType||J===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(g=x,c=s,x=l.x,s=l.y,b(),h.moveTo(l.x,l.y),x=g,s=c,B=l,J=f.nullDataLineDashType,h.setLineDash(U)),h.lineTo(x,Z),h.lineTo(x,s),w&&(r.lineTo(x,Z),r.lineTo(x,s))):(h.beginPath(),h.moveTo(x,s),w&&(r.beginPath(),r.moveTo(x,s)),B={x:x,y:s}),c=g=!1):(h.lineTo(x,Z),w&&r.lineTo(x,
|
|
395
|
+
Z),h.lineTo(x,s),w&&r.lineTo(x,s),0==v%250&&b()),l={x:x,y:s},v<m.length-1&&(C!==(m[v].lineColor||A)||J!==(m[v].lineDashType||f.lineDashType))&&(b(),C=m[v].lineColor||A,h.strokeStyle=C,h.setLineDash&&(m[v].lineDashType?(J=m[v].lineDashType,h.setLineDash(G(J,f.lineThickness))):(J=f.lineDashType,h.setLineDash(ba)))),z=f.dataPointIds[v],this._eventManager.objectMap[z]={id:z,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:v,x1:x,y1:s},0!==m[v].markerSize&&(0<m[v].markerSize||0<f.markerSize)&&(Z=
|
|
396
396
|
f.getMarkerProperties(v,x,s,h),n.push(Z),z=X(z),w&&n.push({x:x,y:s,ctx:r,type:Z.type,size:Z.size,color:z,borderColor:z,borderThickness:Z.borderThickness})),(m[v].indexLabel||f.indexLabel||m[v].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:m[v],dataSeries:f,point:{x:x,y:s},direction:0>m[v].y===a.axisY.reversed?1:-1,color:D}))}b();W.drawMarkers(n)}}w&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.globalCompositeOperation="source-atop",
|
|
397
397
|
a.axisX.maskCanvas&&h.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&h.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.clearRect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());h.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderStackedArea=
|
|
398
398
|
function(a){function g(){if(!(1>k.length)){for(0<D.lineThickness&&b.stroke();0<k.length;){var a=k.pop();b.lineTo(a.x,a.y);w&&x.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=D.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();w&&(x.closePath(),x.fill(),x.beginPath());k=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=null,r=[],d=this.plotArea,n=[],k=[],l=[],p=[],q=0,f,m,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:
|
|
399
|
-
0),x=this._eventManager.ghostCtx,s,z,u;w&&x.beginPath();b.save();w&&x.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(x.beginPath(),x.rect(d.x1,d.y1,d.width,d.height),x.clip());for(var e=[],t=0;t<a.dataSeriesIndexes.length;t++){var
|
|
400
|
-
D=this.data[
|
|
399
|
+
0),x=this._eventManager.ghostCtx,s,z,u;w&&x.beginPath();b.save();w&&x.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(x.beginPath(),x.rect(d.x1,d.y1,d.width,d.height),x.clip());for(var e=[],t=0;t<a.dataSeriesIndexes.length;t++){var B=a.dataSeriesIndexes[t],D=this.data[B],A=D.dataPoints;D.dataPointIndexes=[];for(q=0;q<A.length;q++)B=A[q].x.getTime?A[q].x.getTime():A[q].x,D.dataPointIndexes[B]=q,e[B]||(l.push(B),e[B]=!0);l.sort(Sa)}for(t=0;t<a.dataSeriesIndexes.length;t++){B=a.dataSeriesIndexes[t];
|
|
400
|
+
D=this.data[B];A=D.dataPoints;z=!0;k=[];q=D.id;this._eventManager.objectMap[q]={objectType:"dataSeries",dataSeriesIndex:B};q=X(q);x.fillStyle=q;if(0<l.length){var e=D._colorSet[0],C=D.lineColor=D.options.lineColor||e,J=C;b.fillStyle=e;b.strokeStyle=C;b.lineWidth=D.lineThickness;u="solid";if(b.setLineDash){var U=G(D.nullDataLineDashType,D.lineThickness);u=D.lineDashType;var ba=G(u,D.lineThickness);b.setLineDash(ba)}for(var Z=!0,q=0;q<l.length;q++){var h=l[q],ga=null,ga=0<=D.dataPointIndexes[h]?A[D.dataPointIndexes[h]]:
|
|
401
401
|
{x:h,y:null};if(!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax&&(!D.connectNullData||!Z)))if("number"!==typeof ga.y)D.connectNullData||(Z||z)||g(),Z=!0;else{f=a.axisX.convertValueToPixel(h);var oa=n[h]?n[h]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[h]=ga.y+(p[h]?p[h]:0);if(0>=p[h]&&a.axisY.logarithmic)continue;m=a.axisY.convertValueToPixel(p[h])}else m=a.axisY.convertValueToPixel(ga.y),m-=oa;k.push({x:f,y:v-oa});n[h]=v-m;z||Z?(!z&&
|
|
402
|
-
D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||u===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(z=k.pop(),u=k[k.length-1],g(),b.moveTo(s.x,s.y),k.push(u),k.push(z),u=D.nullDataLineDashType,b.setLineDash(U)),b.lineTo(f,m),w&&x.lineTo(f,m)):(b.beginPath(),b.moveTo(f,m),w&&(x.beginPath(),x.moveTo(f,m))),Z=z=!1):(b.lineTo(f,m),w&&x.lineTo(f,m),0==q%250&&(g(),b.moveTo(f,m),w&&x.moveTo(f,m),k.push({x:f,y:v-oa})));s={x:f,y:m};q<
|
|
403
|
-
(
|
|
402
|
+
D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||u===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(z=k.pop(),u=k[k.length-1],g(),b.moveTo(s.x,s.y),k.push(u),k.push(z),u=D.nullDataLineDashType,b.setLineDash(U)),b.lineTo(f,m),w&&x.lineTo(f,m)):(b.beginPath(),b.moveTo(f,m),w&&(x.beginPath(),x.moveTo(f,m))),Z=z=!1):(b.lineTo(f,m),w&&x.lineTo(f,m),0==q%250&&(g(),b.moveTo(f,m),w&&x.moveTo(f,m),k.push({x:f,y:v-oa})));s={x:f,y:m};q<A.length-1&&(J!==(A[q].lineColor||C)||u!==
|
|
403
|
+
(A[q].lineDashType||D.lineDashType))&&(g(),b.beginPath(),b.moveTo(f,m),k.push({x:f,y:v-oa}),J=A[q].lineColor||C,b.strokeStyle=J,b.setLineDash&&(A[q].lineDashType?(u=A[q].lineDashType,b.setLineDash(G(u,D.lineThickness))):(u=D.lineDashType,b.setLineDash(ba))));if(0<=D.dataPointIndexes[h]){var ka=D.dataPointIds[D.dataPointIndexes[h]];this._eventManager.objectMap[ka]={id:ka,objectType:"dataPoint",dataSeriesIndex:B,dataPointIndex:D.dataPointIndexes[h],x1:f,y1:m}}0<=D.dataPointIndexes[h]&&0!==ga.markerSize&&
|
|
404
404
|
(0<ga.markerSize||0<D.markerSize)&&(oa=D.getMarkerProperties(D.dataPointIndexes[h],f,m,b),r.push(oa),h=X(ka),w&&r.push({x:f,y:m,ctx:x,type:oa.type,size:oa.size,color:h,borderColor:h,borderThickness:oa.borderThickness}));(ga.indexLabel||D.indexLabel||ga.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:ga,dataSeries:D,point:{x:f,y:m},direction:0>ga.y===a.axisY.reversed?1:-1,color:e})}}g();b.moveTo(f,m);w&&x.moveTo(f,m)}delete D.dataPointIndexes}W.drawMarkers(r);
|
|
405
405
|
w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),x.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,
|
|
406
406
|
easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderStackedArea100=function(a){function g(){for(0<D.lineThickness&&b.stroke();0<k.length;){var a=k.pop();b.lineTo(a.x,a.y);w&&u.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=D.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();w&&(u.closePath(),u.fill(),u.beginPath());k=[]}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=null,r=this.plotArea,d=[],n=[],k=[],l=[],p=[],q=
|
|
407
|
-
0,f,m,v,x,s,z=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),u=this._eventManager.ghostCtx;b.save();w&&u.save();b.beginPath();b.rect(r.x1,r.y1,r.width,r.height);b.clip();w&&(u.beginPath(),u.rect(r.x1,r.y1,r.width,r.height),u.clip());for(var e=[],t=0;t<a.dataSeriesIndexes.length;t++){var
|
|
408
|
-
!0);l.sort(Sa)}for(t=0;t<a.dataSeriesIndexes.length;t++){
|
|
409
|
-
b.setLineDash(ba)}for(var Z=!0,q=0;q<l.length;q++){var h=l[q],ga=null,ga=0<=D.dataPointIndexes[h]?
|
|
407
|
+
0,f,m,v,x,s,z=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),u=this._eventManager.ghostCtx;b.save();w&&u.save();b.beginPath();b.rect(r.x1,r.y1,r.width,r.height);b.clip();w&&(u.beginPath(),u.rect(r.x1,r.y1,r.width,r.height),u.clip());for(var e=[],t=0;t<a.dataSeriesIndexes.length;t++){var B=a.dataSeriesIndexes[t],D=this.data[B],A=D.dataPoints;D.dataPointIndexes=[];for(q=0;q<A.length;q++)B=A[q].x.getTime?A[q].x.getTime():A[q].x,D.dataPointIndexes[B]=q,e[B]||(l.push(B),e[B]=
|
|
408
|
+
!0);l.sort(Sa)}for(t=0;t<a.dataSeriesIndexes.length;t++){B=a.dataSeriesIndexes[t];D=this.data[B];A=D.dataPoints;x=!0;e=D.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:B};e=X(e);u.fillStyle=e;k=[];if(0<l.length){var e=D._colorSet[q%D._colorSet.length],C=D.lineColor=D.options.lineColor||e,J=C;b.fillStyle=e;b.strokeStyle=C;b.lineWidth=D.lineThickness;s="solid";if(b.setLineDash){var U=G(D.nullDataLineDashType,D.lineThickness);s=D.lineDashType;var ba=G(s,D.lineThickness);
|
|
409
|
+
b.setLineDash(ba)}for(var Z=!0,q=0;q<l.length;q++){var h=l[q],ga=null,ga=0<=D.dataPointIndexes[h]?A[D.dataPointIndexes[h]]:{x:h,y:null};if(!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax&&(!D.connectNullData||!Z)))if("number"!==typeof ga.y)D.connectNullData||(Z||x)||g(),Z=!0;else{var oa;oa=0!==a.dataPointYSums[h]?100*(ga.y/a.dataPointYSums[h]):0;f=a.axisX.convertValueToPixel(h);var ka=n[h]?n[h]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[h]=
|
|
410
410
|
oa+(p[h]?p[h]:0);if(0>=p[h]&&a.axisY.logarithmic)continue;m=a.axisY.convertValueToPixel(p[h])}else m=a.axisY.convertValueToPixel(oa),m-=ka;k.push({x:f,y:z-ka});n[h]=z-m;x||Z?(!x&&D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||s===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(x=k.pop(),s=k[k.length-1],g(),b.moveTo(v.x,v.y),k.push(s),k.push(x),s=D.nullDataLineDashType,b.setLineDash(U)),b.lineTo(f,m),w&&u.lineTo(f,m)):(b.beginPath(),b.moveTo(f,m),w&&(u.beginPath(),u.moveTo(f,
|
|
411
|
-
m))),Z=x=!1):(b.lineTo(f,m),w&&u.lineTo(f,m),0==q%250&&(g(),b.moveTo(f,m),w&&u.moveTo(f,m),k.push({x:f,y:z-ka})));v={x:f,y:m};q<
|
|
412
|
-
this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:
|
|
411
|
+
m))),Z=x=!1):(b.lineTo(f,m),w&&u.lineTo(f,m),0==q%250&&(g(),b.moveTo(f,m),w&&u.moveTo(f,m),k.push({x:f,y:z-ka})));v={x:f,y:m};q<A.length-1&&(J!==(A[q].lineColor||C)||s!==(A[q].lineDashType||D.lineDashType))&&(g(),b.beginPath(),b.moveTo(f,m),k.push({x:f,y:z-ka}),J=A[q].lineColor||C,b.strokeStyle=J,b.setLineDash&&(A[q].lineDashType?(s=A[q].lineDashType,b.setLineDash(G(s,D.lineThickness))):(s=D.lineDashType,b.setLineDash(ba))));if(0<=D.dataPointIndexes[h]){var E=D.dataPointIds[D.dataPointIndexes[h]];
|
|
412
|
+
this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:B,dataPointIndex:D.dataPointIndexes[h],x1:f,y1:m}}0<=D.dataPointIndexes[h]&&0!==ga.markerSize&&(0<ga.markerSize||0<D.markerSize)&&(ka=D.getMarkerProperties(D.dataPointIndexes[h],f,m,b),d.push(ka),h=X(E),w&&d.push({x:f,y:m,ctx:u,type:ka.type,size:ka.size,color:h,borderColor:h,borderThickness:ka.borderThickness}));(ga.indexLabel||D.indexLabel||ga.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",
|
|
413
413
|
dataPoint:ga,dataSeries:D,point:{x:f,y:m},direction:0>ga.y===a.axisY.reversed?1:-1,color:e})}}g();b.moveTo(f,m);w&&u.moveTo(f,m)}delete D.dataPointIndexes}W.drawMarkers(d);w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
414
414
|
0,0,this.width,this.height),b.clearRect(r.x1,r.y1,r.width,r.height),u.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderBubble=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,h,r;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),
|
|
415
415
|
this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=-Infinity,n=Infinity,k=0;k<a.dataSeriesIndexes.length;k++)for(var l=a.dataSeriesIndexes[k],p=this.data[l],q=p.dataPoints,f=0,e=0;e<q.length;e++)h=q[e].getTime?h=q[e].x.getTime():h=q[e].x,h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax||"undefined"===typeof q[e].z||(f=q[e].z,f>d&&(d=f),f<n&&(n=f));for(var m=25*Math.PI,v=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,
|
|
@@ -424,20 +424,20 @@ this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0
|
|
|
424
424
|
null,h=null,r=this.plotArea,d=0,m,k,l,p,q,f,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,t=a.axisX.dataInfo.minDiff;isFinite(t)||(t=0.3*Math.abs(a.axisX.range));t=this.options.dataPointWidth?this.dataPointWidth:0.7*r.width*(a.axisX.logarithmic?Math.log(t)/Math.log(a.axisX.range):Math.abs(t)/Math.abs(a.axisX.range))<<0;
|
|
425
425
|
this.dataPointMaxWidth&&e>h&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<e)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));t<e&&(t=e);t>h&&(t=h);c.save();w&&b.save();c.beginPath();c.rect(r.x1,r.y1,r.width,r.height);c.clip();w&&(b.beginPath(),b.rect(r.x1,r.y1,r.width,r.height),b.clip());for(var v=0;v<a.dataSeriesIndexes.length;v++){var x=a.dataSeriesIndexes[v],s=this.data[x],z=s.dataPoints;
|
|
426
426
|
if(0<z.length)for(var u=5<t&&s.bevelEnabled?!0:!1,d=0;d<z.length;d++)if(z[d].getTime?f=z[d].x.getTime():f=z[d].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!n(z[d].y)&&z[d].y.length&&"number"===typeof z[d].y[0]&&"number"===typeof z[d].y[1]&&"number"===typeof z[d].y[2]&&"number"===typeof z[d].y[3]){m=a.axisX.convertValueToPixel(f);k=a.axisY.convertValueToPixel(z[d].y[0]);l=a.axisY.convertValueToPixel(z[d].y[1]);p=a.axisY.convertValueToPixel(z[d].y[2]);q=a.axisY.convertValueToPixel(z[d].y[3]);
|
|
427
|
-
var
|
|
428
|
-
|
|
429
|
-
c.stroke(),w&&(e=X(G),b.strokeStyle=e,b.moveTo(m-
|
|
427
|
+
var A=m-t/2<<0,B=A+t<<0,h=s.options.fallingColor?s.fallingColor:s._colorSet[0],e=z[d].color?z[d].color:s._colorSet[0],D=Math.round(Math.max(1,0.15*t)),C=0===D%2?0:0.5,G=s.dataPointIds[d];this._eventManager.objectMap[G]={id:G,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:d,x1:A,y1:k,x2:B,y2:l,x3:m,y3:p,x4:m,y4:q,borderThickness:D,color:e};c.strokeStyle=e;c.beginPath();c.lineWidth=D;b.lineWidth=Math.max(D,4);"candlestick"===s.type?(c.moveTo(m-C,l),c.lineTo(m-C,Math.min(k,q)),c.stroke(),c.moveTo(m-
|
|
428
|
+
C,Math.max(k,q)),c.lineTo(m-C,p),c.stroke(),aa(c,A,Math.min(k,q),B,Math.max(k,q),z[d].y[0]<=z[d].y[3]?s.risingColor:h,D,e,u,u,!1,!1,s.fillOpacity),w&&(e=X(G),b.strokeStyle=e,b.moveTo(m-C,l),b.lineTo(m-C,Math.min(k,q)),b.stroke(),b.moveTo(m-C,Math.max(k,q)),b.lineTo(m-C,p),b.stroke(),aa(b,A,Math.min(k,q),B,Math.max(k,q),e,0,null,!1,!1,!1,!1))):"ohlc"===s.type&&(c.moveTo(m-C,l),c.lineTo(m-C,p),c.stroke(),c.beginPath(),c.moveTo(m,k),c.lineTo(A,k),c.stroke(),c.beginPath(),c.moveTo(m,q),c.lineTo(B,q),
|
|
429
|
+
c.stroke(),w&&(e=X(G),b.strokeStyle=e,b.moveTo(m-C,l),b.lineTo(m-C,p),b.stroke(),b.beginPath(),b.moveTo(m,k),b.lineTo(A,k),b.stroke(),b.beginPath(),b.moveTo(m,q),b.lineTo(B,q),b.stroke()));(z[d].indexLabel||s.indexLabel||z[d].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:s.type,dataPoint:z[d],dataSeries:s,point:{x:A+(B-A)/2,y:a.axisY.reversed?p:l},direction:1,bounds:{x1:A,y1:Math.min(l,p),x2:B,y2:Math.max(l,p)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,0,
|
|
430
430
|
this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(r.x1,r.y1,r.width,r.height),b.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,
|
|
431
431
|
animationBase:0}}};m.prototype.renderBoxAndWhisker=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=this.plotArea,r=0,d,m,k,l,p,q,f,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,t=a.axisX.dataInfo.minDiff;isFinite(t)||
|
|
432
432
|
(t=0.3*Math.abs(a.axisX.range));t=this.options.dataPointWidth?this.dataPointWidth:0.7*h.width*(a.axisX.logarithmic?Math.log(t)/Math.log(a.axisX.range):Math.abs(t)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>r&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&r<e)&&(r=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));t<e&&(t=e);t>r&&(t=r);c.save();w&&b.save();c.beginPath();c.rect(h.x1,h.y1,h.width,
|
|
433
|
-
h.height);c.clip();w&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var v=!1,v=!!a.axisY.reversed,x=0;x<a.dataSeriesIndexes.length;x++){var s=a.dataSeriesIndexes[x],z=this.data[s],u=z.dataPoints;if(0<u.length)for(var
|
|
434
|
-
"number"===typeof u[r].y[3]&&"number"===typeof u[r].y[4]&&5===u[r].y.length){d=a.axisX.convertValueToPixel(f);m=a.axisY.convertValueToPixel(u[r].y[0]);k=a.axisY.convertValueToPixel(u[r].y[1]);l=a.axisY.convertValueToPixel(u[r].y[2]);p=a.axisY.convertValueToPixel(u[r].y[3]);q=a.axisY.convertValueToPixel(u[r].y[4]);var
|
|
435
|
-
u[r].color:z.whiskerColor?z.whiskerColor:e,U="number"===typeof u[r].whiskerThickness?u[r].whiskerThickness:"number"===typeof z.options.whiskerThickness?z.whiskerThickness:
|
|
436
|
-
z.stemColor:u[r].color:z.stemColor?z.stemColor:e,ka="number"===typeof u[r].stemThickness?u[r].stemThickness:"number"===typeof z.options.stemThickness?z.stemThickness:
|
|
437
|
-
z.lineDashType,M=1===Math.round(Q)%2?0.5:0,N=z.upperBoxColor,S=z.lowerBoxColor,ta=n(z.options.fillOpacity)?1:z.fillOpacity,R=z.dataPointIds[r];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:r,x1:
|
|
438
|
-
ka)),c.moveTo(d-E,k),c.lineTo(d-E,m),c.stroke(),c.moveTo(d-E,p),c.lineTo(d-E,l),c.stroke());c.restore();b.lineWidth=Math.max(
|
|
439
|
-
O,c.lineWidth=Q,c.moveTo(
|
|
440
|
-
l),e,0,null,!1,!1,!1,!1),0<U&&(b.beginPath(),b.lineWidth=U,b.moveTo(d+Z/2,p-ga),b.lineTo(d-Z/2,p-ga),b.stroke(),b.moveTo(d+Z/2,m+ga),b.lineTo(d-Z/2,m+ga),b.stroke()));(u[r].indexLabel||z.indexLabel||u[r].indexLabelFormatter||z.indexLabelFormatter)&&this._indexLabels.push({chartType:z.type,dataPoint:u[r],dataSeries:z,point:{x:
|
|
433
|
+
h.height);c.clip();w&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var v=!1,v=!!a.axisY.reversed,x=0;x<a.dataSeriesIndexes.length;x++){var s=a.dataSeriesIndexes[x],z=this.data[s],u=z.dataPoints;if(0<u.length)for(var A=5<t&&z.bevelEnabled?!0:!1,r=0;r<u.length;r++)if(u[r].getTime?f=u[r].x.getTime():f=u[r].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!n(u[r].y)&&u[r].y.length&&"number"===typeof u[r].y[0]&&"number"===typeof u[r].y[1]&&"number"===typeof u[r].y[2]&&
|
|
434
|
+
"number"===typeof u[r].y[3]&&"number"===typeof u[r].y[4]&&5===u[r].y.length){d=a.axisX.convertValueToPixel(f);m=a.axisY.convertValueToPixel(u[r].y[0]);k=a.axisY.convertValueToPixel(u[r].y[1]);l=a.axisY.convertValueToPixel(u[r].y[2]);p=a.axisY.convertValueToPixel(u[r].y[3]);q=a.axisY.convertValueToPixel(u[r].y[4]);var B=d-t/2<<0,D=d+t/2<<0,e=u[r].color?u[r].color:z._colorSet[0],C=Math.round(Math.max(1,0.15*t)),H=0===C%2?0:0.5,J=u[r].whiskerColor?u[r].whiskerColor:u[r].color?z.whiskerColor?z.whiskerColor:
|
|
435
|
+
u[r].color:z.whiskerColor?z.whiskerColor:e,U="number"===typeof u[r].whiskerThickness?u[r].whiskerThickness:"number"===typeof z.options.whiskerThickness?z.whiskerThickness:C,ba=u[r].whiskerDashType?u[r].whiskerDashType:z.whiskerDashType,Z=n(u[r].whiskerLength)?n(z.options.whiskerLength)?t:z.whiskerLength:u[r].whiskerLength,Z="number"===typeof Z?0>=Z?0:Z>=t?t:Z:"string"===typeof Z?parseInt(Z)*t/100>t?t:parseInt(Z)*t/100:t,ga=1===Math.round(U)%2?0.5:0,oa=u[r].stemColor?u[r].stemColor:u[r].color?z.stemColor?
|
|
436
|
+
z.stemColor:u[r].color:z.stemColor?z.stemColor:e,ka="number"===typeof u[r].stemThickness?u[r].stemThickness:"number"===typeof z.options.stemThickness?z.stemThickness:C,E=1===Math.round(ka)%2?0.5:0,L=u[r].stemDashType?u[r].stemDashType:z.stemDashType,O=u[r].lineColor?u[r].lineColor:u[r].color?z.lineColor?z.lineColor:u[r].color:z.lineColor?z.lineColor:e,Q="number"===typeof u[r].lineThickness?u[r].lineThickness:"number"===typeof z.options.lineThickness?z.lineThickness:C,P=u[r].lineDashType?u[r].lineDashType:
|
|
437
|
+
z.lineDashType,M=1===Math.round(Q)%2?0.5:0,N=z.upperBoxColor,S=z.lowerBoxColor,ta=n(z.options.fillOpacity)?1:z.fillOpacity,R=z.dataPointIds[r];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:r,x1:B,y1:m,x2:D,y2:k,x3:d,y3:l,x4:d,y4:p,y5:q,borderThickness:C,color:e,stemThickness:ka,stemColor:oa,whiskerThickness:U,whiskerLength:Z,whiskerColor:J,lineThickness:Q,lineColor:O};c.save();0<ka&&(c.beginPath(),c.strokeStyle=oa,c.lineWidth=ka,c.setLineDash&&c.setLineDash(G(L,
|
|
438
|
+
ka)),c.moveTo(d-E,k),c.lineTo(d-E,m),c.stroke(),c.moveTo(d-E,p),c.lineTo(d-E,l),c.stroke());c.restore();b.lineWidth=Math.max(C,4);c.beginPath();aa(c,B,Math.min(q,k),D,Math.max(k,q),S,0,e,v?A:!1,v?!1:A,!1,!1,ta);c.beginPath();aa(c,B,Math.min(l,q),D,Math.max(q,l),N,0,e,v?!1:A,v?A:!1,!1,!1,ta);c.beginPath();c.lineWidth=C;c.strokeStyle=e;c.rect(B-H,Math.min(k,l)-H,D-B+2*H,Math.max(k,l)-Math.min(k,l)+2*H);c.stroke();c.save();0<Q&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(G(P,Q)),c.strokeStyle=
|
|
439
|
+
O,c.lineWidth=Q,c.moveTo(B,q-M),c.lineTo(D,q-M),c.stroke());c.restore();c.save();0<U&&(c.beginPath(),c.setLineDash&&c.setLineDash(G(ba,U)),c.strokeStyle=J,c.lineWidth=U,c.moveTo(d-Z/2<<0,p-ga),c.lineTo(d+Z/2<<0,p-ga),c.stroke(),c.moveTo(d-Z/2<<0,m+ga),c.lineTo(d+Z/2<<0,m+ga),c.stroke());c.restore();w&&(e=X(R),b.strokeStyle=e,b.lineWidth=ka,0<ka&&(b.moveTo(d-H-E,k),b.lineTo(d-H-E,Math.max(m,p)),b.stroke(),b.moveTo(d-H-E,Math.min(m,p)),b.lineTo(d-H-E,l),b.stroke()),aa(b,B,Math.max(k,l),D,Math.min(k,
|
|
440
|
+
l),e,0,null,!1,!1,!1,!1),0<U&&(b.beginPath(),b.lineWidth=U,b.moveTo(d+Z/2,p-ga),b.lineTo(d-Z/2,p-ga),b.stroke(),b.moveTo(d+Z/2,m+ga),b.lineTo(d-Z/2,m+ga),b.stroke()));(u[r].indexLabel||z.indexLabel||u[r].indexLabelFormatter||z.indexLabelFormatter)&&this._indexLabels.push({chartType:z.type,dataPoint:u[r],dataSeries:z,point:{x:B+(D-B)/2,y:a.axisY.reversed?m:p},direction:1,bounds:{x1:B,y1:Math.min(m,p),x2:D,y2:Math.max(m,p)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),
|
|
441
441
|
c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),b.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};m.prototype.renderRangeColumn=
|
|
442
442
|
function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,r,d,m,h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;var k=a.axisX.dataInfo.minDiff;isFinite(k)||(k=0.3*Math.abs(a.axisX.range));k=this.options.dataPointWidth?this.dataPointWidth:
|
|
443
443
|
0.9*(e.width*(a.axisX.logarithmic?Math.log(k)/Math.log(a.axisX.range):Math.abs(k)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>r&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&r<h)&&(r=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));k<h&&(k=h);k>r&&(k=r);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),
|
|
@@ -447,14 +447,14 @@ x:v,r,a.axisX.reversed?v:x,d,b,0,b,t,t,!1,!1,q.fillOpacity);b=X(s);w&&aa(this._e
|
|
|
447
447
|
dataPoint:f[h],dataSeries:q,indexKeyword:1,point:{x:v+(x-v)/2,y:f[h].y[1]>=f[h].y[0]?r:d},direction:f[h].y[1]>=f[h].y[0]?1:-1,bounds:{x1:v,y1:Math.min(r,d),x2:x,y2:Math.max(r,d)},color:b})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
448
448
|
0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};m.prototype.renderError=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=!1,r=this.plotArea,
|
|
449
449
|
d=0,m,k,l,p,q,f,t,v=a.axisX.dataInfo.minDiff;isFinite(v)||(v=0.3*Math.abs(a.axisX.range));c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(r.x1,r.y1,r.width,r.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var x=0,s=0;s<this.data.length;s++)!this.data[s].type.match(/(bar|column)/ig)||!this.data[s].visible||this.data[s].type.match(/(stacked)/ig)&&x||x++;for(var z=0;z<
|
|
450
|
-
a.dataSeriesIndexes.length;z++){var u=a.dataSeriesIndexes[z],
|
|
450
|
+
a.dataSeriesIndexes.length;z++){var u=a.dataSeriesIndexes[z],C=this.data[u],B=C.dataPoints,D=n(C._linkedSeries)?!1:C._linkedSeries.type.match(/(bar|column)/ig)&&C._linkedSeries.visible?!0:!1,G=0;if(D)for(e=C._linkedSeries.id,s=0;s<e;s++)!this.data[s].type.match(/(bar|column)/ig)||!this.data[s].visible||this.data[s].type.match(/(stacked)/ig)&&G||(this.data[s].type.match(/(range)/ig)&&(h=!0),G++);e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
451
451
|
1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?x:1)))<<0:0.3*this.width;h&&(d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?x:1)))<<0:0.03*this.width);s=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?r.height:r.width)*(a.axisX.logarithmic?Math.log(v)/Math.log(a.axisX.range):
|
|
452
|
-
Math.abs(v)/Math.abs(a.axisX.range))/(D?x:1))<<0;this.dataPointMaxWidth&&e>d&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&d<e)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));s<e&&(s=e);s>d&&(s=d);if(0<
|
|
453
|
-
|
|
454
|
-
s;J.thickness="number"===typeof J.thickness?0>J.thickness?0:Math.round(J.thickness):2;var U={color:
|
|
455
|
-
!n(
|
|
456
|
-
(ba=l,l=p,p=ba);ba=
|
|
457
|
-
dataSeries:
|
|
452
|
+
Math.abs(v)/Math.abs(a.axisX.range))/(D?x:1))<<0;this.dataPointMaxWidth&&e>d&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&d<e)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));s<e&&(s=e);s>d&&(s=d);if(0<B.length)for(var H=C._colorSet,d=0;d<B.length;d++){var e=C.lineColor=C.options.color?C.options.color:H[0],J={color:B[d].whiskerColor?B[d].whiskerColor:B[d].color?C.whiskerColor?C.whiskerColor:B[d].color:
|
|
453
|
+
C.whiskerColor?C.whiskerColor:e,thickness:n(B[d].whiskerThickness)?C.whiskerThickness:B[d].whiskerThickness,dashType:B[d].whiskerDashType?B[d].whiskerDashType:C.whiskerDashType,length:n(B[d].whiskerLength)?n(C.options.whiskerLength)?s:C.options.whiskerLength:B[d].whiskerLength,trimLength:n(B[d].whiskerLength)?n(C.options.whiskerLength)?50:0:0};J.length="number"===typeof J.length?0>=J.length?0:J.length>=s?s:J.length:"string"===typeof J.length?parseInt(J.length)*s/100>s?s:parseInt(J.length)*s/100>s:
|
|
454
|
+
s;J.thickness="number"===typeof J.thickness?0>J.thickness?0:Math.round(J.thickness):2;var U={color:B[d].stemColor?B[d].stemColor:B[d].color?C.stemColor?C.stemColor:B[d].color:C.stemColor?C.stemColor:e,thickness:B[d].stemThickness?B[d].stemThickness:C.stemThickness,dashType:B[d].stemDashType?B[d].stemDashType:C.stemDashType};U.thickness="number"===typeof U.thickness?0>U.thickness?0:Math.round(U.thickness):2;B[d].getTime?t=B[d].x.getTime():t=B[d].x;if(!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax)&&
|
|
455
|
+
!n(B[d].y)&&B[d].y.length&&"number"===typeof B[d].y[0]&&"number"===typeof B[d].y[1]){var ba=a.axisX.convertValueToPixel(t);b?k=ba:m=ba;ba=a.axisY.convertValueToPixel(B[d].y[0]);b?l=ba:q=ba;ba=a.axisY.convertValueToPixel(B[d].y[1]);b?p=ba:f=ba;b?(q=a.axisX.reversed?k+(D?x:1)*s/2-(D?G-1:0)*s<<0:k-(D?x:1)*s/2+(D?G-1:0)*s<<0,f=a.axisX.reversed?q-s<<0:q+s<<0):(l=a.axisX.reversed?m+(D?x:1)*s/2-(D?G-1:0)*s<<0:m-(D?x:1)*s/2+(D?G-1:0)*s<<0,p=a.axisX.reversed?l-s<<0:l+s<<0);!b&&q>f&&(ba=q,q=f,f=ba);b&&l>p&&
|
|
456
|
+
(ba=l,l=p,p=ba);ba=C.dataPointIds[d];this._eventManager.objectMap[ba]={id:ba,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:d,x1:Math.min(l,p),y1:Math.min(q,f),x2:Math.max(p,l),y2:Math.max(f,q),isXYSwapped:b,stemProperties:U,whiskerProperties:J};A(c,Math.min(l,p),Math.min(q,f),Math.max(p,l),Math.max(f,q),e,J,U,b);w&&A(this._eventManager.ghostCtx,l,q,p,f,e,J,U,b);if(B[d].indexLabel||C.indexLabel||B[d].indexLabelFormatter||C.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:B[d],
|
|
457
|
+
dataSeries:C,indexKeyword:0,point:{x:b?B[d].y[1]>=B[d].y[0]?l:p:l+(p-l)/2,y:b?q+(f-q)/2:B[d].y[1]>=B[d].y[0]?f:q},direction:B[d].y[1]>=B[d].y[0]?-1:1,bounds:{x1:b?Math.min(l,p):l,y1:b?q:Math.min(q,f),x2:b?Math.max(l,p):p,y2:b?f:Math.max(q,f)},color:e,axisSwapped:b}),this._indexLabels.push({chartType:"error",dataPoint:B[d],dataSeries:C,indexKeyword:1,point:{x:b?B[d].y[1]>=B[d].y[0]?p:l:l+(p-l)/2,y:b?q+(f-q)/2:B[d].y[1]>=B[d].y[0]?q:f},direction:B[d].y[1]>=B[d].y[0]?1:-1,bounds:{x1:b?Math.min(l,p):
|
|
458
458
|
l,y1:b?q:Math.min(q,f),x2:b?Math.max(l,p):p,y2:b?f:Math.max(q,f)},color:e,axisSwapped:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(r.x1,r.y1,r.width,r.height),
|
|
459
459
|
this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};m.prototype.renderRangeBar=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,r,d,m,k,h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;r=this.options.dataPointMaxWidth?
|
|
460
460
|
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>r&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:
|
|
@@ -465,10 +465,10 @@ null,!1,!1,!1,!1);if(t[h].indexLabel||f.indexLabel||t[h].indexLabelFormatter||f.
|
|
|
465
465
|
-1,bounds:{x1:Math.min(r,d),y1:m,x2:Math.max(r,d),y2:x},color:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
|
|
466
466
|
c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,animationBase:0}}};m.prototype.renderRangeArea=function(a){function g(){if(z){for(var a=null,c=n.length-1;0<=c;c--)a=n[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=l.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<l.lineThickness){b.beginPath();b.moveTo(a.x,a.y2);for(c=0;c<n.length;c++)a=n[c],b.lineTo(a.x,a.y2);b.moveTo(n[0].x,n[0].y1);for(c=0;c<n.length;c++)a=
|
|
467
467
|
n[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(m,v);e.beginPath();e.moveTo(m,v);z={x:m,y:v};n=[];n.push({x:m,y1:v,y2:x})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=[],r=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(r.x1,r.y1,r.width,r.height);b.clip();w&&(e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var n=[],k=a.dataSeriesIndexes[d],
|
|
468
|
-
l=this.data[k],p=l.dataPoints,h=l.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:k};h=X(h);e.fillStyle=h;var h=[],q=!0,f=0,m,v,x,s,z=null;if(0<p.length){var u=l._colorSet[f%l._colorSet.length],t=l.lineColor=l.options.lineColor||u,
|
|
469
|
-
p[f].x.getTime():p[f].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!J)))if(null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){m=a.axisX.convertValueToPixel(s);v=a.axisY.convertValueToPixel(p[f].y[0]);x=a.axisY.convertValueToPixel(p[f].y[1]);q||J?(l.connectNullData&&!q?(b.setLineDash&&(l.options.nullDataLineDashType||D===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(n[n.length-1].newLineDashArray=
|
|
470
|
-
b.setLineDash(
|
|
471
|
-
1].newStrokeStyle=
|
|
468
|
+
l=this.data[k],p=l.dataPoints,h=l.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:k};h=X(h);e.fillStyle=h;var h=[],q=!0,f=0,m,v,x,s,z=null;if(0<p.length){var u=l._colorSet[f%l._colorSet.length],t=l.lineColor=l.options.lineColor||u,B=t;b.fillStyle=u;b.strokeStyle=t;b.lineWidth=l.lineThickness;var D="solid";if(b.setLineDash){var A=G(l.nullDataLineDashType,l.lineThickness),D=l.lineDashType,C=G(D,l.lineThickness);b.setLineDash(C)}for(var J=!0;f<p.length;f++)if(s=p[f].x.getTime?
|
|
469
|
+
p[f].x.getTime():p[f].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!J)))if(null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){m=a.axisX.convertValueToPixel(s);v=a.axisY.convertValueToPixel(p[f].y[0]);x=a.axisY.convertValueToPixel(p[f].y[1]);q||J?(l.connectNullData&&!q?(b.setLineDash&&(l.options.nullDataLineDashType||D===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(n[n.length-1].newLineDashArray=C,D=l.nullDataLineDashType,
|
|
470
|
+
b.setLineDash(A)),b.lineTo(m,v),w&&e.lineTo(m,v),n.push({x:m,y1:v,y2:x})):(b.beginPath(),b.moveTo(m,v),z={x:m,y:v},n=[],n.push({x:m,y1:v,y2:x}),w&&(e.beginPath(),e.moveTo(m,v))),J=q=!1):(b.lineTo(m,v),n.push({x:m,y1:v,y2:x}),w&&e.lineTo(m,v),0==f%250&&g());s=l.dataPointIds[f];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:f,x1:m,y1:v,y2:x};f<p.length-1&&(B!==(p[f].lineColor||t)||D!==(p[f].lineDashType||l.lineDashType))&&(g(),B=p[f].lineColor||t,n[n.length-
|
|
471
|
+
1].newStrokeStyle=B,b.strokeStyle=B,b.setLineDash&&(p[f].lineDashType?(D=p[f].lineDashType,n[n.length-1].newLineDashArray=G(D,l.lineThickness),b.setLineDash(n[n.length-1].newLineDashArray)):(D=l.lineDashType,n[n.length-1].newLineDashArray=C,b.setLineDash(C))));if(0!==p[f].markerSize&&(0<p[f].markerSize||0<l.markerSize)){var U=l.getMarkerProperties(f,m,x,b);h.push(U);var ba=X(s);w&&h.push({x:m,y:x,ctx:e,type:U.type,size:U.size,color:ba,borderColor:ba,borderThickness:U.borderThickness});U=l.getMarkerProperties(f,
|
|
472
472
|
m,v,b);h.push(U);ba=X(s);w&&h.push({x:m,y:v,ctx:e,type:U.type,size:U.size,color:ba,borderColor:ba,borderThickness:U.borderThickness})}if(p[f].indexLabel||l.indexLabel||p[f].indexLabelFormatter||l.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:l,indexKeyword:0,point:{x:m,y:v},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?-1:1,color:u}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:l,indexKeyword:1,point:{x:m,y:x},direction:p[f].y[0]>
|
|
473
473
|
p[f].y[1]===a.axisY.reversed?1:-1,color:u})}else J||q||g(),J=!0;g();W.drawMarkers(h)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.restore());
|
|
474
474
|
b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderRangeSplineArea=function(a){function g(a,c){var f=t(v,2);if(0<f.length){if(0<k.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(f[0].x,f[0].y);for(var g=0;g<f.length-3;g+=3){if(f[g].newStrokeStyle||f[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[g].x,f[g].y),f[g].newStrokeStyle&&(b.strokeStyle=f[g].newStrokeStyle),
|
|
@@ -476,79 +476,79 @@ f[g].newLineDashArray&&b.setLineDash(f[g].newLineDashArray);b.bezierCurveTo(f[g+
|
|
|
476
476
|
f[g-2].y,f[g-3].x,f[g-3].y),w&&e.bezierCurveTo(f[g-1].x,f[g-1].y,f[g-2].x,f[g-2].y,f[g-3].x,f[g-3].y);b.closePath();b.globalAlpha=k.fillOpacity;b.fill();w&&(e.closePath(),e.fill());b.globalAlpha=1;if(0<k.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(f[0].x,f[0].y);for(var h=g=0;g<f.length-3;g+=3,h++){if(v[h].newStrokeStyle||v[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[g].x,f[g].y),v[h].newStrokeStyle&&(b.strokeStyle=v[h].newStrokeStyle),v[h].newLineDashArray&&
|
|
477
477
|
b.setLineDash(v[h].newLineDashArray);b.bezierCurveTo(f[g+1].x,f[g+1].y,f[g+2].x,f[g+2].y,f[g+3].x,f[g+3].y)}f=t(v,2);b.moveTo(f[0].x,f[0].y);for(h=g=0;g<f.length-3;g+=3,h++){if(v[h].newStrokeStyle||v[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[g].x,f[g].y),v[h].newStrokeStyle&&(b.strokeStyle=v[h].newStrokeStyle),v[h].newLineDashArray&&b.setLineDash(v[h].newLineDashArray);b.bezierCurveTo(f[g+1].x,f[g+1].y,f[g+2].x,f[g+2].y,f[g+3].x,f[g+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||
|
|
478
478
|
this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=[],r=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(r.x1,r.y1,r.width,r.height);b.clip();w&&(e.beginPath(),e.rect(r.x1,r.y1,r.width,r.height),e.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var n=a.dataSeriesIndexes[d],k=this.data[n],l=k.dataPoints,h=k.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:n};h=X(h);e.fillStyle=h;var h=[],p=0,q,
|
|
479
|
-
f,m,v=[],x=[];if(0<l.length){var s=k._colorSet[p%k._colorSet.length],z=k.lineColor=k.options.lineColor||s,u=z;b.fillStyle=s;b.lineWidth=k.lineThickness;var
|
|
480
|
-
typeof l[p].y[1]){q=a.axisX.convertValueToPixel(q);f=a.axisY.convertValueToPixel(l[p].y[0]);m=a.axisY.convertValueToPixel(l[p].y[1]);var
|
|
481
|
-
v[v.length-1].newLineDashArray=G(
|
|
479
|
+
f,m,v=[],x=[];if(0<l.length){var s=k._colorSet[p%k._colorSet.length],z=k.lineColor=k.options.lineColor||s,u=z;b.fillStyle=s;b.lineWidth=k.lineThickness;var C="solid",B;if(b.setLineDash){var D=G(k.nullDataLineDashType,k.lineThickness),C=k.lineDashType;B=G(C,k.lineThickness)}for(f=!1;p<l.length;p++)if(q=l[p].x.getTime?l[p].x.getTime():l[p].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!k.connectNullData||!f)))if(null!==l[p].y&&l[p].y.length&&"number"===typeof l[p].y[0]&&"number"===
|
|
480
|
+
typeof l[p].y[1]){q=a.axisX.convertValueToPixel(q);f=a.axisY.convertValueToPixel(l[p].y[0]);m=a.axisY.convertValueToPixel(l[p].y[1]);var A=k.dataPointIds[p];this._eventManager.objectMap[A]={id:A,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:p,x1:q,y1:f,y2:m};v[v.length]={x:q,y:f};x[x.length]={x:q,y:m};p<l.length-1&&(u!==(l[p].lineColor||z)||C!==(l[p].lineDashType||k.lineDashType))&&(u=l[p].lineColor||z,v[v.length-1].newStrokeStyle=u,b.setLineDash&&(l[p].lineDashType?(C=l[p].lineDashType,
|
|
481
|
+
v[v.length-1].newLineDashArray=G(C,k.lineThickness)):(C=k.lineDashType,v[v.length-1].newLineDashArray=B)));if(0!==l[p].markerSize&&(0<l[p].markerSize||0<k.markerSize)){var H=k.getMarkerProperties(p,q,f,b);h.push(H);var J=X(A);w&&h.push({x:q,y:f,ctx:e,type:H.type,size:H.size,color:J,borderColor:J,borderThickness:H.borderThickness});H=k.getMarkerProperties(p,q,m,b);h.push(H);J=X(A);w&&h.push({x:q,y:m,ctx:e,type:H.type,size:H.size,color:J,borderColor:J,borderThickness:H.borderThickness})}if(l[p].indexLabel||
|
|
482
482
|
k.indexLabel||l[p].indexLabelFormatter||k.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:l[p],dataSeries:k,indexKeyword:0,point:{x:q,y:f},direction:l[p].y[0]<=l[p].y[1]?-1:1,color:s}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:l[p],dataSeries:k,indexKeyword:1,point:{x:q,y:m},direction:l[p].y[0]<=l[p].y[1]?1:-1,color:s});f=!1}else 0<p&&!f&&(k.connectNullData?b.setLineDash&&(0<v.length&&(k.options.nullDataLineDashType||!l[p-1].lineDashType))&&(v[v.length-
|
|
483
|
-
1].newLineDashArray=D,
|
|
483
|
+
1].newLineDashArray=D,C=k.nullDataLineDashType):(g(B,z),v=[],x=[])),f=!0;g(B,z);W.drawMarkers(h)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(r.x1,r.y1,r.width,r.height),
|
|
484
484
|
this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:K.xClipAnimation,easingFunction:K.easing.linear,animationBase:0}}};m.prototype.renderWaterfall=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,e=null,h=this.plotArea,r=0,d,n,k,l,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),r=this.options.dataPointMinWidth?this.dataPointMinWidth:
|
|
485
485
|
this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?this.dataPointWidth:0.6*(h.width*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&
|
|
486
486
|
r>n&&(r=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<r)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,r));q<r&&(q=r);q>n&&(q=n);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var m=
|
|
487
|
-
a.dataSeriesIndexes[f],v=this.data[m],x=v.dataPoints,e=v._colorSet[0];v.risingColor=v.options.risingColor?v.options.risingColor:e;v.fallingColor=v.options.fallingColor?v.options.fallingColor:"#e40a0a";var s="number"===typeof v.options.lineThickness?Math.round(v.lineThickness):1,z=1===Math.round(s)%2?-0.5:0;if(0<x.length)for(var u=5<q&&v.bevelEnabled?!0:!1,t=!1,
|
|
487
|
+
a.dataSeriesIndexes[f],v=this.data[m],x=v.dataPoints,e=v._colorSet[0];v.risingColor=v.options.risingColor?v.options.risingColor:e;v.fallingColor=v.options.fallingColor?v.options.fallingColor:"#e40a0a";var s="number"===typeof v.options.lineThickness?Math.round(v.lineThickness):1,z=1===Math.round(s)%2?-0.5:0;if(0<x.length)for(var u=5<q&&v.bevelEnabled?!0:!1,t=!1,B=null,D=null,r=0;r<x.length;r++)if(x[r].getTime?l=x[r].x.getTime():l=x[r].x,"number"!==typeof x[r].y){if(0<r&&!t&&v.connectNullData)var C=
|
|
488
488
|
v.options.nullDataLineDashType||!x[r-1].lineDashType?v.nullDataLineDashType:x[r-1].lineDashType;t=!0}else{d=a.axisX.convertValueToPixel(l);n=0===v.dataPointEOs[r].cumulativeSum?p:a.axisY.convertValueToPixel(v.dataPointEOs[r].cumulativeSum);k=0===v.dataPointEOs[r].cumulativeSumYStartValue?p:a.axisY.convertValueToPixel(v.dataPointEOs[r].cumulativeSumYStartValue);d=a.axisX.reversed?d+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+f)*q<<0:d-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+
|
|
489
|
-
f)*q<<0;var
|
|
490
|
-
|
|
491
|
-
"shortDash";c.strokeStyle=x[r].lineColor?x[r].lineColor:v.options.lineColor?v.options.lineColor:"#9e9e9e";c.lineWidth=s;c.setLineDash&&(J=G(J,s),c.setLineDash(J));(x[r].indexLabel||v.indexLabel||x[r].indexLabelFormatter||v.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:x[r],dataSeries:v,point:{x:d+(
|
|
489
|
+
f)*q<<0;var A=a.axisX.reversed?d-q<<0:d+q<<0;n>k&&(e=n,n=k,k=e);a.axisY.reversed&&(e=n,n=k,k=e);e=v.dataPointIds[r];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:r,x1:d,y1:n,x2:A,y2:k};var J=x[r].color?x[r].color:0<x[r].y?v.risingColor:v.fallingColor;aa(c,a.axisX.reversed?A:d,a.axisY.reversed?k:n,a.axisX.reversed?d:A,a.axisY.reversed?n:k,J,0,J,u,u,!1,!1,v.fillOpacity);e=X(e);w&&aa(this._eventManager.ghostCtx,a.axisX.reversed?A:d,n,a.axisX.reversed?d:
|
|
490
|
+
A,k,e,0,null,!1,!1,!1,!1);var U,J=d;U="undefined"!==typeof x[r].isIntermediateSum&&!0===x[r].isIntermediateSum||"undefined"!==typeof x[r].isCumulativeSum&&!0===x[r].isCumulativeSum?0<x[r].y?n:k:0<x[r].y?k:n;0<r&&B&&(!t||v.connectNullData)&&(t&&c.setLineDash&&c.setLineDash(G(C,s)),c.beginPath(),c.moveTo(B,D-z),c.lineTo(J,U-z),0<s&&c.stroke(),w&&(b.beginPath(),b.moveTo(B,D-z),b.lineTo(J,U-z),0<s&&b.stroke()));t=!1;B=A;D=0<x[r].y?n:k;J=x[r].lineDashType?x[r].lineDashType:v.options.lineDashType?v.options.lineDashType:
|
|
491
|
+
"shortDash";c.strokeStyle=x[r].lineColor?x[r].lineColor:v.options.lineColor?v.options.lineColor:"#9e9e9e";c.lineWidth=s;c.setLineDash&&(J=G(J,s),c.setLineDash(J));(x[r].indexLabel||v.indexLabel||x[r].indexLabelFormatter||v.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:x[r],dataSeries:v,point:{x:d+(A-d)/2,y:0<=x[r].y?n:k},direction:0>x[r].y===a.axisY.reversed?1:-1,bounds:{x1:d,y1:Math.min(n,k),x2:A,y2:Math.max(n,k)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,
|
|
492
492
|
0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:K.fadeInAnimation,easingFunction:K.easing.easeInQuad,
|
|
493
493
|
animationBase:0}}};var ia=function(a,g,c,b,e,h,r,d,n){if(!(0>c)){"undefined"===typeof d&&(d=1);if(!w){var k=Number((r%(2*Math.PI)).toFixed(8));Number((h%(2*Math.PI)).toFixed(8))===k&&(r-=1E-4)}a.save();a.globalAlpha=d;"pie"===e?(a.beginPath(),a.moveTo(g.x,g.y),a.arc(g.x,g.y,c,h,r,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(g.x,g.y,c,h,r,!1),0<=n&&a.arc(g.x,g.y,n*c,r,h,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=
|
|
494
494
|
2,a.fill());a.globalAlpha=1;a.restore()}};m.prototype.renderPie=function(a){function g(){if(k&&l){var a=0,b=0,c=0,e=0;n(k.options.indexLabelMaxWidth)&&(k.indexLabelMaxWidth=0.33*q.width);for(var g=0;g<l.length;g++){var h=l[g],r=k.dataPointIds[g];f[g].id=r;f[g].objectType="dataPoint";f[g].dataPointIndex=g;f[g].dataSeriesIndex=0;var d=f[g],p={percent:null,total:null},y=null,p=m.getPercentAndTotal(k,h);if(k.indexLabelFormatter||h.indexLabelFormatter)y={chart:m.options,dataSeries:k,dataPoint:h,total:p.total,
|
|
495
|
-
percent:p.percent};p=h.indexLabelFormatter?h.indexLabelFormatter(y):h.indexLabel?m.replaceKeywordsWithValue(h.indexLabel,h,k,g):k.indexLabelFormatter?k.indexLabelFormatter(y):k.indexLabel?m.replaceKeywordsWithValue(k.indexLabel,h,k,g):h.label?h.label:"";m._eventManager.objectMap[r]=d;d.center={x:u.x,y:u.y};d.y=h.y;d.radius=
|
|
495
|
+
percent:p.percent};p=h.indexLabelFormatter?h.indexLabelFormatter(y):h.indexLabel?m.replaceKeywordsWithValue(h.indexLabel,h,k,g):k.indexLabelFormatter?k.indexLabelFormatter(y):k.indexLabel?m.replaceKeywordsWithValue(k.indexLabel,h,k,g):h.label?h.label:"";m._eventManager.objectMap[r]=d;d.center={x:u.x,y:u.y};d.y=h.y;d.radius=A;d.percentInnerRadius=H;d.indexLabelText=p;d.indexLabelPlacement=k.indexLabelPlacement;d.indexLabelLineColor=h.indexLabelLineColor?h.indexLabelLineColor:k.options.indexLabelLineColor?
|
|
496
496
|
k.options.indexLabelLineColor:h.color?h.color:k._colorSet[g%k._colorSet.length];d.indexLabelLineThickness=n(h.indexLabelLineThickness)?k.indexLabelLineThickness:h.indexLabelLineThickness;d.indexLabelLineDashType=h.indexLabelLineDashType?h.indexLabelLineDashType:k.indexLabelLineDashType;d.indexLabelFontColor=h.indexLabelFontColor?h.indexLabelFontColor:k.indexLabelFontColor;d.indexLabelFontStyle=h.indexLabelFontStyle?h.indexLabelFontStyle:k.indexLabelFontStyle;d.indexLabelFontWeight=h.indexLabelFontWeight?
|
|
497
497
|
h.indexLabelFontWeight:k.indexLabelFontWeight;d.indexLabelFontSize=n(h.indexLabelFontSize)?k.indexLabelFontSize:h.indexLabelFontSize;d.indexLabelFontFamily=h.indexLabelFontFamily?h.indexLabelFontFamily:k.indexLabelFontFamily;d.indexLabelBackgroundColor=h.indexLabelBackgroundColor?h.indexLabelBackgroundColor:k.options.indexLabelBackgroundColor?k.options.indexLabelBackgroundColor:k.indexLabelBackgroundColor;d.indexLabelMaxWidth=h.indexLabelMaxWidth?h.indexLabelMaxWidth:k.indexLabelMaxWidth;d.indexLabelWrap=
|
|
498
498
|
"undefined"!==typeof h.indexLabelWrap?h.indexLabelWrap:k.indexLabelWrap;d.indexLabelTextAlign=h.indexLabelTextAlign?h.indexLabelTextAlign:k.indexLabelTextAlign?k.indexLabelTextAlign:"left";d.startAngle=0===g?k.startAngle?k.startAngle/180*Math.PI:0:f[g-1].endAngle;d.startAngle=(d.startAngle+2*Math.PI)%(2*Math.PI);d.endAngle=d.startAngle+2*Math.PI/t*Math.abs(h.y);h=(d.endAngle+d.startAngle)/2;h=(h+2*Math.PI)%(2*Math.PI);d.midAngle=h;if(d.midAngle>Math.PI/2-s&&d.midAngle<Math.PI/2+s){if(0===a||f[c].midAngle>
|
|
499
499
|
d.midAngle)c=g;a++}else if(d.midAngle>3*Math.PI/2-s&&d.midAngle<3*Math.PI/2+s){if(0===b||f[e].midAngle>d.midAngle)e=g;b++}d.hemisphere=h>Math.PI/2&&h<=3*Math.PI/2?"left":"right";d.indexLabelTextBlock=new ja(m.plotArea.ctx,{fontSize:d.indexLabelFontSize,fontFamily:d.indexLabelFontFamily,fontColor:d.indexLabelFontColor,fontStyle:d.indexLabelFontStyle,fontWeight:d.indexLabelFontWeight,textAlign:d.indexLabelTextAlign,backgroundColor:d.indexLabelBackgroundColor,maxWidth:d.indexLabelMaxWidth,maxHeight:d.indexLabelWrap?
|
|
500
500
|
5*d.indexLabelFontSize:1.5*d.indexLabelFontSize,text:d.indexLabelText,padding:0,textBaseline:"middle"});d.indexLabelTextBlock.measureText()}r=h=0;p=!1;for(g=0;g<l.length;g++)d=f[(c+g)%l.length],1<a&&(d.midAngle>Math.PI/2-s&&d.midAngle<Math.PI/2+s)&&(h<=a/2&&!p?(d.hemisphere="right",h++):(d.hemisphere="left",p=!0));p=!1;for(g=0;g<l.length;g++)d=f[(e+g)%l.length],1<b&&(d.midAngle>3*Math.PI/2-s&&d.midAngle<3*Math.PI/2+s)&&(r<=b/2&&!p?(d.hemisphere="left",r++):(d.hemisphere="right",p=!0))}}function c(a,
|
|
501
|
-
b){var c=m.plotArea.ctx;c.clearRect(q.x1,q.y1,q.width,q.height);c.fillStyle=m.backgroundColor;c.fillRect(q.x1,q.y1,q.width,q.height);for(c=0;c<l.length;c++){var g=f[c].startAngle,e=f[c].endAngle;if(e>g){var h=0.07*
|
|
501
|
+
b){var c=m.plotArea.ctx;c.clearRect(q.x1,q.y1,q.width,q.height);c.fillStyle=m.backgroundColor;c.fillRect(q.x1,q.y1,q.width,q.height);for(c=0;c<l.length;c++){var g=f[c].startAngle,e=f[c].endAngle;if(e>g){var h=0.07*A*Math.cos(f[c].midAngle),d=0.07*A*Math.sin(f[c].midAngle),r=!1;if(l[c].exploded){if(1E-9<Math.abs(f[c].center.x-(u.x+h))||1E-9<Math.abs(f[c].center.y-(u.y+d)))f[c].center.x=u.x+h*a,f[c].center.y=u.y+d*a,r=!0}else if(0<Math.abs(f[c].center.x-u.x)||0<Math.abs(f[c].center.y-u.y))f[c].center.x=
|
|
502
502
|
u.x+h*(1-a),f[c].center.y=u.y+d*(1-a),r=!0;r&&b&&(h={},h.dataSeries=k,h.dataPoint=k.dataPoints[c],h.index=c,m.toolTip.highlightObjects([h]));ia(m.plotArea.ctx,f[c].center,f[c].radius,l[c].color?l[c].color:k._colorSet[c%k._colorSet.length],k.type,g,e,k.fillOpacity,f[c].percentInnerRadius)}}c=m.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(g=g=0;g<l.length;g++)e=f[g],e.indexLabelText&&(e.indexLabelTextBlock.y-=e.indexLabelTextBlock.height/
|
|
503
|
-
2-e.indexLabelTextBlock.fontSize/2,h=0,h="left"===e.hemisphere?"inside"!==k.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==k.indexLabelPlacement?p:-e.indexLabelTextBlock.width/2,e.indexLabelTextBlock.x+=h,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=h,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock.fontSize/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(h=e.center.x+
|
|
504
|
-
d=e.center.y+
|
|
505
|
-
a.indexLabelTextBlock.height/2,
|
|
503
|
+
2-e.indexLabelTextBlock.fontSize/2,h=0,h="left"===e.hemisphere?"inside"!==k.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==k.indexLabelPlacement?p:-e.indexLabelTextBlock.width/2,e.indexLabelTextBlock.x+=h,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=h,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock.fontSize/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(h=e.center.x+A*Math.cos(e.midAngle),
|
|
504
|
+
d=e.center.y+A*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(G(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(h,d),c.lineTo(e.indexLabelTextBlock.x,e.indexLabelTextBlock.y),c.lineTo(e.indexLabelTextBlock.x+("left"===e.hemisphere?-p:p),e.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,f=a.indexLabelTextBlock.y+
|
|
505
|
+
a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,g=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-f:c-g}function e(a){for(var c=null,e=1;e<l.length;e++)if(c=(a+e+f.length)%f.length,f[c].hemisphere!==f[a].hemisphere){c=null;break}else if(f[c].indexLabelText&&c!==a&&(0>b(f[c],f[a])||("right"===f[a].hemisphere?f[c].indexLabelTextBlock.y>=f[a].indexLabelTextBlock.y:f[c].indexLabelTextBlock.y<=f[a].indexLabelTextBlock.y)))break;
|
|
506
506
|
else c=null;return c}function h(a,c,g){g=(g||0)+1;if(1E3<g)return 0;c=c||0;var d=0,r=u.y-1*v,k=u.y+1*v;if(0<=a&&a<l.length){var p=f[a];if(0>c&&p.indexLabelTextBlock.y<r||0<c&&p.indexLabelTextBlock.y>k)return 0;var q=0,n=0,n=q=q=0;0>c?p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2>r&&p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c<r&&(c=-(r-(p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c))):p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2<r&&p.indexLabelTextBlock.y+
|
|
507
|
-
p.indexLabelTextBlock.height/2+c>k&&(c=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c-k);c=p.indexLabelTextBlock.y+c;r=0;r="right"===p.hemisphere?u.x+Math.sqrt(Math.pow(v,2)-Math.pow(c-u.y,2)):u.x-Math.sqrt(Math.pow(v,2)-Math.pow(c-u.y,2));n=u.x+
|
|
507
|
+
p.indexLabelTextBlock.height/2+c>k&&(c=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c-k);c=p.indexLabelTextBlock.y+c;r=0;r="right"===p.hemisphere?u.x+Math.sqrt(Math.pow(v,2)-Math.pow(c-u.y,2)):u.x-Math.sqrt(Math.pow(v,2)-Math.pow(c-u.y,2));n=u.x+A*Math.cos(p.midAngle);q=u.y+A*Math.sin(p.midAngle);q=Math.sqrt(Math.pow(r-n,2)+Math.pow(c-q,2));n=Math.acos(A/v);q=Math.acos((v*v+A*A-q*q)/(2*A*v));c=q<n?c-p.indexLabelTextBlock.y:0;r=null;for(k=1;k<l.length;k++)if(r=(a-k+f.length)%f.length,f[r].hemisphere!==
|
|
508
508
|
f[a].hemisphere){r=null;break}else if(f[r].indexLabelText&&f[r].hemisphere===f[a].hemisphere&&r!==a&&(0>b(f[r],f[a])||("right"===f[a].hemisphere?f[r].indexLabelTextBlock.y<=f[a].indexLabelTextBlock.y:f[r].indexLabelTextBlock.y>=f[a].indexLabelTextBlock.y)))break;else r=null;n=r;q=e(a);k=r=0;0>c?(k="right"===p.hemisphere?n:q,d=c,null!==k&&(n=-c,c=p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2-(f[k].indexLabelTextBlock.y+f[k].indexLabelTextBlock.height/2),c-n<w&&(r=-n,k=h(k,r,g+1),+k.toFixed(z)>
|
|
509
509
|
+r.toFixed(z)&&(d=c>w?-(c-w):-(n-(k-r)))))):0<c&&(k="right"===p.hemisphere?q:n,d=c,null!==k&&(n=c,c=f[k].indexLabelTextBlock.y-f[k].indexLabelTextBlock.height/2-(p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2),c-n<w&&(r=n,k=h(k,r,g+1),+k.toFixed(z)<+r.toFixed(z)&&(d=c>w?c-w:n-(r-k)))));d&&(g=p.indexLabelTextBlock.y+d,c=0,c="right"===p.hemisphere?u.x+Math.sqrt(Math.pow(v,2)-Math.pow(g-u.y,2)):u.x-Math.sqrt(Math.pow(v,2)-Math.pow(g-u.y,2)),p.midAngle>Math.PI/2-s&&p.midAngle<Math.PI/2+s?(r=(a-
|
|
510
510
|
1+f.length)%f.length,r=f[r],a=f[(a+1+f.length)%f.length],"left"===p.hemisphere&&"right"===r.hemisphere&&c>r.indexLabelTextBlock.x?c=r.indexLabelTextBlock.x-15:"right"===p.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x+15)):p.midAngle>3*Math.PI/2-s&&p.midAngle<3*Math.PI/2+s&&(r=(a-1+f.length)%f.length,r=f[r],a=f[(a+1+f.length)%f.length],"right"===p.hemisphere&&"left"===r.hemisphere&&c<r.indexLabelTextBlock.x?c=r.indexLabelTextBlock.x+15:"left"===p.hemisphere&&
|
|
511
|
-
("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),p.indexLabelTextBlock.y=g,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-u.y,p.indexLabelTextBlock.x-u.x))}return d}function r(){var a=m.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,g=0,d=!0,c=0;10>c&&(1>c||0<g);c++){if(k.radius||!k.radius&&"undefined"!==typeof k.innerRadius&&null!==k.innerRadius&&
|
|
512
|
-
g);g=0;if("inside"!==k.indexLabelPlacement){v=
|
|
513
|
-
var
|
|
511
|
+
("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),p.indexLabelTextBlock.y=g,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-u.y,p.indexLabelTextBlock.x-u.x))}return d}function r(){var a=m.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,g=0,d=!0,c=0;10>c&&(1>c||0<g);c++){if(k.radius||!k.radius&&"undefined"!==typeof k.innerRadius&&null!==k.innerRadius&&A-g<=C)d=!1;d&&(A-=
|
|
512
|
+
g);g=0;if("inside"!==k.indexLabelPlacement){v=A*x;for(a=0;a<l.length;a++){var r=f[a];r.indexLabelTextBlock.x=u.x+v*Math.cos(r.midAngle);r.indexLabelTextBlock.y=u.y+v*Math.sin(r.midAngle);r.indexLabelAngle=r.midAngle;r.radius=A;r.percentInnerRadius=H}for(var n,s,a=0;a<l.length;a++){var r=f[a],y=e(a);if(null!==y){n=f[a];s=f[y];var t=0,t=b(n,s)-w;if(0>t){for(var B=s=0,G=0;G<l.length;G++)G!==a&&f[G].hemisphere===r.hemisphere&&(f[G].indexLabelTextBlock.y<r.indexLabelTextBlock.y?s++:B++);s=t/(s+B||1)*B;
|
|
513
|
+
var B=-1*(t-s),K=G=0;"right"===r.hemisphere?(G=h(a,s),B=-1*(t-G),K=h(y,B),+K.toFixed(z)<+B.toFixed(z)&&+G.toFixed(z)<=+s.toFixed(z)&&h(a,-(B-K))):(G=h(y,s),B=-1*(t-G),K=h(a,B),+K.toFixed(z)<+B.toFixed(z)&&+G.toFixed(z)<=+s.toFixed(z)&&h(y,-(B-K)))}}}}else for(a=0;a<l.length;a++)r=f[a],v="pie"===k.type?0.7*A:0.85*A,y=u.x+v*Math.cos(r.midAngle),s=u.y+v*Math.sin(r.midAngle),r.indexLabelTextBlock.x=y,r.indexLabelTextBlock.y=s;for(a=0;a<l.length;a++)if(r=f[a],y=r.indexLabelTextBlock.measureText(),0!==
|
|
514
514
|
y.height&&0!==y.width)y=y=0,"right"===r.hemisphere?(y=q.x2-(r.indexLabelTextBlock.x+r.indexLabelTextBlock.width+p),y*=-1):y=q.x1-(r.indexLabelTextBlock.x-r.indexLabelTextBlock.width-p),0<y&&(!d&&r.indexLabelText&&(s="right"===r.hemisphere?q.x2-r.indexLabelTextBlock.x:r.indexLabelTextBlock.x-q.x1,0.3*r.indexLabelTextBlock.maxWidth>s?r.indexLabelText="":r.indexLabelTextBlock.maxWidth=0.85*s,0.3*r.indexLabelTextBlock.maxWidth<s&&(r.indexLabelTextBlock.x-="right"===r.hemisphere?2:-2)),Math.abs(r.indexLabelTextBlock.y-
|
|
515
|
-
r.indexLabelTextBlock.height/2-u.y)<
|
|
516
|
-
u.x)<
|
|
515
|
+
r.indexLabelTextBlock.height/2-u.y)<A||Math.abs(r.indexLabelTextBlock.y+r.indexLabelTextBlock.height/2-u.y)<A)&&(y/=Math.abs(Math.cos(r.indexLabelAngle)),9<y&&(y*=0.3),y>g&&(g=y)),y=y=0,0<r.indexLabelAngle&&r.indexLabelAngle<Math.PI?(y=q.y2-(r.indexLabelTextBlock.y+r.indexLabelTextBlock.height/2+5),y*=-1):y=q.y1-(r.indexLabelTextBlock.y-r.indexLabelTextBlock.height/2-5),0<y&&(!d&&r.indexLabelText&&(s=0<r.indexLabelAngle&&r.indexLabelAngle<Math.PI?-1:1,0===h(a,y*s)&&h(a,2*s)),Math.abs(r.indexLabelTextBlock.x-
|
|
516
|
+
u.x)<A&&(y/=Math.abs(Math.sin(r.indexLabelAngle)),9<y&&(y*=0.3),y>g&&(g=y)));var M=function(a,b,c){for(var e=[],g=0;e.push(f[b]),b!==c;b=(b+1+l.length)%l.length);e.sort(function(a,b){return a.y-b.y});for(b=0;b<e.length;b++)if(c=e[b],g<0.7*a)g+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,g=0,h=!1,r=0;r<l.length;r++)if(h=!1,n=f[r],n.indexLabelText){var d=e(r);if(null!==d){var k=f[d];t=0;
|
|
517
517
|
t=b(n,k);var q;if(q=0>t){q=n.indexLabelTextBlock.x;var m=n.indexLabelTextBlock.y-n.indexLabelTextBlock.height/2,s=n.indexLabelTextBlock.y+n.indexLabelTextBlock.height/2,y=k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2,u=k.indexLabelTextBlock.x+k.indexLabelTextBlock.width,v=k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2;q=n.indexLabelTextBlock.x+n.indexLabelTextBlock.width<k.indexLabelTextBlock.x-p||q>u+p||m>v+p||s<y-p?!1:!0}q?(0>a&&(a=r),d!==a&&(c=d,g+=-t),0===r%Math.max(l.length/
|
|
518
518
|
10,3)&&(h=!0)):h=!0;h&&(0<g&&0<=a&&0<=c)&&(M(g,a,c),c=a=-1,g=0)}}0<g&&M(g,a,c)})()}}function d(){m.plotArea.layoutManager.reset();m.title&&(m.title.dockInsidePlotArea||"center"===m.title.horizontalAlign&&"center"===m.title.verticalAlign)&&m.title.render();if(m.subtitles)for(var a=0;a<m.subtitles.length;a++){var b=m.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}m.legend&&(m.legend.dockInsidePlotArea||"center"===m.legend.horizontalAlign&&"center"===
|
|
519
|
-
m.legend.verticalAlign)&&(m.legend.setLayout(),m.legend.render())}var m=this;if(!(0>=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],l=k.dataPoints,p=10,q=this.plotArea,f=k.dataPointEOs,w=2,v,x=1.3,s=20/180*Math.PI,z=6,u={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},t=0;a=!1;for(var
|
|
520
|
-
0<l[
|
|
519
|
+
m.legend.verticalAlign)&&(m.legend.setLayout(),m.legend.render())}var m=this;if(!(0>=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],l=k.dataPoints,p=10,q=this.plotArea,f=k.dataPointEOs,w=2,v,x=1.3,s=20/180*Math.PI,z=6,u={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},t=0;a=!1;for(var B=0;B<l.length;B++)t+=Math.abs(l[B].y),!a&&("undefined"!==typeof l[B].indexLabel&&null!==l[B].indexLabel&&0<l[B].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof l[B].label&&null!==l[B].label&&
|
|
520
|
+
0<l[B].label.toString().length)&&(a=!0);if(0!==t){a=a||"undefined"!==typeof k.indexLabel&&null!==k.indexLabel&&0<k.indexLabel.toString().length;var A="inside"!==k.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;k.radius&&(A=Ua(k.radius,A));var C="undefined"!==typeof k.innerRadius&&null!==k.innerRadius?Ua(k.innerRadius,A):0.7*A;k.radius=A;"doughnut"===k.type&&(k.innerRadius=C);var H=Math.min(C/A,(A-1)/A);this.pieDoughnutClickHandler=function(a){m.isAnimating||
|
|
521
521
|
!n(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&m._animator.animate(0,500,function(a){c(a,!0);d();m.dispatchEvent("dataAnimationIterationEnd",{chart:m});m.dispatchEvent("dataAnimationEnd",{chart:m})}))};g();r();r();r();r();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=m.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=m.backgroundColor;b.fillRect(q.x1,
|
|
522
522
|
q.y1,q.width,q.height);for(var b=f[0].startAngle+2*Math.PI*a,c=0;c<l.length;c++){var g=0===c?f[c].startAngle:e,e=g+(f[c].endAngle-f[c].startAngle),h=!1;e>b&&(e=b,h=!0);var r=l[c].color?l[c].color:k._colorSet[c%k._colorSet.length];e>g&&ia(m.plotArea.ctx,f[c].center,f[c].radius,r,k.type,g,e,k.fillOpacity,f[c].percentInnerRadius);if(h)break}d();m.dispatchEvent("dataAnimationIterationEnd",{chart:m});1<=a&&m.dispatchEvent("dataAnimationEnd",{chart:m})},function(){m.disableToolTip=!1;m._animator.animate(0,
|
|
523
523
|
m.animatedRender?500:0,function(a){c(a,!1);d();m.dispatchEvent("dataAnimationIterationEnd",{chart:m})});m.dispatchEvent("dataAnimationEnd",{chart:m})})}}};var qa=function(a,g,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(g.y4-g.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(g.x1),Math.round(g.y1)),a.lineTo(Math.round(g.x2),Math.round(g.y2)),a.lineTo(Math.round(g.x3),Math.round(g.y3)),a.lineTo(Math.round(g.x4),Math.round(g.y4)),"undefined"!==g.x5&&(a.lineTo(Math.round(g.x5),Math.round(g.y5)),
|
|
524
|
-
a.lineTo(Math.round(g.x6),Math.round(g.y6))),a.closePath(),a.fillStyle=b?b:g.color,a.fill(),a.globalAplha=1,a.restore())};m.prototype.renderFunnel=function(a){function g(){for(var a=0,b=[],c=0;c<z.length;c++){if("undefined"===typeof z[c].y)return-1;z[c].y="number"===typeof z[c].y?z[c].y:0;a+=Math.abs(z[c].y)}if(0===a)return-1;for(c=b[0]=0;c<z.length;c++)b.push(Math.abs(z[c].y)*H/a);return b}function c(){var a=S,b=V,c=M,
|
|
525
|
-
f=
|
|
526
|
-
b=p)),
|
|
527
|
-
s.indexLabelTextAlign||"left";
|
|
528
|
-
b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;p=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";q="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;m=s.dataPointIds[
|
|
529
|
-
R[
|
|
530
|
-
b.indexLabel?x.replaceKeywordsWithValue(b.indexLabel,b,s,
|
|
531
|
-
t[
|
|
532
|
-
d=F.length-1;0<=d;d--){h=z[F[d].id];c=F[d];
|
|
533
|
-
Q-r,c=F[d].textBlock.height<F[d].textBlock.maxHeight?F[d].textBlock.height:F[d].textBlock.maxHeight,
|
|
534
|
-
ta+
|
|
535
|
-
T+
|
|
536
|
-
var g,f=F[b].textBlock;if(0>c){c*=-1;g=p(b);e=d(g,b);if(e>=c)return f.y-=c,c;if(0==b)return 0<e&&(f.y-=e),e;e+=a(g,-(c-e));0<e&&(f.y-=e);return e}g=q(b);e=d(b,g);if(e>=c)return f.y+=c,c;if(b==R.length-1)return 0<e&&(f.y+=e),e;e+=a(g,c-e);0<e&&(f.y+=e);return e}function b(){var a,e,g,f,h=0,r;f=(O-Z+2*
|
|
524
|
+
a.lineTo(Math.round(g.x6),Math.round(g.y6))),a.closePath(),a.fillStyle=b?b:g.color,a.fill(),a.globalAplha=1,a.restore())};m.prototype.renderFunnel=function(a){function g(){for(var a=0,b=[],c=0;c<z.length;c++){if("undefined"===typeof z[c].y)return-1;z[c].y="number"===typeof z[c].y?z[c].y:0;a+=Math.abs(z[c].y)}if(0===a)return-1;for(c=b[0]=0;c<z.length;c++)b.push(Math.abs(z[c].y)*H/a);return b}function c(){var a=S,b=V,c=M,g=Y,e,f;e=Z;f=O-N;g=Math.abs((f-e)*(b-a+(g-c))/2);c=Y-M;e=f-e;f=c*(f-O);f=Math.abs(f);
|
|
525
|
+
f=g+f;for(var g=[],h=0,r=0;r<z.length;r++){if("undefined"===typeof z[r].y)return-1;z[r].y="number"===typeof z[r].y?z[r].y:0;h+=Math.abs(z[r].y)}if(0===h)return-1;for(var d=g[0]=0,k=0,l,p,b=b-a,d=!1,r=0;r<z.length;r++)a=Math.abs(z[r].y)*f/h,d?l=0==Number(c.toFixed(3))?0:a/c:(p=ca*ca*b*b-4*Math.abs(ca)*a,0>p?(p=c,d=(b+p)*(e-k)/2,a-=d,l=e-k,k+=e-k,l+=0==p?0:a/p,k+=a/p,d=!0):(l=(Math.abs(ca)*b-Math.sqrt(p))/2,p=b-2*l/Math.abs(ca),k+=l,k>e&&(k-=l,p=c,d=(b+p)*(e-k)/2,a-=d,l=e-k,k+=e-k,l+=a/p,k+=a/p,d=!0),
|
|
526
|
+
b=p)),g.push(l);return g}function b(){if(s&&z){for(var a,b,c,e,g,h,r,d,k,l,p,q,m,y,u,v=[],t=[],I={percent:null,total:null},A=null,B=0;B<z.length;B++)u=R[B],u="undefined"!==typeof u.x5?(u.y2+u.y4)/2:(u.y2+u.y3)/2,u=f(u).x2+1,v[B]=Q-u-X;u=0.5*X;for(var B=0,C=z.length-1;B<z.length||0<=C;B++,C--){b=s.reversed?z[C]:z[B];a=b.color?b.color:s.reversed?s._colorSet[(z.length-1-B)%s._colorSet.length]:s._colorSet[B%s._colorSet.length];c=b.indexLabelPlacement||s.indexLabelPlacement||"outside";y=b.indexLabelTextAlign||
|
|
527
|
+
s.indexLabelTextAlign||"left";e=b.indexLabelBackgroundColor||s.indexLabelBackgroundColor||(w?"transparent":null);g=b.indexLabelFontColor||s.indexLabelFontColor||"#979797";h=n(b.indexLabelFontSize)?s.indexLabelFontSize:b.indexLabelFontSize;r=b.indexLabelFontStyle||s.indexLabelFontStyle||"normal";d=b.indexLabelFontFamily||s.indexLabelFontFamily||"arial";k=b.indexLabelFontWeight||s.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||s.options.indexLabelLineColor||a;l="number"===typeof b.indexLabelLineThickness?
|
|
528
|
+
b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;p=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";q="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;m=s.dataPointIds[B];x._eventManager.objectMap[m]={id:m,objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:R[s.reversed?z.length-1-B:B]};"inside"===s.indexLabelPlacement&&(v[B]=B!==da?s.reversed?R[B].x2-R[B].x1:
|
|
529
|
+
R[B].x3-R[B].x4:R[B].x3-R[B].x6,20>v[B]&&(v[B]=B!==da?s.reversed?R[B].x3-R[B].x4:R[B].x2-R[B].x1:R[B].x2-R[B].x1,v[B]/=2));m=b.indexLabelMaxWidth?b.indexLabelMaxWidth:s.options.indexLabelMaxWidth?s.indexLabelMaxWidth:v[B];if(m>v[B]||0>m)m=v[B];t[B]="inside"===s.indexLabelPlacement?q?Math.max(R[B].height,h):1.5*h:!1;I=x.getPercentAndTotal(s,b);if(s.indexLabelFormatter||b.indexLabelFormatter)A={chart:x.options,dataSeries:s,dataPoint:b,total:I.total,percent:I.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(A):
|
|
530
|
+
b.indexLabel?x.replaceKeywordsWithValue(b.indexLabel,b,s,B):s.indexLabelFormatter?s.indexLabelFormatter(A):s.indexLabel?x.replaceKeywordsWithValue(s.indexLabel,b,s,B):b.label?b.label:"";0>=l&&(l=0);1E3>m&&1E3-m<u&&(m+=1E3-m);n(s.options.indexLabelMaxWidth)&&(s.indexLabelMaxWidth=n(s.indexLabelMaxWidth)?m:Math.max(m,s.indexLabelMaxWidth));P.roundRect||za(P);c=new ja(P,{fontSize:h,fontFamily:d,fontColor:g,fontStyle:r,fontWeight:k,horizontalAlign:c,textAlign:y,backgroundColor:e,maxWidth:m,maxHeight:!1===
|
|
531
|
+
t[B]?q?4.28571429*h:1.5*h:t[B],text:b,padding:ea,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;F.push({textBlock:c,id:s.reversed?C:B,isDirty:!1,lineColor:a,lineThickness:l,lineDashType:p,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,e,g,f=[];g=!1;c=0;for(var h,r=Q-V-X/2,r=s.options.indexLabelMaxWidth?s.indexLabelMaxWidth>r?r:s.indexLabelMaxWidth:r,
|
|
532
|
+
d=F.length-1;0<=d;d--){h=z[F[d].id];c=F[d];e=c.textBlock;b=(a=q(d)<R.length?F[q(d)]:null)?a.textBlock:null;c=c.height;a&&e.y+c+ea>b.y&&(g=!0);c=h.indexLabelMaxWidth||r;if(c>r||0>c)c=r;f.push(c)}if(g)for(d=F.length-1;0<=d;d--)a=R[d],F[d].textBlock.maxWidth=f[f.length-(d+1)],F[d].textBlock.measureText(),F[d].textBlock.height=F[d].textBlock.height===2*F[d].textBlock.padding?0:F[d].textBlock.height,F[d].textBlock.width=F[d].textBlock.width===2*F[d].textBlock.padding?0:F[d].textBlock.width,F[d].textBlock.x=
|
|
533
|
+
Q-r,c=F[d].textBlock.height<F[d].textBlock.maxHeight?F[d].textBlock.height:F[d].textBlock.maxHeight,g=F[d].textBlock.width<F[d].textBlock.maxWidth?F[d].textBlock.width:F[d].textBlock.maxWidth,F[d].height=c,F[d].width=g,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,F[d].textBlock.y=c-F[d].height/2,s.reversed?(F[d].textBlock.y+F[d].height>T+A&&(F[d].textBlock.y=T+A-F[d].height),F[d].textBlock.y<ta-A&&(F[d].textBlock.y=ta-A)):(F[d].textBlock.y<T-A&&(F[d].textBlock.y=T-A),F[d].textBlock.y+F[d].height>
|
|
534
|
+
ta+A&&(F[d].textBlock.y=ta+A-F[d].height))}function h(){var a,b,c,g;if("inside"!==s.indexLabelPlacement)for(var e=0;e<R.length;e++)0==F[e].textBlock.text.length?F[e].isDirty=!0:(a=R[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=s.reversed?"undefined"!==typeof a.x5?c>W?f(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<W?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,F[e].textBlock.x=b+X,F[e].textBlock.y=c-F[e].height/2,s.reversed?(F[e].textBlock.y+F[e].height>T+A&&(F[e].textBlock.y=
|
|
535
|
+
T+A-F[e].height),F[e].textBlock.y<ta-A&&(F[e].textBlock.y=ta-A)):(F[e].textBlock.y<T-A&&(F[e].textBlock.y=T-A),F[e].textBlock.y+F[e].height>ta+A&&(F[e].textBlock.y=ta+A-F[e].height)));else for(e=0;e<R.length;e++)0==F[e].textBlock.text.length?F[e].isDirty=!0:(a=R[e],b=a.height,c=F[e].height,g=F[e].width,b>=c?(b=e!=da?(a.x4+a.x3)/2-g/2:(a.x5+a.x4)/2-g/2,c=e!=da?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,F[e].textBlock.x=b,F[e].textBlock.y=c):F[e].isDirty=!0)}function r(){function a(b,c){var e;if(0>b||b>=F.length)return 0;
|
|
536
|
+
var g,f=F[b].textBlock;if(0>c){c*=-1;g=p(b);e=d(g,b);if(e>=c)return f.y-=c,c;if(0==b)return 0<e&&(f.y-=e),e;e+=a(g,-(c-e));0<e&&(f.y-=e);return e}g=q(b);e=d(b,g);if(e>=c)return f.y+=c,c;if(b==R.length-1)return 0<e&&(f.y+=e),e;e+=a(g,c-e);0<e&&(f.y+=e);return e}function b(){var a,e,g,f,h=0,r;f=(O-Z+2*A)/l;r=l;for(var d,k=1;k<r;k++){g=k*f;for(var n=F.length-1;0<=n;n--)!F[n].isDirty&&(F[n].textBlock.y<g&&F[n].textBlock.y+F[n].height>g)&&(d=q(n),!(d>=F.length-1)&&F[n].textBlock.y+F[n].height+ea>F[d].textBlock.y&&
|
|
537
537
|
(F[n].textBlock.y=F[n].textBlock.y+F[n].height-g>g-F[n].textBlock.y?g+1:g-F[n].height-1))}for(d=R.length-1;0<d;d--)if(!F[d].isDirty){g=p(d);if(0>g&&(g=0,F[g].isDirty))break;if(F[d].textBlock.y<F[g].textBlock.y+F[g].height){e=e||d;f=d;for(r=0;F[f].textBlock.y<F[g].textBlock.y+F[g].height+ea;){a=a||F[f].textBlock.y+F[f].height;r+=F[f].height;r+=ea;f=g;if(0>=f){f=0;r+=F[f].height;break}g=p(f);if(0>g){f=0;r+=F[f].height;break}}if(f!=d){h=F[f].textBlock.y;a-=h;a=r-a;h=c(a,e,f);break}}}return h}function c(a,
|
|
538
538
|
b,e){var g=[],f=0,h=0;for(a=Math.abs(a);e<=b;e++)g.push(R[e]);g.sort(function(a,b){return a.height-b.height});for(e=0;e<g.length;e++)if(b=g[e],f<a)h++,f+=F[b.id].height+ea,F[b.id].textBlock.text="",F[b.id].indexLabelText="",F[b.id].isDirty=!0,F[b.id].textBlock.measureText();else break;return h}for(var e,g,f,h,r,k,l=1,n=0;n<2*l;n++){for(var m=F.length-1;0<=m&&!(0<=p(m)&&p(m),f=F[m],h=f.textBlock,k=(r=q(m)<R.length?F[q(m)]:null)?r.textBlock:null,e=+f.height.toFixed(6),g=+h.y.toFixed(6),!f.isDirty&&
|
|
539
|
-
(r&&g+e+ea>+k.y.toFixed(6))&&(e=h.y+e+ea-k.y,g=a(m,-e),g<e&&(0<g&&(e-=g),g=a(q(m),e),g!=e)));m--);b()}}function d(a,b){return(b<R.length?F[b].textBlock.y:s.reversed?T+
|
|
539
|
+
(r&&g+e+ea>+k.y.toFixed(6))&&(e=h.y+e+ea-k.y,g=a(m,-e),g<e&&(0<g&&(e-=g),g=a(q(m),e),g!=e)));m--);b()}}function d(a,b){return(b<R.length?F[b].textBlock.y:s.reversed?T+A:ta+A)-(0>a?s.reversed?ta-A:T-A:F[a].textBlock.y+F[a].height+ea)}function m(a,b,c){var e,g,f,r=[],d=A,p=[];-1!==b&&(0<=$.indexOf(b)?(g=$.indexOf(b),$.splice(g,1)):($.push(b),$=$.sort(function(a,b){return a-b})));if(0===$.length)r=ia;else{g=A*(1!=$.length||0!=$[0]&&$[0]!=R.length-1?2:1)/k();for(var q=0;q<R.length;q++){if(1==$.length&&
|
|
540
540
|
0==$[0]){if(0===q){r.push(ia[q]);e=d;continue}}else 0===q&&(e=-1*d);r.push(ia[q]+e);if(0<=$.indexOf(q)||q<R.length&&0<=$.indexOf(q+1))e+=g}}f=function(){for(var a=[],b=0;b<R.length;b++)a.push(r[b]-R[b].y1);return a}();var n={startTime:(new Date).getTime(),duration:c||500,easingFunction:function(a,b,c,e){return K.easing.easeOutQuart(a,b,c,e)},changeSection:function(a){for(var b,c,e=0;e<R.length;e++)b=f[e],c=R[e],b*=a,"undefined"===typeof p[e]&&(p[e]=0),0>p&&(p*=-1),c.y1+=b-p[e],c.y2+=b-p[e],c.y3+=
|
|
541
541
|
b-p[e],c.y4+=b-p[e],c.y5&&(c.y5+=b-p[e],c.y6+=b-p[e]),p[e]=b}};a._animator.animate(0,c,function(c){var e=a.plotArea.ctx||a.ctx;ha=!0;e.clearRect(u.x1,u.y1,u.x2-u.x1,u.y2-u.y1);e.fillStyle=a.backgroundColor;e.fillRect(u.x1,u.y1,u.width,u.height);n.changeSection(c,b);var g={};g.dataSeries=s;g.dataPoint=s.reversed?s.dataPoints[z.length-1-b]:s.dataPoints[b];g.index=s.reversed?z.length-1-b:b;a.toolTip.highlightObjects([g]);for(g=0;g<R.length;g++)qa(e,R[g],s.fillOpacity);v(e);J&&("inside"!==s.indexLabelPlacement?
|
|
542
542
|
l(e):h(),t(e));1<=c&&(ha=!1)},null,K.easing.easeOutQuart)}function k(){for(var a=0,b=0;b<R.length-1;b++)(0<=$.indexOf(b)||0<=$.indexOf(b+1))&&a++;return a}function l(a){for(var b,c,e,g,h=0;h<R.length;h++)g=1===F[h].lineThickness%2?0.5:0,c=((R[h].y2+R[h].y4)/2<<0)+g,b=f(c).x2-1,e=F[h].textBlock.x,g=(F[h].textBlock.y+F[h].height/2<<0)+g,F[h].isDirty||0==F[h].lineThickness||(a.strokeStyle=F[h].lineColor,a.lineWidth=F[h].lineThickness,a.setLineDash&&a.setLineDash(G(F[h].lineDashType,F[h].lineThickness)),
|
|
543
543
|
a.beginPath(),a.moveTo(b,c),a.lineTo(e,g),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&F[a].isDirty;a--);return a}function q(a){for(a+=1;a<=R.length&&a!=R.length&&F[a].isDirty;a++);return a}function f(a){for(var b,c=0;c<z.length;c++)if(R[c].y1<a&&R[c].y4>a){b=R[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function t(a){for(var b=0;b<R.length;b++)F[b].isDirty||(a&&(F[b].textBlock.ctx=
|
|
544
544
|
a),F[b].textBlock.y+=F[b].textBlock._lineHeight/2,F[b].textBlock.render(!0),F[b].textBlock.y-=F[b].textBlock._lineHeight/2)}function v(a){x.plotArea.layoutManager.reset();a.roundRect||za(a);x.title&&(x.title.dockInsidePlotArea||"center"===x.title.horizontalAlign&&"center"===x.title.verticalAlign)&&(x.title.ctx=a,x.title.render());if(x.subtitles)for(var b=0;b<x.subtitles.length;b++){var c=x.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)x.subtitles.ctx=
|
|
545
|
-
a,c.render()}x.legend&&(x.legend.dockInsidePlotArea||"center"===x.legend.horizontalAlign&&"center"===x.legend.verticalAlign)&&(x.legend.ctx=a,x.legend.setLayout(),x.legend.render());va.fNg&&va.fNg(x)}var x=this;if(!(0>=a.dataSeriesIndexes.length)){for(var s=this.data[a.dataSeriesIndexes[0]],z=s.dataPoints,u=this.plotArea,
|
|
546
|
-
0<z[U].indexLabel.toString().length)&&(J=!0),!J&&("undefined"!==typeof z[U].label&&null!==z[U].label&&0<z[U].label.toString().length)&&(J=!0),!J&&"function"===typeof s.indexLabelFormatter||"function"===typeof z[U].indexLabelFormatter)J=!0;J=J||"undefined"!==typeof s.indexLabel&&null!==s.indexLabel&&0<s.indexLabel.toString().length;"inside"!==s.indexLabelPlacement&&J||(
|
|
547
|
-
s.visible)&&0!==z.length){var N,E;a=75*L/100;var X=30*(Q-a)/100;"funnel"===s.type?(N=n(s.options.neckHeight)?0.35*H:s.neckHeight,E=n(s.options.neckWidth)?0.25*a:s.neckWidth,"string"===typeof N&&N.match(/%$/)?(N=parseInt(N),N=N*H/100):N=parseInt(N),"string"===typeof E&&E.match(/%$/)?(E=parseInt(E),E=E*a/100):E=parseInt(E),N>H?N=H:0>=N&&(N=0),E>a?E=a-0.5:0>=E&&(E=0)):"pyramid"===s.type&&(E=N=0,s.reversed=s.reversed?!1:!0);var
|
|
548
|
-
s.reversed?Z:O;E=s.valueRepresents=s.valueRepresents?s.valueRepresents:"height";U=[];a=[];var R=[],
|
|
549
|
-
a.push(Y));for(E=0;E<L.length-1;E++)aa=s.reversed?z[z.length-1-E].color?z[z.length-1-E].color:s._colorSet[(z.length-1-E)%s._colorSet.length]:z[E].color?z[E].color:s._colorSet[E%s._colorSet.length],E===da?R.push({x1:U[E],y1:
|
|
550
|
-
for(E=0;E<z.length;E++)z[E].exploded&&(U=!0,s.reversed?$.push(z.length-1-E):$.push(E));P.clearRect(u.x1,u.y1,u.width,u.height);P.fillStyle=x.backgroundColor;P.fillRect(u.x1,u.y1,u.width,u.height);if(J&&s.visible&&(b(),h(),"inside"!==s.indexLabelPlacement)){e();r();for(E=0;E<z.length;E++)F[E].isDirty||(a=F[E].textBlock.x+F[E].width,a=(Q-a)/2,0==E&&(
|
|
551
|
-
R[E],qa(P,
|
|
545
|
+
a,c.render()}x.legend&&(x.legend.dockInsidePlotArea||"center"===x.legend.horizontalAlign&&"center"===x.legend.verticalAlign)&&(x.legend.ctx=a,x.legend.setLayout(),x.legend.render());va.fNg&&va.fNg(x)}var x=this;if(!(0>=a.dataSeriesIndexes.length)){for(var s=this.data[a.dataSeriesIndexes[0]],z=s.dataPoints,u=this.plotArea,A=0.025*u.width,B=0.01*u.width,C=0,H=u.height-2*A,L=Math.min(u.width-2*B,2.8*u.height),J=!1,U=0;U<z.length;U++)if(!J&&("undefined"!==typeof z[U].indexLabel&&null!==z[U].indexLabel&&
|
|
546
|
+
0<z[U].indexLabel.toString().length)&&(J=!0),!J&&("undefined"!==typeof z[U].label&&null!==z[U].label&&0<z[U].label.toString().length)&&(J=!0),!J&&"function"===typeof s.indexLabelFormatter||"function"===typeof z[U].indexLabelFormatter)J=!0;J=J||"undefined"!==typeof s.indexLabel&&null!==s.indexLabel&&0<s.indexLabel.toString().length;"inside"!==s.indexLabelPlacement&&J||(B=(u.width-0.75*L)/2);var U=u.x1+B,Q=u.x2-B,Z=u.y1+A,O=u.y2-A,P=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=s.length&&(s.dataPoints&&
|
|
547
|
+
s.visible)&&0!==z.length){var N,E;a=75*L/100;var X=30*(Q-a)/100;"funnel"===s.type?(N=n(s.options.neckHeight)?0.35*H:s.neckHeight,E=n(s.options.neckWidth)?0.25*a:s.neckWidth,"string"===typeof N&&N.match(/%$/)?(N=parseInt(N),N=N*H/100):N=parseInt(N),"string"===typeof E&&E.match(/%$/)?(E=parseInt(E),E=E*a/100):E=parseInt(E),N>H?N=H:0>=N&&(N=0),E>a?E=a-0.5:0>=E&&(E=0)):"pyramid"===s.type&&(E=N=0,s.reversed=s.reversed?!1:!0);var B=U+a/2,S=U,V=U+a,T=s.reversed?O:Z,M=B-E/2,Y=B+E/2,W=s.reversed?Z+N:O-N,ta=
|
|
548
|
+
s.reversed?Z:O;E=s.valueRepresents=s.valueRepresents?s.valueRepresents:"height";U=[];a=[];var R=[],B=[],aa=Z,da,ca=(W-T)/(M-S),fa=-ca,L="area"===E?c():g();if(-1!==L){if(s.reversed)for(B.push(aa),E=L.length-1;0<E;E--)aa+=L[E],B.push(aa);else for(E=0;E<L.length;E++)aa+=L[E],B.push(aa);if(s.reversed)for(E=0;E<L.length;E++)B[E]<W?(U.push(M),a.push(Y),da=E):(U.push((B[E]-T+ca*S)/ca),a.push((B[E]-T+fa*V)/fa));else for(E=0;E<L.length;E++)B[E]<W?(U.push((B[E]-T+ca*S)/ca),a.push((B[E]-T+fa*V)/fa),da=E):(U.push(M),
|
|
549
|
+
a.push(Y));for(E=0;E<L.length-1;E++)aa=s.reversed?z[z.length-1-E].color?z[z.length-1-E].color:s._colorSet[(z.length-1-E)%s._colorSet.length]:z[E].color?z[E].color:s._colorSet[E%s._colorSet.length],E===da?R.push({x1:U[E],y1:B[E],x2:a[E],y2:B[E],x3:Y,y3:W,x4:a[E+1],y4:B[E+1],x5:U[E+1],y5:B[E+1],x6:M,y6:W,id:E,height:B[E+1]-B[E],color:aa}):R.push({x1:U[E],y1:B[E],x2:a[E],y2:B[E],x3:a[E+1],y3:B[E+1],x4:U[E+1],y4:B[E+1],id:E,height:B[E+1]-B[E],color:aa});var ea=2,F=[],ha=!1,$=[],ia=[],U=!1;a=a=0;Da($);
|
|
550
|
+
for(E=0;E<z.length;E++)z[E].exploded&&(U=!0,s.reversed?$.push(z.length-1-E):$.push(E));P.clearRect(u.x1,u.y1,u.width,u.height);P.fillStyle=x.backgroundColor;P.fillRect(u.x1,u.y1,u.width,u.height);if(J&&s.visible&&(b(),h(),"inside"!==s.indexLabelPlacement)){e();r();for(E=0;E<z.length;E++)F[E].isDirty||(a=F[E].textBlock.x+F[E].width,a=(Q-a)/2,0==E&&(C=a),C>a&&(C=a));for(E=0;E<R.length;E++)R[E].x1+=C,R[E].x2+=C,R[E].x3+=C,R[E].x4+=C,R[E].x5&&(R[E].x5+=C,R[E].x6+=C),F[E].textBlock.x+=C}for(E=0;E<R.length;E++)C=
|
|
551
|
+
R[E],qa(P,C,s.fillOpacity),ia.push(C.y1);v(P);J&&s.visible&&("inside"===s.indexLabelPlacement||x.animationEnabled||l(P),x.animationEnabled||t());if(!J)for(E=0;E<z.length;E++)C=s.dataPointIds[E],a={id:C,objectType:"dataPoint",dataPointIndex:E,dataSeriesIndex:0,funnelSection:R[s.reversed?z.length-1-E:E]},x._eventManager.objectMap[C]=a;!x.animationEnabled&&U?m(x,-1,0):x.animationEnabled&&!x.animatedRender&&m(x,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ha&&!x.isAnimating&&(n(a.dataSeries.explodeOnClick)||
|
|
552
552
|
a.dataSeries.explodeOnClick)&&(b=s.reversed?z.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===s.type||"pyramid"===s.type)s.reversed?z[z.length-1-a].exploded=z[z.length-1-a].exploded?!1:!0:z[a].exploded=z[a].exploded?!1:!0;m(x,b,500)}};return{source:P,dest:this.plotArea.ctx,animationCallback:function(a,b){K.fadeInAnimation(a,b);1<=a&&(m(x,-1,500),v(x.plotArea.ctx||x.ctx))},easingFunction:K.easing.easeInQuad,animationBase:0}}}}};m.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||
|
|
553
553
|
window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();m.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;m.prototype.set=function(a,g,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=g,
|
|
554
554
|
c&&this.render()):m.base.set.call(this,a,g,c)};m.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var g=a.format?a.format:"png",c=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+g);var b=this.canvas;if(b&&g&&c){c=c+"."+g;a="image/"+g;var b=b.toDataURL(a),e=!1,h=document.createElement("a");h.download=c;h.href=b;if("undefined"!==typeof Blob&&new Blob){for(var r=b.replace(/^data:[a-z\/]*;base64,/,""),r=atob(r),d=new ArrayBuffer(r.length),
|
|
@@ -593,8 +593,8 @@ distance:t}),m=!0);break;case "pie":case "doughnut":v=q.center;x="doughnut"===th
|
|
|
593
593
|
break;case "boxAndWhisker":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&g>=q.y4-q.borderThickness/2&&g<=q.y1+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&g>=q.y1&&g<=q.y4)b.push({dataPoint:f,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-g),Math.abs(q.y3-g))}),m=!0;break;case "candlestick":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&g>=q.y2-q.borderThickness/2&&g<=q.y3+q.borderThickness/2||Math.abs(q.x2-
|
|
594
594
|
a+q.x1-a)<q.borderThickness&&g>=q.y1&&g<=q.y4)b.push({dataPoint:f,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-g),Math.abs(q.y3-g))}),m=!0;break;case "ohlc":if(Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&g>=q.y2&&g<=q.y3||a>=q.x1&&a<=(q.x2+q.x1)/2&&g>=q.y1-q.borderThickness/2&&g<=q.y1+q.borderThickness/2||a>=(q.x1+q.x2)/2&&a<=q.x2&&g>=q.y4-q.borderThickness/2&&g<=q.y4+q.borderThickness/2)b.push({dataPoint:f,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-
|
|
595
595
|
a),Math.abs(q.x2-a),Math.abs(q.y2-g),Math.abs(q.y3-g))}),m=!0}if(m||1E3<k&&1E3<l)break}}else if(0>p-e&&p+e>=this.dataPoints.length)break;-1===d?(e++,d=1):d=-1}a=null;for(g=0;g<b.length;g++)a?b[g].distance<=a.distance&&(a=b[g]):a=b[g];return a};V.prototype.getMarkerProperties=function(a,g,c,b){var e=this.dataPoints,h=e[a].markerColor?e[a].markerColor:this.markerColor?this.markerColor:e[a].color?e[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],d=e[a].markerBorderColor?e[a].markerBorderColor:
|
|
596
|
-
this.markerBorderColor?this.markerBorderColor:null,m=n(e[a].markerBorderThickness)?this.markerBorderThickness?this.markerBorderThickness:null:e[a].markerBorderThickness,t=e[a].markerType?e[a].markerType:this.markerType;a=n(e[a].markerSize)?this.markerSize:e[a].markerSize;return{x:g,y:c,ctx:b,type:t,size:a,color:h,borderColor:d,borderThickness:m}};pa(
|
|
597
|
-
Math.log(g/this.viewportMinimum)<this.noTicks-1){for(var c=
|
|
596
|
+
this.markerBorderColor?this.markerBorderColor:null,m=n(e[a].markerBorderThickness)?this.markerBorderThickness?this.markerBorderThickness:null:e[a].markerBorderThickness,t=e[a].markerType?e[a].markerType:this.markerType;a=n(e[a].markerSize)?this.markerSize:e[a].markerSize;return{x:g,y:c,ctx:b,type:t,size:a,color:h,borderColor:d,borderThickness:m}};pa(C,T);C.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var g=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/
|
|
597
|
+
Math.log(g/this.viewportMinimum)<this.noTicks-1){for(var c=C.getNiceNumber((g-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),b=Math.ceil(this.viewportMinimum/c)*c;b<g;b+=c)b<this.viewportMinimum||this.logLabelValues.push(b);this.logLabelValues.sort(Sa);this.createExtraLabelsForLog(a)}}};C.prototype.createLabels=function(){var a,g,c=0,b=0,e,h=0,d=0,b=0,b=this.interval,m=0,t,k=0.6*this.chart.height,l;a=!1;var p=this.scaleBreaks?this.scaleBreaks._appliedBreaks:
|
|
598
598
|
[],q=p.length?n(this.scaleBreaks.firstBreakIndex)?0:this.scaleBreaks.firstBreakIndex:0;if("axisX"!==this.type||"dateTime"!==this.valueType||this.logarithmic){e=this.viewportMaximum;if(this.labels){a=Math.ceil(b);for(var b=Math.ceil(this.intervalStartPosition),f=!1,c=b;c<this.viewportMaximum;c+=a)if(this.labels[c])f=!0;else{f=!1;break}f&&(this.interval=a,this.intervalStartPosition=b)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog()),
|
|
599
599
|
b=0,f=q;b<this.logLabelValues.length;b++)if(c=this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;f<p.length&&c>p[f].endValue;f++);a=f<p.length&&c>=p[f].startValue&&c<=p[f].endValue;l=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:l,label:this.labels[l]?this.labels[l]:null}):"axisX"===this.type&&this.labels[l]?this.labels[l]:fa(l,this.valueFormatString,this.chart._cultureInfo),a=new ja(this.ctx,{x:0,y:0,maxWidth:h,maxHeight:d,angle:this.labelAngle,
|
|
600
600
|
text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,cornerRadius:this.labelCornerRadius,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:l,textBlock:a,effectiveHeight:null}))}f=q;for(c=this.intervalStartPosition;c<=e;c=parseFloat(1E-12>this.interval?
|
|
@@ -639,199 +639,200 @@ if("bottom"===this._position||"top"===this._position)n(h.options.labelWrap)&&!n(
|
|
|
639
639
|
x=h.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;n(h.labelBackgroundColor)&&(h.labelBackgroundColor="#EEEEEE")}else d="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,x=n(h.options.labelWrap)||h.labelWrap?"bottom"===this._position||"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,n(h.labelBackgroundColor)&&(n(h.startValue)&&0!==h.startValue?h.labelBackgroundColor=w?"transparent":null:h.labelBackgroundColor=
|
|
640
640
|
"#EEEEEE");a=new ja(this.ctx,{x:0,y:0,backgroundColor:h.labelBackgroundColor,borderColor:h.labelBorderColor,borderThickness:h.labelBorderThickness,cornerRadius:h.labelCornerRadius,maxWidth:h.options.labelMaxWidth?h.options.labelMaxWidth:d,maxHeight:x,angle:this.labelAngle,text:h.labelFormatter?h.labelFormatter({chart:this.chart,axis:this,stripLine:h}):h.label,textAlign:this.labelTextAlign,fontSize:"outside"===h.labelPlacement?h.options.labelFontSize?h.labelFontSize:this.labelFontSize:h.labelFontSize,
|
|
641
641
|
fontFamily:"outside"===h.labelPlacement?h.options.labelFontFamily?h.labelFontFamily:this.labelFontFamily:h.labelFontFamily,fontWeight:"outside"===h.labelPlacement?h.options.labelFontWeight?h.labelFontWeight:this.labelFontWeight:h.labelFontWeight,fontColor:h.labelFontColor||h.color,fontStyle:"outside"===h.labelPlacement?h.options.labelFontStyle?h.labelFontStyle:this.fontWeight:h.labelFontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:h.value,textBlock:a,effectiveHeight:null,stripLine:h})}};
|
|
642
|
-
|
|
642
|
+
C.prototype.createLabelsAndCalculateWidth=function(){var a=0,g=0;this._labels=[];this._stripLineLabels=[];var c=this.chart.isNavigator?0:5;if("left"===this._position||"right"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0<this._index)for(g=0;g<this._labels.length;g++){var b=this._labels[g].textBlock,b=b.measureText(),e=0,e=0===this.labelAngle?b.width:b.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+b.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle));
|
|
643
643
|
a<e&&(this.labelEffectiveWidth=a=e);this._labels[g].effectiveWidth=e}for(g=0;g<this._stripLineLabels.length;g++)"outside"===this._stripLineLabels[g].stripLine.labelPlacement&&(this._stripLineLabels[g].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[g].stripLine.value<=this.viewportMaximum)&&(b=this._stripLineLabels[g].textBlock,b=b.measureText(),e=0===this.labelAngle?b.width:b.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+b.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),
|
|
644
|
-
"inside"===this.tickPlacement&&(e+=this.tickLength),"inside"===this.labelPlacement&&(a+=0<this._index?e:0),a<e&&(a=e),this.stripLineLabelEffectiveWidth=this._stripLineLabels[g].effectiveWidth=e)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0<this._index?this.tickLength:0:this.tickLength)+c};
|
|
644
|
+
"inside"===this.tickPlacement&&(e+=this.tickLength),"inside"===this.labelPlacement&&(a+=0<this._index?e:0),a<e&&(a=e),this.stripLineLabelEffectiveWidth=this._stripLineLabels[g].effectiveWidth=e)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0<this._index?this.tickLength:0:this.tickLength)+c};C.prototype.createLabelsAndCalculateHeight=function(){var a=0;this._labels=[];this._stripLineLabels=[];var g,c=0,b=this.chart.isNavigator?0:5;if("bottom"===
|
|
645
645
|
this._position||"top"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0<this._index)for(c=0;c<this._labels.length;c++){g=this._labels[c].textBlock;g=g.measureText();var e=0,e=0===this.labelAngle?g.height:g.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+g.height*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<e&&(this.labelEffectiveHeight=a=e);this._labels[c].effectiveHeight=e}for(c=0;c<this._stripLineLabels.length;c++)"outside"===this._stripLineLabels[c].stripLine.labelPlacement&&
|
|
646
646
|
(this._stripLineLabels[c].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[c].stripLine.value<=this.viewportMaximum)&&(g=this._stripLineLabels[c].textBlock,g=g.measureText(),e=0===this.labelAngle?g.height:g.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+g.height*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),"inside"===this.tickPlacement&&(e+=this.tickLength),"inside"===this.labelPlacement&&(a+=0<this._index?e:0),a<e&&(a=e),this.stripLineLabelEffectiveHeight=this._stripLineLabels[c].effectiveHeight=
|
|
647
|
-
e)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0<this._index?this.tickLength:0:this.tickLength)+b};
|
|
648
|
-
0;f<b.length;f++)b[f].calculateAxisParameters();for(f=0;f<q.length;f++)if(q[f]&&q[f].scaleBreaks&&q[f].scaleBreaks._appliedBreaks.length)for(var w=q[f].scaleBreaks._appliedBreaks,v=0;v<w.length&&!(w[v].startValue>q[f].viewportMaximum);v++)w[v].endValue<q[f].viewportMinimum||(n(q[f].scaleBreaks.firstBreakIndex)&&(q[f].scaleBreaks.firstBreakIndex=v),w[v].startValue>=q[f].viewPortMinimum&&(q[f].scaleBreaks.lastBreakIndex=v));for(var x=v=0,s=0,z=0,u=0,A=0,B=0,
|
|
647
|
+
e)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0<this._index?this.tickLength:0:this.tickLength)+b};C.setLayout=function(a,g,c,b,e,h){var d,m,t,k,l=a[0]?a[0].chart:g[0].chart,p=l.isNavigator?0:10,q=l._axes;if(a&&0<a.length)for(var f=0;f<a.length;f++)a[f]&&a[f].calculateAxisParameters();if(g&&0<g.length)for(f=0;f<g.length;f++)g[f].calculateAxisParameters();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateAxisParameters();if(b&&0<b.length)for(f=
|
|
648
|
+
0;f<b.length;f++)b[f].calculateAxisParameters();for(f=0;f<q.length;f++)if(q[f]&&q[f].scaleBreaks&&q[f].scaleBreaks._appliedBreaks.length)for(var w=q[f].scaleBreaks._appliedBreaks,v=0;v<w.length&&!(w[v].startValue>q[f].viewportMaximum);v++)w[v].endValue<q[f].viewportMinimum||(n(q[f].scaleBreaks.firstBreakIndex)&&(q[f].scaleBreaks.firstBreakIndex=v),w[v].startValue>=q[f].viewPortMinimum&&(q[f].scaleBreaks.lastBreakIndex=v));for(var x=v=0,s=0,z=0,u=0,A=0,B=0,C,G,H=m=0,J,K,L,w=J=K=L=!1,f=0;f<q.length;f++)q[f]&&
|
|
649
649
|
q[f].title&&(q[f]._titleTextBlock=new ja(q[f].ctx,{text:q[f].title,horizontalAlign:"center",fontSize:q[f].titleFontSize,fontFamily:q[f].titleFontFamily,fontWeight:q[f].titleFontWeight,fontColor:q[f].titleFontColor,fontStyle:q[f].titleFontStyle,borderColor:q[f].titleBorderColor,borderThickness:q[f].titleBorderThickness,backgroundColor:q[f].titleBackgroundColor,cornerRadius:q[f].titleCornerRadius,textBaseline:"middle"}));for(f=0;f<q.length;f++)if(q[f].title)switch(q[f]._position){case "left":q[f]._titleTextBlock.maxWidth=
|
|
650
650
|
q[f].titleMaxWidth||h.height;q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*h.width:1.5*q[f].titleFontSize;q[f]._titleTextBlock.angle=-90;break;case "right":q[f]._titleTextBlock.maxWidth=q[f].titleMaxWidth||h.height;q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*h.width:1.5*q[f].titleFontSize;q[f]._titleTextBlock.angle=90;break;default:q[f]._titleTextBlock.maxWidth=q[f].titleMaxWidth||h.width,q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*h.height:1.5*q[f].titleFontSize,q[f]._titleTextBlock.angle=
|
|
651
651
|
0}if("normal"===e){for(var z=[],u=[],A=[],B=[],N=[],Q=[],O=[],P=[];4>v;){var E=0,X=0,T=0,S=0,V=e=0,M=0,$=0,W=0,Y=0,R=0,aa=0;if(c&&0<c.length)for(A=[],f=R=0;f<c.length;f++)A.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateWidth():0)),R+=A[f],M+=c[f]&&!l.isNavigator?c[f].margin:0;else A.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));O.push(A);if(b&&0<b.length)for(B=[],f=aa=0;f<b.length;f++)B.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateWidth():0)),aa+=B[f],$+=b[f]?b[f].margin:0;else B.push(Math.ceil(b[0]?
|
|
652
652
|
b[0].createLabelsAndCalculateWidth():0));P.push(B);d=Math.round(h.x1+R+M);t=Math.round(h.x2-aa-$>l.width-p?l.width-p:h.x2-aa-$);if(a&&0<a.length)for(z=[],f=W=0;f<a.length;f++)a[f]&&(a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(t-d),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:a[f].lineCoordinates.width),z.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateHeight():0)),W+=z[f],e+=a[f]&&!l.isNavigator?
|
|
653
653
|
a[f].margin:0;else z.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));N.push(z);if(g&&0<g.length)for(u=[],f=Y=0;f<g.length;f++)g[f]&&(g[f].lineCoordinates={}),g[f].lineCoordinates.width=Math.abs(t-d),g[f].title&&(g[f]._titleTextBlock.maxWidth=0<g[f].titleMaxWidth&&g[f].titleMaxWidth<g[f].lineCoordinates.width?g[f].titleMaxWidth:g[f].lineCoordinates.width),u.push(Math.ceil(g[f]?g[f].createLabelsAndCalculateHeight():0)),Y+=u[f],V+=g[f]&&!l.isNavigator?g[f].margin:0;else u.push(Math.ceil(g[0]?
|
|
654
654
|
g[0].createLabelsAndCalculateHeight():0));Q.push(u);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].lineCoordinates.x1=d,t=Math.round(h.x2-aa-$>l.width-p?l.width-p:h.x2-aa-$),a[f]._labels&&1<a[f]._labels.length&&(m=k=0,k=a[f]._labels[1],m="dateTime"===a[f].valueType?a[f]._labels[a[f]._labels.length-2]:a[f]._labels[a[f]._labels.length-1],x=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),
|
|
655
|
-
s=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle))),!a[f]||(!a[f].labelAutoFit||n(
|
|
656
|
-
A-
|
|
657
|
-
Math.round(h.y2-W-e+E),k=Math.round(h.y2),a[f].lineCoordinates.x2=t,a[f].lineCoordinates.width=t-d,a[f].lineCoordinates.y1=m,a[f].lineCoordinates.y2=m,"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.y1=a[
|
|
658
|
-
|
|
655
|
+
s=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle))),!a[f]||(!a[f].labelAutoFit||n(C)||n(G)||l.isNavigator||l.stockChart)||(m=0,0<a[f].labelAngle?G+s>t&&(m+=0<a[f].labelAngle?G+s-t-aa:0):0>a[f].labelAngle?C-x<d&&C-x<a[f].viewportMinimum&&(H=d-(M+a[f].tickLength+A+C-x+a[f].labelFontSize/2)):0===a[f].labelAngle&&(G+s>t&&(m=G+s/2-t-aa),C-x<d&&C-x<a[f].viewportMinimum&&(H=d-M-a[f].tickLength-
|
|
656
|
+
A-C+x/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<m?t-=m:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0>a[f].labelAngle&&0<H?d+=H:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0===a[f].labelAngle&&(0<H&&(d+=H),0<m&&(t-=m))),l.panEnabled?W=n(l.sessionVariables.axisX.height)||l.stockChart?l.sessionVariables.axisX.height=W:l.sessionVariables.axisX.height:l.sessionVariables.axisX.height=W,m=
|
|
657
|
+
Math.round(h.y2-W-e+E),k=Math.round(h.y2),a[f].lineCoordinates.x2=t,a[f].lineCoordinates.width=t-d,a[f].lineCoordinates.y1=m,a[f].lineCoordinates.y2=m,"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.y1=a[0].lineCoordinates.y2+E+(a[f].labelEffectiveHeight||0),a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2),"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.y1+=a[f].tickLength,a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2),a[f].bounds={x1:d,
|
|
658
|
+
y1:m,x2:t,y2:k-(W+e-z[f]-E),width:t-d},a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1),E+=z[f]+a[f].margin;if(g&&0<g.length)for(f=0;f<g.length;f++)g[f].lineCoordinates.x1=Math.round(h.x1+R+M),g[f].lineCoordinates.x2=Math.round(h.x2-aa-$>l.width-p?l.width-p:h.x2-aa-$),g[f].lineCoordinates.width=Math.abs(t-d),g[f]._labels&&1<g[f]._labels.length&&(k=g[f]._labels[1],m="dateTime"===g[f].valueType?g[f]._labels[g[f]._labels.length-2]:g[f]._labels[g[f]._labels.length-1],x=k.textBlock.width*Math.cos(Math.PI/
|
|
659
659
|
180*Math.abs(k.textBlock.angle))+(k.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle))),l.panEnabled?Y=n(l.sessionVariables.axisX2.height)||l.stockChart?l.sessionVariables.axisX2.height=Y:l.sessionVariables.axisX2.height:l.sessionVariables.axisX2.height=Y,m=Math.round(h.y1),k=g[f].lineCoordinates.y1=
|
|
660
|
-
m+Y+V-X,g[f].lineCoordinates.y2=m,"inside"===g[f].labelPlacement&&0<f&&(g[f].lineCoordinates.y1=g[
|
|
661
|
-
0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock.height/2:p,m=Math.round(h.y1+Y+V<Math.max(M,p)?Math.max(M,p):h.y1+Y+V),t=Math.round(a[0]?a[0].lineCoordinates.x1:g[0].lineCoordinates.x1),M=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,k=Math.round(h.y2-W-e-M),c[f].lineCoordinates={x1:d-T,y1:m,x2:t-T,y2:k,height:Math.abs(k-m)},"inside"===c[f].labelPlacement&&
|
|
662
|
-
0),c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.x1-=c[f].tickLength,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),c[f].bounds={x1:d-(A[f]+T),y1:m,x2:t-T,y2:k,height:k-m},c[f].bounds.width=c[f].bounds.x2-c[f].bounds.x1,c[f].title&&(c[f]._titleTextBlock.maxWidth=0<
|
|
663
|
-
if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&(d=Math.round(a[0]?a[0].lineCoordinates.x2:g[0].lineCoordinates.x2),t=Math.round(d),M=b[f]._labels&&0<b[f]._labels.length?b[f]._labels[b[f]._labels.length-1].textBlock.height/2:0,m=Math.round(h.y1+Y+V<Math.max(M,p)?Math.max(M,p):h.y1+Y+V),M=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?
|
|
664
|
-
f&&(b[f].lineCoordinates.x1=b[
|
|
665
|
-
b[f].
|
|
666
|
-
(
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
1][f]===
|
|
670
|
-
[];
|
|
671
|
-
0));Q.push(x);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},d=Math.round(h.x1+S+e),t=Math.round(h.x2-W-V>l.width-10?l.width-10:h.x2-W-V),c[f].labelAutoFit&&!n(z)&&(0<!a.length&&(d=0>c[f].labelAngle?Math.max(d,z):0===c[f].labelAngle?
|
|
672
|
-
c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},d=Math.round(h.x1+S+e),t=Math.round(h.x2-W-V>b[f].chart.width-10?b[f].chart.width-10:h.x2-W-V),b[f]&&
|
|
673
|
-
|
|
674
|
-
0));s.push(
|
|
675
|
-
|
|
676
|
-
p[f]:l.sessionVariables.axisY[f].height;else for(f=0;f<c.length;f++)l.sessionVariables.axisY[f].height=p[f];if(c&&0<c.length)for(f=c.length-1;0<=f;f--)m=Math.round(h.y2),k=Math.round(h.y2>
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
b[f].lineCoordinates.y1-b[f].
|
|
680
|
-
b[
|
|
681
|
-
(t=b[M].lineCoordinates.x1,d=t-S);a[f].lineCoordinates={x1:t-O,y1:m,x2:t-O,y2:k,height:Math.abs(k-m)};"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-(H[f]-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
c[M].labelAngle?t-W:d);if(b&&0<b.length)for(M=0;M<b.length;M++)b[M]&&b[M].labelAutoFit&&(t=b[M].lineCoordinates.x2,d=t-W);g[f].lineCoordinates={x1:t+P,y1:m,x2:t+P,y2:k,height:Math.abs(k-m)};"inside"===
|
|
685
|
-
g[f].
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
a&&a.length&&e.rect(5,a[0].bounds.y1,a[0].chart.width-10,a[a.length-1].bounds.y2);g&&g.length&&e.rect(5,g[g.length-1].bounds.y1,g[0].chart.width-10,g[0].bounds.y2);
|
|
689
|
-
|
|
690
|
-
if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].
|
|
691
|
-
|
|
692
|
-
0<g.length)for(d=0;d<g.length;d++)g[d].
|
|
693
|
-
c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(g,c);this.stripLines[a].value=this.convertPixelToValue(Math.abs(this.convertValueToPixel(g)+this.convertValueToPixel(c))/2);this.stripLines[a].thickness=
|
|
694
|
-
g=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),
|
|
695
|
-
g[h].size))};
|
|
696
|
-
(a[g].startPixel=this.convertValueToPixel(a[g].startValue),this.scaleBreaks.lastBreakIndex=g),a[g].endValue<=this.conversionParameters.maximum&&(a[g].endPixel=this.convertValueToPixel(a[g].endValue)))}};
|
|
697
|
-
[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,d,n=this.viewportMaximum,m=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>
|
|
698
|
-
0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(d=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=d);c>this.lineCoordinates.width*
|
|
699
|
-
1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(k===this._labels.length-1||l<Math.log(n/p.position)*m)||(c.push(p),n=p.position,l=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+
|
|
700
|
-
Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=l);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(g=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});
|
|
701
|
-
this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;
|
|
705
|
-
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock.fontSize/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,
|
|
706
|
-
this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),
|
|
707
|
-
0
|
|
708
|
-
Math.
|
|
709
|
-
function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=
|
|
710
|
-
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock.fontSize/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===
|
|
711
|
-
this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
712
|
-
|
|
713
|
-
Math.
|
|
714
|
-
0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
|
|
715
|
-
2+1,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===
|
|
716
|
-
b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
717
|
-
|
|
718
|
-
"inside"===this.
|
|
719
|
-
a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<
|
|
720
|
-
2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}h=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",
|
|
721
|
-
p.position<
|
|
722
|
-
|
|
723
|
-
Math.min(c.y,g.y),Math.abs(b.x1-b.x2),Math.abs(g.y-c.y)),g=!1):g=!0;a.beginPath()};
|
|
724
|
-
l.startValue>=this.viewportMaximum&&l.endValue>=this.viewportMaximum||n(l.startValue)||n(l.endValue)||isNaN(this.range))||m.push(l))}for(e=0;e<this._stripLineLabels.length;e++)if(l=this.stripLines[e],c=this._stripLineLabels[e]
|
|
725
|
-
if("bottom"===this._position){var p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,b.y<<0);this.ctx.lineTo(p,b.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(b.x-=c.textBlock.width/
|
|
726
|
-
180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,b.y<<0),this.ctx.lineTo(p,
|
|
727
|
-
(c.textBlock.height-c.textBlock.fontSize/2)
|
|
728
|
-
5:
|
|
729
|
-
this.tickLength<<0,p),this.ctx.stroke(),b.x=0===this.labelAngle?b.x+this.tickLength+5:this.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/
|
|
730
|
-
this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-l.thickness/2>this.chart.plotArea.x1?n(l.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=
|
|
731
|
-
(
|
|
732
|
-
l.thickness/2>this.chart.plotArea.x1?n(l.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,n(l.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/
|
|
733
|
-
2:
|
|
734
|
-
b.y-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2:n(l.startValue)?b.y+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.y+=c.textBlock.height/2-c.textBlock.fontSize+3,b.x="near"===
|
|
735
|
-
this.options.stripLines[e].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),b.y-c.textBlock.height-l.thickness/2>this.chart.plotArea.y1?n(l.startValue)?b.y-=c.textBlock.height-c.textBlock.fontSize/
|
|
736
|
-
3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x1+3),c.textBlock.x=b.x,c.textBlock.y=b.y,t.push(c));if(!k){b=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,
|
|
737
|
-
this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(h=0;h<m.length;h++)l=m[h],l.showOnTop&&l.render();this.ctx.restore()},l)):l.render();for(e=0;e<t.length;e++)c=t[e],c.stripLine.showOnTop?
|
|
738
|
-
g.chart.plotArea.y1,g.chart.plotArea.width,g.chart.plotArea.height),g.ctx.clip(),c.textBlock.render(!0),g.ctx.restore())},c.textBlock)):"inside"===c.stripLine.labelPlacement&&c.textBlock.render(!0);this.ctx.restore();k=!0}if(k)for(b=!1,e=0;e<t.length;e++)c=t[e],"outside"===
|
|
739
|
-
|
|
740
|
-
this.chart.height),this.maskCtx=this.maskCanvas.getContext("2d")):(this.maskCanvas=this.chart.plotArea.canvas,this.maskCtx=this.chart.plotArea.ctx);this.maskCtx.save();this.maskCtx.beginPath();this.maskCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,
|
|
741
|
-
|
|
742
|
-
a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(G(this.gridDashType,this.gridThickness));if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||
|
|
743
|
-
|
|
744
|
-
(this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),e,h;g.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(e=this.lineCoordinates.x2,h=this.lineCoordinates.x1):(e=this.lineCoordinates.x1,h=this.lineCoordinates.x2);
|
|
745
|
-
this.lineCoordinates.y1<<0;g.beginPath();if(this.scaleBreaks&&!n(this.scaleBreaks.firstBreakIndex))if(n(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(var m=this.scaleBreaks.firstBreakIndex;m<=this.scaleBreaks.lastBreakIndex;m++)g.moveTo(e,
|
|
746
|
-
"right"===this._position)&&this.lineThickness){this.reversed?(e=this.lineCoordinates.y1,h=this.lineCoordinates.y2):(e=this.lineCoordinates.y2,h=this.lineCoordinates.y1);g.lineWidth=this.lineThickness;g.strokeStyle=this.lineColor;g.setLineDash&&g.setLineDash(G(this.lineDashType,this.lineThickness));d=1===this.lineThickness%
|
|
747
|
-
c;else for(m=this.scaleBreaks.firstBreakIndex;m<=this.scaleBreaks.lastBreakIndex;m++)g.moveTo(d,e),g.lineTo(d,this.scaleBreaks._appliedBreaks[m].startPixel+b),e=this.scaleBreaks._appliedBreaks[m].endPixel+c;e&&(g.moveTo(d,e),g.lineTo(d,h));g.stroke()}w&&
|
|
748
|
-
this.chart.height));g.restore()};
|
|
749
|
-
a:"left"===this._position||"right"===this._position?a.y:a.x;if(this.logarithmic){a=b=Math.pow(this.logarithmBase,(c-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit);if(c<=this.conversionParameters.reference===("left"===this._position||
|
|
750
|
-
e[c].
|
|
751
|
-
e[c].
|
|
752
|
-
|
|
753
|
-
e[c].startValue)
|
|
754
|
-
|
|
755
|
-
this.conversionParameters.minimum){if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size<e[c].endValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/e[c].size;break}else a+=e[c].endValue-this.conversionParameters.minimum-
|
|
756
|
-
e[c].
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
b+=e[c].size}else break;g=this.conversionParameters.minimum+a}return g};
|
|
760
|
-
0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5};
|
|
761
|
-
|
|
762
|
-
g
|
|
763
|
-
Math.max(a,g)};
|
|
764
|
-
if(this.logarithmic)for(var e=0;e<a.length&&!(this.viewportMaximum<a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&
|
|
765
|
-
a[e].endValue*
|
|
766
|
-
100*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)));else for(e=0;e<a.length&&!(this.viewportMaximum<
|
|
767
|
-
|
|
768
|
-
this.viewportMaximum<a[e].endValue&&(b=b-this.viewportMaximum+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*(this.viewportMaximum-a[e].startValue)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(this.viewportMaximum-
|
|
769
|
-
|
|
770
|
-
this.conversionParameters=g};
|
|
771
|
-
(b=600>this.maxWidth?8:6);var a=Math.max(b,Math.floor(this.maxWidth/a)),e,h,d,b=0;!n(this.options.viewportMinimum)&&(!n(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&&(this.viewportMinimum=this.viewportMaximum=null);
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
1);break}if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(e=0;e<this.dataSeries.length;e++)"dateTime"===this.dataSeries[e].xValueType&&(c=!0);e=null!==this.viewportMinimum?
|
|
775
|
-
|
|
776
|
-
e>h?(b=Math.min(0.01*Math.abs(this.getApparentDifference(h,e,null,!0)),5),0<=h?e=h-b:h=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,h,null,!0)),0.05),0!==h&&(h+=b),0!==e&&(e-=
|
|
777
|
-
null===this.viewportMinimum?e:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?h:this.viewportMaximum,null,!0);if("axisX"===this.type&&c){this.valueType=
|
|
778
|
-
b/
|
|
779
|
-
|
|
780
|
-
(
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
L.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=e-d/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=
|
|
784
|
-
"MMM DD YYYY":"
|
|
785
|
-
(
|
|
786
|
-
|
|
787
|
-
this.minimum:this.dataInfo.min,h=null!==this.maximum?this.maximum:this.dataInfo.max,
|
|
788
|
-
|
|
789
|
-
isNaN(this.
|
|
790
|
-
null===this.sessionVariables.
|
|
791
|
-
this.
|
|
792
|
-
this.
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
e=
|
|
797
|
-
|
|
798
|
-
this.
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
Math.min(0.01*(b/e),5),1<=e?b=e/d:e=b*d):(d=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=d),1!==b&&(b/=d)):(e="undefined"===
|
|
803
|
-
1>e&&(e=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?b/Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/
|
|
804
|
-
isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)
|
|
805
|
-
|
|
806
|
-
this.
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
Math.LN10),b=a/Math.pow(10,c),b=
|
|
811
|
-
|
|
812
|
-
a.
|
|
813
|
-
0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
this.
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
this.
|
|
822
|
-
|
|
823
|
-
|
|
660
|
+
m+Y+V-X,g[f].lineCoordinates.y2=m,"inside"===g[f].labelPlacement&&0<f&&(g[f].lineCoordinates.y1=g[0].lineCoordinates.y1-X-(g[f].labelEffectiveHeight||0)-5),"inside"===g[f].tickPlacement&&0<f&&(g[f].lineCoordinates.y1-=g[f].tickLength),g[f].bounds={x1:d,y1:m+(Y+V-("inside"===g[f].labelPlacement&&0===f?u[f]-5:u[f])-X),x2:t,y2:k,width:t-d},g[f].bounds.height=g[f].bounds.y2-g[f].bounds.y1,X+=("inside"===g[f].labelPlacement&&0===f?u[f]-5:u[f])+g[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)M=l.isNavigator?
|
|
661
|
+
0:10,c[f]&&(d=Math.round(a[0]?a[0].lineCoordinates.x1:g[0].lineCoordinates.x1),M=c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock.height/2:p,m=Math.round(h.y1+Y+V<Math.max(M,p)?Math.max(M,p):h.y1+Y+V),t=Math.round(a[0]?a[0].lineCoordinates.x1:g[0].lineCoordinates.x1),M=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,k=Math.round(h.y2-W-e-M),c[f].lineCoordinates={x1:d-T,y1:m,x2:t-T,y2:k,height:Math.abs(k-m)},"inside"===c[f].labelPlacement&&
|
|
662
|
+
0<f&&(c[f].lineCoordinates.x1=c[0].lineCoordinates.x1-T-(c[f].labelEffectiveWidth||0)-5,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.x1-=c[f].tickLength,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),c[f].bounds={x1:d-(("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+T),y1:m,x2:t-T,y2:k,height:k-m},c[f].bounds.width=c[f].bounds.x2-c[f].bounds.x1,c[f].title&&(c[f]._titleTextBlock.maxWidth=0<
|
|
663
|
+
c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),T+=("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&(d=Math.round(a[0]?a[0].lineCoordinates.x2:g[0].lineCoordinates.x2),t=Math.round(d),M=b[f]._labels&&0<b[f]._labels.length?b[f]._labels[b[f]._labels.length-1].textBlock.height/2:0,m=Math.round(h.y1+Y+V<Math.max(M,p)?Math.max(M,p):h.y1+Y+V),M=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?
|
|
664
|
+
b[f]._labels[0].textBlock.height/2:0,k=Math.round(h.y2-(W+e+M)),b[f].lineCoordinates={x1:d+S,y1:m,x2:d+S,y2:k,height:Math.abs(k-m)},"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.x1=b[0].lineCoordinates.x2+S+(b[f].labelEffectiveWidth||0)+5,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&0<f&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].bounds={x1:d+S,y1:m,x2:t+(("inside"===
|
|
665
|
+
b[f].labelPlacement&&0===f?B[f]-5:B[f])+S),y2:k,height:k-m},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?b[f].titleMaxWidth:b[f].lineCoordinates.height),S+=("inside"===b[f].labelPlacement&&0===f?B[f]-5:B[f])+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].calculateValueToPixelConversionParameters(),a[f].calculateBreaksSizeInValues(),a[f]._labels&&1<a[f]._labels.length&&
|
|
666
|
+
(C=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,d=a[f]._labels[a[f]._labels.length-("dateTime"===a[f].valueType?2:1)].position,d=a[f].getApparentDifference(a[f].viewportMinimum,d),G=a[f].logarithmic?(1<d?Math.log(d)/a[f].conversionParameters.lnLogarithmBase*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+
|
|
667
|
+
a[f].lineCoordinates.x1:(0<d?d*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(g&&0<g.length)for(f=0;f<g.length;f++)g[f].calculateValueToPixelConversionParameters(),g[f].calculateBreaksSizeInValues(),g[f]._labels&&1<g[f]._labels.length&&(C=(g[f].logarithmic?Math.log(g[f]._labels[1].position/g[f].viewportMinimum)/g[f].conversionParameters.lnLogarithmBase:g[f]._labels[1].position-g[f].viewportMinimum)*Math.abs(g[f].conversionParameters.pixelPerUnit)+g[f].lineCoordinates.x1,
|
|
668
|
+
d=g[f]._labels[g[f]._labels.length-("dateTime"===g[f].valueType?2:1)].position,d=g[f].getApparentDifference(g[f].viewportMinimum,d),G=g[f].logarithmic?(1<d?Math.log(d)/g[f].conversionParameters.lnLogarithmBase*Math.abs(g[f].conversionParameters.pixelPerUnit):0)+g[f].lineCoordinates.x1:(0<d?d*Math.abs(g[f].conversionParameters.pixelPerUnit):0)+g[f].lineCoordinates.x1);for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<
|
|
669
|
+
v){if(a&&0<a.length)for(f=0;f<a.length;f++)w=N[v-1][f]===N[v][f]?!0:!1;else w=!0;if(g&&0<g.length)for(f=0;f<g.length;f++)J=Q[v-1][f]===Q[v][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)K=O[v-1][f]===O[v][f]?!0:!1;else K=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)L=P[v-1][f]===P[v][f]?!0:!1;else L=!0}if(w&&J&&K&&L)break;v++}if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(g&&0<g.length)for(f=0;f<g.length;f++)g[f].calculateStripLinesThicknessInValues(),
|
|
670
|
+
g[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels()}else{p=[];C=[];H=[];x=[];G=[];s=[];N=[];for(Q=[];4>v;){W=S=T=$=M=V=e=P=O=E=Y=0;if(a&&0<a.length)for(H=[],f=S=0;f<a.length;f++)H.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateWidth():0)),S+=H[f],e+=a[f]&&!l.isNavigator?a[f].margin:0;else H.push(Math.ceil(a[0]?
|
|
671
|
+
a[0].createLabelsAndCalculateWidth():0));N.push(H);if(g&&0<g.length)for(x=[],f=W=0;f<g.length;f++)x.push(Math.ceil(g[f]?g[f].createLabelsAndCalculateWidth():0)),W+=x[f],V+=g[f]?g[f].margin:0;else x.push(Math.ceil(g[0]?g[0].createLabelsAndCalculateWidth():0));Q.push(x);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},d=Math.round(h.x1+S+e),t=Math.round(h.x2-W-V>l.width-10?l.width-10:h.x2-W-V),c[f].labelAutoFit&&!n(z)&&(0<!a.length&&(d=0>c[f].labelAngle?Math.max(d,z):0===c[f].labelAngle?
|
|
672
|
+
Math.max(d,z/2):d),0<!g.length&&(t=0<c[f].labelAngle?t-u/2:0===c[f].labelAngle?t-u/2:t)),c[f].lineCoordinates.x1=d,c[f].lineCoordinates.x2=t,c[f].lineCoordinates.width=Math.abs(t-d),c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},d=Math.round(h.x1+S+e),t=Math.round(h.x2-W-V>b[f].chart.width-10?b[f].chart.width-10:h.x2-W-V),b[f]&&
|
|
673
|
+
b[f].labelAutoFit&&!n(A)&&(0<!a.length&&(d=0<b[f].labelAngle?Math.max(d,A):0===b[f].labelAngle?Math.max(d,A/2):d),0<!g.length&&(t-=B/2)),b[f].lineCoordinates.x1=d,b[f].lineCoordinates.x2=t,b[f].lineCoordinates.width=Math.abs(t-d),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width);if(c&&0<c.length)for(p=[],f=T=0;f<c.length;f++)p.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateHeight():0)),T+=
|
|
674
|
+
p[f]+c[f].margin,M+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));G.push(p);if(b&&0<b.length)for(C=[],f=0;f<b.length;f++)C.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateHeight():0)),$+=b[f].margin;else C.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));s.push(C);if(c&&0<c.length)for(f=0;f<c.length;f++)0<c[f]._labels.length&&(k=c[f]._labels[0],m=c[f]._labels[c[f]._labels.length-1],z=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+
|
|
675
|
+
(k.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),u=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)));if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&0<b[f]._labels.length&&(k=b[f]._labels[0],m=b[f]._labels[b[f]._labels.length-1],A=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/
|
|
676
|
+
180*Math.abs(k.textBlock.angle)),B=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-m.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)));if(l.panEnabled)for(f=0;f<c.length;f++)p[f]=n(l.sessionVariables.axisY[f].height)?l.sessionVariables.axisY[f].height=p[f]:l.sessionVariables.axisY[f].height;else for(f=0;f<c.length;f++)l.sessionVariables.axisY[f].height=p[f];if(c&&0<c.length)for(f=c.length-1;0<=f;f--)m=Math.round(h.y2),k=Math.round(h.y2>
|
|
677
|
+
c[f].chart.height?c[f].chart.height:h.y2),c[f].lineCoordinates.y1=m-(p[f]+c[f].margin+Y),c[f].lineCoordinates.y2=m-(p[f]+c[f].margin+Y),"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+p[f]-(c[f]._titleTextBlock?c[f]._titleTextBlock.height:0)-c[f].tickLength-(c[f].stripLineLabelEffectiveHeight||0)-5,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.y1+=c[f].tickLength,c[f].lineCoordinates.y2=
|
|
678
|
+
c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:d,y1:m-(p[f]+Y+c[f].margin),x2:t,y2:k-(Y+c[f].margin),width:t-d,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),Y+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(m=Math.round(h.y1),k=Math.round(h.y1+(C[f]+b[f].margin+E)),b[f].lineCoordinates.y1=k,b[f].lineCoordinates.y2=k,"inside"===b[f].labelPlacement&&
|
|
679
|
+
0<f&&(b[f].lineCoordinates.y1=k-C[f]+(b[f]._titleTextBlock?b[f]._titleTextBlock.height:0)+b[f].tickLength+(b[f].stripLineLabelEffectiveHeight||0),b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&0<f&&(b[f].lineCoordinates.y1-=b[f].tickLength,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:d,y1:m+(b[f].margin+E),x2:t,y2:k,width:t-d},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=
|
|
680
|
+
0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),E+=C[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++){M=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;d=Math.round(h.x1+e);m=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(M,10)?Math.max(M,10):h.y1):h.y1<Math.max(M,10)?Math.max(M,10):h.y1;t=Math.round(h.x1+S+e);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-T>l.height-
|
|
681
|
+
Math.max(M,10)?l.height-Math.max(M,10):h.y2-T):h.y2>l.height-Math.max(M,10)?l.height-Math.max(M,10):h.y2;if(c&&0<c.length)for(M=0;M<c.length;M++)c[M]&&c[M].labelAutoFit&&(t=c[M].lineCoordinates.x1,d=0>c[M].labelAngle||0===c[M].labelAngle?t-S:d);if(b&&0<b.length)for(M=0;M<b.length;M++)b[M]&&b[M].labelAutoFit&&(t=b[M].lineCoordinates.x1,d=t-S);a[f].lineCoordinates={x1:t-O,y1:m,x2:t-O,y2:k,height:Math.abs(k-m)};"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-(H[f]-
|
|
682
|
+
(a[f]._titleTextBlock?a[f]._titleTextBlock.height:0))+a[f].tickLength+(a[f].stripLineLabelEffectiveWidth||0),a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);a[f].bounds={x1:t-(H[f]+O),y1:m,x2:t-O,y2:k,height:k-m};a[f].bounds.width=a[f].bounds.x2-a[f].bounds.x1;a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<
|
|
683
|
+
a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();O+=H[f]+a[f].margin}if(g&&0<g.length)for(f=0;f<g.length;f++){M=g[f]._labels&&0<g[f]._labels.length?g[f]._labels[0].textBlock.fontSize/2:0;d=Math.round(h.x1-e);m=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(M,10)?Math.max(M,10):h.y1):h.y1<Math.max(M,10)?Math.max(M,10):h.y1;t=Math.round(h.x2-W-V);k=c&&0<c.length?Math.round(c[0]?
|
|
684
|
+
c[0].lineCoordinates.y1:h.y2-T>l.height-Math.max(M,10)?l.height-Math.max(M,10):h.y2-T):h.y2>l.height-Math.max(M,10)?l.height-Math.max(M,10):h.y2;if(c&&0<c.length)for(M=0;M<c.length;M++)c[M]&&c[M].labelAutoFit&&(t=0>c[M].labelAngle?Math.max(t,z):0===c[M].labelAngle?Math.max(t,z/2):t,d=0>c[M].labelAngle||0===c[M].labelAngle?t-W:d);if(b&&0<b.length)for(M=0;M<b.length;M++)b[M]&&b[M].labelAutoFit&&(t=b[M].lineCoordinates.x2,d=t-W);g[f].lineCoordinates={x1:t+P,y1:m,x2:t+P,y2:k,height:Math.abs(k-m)};"inside"===
|
|
685
|
+
g[f].labelPlacement&&0<f&&(g[f].lineCoordinates.x1=g[f].lineCoordinates.x1+(x[f]-(g[f]._titleTextBlock?g[f]._titleTextBlock.height:0)-2)-g[f].tickLength-(g[f].stripLineLabelEffectiveWidth||0),g[f].lineCoordinates.x2=g[f].lineCoordinates.x1+g[f].lineThickness/2);"inside"===g[f].tickPlacement&&0<f&&(g[f].lineCoordinates.x1+=g[f].tickLength,g[f].lineCoordinates.x2=g[f].lineCoordinates.x1+g[f].lineThickness/2);g[f].bounds={x1:g[f].lineCoordinates.x1,y1:m,x2:t+x[f]+P,y2:k,width:t-d,height:k-m};g[f].bounds.width=
|
|
686
|
+
g[f].bounds.x2-g[f].bounds.x1;g[f].title&&(g[f]._titleTextBlock.maxWidth=0<g[f].titleMaxWidth&&g[f].titleMaxWidth<g[f].lineCoordinates.height?g[f].titleMaxWidth:g[f].lineCoordinates.height);g[f].calculateValueToPixelConversionParameters();g[f].calculateBreaksSizeInValues();P+=x[f]+g[f].margin}for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<v){if(a&&0<a.length)for(f=0;f<a.length;f++)w=N[v-1][f]===N[v][f]?!0:!1;else w=
|
|
687
|
+
!0;if(g&&0<g.length)for(f=0;f<g.length;f++)J=Q[v-1][f]===Q[v][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)K=G[v-1][f]===G[v][f]?!0:!1;else K=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)L=s[v-1][f]===s[v][f]?!0:!1;else L=!0}if(w&&J&&K&&L)break;v++}if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=
|
|
688
|
+
0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(g&&0<g.length)for(f=0;f<g.length;f++)g[f].calculateStripLinesThicknessInValues(),g[f].calculateBreaksInPixels()}};C.render=function(a,g,c,b,e){var h=a[0]?a[0].chart:g[0].chart;e=h.ctx;h.alignVerticalAxes&&h.alignVerticalAxes();e.save();e.beginPath();a&&a.length&&e.rect(5,a[0].bounds.y1,a[0].chart.width-10,a[a.length-1].bounds.y2);g&&g.length&&e.rect(5,g[g.length-1].bounds.y1,g[0].chart.width-10,g[0].bounds.y2);
|
|
689
|
+
e.clip();if(a&&0<a.length)for(var d=0;d<a.length;d++)a[d].renderLabelsTicksAndTitle();if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderLabelsTicksAndTitle();e.restore();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderLabelsTicksAndTitle();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderLabelsTicksAndTitle();h.preparePlotArea();h=h.plotArea;e.save();e.beginPath();e.rect(h.x1,h.y1,Math.abs(h.x2-h.x1),Math.abs(h.y2-h.y1));e.clip();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("value");
|
|
690
|
+
if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderStripLinesOfThicknessType("value");if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderInterlacedColors();if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderInterlacedColors();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderInterlacedColors();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderInterlacedColors();
|
|
691
|
+
e.restore();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderGrid(),w&&(a[d].createMask(),a[d].renderBreaksBackground());if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderGrid(),w&&(g[d].createMask(),g[d].renderBreaksBackground());if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderGrid(),w&&(c[d].createMask(),c[d].renderBreaksBackground());if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderGrid(),w&&(b[d].createMask(),b[d].renderBreaksBackground());if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderAxisLine();
|
|
692
|
+
if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderAxisLine();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderAxisLine();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderAxisLine();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("pixel");if(g&&0<g.length)for(d=0;d<g.length;d++)g[d].renderStripLinesOfThicknessType("pixel");if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderStripLinesOfThicknessType("pixel");if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderStripLinesOfThicknessType("pixel")};
|
|
693
|
+
C.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var g=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(g,c);this.stripLines[a].value=this.convertPixelToValue(Math.abs(this.convertValueToPixel(g)+this.convertValueToPixel(c))/2);this.stripLines[a].thickness=
|
|
694
|
+
b;this.stripLines[a]._thicknessType="value"}};C.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,g=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),
|
|
695
|
+
b=this.scaleBreaks&&!n(this.scaleBreaks.options.spacing),e,h=0;h<g.length;h++)e=b||!n(g[h].options.spacing),g[h].spacing=Ua(g[h].spacing,a,8,e?0.1*a:8,e?0:3)<<0,g[h].size=0>g[h].spacing?0:Math.abs(g[h].spacing/c),this.logarithmic&&(g[h].size=Math.pow(this.logarithmBase,g[h].size))};C.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=
|
|
696
|
+
null);for(var g=0;g<a.length&&!(a[g].startValue>this.conversionParameters.maximum);g++)a[g].endValue<this.conversionParameters.minimum||(n(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=g),a[g].startValue>=this.conversionParameters.minimum&&(a[g].startPixel=this.convertValueToPixel(a[g].startValue),this.scaleBreaks.lastBreakIndex=g),a[g].endValue<=this.conversionParameters.maximum&&(a[g].endPixel=this.convertValueToPixel(a[g].endValue)))}};C.prototype.renderLabelsTicksAndTitle=
|
|
697
|
+
function(){var a=this,g=!1,c=0,b=0,e=1,h=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,d,n=this.viewportMaximum,m=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>
|
|
698
|
+
this.viewportMaximum||!(k===this._labels.length-1||d<Math.log(n/p.position)*m/e)||(c.push(p),n=p.position,d=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(d=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=d);c>this.lineCoordinates.width*
|
|
699
|
+
e&&this.labelAutoFit&&(g=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],l,n=this.viewportMaximum,m=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(k===this._labels.length-1||l<Math.log(n/p.position)*m)||(c.push(p),n=p.position,l=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+
|
|
700
|
+
p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(l=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=l);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(g=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});
|
|
701
|
+
var k=0,p,q;if("bottom"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||
|
|
702
|
+
(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock.fontSize/2):q.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.fontSize/2+5):0>this.labelAngle?(q.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),q.y="inside"===this.labelPlacement?q.y-("inside"===this.tickPlacement?this.tickLength:0)-(p.textBlock.height-p.textBlock.fontSize/
|
|
703
|
+
2)*Math.cos(Math.PI/180*this.labelAngle):q.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))):(q.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,q.y="inside"===this.labelPlacement?q.y-("inside"===this.tickPlacement?this.tickLength:0)-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(p.textBlock.height-p.textBlock.fontSize/
|
|
704
|
+
2)*Math.cos(Math.PI/180*this.labelAngle):q.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;
|
|
705
|
+
a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock.fontSize/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,
|
|
706
|
+
this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),
|
|
707
|
+
g&&0!==h++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):0>this.labelAngle?(q.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,q.y="inside"===this.labelPlacement?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*
|
|
708
|
+
Math.sin(Math.PI/180*this.labelAngle)+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):q.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)):(q.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),q.y="inside"===this.labelPlacement?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):q.y-("inside"===
|
|
709
|
+
this.tickPlacement?0:this.tickLength)-2-((p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=
|
|
710
|
+
a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock.fontSize/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===
|
|
711
|
+
this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
712
|
+
(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?
|
|
713
|
+
this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:
|
|
714
|
+
0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
|
|
715
|
+
a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock.fontSize/2+1,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===
|
|
716
|
+
this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),g&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
717
|
+
(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-
|
|
718
|
+
("inside"===this.tickPlacement?this.tickLength:0)-5:q.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+
|
|
719
|
+
(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<
|
|
720
|
+
0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock.fontSize/2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}h=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",
|
|
721
|
+
function(){for(k=0;k<a._labels.length;k++)p=a._labels[k],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||g&&0!==h++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||g&&0!==h++%2&&this.labelAutoFit)||p.textBlock.render(!0)};C.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,g,c,b=this.chart.plotArea,
|
|
722
|
+
e=0;g=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)g?(g=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,g.x),b.y1,Math.abs(c.x-g.x),Math.abs(b.y1-b.y2)),g=!1):g=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=
|
|
723
|
+
this.interlacedColor,e=0;e<this._labels.length;e++)g?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),g=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x1,Math.min(c.y,g.y),Math.abs(b.x1-b.x2),Math.abs(g.y-c.y)),g=!1):g=!0;a.beginPath()};C.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var g=this,c,b,e=0,h=0,d=!1;b=!1;for(var m=[],
|
|
724
|
+
t=[],k=!1,e=0;e<this.stripLines.length;e++){var l=this.stripLines[e];l._thicknessType===a&&("pixel"===a&&(l.value<this.viewportMinimum||l.value>this.viewportMaximum||n(l.value)||isNaN(this.range))||"value"===a&&(l.startValue<=this.viewportMinimum&&l.endValue<=this.viewportMinimum||l.startValue>=this.viewportMaximum&&l.endValue>=this.viewportMaximum||n(l.startValue)||n(l.endValue)||isNaN(this.range))||m.push(l))}for(e=0;e<this._stripLineLabels.length;e++)if(l=this.stripLines[e],c=this._stripLineLabels[e],
|
|
725
|
+
!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){l&&(this.ctx.strokeStyle=l.color,this.ctx.lineWidth="pixel"===l._thicknessType?l.thickness:this.tickThickness);if("bottom"===this._position){var p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,b.y<<0);this.ctx.lineTo(p,b.y+this.tickLength<<0);this.ctx.stroke();0===this.labelAngle?(b.x-=c.textBlock.width/
|
|
726
|
+
2,b.y+=this.tickLength+c.textBlock.fontSize/2+5):(b.x-=0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y+=this.tickLength+5+(0>this.labelAngle?Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,b.y<<0),this.ctx.lineTo(p,
|
|
727
|
+
b.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y-=this.tickLength+c.textBlock.height-c.textBlock.fontSize/2):(b.x-=0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,b.y-=this.tickLength+2+(0<this.labelAngle?(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)))):"left"===
|
|
728
|
+
this._position?(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,p),this.ctx.lineTo(b.x-this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?b.x=b.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:(b.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),b.x-=this.tickLength+5+(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle):c.textBlock.width*
|
|
729
|
+
Math.cos(Math.PI/180*this.labelAngle)-(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)))):"right"===this._position&&(p=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,p),this.ctx.lineTo(b.x+this.tickLength<<0,p),this.ctx.stroke(),b.x=0===this.labelAngle?b.x+this.tickLength+5:this.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/
|
|
730
|
+
180*this.labelAngle)));c.textBlock.x=b.x;c.textBlock.y=b.y;t.push(c)}else l._thicknessType===a&&(c.textBlock.angle=-90,"bottom"===this._position?(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-l.thickness/2>this.chart.plotArea.x1?n(l.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=
|
|
731
|
+
90,n(l.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y1+c.textBlock.width+3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-
|
|
732
|
+
c.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-l.thickness/2>this.chart.plotArea.x1?n(l.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,n(l.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/
|
|
733
|
+
2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+c.textBlock.width+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y2-c.textBlock.width-3):"left"===this._position?
|
|
734
|
+
(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),b.y-c.textBlock.height-l.thickness/2>this.chart.plotArea.y1?n(l.startValue)?b.y-=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2:n(l.startValue)?b.y+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.y+=c.textBlock.height/2-c.textBlock.fontSize+3,b.x="near"===
|
|
735
|
+
c.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x2-c.textBlock.width-3):"right"===this._position&&(c.textBlock.maxWidth=this.options.stripLines[e].labelMaxWidth?this.options.stripLines[e].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),b.y-c.textBlock.height-l.thickness/2>this.chart.plotArea.y1?n(l.startValue)?b.y-=c.textBlock.height-c.textBlock.fontSize/
|
|
736
|
+
2+l.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2:n(l.startValue)?b.y+=c.textBlock.height-c.textBlock.fontSize/2+l.thickness/2:b.y-=c.textBlock.height/2-c.textBlock.fontSize/2+3,b.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x1+3),c.textBlock.x=b.x,c.textBlock.y=b.y,t.push(c));if(!k){b=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,
|
|
737
|
+
this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(e=0;e<m.length;e++)l=m[e],l.showOnTop?d||(d=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(h=0;h<m.length;h++)l=m[h],l.showOnTop&&l.render();this.ctx.restore()},l)):l.render();for(e=0;e<t.length;e++)c=t[e],c.stripLine.showOnTop?
|
|
738
|
+
b||(b=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(h=0;h<t.length;h++)c=t[h],"inside"===c.stripLine.labelPlacement&&c.stripLine.showOnTop&&(g.ctx.save(),g.ctx.beginPath(),g.ctx.rect(g.chart.plotArea.x1,g.chart.plotArea.y1,g.chart.plotArea.width,g.chart.plotArea.height),g.ctx.clip(),c.textBlock.render(!0),g.ctx.restore())},c.textBlock)):"inside"===c.stripLine.labelPlacement&&c.textBlock.render(!0);this.ctx.restore();k=!0}if(k)for(b=!1,e=0;e<t.length;e++)c=t[e],"outside"===
|
|
739
|
+
c.stripLine.labelPlacement&&c.textBlock.render(!0)}};C.prototype.renderBreaksBackground=function(){this.chart._breaksCanvas&&(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length&&this.maskCanvas)&&(this.chart._breaksCanvasCtx.save(),this.chart._breaksCanvasCtx.beginPath(),this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height),this.chart._breaksCanvasCtx.clip(),this.chart._breaksCanvasCtx.drawImage(this.maskCanvas,
|
|
740
|
+
0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx.restore())};C.prototype.createMask=function(){if(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;w?(this.maskCanvas=ua(this.chart.width,this.chart.height),this.maskCtx=this.maskCanvas.getContext("2d")):(this.maskCanvas=this.chart.plotArea.canvas,this.maskCtx=this.chart.plotArea.ctx);this.maskCtx.save();this.maskCtx.beginPath();this.maskCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,
|
|
741
|
+
this.chart.plotArea.width,this.chart.plotArea.height);this.maskCtx.clip();for(var g=0;g<a.length;g++)a[g].endValue<this.viewportMinimum||(a[g].startValue>this.viewportMaximum||isNaN(this.range))||a[g].render(this.maskCtx);this.maskCtx.restore()}};C.prototype.renderCrosshair=function(a,g){isFinite(this.minimum)&&isFinite(this.maximum)&&this.crosshair.render(a,g)};C.prototype.showCrosshair=function(a){n(a)||(a<this.viewportMinimum||a>this.viewportMaximum)||("top"===this._position||"bottom"===this._position?
|
|
742
|
+
this.crosshair.render(this.convertValueToPixel(a),null,a):this.crosshair.render(null,this.convertValueToPixel(a),a))};C.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var g,c=this.chart.plotArea;a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(G(this.gridDashType,this.gridThickness));if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||
|
|
743
|
+
(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),g=this.getPixelCoordinatesOnAxis(this._labels[b].position),g=1===a.lineWidth%2?(g.x<<0)+0.5:g.x<<0,a.moveTo(g,c.y1<<0),a.lineTo(g,c.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),g=this.getPixelCoordinatesOnAxis(this._labels[b].position),
|
|
744
|
+
g=1===a.lineWidth%2?(g.y<<0)+0.5:g.y<<0,a.moveTo(c.x1<<0,g),a.lineTo(c.x2<<0,g),a.stroke());a.restore()}};C.prototype.renderAxisLine=function(){var a=this.chart.ctx,g=w?this.chart._preRenderCtx:a,c=Math.ceil(this.tickThickness/(this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),e,h;g.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(e=this.lineCoordinates.x2,h=this.lineCoordinates.x1):(e=this.lineCoordinates.x1,h=this.lineCoordinates.x2);
|
|
745
|
+
g.lineWidth=this.lineThickness;g.strokeStyle=this.lineColor?this.lineColor:"black";g.setLineDash&&g.setLineDash(G(this.lineDashType,this.lineThickness));var d=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;g.beginPath();if(this.scaleBreaks&&!n(this.scaleBreaks.firstBreakIndex))if(n(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(var m=this.scaleBreaks.firstBreakIndex;m<=this.scaleBreaks.lastBreakIndex;m++)g.moveTo(e,
|
|
746
|
+
d),g.lineTo(this.scaleBreaks._appliedBreaks[m].startPixel+c,d),e=this.scaleBreaks._appliedBreaks[m].endPixel+b;e&&(g.moveTo(e,d),g.lineTo(h,d));g.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){this.reversed?(e=this.lineCoordinates.y1,h=this.lineCoordinates.y2):(e=this.lineCoordinates.y2,h=this.lineCoordinates.y1);g.lineWidth=this.lineThickness;g.strokeStyle=this.lineColor;g.setLineDash&&g.setLineDash(G(this.lineDashType,this.lineThickness));d=1===this.lineThickness%
|
|
747
|
+
2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0;g.beginPath();if(this.scaleBreaks&&!n(this.scaleBreaks.firstBreakIndex))if(n(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+c;else for(m=this.scaleBreaks.firstBreakIndex;m<=this.scaleBreaks.lastBreakIndex;m++)g.moveTo(d,e),g.lineTo(d,this.scaleBreaks._appliedBreaks[m].startPixel+b),e=this.scaleBreaks._appliedBreaks[m].endPixel+c;e&&(g.moveTo(d,e),g.lineTo(d,h));g.stroke()}w&&
|
|
748
|
+
(a.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx&&this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),g.clearRect(0,0,this.chart.width,this.chart.height));g.restore()};C.prototype.getPixelCoordinatesOnAxis=function(a){var g={};if("bottom"===this._position||"top"===this._position)g.x=this.convertValueToPixel(a),g.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)g.y=
|
|
749
|
+
this.convertValueToPixel(a),g.x=this.lineCoordinates.x2;return g};C.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var g=0,c=0,b,g=!0,e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;if(this.logarithmic){a=b=Math.pow(this.logarithmBase,(c-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit);if(c<=this.conversionParameters.reference===("left"===this._position||
|
|
750
|
+
"right"===this._position)!==this.reversed)for(c=0;c<e.length;c++){if(!(e[c].endValue<this.conversionParameters.minimum))if(g)if(e[c].startValue<this.conversionParameters.minimum){if(1<e[c].size&&this.conversionParameters.minimum*Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size))<e[c].endValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].endValue/this.conversionParameters.minimum/Math.pow(e[c].size,Math.log(e[c].endValue/this.conversionParameters.minimum)/
|
|
751
|
+
Math.log(e[c].endValue/e[c].startValue)),b/=Math.pow(e[c].size,Math.log(e[c].endValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue));g=!1}else if(b>e[c].startValue/this.conversionParameters.minimum){b/=e[c].startValue/this.conversionParameters.minimum;if(b<e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1===e[c].size?1:Math.log(b)/Math.log(e[c].size))/b;break}else a*=e[c].endValue/e[c].startValue/e[c].size;b/=e[c].size;g=!1}else break;else if(b>e[c].startValue/e[c-
|
|
752
|
+
1].endValue){b/=e[c].startValue/e[c-1].endValue;if(b<e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1===e[c].size?1:Math.log(b)/Math.log(e[c].size))/b;break}else a*=e[c].endValue/e[c].startValue/e[c].size;b/=e[c].size}else break}else for(c=e.length-1;0<=c;c--)if(!(e[c].startValue>this.conversionParameters.minimum))if(g)if(e[c].endValue>this.conversionParameters.minimum){if(1<e[c].size&&this.conversionParameters.minimum*Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size))>
|
|
753
|
+
e[c].startValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].startValue/this.conversionParameters.minimum*Math.pow(e[c].size,Math.log(e[c].startValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue))*b,b*=Math.pow(e[c].size,Math.log(this.conversionParameters.minimum/e[c].startValue)/Math.log(e[c].endValue/e[c].startValue));g=!1}else if(b<e[c].endValue/this.conversionParameters.minimum){b/=e[c].endValue/this.conversionParameters.minimum;
|
|
754
|
+
if(b>1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size;g=!1}else break;else if(b<e[c].endValue/e[c+1].startValue){b/=e[c].endValue/e[c+1].startValue;if(b>1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size}else break;g=a*this.viewportMinimum}else{a=b=(c-this.conversionParameters.reference)/
|
|
755
|
+
this.conversionParameters.pixelPerUnit;if(c<=this.conversionParameters.reference===("left"===this._position||"right"===this._position)!==this.reversed)for(c=0;c<e.length;c++){if(!(e[c].endValue<this.conversionParameters.minimum))if(g)if(e[c].startValue<this.conversionParameters.minimum){if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size<e[c].endValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/e[c].size;break}else a+=e[c].endValue-this.conversionParameters.minimum-
|
|
756
|
+
e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue),b-=e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue);g=!1}else if(b>e[c].startValue-this.conversionParameters.minimum){b-=e[c].startValue-this.conversionParameters.minimum;if(b<e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)-b;break}else a+=e[c].endValue-e[c].startValue-e[c].size;b-=e[c].size;g=!1}else break;else if(b>e[c].startValue-e[c-
|
|
757
|
+
1].endValue){b-=e[c].startValue-e[c-1].endValue;if(b<e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)-b;break}else a+=e[c].endValue-e[c].startValue-e[c].size;b-=e[c].size}else break}else for(c=e.length-1;0<=c;c--)if(!(e[c].startValue>this.conversionParameters.minimum))if(g)if(e[c].endValue>this.conversionParameters.minimum)if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size>e[c].startValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/
|
|
758
|
+
e[c].size;break}else a+=e[c].startValue-this.conversionParameters.minimum+e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),b+=e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),g=!1;else if(b<e[c].endValue-this.conversionParameters.minimum){b-=e[c].endValue-this.conversionParameters.minimum;if(b>-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-
|
|
759
|
+
e[c].size;b+=e[c].size;g=!1}else break;else if(b<e[c].endValue-e[c+1].startValue){b-=e[c].endValue-e[c+1].startValue;if(b>-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-e[c].size;b+=e[c].size}else break;g=this.conversionParameters.minimum+a}return g};C.prototype.convertValueToPixel=function(a){a=this.getApparentDifference(this.conversionParameters.minimum,a,a);return this.logarithmic?this.conversionParameters.reference+
|
|
760
|
+
this.conversionParameters.pixelPerUnit*Math.log(a/this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:"axisX"===this.type?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5};C.prototype.getApparentDifference=function(a,g,c,b){var e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];
|
|
761
|
+
if(this.logarithmic){c=n(c)?g/a:c;for(var h=0;h<e.length&&!(g<e[h].startValue);h++)a>e[h].endValue||(a<=e[h].startValue&&g>=e[h].endValue?c=c/e[h].endValue*e[h].startValue*e[h].size:a>=e[h].startValue&&g>=e[h].endValue?c=c/e[h].endValue*a*Math.pow(e[h].size,Math.log(e[h].endValue/a)/Math.log(e[h].endValue/e[h].startValue)):a<=e[h].startValue&&g<=e[h].endValue?c=c/g*e[h].startValue*Math.pow(e[h].size,Math.log(g/e[h].startValue)/Math.log(e[h].endValue/e[h].startValue)):!b&&(a>e[h].startValue&&g<e[h].endValue)&&
|
|
762
|
+
(c=a*Math.pow(e[h].size,Math.log(g/a)/Math.log(e[h].endValue/e[h].startValue))))}else for(c=n(c)?Math.abs(g-a):c,h=0;h<e.length&&!(g<e[h].startValue);h++)a>e[h].endValue||(a<=e[h].startValue&&g>=e[h].endValue?c=c-e[h].endValue+e[h].startValue+e[h].size:a>e[h].startValue&&g>=e[h].endValue?c=c-e[h].endValue+a+e[h].size*(e[h].endValue-a)/(e[h].endValue-e[h].startValue):a<=e[h].startValue&&g<e[h].endValue?c=c-g+e[h].startValue+e[h].size*(g-e[h].startValue)/(e[h].endValue-e[h].startValue):!b&&(a>e[h].startValue&&
|
|
763
|
+
g<e[h].endValue)&&(c=a+e[h].size*(g-a)/(e[h].endValue-e[h].startValue)));return c};C.prototype.setViewPortRange=function(a,g){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,g);this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(a,g)};C.prototype.getXValueAt=function(a){if(!a)return null;var g=null;"left"===this._position?g=this.convertPixelToValue(a.y):"bottom"===this._position&&(g=this.convertPixelToValue(a.x));return g};C.prototype.calculateValueToPixelConversionParameters=
|
|
764
|
+
function(a){a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];var g={pixelPerUnit:null,minimum:null,reference:null},c=this.lineCoordinates.width,b=this.lineCoordinates.height,c="bottom"===this._position||"top"===this._position?c:b,b=Math.abs(this.range);if(this.logarithmic)for(var e=0;e<a.length&&!(this.viewportMaximum<a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&
|
|
765
|
+
this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100):c-Math.min(a[e].spacing,0.1*c)):this.viewportMinimum>a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*this.viewportMinimum,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*Math.log(a[e].endValue/this.viewportMinimum)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(a[e].endValue/
|
|
766
|
+
this.viewportMinimum)/Math.log(a[e].endValue/a[e].startValue)):this.viewportMinimum<=a[e].startValue&&this.viewportMaximum<a[e].endValue&&(b=b/this.viewportMaximum*a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)));else for(e=0;e<a.length&&!(this.viewportMaximum<
|
|
767
|
+
a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100):c-Math.min(a[e].spacing,0.1*c)):this.viewportMinimum>a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+this.viewportMinimum,c=0<a[e].spacing.toString().indexOf("%")?
|
|
768
|
+
c*(1-parseFloat(a[e].spacing)/100*(a[e].endValue-this.viewportMinimum)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(a[e].endValue-this.viewportMinimum)/(a[e].endValue-a[e].startValue)):this.viewportMinimum<=a[e].startValue&&this.viewportMaximum<a[e].endValue&&(b=b-this.viewportMaximum+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*(this.viewportMaximum-a[e].startValue)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(this.viewportMaximum-
|
|
769
|
+
a[e].startValue)/(a[e].endValue-a[e].startValue)));g.minimum=this.viewportMinimum;g.maximum=this.viewportMaximum;g.range=b;if("bottom"===this._position||"top"===this._position)this.logarithmic?(g.lnLogarithmBase=Math.log(this.logarithmBase),g.pixelPerUnit=(this.reversed?-1:1)*c*g.lnLogarithmBase/Math.log(Math.abs(b))):g.pixelPerUnit=(this.reversed?-1:1)*c/Math.abs(b),g.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)this.logarithmic?
|
|
770
|
+
(g.lnLogarithmBase=Math.log(this.logarithmBase),g.pixelPerUnit=(this.reversed?1:-1)*c*g.lnLogarithmBase/Math.log(Math.abs(b))):g.pixelPerUnit=(this.reversed?1:-1)*c/Math.abs(b),g.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;this.conversionParameters=g};C.prototype.calculateAxisParameters=function(){if(this.logarithmic)this.calculateLogarithmicAxisParameters();else{var a=this.chart.layoutManager.getFreeSpace(),g=!1,c=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=
|
|
771
|
+
a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40,b=4;"axisX"===this.type&&(b=600>this.maxWidth?8:6);var a=Math.max(b,Math.floor(this.maxWidth/a)),e,h,d,b=0;!n(this.options.viewportMinimum)&&(!n(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&&(this.viewportMinimum=this.viewportMaximum=null);
|
|
772
|
+
if(n(this.options.viewportMinimum)&&!n(this.sessionVariables.newViewportMinimum)&&!isNaN(this.sessionVariables.newViewportMinimum))this.viewportMinimum=this.sessionVariables.newViewportMinimum;else if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(n(this.options.viewportMaximum)&&!n(this.sessionVariables.newViewportMaximum)&&!isNaN(this.sessionVariables.newViewportMaximum))this.viewportMaximum=this.sessionVariables.newViewportMaximum;else if(null===this.viewportMaximum||
|
|
773
|
+
isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(b=0;b<this.scaleBreaks._appliedBreaks.length;b++)if((!n(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue||!n(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[b].startValue||!n(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue)&&(!n(this.sessionVariables.newViewportMaximum)&&
|
|
774
|
+
this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue||!n(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[b].endValue||!n(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue)){this.scaleBreaks._appliedBreaks.splice(b,1);break}if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(e=0;e<this.dataSeries.length;e++)"dateTime"===this.dataSeries[e].xValueType&&(c=!0);e=null!==this.viewportMinimum?
|
|
775
|
+
this.viewportMinimum:this.dataInfo.viewPortMin;h=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax;0===h-e&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,h+=b,e-=b);Infinity!==this.dataInfo.minDiff?d=this.dataInfo.minDiff:1<h-e?d=0.5*Math.abs(h-e):(d=1,c&&(g=!0))}else"axisY"===this.type&&(e=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,h=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(e)||
|
|
776
|
+
isFinite(h)?isFinite(e)?isFinite(h)||(h=e):e=h:(h="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),0===e&&0===h?(h+=9,e=0):0===h-e?(b=Math.min(Math.abs(0.01*Math.abs(h)),5),h+=b,e-=b):e>h?(b=Math.min(0.01*Math.abs(this.getApparentDifference(h,e,null,!0)),5),0<=h?e=h-b:h=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,h,null,!0)),0.05),0!==h&&(h+=b),0!==e&&(e-=
|
|
777
|
+
b)),d=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<h-e?0.5*Math.abs(h-e):1,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<e&&(e=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>h&&(h=0));b=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?e:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?h:this.viewportMaximum,null,!0);if("axisX"===this.type&&c){this.valueType=
|
|
778
|
+
"dateTime";this.intervalType||(b/1<=a?(this.interval=1,this.intervalType="millisecond"):b/2<=a?(this.interval=2,this.intervalType="millisecond"):b/5<=a?(this.interval=5,this.intervalType="millisecond"):b/10<=a?(this.interval=10,this.intervalType="millisecond"):b/20<=a?(this.interval=20,this.intervalType="millisecond"):b/50<=a?(this.interval=50,this.intervalType="millisecond"):b/100<=a?(this.interval=100,this.intervalType="millisecond"):b/200<=a?(this.interval=200,this.intervalType="millisecond"):
|
|
779
|
+
b/250<=a?(this.interval=250,this.intervalType="millisecond"):b/300<=a?(this.interval=300,this.intervalType="millisecond"):b/400<=a?(this.interval=400,this.intervalType="millisecond"):b/500<=a?(this.interval=500,this.intervalType="millisecond"):b/(1*L.secondDuration)<=a?(this.interval=1,this.intervalType="second"):b/(2*L.secondDuration)<=a?(this.interval=2,this.intervalType="second"):b/(5*L.secondDuration)<=a?(this.interval=5,this.intervalType="second"):b/(10*L.secondDuration)<=a?(this.interval=10,
|
|
780
|
+
this.intervalType="second"):b/(15*L.secondDuration)<=a?(this.interval=15,this.intervalType="second"):b/(20*L.secondDuration)<=a?(this.interval=20,this.intervalType="second"):b/(30*L.secondDuration)<=a?(this.interval=30,this.intervalType="second"):b/(1*L.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):b/(2*L.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):b/(5*L.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):b/(10*L.minuteDuration)<=a?(this.interval=
|
|
781
|
+
10,this.intervalType="minute"):b/(15*L.minuteDuration)<=a?(this.interval=15,this.intervalType="minute"):b/(20*L.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):b/(30*L.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):b/(1*L.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):b/(2*L.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):b/(3*L.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):b/(6*L.hourDuration)<=a?(this.interval=6,this.intervalType=
|
|
782
|
+
"hour"):b/(1*L.dayDuration)<=a?(this.interval=1,this.intervalType="day"):b/(2*L.dayDuration)<=a?(this.interval=2,this.intervalType="day"):b/(4*L.dayDuration)<=a?(this.interval=4,this.intervalType="day"):b/(1*L.weekDuration)<=a?(this.interval=1,this.intervalType="week"):b/(2*L.weekDuration)<=a?(this.interval=2,this.intervalType="week"):b/(3*L.weekDuration)<=a?(this.interval=3,this.intervalType="week"):b/(1*L.monthDuration)<=a?(this.interval=1,this.intervalType="month"):b/(2*L.monthDuration)<=a?(this.interval=
|
|
783
|
+
2,this.intervalType="month"):b/(3*L.monthDuration)<=a?(this.interval=3,this.intervalType="month"):b/(6*L.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=b/(1*L.yearDuration)<=a?1:b/(2*L.yearDuration)<=a?2:b/(4*L.yearDuration)<=a?4:Math.floor(C.getNiceNumber(b/(a-1),!0)/L.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=e-d/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=
|
|
784
|
+
h+d/2;g?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=
|
|
785
|
+
"hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString="fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";b=C.getNiceNumber(b,!1);this.interval=this.options&&0<this.options.interval?this.options.interval:C.getNiceNumber(b/(a-1),!0);if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?e-d/2:Math.floor(e/this.interval)*this.interval;if(null===this.viewportMaximum||
|
|
786
|
+
isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?h+d/2:Math.ceil(h/this.interval)*this.interval;0===this.viewportMaximum&&0===this.viewportMinimum&&(0===this.options.viewportMinimum?this.viewportMaximum+=10:0===this.options.viewportMaximum&&(this.viewportMinimum-=10),this.options&&"undefined"===typeof this.options.interval&&(this.interval=C.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)))}if(null===this.minimum||null===this.maximum)if("axisX"===this.type?(e=
|
|
787
|
+
null!==this.minimum?this.minimum:this.dataInfo.min,h=null!==this.maximum?this.maximum:this.dataInfo.max,0===h-e&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,h+=b,e-=b),d=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<h-e?0.5*Math.abs(h-e):1):"axisY"===this.type&&(e=null!==this.minimum?this.minimum:this.dataInfo.min,h=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(e)||isFinite(h)?0===e&&0===h?(h+=9,e=0):0===h-e?(b=Math.min(Math.abs(0.01*Math.abs(h)),
|
|
788
|
+
5),h+=b,e-=b):e>h?(b=Math.min(0.01*Math.abs(this.getApparentDifference(h,e,null,!0)),5),0<=h?e=h-b:h=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,h,null,!0)),0.05),0!==h&&(h+=b),0!==e&&(e-=b)):(h="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),d=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<h-e?0.5*Math.abs(h-e):1,this.includeZero&&(null===this.minimum||
|
|
789
|
+
isNaN(this.minimum))&&0<e&&(e=0),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&0>h&&(h=0)),Math.abs(this.getApparentDifference(e,h,null,!0)),"axisX"===this.type&&c){this.valueType="dateTime";if(null===this.minimum||isNaN(this.minimum))this.minimum=e-d/2,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum);if(null===this.maximum||isNaN(this.maximum))this.maximum=
|
|
790
|
+
h+d/2,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)}else this.intervalType=this.valueType="number",null===this.minimum&&(this.minimum="axisX"===this.type?e-d/2:Math.floor(e/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),
|
|
791
|
+
null===this.maximum&&(this.maximum="axisX"===this.type?h+d/2:Math.ceil(h/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));n(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));
|
|
792
|
+
n(this.sessionVariables.newViewportMaximum)&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&c?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/this.interval)*this.interval;this.valueFormatString||(this.valueFormatString=C.generateValueFormatString(this.range,2))}};C.prototype.calculateLogarithmicAxisParameters=
|
|
793
|
+
function(){var a=this.chart.layoutManager.getFreeSpace(),g=Math.log(this.logarithmBase),c;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3),b,e,h,d;d=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||
|
|
794
|
+
isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(d=0;d<this.scaleBreaks._appliedBreaks.length;d++)if((!n(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[d].startValue||!n(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[d].startValue||!n(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[d].startValue)&&(!n(this.sessionVariables.newViewportMaximum)&&
|
|
795
|
+
this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[d].endValue||!n(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[d].endValue||!n(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[d].endValue)){this.scaleBreaks._appliedBreaks.splice(d,1);break}"axisX"===this.type?(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,
|
|
796
|
+
1===e/b&&(d=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),e*=d,b/=d),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=b&&!isFinite(e)?(e="undefined"===typeof this.options.interval?0:
|
|
797
|
+
this.options.interval,b=1):0>=b?b=e:isFinite(e)||(e=b),1===b&&1===e?(e*=this.logarithmBase-1/this.logarithmBase,b=1):1===e/b?(d=Math.min(e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),e*=d,b/=d):b>e?(d=Math.min(b/e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=e?b=e/d:e=b*d):(d=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=d),1!==b&&(b/=d)),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?
|
|
798
|
+
e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1<b&&(b=1),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&1>e&&(e=1));d=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);var m=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)-(isNaN(this.viewportMinimum)||
|
|
799
|
+
null===this.viewportMinimum?b:this.viewportMinimum);this.intervalType="number";d=Math.pow(this.logarithmBase,C.getNiceNumber(Math.abs(Math.log(d)/g),!1));this.options&&0<this.options.interval?this.interval=this.options.interval:(this.interval=C.getNiceExponent(Math.log(d)/g/(a-1),!0),c=C.getNiceNumber(m/(a-1),!0));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?b/Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/g/this.interval));
|
|
800
|
+
if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?e*Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(e)/g/this.interval));1===this.viewportMaximum&&1===this.viewportMinimum&&(1===this.options.viewportMinimum?this.viewportMaximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.viewportMaximum&&(this.viewportMinimum/=this.logarithmBase-1/this.logarithmBase),this.options&&"undefined"===typeof this.options.interval&&
|
|
801
|
+
(this.interval=C.getNiceExponent(Math.ceil(Math.log(d)/g)/(a-1)),c=C.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)));if(null===this.minimum||null===this.maximum)"axisX"===this.type?(b=null!==this.minimum?this.minimum:this.dataInfo.min,e=null!==this.maximum?this.maximum:this.dataInfo.max,1===e/b&&(d=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),e*=d,b/=d),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?
|
|
802
|
+
e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.minimum?this.minimum:this.dataInfo.min,e=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(b)||isFinite(e)?1===b&&1===e?(e*=this.logarithmBase,b/=this.logarithmBase):1===e/b?(d=Math.pow(this.logarithmBase,this.interval),e*=d,b/=d):b>e?(d=Math.min(0.01*(b/e),5),1<=e?b=e/d:e=b*d):(d=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=d),1!==b&&(b/=d)):(e="undefined"===
|
|
803
|
+
typeof this.options.interval?0:this.options.interval,b=1),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<b&&(b=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>e&&(e=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?b/Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/
|
|
804
|
+
g/this.interval)),n(null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)||(this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:
|
|
805
|
+
this.sessionVariables.viewportMinimum))),null===this.maximum&&(this.maximum="axisX"===this.type?e*Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(e)/g/this.interval)),n(null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)||(this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||
|
|
806
|
+
isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum))),1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,
|
|
807
|
+
this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum||this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum=(this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);b=
|
|
808
|
+
Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(g*this.interval)+0.2)*this.interval);this.range=this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>a?2:3)){for(g=Math.floor(this.viewportMinimum/c+0.5)*c;g<this.viewportMinimum;)g+=c;this.equidistantInterval=!1;this.intervalStartPosition=g;this.interval=c}else this.options.interval||(c=Math.ceil(this.interval),this.range>this.interval&&
|
|
809
|
+
(this.interval=c,b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(g*this.interval)+0.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=b;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){g=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(g)||!isFinite(g))g=2;if(2<g)for(d=0;d<g-2;d++)this.valueFormatString+="#"}};C.generateValueFormatString=function(a,g){var c="#,##0.",b=g;1>a&&(b+=Math.floor(Math.abs(Math.log(a)/
|
|
810
|
+
Math.LN10)),isNaN(b)||!isFinite(b))&&(b=g);for(var e=0;e<b;e++)c+="#";return c};C.getNiceExponent=function(a,g){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=0>c?1>=b?1:5>=b?5:10:Math.max(Math.floor(b),1);return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};C.getNiceNumber=function(a,g){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=g?1.5>b?1:3>b?2:7>b?5:10:1>=b?1:2>=b?2:5>=b?5:10;return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};
|
|
811
|
+
C.prototype.getLabelStartPoint=function(){var a=L[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||
|
|
812
|
+
0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+(7-a.getDay())),a.setHours(0),a.setMinutes(0),
|
|
813
|
+
a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),a.setDate(1),a.setHours(0),a.setMinutes(0),
|
|
814
|
+
a.setSeconds(0),a.setMilliseconds(0));return a};pa(ea,T);pa(ca,T);ca.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var g=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Da(this.parent[this.optionsName]),g=this.parent.options[this.optionsName].indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options[this.optionsName][g]=this.options}};ca.prototype.render=function(a){if(0!==
|
|
815
|
+
this.spacing||0!==this.options.lineThickness&&("undefined"!==typeof this.options.lineThickness||0!==this.parent.lineThickness)){var g=this.ctx,c=this.ctx.globalAlpha;this.ctx=a||this.ctx;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();var b=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue),e=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=
|
|
816
|
+
this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;X(this.id);var d,r,m,n,k,l;a=Math.max(this.spacing,3);var p=Math.max(0,this.lineThickness);this.ctx.lineWidth=p;this.ctx.setLineDash&&this.ctx.setLineDash(G(this.lineDashType,p));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===p%2?(b.x<<0)+0.5:b.x<<0,r=1===p%2?(e.x<<0)+0.5:e.x<<0,"top"===this.scaleBreaks.parent._position?(e=this.chart.plotArea.y1,m=this.chart.plotArea.y2+
|
|
817
|
+
p/2+0.5<<0):(e=this.chart.plotArea.y2,m=this.chart.plotArea.y1-p/2+0.5<<0,a*=-1),this.bounds={x1:b-p/2,y1:e,x2:r+p/2,y2:m},this.ctx.moveTo(b,e),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&0>=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,m),this.ctx.lineTo(r,m),this.ctx.lineTo(r,e);else if("wavy"===this.type){n=b;k=e;d=0.5;l=(m-k)/a/3;for(var q=0;q<l;q++)this.ctx.bezierCurveTo(n+d*a,k+a,n+d*a,k+2*a,n,k+3*a),k+=3*a,d*=-1;this.ctx.bezierCurveTo(n+d*a,
|
|
818
|
+
k+a,n+d*a,k+2*a,n,k+3*a);n=r;d*=-1;this.ctx.lineTo(n,k);for(q=0;q<l;q++)this.ctx.bezierCurveTo(n+d*a,k-a,n+d*a,k-2*a,n,k-3*a),k-=3*a,d*=-1}else{if("zigzag"===this.type){d=-1;k=e+a;n=b+a;l=(m-k)/a/2;for(q=0;q<l;q++)this.ctx.lineTo(n,k),n+=2*d*a,k+=2*a,d*=-1;this.ctx.lineTo(n,k);n+=r-b;for(q=0;q<l+1;q++)this.ctx.lineTo(n,k),n+=2*d*a,k-=2*a,d*=-1;this.ctx.lineTo(n+d*a,k+a)}}else if("left"===this.scaleBreaks.parent._position||"right"===this.scaleBreaks.parent._position)if(e=1===p%2?(e.y<<0)+0.5:e.y<<
|
|
819
|
+
0,m=1===p%2?(b.y<<0)+0.5:b.y<<0,"left"===this.scaleBreaks.parent._position?(b=this.chart.plotArea.x1,r=this.chart.plotArea.x2+p/2+0.5<<0):(b=this.chart.plotArea.x2,r=this.chart.plotArea.x1-p/2+0.5<<0,a*=-1),this.bounds={x1:b,y1:e-p/2,x2:r,y2:m+p/2},this.ctx.moveTo(b,e),"straight"===this.type||"left"===this.scaleBreaks.parent._position&&0>=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(r,e),this.ctx.lineTo(r,m),this.ctx.lineTo(b,m);else if("wavy"===this.type){n=b;k=e;d=0.5;l=
|
|
820
|
+
(r-n)/a/3;for(q=0;q<l;q++)this.ctx.bezierCurveTo(n+a,k+d*a,n+2*a,k+d*a,n+3*a,k),n+=3*a,d*=-1;this.ctx.bezierCurveTo(n+a,k+d*a,n+2*a,k+d*a,n+3*a,k);k=m;d*=-1;this.ctx.lineTo(n,k);for(q=0;q<l;q++)this.ctx.bezierCurveTo(n-a,k+d*a,n-2*a,k+d*a,n-3*a,k),n-=3*a,d*=-1}else if("zigzag"===this.type){d=1;k=e-a;n=b+a;l=(r-n)/a/2;for(q=0;q<l;q++)this.ctx.lineTo(n,k),k+=2*d*a,n+=2*a,d*=-1;this.ctx.lineTo(n,k);k+=m-e;for(q=0;q<l+1;q++)this.ctx.lineTo(n,k),k+=2*d*a,n-=2*a,d*=-1;this.ctx.lineTo(n+a,k+d*a)}0<p&&this.ctx.stroke();
|
|
821
|
+
this.ctx.closePath();this.ctx.globalAlpha=this.fillOpacity;this.ctx.globalCompositeOperation="destination-over";this.ctx.fill();this.ctx.restore();this.ctx.globalAlpha=c;this.ctx=g}};pa(Q,T);Q.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var g=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Da(this.parent.stripLines),g=this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===
|
|
822
|
+
typeof a?{}:a;this.parent.options.stripLines[g]=this.options}};Q.prototype.render=function(){this.ctx.save();var a=this.parent.getPixelCoordinatesOnAxis(this.value),g=Math.abs("pixel"===this._thicknessType?this.thickness:Math.abs(this.parent.convertValueToPixel(this.endValue)-this.parent.convertValueToPixel(this.startValue)));if(0<g){var c=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;X(this.id);var e,d,n,
|
|
823
|
+
m;this.ctx.lineWidth=g;this.ctx.setLineDash&&this.ctx.setLineDash(G(this.lineDashType,g));if("bottom"===this.parent._position||"top"===this.parent._position)e=d=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,n=this.chart.plotArea.y1,m=this.chart.plotArea.y2,this.bounds={x1:e-g/2,y1:n,x2:d+g/2,y2:m};else if("left"===this.parent._position||"right"===this.parent._position)n=m=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,e=this.chart.plotArea.x1,d=this.chart.plotArea.x2,this.bounds={x1:e,y1:n-g/2,x2:d,
|
|
824
|
+
y2:m+g/2};this.ctx.moveTo(e,n);this.ctx.lineTo(d,m);this.ctx.stroke();this.ctx.globalAlpha=b}this.ctx.restore()};pa(da,T);da.prototype.showAt=function(a){if(!this.enabled)return!1;var g=this.chart,c=!1;g.resetOverlayedCanvas();g.clearedOverlayedCanvas=this.parent.type;this.chart.renderCrosshairs(this.parent);if("xySwapped"===g.plotInfo.axisPlacement)if("bottom"===this.parent._position)for(var b=0;b<g.axisY.length;b++)this.parent===g.axisY[b]&&(g.axisY[b]._crosshairValue=a>=g.axisY[b].viewportMinimum&&
|
|
824
825
|
a<=g.axisY[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<g.axisY2.length;b++)this.parent===g.axisY2[b]&&(g.axisY2[b]._crosshairValue=a>=g.axisY2[b].viewportMinimum&&a<=g.axisY2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=0;b<g.axisX.length;b++)this.parent===g.axisX[b]&&(g.axisX[b]._crosshairValue=a>=g.axisX[b].viewportMinimum&&a<=g.axisX[b].viewportMaximum?a:null);else{if("right"===this.parent._position)for(b=0;b<g.axisX2.length;b++)this.parent===
|
|
825
826
|
g.axisX2[b]&&(g.axisX2[b]._crosshairValue=a>=g.axisX2[b].viewportMinimum&&a<=g.axisX2[b].viewportMaximum?a:null)}else if("bottom"===this.parent._position)for(b=0;b<g.axisX.length;b++)this.parent===g.axisX[b]&&(g.axisX[b]._crosshairValue=a>=g.axisX[b].viewportMinimum&&a<=g.axisX[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<g.axisX2.length;b++)this.parent===g.axisX2[b]&&(g.axisX2[b]._crosshairValue=a>=g.axisX2[b].viewportMinimum&&a<=g.axisX2[b].viewportMaximum?a:null);
|
|
826
827
|
else if("left"===this.parent._position)for(b=0;b<g.axisY.length;b++)this.parent===g.axisY[b]&&(g.axisY[b]._crosshairValue=a>=g.axisY[b].viewportMinimum&&a<=g.axisY[b].viewportMaximum?a:null);else if("right"===this.parent._position)for(b=0;b<g.axisY2.length;b++)this.parent===g.axisY2[b]&&(g.axisY2[b]._crosshairValue=a>=g.axisY2[b].viewportMinimum&&a<=g.axisY2[b].viewportMaximum?a:null);for(b=0;b<g.axisX.length;b++)a=g.axisX[b]._crosshairValue,g.axisX[b].crosshair&&(g.axisX[b].crosshair.enabled&&!n(a)&&
|
|
827
828
|
a>=g.axisX[b].viewportMinimum&&a<=g.axisX[b].viewportMaximum)&&(g.axisX[b].showCrosshair(a),g.axisX[b].crosshair._updatedValue=a,this===g.axisX[b].crosshair&&(c=!0));for(b=0;b<g.axisX2.length;b++)a=g.axisX2[b]._crosshairValue,g.axisX2[b].crosshair&&(g.axisX2[b].crosshair.enabled&&!n(a)&&a>=g.axisX2[b].viewportMinimum&&a<=g.axisX2[b].viewportMaximum)&&(g.axisX2[b].showCrosshair(a),g.axisX2[b].crosshair._updatedValue=a,this===g.axisX2[b].crosshair&&(c=!0));for(b=0;b<g.axisY.length;b++)a=g.axisY[b]._crosshairValue,
|
|
828
829
|
g.axisY[b].crosshair&&(g.axisY[b].crosshair.enabled&&!n(a)&&a>=g.axisY[b].viewportMinimum&&a<=g.axisY[b].viewportMaximum)&&(g.axisY[b].showCrosshair(a),g.axisY[b].crosshair._updatedValue=a,this===g.axisY[b].crosshair&&(c=!0));for(b=0;b<g.axisY2.length;b++)a=g.axisY2[b]._crosshairValue,g.axisY2[b].crosshair&&(g.axisY2[b].crosshair.enabled&&!n(a)&&a>=g.axisY2[b].viewportMinimum&&a<=g.axisY2[b].viewportMaximum)&&(g.axisY2[b].showCrosshair(a),g.axisY2[b].crosshair._updatedValue=a,this===g.axisY2[b].crosshair&&
|
|
829
830
|
(c=!0));this.chart.toolTip&&this.chart.toolTip._entries&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return c};da.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.renderCrosshairs(this.parent);this._hidden=!0};da.prototype.render=function(a,g,c){var b,e,d,r,m=null,t=null,k=null,l="";this.valueFormatString||("dateTime"===this.parent.valueType?this.valueFormatString=this.parent.valueFormatString:(k=0,k="xySwapped"===this.chart.plotInfo.axisPlacement?50<this.parent.range?
|
|
830
|
-
0:500<this.chart.width&&25>this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0):50<this.parent.range?0:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0),this.valueFormatString=
|
|
831
|
+
0:500<this.chart.width&&25>this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0):50<this.parent.range?0:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0),this.valueFormatString=C.generateValueFormatString(this.parent.range,k)));var p=null===this.opacity?1:this.opacity,q=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*
|
|
831
832
|
this.thickness),f=this.chart.overlaidCanvasCtx,w=f.globalAlpha;f.beginPath();f.strokeStyle=this.color;f.lineWidth=q;f.save();this.labelFontSize=Math.abs(n(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize);this.labelMaxWidth=n(this.options.labelMaxWidth)?0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=n(this.options.labelWrap)||this.labelWrap?0.3*this.chart.height:2*this.labelFontSize;0<q&&f.setLineDash&&f.setLineDash(G(this.lineDashType,q));k=new ja(f,{x:0,y:0,
|
|
832
833
|
padding:{top:2,right:3,bottom:2,left:4},backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxWidth:this.labelMaxWidth,maxHeight:this.labelMaxHeight,angle:this.labelAngle,text:l,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"});if(this.snapToDataPoint){var v=
|
|
833
834
|
0,l=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var x=null;if("bottom"===this.parent._position||"top"===this.parent._position)v=this.parent.dataSeries[0].axisX.convertPixelToValue({y:g});else if("left"===this.parent._position||"right"===this.parent._position)v=this.parent.convertPixelToValue({y:g});for(var s=0;s<this.parent.dataSeries.length;s++)(x=this.parent.dataSeries[s].getDataPointAtX(v,!0))&&0<=x.index&&(x.dataSeries=this.parent.dataSeries[s],null!==x.dataPoint.y&&x.dataSeries.visible&&
|
|
834
|
-
l.push(x));x=null;if(0===l.length)return;l.sort(function(a,b){return a.distance-b.distance});var z=x=0;yPercent=cumulativeY=0;for(var v=Infinity,u,s=0;s<l.length;s++){if("rangeBar"===l[s].dataSeries.type||"error"===l[s].dataSeries.type){if(l[s].dataPoint.y)for(var
|
|
835
|
+
l.push(x));x=null;if(0===l.length)return;l.sort(function(a,b){return a.distance-b.distance});var z=x=0;yPercent=cumulativeY=0;for(var v=Infinity,u,s=0;s<l.length;s++){if("rangeBar"===l[s].dataSeries.type||"error"===l[s].dataSeries.type){if(l[s].dataPoint.y)for(var A=0;A<l[s].dataPoint.y.length;A++)z=Math.abs(a-this.parent.convertValueToPixel(l[s].dataPoint.y[A])),z<=v&&(v=z,x=s)}else"stackedBar"===l[s].dataSeries.type?(cumulativeY=l[s].dataSeries.dataPointEOs[l[s].index].cumulativeY,z=Math.abs(a-
|
|
835
836
|
this.parent.convertValueToPixel(cumulativeY)),z<=v&&(v=z,x=s)):"stackedBar100"===l[s].dataSeries.type?(z=l[0].dataPoint.x.getTime?l[0].dataPoint.x.getTime():l[0].dataPoint.x,n(u)&&(u=Math.abs(a-this.parent.convertValueToPixel(100*(l[0].dataSeries.dataPointEOs[l[0].index].cumulativeY/l[0].dataSeries.plotUnit.dataPointYSums[z])))),cumulativeY=l[s].dataSeries.dataPointEOs[l[s].index].cumulativeY,z=l[s].dataPoint.x.getTime?l[s].dataPoint.x.getTime():l[s].dataPoint.x,yPercent=100*(cumulativeY/l[s].dataSeries.plotUnit.dataPointYSums[z]),
|
|
836
837
|
z=Math.abs(a-this.parent.convertValueToPixel(yPercent)),z<=u&&(u=z,x=s)):(z=Math.abs(a-this.parent.convertValueToPixel(l[s].dataPoint.y)),z<=v&&(v=z,x=s));n(u)||(v=Math.min(v,u))}u=l[x];s=0;if("bottom"===this.parent._position||"top"===this.parent._position){if("rangeBar"===u.dataSeries.type||"error"===u.dataSeries.type){v=Math.abs(a-this.parent.convertValueToPixel(u.dataPoint.y[0]));for(l=0;l<u.dataPoint.y.length;l++)z=Math.abs(a-this.parent.convertValueToPixel(u.dataPoint.y[l])),z<v&&(v=z,s=l);m=
|
|
837
838
|
1===f.lineWidth%2?(this.parent.convertValueToPixel(u.dataPoint.y[s])<<0)+0.5:this.parent.convertValueToPixel(u.dataPoint.y[s])<<0;this.value=u.dataPoint.y[s];k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:u.dataPoint.y[s]}):n(this.options.label)?fa(n(c)?u.dataPoint.y[s]:c,this.valueFormatString,this.chart._cultureInfo):this.label}else"stackedBar"===u.dataSeries.type?(v=Math.abs(a-this.parent.convertValueToPixel(l[0].dataPoint.y)),
|
|
@@ -847,7 +848,7 @@ b){return a.distance-b.distance});u=l[0];b=e=m=1===f.lineWidth%2?(this.parent.co
|
|
|
847
848
|
s=0;s<this.parent.dataSeries.length;s++)(x=this.parent.dataSeries[s].getDataPointAtX(v,!0))&&0<=x.index&&(k.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:u.dataPoint.x}):n(this.options.label)?x.dataPoint.label:this.label)}else k.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:u.dataPoint.x}):n(this.options.label)?
|
|
848
849
|
fa(u.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:u.dataPoint.x}):n(this.options.label)?Ca(u.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=u.dataPoint.x;k.x=b-k.measureText().width/2;k.x+k.width>this.chart.bounds.x2&&(k.x=this.chart.bounds.x2-k.width);k.x<this.chart.bounds.x1&&(k.x=this.chart.bounds.x1);"bottom"===this.parent._position?
|
|
849
850
|
k.y=this.parent.lineCoordinates.y2+k.fontSize/2+2:"top"===this.parent._position&&(k.y=this.parent.lineCoordinates.y1-k.height+k.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position){!n(this.parent.dataSeries)&&0<this.parent.dataSeries.length&&(v=this.parent.dataSeries[0].axisX.convertPixelToValue({x:a}));for(s=0;s<this.parent.dataSeries.length;s++)(x=this.parent.dataSeries[s].getDataPointAtX(v,!0))&&0<=x.index&&(x.dataSeries=this.parent.dataSeries[s],null!==x.dataPoint.y&&
|
|
850
|
-
x.dataSeries.visible&&l.push(x));if(0===l.length)return;l.sort(function(a,b){return a.distance-b.distance});z=x=0;v=Infinity;for(s=0;s<l.length;s++){if("rangeColumn"===l[s].dataSeries.type||"rangeArea"===l[s].dataSeries.type||"error"===l[s].dataSeries.type||"rangeSplineArea"===l[s].dataSeries.type||"candlestick"===l[s].dataSeries.type||"ohlc"===l[s].dataSeries.type||"boxAndWhisker"===l[s].dataSeries.type){if(l[s].dataPoint.y)for(
|
|
851
|
+
x.dataSeries.visible&&l.push(x));if(0===l.length)return;l.sort(function(a,b){return a.distance-b.distance});z=x=0;v=Infinity;for(s=0;s<l.length;s++){if("rangeColumn"===l[s].dataSeries.type||"rangeArea"===l[s].dataSeries.type||"error"===l[s].dataSeries.type||"rangeSplineArea"===l[s].dataSeries.type||"candlestick"===l[s].dataSeries.type||"ohlc"===l[s].dataSeries.type||"boxAndWhisker"===l[s].dataSeries.type){if(l[s].dataPoint.y)for(A=0;A<l[s].dataPoint.y.length;A++)z=Math.abs(g-this.parent.convertValueToPixel(l[s].dataPoint.y[A])),
|
|
851
852
|
z<=v&&(v=z,x=s)}else"stackedColumn"===l[s].dataSeries.type?(b=l[s].dataSeries.dataPointEOs[l[s].index].cumulativeY,z=Math.abs(g-this.parent.convertValueToPixel(b)),z<=v&&(v=z,x=s)):"stackedArea"===l[s].dataSeries.type?(b=l[s].dataSeries.dataPointEOs[l[s].index].cumulativeY,z=Math.abs(g-this.parent.convertValueToPixel(b)),z<=v&&(v=z,x=s)):"stackedColumn100"===l[s].dataSeries.type||"stackedArea100"===l[s].dataSeries.type?(z=l[0].dataPoint.x.getTime?l[0].dataPoint.x.getTime():l[0].dataPoint.x,n(u)&&
|
|
852
853
|
(u=Math.abs(g-this.parent.convertValueToPixel(100*(l[0].dataSeries.dataPointEOs[l[0].index].cumulativeY/l[0].dataSeries.plotUnit.dataPointYSums[z])))),"stackedColumn100"===l[s].dataSeries.type?(t=l[s].dataSeries.dataPointEOs[l[s].index].cumulativeY,z=l[s].dataPoint.x.getTime?l[s].dataPoint.x.getTime():l[s].dataPoint.x,b=100*(t/l[s].dataSeries.plotUnit.dataPointYSums[z]),z=Math.abs(g-this.parent.convertValueToPixel(b)),z<=u&&(u=z,x=s)):"stackedArea100"===l[s].dataSeries.type&&(t=l[s].dataSeries.dataPointEOs[l[s].index].cumulativeY,
|
|
853
854
|
z=l[s].dataPoint.x.getTime?l[s].dataPoint.x.getTime():l[s].dataPoint.x,b=100*(t/l[s].dataSeries.plotUnit.dataPointYSums[z]),z=Math.abs(g-this.parent.convertValueToPixel(b)),z<=u&&(u=z,x=s))):"waterfall"===l[s].dataSeries.type?(z=Math.abs(g-this.parent.convertValueToPixel(l[s].dataSeries.dataPointEOs[l[s].index].cumulativeSum)),z<=v&&(u=v=z,x=s)):(z=Math.abs(g-this.parent.convertValueToPixel(l[s].dataPoint.y)),z<=v&&(v=z,x=s));n(u)||(v=Math.min(v,u))}u=l[x];s=0;if("rangeColumn"===u.dataSeries.type||
|
|
@@ -904,7 +905,7 @@ d.size=Math.max(1.5*d.size<<0,10),d.borderColor=d.borderColor||"#FFFFFF",d.borde
|
|
|
904
905
|
g.stroke(),g.beginPath(),g.moveTo(e.x3-b,Math.max(e.y1,e.y4)),g.lineTo(e.x3-b,Math.max(e.y2,e.y3)),g.stroke(),aa(g,e.x1,Math.min(e.y1,e.y4),e.x2,Math.max(e.y1,e.y4),"transparent",2*e.borderThickness,e.color,!1,!1,!1,!1),g.globalAlpha=1):"ohlc"===b.type?(g.globalAlpha=1,g.strokeStyle=e.color,g.lineWidth=2*e.borderThickness,b=0===g.lineWidth%2?0:0.5,g.beginPath(),g.moveTo(e.x3-b,e.y2),g.lineTo(e.x3-b,e.y3),g.stroke(),g.beginPath(),g.moveTo(e.x3,e.y1),g.lineTo(e.x1,e.y1),g.stroke(),g.beginPath(),g.moveTo(e.x3,
|
|
905
906
|
e.y4),g.lineTo(e.x2,e.y4),g.stroke(),g.globalAlpha=1):"boxAndWhisker"===b.type?(g.save(),g.globalAlpha=1,g.strokeStyle=e.stemColor,g.lineWidth=2*e.stemThickness,0<e.stemThickness&&(g.beginPath(),g.moveTo(e.x3,e.y2+e.borderThickness/2),g.lineTo(e.x3,e.y1+e.whiskerThickness/2),g.stroke(),g.beginPath(),g.moveTo(e.x3,e.y4-e.whiskerThickness/2),g.lineTo(e.x3,e.y3-e.borderThickness/2),g.stroke()),g.beginPath(),aa(g,e.x1,Math.max(e.y2,e.y3),e.x2,Math.min(e.y2,e.y3),"transparent",2*e.borderThickness,e.color,
|
|
906
907
|
!1,!1,!1,!1),g.globalAlpha=1,g.strokeStyle=e.whiskerColor,g.lineWidth=2*e.whiskerThickness,0<e.whiskerThickness&&(g.beginPath(),g.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y4),g.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y4),g.stroke(),g.beginPath(),g.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y1),g.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y1),g.stroke()),g.globalAlpha=1,g.strokeStyle=e.lineColor,g.lineWidth=2*e.lineThickness,0<e.lineThickness&&(g.beginPath(),g.moveTo(e.x1,e.y5),g.lineTo(e.x2,
|
|
907
|
-
e.y5),g.stroke()),g.restore(),g.globalAlpha=1):"error"===b.type&&
|
|
908
|
+
e.y5),g.stroke()),g.restore(),g.globalAlpha=1):"error"===b.type&&A(g,e.x1,e.y1,e.x2,e.y2,"white",e.whiskerProperties,e.stemProperties,e.isXYSwapped,0.3))}}g.restore();g.globalAlpha=1;g.beginPath()};na.prototype.getToolTipInnerHTML=function(a){a=a.entries;var g=null,c=null,b=null,e=0,d="";this.isToolTipDefinedInData=!0;for(var n=0;n<a.length;n++)if(a[n].dataSeries.toolTipContent||a[n].dataPoint.toolTipContent){this.isToolTipDefinedInData=!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===
|
|
908
909
|
typeof this.content||this.contentFormatter))a={chart:this.chart,toolTip:this.options,entries:a},g=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var m=null,t="",n=0;n<a.length;n++){c=a[n].dataSeries;b=a[n].dataPoint;e=a[n].index;d="";if(0===n&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?t+="undefined"!==typeof this.chart.axisX[0].labels[b.x]?this.chart.axisX[0].labels[b.x]:
|
|
909
910
|
"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(t+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}");t+="</br>";if(!c.visible)continue;t=this.chart.replaceKeywordsWithValue(t,b,c,e)}null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent||("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||
|
|
910
911
|
"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(d+=m!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),d+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y}",
|
|
@@ -942,7 +943,7 @@ function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestA
|
|
|
942
943
|
la,c.canvas.height/la)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/la,b.height/la);c.restore()}},fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/la,c.canvas.height/la);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,
|
|
943
944
|
d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},W={drawMarker:function(a,d,c,b,e,h,m,n){if(c){var t=1;c.fillStyle=h?h:"#000000";c.strokeStyle=m?m:"#000000";c.lineWidth=n?n:0;c.setLineDash&&c.setLineDash(G("solid",n));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),h&&c.fill(),n&&(m?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):
|
|
944
945
|
"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),h&&c.fill(),n&&(m?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),h&&c.fill(),n&&(m?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):"cross"===b&&(c.strokeStyle=h,c.lineWidth=e/4,c.beginPath(),c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/
|
|
945
|
-
2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];W.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return m}();t.version="v3.8.
|
|
946
|
+
2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];W.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return m}();t.version="v3.8.12 GA";window.CanvasJS&&(t&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=t)})();
|
|
946
947
|
|
|
947
948
|
/*
|
|
948
949
|
excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
|