@canvasjs/stockcharts 1.10.10 → 1.10.11
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.stock.min.js +219 -219
- package/package.json +1 -1
package/canvasjs.stock.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS StockChart - v1.10.
|
|
2
|
+
CanvasJS StockChart - v1.10.11 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
(function(){function ia(l,Z){l.prototype=mb(Z.prototype);l.prototype.constructor=l;l.base=Z.prototype}function mb(l){function Z(){}Z.prototype=l;return new Z}function bb(l,Z,f){"millisecond"===f?l.setMilliseconds(l.getMilliseconds()+1*Z):"second"===f?l.setSeconds(l.getSeconds()+1*Z):"minute"===f?l.setMinutes(l.getMinutes()+1*Z):"hour"===f?l.setHours(l.getHours()+1*Z):"day"===f?l.setDate(l.getDate()+1*Z):"week"===f?l.setDate(l.getDate()+7*Z):"month"===f?l.setMonth(l.getMonth()+1*Z):"year"===f&&l.setFullYear(l.getFullYear()+
|
|
21
21
|
1*Z);return l}function qa(l,Z){var f=!1;0>l&&(f=!0,l*=-1);l=""+l;for(Z=Z?Z:1;l.length<Z;)l="0"+l;return f?"-"+l:l}function Oa(l){if(!l)return l;l=l.replace(/^\s\s*/,"");for(var Z=/\s/,f=l.length;Z.test(l.charAt(--f)););return l.slice(0,f+1)}function Ea(l){l.roundRect=function(l,f,v,I,$,y,u,z){u&&(this.fillStyle=u);z&&(this.strokeStyle=z);"undefined"===typeof $&&($=5);this.lineWidth=y;this.beginPath();this.moveTo(l+$,f);this.lineTo(l+v-$,f);this.quadraticCurveTo(l+v,f,l+v,f+$);this.lineTo(l+v,f+I-
|
|
22
22
|
$);this.quadraticCurveTo(l+v,f+I,l+v-$,f+I);this.lineTo(l+$,f+I);this.quadraticCurveTo(l,f+I,l,f+I-$);this.lineTo(l,f+$);this.quadraticCurveTo(l,f,l+$,f);this.closePath();u&&this.fill();z&&0<y&&this.stroke()}}function Ya(l,f){return l-f}function cb(l,f,q){if(l&&f&&q){q=q+"."+f;var v="image/"+f;l=l.toDataURL(v);var I=!1,$=document.createElement("a");$.download=q;$.href=l;if("undefined"!==typeof Blob&&new Blob){for(var y=l.replace(/^data:[a-z\/]*;base64,/,""),y=atob(y),u=new ArrayBuffer(y.length),u=
|
|
23
|
-
new Uint8Array(u),z=0;z<y.length;z++)u[z]=y.charCodeAt(z);f=new Blob([u.buffer],{type:"image/"+f});try{window.navigator.msSaveBlob(f,q),I=!0}catch(O){$.dataset.downloadurl=[v,$.download,$.href].join(":"),$.href=window.URL.createObjectURL(f)}}if(!I)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),$.dispatchEvent?$.dispatchEvent(event):$.fireEvent&&$.fireEvent("onclick")}catch(
|
|
23
|
+
new Uint8Array(u),z=0;z<y.length;z++)u[z]=y.charCodeAt(z);f=new Blob([u.buffer],{type:"image/"+f});try{window.navigator.msSaveBlob(f,q),I=!0}catch(O){$.dataset.downloadurl=[v,$.download,$.href].join(":"),$.href=window.URL.createObjectURL(f)}}if(!I)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),$.dispatchEvent?$.dispatchEvent(event):$.fireEvent&&$.fireEvent("onclick")}catch(C){f=window.open(),f.document.write("<img src='"+l+"'></img><div>Please right click on the image and save it to your device</div>"),
|
|
24
24
|
f.document.close()}}}function V(l){var f=((l&16711680)>>16).toString(16),q=((l&65280)>>8).toString(16);l=((l&255)>>0).toString(16);f=2>f.length?"0"+f:f;q=2>q.length?"0"+q:q;l=2>l.length?"0"+l:l;return"#"+f+q+l}function nb(l,f){var q=this.length>>>0,v=Number(f)||0,v=0>v?Math.ceil(v):Math.floor(v);for(0>v&&(v+=q);v<q;v++)if(v in this&&this[v]===l)return v;return-1}function f(l){return null===l||"undefined"===typeof l}function xa(l){l.indexOf||(l.indexOf=nb);return l}function ob(l){if(Ca.fSDec)l[va("`eeDwdouMhrudods")](va("e`u`@ohl`uhnoHuds`uhnoDoe"),
|
|
25
25
|
function(){Ca._fTWm&&Ca._fTWm(l)})}function db(l,f,q){q=q||"normal";var v=l+"_"+f+"_"+q,I=eb[v];if(isNaN(I)){try{if(!Fa){var $=document.body;Fa=document.createElement("span");Fa.innerHTML="";var y=document.createTextNode("Mpgyi");Fa.appendChild(y);$.appendChild(Fa)}Fa.style.display="";Q(Fa,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:l,fontSize:f+"px",fontWeight:q});I=Math.round(Fa.offsetHeight);Fa.style.display=
|
|
26
26
|
"none"}catch(u){I=Math.ceil(1.1*f)}I=Math.max(I,f);eb[v]=I}return I}function U(l,f){var q=[];if(q={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[l||"solid"])for(var v=0;v<q.length;v++)q[v]*=f;else q=[];return q}function z(l,Z,q,v,I){v=v||[];I=f(I)?pb?{passive:!1,capture:!1}:!1:I;v.push([l,Z,q,I]);return l.addEventListener?(l.addEventListener(Z,q,
|
|
@@ -62,48 +62,48 @@ risingColor:"white",fallingColor:"red",fillOpacity:null,startAngle:0,radius:null
|
|
|
62
62
|
yValueFormatString:null,zValueFormatString:null,percentFormatString:null,showInLegend:!1,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:v?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:v?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",
|
|
63
63
|
chart:"readOnly"}},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",textAlign:"left",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",
|
|
64
64
|
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(" ")}},Pa={en:{}},u=v?"Trebuchet MS, Helvetica, sans-serif":"Arial",Aa=v?"Impact, Charcoal, sans-serif":"Arial",pa={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),
|
|
65
|
-
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(" ")},L,X,N,ea,ta;X="#333333";N="#000000";L="#666666";ta=ea="#000000";var ga=20,
|
|
66
|
-
margin:5},subtitles:[{fontFamily:Aa,fontSize:
|
|
67
|
-
labelFontSize:
|
|
68
|
-
labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:
|
|
69
|
-
lineDashType:"solid"}}],axisY:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
70
|
-
labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
71
|
-
labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:
|
|
72
|
-
toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};L="#2A2A2A";N=X="#F5F5F5";L="#FFFFFF";ea="#40BAF1";ta="#F5F5F5";var ga=20,
|
|
73
|
-
indexLabelFontSize:
|
|
74
|
-
color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:
|
|
75
|
-
tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:
|
|
76
|
-
titleFontSize:ga,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
77
|
-
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
78
|
-
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:
|
|
79
|
-
fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};N=X="#F5F5F5";L="#FFFFFF";ea="#40BAF1";ta="#F5F5F5";ga=20;
|
|
80
|
-
verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:u,indexLabelFontSize:
|
|
81
|
-
lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:
|
|
82
|
-
titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
83
|
-
lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
84
|
-
color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:
|
|
85
|
-
tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:
|
|
86
|
-
fontColor:X,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:N,backgroundColor:"rgba(0, 0, 0, .7)"}};L="#FFFFFF";N=X="#FAFAFA";ea="#40BAF1";ta="#F5F5F5";ga=20;
|
|
87
|
-
margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:u,indexLabelFontSize:
|
|
88
|
-
tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:
|
|
89
|
-
titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
90
|
-
lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:
|
|
91
|
-
color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:
|
|
92
|
-
tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:
|
|
65
|
+
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(" ")},L,X,N,ea,ta;X="#333333";N="#000000";L="#666666";ta=ea="#000000";var ga=20,C=14,Ga={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Aa,fontSize:32,fontColor:X,fontWeight:"normal",verticalAlign:"top",
|
|
66
|
+
margin:5},subtitles:[{fontFamily:Aa,fontSize:C,fontColor:X,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:u,indexLabelFontSize:C,indexLabelFontColor:X,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,
|
|
67
|
+
labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,
|
|
68
|
+
labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,
|
|
69
|
+
lineDashType:"solid"}}],axisY:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
|
|
70
|
+
labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",
|
|
71
|
+
labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:u,fontSize:14,fontColor:X,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},
|
|
72
|
+
toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};L="#2A2A2A";N=X="#F5F5F5";L="#FFFFFF";ea="#40BAF1";ta="#F5F5F5";var ga=20,C=14,Ia={colorSet:"colorSet2",title:{fontFamily:u,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},subtitles:[{fontFamily:u,fontSize:C,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:u,
|
|
73
|
+
indexLabelFontSize:C,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,
|
|
74
|
+
color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",
|
|
75
|
+
tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:u,
|
|
76
|
+
titleFontSize:ga,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
|
|
77
|
+
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:u,labelFontSize:C,
|
|
78
|
+
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:u,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,
|
|
79
|
+
fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};N=X="#F5F5F5";L="#FFFFFF";ea="#40BAF1";ta="#F5F5F5";ga=20;C=14;Aa={colorSet:"colorSet1",backgroundColor:"#2A2A2A",title:{fontFamily:Aa,fontSize:32,fontColor:X,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Aa,fontSize:C,fontColor:X,fontWeight:"normal",
|
|
80
|
+
verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:u,indexLabelFontSize:C,indexLabelFontColor:N,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,
|
|
81
|
+
lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:u,
|
|
82
|
+
titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,
|
|
83
|
+
lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,
|
|
84
|
+
color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,
|
|
85
|
+
tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:u,fontSize:14,
|
|
86
|
+
fontColor:X,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:N,backgroundColor:"rgba(0, 0, 0, .7)"}};L="#FFFFFF";N=X="#FAFAFA";ea="#40BAF1";ta="#F5F5F5";ga=20;C=14;ea={colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:u,fontSize:32,fontColor:X,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:u,fontSize:C,fontColor:X,fontWeight:"normal",verticalAlign:"top",
|
|
87
|
+
margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:u,indexLabelFontSize:C,indexLabelFontColor:N,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,
|
|
88
|
+
tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:u,
|
|
89
|
+
titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:1,lineColor:L,tickThickness:1,tickColor:L,gridThickness:0,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,
|
|
90
|
+
lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:0,lineColor:L,tickThickness:1,tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,
|
|
91
|
+
color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:u,titleFontSize:ga,titleFontColor:N,titleFontWeight:"normal",labelFontFamily:u,labelFontSize:C,labelFontColor:N,labelFontWeight:"normal",lineThickness:0,lineColor:L,tickThickness:1,
|
|
92
|
+
tickColor:L,gridThickness:1,gridColor:L,stripLines:[{labelFontFamily:u,labelFontSize:C,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:u,labelFontSize:C,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ta,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:u,fontSize:14,
|
|
93
93
|
fontColor:X,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:u,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:N,backgroundColor:"rgba(0, 0, 0, .7)"}};var Qa={light1:Ga,light2:Ia,dark1:Aa,dark2:ea,theme1:Ga,theme2:Ia,theme3:Ga},Y={numberDuration:1,yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")};
|
|
94
94
|
(function(){Ca.fSDec=function(l){for(var f="",q=0;q<l.length;q++)f+=String.fromCharCode(Math.ceil(l.length/57/5)^l.charCodeAt(q));return f};delete fa[Ca.fSDec("Bi`su")][Ca.fSDec("bsdehuIsdg")];Ca.pro={sCH:fa[Ca.fSDec("Bi`su")][Ca.fSDec("bsdehuIsdg")]}})();var pb=function(){var l=!1;try{var f=Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){l=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,f),window.removeEventListener("test",null,f))}catch(q){l=
|
|
95
95
|
!1}return l}(),eb={},Fa=null,jb=function(l){var Z=0,q=0;this.options.width?Z=this.width:this.width=Z=0<this.container.clientWidth?this.container.clientWidth:this.width;f(this.stockChart)||f(this.index)?this.options.height?q=this.height:this.height=q=0<this.container.clientHeight?this.container.clientHeight:this.height:q=this.height=this.stockChart._chartsHeight[this.index];if(this.canvas.width!==Z*ka||this.canvas.height!==q*ka){for(var v=0;v<l.length;v++)Ua(l[v],Z,q);this.bounds={x1:0,y1:0,x2:this.width,
|
|
96
96
|
y2:this.height,width:this.width,height:this.height};return!0}return!1},kb=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))},Da=function(l){l.width=1;l.height=1;l.getContext("2d")&&l.getContext("2d").clearRect(0,0,1,1)},lb=function(l,f,q){f=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=f?12:11,Math.round(f*(l/400)))},ra=function(){var l=/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,
|
|
97
|
-
f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),q="Sun Mon Tue Wed Thu Fri Sat".split(" "),v="January February March April May June July August September October November December".split(" "),I="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,y=/[^-+\dA-Z]/g;return function(z,
|
|
98
|
-
q,N=O?O.shortMonths:I;O="";var d=!1;z=z&&z.getTime?z:z?new Date(z):new Date;if(isNaN(z))throw SyntaxError("invalid date");"UTC:"===
|
|
97
|
+
f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),q="Sun Mon Tue Wed Thu Fri Sat".split(" "),v="January February March April May June July August September October November December".split(" "),I="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,y=/[^-+\dA-Z]/g;return function(z,C,O){var L=O?O.days:f,U=O?O.months:v,Q=O?O.shortDays:
|
|
98
|
+
q,N=O?O.shortMonths:I;O="";var d=!1;z=z&&z.getTime?z:z?new Date(z):new Date;if(isNaN(z))throw SyntaxError("invalid date");"UTC:"===C.slice(0,4)&&(C=C.slice(4),d=!0);O=d?"getUTC":"get";var w=z[O+"Date"](),E=z[O+"Day"](),n=z[O+"Month"](),a=z[O+"FullYear"](),h=z[O+"Hours"](),c=z[O+"Minutes"](),b=z[O+"Seconds"](),e=z[O+"Milliseconds"](),k=d?0:z.getTimezoneOffset();return O=C.replace(l,function(B){switch(B){case "D":return w;case "DD":return qa(w,2);case "DDD":return Q[E];case "DDDD":return L[E];case "M":return n+
|
|
99
99
|
1;case "MM":return qa(n+1,2);case "MMM":return N[n];case "MMMM":return U[n];case "Y":return parseInt(String(a).slice(-2));case "YY":return qa(String(a).slice(-2),2);case "YYY":return qa(String(a).slice(-3),3);case "YYYY":return qa(a,4);case "h":return h%12||12;case "hh":return qa(h%12||12,2);case "H":return h;case "HH":return qa(h,2);case "m":return c;case "mm":return qa(c,2);case "s":return b;case "ss":return qa(b,2);case "f":return qa(String(e),3).slice(0,1);case "ff":return qa(String(e),3).slice(0,
|
|
100
100
|
2);case "fff":return qa(String(e),3).slice(0,3);case "t":return 12>h?"a":"p";case "tt":return 12>h?"am":"pm";case "T":return 12>h?"A":"P";case "TT":return 12>h?"AM":"PM";case "K":return d?"UTC":(String(z).match(u)||[""]).pop().replace(y,"");case "z":return(0<k?"-":"+")+Math.floor(Math.abs(k)/60);case "zz":return(0<k?"-":"+")+qa(Math.floor(Math.abs(k)/60),2);case "zzz":return(0<k?"-":"+")+qa(Math.floor(Math.abs(k)/60),2)+qa(Math.abs(k)%60,2);default:return B.slice(1,B.length-1)}})}}(),tb=function(l){var f=
|
|
101
|
-
0>l;if(1>Math.abs(l)){var q=parseInt(l.toString().split("e-")[1]);q&&(l=(f?-1*l:l)*Math.pow(10,q-1),l="0."+Array(q).join("0")+l.toString().substring(2),l=f?"-"+l:l)}else q=parseInt(l.toString().split("+")[1]),20<q&&(q-=20,l/=Math.pow(10,q),l=l.toString()+Array(q+1).join("0"));return String(l)},ba=function(l,f,q){if(null===l)return"";if(!isFinite(l))return l;l=Number(l);var v=0>l?!0:!1;v&&(l*=-1);var I=q?q.decimalSeparator:".",u=q?q.digitGroupSeparator:",",y="";f=String(f);var y=1,z=q="",
|
|
102
|
-
L=[],U=0,Q=0,N=0,d=!1,w=0,z=f.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);f=null;for(var E=0;z&&E<z.length;E++)if(f=z[E],"."===f&&0>
|
|
103
|
-
1),w=0===l?0:0===f?-(U+z):tb(f).length-U,y/=Math.pow(10,w));0>
|
|
101
|
+
0>l;if(1>Math.abs(l)){var q=parseInt(l.toString().split("e-")[1]);q&&(l=(f?-1*l:l)*Math.pow(10,q-1),l="0."+Array(q).join("0")+l.toString().substring(2),l=f?"-"+l:l)}else q=parseInt(l.toString().split("+")[1]),20<q&&(q-=20,l/=Math.pow(10,q),l=l.toString()+Array(q+1).join("0"));return String(l)},ba=function(l,f,q){if(null===l)return"";if(!isFinite(l))return l;l=Number(l);var v=0>l?!0:!1;v&&(l*=-1);var I=q?q.decimalSeparator:".",u=q?q.digitGroupSeparator:",",y="";f=String(f);var y=1,z=q="",C=-1,O=[],
|
|
102
|
+
L=[],U=0,Q=0,N=0,d=!1,w=0,z=f.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);f=null;for(var E=0;z&&E<z.length;E++)if(f=z[E],"."===f&&0>C)C=E;else{if("%"===f)y*=100;else if("\u2030"===f){y*=1E3;continue}else if(","===f[0]&&"."===f[f.length-1]){y/=Math.pow(1E3,f.length-1);C=E+f.length-1;continue}else"E"!==f[0]&&"e"!==f[0]||"0"!==f[f.length-1]||(d=!0);0>C?(O.push(f),"#"===f||"0"===f?U++:","===f&&N++):(L.push(f),"#"!==f&&"0"!==f||Q++)}d&&(f=Math.floor(l),z=-Math.floor(Math.log(l)/Math.LN10+
|
|
103
|
+
1),w=0===l?0:0===f?-(U+z):tb(f).length-U,y/=Math.pow(10,w));0>C&&(C=E);y=(l*y).toFixed(Q);f=y.split(".");y=(f[0]+"").split("");l=(f[1]+"").split("");y&&"0"===y[0]&&y.shift();for(d=z=E=Q=C=0;0<O.length;)if(f=O.pop(),"#"===f||"0"===f)if(C++,C===U){var n=y,y=[];if("0"===f)for(f=U-Q-(n?n.length:0);0<f;)n.unshift("0"),f--;for(;0<n.length;)q=n.pop()+q,d++,0===d%z&&(E===N&&0<n.length)&&(q=u+q)}else 0<y.length?(q=y.pop()+q,Q++,d++):"0"===f&&(q="0"+q,Q++,d++),0===d%z&&(E===N&&0<y.length)&&(q=u+q);else"E"!==
|
|
104
104
|
f[0]&&"e"!==f[0]||"0"!==f[f.length-1]||!/[eE][+-]*[0]+/.test(f)?","===f?(E++,z=d,d=0,0<y.length&&(q=u+q)):q=1<f.length&&('"'===f[0]&&'"'===f[f.length-1]||"'"===f[0]&&"'"===f[f.length-1])?f.slice(1,f.length-1)+q:f+q:(f=0>w?f.replace("+","").replace("-",""):f.replace("-",""),q+=f.replace(/[0]+/,function(a){return qa(w,a.length)}));u="";for(O=!1;0<L.length;)f=L.shift(),"#"===f||"0"===f?0<l.length&&0!==Number(l.join(""))?(u+=l.shift(),O=!0):"0"===f&&(u+="0",O=!0):1<f.length&&('"'===f[0]&&'"'===f[f.length-
|
|
105
105
|
1]||"'"===f[0]&&"'"===f[f.length-1])?u+=f.slice(1,f.length-1):"E"!==f[0]&&"e"!==f[0]||"0"!==f[f.length-1]||!/[eE][+-]*[0]+/.test(f)?u+=f:(f=0>w?f.replace("+","").replace("-",""):f.replace("-",""),u+=f.replace(/[0]+/,function(a){return qa(w,a.length)}));q+=(O?I:"")+u;return v?"-"+q:q},Ba=function(f){var v=0,q=0;f=f||window.event;f.offsetX||0===f.offsetX?(v=f.offsetX,q=f.offsetY):f.layerX||0==f.layerX?(v=f.layerX,q=f.layerY):(v=f.pageX-f.target.offsetLeft,q=f.pageY-f.target.offsetTop);return{x:v,y:q}},
|
|
106
|
-
ib=!0,Za=window.devicePixelRatio||1,Va=1,ka=ib?Za/Va:1,P=function(f,v,q,u,I,z,y,
|
|
106
|
+
ib=!0,Za=window.devicePixelRatio||1,Va=1,ka=ib?Za/Va:1,P=function(f,v,q,u,I,z,y,C,L,O,U,Q,N){"undefined"===typeof N&&(N=1);y=y||0;C=C||"black";var P=15<u-v&&15<I-q?8:0.35*Math.min(u-v,I-q);f.beginPath();f.moveTo(v,q);f.save();f.fillStyle=z;f.globalAlpha=N;f.fillRect(v,q,u-v,I-q);f.globalAlpha=1;0<y&&(N=0===y%2?0:0.5,f.beginPath(),f.lineWidth=y,f.strokeStyle=C,f.moveTo(v,q),f.rect(v-N,q-N,u-v+2*N,I-q+2*N),f.stroke());f.restore();!0===L&&(f.save(),f.beginPath(),f.moveTo(v,q),f.lineTo(v+P,q+P),f.lineTo(u-
|
|
107
107
|
P,q+P),f.lineTo(u,q),f.closePath(),y=f.createLinearGradient((u+v)/2,q+P,(u+v)/2,q),y.addColorStop(0,z),y.addColorStop(1,"rgba(255, 255, 255, .4)"),f.fillStyle=y,f.fill(),f.restore());!0===O&&(f.save(),f.beginPath(),f.moveTo(v,I),f.lineTo(v+P,I-P),f.lineTo(u-P,I-P),f.lineTo(u,I),f.closePath(),y=f.createLinearGradient((u+v)/2,I-P,(u+v)/2,I),y.addColorStop(0,z),y.addColorStop(1,"rgba(255, 255, 255, .4)"),f.fillStyle=y,f.fill(),f.restore());!0===U&&(f.save(),f.beginPath(),f.moveTo(v,q),f.lineTo(v+P,q+
|
|
108
108
|
P),f.lineTo(v+P,I-P),f.lineTo(v,I),f.closePath(),y=f.createLinearGradient(v+P,(I+q)/2,v,(I+q)/2),y.addColorStop(0,z),y.addColorStop(1,"rgba(255, 255, 255, 0.1)"),f.fillStyle=y,f.fill(),f.restore());!0===Q&&(f.save(),f.beginPath(),f.moveTo(u,q),f.lineTo(u-P,q+P),f.lineTo(u-P,I-P),f.lineTo(u,I),y=f.createLinearGradient(u-P,(I+q)/2,u,(I+q)/2),y.addColorStop(0,z),y.addColorStop(1,"rgba(255, 255, 255, 0.1)"),f.fillStyle=y,y.addColorStop(0,z),y.addColorStop(1,"rgba(255, 255, 255, 0.1)"),f.fillStyle=y,f.fill(),
|
|
109
109
|
f.closePath(),f.restore())},va=function(f){for(var v="",q=0;q<f.length;q++)v+=String.fromCharCode(Math.ceil(f.length/57/5)^f.charCodeAt(q));return v},rb=window&&(window[va("mnb`uhno")]&&window[va("mnb`uhno")].href&&window[va("mnb`uhno")].href.indexOf&&(-1!==window[va("mnb`uhno")].href.indexOf(va("b`ow`rkr/bnl"))||-1!==window[va("mnb`uhno")].href.indexOf(va("gdonqhy/bnl"))||-1!==window[va("mnb`uhno")].href.indexOf(va("gheemd"))))&&-1===window[va("mnb`uhno")].href.indexOf(va("gheemd")),sb={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=="},
|
|
@@ -122,17 +122,17 @@ return this.sessionVariables[f]!==this.options[f]};W.prototype.addEventListener=
|
|
|
122
122
|
function(f,v,q){if(f&&this._eventListeners[f]){v=v||{};for(var u=this._eventListeners[f],z=0;z<u.length;z++)u[z].eventHandler.call(u[z].context,v)}"function"===typeof this[f]&&this[f].call(q||this.chart,v)};Ka.prototype.registerSpace=function(f,v){"top"===f?this._topOccupied+=v.height:"bottom"===f?this._bottomOccupied+=v.height:"left"===f?this._leftOccupied+=v.width:"right"===f&&(this._rightOccupied+=v.width)};Ka.prototype.unRegisterSpace=function(f,v){"top"===f?this._topOccupied-=v.height:"bottom"===
|
|
123
123
|
f?this._bottomOccupied-=v.height:"left"===f?this._leftOccupied-=v.width:"right"===f&&(this._rightOccupied-=v.width)};Ka.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}};Ka.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=
|
|
124
124
|
this._topOccupied=this._padding};ia(la,W);la.prototype._initialize=function(){f(this.padding)||"object"!==typeof this.padding?this.topPadding=this.rightPadding=this.bottomPadding=this.leftPadding=Number(this.padding)|0:(this.topPadding=f(this.padding.top)?0:Number(this.padding.top)|0,this.rightPadding=f(this.padding.right)?0:Number(this.padding.right)|0,this.bottomPadding=f(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=f(this.padding.left)?0:Number(this.padding.left)|0)};la.prototype.render=
|
|
125
|
-
function(f){if(0!==this.fontSize){f&&this.ctx.save();var v=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var q=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+q);"middle"===this.textBaseline&&(q=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var u=0,z=this.topPadding,
|
|
126
|
-
this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(q=0;q<this._wrappedText.lines.length;q++)
|
|
127
|
-
function(f){this.text=f;this._isDirty=!0;this._wrappedText=null};la.prototype.measureText=function(){this._lineHeight=db(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}};la.prototype._getLineWithWidth=function(f,v,q){f=String(f);if(!f)return{text:"",width:0};var u=q=0,z=f.length-1,
|
|
128
|
-
Math.floor((u+z)/2),y=f.substr(0,
|
|
129
|
-
u=0;else for(;0<f.length;){var
|
|
130
|
-
function(){var f;f=""+(this.fontStyle?this.fontStyle+" ":"");f+=this.fontWeight?this.fontWeight+" ":"";f+=this.fontSize?this.fontSize+"px ":"";var u=this.fontFamily?this.fontFamily+"":"";!v&&u&&(u=u.split(",")[0],"'"!==u[0]&&'"'!==u[0]&&(u="'"+u+"'"));return f+=u};ia(Xa,W);ia(Ha,W);Ha.prototype.setLayout=function(){if(this.text){var l=this.dockInsidePlotArea?this.chart.plotArea:this.chart,v=l.layoutManager.getFreeSpace(),q=v.x1,u=v.y1,z=0,
|
|
131
|
-
this.verticalAlign?40:0,L,P;this.textAlign=f(this.options.textAlign)?this.horizontalAlign:this.textAlign;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=v.width-4-y*("center"===this.horizontalAlign?2:1)),
|
|
132
|
-
(this.maxWidth=v.width-4),
|
|
133
|
-
textAlign:this.textAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:
|
|
125
|
+
function(f){if(0!==this.fontSize){f&&this.ctx.save();var v=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var q=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+q);"middle"===this.textBaseline&&(q=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var u=0,z=this.topPadding,C=null;this.ctx.roundRect||Ea(this.ctx);(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,q,this.width,this.height,
|
|
126
|
+
this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(q=0;q<this._wrappedText.lines.length;q++)C=this._wrappedText.lines[q],"right"===this.textAlign?u=this.width-C.width-this.rightPadding:"left"===this.textAlign?u=this.leftPadding:"center"===this.textAlign&&(u=(this.width-(this.leftPadding+this.rightPadding))/2-C.width/2+this.leftPadding),this.ctx.fillText(C.text,u,z),z+=C.height;this.ctx.font=v;f&&this.ctx.restore()}};la.prototype.setText=
|
|
127
|
+
function(f){this.text=f;this._isDirty=!0;this._wrappedText=null};la.prototype.measureText=function(){this._lineHeight=db(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}};la.prototype._getLineWithWidth=function(f,v,q){f=String(f);if(!f)return{text:"",width:0};var u=q=0,z=f.length-1,C=Infinity;for(this.ctx.font=this._getFontString();u<=z;){var C=
|
|
128
|
+
Math.floor((u+z)/2),y=f.substr(0,C+1);q=this.ctx.measureText(y).width;if(q<v)u=C+1;else if(q>v)z=C-1;else break}q>v&&1<y.length&&(y=y.substr(0,y.length-1),q=this.ctx.measureText(y).width);v=!0;if(y.length===f.length||" "===f[y.length])v=!1;v&&(f=y.split(" "),1<f.length&&f.pop(),y=f.join(" "),q=this.ctx.measureText(y).width);return{text:y,width:q}};la.prototype._wrapText=function(){var f=new String(Oa(String(this.text))),v=[],q=this.ctx.font,u=0,z=0;this.ctx.font=this._getFontString();if(0===this.frontSize)z=
|
|
129
|
+
u=0;else for(;0<f.length;){var C=this.maxHeight-(this.topPadding+this.bottomPadding),y=this._getLineWithWidth(f,this.maxWidth-(this.leftPadding+this.rightPadding),!1);y.height=this._lineHeight;v.push(y);var L=z,z=Math.max(z,y.width),u=u+y.height,f=Oa(f.slice(y.text.length,f.length));C&&u>C&&(y=v.pop(),u-=y.height,z=L)}this._wrappedText={lines:v,width:z,height:u};this.width=z+(this.leftPadding+this.rightPadding);this.height=u+(this.topPadding+this.bottomPadding);this.ctx.font=q};la.prototype._getFontString=
|
|
130
|
+
function(){var f;f=""+(this.fontStyle?this.fontStyle+" ":"");f+=this.fontWeight?this.fontWeight+" ":"";f+=this.fontSize?this.fontSize+"px ":"";var u=this.fontFamily?this.fontFamily+"":"";!v&&u&&(u=u.split(",")[0],"'"!==u[0]&&'"'!==u[0]&&(u="'"+u+"'"));return f+=u};ia(Xa,W);ia(Ha,W);Ha.prototype.setLayout=function(){if(this.text){var l=this.dockInsidePlotArea?this.chart.plotArea:this.chart,v=l.layoutManager.getFreeSpace(),q=v.x1,u=v.y1,z=0,C=0,y=this.chart._menuButton&&this.chart.exportEnabled&&"top"===
|
|
131
|
+
this.verticalAlign?40:0,L,P;this.textAlign=f(this.options.textAlign)?this.horizontalAlign:this.textAlign;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=v.width-4-y*("center"===this.horizontalAlign?2:1)),C=0.5*v.height-this.margin-2,z=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=v.height-4),C=0.5*v.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&
|
|
132
|
+
(this.maxWidth=v.width-4),C=0.5*v.height-4));var O;f(this.padding)||"number"!==typeof this.padding?f(this.padding)||"object"!==typeof this.padding||(O=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,O+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):O=2*this.padding;this.wrap||(C=Math.min(C,1.5*this.fontSize+O));C=new la(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,
|
|
133
|
+
textAlign:this.textAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:C,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"middle"});O=C.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(u=v.y1+2+this.fontSize/2+4,P="top"):"bottom"===this.verticalAlign&&(u=v.y2-2-O.height+this.fontSize/2+4,P="bottom"),
|
|
134
134
|
"left"===this.horizontalAlign?q=v.x1+2:"center"===this.horizontalAlign?q=v.x1+v.width/2-O.width/2:"right"===this.horizontalAlign&&(q=v.x2-2-O.width-y),L=this.horizontalAlign,this.width=O.width,this.height=O.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(q=v.x1+2+(this.fontSize/2+4),u=v.y2-2-(this.maxWidth/2-O.width/2),z=-90,P="left",this.width=O.height,this.height=O.width):"right"===this.horizontalAlign?(q=v.x2-2-(this.fontSize/2+4),u=v.y1+2+(this.maxWidth/2-O.width/2),z=90,
|
|
135
|
-
P="right",this.width=O.height,this.height=O.width):"center"===this.horizontalAlign&&(u=l.y1+(l.height/2-O.height/2)+this.fontSize/2+4,q=l.x1+(l.width/2-O.width/2),P="center",this.width=O.width,this.height=O.height),L="center");
|
|
135
|
+
P="right",this.width=O.height,this.height=O.width):"center"===this.horizontalAlign&&(u=l.y1+(l.height/2-O.height/2)+this.fontSize/2+4,q=l.x1+(l.width/2-O.width/2),P="center",this.width=O.width,this.height=O.height),L="center");C.x=q;C.y=u;C.angle=z;C.horizontalAlign=L;this._textBlock=C;l.layoutManager.registerSpace(P,{width:this.width+("left"===P||"right"===P?this.margin+2:0),height:this.height+("top"===P||"bottom"===P?this.margin+2:0)});this.bounds={x1:q,y1:u,x2:q+this.width,y2:u+this.height};this.ctx.textBaseline=
|
|
136
136
|
"top"}};Ha.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};ia(Ma,W);Ma.prototype.setLayout=Ha.prototype.setLayout;Ma.prototype.render=Ha.prototype.render;ab.prototype.get=function(f,v){var q=null;0<this.pool.length?(q=this.pool.pop(),Ua(q,f,v)):q=sa(f,v);return q};ab.prototype.release=function(f){this.pool.push(f)};ia(Na,W);var Sa={addTheme:function(f,v){Qa[f]=v},addColorSet:function(f,v){pa[f]=v},addCultureInfo:function(f,v){Pa[f]=v},formatNumber:function(f,v,q){q=q||"en";
|
|
137
137
|
if(Pa[q])return ba(f,v||"#,##0.##",new Na(q));throw"Unknown Culture Name";},formatDate:function(f,v,q){q=q||"en";if(Pa[q])return ra(f,v||"DD MMM YYYY",new Na(q));throw"Unknown Culture Name";}};"undefined"!==typeof module&&"undefined"!==typeof module.exports?module.exports=Sa:"function"===typeof define&&define.amd?define([],function(){return Sa}):(window.CanvasJS&&window.console&&window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."),
|
|
138
138
|
window.CanvasJS=window.CanvasJS?window.CanvasJS:Sa);var Ja=Sa.Chart=function(){function l(a,h){return a.x-h.x}function u(a,h,c){h=h||{};f(c)?(this.predefinedThemes=Qa,this.optionsName=this.parent=this.index=null):(this.parent=c.parent,this.index=c.index,this.predefinedThemes=c.predefinedThemes,this.optionsName=c.optionsName,this.stockChart=c.stockChart,this.panel=a,this.isOptionsInArray=c.isOptionsInArray);this.theme=f(h.theme)||f(this.predefinedThemes[h.theme])?"light1":h.theme;u.base.constructor.call(this,
|
|
@@ -146,7 +146,7 @@ this.allDOMEventHandlers),this._toolBar=document.createElement("div"),this._tool
|
|
|
146
146
|
"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),z(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);za(b._dropdownMenu)},this.allDOMEventHandlers),z(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),z(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),z(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":
|
|
147
147
|
"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),z(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),z(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),this.toolTip=new ma(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables=
|
|
148
148
|
{axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function q(a,h){for(var c=[],b,e=0;e<a.length;e++)if(0==e)c.push(a[0]);else{var k,B,f;f=e-1;k=0===f?0:f-1;B=f===a.length-1?f:f+1;b=Math.abs((a[B].x-a[k].x)/(0===a[B].x-a[f].x?0.01:a[B].x-a[f].x))*(h-1)/2+1;var d=(a[B].x-a[k].x)/b;b=(a[B].y-a[k].y)/b;c[c.length]=a[f].x>a[k].x&&0<d||a[f].x<a[k].x&&0>d?{x:a[f].x+d/3,y:a[f].y+b/3}:{x:a[f].x,y:a[f].y+
|
|
149
|
-
(1===c.length?0:b/9)};f=e;k=0===f?0:f-1;B=f===a.length-1?f:f+1;b=Math.abs((a[B].x-a[k].x)/(0===a[f].x-a[k].x?0.01:a[f].x-a[k].x))*(h-1)/2+1;d=(a[B].x-a[k].x)/b;b=(a[B].y-a[k].y)/b;c[c.length]=a[f].x>a[k].x&&0<d||a[f].x<a[k].x&&0>d?{x:a[f].x-d/3,y:a[f].y-b/3}:{x:a[f].x,y:a[f].y-b/9};c[c.length]=a[e]}return c}function
|
|
149
|
+
(1===c.length?0:b/9)};f=e;k=0===f?0:f-1;B=f===a.length-1?f:f+1;b=Math.abs((a[B].x-a[k].x)/(0===a[f].x-a[k].x?0.01:a[f].x-a[k].x))*(h-1)/2+1;d=(a[B].x-a[k].x)/b;b=(a[B].y-a[k].y)/b;c[c.length]=a[f].x>a[k].x&&0<d||a[f].x<a[k].x&&0>d?{x:a[f].x-d/3,y:a[f].y-b/3}:{x:a[f].x,y:a[f].y-b/9};c[c.length]=a[e]}return c}function C(a,h,c,b,e,k,B,f,d,m){var r=0;m?(B.color=k,f.color=k):m=1;r=d?Math.abs(e-c):Math.abs(b-h);r=0<B.trimLength?Math.abs(r*B.trimLength/100):Math.abs(r-B.length);d?(c+=r/2,e-=r/2):(h+=r/2,
|
|
150
150
|
b-=r/2);var r=1===Math.round(B.thickness)%2?0.5:0,p=1===Math.round(f.thickness)%2?0.5:0;a.save();a.globalAlpha=m;a.strokeStyle=f.color||k;a.lineWidth=f.thickness||2;a.setLineDash&&a.setLineDash(U(f.dashType,f.thickness));a.beginPath();d&&0<f.thickness?(a.moveTo(b-B.thickness/2,Math.round((c+e)/2)-p),a.lineTo(h+B.thickness/2,Math.round((c+e)/2)-p)):0<f.thickness&&(a.moveTo(Math.round((h+b)/2)-p,c+B.thickness/2),a.lineTo(Math.round((h+b)/2)-p,e-B.thickness/2));a.stroke();a.strokeStyle=B.color||k;a.lineWidth=
|
|
151
151
|
B.thickness||2;a.setLineDash&&a.setLineDash(U(B.dashType,B.thickness));a.beginPath();d&&0<B.thickness?(a.moveTo(b-r,c),a.lineTo(b-r,e),a.moveTo(h+r,c),a.lineTo(h+r,e)):0<B.thickness&&(a.moveTo(h,c+r),a.lineTo(b,c+r),a.moveTo(h,e-r),a.lineTo(b,e-r));a.stroke();a.restore()}function I(a,h){I.base.constructor.call(this,"Legend","legend",h,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=
|
|
152
152
|
this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=db(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function L(a,h,c,b){L.base.constructor.call(this,"DataSeries","data",h,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]=
|
|
@@ -306,7 +306,7 @@ a.height=h.height;v||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.s
|
|
|
306
306
|
r.dataPoint,r.dataSeries),aa=oa("indexLabelFontFamily",r.dataPoint,r.dataSeries),m=oa("indexLabelFontStyle",r.dataPoint,r.dataSeries);s=oa("indexLabelFontWeight",r.dataPoint,r.dataSeries);var n=oa("indexLabelBackgroundColor",r.dataPoint,r.dataSeries);g=oa("indexLabelBorderColor",r.dataPoint,r.dataSeries);var k=oa("indexLabelBorderThickness",r.dataPoint,r.dataSeries),e=oa("indexLabelMaxWidth",r.dataPoint,r.dataSeries),B=oa("indexLabelWrap",r.dataPoint,r.dataSeries),w=oa("indexLabelLineDashType",r.dataPoint,
|
|
307
307
|
r.dataSeries),t=oa("indexLabelLineColor",r.dataPoint,r.dataSeries),l=f(r.dataPoint.indexLabelLineThickness)?f(r.dataSeries.options.indexLabelLineThickness)?0:r.dataSeries.options.indexLabelLineThickness:r.dataPoint.indexLabelLineThickness,b=0<l?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,x={percent:null,total:null},q=null;if(0<=r.dataSeries.type.indexOf("stacked")||"pie"===r.dataSeries.type||"doughnut"===r.dataSeries.type)x=this.getPercentAndTotal(r.dataSeries,
|
|
308
308
|
r.dataPoint);if(r.dataSeries.indexLabelFormatter||r.dataPoint.indexLabelFormatter)q={chart:this,dataSeries:r.dataSeries,dataPoint:r.dataPoint,index:r.indexKeyword,total:x.total,percent:x.percent};var u=r.dataPoint.indexLabelFormatter?r.dataPoint.indexLabelFormatter(q):r.dataPoint.indexLabel?this.replaceKeywordsWithValue(r.dataPoint.indexLabel,r.dataPoint,r.dataSeries,null,r.indexKeyword):r.dataSeries.indexLabelFormatter?r.dataSeries.indexLabelFormatter(q):r.dataSeries.indexLabel?this.replaceKeywordsWithValue(r.dataSeries.indexLabel,
|
|
309
|
-
r.dataPoint,r.dataSeries,null,r.indexKeyword):null;if(null!==u&&""!==u){var x=oa("indexLabelPlacement",r.dataPoint,r.dataSeries),q=oa("indexLabelOrientation",r.dataPoint,r.dataSeries),
|
|
309
|
+
r.dataPoint,r.dataSeries,null,r.indexKeyword):null;if(null!==u&&""!==u){var x=oa("indexLabelPlacement",r.dataPoint,r.dataSeries),q=oa("indexLabelOrientation",r.dataPoint,r.dataSeries),D=oa("indexLabelTextAlign",r.dataPoint,r.dataSeries),y=r.direction,z=r.dataSeries.axisX,M=r.dataSeries.axisY,R=!1,n=new la(h,{x:0,y:0,maxWidth:e?e:0.5*this.width,maxHeight:B?5*A:1.5*A,angle:"horizontal"===q?0:-90,text:u,padding:0,backgroundColor:n,borderColor:g,borderThickness:k,textAlign:D,fontSize:A,fontFamily:aa,
|
|
310
310
|
fontWeight:s,fontColor:d,fontStyle:m,textBaseline:"middle"});n.measureText();r.dataSeries.indexLabelMaxWidth=n.maxWidth;if("stackedarea100"===p){if(r.point.x<c.x1||r.point.x>c.x2||r.point.y<c.y1-1||r.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(r.dataPoint.x<z.viewportMinimum||r.dataPoint.x>z.viewportMaximum||Math.max.apply(null,r.dataPoint.y)<M.viewportMinimum||Math.min.apply(null,r.dataPoint.y)>M.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=p.indexOf("area")||
|
|
311
311
|
0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(r.dataPoint.x<z.viewportMinimum||r.dataPoint.x>z.viewportMaximum||r.dataPoint.y<M.viewportMinimum||r.dataPoint.y>M.viewportMaximum)continue}else if(0<=p.indexOf("column")){if(r.dataPoint.x<z.viewportMinimum||r.dataPoint.x>z.viewportMaximum||(0<r.dataPoint.y.length?Math.max.apply(null,r.dataPoint.y):r.dataPoint.y)<M.viewportMinimum||(0<r.dataPoint.y.length?Math.max.apply(null,r.dataPoint.y):r.dataPoint.y)>M.viewportMaximum)continue}else if("waterfall"===
|
|
312
312
|
p||"error"===p&&!r.axisSwapped){if(r.dataPoint.x<z.viewportMinimum||r.dataPoint.x>z.viewportMaximum||r.bounds.y1>c.y2||r.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(r.dataPoint.x<z.viewportMinimum||r.dataPoint.x>z.viewportMaximum||r.bounds.x1>c.x2||r.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(r.dataPoint.x<z.viewportMinimum||r.dataPoint.x>z.viewportMaximum||Math.max.apply(null,r.dataPoint.y)<M.viewportMinimum||Math.min.apply(null,r.dataPoint.y)>M.viewportMaximum)continue}else if(r.dataPoint.x<
|
|
@@ -323,13 +323,13 @@ r.dataSeries),r.dataSeries.indexLabelBackgroundColor=f(n)?v?"transparent":null:n
|
|
|
323
323
|
if(c.setLineDash){var s=U(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,g=U(p,m.lineThickness);c.setLineDash(g)}var A=m.id;this._eventManager.objectMap[A]={objectType:"dataSeries",dataSeriesIndex:aa};A=V(A);b.strokeStyle=A;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var A=m._colorSet,w=A=m.lineColor=m.options.lineColor?m.options.lineColor:A[0];c.strokeStyle=A;var l=!0,t=0,G,x;c.beginPath();if(0<r.length){for(var q=!1,t=0;t<r.length;t++)if(G=r[t].x.getTime?r[t].x.getTime():
|
|
324
324
|
r[t].x,!(G<a.axisX.dataInfo.viewPortMin||G>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!q)))if("number"!==typeof r[t].y)0<t&&!(m.connectNullData||q||l)&&(c.stroke(),v&&b.stroke()),q=!0;else{G=a.axisX.convertValueToPixel(G);x=a.axisY.convertValueToPixel(r[t].y);var u=m.dataPointIds[t];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:aa,dataPointIndex:t,x1:G,y1:x};l||q?(!l&&m.connectNullData?(c.setLineDash&&(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==
|
|
325
325
|
m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(f.x,f.y),p=m.nullDataLineDashType,c.setLineDash(s)),c.lineTo(G,x),v&&b.lineTo(G,x)):(c.beginPath(),c.moveTo(G,x),v&&(b.beginPath(),b.moveTo(G,x))),q=l=!1):(c.lineTo(G,x),v&&b.lineTo(G,x),0==t%500&&(c.stroke(),c.beginPath(),c.moveTo(G,x),v&&(b.stroke(),b.beginPath(),b.moveTo(G,x))));f={x:G,y:x};t<r.length-1&&(w!==(r[t].lineColor||A)||p!==(r[t].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(G,x),w=r[t].lineColor||A,c.strokeStyle=
|
|
326
|
-
w,c.setLineDash&&(r[t].lineDashType?(p=r[t].lineDashType,c.setLineDash(U(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(g))));if(0!==r[t].markerSize&&(0<r[t].markerSize||0<m.markerSize)){var
|
|
326
|
+
w,c.setLineDash&&(r[t].lineDashType?(p=r[t].lineDashType,c.setLineDash(U(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(g))));if(0!==r[t].markerSize&&(0<r[t].markerSize||0<m.markerSize)){var D=m.getMarkerProperties(t,G,x,c);k.push(D);u=V(u);v&&k.push({x:G,y:x,ctx:b,type:D.type,size:D.size,color:u,borderColor:u,borderThickness:D.borderThickness})}(r[t].indexLabel||m.indexLabel||r[t].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:r[t],dataSeries:m,
|
|
327
327
|
point:{x:G,y:x},direction:0>r[t].y===a.axisY.reversed?1:-1,color:A})}c.stroke();v&&b.stroke()}}n.drawMarkers(k);v&&(h.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,
|
|
328
328
|
e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:h,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderStepLine=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h;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 k=[],f,d=0;d<a.dataSeriesIndexes.length;d++){var aa=
|
|
329
329
|
a.dataSeriesIndexes[d],m=this.data[aa];c.lineWidth=m.lineThickness;var r=m.dataPoints,p="solid";if(c.setLineDash){var s=U(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,g=U(p,m.lineThickness);c.setLineDash(g)}var A=m.id;this._eventManager.objectMap[A]={objectType:"dataSeries",dataSeriesIndex:aa};A=V(A);b.strokeStyle=A;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var A=m._colorSet,w=A=m.lineColor=m.options.lineColor?m.options.lineColor:A[0];c.strokeStyle=A;var l=!0,t=0,q,x;
|
|
330
|
-
c.beginPath();if(0<r.length){for(var u=!1,t=0;t<r.length;t++)if(q=r[t].getTime?r[t].x.getTime():r[t].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!u)))if("number"!==typeof r[t].y)0<t&&!(m.connectNullData||u||l)&&(c.stroke(),v&&b.stroke()),u=!0;else{var F=x;q=a.axisX.convertValueToPixel(q);x=a.axisY.convertValueToPixel(r[t].y);var
|
|
330
|
+
c.beginPath();if(0<r.length){for(var u=!1,t=0;t<r.length;t++)if(q=r[t].getTime?r[t].x.getTime():r[t].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!u)))if("number"!==typeof r[t].y)0<t&&!(m.connectNullData||u||l)&&(c.stroke(),v&&b.stroke()),u=!0;else{var F=x;q=a.axisX.convertValueToPixel(q);x=a.axisY.convertValueToPixel(r[t].y);var D=m.dataPointIds[t];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:aa,dataPointIndex:t,x1:q,y1:x};
|
|
331
331
|
l||u?(!l&&m.connectNullData?(c.setLineDash&&(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(f.x,f.y),p=m.nullDataLineDashType,c.setLineDash(s)),c.lineTo(q,F),c.lineTo(q,x),v&&(b.lineTo(q,F),b.lineTo(q,x))):(c.beginPath(),c.moveTo(q,x),v&&(b.beginPath(),b.moveTo(q,x))),u=l=!1):(c.lineTo(q,F),v&&b.lineTo(q,F),c.lineTo(q,x),v&&b.lineTo(q,x),0==t%500&&(c.stroke(),c.beginPath(),c.moveTo(q,x),v&&(b.stroke(),b.beginPath(),
|
|
332
|
-
b.moveTo(q,x))));f={x:q,y:x};t<r.length-1&&(w!==(r[t].lineColor||A)||p!==(r[t].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(q,x),w=r[t].lineColor||A,c.strokeStyle=w,c.setLineDash&&(r[t].lineDashType?(p=r[t].lineDashType,c.setLineDash(U(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(g))));0!==r[t].markerSize&&(0<r[t].markerSize||0<m.markerSize)&&(F=m.getMarkerProperties(t,q,x,c),k.push(F),
|
|
332
|
+
b.moveTo(q,x))));f={x:q,y:x};t<r.length-1&&(w!==(r[t].lineColor||A)||p!==(r[t].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(q,x),w=r[t].lineColor||A,c.strokeStyle=w,c.setLineDash&&(r[t].lineDashType?(p=r[t].lineDashType,c.setLineDash(U(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(g))));0!==r[t].markerSize&&(0<r[t].markerSize||0<m.markerSize)&&(F=m.getMarkerProperties(t,q,x,c),k.push(F),D=V(D),v&&k.push({x:q,y:x,ctx:b,type:F.type,size:F.size,color:D,borderColor:D,borderThickness:F.borderThickness}));
|
|
333
333
|
(r[t].indexLabel||m.indexLabel||r[t].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:r[t],dataSeries:m,point:{x:q,y:x},direction:0>r[t].y===a.axisY.reversed?1:-1,color:A})}c.stroke();v&&b.stroke()}}n.drawMarkers(k);v&&(h.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,
|
|
334
334
|
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:h,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderSpline=function(a){function h(a){a=q(a,2);if(0<a.length){b.beginPath();v&&e.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=
|
|
335
335
|
a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);v&&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),v&&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),a[c+3].newLineDashArray&&b.setLineDash(a[c+
|
|
@@ -382,42 +382,42 @@ this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:l,d
|
|
|
382
382
|
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.xScaleAnimation,easingFunction:E.easing.easeOutQuart,
|
|
383
383
|
animationBase:s<a.axisY.bounds.x1?a.axisY.bounds.x1:s>a.axisY.bounds.x2?a.axisY.bounds.x2:s}}};u.prototype.renderArea=function(a){var h,c;function b(){F&&(0<g.lineThickness&&k.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?u=x:0>a.axisY.viewportMaximum?u=d.y1:0<a.axisY.viewportMinimum&&(u=x),k.lineTo(l,u),k.lineTo(F.x,u),k.closePath(),k.globalAlpha=g.fillOpacity,k.fill(),k.globalAlpha=1,v&&(f.lineTo(l,u),f.lineTo(F.x,u),f.closePath(),f.fill()),k.beginPath(),k.moveTo(l,
|
|
384
384
|
t),f.beginPath(),f.moveTo(l,t),F={x:l,y:t})}var e=a.targetCanvasCtx||this.plotArea.ctx,k=v?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var f=this._eventManager.ghostCtx,d=a.axisY.lineCoordinates,aa=[],m=this.plotArea,r;k.save();v&&f.save();k.beginPath();k.rect(m.x1,m.y1,m.width,m.height);k.clip();v&&(f.beginPath(),f.rect(m.x1,m.y1,m.width,m.height),f.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var s=a.dataSeriesIndexes[p],g=this.data[s],A=g.dataPoints,aa=g.id;this._eventManager.objectMap[aa]=
|
|
385
|
-
{objectType:"dataSeries",dataSeriesIndex:s};aa=V(aa);f.fillStyle=aa;aa=[];h=!0;var w=0,l,t,q,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),u,F=null;if(0<A.length){var
|
|
385
|
+
{objectType:"dataSeries",dataSeriesIndex:s};aa=V(aa);f.fillStyle=aa;aa=[];h=!0;var w=0,l,t,q,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),u,F=null;if(0<A.length){var D=g._colorSet[w%g._colorSet.length],y=g.lineColor=g.options.lineColor||D,z=y;k.fillStyle=D;k.strokeStyle=y;k.lineWidth=g.lineThickness;c="solid";if(k.setLineDash){var M=U(g.nullDataLineDashType,g.lineThickness);c=g.lineDashType;var R=U(c,g.lineThickness);k.setLineDash(R)}for(var ha=!0;w<A.length;w++)if(q=
|
|
386
386
|
A[w].x.getTime?A[w].x.getTime():A[w].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!g.connectNullData||!ha)))if("number"!==typeof A[w].y)g.connectNullData||(ha||h)||b(),ha=!0;else{l=a.axisX.convertValueToPixel(q);t=a.axisY.convertValueToPixel(A[w].y);h||ha?(!h&&g.connectNullData?(k.setLineDash&&(g.options.nullDataLineDashType||c===g.lineDashType&&g.lineDashType!==g.nullDataLineDashType)&&(h=l,c=t,l=r.x,t=r.y,b(),k.moveTo(r.x,r.y),l=h,t=c,F=r,c=g.nullDataLineDashType,k.setLineDash(M)),
|
|
387
387
|
k.lineTo(l,t),v&&f.lineTo(l,t)):(k.beginPath(),k.moveTo(l,t),v&&(f.beginPath(),f.moveTo(l,t)),F={x:l,y:t}),ha=h=!1):(k.lineTo(l,t),v&&f.lineTo(l,t),0==w%250&&b());r={x:l,y:t};w<A.length-1&&(z!==(A[w].lineColor||y)||c!==(A[w].lineDashType||g.lineDashType))&&(b(),z=A[w].lineColor||y,k.strokeStyle=z,k.setLineDash&&(A[w].lineDashType?(c=A[w].lineDashType,k.setLineDash(U(c,g.lineThickness))):(c=g.lineDashType,k.setLineDash(R))));var da=g.dataPointIds[w];this._eventManager.objectMap[da]={id:da,objectType:"dataPoint",
|
|
388
|
-
dataSeriesIndex:s,dataPointIndex:w,x1:l,y1:t};0!==A[w].markerSize&&(0<A[w].markerSize||0<g.markerSize)&&(q=g.getMarkerProperties(w,l,t,k),aa.push(q),da=V(da),v&&aa.push({x:l,y:t,ctx:f,type:q.type,size:q.size,color:da,borderColor:da,borderThickness:q.borderThickness}));(A[w].indexLabel||g.indexLabel||A[w].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:A[w],dataSeries:g,point:{x:l,y:t},direction:0>A[w].y===a.axisY.reversed?1:-1,color:
|
|
388
|
+
dataSeriesIndex:s,dataPointIndex:w,x1:l,y1:t};0!==A[w].markerSize&&(0<A[w].markerSize||0<g.markerSize)&&(q=g.getMarkerProperties(w,l,t,k),aa.push(q),da=V(da),v&&aa.push({x:l,y:t,ctx:f,type:q.type,size:q.size,color:da,borderColor:da,borderThickness:q.borderThickness}));(A[w].indexLabel||g.indexLabel||A[w].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:A[w],dataSeries:g,point:{x:l,y:t},direction:0>A[w].y===a.axisY.reversed?1:-1,color:D})}b();n.drawMarkers(aa)}}v&&
|
|
389
389
|
(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),k.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&k.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&k.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),k.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());k.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,
|
|
390
390
|
easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderSplineArea=function(a){function h(){var c=q(G,2);if(0<c.length){if(0<r.lineThickness){b.beginPath();b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var h=0;h<c.length-3;h+=3)if(b.bezierCurveTo(c[h+1].x,c[h+1].y,c[h+2].x,c[h+2].y,c[h+3].x,c[h+3].y),v&&e.bezierCurveTo(c[h+1].x,c[h+1].y,c[h+2].x,c[h+2].y,c[h+3].x,c[h+3].y),c[h+3].newStrokeStyle||
|
|
391
391
|
c[h+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(c[h+3].x,c[h+3].y),c[h+3].newStrokeStyle&&(b.strokeStyle=c[h+3].newStrokeStyle),c[h+3].newLineDashArray&&b.setLineDash(c[h+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,c[0].y);v&&(e.beginPath(),e.moveTo(c[0].x,c[0].y));for(h=0;h<c.length-3;h+=3)b.bezierCurveTo(c[h+1].x,c[h+1].y,c[h+2].x,c[h+2].y,c[h+3].x,c[h+3].y),v&&e.bezierCurveTo(c[h+1].x,c[h+1].y,c[h+2].x,c[h+2].y,c[h+3].x,c[h+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&
|
|
392
392
|
0<=a.axisY.viewportMaximum?u=l:0>a.axisY.viewportMaximum?u=k.y1:0<a.axisY.viewportMinimum&&(u=l);t={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,u);b.lineTo(t.x,u);b.closePath();b.globalAlpha=r.fillOpacity;b.fill();b.globalAlpha=1;v&&(e.lineTo(c[c.length-1].x,u),e.lineTo(t.x,u),e.closePath(),e.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=a.axisY.lineCoordinates,f=[],d=this.plotArea;b.save();v&&
|
|
393
393
|
e.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();v&&(e.beginPath(),e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var w=0;w<a.dataSeriesIndexes.length;w++){var m=a.dataSeriesIndexes[w],r=this.data[m],p=r.dataPoints,f=r.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:m};f=V(f);e.fillStyle=f;var f=[],s=0,g,A,l=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),u,t=null,G=[];if(0<p.length){var x=r._colorSet[s%r._colorSet.length],
|
|
394
|
-
y=r.lineColor=r.options.lineColor||x,F=y;b.fillStyle=x;b.strokeStyle=y;b.lineWidth=r.lineThickness;var
|
|
395
|
-
!p[s-1].lineDashType))&&(G[G.length-1].newLineDashArray=z,
|
|
396
|
-
p[s].lineDashType,G[G.length-1].newLineDashArray=U(
|
|
394
|
+
y=r.lineColor=r.options.lineColor||x,F=y;b.fillStyle=x;b.strokeStyle=y;b.lineWidth=r.lineThickness;var D="solid";if(b.setLineDash){var z=U(r.nullDataLineDashType,r.lineThickness),D=r.lineDashType,C=U(D,r.lineThickness);b.setLineDash(C)}for(A=!1;s<p.length;s++)if(g=p[s].x.getTime?p[s].x.getTime():p[s].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!A)))if("number"!==typeof p[s].y)0<s&&!A&&(r.connectNullData?b.setLineDash&&(0<G.length&&(r.options.nullDataLineDashType||
|
|
395
|
+
!p[s-1].lineDashType))&&(G[G.length-1].newLineDashArray=z,D=r.nullDataLineDashType):(h(),G=[])),A=!0;else{g=a.axisX.convertValueToPixel(g);A=a.axisY.convertValueToPixel(p[s].y);var M=r.dataPointIds[s];this._eventManager.objectMap[M]={id:M,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:s,x1:g,y1:A};G[G.length]={x:g,y:A};s<p.length-1&&(F!==(p[s].lineColor||y)||D!==(p[s].lineDashType||r.lineDashType))&&(F=p[s].lineColor||y,G[G.length-1].newStrokeStyle=F,b.setLineDash&&(p[s].lineDashType?(D=
|
|
396
|
+
p[s].lineDashType,G[G.length-1].newLineDashArray=U(D,r.lineThickness)):(D=r.lineDashType,G[G.length-1].newLineDashArray=C)));if(0!==p[s].markerSize&&(0<p[s].markerSize||0<r.markerSize)){var R=r.getMarkerProperties(s,g,A,b);f.push(R);M=V(M);v&&f.push({x:g,y:A,ctx:e,type:R.type,size:R.size,color:M,borderColor:M,borderThickness:R.borderThickness})}(p[s].indexLabel||r.indexLabel||p[s].indexLabelFormatter||r.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[s],dataSeries:r,
|
|
397
397
|
point:{x:g,y:A},direction:0>p[s].y===a.axisY.reversed?1:-1,color:x});A=!1}h();n.drawMarkers(f)}}v&&(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),
|
|
398
398
|
this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderStepArea=function(a){var h,c;function b(){F&&(0<g.lineThickness&&k.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?y=x:0>a.axisY.viewportMaximum?y=d.y1:0<a.axisY.viewportMinimum&&(y=x),k.lineTo(q,y),k.lineTo(F.x,y),k.closePath(),k.globalAlpha=g.fillOpacity,k.fill(),k.globalAlpha=
|
|
399
399
|
1,v&&(f.lineTo(q,y),f.lineTo(F.x,y),f.closePath(),f.fill()),k.beginPath(),k.moveTo(q,t),f.beginPath(),f.moveTo(q,t),F={x:q,y:t})}var e=a.targetCanvasCtx||this.plotArea.ctx,k=v?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var f=this._eventManager.ghostCtx,d=a.axisY.lineCoordinates,w=[],m=this.plotArea,r;k.save();v&&f.save();k.beginPath();k.rect(m.x1,m.y1,m.width,m.height);k.clip();v&&(f.beginPath(),f.rect(m.x1,m.y1,m.width,m.height),f.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var s=
|
|
400
|
-
a.dataSeriesIndexes[p],g=this.data[s],A=g.dataPoints,w=g.id;this._eventManager.objectMap[w]={objectType:"dataSeries",dataSeriesIndex:s};w=V(w);f.fillStyle=w;w=[];h=!0;var l=0,q,t,u,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),y,F=null;c=!1;if(0<A.length){var
|
|
400
|
+
a.dataSeriesIndexes[p],g=this.data[s],A=g.dataPoints,w=g.id;this._eventManager.objectMap[w]={objectType:"dataSeries",dataSeriesIndex:s};w=V(w);f.fillStyle=w;w=[];h=!0;var l=0,q,t,u,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),y,F=null;c=!1;if(0<A.length){var D=g._colorSet[l%g._colorSet.length],z=g.lineColor=g.options.lineColor||D,C=z;k.fillStyle=D;k.strokeStyle=z;k.lineWidth=g.lineThickness;var M="solid";if(k.setLineDash){var R=U(g.nullDataLineDashType,g.lineThickness),
|
|
401
401
|
M=g.lineDashType,ha=U(M,g.lineThickness);k.setLineDash(ha)}for(;l<A.length;l++)if(u=A[l].x.getTime?A[l].x.getTime():A[l].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!g.connectNullData||!c))){var da=t;"number"!==typeof A[l].y?(g.connectNullData||(c||h)||b(),c=!0):(q=a.axisX.convertValueToPixel(u),t=a.axisY.convertValueToPixel(A[l].y),h||c?(!h&&g.connectNullData?(k.setLineDash&&(g.options.nullDataLineDashType||M===g.lineDashType&&g.lineDashType!==g.nullDataLineDashType)&&(h=
|
|
402
|
-
q,c=t,q=r.x,t=r.y,b(),k.moveTo(r.x,r.y),q=h,t=c,F=r,M=g.nullDataLineDashType,k.setLineDash(R)),k.lineTo(q,da),k.lineTo(q,t),v&&(f.lineTo(q,da),f.lineTo(q,t))):(k.beginPath(),k.moveTo(q,t),v&&(f.beginPath(),f.moveTo(q,t)),F={x:q,y:t}),c=h=!1):(k.lineTo(q,da),v&&f.lineTo(q,da),k.lineTo(q,t),v&&f.lineTo(q,t),0==l%250&&b()),r={x:q,y:t},l<A.length-1&&(
|
|
402
|
+
q,c=t,q=r.x,t=r.y,b(),k.moveTo(r.x,r.y),q=h,t=c,F=r,M=g.nullDataLineDashType,k.setLineDash(R)),k.lineTo(q,da),k.lineTo(q,t),v&&(f.lineTo(q,da),f.lineTo(q,t))):(k.beginPath(),k.moveTo(q,t),v&&(f.beginPath(),f.moveTo(q,t)),F={x:q,y:t}),c=h=!1):(k.lineTo(q,da),v&&f.lineTo(q,da),k.lineTo(q,t),v&&f.lineTo(q,t),0==l%250&&b()),r={x:q,y:t},l<A.length-1&&(C!==(A[l].lineColor||z)||M!==(A[l].lineDashType||g.lineDashType))&&(b(),C=A[l].lineColor||z,k.strokeStyle=C,k.setLineDash&&(A[l].lineDashType?(M=A[l].lineDashType,
|
|
403
403
|
k.setLineDash(U(M,g.lineThickness))):(M=g.lineDashType,k.setLineDash(ha)))),u=g.dataPointIds[l],this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:l,x1:q,y1:t},0!==A[l].markerSize&&(0<A[l].markerSize||0<g.markerSize)&&(da=g.getMarkerProperties(l,q,t,k),w.push(da),u=V(u),v&&w.push({x:q,y:t,ctx:f,type:da.type,size:da.size,color:u,borderColor:u,borderThickness:da.borderThickness})),(A[l].indexLabel||g.indexLabel||A[l].indexLabelFormatter||g.indexLabelFormatter)&&
|
|
404
|
-
this._indexLabels.push({chartType:"stepArea",dataPoint:A[l],dataSeries:g,point:{x:q,y:t},direction:0>A[l].y===a.axisY.reversed?1:-1,color:
|
|
405
|
-
0,0,this.width,this.height),k.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());k.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderStackedArea=function(a){function h(){if(!(1>m.length)){for(0<
|
|
404
|
+
this._indexLabels.push({chartType:"stepArea",dataPoint:A[l],dataSeries:g,point:{x:q,y:t},direction:0>A[l].y===a.axisY.reversed?1:-1,color:D}))}b();n.drawMarkers(w)}}v&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),k.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&k.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&k.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
405
|
+
0,0,this.width,this.height),k.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());k.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderStackedArea=function(a){function h(){if(!(1>m.length)){for(0<D.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);v&&q.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=D.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();v&&(q.closePath(),
|
|
406
406
|
q.fill(),q.beginPath());m=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,f=[],d=this.plotArea,l=[],m=[],r=[],p=[],s=0,g,A,w=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),q=this._eventManager.ghostCtx,t,u,x;v&&q.beginPath();b.save();v&&q.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();v&&(q.beginPath(),q.rect(d.x1,d.y1,d.width,d.height),q.clip());for(var e=[],y=0;y<a.dataSeriesIndexes.length;y++){var F=
|
|
407
|
-
a.dataSeriesIndexes[y],
|
|
408
|
-
b.strokeStyle=
|
|
409
|
-
l[k]?l[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ja.y+(p[k]?p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;A=a.axisY.convertValueToPixel(p[k])}else A=a.axisY.convertValueToPixel(ja.y),A-=ua;m.push({x:g,y:w-ua});l[k]=w-A;u||da?(!u&&
|
|
410
|
-
b.setLineDash(R)),b.lineTo(g,A),v&&q.lineTo(g,A)):(b.beginPath(),b.moveTo(g,A),v&&(q.beginPath(),q.moveTo(g,A))),da=u=!1):(b.lineTo(g,A),v&&q.lineTo(g,A),0==s%250&&(h(),b.moveTo(g,A),v&&q.moveTo(g,A),m.push({x:g,y:w-ua})));t={x:g,y:A};s<z.length-1&&(M!==(z[s].lineColor||
|
|
411
|
-
|
|
412
|
-
(ja.indexLabel||
|
|
413
|
-
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),q.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderStackedArea100=function(a){function h(){for(0<
|
|
414
|
-
a.y)}b.closePath();b.globalAlpha=
|
|
415
|
-
x.rect(f.x1,f.y1,f.width,f.height),x.clip());for(var e=[],y=0;y<a.dataSeriesIndexes.length;y++){var F=a.dataSeriesIndexes[y],
|
|
416
|
-
e;m=[];if(0<r.length){var e=
|
|
417
|
-
!da)))if("number"!==typeof ja.y)
|
|
418
|
-
(
|
|
419
|
-
(h(),b.beginPath(),b.moveTo(g,A),m.push({x:g,y:u-na}),M=z[s].lineColor||
|
|
420
|
-
(na=
|
|
407
|
+
a.dataSeriesIndexes[y],D=this.data[F],z=D.dataPoints;D.dataPointIndexes=[];for(s=0;s<z.length;s++)F=z[s].x.getTime?z[s].x.getTime():z[s].x,D.dataPointIndexes[F]=s,e[F]||(r.push(F),e[F]=!0);r.sort(Ya)}for(y=0;y<a.dataSeriesIndexes.length;y++){F=a.dataSeriesIndexes[y];D=this.data[F];z=D.dataPoints;u=!0;m=[];s=D.id;this._eventManager.objectMap[s]={objectType:"dataSeries",dataSeriesIndex:F};s=V(s);q.fillStyle=s;if(0<r.length){var e=D._colorSet[0],C=D.lineColor=D.options.lineColor||e,M=C;b.fillStyle=e;
|
|
408
|
+
b.strokeStyle=C;b.lineWidth=D.lineThickness;x="solid";if(b.setLineDash){var R=U(D.nullDataLineDashType,D.lineThickness);x=D.lineDashType;var ha=U(x,D.lineThickness);b.setLineDash(ha)}for(var da=!0,s=0;s<r.length;s++){var k=r[s],ja=null,ja=0<=D.dataPointIndexes[k]?z[D.dataPointIndexes[k]]:{x:k,y:null};if(!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax&&(!D.connectNullData||!da)))if("number"!==typeof ja.y)D.connectNullData||(da||u)||h(),da=!0;else{g=a.axisX.convertValueToPixel(k);var ua=
|
|
409
|
+
l[k]?l[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ja.y+(p[k]?p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;A=a.axisY.convertValueToPixel(p[k])}else A=a.axisY.convertValueToPixel(ja.y),A-=ua;m.push({x:g,y:w-ua});l[k]=w-A;u||da?(!u&&D.connectNullData?(b.setLineDash&&(D.options.nullDataLineDashType||x===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(u=m.pop(),x=m[m.length-1],h(),b.moveTo(t.x,t.y),m.push(x),m.push(u),x=D.nullDataLineDashType,
|
|
410
|
+
b.setLineDash(R)),b.lineTo(g,A),v&&q.lineTo(g,A)):(b.beginPath(),b.moveTo(g,A),v&&(q.beginPath(),q.moveTo(g,A))),da=u=!1):(b.lineTo(g,A),v&&q.lineTo(g,A),0==s%250&&(h(),b.moveTo(g,A),v&&q.moveTo(g,A),m.push({x:g,y:w-ua})));t={x:g,y:A};s<z.length-1&&(M!==(z[s].lineColor||C)||x!==(z[s].lineDashType||D.lineDashType))&&(h(),b.beginPath(),b.moveTo(g,A),m.push({x:g,y:w-ua}),M=z[s].lineColor||C,b.strokeStyle=M,b.setLineDash&&(z[s].lineDashType?(x=z[s].lineDashType,b.setLineDash(U(x,D.lineThickness))):(x=
|
|
411
|
+
D.lineDashType,b.setLineDash(ha))));if(0<=D.dataPointIndexes[k]){var na=D.dataPointIds[D.dataPointIndexes[k]];this._eventManager.objectMap[na]={id:na,objectType:"dataPoint",dataSeriesIndex:F,dataPointIndex:D.dataPointIndexes[k],x1:g,y1:A}}0<=D.dataPointIndexes[k]&&0!==ja.markerSize&&(0<ja.markerSize||0<D.markerSize)&&(ua=D.getMarkerProperties(D.dataPointIndexes[k],g,A,b),f.push(ua),k=V(na),v&&f.push({x:g,y:A,ctx:q,type:ua.type,size:ua.size,color:k,borderColor:k,borderThickness:ua.borderThickness}));
|
|
412
|
+
(ja.indexLabel||D.indexLabel||ja.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:ja,dataSeries:D,point:{x:g,y:A},direction:0>ja.y===a.axisY.reversed?1:-1,color:e})}}h();b.moveTo(g,A);v&&q.moveTo(g,A)}delete D.dataPointIndexes}n.drawMarkers(f);v&&(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&&
|
|
413
|
+
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),q.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderStackedArea100=function(a){function h(){for(0<D.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);v&&x.lineTo(a.x,
|
|
414
|
+
a.y)}b.closePath();b.globalAlpha=D.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();v&&(x.closePath(),x.fill(),x.beginPath());m=[]}var c=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,f=this.plotArea,d=[],l=[],m=[],r=[],p=[],s=0,g,A,w,q,t,u=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x=this._eventManager.ghostCtx;b.save();v&&x.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();v&&(x.beginPath(),
|
|
415
|
+
x.rect(f.x1,f.y1,f.width,f.height),x.clip());for(var e=[],y=0;y<a.dataSeriesIndexes.length;y++){var F=a.dataSeriesIndexes[y],D=this.data[F],z=D.dataPoints;D.dataPointIndexes=[];for(s=0;s<z.length;s++)F=z[s].x.getTime?z[s].x.getTime():z[s].x,D.dataPointIndexes[F]=s,e[F]||(r.push(F),e[F]=!0);r.sort(Ya)}for(y=0;y<a.dataSeriesIndexes.length;y++){F=a.dataSeriesIndexes[y];D=this.data[F];z=D.dataPoints;q=!0;e=D.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:F};e=V(e);x.fillStyle=
|
|
416
|
+
e;m=[];if(0<r.length){var e=D._colorSet[s%D._colorSet.length],C=D.lineColor=D.options.lineColor||e,M=C;b.fillStyle=e;b.strokeStyle=C;b.lineWidth=D.lineThickness;t="solid";if(b.setLineDash){var R=U(D.nullDataLineDashType,D.lineThickness);t=D.lineDashType;var ha=U(t,D.lineThickness);b.setLineDash(ha)}for(var da=!0,s=0;s<r.length;s++){var k=r[s],ja=null,ja=0<=D.dataPointIndexes[k]?z[D.dataPointIndexes[k]]:{x:k,y:null};if(!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax&&(!D.connectNullData||
|
|
417
|
+
!da)))if("number"!==typeof ja.y)D.connectNullData||(da||q)||h(),da=!0;else{var ua;ua=0!==a.dataPointYSums[k]?100*(ja.y/a.dataPointYSums[k]):0;g=a.axisX.convertValueToPixel(k);var na=l[k]?l[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ua+(p[k]?p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;A=a.axisY.convertValueToPixel(p[k])}else A=a.axisY.convertValueToPixel(ua),A-=na;m.push({x:g,y:u-na});l[k]=u-A;q||da?(!q&&D.connectNullData?(b.setLineDash&&
|
|
418
|
+
(D.options.nullDataLineDashType||t===D.lineDashType&&D.lineDashType!==D.nullDataLineDashType)&&(q=m.pop(),t=m[m.length-1],h(),b.moveTo(w.x,w.y),m.push(t),m.push(q),t=D.nullDataLineDashType,b.setLineDash(R)),b.lineTo(g,A),v&&x.lineTo(g,A)):(b.beginPath(),b.moveTo(g,A),v&&(x.beginPath(),x.moveTo(g,A))),da=q=!1):(b.lineTo(g,A),v&&x.lineTo(g,A),0==s%250&&(h(),b.moveTo(g,A),v&&x.moveTo(g,A),m.push({x:g,y:u-na})));w={x:g,y:A};s<z.length-1&&(M!==(z[s].lineColor||C)||t!==(z[s].lineDashType||D.lineDashType))&&
|
|
419
|
+
(h(),b.beginPath(),b.moveTo(g,A),m.push({x:g,y:u-na}),M=z[s].lineColor||C,b.strokeStyle=M,b.setLineDash&&(z[s].lineDashType?(t=z[s].lineDashType,b.setLineDash(U(t,D.lineThickness))):(t=D.lineDashType,b.setLineDash(ha))));if(0<=D.dataPointIndexes[k]){var H=D.dataPointIds[D.dataPointIndexes[k]];this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:F,dataPointIndex:D.dataPointIndexes[k],x1:g,y1:A}}0<=D.dataPointIndexes[k]&&0!==ja.markerSize&&(0<ja.markerSize||0<D.markerSize)&&
|
|
420
|
+
(na=D.getMarkerProperties(D.dataPointIndexes[k],g,A,b),d.push(na),k=V(H),v&&d.push({x:g,y:A,ctx:x,type:na.type,size:na.size,color:k,borderColor:k,borderThickness:na.borderThickness}));(ja.indexLabel||D.indexLabel||ja.indexLabelFormatter||D.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ja,dataSeries:D,point:{x:g,y:A},direction:0>ja.y===a.axisY.reversed?1:-1,color:e})}}h();b.moveTo(g,A);v&&x.moveTo(g,A)}delete D.dataPointIndexes}n.drawMarkers(d);v&&(c.drawImage(this._preRenderCanvas,
|
|
421
421
|
0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(f.x1,f.y1,f.width,f.height),x.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,
|
|
422
422
|
animationBase:0}}};u.prototype.renderBubble=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,k,f;c.save();v&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=-Infinity,l=Infinity,m=0;m<a.dataSeriesIndexes.length;m++)for(var r=
|
|
423
423
|
a.dataSeriesIndexes[m],p=this.data[r],s=p.dataPoints,g=0,e=0;e<s.length;e++)k=s[e].getTime?k=s[e].x.getTime():k=s[e].x,k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax||"undefined"===typeof s[e].z||(g=s[e].z,g>d&&(d=g),g<l&&(l=g));for(var w=25*Math.PI,q=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,w),m=0;m<a.dataSeriesIndexes.length;m++)if(r=a.dataSeriesIndexes[m],p=this.data[r],s=p.dataPoints,0<s.length)for(c.strokeStyle="#4572A7 ",e=0;e<s.length;e++)if(k=s[e].getTime?
|
|
@@ -431,21 +431,21 @@ bounds:{x1:k-g.size/2,y1:f-g.size/2,x2:k+g.size/2,y2:f+g.size/2},color:null}),p=
|
|
|
431
431
|
c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,animationBase:0}}};u.prototype.renderCandlestick=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,d=this.plotArea,n=0,l,m,r,p,s,g,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,k=this.options.dataPointMaxWidth?
|
|
432
432
|
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,w=a.axisX.dataInfo.minDiff;isFinite(w)||(w=0.3*Math.abs(a.axisX.range));w=this.options.dataPointWidth?this.dataPointWidth:0.7*d.width*(a.axisX.logarithmic?Math.log(w)/Math.log(a.axisX.range):Math.abs(w)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>k&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<e)&&(k=Math.max(this.options.dataPointWidth?
|
|
433
433
|
this.dataPointWidth:-Infinity,e));w<e&&(w=e);w>k&&(w=k);c.save();v&&b.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();v&&(b.beginPath(),b.rect(d.x1,d.y1,d.width,d.height),b.clip());for(var q=0;q<a.dataSeriesIndexes.length;q++){var u=a.dataSeriesIndexes[q],t=this.data[u],G=t.dataPoints;if(0<G.length)for(var x=5<w&&t.bevelEnabled?!0:!1,n=0;n<G.length;n++)if(G[n].getTime?g=G[n].x.getTime():g=G[n].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&!f(G[n].y)&&G[n].y.length&&
|
|
434
|
-
"number"===typeof G[n].y[0]&&"number"===typeof G[n].y[1]&&"number"===typeof G[n].y[2]&&"number"===typeof G[n].y[3]){l=a.axisX.convertValueToPixel(g);m=a.axisY.convertValueToPixel(G[n].y[0]);r=a.axisY.convertValueToPixel(G[n].y[1]);p=a.axisY.convertValueToPixel(G[n].y[2]);s=a.axisY.convertValueToPixel(G[n].y[3]);var y=l-w/2<<0,F=y+w<<0,k=t.options.fallingColor?t.fallingColor:t._colorSet[0],e=G[n].color?G[n].color:t._colorSet[0],
|
|
435
|
-
{id:
|
|
436
|
-
s)),b.stroke(),b.moveTo(l-z,Math.max(m,s)),b.lineTo(l-z,p),b.stroke(),P(b,y,Math.min(m,s),F,Math.max(m,s),e,0,null,!1,!1,!1,!1))):"ohlc"===t.type&&(c.moveTo(l-z,r),c.lineTo(l-z,p),c.stroke(),c.beginPath(),c.moveTo(l,m),c.lineTo(y,m),c.stroke(),c.beginPath(),c.moveTo(l,s),c.lineTo(F,s),c.stroke(),v&&(e=V(
|
|
434
|
+
"number"===typeof G[n].y[0]&&"number"===typeof G[n].y[1]&&"number"===typeof G[n].y[2]&&"number"===typeof G[n].y[3]){l=a.axisX.convertValueToPixel(g);m=a.axisY.convertValueToPixel(G[n].y[0]);r=a.axisY.convertValueToPixel(G[n].y[1]);p=a.axisY.convertValueToPixel(G[n].y[2]);s=a.axisY.convertValueToPixel(G[n].y[3]);var y=l-w/2<<0,F=y+w<<0,k=t.options.fallingColor?t.fallingColor:t._colorSet[0],e=G[n].color?G[n].color:t._colorSet[0],D=Math.round(Math.max(1,0.15*w)),z=0===D%2?0:0.5,C=t.dataPointIds[n];this._eventManager.objectMap[C]=
|
|
435
|
+
{id:C,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:n,x1:y,y1:m,x2:F,y2:r,x3:l,y3:p,x4:l,y4:s,borderThickness:D,color:e};c.strokeStyle=e;c.beginPath();c.lineWidth=D;b.lineWidth=Math.max(D,4);"candlestick"===t.type?(c.moveTo(l-z,r),c.lineTo(l-z,Math.min(m,s)),c.stroke(),c.moveTo(l-z,Math.max(m,s)),c.lineTo(l-z,p),c.stroke(),P(c,y,Math.min(m,s),F,Math.max(m,s),G[n].y[0]<=G[n].y[3]?t.risingColor:k,D,e,x,x,!1,!1,t.fillOpacity),v&&(e=V(C),b.strokeStyle=e,b.moveTo(l-z,r),b.lineTo(l-z,Math.min(m,
|
|
436
|
+
s)),b.stroke(),b.moveTo(l-z,Math.max(m,s)),b.lineTo(l-z,p),b.stroke(),P(b,y,Math.min(m,s),F,Math.max(m,s),e,0,null,!1,!1,!1,!1))):"ohlc"===t.type&&(c.moveTo(l-z,r),c.lineTo(l-z,p),c.stroke(),c.beginPath(),c.moveTo(l,m),c.lineTo(y,m),c.stroke(),c.beginPath(),c.moveTo(l,s),c.lineTo(F,s),c.stroke(),v&&(e=V(C),b.strokeStyle=e,b.moveTo(l-z,r),b.lineTo(l-z,p),b.stroke(),b.beginPath(),b.moveTo(l,m),b.lineTo(y,m),b.stroke(),b.beginPath(),b.moveTo(l,s),b.lineTo(F,s),b.stroke()));(G[n].indexLabel||t.indexLabel||
|
|
437
437
|
G[n].indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:t.type,dataPoint:G[n],dataSeries:t,point:{x:y+(F-y)/2,y:a.axisY.reversed?p:r},direction:1,bounds:{x1:y,y1:Math.min(r,p),x2:F,y2:Math.max(r,p)},color:e})}}v&&(h.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),
|
|
438
438
|
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,animationBase:0}}};u.prototype.renderBoxAndWhisker=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=this.plotArea,
|
|
439
439
|
d=0,n,l,m,r,p,s,g,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,w=a.axisX.dataInfo.minDiff;isFinite(w)||(w=0.3*Math.abs(a.axisX.range));w=this.options.dataPointWidth?this.dataPointWidth:0.7*k.width*(a.axisX.logarithmic?Math.log(w)/Math.log(a.axisX.range):Math.abs(w)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>
|
|
440
440
|
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));w<e&&(w=e);w>d&&(w=d);c.save();v&&b.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();v&&(b.beginPath(),b.rect(k.x1,k.y1,k.width,k.height),b.clip());for(var q=!1,q=!!a.axisY.reversed,u=0;u<a.dataSeriesIndexes.length;u++){var t=a.dataSeriesIndexes[u],G=this.data[t],x=G.dataPoints;
|
|
441
441
|
if(0<x.length)for(var y=5<w&&G.bevelEnabled?!0:!1,d=0;d<x.length;d++)if(x[d].getTime?g=x[d].x.getTime():g=x[d].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&!f(x[d].y)&&x[d].y.length&&"number"===typeof x[d].y[0]&&"number"===typeof x[d].y[1]&&"number"===typeof x[d].y[2]&&"number"===typeof x[d].y[3]&&"number"===typeof x[d].y[4]&&5===x[d].y.length){n=a.axisX.convertValueToPixel(g);l=a.axisY.convertValueToPixel(x[d].y[0]);m=a.axisY.convertValueToPixel(x[d].y[1]);r=a.axisY.convertValueToPixel(x[d].y[2]);
|
|
442
|
-
p=a.axisY.convertValueToPixel(x[d].y[3]);s=a.axisY.convertValueToPixel(x[d].y[4]);var F=n-w/2<<0,
|
|
442
|
+
p=a.axisY.convertValueToPixel(x[d].y[3]);s=a.axisY.convertValueToPixel(x[d].y[4]);var F=n-w/2<<0,D=n+w/2<<0,e=x[d].color?x[d].color:G._colorSet[0],z=Math.round(Math.max(1,0.15*w)),C=0===z%2?0:0.5,M=x[d].whiskerColor?x[d].whiskerColor:x[d].color?G.whiskerColor?G.whiskerColor:x[d].color:G.whiskerColor?G.whiskerColor:e,R="number"===typeof x[d].whiskerThickness?x[d].whiskerThickness:"number"===typeof G.options.whiskerThickness?G.whiskerThickness:z,ha=x[d].whiskerDashType?x[d].whiskerDashType:G.whiskerDashType,
|
|
443
443
|
da=f(x[d].whiskerLength)?f(G.options.whiskerLength)?w:G.whiskerLength:x[d].whiskerLength,da="number"===typeof da?0>=da?0:da>=w?w:da:"string"===typeof da?parseInt(da)*w/100>w?w:parseInt(da)*w/100:w,ja=1===Math.round(R)%2?0.5:0,ua=x[d].stemColor?x[d].stemColor:x[d].color?G.stemColor?G.stemColor:x[d].color:G.stemColor?G.stemColor:e,na="number"===typeof x[d].stemThickness?x[d].stemThickness:"number"===typeof G.options.stemThickness?G.stemThickness:z,H=1===Math.round(na)%2?0.5:0,I=x[d].stemDashType?x[d].stemDashType:
|
|
444
444
|
G.stemDashType,L=x[d].lineColor?x[d].lineColor:x[d].color?G.lineColor?G.lineColor:x[d].color:G.lineColor?G.lineColor:e,O="number"===typeof x[d].lineThickness?x[d].lineThickness:"number"===typeof G.options.lineThickness?G.lineThickness:z,N=x[d].lineDashType?x[d].lineDashType:G.lineDashType,S=1===Math.round(O)%2?0.5:0,Q=G.upperBoxColor,Z=G.lowerBoxColor,wa=f(G.options.fillOpacity)?1:G.fillOpacity,T=G.dataPointIds[d];this._eventManager.objectMap[T]={id:T,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:d,
|
|
445
|
-
x1:F,y1:l,x2:
|
|
446
|
-
F,Math.min(r,s),
|
|
447
|
-
c.moveTo(n-da/2<<0,l+ja),c.lineTo(n+da/2<<0,l+ja),c.stroke());c.restore();v&&(e=V(T),b.strokeStyle=e,b.lineWidth=na,0<na&&(b.moveTo(n-
|
|
448
|
-
G.indexLabelFormatter)&&this._indexLabels.push({chartType:G.type,dataPoint:x[d],dataSeries:G,point:{x:F+(
|
|
445
|
+
x1:F,y1:l,x2:D,y2:m,x3:n,y3:r,x4:n,y4:p,y5:s,borderThickness:z,color:e,stemThickness:na,stemColor:ua,whiskerThickness:R,whiskerLength:da,whiskerColor:M,lineThickness:O,lineColor:L};c.save();0<na&&(c.beginPath(),c.strokeStyle=ua,c.lineWidth=na,c.setLineDash&&c.setLineDash(U(I,na)),c.moveTo(n-H,m),c.lineTo(n-H,l),c.stroke(),c.moveTo(n-H,p),c.lineTo(n-H,r),c.stroke());c.restore();b.lineWidth=Math.max(z,4);c.beginPath();P(c,F,Math.min(s,m),D,Math.max(m,s),Z,0,e,q?y:!1,q?!1:y,!1,!1,wa);c.beginPath();P(c,
|
|
446
|
+
F,Math.min(r,s),D,Math.max(s,r),Q,0,e,q?!1:y,q?y:!1,!1,!1,wa);c.beginPath();c.lineWidth=z;c.strokeStyle=e;c.rect(F-C,Math.min(m,r)-C,D-F+2*C,Math.max(m,r)-Math.min(m,r)+2*C);c.stroke();c.save();0<O&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(U(N,O)),c.strokeStyle=L,c.lineWidth=O,c.moveTo(F,s-S),c.lineTo(D,s-S),c.stroke());c.restore();c.save();0<R&&(c.beginPath(),c.setLineDash&&c.setLineDash(U(ha,R)),c.strokeStyle=M,c.lineWidth=R,c.moveTo(n-da/2<<0,p-ja),c.lineTo(n+da/2<<0,p-ja),c.stroke(),
|
|
447
|
+
c.moveTo(n-da/2<<0,l+ja),c.lineTo(n+da/2<<0,l+ja),c.stroke());c.restore();v&&(e=V(T),b.strokeStyle=e,b.lineWidth=na,0<na&&(b.moveTo(n-C-H,m),b.lineTo(n-C-H,Math.max(l,p)),b.stroke(),b.moveTo(n-C-H,Math.min(l,p)),b.lineTo(n-C-H,r),b.stroke()),P(b,F,Math.max(m,r),D,Math.min(m,r),e,0,null,!1,!1,!1,!1),0<R&&(b.beginPath(),b.lineWidth=R,b.moveTo(n+da/2,p-ja),b.lineTo(n-da/2,p-ja),b.stroke(),b.moveTo(n+da/2,l+ja),b.lineTo(n-da/2,l+ja),b.stroke()));(x[d].indexLabel||G.indexLabel||x[d].indexLabelFormatter||
|
|
448
|
+
G.indexLabelFormatter)&&this._indexLabels.push({chartType:G.type,dataPoint:x[d],dataSeries:G,point:{x:F+(D-F)/2,y:a.axisY.reversed?l:p},direction:1,bounds:{x1:F,y1:Math.min(l,p),x2:D,y2:Math.max(l,p)},color:e})}}v&&(h.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,
|
|
449
449
|
0,0,this.width,this.height),c.clearRect(k.x1,k.y1,k.width,k.height),b.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,animationBase:0}}};u.prototype.renderRangeColumn=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,k=0,d,n,l,k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
450
450
|
1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;var m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&k>d&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&
|
|
451
451
|
(this.dataPointMinWidth&&d<k)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));m<k&&(m=k);m>d&&(m=d);c.save();v&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var r=0;r<a.dataSeriesIndexes.length;r++){var p=a.dataSeriesIndexes[r],s=this.data[p],g=s.dataPoints;if(0<g.length)for(var w=
|
|
@@ -454,14 +454,14 @@ r)*m<<0,u=a.axisX.reversed?q-m<<0:q+m<<0,b=g[k].color?g[k].color:s._colorSet[k%s
|
|
|
454
454
|
s.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:g[k],dataSeries:s,indexKeyword:0,point:{x:q+(u-q)/2,y:g[k].y[1]>=g[k].y[0]?n:d},direction:g[k].y[1]>=g[k].y[0]?-1:1,bounds:{x1:q,y1:Math.min(d,n),x2:u,y2:Math.max(d,n)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:g[k],dataSeries:s,indexKeyword:1,point:{x:q+(u-q)/2,y:g[k].y[1]>=g[k].y[0]?d:n},direction:g[k].y[1]>=g[k].y[0]?1:-1,bounds:{x1:q,y1:Math.min(d,n),x2:u,y2:Math.max(d,n)},color:b})}}v&&(h.drawImage(this._preRenderCanvas,
|
|
455
455
|
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,
|
|
456
456
|
animationBase:0}}};u.prototype.renderError=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=!1,d=this.plotArea,n=0,l,m,r,p,s,g,w,q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));c.save();v&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();v&&(this._eventManager.ghostCtx.beginPath(),
|
|
457
|
-
this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var u=0,t=0;t<this.data.length;t++)!this.data[t].type.match(/(bar|column)/ig)||!this.data[t].visible||this.data[t].type.match(/(stacked)/ig)&&u||u++;for(var G=0;G<a.dataSeriesIndexes.length;G++){var x=a.dataSeriesIndexes[G],y=this.data[x],F=y.dataPoints,
|
|
458
|
-
!this.data[t].visible||this.data[t].type.match(/(stacked)/ig)&&z||(this.data[t].type.match(/(range)/ig)&&(k=!0),z++);e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(
|
|
459
|
-
b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(
|
|
457
|
+
this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var u=0,t=0;t<this.data.length;t++)!this.data[t].type.match(/(bar|column)/ig)||!this.data[t].visible||this.data[t].type.match(/(stacked)/ig)&&u||u++;for(var G=0;G<a.dataSeriesIndexes.length;G++){var x=a.dataSeriesIndexes[G],y=this.data[x],F=y.dataPoints,D=f(y._linkedSeries)?!1:y._linkedSeries.type.match(/(bar|column)/ig)&&y._linkedSeries.visible?!0:!1,z=0;if(D)for(e=y._linkedSeries.id,t=0;t<e;t++)!this.data[t].type.match(/(bar|column)/ig)||
|
|
458
|
+
!this.data[t].visible||this.data[t].type.match(/(stacked)/ig)&&z||(this.data[t].type.match(/(range)/ig)&&(k=!0),z++);e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?u:1)))<<0:0.3*this.width;k&&(n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
459
|
+
b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(D?u:1)))<<0:0.03*this.width);t=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?d.height:d.width)*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/(D?u:1))<<0;this.dataPointMaxWidth&&e>n&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<e)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));t<e&&
|
|
460
460
|
(t=e);t>n&&(t=n);if(0<F.length)for(var I=y._colorSet,n=0;n<F.length;n++){var e=y.lineColor=y.options.color?y.options.color:I[0],M={color:F[n].whiskerColor?F[n].whiskerColor:F[n].color?y.whiskerColor?y.whiskerColor:F[n].color:y.whiskerColor?y.whiskerColor:e,thickness:f(F[n].whiskerThickness)?y.whiskerThickness:F[n].whiskerThickness,dashType:F[n].whiskerDashType?F[n].whiskerDashType:y.whiskerDashType,length:f(F[n].whiskerLength)?f(y.options.whiskerLength)?t:y.options.whiskerLength:F[n].whiskerLength,
|
|
461
461
|
trimLength:f(F[n].whiskerLength)?f(y.options.whiskerLength)?50:0:0};M.length="number"===typeof M.length?0>=M.length?0:M.length>=t?t:M.length:"string"===typeof M.length?parseInt(M.length)*t/100>t?t:parseInt(M.length)*t/100>t:t;M.thickness="number"===typeof M.thickness?0>M.thickness?0:Math.round(M.thickness):2;var R={color:F[n].stemColor?F[n].stemColor:F[n].color?y.stemColor?y.stemColor:F[n].color:y.stemColor?y.stemColor:e,thickness:F[n].stemThickness?F[n].stemThickness:y.stemThickness,dashType:F[n].stemDashType?
|
|
462
|
-
F[n].stemDashType:y.stemDashType};R.thickness="number"===typeof R.thickness?0>R.thickness?0:Math.round(R.thickness):2;F[n].getTime?w=F[n].x.getTime():w=F[n].x;if(!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax)&&!f(F[n].y)&&F[n].y.length&&"number"===typeof F[n].y[0]&&"number"===typeof F[n].y[1]){var ha=a.axisX.convertValueToPixel(w);b?m=ha:l=ha;ha=a.axisY.convertValueToPixel(F[n].y[0]);b?r=ha:s=ha;ha=a.axisY.convertValueToPixel(F[n].y[1]);b?p=ha:g=ha;b?(s=a.axisX.reversed?m+(
|
|
463
|
-
1)*t/2-(
|
|
464
|
-
Math.min(s,g),Math.max(p,r),Math.max(g,s),e,M,R,b);v&&
|
|
462
|
+
F[n].stemDashType:y.stemDashType};R.thickness="number"===typeof R.thickness?0>R.thickness?0:Math.round(R.thickness):2;F[n].getTime?w=F[n].x.getTime():w=F[n].x;if(!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax)&&!f(F[n].y)&&F[n].y.length&&"number"===typeof F[n].y[0]&&"number"===typeof F[n].y[1]){var ha=a.axisX.convertValueToPixel(w);b?m=ha:l=ha;ha=a.axisY.convertValueToPixel(F[n].y[0]);b?r=ha:s=ha;ha=a.axisY.convertValueToPixel(F[n].y[1]);b?p=ha:g=ha;b?(s=a.axisX.reversed?m+(D?u:
|
|
463
|
+
1)*t/2-(D?z-1:0)*t<<0:m-(D?u:1)*t/2+(D?z-1:0)*t<<0,g=a.axisX.reversed?s-t<<0:s+t<<0):(r=a.axisX.reversed?l+(D?u:1)*t/2-(D?z-1:0)*t<<0:l-(D?u:1)*t/2+(D?z-1:0)*t<<0,p=a.axisX.reversed?r-t<<0:r+t<<0);!b&&s>g&&(ha=s,s=g,g=ha);b&&r>p&&(ha=r,r=p,p=ha);ha=y.dataPointIds[n];this._eventManager.objectMap[ha]={id:ha,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:n,x1:Math.min(r,p),y1:Math.min(s,g),x2:Math.max(p,r),y2:Math.max(g,s),isXYSwapped:b,stemProperties:R,whiskerProperties:M};C(c,Math.min(r,p),
|
|
464
|
+
Math.min(s,g),Math.max(p,r),Math.max(g,s),e,M,R,b);v&&C(this._eventManager.ghostCtx,r,s,p,g,e,M,R,b);if(F[n].indexLabel||y.indexLabel||F[n].indexLabelFormatter||y.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:F[n],dataSeries:y,indexKeyword:0,point:{x:b?F[n].y[1]>=F[n].y[0]?r:p:r+(p-r)/2,y:b?s+(g-s)/2:F[n].y[1]>=F[n].y[0]?g:s},direction:F[n].y[1]>=F[n].y[0]?-1:1,bounds:{x1:b?Math.min(r,p):r,y1:b?s:Math.min(s,g),x2:b?Math.max(r,p):p,y2:b?g:Math.max(s,g)},color:e,axisSwapped:b}),
|
|
465
465
|
this._indexLabels.push({chartType:"error",dataPoint:F[n],dataSeries:y,indexKeyword:1,point:{x:b?F[n].y[1]>=F[n].y[0]?p:r:r+(p-r)/2,y:b?s+(g-s)/2:F[n].y[1]>=F[n].y[0]?s:g},direction:F[n].y[1]>=F[n].y[0]?1:-1,bounds:{x1:b?Math.min(r,p):r,y1:b?s:Math.min(s,g),x2:b?Math.max(r,p):p,y2:b?g:Math.max(s,g)},color:e,axisSwapped:b})}}}v&&(h.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),
|
|
466
466
|
a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,animationBase:0}}};u.prototype.renderRangeBar=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:
|
|
467
467
|
h;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,k=0,d,n,l,m,k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var r=a.axisX.dataInfo.minDiff;isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?this.dataPointWidth:0.9*
|
|
@@ -472,10 +472,10 @@ dataSeriesIndex:s,dataPointIndex:k,x1:d,y1:l,x2:n,y2:u};b=V(b);v&&P(this._eventM
|
|
|
472
472
|
dataPoint:w[k],dataSeries:g,indexKeyword:1,point:{x:w[k].y[1]>=w[k].y[0]?n:d,y:l+(u-l)/2},direction:w[k].y[1]>=w[k].y[0]?1:-1,bounds:{x1:Math.min(d,n),y1:l,x2:Math.max(d,n),y2:u},color:b})}}}v&&(h.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,
|
|
473
473
|
0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,animationBase:0}}};u.prototype.renderRangeArea=function(a){function h(){if(G){for(var a=null,c=l.length-1;0<=c;c--)a=l[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=r.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<r.lineThickness){b.beginPath();
|
|
474
474
|
b.moveTo(a.x,a.y2);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y2);b.moveTo(l[0].x,l[0].y1);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(w,q);e.beginPath();e.moveTo(w,q);G={x:w,y:q};l=[];l.push({x:w,y1:q,y2:u})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=[],f=this.plotArea;b.save();v&&e.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();v&&(e.beginPath(),
|
|
475
|
-
e.rect(f.x1,f.y1,f.width,f.height),e.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var l=[],m=a.dataSeriesIndexes[d],r=this.data[m],p=r.dataPoints,k=r.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:m};k=V(k);e.fillStyle=k;var k=[],s=!0,g=0,w,q,u,t,G=null;if(0<p.length){var x=r._colorSet[g%r._colorSet.length],y=r.lineColor=r.options.lineColor||x,F=y;b.fillStyle=x;b.strokeStyle=y;b.lineWidth=r.lineThickness;var
|
|
476
|
-
r.lineThickness),
|
|
477
|
-
|
|
478
|
-
y2:u};g<p.length-1&&(F!==(p[g].lineColor||y)||
|
|
475
|
+
e.rect(f.x1,f.y1,f.width,f.height),e.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var l=[],m=a.dataSeriesIndexes[d],r=this.data[m],p=r.dataPoints,k=r.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:m};k=V(k);e.fillStyle=k;var k=[],s=!0,g=0,w,q,u,t,G=null;if(0<p.length){var x=r._colorSet[g%r._colorSet.length],y=r.lineColor=r.options.lineColor||x,F=y;b.fillStyle=x;b.strokeStyle=y;b.lineWidth=r.lineThickness;var D="solid";if(b.setLineDash){var z=U(r.nullDataLineDashType,
|
|
476
|
+
r.lineThickness),D=r.lineDashType,C=U(D,r.lineThickness);b.setLineDash(C)}for(var M=!0;g<p.length;g++)if(t=p[g].x.getTime?p[g].x.getTime():p[g].x,!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax&&(!r.connectNullData||!M)))if(null!==p[g].y&&p[g].y.length&&"number"===typeof p[g].y[0]&&"number"===typeof p[g].y[1]){w=a.axisX.convertValueToPixel(t);q=a.axisY.convertValueToPixel(p[g].y[0]);u=a.axisY.convertValueToPixel(p[g].y[1]);s||M?(r.connectNullData&&!s?(b.setLineDash&&(r.options.nullDataLineDashType||
|
|
477
|
+
D===r.lineDashType&&r.lineDashType!==r.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=C,D=r.nullDataLineDashType,b.setLineDash(z)),b.lineTo(w,q),v&&e.lineTo(w,q),l.push({x:w,y1:q,y2:u})):(b.beginPath(),b.moveTo(w,q),G={x:w,y:q},l=[],l.push({x:w,y1:q,y2:u}),v&&(e.beginPath(),e.moveTo(w,q))),M=s=!1):(b.lineTo(w,q),l.push({x:w,y1:q,y2:u}),v&&e.lineTo(w,q),0==g%250&&h());t=r.dataPointIds[g];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:g,x1:w,y1:q,
|
|
478
|
+
y2:u};g<p.length-1&&(F!==(p[g].lineColor||y)||D!==(p[g].lineDashType||r.lineDashType))&&(h(),F=p[g].lineColor||y,l[l.length-1].newStrokeStyle=F,b.strokeStyle=F,b.setLineDash&&(p[g].lineDashType?(D=p[g].lineDashType,l[l.length-1].newLineDashArray=U(D,r.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):(D=r.lineDashType,l[l.length-1].newLineDashArray=C,b.setLineDash(C))));if(0!==p[g].markerSize&&(0<p[g].markerSize||0<r.markerSize)){var R=r.getMarkerProperties(g,w,u,b);k.push(R);var ha=V(t);
|
|
479
479
|
v&&k.push({x:w,y:u,ctx:e,type:R.type,size:R.size,color:ha,borderColor:ha,borderThickness:R.borderThickness});R=r.getMarkerProperties(g,w,q,b);k.push(R);ha=V(t);v&&k.push({x:w,y:q,ctx:e,type:R.type,size:R.size,color:ha,borderColor:ha,borderThickness:R.borderThickness})}if(p[g].indexLabel||r.indexLabel||p[g].indexLabelFormatter||r.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[g],dataSeries:r,indexKeyword:0,point:{x:w,y:q},direction:p[g].y[0]>p[g].y[1]===a.axisY.reversed?
|
|
480
480
|
-1:1,color:x}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[g],dataSeries:r,indexKeyword:1,point:{x:w,y:u},direction:p[g].y[0]>p[g].y[1]===a.axisY.reversed?1:-1,color:x})}else M||s||h(),M=!0;h();n.drawMarkers(k)}}v&&(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&&
|
|
481
481
|
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(f.x1,f.y1,f.width,f.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderRangeSplineArea=function(a){function h(a,c){var h=q(u,2);if(0<h.length){if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(h[0].x,h[0].y);for(var g=
|
|
@@ -483,65 +483,65 @@ this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height
|
|
|
483
483
|
1].x,h[g+1].y,h[g+2].x,h[g+2].y,h[g+3].x,h[g+3].y);h=q(y,2);b.lineTo(y[y.length-1].x,y[y.length-1].y);for(g=h.length-1;2<g;g-=3)b.bezierCurveTo(h[g-1].x,h[g-1].y,h[g-2].x,h[g-2].y,h[g-3].x,h[g-3].y),v&&e.bezierCurveTo(h[g-1].x,h[g-1].y,h[g-2].x,h[g-2].y,h[g-3].x,h[g-3].y);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();v&&(e.closePath(),e.fill());b.globalAlpha=1;if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(h[0].x,h[0].y);for(var k=g=0;g<h.length-
|
|
484
484
|
3;g+=3,k++){if(u[k].newStrokeStyle||u[k].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(h[g].x,h[g].y),u[k].newStrokeStyle&&(b.strokeStyle=u[k].newStrokeStyle),u[k].newLineDashArray&&b.setLineDash(u[k].newLineDashArray);b.bezierCurveTo(h[g+1].x,h[g+1].y,h[g+2].x,h[g+2].y,h[g+3].x,h[g+3].y)}h=q(u,2);b.moveTo(h[0].x,h[0].y);for(k=g=0;g<h.length-3;g+=3,k++){if(u[k].newStrokeStyle||u[k].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(h[g].x,h[g].y),u[k].newStrokeStyle&&(b.strokeStyle=u[k].newStrokeStyle),
|
|
485
485
|
u[k].newLineDashArray&&b.setLineDash(u[k].newLineDashArray);b.bezierCurveTo(h[g+1].x,h[g+1].y,h[g+2].x,h[g+2].y,h[g+3].x,h[g+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=v?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=[],f=this.plotArea;b.save();v&&e.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();v&&(e.beginPath(),e.rect(f.x1,f.y1,f.width,f.height),e.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var l=
|
|
486
|
-
a.dataSeriesIndexes[d],m=this.data[l],r=m.dataPoints,k=m.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:l};k=V(k);e.fillStyle=k;var k=[],p=0,s,g,w,u=[],y=[];if(0<r.length){var t=m._colorSet[p%m._colorSet.length],G=m.lineColor=m.options.lineColor||t,x=G;b.fillStyle=t;b.lineWidth=m.lineThickness;var z="solid",F;if(b.setLineDash){var
|
|
487
|
-
r[p].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!g)))if(null!==r[p].y&&r[p].y.length&&"number"===typeof r[p].y[0]&&"number"===typeof r[p].y[1]){s=a.axisX.convertValueToPixel(s);g=a.axisY.convertValueToPixel(r[p].y[0]);w=a.axisY.convertValueToPixel(r[p].y[1]);var
|
|
488
|
-
(r[p].lineColor||G)||z!==(r[p].lineDashType||m.lineDashType))&&(x=r[p].lineColor||G,u[u.length-1].newStrokeStyle=x,b.setLineDash&&(r[p].lineDashType?(z=r[p].lineDashType,u[u.length-1].newLineDashArray=U(z,m.lineThickness)):(z=m.lineDashType,u[u.length-1].newLineDashArray=F)));if(0!==r[p].markerSize&&(0<r[p].markerSize||0<m.markerSize)){var I=m.getMarkerProperties(p,s,g,b);k.push(I);var M=V(
|
|
489
|
-
I=m.getMarkerProperties(p,s,w,b);k.push(I);M=V(
|
|
490
|
-
y:w},direction:r[p].y[0]<=r[p].y[1]?1:-1,color:t});g=!1}else 0<p&&!g&&(m.connectNullData?b.setLineDash&&(0<u.length&&(m.options.nullDataLineDashType||!r[p-1].lineDashType))&&(u[u.length-1].newLineDashArray=
|
|
486
|
+
a.dataSeriesIndexes[d],m=this.data[l],r=m.dataPoints,k=m.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:l};k=V(k);e.fillStyle=k;var k=[],p=0,s,g,w,u=[],y=[];if(0<r.length){var t=m._colorSet[p%m._colorSet.length],G=m.lineColor=m.options.lineColor||t,x=G;b.fillStyle=t;b.lineWidth=m.lineThickness;var z="solid",F;if(b.setLineDash){var D=U(m.nullDataLineDashType,m.lineThickness),z=m.lineDashType;F=U(z,m.lineThickness)}for(g=!1;p<r.length;p++)if(s=r[p].x.getTime?r[p].x.getTime():
|
|
487
|
+
r[p].x,!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!g)))if(null!==r[p].y&&r[p].y.length&&"number"===typeof r[p].y[0]&&"number"===typeof r[p].y[1]){s=a.axisX.convertValueToPixel(s);g=a.axisY.convertValueToPixel(r[p].y[0]);w=a.axisY.convertValueToPixel(r[p].y[1]);var C=m.dataPointIds[p];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:p,x1:s,y1:g,y2:w};u[u.length]={x:s,y:g};y[y.length]={x:s,y:w};p<r.length-1&&(x!==
|
|
488
|
+
(r[p].lineColor||G)||z!==(r[p].lineDashType||m.lineDashType))&&(x=r[p].lineColor||G,u[u.length-1].newStrokeStyle=x,b.setLineDash&&(r[p].lineDashType?(z=r[p].lineDashType,u[u.length-1].newLineDashArray=U(z,m.lineThickness)):(z=m.lineDashType,u[u.length-1].newLineDashArray=F)));if(0!==r[p].markerSize&&(0<r[p].markerSize||0<m.markerSize)){var I=m.getMarkerProperties(p,s,g,b);k.push(I);var M=V(C);v&&k.push({x:s,y:g,ctx:e,type:I.type,size:I.size,color:M,borderColor:M,borderThickness:I.borderThickness});
|
|
489
|
+
I=m.getMarkerProperties(p,s,w,b);k.push(I);M=V(C);v&&k.push({x:s,y:w,ctx:e,type:I.type,size:I.size,color:M,borderColor:M,borderThickness:I.borderThickness})}if(r[p].indexLabel||m.indexLabel||r[p].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:r[p],dataSeries:m,indexKeyword:0,point:{x:s,y:g},direction:r[p].y[0]<=r[p].y[1]?-1:1,color:t}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:r[p],dataSeries:m,indexKeyword:1,point:{x:s,
|
|
490
|
+
y:w},direction:r[p].y[0]<=r[p].y[1]?1:-1,color:t});g=!1}else 0<p&&!g&&(m.connectNullData?b.setLineDash&&(0<u.length&&(m.options.nullDataLineDashType||!r[p-1].lineDashType))&&(u[u.length-1].newLineDashArray=D,z=m.nullDataLineDashType):(h(F,G),u=[],y=[])),g=!0;h(F,G);n.drawMarkers(k)}}v&&(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,
|
|
491
491
|
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(f.x1,f.y1,f.width,f.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:E.xClipAnimation,easingFunction:E.easing.linear,animationBase:0}}};u.prototype.renderWaterfall=function(a){var h=a.targetCanvasCtx||this.plotArea.ctx,c=v?this._preRenderCtx:h;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,
|
|
492
492
|
e=null,k=this.plotArea,f=0,d,n,m,r,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.options.dataPointMinWidth?this.dataPointMinWidth: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 s=a.axisX.dataInfo.minDiff;isFinite(s)||(s=0.3*Math.abs(a.axisX.range));s=this.options.dataPointWidth?
|
|
493
493
|
this.dataPointWidth:0.6*(k.width*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>n&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<f)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));s<f&&(s=f);s>n&&(s=n);c.save();v&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);
|
|
494
494
|
c.clip();v&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.clip());for(var g=0;g<a.dataSeriesIndexes.length;g++){var l=a.dataSeriesIndexes[g],w=this.data[l],q=w.dataPoints,e=w._colorSet[0];w.risingColor=w.options.risingColor?w.options.risingColor:e;w.fallingColor=w.options.fallingColor?w.options.fallingColor:"#e40a0a";var t="number"===typeof w.options.lineThickness?Math.round(w.lineThickness):1,u=1===Math.round(t)%
|
|
495
|
-
2?-0.5:0;if(0<q.length)for(var x=5<s&&w.bevelEnabled?!0:!1,y=!1,z=null,
|
|
495
|
+
2?-0.5:0;if(0<q.length)for(var x=5<s&&w.bevelEnabled?!0:!1,y=!1,z=null,D=null,f=0;f<q.length;f++)if(q[f].getTime?r=q[f].x.getTime():r=q[f].x,"number"!==typeof q[f].y){if(0<f&&!y&&w.connectNullData)var C=w.options.nullDataLineDashType||!q[f-1].lineDashType?w.nullDataLineDashType:q[f-1].lineDashType;y=!0}else{d=a.axisX.convertValueToPixel(r);n=0===w.dataPointEOs[f].cumulativeSum?p:a.axisY.convertValueToPixel(w.dataPointEOs[f].cumulativeSum);m=0===w.dataPointEOs[f].cumulativeSumYStartValue?p:a.axisY.convertValueToPixel(w.dataPointEOs[f].cumulativeSumYStartValue);
|
|
496
496
|
d=a.axisX.reversed?d+a.plotType.totalDataSeries*s/2-(a.previousDataSeriesCount+g)*s<<0:d-a.plotType.totalDataSeries*s/2+(a.previousDataSeriesCount+g)*s<<0;var I=a.axisX.reversed?d-s<<0:d+s<<0;n>m&&(e=n,n=m,m=e);a.axisY.reversed&&(e=n,n=m,m=e);e=w.dataPointIds[f];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:f,x1:d,y1:n,x2:I,y2:m};var M=q[f].color?q[f].color:0<q[f].y?w.risingColor:w.fallingColor;P(c,a.axisX.reversed?I:d,a.axisY.reversed?m:n,a.axisX.reversed?
|
|
497
|
-
d:I,a.axisY.reversed?n:m,M,0,M,x,x,!1,!1,w.fillOpacity);e=V(e);v&&P(this._eventManager.ghostCtx,a.axisX.reversed?I:d,n,a.axisX.reversed?d:I,m,e,0,null,!1,!1,!1,!1);var R,M=d;R="undefined"!==typeof q[f].isIntermediateSum&&!0===q[f].isIntermediateSum||"undefined"!==typeof q[f].isCumulativeSum&&!0===q[f].isCumulativeSum?0<q[f].y?n:m:0<q[f].y?m:n;0<f&&z&&(!y||w.connectNullData)&&(y&&c.setLineDash&&c.setLineDash(U(
|
|
498
|
-
|
|
497
|
+
d:I,a.axisY.reversed?n:m,M,0,M,x,x,!1,!1,w.fillOpacity);e=V(e);v&&P(this._eventManager.ghostCtx,a.axisX.reversed?I:d,n,a.axisX.reversed?d:I,m,e,0,null,!1,!1,!1,!1);var R,M=d;R="undefined"!==typeof q[f].isIntermediateSum&&!0===q[f].isIntermediateSum||"undefined"!==typeof q[f].isCumulativeSum&&!0===q[f].isCumulativeSum?0<q[f].y?n:m:0<q[f].y?m:n;0<f&&z&&(!y||w.connectNullData)&&(y&&c.setLineDash&&c.setLineDash(U(C,t)),c.beginPath(),c.moveTo(z,D-u),c.lineTo(M,R-u),0<t&&c.stroke(),v&&(b.beginPath(),b.moveTo(z,
|
|
498
|
+
D-u),b.lineTo(M,R-u),0<t&&b.stroke()));y=!1;z=I;D=0<q[f].y?n:m;M=q[f].lineDashType?q[f].lineDashType:w.options.lineDashType?w.options.lineDashType:"shortDash";c.strokeStyle=q[f].lineColor?q[f].lineColor:w.options.lineColor?w.options.lineColor:"#9e9e9e";c.lineWidth=t;c.setLineDash&&(M=U(M,t),c.setLineDash(M));(q[f].indexLabel||w.indexLabel||q[f].indexLabelFormatter||w.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:q[f],dataSeries:w,point:{x:d+(I-d)/2,y:0<=q[f].y?n:m},
|
|
499
499
|
direction:0>q[f].y===a.axisY.reversed?1:-1,bounds:{x1:d,y1:Math.min(n,m),x2:I,y2:Math.max(n,m)},color:e})}}v&&(h.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(k.x1,k.y1,k.width,
|
|
500
500
|
k.height),this._eventManager.ghostCtx.restore());c.restore();return{source:h,dest:this.plotArea.ctx,animationCallback:E.fadeInAnimation,easingFunction:E.easing.easeInQuad,animationBase:0}}};var d=function(a,h,c,b,e,k,f,d,n){if(!(0>c)){"undefined"===typeof d&&(d=1);if(!v){var m=Number((f%(2*Math.PI)).toFixed(8));Number((k%(2*Math.PI)).toFixed(8))===m&&(f-=1E-4)}a.save();a.globalAlpha=d;"pie"===e?(a.beginPath(),a.moveTo(h.x,h.y),a.arc(h.x,h.y,c,k,f,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=
|
|
501
501
|
2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(h.x,h.y,c,k,f,!1),0<=n&&a.arc(h.x,h.y,n*c,f,k,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};u.prototype.renderPie=function(a){function h(){if(m&&r){var a=0,b=0,c=0,h=0;f(m.options.indexLabelMaxWidth)&&(m.indexLabelMaxWidth=0.33*s.width);for(var e=0;e<r.length;e++){var k=r[e],d=m.dataPointIds[e];g[e].id=d;g[e].objectType="dataPoint";g[e].dataPointIndex=e;g[e].dataSeriesIndex=
|
|
502
502
|
0;var p=g[e],n={percent:null,total:null},B=null,n=l.getPercentAndTotal(m,k);if(m.indexLabelFormatter||k.indexLabelFormatter)B={chart:l.options,dataSeries:m,dataPoint:k,total:n.total,percent:n.percent};n=k.indexLabelFormatter?k.indexLabelFormatter(B):k.indexLabel?l.replaceKeywordsWithValue(k.indexLabel,k,m,e):m.indexLabelFormatter?m.indexLabelFormatter(B):m.indexLabel?l.replaceKeywordsWithValue(m.indexLabel,k,m,e):k.label?k.label:"";l._eventManager.objectMap[d]=p;p.center={x:x.x,y:x.y};p.y=k.y;p.radius=
|
|
503
|
-
|
|
503
|
+
D;p.percentInnerRadius=I;p.indexLabelText=n;p.indexLabelPlacement=m.indexLabelPlacement;p.indexLabelLineColor=k.indexLabelLineColor?k.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:k.color?k.color:m._colorSet[e%m._colorSet.length];p.indexLabelLineThickness=f(k.indexLabelLineThickness)?m.indexLabelLineThickness:k.indexLabelLineThickness;p.indexLabelLineDashType=k.indexLabelLineDashType?k.indexLabelLineDashType:m.indexLabelLineDashType;p.indexLabelFontColor=k.indexLabelFontColor?
|
|
504
504
|
k.indexLabelFontColor:m.indexLabelFontColor;p.indexLabelFontStyle=k.indexLabelFontStyle?k.indexLabelFontStyle:m.indexLabelFontStyle;p.indexLabelFontWeight=k.indexLabelFontWeight?k.indexLabelFontWeight:m.indexLabelFontWeight;p.indexLabelFontSize=f(k.indexLabelFontSize)?m.indexLabelFontSize:k.indexLabelFontSize;p.indexLabelFontFamily=k.indexLabelFontFamily?k.indexLabelFontFamily:m.indexLabelFontFamily;p.indexLabelBackgroundColor=k.indexLabelBackgroundColor?k.indexLabelBackgroundColor:m.options.indexLabelBackgroundColor?
|
|
505
505
|
m.options.indexLabelBackgroundColor:m.indexLabelBackgroundColor;p.indexLabelBorderColor=k.indexLabelBorderColor?k.indexLabelBorderColor:m.options.indexLabelBorderColor?m.options.indexLabelBorderColor:m.indexLabelBorderColor;p.indexLabelBorderThickness=k.indexLabelBorderThickness?k.indexLabelBorderThickness:m.options.indexLabelBorderThickness?m.options.indexLabelBorderThickness:m.indexLabelBorderThickness;p.indexLabelMaxWidth=k.indexLabelMaxWidth?k.indexLabelMaxWidth:m.indexLabelMaxWidth;p.indexLabelWrap=
|
|
506
506
|
"undefined"!==typeof k.indexLabelWrap?k.indexLabelWrap:m.indexLabelWrap;p.indexLabelTextAlign=k.indexLabelTextAlign?k.indexLabelTextAlign:m.indexLabelTextAlign?m.indexLabelTextAlign:"left";p.startAngle=0===e?m.startAngle?m.startAngle/180*Math.PI:0:g[e-1].endAngle;p.startAngle=(p.startAngle+2*Math.PI)%(2*Math.PI);p.endAngle=p.startAngle+2*Math.PI/y*Math.abs(k.y);k=(p.endAngle+p.startAngle)/2;k=(k+2*Math.PI)%(2*Math.PI);p.midAngle=k;if(p.midAngle>Math.PI/2-t&&p.midAngle<Math.PI/2+t){if(0===a||g[c].midAngle>
|
|
507
507
|
p.midAngle)c=e;a++}else if(p.midAngle>3*Math.PI/2-t&&p.midAngle<3*Math.PI/2+t){if(0===b||g[h].midAngle>p.midAngle)h=e;b++}p.hemisphere=k>Math.PI/2&&k<=3*Math.PI/2?"left":"right";p.indexLabelTextBlock=new la(l.plotArea.ctx,{fontSize:p.indexLabelFontSize,fontFamily:p.indexLabelFontFamily,fontColor:p.indexLabelFontColor,fontStyle:p.indexLabelFontStyle,fontWeight:p.indexLabelFontWeight,textAlign:p.indexLabelTextAlign,backgroundColor:p.indexLabelBackgroundColor,borderColor:p.indexLabelBorderColor,borderThickness:p.indexLabelBorderThickness,
|
|
508
508
|
maxWidth:p.indexLabelMaxWidth,maxHeight:p.indexLabelWrap?5*p.indexLabelFontSize:1.5*p.indexLabelFontSize,text:p.indexLabelText,padding:0,textBaseline:"middle"});p.indexLabelTextBlock.measureText()}d=k=0;n=!1;for(e=0;e<r.length;e++)p=g[(c+e)%r.length],1<a&&(p.midAngle>Math.PI/2-t&&p.midAngle<Math.PI/2+t)&&(k<=a/2&&!n?(p.hemisphere="right",k++):(p.hemisphere="left",n=!0));n=!1;for(e=0;e<r.length;e++)p=g[(h+e)%r.length],1<b&&(p.midAngle>3*Math.PI/2-t&&p.midAngle<3*Math.PI/2+t)&&(d<=b/2&&!n?(p.hemisphere=
|
|
509
|
-
"left",d++):(p.hemisphere="right",n=!0))}}function c(a,b){var c=l.plotArea.ctx;c.clearRect(s.x1,s.y1,s.width,s.height);c.fillStyle=l.backgroundColor;c.fillRect(s.x1,s.y1,s.width,s.height);for(c=0;c<r.length;c++){var h=g[c].startAngle,e=g[c].endAngle;if(e>h){var k=0.07*
|
|
509
|
+
"left",d++):(p.hemisphere="right",n=!0))}}function c(a,b){var c=l.plotArea.ctx;c.clearRect(s.x1,s.y1,s.width,s.height);c.fillStyle=l.backgroundColor;c.fillRect(s.x1,s.y1,s.width,s.height);for(c=0;c<r.length;c++){var h=g[c].startAngle,e=g[c].endAngle;if(e>h){var k=0.07*D*Math.cos(g[c].midAngle),f=0.07*D*Math.sin(g[c].midAngle),n=!1;if(r[c].exploded){if(1E-9<Math.abs(g[c].center.x-(x.x+k))||1E-9<Math.abs(g[c].center.y-(x.y+f)))g[c].center.x=x.x+k*a,g[c].center.y=x.y+f*a,n=!0}else if(0<Math.abs(g[c].center.x-
|
|
510
510
|
x.x)||0<Math.abs(g[c].center.y-x.y))g[c].center.x=x.x+k*(1-a),g[c].center.y=x.y+f*(1-a),n=!0;n&&b&&(k={},k.dataSeries=m,k.dataPoint=m.dataPoints[c],k.index=c,l.toolTip.highlightObjects([k]));d(l.plotArea.ctx,g[c].center,g[c].radius,r[c].color?r[c].color:m._colorSet[c%m._colorSet.length],m.type,h,e,m.fillOpacity,g[c].percentInnerRadius)}}c=l.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(h=h=0;h<r.length;h++)e=g[h],e.indexLabelText&&(e.indexLabelTextBlock.y-=
|
|
511
511
|
e.indexLabelTextBlock.height/2-e.indexLabelTextBlock.fontSize/2,k=0,k="left"===e.hemisphere?"inside"!==m.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==m.indexLabelPlacement?p:-e.indexLabelTextBlock.width/2,e.indexLabelTextBlock.x+=k,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=k,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock.fontSize/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(k=e.center.x+
|
|
512
|
-
|
|
512
|
+
D*Math.cos(e.midAngle),f=e.center.y+D*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(U(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(k,f),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/
|
|
513
513
|
2,h=a.indexLabelTextBlock.y+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-h:c-g}function e(a){for(var c=null,h=1;h<r.length;h++)if(c=(a+h+g.length)%g.length,g[c].hemisphere!==g[a].hemisphere){c=null;break}else if(g[c].indexLabelText&&c!==a&&(0>b(g[c],g[a])||("right"===g[a].hemisphere?g[c].indexLabelTextBlock.y>=g[a].indexLabelTextBlock.y:g[c].indexLabelTextBlock.y<=
|
|
514
514
|
g[a].indexLabelTextBlock.y)))break;else c=null;return c}function k(a,c,h){h=(h||0)+1;if(1E3<h)return 0;c=c||0;var f=0,d=x.y-1*q,m=x.y+1*q;if(0<=a&&a<r.length){var p=g[a];if(0>c&&p.indexLabelTextBlock.y<d||0<c&&p.indexLabelTextBlock.y>m)return 0;var s=0,n=0,n=s=s=0;0>c?p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2>d&&p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c<d&&(c=-(d-(p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c))):p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/
|
|
515
|
-
2<d&&p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c>m&&(c=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c-m);c=p.indexLabelTextBlock.y+c;d=0;d="right"===p.hemisphere?x.x+Math.sqrt(Math.pow(q,2)-Math.pow(c-x.y,2)):x.x-Math.sqrt(Math.pow(q,2)-Math.pow(c-x.y,2));n=x.x+
|
|
515
|
+
2<d&&p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c>m&&(c=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c-m);c=p.indexLabelTextBlock.y+c;d=0;d="right"===p.hemisphere?x.x+Math.sqrt(Math.pow(q,2)-Math.pow(c-x.y,2)):x.x-Math.sqrt(Math.pow(q,2)-Math.pow(c-x.y,2));n=x.x+D*Math.cos(p.midAngle);s=x.y+D*Math.sin(p.midAngle);s=Math.sqrt(Math.pow(d-n,2)+Math.pow(c-s,2));n=Math.acos(D/q);s=Math.acos((q*q+D*D-s*s)/(2*D*q));c=s<n?c-p.indexLabelTextBlock.y:0;d=null;for(m=1;m<r.length;m++)if(d=
|
|
516
516
|
(a-m+g.length)%g.length,g[d].hemisphere!==g[a].hemisphere){d=null;break}else if(g[d].indexLabelText&&g[d].hemisphere===g[a].hemisphere&&d!==a&&(0>b(g[d],g[a])||("right"===g[a].hemisphere?g[d].indexLabelTextBlock.y<=g[a].indexLabelTextBlock.y:g[d].indexLabelTextBlock.y>=g[a].indexLabelTextBlock.y)))break;else d=null;n=d;s=e(a);m=d=0;0>c?(m="right"===p.hemisphere?n:s,f=c,null!==m&&(n=-c,c=p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2-(g[m].indexLabelTextBlock.y+g[m].indexLabelTextBlock.height/
|
|
517
517
|
2),c-n<E&&(d=-n,m=k(m,d,h+1),+m.toFixed(v)>+d.toFixed(v)&&(f=c>E?-(c-E):-(n-(m-d)))))):0<c&&(m="right"===p.hemisphere?s:n,f=c,null!==m&&(n=c,c=g[m].indexLabelTextBlock.y-g[m].indexLabelTextBlock.height/2-(p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2),c-n<E&&(d=n,m=k(m,d,h+1),+m.toFixed(v)<+d.toFixed(v)&&(f=c>E?c-E:n-(d-m)))));f&&(h=p.indexLabelTextBlock.y+f,c=0,c="right"===p.hemisphere?x.x+Math.sqrt(Math.pow(q,2)-Math.pow(h-x.y,2)):x.x-Math.sqrt(Math.pow(q,2)-Math.pow(h-x.y,2)),p.midAngle>
|
|
518
518
|
Math.PI/2-t&&p.midAngle<Math.PI/2+t?(d=(a-1+g.length)%g.length,d=g[d],a=g[(a+1+g.length)%g.length],"left"===p.hemisphere&&"right"===d.hemisphere&&c>d.indexLabelTextBlock.x?c=d.indexLabelTextBlock.x-15:"right"===p.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x+15)):p.midAngle>3*Math.PI/2-t&&p.midAngle<3*Math.PI/2+t&&(d=(a-1+g.length)%g.length,d=g[d],a=g[(a+1+g.length)%g.length],"right"===p.hemisphere&&"left"===d.hemisphere&&c<d.indexLabelTextBlock.x?c=d.indexLabelTextBlock.x+
|
|
519
519
|
15:"left"===p.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),p.indexLabelTextBlock.y=h,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-x.y,p.indexLabelTextBlock.x-x.x))}return f}function n(){var a=l.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,h=0,f=!0,c=0;10>c&&(1>c||0<h);c++){if(m.radius||!m.radius&&"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&
|
|
520
|
-
|
|
521
|
-
y++);w=K/(w+y||1)*y;var y=-1*(K-w),F=z=0;"right"===d.hemisphere?(z=k(a,w),y=-1*(K-z),F=k(t,y),+F.toFixed(v)<+y.toFixed(v)&&+z.toFixed(v)<=+w.toFixed(v)&&k(a,-(y-F))):(z=k(t,w),y=-1*(K-z),F=k(a,y),+F.toFixed(v)<+y.toFixed(v)&&+z.toFixed(v)<=+w.toFixed(v)&&k(t,-(y-F)))}}}}else for(a=0;a<r.length;a++)d=g[a],q="pie"===m.type?0.7*
|
|
520
|
+
D-h<=C)f=!1;f&&(D-=h);h=0;if("inside"!==m.indexLabelPlacement){q=D*u;for(a=0;a<r.length;a++){var d=g[a];d.indexLabelTextBlock.x=x.x+q*Math.cos(d.midAngle);d.indexLabelTextBlock.y=x.y+q*Math.sin(d.midAngle);d.indexLabelAngle=d.midAngle;d.radius=D;d.percentInnerRadius=I}for(var B,w,a=0;a<r.length;a++){var d=g[a],t=e(a);if(null!==t){B=g[a];w=g[t];var K=0,K=b(B,w)-E;if(0>K){for(var y=w=0,z=0;z<r.length;z++)z!==a&&g[z].hemisphere===d.hemisphere&&(g[z].indexLabelTextBlock.y<d.indexLabelTextBlock.y?w++:
|
|
521
|
+
y++);w=K/(w+y||1)*y;var y=-1*(K-w),F=z=0;"right"===d.hemisphere?(z=k(a,w),y=-1*(K-z),F=k(t,y),+F.toFixed(v)<+y.toFixed(v)&&+z.toFixed(v)<=+w.toFixed(v)&&k(a,-(y-F))):(z=k(t,w),y=-1*(K-z),F=k(a,y),+F.toFixed(v)<+y.toFixed(v)&&+z.toFixed(v)<=+w.toFixed(v)&&k(t,-(y-F)))}}}}else for(a=0;a<r.length;a++)d=g[a],q="pie"===m.type?0.7*D:0.85*D,t=x.x+q*Math.cos(d.midAngle),w=x.y+q*Math.sin(d.midAngle),d.indexLabelTextBlock.x=t,d.indexLabelTextBlock.y=w;for(a=0;a<r.length;a++)if(d=g[a],t=d.indexLabelTextBlock.measureText(),
|
|
522
522
|
0!==t.height&&0!==t.width)t=t=0,"right"===d.hemisphere?(t=s.x2-(d.indexLabelTextBlock.x+d.indexLabelTextBlock.width+p),t*=-1):t=s.x1-(d.indexLabelTextBlock.x-d.indexLabelTextBlock.width-p),0<t&&(!f&&d.indexLabelText&&(w="right"===d.hemisphere?s.x2-d.indexLabelTextBlock.x:d.indexLabelTextBlock.x-s.x1,0.3*d.indexLabelTextBlock.maxWidth>w?d.indexLabelText="":d.indexLabelTextBlock.maxWidth=0.85*w,0.3*d.indexLabelTextBlock.maxWidth<w&&(d.indexLabelTextBlock.x-="right"===d.hemisphere?2:-2)),Math.abs(d.indexLabelTextBlock.y-
|
|
523
|
-
d.indexLabelTextBlock.height/2-x.y)<
|
|
524
|
-
x.x)<
|
|
523
|
+
d.indexLabelTextBlock.height/2-x.y)<D||Math.abs(d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2-x.y)<D)&&(t/=Math.abs(Math.cos(d.indexLabelAngle)),9<t&&(t*=0.3),t>h&&(h=t)),t=t=0,0<d.indexLabelAngle&&d.indexLabelAngle<Math.PI?(t=s.y2-(d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2+5),t*=-1):t=s.y1-(d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2-5),0<t&&(!f&&d.indexLabelText&&(w=0<d.indexLabelAngle&&d.indexLabelAngle<Math.PI?-1:1,0===k(a,t*w)&&k(a,2*w)),Math.abs(d.indexLabelTextBlock.x-
|
|
524
|
+
x.x)<D&&(t/=Math.abs(Math.sin(d.indexLabelAngle)),9<t&&(t*=0.3),t>h&&(h=t)));var L=function(a,b,c){for(var h=[],e=0;h.push(g[b]),b!==c;b=(b+1+r.length)%r.length);h.sort(function(a,b){return a.y-b.y});for(b=0;b<h.length;b++)if(c=h[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,h=0,k=!1,d=0;d<r.length;d++)if(k=!1,B=g[d],B.indexLabelText){var f=e(d);if(null!==f){var m=g[f];K=0;
|
|
525
525
|
K=b(B,m);var s;if(s=0>K){s=B.indexLabelTextBlock.x;var n=B.indexLabelTextBlock.y-B.indexLabelTextBlock.height/2,w=B.indexLabelTextBlock.y+B.indexLabelTextBlock.height/2,l=m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2,t=m.indexLabelTextBlock.x+m.indexLabelTextBlock.width,E=m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2;s=B.indexLabelTextBlock.x+B.indexLabelTextBlock.width<m.indexLabelTextBlock.x-p||s>t+p||n>E+p||w<l-p?!1:!0}s?(0>a&&(a=d),f!==a&&(c=f,h+=-K),0===d%Math.max(r.length/
|
|
526
526
|
10,3)&&(k=!0)):k=!0;k&&(0<h&&0<=a&&0<=c)&&(L(h,a,c),c=a=-1,h=0)}}0<h&&L(h,a,c)})()}}function w(){l.plotArea.layoutManager.reset();l.title&&(l.title.dockInsidePlotArea||"center"===l.title.horizontalAlign&&"center"===l.title.verticalAlign)&&l.title.render();if(l.subtitles)for(var a=0;a<l.subtitles.length;a++){var b=l.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}l.legend&&(l.legend.dockInsidePlotArea||"center"===l.legend.horizontalAlign&&"center"===
|
|
527
527
|
l.legend.verticalAlign)&&(l.legend.setLayout(),l.legend.render())}var l=this;if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],r=m.dataPoints,p=10,s=this.plotArea,g=m.dataPointEOs,E=2,q,u=1.3,t=20/180*Math.PI,v=6,x={x:(s.x2+s.x1)/2,y:(s.y2+s.y1)/2},y=0;a=!1;for(var z=0;z<r.length;z++)y+=Math.abs(r[z].y),!a&&("undefined"!==typeof r[z].indexLabel&&null!==r[z].indexLabel&&0<r[z].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof r[z].label&&null!==r[z].label&&
|
|
528
|
-
0<r[z].label.toString().length)&&(a=!0);if(0!==y){a=a||"undefined"!==typeof m.indexLabel&&null!==m.indexLabel&&0<m.indexLabel.toString().length;var
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
l.
|
|
532
|
-
a.lineTo(Math.round(h.x6),Math.round(h.y6))),a.closePath(),a.fillStyle=b?b:h.color,a.fill(),a.globalAplha=1,a.restore())};u.prototype.renderFunnel=function(a){function h(){for(var a=0,b=[],c=0;c<G.length;c++){if("undefined"===typeof G[c].y)return-1;G[c].y="number"===typeof G[c].y?G[c].y:0;a+=Math.abs(G[c].y)}if(0===a)return-1;for(c=b[0]=0;c<G.length;c++)b.push(Math.abs(G[c].y)*
|
|
533
|
-
g=h+g;for(var h=[],k=0,d=0;d<G.length;d++){if("undefined"===typeof G[d].y)return-1;G[d].y="number"===typeof G[d].y?G[d].y:0;k+=Math.abs(G[d].y)}if(0===k)return-1;for(var f=h[0]=0,m=0,p,r,b=b-a,f=!1,d=0;d<G.length;d++)a=Math.abs(G[d].y)*g/k,f?p=0==Number(c.toFixed(3))?0:a/c:(r=fa*fa*b*b-4*Math.abs(fa)*a,0>r?(r=c,f=(b+r)*(e-m)/2,a-=f,p=e-m,m+=e-m,p+=0==r?0:a/r,m+=a/r,f=!0):(p=(Math.abs(fa)*b-Math.sqrt(r))/2,r=b-2*p/Math.abs(fa),m+=p,m>e&&(m-=p,r=c,f=(b+r)*(e-m)/2,a-=f,p=e-
|
|
534
|
-
b=r)),h.push(p);return h}function b(){if(t&&G){for(var a,b,c,h,e,k,d,m,p,r,s,n,B,l,w,E,q,u=[],x=[],A={percent:null,total:null},aa=null,K=0;K<G.length;K++)q=T[K],q="undefined"!==typeof q.x5?(q.y2+q.y4)/2:(q.y2+q.y3)/2,q=g(q).x2+1,u[K]=L-q-Z;q=0.5*Z;for(var K=0,z=G.length-1;K<G.length||0<=z;K++,z--){b=t.reversed?G[z]:G[K];a=b.color?b.color:t.reversed?t._colorSet[(G.length-1-K)%t._colorSet.length]:t._colorSet[K%t._colorSet.length];c=b.indexLabelPlacement||t.indexLabelPlacement||
|
|
535
|
-
t.indexLabelTextAlign||"left";h=b.indexLabelBackgroundColor||t.indexLabelBackgroundColor||(v?"transparent":null);e=b.indexLabelBorderColor||t.indexLabelBorderColor||(v?"transparent":null);k=f(b.indexLabelBorderThickness)?t.indexLabelBorderThickness:b.indexLabelBorderThickness;d=b.indexLabelFontColor||t.indexLabelFontColor||"#979797";m=f(b.indexLabelFontSize)?t.indexLabelFontSize:b.indexLabelFontSize;p=b.indexLabelFontStyle||t.indexLabelFontStyle||"normal";r=b.indexLabelFontFamily||
|
|
536
|
-
"arial";s=b.indexLabelFontWeight||t.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||t.options.indexLabelLineColor||a;n="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof t.indexLabelLineThickness?t.indexLabelLineThickness:2;B=b.indexLabelLineDashType||t.indexLabelLineDashType||"solid";l="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof t.indexLabelWrap?t.indexLabelWrap:!0;w=t.dataPointIds[K];y._eventManager.objectMap[w]=
|
|
537
|
-
objectType:"dataPoint",dataPointIndex:K,dataSeriesIndex:0,funnelSection:T[t.reversed?G.length-1-K:K]};"inside"===t.indexLabelPlacement&&(u[K]=K!==ea?t.reversed?T[K].x2-T[K].x1:T[K].x3-T[K].x4:T[K].x3-T[K].x6,20>u[K]&&(u[K]=K!==ea?t.reversed?T[K].x3-T[K].x4:T[K].x2-T[K].x1:T[K].x2-T[K].x1,u[K]/=2));w=b.indexLabelMaxWidth?b.indexLabelMaxWidth:t.options.indexLabelMaxWidth?t.indexLabelMaxWidth:u[K];if(w>u[K]||0>w)w=u[K];x[K]="inside"===t.indexLabelPlacement?l?Math.max(T[K].height,m):1.5*m:!1;A=
|
|
538
|
-
b);if(t.indexLabelFormatter||b.indexLabelFormatter)aa={chart:y.options,dataSeries:t,dataPoint:b,total:A.total,percent:A.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(aa):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,t,K):t.indexLabelFormatter?t.indexLabelFormatter(aa):t.indexLabel?y.replaceKeywordsWithValue(t.indexLabel,b,t,K):b.label?b.label:"";0>=n&&(n=0);1E3>w&&1E3-w<q&&(w+=1E3-w);f(t.options.indexLabelMaxWidth)&&(t.indexLabelMaxWidth=f(t.indexLabelMaxWidth)?
|
|
539
|
-
N.roundRect||Ea(N);c=new la(N,{fontSize:m,fontFamily:r,fontColor:d,fontStyle:p,fontWeight:s,horizontalAlign:c,textAlign:E,backgroundColor:h,borderColor:e,borderThickness:k,maxWidth:w,maxHeight:!1===x[K]?l?4.28571429*m:1.5*m:x[K],text:b,padding:ga,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;J.push({textBlock:c,id:t.reversed?z:K,isDirty:!1,lineColor:a,lineThickness:n,lineDashType:B,height:c.height<
|
|
540
|
-
width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,h,e,g=[];e=!1;c=0;for(var k,d=L-Y-Z/2,d=t.options.indexLabelMaxWidth?t.indexLabelMaxWidth>d?d:t.indexLabelMaxWidth:d,f=J.length-1;0<=f;f--){k=G[J[f].id];c=J[f];h=c.textBlock;b=(a=s(f)<T.length?J[s(f)]:null)?a.textBlock:null;c=c.height;a&&h.y+c+ga>b.y&&(e=!0);c=k.indexLabelMaxWidth||d;if(c>d||0>c)c=d;g.push(c)}if(e)for(f=J.length-1;0<=f;f--)a=T[f],J[f].textBlock.maxWidth=g[g.length-(f+1)],J[f].textBlock.measureText(),
|
|
541
|
-
J[f].textBlock.height===2*J[f].textBlock.padding?0:J[f].textBlock.height,J[f].textBlock.width=J[f].textBlock.width===2*J[f].textBlock.padding?0:J[f].textBlock.width,J[f].textBlock.x=L-d,c=J[f].textBlock.height<J[f].textBlock.maxHeight?J[f].textBlock.height:J[f].textBlock.maxHeight,e=J[f].textBlock.width<J[f].textBlock.maxWidth?J[f].textBlock.width:J[f].textBlock.maxWidth,J[f].height=c,J[f].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,J[f].textBlock.y=c-J[f].height/
|
|
542
|
-
(J[f].textBlock.y+J[f].height>W+z&&(J[f].textBlock.y=W+z-J[f].height),J[f].textBlock.y<wa-z&&(J[f].textBlock.y=wa-z)):(J[f].textBlock.y<W-z&&(J[f].textBlock.y=W-z),J[f].textBlock.y+J[f].height>wa+z&&(J[f].textBlock.y=wa+z-J[f].height))}function k(){var a,b,c,h;if("inside"!==t.indexLabelPlacement)for(var e=0;e<T.length;e++)0==J[e].textBlock.text.length?J[e].isDirty=!0:(a=T[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=t.reversed?"undefined"!==typeof a.x5?c>ba?g(c).x2+1:
|
|
543
|
-
1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<ba?g(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,J[e].textBlock.x=b+Z,J[e].textBlock.y=c-J[e].height/2,t.reversed?(J[e].textBlock.y+J[e].height>W+z&&(J[e].textBlock.y=W+z-J[e].height),J[e].textBlock.y<wa-z&&(J[e].textBlock.y=wa-z)):(J[e].textBlock.y<W-z&&(J[e].textBlock.y=W-z),J[e].textBlock.y+J[e].height>wa+z&&(J[e].textBlock.y=wa+z-J[e].height)));else for(e=0;e<T.length;e++)0==J[e].textBlock.text.length?J[e].isDirty=!0:(a=T[e],b=a.height,c=
|
|
544
|
-
J[e].width,b>=c?(b=e!=ea?(a.x4+a.x3)/2-h/2:(a.x5+a.x4)/2-h/2,c=e!=ea?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,J[e].textBlock.x=b,J[e].textBlock.y=c):J[e].isDirty=!0)}function d(){function a(b,c){var h;if(0>b||b>=J.length)return 0;var e,g=J[b].textBlock;if(0>c){c*=-1;e=p(b);h=n(e,b);if(h>=c)return g.y-=c,c;if(0==b)return 0<h&&(g.y-=h),h;h+=a(e,-(c-h));0<h&&(g.y-=h);return h}e=s(b);h=n(b,e);if(h>=c)return g.y+=c,c;if(b==T.length-1)return 0<h&&(g.y+=h),h;h+=a(e,c-h);0<h&&(g.y+=h);return h}function b(){var a,
|
|
528
|
+
0<r[z].label.toString().length)&&(a=!0);if(0!==y){a=a||"undefined"!==typeof m.indexLabel&&null!==m.indexLabel&&0<m.indexLabel.toString().length;var D="inside"!==m.indexLabelPlacement&&a?0.75*Math.min(s.width,s.height)/2:0.92*Math.min(s.width,s.height)/2;m.radius&&(D=Wa(m.radius,D));var C="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Wa(m.innerRadius,D):0.7*D,I=Math.min(C/D,(D-1)/D);this.pieDoughnutClickHandler=function(a){l.isAnimating||!f(this.explodeOnClick)&&!this.explodeOnClick||(a=
|
|
529
|
+
a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&l._animator.animate(0,500,function(a){c(a,!0);w();l.dispatchEvent("dataAnimationIterationEnd",{chart:l});l.dispatchEvent("dataAnimationEnd",{chart:l})}))};h();n();n();n();n();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=l.plotArea.ctx;b.clearRect(s.x1,s.y1,s.width,s.height);b.fillStyle=l.backgroundColor;b.fillRect(s.x1,s.y1,s.width,s.height);for(var b=g[0].startAngle+
|
|
530
|
+
2*Math.PI*a,c=0;c<r.length;c++){var h=0===c?g[c].startAngle:e,e=h+(g[c].endAngle-g[c].startAngle),k=!1;e>b&&(e=b,k=!0);var f=r[c].color?r[c].color:m._colorSet[c%m._colorSet.length];e>h&&d(l.plotArea.ctx,g[c].center,g[c].radius,f,m.type,h,e,m.fillOpacity,g[c].percentInnerRadius);if(k)break}w();l.dispatchEvent("dataAnimationIterationEnd",{chart:l});1<=a&&l.dispatchEvent("dataAnimationEnd",{chart:l})},function(){l.disableToolTip=!1;l._animator.animate(0,l.animatedRender?500:0,function(a){c(a,!1);w();
|
|
531
|
+
l.dispatchEvent("dataAnimationIterationEnd",{chart:l})});l.dispatchEvent("dataAnimationEnd",{chart:l})});m.radius=D;"doughnut"===m.type&&(m.innerRadius=C)}}};var w=function(a,h,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(h.y4-h.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(h.x1),Math.round(h.y1)),a.lineTo(Math.round(h.x2),Math.round(h.y2)),a.lineTo(Math.round(h.x3),Math.round(h.y3)),a.lineTo(Math.round(h.x4),Math.round(h.y4)),"undefined"!==h.x5&&(a.lineTo(Math.round(h.x5),
|
|
532
|
+
Math.round(h.y5)),a.lineTo(Math.round(h.x6),Math.round(h.y6))),a.closePath(),a.fillStyle=b?b:h.color,a.fill(),a.globalAplha=1,a.restore())};u.prototype.renderFunnel=function(a){function h(){for(var a=0,b=[],c=0;c<G.length;c++){if("undefined"===typeof G[c].y)return-1;G[c].y="number"===typeof G[c].y?G[c].y:0;a+=Math.abs(G[c].y)}if(0===a)return-1;for(c=b[0]=0;c<G.length;c++)b.push(Math.abs(G[c].y)*C/a);return b}function c(){var a=V,b=Y,c=S,h=X,e,g;e=O;g=P-Q;h=Math.abs((g-e)*(b-a+(h-c))/2);c=X-S;e=g-
|
|
533
|
+
e;g=c*(g-P);g=Math.abs(g);g=h+g;for(var h=[],k=0,d=0;d<G.length;d++){if("undefined"===typeof G[d].y)return-1;G[d].y="number"===typeof G[d].y?G[d].y:0;k+=Math.abs(G[d].y)}if(0===k)return-1;for(var f=h[0]=0,m=0,p,r,b=b-a,f=!1,d=0;d<G.length;d++)a=Math.abs(G[d].y)*g/k,f?p=0==Number(c.toFixed(3))?0:a/c:(r=fa*fa*b*b-4*Math.abs(fa)*a,0>r?(r=c,f=(b+r)*(e-m)/2,a-=f,p=e-m,m+=e-m,p+=0==r?0:a/r,m+=a/r,f=!0):(p=(Math.abs(fa)*b-Math.sqrt(r))/2,r=b-2*p/Math.abs(fa),m+=p,m>e&&(m-=p,r=c,f=(b+r)*(e-m)/2,a-=f,p=e-
|
|
534
|
+
m,m+=e-m,p+=a/r,m+=a/r,f=!0),b=r)),h.push(p);return h}function b(){if(t&&G){for(var a,b,c,h,e,k,d,m,p,r,s,n,B,l,w,E,q,u=[],x=[],A={percent:null,total:null},aa=null,K=0;K<G.length;K++)q=T[K],q="undefined"!==typeof q.x5?(q.y2+q.y4)/2:(q.y2+q.y3)/2,q=g(q).x2+1,u[K]=L-q-Z;q=0.5*Z;for(var K=0,z=G.length-1;K<G.length||0<=z;K++,z--){b=t.reversed?G[z]:G[K];a=b.color?b.color:t.reversed?t._colorSet[(G.length-1-K)%t._colorSet.length]:t._colorSet[K%t._colorSet.length];c=b.indexLabelPlacement||t.indexLabelPlacement||
|
|
535
|
+
"outside";E=b.indexLabelTextAlign||t.indexLabelTextAlign||"left";h=b.indexLabelBackgroundColor||t.indexLabelBackgroundColor||(v?"transparent":null);e=b.indexLabelBorderColor||t.indexLabelBorderColor||(v?"transparent":null);k=f(b.indexLabelBorderThickness)?t.indexLabelBorderThickness:b.indexLabelBorderThickness;d=b.indexLabelFontColor||t.indexLabelFontColor||"#979797";m=f(b.indexLabelFontSize)?t.indexLabelFontSize:b.indexLabelFontSize;p=b.indexLabelFontStyle||t.indexLabelFontStyle||"normal";r=b.indexLabelFontFamily||
|
|
536
|
+
t.indexLabelFontFamily||"arial";s=b.indexLabelFontWeight||t.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||t.options.indexLabelLineColor||a;n="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof t.indexLabelLineThickness?t.indexLabelLineThickness:2;B=b.indexLabelLineDashType||t.indexLabelLineDashType||"solid";l="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof t.indexLabelWrap?t.indexLabelWrap:!0;w=t.dataPointIds[K];y._eventManager.objectMap[w]=
|
|
537
|
+
{id:w,objectType:"dataPoint",dataPointIndex:K,dataSeriesIndex:0,funnelSection:T[t.reversed?G.length-1-K:K]};"inside"===t.indexLabelPlacement&&(u[K]=K!==ea?t.reversed?T[K].x2-T[K].x1:T[K].x3-T[K].x4:T[K].x3-T[K].x6,20>u[K]&&(u[K]=K!==ea?t.reversed?T[K].x3-T[K].x4:T[K].x2-T[K].x1:T[K].x2-T[K].x1,u[K]/=2));w=b.indexLabelMaxWidth?b.indexLabelMaxWidth:t.options.indexLabelMaxWidth?t.indexLabelMaxWidth:u[K];if(w>u[K]||0>w)w=u[K];x[K]="inside"===t.indexLabelPlacement?l?Math.max(T[K].height,m):1.5*m:!1;A=
|
|
538
|
+
y.getPercentAndTotal(t,b);if(t.indexLabelFormatter||b.indexLabelFormatter)aa={chart:y.options,dataSeries:t,dataPoint:b,total:A.total,percent:A.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(aa):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,t,K):t.indexLabelFormatter?t.indexLabelFormatter(aa):t.indexLabel?y.replaceKeywordsWithValue(t.indexLabel,b,t,K):b.label?b.label:"";0>=n&&(n=0);1E3>w&&1E3-w<q&&(w+=1E3-w);f(t.options.indexLabelMaxWidth)&&(t.indexLabelMaxWidth=f(t.indexLabelMaxWidth)?
|
|
539
|
+
w:Math.max(w,t.indexLabelMaxWidth));N.roundRect||Ea(N);c=new la(N,{fontSize:m,fontFamily:r,fontColor:d,fontStyle:p,fontWeight:s,horizontalAlign:c,textAlign:E,backgroundColor:h,borderColor:e,borderThickness:k,maxWidth:w,maxHeight:!1===x[K]?l?4.28571429*m:1.5*m:x[K],text:b,padding:ga,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;J.push({textBlock:c,id:t.reversed?z:K,isDirty:!1,lineColor:a,lineThickness:n,lineDashType:B,height:c.height<
|
|
540
|
+
c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,h,e,g=[];e=!1;c=0;for(var k,d=L-Y-Z/2,d=t.options.indexLabelMaxWidth?t.indexLabelMaxWidth>d?d:t.indexLabelMaxWidth:d,f=J.length-1;0<=f;f--){k=G[J[f].id];c=J[f];h=c.textBlock;b=(a=s(f)<T.length?J[s(f)]:null)?a.textBlock:null;c=c.height;a&&h.y+c+ga>b.y&&(e=!0);c=k.indexLabelMaxWidth||d;if(c>d||0>c)c=d;g.push(c)}if(e)for(f=J.length-1;0<=f;f--)a=T[f],J[f].textBlock.maxWidth=g[g.length-(f+1)],J[f].textBlock.measureText(),
|
|
541
|
+
J[f].textBlock.height=J[f].textBlock.height===2*J[f].textBlock.padding?0:J[f].textBlock.height,J[f].textBlock.width=J[f].textBlock.width===2*J[f].textBlock.padding?0:J[f].textBlock.width,J[f].textBlock.x=L-d,c=J[f].textBlock.height<J[f].textBlock.maxHeight?J[f].textBlock.height:J[f].textBlock.maxHeight,e=J[f].textBlock.width<J[f].textBlock.maxWidth?J[f].textBlock.width:J[f].textBlock.maxWidth,J[f].height=c,J[f].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,J[f].textBlock.y=c-J[f].height/
|
|
542
|
+
2,t.reversed?(J[f].textBlock.y+J[f].height>W+z&&(J[f].textBlock.y=W+z-J[f].height),J[f].textBlock.y<wa-z&&(J[f].textBlock.y=wa-z)):(J[f].textBlock.y<W-z&&(J[f].textBlock.y=W-z),J[f].textBlock.y+J[f].height>wa+z&&(J[f].textBlock.y=wa+z-J[f].height))}function k(){var a,b,c,h;if("inside"!==t.indexLabelPlacement)for(var e=0;e<T.length;e++)0==J[e].textBlock.text.length?J[e].isDirty=!0:(a=T[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=t.reversed?"undefined"!==typeof a.x5?c>ba?g(c).x2+1:
|
|
543
|
+
(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<ba?g(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,J[e].textBlock.x=b+Z,J[e].textBlock.y=c-J[e].height/2,t.reversed?(J[e].textBlock.y+J[e].height>W+z&&(J[e].textBlock.y=W+z-J[e].height),J[e].textBlock.y<wa-z&&(J[e].textBlock.y=wa-z)):(J[e].textBlock.y<W-z&&(J[e].textBlock.y=W-z),J[e].textBlock.y+J[e].height>wa+z&&(J[e].textBlock.y=wa+z-J[e].height)));else for(e=0;e<T.length;e++)0==J[e].textBlock.text.length?J[e].isDirty=!0:(a=T[e],b=a.height,c=
|
|
544
|
+
J[e].height,h=J[e].width,b>=c?(b=e!=ea?(a.x4+a.x3)/2-h/2:(a.x5+a.x4)/2-h/2,c=e!=ea?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,J[e].textBlock.x=b,J[e].textBlock.y=c):J[e].isDirty=!0)}function d(){function a(b,c){var h;if(0>b||b>=J.length)return 0;var e,g=J[b].textBlock;if(0>c){c*=-1;e=p(b);h=n(e,b);if(h>=c)return g.y-=c,c;if(0==b)return 0<h&&(g.y-=h),h;h+=a(e,-(c-h));0<h&&(g.y-=h);return h}e=s(b);h=n(b,e);if(h>=c)return g.y+=c,c;if(b==T.length-1)return 0<h&&(g.y+=h),h;h+=a(e,c-h);0<h&&(g.y+=h);return h}function b(){var a,
|
|
545
545
|
h,e,g,k=0,f;g=(P-O+2*z)/r;f=r;for(var d,m=1;m<f;m++){e=m*g;for(var n=J.length-1;0<=n;n--)!J[n].isDirty&&(J[n].textBlock.y<e&&J[n].textBlock.y+J[n].height>e)&&(d=s(n),!(d>=J.length-1)&&J[n].textBlock.y+J[n].height+ga>J[d].textBlock.y&&(J[n].textBlock.y=J[n].textBlock.y+J[n].height-e>e-J[n].textBlock.y?e+1:e-J[n].height-1))}for(d=T.length-1;0<d;d--)if(!J[d].isDirty){e=p(d);if(0>e&&(e=0,J[e].isDirty))break;if(J[d].textBlock.y<J[e].textBlock.y+J[e].height){h=h||d;g=d;for(f=0;J[g].textBlock.y<J[e].textBlock.y+
|
|
546
546
|
J[e].height+ga;){a=a||J[g].textBlock.y+J[g].height;f+=J[g].height;f+=ga;g=e;if(0>=g){g=0;f+=J[g].height;break}e=p(g);if(0>e){g=0;f+=J[g].height;break}}if(g!=d){k=J[g].textBlock.y;a-=k;a=f-a;k=c(a,h,g);break}}}return k}function c(a,b,h){var e=[],g=0,k=0;for(a=Math.abs(a);h<=b;h++)e.push(T[h]);e.sort(function(a,b){return a.height-b.height});for(h=0;h<e.length;h++)if(b=e[h],g<a)k++,g+=J[b.id].height+ga,J[b.id].textBlock.text="",J[b.id].indexLabelText="",J[b.id].isDirty=!0,J[b.id].textBlock.measureText();
|
|
547
547
|
else break;return k}for(var h,e,g,k,f,m,r=1,B=0;B<2*r;B++){for(var w=J.length-1;0<=w&&!(0<=p(w)&&p(w),g=J[w],k=g.textBlock,m=(f=s(w)<T.length?J[s(w)]:null)?f.textBlock:null,h=+g.height.toFixed(6),e=+k.y.toFixed(6),!g.isDirty&&(f&&e+h+ga>+m.y.toFixed(6))&&(h=k.y+h+ga-m.y,e=a(w,-h),e<h&&(0<e&&(h-=e),e=a(s(w),h),e!=h)));w--);b()}}function n(a,b){return(b<T.length?J[b].textBlock.y:t.reversed?W+z:wa+z)-(0>a?t.reversed?wa-z:W-z:J[a].textBlock.y+J[a].height+ga)}function l(a,b,c){var h,e,g,f=[],d=z,p=[];
|
|
@@ -551,13 +551,13 @@ else break;return k}for(var h,e,g,k,f,m,r=1,B=0;B<2*r;B++){for(var w=J.length-1;
|
|
|
551
551
|
0)+e,b=g(c).x2-1,h=J[k].textBlock.x,e=(J[k].textBlock.y+J[k].height/2<<0)+e,J[k].isDirty||0==J[k].lineThickness||(a.strokeStyle=J[k].lineColor,a.lineWidth=J[k].lineThickness,a.setLineDash&&a.setLineDash(U(J[k].lineDashType,J[k].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(h,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&J[a].isDirty;a--);return a}function s(a){for(a+=1;a<=T.length&&a!=T.length&&J[a].isDirty;a++);return a}function g(a){for(var b,c=0;c<G.length;c++)if(T[c].y1<a&&T[c].y4>
|
|
552
552
|
a){b=T[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 q(a){for(var b=0;b<T.length;b++)J[b].isDirty||(a&&(J[b].textBlock.ctx=a),J[b].textBlock.y+=J[b].textBlock._lineHeight/2,J[b].textBlock.render(!0),J[b].textBlock.y-=J[b].textBlock._lineHeight/2)}function u(a){y.plotArea.layoutManager.reset();a.roundRect||Ea(a);y.title&&(y.title.dockInsidePlotArea||"center"===y.title.horizontalAlign&&
|
|
553
553
|
"center"===y.title.verticalAlign)&&(y.title.ctx=a,y.title.render());if(y.subtitles)for(var b=0;b<y.subtitles.length;b++){var c=y.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)y.subtitles.ctx=a,c.render()}y.legend&&(y.legend.dockInsidePlotArea||"center"===y.legend.horizontalAlign&&"center"===y.legend.verticalAlign)&&(y.legend.ctx=a,y.legend.setLayout(),y.legend.render());Ca.fNg&&Ca.fNg(y)}var y=this;if(!(0>=a.dataSeriesIndexes.length)){for(var t=this.data[a.dataSeriesIndexes[0]],
|
|
554
|
-
G=t.dataPoints,x=this.plotArea,z=0.025*x.width,F=0.01*x.width,
|
|
555
|
-
0<t.indexLabel.toString().length;"inside"!==t.indexLabelPlacement&&M||(F=(x.width-0.75*I)/2);var R=x.x1+F,L=x.x2-F,O=x.y1+z,P=x.y2-z,N=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=t.length&&(t.dataPoints&&t.visible)&&0!==G.length){var Q,H;a=75*I/100;var Z=30*(L-a)/100;"funnel"===t.type?(Q=f(t.options.neckHeight)?0.35*
|
|
556
|
-
H=H*a/100):H=parseInt(H),Q>
|
|
554
|
+
G=t.dataPoints,x=this.plotArea,z=0.025*x.width,F=0.01*x.width,D=0,C=x.height-2*z,I=Math.min(x.width-2*F,2.8*x.height),M=!1,R=0;R<G.length;R++)if(!M&&("undefined"!==typeof G[R].indexLabel&&null!==G[R].indexLabel&&0<G[R].indexLabel.toString().length)&&(M=!0),!M&&("undefined"!==typeof G[R].label&&null!==G[R].label&&0<G[R].label.toString().length)&&(M=!0),!M&&"function"===typeof t.indexLabelFormatter||"function"===typeof G[R].indexLabelFormatter)M=!0;M=M||"undefined"!==typeof t.indexLabel&&null!==t.indexLabel&&
|
|
555
|
+
0<t.indexLabel.toString().length;"inside"!==t.indexLabelPlacement&&M||(F=(x.width-0.75*I)/2);var R=x.x1+F,L=x.x2-F,O=x.y1+z,P=x.y2-z,N=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=t.length&&(t.dataPoints&&t.visible)&&0!==G.length){var Q,H;a=75*I/100;var Z=30*(L-a)/100;"funnel"===t.type?(Q=f(t.options.neckHeight)?0.35*C:t.neckHeight,H=f(t.options.neckWidth)?0.25*a:t.neckWidth,"string"===typeof Q&&Q.match(/%$/)?(Q=parseInt(Q),Q=Q*C/100):Q=parseInt(Q),"string"===typeof H&&H.match(/%$/)?(H=parseInt(H),
|
|
556
|
+
H=H*a/100):H=parseInt(H),Q>C?Q=C:0>=Q&&(Q=0),H>a?H=a-0.5:0>=H&&(H=0)):"pyramid"===t.type&&(H=Q=0,t.reversed=t.reversed?!1:!0);var F=R+a/2,V=R,Y=R+a,W=t.reversed?P:O,S=F-H/2,X=F+H/2,ba=t.reversed?O+Q:P-Q,wa=t.reversed?O:P;H=t.valueRepresents=t.valueRepresents?t.valueRepresents:"height";R=[];a=[];var T=[],F=[],$=O,ea,fa=(ba-W)/(S-V),ia=-fa,I="area"===H?c():h();if(-1!==I){if(t.reversed)for(F.push($),H=I.length-1;0<H;H--)$+=I[H],F.push($);else for(H=0;H<I.length;H++)$+=I[H],F.push($);if(t.reversed)for(H=
|
|
557
557
|
0;H<I.length;H++)F[H]<ba?(R.push(S),a.push(X),ea=H):(R.push((F[H]-W+fa*V)/fa),a.push((F[H]-W+ia*Y)/ia));else for(H=0;H<I.length;H++)F[H]<ba?(R.push((F[H]-W+fa*V)/fa),a.push((F[H]-W+ia*Y)/ia),ea=H):(R.push(S),a.push(X));for(H=0;H<I.length-1;H++)$=t.reversed?G[G.length-1-H].color?G[G.length-1-H].color:t._colorSet[(G.length-1-H)%t._colorSet.length]:G[H].color?G[H].color:t._colorSet[H%t._colorSet.length],H===ea?T.push({x1:R[H],y1:F[H],x2:a[H],y2:F[H],x3:X,y3:ba,x4:a[H+1],y4:F[H+1],x5:R[H+1],y5:F[H+1],
|
|
558
558
|
x6:S,y6:ba,id:H,height:F[H+1]-F[H],color:$}):T.push({x1:R[H],y1:F[H],x2:a[H],y2:F[H],x3:a[H+1],y3:F[H+1],x4:R[H+1],y4:F[H+1],id:H,height:F[H+1]-F[H],color:$}),t.dataPointEOs[H]&&T[H]&&(t.dataPointEOs[H].sectionsofFunnel=T[H]);var ga=2,J=[],ma=!1,ca=[],ka=[],R=!1;a=a=0;xa(ca);for(H=0;H<G.length;H++)G[H].exploded&&(R=!0,t.reversed?ca.push(G.length-1-H):ca.push(H));N.clearRect(x.x1,x.y1,x.width,x.height);N.fillStyle=y.backgroundColor;N.fillRect(x.x1,x.y1,x.width,x.height);if(M&&t.visible&&(b(),k(),"inside"!==
|
|
559
|
-
t.indexLabelPlacement)){e();d();for(H=0;H<G.length;H++)J[H].isDirty||(a=J[H].textBlock.x+J[H].width,a=(L-a)/2,0==H&&(
|
|
560
|
-
dataPointIndex:H,dataSeriesIndex:0,funnelSection:T[t.reversed?G.length-1-H:H]},y._eventManager.objectMap[
|
|
559
|
+
t.indexLabelPlacement)){e();d();for(H=0;H<G.length;H++)J[H].isDirty||(a=J[H].textBlock.x+J[H].width,a=(L-a)/2,0==H&&(D=a),D>a&&(D=a));for(H=0;H<T.length;H++)T[H].x1+=D,T[H].x2+=D,T[H].x3+=D,T[H].x4+=D,T[H].x5&&(T[H].x5+=D,T[H].x6+=D),J[H].textBlock.x+=D}for(H=0;H<T.length;H++)D=T[H],w(N,D,t.fillOpacity),ka.push(D.y1);u(N);M&&t.visible&&("inside"===t.indexLabelPlacement||y.animationEnabled||r(N),y.animationEnabled||q());if(!M)for(H=0;H<G.length;H++)D=t.dataPointIds[H],a={id:D,objectType:"dataPoint",
|
|
560
|
+
dataPointIndex:H,dataSeriesIndex:0,funnelSection:T[t.reversed?G.length-1-H:H]},y._eventManager.objectMap[D]=a;!y.animationEnabled&&R?l(y,-1,0):y.animationEnabled&&!y.animatedRender&&l(y,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ma&&!y.isAnimating&&(f(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=t.reversed?G.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===t.type||"pyramid"===t.type)t.reversed?G[G.length-1-a].exploded=G[G.length-1-a].exploded?
|
|
561
561
|
!1:!0:G[a].exploded=G[a].exploded?!1:!0;l(y,b,500)}};return{source:N,dest:this.plotArea.ctx,animationCallback:function(a,b){E.fadeInAnimation(a,b);1<=a&&(l(y,-1,500),u(y.plotArea.ctx||y.ctx))},easingFunction:E.easing.easeInQuad,animationBase:0}}}}};u.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();
|
|
562
562
|
u.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;u.prototype.set=function(a,h,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=h,c&&this.render()):u.base.set.call(this,a,h,c)};u.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var h=a.format?a.format:"png",c=a.fileName?a.fileName:this.exportFileName;
|
|
563
563
|
if(a.toDataURL)return this.canvas.toDataURL("image/"+h);cb(this.canvas,h,c)};u.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),h=document.createElement("iframe");h.setAttribute("class","canvasjs-chart-print-frame");Q(h,{position:"absolute",width:"100%",border:"0px",margin:"0px 0px 0px 0px",padding:"0px 0px 0px 0px"});h.style.height=this.height+"px";this._canvasJSContainer.appendChild(h);var c=this,b=h.contentWindow||h.contentDocument.document||h.contentDocument;b.document.open();
|
|
@@ -653,82 +653,82 @@ this._stripLineLabels[h].effectiveWidth=e)}return(this.title?this._titleTextBloc
|
|
|
653
653
|
this._labels[c].textBlock;h=h.measureText();var e=0,e=0===this.labelAngle?h.height:h.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+h.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&&(this._stripLineLabels[c].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[c].stripLine.value<=this.viewportMaximum)&&
|
|
654
654
|
(h=this._stripLineLabels[c].textBlock,h=h.measureText(),e=0===this.labelAngle?h.height:h.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+h.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=e)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0<this._index?
|
|
655
655
|
this.tickLength:0:this.tickLength)+b};y.setLayout=function(a,h,c,b,e,k){var d,n,l,m,r=a[0]?a[0].chart:h[0].chart,p=r.isNavigator?0:10,s=r._axes;if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g]&&a[g].calculateAxisParameters();if(h&&0<h.length)for(g=0;g<h.length;g++)h[g].calculateAxisParameters();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateAxisParameters();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateAxisParameters();for(g=0;g<s.length;g++)if(s[g]&&s[g].scaleBreaks&&s[g].scaleBreaks._appliedBreaks.length)for(var w=
|
|
656
|
-
s[g].scaleBreaks._appliedBreaks,E=0;E<w.length&&!(w[E].startValue>s[g].viewportMaximum);E++)w[E].endValue<s[g].viewportMinimum||(f(s[g].scaleBreaks.firstBreakIndex)&&(s[g].scaleBreaks.firstBreakIndex=E),w[E].startValue>=s[g].viewPortMinimum&&(s[g].scaleBreaks.lastBreakIndex=E));for(var q=E=0,t=0,v=0,u=0,y=0,z=0,C,
|
|
656
|
+
s[g].scaleBreaks._appliedBreaks,E=0;E<w.length&&!(w[E].startValue>s[g].viewportMaximum);E++)w[E].endValue<s[g].viewportMinimum||(f(s[g].scaleBreaks.firstBreakIndex)&&(s[g].scaleBreaks.firstBreakIndex=E),w[E].startValue>=s[g].viewPortMinimum&&(s[g].scaleBreaks.lastBreakIndex=E));for(var q=E=0,t=0,v=0,u=0,y=0,z=0,D,C,I=n=0,M,L,O,w=M=L=O=!1,g=0;g<s.length;g++)s[g]&&s[g].title&&(s[g]._titleTextBlock=new la(s[g].ctx,{text:s[g].title,fontSize:s[g].titleFontSize,fontFamily:s[g].titleFontFamily,fontWeight:s[g].titleFontWeight,
|
|
657
657
|
fontColor:s[g].titleFontColor,fontStyle:s[g].titleFontStyle,borderColor:s[g].titleBorderColor,borderThickness:s[g].titleBorderThickness,backgroundColor:s[g].titleBackgroundColor,cornerRadius:s[g].titleCornerRadius,textBaseline:"middle",textAlign:s[g].titleTextAlign}));for(g=0;g<s.length;g++)if(s[g].title)switch(s[g]._position){case "left":s[g]._titleTextBlock.maxWidth=s[g].titleMaxWidth||k.height;s[g]._titleTextBlock.maxHeight=s[g].titleWrap?0.8*k.width:1.5*s[g].titleFontSize;s[g]._titleTextBlock.angle=
|
|
658
658
|
-90;break;case "right":s[g]._titleTextBlock.maxWidth=s[g].titleMaxWidth||k.height;s[g]._titleTextBlock.maxHeight=s[g].titleWrap?0.8*k.width:1.5*s[g].titleFontSize;s[g]._titleTextBlock.angle=90;break;default:s[g]._titleTextBlock.maxWidth=s[g].titleMaxWidth||k.width,s[g]._titleTextBlock.maxHeight=s[g].titleWrap?0.8*k.height:1.5*s[g].titleFontSize,s[g]._titleTextBlock.angle=0}if("normal"===e){for(var v=[],u=[],y=[],z=[],P=[],Q=[],N=[],U=[];4>E;){var H=0,Z=0,W=0,V=0,Y=e=0,S=0,ca=0,$=0,X=0,T=0,ba=0;if(c&&
|
|
659
659
|
0<c.length)for(y=[],g=T=0;g<c.length;g++)y.push(Math.ceil(c[g]?c[g].createLabelsAndCalculateWidth():0)),T+=y[g],S+=c[g]&&!r.isNavigator?c[g].margin:0;else y.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));N.push(y);if(b&&0<b.length)for(z=[],g=ba=0;g<b.length;g++)z.push(Math.ceil(b[g]?b[g].createLabelsAndCalculateWidth():0)),ba+=z[g],ca+=b[g]?b[g].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));U.push(z);d=Math.round(k.x1+T+S);l=Math.round(k.x2-ba-ca>r.width-
|
|
660
660
|
p?r.width-p:k.x2-ba-ca);if(a&&0<a.length)for(v=[],g=$=0;g<a.length;g++)a[g]&&(a[g].lineCoordinates={}),a[g].lineCoordinates.width=Math.abs(l-d),a[g].title&&(a[g]._titleTextBlock.maxWidth=0<a[g].titleMaxWidth&&a[g].titleMaxWidth<a[g].lineCoordinates.width?a[g].titleMaxWidth:a[g].lineCoordinates.width),v.push(Math.ceil(a[g]?a[g].createLabelsAndCalculateHeight():0)),$+=v[g],e+=a[g]&&!r.isNavigator?a[g].margin:0;else v.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));P.push(v);if(h&&0<h.length)for(u=
|
|
661
661
|
[],g=X=0;g<h.length;g++)h[g]&&(h[g].lineCoordinates={}),h[g].lineCoordinates.width=Math.abs(l-d),h[g].title&&(h[g]._titleTextBlock.maxWidth=0<h[g].titleMaxWidth&&h[g].titleMaxWidth<h[g].lineCoordinates.width?h[g].titleMaxWidth:h[g].lineCoordinates.width),u.push(Math.ceil(h[g]?h[g].createLabelsAndCalculateHeight():0)),X+=u[g],Y+=h[g]&&!r.isNavigator?h[g].margin:0;else u.push(Math.ceil(h[0]?h[0].createLabelsAndCalculateHeight():0));Q.push(u);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].lineCoordinates.x1=
|
|
662
662
|
d,l=Math.round(k.x2-ba-ca>r.width-p?r.width-p:k.x2-ba-ca),a[g]._labels&&1<a[g]._labels.length&&(n=m=0,m=a[g]._labels[1],n="dateTime"===a[g].valueType?a[g]._labels[a[g]._labels.length-2]:a[g]._labels[a[g]._labels.length-1],q=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),t=n.textBlock.width*Math.cos(Math.PI/180*Math.abs(n.textBlock.angle))+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/
|
|
663
|
-
180*Math.abs(n.textBlock.angle))),!a[g]||(!a[g].labelAutoFit||f(
|
|
664
|
-
a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0>a[g].labelAngle&&0<I?d+=I:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0===a[g].labelAngle&&(0<I&&(d+=I),0<n&&(l-=n))),r.panEnabled?$=f(r.sessionVariables.axisX.height)||r.stockChart?r.sessionVariables.axisX.height
|
|
665
|
-
|
|
666
|
-
Math.round(k.x1+T+S),h[g].lineCoordinates.x2=Math.round(k.x2-ba-ca>r.width-p?r.width-p:k.x2-ba-ca),h[g].lineCoordinates.width=Math.abs(l-d),h[g]._labels&&1<h[g]._labels.length&&(m=h[g]._labels[1],n="dateTime"===h[g].valueType?h[g]._labels[h[g]._labels.length-2]:h[g]._labels[h[g]._labels.length-
|
|
667
|
-
Math.abs(n.textBlock.angle))+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(n.textBlock.angle))),r.panEnabled?X=f(r.sessionVariables.axisX2.height)||r.stockChart?r.sessionVariables.axisX2.height=X:r.sessionVariables.axisX2.height:r.sessionVariables.axisX2.height=X,n=
|
|
668
|
-
h[g].tickPlacement&&0<g&&(h[g].lineCoordinates.y1-=h[g].tickLength),h[g].bounds={x1:d,y1:n+(X+Y-("inside"===h[g].labelPlacement&&0===g?u[g]-5:u[g])-Z),x2:l,y2:m,width:l-d},h[g].bounds.height=h[g].bounds.y2-h[g].bounds.y1,Z+=("inside"===h[g].labelPlacement&&0===g?u[g]-5:u[g])+h[g].margin;if(c&&
|
|
669
|
-
2:p,n=Math.round(k.y1+X+Y<Math.max(S,p)?Math.max(S,p):k.y1+X+Y),l=Math.round(a[0]?a[0].lineCoordinates.x1:h[0].lineCoordinates.x1),S=0<a.length?0:c[g]._labels&&0<c[g]._labels.length?c[g]._labels[0].textBlock.height/2:p,m=Math.round(k.y2-$-e-S),c[g].lineCoordinates={x1:d-W,y1:n,x2:l-
|
|
670
|
-
"inside"===c[g].tickPlacement&&0<g&&(c[g].lineCoordinates.x1-=c[g].tickLength,c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),c[g].bounds={x1:d-(("inside"===c[g].labelPlacement&&0===g?y[g]-5:y[g])+W),y1:n,x2:l-W,y2:m,height:m-n},c[g].bounds.width=c[g].bounds.x2-
|
|
671
|
-
y[g]-5:y[g])+c[g].margin);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&(d=Math.round(a[0]?a[0].lineCoordinates.x2:h[0].lineCoordinates.x2),l=Math.round(d),S=b[g]._labels&&0<b[g]._labels.length?b[g]._labels[b[g]._labels.length-1].textBlock.height/2:0,n=Math.round(k.y1+X+Y<Math.max(S,
|
|
672
|
-
b[g].
|
|
673
|
-
0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.height?b[g].titleMaxWidth:b[g].lineCoordinates.height),V+=("inside"===b[g].labelPlacement&&0===g?z[g]-5:z[g])+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].calculateValueToPixelConversionParameters(),
|
|
674
|
-
Math.abs(a[g].conversionParameters.pixelPerUnit)+a[g].lineCoordinates.x1,d=a[g]._labels[a[g]._labels.length-("dateTime"===a[g].valueType?2:1)].position,d=a[g].getApparentDifference(a[g].viewportMinimum,d),
|
|
675
|
-
h[g].calculateBreaksSizeInValues(),h[g]._labels&&1<h[g]._labels.length&&(
|
|
676
|
-
Math.abs(h[g].conversionParameters.pixelPerUnit):0)+h[g].lineCoordinates.x1:(0<d?d*Math.abs(h[g].conversionParameters.pixelPerUnit):0)+h[g].lineCoordinates.x1);for(g=0;g<s.length;g++)"axisY"===s[g].type&&(s[g].calculateValueToPixelConversionParameters(),s[g].calculateBreaksSizeInValues());
|
|
677
|
-
|
|
678
|
-
b[g].calculateBreaksInPixels()}else{p=[];
|
|
679
|
-
h[0].createLabelsAndCalculateWidth():0));Q.push(q);if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].lineCoordinates={},d=Math.round(k.x1+V+e),l=Math.round(k.x2-$-Y>r.width-10?r.width-10:k.x2-$-Y),c[g].labelAutoFit&&!f(v)&&(0<!a.length&&(d=0>c[g].labelAngle?Math.max(d,v):0===c[g].labelAngle?
|
|
680
|
-
0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.width?c[g].titleMaxWidth:c[g].lineCoordinates.width);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].lineCoordinates={},d=Math.round(k.x1+V+e),l=Math.round(k.x2-$-Y>b[g].chart.width-10?b[g].chart.width-10:k.x2-$-Y),b[g]&&
|
|
681
|
-
|
|
682
|
-
else C.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));t.push(
|
|
683
|
-
|
|
684
|
-
r.sessionVariables.axisY[g].height=p[g]:r.sessionVariables.axisY[g].height;else for(g=0;g<c.length;g++)r.sessionVariables.axisY[g].height=p[g];if(c&&0<c.length)for(g=c.length-1;0<=g;g--)n=Math.round(k.y2),m=Math.round(k.y2>
|
|
685
|
-
c[g].
|
|
686
|
-
X+=p[g]+c[g].margin;if(b&&0<b.length)for(g=b.length-1;0<=g;g--)b[g]&&(n=Math.round(k.y1),m=Math.round(k.y1+(
|
|
687
|
-
b[g].lineCoordinates.
|
|
688
|
-
0<b.
|
|
689
|
-
b[S].labelAutoFit&&(l=b[S].lineCoordinates.x1,d=l-V);a[g].lineCoordinates={x1:l-N,y1:n,x2:l-N,y2:m,height:Math.abs(m-n)};"inside"===a[g].labelPlacement&&0<g&&(a[g].lineCoordinates.x1=a[g].lineCoordinates.x1-(I[g]-
|
|
690
|
-
a[g].
|
|
691
|
-
2:0;d=Math.round(k.x1-e);n=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:k.y1<Math.max(S,10)?Math.max(S,10):k.y1):k.y1<Math.max(S,10)?Math.max(S,10):k.y1;l=Math.round(k.x2-$-Y);m=c&&0<c.length?Math.round(c[0]?
|
|
692
|
-
0>c[S].labelAngle||0===c[S].labelAngle?l-$:d);if(b&&0<b.length)for(S=0;S<b.length;S++)b[S]&&b[S].labelAutoFit&&(l=b[S].lineCoordinates.x2,d=l-$);h[g].lineCoordinates={x1:l+U,y1:n,x2:l+U,y2:m,height:Math.abs(m-n)};"inside"===
|
|
693
|
-
0<g&&(h[g].lineCoordinates.x1
|
|
694
|
-
h[g].
|
|
695
|
-
0;g<
|
|
696
|
-
e.ctx;e.alignVerticalAxes&&e.alignVerticalAxes();k.save();k.beginPath();a&&a.length&&k.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2);h&&h.length&&k.rect(2,h[h.length-1].bounds.y1,h[0].chart.width-4,h[0].bounds.y2);
|
|
697
|
-
|
|
698
|
-
if(
|
|
699
|
-
if(
|
|
700
|
-
|
|
701
|
-
b.length;d++)b[d].renderStripLinesOfThicknessType("pixel"),b[d].crosshair&&b[d].crosshair.enabled&&(k=!0,e.clearedOverlayedCanvas=b[d].type);if(k||!k&&e.clearedOverlayedCanvas&&0<=e.clearedOverlayedCanvas.indexOf("axis"))e.resetOverlayedCanvas(),e.renderCrosshairs(null,f(e.sessionVariables.crosshairShownByPixel)||
|
|
702
|
-
this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var h=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(h,c);this.stripLines[a].value=this.convertPixelToValue((this.convertValueToPixel(h)+
|
|
703
|
-
this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,h=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-
|
|
704
|
-
Wa(h[d].spacing,a,8,e?0.1*a:8,e?0:3)<<0,h[d].size=0>h[d].spacing?0:Math.abs(h[d].spacing/c),this.logarithmic&&(h[d].size=Math.pow(this.logarithmBase,h[d].size))};y.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=
|
|
705
|
-
this.conversionParameters.minimum||(f(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=h),a[h].startValue>=this.conversionParameters.minimum&&(a[h].startPixel=this.convertValueToPixel(a[h].startValue),this.scaleBreaks.lastBreakIndex=h),a[h].endValue<=this.conversionParameters.maximum&&(a[h].endPixel=this.convertValueToPixel(a[h].endValue)))}};y.prototype.renderLabelsTicksAndTitle=
|
|
706
|
-
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,f,n=this.viewportMaximum,l=this.lineCoordinates.width/Math.log(this.range),m=this._labels.length-1;0<=m;m--){p=this._labels[m];if(p.position<this.viewportMinimum)break;p.position>
|
|
707
|
-
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(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(f=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+=f);c>this.lineCoordinates.width*
|
|
708
|
-
|
|
709
|
-
0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(r=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+=r);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(h=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});
|
|
710
|
-
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.x<<0)+0.5:s.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,s.y<<0),this.ctx.lineTo(b,s.y+this.tickLength<<0),this.ctx.stroke()),h&&0!==d++%2&&this.labelAutoFit||
|
|
711
|
-
s.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock.fontSize/2):s.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.fontSize/2+5):0>this.labelAngle?(s.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),s.y="inside"===this.labelPlacement?s.y-("inside"===this.tickPlacement?this.tickLength:0)-(p.textBlock.height-p.textBlock.fontSize/
|
|
712
|
-
5+Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))):(s.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,s.y="inside"===this.labelPlacement?s.y-("inside"===this.tickPlacement?this.tickLength:0)-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(p.textBlock.height-p.textBlock.fontSize/
|
|
713
|
-
5+Math.abs(p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=s.x,p.textBlock.y=s.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;
|
|
714
|
-
a.ctx.beginPath();a.ctx.moveTo(b,s.y<<0);a.ctx.lineTo(b,s.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock._lineHeight/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,
|
|
715
|
-
this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.x<<0)+0.5:s.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,s.y<<0),this.ctx.lineTo(b,s.y-this.tickLength<<0),this.ctx.stroke()),
|
|
716
|
-
this.labelPlacement?s.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:s.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):0>this.labelAngle?(s.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,s.y="inside"===this.labelPlacement?s.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*
|
|
717
|
-
s.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)):(s.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),s.y="inside"===this.labelPlacement?s.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):s.y-("inside"===
|
|
718
|
-
180*this.labelAngle)+p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),p.textBlock.x=s.x,p.textBlock.y=s.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=
|
|
719
|
-
a.ctx.beginPath();a.ctx.moveTo(b,s.y<<0);a.ctx.lineTo(b,s.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===
|
|
720
|
-
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.y<<0)+0.5:s.y<<0,this.ctx.beginPath(),this.ctx.moveTo(s.x<<0,b),this.ctx.lineTo(s.x-this.tickLength<<0,b),this.ctx.stroke()),h&&0!==d++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
721
|
-
s.x+("inside"===this.tickPlacement?this.tickLength:0)+5:s.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?s.y:s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?s.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?
|
|
722
|
-
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?s.y:s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?s.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:
|
|
723
|
-
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(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
|
|
724
|
-
a.ctx.beginPath();a.ctx.moveTo(s.x<<0,b);a.ctx.lineTo(s.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===
|
|
725
|
-
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.y<<0)+0.5:s.y<<0,this.ctx.beginPath(),this.ctx.moveTo(s.x<<0,b),this.ctx.lineTo(s.x+this.tickLength<<0,b),this.ctx.stroke()),h&&0!==d++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
726
|
-
s.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:s.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):s.y,p.textBlock.x="inside"===this.labelPlacement?s.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)-
|
|
727
|
-
p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):s.y,p.textBlock.x="inside"===this.labelPlacement?s.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:s.x+
|
|
728
|
-
180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(s.y<<
|
|
729
|
-
0,b);a.ctx.lineTo(s.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}d=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",
|
|
730
|
-
a._labels.length;m++)p=a._labels[m],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||h&&0!==d++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||h&&0!==d++%2&&this.labelAutoFit)||p.textBlock.render(!0)};y.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,h,c,b=this.chart.plotArea,
|
|
731
|
-
this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)h?(h=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,h.x),b.y1,Math.abs(c.x-h.x),Math.abs(b.y1-b.y2)),h=!1):h=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=
|
|
663
|
+
180*Math.abs(n.textBlock.angle))),!a[g]||(!a[g].labelAutoFit||f(D)||f(C)||r.isNavigator||r.stockChart)||(n=0,0<a[g].labelAngle?C+t>l&&(a[g].convertPixelToValue(C)>=a[g].viewportMinimum&&a[g].convertPixelToValue(C)<=a[g].viewportMaximum)&&(n+=0<a[g].labelAngle?C+t-l-ba:0):0>a[g].labelAngle?D-q<d&&D-q<a[g].viewportMinimum&&(I=d-(S+a[g].tickLength+y+D-q+a[g].labelFontSize/2)):0===a[g].labelAngle&&(C+t>l&&(a[g].convertPixelToValue(C)>=a[g].viewportMinimum&&a[g].convertPixelToValue(C)<=a[g].viewportMaximum)&&
|
|
664
|
+
(n=C+t/2-l-ba),D-q<d&&D-q<a[g].viewportMinimum&&(I=d-S-a[g].tickLength-y-D+q/2)),a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0<a[g].labelAngle&&0<n?l-=n:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0>a[g].labelAngle&&0<I?d+=I:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0===a[g].labelAngle&&(0<I&&(d+=I),0<n&&(l-=n))),r.panEnabled?$=f(r.sessionVariables.axisX.height)||r.stockChart?r.sessionVariables.axisX.height=
|
|
665
|
+
$:r.sessionVariables.axisX.height:r.sessionVariables.axisX.height=$,n=Math.round(k.y2-$-e+H),m=Math.round(k.y2),a[g].lineCoordinates.x2=l,a[g].lineCoordinates.width=l-d,a[g].lineCoordinates.y1=n,a[g].lineCoordinates.y2=n,"inside"===a[g].labelPlacement&&0<g&&(a[g].lineCoordinates.y1=a[0].lineCoordinates.y2+H+(a[g].labelEffectiveHeight||0),a[g].lineCoordinates.y2=a[g].lineCoordinates.y1+a[g].lineThickness/2),"inside"===a[g].tickPlacement&&0<g&&(a[g].lineCoordinates.y1+=a[g].tickLength,a[g].lineCoordinates.y2=
|
|
666
|
+
a[g].lineCoordinates.y1+a[g].lineThickness/2),a[g].bounds={x1:d,y1:n,x2:l,y2:m-($+e-v[g]-H),width:l-d},a[g].bounds.height=a[g].bounds.y2-a[g].bounds.y1),H+=v[g]+a[g].margin;if(h&&0<h.length)for(g=0;g<h.length;g++)h[g].lineCoordinates.x1=Math.round(k.x1+T+S),h[g].lineCoordinates.x2=Math.round(k.x2-ba-ca>r.width-p?r.width-p:k.x2-ba-ca),h[g].lineCoordinates.width=Math.abs(l-d),h[g]._labels&&1<h[g]._labels.length&&(m=h[g]._labels[1],n="dateTime"===h[g].valueType?h[g]._labels[h[g]._labels.length-2]:h[g]._labels[h[g]._labels.length-
|
|
667
|
+
1],q=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),t=n.textBlock.width*Math.cos(Math.PI/180*Math.abs(n.textBlock.angle))+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(n.textBlock.angle))),r.panEnabled?X=f(r.sessionVariables.axisX2.height)||r.stockChart?r.sessionVariables.axisX2.height=X:r.sessionVariables.axisX2.height:r.sessionVariables.axisX2.height=X,n=
|
|
668
|
+
Math.round(k.y1),m=h[g].lineCoordinates.y1=n+X+Y-Z,h[g].lineCoordinates.y2=n,"inside"===h[g].labelPlacement&&0<g&&(h[g].lineCoordinates.y1=h[0].lineCoordinates.y1-Z-(h[g].labelEffectiveHeight||0)-5),"inside"===h[g].tickPlacement&&0<g&&(h[g].lineCoordinates.y1-=h[g].tickLength),h[g].bounds={x1:d,y1:n+(X+Y-("inside"===h[g].labelPlacement&&0===g?u[g]-5:u[g])-Z),x2:l,y2:m,width:l-d},h[g].bounds.height=h[g].bounds.y2-h[g].bounds.y1,Z+=("inside"===h[g].labelPlacement&&0===g?u[g]-5:u[g])+h[g].margin;if(c&&
|
|
669
|
+
0<c.length)for(g=0;g<c.length;g++)S=r.isNavigator?0:10,c[g]&&(d=Math.round(a[0]?a[0].lineCoordinates.x1:h[0].lineCoordinates.x1),S=c[g]._labels&&0<c[g]._labels.length?c[g]._labels[c[g]._labels.length-1].textBlock.height/2:p,n=Math.round(k.y1+X+Y<Math.max(S,p)?Math.max(S,p):k.y1+X+Y),l=Math.round(a[0]?a[0].lineCoordinates.x1:h[0].lineCoordinates.x1),S=0<a.length?0:c[g]._labels&&0<c[g]._labels.length?c[g]._labels[0].textBlock.height/2:p,m=Math.round(k.y2-$-e-S),c[g].lineCoordinates={x1:d-W,y1:n,x2:l-
|
|
670
|
+
W,y2:m,height:Math.abs(m-n)},"inside"===c[g].labelPlacement&&0<g&&(c[g].lineCoordinates.x1=c[0].lineCoordinates.x1-W-(c[g].labelEffectiveWidth||0)-5,c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),"inside"===c[g].tickPlacement&&0<g&&(c[g].lineCoordinates.x1-=c[g].tickLength,c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),c[g].bounds={x1:d-(("inside"===c[g].labelPlacement&&0===g?y[g]-5:y[g])+W),y1:n,x2:l-W,y2:m,height:m-n},c[g].bounds.width=c[g].bounds.x2-
|
|
671
|
+
c[g].bounds.x1,c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.height?c[g].titleMaxWidth:c[g].lineCoordinates.height),W+=("inside"===c[g].labelPlacement&&0===g?y[g]-5:y[g])+c[g].margin);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&(d=Math.round(a[0]?a[0].lineCoordinates.x2:h[0].lineCoordinates.x2),l=Math.round(d),S=b[g]._labels&&0<b[g]._labels.length?b[g]._labels[b[g]._labels.length-1].textBlock.height/2:0,n=Math.round(k.y1+X+Y<Math.max(S,
|
|
672
|
+
p)?Math.max(S,p):k.y1+X+Y),S=0<a.length?0:b[g]._labels&&0<b[g]._labels.length?b[g]._labels[0].textBlock.height/2:0,m=Math.round(k.y2-($+e+S)),b[g].lineCoordinates={x1:d+V,y1:n,x2:d+V,y2:m,height:Math.abs(m-n)},"inside"===b[g].labelPlacement&&0<g&&(b[g].lineCoordinates.x1=b[0].lineCoordinates.x2+V+(b[g].labelEffectiveWidth||0)+5,b[g].lineCoordinates.x2=b[g].lineCoordinates.x1+b[g].lineThickness/2),"inside"===b[g].tickPlacement&&0<g&&(b[g].lineCoordinates.x1+=b[g].tickLength,b[g].lineCoordinates.x2=
|
|
673
|
+
b[g].lineCoordinates.x1+b[g].lineThickness/2),b[g].bounds={x1:d+V,y1:n,x2:l+(("inside"===b[g].labelPlacement&&0===g?z[g]-5:z[g])+V),y2:m,height:m-n},b[g].bounds.width=b[g].bounds.x2-b[g].bounds.x1,b[g].title&&(b[g]._titleTextBlock.maxWidth=0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.height?b[g].titleMaxWidth:b[g].lineCoordinates.height),V+=("inside"===b[g].labelPlacement&&0===g?z[g]-5:z[g])+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].calculateValueToPixelConversionParameters(),
|
|
674
|
+
a[g].calculateBreaksSizeInValues(),a[g]._labels&&1<a[g]._labels.length&&(D=(a[g].logarithmic?Math.log(a[g]._labels[1].position/a[g].viewportMinimum)/a[g].conversionParameters.lnLogarithmBase:a[g]._labels[1].position-a[g].viewportMinimum)*Math.abs(a[g].conversionParameters.pixelPerUnit)+a[g].lineCoordinates.x1,d=a[g]._labels[a[g]._labels.length-("dateTime"===a[g].valueType?2:1)].position,d=a[g].getApparentDifference(a[g].viewportMinimum,d),C=a[g].logarithmic?(1<d?Math.log(d)/a[g].conversionParameters.lnLogarithmBase*
|
|
675
|
+
Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1:(0<d?d*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1));if(h&&0<h.length)for(g=0;g<h.length;g++)h[g].calculateValueToPixelConversionParameters(),h[g].calculateBreaksSizeInValues(),h[g]._labels&&1<h[g]._labels.length&&(D=(h[g].logarithmic?Math.log(h[g]._labels[1].position/h[g].viewportMinimum)/h[g].conversionParameters.lnLogarithmBase:h[g]._labels[1].position-h[g].viewportMinimum)*Math.abs(h[g].conversionParameters.pixelPerUnit)+
|
|
676
|
+
h[g].lineCoordinates.x1,d=h[g]._labels[h[g]._labels.length-("dateTime"===h[g].valueType?2:1)].position,d=h[g].getApparentDifference(h[g].viewportMinimum,d),C=h[g].logarithmic?(1<d?Math.log(d)/h[g].conversionParameters.lnLogarithmBase*Math.abs(h[g].conversionParameters.pixelPerUnit):0)+h[g].lineCoordinates.x1:(0<d?d*Math.abs(h[g].conversionParameters.pixelPerUnit):0)+h[g].lineCoordinates.x1);for(g=0;g<s.length;g++)"axisY"===s[g].type&&(s[g].calculateValueToPixelConversionParameters(),s[g].calculateBreaksSizeInValues());
|
|
677
|
+
if(0<E){if(a&&0<a.length)for(g=0;g<a.length;g++)w=P[E-1][g]===P[E][g]?!0:!1;else w=!0;if(h&&0<h.length)for(g=0;g<h.length;g++)M=Q[E-1][g]===Q[E][g]?!0:!1;else M=!0;if(c&&0<c.length)for(g=0;g<c.length;g++)L=N[E-1][g]===N[E][g]?!0:!1;else L=!0;if(b&&0<b.length)for(g=0;g<b.length;g++)O=U[E-1][g]===U[E][g]?!0:!1;else O=!0}if(w&&M&&L&&O)break;E++}if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].calculateStripLinesThicknessInValues(),a[g].calculateBreaksInPixels();if(h&&0<h.length)for(g=0;g<h.length;g++)h[g].calculateStripLinesThicknessInValues(),
|
|
678
|
+
h[g].calculateBreaksInPixels();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateStripLinesThicknessInValues(),c[g].calculateBreaksInPixels();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateStripLinesThicknessInValues(),b[g].calculateBreaksInPixels()}else{p=[];D=[];I=[];q=[];C=[];t=[];P=[];for(Q=[];4>E;){$=V=W=ca=S=Y=e=U=N=H=X=0;if(a&&0<a.length)for(I=[],g=V=0;g<a.length;g++)I.push(Math.ceil(a[g]?a[g].createLabelsAndCalculateWidth():0)),V+=I[g],e+=a[g]&&!r.isNavigator?a[g].margin:0;else I.push(Math.ceil(a[0]?
|
|
679
|
+
a[0].createLabelsAndCalculateWidth():0));P.push(I);if(h&&0<h.length)for(q=[],g=$=0;g<h.length;g++)q.push(Math.ceil(h[g]?h[g].createLabelsAndCalculateWidth():0)),$+=q[g],Y+=h[g]?h[g].margin:0;else q.push(Math.ceil(h[0]?h[0].createLabelsAndCalculateWidth():0));Q.push(q);if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].lineCoordinates={},d=Math.round(k.x1+V+e),l=Math.round(k.x2-$-Y>r.width-10?r.width-10:k.x2-$-Y),c[g].labelAutoFit&&!f(v)&&(0<!a.length&&(d=0>c[g].labelAngle?Math.max(d,v):0===c[g].labelAngle?
|
|
680
|
+
Math.max(d,v/2):d),0<!h.length&&(l=0<c[g].labelAngle?l-u/2:0===c[g].labelAngle?l-u/2:l)),c[g].lineCoordinates.x1=d,c[g].lineCoordinates.x2=l,c[g].lineCoordinates.width=Math.abs(l-d),c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.width?c[g].titleMaxWidth:c[g].lineCoordinates.width);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].lineCoordinates={},d=Math.round(k.x1+V+e),l=Math.round(k.x2-$-Y>b[g].chart.width-10?b[g].chart.width-10:k.x2-$-Y),b[g]&&
|
|
681
|
+
b[g].labelAutoFit&&!f(y)&&(0<!a.length&&(d=0<b[g].labelAngle?Math.max(d,y):0===b[g].labelAngle?Math.max(d,y/2):d),0<!h.length&&(l-=z/2)),b[g].lineCoordinates.x1=d,b[g].lineCoordinates.x2=l,b[g].lineCoordinates.width=Math.abs(l-d),b[g].title&&(b[g]._titleTextBlock.maxWidth=0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.width?b[g].titleMaxWidth:b[g].lineCoordinates.width);if(c&&0<c.length)for(p=[],g=W=0;g<c.length;g++)p.push(Math.ceil(c[g]?c[g].createLabelsAndCalculateHeight():0)),W+=
|
|
682
|
+
p[g]+c[g].margin,S+=c[g].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));C.push(p);if(b&&0<b.length)for(D=[],g=0;g<b.length;g++)D.push(Math.ceil(b[g]?b[g].createLabelsAndCalculateHeight():0)),ca+=b[g].margin;else D.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));t.push(D);if(c&&0<c.length)for(g=0;g<c.length;g++)0<c[g]._labels.length&&(m=c[g]._labels[0],n=c[g]._labels[c[g]._labels.length-1],v=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+
|
|
683
|
+
(m.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),u=n.textBlock.width*Math.cos(Math.PI/180*Math.abs(n.textBlock.angle))+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(n.textBlock.angle)));if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&0<b[g]._labels.length&&(m=b[g]._labels[0],n=b[g]._labels[b[g]._labels.length-1],y=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/
|
|
684
|
+
180*Math.abs(m.textBlock.angle)),z=n.textBlock.width*Math.cos(Math.PI/180*Math.abs(n.textBlock.angle))+(n.textBlock.height-n.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(n.textBlock.angle)));if(r.panEnabled)for(g=0;g<c.length;g++)p[g]=f(r.sessionVariables.axisY[g].height)?r.sessionVariables.axisY[g].height=p[g]:r.sessionVariables.axisY[g].height;else for(g=0;g<c.length;g++)r.sessionVariables.axisY[g].height=p[g];if(c&&0<c.length)for(g=c.length-1;0<=g;g--)n=Math.round(k.y2),m=Math.round(k.y2>
|
|
685
|
+
c[g].chart.height?c[g].chart.height:k.y2),c[g].lineCoordinates.y1=n-(p[g]+c[g].margin+X),c[g].lineCoordinates.y2=n-(p[g]+c[g].margin+X),"inside"===c[g].labelPlacement&&0<g&&(c[g].lineCoordinates.y1=c[g].lineCoordinates.y1+p[g]-(c[g]._titleTextBlock?c[g]._titleTextBlock.height:0)-c[g].tickLength-(c[g].stripLineLabelEffectiveHeight||0)-5,c[g].lineCoordinates.y2=c[g].lineCoordinates.y1+c[g].lineThickness/2),"inside"===c[g].tickPlacement&&0<g&&(c[g].lineCoordinates.y1+=c[g].tickLength,c[g].lineCoordinates.y2=
|
|
686
|
+
c[g].lineCoordinates.y1+c[g].lineThickness/2),c[g].bounds={x1:d,y1:n-(p[g]+X+c[g].margin),x2:l,y2:m-(X+c[g].margin),width:l-d,height:p[g]},c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.width?c[g].titleMaxWidth:c[g].lineCoordinates.width),X+=p[g]+c[g].margin;if(b&&0<b.length)for(g=b.length-1;0<=g;g--)b[g]&&(n=Math.round(k.y1),m=Math.round(k.y1+(D[g]+b[g].margin+H)),b[g].lineCoordinates.y1=m,b[g].lineCoordinates.y2=m,"inside"===b[g].labelPlacement&&
|
|
687
|
+
0<g&&(b[g].lineCoordinates.y1=m-D[g]+(b[g]._titleTextBlock?b[g]._titleTextBlock.height:0)+b[g].tickLength+(b[g].stripLineLabelEffectiveHeight||0),b[g].lineCoordinates.y2=b[g].lineCoordinates.y1-b[g].lineThickness/2),"inside"===b[g].tickPlacement&&0<g&&(b[g].lineCoordinates.y1-=b[g].tickLength,b[g].lineCoordinates.y2=b[g].lineCoordinates.y1-b[g].lineThickness/2),b[g].bounds={x1:d,y1:n+(b[g].margin+H),x2:l,y2:m,width:l-d},b[g].bounds.height=b[g].bounds.y2-b[g].bounds.y1,b[g].title&&(b[g]._titleTextBlock.maxWidth=
|
|
688
|
+
0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.width?b[g].titleMaxWidth:b[g].lineCoordinates.width),H+=D[g]+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++){S=a[g]._labels&&0<a[g]._labels.length?a[g]._labels[0].textBlock.fontSize/2:0;d=Math.round(k.x1+e);n=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:k.y1<Math.max(S,10)?Math.max(S,10):k.y1):k.y1<Math.max(S,10)?Math.max(S,10):k.y1;l=Math.round(k.x1+V+e);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:k.y2-W>r.height-
|
|
689
|
+
Math.max(S,10)?r.height-Math.max(S,10):k.y2-W):k.y2>r.height-Math.max(S,10)?r.height-Math.max(S,10):k.y2;if(c&&0<c.length)for(S=0;S<c.length;S++)c[S]&&c[S].labelAutoFit&&(l=c[S].lineCoordinates.x1,d=0>c[S].labelAngle||0===c[S].labelAngle?l-V:d);if(b&&0<b.length)for(S=0;S<b.length;S++)b[S]&&b[S].labelAutoFit&&(l=b[S].lineCoordinates.x1,d=l-V);a[g].lineCoordinates={x1:l-N,y1:n,x2:l-N,y2:m,height:Math.abs(m-n)};"inside"===a[g].labelPlacement&&0<g&&(a[g].lineCoordinates.x1=a[g].lineCoordinates.x1-(I[g]-
|
|
690
|
+
(a[g]._titleTextBlock?a[g]._titleTextBlock.height:0))+a[g].tickLength+(a[g].stripLineLabelEffectiveWidth||0),a[g].lineCoordinates.x2=a[g].lineCoordinates.x1+a[g].lineThickness/2);"inside"===a[g].tickPlacement&&0<g&&(a[g].lineCoordinates.x1-=a[g].tickLength,a[g].lineCoordinates.x2=a[g].lineCoordinates.x1+a[g].lineThickness/2);a[g].bounds={x1:l-(I[g]+N),y1:n,x2:l-N,y2:m,height:m-n};a[g].bounds.width=a[g].bounds.x2-a[g].bounds.x1;a[g].title&&(a[g]._titleTextBlock.maxWidth=0<a[g].titleMaxWidth&&a[g].titleMaxWidth<
|
|
691
|
+
a[g].lineCoordinates.height?a[g].titleMaxWidth:a[g].lineCoordinates.height);a[g].calculateValueToPixelConversionParameters();a[g].calculateBreaksSizeInValues();N+=I[g]+a[g].margin}if(h&&0<h.length)for(g=0;g<h.length;g++){S=h[g]._labels&&0<h[g]._labels.length?h[g]._labels[0].textBlock.fontSize/2:0;d=Math.round(k.x1-e);n=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:k.y1<Math.max(S,10)?Math.max(S,10):k.y1):k.y1<Math.max(S,10)?Math.max(S,10):k.y1;l=Math.round(k.x2-$-Y);m=c&&0<c.length?Math.round(c[0]?
|
|
692
|
+
c[0].lineCoordinates.y1:k.y2-W>r.height-Math.max(S,10)?r.height-Math.max(S,10):k.y2-W):k.y2>r.height-Math.max(S,10)?r.height-Math.max(S,10):k.y2;if(c&&0<c.length)for(S=0;S<c.length;S++)c[S]&&c[S].labelAutoFit&&(l=0>c[S].labelAngle?Math.max(l,v):0===c[S].labelAngle?Math.max(l,v/2):l,d=0>c[S].labelAngle||0===c[S].labelAngle?l-$:d);if(b&&0<b.length)for(S=0;S<b.length;S++)b[S]&&b[S].labelAutoFit&&(l=b[S].lineCoordinates.x2,d=l-$);h[g].lineCoordinates={x1:l+U,y1:n,x2:l+U,y2:m,height:Math.abs(m-n)};"inside"===
|
|
693
|
+
h[g].labelPlacement&&0<g&&(h[g].lineCoordinates.x1=h[g].lineCoordinates.x1+(q[g]-(h[g]._titleTextBlock?h[g]._titleTextBlock.height:0)-2)-h[g].tickLength-(h[g].stripLineLabelEffectiveWidth||0),h[g].lineCoordinates.x2=h[g].lineCoordinates.x1+h[g].lineThickness/2);"inside"===h[g].tickPlacement&&0<g&&(h[g].lineCoordinates.x1+=h[g].tickLength,h[g].lineCoordinates.x2=h[g].lineCoordinates.x1+h[g].lineThickness/2);h[g].bounds={x1:h[g].lineCoordinates.x1,y1:n,x2:l+q[g]+U,y2:m,width:l-d,height:m-n};h[g].bounds.width=
|
|
694
|
+
h[g].bounds.x2-h[g].bounds.x1;h[g].title&&(h[g]._titleTextBlock.maxWidth=0<h[g].titleMaxWidth&&h[g].titleMaxWidth<h[g].lineCoordinates.height?h[g].titleMaxWidth:h[g].lineCoordinates.height);h[g].calculateValueToPixelConversionParameters();h[g].calculateBreaksSizeInValues();U+=q[g]+h[g].margin}for(g=0;g<s.length;g++)"axisY"===s[g].type&&(s[g].calculateValueToPixelConversionParameters(),s[g].calculateBreaksSizeInValues());if(0<E){if(a&&0<a.length)for(g=0;g<a.length;g++)w=P[E-1][g]===P[E][g]?!0:!1;else w=
|
|
695
|
+
!0;if(h&&0<h.length)for(g=0;g<h.length;g++)M=Q[E-1][g]===Q[E][g]?!0:!1;else M=!0;if(c&&0<c.length)for(g=0;g<c.length;g++)L=C[E-1][g]===C[E][g]?!0:!1;else L=!0;if(b&&0<b.length)for(g=0;g<b.length;g++)O=t[E-1][g]===t[E][g]?!0:!1;else O=!0}if(w&&M&&L&&O)break;E++}if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateStripLinesThicknessInValues(),c[g].calculateBreaksInPixels();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateStripLinesThicknessInValues(),b[g].calculateBreaksInPixels();if(a&&0<a.length)for(g=
|
|
696
|
+
0;g<a.length;g++)a[g].calculateStripLinesThicknessInValues(),a[g].calculateBreaksInPixels();if(h&&0<h.length)for(g=0;g<h.length;g++)h[g].calculateStripLinesThicknessInValues(),h[g].calculateBreaksInPixels()}};y.render=function(a,h,c,b,e){e=a[0]?a[0].chart:h[0].chart;var k=e.ctx;e.alignVerticalAxes&&e.alignVerticalAxes();k.save();k.beginPath();a&&a.length&&k.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2);h&&h.length&&k.rect(2,h[h.length-1].bounds.y1,h[0].chart.width-4,h[0].bounds.y2);
|
|
697
|
+
k.clip();if(a&&0<a.length)for(var d=0;d<a.length;d++)a[d].renderLabelsTicksAndTitle();if(h&&0<h.length)for(d=0;d<h.length;d++)h[d].renderLabelsTicksAndTitle();k.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();e.preparePlotArea();d=e.plotArea;k.save();k.beginPath();k.rect(d.x1,d.y1,Math.abs(d.x2-d.x1),Math.abs(d.y2-d.y1));k.clip();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("value");
|
|
698
|
+
if(h&&0<h.length)for(d=0;d<h.length;d++)h[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(h&&0<h.length)for(d=0;d<h.length;d++)h[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();
|
|
699
|
+
k.restore();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderGrid(),v&&(a[d].createMask(),a[d].renderBreaksBackground());if(h&&0<h.length)for(d=0;d<h.length;d++)h[d].renderGrid(),v&&(h[d].createMask(),h[d].renderBreaksBackground());if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderGrid(),v&&(c[d].createMask(),c[d].renderBreaksBackground());if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderGrid(),v&&(b[d].createMask(),b[d].renderBreaksBackground());if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderAxisLine();
|
|
700
|
+
if(h&&0<h.length)for(d=0;d<h.length;d++)h[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();k=!1;if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("pixel"),a[d].crosshair&&a[d].crosshair.enabled&&(k=!0,e.clearedOverlayedCanvas=a[d].type);if(h&&0<h.length)for(d=0;d<h.length;d++)h[d].renderStripLinesOfThicknessType("pixel"),h[d].crosshair&&h[d].crosshair.enabled&&(k=!0,e.clearedOverlayedCanvas=
|
|
701
|
+
h[d].type);if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderStripLinesOfThicknessType("pixel"),c[d].crosshair&&c[d].crosshair.enabled&&(k=!0,e.clearedOverlayedCanvas=c[d].type);if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderStripLinesOfThicknessType("pixel"),b[d].crosshair&&b[d].crosshair.enabled&&(k=!0,e.clearedOverlayedCanvas=b[d].type);if(k||!k&&e.clearedOverlayedCanvas&&0<=e.clearedOverlayedCanvas.indexOf("axis"))e.resetOverlayedCanvas(),e.renderCrosshairs(null,f(e.sessionVariables.crosshairShownByPixel)||
|
|
702
|
+
e.sessionVariables.crosshairShownByPixel?!0:e.sessionVariables.crosshairShownByPixel)};y.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var h=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(h,c);this.stripLines[a].value=this.convertPixelToValue((this.convertValueToPixel(h)+
|
|
703
|
+
this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};y.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,h=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-
|
|
704
|
+
this.conversionParameters.minimum),b=this.scaleBreaks&&!f(this.scaleBreaks.options.spacing),e,d=0;d<h.length;d++)e=b||!f(h[d].options.spacing),h[d].spacing=Wa(h[d].spacing,a,8,e?0.1*a:8,e?0:3)<<0,h[d].size=0>h[d].spacing?0:Math.abs(h[d].spacing/c),this.logarithmic&&(h[d].size=Math.pow(this.logarithmBase,h[d].size))};y.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=
|
|
705
|
+
this.scaleBreaks.lastBreakIndex=null);for(var h=0;h<a.length&&!(a[h].startValue>this.conversionParameters.maximum);h++)a[h].endValue<this.conversionParameters.minimum||(f(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=h),a[h].startValue>=this.conversionParameters.minimum&&(a[h].startPixel=this.convertValueToPixel(a[h].startValue),this.scaleBreaks.lastBreakIndex=h),a[h].endValue<=this.conversionParameters.maximum&&(a[h].endPixel=this.convertValueToPixel(a[h].endValue)))}};y.prototype.renderLabelsTicksAndTitle=
|
|
706
|
+
function(){var a=this,h=!1,c=0,b=0,e=1,d=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,f,n=this.viewportMaximum,l=this.lineCoordinates.width/Math.log(this.range),m=this._labels.length-1;0<=m;m--){p=this._labels[m];if(p.position<this.viewportMinimum)break;p.position>
|
|
707
|
+
this.viewportMaximum||!(m===this._labels.length-1||f<Math.log(n/p.position)*l/e)||(c.push(p),n=p.position,f=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(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(f=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+=f);c>this.lineCoordinates.width*
|
|
708
|
+
e&&this.labelAutoFit&&(h=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],r,n=this.viewportMaximum,l=this.lineCoordinates.height/Math.log(this.range),m=this._labels.length-1;0<=m;m--){p=this._labels[m];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(m===this._labels.length-1||r<Math.log(n/p.position)*l)||(c.push(p),n=p.position,r=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+
|
|
709
|
+
p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(r=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+=r);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(h=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});
|
|
710
|
+
var m=0,p,s;if("bottom"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.x<<0)+0.5:s.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,s.y<<0),this.ctx.lineTo(b,s.y+this.tickLength<<0),this.ctx.stroke()),h&&0!==d++%2&&this.labelAutoFit||
|
|
711
|
+
(0===p.textBlock.angle?(s.x-=p.textBlock.width/2,s.y="inside"===this.labelPlacement?s.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock.fontSize/2):s.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.fontSize/2+5):0>this.labelAngle?(s.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),s.y="inside"===this.labelPlacement?s.y-("inside"===this.tickPlacement?this.tickLength:0)-(p.textBlock.height-p.textBlock.fontSize/
|
|
712
|
+
2)*Math.cos(Math.PI/180*this.labelAngle):s.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))):(s.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,s.y="inside"===this.labelPlacement?s.y-("inside"===this.tickPlacement?this.tickLength:0)-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(p.textBlock.height-p.textBlock.fontSize/
|
|
713
|
+
2)*Math.cos(Math.PI/180*this.labelAngle):s.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=s.x,p.textBlock.y=s.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;
|
|
714
|
+
a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(s.x<<0)+0.5:s.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,s.y<<0);a.ctx.lineTo(b,s.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock._lineHeight/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,
|
|
715
|
+
this._titleTextBlock.render(!0))}else if("top"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.x<<0)+0.5:s.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,s.y<<0),this.ctx.lineTo(b,s.y-this.tickLength<<0),this.ctx.stroke()),
|
|
716
|
+
h&&0!==d++%2&&this.labelAutoFit||(0===p.textBlock.angle?(s.x-=p.textBlock.width/2,s.y="inside"===this.labelPlacement?s.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:s.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):0>this.labelAngle?(s.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,s.y="inside"===this.labelPlacement?s.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*
|
|
717
|
+
Math.sin(Math.PI/180*this.labelAngle)+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):s.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)):(s.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),s.y="inside"===this.labelPlacement?s.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):s.y-("inside"===
|
|
718
|
+
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=s.x,p.textBlock.y=s.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=
|
|
719
|
+
a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(s.x<<0)+0.5:s.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,s.y<<0);a.ctx.lineTo(b,s.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===
|
|
720
|
+
this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.y<<0)+0.5:s.y<<0,this.ctx.beginPath(),this.ctx.moveTo(s.x<<0,b),this.ctx.lineTo(s.x-this.tickLength<<0,b),this.ctx.stroke()),h&&0!==d++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
721
|
+
(p.textBlock.y=s.y,p.textBlock.x="inside"===this.labelPlacement?s.x+("inside"===this.tickPlacement?this.tickLength:0)+5:s.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?s.y:s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?s.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?
|
|
722
|
+
this.tickLength:0)+5:s.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?s.y:s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?s.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:
|
|
723
|
+
0)+5:s.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(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
|
|
724
|
+
a.tickColor;var b=1===a.ctx.lineWidth%2?(s.y<<0)+0.5:s.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(s.x<<0,b);a.ctx.lineTo(s.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===
|
|
725
|
+
this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(s=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?(s.y<<0)+0.5:s.y<<0,this.ctx.beginPath(),this.ctx.moveTo(s.x<<0,b),this.ctx.lineTo(s.x+this.tickLength<<0,b),this.ctx.stroke()),h&&0!==d++%2&&this.labelAutoFit||(0===this.labelAngle?
|
|
726
|
+
(p.textBlock.y=s.y,p.textBlock.x="inside"===this.labelPlacement?s.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:s.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):s.y,p.textBlock.x="inside"===this.labelPlacement?s.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)-
|
|
727
|
+
("inside"===this.tickPlacement?this.tickLength:0)-5:s.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?s.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):s.y,p.textBlock.x="inside"===this.labelPlacement?s.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:s.x+
|
|
728
|
+
(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(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(s=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(s.y<<
|
|
729
|
+
0)+0.5:s.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(s.x<<0,b);a.ctx.lineTo(s.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}d=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",
|
|
730
|
+
function(){for(m=0;m<a._labels.length;m++)p=a._labels[m],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||h&&0!==d++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||h&&0!==d++%2&&this.labelAutoFit)||p.textBlock.render(!0)};y.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,h,c,b=this.chart.plotArea,
|
|
731
|
+
e=0;h=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)h?(h=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,h.x),b.y1,Math.abs(c.x-h.x),Math.abs(b.y1-b.y2)),h=!1):h=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=
|
|
732
732
|
this.interlacedColor,e=0;e<this._labels.length;e++)h?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),h=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,h.y),Math.abs(b.x1-b.x2),Math.abs(h.y-c.y)),h=!1):h=!0;a.beginPath()};y.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var h=this,c,b,e=0,d=0,n=!1;b=!1;for(var l=[],
|
|
733
733
|
w=[],m=!1,r,e=0;e<this.stripLines.length;e++){var p=this.stripLines[e];p._thicknessType===a&&("pixel"===a&&(p.value<this.viewportMinimum||p.value>this.viewportMaximum||f(p.value)||isNaN(this.range))||"value"===a&&(p.startValue<=this.viewportMinimum&&p.endValue<=this.viewportMinimum||p.startValue>=this.viewportMaximum&&p.endValue>=this.viewportMaximum||f(p.startValue)||f(p.endValue)||isNaN(this.range))||l.push(p))}for(e=0;e<this._stripLineLabels.length;e++)if(p=this.stripLines[e],c=this._stripLineLabels[e],
|
|
734
734
|
!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){p&&(this.ctx.strokeStyle=p.color,this.ctx.lineWidth="pixel"===p._thicknessType?p.thickness:this.tickThickness,f(p.opacity)||"pixel"!==p._thicknessType||(r=p.ctx.globalAlpha,p.ctx.globalAlpha=p.opacity));if("bottom"===this._position){var s=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(s,b.y<<
|
|
@@ -917,7 +917,7 @@ this.chart.height),this.chart.clearedOverlayedCanvas="toolTip"):this.chart.clear
|
|
|
917
917
|
b,Math.min(e.y2,e.y3)),h.lineTo(e.x3-b,Math.min(e.y1,e.y4)),h.stroke(),h.beginPath(),h.moveTo(e.x3-b,Math.max(e.y1,e.y4)),h.lineTo(e.x3-b,Math.max(e.y2,e.y3)),h.stroke(),P(h,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),h.globalAlpha=1):"ohlc"===b.type?(h.globalAlpha=1,h.strokeStyle=e.color,h.lineWidth=2*e.borderThickness,b=0===h.lineWidth%2?0:0.5,h.beginPath(),h.moveTo(e.x3-b,e.y2),h.lineTo(e.x3-b,e.y3),h.stroke(),h.beginPath(),h.moveTo(e.x3,
|
|
918
918
|
e.y1),h.lineTo(e.x1,e.y1),h.stroke(),h.beginPath(),h.moveTo(e.x3,e.y4),h.lineTo(e.x2,e.y4),h.stroke(),h.globalAlpha=1):"boxAndWhisker"===b.type?(h.save(),h.globalAlpha=1,h.strokeStyle=e.stemColor,h.lineWidth=2*e.stemThickness,0<e.stemThickness&&(h.beginPath(),h.moveTo(e.x3,e.y2+e.borderThickness/2),h.lineTo(e.x3,e.y1+e.whiskerThickness/2),h.stroke(),h.beginPath(),h.moveTo(e.x3,e.y4-e.whiskerThickness/2),h.lineTo(e.x3,e.y3-e.borderThickness/2),h.stroke()),h.beginPath(),P(h,e.x1,Math.max(e.y2,e.y3),
|
|
919
919
|
e.x2,Math.min(e.y2,e.y3),"transparent",2*e.borderThickness,e.color,!1,!1,!1,!1),h.globalAlpha=1,h.strokeStyle=e.whiskerColor,h.lineWidth=2*e.whiskerThickness,0<e.whiskerThickness&&(h.beginPath(),h.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y4),h.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y4),h.stroke(),h.beginPath(),h.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y1),h.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y1),h.stroke()),h.globalAlpha=1,h.strokeStyle=e.lineColor,h.lineWidth=2*e.lineThickness,
|
|
920
|
-
0<e.lineThickness&&(h.beginPath(),h.moveTo(e.x1,e.y5),h.lineTo(e.x2,e.y5),h.stroke()),h.restore(),h.globalAlpha=1):"error"===b.type&&
|
|
920
|
+
0<e.lineThickness&&(h.beginPath(),h.moveTo(e.x1,e.y5),h.lineTo(e.x2,e.y5),h.stroke()),h.restore(),h.globalAlpha=1):"error"===b.type&&C(h,e.x1,e.y1,e.x2,e.y2,"white",e.whiskerProperties,e.stemProperties,e.isXYSwapped,0.3))}}h.restore();h.globalAlpha=1;h.beginPath()};ma.prototype.getToolTipInnerHTML=function(a){a=a.entries;var d=null,c=null,b=null,e=0,f="";this.isToolTipDefinedInData=!0;for(var n=0;n<a.length;n++)if(a[n].dataSeries.toolTipContent||a[n].dataPoint.toolTipContent){this.isToolTipDefinedInData=
|
|
921
921
|
!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))a={chart:this.chart,toolTip:this.options,entries:a},d=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var l=null,w="",n=0;n<a.length;n++){c=a[n].dataSeries;b=a[n].dataPoint;e=a[n].index;f="";if(0===n&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?w+="undefined"!==
|
|
922
922
|
typeof this.chart.axisX[0].labels[b.x]?this.chart.axisX[0].labels[b.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(w+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}");w+="</br>";if(!c.visible)continue;w=this.chart.replaceKeywordsWithValue(w,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"===
|
|
923
923
|
c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=l!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+
|
|
@@ -957,7 +957,7 @@ ga.prototype.cancelAllAnimations=function(){this.animations=[];this.animationReq
|
|
|
957
957
|
0,b.width,b.height,e-e*a,0,a*c.canvas.width/ka,c.canvas.height/ka)}},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/ka,b.height/ka);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/ka,c.canvas.height/ka);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*
|
|
958
958
|
(a/=b)*(a-2)+d},easeOutQuart:function(a,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}}},n={drawMarker:function(a,d,c,b,e,f,n,l){if(c){var w=1;c.fillStyle=f?f:"#000000";c.strokeStyle=n?n:"#000000";c.lineWidth=l?l:0;c.setLineDash&&c.setLineDash(U("solid",l));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),f&&c.fill(),l&&(n?c.stroke():(w=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle=
|
|
959
959
|
"black",c.stroke(),c.globalAlpha=w))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),f&&c.fill(),l&&(n?c.stroke():(w=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=w))):"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(),f&&c.fill(),l&&(n?c.stroke():(w=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=w)),c.beginPath()):"cross"===b&&(c.strokeStyle=f,c.lineWidth=e/4,c.beginPath(),
|
|
960
|
-
c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/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];n.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return u}();Ja.version="v3.10.
|
|
960
|
+
c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/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];n.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return u}();Ja.version="v3.10.11 GA";window.CanvasJS&&(Ja&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=Ja);fa.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,culture:"en",
|
|
961
961
|
creditHref:"",creditText:"CanvasJS",exportEnabled:!1,exportFileName:"StockChart",colorSet:"colorSet1",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",navigator:"readWrite",rangeSelector:"readWrite",charts:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}};fa.Navigator={enabled:!0,width:500,height:70,verticalAlign:"bottom",horizontalAlign:"left",dynamicUpdate:!0,backgroundColor:"#fff",
|
|
962
962
|
animationEnabled:!1,animationDuration:1200,theme:"light1",colorSet:"colorSet1",publicProperties:{slider:"readWrite",backgroundColor:"readWrite",animationEnabled:"readWrite",animationDuration:"readWrite",theme:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",colorSet:"readWrite",options:"readWrite",bounds:"readOnly"}};fa.RangeSelector={enabled:!0,width:500,height:35,label:"Range",verticalAlign:"top",horizontalAlign:"center",selectedRangeButtonIndex:null,
|
|
963
963
|
publicProperties:{options:"readWrite",buttons:"readWrite",inputFields:"readWrite",buttonStyle:"readWrite",bounds:"readOnly"}};fa.RangeButton={range:null,rangeType:null,label:null,style:"position: inline; margin: 5px 0;text-align:center;cursor: pointer;",backgroundColorDisabled:"#ddd",publicProperties:{options:"readWrite",bounds:"readOnly"}};fa.ButtonStyle={backgroundColor:"#fff",backgroundColorOnHover:"#2196f3",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:2,labelFontColor:"#000",
|
|
@@ -970,7 +970,7 @@ borderColorOnFocus:"#2196f3",borderThickness:1,fontColor:N,fontSize:14,fontStyle
|
|
|
970
970
|
backgroundColorOnHover:"#FF7372",backgroundColorOnSelect:"#FF7372",borderColor:"#FF7372",borderThickness:1,labelFontColor:N,labelFontColorOnHover:"#F5F5F5",labelFontSize:14,labelFontStyle:"normal",labelFontFamily:u,labelFontWeight:"normal",spacing:0},inputFields:{style:{backgroundColor:"#666666",borderColor:"#FF7372",borderColorOnFocus:"#FF7372",borderThickness:1,fontColor:N,fontSize:14,fontStyle:"normal",fontFamily:u,fontWeight:"normal"}}},navigator:{backgroundColor:L,theme:"dark1",colorSet:"colorSet1",
|
|
971
971
|
slider:{maskColor:"#d9e8f9",maskOpacity:0.6,handleColor:"#efefef",handleBorderColor:"#666666",handleBorderThickness:1,outlineColor:"#FFFFFF",outlineThickness:1}},toolbar:Aa.toolbar};L="#32373A";N=X="#FAFAFA";var Ra={light1:Ga,light2:Ia,dark1:Aa,dark2:{colorSet:"colorSet2",backgroundColor:L,title:ea.title,subtitles:ea.subtitles,charts:[ea],rangeSelector:{buttonStyle:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",backgroundColorOnSelect:"#FF7372",borderColor:"#FF7372",borderThickness:1,
|
|
972
972
|
labelFontColor:N,labelFontColorOnHover:"#F5F5F5",labelFontSize:14,labelFontStyle:"normal",labelFontFamily:u,labelFontWeight:"normal",spacing:0},inputFields:{style:{backgroundColor:"#666666",borderColor:"#FF7372",borderColorOnFocus:"#FF7372",borderThickness:1,fontColor:N,fontSize:14,fontStyle:"normal",fontFamily:u,fontWeight:"normal"}}},navigator:{backgroundColor:L,theme:"dark2",colorSet:"colorSet2",slider:{maskColor:"#d9e8f9",maskOpacity:0.6,handleColor:"#efefef",handleBorderColor:"#666666",handleBorderThickness:1,
|
|
973
|
-
outlineColor:"#FFFFFF",outlineThickness:1}},toolbar:ea.toolbar}};X=Sa.StockChart=function(){function l(d){var f;f=document.createElement("div");f.setAttribute("class",d);Q(f,{position:"absolute",textAlign:"left",cursor:"auto",webkitTapHighlightColor:"transparent"});return f}function
|
|
973
|
+
outlineColor:"#FFFFFF",outlineThickness:1}},toolbar:ea.toolbar}};X=Sa.StockChart=function(){function l(d){var f;f=document.createElement("div");f.setAttribute("class",d);Q(f,{position:"absolute",textAlign:"left",cursor:"auto",webkitTapHighlightColor:"transparent"});return f}function C(d,l,q){d=document.createElement(d);d.setAttribute("class",l);Q(d,{webkitTapHighlightColor:"transparent"});f(q)||d.setAttribute("type",q);return d}function q(d,l){l=l||{};this.theme=f(l.theme)||f(Qa[l.theme])?"light1":
|
|
974
974
|
l.theme;this.predefinedThemes=Ra;q.base.constructor.call(this,"StockChart",null,l,null,null);this.optionsName="stockChart";var E=this;this.sessionVariables={};this._axisXMax=this._axisXMin=null;this._containerId=d;this._objectsInitialized=!1;this.ctx=null;this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];this.allDOMEventHandlers=[];if(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId){this.container.innerHTML=
|
|
975
975
|
"";var n=0,a=0;this._defaultCursor="default";n=this.options.width?this.width:0<this.container.clientWidth?this.container.clientWidth:this.width;a=this.options.height?this.height:0<this.container.clientHeight?this.container.clientHeight:this.height;this.width=n;this.height=a;this.x1=this.y1=0;this.x2=this.width;this.y2=this.height;this.selectedColorSet="undefined"!==typeof pa[this.colorSet]?pa[this.colorSet]:pa.colorSet1;this._canvasJSContainer=document.createElement("div");this._canvasJSContainer.setAttribute("class",
|
|
976
976
|
"canvasjs-stock-container");this._canvasJSContainer.style.position="relative";this._canvasJSContainer.style.userSelect=this._canvasJSContainer.style.WebkitUserSelect=this._canvasJSContainer.style.MozUserSelect=this._canvasJSContainer.style.msUserSelect="none";this._canvasJSContainer.style.textAlign="left";this._canvasJSContainer.style.cursor="auto";this._canvasJSContainer.style.direction="ltr";this._canvasJSContainer.style.fontFamily=u;v||(this._canvasJSContainer.style.height="0px");this.container.appendChild(this._canvasJSContainer);
|
|
@@ -981,7 +981,7 @@ z(this.overlaidCanvas,"mouseout",function(a){E._mouseEventHandler(a)},this.allDO
|
|
|
981
981
|
this.allDOMEventHandlers),z(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){E._touchEventHandler(a)},this.allDOMEventHandlers),this.windowResizeHandler=z(window,"resize",function(){E._updateSize()&&E.render()},this.allDOMEventHandlers))}else window.console&&window.console.log('CanvasJS Error: StockChart Container with id "'+this._containerId+'" was not found')}function L(d,f){L.base.constructor.call(this,d,f);this.options=f;this.dockInsidePlotArea=
|
|
982
982
|
!1}function I(d,f,l){I.base.constructor.call(this,d,f,l);this.options=f;this.dockInsidePlotArea=!1}function N(d){this.stockChart=d;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.ghostCanvas=sa(this.stockChart.width,this.stockChart.height);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function y(d,f){y.base.constructor.call(this,"Navigator","navigator",f,null,d);this.optionsName="navigator";this.parent=this.stockChart=d}function U(d,
|
|
983
983
|
f){U.base.constructor.call(this,"Slider","slider",f,null,d);this.panel=l("canvasjs-slider-panel");this.parent=this.navigator=d;this.stockChart=d.stockChart;this.navigator.panel.appendChild(this.panel);this.optionsName="slider";this.panMode=!1;this.sessionVariables={}}function V(d,f){V.base.constructor.call(this,"RangeSelector","rangeSelector",f,null,d);this.parent=this.stockChart=d;this.optionsName="rangeSelector";this.sessionVariables={};this.ctx=d.ctx}function O(d,f,l){O.base.constructor.call(this,
|
|
984
|
-
"RangeButton","rangeButton",l,f,d.rangeSelector);this.stockChart=d;this.parent=this.rangeSelector=d.rangeSelector;this.optionsName="rangeButton";this.enabled=!1;this.state="off"}function X(d,l){X.base.constructor.call(this,"InputFields","inputFields",l,null,d.rangeSelector);this.stockChart=d;this.parent=this.rangeSelector=d.rangeSelector;this.elements=[];this._textBlocks=[];this.sessionVariables={};this.optionsName="inputFields";this.elements.push(
|
|
984
|
+
"RangeButton","rangeButton",l,f,d.rangeSelector);this.stockChart=d;this.parent=this.rangeSelector=d.rangeSelector;this.optionsName="rangeButton";this.enabled=!1;this.state="off"}function X(d,l){X.base.constructor.call(this,"InputFields","inputFields",l,null,d.rangeSelector);this.stockChart=d;this.parent=this.rangeSelector=d.rangeSelector;this.elements=[];this._textBlocks=[];this.sessionVariables={};this.optionsName="inputFields";this.elements.push(C("input","canvasjs-input-field","text"));this.elements.push(C("input",
|
|
985
985
|
"canvasjs-input-field","text"));for(var q=0;q<this.elements.length;q++)this.stockChart._canvasJSContainer.appendChild(this.elements[q]);var n=this,a=null,h=null;z(this.elements[0],"focus",function(){n.enabled&&(n.elements[0].focused=!0,P(n._textBlocks[0].ctx,n._textBlocks[0].x-n._textBlocks[0].borderThickness/2-0.5,n._textBlocks[0].bounds.y1-n._textBlocks[0].borderThickness/2-0.5,n._textBlocks[0].bounds.x2+n._textBlocks[0].borderThickness/2+1,n._textBlocks[0].bounds.x2+n._textBlocks[0].borderThickness/
|
|
986
986
|
2+1,n.stockChart.backgroundColor,0,"transparent",!1,!1,!1,!1),n._textBlocks[0].borderColor=n.style.borderColorOnFocus,n._textBlocks[0].fontColor="transparent",n._textBlocks[0].render(!0))},this.rangeSelector.stockChart.allDOMEventHandlers);z(this.elements[0],"focusout",function(){if(n.enabled){n.elements[0].focused=!1;var a;n.stockChart.charts&&n.stockChart.charts.length&&(a=n.stockChart.charts[0].axisX&&n.stockChart.charts[0].axisX.length?n.stockChart.charts[0].axisX[0]:n.stockChart.charts[0].axisX2[0]);
|
|
987
987
|
this.value="dateTime"===n.valueType?ra(a?a.viewportMinimum:null,"YYYY-MM-DD",n.stockChart._cultureInfo):ba(a?a.viewportMinimum:null,n.valueFormatString,n.stockChart._cultureInfo);this.style.display="none";P(n._textBlocks[0].ctx,n._textBlocks[0].x-n._textBlocks[0].borderThickness/2-0.5,n._textBlocks[0].bounds.y1-n._textBlocks[0].borderThickness/2-0.5,n._textBlocks[0].bounds.x2+n._textBlocks[0].borderThickness/2+1,n._textBlocks[0].bounds.x2+n._textBlocks[0].borderThickness/2+1,n.stockChart.backgroundColor,
|
|
@@ -1036,8 +1036,8 @@ this.navigator.chart.colorSet,this.navigator.chart.selectedColorSet="undefined"!
|
|
|
1036
1036
|
this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0];e&&(e.bounds&&e.bounds.x1>this._chartsPlotAreaX1)&&(this._chartsPlotAreaX1=e.bounds.x1);this.navigator.width=this.navigator.chart.width=this.navigator.slider.fullWidth=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+(e&&e.bounds?e.bounds.x1:0);this.navigator.panel.style.left=this._chartsPlotAreaX1+this.layoutManager.getFreeSpace().x1-(e&&e.bounds?e.bounds.x1:0)+"px";this.navigator.panel.style.width=
|
|
1037
1037
|
this.navigator.chart.panel.style.width=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+(e&&e.bounds?e.bounds.x1:0)+"px";0<this.navigator.height&&this.navigator.chart.render(this.navigator._chartOptions);d=xa("backgroundColor animationEnabled animationDuration theme axisX axisX2 axisY axisY2 data".split(" "));for(var k in this.navigator.chart)0<=d.indexOf(k)&&(this.navigator[k]=this.navigator.chart[k]=f(this.navigator.chart.options[k])?this[k]||
|
|
1038
1038
|
null:this.navigator.chart[k])}}u=k=null;var b=0,h=a=null,n={},y,z;for(d=0;d<this.charts.length;d++)for(c=this.charts[d].axisX&&this.charts[d].axisX.length?this.charts[d].axisX:this.charts[d].axisX2,k=k||(c&&0<c.length?c[0].minimum:null),u=u||(c&&0<c.length?c[0].maximum:null),b=0;b<c.length;b++)e=c[b],e.minimum<k&&(k=e.minimum),e.maximum>u&&(u=e.maximum),f(e.options.viewportMinimum)||(this._axisXMin=y=e.options.viewportMinimum,n.minimum="chart"),f(e.options.viewportMaximum)||(this._axisXMax=z=e.options.viewportMaximum,
|
|
1039
|
-
n.maximum="chart");var
|
|
1040
|
-
this.navigator.slider.maximum=Math.min(
|
|
1039
|
+
n.maximum="chart");var C;this.navigator&&(this.navigator.enabled&&this.navigator.chart&&ga)&&(C=this.navigator.chart.axisX&&0<this.navigator.chart.axisX.length?this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0],f(this.navigator.options.slider)||f(this.navigator.options.slider.minimum)||(this._axisXMin=this.navigator.slider.minimum=Math.max(C.minimum,this.navigator.slider.minimum),n.minimum="navigator"),f(this.navigator.options.slider)||f(this.navigator.options.slider.maximum)||(this._axisXMax=
|
|
1040
|
+
this.navigator.slider.maximum=Math.min(C.maximum,this.navigator.slider.maximum),n.maximum="navigator"));if(this.rangeSelector&&this.rangeSelector.enabled){b=C?C.maximum-C.minimum:u-k;this._selectedRangeButtonIndex=this.navigator.slider&&!f(this.navigator.slider.options.minimum)||this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)||!this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")?this._selectedRangeButtonIndex:this.rangeSelector.selectedRangeButtonIndex;
|
|
1041
1041
|
f(this._selectedRangeButtonIndex)||(this.rangeSelector.buttons[this._selectedRangeButtonIndex].state="on");this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")||(this.navigator.slider&&(this.navigator.slider.hasOptionChanged("minimum")||this.navigator.slider.hasOptionChanged("maximum"))?this._selectedRangeButtonIndex=null:(!this.navigator.slider||f(this.navigator.slider.options.maximum))&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")||
|
|
1042
1042
|
(!this.navigator.slider||f(this.navigator.slider.options.minimum))&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("startValue")?this._selectedRangeButtonIndex=null:this.navigator.slider&&!f(this.navigator.slider.options.maximum)||(this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)||z===this._prevViewportMaximum)||(this._selectedRangeButtonIndex=null));this.charts&&this.charts.length&&(e=this.charts[0].axisX&&this.charts[0].axisX.length?
|
|
1043
1043
|
this.charts[0].axisX[0]:this.charts[0].axisX2[0]);for(d=0;d<this.rangeSelector.buttons.length;d++){c=null;var m=this.rangeSelector.buttons[d];-1!==xa("year month week day hour minute second millisecond number".split(" ")).indexOf(m.rangeType)?c=m.range*Y[m.rangeType+"Duration"]:"ytd"===m.rangeType?c="ytd":"all"===m.rangeType&&(c=null);if("ytd"===m.rangeType||0!==c&&c<b)m.enabled=!0;m.mousemove=function(a){P(w.rangeSelector.ctx,w.rangeSelector.buttons[0].bounds.x1-w.rangeSelector.buttonStyle.borderThickness/
|
|
@@ -1053,8 +1053,8 @@ new Date(h.viewportMaximum),c.setDate(1),c.setMonth(0),b=c.getTime(),c=Math.max(
|
|
|
1053
1053
|
(h.viewportMaximum-b):0,d=h.viewportMaximum+k>h.maximum?h.maximum:h.viewportMaximum+k);w._rangeEventParameter={stockChart:w,source:"buttons",index:this._index,minimum:Math.min(c,d),maximum:Math.max(c,d)};"on"!=this.state&&(w._rangeEventParameter.type="rangeChanging",w.dispatchEvent("rangeChanging",w._rangeEventParameter,w),w._syncCharts(c,d),w.sessionVariables._axisXMin=c,w.sessionVariables._axisXMax=d,w._rangeEventParameter.type="rangeChanged",w.dispatchEvent("rangeChanged",w._rangeEventParameter,
|
|
1054
1054
|
w),this.state="on");this.textBlock.fontWeight="bold";this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover;this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect;this.textBlock.render(!0);w.rangeUpdatedBy="rangeButton";w.rangeSelector.sessionVariables._clickedRangeButtonIndex=this._index}};if(m.enabled){m.cursor=this.rangeSelector.buttonStyle.cursor;this.rangeSelector.sessionVariables._clickedRangeButtonIndex===d&&(m.textBlock.fontWeight=
|
|
1055
1055
|
"bold",m.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,m.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect);if("on"===m.state&&"navigator"!==n.minimum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.startValue))&&!f(this._selectedRangeButtonIndex)){f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&("on"===m.state&&"navigator"!==n.minimum)&&(m.textBlock.fontWeight="bold",m.textBlock.fontColor=
|
|
1056
|
-
this.rangeSelector.buttonStyle.labelFontColorOnHover,m.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect);if("ytd"===m.rangeType&&e)a=new Date(e.viewportMaximum),a.setDate(1),a.setMonth(0),a=a.getTime();else if(f(c))
|
|
1057
|
-
this.rangeSelector.inputFields.options.endValue:f(e.options.viewportMaximum)?e.viewportMaximum:e.options.viewportMaximum,m>(
|
|
1056
|
+
this.rangeSelector.buttonStyle.labelFontColorOnHover,m.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect);if("ytd"===m.rangeType&&e)a=new Date(e.viewportMaximum),a.setDate(1),a.setMonth(0),a=a.getTime();else if(f(c))C?(a=C.minimum,h=C.maximum):e&&(a=e.minimum,h=e.maximum),"chart"===n.maximum&&(n.maximum="rangeButton");else if(m="navigator"===n.maximum?this.navigator.slider.maximum:this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)?
|
|
1057
|
+
this.rangeSelector.inputFields.options.endValue:f(e.options.viewportMaximum)?e.viewportMaximum:e.options.viewportMaximum,m>(C?C.maximum:e.maximum)&&(m=C?C.maximum:e.maximum),m-c<(C?C.minimum:e.minimum)){if("navigator"!==n.maximum&&f(this.rangeSelector.inputFields.options.endValue))"chart"===n.maximum&&(n.maximum="rangeButton");else{this._selectedRangeButtonIndex=null;continue}h=C?C:e;c=h.minimum-(m-c);a=h.minimum;h=Math.min(h.maximum,("dateTime"===h.valueType&&"object"===typeof m?m.getTime():m)+c)}else a=
|
|
1058
1058
|
m-c,h=m;n.minimum="rangeButton";n.maximum=f(n.maximum)||"chart"===n.maximum&&f(e.options.viewportMaximum)?"rangeButton":n.maximum}this._axisXMin="rangeButton"===n.minimum&&(f(this._axisXMin)||this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex"))?a:this._axisXMin;this._axisXMax="rangeButton"===n.maximum&&(f(this._axisXMax)||this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex"))?h:this._axisXMax}else m.cursor="not-allowed"}if(this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled){this.rangeSelector.inputFields.valueType=
|
|
1059
1059
|
this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueType?this.options.rangeSelector.inputFields.valueType:this.isDateTime?"dateTime":"number";for(d=0;d<this.rangeSelector.inputFields._textBlocks.length;d++)e=this.rangeSelector.inputFields._textBlocks[d],e.mousemove=function(a){w.rangeSelector&&w.rangeSelector.inputFields&&!w.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},e.mouseover=
|
|
1060
1060
|
function(a){w.rangeSelector&&w.rangeSelector.inputFields&&!w.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},e.mouseout=function(a){w.rangeSelector&&w.rangeSelector.inputFields&&!w.rangeSelector.inputFields.enabled||(a.inputField.cursor="auto")},e.click=function(a){w.rangeSelector&&w.rangeSelector.inputFields&&!w.rangeSelector.inputFields.enabled||(a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].style.display="inline",
|
|
@@ -1068,14 +1068,14 @@ this.options.rangeSelector.inputFields.valueFormatString:"#,##0.##",this.rangeSe
|
|
|
1068
1068
|
this.rangeSelector.inputFields.hasOptionChanged("endValue")&&"navigator"!==n.maximum?this.rangeUpdatedBy="rangeButton"===n.minimum?"rangeButton":"inputFields":this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&(this.rangeUpdatedBy="rangeButton");"rangeButton"!==this.rangeUpdatedBy&&this.rangeSelector.resetRangeButtons()}if(f(this._axisXMin)||f(n.minimum))this._axisXMin=k;if(f(this._axisXMax)||f(n.maximum))this._axisXMax=u;if(f(this._initialAxisXMin)||f(n.minimum))this._initialAxisXMin=
|
|
1069
1069
|
this._axisXMin;if(f(this._initialAxisXMax)||f(n.maximum))this._initialAxisXMax=this._axisXMax;y!==this._prevViewportMinimum&&(this._prevViewportMinimum=y,"chart"===n.minimum&&(this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin));z!==this._prevViewportMaximum&&(this._prevViewportMaximum=z,"chart"===n.maximum&&(this.sessionVariables._axisXMax=this._initialAxisXMax=this._axisXMax));this.rangeSelector.enabled&&this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&"navigator"!==
|
|
1070
1070
|
n.minimum&&"inputFields"!==n.minimum?(this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin,this.sessionVariables._axisXMax=this._initialAxisXMax=this._axisXMax):(this._axisXMin=f(this.sessionVariables._axisXMin)||this.navigator.enabled&&(!this.navigator.slider||this.navigator.slider.hasOptionChanged("minimum"))||this.rangeSelector.enabled&&"navigator"!==n.minimum&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("startValue")?this._axisXMin:this.sessionVariables._axisXMin,
|
|
1071
|
-
this._axisXMax=f(this.sessionVariables._axisXMax)||this.navigator.enabled&&(!this.navigator.slider||this.navigator.slider.hasOptionChanged("maximum"))||this.rangeSelector.enabled&&"navigator"!==n.maximum&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")?this._axisXMax:this.sessionVariables._axisXMax);this.rangeSelector.
|
|
1072
|
-
this.rangeSelector.options.selectedRangeButtonIndex)
|
|
1073
|
-
(this.navigator&&this.navigator.slider&&!f(this.navigator.slider.options.maximum)?this.sessionVariables._axisXMax=this._initialAxisXMax=this._axisXMax:this.sessionVariables._axisXMax=this._initialAxisXMax=this.rangeSelector.inputFields.options.endValue,this.rangeSelector.inputFields.sessionVariables.endValue=this.rangeSelector.inputFields.options.endValue));if(!f(
|
|
1074
|
-
this.navigator.slider.sessionVariables.minimum=this.navigator.slider.minimum=this.navigator.slider.options.minimum);this.navigator.slider.hasOptionChanged("maximum")&&!f(this.navigator.slider.options.maximum)&&(this.sessionVariables._axisXMax=this._initialAxisXMax=this.navigator.slider.sessionVariables.maximum=this.navigator.slider.maximum=this.navigator.slider.options.maximum);if(this._initialAxisXMin<
|
|
1075
|
-
this._initialAxisXMin;if(this._initialAxisXMax<
|
|
1076
|
-
this._syncCharts(this._axisXMax,this._axisXMin):this._syncCharts(this._axisXMin,this._axisXMax)};q.prototype.setChartsLayout=function(){var d,f,l=0,n=this.width;this.isPlotAreaSet=this.isDateTime=!1;for(var a=0;a<this.charts.length;a++){d=this.charts[a];d._initialize();d.setLayout();f={};if((d.axisX[0]||d.axisX2[0])&&(d.axisY[0]||d.axisY2[0])){var h=d.axisX[0]?d.axisX[0].lineCoordinates:d.axisX2[0].lineCoordinates;if(d.axisY&&0<d.axisY.length&&d.axisY[0]){var c=d.axisY[0];
|
|
1077
|
-
f.x2=h.x2>c.lineCoordinates.x2?h.x2:c.lineCoordinates.x2}d.axisY2&&0<d.axisY2.length&&d.axisY2[0]&&(c=d.axisY2[0],f.x1=h.x1<h.x2?h.x1:c.lineCoordinates.x1,f.x2=h.x2>c.lineCoordinates.x2?h.x2:c.lineCoordinates.x2)}for(h=0;h<d.data.length;h++)"dateTime"===d.data[h].xValueType&&(this.isDateTime=!0);l=Math.max(l,f.x1);n=Math.min(n,f.x2);d.sessionVariables.plotAreaBounds=f}this._chartsPlotAreaX1=l;this._chartsPlotAreaX2=n};q.prototype._updateSize=function(){return jb.call(this,
|
|
1078
|
-
q.prototype._syncCharts=function(d,l){for(var q=this,n=null,a=Math.min(d,l),h=Math.max(d,l),c=0;c<this.charts.length;c++){n=this.charts[c];n.toolTip&&(isNaN(n.toolTip._prevX)||isNaN(n.toolTip._prevY))&&n.toolTip.hide();for(var b=0;b<n.axisX.length;b++)n.axisX[b].setViewPortRange(d,l),n.axisX[b].options.labelAngle=f(n.axisX[b].options.labelAngle)?0:n.axisX[b].options.labelAngle,this.charts[c].axisX[b].crosshair&&this.charts[c].axisX[b].crosshair.enabled&&(this.charts[c].axisX[b].crosshair.options.updated||
|
|
1071
|
+
this._axisXMax=f(this.sessionVariables._axisXMax)||this.navigator.enabled&&(!this.navigator.slider||this.navigator.slider.hasOptionChanged("maximum"))||this.rangeSelector.enabled&&"navigator"!==n.maximum&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")?this._axisXMax:this.sessionVariables._axisXMax);this.rangeSelector.enabled&&this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&(this.rangeSelector.sessionVariables.selectedRangeButtonIndex=
|
|
1072
|
+
this.rangeSelector.options.selectedRangeButtonIndex);this.rangeSelector.inputFields.enabled&&(this.rangeSelector.inputFields.hasOptionChanged("startValue")&&(this.navigator&&this.navigator.slider&&!f(this.navigator.slider.options.minimum)?this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin:this.sessionVariables._axisXMin=this._initialAxisXMin=this.rangeSelector.inputFields.options.startValue,this.rangeSelector.inputFields.sessionVariables.startValue=this.rangeSelector.inputFields.options.startValue),
|
|
1073
|
+
this.rangeSelector.inputFields.hasOptionChanged("endValue")&&(this.navigator&&this.navigator.slider&&!f(this.navigator.slider.options.maximum)?this.sessionVariables._axisXMax=this._initialAxisXMax=this._axisXMax:this.sessionVariables._axisXMax=this._initialAxisXMax=this.rangeSelector.inputFields.options.endValue,this.rangeSelector.inputFields.sessionVariables.endValue=this.rangeSelector.inputFields.options.endValue));if(!f(C)){this.navigator.slider.hasOptionChanged("minimum")&&!f(this.navigator.slider.options.minimum)&&
|
|
1074
|
+
(this.sessionVariables._axisXMin=this._initialAxisXMin=this.navigator.slider.sessionVariables.minimum=this.navigator.slider.minimum=this.navigator.slider.options.minimum);this.navigator.slider.hasOptionChanged("maximum")&&!f(this.navigator.slider.options.maximum)&&(this.sessionVariables._axisXMax=this._initialAxisXMax=this.navigator.slider.sessionVariables.maximum=this.navigator.slider.maximum=this.navigator.slider.options.maximum);if(this._initialAxisXMin<C.minimum||this._initialAxisXMin>C.maximum)this._initialAxisXMin=
|
|
1075
|
+
isFinite(C.minimum)?C.minimum:this._initialAxisXMin;if(this._initialAxisXMax<C.minimum||this._initialAxisXMax>C.maximum)this._initialAxisXMax=isFinite(C.maximum)?C.maximum:this._initialAxisXMax;if(this._axisXMin<C.minimum||this._axisXMin>C.maximum)this._axisXMin=C.minimum;if(this._axisXMax<C.minimum||this._axisXMax>C.maximum)this._axisXMax=C.maximum;n&&(f(n.minimum)&&f(this.sessionVariables._axisXMin))&&(this._axisXMin=C.minimum);n&&(f(n.maximum)&&f(this.sessionVariables._axisXMax))&&(this._axisXMax=
|
|
1076
|
+
C.maximum)}!f(C)&&C.reversed?this._syncCharts(this._axisXMax,this._axisXMin):this._syncCharts(this._axisXMin,this._axisXMax)};q.prototype.setChartsLayout=function(){var d,f,l=0,n=this.width;this.isPlotAreaSet=this.isDateTime=!1;for(var a=0;a<this.charts.length;a++){d=this.charts[a];d._initialize();d.setLayout();f={};if((d.axisX[0]||d.axisX2[0])&&(d.axisY[0]||d.axisY2[0])){var h=d.axisX[0]?d.axisX[0].lineCoordinates:d.axisX2[0].lineCoordinates;if(d.axisY&&0<d.axisY.length&&d.axisY[0]){var c=d.axisY[0];
|
|
1077
|
+
f.x1=h.x1<h.x2?h.x1:c.lineCoordinates.x1;f.x2=h.x2>c.lineCoordinates.x2?h.x2:c.lineCoordinates.x2}d.axisY2&&0<d.axisY2.length&&d.axisY2[0]&&(c=d.axisY2[0],f.x1=h.x1<h.x2?h.x1:c.lineCoordinates.x1,f.x2=h.x2>c.lineCoordinates.x2?h.x2:c.lineCoordinates.x2)}for(h=0;h<d.data.length;h++)"dateTime"===d.data[h].xValueType&&(this.isDateTime=!0);l=Math.max(l,f.x1);n=Math.min(n,f.x2);d.sessionVariables.plotAreaBounds=f}this._chartsPlotAreaX1=l;this._chartsPlotAreaX2=n};q.prototype._updateSize=function(){return jb.call(this,
|
|
1078
|
+
[this.canvas,this.overlaidCanvas])};q.prototype._syncCharts=function(d,l){for(var q=this,n=null,a=Math.min(d,l),h=Math.max(d,l),c=0;c<this.charts.length;c++){n=this.charts[c];n.toolTip&&(isNaN(n.toolTip._prevX)||isNaN(n.toolTip._prevY))&&n.toolTip.hide();for(var b=0;b<n.axisX.length;b++)n.axisX[b].setViewPortRange(d,l),n.axisX[b].options.labelAngle=f(n.axisX[b].options.labelAngle)?0:n.axisX[b].options.labelAngle,this.charts[c].axisX[b].crosshair&&this.charts[c].axisX[b].crosshair.enabled&&(this.charts[c].axisX[b].crosshair.options.updated||
|
|
1079
1079
|
(this.charts[c].axisX[b].crosshair.options.updated=function(a){for(var b=0;b<q.charts.length;b++)if(q.charts[b]!=a.chart)for(var c=0;c<q.charts[b].axisX.length;c++)q.charts[b].axisX[c].crosshair&&q.charts[b].axisX[c].crosshair.showAt(a.value)}),this.charts[c].axisX[b].crosshair.options.hidden||(this.charts[c].axisX[b].crosshair.options.hidden=function(a){for(var b=0;b<q.charts.length;b++)if(q.charts[b]!=a.chart)for(var c=0;c<q.charts[b].axisX.length;c++)q.charts[b].axisX[c].crosshair&&q.charts[b].axisX[c].crosshair.hide()}));
|
|
1080
1080
|
for(b=0;b<n.axisX2.length;b++)n.axisX2[b].setViewPortRange(d,l),n.axisX2[b].options.labelAngle=f(n.axisX2[b].options.labelAngle)?0:n.axisX2[b].options.labelAngle,this.charts[c].axisX2[b].crosshair&&this.charts[c].axisX2[b].crosshair.enabled&&(this.charts[c].axisX2[b].crosshair.options.updated||(this.charts[c].axisX2[b].crosshair.options.updated=function(a){for(var b=0;b<q.charts.length;b++)if(q.charts[b]!=a.chart)for(var c=0;c<q.charts[b].axisX2.length;c++)q.charts[b].axisX2[c].crosshair&&q.charts[b].axisX2[c].crosshair.showAt(a.value)}),
|
|
1081
1081
|
this.charts[c].axisX2[b].crosshair.options.hidden||(this.charts[c].axisX2[b].crosshair.options.hidden=function(a){for(var b=0;b<q.charts.length;b++)if(q.charts[b]!=a.chart)for(var c=0;c<q.charts[b].axisX2.length;c++)q.charts[b].axisX2[c].crosshair&&q.charts[b].axisX2[c].crosshair.hide()}));n._initialize();n.setLayout();n.panEnabled=n.options.zoomEnabled&&n.zoomEnabled?!1:!0;n.renderElements();(f(this.charts[c].options.toolTip)||!f(this.charts[c].options.toolTip)&&f(this.charts[c].options.toolTip.updated))&&
|
|
@@ -1129,9 +1129,9 @@ q=q.convertPixelToValue(parseFloat(l)+parseFloat(c)),d.stockChart.sessionVariabl
|
|
|
1129
1129
|
d.stockChart),d.stockChart._syncCharts(n,q),d.stockChart._rangeEventParameter.type="rangeChanged",d.stockChart.dispatchEvent("rangeChanged",d.stockChart._rangeEventParameter,d.stockChart)):d.navigator._updateSlider(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax),d.panMode||(d.stockChart.rangeUpdatedBy="navigator")))}}else d.navigator.chart.overlaidCanvas.style.cursor=d.navigator.chart.container.style.cursor=d.navigator.panel.style.cursor="auto"},this.navigator.stockChart.allDOMEventHandlers);
|
|
1130
1130
|
z(this.navigator.stockChart.container,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(f){d.stockChart._touchEventHandler(f)},this.navigator.stockChart.allDOMEventHandlers)};U.prototype._initialize=function(){var d=this,l;this.options=this.stockChart.navigator&&this.stockChart.navigator.options&&this.stockChart.navigator.options.slider?this.stockChart.navigator.options.slider:{_isPlaceholder:!0};this._updateOptions();ga&&(this.eventsAttached||(this._attachEvents(),this.eventsAttached=
|
|
1131
1131
|
!0),this.handleWidth=this.options.handleWidth?this.handleWidth:8,this.handleHeight=this.options.handleHeight?Math.min(this.navigator.height,this.options.handleHeight):0.25*this.navigator.height,this.leftHandle?Q(this.leftHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",left:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",padding:0,backgroundColor:"white",
|
|
1132
|
-
filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",zIndex:999}):(this.leftHandle=
|
|
1132
|
+
filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",zIndex:999}):(this.leftHandle=C("button","canvasjs-slider-handle","button"),this.leftHandle.innerHTML="||",Q(this.leftHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",left:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",
|
|
1133
1133
|
outline:"none",padding:0,backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",zIndex:999}),this.panel.appendChild(this.leftHandle),this.initHandle(this.leftHandle,1)),this.rightHandle?Q(this.rightHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",right:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+
|
|
1134
|
-
"px",borderColor:"transparent",outline:"none",padding:"0px",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",zIndex:"999"}):(this.rightHandle=
|
|
1134
|
+
"px",borderColor:"transparent",outline:"none",padding:"0px",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",zIndex:"999"}):(this.rightHandle=C("button","canvasjs-slider-handle","button"),this.rightHandle.innerHTML="||",Q(this.rightHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",right:"-"+(this.handleWidth/
|
|
1135
1135
|
2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",padding:"0px",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",zIndex:"999"}),this.panel.appendChild(this.rightHandle),this.initHandle(this.rightHandle,-1)),Q(this.panel,{position:"absolute",height:this.navigator.height+
|
|
1136
1136
|
"px",left:0,width:"100%",cursor:"move",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0}),this.fullWidth=this.panel.clientWidth,this._left=this.navigator.panel.offsetLeft,z(document,"mousedown",function(f){if(d.stockChart.rangeSelector&&d.stockChart.rangeSelector.inputFields&&d.stockChart.rangeSelector.inputFields.enabled)for(var l=0;l<d.stockChart.rangeSelector.inputFields.elements.length;l++)f.target!=d.stockChart.rangeSelector.inputFields.elements[l]&&d.stockChart.rangeSelector.inputFields.elements[l].focused&&
|
|
1137
1137
|
d.stockChart.rangeSelector.inputFields.elements[l].blur()},this.navigator.stockChart.allDOMEventHandlers),z(document,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(d){a:{var f=d.changedTouches,f=f?f[0]:d,a="";switch(d.type){case "touchstart":case "MSPointerDown":a="mousedown";break;case "touchmove":case "MSPointerMove":a="mousemove";break;case "touchend":case "MSPointerUp":a="mouseup";break;default:break a}d=document.createEvent("MouseEvent");d.initMouseEvent(a,!0,!0,window,
|
|
@@ -1173,7 +1173,7 @@ null:q[d];this.rangeType="undefined"!==typeof this.options.rangeType?this.rangeT
|
|
|
1173
1173
|
0)+"px",this.elements[d].style.paddingRight=(this.style.padding.right||0)+"px",this.elements[d].style.paddingBottom=(this.style.padding.bottom||0)+"px",this.elements[d].style.paddingLeft=(this.style.padding.left||0)+"px"):this.elements[d].style.padding=this.style.padding+"px",this.elements[d].style.mozAppearance=this.elements[d].style.webkitAppearance=this.elements[d].style.appearance="none",this.elements[d].style.webkitBorderRadius=0,this.elements[d].style.mozBorderRadius=0,this.elements[d].style.borderRadius=
|
|
1174
1174
|
0,this.elements[d].style.boxSizing="content-box";this.parent=this.rangeSelector=this.stockChart.rangeSelector}};ia(ea,W);ea.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("backgroundColorOnHover");this.updateOption("backgroundColorOnSelect");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("labelFontColor");this.updateOption("labelFontColorOnHover");this.updateOption("labelFontSize");this.updateOption("labelFontStyle");
|
|
1175
1175
|
this.updateOption("labelFontFamily");this.updateOption("labelFontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};ia(fa,W);fa.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("borderColorOnFocus");this.updateOption("fontColor");this.updateOption("fontSize");this.updateOption("fontStyle");
|
|
1176
|
-
this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return q}();X.version="v1.10.
|
|
1176
|
+
this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return q}();X.version="v1.10.11 GA";window.CanvasJS&&(X&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=X),X&&!window.CanvasJS.Chart&&(window.CanvasJS.Chart=Ja,window.CanvasJS.StockChart=X))})();
|
|
1177
1177
|
|
|
1178
1178
|
/*
|
|
1179
1179
|
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.
|