@canvasjs/charts 3.15.8 → 3.15.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/canvasjs.min.js +619 -619
- package/package.json +1 -1
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.15.
|
|
2
|
+
CanvasJS Chart - v3.15.12 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2026 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -17,31 +17,31 @@
|
|
|
17
17
|
/*tslint:disable*/
|
|
18
18
|
/*eslint-disable*/
|
|
19
19
|
/*jshint ignore:start*/
|
|
20
|
-
(function(){function ra(n,
|
|
21
|
-
1*
|
|
22
|
-
t,l,n+t,l+pa);this.lineTo(n+t,l+X-pa);this.quadraticCurveTo(n+t,l+X,n+t-pa,l+X);this.lineTo(n+pa,l+X);this.quadraticCurveTo(n,l+X,n,l+X-pa);this.lineTo(n,l+pa);this.quadraticCurveTo(n,l,n+pa,l);this.closePath();s&&this.fill();
|
|
23
|
-
0,t=Number(
|
|
24
|
-
document.createTextNode("Mpgyi");ta.appendChild(z);pa.appendChild(ta)}ta.style.display="";Q(ta,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:n,fontSize:
|
|
25
|
-
dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[n||"solid"])for(var t=0;t<l.length;t++)l[t]*=
|
|
26
|
-
|
|
27
|
-
L(n._menuButton,"touchstart",function(n){
|
|
28
|
-
Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},n.allDOMEventHandlers,!0);L(n._menuButton,"mouseout",function(){
|
|
29
|
-
{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor,boxShadow:"2px 2px 10px "+l});for(var l=n._dropdownMenu.childNodes,
|
|
20
|
+
(function(){function ra(n,B){n.prototype=fb(B.prototype);n.prototype.constructor=n;n.base=B.prototype}function fb(n){function B(){}B.prototype=n;return new B}function Ta(n,B,l){"millisecond"===l?n.setMilliseconds(n.getMilliseconds()+1*B):"second"===l?n.setSeconds(n.getSeconds()+1*B):"minute"===l?n.setMinutes(n.getMinutes()+1*B):"hour"===l?n.setHours(n.getHours()+1*B):"day"===l?n.setDate(n.getDate()+1*B):"week"===l?n.setDate(n.getDate()+7*B):"month"===l?n.setMonth(n.getMonth()+1*B):"year"===l&&n.setFullYear(n.getFullYear()+
|
|
21
|
+
1*B);return n}function ha(n,B){var l=!1;0>n&&(l=!0,n*=-1);n=""+n;for(B=B?B:1;n.length<B;)n="0"+n;return l?"-"+n:n}function Ia(n){if(!n)return n;n=n.replace(/^\s\s*/,"");for(var B=/\s/,l=n.length;B.test(n.charAt(--l)););return n.slice(0,l+1)}function Ba(n){n.roundRect=function(n,l,t,X,pa,z,s,w){s&&(this.fillStyle=s);w&&(this.strokeStyle=w);"undefined"===typeof pa&&(pa=5);pa=Math.min(pa,Math.min(t,X)/2);this.lineWidth=z;this.beginPath();this.moveTo(n+pa,l);this.lineTo(n+t-pa,l);this.quadraticCurveTo(n+
|
|
22
|
+
t,l,n+t,l+pa);this.lineTo(n+t,l+X-pa);this.quadraticCurveTo(n+t,l+X,n+t-pa,l+X);this.lineTo(n+pa,l+X);this.quadraticCurveTo(n,l+X,n,l+X-pa);this.lineTo(n,l+pa);this.quadraticCurveTo(n,l,n+pa,l);this.closePath();s&&this.fill();w&&0<z&&this.stroke()}}function Ua(n,B){return n-B}function R(n){var B=((n&16711680)>>16).toString(16),l=((n&65280)>>8).toString(16);n=((n&255)>>0).toString(16);B=2>B.length?"0"+B:B;l=2>l.length?"0"+l:l;n=2>n.length?"0"+n:n;return"#"+B+l+n}function gb(n,B){var l=this.length>>>
|
|
23
|
+
0,t=Number(B)||0,t=0>t?Math.ceil(t):Math.floor(t);for(0>t&&(t+=l);t<l;t++)if(t in this&&this[t]===n)return t;return-1}function l(n){return null===n||"undefined"===typeof n}function Ca(n){n.indexOf||(n.indexOf=gb);return n}function hb(n){if(U.fSDec)n[ma("`eeDwdouMhrudods")](ma("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){U._fTWm&&U._fTWm(n)})}function $a(n,B,l){l=l||"normal";var t=n+"_"+B+"_"+l,X=ab[t];if(isNaN(X)){try{if(!ta){var pa=document.body;ta=document.createElement("span");ta.innerHTML="";var z=
|
|
24
|
+
document.createTextNode("Mpgyi");ta.appendChild(z);pa.appendChild(ta)}ta.style.display="";Q(ta,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:n,fontSize:B+"px",fontWeight:l});X=Math.round(ta.offsetHeight);ta.style.display="none"}catch(s){X=Math.ceil(1.1*B)}X=Math.max(X,B);ab[t]=X}return X}function K(n,B){var l=[];if(l={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],
|
|
25
|
+
dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[n||"solid"])for(var t=0;t<l.length;t++)l[t]*=B;else l=[];return l}function L(n,B,za,t,X){t=t||[];X=l(X)?ib?{passive:!1,capture:!1}:!1:X;t.push([n,B,za,X]);return n.addEventListener?(n.addEventListener(B,za,X),za):n.attachEvent?(t=function(B){B=B||window.event;B.preventDefault=B.preventDefault||function(){B.returnValue=!1};B.stopPropagation=B.stopPropagation||function(){B.cancelBubble=!0};za.call(n,
|
|
26
|
+
B)},n.attachEvent("on"+B,t),t):!1}function jb(n){if(n._menuButton)n.exportEnabled?(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),Na(n._menuButton),va(n,n._menuButton,"menu"),0>=navigator.userAgent.search("MSIE")&&n._menuButton.childNodes[0]&&Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"})):wa(n._menuButton);else if(n.exportEnabled&&t){var B=!1;n._menuButton=document.createElement("button");va(n,n._menuButton,"menu");n._toolBar.appendChild(n._menuButton);
|
|
27
|
+
L(n._menuButton,"touchstart",function(n){B=!0},n.allDOMEventHandlers);L(n._menuButton,"click",function(){"none"!==n._dropdownMenu.style.display||n._dropDownCloseTime&&500>=(new Date).getTime()-n._dropDownCloseTime.getTime()||(n._dropdownMenu.style.display="block",n._menuButton.blur(),n._dropdownMenu.focus())},n.allDOMEventHandlers,!0);L(n._menuButton,"mousemove",function(){B||(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColorOnHover,color:n.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
|
|
28
|
+
Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},n.allDOMEventHandlers,!0);L(n._menuButton,"mouseout",function(){B||(Q(n._menuButton,{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&Q(n._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},n.allDOMEventHandlers,!0)}if(n.exportEnabled&&n._dropdownMenu){var l=n.theme&&-1!==n.theme.indexOf("dark")?"black":"#888888";Q(n._dropdownMenu,
|
|
29
|
+
{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor,boxShadow:"2px 2px 10px "+l});for(var l=n._dropdownMenu.childNodes,D=[n._cultureInfo.printText,n._cultureInfo.saveJPGText,n._cultureInfo.savePNGText],X=0;X<D.length;X++)Q(l[X],{backgroundColor:n.toolbar.itemBackgroundColor,color:n.toolbar.fontColor}),l[X].innerHTML=D[X]}else!n._dropdownMenu&&(n.exportEnabled&&t)&&(B=!1,n._dropdownMenu=document.createElement("div"),n._dropdownMenu.setAttribute("tabindex",-1),l=n.theme&&-1!==n.theme.indexOf("dark")?
|
|
30
30
|
"black":"#888888",Q(n._dropdownMenu,{position:"absolute",zIndex:1,userSelect:"none",MozUserSeelct:"none",WebkitUserSelect:"none",msUserSelect:"none",cursor:"pointer",right:"0px",top:"25px",minWidth:"120px",outline:0,fontSize:"14px",fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 0px 5px 0px",textAlign:"left",lineHeight:"10px",backgroundColor:n.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px "+l}),n._dropdownMenu.style.display="none",n._toolBar.appendChild(n._dropdownMenu),L(n._dropdownMenu,
|
|
31
|
-
"blur",function(){
|
|
32
|
-
n.allDOMEventHandlers,!0),L(l,"mouseout",function(){
|
|
33
|
-
!0},n.allDOMEventHandlers),L(l,"mousemove",function(){
|
|
34
|
-
Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.savePNGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){
|
|
35
|
-
this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.exportChart({format:"png",fileName:n.exportFileName});
|
|
36
|
-
Pa=
|
|
31
|
+
"blur",function(){wa(n._dropdownMenu);n._dropDownCloseTime=new Date},n.allDOMEventHandlers,!0),l=document.createElement("div"),Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.printText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){B=!0},n.allDOMEventHandlers),L(l,"mousemove",function(){B||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},
|
|
32
|
+
n.allDOMEventHandlers,!0),L(l,"mouseout",function(){B||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.print();wa(n._dropdownMenu)},n.allDOMEventHandlers,!0),l=document.createElement("div"),Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.saveJPGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){B=
|
|
33
|
+
!0},n.allDOMEventHandlers),L(l,"mousemove",function(){B||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},n.allDOMEventHandlers,!0),L(l,"mouseout",function(){B||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.exportChart({format:"jpeg",fileName:n.exportFileName});wa(n._dropdownMenu)},n.allDOMEventHandlers,!0),l=document.createElement("div"),
|
|
34
|
+
Q(l,{padding:"12px 8px 12px 8px"}),l.innerHTML=n._cultureInfo.savePNGText,l.style.backgroundColor=n.toolbar.itemBackgroundColor,l.style.color=n.toolbar.fontColor,n._dropdownMenu.appendChild(l),L(l,"touchstart",function(n){B=!0},n.allDOMEventHandlers),L(l,"mousemove",function(){B||(this.style.backgroundColor=n.toolbar.itemBackgroundColorOnHover,this.style.color=n.toolbar.fontColorOnHover)},n.allDOMEventHandlers,!0),L(l,"mouseout",function(){B||(this.style.backgroundColor=n.toolbar.itemBackgroundColor,
|
|
35
|
+
this.style.color=n.toolbar.fontColor)},n.allDOMEventHandlers,!0),L(l,"click",function(){n.exportChart({format:"png",fileName:n.exportFileName});wa(n._dropdownMenu)},n.allDOMEventHandlers,!0))}function bb(n,B,l){n*=ka;B*=ka;n=l.getImageData(n,B,2,2).data;B=!0;for(l=0;4>l;l++)if(n[l]!==n[l+4]|n[l]!==n[l+8]|n[l]!==n[l+12]){B=!1;break}return B?n[0]<<16|n[1]<<8|n[2]:0}function V(n,B,l){return n in B?B[n]:l[n]}function Oa(n,B,za,D){t&&cb?(D=!l(D)&&D?n.getContext("2d",{willReadFrequently:!0}):n.getContext("2d"),
|
|
36
|
+
Pa=D.webkitBackingStorePixelRatio||D.mozBackingStorePixelRatio||D.msBackingStorePixelRatio||D.oBackingStorePixelRatio||D.backingStorePixelRatio||1,ka=Va/Pa,n.width=B*ka,n.height=za*ka,Va!==Pa&&(n.style.width=B+"px",n.style.height=za+"px",D.scale(ka,ka))):(n.width=B,n.height=za)}function kb(n){if(!lb){var B=!1,l=!1;"undefined"===typeof sa.Chart.creditHref?(n.creditHref=ma("iuuqr;..b`ow`rkr/bnl."),n.creditText=ma("B`ow`rKR/bnl")):(B=n.updateOption("creditText"),l=n.updateOption("creditHref"));if(n.creditHref&&
|
|
37
37
|
n.creditText){n._creditLink||(n._creditLink=document.createElement("a"),n._creditLink.setAttribute("class","canvasjs-chart-credit"),n._creditLink.setAttribute("title","JavaScript Charts"),Q(n._creditLink,{outline:"none",margin:"0px",position:"absolute",right:"2px",top:n.height-14+"px",color:"dimgrey",textDecoration:"none",fontSize:"11px",fontFamily:"Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"}),n._creditLink.setAttribute("tabIndex",-1),n._creditLink.setAttribute("target","_blank"));
|
|
38
|
-
if(0===n.renderCount||
|
|
39
|
-
Oa(
|
|
40
|
-
|
|
41
|
-
"inline")}function
|
|
42
|
-
X;this._eventListeners=[];n={};this.theme&&l(this.parent)&&l(
|
|
43
|
-
l,t,
|
|
44
|
-
|
|
38
|
+
if(0===n.renderCount||B||l)n._creditLink.setAttribute("href",n.creditHref),n._creditLink.innerHTML=n.creditText;n._creditLink&&n.creditHref&&n.creditText?(n._creditLink.parentElement||n._canvasJSContainer.appendChild(n._creditLink),n._creditLink.style.top=n.height-14+"px"):n._creditLink.parentElement&&n._canvasJSContainer.removeChild(n._creditLink)}}}function xa(n,B,l){Ja&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var D=document.createElement("canvas");D.setAttribute("class","canvasjs-chart-canvas");
|
|
39
|
+
Oa(D,n,B,l);t||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(D);return D}function Q(n,B){for(var l in B)n.style[l]=B[l]}function db(n){return n.currentStyle?n.currentStyle:window&&window.getComputedStyle?window.getComputedStyle(n,null):n.style}function va(n,B,l){B.getAttribute("state")||(B.style.backgroundColor=n.toolbar.itemBackgroundColor,B.style.color=n.toolbar.fontColor,B.style.border="none",Q(B,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));
|
|
40
|
+
B.getAttribute("state")!==l&&(B.setAttribute("state",l),B.setAttribute("type","button"),Q(B,{padding:"5px 12px",cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),B.innerHTML="<img src='"+mb[l].image+"' alt='"+n._cultureInfo[l+"Text"]+"' />",Q(B.childNodes[0],{height:"95%",pointerEvents:"none"}));B.setAttribute("title",n._cultureInfo[l+"Text"])}function Na(){for(var n=null,B=0;B<arguments.length;B++)n=arguments[B],n.style&&(n.style.display=
|
|
41
|
+
"inline")}function wa(){for(var n=null,B=0;B<arguments.length;B++)(n=arguments[B])&&n.style&&(n.style.display="none")}function Wa(n,B,l,t,X){if(null===n||"undefined"===typeof n)return"undefined"===typeof l?B:l;n=parseFloat(n.toString())*(0<=n.toString().indexOf("%")?B/100:1);"undefined"!==typeof t&&(n=Math.min(t,n),"undefined"!==typeof X&&(n=Math.max(X,n)));return!isNaN(n)&&n<=B&&0<=n?n:"undefined"===typeof l?B:l}function W(n,B,t,D,X){this._defaultsKey=n;this._themeOptionsKey=B;this._index=D;this.parent=
|
|
42
|
+
X;this._eventListeners=[];n={};this.theme&&l(this.parent)&&l(B)&&l(D)?n=l(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[B])&&(null===D?n=this.parent.themeOptions[B]:0<this.parent.themeOptions[B].length&&(D=Math.min(this.parent.themeOptions[B].length-1,D),n=this.parent.themeOptions[B][D]));this.themeOptions=n;this.options=t?t:{_isPlaceholder:!0};this.setOptions(this.options,n)}function Ga(n,
|
|
43
|
+
l,t,D,X){"undefined"===typeof X&&(X=0);this._padding=X;this._x1=n;this._y1=l;this._x2=t;this._y2=D;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function la(n,l){la.base.constructor.call(this,"TextBlock",null,l,null,null);this.ctx=n;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Xa(n,l){Xa.base.constructor.call(this,"Toolbar","toolbar",l,null,n);this.chart=n;this.canvas=n.canvas;this.ctx=this.chart.ctx;this.optionsName="toolbar"}function Da(n,
|
|
44
|
+
B){Da.base.constructor.call(this,"Title","title",B,null,n);this.chart=n;this.canvas=n.canvas;this.ctx=this.chart.ctx;this.optionsName="title";if(l(this.options.margin)&&n.options.subtitles)for(var t=n.options.subtitles,D=0;D<t.length;D++)if((l(t[D].horizontalAlign)&&"center"===this.horizontalAlign||t[D].horizontalAlign===this.horizontalAlign)&&(l(t[D].verticalAlign)&&"top"===this.verticalAlign||t[D].verticalAlign===this.verticalAlign)&&!t[D].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=
|
|
45
45
|
0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ka(n,l,t){Ka.base.constructor.call(this,"Subtitle","subtitles",l,t,n);this.chart=n;this.canvas=n.canvas;this.ctx=this.chart.ctx;this.optionsName="subtitles";this.isOptionsInArray=!0;"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;
|
|
46
46
|
this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ya(){this.pool=[]}function La(n){var l;n&&Ma[n]&&(l=Ma[n]);La.base.constructor.call(this,"CultureInfo",null,l,null,null)}var Ja=!1,U={},t=!!document.createElement("canvas").getContext,sa={Chart:{width:500,height:400,zoomEnabled:!1,zoomType:"x",backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,dataPointWidth:null,dataPointMinWidth:null,dataPointMaxWidth:null,colorSet:"colorSet1",culture:"en",creditText:"CanvasJS",
|
|
47
47
|
interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",toolTip:"readWrite",legend:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}},Title:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",
|
|
@@ -60,102 +60,102 @@ indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1
|
|
|
60
60
|
type:"column",xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIndex:0,xValueFormatString:null,yValueFormatString:null,zValueFormatString:null,percentFormatString:null,showInLegend:!1,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:t?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:t?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,
|
|
61
61
|
click:null,toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",textAlign:"left",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",
|
|
62
62
|
zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},Ma={en:{}},s=t?"Trebuchet MS, Helvetica, sans-serif":
|
|
63
|
-
"Arial",Ha=t?"Impact, Charcoal, sans-serif":"Arial",Ea={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),colorSet2:"#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},
|
|
64
|
-
ia=da="#000000";var fa=20,
|
|
65
|
-
labelFontSize:
|
|
66
|
-
lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
67
|
-
labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
68
|
-
labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:
|
|
69
|
-
lineThickness:1,lineColor:
|
|
70
|
-
fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=ba="#F5F5F5";
|
|
71
|
-
verticalAlign:"top",margin:5},subtitles:[{fontFamily:s,fontSize:
|
|
72
|
-
tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:
|
|
73
|
-
titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
74
|
-
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
75
|
-
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:
|
|
76
|
-
labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:
|
|
77
|
-
spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=ba="#F5F5F5";
|
|
78
|
-
fa=20;
|
|
79
|
-
indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
80
|
-
labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
81
|
-
labelFontSize:
|
|
82
|
-
labelFontSize:
|
|
83
|
-
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
84
|
-
labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}};
|
|
85
|
-
var fa=20,
|
|
86
|
-
indexLabelFontSize:
|
|
87
|
-
labelFontSize:
|
|
88
|
-
labelFontSize:
|
|
89
|
-
labelFontSize:
|
|
90
|
-
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:
|
|
63
|
+
"Arial",Ha=t?"Impact, Charcoal, sans-serif":"Arial",Ea={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),colorSet2:"#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},F,ba,T,da,ia;ba="#333333";T="#000000";F="#666666";
|
|
64
|
+
ia=da="#000000";var fa=20,w=14,Za={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Ha,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ha,fontSize:w,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:s,indexLabelFontSize:w,indexLabelFontColor:ba,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,
|
|
65
|
+
labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",
|
|
66
|
+
lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",
|
|
67
|
+
labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",
|
|
68
|
+
labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",
|
|
69
|
+
lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,
|
|
70
|
+
fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=ba="#F5F5F5";F="#FFFFFF";da="#40BAF1";ia="#F5F5F5";var fa=20,w=14,eb={colorSet:"colorSet2",title:{fontFamily:s,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",
|
|
71
|
+
verticalAlign:"top",margin:5},subtitles:[{fontFamily:s,fontSize:w,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:s,indexLabelFontSize:w,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,
|
|
72
|
+
tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:s,
|
|
73
|
+
titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
|
|
74
|
+
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:w,
|
|
75
|
+
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,
|
|
76
|
+
labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",
|
|
77
|
+
spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:s,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};T=ba="#F5F5F5";F="#FFFFFF";da="#40BAF1";ia="#F5F5F5";
|
|
78
|
+
fa=20;w=14;Ha={colorSet:"colorSet1",backgroundColor:"#2A2A2A",title:{fontFamily:Ha,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ha,fontSize:w,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:s,indexLabelFontSize:w,indexLabelFontColor:T,
|
|
79
|
+
indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,
|
|
80
|
+
labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:s,
|
|
81
|
+
labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,
|
|
82
|
+
labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
|
|
83
|
+
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#000000",
|
|
84
|
+
labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}};F="#FFFFFF";T=ba="#FAFAFA";da="#40BAF1";ia="#F5F5F5";
|
|
85
|
+
var fa=20,w=14,Qa={light1:Za,light2:eb,dark1:Ha,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:s,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:s,fontSize:w,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:s,
|
|
86
|
+
indexLabelFontSize:w,indexLabelFontColor:T,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,
|
|
87
|
+
labelFontSize:w,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:1,lineColor:F,tickThickness:1,tickColor:F,gridThickness:0,gridColor:F,stripLines:[{labelFontFamily:s,
|
|
88
|
+
labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,
|
|
89
|
+
labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:0,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
|
|
90
|
+
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:s,titleFontSize:fa,titleFontColor:T,titleFontWeight:"normal",labelFontFamily:s,labelFontSize:w,labelFontColor:T,labelFontWeight:"normal",lineThickness:0,lineColor:F,tickThickness:1,tickColor:F,gridThickness:1,gridColor:F,stripLines:[{labelFontFamily:s,labelFontSize:w,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:s,labelFontSize:w,labelFontColor:"#000000",
|
|
91
91
|
labelFontWeight:"normal",labelBackgroundColor:ia,color:da,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:s,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:s,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:T,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:Za,theme2:eb,theme3:Za},S={numberDuration:1,
|
|
92
92
|
yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")};(function(){U.fSDec=function(n){for(var l="",t=0;t<n.length;t++)l+=String.fromCharCode(Math.ceil(n.length/57/5)^n.charCodeAt(t));return l};delete sa[U.fSDec("Bi`su")][U.fSDec("bsdehuIsdg")];U.pro={sCH:sa[U.fSDec("Bi`su")][U.fSDec("bsdehuIsdg")]};U._fTWm=
|
|
93
93
|
function(n){if("undefined"===typeof U.pro.sCH&&!nb)try{var l,t=n[U.fSDec("buy")];t[U.fSDec("udyuC`rdmhod")]=U.fSDec("unq");t[U.fSDec("gnou")]=11+U.fSDec("qy!B`mhcsh-!Mtbhe`!Fs`oed-!Mtbhe`!R`or!Tohbned-!@sh`m-!r`or,rdshg");l=n.height-11;t[U.fSDec("bmd`sSdbu")](0,l,t[U.fSDec("ld`rtsdUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno")).width,11);t[U.fSDec("ghmmRuxmd")]=n.backgroundColor;t[U.fSDec("ghmmSdbu")](0,l,t[U.fSDec("ld`rtsdUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno")).width,11);t[U.fSDec("ghmmRuxmd")]=U.fSDec("fsdx");
|
|
94
|
-
t[U.fSDec("ghmmUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno"),0,l)}catch(
|
|
95
|
-
this.height))},Aa=function(n){n.width=1;n.height=1;n.getContext("2d")&&n.getContext("2d").clearRect(0,0,1,1)},pb=function(n,l,t){l=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=l?12:11,Math.round(l*(n/400)))},Fa=function(){var n=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),t="Sun Mon Tue Wed Thu Fri Sat".split(" "),
|
|
96
|
-
X="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(
|
|
97
|
-
Y=
|
|
98
|
-
3);case "YYYY":return ha(a,4);case "h":return e%12||12;case "hh":return ha(e%12||12,2);case "H":return e;case "HH":return ha(e,2);case "m":return c;case "mm":return ha(c,2);case "s":return b;case "ss":return ha(b,2);case "f":return ha(String(d),3).slice(0,1);case "ff":return ha(String(d),3).slice(0,2);case "fff":return ha(String(d),3).slice(0,3);case "t":return 12>e?"a":"p";case "tt":return 12>e?"am":"pm";case "T":return 12>e?"A":"P";case "TT":return 12>e?"AM":"PM";case "K":return U?"UTC":(String(
|
|
94
|
+
t[U.fSDec("ghmmUdyu")](U.fSDec("Ono,Bnlldsbh`m!Wdsrhno"),0,l)}catch(D){}}})();var ib=function(){var n=!1;try{var l=Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){n=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,l),window.removeEventListener("test",null,l))}catch(t){n=!1}return n}(),ab={},ta=null,ob=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,
|
|
95
|
+
this.height))},Aa=function(n){n.width=1;n.height=1;n.getContext("2d")&&n.getContext("2d").clearRect(0,0,1,1)},pb=function(n,l,t){l=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=l?12:11,Math.round(l*(n/400)))},Fa=function(){var n=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),t="Sun Mon Tue Wed Thu Fri Sat".split(" "),D="January February March April May June July August September October November December".split(" "),
|
|
96
|
+
X="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(w,K,F){var R=F?F.days:l,Q=F?F.months:D,S=F?F.shortDays:t,L=F?F.shortMonths:X;F="";var U=!1;w=w&&w.getTime?w:w?new Date(w):new Date;if(isNaN(w))throw SyntaxError("invalid date");"UTC:"===K.slice(0,4)&&(K=K.slice(4),U=!0);F=U?"getUTC":"get";var W=w[F+"Date"](),N=w[F+"Day"](),
|
|
97
|
+
Y=w[F+"Month"](),a=w[F+"FullYear"](),e=w[F+"Hours"](),c=w[F+"Minutes"](),b=w[F+"Seconds"](),d=w[F+"Milliseconds"](),g=U?0:w.getTimezoneOffset();return F=K.replace(n,function(h){switch(h){case "D":return W;case "DD":return ha(W,2);case "DDD":return S[N];case "DDDD":return R[N];case "M":return Y+1;case "MM":return ha(Y+1,2);case "MMM":return L[Y];case "MMMM":return Q[Y];case "Y":return parseInt(String(a).slice(-2));case "YY":return ha(String(a).slice(-2),2);case "YYY":return ha(String(a).slice(-3),
|
|
98
|
+
3);case "YYYY":return ha(a,4);case "h":return e%12||12;case "hh":return ha(e%12||12,2);case "H":return e;case "HH":return ha(e,2);case "m":return c;case "mm":return ha(c,2);case "s":return b;case "ss":return ha(b,2);case "f":return ha(String(d),3).slice(0,1);case "ff":return ha(String(d),3).slice(0,2);case "fff":return ha(String(d),3).slice(0,3);case "t":return 12>e?"a":"p";case "tt":return 12>e?"am":"pm";case "T":return 12>e?"A":"P";case "TT":return 12>e?"AM":"PM";case "K":return U?"UTC":(String(w).match(s)||
|
|
99
99
|
[""]).pop().replace(z,"");case "z":return(0<g?"-":"+")+Math.floor(Math.abs(g)/60);case "zz":return(0<g?"-":"+")+ha(Math.floor(Math.abs(g)/60),2);case "zzz":return(0<g?"-":"+")+ha(Math.floor(Math.abs(g)/60),2)+ha(Math.abs(g)%60,2);default:return h.slice(1,h.length-1)}})}}(),qb=function(n){var l=0>n;if(1>Math.abs(n)){var t=parseInt(n.toString().split("e-")[1]);t&&(n=(l?-1*n:n)*Math.pow(10,t-1),n="0."+Array(t).join("0")+n.toString().substring(2),n=l?"-"+n:n)}else t=parseInt(n.toString().split("+")[1]),
|
|
100
|
-
20<t&&(t-=20,n/=Math.pow(10,t),n=n.toString()+Array(t+1).join("0"));return String(n)},ea=function(n,l,t){if(null===n)return"";if(!isFinite(n))return n;n=Number(n);var
|
|
101
|
-
l[0]&&"."===l[l.length-1]){z/=Math.pow(1E3,l.length-1);
|
|
102
|
-
l)if(
|
|
100
|
+
20<t&&(t-=20,n/=Math.pow(10,t),n=n.toString()+Array(t+1).join("0"));return String(n)},ea=function(n,l,t){if(null===n)return"";if(!isFinite(n))return n;n=Number(n);var D=0>n?!0:!1;D&&(n*=-1);var X=t?t.decimalSeparator:".",s=t?t.digitGroupSeparator:",",z="";l=String(l);var z=1,w=t="",F=-1,K=[],R=[],Q=0,S=0,L=0,U=!1,W=0,w=l.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);l=null;for(var N=0;w&&N<w.length;N++)if(l=w[N],"."===l&&0>F)F=N;else{if("%"===l)z*=100;else if("\u2030"===l){z*=1E3;continue}else if(","===
|
|
101
|
+
l[0]&&"."===l[l.length-1]){z/=Math.pow(1E3,l.length-1);F=N+l.length-1;continue}else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||(U=!0);0>F?(K.push(l),"#"===l||"0"===l?Q++:","===l&&L++):(R.push(l),"#"!==l&&"0"!==l||S++)}U&&(l=Math.floor(n),w=-Math.floor(Math.log(n)/Math.LN10+1),W=0===n?0:0===l?-(Q+w):qb(l).length-Q,z/=Math.pow(10,W));0>F&&(F=N);z=(n*z).toFixed(S);l=z.split(".");z=(l[0]+"").split("");n=(l[1]+"").split("");z&&"0"===z[0]&&z.shift();for(U=w=N=S=F=0;0<K.length;)if(l=K.pop(),"#"===l||"0"===
|
|
102
|
+
l)if(F++,F===Q){var Y=z,z=[];if("0"===l)for(l=Q-S-(Y?Y.length:0);0<l;)Y.unshift("0"),l--;for(;0<Y.length;)t=Y.pop()+t,U++,0===U%w&&(N===L&&0<Y.length)&&(t=s+t)}else 0<z.length?(t=z.pop()+t,S++,U++):"0"===l&&(t="0"+t,S++,U++),0===U%w&&(N===L&&0<z.length)&&(t=s+t);else"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?","===l?(N++,w=U,U=0,0<z.length&&(t=s+t)):t=1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?l.slice(1,l.length-1)+t:l+t:(l=0>W?l.replace("+",
|
|
103
103
|
"").replace("-",""):l.replace("-",""),t+=l.replace(/[0]+/,function(a){return ha(W,a.length)}));s="";for(K=!1;0<R.length;)l=R.shift(),"#"===l||"0"===l?0<n.length&&0!==Number(n.join(""))?(s+=n.shift(),K=!0):"0"===l&&(s+="0",K=!0):1<l.length&&('"'===l[0]&&'"'===l[l.length-1]||"'"===l[0]&&"'"===l[l.length-1])?s+=l.slice(1,l.length-1):"E"!==l[0]&&"e"!==l[0]||"0"!==l[l.length-1]||!/[eE][+-]*[0]+/.test(l)?s+=l:(l=0>W?l.replace("+","").replace("-",""):l.replace("-",""),s+=l.replace(/[0]+/,function(a){return ha(W,
|
|
104
|
-
a.length)}));t+=(K?X:"")+s;return
|
|
105
|
-
|
|
106
|
-
L,s-L),n.lineTo(
|
|
107
|
-
t),n.lineTo(
|
|
104
|
+
a.length)}));t+=(K?X:"")+s;return D?"-"+t:t},Ra=function(n){var l=0,t=0;n=n||window.event;n.offsetX||0===n.offsetX?(l=n.offsetX,t=n.offsetY):n.layerX||0==n.layerX?(l=n.layerX,t=n.layerY):(l=n.pageX-n.target.offsetLeft,t=n.pageY-n.target.offsetTop);return{x:l,y:t}},cb=!0,Va=window.devicePixelRatio||1,Pa=1,ka=cb?Va/Pa:1,aa=function(n,l,t,D,s,w,z,F,K,R,U,S,Q){"undefined"===typeof Q&&(Q=1);z=z||0;F=F||"black";var L=15<D-l&&15<s-t?8:0.35*Math.min(D-l,s-t);n.beginPath();n.moveTo(l,t);n.save();n.fillStyle=
|
|
105
|
+
w;n.globalAlpha=Q;n.fillRect(l,t,D-l,s-t);n.globalAlpha=1;0<z&&(Q=0===z%2?0:0.5,n.beginPath(),n.lineWidth=z,n.strokeStyle=F,n.moveTo(l,t),n.rect(l-Q,t-Q,D-l+2*Q,s-t+2*Q),n.stroke());n.restore();!0===K&&(n.save(),n.beginPath(),n.moveTo(l,t),n.lineTo(l+L,t+L),n.lineTo(D-L,t+L),n.lineTo(D,t),n.closePath(),z=n.createLinearGradient((D+l)/2,t+L,(D+l)/2,t),z.addColorStop(0,w),z.addColorStop(1,"rgba(255, 255, 255, .4)"),n.fillStyle=z,n.fill(),n.restore());!0===R&&(n.save(),n.beginPath(),n.moveTo(l,s),n.lineTo(l+
|
|
106
|
+
L,s-L),n.lineTo(D-L,s-L),n.lineTo(D,s),n.closePath(),z=n.createLinearGradient((D+l)/2,s-L,(D+l)/2,s),z.addColorStop(0,w),z.addColorStop(1,"rgba(255, 255, 255, .4)"),n.fillStyle=z,n.fill(),n.restore());!0===U&&(n.save(),n.beginPath(),n.moveTo(l,t),n.lineTo(l+L,t+L),n.lineTo(l+L,s-L),n.lineTo(l,s),n.closePath(),z=n.createLinearGradient(l+L,(s+t)/2,l,(s+t)/2),z.addColorStop(0,w),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,n.fill(),n.restore());!0===S&&(n.save(),n.beginPath(),n.moveTo(D,
|
|
107
|
+
t),n.lineTo(D-L,t+L),n.lineTo(D-L,s-L),n.lineTo(D,s),z=n.createLinearGradient(D-L,(s+t)/2,D,(s+t)/2),z.addColorStop(0,w),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,z.addColorStop(0,w),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),n.fillStyle=z,n.fill(),n.closePath(),n.restore())},ma=function(n){for(var l="",t=0;t<n.length;t++)l+=String.fromCharCode(Math.ceil(n.length/57/5)^n.charCodeAt(t));return l},nb=(s=window&&window[ma("mnb`uhno")]&&window[ma("mnb`uhno")].href)&&(-1!==s.indexOf(ma("b`ow`rkr/bnl"))||
|
|
108
108
|
-1!==s.indexOf(ma("gdonqhy/bnl"))||-1!==s.indexOf(ma("gheemd"))||-1!==s.indexOf(ma("bnedqdo"))||-1!==s.indexOf(ma("beqo"))),lb=s&&(-1!==s.indexOf(ma("b`ow`rkr/bnl"))||-1!==s.indexOf(ma("gdonqhy/bnl"))),mb={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg=="},
|
|
109
109
|
pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC"},
|
|
110
110
|
zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII="},
|
|
111
111
|
menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"}};
|
|
112
|
-
W.prototype.setOptions=function(l,t){if(sa[this._defaultsKey]){var s=sa[this._defaultsKey],
|
|
113
|
-
window.console.log('Property "'+l+"\" doesn't exist. Please check for typo.")};W.prototype.set=function(l,t,s){s="undefined"===typeof s?!0:s;var
|
|
114
|
-
window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."));return}s&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};W.prototype.addTo=function(l,t,s,
|
|
115
|
-
typeof this.options[l]&&(this.options[l]=[]),l=this.options[l],s="undefined"===typeof s||null===s?l.length:s,l.splice(s,0,t),
|
|
112
|
+
W.prototype.setOptions=function(l,t){if(sa[this._defaultsKey]){var s=sa[this._defaultsKey],D;for(D in s)"publicProperties"!==D&&s.hasOwnProperty(D)&&(this[D]=l&&D in l?l[D]:t&&D in t?t[D]:s[D])}else Ja&&window.console&&console.log("defaults not set")};W.prototype.get=function(l){var t=sa[this._defaultsKey];if("options"===l)return this.options&&this.options._isPlaceholder?null:this.options;if(t.hasOwnProperty(l)||t.publicProperties&&t.publicProperties.hasOwnProperty(l))return this[l];window.console&&
|
|
113
|
+
window.console.log('Property "'+l+"\" doesn't exist. Please check for typo.")};W.prototype.set=function(l,t,s){s="undefined"===typeof s?!0:s;var D=sa[this._defaultsKey];if("options"===l)this.createUserOptions(t);else if(D.hasOwnProperty(l)||D.publicProperties&&D.publicProperties.hasOwnProperty(l)&&"readWrite"===D.publicProperties[l])this.options._isPlaceholder&&this.createUserOptions(),this.options[l]=t;else{window.console&&(D.publicProperties&&D.publicProperties.hasOwnProperty(l)&&"readOnly"===D.publicProperties[l]?
|
|
114
|
+
window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."));return}s&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};W.prototype.addTo=function(l,t,s,D){D="undefined"===typeof D?!0:D;var w=sa[this._defaultsKey];w.hasOwnProperty(l)||w.publicProperties&&w.publicProperties.hasOwnProperty(l)&&"readWrite"===w.publicProperties[l]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===
|
|
115
|
+
typeof this.options[l]&&(this.options[l]=[]),l=this.options[l],s="undefined"===typeof s||null===s?l.length:s,l.splice(s,0,t),D&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()):window.console&&(w.publicProperties&&w.publicProperties.hasOwnProperty(l)&&"readOnly"===w.publicProperties[l]?window.console.log('Property "'+l+'" is read-only.'):window.console.log('Property "'+l+"\" doesn't exist. Please check for typo."))};W.prototype.createUserOptions=function(l){if("undefined"!==
|
|
116
116
|
typeof l||this.options._isPlaceholder)if(this.parent&&this.parent.options._isPlaceholder&&this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var t=this.parent.options[this.optionsName],s=t.length;this.options._isPlaceholder||(Ca(t),s=t.indexOf(this.options));this.options="undefined"===typeof l?{}:l;t[s]=this.options}else this.options="undefined"===typeof l?{}:l,this.parent&&(l=this.parent.options,this.optionsName?
|
|
117
117
|
t=this.optionsName:(t=this._defaultsKey)&&0!==t.length?(s=t.charAt(0).toLowerCase(),1<t.length&&(s=s.concat(t.slice(1))),t=s):t=void 0,l[t]=this.options)};W.prototype.remove=function(l){l="undefined"===typeof l?!0:l;if(this.isOptionsInArray){var t=this.parent.options[this.optionsName];Ca(t);var s=t.indexOf(this.options);0<=s&&t.splice(s,1)}else delete this.parent.options[this.optionsName];l&&(this.stockChart||(this.chart?this.chart.stockChart||this.chart:this)).render()};W.prototype.updateOption=
|
|
118
|
-
function(n){!sa[this._defaultsKey]&&(Ja&&window.console)&&console.log("defaults not set");var t=sa[this._defaultsKey],s={},
|
|
119
|
-
this.parent.themeOptions[
|
|
118
|
+
function(n){!sa[this._defaultsKey]&&(Ja&&window.console)&&console.log("defaults not set");var t=sa[this._defaultsKey],s={},D=this[n],w=this._themeOptionsKey,F=this._index;this.theme&&l(this.parent)&&l(w)&&l(F)?s=l(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&this.parent.themeOptions&&(this.options.theme?"Chart"===this._defaultsKey&&Qa[this.options.theme]?s=Qa[this.options.theme]:stockThemes[this.options.theme]&&(s=stockThemes[this.options.theme][w]):
|
|
119
|
+
this.parent.themeOptions[w]&&(null===F?s=this.parent.themeOptions[w]:0<this.parent.themeOptions[w].length&&(s=Math.min(this.parent.themeOptions[w].length-1,F),s=this.parent.themeOptions[w][s])));this.themeOptions=s;n in t&&(D=n in this.options?this.options[n]:s&&n in s?s[n]:t[n]);if(D===this[n])return!1;this[n]=D;return!0};W.prototype.trackChanges=function(l){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[l]=this.options[l]};W.prototype.isBeingTracked=function(l){this.options._oldOptions||
|
|
120
120
|
(this.options._oldOptions={});return this.options._oldOptions[l]?!0:!1};W.prototype.hasOptionChanged=function(l){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[l]!==this.options[l]};W.prototype.addEventListener=function(l,t,s){l&&t&&(this._eventListeners[l]=this._eventListeners[l]||[],this._eventListeners[l].push({context:s||this,eventHandler:t}))};W.prototype.removeEventListener=function(l,t){if(l&&t&&this._eventListeners[l])for(var s=this._eventListeners[l],
|
|
121
|
-
|
|
121
|
+
D=0;D<s.length;D++)if(s[D].eventHandler===t){s[D].splice(D,1);break}};W.prototype.removeAllEventListeners=function(){this._eventListeners=[]};W.prototype.dispatchEvent=function(l,t,s){if(l&&this._eventListeners[l]){t=t||{};for(var D=this._eventListeners[l],w=0;w<D.length;w++)D[w].eventHandler.call(D[w].context,t)}"function"===typeof this[l]&&this[l].call(s||this.chart,t)};Ga.prototype.registerSpace=function(l,t){"top"===l?this._topOccupied+=t.height:"bottom"===l?this._bottomOccupied+=t.height:"left"===
|
|
122
122
|
l?this._leftOccupied+=t.width:"right"===l&&(this._rightOccupied+=t.width)};Ga.prototype.unRegisterSpace=function(l,t){"top"===l?this._topOccupied-=t.height:"bottom"===l?this._bottomOccupied-=t.height:"left"===l?this._leftOccupied-=t.width:"right"===l&&(this._rightOccupied-=t.width)};Ga.prototype.getFreeSpace=function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,
|
|
123
123
|
height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Ga.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};ra(la,W);la.prototype._initialize=function(){l(this.padding)||"object"!==typeof this.padding?this.topPadding=this.rightPadding=this.bottomPadding=this.leftPadding=Number(this.padding)|0:(this.topPadding=l(this.padding.top)?0:Number(this.padding.top)|0,this.rightPadding=l(this.padding.right)?0:Number(this.padding.right)|
|
|
124
|
-
0,this.bottomPadding=l(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=l(this.padding.left)?0:Number(this.padding.left)|0)};la.prototype.render=function(l){if(0!==this.fontSize){l&&this.ctx.save();var t=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var s=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+s);"middle"===this.textBaseline&&(s=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var
|
|
125
|
-
0,
|
|
126
|
-
this.textAlign?
|
|
127
|
-
this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};la.prototype._getLineWithWidth=function(l,t,s){l=String(l);if(!l)return{text:"",width:0};var
|
|
128
|
-
t&&(l=z.split(" "),1<l.length&&l.pop(),z=l.join(" "),s=this.ctx.measureText(z).width);return{text:z,width:s}};la.prototype._wrapText=function(){var l=new String(Ia(String(this.text))),t=[],s=this.ctx.font,
|
|
129
|
-
|
|
130
|
-
'"'!==
|
|
131
|
-
t.height-4),
|
|
132
|
-
|
|
133
|
-
K=z.measureText();"center"===this.verticalAlign?("left"===this.horizontalAlign?(s=t.x1+2+z._lineHeight/2,
|
|
134
|
-
this.verticalAlign?(
|
|
135
|
-
{x1:s,y1:
|
|
136
|
-
Ka.prototype.render=Da.prototype.render;Ya.prototype.get=function(l,t){var s=null;0<this.pool.length?(s=this.pool.pop(),Oa(s,l,t)):s=
|
|
124
|
+
0,this.bottomPadding=l(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=l(this.padding.left)?0:Number(this.padding.left)|0)};la.prototype.render=function(l){if(0!==this.fontSize){l&&this.ctx.save();var t=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var s=0;this._isDirty&&this.measureText(this.ctx);this.ctx.translate(this.x,this.y+s);"middle"===this.textBaseline&&(s=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var D=
|
|
125
|
+
0,w=this.topPadding,F=null;this.ctx.roundRect||Ba(this.ctx);this.borderDashType=this.borderDashType||"solid";this.ctx.setLineDash&&this.ctx.setLineDash(K(this.borderDashType,this.borderThickness));(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,s,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(s=0;s<this._wrappedText.lines.length;s++)F=this._wrappedText.lines[s],"right"===
|
|
126
|
+
this.textAlign?D=this.width-F.width-this.rightPadding:"left"===this.textAlign?D=this.leftPadding:"center"===this.textAlign&&(D=(this.width-(this.leftPadding+this.rightPadding))/2-F.width/2+this.leftPadding),this.ctx.fillText(F.text,D,w),w+=F.height;this.ctx.font=t;l&&this.ctx.restore()}};la.prototype.setText=function(l){this.text=l;this._isDirty=!0;this._wrappedText=null};la.prototype.measureText=function(){this._lineHeight=$a(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";
|
|
127
|
+
this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};la.prototype._getLineWithWidth=function(l,t,s){l=String(l);if(!l)return{text:"",width:0};var D=s=0,w=l.length-1,F=Infinity;for(this.ctx.font=this._getFontString();D<=w;){var F=Math.floor((D+w)/2),z=l.substr(0,F+1);s=this.ctx.measureText(z).width;if(s<t)D=F+1;else if(s>t)w=F-1;else break}s>t&&1<z.length&&(z=z.substr(0,z.length-1),s=this.ctx.measureText(z).width);t=!0;if(z.length===l.length||" "===l[z.length])t=!1;
|
|
128
|
+
t&&(l=z.split(" "),1<l.length&&l.pop(),z=l.join(" "),s=this.ctx.measureText(z).width);return{text:z,width:s}};la.prototype._wrapText=function(){var l=new String(Ia(String(this.text))),t=[],s=this.ctx.font,D=0,w=0;this.ctx.font=this._getFontString();if(0===this.frontSize)w=D=0;else for(;0<l.length;){var F=this.maxHeight-(this.topPadding+this.bottomPadding),z=this._getLineWithWidth(l,this.maxWidth-(this.leftPadding+this.rightPadding),!1);z.height=this._lineHeight;t.push(z);var K=w,w=Math.max(w,z.width),
|
|
129
|
+
D=D+z.height,l=Ia(l.slice(z.text.length,l.length));F&&D>F&&(z=t.pop(),D-=z.height,w=K)}this._wrappedText={lines:t,width:w,height:D};this.width=w+(this.leftPadding+this.rightPadding);this.height=D+(this.topPadding+this.bottomPadding);this.ctx.font=s};la.prototype._getFontString=function(){var l;l=""+(this.fontStyle?this.fontStyle+" ":"");l+=this.fontWeight?this.fontWeight+" ":"";l+=this.fontSize?this.fontSize+"px ":"";var B=this.fontFamily?this.fontFamily+"":"";!t&&B&&(B=B.split(",")[0],"'"!==B[0]&&
|
|
130
|
+
'"'!==B[0]&&(B="'"+B+"'"));return l+=B};ra(Xa,W);ra(Da,W);Da.prototype.setLayout=function(){var n=this.dockInsidePlotArea?this.chart.plotArea:this.chart,t=n.layoutManager.getFreeSpace(),s=t.x1,D=t.y1,w=0,D=0,s=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?40:0,F;this.textAlign=l(this.options.textAlign)?this.horizontalAlign:this.textAlign;"center"===this.verticalAlign?"left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=
|
|
131
|
+
t.height-4),D=0.5*t.width-this.margin-2):(null===this.maxWidth&&(this.maxWidth=t.width-4),D=0.5*t.height-4):(null===this.maxWidth&&(this.maxWidth=t.width-4-s*("center"===this.horizontalAlign?2:1)),D=0.5*t.height-this.margin-2,w=0);if(this.text){l(this.padding)||"number"!==typeof this.padding?l(this.padding)||"object"!==typeof this.padding||(F=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,F+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):
|
|
132
|
+
F=2*this.padding;this.wrap||(D=Math.min(D,1.5*this.fontSize+F));var z=new la(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,textAlign:this.textAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:D,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"middle"}),
|
|
133
|
+
K=z.measureText();"center"===this.verticalAlign?("left"===this.horizontalAlign?(s=t.x1+2+z._lineHeight/2,D=t.y2-2-(this.maxWidth/2-K.width/2),w=-90,F="left",this.width=K.height,this.height=K.width):"right"===this.horizontalAlign?(s=t.x2-2-z._lineHeight/2,D=t.y1+2+(this.maxWidth/2-K.width/2),w=90,F="right",this.width=K.height,this.height=K.width):(D=t.y1+2+(t.height/2-K.height/2)+z._lineHeight/2,s=t.x1+2+(t.width/2-K.width/2),F="center",this.width=K.width,this.height=K.height),t="center"):("bottom"===
|
|
134
|
+
this.verticalAlign?(D=t.y2-2-K.height+z._lineHeight/2,F="bottom"):(D=t.y1+2+z._lineHeight/2,F="top"),s="left"===this.horizontalAlign?t.x1+2:"right"===this.horizontalAlign?t.x2-2-K.width-s:t.x1+t.width/2-K.width/2,t=this.horizontalAlign,this.width=K.width,this.height=K.height);z.x=s;z.y=D;z.angle=w;z.horizontalAlign=t;this._textBlock=z;n.layoutManager.registerSpace(F,{width:this.width+("left"===F||"right"===F?this.margin+2:0),height:this.height+("top"===F||"bottom"===F?this.margin+2:0)});this.bounds=
|
|
135
|
+
{x1:s,y1:D-z._lineHeight/2,x2:s+this.width,y2:D+this.height-z._lineHeight/2};"center"===this.verticalAlign&&("left"===this.horizontalAlign&&(this.bounds={x1:s-z._lineHeight/2,y1:D-this.height,x2:s+this.width-z._lineHeight/2,y2:D}),"right"===this.horizontalAlign&&(this.bounds={x1:s-z._lineHeight/2,y1:D,x2:s+this.width-z._lineHeight/2,y2:D+this.height}));this.ctx.textBaseline="top"}};Da.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};ra(Ka,W);Ka.prototype.setLayout=Da.prototype.setLayout;
|
|
136
|
+
Ka.prototype.render=Da.prototype.render;Ya.prototype.get=function(l,t){var s=null;0<this.pool.length?(s=this.pool.pop(),Oa(s,l,t)):s=xa(l,t);return s};Ya.prototype.release=function(l){this.pool.push(l)};ra(La,W);var Sa={addTheme:function(l,t){Qa[l]=t},addColorSet:function(l,t){Ea[l]=t},addCultureInfo:function(l,t){Ma[l]=t},formatNumber:function(l,t,s){s=s||"en";if(Ma[s])return ea(l,t||"#,##0.##",new La(s));throw"Unknown Culture Name";},formatDate:function(l,t,s){s=s||"en";if(Ma[s])return Fa(l,t||
|
|
137
137
|
"DD MMM YYYY",new La(s));throw"Unknown Culture Name";}};"undefined"!==typeof module&&"undefined"!==typeof module.exports?module.exports=Sa:"function"===typeof define&&define.amd?define([],function(){return Sa}):(window.CanvasJS&&window.console&&window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."),window.CanvasJS=window.CanvasJS?window.CanvasJS:Sa);s=Sa.Chart=function(){function n(a,
|
|
138
138
|
e){return a.x-e.x}function s(a,e,c){e=e||{};l(c)?(this.predefinedThemes=Qa,this.optionsName=this.parent=this.index=null):(this.parent=c.parent,this.index=c.index,this.predefinedThemes=c.predefinedThemes,this.optionsName=c.optionsName,this.stockChart=c.stockChart,this.panel=a,this.isOptionsInArray=c.isOptionsInArray);this.theme=l(e.theme)||l(this.predefinedThemes[e.theme])?"light1":e.theme;s.base.constructor.call(this,"Chart",this.optionsName,e,this.index,this.parent);var b=this;this._containerId=
|
|
139
139
|
a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=!1;this.renderCount=0;this.disableToolTip=this.animatedRender=!1;this.canvasPool=new Ya;this.allDOMEventHandlers=[];this.panEnabled=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):
|
|
140
140
|
this._containerId)?(this.container.innerHTML="",e=a=0,e=db(this.container),a=this.options.width?this.width:0<this.container.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)?this.container.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight):this.width,e=c&&c.height?c.height:this.options.height?this.height:0<this.container.clientHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)?this.container.clientHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom):this.height,
|
|
141
141
|
this.width=a,this.height=e,this.x1=this.y1=0,this.x2=this.width,this.y2=this.height,this.selectedColorSet="undefined"!==typeof Ea[this.colorSet]?Ea[this.colorSet]:Ea.colorSet1,this._canvasJSContainer=document.createElement("div"),this._canvasJSContainer.setAttribute("class","canvasjs-chart-container"),this._canvasJSContainer.style.position="relative",this._canvasJSContainer.style.textAlign="left",this._canvasJSContainer.style.cursor="auto",this._canvasJSContainer.style.direction="ltr",t||(this._canvasJSContainer.style.height=
|
|
142
|
-
"0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=
|
|
143
|
-
this._preRenderCtx.textBaseline="top",Ba(this._preRenderCtx),t?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=
|
|
142
|
+
"0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=xa(a,e),this._preRenderCanvas=xa(a,e),this.canvas.style.position="absolute",this.canvas.style.WebkitUserSelect="none",this.canvas.style.MozUserSelect="none",this.canvas.style.msUserSelect="none",this.canvas.style.userSelect="none",this.canvas.getContext&&(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",Ba(this.ctx),this._preRenderCtx=this._preRenderCanvas.getContext("2d"),
|
|
143
|
+
this._preRenderCtx.textBaseline="top",Ba(this._preRenderCtx),t?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=xa(a,e),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),this.overlaidCanvas=xa(a,e),this.overlaidCanvas.style.position="absolute",this.overlaidCanvas.style.webkitTapHighlightColor="transparent",this.overlaidCanvas.style.WebkitUserSelect=
|
|
144
144
|
"none",this.overlaidCanvas.style.MozUserSelect="none",this.overlaidCanvas.style.msUserSelect="none",this.overlaidCanvas.style.userSelect="none",this.overlaidCanvas.getContext&&(this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline="top",Ba(this.overlaidCanvasCtx)),this._eventManager=new ia(this),this.windowResizeHandler=L(window,"resize",function(){b._updateSize()&&(b.render(),b.isNavigator&&(b.stockChart&&
|
|
145
145
|
b.stockChart.navigator&&b.stockChart.navigator.enabled)&&b.stockChart.navigator._updateSlider(b.stockChart._axisXMin,b.stockChart._axisXMax))},this.allDOMEventHandlers),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),Q(this._toolBar,{position:"absolute",right:"1px",top:"1px",webkitTapHighlightColor:"transparent"}),this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},L(this.overlaidCanvas,"click",
|
|
146
|
-
function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);
|
|
147
|
-
"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?
|
|
148
|
-
this.allDOMEventHandlers),this.toolTip=new na(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function
|
|
149
|
-
0.01:a[h].x-a[k].x))*(e-1)/2+1;var l=(a[h].x-a[g].x)/b;b=(a[h].y-a[g].y)/b;c[c.length]=a[k].x>a[g].x&&0<l||a[k].x<a[g].x&&0>l?{x:a[k].x+l/3,y:a[k].y+b/3}:{x:a[k].x,y:a[k].y+(1===c.length?0:b/9)};k=d;g=0===k?0:k-1;h=k===a.length-1?k:k+1;b=Math.abs((a[h].x-a[g].x)/(0===a[k].x-a[g].x?0.01:a[k].x-a[g].x))*(e-1)/2+1;l=(a[h].x-a[g].x)/b;b=(a[h].y-a[g].y)/b;c[c.length]=a[k].x>a[g].x&&0<l||a[k].x<a[g].x&&0>l?{x:a[k].x-l/3,y:a[k].y-b/3}:
|
|
150
|
-
d,g,h,k,l,m){var
|
|
151
|
-
d)/2)-p)):0<k.thickness&&(a.moveTo(Math.round((e+b)/2)-p,c+h.thickness/2),a.lineTo(Math.round((e+b)/2)-p,d-h.thickness/2));a.stroke();a.strokeStyle=h.color||g;a.lineWidth=h.thickness||2;a.setLineDash&&a.setLineDash(K(h.dashType,h.thickness));a.beginPath();l&&0<h.thickness?(a.moveTo(b-
|
|
152
|
-
e,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=$a(this.fontFamily,this.fontSize,this.fontWeight);
|
|
153
|
-
"DataSeries","data",e,c,a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=c;this.noDataPointsInPlotArea=0;this.id=b;this.chart._eventManager.objectMap[b]={id:b,objectType:"dataSeries",dataSeriesIndex:c};a=e.dataPoints?e.dataPoints.length:0;this.dataPointEOs=[];for(e=0;e<a;e++)this.dataPointEOs[e]={};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray
|
|
154
|
-
0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function z(a,e,c,b,d,g){z.base.constructor.call(this,"Axis",e,c,b,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=
|
|
155
|
-
viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===d?("left"===g||"bottom"===g?(this.optionsName="axisX",l(this.chart.sessionVariables.axisX[b])&&(this.chart.sessionVariables.axisX[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX[b]):(this.optionsName="axisX2",l(this.chart.sessionVariables.axisX2[b])&&(this.chart.sessionVariables.axisX2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[b]),
|
|
156
|
-
null)):"left"===g||"bottom"===g?(this.optionsName="axisY",l(this.chart.sessionVariables.axisY[b])&&(this.chart.sessionVariables.axisY[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY[b]):(this.optionsName="axisY2",l(this.chart.sessionVariables.axisY2[b])&&(this.chart.sessionVariables.axisY2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[b]);"undefined"===typeof this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));
|
|
157
|
-
typeof this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=d;"axisX"!==d||c&&"undefined"!==typeof c.gridThickness||(this.gridThickness=0);this._position=g;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this.options.scaleBreaks&&(this.scaleBreaks=
|
|
158
|
-
this.options.scaleBreaks,++this.chart._eventManager.lastObjectId,this));this.stripLines=[];if(this.options.stripLines&&0<this.options.stripLines.length)for(a=0;a<this.options.stripLines.length;a++)this.stripLines.push(new ha(this.chart,this.options.stripLines[a],a,++this.chart._eventManager.lastObjectId,this));this.options.crosshair&&(this.crosshair=new da(this.chart,this.options.crosshair,this),this.crosshair._updatedValue=l(this.sessionVariables.crosshairValue)?null:this.sessionVariables.crosshairValue);
|
|
146
|
+
function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);wa(b._dropdownMenu);b.stockChart&&b.stockChart._dropdownMenu&&wa(b.stockChart._dropdownMenu)},this.allDOMEventHandlers),L(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},
|
|
147
|
+
this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),L(this.overlaidCanvas,window.navigator.msPointerEnabled?
|
|
148
|
+
"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),this.toolTip=new na(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function w(a,e){for(var c=[],b,d=0;d<a.length;d++)if(0==d)c.push(a[0]);else{var g,h,k;k=d-1;g=0===k?0:k-1;
|
|
149
|
+
h=k===a.length-1?k:k+1;b=Math.abs((a[h].x-a[g].x)/(0===a[h].x-a[k].x?0.01:a[h].x-a[k].x))*(e-1)/2+1;var l=(a[h].x-a[g].x)/b;b=(a[h].y-a[g].y)/b;c[c.length]=a[k].x>a[g].x&&0<l||a[k].x<a[g].x&&0>l?{x:a[k].x+l/3,y:a[k].y+b/3}:{x:a[k].x,y:a[k].y+(1===c.length?0:b/9)};k=d;g=0===k?0:k-1;h=k===a.length-1?k:k+1;b=Math.abs((a[h].x-a[g].x)/(0===a[k].x-a[g].x?0.01:a[k].x-a[g].x))*(e-1)/2+1;l=(a[h].x-a[g].x)/b;b=(a[h].y-a[g].y)/b;c[c.length]=a[k].x>a[g].x&&0<l||a[k].x<a[g].x&&0>l?{x:a[k].x-l/3,y:a[k].y-b/3}:
|
|
150
|
+
{x:a[k].x,y:a[k].y-b/9};c[c.length]=a[d]}return c}function D(a,e,c,b,d,g,h,k,l,m){var q=0;m?(h.color=g,k.color=g):m=1;q=l?Math.abs(d-c):Math.abs(b-e);q=0<h.trimLength?Math.abs(q*h.trimLength/100):Math.abs(q-h.length);l?(c+=q/2,d-=q/2):(e+=q/2,b-=q/2);var q=1===Math.round(h.thickness)%2?0.5:0,p=1===Math.round(k.thickness)%2?0.5:0;a.save();a.globalAlpha=m;a.strokeStyle=k.color||g;a.lineWidth=k.thickness||2;a.setLineDash&&a.setLineDash(K(k.dashType,k.thickness));a.beginPath();l&&0<k.thickness?(a.moveTo(b-
|
|
151
|
+
h.thickness/2,Math.round((c+d)/2)-p),a.lineTo(e+h.thickness/2,Math.round((c+d)/2)-p)):0<k.thickness&&(a.moveTo(Math.round((e+b)/2)-p,c+h.thickness/2),a.lineTo(Math.round((e+b)/2)-p,d-h.thickness/2));a.stroke();a.strokeStyle=h.color||g;a.lineWidth=h.thickness||2;a.setLineDash&&a.setLineDash(K(h.dashType,h.thickness));a.beginPath();l&&0<h.thickness?(a.moveTo(b-q,c),a.lineTo(b-q,d),a.moveTo(e+q,c),a.lineTo(e+q,d)):0<h.thickness&&(a.moveTo(e,c+q),a.lineTo(b,c+q),a.moveTo(e,d-q),a.lineTo(b,d-q));a.stroke();
|
|
152
|
+
a.restore()}function F(a,e){F.base.constructor.call(this,"Legend","legend",e,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=$a(this.fontFamily,this.fontSize,this.fontWeight);
|
|
153
|
+
this.horizontalSpacing=this.fontSize}function T(a,e,c,b){T.base.constructor.call(this,"DataSeries","data",e,c,a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=c;this.noDataPointsInPlotArea=0;this.id=b;this.chart._eventManager.objectMap[b]={id:b,objectType:"dataSeries",dataSeriesIndex:c};a=e.dataPoints?e.dataPoints.length:0;this.dataPointEOs=[];for(e=0;e<a;e++)this.dataPointEOs[e]={};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=
|
|
154
|
+
!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=0.7:this.fillOpacity=1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function z(a,e,c,b,d,g){z.base.constructor.call(this,"Axis",e,c,b,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=
|
|
155
|
+
this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,viewPortMin:Infinity,viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===d?("left"===g||"bottom"===g?(this.optionsName="axisX",l(this.chart.sessionVariables.axisX[b])&&(this.chart.sessionVariables.axisX[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX[b]):(this.optionsName="axisX2",l(this.chart.sessionVariables.axisX2[b])&&(this.chart.sessionVariables.axisX2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[b]),
|
|
156
|
+
this.options.interval||(this.intervalType=null)):"left"===g||"bottom"===g?(this.optionsName="axisY",l(this.chart.sessionVariables.axisY[b])&&(this.chart.sessionVariables.axisY[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY[b]):(this.optionsName="axisY2",l(this.chart.sessionVariables.axisY2[b])&&(this.chart.sessionVariables.axisY2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[b]);"undefined"===typeof this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));
|
|
157
|
+
"undefined"===typeof this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=d;"axisX"!==d||c&&"undefined"!==typeof c.gridThickness||(this.gridThickness=0);this._position=g;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this.options.scaleBreaks&&(this.scaleBreaks=
|
|
158
|
+
new fa(this.chart,this.options.scaleBreaks,++this.chart._eventManager.lastObjectId,this));this.stripLines=[];if(this.options.stripLines&&0<this.options.stripLines.length)for(a=0;a<this.options.stripLines.length;a++)this.stripLines.push(new ha(this.chart,this.options.stripLines[a],a,++this.chart._eventManager.lastObjectId,this));this.options.crosshair&&(this.crosshair=new da(this.chart,this.options.crosshair,this),this.crosshair._updatedValue=l(this.sessionVariables.crosshairValue)?null:this.sessionVariables.crosshairValue);
|
|
159
159
|
this._titleTextBlock=null;this.hasOptionChanged("viewportMinimum")&&null===this.viewportMinimum&&(this.options.viewportMinimum=void 0,this.sessionVariables.viewportMinimum=null);this.hasOptionChanged("viewportMinimum")||isNaN(this.sessionVariables.newViewportMinimum)||null===this.sessionVariables.newViewportMinimum?this.sessionVariables.newViewportMinimum=null:this.viewportMinimum=this.sessionVariables.newViewportMinimum;this.hasOptionChanged("viewportMaximum")&&null===this.viewportMaximum&&(this.options.viewportMaximum=
|
|
160
160
|
void 0,this.sessionVariables.viewportMaximum=null);this.hasOptionChanged("viewportMaximum")||isNaN(this.sessionVariables.newViewportMaximum)||null===this.sessionVariables.newViewportMaximum?this.sessionVariables.newViewportMaximum=null:this.viewportMaximum=this.sessionVariables.newViewportMaximum;null!==this.minimum&&null!==this.viewportMinimum&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));null!==this.maximum&&null!==this.viewportMaximum&&(this.viewportMaximum=Math.min(this.viewportMaximum,
|
|
161
161
|
this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum");l(this.options.tickLength)&&(this.tickLength="left"===g||"right"===g?Math.min(this.tickLength,0.3*this.chart.width):Math.min(this.tickLength,0.3*this.chart.height))}function fa(a,e,c,b){fa.base.constructor.call(this,"ScaleBreaks","scaleBreaks",e,null,b);this.id=c;this.chart=a;this.ctx=this.chart.ctx;this.axis=b;this.optionsName="scaleBreaks";this.isOptionsInArray=!1;this._appliedBreaks=[];this.customBreaks=[];
|
|
@@ -166,21 +166,21 @@ this.color=c.color?this.color:g.color;this.lineColor=c.lineColor?this.lineColor:
|
|
|
166
166
|
"undefined"===typeof c.spacing?g.spacing:c.spacing;"string"===typeof this.options.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=isNaN(this.spacing)?0:(10<this.spacing?10:this.spacing)+"%"):"number"!==typeof this.options.spacing&&(this.spacing=g.spacing);this.size=g.parent.logarithmic?1:0}function ha(a,e,c,b,d){ha.base.constructor.call(this,"StripLine","stripLines",e,c,d);this.id=b;this.chart=a;this.ctx=this.chart.ctx;this.label=this.label;this.axis=d;this.optionsName="stripLines";this.isOptionsInArray=
|
|
167
167
|
!0;this._thicknessType="pixel";null!==this.startValue&&null!==this.endValue&&(this.value=d.logarithmic?Math.sqrt((this.startValue.getTime?this.startValue.getTime():this.startValue)*(this.endValue.getTime?this.endValue.getTime():this.endValue)):((this.startValue.getTime?this.startValue.getTime():this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this._thicknessType=null);this.tickLength=l(e.tickLength)?d.tickLength:e.tickLength}function da(a,e,c){da.base.constructor.call(this,
|
|
168
168
|
"Crosshair","crosshair",e,null,c);this.chart=a;this.ctx=this.chart.ctx;this.axis=c;this.optionsName="crosshair";this._thicknessType="pixel"}function na(a,e){na.base.constructor.call(this,"ToolTip","toolTip",e,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._prevY=this._prevX=NaN;this.containerTransitionDuration=0.1;this.mozContainerTransition=this.getContainerTransition(this.containerTransitionDuration);this.optionsName=
|
|
169
|
-
"toolTip";this._initialize()}function ia(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=
|
|
169
|
+
"toolTip";this._initialize()}function ia(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=xa(this.chart.width,this.chart.height,!0);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function ma(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}ra(s,W);s.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&
|
|
170
170
|
this._animator.cancelAllAnimations();this._panTimerId&&clearTimeout(this._panTimerId);for(var e=0;e<a.length;e++){var c=a[e][0],b=a[e][1],d=a[e][2],g=a[e][3],g=g||!1;c.removeEventListener?c.removeEventListener(b,d,g):c.detachEvent&&c.detachEvent("on"+b,d)}this.allDOMEventHandlers=[];for(this.removeAllEventListeners();this._canvasJSContainer&&this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild);for(;this.container&&this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild);
|
|
171
171
|
for(;this._dropdownMenu&&this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild);this.container=this._canvasJSContainer=null;this.toolTip.container=null;this.canvas&&Aa(this.canvas);this.overlaidCanvas&&Aa(this.overlaidCanvas);this._preRenderCanvas&&Aa(this._preRenderCanvas);this._breaksCanvas&&Aa(this._breaksCanvas);this._eventManager&&this._eventManager.ghostCanvas&&Aa(this._eventManager.ghostCanvas);this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=
|
|
172
172
|
this._zoomButton=null};s.prototype._updateOptions=function(){var a=this;this.updateOption("width");this.updateOption("height");this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.stockChart&&this.stockChart.options&&"undefined"!==typeof this.stockChart.options.theme&&l(this.options.theme)?this.theme=this.stockChart.theme:l(this.stockChart)&&l(this.theme)&&(this.theme=
|
|
173
173
|
"light1");this.updateOption("colorSet")&&(this.selectedColorSet="undefined"!==typeof Ea[this.colorSet]?Ea[this.colorSet]:Ea.colorSet1);this.updateOption("backgroundColor");this.stockChart&&(this.stockChart.options&&"undefined"!==typeof this.stockChart.options.backgroundColor&&l(this.options.backgroundColor))&&(this.backgroundColor=this.stockChart.backgroundColor);this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this.stockChart&&l(this.options.culture)&&(this.culture=
|
|
174
174
|
this.stockChart.culture);this._cultureInfo=new La(this.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&t;this.updateOption("animationDuration");this.stockChart&&(this.stockChart.options&&!l(this.stockChart.options.animationEnabled))&&(this.animationEnabled=this.stockChart.animationEnabled&&t);this.stockChart&&(this.stockChart.options&&!l(this.stockChart.options.animationDuration))&&(this.animationDuration=this.stockChart.animationDuration);this.updateOption("rangeChanging");
|
|
175
175
|
this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.toolbar=new Xa(this,this.options.toolbar);if(this.stockChart&&this.stockChart.options&&this.stockChart.options.toolbar&&!this.options.toolbar)for(var e in this.stockChart.options.toolbar)this.toolbar[e]=this.stockChart.options.toolbar[e];if(this.options.zoomEnabled||this.panEnabled){if(this._zoomButton)Q(this._zoomButton,{border:this.toolbar.buttonBorderThickness+
|
|
176
|
-
"px solid "+this.toolbar.buttonBorderColor,height:2*this.toolbar.buttonBorderThickness+25+"px",width:2*this.toolbar.buttonBorderThickness+40+"px",backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&this._zoomButton.childNodes[0]&&Q(this._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});else{var c=!1;
|
|
176
|
+
"px solid "+this.toolbar.buttonBorderColor,height:2*this.toolbar.buttonBorderThickness+25+"px",width:2*this.toolbar.buttonBorderThickness+40+"px",backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&this._zoomButton.childNodes[0]&&Q(this._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});else{var c=!1;wa(this._zoomButton=document.createElement("button"));va(this,this._zoomButton,"pan");this._toolBar.appendChild(this._zoomButton);
|
|
177
177
|
Q(this._zoomButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,height:2*this.toolbar.buttonBorderThickness+25+"px",width:2*this.toolbar.buttonBorderThickness+40+"px",backgroundClip:"padding-box"});L(this._zoomButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers);L(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,va(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"));a.render()},
|
|
178
178
|
this.allDOMEventHandlers);L(this._zoomButton,"mousemove",function(){c?c=!1:(Q(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);L(this._zoomButton,"mouseout",function(){c||(Q(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,
|
|
179
179
|
transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?(Q(this._resetButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,borderLeft:"none",height:2*this.toolbar.buttonBorderThickness+25+"px",width:this.toolbar.buttonBorderThickness+40+"px",backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),
|
|
180
|
-
0>=navigator.userAgent.search("MSIE")&&this._resetButton.childNodes[0]&&Q(this._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}),this._resetButton.title=this._cultureInfo.resetText):(c=!1,
|
|
180
|
+
0>=navigator.userAgent.search("MSIE")&&this._resetButton.childNodes[0]&&Q(this._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}),this._resetButton.title=this._cultureInfo.resetText):(c=!1,wa(this._resetButton=document.createElement("button")),va(this,this._resetButton,"reset"),Q(this._resetButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,borderLeft:"none",height:2*this.toolbar.buttonBorderThickness+25+"px",width:this.toolbar.buttonBorderThickness+
|
|
181
181
|
40+"px",backgroundClip:"padding-box"}),this._toolBar.appendChild(this._resetButton),L(this._resetButton,"touchstart",function(a){c=!0},this.allDOMEventHandlers),L(this._resetButton,"click",function(){a.toolTip.hide();a.toolTip&&a.toolTip.enabled&&a.toolTip.dispatchEvent("hidden",{chart:a,toolTip:a.toolTip},a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=
|
|
182
182
|
!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=null,a.sessionVariables.axisX[b].newViewportMaximum=null;if(a.sessionVariables.axisX2)for(b=0;b<a.sessionVariables.axisX2.length;b++)a.sessionVariables.axisX2[b].newViewportMinimum=null,a.sessionVariables.axisX2[b].newViewportMaximum=null;if(a.sessionVariables.axisY)for(b=0;b<a.sessionVariables.axisY.length;b++)a.sessionVariables.axisY[b].newViewportMinimum=null,a.sessionVariables.axisY[b].newViewportMaximum=
|
|
183
|
-
null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();0>=navigator.userAgent.search("MSIE")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});
|
|
183
|
+
null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();0>=navigator.userAgent.search("MSIE")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});wa(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter={stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,
|
|
184
184
|
maximum:null});a._dispatchRangeEvent("rangeChanging","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanging",a.stockChart.dispatchEvent("rangeChanging",a.stockChart._rangeEventParameter,a.stockChart));a.render();a.syncCharts&&a.stockChart&&(a.stockChart.rangeUpdatedBy=!a.stockChart.navigator.slider||l(a.stockChart.navigator.slider.options.minimum)&&l(a.stockChart.navigator.slider.options.maximum)?!a.stockChart.rangeSelector.enabled||!a.stockChart.rangeSelector.inputFields.enabled||
|
|
185
185
|
l(a.stockChart.rangeSelector.inputFields.options.startValue)&&l(a.stockChart.rangeSelector.inputFields.options.endValue)?null:"inputFields":"navigator",a.stockChart.rangeUpdatedBy=null,a.stockChart.rangeSelector.sessionVariables._clickedRangeButtonIndex=null,a.syncCharts(null,null),!l(a.stockChart._selectedRangeButtonIndex)&&a.stockChart._selectedRangeButtonIndex<a.stockChart.rangeSelector.buttons.length&&(b=a.stockChart.rangeSelector.buttons[a.stockChart._selectedRangeButtonIndex],b.enabled&&(b.state=
|
|
186
186
|
"on",b.textBlock.fontWeight="bold",b.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect,b.render())),a.stockChart.rangeSelector&&a.stockChart.rangeSelector.enabled&&a.stockChart.rangeSelector.render());a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,
|
|
@@ -211,443 +211,443 @@ new z(this,"axisX2",this.options.axisX2,0,"axisX","right"))),this.data[e].axisX=
|
|
|
211
211
|
0);for(c=0;c<this.axisY2.length-1;c++)"undefined"===typeof this.axisY2[c].options.margin&&(this.axisY2[c].margin=10)}this.axisY&&0<this.axisY.length&&(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(c=0;c<this.axisX.length;c++)"undefined"===typeof this.axisX[c].options.gridThickness&&
|
|
212
212
|
(this.axisX[c].gridThickness=0);if(this.axisX2)for(c=0;c<this.axisX2.length;c++)"undefined"===typeof this.axisX2[c].options.gridThickness&&(this.axisX2[c].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));c=!1;if(0<this._axes.length&&
|
|
213
213
|
this.options.zoomEnabled&&(this.zoomEnabled||this.panEnabled))for(e=0;e<this._axes.length;e++)if(!l(this._axes[e].viewportMinimum)||!l(this._axes[e].viewportMaximum)){c=!0;break}c?(this._menuButton&&Q(this._menuButton,{border:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,borderLeft:"none",height:2*this.toolbar.buttonBorderThickness+25+"px",width:this.toolbar.buttonBorderThickness+40+"px",backgroundClip:"padding-box"}),Na(this._zoomButton,this._resetButton),this._toolBar.style.border=
|
|
214
|
-
"none"):(this._menuButton&&Q(this._menuButton,{border:"none",height:"25px",width:"40px"}),
|
|
215
|
-
this.options.subtitles[e],e),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new
|
|
216
|
-
(this._breaksCanvas=
|
|
214
|
+
"none"):(this._menuButton&&Q(this._menuButton,{border:"none",height:"25px",width:"40px"}),wa(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));hb(this);this._processData();this.title=new Da(this,this.options.title);this.title.dockInsidePlotArea?a.push(this.title):this.title.setLayout();if(this.options.subtitles)for(e=0;e<this.options.subtitles.length;e++)c=new Ka(this,
|
|
215
|
+
this.options.subtitles[e],e),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new F(this,this.options.legend);for(e=0;e<this.data.length;e++)(this.data[e].showInLegend||"pie"===this.data[e].type||"doughnut"===this.data[e].type||"funnel"===this.data[e].type||"pyramid"===this.data[e].type)&&this.legend.dataSeries.push(this.data[e]);this.legend.dockInsidePlotArea?a.push(this.legend):this.legend.setLayout();for(e=0;e<this._axes.length;e++)if(this._axes[e].scaleBreaks&&this._axes[e].scaleBreaks._appliedBreaks.length){t?
|
|
216
|
+
(this._breaksCanvas=xa(this.width,this.height,!0),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=xa(this.width,this.height);this._preRenderCtx=this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||z.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};s.prototype.renderElements=
|
|
217
217
|
function(){if(this.height&&this.width){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var e=0;e<this.subtitles.length;e++)this.subtitles[e].dockInsidePlotArea||this.subtitles[e].render();this.legend.dockInsidePlotArea||this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)z.render(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement);else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();
|
|
218
|
-
else return;for(e=0;e<a.length;e++)a[e].setLayout(),a[e].render();var c=[];if(this.animatedRender){var b=
|
|
219
|
-
0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(e=0;e<this.plotInfo.plotTypes.length;e++)for(var g=this.plotInfo.plotTypes[e],h=0;h<g.plotUnits.length;h++){var k=g.plotUnits[h],
|
|
220
|
-
k.type?
|
|
221
|
-
k.type?
|
|
222
|
-
"rangeBar"===k.type?
|
|
223
|
-
dest:this.plotArea.ctx,animationCallback:
|
|
224
|
-
0;d<c.length;d++)
|
|
225
|
-
!1;
|
|
218
|
+
else return;for(e=0;e<a.length;e++)a[e].setLayout(),a[e].render();var c=[];if(this.animatedRender){var b=xa(this.width,this.height);b.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}kb(this);var a=this.ctx.miterLimit,d;this.ctx.miterLimit=3;t&&this._breaksCanvas&&(this._preRenderCtx.drawImage(this.canvas,0,0,this.width,this.height),this._preRenderCtx.drawImage(this._breaksCanvas,0,0,this.width,this.height),this._breaksCanvasCtx.globalCompositeOperation="source-atop",this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
219
|
+
0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(e=0;e<this.plotInfo.plotTypes.length;e++)for(var g=this.plotInfo.plotTypes[e],h=0;h<g.plotUnits.length;h++){var k=g.plotUnits[h],M=null;k.targetCanvas&&Aa(k.targetCanvas);k.targetCanvas=null;this.animatedRender&&(k.targetCanvas=xa(this.width,this.height),k.targetCanvasCtx=k.targetCanvas.getContext("2d"),d=k.targetCanvasCtx.miterLimit,k.targetCanvasCtx.miterLimit=3);"line"===k.type?M=this.renderLine(k):"stepLine"===
|
|
220
|
+
k.type?M=this.renderStepLine(k):"spline"===k.type?M=this.renderSpline(k):"column"===k.type?M=this.renderColumn(k):"bar"===k.type?M=this.renderBar(k):"area"===k.type?M=this.renderArea(k):"stepArea"===k.type?M=this.renderStepArea(k):"splineArea"===k.type?M=this.renderSplineArea(k):"stackedColumn"===k.type?M=this.renderStackedColumn(k):"stackedColumn100"===k.type?M=this.renderStackedColumn100(k):"stackedBar"===k.type?M=this.renderStackedBar(k):"stackedBar100"===k.type?M=this.renderStackedBar100(k):"stackedArea"===
|
|
221
|
+
k.type?M=this.renderStackedArea(k):"stackedArea100"===k.type?M=this.renderStackedArea100(k):"bubble"===k.type?M=M=this.renderBubble(k):"scatter"===k.type?M=this.renderScatter(k):"pie"===k.type?this.renderPie(k):"doughnut"===k.type?this.renderPie(k):"funnel"===k.type?M=this.renderFunnel(k):"pyramid"===k.type?M=this.renderFunnel(k):"candlestick"===k.type?M=this.renderCandlestick(k):"ohlc"===k.type?M=this.renderCandlestick(k):"rangeColumn"===k.type?M=this.renderRangeColumn(k):"error"===k.type?M=this.renderError(k):
|
|
222
|
+
"rangeBar"===k.type?M=this.renderRangeBar(k):"rangeArea"===k.type?M=this.renderRangeArea(k):"rangeSplineArea"===k.type?M=this.renderRangeSplineArea(k):"waterfall"===k.type?M=this.renderWaterfall(k):"boxAndWhisker"===k.type&&(M=this.renderBoxAndWhisker(k));for(var m=0;m<k.dataSeriesIndexes.length;m++)this._dataInRenderedOrder.push(this.data[k.dataSeriesIndexes[m]]);this.animatedRender&&(k.targetCanvasCtx.miterLimit=d,M&&c.push(M))}this.ctx.miterLimit=a;this.animatedRender&&this._breaksCanvasCtx&&c.push({source:this._breaksCanvasCtx,
|
|
223
|
+
dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0,startTimePercent:0.7});this.animatedRender&&0<this._indexLabels.length&&(d=xa(this.width,this.height).getContext("2d"),Ba(d),c.push(this.renderIndexLabels(d)));var q=this;if(0<c.length)q.disableToolTip=!0,q._animator.animate(200,q.animationDuration,function(a){q.ctx.clearRect(0,0,q.width,q.height);q.ctx.drawImage(b,0,0,Math.floor(q.width*ka),Math.floor(q.height*ka),0,0,q.width,q.height);for(var d=
|
|
224
|
+
0;d<c.length;d++)M=c[d],1>a&&"undefined"!==typeof M.startTimePercent?a>=M.startTimePercent&&M.animationCallback(M.easingFunction(a-M.startTimePercent,0,1,1-M.startTimePercent),M):M.animationCallback(M.easingFunction(a,0,1,1),M);q.dispatchEvent("dataAnimationIterationEnd",{chart:q})},function(){c=[];for(var a=0;a<q.plotInfo.plotTypes.length;a++)for(var d=q.plotInfo.plotTypes[a],e=0;e<d.plotUnits.length;e++){var g=d.plotUnits[e];g.targetCanvas&&Aa(g.targetCanvas);g.targetCanvas=null}b=null;q.disableToolTip=
|
|
225
|
+
!1;q.dispatchEvent("dataAnimationEnd",{chart:q})});else{if(q._breaksCanvas)if(t)q.plotArea.ctx.drawImage(q._breaksCanvas,0,0,this.width,this.height);else for(m=0;m<q._axes.length;m++)q._axes[m].createMask();0<q._indexLabels.length&&q.renderIndexLabels();q.dispatchEvent("dataAnimationIterationEnd",{chart:q});q.dispatchEvent("dataAnimationEnd",{chart:q})}this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||wa(this._zoomButton,
|
|
226
226
|
this._resetButton);l(this.toolTip._xValue)||l(this.toolTip._dataSeriesIndex)||this.toolTip.showAtX(this.toolTip._xValue,this.toolTip._dataSeriesIndex);this.toolTip._updateToolTip();this.toolTip.enabled&&this.toolTip._updatedEventParameters&&!isNaN(this.toolTip._prevX)&&!isNaN(this.toolTip._prevY)&&this.toolTip.container&&this.toolTip.container.style&&this.toolTip.dispatchEvent("none"===this.toolTip.container.style.display?"hidden":"updated",this.toolTip._updatedEventParameters,this.toolTip);this.renderCount++;
|
|
227
|
-
Ja&&(
|
|
227
|
+
Ja&&(q=this,setTimeout(function(){var a=document.getElementById("ghostCanvasCopy");a&&(Oa(a,q.width,q.height),a.getContext("2d").drawImage(q._eventManager.ghostCanvas,0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx);for(m=0;m<this._axes.length;m++)this._axes[m].maskCanvas&&(delete this._axes[m].maskCanvas,delete this._axes[m].maskCtx)}};s.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();this._preRenderCanvas&&
|
|
228
228
|
Aa(this._preRenderCanvas)};s.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,mousemove:this._plotAreaMouseMove,cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};s.prototype.categoriseDataSeries=function(){for(var a="",e=0;e<this.data.length;e++)if(a=this.data[e],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=s._supportedChartTypes.indexOf(a.type)){for(var c=null,
|
|
229
229
|
b=!1,d=null,g=!1,h=0;h<this.plotInfo.plotTypes.length;h++)if(this.plotInfo.plotTypes[h].type===a.type){b=!0;c=this.plotInfo.plotTypes[h];break}b||(c={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(c));for(h=0;h<c.plotUnits.length;h++)if(c.plotUnits[h].axisYType===a.axisYType&&c.plotUnits[h].axisXType===a.axisXType&&c.plotUnits[h].axisYIndex===a.axisYIndex&&c.plotUnits[h].axisXIndex===a.axisXIndex){g=!0;d=c.plotUnits[h];break}g||(d={type:a.type,previousDataSeriesCount:0,index:c.plotUnits.length,
|
|
230
230
|
plotType:c,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===a.axisYType?this.axisY[0<=a.axisYIndex&&a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[],yAbsTotals:[]},
|
|
231
231
|
c.plotUnits.push(d));c.totalDataSeries++;d.dataSeriesIndexes.push(e);a.plotUnit=d}for(e=0;e<this.plotInfo.plotTypes.length;e++)for(c=this.plotInfo.plotTypes[e],h=a=0;h<c.plotUnits.length;h++)c.plotUnits[h].previousDataSeriesCount=a,a+=c.plotUnits[h].dataSeriesIndexes.length};s.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var e=this.data[a];if(e.dataPoints)for(var c=e.dataPoints.length,b=0;b<c;b++)e.dataPointIds[b]=++this._eventManager.lastObjectId}};s.prototype._processData=
|
|
232
232
|
function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var e=this.plotInfo.plotTypes[a],c=0;c<e.plotUnits.length;c++){var b=e.plotUnits[c];"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type?this._processMultiseriesPlotUnit(b):"stackedColumn"===b.type||"stackedBar"===b.type||"stackedArea"===b.type?
|
|
233
233
|
this._processStackedPlotUnit(b):"stackedColumn100"===b.type||"stackedBar100"===b.type||"stackedArea100"===b.type?this._processStacked100PlotUnit(b):"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type||"boxAndWhisker"===b.type?this._processMultiYPlotUnit(b):"waterfall"===b.type&&this._processSpecificPlotUnit(b)}this.calculateAutoBreaks()};s.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&
|
|
234
|
-
!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=0;
|
|
235
|
-
0:-Infinity,
|
|
236
|
-
b=
|
|
237
|
-
(
|
|
238
|
-
s.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=[],k=[],
|
|
239
|
-
a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,
|
|
240
|
-
1:0));
|
|
241
|
-
|
|
242
|
-
(
|
|
243
|
-
|
|
244
|
-
a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=!1,k=!1,
|
|
245
|
-
a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(p.dataPoints[
|
|
246
|
-
null:p.dataPoints[
|
|
247
|
-
d&&(
|
|
248
|
-
a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?h=!0:0>d&&(k=!0))}}p.axisX.valueType=p.xValueType=g?"dateTime":"number"}a.axisY.logarithmic?(e.max=l(e.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(e.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):h&&!k?(e.max=l(e.viewPortMax)?
|
|
249
|
-
99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99)):!h&&k&&(e.max=l(e.viewPortMax)?-1:Math.max(e.viewPortMax,-1),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99));e.viewPortMin=e.min;e.viewPortMax=e.max;a.dataPointYSums=m}};s.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,
|
|
250
|
-
|
|
251
|
-
a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(m.dataPoints[
|
|
252
|
-
(t=f),f=b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);g<e.min&&(e.min=g);h>e.max&&(e.max=h);0<
|
|
253
|
-
|
|
254
|
-
s.prototype._processSpecificPlotUnit=function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=0;h<a.dataSeriesIndexes.length;h++){var k=this.data[a.dataSeriesIndexes[h]],l=0,m=!1,
|
|
255
|
-
a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,f=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(k.dataPoints[l].x&&k.dataPoints[l].x.getTime||
|
|
256
|
-
|
|
257
|
-
b=0):(d="number"!==typeof k.dataPoints[l].y?0:k.dataPoints[l].y,k.dataPointEOs[l].cumulativeSumYStartValue=0===l?0:k.dataPointEOs[l-1].cumulativeSum,k.dataPointEOs[l].cumulativeSum=0===l?d:k.dataPointEOs[l-1].cumulativeSum+d,b+=d);for(l=0;l<k.dataPoints.length;l++)if("undefined"===typeof k.dataPoints[l].x&&(k.dataPoints[l].x=l+(a.axisX.logarithmic?1:0)),k.dataPoints[l].x.getTime?(g=!0,
|
|
258
|
-
e.min&&(e.min=k.dataPointEOs[l].cumulativeSum),k.dataPointEOs[l].cumulativeSum>e.max&&(e.max=k.dataPointEOs[l].cumulativeSum),0<l&&(a.axisX.logarithmic?(p=b/k.dataPoints[l-1].x,1>p&&(p=1/p),c.minDiff>p&&1!==p&&(c.minDiff=p)):(p=b-k.dataPoints[l-1].x,0>p&&(p*=-1),c.minDiff>p&&0!==p&&(c.minDiff=p)),null!==d&&null!==k.dataPoints[l-1].y&&(a.axisY.logarithmic?(d=
|
|
259
|
-
k.dataPointEOs[l-1].cumulativeSum,0>d&&(d*=-1),e.minDiff>d&&0!==d&&(e.minDiff=d)))),!(b<
|
|
260
|
-
k.dataPointEOs[l].cumulativeSum<e.viewPortMin&&(e.viewPortMin=k.dataPointEOs[l].cumulativeSum);k.dataPointEOs[l].cumulativeSum>e.viewPortMax&&(e.viewPortMax=k.dataPointEOs[l].cumulativeSum)}k.axisX.valueType=k.xValueType=g?"dateTime":"number"}};s.prototype.calculateAutoBreaks=function(){function a(a,b,c,d){if(d)return c=Math.pow(Math.min(c*a/b,b/a),
|
|
261
|
-
b-a));return{startValue:a+c,endValue:b-c}}function e(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var b=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,c=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(b||c)for(var
|
|
262
|
-
if(!(4>t.dataPoints.length))for(r=0;r<t.dataPoints.length;r++)if(b&&(
|
|
263
|
-
Math.floor((g[s]-k)/n),g[s]<
|
|
264
|
-
0;h<k.dataPoints.length;h++)g=(
|
|
265
|
-
10,10);k++)this._axes[h].dataInfo._dataRanges.push({min:Infinity,max:-Infinity})}if(g){for(h=0;h<this.plotInfo.plotTypes.length;h++)for(g=this.plotInfo.plotTypes[h],k=0;k<g.plotUnits.length;k++)b=g.plotUnits[k],"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||
|
|
266
|
-
b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===b.type||"boxAndWhisker"===b.type?e(b):0<=b.type.indexOf("stacked")&&c(b);for(h=0;h<this._axes.length;h++)if(this._axes[h].dataInfo._dataRanges){var
|
|
267
|
-
r=m;for(k in
|
|
268
|
-
1;k++)if(
|
|
269
|
-
g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].startValue&&this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].end||g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].endValue&&this._axes[h].scaleBreaks.customBreaks[k].endValue<=g[b].end)g.splice(b,1),b--;g.sort(function(a,b){return b.diff-a.diff});for(k=
|
|
270
|
-
this._axes[h].dataInfo.max-this._axes[h].dataInfo.min,this._axes[h].logarithmic),this._axes[h].scaleBreaks.autoBreaks.push(new ba(this,"autoBreaks",b,k,++this._eventManager.lastObjectId,this._axes[h].scaleBreaks)),this._axes[h].scaleBreaks._appliedBreaks.push(this._axes[h].scaleBreaks.autoBreaks[this._axes[h].scaleBreaks.autoBreaks.length-
|
|
271
|
-
this.axisX.length;b++)if(c=this.axisX[b].sessionVariables.crosshairShownByPixel,this.axisX[b]!=a&&this.axisX[b].crosshair&&this.axisX[b].crosshair.enabled&&!this.axisX[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&
|
|
272
|
-
this.axisX[b].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisX[b].convertPixelToValue(this.sessionVariables.mouseX)),l(e)||e)c={chart:this,crosshair:this.axisX[b].crosshair.options,axis:this.axisX[b],value:this.axisX[b].crosshair.value},this.axisX[b].crosshair.dispatchEvent("updated",
|
|
273
|
-
this.axisX2[b]!=a&&this.axisX2[b].crosshair&&this.axisX2[b].crosshair.enabled&&!this.axisX2[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&
|
|
274
|
-
this.axisX2[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisX2[b].convertPixelToValue(this.sessionVariables.mouseX)),l(e)||e)c={chart:this,crosshair:this.axisX2[b].crosshair.options,axis:this.axisX2[b],value:this.axisX2[b].crosshair.value},this.axisX2[b].crosshair.dispatchEvent("updated",c,this.axisX2[b])}else l(c)||
|
|
275
|
-
a&&this.axisY[b].crosshair&&this.axisY[b].crosshair.enabled&&!this.axisY[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===
|
|
276
|
-
this.sessionVariables.mouseY,this.axisY[b].convertPixelToValue(this.sessionVariables.mouseY)),l(e)||e)c={chart:this,crosshair:this.axisY[b].crosshair.options,axis:this.axisY[b],value:this.axisY[b].crosshair.value},this.axisY[b].crosshair.dispatchEvent("updated",c,this.axisY[b])}else l(c)||c||this.axisY[b].showCrosshair(this.axisY[b].crosshair._updatedValue);
|
|
277
|
-
|
|
278
|
-
this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseY)),l(e)||e)c={chart:this,crosshair:this.axisY2[b].crosshair.options,axis:this.axisY2[b],value:this.axisY2[b].crosshair.value},this.axisY2[b].crosshair.dispatchEvent("updated",c,this.axisY2[b])}else l(c)||c||this.axisY2[b].showCrosshair(this.axisY2[b].crosshair._updatedValue)};s.prototype.getDataPointAtXY=
|
|
279
|
-
e,c))&&b.push(g)}a=null;e=!1;for(c=0;c<b.length;c++)if("line"===b[c].dataSeries.type||"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(d=V("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=d/2){e=!0;break}for(c=0;c<b.length;c++)e&&"line"!==b[c].dataSeries.type&&"stepLine"!==b[c].dataSeries.type&&
|
|
280
|
-
function(a,e,c){var b=null;if(c=this.getDataPointAtXY(a,e,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(t)b=bb(a,e,this._eventManager.ghostCtx);else for(c=0;c<this.legend.items.length;c++){var d=this.legend.items[c];a>=d.x1&&(a<=d.x2&&e>=d.y1&&e<=d.y2)&&(b=d.id)}return b};s.prototype.getAutoFontSize=pb;s.prototype.resetOverlayedCanvas=
|
|
281
|
-
s.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var e=[],c=a.changedTouches,b=c?c[0]:a,d=null;switch(a.type){case "touchstart":case "MSPointerDown":e=["mousemove","mousedown"];this._lastTouchData=Ra(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":e=["mousemove"];break;
|
|
282
|
-
"MSPointerDown"===this._lastTouchEventType||300>g?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1<c.length)){d=Ra(b);d.time=new Date;try{var h=d.y-this._lastTouchData.y,g=d.time-this._lastTouchData.time;if(1<Math.abs(h)&&this._lastTouchData.scroll||5<Math.abs(h)&&250>g)this._lastTouchData.scroll=!0,this.stockChart&&(this.stockChart._chartScroll
|
|
283
|
-
!1;else for(c=0;c<e.length;c++)if(d=e[c],h=document.createEvent("MouseEvent"),h.initMouseEvent(d,!0,!0,window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null),b.target.dispatchEvent(h),!l(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<g||"click"===d)a.preventManipulation&&a.preventManipulation(),
|
|
284
|
-
e){var c={chart:this};c.type=a;c.trigger=e;var b=[];this.axisX&&0<this.axisX.length&&b.push("axisX");this.axisX2&&0<this.axisX2.length&&b.push("axisX2");this.axisY&&0<this.axisY.length&&b.push("axisY");this.axisY2&&0<this.axisY2.length&&b.push("axisY2");for(var d=0;d<b.length;d++)if(l(c[b[d]])&&(c[b[d]]=[]),"axisY"===b[d])for(var g=0;g<this.axisY.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,
|
|
285
|
-
else if("axisY2"===b[d])for(g=0;g<this.axisY2.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});else if("axisX"===b[d])for(g=0;g<this.axisX.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});else if("axisX2"===b[d])for(g=
|
|
286
|
-
viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});this.dispatchEvent(a,c,this)};s.prototype._mouseEventHandler=function(a){function e(){s.capturedEventParam&&(d=s.capturedEventParam,h=d.bounds,"mouseup"===b&&(s.capturedEventParam=null,d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",d.chart._mouseEventHandler
|
|
287
|
-
d.chart.overlaidCanvas&&t||d[b].call(d.context,c.x,c.y):a.target!==d.chart.overlaidCanvas&&(d.chart.isDrag=!1)))}"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var c=Ra(a),b=a.type,d,g;a.which?g=3==a.which:a.button&&(g=2==a.button);if(this._ignoreNextEvent)e(),this._ignoreNextEvent=!1;else if(e(),this.interactivityEnabled){a.preventManipulation&&a.preventManipulation();a.preventDefault&&
|
|
288
|
-
c.y),g&&window.console.log(a.which),"mouseup"===b&&window.console.log("mouseup"));if(!g){if(!s.capturedEventParam&&this._events){for(g=0;g<this._events.length;g++)if(this._events[g].hasOwnProperty(b))if(d=this._events[g],h=d.bounds,c.x>=h.x1&&c.x<=h.x2&&c.y>=h.y1&&c.y<=h.y2){d[b].call(d.context,c.x,c.y);"mousedown"===b&&!0===d.capture?(s.capturedEventParam=d,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():
|
|
289
|
-
|
|
290
|
-
this.sessionVariables._dataHighlighted=!1);for(g=0;g<this.axisX.length;g++)this.axisX[g].crosshair&&this.axisX[g].crosshair.enabled&&(this.axisX[g].crosshair.hide(),this.axisX[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX[g].options},this.axisX[g].crosshair));for(g=0;g<this.axisX2.length;g++)this.axisX2[g].crosshair&&this.axisX2[g].crosshair.enabled&&(this.axisX2[g].crosshair.hide(),this.axisX2[g].crosshair.dispatchEvent("hidden",
|
|
291
|
-
for(g=0;g<this.axisY.length;g++)this.axisY[g].crosshair&&this.axisY[g].crosshair.enabled&&(this.axisY[g].crosshair.hide(),this.axisY[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[g].options},this.axisY[g].crosshair));for(g=0;g<this.axisY2.length;g++)this.axisY2[g].crosshair&&this.axisY2[g].crosshair.enabled&&(this.axisY2[g].crosshair.hide(),this.axisY2[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[g].options},
|
|
292
|
-
c.x;this.sessionVariables.mouseY=c.y;this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a);if(("mouseout"===b||"mouseleave"===b)&&this._eventManager){for(g=0;g<this._eventManager.mouseoveredObjectMaps.length;g++)this._eventManager.fireEvent(this._eventManager.mouseoveredObjectMaps[g],"mouseout",a);this._eventManager.mouseoveredObjectMaps=[]}}}};s.prototype._plotAreaMouseDown=function(a,e){this.isDrag=!0;
|
|
293
|
-
function(a,e){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var c=e-this.dragStartPoint.y,b=a-this.dragStartPoint.x,d=0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),h=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var k=g,g=d,d=k;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(d=g=0;d<this._axes.length;d++)c=this._axes[d],c.logarithmic?
|
|
294
|
-
c.sessionVariables.newViewportMinimum=c.viewportMinimum*g,c.sessionVariables.newViewportMaximum=c.viewportMaximum*g,h=!0):c.viewportMaximum>c.maximum&&(g=c.viewportMaximum/c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum/g,c.sessionVariables.newViewportMaximum=c.viewportMaximum/g,h=!0):c.viewportMinimum<c.minimum?(g=c.minimum-c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum+g,c.sessionVariables.newViewportMaximum=
|
|
295
|
-
c.maximum&&(g=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum-g,c.sessionVariables.newViewportMaximum=c.viewportMaximum-g,h=!0);else if((!d||2<Math.abs(b))&&(!g||2<Math.abs(c))&&this.zoomEnabled){if(!this.dragStartPoint)return;c=d?this.dragStartPoint.x:this.plotArea.x1;b=g?this.dragStartPoint.y:this.plotArea.y1;d=d?a:this.plotArea.x2;g=g?e:this.plotArea.y2;2<Math.abs(c-d)&&2<Math.abs(b-g)&&this._zoomPanToSelectedRegion(c,
|
|
296
|
-
(h=!0)}h&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.stockChart&&(this.stockChart._rangeEventParameter||(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:this.stockChart.sessionVariables._axisXMin,maximum:this.stockChart.sessionVariables._axisXMax}),this.stockChart._rangeEventParameter.type="rangeChanging",this.stockChart.dispatchEvent("rangeChanging",
|
|
297
|
-
this.stockChart)),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),this.stockChart&&(this.stockChart.rangeUpdatedBy="chart",this.stockChart._rangeEventParameter.type="rangeChanged",this.stockChart.dispatchEvent("rangeChanged",this.stockChart._rangeEventParameter,this.stockChart)),h&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(Na(this._zoomButton,this._resetButton),va(this,this._zoomButton,"pan"),va(this,this._resetButton,"reset")))}}this.isDrag
|
|
298
|
-
if(this.axisX&&0<this.axisX.length)for(h=0;h<this.axisX.length;h++)this.axisX[h].crosshair&&this.axisX[h].crosshair.enabled&&this.axisX[h].renderCrosshair(a,e);if(this.axisX2&&0<this.axisX2.length)for(h=0;h<this.axisX2.length;h++)this.axisX2[h].crosshair&&this.axisX2[h].crosshair.enabled&&this.axisX2[h].renderCrosshair(a,e);if(this.axisY&&0<this.axisY.length)for(h=0;h<this.axisY.length;h++)this.axisY[h].crosshair&&this.axisY[h].crosshair.enabled&&
|
|
299
|
-
0<this.axisY2.length)for(h=0;h<this.axisY2.length;h++)this.axisY2[h].crosshair&&this.axisY2[h].crosshair.enabled&&this.axisY2[h].renderCrosshair(a,e);if(this.axisX&&0<this.axisX.length)for(h=0;h<this.axisX.length;h++)this.axisX[h].crosshair&&this.axisX[h].crosshair.enabled&&this.axisX[h].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(h=0;h<this.axisX2.length;h++)this.axisX2[h].crosshair&&this.axisX2[h].crosshair.enabled&&this.axisX2[h].crosshair.renderLabel();
|
|
300
|
-
0;h<this.axisY.length;h++)this.axisY[h].crosshair&&this.axisY[h].crosshair.enabled&&this.axisY[h].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(h=0;h<this.axisY2.length;h++)this.axisY2[h].crosshair&&this.axisY2[h].crosshair.enabled&&this.axisY2[h].crosshair.renderLabel()}};s.prototype._plotAreaMouseMove=function(a,e){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var c=0,b=0,d=c=null,d=0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),
|
|
301
|
-
(c=g,g=d,d=c);c=this.dragStartPoint.x-a;b=this.dragStartPoint.y-e;if(2<Math.abs(c)&&8>Math.abs(c)&&(this.panEnabled||this.zoomEnabled)){this.toolTip.hide();this.toolTip&&this.toolTip.enabled&&this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip);for(var k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&(this.axisX[k].crosshair.hide(),this.axisX[k].crosshair.dispatchEvent("hidden",{chart:this,
|
|
302
|
-
for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&(this.axisX2[k].crosshair.hide(),this.axisX2[k].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[k].options},this.axisX2[k].crosshair));for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&(this.axisY[k].crosshair.hide(),this.axisY[k].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[k].options},
|
|
303
|
-
this.axisY2[k].crosshair.enabled&&(this.axisY2[k].crosshair.hide(),this.axisY2[k].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[k].options},this.axisY2[k].crosshair))}else if(!this.panEnabled&&!this.zoomEnabled&&(this.toolTip.mouseMoveHandler(a,e),"none"!==this.plotInfo.axisPlacement)){this.sessionVariables._dataHighlighted||this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(k=0;k<
|
|
304
|
-
|
|
305
|
-
0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&(this.axisY2[k].sessionVariables.crosshairShownByPixel=!0,this.axisY2[k].renderCrosshair(a,e));if(this.axisX&&0<this.axisX.length)for(k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&this.axisX[k].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&this.axisX2[k].crosshair.renderLabel();
|
|
306
|
-
if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&this.axisY[k].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&this.axisY2[k].crosshair.renderLabel()}if((!d||2<Math.abs(c)||!g||2<Math.abs(b))&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled)d={x1:d?this.plotArea.x1+c:this.plotArea.x1,y1:g?this.plotArea.y1+b:this.plotArea.y1,
|
|
307
|
-
x2:d?this.plotArea.x2+c:this.plotArea.x2,y2:g?this.plotArea.y2+b:this.plotArea.y2},clearTimeout(h._panTimerId),h._panTimerId=setTimeout(function(b,c,d,f){return function(){if(h._zoomPanToSelectedRegion(b,c,d,f,!0)){h.sessionVariables.disableToolTip=!0;h.resetOverlayedCanvas();h._dispatchRangeEvent("rangeChanging","pan");h.stockChart&&(h.stockChart._rangeEventParameter.type="rangeChanging",h.stockChart.dispatchEvent("rangeChanging",h.stockChart._rangeEventParameter,h.stockChart));h.render();h._dispatchRangeEvent("rangeChanged",
|
|
308
|
-
"pan");if(h.stockChart){var g=h.stockChart.rangeSelector.sessionVariables,m=h.stockChart.rangeSelector.buttons;m&&(0<m.length&&(m[g._clickedRangeButtonIndex]&&"ytd"===m[g._clickedRangeButtonIndex].rangeType||m[g.selectedRangeButtonIndex]&&"ytd"===m[g.selectedRangeButtonIndex].rangeType))&&(h.stockChart.rangeUpdatedBy="navigator",h.stockChart.rangeSelector.resetRangeButtons());h.stockChart._rangeEventParameter.type="rangeChanged";h.stockChart.dispatchEvent("rangeChanged",h.stockChart._rangeEventParameter,
|
|
309
|
-
h.stockChart)}h.dragStartPoint.x=a;h.dragStartPoint.y=e;h.sessionVariables.disableToolTip=h.disableToolTip=!1}}}(d.x1,d.y1,d.x2,d.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();c=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle="#A89896";var b=d?this.dragStartPoint.x:this.plotArea.x1,k=g?this.dragStartPoint.y:this.plotArea.y1,l=d?a-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,m=g?e-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(b,
|
|
310
|
-
k,d?a:this.plotArea.x2-this.plotArea.x1,g?e:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType&&"y"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=0.7;this.overlaidCanvasCtx.fillRect(b,k,l,m);this.overlaidCanvasCtx.globalAlpha=c}}else if(this.toolTip.mouseMoveHandler(a,e),"none"!==this.plotInfo.axisPlacement){this.sessionVariables._dataHighlighted||this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(k=
|
|
311
|
-
0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&(this.axisX[k].sessionVariables.crosshairShownByPixel=!0,this.axisX[k].renderCrosshair(a,e));if(this.axisX2&&0<this.axisX2.length)for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&(this.axisX2[k].sessionVariables.crosshairShownByPixel=!0,this.axisX2[k].renderCrosshair(a,e));if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&
|
|
234
|
+
!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=[],k=[],l=0;l<a.dataSeriesIndexes.length;l++){var m=this.data[a.dataSeriesIndexes[l]],q=0,p=!1,r=!1,f;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var G=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?
|
|
235
|
+
0:-Infinity,A=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(m.dataPoints[q].x&&m.dataPoints[q].x.getTime||"dateTime"===m.xValueType)g=!0;for(q=0;q<m.dataPoints.length;q++){"undefined"===typeof m.dataPoints[q].x&&(m.dataPoints[q].x=q+(a.axisX.logarithmic?1:0));m.dataPoints[q].x.getTime?(g=!0,b=m.dataPoints[q].x.getTime()):
|
|
236
|
+
b=m.dataPoints[q].x;d=m.dataPoints[q].y;h.push(b);b<c.min&&(c.min=b);b>c.max&&(c.max=b);d<e.min&&"number"===typeof d&&(e.min=d);d>e.max&&"number"===typeof d&&(e.max=d);if(0<q&&null!==d&&null!==m.dataPoints[q-1].y)if(a.axisY.logarithmic){var n=d/m.dataPoints[q-1].y;1>n&&(n=1/n);e.minDiff>n&&1!==n&&(e.minDiff=n)}else n=d-m.dataPoints[q-1].y,0>n&&(n*=-1),e.minDiff>n&&0!==n&&(e.minDiff=n);if(b<G&&!p)null!==d&&(f=b);else{if(!p&&(p=!0,0<q)){q-=2;continue}if(b>A&&!r)r=!0;else if(b>A&&r)continue;m.dataPoints[q].label&&
|
|
237
|
+
(a.axisX.labels[b]=m.dataPoints[q].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&f<b&&(c.viewPortMin=f):(d<e.viewPortMin&&"number"===typeof d&&(e.viewPortMin=d),d>e.viewPortMax&&"number"===typeof d&&(e.viewPortMax=d))}}m.axisX.valueType=m.xValueType=g?"dateTime":"number"}for(q=0;q<h.length;q++)-1===k.indexOf(h[q])&&k.push(h[q]);k.sort(function(a,b){return a-b});for(q=1;q<k.length;q++)e=a.axisX.logarithmic?k[q]/k[q-1]:k[q]-k[q-1],c.minDiff>
|
|
238
|
+
e&&(c.minDiff=e)}};s.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=[],k=[],M=Infinity,m=-Infinity,q={},p=[],r=[],f=0;f<a.dataSeriesIndexes.length;f++){var G=this.data[a.dataSeriesIndexes[f]],A=0,n=!1,u=!1,t;if("normal"===G.axisPlacement||"xySwapped"===G.axisPlacement)var v=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?
|
|
239
|
+
a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,s=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(G.dataPoints[A].x&&G.dataPoints[A].x.getTime||"dateTime"===G.xValueType)g=!0;for(A=0;A<G.dataPoints.length;A++){"undefined"===typeof G.dataPoints[A].x&&
|
|
240
|
+
(G.dataPoints[A].x=A+(a.axisX.logarithmic?1:0));G.dataPoints[A].x.getTime?(g=!0,b=G.dataPoints[A].x.getTime()):b=G.dataPoints[A].x;p.push(b);d=l(G.dataPoints[A].y)?0:G.dataPoints[A].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<A&&null!==d&&null!==G.dataPoints[A-1].y)if(a.axisY.logarithmic){if(0<d){var y=d/G.dataPoints[A-1].y;1>y&&(y=1/y);e.minDiff>y&&1!==y&&(e.minDiff=y)}}else y=d-G.dataPoints[A-1].y,0>y&&(y*=-1),e.minDiff>y&&0!==y&&(e.minDiff=y);if(b<v&&!n)null!==G.dataPoints[A].y&&(t=b);else{if(!n&&
|
|
241
|
+
(n=!0,0<A)){A-=2;continue}if(b>s&&!u)u=!0;else if(b>s&&u)continue;G.dataPoints[A].label&&(a.axisX.labels[b]=G.dataPoints[A].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===G.dataPoints[A].y?c.viewPortMin===b&&t<b&&(c.viewPortMin=t):(q[b]=(q[b]||0)+G.dataPoints[A].y,G.dataPointEOs[A].cumulativeY=q[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?h[b]?h[b]+=d:(h[b]=d,M=Math.min(d,M)):k[b]?k[b]+=d:
|
|
242
|
+
(k[b]=d,m=Math.max(d,m)))}}a.axisY.scaleBreaks&&(a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks)&&(e.dataPointYPositiveSums?(e.dataPointYPositiveSums.push.apply(e.dataPointYPositiveSums,h),e.dataPointYNegativeSums.push.apply(e.dataPointYPositiveSums,k)):(e.dataPointYPositiveSums=h,e.dataPointYNegativeSums=k));G.axisX.valueType=G.xValueType=g?"dateTime":"number"}for(A=0;A<p.length;A++)-1===r.indexOf(p[A])&&r.push(p[A]);r.sort(function(a,b){return a-b});for(A=1;A<r.length;A++)b=
|
|
243
|
+
a.axisX.logarithmic?r[A]/r[A-1]:r[A]-r[A-1],c.minDiff>b&&(c.minDiff=b);for(A in h)h.hasOwnProperty(A)&&!isNaN(A)&&(a=h[A],a<e.min&&(e.min=Math.min(a,M)),a>e.max&&(e.max=a),A<c.viewPortMin||A>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=Math.min(a,M)),a>e.viewPortMax&&(e.viewPortMax=a)));for(A in k)k.hasOwnProperty(A)&&!isNaN(A)&&(a=k[A],a<e.min&&(e.min=a),a>e.max&&(e.max=Math.max(a,m)),A<c.viewPortMin||A>c.viewPortMax||(a<e.viewPortMin&&(e.viewPortMin=a),a>e.viewPortMax&&(e.viewPortMax=Math.max(a,
|
|
244
|
+
m))))}};s.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=!1,k=!1,M={},m=[],q=0;q<a.dataSeriesIndexes.length;q++){var p=this.data[a.dataSeriesIndexes[q]],r=0,f=!1,G=!1,A;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var n=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:
|
|
245
|
+
a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:-Infinity,u=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(p.dataPoints[r].x&&p.dataPoints[r].x.getTime||"dateTime"===p.xValueType)g=!0;for(r=0;r<p.dataPoints.length;r++){"undefined"===typeof p.dataPoints[r].x&&(p.dataPoints[r].x=r+(a.axisX.logarithmic?
|
|
246
|
+
1:0));p.dataPoints[r].x.getTime?(g=!0,b=p.dataPoints[r].x.getTime()):b=p.dataPoints[r].x;d=l(p.dataPoints[r].y)?null:p.dataPoints[r].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<r){if(a.axisX.logarithmic){var t=b/p.dataPoints[r-1].x;1>t&&(t=1/t);c.minDiff>t&&1!==t&&(c.minDiff=t)}else t=b-p.dataPoints[r-1].x,0>t&&(t*=-1),c.minDiff>t&&0!==t&&(c.minDiff=t);l(d)||null===p.dataPoints[r-1].y||(a.axisY.logarithmic?0<d&&(t=d/p.dataPoints[r-1].y,1>t&&(t=1/t),e.minDiff>t&&1!==t&&(e.minDiff=t)):(t=d-p.dataPoints[r-
|
|
247
|
+
1].y,0>t&&(t*=-1),e.minDiff>t&&0!==t&&(e.minDiff=t)))}m[b]=m[b]?m[b]+Math.abs(d):Math.abs(d);if(b<n&&!f)null!==d&&(A=b);else{if(!f&&(f=!0,0<r)){m[b]-=Math.abs(d);m[g&&p.dataPoints[r-1].x.getTime?p.dataPoints[r-1].x.getTime():p.dataPoints[r-1].x]-=Math.abs(p.dataPoints[r-1].y||0);r-=2;continue}if(b>u&&!G)G=!0;else if(b>u&&G)continue;p.dataPoints[r].label&&(a.axisX.labels[b]=p.dataPoints[r].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===d?c.viewPortMin===b&&A<b&&
|
|
248
|
+
(c.viewPortMin=A):(M[b]=(M[b]||0)+p.dataPoints[r].y,p.dataPointEOs[r].cumulativeY=M[b],a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+d,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(d),0<=d?h=!0:0>d&&(k=!0))}}p.axisX.valueType=p.xValueType=g?"dateTime":"number"}a.axisY.logarithmic?(e.max=l(e.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(e.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):h&&!k?(e.max=l(e.viewPortMax)?
|
|
249
|
+
99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?1:Math.min(e.viewPortMin,1)):h&&k?(e.max=l(e.viewPortMax)?99:Math.max(e.viewPortMax,99),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99)):!h&&k&&(e.max=l(e.viewPortMax)?-1:Math.max(e.viewPortMax,-1),e.min=l(e.viewPortMin)?-99:Math.min(e.viewPortMin,-99));e.viewPortMin=e.min;e.viewPortMax=e.max;a.dataPointYSums=m}};s.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,
|
|
250
|
+
c=a.axisX.dataInfo,b,d,g,h,k=!1,l=0;l<a.dataSeriesIndexes.length;l++){var m=this.data[a.dataSeriesIndexes[l]],q=0,p=!1,r=!1,f,G,A;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var n=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,u=a.axisX.sessionVariables.newViewportMaximum?
|
|
251
|
+
a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(m.dataPoints[q].x&&m.dataPoints[q].x.getTime||"dateTime"===m.xValueType)k=!0;for(q=0;q<m.dataPoints.length;q++){"undefined"===typeof m.dataPoints[q].x&&(m.dataPoints[q].x=q+(a.axisX.logarithmic?1:0));m.dataPoints[q].x.getTime?(k=!0,b=m.dataPoints[q].x.getTime()):b=m.dataPoints[q].x;if((d=m.dataPoints[q].y)&&
|
|
252
|
+
d.length){g=Math.min.apply(null,d);h=Math.max.apply(null,d);G=!0;for(var t=0;t<d.length;t++)null===d.k&&(G=!1);G&&(p||(A=f),f=b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);g<e.min&&(e.min=g);h>e.max&&(e.max=h);0<q&&(a.axisX.logarithmic?(G=b/m.dataPoints[q-1].x,1>G&&(G=1/G),c.minDiff>G&&1!==G&&(c.minDiff=G)):(G=b-m.dataPoints[q-1].x,0>G&&(G*=-1),c.minDiff>G&&0!==G&&(c.minDiff=G)),d&&(null!==d[0]&&m.dataPoints[q-1].y&&null!==m.dataPoints[q-1].y[0])&&(a.axisY.logarithmic?(G=d[0]/m.dataPoints[q-1].y[0],1>
|
|
253
|
+
G&&(G=1/G),e.minDiff>G&&1!==G&&(e.minDiff=G)):(G=d[0]-m.dataPoints[q-1].y[0],0>G&&(G*=-1),e.minDiff>G&&0!==G&&(e.minDiff=G))));if(!(b<n)||p){if(!p&&(p=!0,0<q)){q-=2;f=A;continue}if(b>u&&!r)r=!0;else if(b>u&&r)continue;m.dataPoints[q].label&&(a.axisX.labels[b]=m.dataPoints[q].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&d)for(t=0;t<d.length;t++)if(null===d[t]&&f<b){c.viewPortMin=f;break}null===d?c.viewPortMin===b&&f<b&&(c.viewPortMin=f):(g<e.viewPortMin&&
|
|
254
|
+
(e.viewPortMin=g),h>e.viewPortMax&&(e.viewPortMax=h))}}m.axisX.valueType=m.xValueType=k?"dateTime":"number"}};s.prototype._processSpecificPlotUnit=function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var e=a.axisY.dataInfo,c=a.axisX.dataInfo,b,d,g=!1,h=0;h<a.dataSeriesIndexes.length;h++){var k=this.data[a.dataSeriesIndexes[h]],l=0,m=!1,q=!1,p=b=0;if("normal"===k.axisPlacement||"xySwapped"===k.axisPlacement)var r=a.axisX.sessionVariables.newViewportMinimum?
|
|
255
|
+
a.axisX.sessionVariables.newViewportMinimum:a.axisX.options&&a.axisX.options.viewportMinimum?a.axisX.options.viewportMinimum:a.axisX.options&&a.axisX.options.minimum?a.axisX.options.minimum:a.axisX.logarithmic?0:-Infinity,f=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:a.axisX.options&&a.axisX.options.viewportMaximum?a.axisX.options.viewportMaximum:a.axisX.options&&a.axisX.options.maximum?a.axisX.options.maximum:Infinity;if(k.dataPoints[l].x&&k.dataPoints[l].x.getTime||
|
|
256
|
+
"dateTime"===k.xValueType)g=!0;for(l=0;l<k.dataPoints.length;l++)"undefined"!==typeof k.dataPoints[l].isCumulativeSum&&!0===k.dataPoints[l].isCumulativeSum?(k.dataPointEOs[l].cumulativeSumYStartValue=0,k.dataPointEOs[l].cumulativeSum=0===l?0:k.dataPointEOs[l-1].cumulativeSum,k.dataPoints[l].y=0===l?0:k.dataPointEOs[l-1].cumulativeSum):"undefined"!==typeof k.dataPoints[l].isIntermediateSum&&!0===k.dataPoints[l].isIntermediateSum?(k.dataPointEOs[l].cumulativeSumYStartValue=p,k.dataPointEOs[l].cumulativeSum=
|
|
257
|
+
0===l?0:k.dataPointEOs[l-1].cumulativeSum,k.dataPoints[l].y=0===l?0:b,p=0===l?0:k.dataPointEOs[l-1].cumulativeSum,b=0):(d="number"!==typeof k.dataPoints[l].y?0:k.dataPoints[l].y,k.dataPointEOs[l].cumulativeSumYStartValue=0===l?0:k.dataPointEOs[l-1].cumulativeSum,k.dataPointEOs[l].cumulativeSum=0===l?d:k.dataPointEOs[l-1].cumulativeSum+d,b+=d);for(l=0;l<k.dataPoints.length;l++)if("undefined"===typeof k.dataPoints[l].x&&(k.dataPoints[l].x=l+(a.axisX.logarithmic?1:0)),k.dataPoints[l].x.getTime?(g=!0,
|
|
258
|
+
b=k.dataPoints[l].x.getTime()):b=k.dataPoints[l].x,d=k.dataPoints[l].y,b<c.min&&(c.min=b),b>c.max&&(c.max=b),k.dataPointEOs[l].cumulativeSum<e.min&&(e.min=k.dataPointEOs[l].cumulativeSum),k.dataPointEOs[l].cumulativeSum>e.max&&(e.max=k.dataPointEOs[l].cumulativeSum),0<l&&(a.axisX.logarithmic?(p=b/k.dataPoints[l-1].x,1>p&&(p=1/p),c.minDiff>p&&1!==p&&(c.minDiff=p)):(p=b-k.dataPoints[l-1].x,0>p&&(p*=-1),c.minDiff>p&&0!==p&&(c.minDiff=p)),null!==d&&null!==k.dataPoints[l-1].y&&(a.axisY.logarithmic?(d=
|
|
259
|
+
k.dataPointEOs[l].cumulativeSum/k.dataPointEOs[l-1].cumulativeSum,1>d&&(d=1/d),e.minDiff>d&&1!==d&&(e.minDiff=d)):(d=k.dataPointEOs[l].cumulativeSum-k.dataPointEOs[l-1].cumulativeSum,0>d&&(d*=-1),e.minDiff>d&&0!==d&&(e.minDiff=d)))),!(b<r)||m){if(!m&&(m=!0,0<l)){l-=2;continue}if(b>f&&!q)q=!0;else if(b>f&&q)continue;k.dataPoints[l].label&&(a.axisX.labels[b]=k.dataPoints[l].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);0<l&&(k.dataPointEOs[l-1].cumulativeSum<e.viewPortMin&&
|
|
260
|
+
(e.viewPortMin=k.dataPointEOs[l-1].cumulativeSum),k.dataPointEOs[l-1].cumulativeSum>e.viewPortMax&&(e.viewPortMax=k.dataPointEOs[l-1].cumulativeSum));k.dataPointEOs[l].cumulativeSum<e.viewPortMin&&(e.viewPortMin=k.dataPointEOs[l].cumulativeSum);k.dataPointEOs[l].cumulativeSum>e.viewPortMax&&(e.viewPortMax=k.dataPointEOs[l].cumulativeSum)}k.axisX.valueType=k.xValueType=g?"dateTime":"number"}};s.prototype.calculateAutoBreaks=function(){function a(a,b,c,d){if(d)return c=Math.pow(Math.min(c*a/b,b/a),
|
|
261
|
+
0.2),1>=c&&(c=Math.pow(1>a?1/a:Math.min(b/a,a),0.25)),{startValue:a*c,endValue:b/c};c=0.2*Math.min(c-b+a,b-a);0>=c&&(c=0.25*(0<a?Math.min(b-a,Math.abs(a)):b-a));return{startValue:a+c,endValue:b-c}}function e(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var b=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,c=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(b||c)for(var e=a.axisY.dataInfo,
|
|
262
|
+
f=a.axisX.dataInfo,g,h=f.min,m=f.max,k=e.min,q=e.max,f=f._dataRanges,e=e._dataRanges,p,r=0,M=0;M<a.dataSeriesIndexes.length;M++){var t=d.data[a.dataSeriesIndexes[M]];if(!(4>t.dataPoints.length))for(r=0;r<t.dataPoints.length;r++)if(b&&(p=(m+1-h)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,g=t.dataPoints[r].x.getTime?t.dataPoints[r].x.getTime():t.dataPoints[r].x,p=Math.floor((g-h)/p),g<f[p].min&&(f[p].min=g),g>f[p].max&&(f[p].max=g)),c){var n=(q+1-k)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||
|
|
263
|
+
10,10)/100;if((g="waterfall"===a.type?t.dataPointEOs[r].cumulativeSum:t.dataPoints[r].y)&&g.length)for(var s=0;s<g.length;s++)p=Math.floor((g[s]-k)/n),g[s]<e[p].min&&(e[p].min=g[s]),g[s]>e[p].max&&(e[p].max=g[s]);else l(g)||(p=Math.floor((g-k)/n),g<e[p].min&&(e[p].min=g),g>e[p].max&&(e[p].max=g))}}}}function c(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)&&a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var b=a.axisX.dataInfo,c=
|
|
264
|
+
b.min,e=b.max,f=b._dataRanges,g,h=0,m=0;m<a.dataSeriesIndexes.length;m++){var k=d.data[a.dataSeriesIndexes[m]];if(!(4>k.dataPoints.length))for(h=0;h<k.dataPoints.length;h++)g=(e+1-c)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,b=k.dataPoints[h].x.getTime?k.dataPoints[h].x.getTime():k.dataPoints[h].x,g=Math.floor((b-c)/g),b<f[g].min&&(f[g].min=b),b>f[g].max&&(f[g].max=b)}}for(var b,d=this,g=!1,h=0;h<this._axes.length;h++)if(this._axes[h].scaleBreaks&&this._axes[h].scaleBreaks.autoCalculate&&
|
|
265
|
+
1<=this._axes[h].scaleBreaks.maxNumberOfAutoBreaks){g=!0;this._axes[h].dataInfo._dataRanges=[];for(var k=0;k<100/Math.max(parseFloat(this._axes[h].scaleBreaks.collapsibleThreshold)||10,10);k++)this._axes[h].dataInfo._dataRanges.push({min:Infinity,max:-Infinity})}if(g){for(h=0;h<this.plotInfo.plotTypes.length;h++)for(g=this.plotInfo.plotTypes[h],k=0;k<g.plotUnits.length;k++)b=g.plotUnits[k],"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||
|
|
266
|
+
"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type||"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===b.type||"boxAndWhisker"===b.type?e(b):0<=b.type.indexOf("stacked")&&c(b);for(h=0;h<this._axes.length;h++)if(this._axes[h].dataInfo._dataRanges){var M=this._axes[h].dataInfo.min;b=(this._axes[h].dataInfo.max+1-M)*Math.max(parseFloat(this._axes[h].scaleBreaks.collapsibleThreshold)||
|
|
267
|
+
10,10)/100;var m=this._axes[h].dataInfo._dataRanges,q,p,g=[];if(this._axes[h].dataInfo.dataPointYPositiveSums){var r=this._axes[h].dataInfo.dataPointYPositiveSums;q=m;for(k in r)if(r.hasOwnProperty(k)&&!isNaN(k)&&(p=r[k],!l(p))){var f=Math.floor((p-M)/b);p<q[f].min&&(q[f].min=p);p>q[f].max&&(q[f].max=p)}delete this._axes[h].dataInfo.dataPointYPositiveSums}if(this._axes[h].dataInfo.dataPointYNegativeSums){r=this._axes[h].dataInfo.dataPointYNegativeSums;q=m;for(k in r)r.hasOwnProperty(k)&&!isNaN(k)&&
|
|
268
|
+
(p=-1*r[k],l(p)||(f=Math.floor((p-M)/b),p<q[f].min&&(q[f].min=p),p>q[f].max&&(q[f].max=p)));delete this._axes[h].dataInfo.dataPointYNegativeSums}for(k=0;k<m.length-1;k++)if(q=m[k].max,isFinite(q))for(;k<m.length-1;)if(M=m[k+1].min,isFinite(M)){p=M-q;p>b&&g.push({diff:p,start:q,end:M});break}else k++;if(this._axes[h].scaleBreaks.customBreaks)for(k=0;k<this._axes[h].scaleBreaks.customBreaks.length;k++)for(b=0;b<g.length;b++)if(this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].start&&g[b].start<=
|
|
269
|
+
this._axes[h].scaleBreaks.customBreaks[k].endValue||this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].start&&g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].endValue||g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].startValue&&this._axes[h].scaleBreaks.customBreaks[k].startValue<=g[b].end||g[b].start<=this._axes[h].scaleBreaks.customBreaks[k].endValue&&this._axes[h].scaleBreaks.customBreaks[k].endValue<=g[b].end)g.splice(b,1),b--;g.sort(function(a,b){return b.diff-a.diff});for(k=
|
|
270
|
+
0;k<Math.min(g.length,this._axes[h].scaleBreaks.maxNumberOfAutoBreaks);k++)b=a(g[k].start,g[k].end,this._axes[h].logarithmic?this._axes[h].dataInfo.max/this._axes[h].dataInfo.min:this._axes[h].dataInfo.max-this._axes[h].dataInfo.min,this._axes[h].logarithmic),this._axes[h].scaleBreaks.autoBreaks.push(new ba(this,"autoBreaks",b,k,++this._eventManager.lastObjectId,this._axes[h].scaleBreaks)),this._axes[h].scaleBreaks._appliedBreaks.push(this._axes[h].scaleBreaks.autoBreaks[this._axes[h].scaleBreaks.autoBreaks.length-
|
|
271
|
+
1]);this._axes[h].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};s.prototype.renderCrosshairs=function(a,e){for(var c,b=0;b<this.axisX.length;b++)if(c=this.axisX[b].sessionVariables.crosshairShownByPixel,this.axisX[b]!=a&&this.axisX[b].crosshair&&this.axisX[b].crosshair.enabled&&!this.axisX[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&
|
|
272
|
+
this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisX[b].crosshair.render(null,this.sessionVariables.mouseY,this.axisX[b].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisX[b].convertPixelToValue(this.sessionVariables.mouseX)),l(e)||e)c={chart:this,crosshair:this.axisX[b].crosshair.options,axis:this.axisX[b],value:this.axisX[b].crosshair.value},this.axisX[b].crosshair.dispatchEvent("updated",
|
|
273
|
+
c,this.axisX[b])}else l(c)||c||this.axisX[b].showCrosshair(this.axisX[b].crosshair._updatedValue);for(b=0;b<this.axisX2.length;b++)if(c=this.axisX2[b].sessionVariables.crosshairShownByPixel,this.axisX2[b]!=a&&this.axisX2[b].crosshair&&this.axisX2[b].crosshair.enabled&&!this.axisX2[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&
|
|
274
|
+
"xySwapped"===this.plotInfo.axisPlacement?this.axisX2[b].crosshair.render(null,this.sessionVariables.mouseY,this.axisX2[b].convertPixelToValue(this.sessionVariables.mouseY)):this.axisX2[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisX2[b].convertPixelToValue(this.sessionVariables.mouseX)),l(e)||e)c={chart:this,crosshair:this.axisX2[b].crosshair.options,axis:this.axisX2[b],value:this.axisX2[b].crosshair.value},this.axisX2[b].crosshair.dispatchEvent("updated",c,this.axisX2[b])}else l(c)||
|
|
275
|
+
c||this.axisX2[b].showCrosshair(this.axisX2[b].crosshair._updatedValue);for(b=0;b<this.axisY.length;b++)if(c=this.axisY[b].sessionVariables.crosshairShownByPixel,this.axisY[b]!=a&&this.axisY[b].crosshair&&this.axisY[b].crosshair.enabled&&!this.axisY[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===
|
|
276
|
+
this.plotInfo.axisPlacement?this.axisY[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisY[b].convertPixelToValue(this.sessionVariables.mouseX)):this.axisY[b].crosshair.render(null,this.sessionVariables.mouseY,this.axisY[b].convertPixelToValue(this.sessionVariables.mouseY)),l(e)||e)c={chart:this,crosshair:this.axisY[b].crosshair.options,axis:this.axisY[b],value:this.axisY[b].crosshair.value},this.axisY[b].crosshair.dispatchEvent("updated",c,this.axisY[b])}else l(c)||c||this.axisY[b].showCrosshair(this.axisY[b].crosshair._updatedValue);
|
|
277
|
+
for(b=0;b<this.axisY2.length;b++)if(c=this.axisY2[b].sessionVariables.crosshairShownByPixel,this.axisY2[b]!=a&&this.axisY2[b].crosshair&&this.axisY2[b].crosshair.enabled&&!this.axisY2[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisY2[b].crosshair.render(this.sessionVariables.mouseX,
|
|
278
|
+
null,this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseX)):this.axisY2[b].crosshair.render(null,this.sessionVariables.mouseY,this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseY)),l(e)||e)c={chart:this,crosshair:this.axisY2[b].crosshair.options,axis:this.axisY2[b],value:this.axisY2[b].crosshair.value},this.axisY2[b].crosshair.dispatchEvent("updated",c,this.axisY2[b])}else l(c)||c||this.axisY2[b].showCrosshair(this.axisY2[b].crosshair._updatedValue)};s.prototype.getDataPointAtXY=
|
|
279
|
+
function(a,e,c){c=c||!1;for(var b=[],d=this._dataInRenderedOrder.length-1;0<=d;d--){var g=null;(g=this._dataInRenderedOrder[d].getDataPointAtXY(a,e,c))&&b.push(g)}a=null;e=!1;for(c=0;c<b.length;c++)if("line"===b[c].dataSeries.type||"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(d=V("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=d/2){e=!0;break}for(c=0;c<b.length;c++)e&&"line"!==b[c].dataSeries.type&&"stepLine"!==b[c].dataSeries.type&&
|
|
280
|
+
"area"!==b[c].dataSeries.type&&"stepArea"!==b[c].dataSeries.type||(a?b[c].distance<=a.distance&&(a=b[c]):a=b[c]);return a};s.prototype.getObjectAtXY=function(a,e,c){var b=null;if(c=this.getDataPointAtXY(a,e,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(t)b=bb(a,e,this._eventManager.ghostCtx);else for(c=0;c<this.legend.items.length;c++){var d=this.legend.items[c];a>=d.x1&&(a<=d.x2&&e>=d.y1&&e<=d.y2)&&(b=d.id)}return b};s.prototype.getAutoFontSize=pb;s.prototype.resetOverlayedCanvas=
|
|
281
|
+
function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};s.prototype.clearCanvas=ob;s.prototype.attachEvent=function(a){this._events.push(a)};s.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var e=[],c=a.changedTouches,b=c?c[0]:a,d=null;switch(a.type){case "touchstart":case "MSPointerDown":e=["mousemove","mousedown"];this._lastTouchData=Ra(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":e=["mousemove"];break;
|
|
282
|
+
case "touchend":case "MSPointerUp":var g=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,e="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>g?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1<c.length)){d=Ra(b);d.time=new Date;try{var h=d.y-this._lastTouchData.y,g=d.time-this._lastTouchData.time;if(1<Math.abs(h)&&this._lastTouchData.scroll||5<Math.abs(h)&&250>g)this._lastTouchData.scroll=!0,this.stockChart&&(this.stockChart._chartScroll=
|
|
283
|
+
!0)}catch(k){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c<e.length;c++)if(d=e[c],h=document.createEvent("MouseEvent"),h.initMouseEvent(d,!0,!0,window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null),b.target.dispatchEvent(h),!l(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<g||"click"===d)a.preventManipulation&&a.preventManipulation(),
|
|
284
|
+
a.preventDefault&&a.cancelable&&a.preventDefault(),this.stockChart&&(this.stockChart._chartScroll=null)}}};s.prototype._dispatchRangeEvent=function(a,e){var c={chart:this};c.type=a;c.trigger=e;var b=[];this.axisX&&0<this.axisX.length&&b.push("axisX");this.axisX2&&0<this.axisX2.length&&b.push("axisX2");this.axisY&&0<this.axisY.length&&b.push("axisY");this.axisY2&&0<this.axisY2.length&&b.push("axisY2");for(var d=0;d<b.length;d++)if(l(c[b[d]])&&(c[b[d]]=[]),"axisY"===b[d])for(var g=0;g<this.axisY.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,
|
|
285
|
+
viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});else if("axisY2"===b[d])for(g=0;g<this.axisY2.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});else if("axisX"===b[d])for(g=0;g<this.axisX.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});else if("axisX2"===b[d])for(g=
|
|
286
|
+
0;g<this.axisX2.length;g++)c[b[d]].push({viewportMinimum:this[b[d]][g].sessionVariables.newViewportMinimum,viewportMaximum:this[b[d]][g].sessionVariables.newViewportMaximum});this.dispatchEvent(a,c,this)};s.prototype._mouseEventHandler=function(a){function e(){s.capturedEventParam&&(d=s.capturedEventParam,h=d.bounds,"mouseup"===b&&(s.capturedEventParam=null,d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",d.chart._mouseEventHandler,
|
|
287
|
+
!1)),d.hasOwnProperty(b)&&("mouseup"!==b||d.chart.overlaidCanvas.releaseCapture?a.target!==d.chart.overlaidCanvas&&t||d[b].call(d.context,c.x,c.y):a.target!==d.chart.overlaidCanvas&&(d.chart.isDrag=!1)))}"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var c=Ra(a),b=a.type,d,g;a.which?g=3==a.which:a.button&&(g=2==a.button);if(this._ignoreNextEvent)e(),this._ignoreNextEvent=!1;else if(e(),this.interactivityEnabled){a.preventManipulation&&a.preventManipulation();a.preventDefault&&
|
|
288
|
+
a.preventDefault();var h;Ja&&window.console&&(window.console.log(b+" --\x3e x: "+c.x+"; y:"+c.y),g&&window.console.log(a.which),"mouseup"===b&&window.console.log("mouseup"));if(!g){if(!s.capturedEventParam&&this._events){for(g=0;g<this._events.length;g++)if(this._events[g].hasOwnProperty(b))if(d=this._events[g],h=d.bounds,c.x>=h.x1&&c.x<=h.x2&&c.y>=h.y1&&c.y<=h.y2){d[b].call(d.context,c.x,c.y);"mousedown"===b&&!0===d.capture?(s.capturedEventParam=d,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():
|
|
289
|
+
document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===b&&(d.chart.overlaidCanvas.releaseCapture?d.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else d=null;a.target.style.cursor=d&&d.cursor?d.cursor:this._defaultCursor}g=this.plotArea;if(c.x<g.x1||c.x>g.x2||c.y<g.y1||c.y>g.y2||"mouseout"===b){this.toolTip&&this.toolTip.enabled?(this.toolTip.hide(),this.toolTip.dispatchEvent("hidden",
|
|
290
|
+
{chart:this,toolTip:this.toolTip},this.toolTip)):(this.resetOverlayedCanvas(),this.sessionVariables._dataHighlighted=!1);for(g=0;g<this.axisX.length;g++)this.axisX[g].crosshair&&this.axisX[g].crosshair.enabled&&(this.axisX[g].crosshair.hide(),this.axisX[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX[g].options},this.axisX[g].crosshair));for(g=0;g<this.axisX2.length;g++)this.axisX2[g].crosshair&&this.axisX2[g].crosshair.enabled&&(this.axisX2[g].crosshair.hide(),this.axisX2[g].crosshair.dispatchEvent("hidden",
|
|
291
|
+
{chart:this,axis:this.axisX2[g].options},this.axisX2[g].crosshair));for(g=0;g<this.axisY.length;g++)this.axisY[g].crosshair&&this.axisY[g].crosshair.enabled&&(this.axisY[g].crosshair.hide(),this.axisY[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[g].options},this.axisY[g].crosshair));for(g=0;g<this.axisY2.length;g++)this.axisY2[g].crosshair&&this.axisY2[g].crosshair.enabled&&(this.axisY2[g].crosshair.hide(),this.axisY2[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[g].options},
|
|
292
|
+
this.axisY2[g].crosshair))}this.sessionVariables.mouseX=c.x;this.sessionVariables.mouseY=c.y;this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a);if(("mouseout"===b||"mouseleave"===b)&&this._eventManager){for(g=0;g<this._eventManager.mouseoveredObjectMaps.length;g++)this._eventManager.fireEvent(this._eventManager.mouseoveredObjectMaps[g],"mouseout",a);this._eventManager.mouseoveredObjectMaps=[]}}}};s.prototype._plotAreaMouseDown=function(a,e){this.isDrag=!0;
|
|
293
|
+
this.dragStartPoint={x:a,y:e}};s.prototype._plotAreaMouseUp=function(a,e){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var c=e-this.dragStartPoint.y,b=a-this.dragStartPoint.x,d=0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),h=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var k=g,g=d,d=k;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(d=g=0;d<this._axes.length;d++)c=this._axes[d],c.logarithmic?
|
|
294
|
+
c.viewportMinimum<c.minimum?(g=c.minimum/c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum*g,c.sessionVariables.newViewportMaximum=c.viewportMaximum*g,h=!0):c.viewportMaximum>c.maximum&&(g=c.viewportMaximum/c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum/g,c.sessionVariables.newViewportMaximum=c.viewportMaximum/g,h=!0):c.viewportMinimum<c.minimum?(g=c.minimum-c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum+g,c.sessionVariables.newViewportMaximum=
|
|
295
|
+
c.viewportMaximum+g,h=!0):c.viewportMaximum>c.maximum&&(g=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum-g,c.sessionVariables.newViewportMaximum=c.viewportMaximum-g,h=!0);else if((!d||2<Math.abs(b))&&(!g||2<Math.abs(c))&&this.zoomEnabled){if(!this.dragStartPoint)return;c=d?this.dragStartPoint.x:this.plotArea.x1;b=g?this.dragStartPoint.y:this.plotArea.y1;d=d?a:this.plotArea.x2;g=g?e:this.plotArea.y2;2<Math.abs(c-d)&&2<Math.abs(b-g)&&this._zoomPanToSelectedRegion(c,
|
|
296
|
+
b,d,g,"xy"!==this.zoomType&&"y"!==this.zoomType)&&(h=!0)}h&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.stockChart&&(this.stockChart._rangeEventParameter||(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:this.stockChart.sessionVariables._axisXMin,maximum:this.stockChart.sessionVariables._axisXMax}),this.stockChart._rangeEventParameter.type="rangeChanging",this.stockChart.dispatchEvent("rangeChanging",
|
|
297
|
+
this.stockChart._rangeEventParameter,this.stockChart)),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),this.stockChart&&(this.stockChart.rangeUpdatedBy="chart",this.stockChart._rangeEventParameter.type="rangeChanged",this.stockChart.dispatchEvent("rangeChanged",this.stockChart._rangeEventParameter,this.stockChart)),h&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(Na(this._zoomButton,this._resetButton),va(this,this._zoomButton,"pan"),va(this,this._resetButton,"reset")))}}this.isDrag=
|
|
298
|
+
!1;if("none"!==this.plotInfo.axisPlacement){this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(h=0;h<this.axisX.length;h++)this.axisX[h].crosshair&&this.axisX[h].crosshair.enabled&&this.axisX[h].renderCrosshair(a,e);if(this.axisX2&&0<this.axisX2.length)for(h=0;h<this.axisX2.length;h++)this.axisX2[h].crosshair&&this.axisX2[h].crosshair.enabled&&this.axisX2[h].renderCrosshair(a,e);if(this.axisY&&0<this.axisY.length)for(h=0;h<this.axisY.length;h++)this.axisY[h].crosshair&&this.axisY[h].crosshair.enabled&&
|
|
299
|
+
this.axisY[h].renderCrosshair(a,e);if(this.axisY2&&0<this.axisY2.length)for(h=0;h<this.axisY2.length;h++)this.axisY2[h].crosshair&&this.axisY2[h].crosshair.enabled&&this.axisY2[h].renderCrosshair(a,e);if(this.axisX&&0<this.axisX.length)for(h=0;h<this.axisX.length;h++)this.axisX[h].crosshair&&this.axisX[h].crosshair.enabled&&this.axisX[h].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(h=0;h<this.axisX2.length;h++)this.axisX2[h].crosshair&&this.axisX2[h].crosshair.enabled&&this.axisX2[h].crosshair.renderLabel();
|
|
300
|
+
if(this.axisY&&0<this.axisY.length)for(h=0;h<this.axisY.length;h++)this.axisY[h].crosshair&&this.axisY[h].crosshair.enabled&&this.axisY[h].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(h=0;h<this.axisY2.length;h++)this.axisY2[h].crosshair&&this.axisY2[h].crosshair.enabled&&this.axisY2[h].crosshair.renderLabel()}};s.prototype._plotAreaMouseMove=function(a,e){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var c=0,b=0,d=c=null,d=0<=this.zoomType.indexOf("x"),g=0<=this.zoomType.indexOf("y"),
|
|
301
|
+
h=this;"xySwapped"===this.plotInfo.axisPlacement&&(c=g,g=d,d=c);c=this.dragStartPoint.x-a;b=this.dragStartPoint.y-e;if(2<Math.abs(c)&&8>Math.abs(c)&&(this.panEnabled||this.zoomEnabled)){this.toolTip.hide();this.toolTip&&this.toolTip.enabled&&this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip);for(var k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&(this.axisX[k].crosshair.hide(),this.axisX[k].crosshair.dispatchEvent("hidden",{chart:this,
|
|
302
|
+
axis:this.axisX[k].options},this.axisX[k].crosshair));for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&(this.axisX2[k].crosshair.hide(),this.axisX2[k].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[k].options},this.axisX2[k].crosshair));for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&(this.axisY[k].crosshair.hide(),this.axisY[k].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[k].options},
|
|
303
|
+
this.axisY[k].crosshair));for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&(this.axisY2[k].crosshair.hide(),this.axisY2[k].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[k].options},this.axisY2[k].crosshair))}else if(!this.panEnabled&&!this.zoomEnabled&&(this.toolTip.mouseMoveHandler(a,e),"none"!==this.plotInfo.axisPlacement)){this.sessionVariables._dataHighlighted||this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(k=0;k<
|
|
304
|
+
this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&(this.axisX[k].sessionVariables.crosshairShownByPixel=!0,this.axisX[k].renderCrosshair(a,e));if(this.axisX2&&0<this.axisX2.length)for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&(this.axisX2[k].sessionVariables.crosshairShownByPixel=!0,this.axisX2[k].renderCrosshair(a,e));if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&
|
|
312
305
|
(this.axisY[k].sessionVariables.crosshairShownByPixel=!0,this.axisY[k].renderCrosshair(a,e));if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&(this.axisY2[k].sessionVariables.crosshairShownByPixel=!0,this.axisY2[k].renderCrosshair(a,e));if(this.axisX&&0<this.axisX.length)for(k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&this.axisX[k].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(k=
|
|
313
|
-
0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&this.axisX2[k].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&this.axisY[k].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&this.axisY2[k].crosshair.renderLabel()}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
306
|
+
0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&this.axisX2[k].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&this.axisY[k].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&this.axisY2[k].crosshair.renderLabel()}if((!d||2<Math.abs(c)||!g||2<Math.abs(b))&&
|
|
307
|
+
(this.panEnabled||this.zoomEnabled))if(this.panEnabled)d={x1:d?this.plotArea.x1+c:this.plotArea.x1,y1:g?this.plotArea.y1+b:this.plotArea.y1,x2:d?this.plotArea.x2+c:this.plotArea.x2,y2:g?this.plotArea.y2+b:this.plotArea.y2},clearTimeout(h._panTimerId),h._panTimerId=setTimeout(function(b,c,d,f){return function(){if(h._zoomPanToSelectedRegion(b,c,d,f,!0)){h.sessionVariables.disableToolTip=!0;h.resetOverlayedCanvas();h._dispatchRangeEvent("rangeChanging","pan");h.stockChart&&(h.stockChart._rangeEventParameter.type=
|
|
308
|
+
"rangeChanging",h.stockChart.dispatchEvent("rangeChanging",h.stockChart._rangeEventParameter,h.stockChart));h.render();h._dispatchRangeEvent("rangeChanged","pan");if(h.stockChart){var g=h.stockChart.rangeSelector.sessionVariables,m=h.stockChart.rangeSelector.buttons;m&&(0<m.length&&(m[g._clickedRangeButtonIndex]&&"ytd"===m[g._clickedRangeButtonIndex].rangeType||m[g.selectedRangeButtonIndex]&&"ytd"===m[g.selectedRangeButtonIndex].rangeType))&&(h.stockChart.rangeUpdatedBy="navigator",h.stockChart.rangeSelector.resetRangeButtons());
|
|
309
|
+
h.stockChart._rangeEventParameter.type="rangeChanged";h.stockChart.dispatchEvent("rangeChanged",h.stockChart._rangeEventParameter,h.stockChart)}h.dragStartPoint.x=a;h.dragStartPoint.y=e;h.sessionVariables.disableToolTip=h.disableToolTip=!1}}}(d.x1,d.y1,d.x2,d.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();c=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle="#A89896";var b=d?this.dragStartPoint.x:this.plotArea.x1,k=g?this.dragStartPoint.y:this.plotArea.y1,l=d?a-this.dragStartPoint.x:
|
|
310
|
+
this.plotArea.x2-this.plotArea.x1,m=g?e-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(b,k,d?a:this.plotArea.x2-this.plotArea.x1,g?e:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType&&"y"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=0.7;this.overlaidCanvasCtx.fillRect(b,k,l,m);this.overlaidCanvasCtx.globalAlpha=c}}else if(this.toolTip.mouseMoveHandler(a,e),"none"!==this.plotInfo.axisPlacement){this.sessionVariables._dataHighlighted||
|
|
311
|
+
this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&(this.axisX[k].sessionVariables.crosshairShownByPixel=!0,this.axisX[k].renderCrosshair(a,e));if(this.axisX2&&0<this.axisX2.length)for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&(this.axisX2[k].sessionVariables.crosshairShownByPixel=!0,this.axisX2[k].renderCrosshair(a,e));if(this.axisY&&0<this.axisY.length)for(k=
|
|
312
|
+
0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&(this.axisY[k].sessionVariables.crosshairShownByPixel=!0,this.axisY[k].renderCrosshair(a,e));if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&(this.axisY2[k].sessionVariables.crosshairShownByPixel=!0,this.axisY2[k].renderCrosshair(a,e));if(this.axisX&&0<this.axisX.length)for(k=0;k<this.axisX.length;k++)this.axisX[k].crosshair&&this.axisX[k].crosshair.enabled&&
|
|
313
|
+
this.axisX[k].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(k=0;k<this.axisX2.length;k++)this.axisX2[k].crosshair&&this.axisX2[k].crosshair.enabled&&this.axisX2[k].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(k=0;k<this.axisY.length;k++)this.axisY[k].crosshair&&this.axisY[k].crosshair.enabled&&this.axisY[k].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(k=0;k<this.axisY2.length;k++)this.axisY2[k].crosshair&&this.axisY2[k].crosshair.enabled&&this.axisY2[k].crosshair.renderLabel()}};
|
|
314
|
+
s.prototype._zoomPanToSelectedRegion=function(a,e,c,b,d){a=this.validateRegion(a,e,c,b,d);e=a.axesWithValidRange;c=a.axesRanges;if(a.isValid)for(b=0;b<e.length;b++){d=e[b];var g=c[b];d.setViewPortRange(g.val1,g.val2);this.syncCharts&&("axisX"===d.type&&"y"!=this.zoomType)&&this.syncCharts(g.val1,g.val2);this.stockChart&&(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:g.val1,maximum:g.val2})}return a.isValid};s.prototype.validateRegion=
|
|
315
|
+
function(a,e,c,b,d){d=d||!1;for(var g=0<=this.zoomType.indexOf("x"),h=0<=this.zoomType.indexOf("y"),k=!1,l=[],m=[],q=[],p=0;p<this._axes.length;p++)("axisX"===this._axes[p].type&&g||"axisY"===this._axes[p].type&&h)&&m.push(this._axes[p]);for(h=0;h<m.length;h++){var p=m[h],g=!1,r=p.convertPixelToValue({x:a,y:e}),f=p.convertPixelToValue({x:c,y:b});if(r>f)var G=f,f=r,r=G;if(p.scaleBreaks)for(G=0;!g&&G<p.scaleBreaks._appliedBreaks.length;G++)g=p.scaleBreaks._appliedBreaks[G].startValue<=r&&p.scaleBreaks._appliedBreaks[G].endValue>=
|
|
316
|
+
f;if(isFinite(p.dataInfo.minDiff))if(G=p.getApparentDifference(r,f,null,!0),!(g||!(this.panEnabled&&p.scaleBreaks&&p.scaleBreaks._appliedBreaks.length)&&(p.logarithmic&&G<Math.pow(p.dataInfo.minDiff,3)||!p.logarithmic&&G<3*Math.abs(p.dataInfo.minDiff))||r<p.minimum||f>p.maximum))l.push(p),q.push({val1:r,val2:f}),k=!0;else if(!d){k=!1;break}}return{isValid:k,axesWithValidRange:l,axesRanges:q}};s.prototype.preparePlotArea=function(){var a=this.plotArea;!t&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);
|
|
317
317
|
if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var e=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var c=this.axisY[0];a.x1=e.x1<c.lineCoordinates.x2?e.x1:c.lineCoordinates.x1;a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1;a.x2=e.x2>c.lineCoordinates.x2?e.x2:c.lineCoordinates.x2;a.y2=e.y1>c.lineCoordinates.y2?e.y1:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<
|
|
318
318
|
this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=e.x1<c.lineCoordinates.x2?e.x1:c.lineCoordinates.x1,a.y1=e.y1<c.lineCoordinates.y1?e.y1:c.lineCoordinates.y1,a.x2=e.x2>c.lineCoordinates.x2?e.x2:c.lineCoordinates.x2,a.y2=e.y2>c.lineCoordinates.y2?e.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else e=this.layoutManager.getFreeSpace(),a.x1=e.x1,a.x2=e.x2,a.y1=e.y1,a.y2=e.y2,a.width=e.width,a.height=e.height;t||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=
|
|
319
|
-
a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Ga(a.x1,a.y1,a.x2,a.y2,2)};s.prototype.renderIndexLabels=function(a){var e=a||this.plotArea.ctx,c=this.plotArea,b=0,d=0,g=0,h=d=g=0,k=0,
|
|
320
|
-
m=V("indexLabelFontStyle",
|
|
321
|
-
l(
|
|
322
|
-
|
|
323
|
-
null,
|
|
324
|
-
fontFamily:
|
|
325
|
-
p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
2);if("inside"!==s)d=c.y1,g=c.y2,0<
|
|
329
|
-
(f+=b)));else{Math.max(
|
|
330
|
-
|
|
331
|
-
s?Math.max(
|
|
332
|
-
c.x2),b=0<=p.indexOf("range")||"error"===p?0>
|
|
333
|
-
|
|
334
|
-
e.setLineDash(K(x
|
|
335
|
-
|
|
336
|
-
this._indexLabels[a],
|
|
337
|
-
this.data[l];c.lineWidth=m.lineThickness;var
|
|
338
|
-
!1,u=0;u<
|
|
339
|
-
(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(h.x,h.y),p=m.nullDataLineDashType,c.setLineDash(
|
|
340
|
-
(c.stroke(),c.beginPath(),c.moveTo(
|
|
341
|
-
this._indexLabels.push({chartType:"line",dataPoint:
|
|
342
|
-
0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
343
|
-
[],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];c.lineWidth=m.lineThickness;var
|
|
344
|
-
|
|
345
|
-
dataPointIndex:u,x1:
|
|
346
|
-
(b.stroke(),b.beginPath(),b.moveTo(
|
|
347
|
-
color:
|
|
348
|
-
a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
319
|
+
a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Ga(a.x1,a.y1,a.x2,a.y2,2)};s.prototype.renderIndexLabels=function(a){var e=a||this.plotArea.ctx,c=this.plotArea,b=0,d=0,g=0,h=d=g=0,k=0,M=b=0,m=0;for(a=0;a<this._indexLabels.length;a++){var q=this._indexLabels[a],p=q.chartType.toLowerCase(),r,f,k=V("indexLabelFontColor",q.dataPoint,q.dataSeries),G=V("indexLabelFontSize",q.dataPoint,q.dataSeries),M=V("indexLabelFontFamily",q.dataPoint,q.dataSeries),
|
|
320
|
+
m=V("indexLabelFontStyle",q.dataPoint,q.dataSeries);r=V("indexLabelFontWeight",q.dataPoint,q.dataSeries);var A=V("indexLabelBackgroundColor",q.dataPoint,q.dataSeries);f=V("indexLabelBorderColor",q.dataPoint,q.dataSeries);var g=V("indexLabelBorderThickness",q.dataPoint,q.dataSeries),d=V("indexLabelMaxWidth",q.dataPoint,q.dataSeries),h=V("indexLabelWrap",q.dataPoint,q.dataSeries),n=V("indexLabelLineDashType",q.dataPoint,q.dataSeries),u=V("indexLabelLineColor",q.dataPoint,q.dataSeries),x=l(q.dataPoint.indexLabelLineThickness)?
|
|
321
|
+
l(q.dataSeries.options.indexLabelLineThickness)?0:q.dataSeries.options.indexLabelLineThickness:q.dataPoint.indexLabelLineThickness,b=0<x?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,v=V("indexLabelPadding",q.dataPoint,q.dataSeries),s={percent:null,total:null},y=null;if(0<=q.dataSeries.type.indexOf("stacked")||"pie"===q.dataSeries.type||"doughnut"===q.dataSeries.type)s=this.getPercentAndTotal(q.dataSeries,q.dataPoint);if(q.dataSeries.indexLabelFormatter||
|
|
322
|
+
q.dataPoint.indexLabelFormatter)y={chart:this,dataSeries:q.dataSeries,dataPoint:q.dataPoint,index:q.indexKeyword,total:s.total,percent:s.percent};var E=q.dataPoint.indexLabelFormatter?q.dataPoint.indexLabelFormatter(y):q.dataPoint.indexLabel?this.replaceKeywordsWithValue(q.dataPoint.indexLabel,q.dataPoint,q.dataSeries,null,q.indexKeyword):q.dataSeries.indexLabelFormatter?q.dataSeries.indexLabelFormatter(y):q.dataSeries.indexLabel?this.replaceKeywordsWithValue(q.dataSeries.indexLabel,q.dataPoint,q.dataSeries,
|
|
323
|
+
null,q.indexKeyword):null;if(!l(E)&&""!==E){var s=V("indexLabelPlacement",q.dataPoint,q.dataSeries),y=V("indexLabelOrientation",q.dataPoint,q.dataSeries),z=V("indexLabelTextAlign",q.dataPoint,q.dataSeries),w=q.direction,P=q.dataSeries.axisX,O=q.dataSeries.axisY,ca=!1,A=new la(e,{x:0,y:0,maxWidth:d?d:0.5*this.width,maxHeight:(h?5*G:1.5*G)+("object"===typeof v?(v.top||0)+(v.bottom||0):2*v),angle:"horizontal"===y?0:-90,text:E,padding:v,backgroundColor:A,borderColor:f,borderThickness:g,textAlign:z,fontSize:G,
|
|
324
|
+
fontFamily:M,fontWeight:r,fontColor:k,fontStyle:m,textBaseline:"middle"});A.measureText();q.dataSeries.indexLabelMaxWidth=A.maxWidth;if("stackedarea100"===p){if(q.point.x<c.x1||q.point.x>c.x2||q.point.y<c.y1-1||q.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum||Math.max.apply(null,q.dataPoint.y)<O.viewportMinimum||Math.min.apply(null,q.dataPoint.y)>O.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=
|
|
325
|
+
p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum||q.dataPoint.y<O.viewportMinimum||q.dataPoint.y>O.viewportMaximum)continue}else if(0<=p.indexOf("column")){if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum||(0<q.dataPoint.y.length?Math.max.apply(null,q.dataPoint.y):q.cumulativeY?q.cumulativeY:q.dataPoint.y)<O.viewportMinimum||(0<q.dataPoint.y.length?Math.min.apply(null,q.dataPoint.y):q.cumulativeY?
|
|
326
|
+
q.cumulativeY-q.dataPoint.y:0)>O.viewportMaximum)continue}else if("waterfall"===p||"error"===p&&!q.axisSwapped){if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum||q.bounds.y1>c.y2||q.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum||q.bounds.x1>c.x2||q.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum||Math.max.apply(null,
|
|
327
|
+
q.dataPoint.y)<O.viewportMinimum||Math.min.apply(null,q.dataPoint.y)>O.viewportMaximum)continue}else if(q.dataPoint.x<P.viewportMinimum||q.dataPoint.x>P.viewportMaximum)continue;h=k=2;"horizontal"===y?(M=A.width,m=A.height):(m=A.width,M=A.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))s="auto",k=4;else if(0<=p.indexOf("stacked"))"auto"===s&&(s="inside");else if("bubble"===p||"scatter"===p)s="inside";r=q.point.x-M/2+("horizontal"===y?0:A._lineHeight/
|
|
328
|
+
2);if("inside"!==s)d=c.y1,g=c.y2,0<w?(f=q.point.y+A._lineHeight/2-m-k-b,f<d&&(f="auto"===s?Math.max(q.point.y,d)+A._lineHeight/2+k+b:d+A._lineHeight/2+k+b,ca=f+("horizontal"===y?m-A._lineHeight/2:0)>q.point.y,!ca||(0<=p.indexOf("line")||0<=p.indexOf("area"))||(f-=b))):(f=q.point.y+A._lineHeight/2+k+b,f>g-m+A._lineHeight/2-k&&(f="auto"===s?Math.min(q.point.y,g)+A._lineHeight/2-m-k-b:g+A._lineHeight/2-m-k-b,ca=f-("horizontal"===y?A._lineHeight/2:m)<q.point.y,!ca||(0<=p.indexOf("line")||0<=p.indexOf("area"))||
|
|
329
|
+
(f+=b)));else{Math.max(q.bounds.y1,c.y1);g=Math.min(q.bounds.y2,c.y2)-m+A._lineHeight/2;b=0<=p.indexOf("range")||"error"===p?0<w?Math.max(q.bounds.y1,c.y1)+A._lineHeight/2+k:Math.min(q.bounds.y2,c.y2)+A._lineHeight/2-m-k:(Math.max(q.bounds.y1,c.y1)+Math.min(q.bounds.y2,c.y2))/2-m/2+A._lineHeight/2;if(0<w){if(f=b,"bubble"===p||"scatter"===p)f=q.point.y-m/2+A._lineHeight/2,m>q.bounds.y2-q.bounds.y1&&(f-=m/2+k),0>f-A._lineHeight/2&&(f+=Math.abs(f-A._lineHeight/2)<=(q.bounds.y2-q.bounds.y1)/2+k?Math.abs(f-
|
|
330
|
+
A._lineHeight/2):(q.bounds.y2-q.bounds.y1)/2+k)}else f=Math.min(q.point.y,b),f>g-m-k&&("bubble"===p||"scatter"===p)&&(f=Math.min(q.point.y+k,c.y2-m-k));f=Math.min(f,g)}}else 0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("scatter")?(s="auto",h=4):0<=p.indexOf("stacked")?"auto"===s&&(s="inside"):"bubble"===p&&(s="inside"),f=q.point.y+A._lineHeight/2-m/2,"inside"!==s?(g=c.x1,d=c.x2,0>w?(r=q.point.x-M+("horizontal"===y?0:A._lineHeight/2)-h-b,("horizontal"===y?r:r-A._lineHeight/2)<g&&(r="auto"===
|
|
331
|
+
s?Math.max(q.point.x,g)+("horizontal"===y?0:A._lineHeight/2)+k+b:g+("horizontal"===y?0:A._lineHeight/2)+h,(ca=r+M-("horizontal"===y?0:A._lineHeight/2)>q.point.x)&&(r-=b))):(r=q.point.x+("horizontal"===y?0:A._lineHeight/2)+h+b,("horizontal"===y?r:r-A._lineHeight/2)>d-M-h-b&&(r="auto"===s?Math.min(q.point.x,d)-("horizontal"===y?M:M-A._lineHeight/2)-h-b:d-M-h+("horizontal"===y?0:A._lineHeight/2),(ca=r-("horizontal"===y?0:A._lineHeight/2)<q.point.x)&&(r+=b)))):(g=Math.max(q.bounds.x1,c.x1),Math.min(q.bounds.x2,
|
|
332
|
+
c.x2),b=0<=p.indexOf("range")||"error"===p?0>w?Math.max(q.bounds.x1,c.x1):Math.min(q.bounds.x2,c.x2)-M-h+("horizontal"===y?0:A._lineHeight/2):(Math.max(q.bounds.x1,c.x1)+Math.min(q.bounds.x2,c.x2))/2-M/2+("horizontal"===y?0:A._lineHeight/2),r=0>w?b:Math.min(q.point.x,b),r=Math.max(r,g+("horizontal"===y?0:A._lineHeight/2+k)));"vertical"===y&&(f+=m-A._lineHeight/2,0<="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&(ca=0<w?f+("horizontal"===
|
|
333
|
+
y?m-A._lineHeight/2:0)>q.point.y:f-("horizontal"===y?A._lineHeight/2:m)<q.point.y),"bubble"===p||"scatter"===p)&&(r+=A._lineHeight/2-G/2);A.x=r;A.y=f;A.render(!0);x&&("inside"!==s&&(0>p.indexOf("bar")&&("error"!==p||!q.axisSwapped)&&q.point.x>c.x1&&q.point.x<c.x2||!ca)&&(-1==="ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p)&&("error"!==p||q.axisSwapped)&&q.point.y>c.y1&&q.point.y<c.y2||!ca))&&(e.lineWidth=x,e.strokeStyle=u?u:"gray",e.setLineDash&&
|
|
334
|
+
e.setLineDash(K(n,x)),e.beginPath(),e.moveTo(q.point.x,q.point.y),0<=p.indexOf("bar")||"error"===p&&q.axisSwapped?e.lineTo(r+(0<q.direction?0:M)+("vertical"===y?-A._lineHeight/2:0),f+("vertical"===y?-m/2:m/2-A._lineHeight/2)):0<=p.indexOf("column")||"error"===p&&!q.axisSwapped?e.lineTo(r+M/2-("horizontal"===y?0:A._lineHeight/2),f+("vertical"===y?f-m<q.point.y?0:-m:(f-A._lineHeight/2<q.point.y?m:0)-A._lineHeight/2)):0<=p.indexOf("waterfall")?e.lineTo(r+M/2-("horizontal"===y?0:A._lineHeight/2),"vertical"===
|
|
335
|
+
y?0<w&&f<q.point.y?f:0>w&&f-m>q.point.y?f-m:q.point.y:0<w&&f+m-A._lineHeight/2<q.point.y?f+m-A._lineHeight/2:0>w&&f-A._lineHeight/2>q.point.y?f-A._lineHeight/2:q.point.y):e.lineTo(r+M/2-("horizontal"===y?0:A._lineHeight/2),f+("vertical"===y?f-m<q.point.y?0:-m:(f+m-A._lineHeight/2<q.point.y?m:0)-A._lineHeight/2)),e.stroke())}}e={source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)q=
|
|
336
|
+
this._indexLabels[a],A=V("indexLabelBackgroundColor",q.dataPoint,q.dataSeries),q.dataSeries.indexLabelBackgroundColor=l(A)?t?"transparent":null:A;return e};s.prototype.renderLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var g=[],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=
|
|
337
|
+
this.data[l];c.lineWidth=m.lineThickness;var q=m.dataPoints,p="solid";if(c.setLineDash){var r=K(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=K(p,m.lineThickness);c.setLineDash(f)}var G=m.id;this._eventManager.objectMap[G]={objectType:"dataSeries",dataSeriesIndex:l};G=R(G);b.strokeStyle=G;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var G=m._colorSet,n=G=m.lineColor=m.options.lineColor?m.options.lineColor:G[0];c.strokeStyle=G;var C=!0,u=0,x,v;c.beginPath();if(0<q.length){for(var s=
|
|
338
|
+
!1,u=0;u<q.length;u++)if(x=q[u].x.getTime?q[u].x.getTime():q[u].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!s)))if("number"!==typeof q[u].y)0<u&&!(m.connectNullData||s||C)&&(c.stroke(),t&&b.stroke()),s=!0;else{x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(q[u].y);var y=m.dataPointIds[u];this._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:u,x1:x,y1:v};C||s?(!C&&m.connectNullData?(c.setLineDash&&
|
|
339
|
+
(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(h.x,h.y),p=m.nullDataLineDashType,c.setLineDash(r)),c.lineTo(x,v),t&&b.lineTo(x,v)):(c.beginPath(),c.moveTo(x,v),t&&(b.beginPath(),b.moveTo(x,v))),s=C=!1):(c.lineTo(x,v),t&&b.lineTo(x,v),0==u%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),t&&(b.stroke(),b.beginPath(),b.moveTo(x,v))));h={x:x,y:v};u<q.length-1&&(n!==(q[u].lineColor||G)||p!==(q[u].lineDashType||m.lineDashType))&&
|
|
340
|
+
(c.stroke(),c.beginPath(),c.moveTo(x,v),n=q[u].lineColor||G,c.strokeStyle=n,c.setLineDash&&(q[u].lineDashType?(p=q[u].lineDashType,c.setLineDash(K(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(f))));if(0!==q[u].markerSize&&(0<q[u].markerSize||0<m.markerSize)){var E=m.getMarkerProperties(u,x,v,c);g.push(E);y=R(y);t&&g.push({x:x,y:v,ctx:b,type:E.type,size:E.size,color:y,borderColor:y,borderThickness:E.borderThickness})}(q[u].indexLabel||m.indexLabel||q[u].indexLabelFormatter||m.indexLabelFormatter)&&
|
|
341
|
+
this._indexLabels.push({chartType:"line",dataPoint:q[u],dataSeries:m,point:{x:x,y:v},direction:0>q[u].y===a.axisY.reversed?1:-1,color:G})}c.stroke();t&&b.stroke()}}Y.drawMarkers(g);t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
342
|
+
0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderStepLine=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var d=this.plotArea;c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();for(var g=
|
|
343
|
+
[],h,k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];c.lineWidth=m.lineThickness;var q=m.dataPoints,p="solid";if(c.setLineDash){var r=K(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=K(p,m.lineThickness);c.setLineDash(f)}var G=m.id;this._eventManager.objectMap[G]={objectType:"dataSeries",dataSeriesIndex:l};G=R(G);b.strokeStyle=G;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var G=m._colorSet,n=G=m.lineColor=m.options.lineColor?m.options.lineColor:
|
|
344
|
+
G[0];c.strokeStyle=G;var C=!0,u=0,x,v;c.beginPath();if(0<q.length){for(var s=!1,u=0;u<q.length;u++)if(x=q[u].getTime?q[u].x.getTime():q[u].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!s)))if("number"!==typeof q[u].y)0<u&&!(m.connectNullData||s||C)&&(c.stroke(),t&&b.stroke()),s=!0;else{var y=v;x=a.axisX.convertValueToPixel(x);v=a.axisY.convertValueToPixel(q[u].y);var E=m.dataPointIds[u];this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:l,
|
|
345
|
+
dataPointIndex:u,x1:x,y1:v};C||s?(!C&&m.connectNullData?(c.setLineDash&&(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(h.x,h.y),p=m.nullDataLineDashType,c.setLineDash(r)),c.lineTo(x,y),c.lineTo(x,v),t&&(b.lineTo(x,y),b.lineTo(x,v))):(c.beginPath(),c.moveTo(x,v),t&&(b.beginPath(),b.moveTo(x,v))),s=C=!1):(c.lineTo(x,y),t&&b.lineTo(x,y),c.lineTo(x,v),t&&b.lineTo(x,v),0==u%500&&(c.stroke(),c.beginPath(),c.moveTo(x,v),t&&
|
|
346
|
+
(b.stroke(),b.beginPath(),b.moveTo(x,v))));h={x:x,y:v};u<q.length-1&&(n!==(q[u].lineColor||G)||p!==(q[u].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,v),n=q[u].lineColor||G,c.strokeStyle=n,c.setLineDash&&(q[u].lineDashType?(p=q[u].lineDashType,c.setLineDash(K(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(f))));0!==q[u].markerSize&&(0<q[u].markerSize||0<m.markerSize)&&(y=m.getMarkerProperties(u,x,v,c),g.push(y),E=R(E),t&&g.push({x:x,y:v,ctx:b,type:y.type,size:y.size,
|
|
347
|
+
color:E,borderColor:E,borderThickness:y.borderThickness}));(q[u].indexLabel||m.indexLabel||q[u].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:q[u],dataSeries:m,point:{x:x,y:v},direction:0>q[u].y===a.axisY.reversed?1:-1,color:G})}c.stroke();t&&b.stroke()}}Y.drawMarkers(g);t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
|
|
348
|
+
a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.beginPath());c.restore();c.beginPath();return{source:e,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderSpline=function(a){function e(a){a=w(a,2);if(0<a.length){b.beginPath();t&&d.beginPath();b.moveTo(a[0].x,
|
|
349
349
|
a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);t&&d.moveTo(a[0].x,a[0].y);for(var c=0;c<a.length-3;c+=3)if(b.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),t&&d.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),0<c&&0===c%3E3||a[c+3].newStrokeStyle||a[c+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[c+3].x,a[c+3].y),a[c+3].newStrokeStyle&&(b.strokeStyle=a[c+3].newStrokeStyle),
|
|
350
|
-
a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),t&&(d.stroke(),d.beginPath(),d.moveTo(a[c+3].x,a[c+3].y));b.stroke();t&&d.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx;b.save();var g=this.plotArea;b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();for(var h=[],k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];b.lineWidth=m.lineThickness;var
|
|
351
|
-
m.dataPoints,p="solid";if(b.setLineDash){var
|
|
352
|
-
|
|
353
|
-
dataPointIndex:
|
|
354
|
-
color:s,borderColor:s,borderThickness:
|
|
355
|
-
b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),d.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:
|
|
356
|
-
null,d=this.plotArea,g=0,h,k,l,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,
|
|
357
|
-
isFinite(p)||(p=0.3*Math.abs(
|
|
358
|
-
c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(
|
|
359
|
-
a.axisX.convertValueToPixel(l);k=a.axisY.convertValueToPixel(
|
|
360
|
-
(a.axisY.reversed?0>
|
|
361
|
-
(
|
|
362
|
-
this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
363
|
-
l=[],m=0,
|
|
364
|
-
0.9*(d.width*(a.axisX.logarithmic?Math.log(
|
|
365
|
-
this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(
|
|
366
|
-
|
|
367
|
-
g[
|
|
368
|
-
r,
|
|
369
|
-
c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
370
|
-
a.axisY.bounds.y2:f}}};s.prototype.renderStackedColumn100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,
|
|
371
|
-
0.15*this.width<<0;var n=a.axisX.dataInfo.minDiff,
|
|
372
|
-
this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>
|
|
373
|
-
|
|
374
|
-
0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=
|
|
375
|
-
aa(c,
|
|
376
|
-
dataPoint:
|
|
377
|
-
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
378
|
-
e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,l,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,
|
|
379
|
-
a.axisX.conversionParameters.range:a.axisX.range;isFinite(p)||(p=0.3*Math.abs(
|
|
380
|
-
c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(
|
|
381
|
-
l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[g].y){k=a.axisX.convertValueToPixel(l);h=a.axisY.convertValueToPixel(n[g].y);k=a.axisX.reversed?k+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+
|
|
382
|
-
|
|
383
|
-
bounds:{x1:Math.min(u,h),y1:k,x2:Math.max(u,h),y2:
|
|
384
|
-
c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
385
|
-
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,
|
|
350
|
+
a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),t&&(d.stroke(),d.beginPath(),d.moveTo(a[c+3].x,a[c+3].y));b.stroke();t&&d.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx;b.save();var g=this.plotArea;b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();for(var h=[],k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l];b.lineWidth=m.lineThickness;var q=
|
|
351
|
+
m.dataPoints,p="solid";if(b.setLineDash){var r=K(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,f=K(p,m.lineThickness);b.setLineDash(f)}var G=m.id;this._eventManager.objectMap[G]={objectType:"dataSeries",dataSeriesIndex:l};G=R(G);d.strokeStyle=G;d.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var G=m._colorSet,n=G=m.lineColor=m.options.lineColor?m.options.lineColor:G[0];b.strokeStyle=G;var C=0,u,x,v=[];b.beginPath();if(0<q.length)for(x=!1,C=0;C<q.length;C++)if(u=q[C].getTime?
|
|
352
|
+
q[C].x.getTime():q[C].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!x)))if("number"!==typeof q[C].y)0<C&&!x&&(m.connectNullData?b.setLineDash&&(0<v.length&&(m.options.nullDataLineDashType||!q[C-1].lineDashType))&&(v[v.length-1].newLineDashArray=r,p=m.nullDataLineDashType):(e(v),v=[])),x=!0;else{u=a.axisX.convertValueToPixel(u);x=a.axisY.convertValueToPixel(q[C].y);var s=m.dataPointIds[C];this._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataSeriesIndex:l,
|
|
353
|
+
dataPointIndex:C,x1:u,y1:x};v[v.length]={x:u,y:x};C<q.length-1&&(n!==(q[C].lineColor||G)||p!==(q[C].lineDashType||m.lineDashType))&&(n=q[C].lineColor||G,v[v.length-1].newStrokeStyle=n,b.setLineDash&&(q[C].lineDashType?(p=q[C].lineDashType,v[v.length-1].newLineDashArray=K(p,m.lineThickness)):(p=m.lineDashType,v[v.length-1].newLineDashArray=f)));if(0!==q[C].markerSize&&(0<q[C].markerSize||0<m.markerSize)){var y=m.getMarkerProperties(C,u,x,b);h.push(y);s=R(s);t&&h.push({x:u,y:x,ctx:d,type:y.type,size:y.size,
|
|
354
|
+
color:s,borderColor:s,borderThickness:y.borderThickness})}(q[C].indexLabel||m.indexLabel||q[C].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:q[C],dataSeries:m,point:{x:u,y:x},direction:0>q[C].y===a.axisY.reversed?1:-1,color:G});x=!1}e(v)}Y.drawMarkers(h);t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
|
|
355
|
+
b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),d.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=
|
|
356
|
+
null,d=this.plotArea,g=0,h,k,l,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,q=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff,r=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;
|
|
357
|
+
isFinite(p)||(p=0.3*Math.abs(r));p=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(p)/Math.log(r):Math.abs(p)/Math.abs(r))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>q&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<g)&&(q=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));p<g&&(p=g);p>q&&(p=q);c.save();t&&this._eventManager.ghostCtx.save();
|
|
358
|
+
c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(q=0;q<a.dataSeriesIndexes.length;q++){var r=a.dataSeriesIndexes[q],f=this.data[r],G=f.dataPoints;if(0<G.length)for(var n=5<p&&f.bevelEnabled?!0:!1,g=0;g<G.length;g++)if(G[g].getTime?l=G[g].x.getTime():l=G[g].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof G[g].y){h=
|
|
359
|
+
a.axisX.convertValueToPixel(l);k=a.axisY.convertValueToPixel(G[g].y);h=a.axisX.reversed?h+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+q)*p<<0:h-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+q)*p<<0;var C=a.axisX.reversed?h-p<<0:h+p<<0,u;if(0<=G[g].y){if(u=m,k>u){var x=k;k=u;u=x}}else u=k,k=m,k>u&&(x=k,k=u,u=x);var x=Math.max(k,d.y1),v=Math.min(u,d.y2),b=G[g].color?G[g].color:f._colorSet[g%f._colorSet.length];aa(c,a.axisX.reversed?C:h,x,a.axisX.reversed?h:C,v,b,0,null,n&&
|
|
360
|
+
(a.axisY.reversed?0>G[g].y:0<=G[g].y),(a.axisY.reversed?0<=G[g].y:0>G[g].y)&&n,!1,!1,f.fillOpacity);b=f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:g,x1:h,y1:x,x2:C,y2:v};b=R(b);t&&aa(this._eventManager.ghostCtx,a.axisX.reversed?C:h,x,a.axisX.reversed?h:C,v,b,0,null,!1,!1,!1,!1);(G[g].indexLabel||f.indexLabel||G[g].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:G[g],dataSeries:f,point:{x:h+
|
|
361
|
+
(C-h)/2,y:0>G[g].y===a.axisY.reversed?k:u},direction:0>G[g].y===a.axisY.reversed?1:-1,bounds:{x1:h,y1:Math.min(k,u),x2:C,y2:Math.max(k,u)},color:b})}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,
|
|
362
|
+
this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.yScaleAnimation,easingFunction:N.easing.easeOutQuart,animationBase:m<a.axisY.bounds.y1?a.axisY.bounds.y1:m>a.axisY.bounds.y2?a.axisY.bounds.y2:m}}};s.prototype.renderStackedColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],
|
|
363
|
+
l=[],m=0,q,p,r,f=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,G=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0,n=a.axisX.dataInfo.minDiff,C=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(C));n=this.options.dataPointWidth?this.dataPointWidth:
|
|
364
|
+
0.9*(d.width*(a.axisX.logarithmic?Math.log(n)/Math.log(C):Math.abs(n)/Math.abs(C))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>G&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,G));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&G<m)&&(G=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>G&&(n=G);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
|
|
365
|
+
this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(G=0;G<a.dataSeriesIndexes.length;G++){var C=a.dataSeriesIndexes[G],u=this.data[C],x=u.dataPoints;if(0<x.length){var v=5<n&&u.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<x.length;m++)if(r=x[m].x.getTime?x[m].x.getTime():x[m].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax)&&"number"===typeof x[m].y){q=a.axisX.convertValueToPixel(r);q=q-a.plotType.plotUnits.length*n/2+a.index*
|
|
366
|
+
n<<0;var s=q+n<<0,y;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<x[m].y)k[r]=x[m].y+(k[r]?k[r]:0),0<k[r]&&(p=a.axisY.convertValueToPixel(k[r]),y="undefined"!==typeof g[r]?g[r]:f,g[r]=p);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=x[m].y)l[r]=x[m].y+(l[r]?l[r]:0),y=a.axisY.convertValueToPixel(l[r]),p="undefined"!==typeof h[r]?h[r]:f,h[r]=y;else if(p=a.axisY.convertValueToPixel(x[m].y),0<=x[m].y){var E="undefined"!==typeof g[r]?
|
|
367
|
+
g[r]:0;p-=E;y=f-E;g[r]=E+(y-p)}else E=h[r]?h[r]:0,y=p+E,p=f+E,h[r]=E+(y-p);b=x[m].color?x[m].color:u._colorSet[m%u._colorSet.length];r=Math.max(p,d.y1);E=Math.min(y,d.y2);aa(c,q,a.axisY.reversed?E:r,s,a.axisY.reversed?r:E,b,0,null,v&&(a.axisY.reversed?0>x[m].y:0<=x[m].y),(a.axisY.reversed?0<=x[m].y:0>x[m].y)&&v,!1,!1,u.fillOpacity);b=u.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:m,x1:q,y1:r,x2:s,y2:E};b=R(b);t&&aa(this._eventManager.ghostCtx,
|
|
368
|
+
q,r,s,E,b,0,null,!1,!1,!1,!1);(x[m].indexLabel||u.indexLabel||x[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:x[m],dataSeries:u,point:{x:q+(s-q)/2,y:0<=x[m].y?p:y},direction:0>x[m].y===a.axisY.reversed?1:-1,bounds:{x1:q,y1:Math.min(p,y),x2:s,y2:Math.max(p,y)},color:b,cumulativeY:u.dataPointEOs[m].cumulativeY})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&
|
|
369
|
+
c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.yScaleAnimation,easingFunction:N.easing.easeOutQuart,animationBase:f<a.axisY.bounds.y1?a.axisY.bounds.y1:f>a.axisY.bounds.y2?
|
|
370
|
+
a.axisY.bounds.y2:f}}};s.prototype.renderStackedColumn100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,q,p,r,f=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;r=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
371
|
+
0.15*this.width<<0;var n=a.axisX.dataInfo.minDiff,A=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(A));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(n)/Math.log(A):Math.abs(n)/Math.abs(A))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>r&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,r));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&r<m)&&(r=Math.max(this.options.dataPointWidth?
|
|
372
|
+
this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>r&&(n=r);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(A=0;A<a.dataSeriesIndexes.length;A++){var C=a.dataSeriesIndexes[A],u=this.data[C],x=u.dataPoints;if(0<x.length)for(var v=5<n&&u.bevelEnabled?!0:!1,m=0;m<x.length;m++)if(r=x[m].x.getTime?x[m].x.getTime():
|
|
373
|
+
x[m].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax)&&"number"===typeof x[m].y){q=a.axisX.convertValueToPixel(r);p=0!==a.dataPointYSums[r]?100*(x[m].y/a.dataPointYSums[r]):0;q=q-a.plotType.plotUnits.length*n/2+a.index*n<<0;var s=q+n<<0,y;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<x[m].y){k[r]=p+("undefined"!==typeof k[r]?k[r]:0);if(0>=k[r])continue;p=a.axisY.convertValueToPixel(k[r]);y=g[r]?g[r]:f;g[r]=p}else a.axisY.scaleBreaks&&
|
|
374
|
+
0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=x[m].y?(l[r]=p+("undefined"!==typeof l[r]?l[r]:0),y=a.axisY.convertValueToPixel(l[r]),p=h[r]?h[r]:f,h[r]=y):(p=a.axisY.convertValueToPixel(p),0<=x[m].y?(b="undefined"!==typeof g[r]?g[r]:0,p-=b,y=f-b,a.dataSeriesIndexes.length-1===A&&1>=Math.abs(d.y1-p)&&(p=d.y1),g[r]=b+(y-p)):(b="undefined"!==typeof h[r]?h[r]:0,y=p+b,p=f+b,a.dataSeriesIndexes.length-1===A&&1>=Math.abs(d.y2-y)&&(y=d.y2),h[r]=b+(y-p)));b=x[m].color?x[m].color:u._colorSet[m%u._colorSet.length];
|
|
375
|
+
aa(c,q,a.axisY.reversed?y:p,s,a.axisY.reversed?p:y,b,0,null,v&&(a.axisY.reversed?0>x[m].y:0<=x[m].y),(a.axisY.reversed?0<=x[m].y:0>x[m].y)&&v,!1,!1,u.fillOpacity);b=u.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:m,x1:q,y1:p,x2:s,y2:y};b=R(b);t&&aa(this._eventManager.ghostCtx,q,p,s,y,b,0,null,!1,!1,!1,!1);(x[m].indexLabel||u.indexLabel||x[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",
|
|
376
|
+
dataPoint:x[m],dataSeries:u,point:{x:q+(s-q)/2,y:0<=x[m].y?p:y},direction:0>x[m].y===a.axisY.reversed?1:-1,bounds:{x1:q,y1:Math.min(p,y),x2:s,y2:Math.max(p,y)},color:b,yCumulative:100*(u.dataPointEOs[m].cumulativeY/a.dataPointYSums[r])})}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
|
|
377
|
+
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.yScaleAnimation,easingFunction:N.easing.easeOutQuart,animationBase:f<a.axisY.bounds.y1?a.axisY.bounds.y1:f>a.axisY.bounds.y2?a.axisY.bounds.y2:f}}};s.prototype.renderBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:
|
|
378
|
+
e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,l,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,q=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff,r=a.axisX.conversionParameters.range?
|
|
379
|
+
a.axisX.conversionParameters.range:a.axisX.range;isFinite(p)||(p=0.3*Math.abs(r));p=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(p)/Math.log(r):Math.abs(p)/Math.abs(r))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>q&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,q));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&q<g)&&(q=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));p<g&&(p=g);p>q&&(p=q);
|
|
380
|
+
c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(q=0;q<a.dataSeriesIndexes.length;q++){var r=a.dataSeriesIndexes[q],f=this.data[r],n=f.dataPoints;if(0<n.length){var A=5<p&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(g=0;g<n.length;g++)if(n[g].getTime?l=n[g].x.getTime():l=n[g].x,!(l<a.axisX.dataInfo.viewPortMin||
|
|
381
|
+
l>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[g].y){k=a.axisX.convertValueToPixel(l);h=a.axisY.convertValueToPixel(n[g].y);k=a.axisX.reversed?k+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+q)*p<<0:k-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+q)*p<<0;var C=a.axisX.reversed?k-p<<0:k+p<<0,u;0<=n[g].y?u=m:(u=h,h=m);b=n[g].color?n[g].color:f._colorSet[g%f._colorSet.length];aa(c,a.axisY.reversed?h:u,a.axisX.reversed?C:k,a.axisY.reversed?u:h,a.axisX.reversed?k:C,b,0,null,
|
|
382
|
+
A,!1,!1,!1,f.fillOpacity);b=f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:g,x1:u,y1:k,x2:h,y2:C};b=R(b);t&&aa(this._eventManager.ghostCtx,u,a.axisX.reversed?C:k,h,a.axisX.reversed?k:C,b,0,null,!1,!1,!1,!1);(n[g].indexLabel||f.indexLabel||n[g].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:n[g],dataSeries:f,point:{x:0<=n[g].y?h:u,y:k+(C-k)/2},direction:0>n[g].y===a.axisY.reversed?1:-1,
|
|
383
|
+
bounds:{x1:Math.min(u,h),y1:k,x2:Math.max(u,h),y2:C},color:b})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());
|
|
384
|
+
c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.xScaleAnimation,easingFunction:N.easing.easeOutQuart,animationBase:m<a.axisY.bounds.x1?a.axisY.bounds.x1:m>a.axisY.bounds.x2?a.axisY.bounds.x2:m}}};s.prototype.renderStackedBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,q,p,r=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?
|
|
385
|
+
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,A=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(A));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(n)/Math.log(A):Math.abs(n)/Math.abs(A))/a.plotType.plotUnits.length)<<
|
|
386
386
|
0;this.dataPointMaxWidth&&m>f&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<m)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>f&&(n=f);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());
|
|
387
|
-
for(f=0;f<a.dataSeriesIndexes.length;f++){var
|
|
388
|
-
0<u[m].y)k[b]=u[m].y+(k[b]?k[b]:0),0<k[b]&&(s=g[b]?g[b]:
|
|
389
|
-
s:
|
|
390
|
-
|
|
391
|
-
return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
392
|
-
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,
|
|
387
|
+
for(f=0;f<a.dataSeriesIndexes.length;f++){var A=a.dataSeriesIndexes[f],C=this.data[A],u=C.dataPoints;if(0<u.length){var x=5<n&&C.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<u.length;m++)if(b=u[m].x.getTime?u[m].x.getTime():u[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof u[m].y){p=a.axisX.convertValueToPixel(b);p=p-a.plotType.plotUnits.length*n/2+a.index*n<<0;var v=p+n<<0,s;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
|
|
388
|
+
0<u[m].y)k[b]=u[m].y+(k[b]?k[b]:0),0<k[b]&&(s=g[b]?g[b]:r,g[b]=q=a.axisY.convertValueToPixel(k[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=u[m].y)l[b]=u[m].y+(l[b]?l[b]:0),q=h[b]?h[b]:r,h[b]=s=a.axisY.convertValueToPixel(l[b]);else if(q=a.axisY.convertValueToPixel(u[m].y),0<=u[m].y){var y=g[b]?g[b]:0;s=r+y;q+=y;g[b]=y+(q-s)}else y=h[b]?h[b]:0,s=q-y,q=r-y,h[b]=y+(q-s);b=u[m].color?u[m].color:C._colorSet[m%C._colorSet.length];aa(c,a.axisY.reversed?q:s,p,a.axisY.reversed?
|
|
389
|
+
s:q,v,b,0,null,x,!1,!1,!1,C.fillOpacity);b=C.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:m,x1:s,y1:p,x2:q,y2:v};b=R(b);t&&aa(this._eventManager.ghostCtx,s,p,q,v,b,0,null,!1,!1,!1,!1);(u[m].indexLabel||C.indexLabel||u[m].indexLabelFormatter||C.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:u[m],dataSeries:C,point:{x:0<=u[m].y?q:s,y:p+(v-p)/2},direction:0>u[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(s,
|
|
390
|
+
q),y1:p,x2:Math.max(s,q),y2:v},color:b})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();
|
|
391
|
+
return{source:e,dest:this.plotArea.ctx,animationCallback:N.xScaleAnimation,easingFunction:N.easing.easeOutQuart,animationBase:r<a.axisY.bounds.x1?a.axisY.bounds.x1:r>a.axisY.bounds.x2?a.axisY.bounds.x2:r}}};s.prototype.renderStackedBar100=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=[],h=[],k=[],l=[],m=0,q,p,r=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?
|
|
392
|
+
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0,n=a.axisX.dataInfo.minDiff,A=a.axisX.conversionParameters.range?a.axisX.conversionParameters.range:a.axisX.range;isFinite(n)||(n=0.3*Math.abs(A));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(n)/Math.log(A):Math.abs(n)/Math.abs(A))/a.plotType.plotUnits.length)<<
|
|
393
393
|
0;this.dataPointMaxWidth&&m>f&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<m)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));n<m&&(n=m);n>f&&(n=f);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());
|
|
394
|
-
for(f=0;f<a.dataSeriesIndexes.length;f++){var
|
|
395
|
-
a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<u[m].y){k[b]=v+(k[b]?k[b]:0);if(0>=k[b])continue;v=g[b]?g[b]:
|
|
396
|
-
h[b]:0,v=
|
|
397
|
-
|
|
398
|
-
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
399
|
-
0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?s=v:0>a.axisY.viewportMaximum?s=k.y1:0<a.axisY.viewportMinimum&&(s=v),g.lineTo(
|
|
400
|
-
l=[],m=this.plotArea,
|
|
401
|
-
f._colorSet[
|
|
402
|
-
else{
|
|
403
|
-
(
|
|
404
|
-
type:
|
|
405
|
-
a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());g.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:
|
|
406
|
-
b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var
|
|
407
|
-
b.setLineDash(c[
|
|
408
|
-
|
|
409
|
-
a.dataSeriesIndexes[l],
|
|
410
|
-
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
"source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:
|
|
414
|
-
function(a){var e,c;function b(){
|
|
415
|
-
d;if(!(0>=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,k=a.axisY.lineCoordinates,l=[],m=this.plotArea,
|
|
416
|
-
a.axisY.viewportMinimum:0),z,
|
|
417
|
-
typeof n[
|
|
418
|
-
!1):(g.lineTo(
|
|
419
|
-
0<f.markerSize)&&(Z=f.getMarkerProperties(s,
|
|
420
|
-
"source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());g.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:
|
|
421
|
-
function(a){function e(){if(!(1>m.length)){for(0<
|
|
422
|
-
0),
|
|
423
|
-
|
|
424
|
-
{x:g,y:null};if(!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!
|
|
425
|
-
|
|
426
|
-
(
|
|
427
|
-
(0<ga.markerSize||0<
|
|
428
|
-
t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(k.x1,k.y1,k.width,k.height),
|
|
429
|
-
easingFunction:
|
|
430
|
-
0,f,n,s,
|
|
431
|
-
!0);
|
|
432
|
-
b.setLineDash(ca)}for(var Z=!0,
|
|
433
|
-
oa+(p[g]?p[g]:0);if(0>=p[g]&&a.axisY.logarithmic)continue;n=a.axisY.convertValueToPixel(p[g])}else n=a.axisY.convertValueToPixel(oa),n-=
|
|
434
|
-
n))),Z=
|
|
435
|
-
{id:
|
|
436
|
-
point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&v.moveTo(f,n)}delete
|
|
437
|
-
this.height),b.clearRect(h.x1,h.y1,h.width,h.height),v.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:
|
|
438
|
-
this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var k=-Infinity,l=Infinity,m=0;m<a.dataSeriesIndexes.length;m++)for(var
|
|
439
|
-
n),m=0;m<a.dataSeriesIndexes.length;m++)if(
|
|
440
|
-
p.fillOpacity;Y.drawMarker(g,h,c,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;var u=p.dataPointIds[d];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:
|
|
394
|
+
for(f=0;f<a.dataSeriesIndexes.length;f++){var A=a.dataSeriesIndexes[f],C=this.data[A],u=C.dataPoints;if(0<u.length){var x=5<n&&C.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<u.length;m++)if(b=u[m].x.getTime?u[m].x.getTime():u[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof u[m].y){p=a.axisX.convertValueToPixel(b);var v;v=0!==a.dataPointYSums[b]?100*(u[m].y/a.dataPointYSums[b]):0;p=p-a.plotType.plotUnits.length*n/2+a.index*n<<0;var s=p+n<<0;if(a.axisY.logarithmic||
|
|
395
|
+
a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<u[m].y){k[b]=v+(k[b]?k[b]:0);if(0>=k[b])continue;v=g[b]?g[b]:r;g[b]=q=a.axisY.convertValueToPixel(k[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=u[m].y)l[b]=v+(l[b]?l[b]:0),q=h[b]?h[b]:r,h[b]=v=a.axisY.convertValueToPixel(l[b]);else if(q=a.axisY.convertValueToPixel(v),0<=u[m].y){var y=g[b]?g[b]:0;v=r+y;q+=y;a.dataSeriesIndexes.length-1===f&&1>=Math.abs(d.x2-q)&&(q=d.x2);g[b]=y+(q-v)}else y=h[b]?
|
|
396
|
+
h[b]:0,v=q-y,q=r-y,a.dataSeriesIndexes.length-1===f&&1>=Math.abs(d.x1-v)&&(v=d.x1),h[b]=y+(q-v);b=u[m].color?u[m].color:C._colorSet[m%C._colorSet.length];aa(c,a.axisY.reversed?q:v,p,a.axisY.reversed?v:q,s,b,0,null,x,!1,!1,!1,C.fillOpacity);b=C.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:m,x1:v,y1:p,x2:q,y2:s};b=R(b);t&&aa(this._eventManager.ghostCtx,v,p,q,s,b,0,null,!1,!1,!1,!1);(u[m].indexLabel||C.indexLabel||u[m].indexLabelFormatter||
|
|
397
|
+
C.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:u[m],dataSeries:C,point:{x:0<=u[m].y?q:v,y:p+(s-p)/2},direction:0>u[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(v,q),y1:p,x2:Math.max(v,q),y2:s},color:b})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
|
|
398
|
+
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.xScaleAnimation,easingFunction:N.easing.easeOutQuart,animationBase:r<a.axisY.bounds.x1?a.axisY.bounds.x1:r>a.axisY.bounds.x2?a.axisY.bounds.x2:r}}};s.prototype.renderArea=function(a){var e,c;function b(){y&&(0<f.lineThickness&&g.stroke(),a.axisY.logarithmic||
|
|
399
|
+
0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?s=v:0>a.axisY.viewportMaximum?s=k.y1:0<a.axisY.viewportMinimum&&(s=v),g.lineTo(C,s),g.lineTo(y.x,s),g.closePath(),g.globalAlpha=f.fillOpacity,g.fill(),g.globalAlpha=1,t&&(h.lineTo(C,s),h.lineTo(y.x,s),h.closePath(),h.fill()),g.beginPath(),g.moveTo(C,u),h.beginPath(),h.moveTo(C,u),y={x:C,y:u})}var d=a.targetCanvasCtx||this.plotArea.ctx,g=t?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,k=a.axisY.lineCoordinates,
|
|
400
|
+
l=[],m=this.plotArea,q;g.save();t&&h.save();g.beginPath();g.rect(m.x1,m.y1,m.width,m.height);g.clip();t&&(h.beginPath(),h.rect(m.x1,m.y1,m.width,m.height),h.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var r=a.dataSeriesIndexes[p],f=this.data[r],n=f.dataPoints,l=f.id;this._eventManager.objectMap[l]={objectType:"dataSeries",dataSeriesIndex:r};l=R(l);h.fillStyle=l;l=[];e=!0;var A=0,C,u,x,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),s,y=null;if(0<n.length){var E=
|
|
401
|
+
f._colorSet[A%f._colorSet.length],z=f.lineColor=f.options.lineColor||E,w=z;g.fillStyle=E;g.strokeStyle=z;g.lineWidth=f.lineThickness;c="solid";if(g.setLineDash){var P=K(f.nullDataLineDashType,f.lineThickness);c=f.lineDashType;var O=K(c,f.lineThickness);g.setLineDash(O)}for(var ca=!0;A<n.length;A++)if(x=n[A].x.getTime?n[A].x.getTime():n[A].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!ca)))if("number"!==typeof n[A].y)f.connectNullData||(ca||e)||b(),ca=!0;
|
|
402
|
+
else{C=a.axisX.convertValueToPixel(x);u=a.axisY.convertValueToPixel(n[A].y);e||ca?(!e&&f.connectNullData?(g.setLineDash&&(f.options.nullDataLineDashType||c===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(e=C,c=u,C=q.x,u=q.y,b(),g.moveTo(q.x,q.y),C=e,u=c,y=q,c=f.nullDataLineDashType,g.setLineDash(P)),g.lineTo(C,u),t&&h.lineTo(C,u)):(g.beginPath(),g.moveTo(C,u),t&&(h.beginPath(),h.moveTo(C,u)),y={x:C,y:u}),ca=e=!1):(g.lineTo(C,u),t&&h.lineTo(C,u),0==A%250&&b());q={x:C,y:u};A<n.length-1&&
|
|
403
|
+
(w!==(n[A].lineColor||z)||c!==(n[A].lineDashType||f.lineDashType))&&(b(),w=n[A].lineColor||z,g.strokeStyle=w,g.setLineDash&&(n[A].lineDashType?(c=n[A].lineDashType,g.setLineDash(K(c,f.lineThickness))):(c=f.lineDashType,g.setLineDash(O))));var Z=f.dataPointIds[A];this._eventManager.objectMap[Z]={id:Z,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:A,x1:C,y1:u};0!==n[A].markerSize&&(0<n[A].markerSize||0<f.markerSize)&&(x=f.getMarkerProperties(A,C,u,g),l.push(x),Z=R(Z),t&&l.push({x:C,y:u,ctx:h,
|
|
404
|
+
type:x.type,size:x.size,color:Z,borderColor:Z,borderThickness:x.borderThickness}));(n[A].indexLabel||f.indexLabel||n[A].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:n[A],dataSeries:f,point:{x:C,y:u},direction:0>n[A].y===a.axisY.reversed?1:-1,color:E})}b();Y.drawMarkers(l)}}t&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
|
|
405
|
+
a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());g.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderSplineArea=function(a){function e(){var c=w(x,2);if(0<c.length){if(0<q.lineThickness){b.beginPath();
|
|
406
|
+
b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var e=0;e<c.length-3;e+=3)if(b.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y),t&&d.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y),c[e+3].newStrokeStyle||c[e+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(c[e+3].x,c[e+3].y),c[e+3].newStrokeStyle&&(b.strokeStyle=c[e+3].newStrokeStyle),c[e+3].newLineDashArray&&
|
|
407
|
+
b.setLineDash(c[e+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,c[0].y);t&&(d.beginPath(),d.moveTo(c[0].x,c[0].y));for(e=0;e<c.length-3;e+=3)b.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y),t&&d.bezierCurveTo(c[e+1].x,c[e+1].y,c[e+2].x,c[e+2].y,c[e+3].x,c[e+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?s=A:0>a.axisY.viewportMaximum?s=g.y1:0<a.axisY.viewportMinimum&&(s=A);u={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,s);b.lineTo(u.x,
|
|
408
|
+
s);b.closePath();b.globalAlpha=q.fillOpacity;b.fill();b.globalAlpha=1;t&&(d.lineTo(c[c.length-1].x,s),d.lineTo(u.x,s),d.closePath(),d.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,g=a.axisY.lineCoordinates,h=[],k=this.plotArea;b.save();t&&d.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();t&&(d.beginPath(),d.rect(k.x1,k.y1,k.width,k.height),d.clip());for(var l=0;l<a.dataSeriesIndexes.length;l++){var m=
|
|
409
|
+
a.dataSeriesIndexes[l],q=this.data[m],p=q.dataPoints,h=q.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=R(h);d.fillStyle=h;var h=[],r=0,f,n,A=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),s,u=null,x=[];if(0<p.length){var v=q._colorSet[r%q._colorSet.length],z=q.lineColor=q.options.lineColor||v,y=z;b.fillStyle=v;b.strokeStyle=z;b.lineWidth=q.lineThickness;var E="solid";if(b.setLineDash){var D=K(q.nullDataLineDashType,q.lineThickness),E=
|
|
410
|
+
q.lineDashType,B=K(E,q.lineThickness);b.setLineDash(B)}for(n=!1;r<p.length;r++)if(f=p[r].x.getTime?p[r].x.getTime():p[r].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!q.connectNullData||!n)))if("number"!==typeof p[r].y)0<r&&!n&&(q.connectNullData?b.setLineDash&&(0<x.length&&(q.options.nullDataLineDashType||!p[r-1].lineDashType))&&(x[x.length-1].newLineDashArray=D,E=q.nullDataLineDashType):(e(),x=[])),n=!0;else{f=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(p[r].y);
|
|
411
|
+
var P=q.dataPointIds[r];this._eventManager.objectMap[P]={id:P,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:r,x1:f,y1:n};x[x.length]={x:f,y:n};r<p.length-1&&(y!==(p[r].lineColor||z)||E!==(p[r].lineDashType||q.lineDashType))&&(y=p[r].lineColor||z,x[x.length-1].newStrokeStyle=y,b.setLineDash&&(p[r].lineDashType?(E=p[r].lineDashType,x[x.length-1].newLineDashArray=K(E,q.lineThickness)):(E=q.lineDashType,x[x.length-1].newLineDashArray=B)));if(0!==p[r].markerSize&&(0<p[r].markerSize||0<q.markerSize)){var O=
|
|
412
|
+
q.getMarkerProperties(r,f,n,b);h.push(O);P=R(P);t&&h.push({x:f,y:n,ctx:d,type:O.type,size:O.size,color:P,borderColor:P,borderThickness:O.borderThickness})}(p[r].indexLabel||q.indexLabel||p[r].indexLabelFormatter||q.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[r],dataSeries:q,point:{x:f,y:n},direction:0>p[r].y===a.axisY.reversed?1:-1,color:v});n=!1}e();Y.drawMarkers(h)}}t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation=
|
|
413
|
+
"source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderStepArea=
|
|
414
|
+
function(a){var e,c;function b(){y&&(0<f.lineThickness&&g.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?z=v:0>a.axisY.viewportMaximum?z=k.y1:0<a.axisY.viewportMinimum&&(z=v),g.lineTo(s,z),g.lineTo(y.x,z),g.closePath(),g.globalAlpha=f.fillOpacity,g.fill(),g.globalAlpha=1,t&&(h.lineTo(s,z),h.lineTo(y.x,z),h.closePath(),h.fill()),g.beginPath(),g.moveTo(s,u),h.beginPath(),h.moveTo(s,u),y={x:s,y:u})}var d=a.targetCanvasCtx||this.plotArea.ctx,g=t?this._preRenderCtx:
|
|
415
|
+
d;if(!(0>=a.dataSeriesIndexes.length)){var h=this._eventManager.ghostCtx,k=a.axisY.lineCoordinates,l=[],m=this.plotArea,q;g.save();t&&h.save();g.beginPath();g.rect(m.x1,m.y1,m.width,m.height);g.clip();t&&(h.beginPath(),h.rect(m.x1,m.y1,m.width,m.height),h.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var r=a.dataSeriesIndexes[p],f=this.data[r],n=f.dataPoints,l=f.id;this._eventManager.objectMap[l]={objectType:"dataSeries",dataSeriesIndex:r};l=R(l);h.fillStyle=l;l=[];e=!0;var A=0,s,u,x,v=a.axisY.convertValueToPixel(a.axisY.logarithmic?
|
|
416
|
+
a.axisY.viewportMinimum:0),z,y=null;c=!1;if(0<n.length){var E=f._colorSet[A%f._colorSet.length],w=f.lineColor=f.options.lineColor||E,D=w;g.fillStyle=E;g.strokeStyle=w;g.lineWidth=f.lineThickness;var P="solid";if(g.setLineDash){var O=K(f.nullDataLineDashType,f.lineThickness),P=f.lineDashType,ca=K(P,f.lineThickness);g.setLineDash(ca)}for(;A<n.length;A++)if(x=n[A].x.getTime?n[A].x.getTime():n[A].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!f.connectNullData||!c))){var Z=u;"number"!==
|
|
417
|
+
typeof n[A].y?(f.connectNullData||(c||e)||b(),c=!0):(s=a.axisX.convertValueToPixel(x),u=a.axisY.convertValueToPixel(n[A].y),e||c?(!e&&f.connectNullData?(g.setLineDash&&(f.options.nullDataLineDashType||P===f.lineDashType&&f.lineDashType!==f.nullDataLineDashType)&&(e=s,c=u,s=q.x,u=q.y,b(),g.moveTo(q.x,q.y),s=e,u=c,y=q,P=f.nullDataLineDashType,g.setLineDash(O)),g.lineTo(s,Z),g.lineTo(s,u),t&&(h.lineTo(s,Z),h.lineTo(s,u))):(g.beginPath(),g.moveTo(s,u),t&&(h.beginPath(),h.moveTo(s,u)),y={x:s,y:u}),c=e=
|
|
418
|
+
!1):(g.lineTo(s,Z),t&&h.lineTo(s,Z),g.lineTo(s,u),t&&h.lineTo(s,u),0==A%250&&b()),q={x:s,y:u},A<n.length-1&&(D!==(n[A].lineColor||w)||P!==(n[A].lineDashType||f.lineDashType))&&(b(),D=n[A].lineColor||w,g.strokeStyle=D,g.setLineDash&&(n[A].lineDashType?(P=n[A].lineDashType,g.setLineDash(K(P,f.lineThickness))):(P=f.lineDashType,g.setLineDash(ca)))),x=f.dataPointIds[A],this._eventManager.objectMap[x]={id:x,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:A,x1:s,y1:u},0!==n[A].markerSize&&(0<n[A].markerSize||
|
|
419
|
+
0<f.markerSize)&&(Z=f.getMarkerProperties(A,s,u,g),l.push(Z),x=R(x),t&&l.push({x:s,y:u,ctx:h,type:Z.type,size:Z.size,color:x,borderColor:x,borderThickness:Z.borderThickness})),(n[A].indexLabel||f.indexLabel||n[A].indexLabelFormatter||f.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:n[A],dataSeries:f,point:{x:s,y:u},direction:0>n[A].y===a.axisY.reversed?1:-1,color:E}))}b();Y.drawMarkers(l)}}t&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.globalCompositeOperation=
|
|
420
|
+
"source-atop",a.axisX.maskCanvas&&g.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&g.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),g.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());g.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderStackedArea=
|
|
421
|
+
function(a){function e(){if(!(1>m.length)){for(0<E.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);t&&s.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=E.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();t&&(s.closePath(),s.fill(),s.beginPath());m=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=null,h=[],k=this.plotArea,l=[],m=[],q=[],p=[],r=0,f,n,A=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:
|
|
422
|
+
0),s=this._eventManager.ghostCtx,u,x,v;t&&s.beginPath();b.save();t&&s.save();b.beginPath();b.rect(k.x1,k.y1,k.width,k.height);b.clip();t&&(s.beginPath(),s.rect(k.x1,k.y1,k.width,k.height),s.clip());for(var d=[],z=0;z<a.dataSeriesIndexes.length;z++){var y=a.dataSeriesIndexes[z],E=this.data[y],w=E.dataPoints;E.dataPointIndexes=[];for(r=0;r<w.length;r++)y=w[r].x.getTime?w[r].x.getTime():w[r].x,E.dataPointIndexes[y]=r,d[y]||(q.push(y),d[y]=!0);q.sort(Ua)}for(z=0;z<a.dataSeriesIndexes.length;z++){y=a.dataSeriesIndexes[z];
|
|
423
|
+
E=this.data[y];w=E.dataPoints;x=!0;m=[];r=E.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:y};r=R(r);s.fillStyle=r;if(0<q.length){var d=E._colorSet[0],D=E.lineColor=E.options.lineColor||d,P=D;b.fillStyle=d;b.strokeStyle=D;b.lineWidth=E.lineThickness;v="solid";if(b.setLineDash){var O=K(E.nullDataLineDashType,E.lineThickness);v=E.lineDashType;var ca=K(v,E.lineThickness);b.setLineDash(ca)}for(var Z=!0,r=0;r<q.length;r++){var g=q[r],ga=null,ga=0<=E.dataPointIndexes[g]?w[E.dataPointIndexes[g]]:
|
|
424
|
+
{x:g,y:null};if(!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!E.connectNullData||!Z)))if("number"!==typeof ga.y)E.connectNullData||(Z||x)||e(),Z=!0;else{f=a.axisX.convertValueToPixel(g);var oa=l[g]?l[g]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[g]=ga.y+(p[g]?p[g]:0);if(0>=p[g]&&a.axisY.logarithmic)continue;n=a.axisY.convertValueToPixel(p[g])}else n=a.axisY.convertValueToPixel(ga.y),n-=oa;m.push({x:f,y:A-oa});l[g]=A-n;x||Z?(!x&&
|
|
425
|
+
E.connectNullData?(b.setLineDash&&(E.options.nullDataLineDashType||v===E.lineDashType&&E.lineDashType!==E.nullDataLineDashType)&&(x=m.pop(),v=m[m.length-1],e(),b.moveTo(u.x,u.y),m.push(v),m.push(x),v=E.nullDataLineDashType,b.setLineDash(O)),b.lineTo(f,n),t&&s.lineTo(f,n)):(b.beginPath(),b.moveTo(f,n),t&&(s.beginPath(),s.moveTo(f,n))),Z=x=!1):(b.lineTo(f,n),t&&s.lineTo(f,n),0==r%250&&(e(),b.moveTo(f,n),t&&s.moveTo(f,n),m.push({x:f,y:A-oa})));u={x:f,y:n};r<w.length-1&&(P!==(w[r].lineColor||D)||v!==
|
|
426
|
+
(w[r].lineDashType||E.lineDashType))&&(e(),b.beginPath(),b.moveTo(f,n),m.push({x:f,y:A-oa}),P=w[r].lineColor||D,b.strokeStyle=P,b.setLineDash&&(w[r].lineDashType?(v=w[r].lineDashType,b.setLineDash(K(v,E.lineThickness))):(v=E.lineDashType,b.setLineDash(ca))));if(0<=E.dataPointIndexes[g]){var B=E.dataPointIds[E.dataPointIndexes[g]];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:E.dataPointIndexes[g],x1:f,y1:n}}0<=E.dataPointIndexes[g]&&0!==ga.markerSize&&
|
|
427
|
+
(0<ga.markerSize||0<E.markerSize)&&(oa=E.getMarkerProperties(E.dataPointIndexes[g],f,n,b),h.push(oa),g=R(B),t&&h.push({x:f,y:n,ctx:s,type:oa.type,size:oa.size,color:g,borderColor:g,borderThickness:oa.borderThickness}));(ga.indexLabel||E.indexLabel||ga.indexLabelFormatter||E.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:ga,dataSeries:E,point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&s.moveTo(f,n)}delete E.dataPointIndexes}Y.drawMarkers(h);
|
|
428
|
+
t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(k.x1,k.y1,k.width,k.height),s.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,
|
|
429
|
+
easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderStackedArea100=function(a){function e(){for(0<E.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);t&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=E.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();t&&(v.closePath(),v.fill(),v.beginPath());m=[]}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=null,h=this.plotArea,k=[],l=[],m=[],q=[],p=[],r=
|
|
430
|
+
0,f,n,A,s,u,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx;b.save();t&&v.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(v.beginPath(),v.rect(h.x1,h.y1,h.width,h.height),v.clip());for(var d=[],z=0;z<a.dataSeriesIndexes.length;z++){var y=a.dataSeriesIndexes[z],E=this.data[y],w=E.dataPoints;E.dataPointIndexes=[];for(r=0;r<w.length;r++)y=w[r].x.getTime?w[r].x.getTime():w[r].x,E.dataPointIndexes[y]=r,d[y]||(q.push(y),d[y]=
|
|
431
|
+
!0);q.sort(Ua)}for(z=0;z<a.dataSeriesIndexes.length;z++){y=a.dataSeriesIndexes[z];E=this.data[y];w=E.dataPoints;s=!0;d=E.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:y};d=R(d);v.fillStyle=d;m=[];if(0<q.length){var d=E._colorSet[r%E._colorSet.length],D=E.lineColor=E.options.lineColor||d,P=D;b.fillStyle=d;b.strokeStyle=D;b.lineWidth=E.lineThickness;u="solid";if(b.setLineDash){var O=K(E.nullDataLineDashType,E.lineThickness);u=E.lineDashType;var ca=K(u,E.lineThickness);
|
|
432
|
+
b.setLineDash(ca)}for(var Z=!0,r=0;r<q.length;r++){var g=q[r],ga=null,ga=0<=E.dataPointIndexes[g]?w[E.dataPointIndexes[g]]:{x:g,y:null};if(!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!E.connectNullData||!Z)))if("number"!==typeof ga.y)E.connectNullData||(Z||s)||e(),Z=!0;else{var oa;oa=0!==a.dataPointYSums[g]?100*(ga.y/a.dataPointYSums[g]):0;f=a.axisX.convertValueToPixel(g);var B=l[g]?l[g]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[g]=
|
|
433
|
+
oa+(p[g]?p[g]:0);if(0>=p[g]&&a.axisY.logarithmic)continue;n=a.axisY.convertValueToPixel(p[g])}else n=a.axisY.convertValueToPixel(oa),n-=B;m.push({x:f,y:x-B});l[g]=x-n;s||Z?(!s&&E.connectNullData?(b.setLineDash&&(E.options.nullDataLineDashType||u===E.lineDashType&&E.lineDashType!==E.nullDataLineDashType)&&(s=m.pop(),u=m[m.length-1],e(),b.moveTo(A.x,A.y),m.push(u),m.push(s),u=E.nullDataLineDashType,b.setLineDash(O)),b.lineTo(f,n),t&&v.lineTo(f,n)):(b.beginPath(),b.moveTo(f,n),t&&(v.beginPath(),v.moveTo(f,
|
|
434
|
+
n))),Z=s=!1):(b.lineTo(f,n),t&&v.lineTo(f,n),0==r%250&&(e(),b.moveTo(f,n),t&&v.moveTo(f,n),m.push({x:f,y:x-B})));A={x:f,y:n};r<w.length-1&&(P!==(w[r].lineColor||D)||u!==(w[r].lineDashType||E.lineDashType))&&(e(),b.beginPath(),b.moveTo(f,n),m.push({x:f,y:x-B}),P=w[r].lineColor||D,b.strokeStyle=P,b.setLineDash&&(w[r].lineDashType?(u=w[r].lineDashType,b.setLineDash(K(u,E.lineThickness))):(u=E.lineDashType,b.setLineDash(ca))));if(0<=E.dataPointIndexes[g]){var H=E.dataPointIds[E.dataPointIndexes[g]];this._eventManager.objectMap[H]=
|
|
435
|
+
{id:H,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:E.dataPointIndexes[g],x1:f,y1:n}}0<=E.dataPointIndexes[g]&&0!==ga.markerSize&&(0<ga.markerSize||0<E.markerSize)&&(B=E.getMarkerProperties(E.dataPointIndexes[g],f,n,b),k.push(B),g=R(H),t&&k.push({x:f,y:n,ctx:v,type:B.type,size:B.size,color:g,borderColor:g,borderThickness:B.borderThickness}));(ga.indexLabel||E.indexLabel||ga.indexLabelFormatter||E.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ga,dataSeries:E,
|
|
436
|
+
point:{x:f,y:n},direction:0>ga.y===a.axisY.reversed?1:-1,color:d})}}e();b.moveTo(f,n);t&&v.moveTo(f,n)}delete E.dataPointIndexes}Y.drawMarkers(k);t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,
|
|
437
|
+
this.height),b.clearRect(h.x1,h.y1,h.width,h.height),v.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderBubble=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,d=0,g,h;c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
|
|
438
|
+
this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var k=-Infinity,l=Infinity,m=0;m<a.dataSeriesIndexes.length;m++)for(var q=a.dataSeriesIndexes[m],p=this.data[q],r=p.dataPoints,f=0,d=0;d<r.length;d++)g=r[d].getTime?g=r[d].x.getTime():g=r[d].x,g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax||"undefined"===typeof r[d].z||(f=r[d].z,f>k&&(k=f),f<l&&(l=f));for(var n=25*Math.PI,A=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,
|
|
439
|
+
n),m=0;m<a.dataSeriesIndexes.length;m++)if(q=a.dataSeriesIndexes[m],p=this.data[q],r=p.dataPoints,0<r.length)for(c.strokeStyle="#4572A7 ",d=0;d<r.length;d++)if(g=r[d].getTime?g=r[d].x.getTime():g=r[d].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&"number"===typeof r[d].y){g=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(r[d].y);var f=r[d].z,s=2*Math.max(Math.sqrt((k===l?A/2:n+(A-n)/(k-l)*(f-l))/Math.PI)<<0,1),f=p.getMarkerProperties(d,c);f.size=s;c.globalAlpha=
|
|
440
|
+
p.fillOpacity;Y.drawMarker(g,h,c,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;var u=p.dataPointIds[d];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:d,x1:g,y1:h,size:s};s=R(u);t&&Y.drawMarker(g,h,this._eventManager.ghostCtx,f.type,f.size,s,s,f.borderThickness);(r[d].indexLabel||p.indexLabel||r[d].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:r[d],dataSeries:p,point:{x:g,y:h},
|
|
441
441
|
direction:1,bounds:{x1:g-f.size/2,y1:h-f.size/2,x2:g+f.size/2,y2:h+f.size/2},color:null})}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());
|
|
442
|
-
c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
443
|
-
b.width,b.height),this._eventManager.ghostCtx.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],
|
|
444
|
-
g,h,c);c.globalAlpha=m.fillOpacity;Y.drawMarker(f.x,f.y,f.ctx,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;Math.sqrt((p-g)*(p-g)+(
|
|
445
|
-
|
|
446
|
-
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
447
|
-
null,g=null,h=this.plotArea,k=0,n,m,
|
|
448
|
-
this.dataPointMaxWidth&&d>g&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<d)&&(g=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));s<d&&(s=d);s>g&&(s=g);c.save();t&&b.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var
|
|
449
|
-
if(0<
|
|
450
|
-
var z=n-s/2<<0,
|
|
451
|
-
|
|
452
|
-
c.lineTo(
|
|
453
|
-
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
454
|
-
animationBase:0}}};s.prototype.renderBoxAndWhisker=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=this.plotArea,h=0,k,n,m,
|
|
442
|
+
c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0}}};s.prototype.renderScatter=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,d=0,g,h;c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,
|
|
443
|
+
b.width,b.height),this._eventManager.ghostCtx.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],q=m.dataPoints;if(0<q.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var p=0,r=0,d=0;d<q.length;d++)if(g=q[d].getTime?g=q[d].x.getTime():g=q[d].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[d].y){g=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(q[d].y);var f=m.getMarkerProperties(d,
|
|
444
|
+
g,h,c);c.globalAlpha=m.fillOpacity;Y.drawMarker(f.x,f.y,f.ctx,f.type,f.size,f.color,f.borderColor,f.borderThickness);c.globalAlpha=1;Math.sqrt((p-g)*(p-g)+(r-h)*(r-h))<Math.min(f.size,5)&&q.length>Math.min(this.plotArea.width,this.plotArea.height)||(p=m.dataPointIds[d],this._eventManager.objectMap[p]={id:p,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:d,x1:g,y1:h},p=R(p),t&&Y.drawMarker(f.x,f.y,this._eventManager.ghostCtx,f.type,f.size,p,p,f.borderThickness),(q[d].indexLabel||m.indexLabel||
|
|
445
|
+
q[d].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:q[d],dataSeries:m,point:{x:g,y:h},direction:1,bounds:{x1:g-f.size/2,y1:h-f.size/2,x2:g+f.size/2,y2:h+f.size/2},color:null}),p=g,r=h)}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
|
|
446
|
+
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0}}};s.prototype.renderCandlestick=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=
|
|
447
|
+
null,g=null,h=this.plotArea,k=0,n,m,q,p,r,f,d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,g=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,s=a.axisX.dataInfo.minDiff;isFinite(s)||(s=0.3*Math.abs(a.axisX.range));s=this.options.dataPointWidth?this.dataPointWidth:0.7*h.width*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))<<0;
|
|
448
|
+
this.dataPointMaxWidth&&d>g&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,g));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&g<d)&&(g=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));s<d&&(s=d);s>g&&(s=g);c.save();t&&b.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var A=0;A<a.dataSeriesIndexes.length;A++){var C=a.dataSeriesIndexes[A],u=this.data[C],x=u.dataPoints;
|
|
449
|
+
if(0<x.length)for(var v=5<s&&u.bevelEnabled?!0:!1,k=0;k<x.length;k++)if(x[k].getTime?f=x[k].x.getTime():f=x[k].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!l(x[k].y)&&x[k].y.length&&"number"===typeof x[k].y[0]&&"number"===typeof x[k].y[1]&&"number"===typeof x[k].y[2]&&"number"===typeof x[k].y[3]){n=a.axisX.convertValueToPixel(f);m=a.axisY.convertValueToPixel(x[k].y[0]);q=a.axisY.convertValueToPixel(x[k].y[1]);p=a.axisY.convertValueToPixel(x[k].y[2]);r=a.axisY.convertValueToPixel(x[k].y[3]);
|
|
450
|
+
var z=n-s/2<<0,y=z+s<<0,g=u.options.fallingColor?u.fallingColor:u._colorSet[0],d=x[k].color?x[k].color:u._colorSet[0],E=Math.round(Math.max(1,0.15*s)),w=0===E%2?0:0.5,D=u.dataPointIds[k];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:k,x1:z,y1:m,x2:y,y2:q,x3:n,y3:p,x4:n,y4:r,borderThickness:E,color:d};c.strokeStyle=d;c.beginPath();c.lineWidth=E;b.lineWidth=Math.max(E,4);"candlestick"===u.type?(c.moveTo(n-w,q),c.lineTo(n-w,Math.min(m,r)),c.stroke(),c.moveTo(n-
|
|
451
|
+
w,Math.max(m,r)),c.lineTo(n-w,p),c.stroke(),aa(c,z,Math.min(m,r),y,Math.max(m,r),x[k].y[0]<=x[k].y[3]?u.risingColor:g,E,d,v,v,!1,!1,u.fillOpacity),t&&(d=R(D),b.strokeStyle=d,b.beginPath(),b.moveTo(n-w,q),b.lineTo(n-w,Math.min(m,r)),b.stroke(),b.moveTo(n-w,Math.max(m,r)),b.lineTo(n-w,p),b.stroke(),aa(b,z,Math.min(m,r),y,Math.max(m,r),d,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(c.moveTo(n-w,q),c.lineTo(n-w,p),c.stroke(),c.beginPath(),c.moveTo(n,m),c.lineTo(z,m),c.stroke(),c.beginPath(),c.moveTo(n,r),
|
|
452
|
+
c.lineTo(y,r),c.stroke(),t&&(b.beginPath(),d=R(D),b.strokeStyle=d,b.moveTo(n-w,q),b.lineTo(n-w,p),b.stroke(),b.beginPath(),b.moveTo(n,m),b.lineTo(z,m),b.stroke(),b.beginPath(),b.moveTo(n,r),b.lineTo(y,r),b.stroke()));(x[k].indexLabel||u.indexLabel||x[k].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:u.type,dataPoint:x[k],dataSeries:u,point:{x:z+(y-z)/2,y:a.axisY.reversed?p:q},direction:1,bounds:{x1:z,y1:Math.min(q,p),x2:y,y2:Math.max(q,p)},color:d})}}t&&(e.drawImage(this._preRenderCanvas,
|
|
453
|
+
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,
|
|
454
|
+
animationBase:0}}};s.prototype.renderBoxAndWhisker=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=this.plotArea,h=0,k,n,m,q,p,r,f,d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,s=a.axisX.dataInfo.minDiff;isFinite(s)||
|
|
455
455
|
(s=0.3*Math.abs(a.axisX.range));s=this.options.dataPointWidth?this.dataPointWidth:0.7*g.width*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&d>h&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<d)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));s<d&&(s=d);s>h&&(s=h);c.save();t&&b.save();c.beginPath();c.rect(g.x1,g.y1,g.width,
|
|
456
|
-
g.height);c.clip();t&&(b.beginPath(),b.rect(g.x1,g.y1,g.width,g.height),b.clip());for(var
|
|
457
|
-
"number"===typeof v[h].y[1]&&"number"===typeof v[h].y[2]&&"number"===typeof v[h].y[3]&&"number"===typeof v[h].y[4]&&5===v[h].y.length){k=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(v[h].y[0]);m=a.axisY.convertValueToPixel(v[h].y[1]);
|
|
458
|
-
v[h].whiskerColor:v[h].color?
|
|
459
|
-
2?0.5:0,oa=v[h].stemColor?v[h].stemColor:v[h].color?
|
|
460
|
-
|
|
461
|
-
c.strokeStyle=oa,c.lineWidth=
|
|
462
|
-
|
|
463
|
-
t&&(d=R(X),b.strokeStyle=d,b.lineWidth=
|
|
464
|
-
dataPoint:v[h],dataSeries:
|
|
465
|
-
this.height),c.clearRect(g.x1,g.y1,g.width,g.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
456
|
+
g.height);c.clip();t&&(b.beginPath(),b.rect(g.x1,g.y1,g.width,g.height),b.clip());for(var A=!1,A=!!a.axisY.reversed,C=0;C<a.dataSeriesIndexes.length;C++){var u=a.dataSeriesIndexes[C],x=this.data[u],v=x.dataPoints;x.whiskerLength=l(x.options.whiskerLength)?s:x.options.whiskerLength;if(0<v.length)for(var z=5<s&&x.bevelEnabled?!0:!1,h=0;h<v.length;h++)if(v[h].getTime?f=v[h].x.getTime():f=v[h].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&!l(v[h].y)&&v[h].y.length&&"number"===typeof v[h].y[0]&&
|
|
457
|
+
"number"===typeof v[h].y[1]&&"number"===typeof v[h].y[2]&&"number"===typeof v[h].y[3]&&"number"===typeof v[h].y[4]&&5===v[h].y.length){k=a.axisX.convertValueToPixel(f);n=a.axisY.convertValueToPixel(v[h].y[0]);m=a.axisY.convertValueToPixel(v[h].y[1]);q=a.axisY.convertValueToPixel(v[h].y[2]);p=a.axisY.convertValueToPixel(v[h].y[3]);r=a.axisY.convertValueToPixel(v[h].y[4]);var y=k-s/2<<0,E=k+s/2<<0,d=v[h].color?v[h].color:x._colorSet[0],w=Math.round(Math.max(1,0.15*s)),D=0===w%2?0:0.5,P=v[h].whiskerColor?
|
|
458
|
+
v[h].whiskerColor:v[h].color?x.whiskerColor?x.whiskerColor:v[h].color:x.whiskerColor?x.whiskerColor:d,O="number"===typeof v[h].whiskerThickness?v[h].whiskerThickness:"number"===typeof x.options.whiskerThickness?x.whiskerThickness:w,ca=v[h].whiskerDashType?v[h].whiskerDashType:x.whiskerDashType,Z=l(v[h].whiskerLength)?l(x.options.whiskerLength)?s:x.whiskerLength:v[h].whiskerLength,Z="number"===typeof Z?0>=Z?0:Z>=s?s:Z:"string"===typeof Z?parseInt(Z)*s/100>s?s:parseInt(Z)*s/100:s,ga=1===Math.round(O)%
|
|
459
|
+
2?0.5:0,oa=v[h].stemColor?v[h].stemColor:v[h].color?x.stemColor?x.stemColor:v[h].color:x.stemColor?x.stemColor:d,B="number"===typeof v[h].stemThickness?v[h].stemThickness:"number"===typeof x.options.stemThickness?x.stemThickness:w,H=1===Math.round(B)%2?0.5:0,F=v[h].stemDashType?v[h].stemDashType:x.stemDashType,L=v[h].lineColor?v[h].lineColor:v[h].color?x.lineColor?x.lineColor:v[h].color:x.lineColor?x.lineColor:d,Q="number"===typeof v[h].lineThickness?v[h].lineThickness:"number"===typeof x.options.lineThickness?
|
|
460
|
+
x.lineThickness:w,U=v[h].lineDashType?v[h].lineDashType:x.lineDashType,$=1===Math.round(Q)%2?0.5:0,S=x.upperBoxColor,ya=x.lowerBoxColor,ua=l(x.options.fillOpacity)?1:x.fillOpacity,X=x.dataPointIds[h];this._eventManager.objectMap[X]={id:X,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:h,x1:y,y1:n,x2:E,y2:m,x3:k,y3:q,x4:k,y4:p,y5:r,borderThickness:w,color:d,stemThickness:B,stemColor:oa,whiskerThickness:O,whiskerLength:Z,whiskerColor:P,lineThickness:Q,lineColor:L};c.save();0<B&&(c.beginPath(),
|
|
461
|
+
c.strokeStyle=oa,c.lineWidth=B,c.setLineDash&&c.setLineDash(K(F,B)),c.moveTo(k-H,m),c.lineTo(k-H,n),c.stroke(),c.moveTo(k-H,p),c.lineTo(k-H,q),c.stroke());c.restore();b.lineWidth=Math.max(w,4);c.beginPath();aa(c,y,Math.max(Math.min(r,m),g.y1-w/2),E,Math.min(Math.max(m,r),g.y2+w/2),ya,0,d,A?z:!1,A?!1:z,!1,!1,ua);c.beginPath();aa(c,y,Math.max(Math.min(q,r),g.y1-w/2),E,Math.min(Math.max(r,q),g.y2+w/2),S,0,d,A?!1:z,A?z:!1,!1,!1,ua);c.beginPath();c.lineWidth=w;c.strokeStyle=d;c.rect(y-D,Math.max(Math.min(m,
|
|
462
|
+
q)-D,g.y1-w/2),E-y+2*D,Math.min(Math.max(m,q),g.y2+w/2)-Math.max(Math.min(m,q)-D,g.y1-w/2)+2*D);c.stroke();c.save();0<Q&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(K(U,Q)),c.strokeStyle=L,c.lineWidth=Q,c.moveTo(y,r-$),c.lineTo(E,r-$),c.stroke());c.restore();c.save();0<O&&(c.beginPath(),c.setLineDash&&c.setLineDash(K(ca,O)),c.strokeStyle=P,c.lineWidth=O,c.moveTo(k-Z/2<<0,p-ga),c.lineTo(k+Z/2<<0,p-ga),c.stroke(),c.moveTo(k-Z/2<<0,n+ga),c.lineTo(k+Z/2<<0,n+ga),c.stroke());c.restore();
|
|
463
|
+
t&&(d=R(X),b.strokeStyle=d,b.lineWidth=B,0<B&&(b.beginPath(),b.moveTo(k-D-H,m),b.lineTo(k-D-H,Math.max(n,p)),b.stroke(),b.moveTo(k-D-H,Math.min(n,p)),b.lineTo(k-D-H,q),b.stroke()),aa(b,y,Math.max(m,q),E,Math.min(m,q),d,0,null,!1,!1,!1,!1),0<O&&(b.beginPath(),b.lineWidth=O,b.moveTo(k+Z/2,p-ga),b.lineTo(k-Z/2,p-ga),b.stroke(),b.moveTo(k+Z/2,n+ga),b.lineTo(k-Z/2,n+ga),b.stroke()));(v[h].indexLabel||x.indexLabel||v[h].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:x.type,
|
|
464
|
+
dataPoint:v[h],dataSeries:x,point:{x:y+(E-y)/2,y:a.axisY.reversed?n:p},direction:1,bounds:{x1:y,y1:Math.min(n,p),x2:E,y2:Math.max(n,p)},color:d})}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,
|
|
465
|
+
this.height),c.clearRect(g.x1,g.y1,g.width,g.height),b.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0}}};s.prototype.renderRangeColumn=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,n,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;h=this.options.dataPointMaxWidth?
|
|
466
466
|
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;var m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.9*(d.width*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
|
|
467
|
-
h<g)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));m<g&&(m=g);m>h&&(m=h);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var
|
|
468
|
-
g=0;g<f.length;g++)if(f[g].getTime?n=f[g].x.getTime():n=f[g].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&!l(f[g].y)&&f[g].y.length&&"number"===typeof f[g].y[0]&&"number"===typeof f[g].y[1]){b=a.axisX.convertValueToPixel(n);h=a.axisY.convertValueToPixel(f[g].y[0]);k=a.axisY.convertValueToPixel(f[g].y[1]);var
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
472
|
-
animationBase:0}}};s.prototype.renderError=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=!1,h=this.plotArea,k=0,n,m,
|
|
473
|
-
this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var
|
|
474
|
-
!this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&z||(this.data[u].type.match(/(range)/ig)&&(g=!0),z++);d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(
|
|
475
|
-
b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(
|
|
476
|
-
(u=d);u>k&&(u=k);
|
|
477
|
-
u:
|
|
478
|
-
|
|
479
|
-
b?p=ca:f=ca;b?(
|
|
480
|
-
whiskerProperties:
|
|
481
|
-
f:Math.max(
|
|
482
|
-
0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
483
|
-
c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,n,m,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var
|
|
484
|
-
this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(
|
|
485
|
-
c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var
|
|
486
|
-
"number"===typeof s[g].y[1]){h=a.axisY.convertValueToPixel(s[g].y[0]);k=a.axisY.convertValueToPixel(s[g].y[1]);n=a.axisX.convertValueToPixel(m);n=a.axisX.reversed?n+a.plotType.totalDataSeries*
|
|
487
|
-
f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:
|
|
488
|
-
k),y1:n,x2:Math.max(h,k),y2:
|
|
489
|
-
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
490
|
-
b.globalAlpha=
|
|
491
|
-
b.save();t&&d.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(d.beginPath(),d.rect(h.x1,h.y1,h.width,h.height),d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=[],m=a.dataSeriesIndexes[k],
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
{id:u,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,x1:n,y1:s,y2:
|
|
495
|
-
0<
|
|
496
|
-
point:{x:n,y:s},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?-1:1,color:v}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:
|
|
497
|
-
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:
|
|
498
|
-
b.beginPath();b.moveTo(
|
|
499
|
-
f
|
|
500
|
-
b.moveTo(
|
|
501
|
-
s[g].newStrokeStyle&&(b.strokeStyle=s[g].newStrokeStyle),s[g].newLineDashArray&&b.setLineDash(s[g].newLineDashArray);b.bezierCurveTo(f
|
|
502
|
-
d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],
|
|
503
|
-
!1;p<
|
|
504
|
-
{x:
|
|
505
|
-
borderColor:
|
|
506
|
-
dataSeries:m,indexKeyword:1,point:{x:
|
|
507
|
-
a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:
|
|
508
|
-
e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=null,g=this.plotArea,h=0,k,l,m,
|
|
509
|
-
isFinite(
|
|
510
|
-
c.beginPath();c.rect(g.x1,g.y1,g.width,g.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var n=a.dataSeriesIndexes[f],s=this.data[n],
|
|
511
|
-
1,
|
|
512
|
-
p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSumYStartValue);k=a.axisX.reversed?k+a.plotType.totalDataSeries*
|
|
513
|
-
s.fallingColor;aa(c,a.axisX.reversed?
|
|
514
|
-
c.moveTo(
|
|
515
|
-
dataPoint:
|
|
516
|
-
0,0,this.width,this.height),c.clearRect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:
|
|
517
|
-
c,g,h,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===d&&(a.beginPath(),a.arc(e.x,e.y,c,g,h,!1),0<=l&&a.arc(e.x,e.y,l*c,h,g,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};s.prototype.renderPie=function(a){function e(){if(m&&
|
|
467
|
+
h<g)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));m<g&&(m=g);m>h&&(m=h);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var q=0;q<a.dataSeriesIndexes.length;q++){var p=a.dataSeriesIndexes[q],r=this.data[p],f=r.dataPoints;if(0<f.length)for(var s=5<m&&r.bevelEnabled?!0:!1,
|
|
468
|
+
g=0;g<f.length;g++)if(f[g].getTime?n=f[g].x.getTime():n=f[g].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&!l(f[g].y)&&f[g].y.length&&"number"===typeof f[g].y[0]&&"number"===typeof f[g].y[1]){b=a.axisX.convertValueToPixel(n);h=a.axisY.convertValueToPixel(f[g].y[0]);k=a.axisY.convertValueToPixel(f[g].y[1]);var A=a.axisX.reversed?b+a.plotType.totalDataSeries*m/2-(a.previousDataSeriesCount+q)*m<<0:b-a.plotType.totalDataSeries*m/2+(a.previousDataSeriesCount+q)*m<<0,C=a.axisX.reversed?
|
|
469
|
+
A-m<<0:A+m<<0,b=f[g].color?f[g].color:r._colorSet[g%r._colorSet.length];if(h>k){var u=h;h=k;k=u}var u=Math.max(h,d.y1),x=Math.min(k,d.y2),v=r.dataPointIds[g];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:g,x1:A,y1:u,x2:C,y2:x};aa(c,a.axisX.reversed?C:A,u,a.axisX.reversed?A:C,x,b,0,b,s,s,!1,!1,r.fillOpacity);b=R(v);t&&aa(this._eventManager.ghostCtx,a.axisX.reversed?C:A,u,a.axisX.reversed?A:C,x,b,0,null,!1,!1,!1,!1);if(f[g].indexLabel||r.indexLabel||f[g].indexLabelFormatter||
|
|
470
|
+
r.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:f[g],dataSeries:r,indexKeyword:0,point:{x:A+(C-A)/2,y:f[g].y[1]>=f[g].y[0]?k:h},direction:f[g].y[1]>=f[g].y[0]?-1:1,bounds:{x1:A,y1:Math.min(h,k),x2:C,y2:Math.max(h,k)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:f[g],dataSeries:r,indexKeyword:1,point:{x:A+(C-A)/2,y:f[g].y[1]>=f[g].y[0]?h:k},direction:f[g].y[1]>=f[g].y[0]?1:-1,bounds:{x1:A,y1:Math.min(h,k),x2:C,y2:Math.max(h,k)},color:b})}}t&&(e.drawImage(this._preRenderCanvas,
|
|
471
|
+
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,
|
|
472
|
+
animationBase:0}}};s.prototype.renderError=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:e,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var d=null,g=!1,h=this.plotArea,k=0,n,m,q,p,r,f,s,A=a.axisX.dataInfo.minDiff;isFinite(A)||(A=0.3*Math.abs(a.axisX.range));c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),
|
|
473
|
+
this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var C=0,u=0;u<this.data.length;u++)!this.data[u].type.match(/(bar|column)/ig)||!this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&C||C++;for(var x=0;x<a.dataSeriesIndexes.length;x++){var v=a.dataSeriesIndexes[x],w=this.data[v],y=w.dataPoints,E=l(w._linkedSeries)?!1:w._linkedSeries.type.match(/(bar|column)/ig)&&w._linkedSeries.visible?!0:!1,z=0;if(E)for(d=w._linkedSeries.id,u=0;u<d;u++)!this.data[u].type.match(/(bar|column)/ig)||
|
|
474
|
+
!this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&z||(this.data[u].type.match(/(range)/ig)&&(g=!0),z++);d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(E?C:1)))<<0:0.3*this.width;g&&(k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
|
|
475
|
+
b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(E?C:1)))<<0:0.03*this.width);u=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?h.height:h.width)*(a.axisX.logarithmic?Math.log(A)/Math.log(a.axisX.range):Math.abs(A)/Math.abs(a.axisX.range))/(E?C:1))<<0;this.dataPointMaxWidth&&d>k&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<d)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));u<d&&
|
|
476
|
+
(u=d);u>k&&(u=k);w.whiskerLength=l(w.options.whiskerLength)?u:w.options.whiskerLength;if(0<y.length)for(var B=w._colorSet,k=0;k<y.length;k++){var d=w.lineColor=w.options.color?w.options.color:B[0],P={color:y[k].whiskerColor?y[k].whiskerColor:y[k].color?w.whiskerColor?w.whiskerColor:y[k].color:w.whiskerColor?w.whiskerColor:d,thickness:l(y[k].whiskerThickness)?w.whiskerThickness:y[k].whiskerThickness,dashType:y[k].whiskerDashType?y[k].whiskerDashType:w.whiskerDashType,length:l(y[k].whiskerLength)?l(w.options.whiskerLength)?
|
|
477
|
+
u:w.options.whiskerLength:y[k].whiskerLength,trimLength:l(y[k].whiskerLength)?l(w.options.whiskerLength)?50:0:0};P.length="number"===typeof P.length?0>=P.length?0:P.length>=u?u:P.length:"string"===typeof P.length?parseInt(P.length)*u/100>u?u:parseInt(P.length)*u/100>u:u;P.thickness="number"===typeof P.thickness?0>P.thickness?0:Math.round(P.thickness):2;var O={color:y[k].stemColor?y[k].stemColor:y[k].color?w.stemColor?w.stemColor:y[k].color:w.stemColor?w.stemColor:d,thickness:y[k].stemThickness?y[k].stemThickness:
|
|
478
|
+
w.stemThickness,dashType:y[k].stemDashType?y[k].stemDashType:w.stemDashType};O.thickness="number"===typeof O.thickness?0>O.thickness?0:Math.round(O.thickness):2;y[k].getTime?s=y[k].x.getTime():s=y[k].x;if(!(s<a.axisX.dataInfo.viewPortMin||s>a.axisX.dataInfo.viewPortMax)&&!l(y[k].y)&&y[k].y.length&&"number"===typeof y[k].y[0]&&"number"===typeof y[k].y[1]){var ca=a.axisX.convertValueToPixel(s);b?m=ca:n=ca;ca=a.axisY.convertValueToPixel(y[k].y[0]);b?q=ca:r=ca;ca=a.axisY.convertValueToPixel(y[k].y[1]);
|
|
479
|
+
b?p=ca:f=ca;b?(r=a.axisX.reversed?m+(E?C:1)*u/2-(E?z-1:0)*u<<0:m-(E?C:1)*u/2+(E?z-1:0)*u<<0,f=a.axisX.reversed?r-u<<0:r+u<<0):(q=a.axisX.reversed?n+(E?C:1)*u/2-(E?z-1:0)*u<<0:n-(E?C:1)*u/2+(E?z-1:0)*u<<0,p=a.axisX.reversed?q-u<<0:q+u<<0);!b&&r>f&&(ca=r,r=f,f=ca);b&&q>p&&(ca=q,q=p,p=ca);ca=w.dataPointIds[k];this._eventManager.objectMap[ca]={id:ca,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:k,x1:Math.min(q,p),y1:Math.min(r,f),x2:Math.max(p,q),y2:Math.max(f,r),isXYSwapped:b,stemProperties:O,
|
|
480
|
+
whiskerProperties:P};D(c,Math.min(q,p),Math.min(r,f),Math.max(p,q),Math.max(f,r),d,P,O,b);t&&D(this._eventManager.ghostCtx,q,r,p,f,d,P,O,b);if(y[k].indexLabel||w.indexLabel||y[k].indexLabelFormatter||w.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:y[k],dataSeries:w,indexKeyword:0,point:{x:b?y[k].y[1]>=y[k].y[0]?q:p:q+(p-q)/2,y:b?r+(f-r)/2:y[k].y[1]>=y[k].y[0]?f:r},direction:y[k].y[1]>=y[k].y[0]?-1:1,bounds:{x1:b?Math.min(q,p):q,y1:b?r:Math.min(r,f),x2:b?Math.max(q,p):p,y2:b?
|
|
481
|
+
f:Math.max(r,f)},color:d,axisSwapped:b}),this._indexLabels.push({chartType:"error",dataPoint:y[k],dataSeries:w,indexKeyword:1,point:{x:b?y[k].y[1]>=y[k].y[0]?p:q:q+(p-q)/2,y:b?r+(f-r)/2:y[k].y[1]>=y[k].y[0]?r:f},direction:y[k].y[1]>=y[k].y[0]?1:-1,bounds:{x1:b?Math.min(q,p):q,y1:b?r:Math.min(r,f),x2:b?Math.max(q,p):p,y2:b?f:Math.max(r,f)},color:d,axisSwapped:b})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,
|
|
482
|
+
0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0}}};s.prototype.renderRangeBar=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,
|
|
483
|
+
c=t?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var b=null,d=this.plotArea,g=0,h,k,n,m,g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?
|
|
484
|
+
this.dataPointWidth:0.9*(d.height*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>h&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<g)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));q<g&&(q=g);q>h&&(q=h);c.save();t&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);
|
|
485
|
+
c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var r=a.dataSeriesIndexes[p],f=this.data[r],s=f.dataPoints;if(0<s.length){var A=5<q&&f.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(g=0;g<s.length;g++)if(s[g].getTime?m=s[g].x.getTime():m=s[g].x,!(m<a.axisX.dataInfo.viewPortMin||m>a.axisX.dataInfo.viewPortMax)&&!l(s[g].y)&&s[g].y.length&&"number"===typeof s[g].y[0]&&
|
|
486
|
+
"number"===typeof s[g].y[1]){h=a.axisY.convertValueToPixel(s[g].y[0]);k=a.axisY.convertValueToPixel(s[g].y[1]);n=a.axisX.convertValueToPixel(m);n=a.axisX.reversed?n+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+p)*q<<0:n-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+p)*q<<0;var C=a.axisX.reversed?n-q<<0:n+q<<0;h>k&&(b=h,h=k,k=b);b=s[g].color?s[g].color:f._colorSet[g%f._colorSet.length];aa(c,h,a.axisX.reversed?C:n,k,a.axisX.reversed?n:C,b,0,null,A,!1,!1,!1,f.fillOpacity);b=
|
|
487
|
+
f.dataPointIds[g];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:g,x1:h,y1:n,x2:k,y2:C};b=R(b);t&&aa(this._eventManager.ghostCtx,h,a.axisX.reversed?C:n,k,a.axisX.reversed?n:C,b,0,null,!1,!1,!1,!1);if(s[g].indexLabel||f.indexLabel||s[g].indexLabelFormatter||f.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:s[g],dataSeries:f,indexKeyword:0,point:{x:s[g].y[1]>=s[g].y[0]?h:k,y:n+(C-n)/2},direction:s[g].y[1]>=s[g].y[0]?-1:1,bounds:{x1:Math.min(h,
|
|
488
|
+
k),y1:n,x2:Math.max(h,k),y2:C},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:s[g],dataSeries:f,indexKeyword:1,point:{x:s[g].y[1]>=s[g].y[0]?k:h,y:n+(C-n)/2},direction:s[g].y[1]>=s[g].y[0]?1:-1,bounds:{x1:Math.min(h,k),y1:n,x2:Math.max(h,k),y2:C},color:b})}}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,
|
|
489
|
+
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0}}};s.prototype.renderRangeArea=function(a){function e(){if(x){for(var a=null,c=l.length-1;0<=c;c--)a=l[c],b.lineTo(a.x,a.y2),d.lineTo(a.x,a.y2);b.closePath();
|
|
490
|
+
b.globalAlpha=q.fillOpacity;b.fill();b.globalAlpha=1;d.fill();if(0<q.lineThickness){b.beginPath();b.moveTo(a.x,a.y2);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y2);b.moveTo(l[0].x,l[0].y1);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(n,s);d.beginPath();d.moveTo(n,s);x={x:n,y:s};l=[];l.push({x:n,y1:s,y2:C})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,g=[],h=this.plotArea;
|
|
491
|
+
b.save();t&&d.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(d.beginPath(),d.rect(h.x1,h.y1,h.width,h.height),d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=[],m=a.dataSeriesIndexes[k],q=this.data[m],p=q.dataPoints,g=q.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:m};g=R(g);d.fillStyle=g;var g=[],r=!0,f=0,n,s,C,u,x=null;if(0<p.length){var v=q._colorSet[f%q._colorSet.length],w=q.lineColor=q.options.lineColor||v,y=w;b.fillStyle=v;b.strokeStyle=
|
|
492
|
+
w;b.lineWidth=q.lineThickness;var E="solid";if(b.setLineDash){var z=K(q.nullDataLineDashType,q.lineThickness),E=q.lineDashType,D=K(E,q.lineThickness);b.setLineDash(D)}for(var P=!0;f<p.length;f++)if(u=p[f].x.getTime?p[f].x.getTime():p[f].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!q.connectNullData||!P)))if(null!==p[f].y&&p[f].y.length&&"number"===typeof p[f].y[0]&&"number"===typeof p[f].y[1]){n=a.axisX.convertValueToPixel(u);s=a.axisY.convertValueToPixel(p[f].y[0]);C=a.axisY.convertValueToPixel(p[f].y[1]);
|
|
493
|
+
r||P?(q.connectNullData&&!r?(b.setLineDash&&(q.options.nullDataLineDashType||E===q.lineDashType&&q.lineDashType!==q.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=D,E=q.nullDataLineDashType,b.setLineDash(z)),b.lineTo(n,s),t&&d.lineTo(n,s),l.push({x:n,y1:s,y2:C})):(b.beginPath(),b.moveTo(n,s),x={x:n,y:s},l=[],l.push({x:n,y1:s,y2:C}),t&&(d.beginPath(),d.moveTo(n,s))),P=r=!1):(b.lineTo(n,s),l.push({x:n,y1:s,y2:C}),t&&d.lineTo(n,s),0==f%250&&e());u=q.dataPointIds[f];this._eventManager.objectMap[u]=
|
|
494
|
+
{id:u,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:f,x1:n,y1:s,y2:C};f<p.length-1&&(y!==(p[f].lineColor||w)||E!==(p[f].lineDashType||q.lineDashType))&&(e(),y=p[f].lineColor||w,l[l.length-1].newStrokeStyle=y,b.strokeStyle=y,b.setLineDash&&(p[f].lineDashType?(E=p[f].lineDashType,l[l.length-1].newLineDashArray=K(E,q.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):(E=q.lineDashType,l[l.length-1].newLineDashArray=D,b.setLineDash(D))));if(0!==p[f].markerSize&&(0<p[f].markerSize||
|
|
495
|
+
0<q.markerSize)){var O=q.getMarkerProperties(f,n,C,b);g.push(O);var B=R(u);t&&g.push({x:n,y:C,ctx:d,type:O.type,size:O.size,color:B,borderColor:B,borderThickness:O.borderThickness});O=q.getMarkerProperties(f,n,s,b);g.push(O);B=R(u);t&&g.push({x:n,y:s,ctx:d,type:O.type,size:O.size,color:B,borderColor:B,borderThickness:O.borderThickness})}if(p[f].indexLabel||q.indexLabel||p[f].indexLabelFormatter||q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:q,indexKeyword:0,
|
|
496
|
+
point:{x:n,y:s},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?-1:1,color:v}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[f],dataSeries:q,indexKeyword:1,point:{x:n,y:C},direction:p[f].y[0]>p[f].y[1]===a.axisY.reversed?1:-1,color:v})}else P||r||e(),P=!0;e();Y.drawMarkers(g)}}t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,
|
|
497
|
+
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderRangeSplineArea=function(a){function e(a,c){var e=w(s,2);if(0<e.length){if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);
|
|
498
|
+
b.beginPath();b.moveTo(e[0].x,e[0].y);for(var f=0;f<e.length-3;f+=3){if(e[f].newStrokeStyle||e[f].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),e[f].newStrokeStyle&&(b.strokeStyle=e[f].newStrokeStyle),e[f].newLineDashArray&&b.setLineDash(e[f].newLineDashArray);b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}}b.beginPath();b.moveTo(e[0].x,e[0].y);t&&(d.beginPath(),d.moveTo(e[0].x,e[0].y));for(f=0;f<e.length-3;f+=3)b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,
|
|
499
|
+
e[f+2].y,e[f+3].x,e[f+3].y),t&&d.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y);e=w(C,2);b.lineTo(C[C.length-1].x,C[C.length-1].y);for(f=e.length-1;2<f;f-=3)b.bezierCurveTo(e[f-1].x,e[f-1].y,e[f-2].x,e[f-2].y,e[f-3].x,e[f-3].y),t&&d.bezierCurveTo(e[f-1].x,e[f-1].y,e[f-2].x,e[f-2].y,e[f-3].x,e[f-3].y);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();t&&(d.closePath(),d.fill());b.globalAlpha=1;if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();
|
|
500
|
+
b.moveTo(e[0].x,e[0].y);for(var g=f=0;f<e.length-3;f+=3,g++){if(s[g].newStrokeStyle||s[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),s[g].newStrokeStyle&&(b.strokeStyle=s[g].newStrokeStyle),s[g].newLineDashArray&&b.setLineDash(s[g].newLineDashArray);b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}e=w(s,2);b.moveTo(e[0].x,e[0].y);for(g=f=0;f<e.length-3;f+=3,g++){if(s[g].newStrokeStyle||s[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(e[f].x,e[f].y),
|
|
501
|
+
s[g].newStrokeStyle&&(b.strokeStyle=s[g].newStrokeStyle),s[g].newLineDashArray&&b.setLineDash(s[g].newLineDashArray);b.bezierCurveTo(e[f+1].x,e[f+1].y,e[f+2].x,e[f+2].y,e[f+3].x,e[f+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=t?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var d=this._eventManager.ghostCtx,g=[],h=this.plotArea;b.save();t&&d.save();b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();t&&(d.beginPath(),d.rect(h.x1,h.y1,h.width,h.height),
|
|
502
|
+
d.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var l=a.dataSeriesIndexes[k],m=this.data[l],q=m.dataPoints,g=m.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:l};g=R(g);d.fillStyle=g;var g=[],p=0,r,f,n,s=[],C=[];if(0<q.length){var u=m._colorSet[p%m._colorSet.length],x=m.lineColor=m.options.lineColor||u,v=x;b.fillStyle=u;b.lineWidth=m.lineThickness;var z="solid",y;if(b.setLineDash){var E=K(m.nullDataLineDashType,m.lineThickness),z=m.lineDashType;y=K(z,m.lineThickness)}for(f=
|
|
503
|
+
!1;p<q.length;p++)if(r=q[p].x.getTime?q[p].x.getTime():q[p].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!f)))if(null!==q[p].y&&q[p].y.length&&"number"===typeof q[p].y[0]&&"number"===typeof q[p].y[1]){r=a.axisX.convertValueToPixel(r);f=a.axisY.convertValueToPixel(q[p].y[0]);n=a.axisY.convertValueToPixel(q[p].y[1]);var D=m.dataPointIds[p];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:p,x1:r,y1:f,y2:n};s[s.length]=
|
|
504
|
+
{x:r,y:f};C[C.length]={x:r,y:n};p<q.length-1&&(v!==(q[p].lineColor||x)||z!==(q[p].lineDashType||m.lineDashType))&&(v=q[p].lineColor||x,s[s.length-1].newStrokeStyle=v,b.setLineDash&&(q[p].lineDashType?(z=q[p].lineDashType,s[s.length-1].newLineDashArray=K(z,m.lineThickness)):(z=m.lineDashType,s[s.length-1].newLineDashArray=y)));if(0!==q[p].markerSize&&(0<q[p].markerSize||0<m.markerSize)){var B=m.getMarkerProperties(p,r,f,b);g.push(B);var P=R(D);t&&g.push({x:r,y:f,ctx:d,type:B.type,size:B.size,color:P,
|
|
505
|
+
borderColor:P,borderThickness:B.borderThickness});B=m.getMarkerProperties(p,r,n,b);g.push(B);P=R(D);t&&g.push({x:r,y:n,ctx:d,type:B.type,size:B.size,color:P,borderColor:P,borderThickness:B.borderThickness})}if(q[p].indexLabel||m.indexLabel||q[p].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:q[p],dataSeries:m,indexKeyword:0,point:{x:r,y:f},direction:q[p].y[0]<=q[p].y[1]?-1:1,color:u}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:q[p],
|
|
506
|
+
dataSeries:m,indexKeyword:1,point:{x:r,y:n},direction:q[p].y[0]<=q[p].y[1]?1:-1,color:u});f=!1}else 0<p&&!f&&(m.connectNullData?b.setLineDash&&(0<s.length&&(m.options.nullDataLineDashType||!q[p-1].lineDashType))&&(s[s.length-1].newLineDashArray=E,z=m.nullDataLineDashType):(e(y,x),s=[],C=[])),f=!0;e(y,x);Y.drawMarkers(g)}}t&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
|
|
507
|
+
a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:N.xClipAnimation,easingFunction:N.easing.linear,animationBase:0}}};s.prototype.renderWaterfall=function(a){var e=a.targetCanvasCtx||this.plotArea.ctx,c=t?this._preRenderCtx:
|
|
508
|
+
e;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,d=null,g=this.plotArea,h=0,k,l,m,q,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var r=a.axisX.dataInfo.minDiff;
|
|
509
|
+
isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?this.dataPointWidth:0.6*(g.width*(a.axisX.logarithmic?Math.log(r)/Math.log(a.axisX.range):Math.abs(r)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>l&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<h)&&(l=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));r<h&&(r=h);r>l&&(r=l);c.save();t&&this._eventManager.ghostCtx.save();
|
|
510
|
+
c.beginPath();c.rect(g.x1,g.y1,g.width,g.height);c.clip();t&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var n=a.dataSeriesIndexes[f],s=this.data[n],C=s.dataPoints,d=s._colorSet[0];s.risingColor=s.options.risingColor?s.options.risingColor:d;s.fallingColor=s.options.fallingColor?s.options.fallingColor:"#e40a0a";var u="number"===typeof s.options.lineThickness?Math.round(s.lineThickness):
|
|
511
|
+
1,x=1===Math.round(u)%2?-0.5:0;if(0<C.length)for(var v=5<r&&s.bevelEnabled?!0:!1,w=!1,y=null,z=null,h=0;h<C.length;h++)if(C[h].getTime?q=C[h].x.getTime():q=C[h].x,"number"!==typeof C[h].y){if(0<h&&!w&&s.connectNullData)var D=s.options.nullDataLineDashType||!C[h-1].lineDashType?s.nullDataLineDashType:C[h-1].lineDashType;w=!0}else{k=a.axisX.convertValueToPixel(q);l=0===s.dataPointEOs[h].cumulativeSum?p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSum);m=0===s.dataPointEOs[h].cumulativeSumYStartValue?
|
|
512
|
+
p:a.axisY.convertValueToPixel(s.dataPointEOs[h].cumulativeSumYStartValue);k=a.axisX.reversed?k+a.plotType.totalDataSeries*r/2-(a.previousDataSeriesCount+f)*r<<0:k-a.plotType.totalDataSeries*r/2+(a.previousDataSeriesCount+f)*r<<0;var B=a.axisX.reversed?k-r<<0:k+r<<0;l>m&&(d=l,l=m,m=d);a.axisY.reversed&&(d=l,l=m,m=d);d=s.dataPointIds[h];this._eventManager.objectMap[d]={id:d,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:h,x1:k,y1:l,x2:B,y2:m};var P=C[h].color?C[h].color:0<C[h].y?s.risingColor:
|
|
513
|
+
s.fallingColor;aa(c,a.axisX.reversed?B:k,a.axisY.reversed?m:l,a.axisX.reversed?k:B,a.axisY.reversed?l:m,P,0,P,v,v,!1,!1,s.fillOpacity);d=R(d);t&&aa(this._eventManager.ghostCtx,a.axisX.reversed?B:k,l,a.axisX.reversed?k:B,m,d,0,null,!1,!1,!1,!1);var O,P=k;O="undefined"!==typeof C[h].isIntermediateSum&&!0===C[h].isIntermediateSum||"undefined"!==typeof C[h].isCumulativeSum&&!0===C[h].isCumulativeSum?0<C[h].y?l:m:0<C[h].y?m:l;0<h&&y&&(!w||s.connectNullData)&&(w&&c.setLineDash&&c.setLineDash(K(D,u)),c.beginPath(),
|
|
514
|
+
c.moveTo(y,z-x),c.lineTo(P,O-x),0<u&&c.stroke(),t&&(b.beginPath(),b.moveTo(y,z-x),b.lineTo(P,O-x),0<u&&b.stroke()));w=!1;y=B;z=0<C[h].y?l:m;P=C[h].lineDashType?C[h].lineDashType:s.options.lineDashType?s.options.lineDashType:"shortDash";c.strokeStyle=C[h].lineColor?C[h].lineColor:s.options.lineColor?s.options.lineColor:"#9e9e9e";c.lineWidth=u;c.setLineDash&&(P=K(P,u),c.setLineDash(P));(C[h].indexLabel||s.indexLabel||C[h].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",
|
|
515
|
+
dataPoint:C[h],dataSeries:s,point:{x:k+(B-k)/2,y:0<=C[h].y?l:m},direction:0>C[h].y===a.axisY.reversed?1:-1,bounds:{x1:k,y1:Math.min(l,m),x2:B,y2:Math.max(l,m)},color:d})}}t&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
|
|
516
|
+
0,0,this.width,this.height),c.clearRect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.restore());c.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:N.fadeInAnimation,easingFunction:N.easing.easeInQuad,animationBase:0}}};var sa=function(a,e,c,b,d,g,h,k,l){if(!(0>c)){"undefined"===typeof k&&(k=1);if(!t){var m=Number((h%(2*Math.PI)).toFixed(8));Number((g%(2*Math.PI)).toFixed(8))===m&&(h-=1E-4)}a.save();a.globalAlpha=k;"pie"===d?(a.beginPath(),a.moveTo(e.x,e.y),a.arc(e.x,e.y,
|
|
517
|
+
c,g,h,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===d&&(a.beginPath(),a.arc(e.x,e.y,c,g,h,!1),0<=l&&a.arc(e.x,e.y,l*c,h,g,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};s.prototype.renderPie=function(a){function e(){if(m&&q){var a=0,b=0,c=0,d=0;l(m.options.indexLabelMaxWidth)&&(m.indexLabelMaxWidth=0.33*r.width);for(var e=0;e<q.length;e++){var g=q[e],h=m.dataPointIds[e];f[e].id=h;f[e].objectType=
|
|
518
518
|
"dataPoint";f[e].dataPointIndex=e;f[e].dataSeriesIndex=0;var k=f[e],p={percent:null,total:null},s=null,p=n.getPercentAndTotal(m,g);if(m.indexLabelFormatter||g.indexLabelFormatter)s={chart:n,dataSeries:m,dataPoint:g,total:p.total,percent:p.percent};p=(p=g.indexLabelFormatter?g.indexLabelFormatter(s):g.indexLabel?n.replaceKeywordsWithValue(g.indexLabel,g,m,e):m.indexLabelFormatter?m.indexLabelFormatter(s):m.indexLabel?n.replaceKeywordsWithValue(m.indexLabel,g,m,e):g.label)||"";n._eventManager.objectMap[h]=
|
|
519
|
-
k;k.center={x:v.x,y:v.y};k.y=g.y;k.radius=z;k.percentInnerRadius=
|
|
519
|
+
k;k.center={x:v.x,y:v.y};k.y=g.y;k.radius=z;k.percentInnerRadius=D;k.indexLabelText=p;k.indexLabelPlacement=m.indexLabelPlacement;k.indexLabelLineColor=g.indexLabelLineColor?g.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:g.color?g.color:m._colorSet[e%m._colorSet.length];k.indexLabelLineThickness=l(g.indexLabelLineThickness)?m.indexLabelLineThickness:g.indexLabelLineThickness;k.indexLabelLineDashType=g.indexLabelLineDashType?g.indexLabelLineDashType:m.indexLabelLineDashType;
|
|
520
520
|
k.indexLabelFontColor=g.indexLabelFontColor?g.indexLabelFontColor:m.indexLabelFontColor;k.indexLabelFontStyle=g.indexLabelFontStyle?g.indexLabelFontStyle:m.indexLabelFontStyle;k.indexLabelFontWeight=g.indexLabelFontWeight?g.indexLabelFontWeight:m.indexLabelFontWeight;k.indexLabelFontSize=l(g.indexLabelFontSize)?m.indexLabelFontSize:g.indexLabelFontSize;k.indexLabelFontFamily=g.indexLabelFontFamily?g.indexLabelFontFamily:m.indexLabelFontFamily;k.indexLabelBackgroundColor=g.indexLabelBackgroundColor?
|
|
521
521
|
g.indexLabelBackgroundColor:m.options.indexLabelBackgroundColor?m.options.indexLabelBackgroundColor:m.indexLabelBackgroundColor;k.indexLabelBorderColor=g.indexLabelBorderColor?g.indexLabelBorderColor:m.options.indexLabelBorderColor?m.options.indexLabelBorderColor:m.indexLabelBorderColor;k.indexLabelBorderThickness=g.indexLabelBorderThickness?g.indexLabelBorderThickness:m.options.indexLabelBorderThickness?m.options.indexLabelBorderThickness:m.indexLabelBorderThickness;k.indexLabelPadding=g.indexLabelPadding?
|
|
522
522
|
g.indexLabelPadding:m.options.indexLabelPadding?m.options.indexLabelPadding:m.indexLabelPadding;k.indexLabelMaxWidth=g.indexLabelMaxWidth?g.indexLabelMaxWidth:m.indexLabelMaxWidth;k.indexLabelWrap="undefined"!==typeof g.indexLabelWrap?g.indexLabelWrap:m.indexLabelWrap;k.indexLabelTextAlign=g.indexLabelTextAlign?g.indexLabelTextAlign:m.indexLabelTextAlign?m.indexLabelTextAlign:"left";k.startAngle=0===e?m.startAngle?m.startAngle/180*Math.PI:0:f[e-1].endAngle;k.startAngle=(k.startAngle+2*Math.PI)%(2*
|
|
523
|
-
Math.PI);k.endAngle=k.startAngle+2*Math.PI/
|
|
524
|
-
fontStyle:k.indexLabelFontStyle,fontWeight:k.indexLabelFontWeight,textAlign:k.indexLabelTextAlign,backgroundColor:k.indexLabelBackgroundColor,borderColor:k.indexLabelBorderColor,borderThickness:k.indexLabelBorderThickness,maxWidth:k.indexLabelMaxWidth,maxHeight:k.indexLabelWrap?5*k.indexLabelFontSize:1.5*k.indexLabelFontSize,text:k.indexLabelText,padding:k.indexLabelPadding,textBaseline:"middle"});k.indexLabelTextBlock.measureText()}h=g=0;p=!1;for(e=0;e<
|
|
525
|
-
Math.PI/2-u&&k.midAngle<Math.PI/2+u)&&(g<=a/2&&!p?(k.hemisphere="right",g++):(k.hemisphere="left",p=!0));p=!1;for(e=0;e<
|
|
526
|
-
0.07*z*Math.cos(f[c].midAngle),h=0.07*z*Math.sin(f[c].midAngle),k=!1;if(
|
|
527
|
-
m._colorSet[c%m._colorSet.length],m.type,d,e,m.fillOpacity,f[c].percentInnerRadius)}}c=n.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(d=d=0;d<
|
|
523
|
+
Math.PI);k.endAngle=k.startAngle+2*Math.PI/w*Math.abs(g.y);g=(k.endAngle+k.startAngle)/2;g=(g+2*Math.PI)%(2*Math.PI);k.midAngle=g;if(k.midAngle>Math.PI/2-u&&k.midAngle<Math.PI/2+u){if(0===a||f[c].midAngle>k.midAngle)c=e;a++}else if(k.midAngle>3*Math.PI/2-u&&k.midAngle<3*Math.PI/2+u){if(0===b||f[d].midAngle>k.midAngle)d=e;b++}k.hemisphere=g>Math.PI/2&&g<=3*Math.PI/2?"left":"right";k.indexLabelTextBlock=new la(n.plotArea.ctx,{fontSize:k.indexLabelFontSize,fontFamily:k.indexLabelFontFamily,fontColor:k.indexLabelFontColor,
|
|
524
|
+
fontStyle:k.indexLabelFontStyle,fontWeight:k.indexLabelFontWeight,textAlign:k.indexLabelTextAlign,backgroundColor:k.indexLabelBackgroundColor,borderColor:k.indexLabelBorderColor,borderThickness:k.indexLabelBorderThickness,maxWidth:k.indexLabelMaxWidth,maxHeight:k.indexLabelWrap?5*k.indexLabelFontSize:1.5*k.indexLabelFontSize,text:k.indexLabelText,padding:k.indexLabelPadding,textBaseline:"middle"});k.indexLabelTextBlock.measureText()}h=g=0;p=!1;for(e=0;e<q.length;e++)k=f[(c+e)%q.length],1<a&&(k.midAngle>
|
|
525
|
+
Math.PI/2-u&&k.midAngle<Math.PI/2+u)&&(g<=a/2&&!p?(k.hemisphere="right",g++):(k.hemisphere="left",p=!0));p=!1;for(e=0;e<q.length;e++)k=f[(d+e)%q.length],1<b&&(k.midAngle>3*Math.PI/2-u&&k.midAngle<3*Math.PI/2+u)&&(h<=b/2&&!p?(k.hemisphere="left",h++):(k.hemisphere="right",p=!0))}}function c(a,b){var c=n.plotArea.ctx;c.clearRect(r.x1,r.y1,r.width,r.height);c.fillStyle=n.backgroundColor;c.fillRect(r.x1,r.y1,r.width,r.height);for(c=0;c<q.length;c++){var d=f[c].startAngle,e=f[c].endAngle;if(e>d){var g=
|
|
526
|
+
0.07*z*Math.cos(f[c].midAngle),h=0.07*z*Math.sin(f[c].midAngle),k=!1;if(q[c].exploded){if(1E-9<Math.abs(f[c].center.x-(v.x+g))||1E-9<Math.abs(f[c].center.y-(v.y+h)))f[c].center.x=v.x+g*a,f[c].center.y=v.y+h*a,k=!0}else if(0<Math.abs(f[c].center.x-v.x)||0<Math.abs(f[c].center.y-v.y))f[c].center.x=v.x+g*(1-a),f[c].center.y=v.y+h*(1-a),k=!0;k&&b&&(g={},g.dataSeries=m,g.dataPoint=m.dataPoints[c],g.index=c,n.toolTip.highlightObjects([g]));sa(n.plotArea.ctx,f[c].center,f[c].radius,q[c].color?q[c].color:
|
|
527
|
+
m._colorSet[c%m._colorSet.length],m.type,d,e,m.fillOpacity,f[c].percentInnerRadius)}}c=n.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(d=d=0;d<q.length;d++)e=f[d],e.indexLabelText&&(e.indexLabelTextBlock.y-=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,g=0,g="left"===e.hemisphere?"inside"!==m.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==m.indexLabelPlacement?p:-e.indexLabelTextBlock.width/
|
|
528
528
|
2,e.indexLabelTextBlock.x+=g,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=g,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(g=e.center.x+z*Math.cos(e.midAngle),h=e.center.y+z*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(K(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(g,h),
|
|
529
|
-
c.lineTo(e.indexLabelTextBlock.x,e.indexLabelTextBlock.y),c.lineTo(e.indexLabelTextBlock.x+("left"===e.hemisphere?-p:p),e.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,
|
|
530
|
-
f}function d(a){for(var c=null,
|
|
531
|
-
|
|
532
|
-
2)):v.x-Math.sqrt(Math.pow(t,2)-Math.pow(c-v.y,2));
|
|
533
|
-
f[
|
|
534
|
-
2),c-
|
|
535
|
-
(c=a.indexLabelTextBlock.x+15)):l.midAngle>3*Math.PI/2-u&&l.midAngle<3*Math.PI/2+u&&(
|
|
536
|
-
function h(){var a=n.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,e=0,
|
|
537
|
-
|
|
538
|
-
0;a<
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,e=0,g=!1,
|
|
542
|
-
v=
|
|
543
|
-
0;a<n.subtitles.length;a++){var b=n.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}n.legend&&(n.legend.dockInsidePlotArea||"center"===n.legend.horizontalAlign&&"center"===n.legend.verticalAlign)&&(n.legend.setLayout(),n.legend.render())}var n=this;if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],
|
|
544
|
-
2},
|
|
545
|
-
z));var
|
|
546
|
-
this.animatedRender?this.animationDuration:0,function(a){var b=n.plotArea.ctx;b.clearRect(
|
|
547
|
-
n.dispatchEvent("dataAnimationIterationEnd",{chart:n});1<=a&&n.dispatchEvent("dataAnimationEnd",{chart:n})},function(){n.disableToolTip=!1;n._animator.animate(0,n.animatedRender?500:0,function(a){c(a,!1);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n})});n.dispatchEvent("dataAnimationEnd",{chart:n})});m.radius=z;"doughnut"===m.type&&(m.innerRadius=
|
|
548
|
-
Math.round(e.y1)),a.lineTo(Math.round(e.x2),Math.round(e.y2)),a.lineTo(Math.round(e.x3),Math.round(e.y3)),a.lineTo(Math.round(e.x4),Math.round(e.y4)),"undefined"!==e.x5&&(a.lineTo(Math.round(e.x5),Math.round(e.y5)),a.lineTo(Math.round(e.x6),Math.round(e.y6))),a.closePath(),a.fillStyle=b?b:e.color,a.fill(),a.globalAplha=1,a.restore())};s.prototype.renderFunnel=function(a){function e(){for(var a=0,b=[],c=0;c<
|
|
549
|
-
0;a+=Math.abs(
|
|
550
|
-
da*b*b-4*Math.abs(da)*a,0>p?(p=c,
|
|
551
|
-
1;
|
|
552
|
-
|
|
553
|
-
b.indexLabelLineThickness:"number"===typeof u.indexLabelLineThickness?u.indexLabelLineThickness:2;s=b.indexLabelLineDashType||u.indexLabelLineDashType||"solid";v="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof u.indexLabelWrap?u.indexLabelWrap:!0;
|
|
554
|
-
|
|
555
|
-
b=b.indexLabelFormatter?b.indexLabelFormatter(
|
|
556
|
-
backgroundColor:
|
|
557
|
-
b,c,d,
|
|
558
|
-
|
|
559
|
-
ua-
|
|
560
|
-
typeof a.x5?c<ya?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,
|
|
561
|
-
(a=
|
|
562
|
-
d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,d,e,f,g=0,h;f=(Q-Z+2*
|
|
563
|
-
d||k;f=k;for(h=0;
|
|
564
|
-
"",
|
|
565
|
-
fa)}function n(a,b,c){var d,e,f,h=[],k=
|
|
566
|
-
duration:c||500,easingFunction:function(a,b,c,d){return
|
|
567
|
-
b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[
|
|
568
|
-
2<<0)+e,b=f(c).x2-1,isNaN(b)&&(Math.round(
|
|
569
|
-
|
|
570
|
-
a.roundRect||Ba(a);
|
|
571
|
-
U.fNg&&U.fNg(
|
|
572
|
-
"function"===typeof
|
|
573
|
-
"string"===typeof R&&R.match(/%$/)?(R=parseInt(R),R=R*
|
|
574
|
-
aa){if(u.reversed)for(ja.push(ba),
|
|
575
|
-
1-
|
|
576
|
-
(
|
|
577
|
-
|
|
578
|
-
!
|
|
529
|
+
c.lineTo(e.indexLabelTextBlock.x,e.indexLabelTextBlock.y),c.lineTo(e.indexLabelTextBlock.x+("left"===e.hemisphere?-p:p),e.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,e=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,d=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,f=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?d-e:c-
|
|
530
|
+
f}function d(a){for(var c=null,e=1;e<q.length;e++)if(c=(a+e+f.length)%f.length,f[c].hemisphere!==f[a].hemisphere){c=null;break}else if(f[c].indexLabelText&&c!==a&&(0>b(f[c],f[a])||("right"===f[a].hemisphere?f[c].indexLabelTextBlock.y>=f[a].indexLabelTextBlock.y:f[c].indexLabelTextBlock.y<=f[a].indexLabelTextBlock.y)))break;else c=null;return c}function g(a,c,e){e=(e||0)+1;if(1E3<e)return 0;c=c||0;var h=0,m=v.y-1*t,k=v.y+1*t;if(0<=a&&a<q.length){var l=f[a];if(0>c&&l.indexLabelTextBlock.y<m||0<c&&l.indexLabelTextBlock.y>
|
|
531
|
+
k)return 0;var p=0,r=0,r=p=p=0;0>c?l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2>m&&l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+c<m&&(c=-(m-(l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2+c))):l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2<m&&l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c>k&&(c=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2+c-k);c=l.indexLabelTextBlock.y+c;m=0;m="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(t,2)-Math.pow(c-v.y,
|
|
532
|
+
2)):v.x-Math.sqrt(Math.pow(t,2)-Math.pow(c-v.y,2));r=v.x+z*Math.cos(l.midAngle);p=v.y+z*Math.sin(l.midAngle);p=Math.sqrt(Math.pow(m-r,2)+Math.pow(c-p,2));r=Math.acos(z/t);p=Math.acos((t*t+z*z-p*p)/(2*z*t));c=p<r?c-l.indexLabelTextBlock.y:0;m=null;for(k=1;k<q.length;k++)if(m=(a-k+f.length)%f.length,f[m].hemisphere!==f[a].hemisphere){m=null;break}else if(f[m].indexLabelText&&f[m].hemisphere===f[a].hemisphere&&m!==a&&(0>b(f[m],f[a])||("right"===f[a].hemisphere?f[m].indexLabelTextBlock.y<=f[a].indexLabelTextBlock.y:
|
|
533
|
+
f[m].indexLabelTextBlock.y>=f[a].indexLabelTextBlock.y)))break;else m=null;r=m;p=d(a);k=m=0;0>c?(k="right"===l.hemisphere?r:p,h=c,null!==k&&(r=-c,c=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2-(f[k].indexLabelTextBlock.y+f[k].indexLabelTextBlock.height/2),c-r<s&&(m=-r,k=g(k,m,e+1),+k.toFixed(x)>+m.toFixed(x)&&(h=c>s?-(c-s):-(r-(k-m)))))):0<c&&(k="right"===l.hemisphere?p:r,h=c,null!==k&&(r=c,c=f[k].indexLabelTextBlock.y-f[k].indexLabelTextBlock.height/2-(l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/
|
|
534
|
+
2),c-r<s&&(m=r,k=g(k,m,e+1),+k.toFixed(x)<+m.toFixed(x)&&(h=c>s?c-s:r-(m-k)))));h&&(e=l.indexLabelTextBlock.y+h,c=0,c="right"===l.hemisphere?v.x+Math.sqrt(Math.pow(t,2)-Math.pow(e-v.y,2)):v.x-Math.sqrt(Math.pow(t,2)-Math.pow(e-v.y,2)),l.midAngle>Math.PI/2-u&&l.midAngle<Math.PI/2+u?(m=(a-1+f.length)%f.length,m=f[m],a=f[(a+1+f.length)%f.length],"left"===l.hemisphere&&"right"===m.hemisphere&&c>m.indexLabelTextBlock.x?c=m.indexLabelTextBlock.x-15:"right"===l.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&
|
|
535
|
+
(c=a.indexLabelTextBlock.x+15)):l.midAngle>3*Math.PI/2-u&&l.midAngle<3*Math.PI/2+u&&(m=(a-1+f.length)%f.length,m=f[m],a=f[(a+1+f.length)%f.length],"right"===l.hemisphere&&"left"===m.hemisphere&&c<m.indexLabelTextBlock.x?c=m.indexLabelTextBlock.x+15:"left"===l.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),l.indexLabelTextBlock.y=e,l.indexLabelTextBlock.x=c,l.indexLabelAngle=Math.atan2(l.indexLabelTextBlock.y-v.y,l.indexLabelTextBlock.x-v.x))}return h}
|
|
536
|
+
function h(){var a=n.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,e=0,h=!0,c=0;10>c&&(1>c||0<e);c++){if(m.radius||!m.radius&&"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&z-e<=B)h=!1;h&&(z-=e);e=0;if("inside"!==m.indexLabelPlacement){t=z*C;for(a=0;a<q.length;a++){var k=f[a];k.indexLabelTextBlock.x=v.x+t*Math.cos(k.midAngle);k.indexLabelTextBlock.y=v.y+t*Math.sin(k.midAngle);k.indexLabelAngle=k.midAngle;k.radius=z;k.percentInnerRadius=
|
|
537
|
+
D}for(var l,u,a=0;a<q.length;a++){var k=f[a],y=d(a);if(null!==y){l=f[a];u=f[y];var w=0,w=b(l,u)-s;if(0>w){for(var F=u=0,K=0;K<q.length;K++)K!==a&&f[K].hemisphere===k.hemisphere&&(f[K].indexLabelTextBlock.y<k.indexLabelTextBlock.y?u++:F++);u=w/(u+F||1)*F;var F=-1*(w-u),N=K=0;"right"===k.hemisphere?(K=g(a,u),F=-1*(w-K),N=g(y,F),+N.toFixed(x)<+F.toFixed(x)&&+K.toFixed(x)<=+u.toFixed(x)&&g(a,-(F-N))):(K=g(y,u),F=-1*(w-K),N=g(a,F),+N.toFixed(x)<+F.toFixed(x)&&+K.toFixed(x)<=+u.toFixed(x)&&g(y,-(F-N)))}}}}else for(a=
|
|
538
|
+
0;a<q.length;a++)k=f[a],t="pie"===m.type?0.7*z:0.85*z,y=v.x+t*Math.cos(k.midAngle),u=v.y+t*Math.sin(k.midAngle),k.indexLabelTextBlock.x=y,k.indexLabelTextBlock.y=u;for(a=0;a<q.length;a++)if(k=f[a],y=k.indexLabelTextBlock.measureText(),0!==y.height&&0!==y.width)y=y=0,"right"===k.hemisphere?(y=r.x2-(k.indexLabelTextBlock.x+k.indexLabelTextBlock.width+p),y*=-1):y=r.x1-(k.indexLabelTextBlock.x-k.indexLabelTextBlock.width-p),0<y&&(!h&&k.indexLabelText&&(u="right"===k.hemisphere?r.x2-k.indexLabelTextBlock.x:
|
|
539
|
+
k.indexLabelTextBlock.x-r.x1,0.3*k.indexLabelTextBlock.maxWidth>u?k.indexLabelText="":k.indexLabelTextBlock.maxWidth=0.85*u,0.3*k.indexLabelTextBlock.maxWidth<u&&(k.indexLabelTextBlock.x-="right"===k.hemisphere?2:-2)),Math.abs(k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2-v.y)<z||Math.abs(k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2-v.y)<z)&&(y/=Math.abs(Math.cos(k.indexLabelAngle)),9<y&&(y*=0.3),y>e&&(e=y)),y=y=0,0<k.indexLabelAngle&&k.indexLabelAngle<Math.PI?(y=r.y2-(k.indexLabelTextBlock.y+
|
|
540
|
+
k.indexLabelTextBlock.height/2+5),y*=-1):y=r.y1-(k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2-5),0<y&&(!h&&k.indexLabelText&&(u=0<k.indexLabelAngle&&k.indexLabelAngle<Math.PI?-1:1,0===g(a,y*u)&&g(a,2*u)),Math.abs(k.indexLabelTextBlock.x-v.x)<z&&(y/=Math.abs(Math.sin(k.indexLabelAngle)),9<y&&(y*=0.3),y>e&&(e=y)));var L=function(a,b,c){for(var e=[],d=0;e.push(f[b]),b!==c;b=(b+1+q.length)%q.length);e.sort(function(a,b){return a.y-b.y});for(b=0;b<e.length;b++)if(c=e[b],d<0.7*a)d+=c.indexLabelTextBlock.height,
|
|
541
|
+
c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,e=0,g=!1,k=0;k<q.length;k++)if(g=!1,l=f[k],l.indexLabelText){var m=d(k);if(null!==m){var h=f[m];w=0;w=b(l,h);var r;if(r=0>w){r=l.indexLabelTextBlock.x;var n=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,s=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2,u=h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2,t=h.indexLabelTextBlock.x+h.indexLabelTextBlock.width,
|
|
542
|
+
v=h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2;r=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width<h.indexLabelTextBlock.x-p||r>t+p||n>v+p||s<u-p?!1:!0}r?(0>a&&(a=k),m!==a&&(c=m,e+=-w),0===k%Math.max(q.length/10,3)&&(g=!0)):g=!0;g&&(0<e&&0<=a&&0<=c)&&(L(e,a,c),c=a=-1,e=0)}}0<e&&L(e,a,c)})()}}function k(){n.plotArea.layoutManager.reset();n.title&&(n.title.dockInsidePlotArea||"center"===n.title.horizontalAlign&&"center"===n.title.verticalAlign)&&n.title.render();if(n.subtitles)for(var a=
|
|
543
|
+
0;a<n.subtitles.length;a++){var b=n.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}n.legend&&(n.legend.dockInsidePlotArea||"center"===n.legend.horizontalAlign&&"center"===n.legend.verticalAlign)&&(n.legend.setLayout(),n.legend.render())}var n=this;if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],q=m.dataPoints,p=10,r=this.plotArea,f=m.dataPointEOs,s=2,t,C=1.3,u=20/180*Math.PI,x=6,v={x:(r.x2+r.x1)/2,y:(r.y2+r.y1)/
|
|
544
|
+
2},w=0;a=!1;for(var y=0;y<q.length;y++)w+=Math.abs(q[y].y),!a&&("undefined"!==typeof q[y].indexLabel&&null!==q[y].indexLabel&&0<q[y].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof q[y].label&&null!==q[y].label&&0<q[y].label.toString().length)&&(a=!0);if(0!==w){a=a||"undefined"!==typeof m.indexLabel&&null!==m.indexLabel&&0<m.indexLabel.toString().length;var z="inside"!==m.indexLabelPlacement&&a?0.75*Math.min(r.width,r.height)/2:0.92*Math.min(r.width,r.height)/2;m.radius&&(z=Wa(m.radius,
|
|
545
|
+
z));var B="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Wa(m.innerRadius,z,0.7*z):0.7*z,D=Math.min(B/z,(z-1)/z);this.pieDoughnutClickHandler=function(a){n.isAnimating||!l(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&n._animator.animate(0,500,function(a){c(a,!0);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n});n.dispatchEvent("dataAnimationEnd",{chart:n})}))};e();h();h();h();h();this.disableToolTip=!0;this._animator.animate(0,
|
|
546
|
+
this.animatedRender?this.animationDuration:0,function(a){var b=n.plotArea.ctx;b.clearRect(r.x1,r.y1,r.width,r.height);b.fillStyle=n.backgroundColor;b.fillRect(r.x1,r.y1,r.width,r.height);for(var b=f[0].startAngle+2*Math.PI*a,c=0;c<q.length;c++){var e=0===c?f[c].startAngle:d,d=e+(f[c].endAngle-f[c].startAngle),g=!1;d>b&&(d=b,g=!0);var h=q[c].color?q[c].color:m._colorSet[c%m._colorSet.length];d>e&&sa(n.plotArea.ctx,f[c].center,f[c].radius,h,m.type,e,d,m.fillOpacity,f[c].percentInnerRadius);if(g)break}k();
|
|
547
|
+
n.dispatchEvent("dataAnimationIterationEnd",{chart:n});1<=a&&n.dispatchEvent("dataAnimationEnd",{chart:n})},function(){n.disableToolTip=!1;n._animator.animate(0,n.animatedRender?500:0,function(a){c(a,!1);k();n.dispatchEvent("dataAnimationIterationEnd",{chart:n})});n.dispatchEvent("dataAnimationEnd",{chart:n})});m.radius=z;"doughnut"===m.type&&(m.innerRadius=B)}}};var ta=function(a,e,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(e.y4-e.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(e.x1),
|
|
548
|
+
Math.round(e.y1)),a.lineTo(Math.round(e.x2),Math.round(e.y2)),a.lineTo(Math.round(e.x3),Math.round(e.y3)),a.lineTo(Math.round(e.x4),Math.round(e.y4)),"undefined"!==e.x5&&(a.lineTo(Math.round(e.x5),Math.round(e.y5)),a.lineTo(Math.round(e.x6),Math.round(e.y6))),a.closePath(),a.fillStyle=b?b:e.color,a.fill(),a.globalAplha=1,a.restore())};s.prototype.renderFunnel=function(a){function e(){for(var a=0,b=[],c=0;c<x.length;c++){if("undefined"===typeof x[c].y)return-1;x[c].y="number"===typeof x[c].y?x[c].y:
|
|
549
|
+
0;a+=Math.abs(x[c].y)}if(0===a)return-1;for(c=b[0]=0;c<x.length;c++)b.push(Math.abs(x[c].y)*B/a);return b}function c(){var a=T,b=W,c=$,e=Y,d,f;d=Z;f=Q-R;e=Math.abs((f-d)*(b-a+(e-c))/2);c=Y-$;d=f-d;f=c*(f-Q);f=Math.abs(f);f=e+f;for(var e=[],g=0,k=0;k<x.length;k++){if("undefined"===typeof x[k].y)return-1;x[k].y="number"===typeof x[k].y?x[k].y:0;g+=Math.abs(x[k].y)}if(0===g)return-1;for(var m=e[0]=0,h=0,l,p,b=b-a,m=!1,k=0;k<x.length;k++)a=Math.abs(x[k].y)*f/g,m?l=0==Number(c.toFixed(3))?0:a/c:(p=da*
|
|
550
|
+
da*b*b-4*Math.abs(da)*a,0>p?(p=c,m=(b+p)*(d-h)/2,a-=m,l=d-h,h+=d-h,l+=0==p?0:a/p,h+=a/p,m=!0):(l=(Math.abs(da)*b-Math.sqrt(p))/2,p=b-2*l/Math.abs(da),h+=l,h>d&&(h-=l,p=c,m=(b+p)*(d-h)/2,a-=m,l=d-h,h+=d-h,l+=a/p,h+=a/p,m=!0),b=p)),e.push(l);return e}function b(){if(u&&x){for(var a,b,c,e,d,g,k,h,m,p,q,r,n,s,v,A,y,w,M=[],z=[],G={percent:null,total:null},D=null,B=0;B<x.length;B++)w=J[B],w="undefined"!==typeof w.x5?(w.y2+w.y4)/2:(w.y2+w.y3)/2,w=f(w).x2+1,M[B]=L-(isNaN(w)?0:w)-X;w=0.5*X;for(var B=0,E=x.length-
|
|
551
|
+
1;B<x.length||0<=E;B++,E--){b=u.reversed?x[E]:x[B];a=b.color?b.color:u.reversed?u._colorSet[(x.length-1-B)%u._colorSet.length]:u._colorSet[B%u._colorSet.length];c=b.indexLabelPlacement||u.indexLabelPlacement||"outside";y=b.indexLabelTextAlign||u.indexLabelTextAlign||"left";e=b.indexLabelBackgroundColor||u.indexLabelBackgroundColor||(t?"transparent":null);d=b.indexLabelBorderColor||u.indexLabelBorderColor||(t?"transparent":null);g=l(b.indexLabelBorderThickness)?u.indexLabelBorderThickness:b.indexLabelBorderThickness;
|
|
552
|
+
k=l(b.indexLabelPadding)?u.options.indexLabelPadding?u.options.indexLabelPadding:u.indexLabelPadding:b.indexLabelPadding;h=b.indexLabelFontColor||u.indexLabelFontColor||"#979797";m=l(b.indexLabelFontSize)?u.indexLabelFontSize:b.indexLabelFontSize;p=b.indexLabelFontStyle||u.indexLabelFontStyle||"normal";q=b.indexLabelFontFamily||u.indexLabelFontFamily||"arial";r=b.indexLabelFontWeight||u.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||u.options.indexLabelLineColor||a;n="number"===typeof b.indexLabelLineThickness?
|
|
553
|
+
b.indexLabelLineThickness:"number"===typeof u.indexLabelLineThickness?u.indexLabelLineThickness:2;s=b.indexLabelLineDashType||u.indexLabelLineDashType||"solid";v="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof u.indexLabelWrap?u.indexLabelWrap:!0;A=u.dataPointIds[B];C._eventManager.objectMap[A]={id:A,objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:J[u.reversed?x.length-1-B:B]};"inside"===u.indexLabelPlacement&&(M[B]=B!==ea?u.reversed?J[B].x2-J[B].x1:
|
|
554
|
+
J[B].x3-J[B].x4:J[B].x3-J[B].x6,20>M[B]&&(M[B]=B!==ea?u.reversed?J[B].x3-J[B].x4:J[B].x2-J[B].x1:J[B].x2-J[B].x1,M[B]/=2));A=b.indexLabelMaxWidth?b.indexLabelMaxWidth:u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:M[B];if(A>M[B]||0>A)A=M[B];z[B]="inside"===u.indexLabelPlacement?v?Math.max(J[B].height,m):1.5*m+("object"===typeof k?(k.top||0)+(k.bottom||0):2*k):!1;G=C.getPercentAndTotal(u,b);if(u.indexLabelFormatter||b.indexLabelFormatter)D={chart:C,dataSeries:u,dataPoint:b,total:G.total,percent:G.percent};
|
|
555
|
+
b=b.indexLabelFormatter?b.indexLabelFormatter(D):b.indexLabel?C.replaceKeywordsWithValue(b.indexLabel,b,u,B):u.indexLabelFormatter?u.indexLabelFormatter(D):u.indexLabel?C.replaceKeywordsWithValue(u.indexLabel,b,u,B):b.label?b.label:"";0>=n&&(n=0);1E3>A&&1E3-A<w&&(A+=1E3-A);l(u.options.indexLabelMaxWidth)&&(u.indexLabelMaxWidth=l(u.indexLabelMaxWidth)?A:Math.max(A,u.indexLabelMaxWidth));S.roundRect||Ba(S);c=new la(S,{fontSize:m,fontFamily:q,fontColor:h,fontStyle:p,fontWeight:r,horizontalAlign:c,textAlign:y,
|
|
556
|
+
backgroundColor:e,borderColor:d,borderThickness:g,maxWidth:A,maxHeight:!1===z[B]?(v?4.28571429*m:1.5*m)+("object"===typeof k?(k.top||0)+(k.bottom||0):2*k):z[B],text:b,padding:k,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;I.push({textBlock:c,id:u.reversed?E:B,isDirty:!1,lineColor:a,lineThickness:n,lineDashType:s,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function d(){var a,
|
|
557
|
+
b,c,e,d,f=[];d=!1;c=0;for(var g,k=L-W-X/2,k=u.options.indexLabelMaxWidth?u.indexLabelMaxWidth>k?k:u.indexLabelMaxWidth:k,h=I.length-1;0<=h;h--){g=x[I[h].id];c=I[h];e=c.textBlock;b=(a=r(h)<J.length?I[r(h)]:null)?a.textBlock:null;c=c.height;a&&e.y+c+fa>b.y&&(d=!0);c=g.indexLabelMaxWidth||k;if(c>k||0>c)c=k;f.push(c)}if(d)for(h=I.length-1;0<=h;h--)a=J[h],I[h].textBlock.maxWidth=f[f.length-(h+1)],I[h].textBlock.measureText(),I[h].textBlock.height=I[h].textBlock.height===2*I[h].textBlock.padding?0:I[h].textBlock.height,
|
|
558
|
+
I[h].textBlock.width=I[h].textBlock.width===2*I[h].textBlock.padding?0:I[h].textBlock.width,I[h].textBlock.x=L-k,c=I[h].textBlock.height<I[h].textBlock.maxHeight?I[h].textBlock.height:I[h].textBlock.maxHeight,d=I[h].textBlock.width<I[h].textBlock.maxWidth?I[h].textBlock.width:I[h].textBlock.maxWidth,I[h].height=c,I[h].width=d,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,I[h].textBlock.y=c-I[h].height/2,u.reversed?(I[h].textBlock.y+I[h].height>qa+w&&(I[h].textBlock.y=qa+w-I[h].height),I[h].textBlock.y<
|
|
559
|
+
ua-w&&(I[h].textBlock.y=ua-w)):(I[h].textBlock.y<qa-w&&(I[h].textBlock.y=qa-w),I[h].textBlock.y+I[h].height>ua+w&&(I[h].textBlock.y=ua+w-I[h].height))}function g(){var a,b,c,e;if("inside"!==u.indexLabelPlacement)for(var d=0;d<J.length;d++)l(I[d].textBlock)||(l(I[d].textBlock.text)||0!=I[d].textBlock.text.length)&&!l(I[d].textBlock.text)?(a=J[d],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=u.reversed?"undefined"!==typeof a.x5?c>ya?f(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==
|
|
560
|
+
typeof a.x5?c<ya?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,I[d].textBlock.x=b+X,I[d].textBlock.y=c-I[d].height/2,u.reversed?(I[d].textBlock.y+I[d].height>qa+w&&(I[d].textBlock.y=qa+w-I[d].height),I[d].textBlock.y<ua-w&&(I[d].textBlock.y=ua-w)):(I[d].textBlock.y<qa-w&&(I[d].textBlock.y=qa-w),I[d].textBlock.y+I[d].height>ua+w&&(I[d].textBlock.y=ua+w-I[d].height))):I[d].isDirty=!0;else for(d=0;d<J.length;d++)l(I[d].textBlock)||(l(I[d].textBlock.text)||0!=I[d].textBlock.text.length)&&!l(I[d].textBlock.text)?
|
|
561
|
+
(a=J[d],b=a.height,c=I[d].height,e=I[d].width,b>=c?(b=d!=ea?(a.x4+a.x3)/2-e/2:(a.x5+a.x4)/2-e/2,c=d!=ea?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,I[d].textBlock.x=b,I[d].textBlock.y=c):I[d].isDirty=!0):I[d].isDirty=!0}function h(){function a(b,c){var d;if(0>b||b>=I.length)return 0;var e,f=I[b].textBlock;if(0>c){c*=-1;e=p(b);d=k(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=d);return d}e=r(b);d=k(b,e);if(d>=c)return f.y+=c,c;if(b==J.length-1)return 0<d&&(f.y+=d),d;
|
|
562
|
+
d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,d,e,f,g=0,h;f=(Q-Z+2*w)/l;h=l;for(var k,m=1;m<h;m++){e=m*f;for(var q=I.length-1;0<=q;q--)!I[q].isDirty&&(I[q].textBlock.y<e&&I[q].textBlock.y+I[q].height>e)&&(k=r(q),!(k>=I.length-1)&&I[q].textBlock.y+I[q].height+fa>I[k].textBlock.y&&(I[q].textBlock.y=I[q].textBlock.y+I[q].height-e>e-I[q].textBlock.y?e+1:e-I[q].height-1))}for(k=J.length-1;0<k;k--)if(!I[k].isDirty){e=p(k);if(0>e&&(e=0,I[e].isDirty))break;if(I[k].textBlock.y<I[e].textBlock.y+I[e].height){d=
|
|
563
|
+
d||k;f=k;for(h=0;I[f].textBlock.y<I[e].textBlock.y+I[e].height+fa;){a=a||I[f].textBlock.y+I[f].height;h+=I[f].height;h+=fa;f=e;if(0>=f){f=0;h+=I[f].height;break}e=p(f);if(0>e){f=0;h+=I[f].height;break}}if(f!=k){g=I[f].textBlock.y;a-=g;a=h-a;g=c(a,d,f);break}}}return g}function c(a,b,d){var e=[],f=0,g=0;for(a=Math.abs(a);d<=b;d++)e.push(J[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=e[d],f<a)g++,f+=I[b.id].height+fa,I[b.id].textBlock.text="",I[b.id].indexLabelText=
|
|
564
|
+
"",I[b.id].isDirty=!0,I[b.id].textBlock.measureText();else break;return g}for(var d,e,f,g,h,m,l=1,q=0;q<2*l;q++){for(var n=I.length-1;0<=n&&!(0<=p(n)&&p(n),f=I[n],g=f.textBlock,m=(h=r(n)<J.length?I[r(n)]:null)?h.textBlock:null,d=+f.height.toFixed(6),e=+g.y.toFixed(6),!f.isDirty&&(h&&e+d+fa>+m.y.toFixed(6))&&(d=g.y+d+fa-m.y,e=a(n,-d),e<d&&(0<e&&(d-=e),e=a(r(n),d),e!=d)));n--);b()}}function k(a,b){return(b<J.length?I[b].textBlock.y:u.reversed?qa+w:ua+w)-(0>a?u.reversed?ua-w:qa-w:I[a].textBlock.y+I[a].height+
|
|
565
|
+
fa)}function n(a,b,c){var d,e,f,h=[],k=w,l=[];-1!==b&&(0<=V.indexOf(b)?(e=V.indexOf(b),V.splice(e,1)):(V.push(b),V=V.sort(function(a,b){return a-b})));if(0===V.length)h=ka;else{e=w*(1!=V.length||0!=V[0]&&V[0]!=J.length-1?2:1)/m();for(var p=0;p<J.length;p++){if(1==V.length&&0==V[0]){if(0===p){h.push(ka[p]);d=k;continue}}else 0===p&&(d=-1*k);h.push(ka[p]+d);if(0<=V.indexOf(p)||p<J.length&&0<=V.indexOf(p+1))d+=e}}f=function(){for(var a=[],b=0;b<J.length;b++)a.push(h[b]-J[b].y1);return a}();var r={startTime:(new Date).getTime(),
|
|
566
|
+
duration:c||500,easingFunction:function(a,b,c,d){return N.easing.easeOutQuart(a,b,c,d)},changeSection:function(a){for(var b,c,d=0;d<J.length;d++)b=f[d],c=J[d],b*=a,"undefined"===typeof l[d]&&(l[d]=0),0>l&&(l*=-1),c.y1+=b-l[d],c.y2+=b-l[d],c.y3+=b-l[d],c.y4+=b-l[d],c.y5&&(c.y5+=b-l[d],c.y6+=b-l[d]),l[d]=b}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ia=!0;d.clearRect(v.x1,v.y1,v.x2-v.x1,v.y2-v.y1);d.fillStyle=a.backgroundColor;d.fillRect(v.x1,v.y1,v.width,v.height);r.changeSection(c,
|
|
567
|
+
b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[x.length-1-b]:u.dataPoints[b];e.index=u.reversed?x.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<J.length;e++)ta(d,J[e],u.fillOpacity);A(d);F&&("inside"!==u.indexLabelPlacement?q(d):g(),s(d));1<=c&&(ia=!1)},null,N.easing.easeOutQuart)}function m(){for(var a=0,b=0;b<J.length-1;b++)(0<=V.indexOf(b)||0<=V.indexOf(b+1))&&a++;return a}function q(a){for(var b,c,d,e,g=0;g<J.length;g++)e=1===I[g].lineThickness%2?0.5:0,c=((J[g].y2+J[g].y4)/
|
|
568
|
+
2<<0)+e,b=f(c).x2-1,isNaN(b)&&(Math.round(J[g].x1)===Math.round(J[g].x4)&&Math.round(J[g].x2)===Math.round(J[g].x3))&&(b=J[g].x2),d=I[g].textBlock.x,e=(I[g].textBlock.y+I[g].height/2<<0)+e,I[g].isDirty||0==I[g].lineThickness||(a.strokeStyle=I[g].lineColor,a.lineWidth=I[g].lineThickness,a.setLineDash&&a.setLineDash(K(I[g].lineDashType,I[g].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&I[a].isDirty;a--);return a}function r(a){for(a+=1;a<=
|
|
569
|
+
J.length&&a!=J.length&&I[a].isDirty;a++);return a}function f(a){for(var b,c=0;c<x.length;c++)if(J[c].y1<a&&J[c].y4>a){b=J[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function s(a){for(var b=0;b<J.length;b++)I[b].isDirty||(a&&(I[b].textBlock.ctx=a),I[b].textBlock.y+=I[b].textBlock._lineHeight/2,I[b].textBlock.render(!0),I[b].textBlock.y-=I[b].textBlock._lineHeight/2)}function A(a){C.plotArea.layoutManager.reset();
|
|
570
|
+
a.roundRect||Ba(a);C.title&&(C.title.dockInsidePlotArea||"center"===C.title.horizontalAlign&&"center"===C.title.verticalAlign)&&(C.title.ctx=a,C.title.render());if(C.subtitles)for(var b=0;b<C.subtitles.length;b++){var c=C.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)C.subtitles.ctx=a,c.render()}C.legend&&(C.legend.dockInsidePlotArea||"center"===C.legend.horizontalAlign&&"center"===C.legend.verticalAlign)&&(C.legend.ctx=a,C.legend.setLayout(),C.legend.render());
|
|
571
|
+
U.fNg&&U.fNg(C)}var C=this;if(!(0>=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],x=u.dataPoints,v=this.plotArea,w=0.025*v.width,y=0.01*v.width,z=0,B=v.height-2*w-4,D=Math.min(v.width-2*y,2.8*v.height),F=!1,O=0;O<x.length;O++)if(!F&&("undefined"!==typeof x[O].indexLabel&&null!==x[O].indexLabel&&0<x[O].indexLabel.toString().length)&&(F=!0),!F&&("undefined"!==typeof x[O].label&&null!==x[O].label&&0<x[O].label.toString().length)&&(F=!0),!F&&"function"===typeof u.indexLabelFormatter||
|
|
572
|
+
"function"===typeof x[O].indexLabelFormatter)F=!0;F=F||"undefined"!==typeof u.indexLabel&&null!==u.indexLabel&&0<u.indexLabel.toString().length;"inside"!==u.indexLabelPlacement&&F||(y=(v.width-0.75*D)/2);var O=v.x1+y,L=v.x2-y,Z=v.y1+w+2,Q=v.y2-w-2,S=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=u.length&&(u.dataPoints&&u.visible)&&0!==x.length){var R,H;a=75*D/100;var X=30*(L-a)/100;"funnel"===u.type?(R=l(u.options.neckHeight)?0.35*B:u.neckHeight,H=l(u.options.neckWidth)?0.25*a:u.neckWidth,
|
|
573
|
+
"string"===typeof R&&R.match(/%$/)?(R=parseInt(R),R=R*B/100):R=parseInt(R),"string"===typeof H&&H.match(/%$/)?(H=parseInt(H),H=H*a/100):H=parseInt(H),R>B?R=B:0>=R&&(R=0),H>a?H=a-0.5:0>=H&&(H=0)):"pyramid"===u.type&&(H=R=0,u.reversed=u.reversed?!1:!0);var D=O+a/2,T=O,W=O+a,qa=u.reversed?Q:Z,$=D-H/2,Y=D+H/2,ya=u.reversed?Z+R:Q-R,ua=u.reversed?Z:Q;H=u.valueRepresents=u.valueRepresents?u.valueRepresents:"height";var aa,O=[],D=[],J=[],ja=[],ba=Z,ea,da=(ya-qa)/($-T),ha=-da;aa="area"===H?c():e();if(-1!==
|
|
574
|
+
aa){if(u.reversed)for(ja.push(ba),H=aa.length-1;0<H;H--)ba+=aa[H],ja.push(Math.round(ba));else for(H=0;H<aa.length;H++)ba+=aa[H],ja.push(Math.round(ba));if(u.reversed)for(H=0;H<aa.length;H++)ja[H]<ya?(O.push($),D.push(Y),ea=H):(O.push((ja[H]-qa+da*T)/da),D.push((ja[H]-qa+ha*W)/ha));else for(H=0;H<aa.length;H++)ja[H]<ya?(O.push((ja[H]-qa+da*T)/da),D.push((ja[H]-qa+ha*W)/ha),ea=H):(O.push($),D.push(Y));for(H=0;H<aa.length-1;H++)ba=u.reversed?x[x.length-1-H].color?x[x.length-1-H].color:u._colorSet[(x.length-
|
|
575
|
+
1-H)%u._colorSet.length]:x[H].color?x[H].color:u._colorSet[H%u._colorSet.length],H===ea?J.push({x1:O[H],y1:ja[H],x2:D[H],y2:ja[H],x3:Y,y3:ya,x4:D[H+1],y4:ja[H+1],x5:O[H+1],y5:ja[H+1],x6:$,y6:ya,id:H,height:ja[H+1]-ja[H],color:ba}):J.push({x1:O[H],y1:ja[H],x2:D[H],y2:ja[H],x3:D[H+1],y3:ja[H+1],x4:O[H+1],y4:ja[H+1],id:H,height:ja[H+1]-ja[H],color:ba}),u.dataPointEOs[H]&&J[H]&&(u.dataPointEOs[H].sectionsofFunnel=J[H]);var fa=2,I=[],ia=!1,V=[],ka=[],O=!1;aa=aa=0;Ca(V);for(H=0;H<x.length;H++)x[H].exploded&&
|
|
576
|
+
(O=!0,u.reversed?V.push(x.length-1-H):V.push(H));S.clearRect(v.x1,v.y1,v.width,v.height);S.fillStyle=C.backgroundColor;S.fillRect(v.x1,v.y1,v.width,v.height);if(F&&u.visible&&(b(),g(),"inside"!==u.indexLabelPlacement)){d();h();D=!1;ja=Infinity;for(H=0;H<x.length;H++)I[H].isDirty||(D=!0,aa=I[H].textBlock.x+I[H].width,aa=(L-aa)/2,aa<ja&&(ja=aa));Infinity!==ja&&(z=ja);D||(z=(v.width-a)/2-y);for(H=0;H<J.length;H++)J[H].x1+=z,J[H].x2+=z,J[H].x3+=z,J[H].x4+=z,J[H].x5&&(J[H].x5+=z,J[H].x6+=z),I[H].textBlock.x+=
|
|
577
|
+
z}for(H=0;H<J.length;H++)y=J[H],ta(S,y,u.fillOpacity),ka.push(y.y1);A(S);F&&u.visible&&("inside"===u.indexLabelPlacement||C.animationEnabled||q(S),C.animationEnabled||s());if(!F)for(H=0;H<x.length;H++)y=u.dataPointIds[H],z={id:y,objectType:"dataPoint",dataPointIndex:H,dataSeriesIndex:0,funnelSection:J[u.reversed?x.length-1-H:H]},C._eventManager.objectMap[y]=z;!C.animationEnabled&&O?n(C,-1,0):C.animationEnabled&&!C.animatedRender&&n(C,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ia&&
|
|
578
|
+
!C.isAnimating&&(l(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=u.reversed?x.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===u.type||"pyramid"===u.type)u.reversed?x[x.length-1-a].exploded=x[x.length-1-a].exploded?!1:!0:x[a].exploded=x[a].exploded?!1:!0;n(C,b,500)}};return{source:S,dest:this.plotArea.ctx,animationCallback:function(a,b){N.fadeInAnimation(a,b);1<=a&&(n(C,-1,500),A(C.plotArea.ctx||C.ctx))},easingFunction:N.easing.easeInQuad,animationBase:0}}}}};s.prototype.requestAnimFrame=
|
|
579
579
|
function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();s.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;s.prototype.set=function(a,e,c){c="undefined"===
|
|
580
580
|
typeof c?!0:c;"options"===a?(this.options=e,c&&this.render()):s.base.set.call(this,a,e,c)};s.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var e=a.format?a.format:"png",c=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+e);var b=this.canvas;if(b&&e&&c){c=c+"."+e;a="image/"+e;var b=b.toDataURL(a),d=!1,g=document.createElement("a");g.download=c;g.href=b;if("undefined"!==typeof Blob&&new Blob){for(var h=b.replace(/^data:[a-z\/]*;base64,/,
|
|
581
|
-
""),h=atob(h),k=new ArrayBuffer(h.length),k=new Uint8Array(k),l=0;l<h.length;l++)k[l]=h.charCodeAt(l);e=new Blob([k.buffer],{type:"image/"+e});try{window.navigator.msSaveBlob(e,c),d=!0}catch(m){g.dataset.downloadurl=[a,g.download,g.href].join(":"),g.href=window.URL.createObjectURL(e)}}if(!d)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent?g.dispatchEvent(event):g.fireEvent&&g.fireEvent("onclick")}catch(
|
|
581
|
+
""),h=atob(h),k=new ArrayBuffer(h.length),k=new Uint8Array(k),l=0;l<h.length;l++)k[l]=h.charCodeAt(l);e=new Blob([k.buffer],{type:"image/"+e});try{window.navigator.msSaveBlob(e,c),d=!0}catch(m){g.dataset.downloadurl=[a,g.download,g.href].join(":"),g.href=window.URL.createObjectURL(e)}}if(!d)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent?g.dispatchEvent(event):g.fireEvent&&g.fireEvent("onclick")}catch(q){e=window.open(),
|
|
582
582
|
e.document.write("<img src='"+b+"'></img><div>Please right click on the image and save it to your device</div>"),e.document.close()}}};s.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),e=document.createElement("iframe");e.setAttribute("class","canvasjs-chart-print-frame");Q(e,{position:"absolute",width:"100%",border:"0px",margin:"0px 0px 0px 0px",padding:"0px 0px 0px 0px"});e.style.height=this.height+"px";this._canvasJSContainer.appendChild(e);var c=this,b=e.contentWindow||e.contentDocument.document||
|
|
583
583
|
e.contentDocument;b.document.open();b.document.write('<!DOCTYPE HTML>\n<html><body><img src="'+a+'"/><body/></html>');b.document.body&&b.document.body.style&&(b.document.body.style.margin="0px 0px 0px 0px",b.document.body.style.padding="0px 0px 0px 0px");b.document.close();setTimeout(function(){b.focus();b.print();setTimeout(function(){c._canvasJSContainer.removeChild(e)},1E3)},500)};s.prototype.getPercentAndTotal=function(a,e){var c=null,b=null,d=c=null;if(0<=a.type.indexOf("stacked"))b=0,c=e.x.getTime?
|
|
584
584
|
e.x.getTime():e.x,c in a.plotUnit.yTotals&&(b=a.plotUnit.yTotals[c],c=a.plotUnit.yAbsTotals[c],d=isNaN(e.y)?0:0===c?0:100*(e.y/c));else if("pie"===a.type||"doughnut"===a.type||"funnel"===a.type||"pyramid"===a.type){for(c=b=0;c<a.dataPoints.length;c++)isNaN(a.dataPoints[c].y)||(b+=a.dataPoints[c].y);d=isNaN(e.y)?0:100*(e.y/b)}return{percent:d,total:b}};s.prototype.replaceKeywordsWithValue=function(a,e,c,b,d){var g=this;d="undefined"===typeof d?0:d;if((0<=c.type.indexOf("stacked")||"pie"===c.type||
|
|
585
|
-
"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var h="#percent",k="#total",l=this.getPercentAndTotal(c,e),k=isNaN(l.total)?k:l.total,h=isNaN(l.percent)?h:l.percent;do{l="";if(c.percentFormatString)l=c.percentFormatString;else{var l="#,##0.",m=Math.max(Math.ceil(Math.log(1/Math.abs(h))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var
|
|
585
|
+
"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var h="#percent",k="#total",l=this.getPercentAndTotal(c,e),k=isNaN(l.total)?k:l.total,h=isNaN(l.percent)?h:l.percent;do{l="";if(c.percentFormatString)l=c.percentFormatString;else{var l="#,##0.",m=Math.max(Math.ceil(Math.log(1/Math.abs(h))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var q=0;q<m;q++)l+="#";c.percentFormatString=l}a=a.replace("#percent",ea(h,l,g._cultureInfo));a=a.replace("#total",
|
|
586
586
|
ea(k,c.yValueFormatString?c.yValueFormatString:"#,##0.########",g._cultureInfo))}while(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))}return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=Ia(a.slice(1,a.length-1));a=a.replace("#index",d);var h=null;try{var f=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);f&&0<f.length&&(h=Ia(f[2]),a=Ia(f[1]))}catch(k){}f=null;if("color"===a)return"waterfall"===c.type?e.color?
|
|
587
587
|
e.color:0<e.y?c.risingColor:c.fallingColor:"error"===c.type?c.color?c.color:c._colorSet[h%c._colorSet.length]:e.color?e.color:c.color?c.color:c._colorSet[b%c._colorSet.length];if(e.hasOwnProperty(a))f=e;else if(c.hasOwnProperty(a))f=c;else return"";f=f[a];null!==h&&(f=f[h]);return"x"===a?(c.axisX&&"dateTime"===c.axisX.valueType||"dateTime"===c.xValueType||e.x&&e.x.getTime)&&!c.axisX.logarithmic?Fa(f,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString=
|
|
588
588
|
g.axisX&&g.axisX.autoValueFormatString?g.axisX.autoValueFormatString:"DD MMM YY",g._cultureInfo):ea(f,e.xValueFormatString?e.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString="#,##0.########",g._cultureInfo):"y"===a?ea(f,e.yValueFormatString?e.yValueFormatString:c.yValueFormatString?c.yValueFormatString:c.yValueFormatString=c.axisY&&c.axisY.logarithmic&&"number"===typeof f&&0<f&&(1E-7>Math.abs(f)||1E7<Math.abs(f))?"0.##E+0":"#,##0.########",g._cultureInfo):"z"===a?
|
|
589
|
-
ea(f,e.zValueFormatString?e.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",g._cultureInfo):f})};ra(
|
|
589
|
+
ea(f,e.zValueFormatString?e.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",g._cultureInfo):f})};ra(F,W);F.prototype.setLayout=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,e=a.layoutManager.getFreeSpace(),c=null,b=0,d=0,g=0,h=0,k=this.markerMargin=this.chart.options.legend&&!l(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:0.3*this.fontSize;this.height=0;var n=[],m=[];if("top"===this.verticalAlign||
|
|
590
590
|
"bottom"===this.verticalAlign)this.orientation="horizontal",c=this.verticalAlign,g=this.maxWidth=null!==this.maxWidth?this.maxWidth:e.width,h=this.maxHeight=null!==this.maxHeight?this.maxHeight:0.5*e.height;else if("center"===this.verticalAlign){this.orientation="vertical";if("left"===this.horizontalAlign||"center"===this.horizontalAlign||"right"===this.horizontalAlign)c=this.horizontalAlign;g=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*e.width;h=this.maxHeight=null!==this.maxHeight?this.maxHeight:
|
|
591
|
-
e.height}this.errorMarkerColor=[];for(var
|
|
592
|
-
T.getDefaultLegendMarker(p.type):p.markerType,f=p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:null}):p.name,s=p.legendMarkerColor=p.legendMarkerColor?p.legendMarkerColor:p.markerColor?p.markerColor:"error"===p.type?l(p.whiskerColor)?p._colorSet[0]:p.whiskerColor:p._colorSet[0],t=p.markerSize||"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type?0.75*this.lineHeight:0,
|
|
593
|
-
p.markerBorderColor,u=p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:p.markerBorderThickness?Math.max(1,Math.round(0.2*t)):0;"error"===p.type&&this.errorMarkerColor.push(s);f=p.legendText=this.chart.replaceKeywordsWithValue(f,p.dataPoints[0],p,
|
|
594
|
-
p.options.legendText);for(var
|
|
595
|
-
p.color?p.color:p._colorSet[
|
|
596
|
-
markerColor:s,text:f,textBlock:null,chartType:p.type,markerSize:t,dataSeriesIndex:
|
|
597
|
-
g):this.itemMaxWidth=g;t=0===t?0.75*this.lineHeight:t;v-=t+k;for(
|
|
598
|
-
fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});
|
|
599
|
-
|
|
600
|
-
fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),
|
|
601
|
-
0,p.width+=Math.round(
|
|
602
|
-
e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y1):"center"===this.verticalAlign?(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y1+e.height/2-this.height/2):"bottom"===this.verticalAlign&&(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y2-this.height);this.items=n;for(
|
|
603
|
-
{id:
|
|
604
|
-
this.backgroundColor)&&this.ctx.roundRect(a,e,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var k=0,l=0;l<h.length;l++){for(var m=h[l],
|
|
605
|
-
"stepLine"===
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
591
|
+
e.height}this.errorMarkerColor=[];for(var q=0;q<this.dataSeries.length;q++){var p=this.dataSeries[q];if(p.dataPoints&&p.dataPoints.length){if("pie"!==p.type&&"doughnut"!==p.type&&"funnel"!==p.type&&"pyramid"!==p.type){var r=p.legendMarkerType=p.legendMarkerType?p.legendMarkerType:"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type&&"scatter"!==p.type&&"bubble"!==p.type||!p.markerType?"error"===p.type&&p._linkedSeries?p._linkedSeries.legendMarkerType?p._linkedSeries.legendMarkerType:T.getDefaultLegendMarker(p._linkedSeries.type):
|
|
592
|
+
T.getDefaultLegendMarker(p.type):p.markerType,f=p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:null}):p.name,s=p.legendMarkerColor=p.legendMarkerColor?p.legendMarkerColor:p.markerColor?p.markerColor:"error"===p.type?l(p.whiskerColor)?p._colorSet[0]:p.whiskerColor:p._colorSet[0],t=p.markerSize||"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type?0.75*this.lineHeight:0,C=p.legendMarkerBorderColor?p.legendMarkerBorderColor:
|
|
593
|
+
p.markerBorderColor,u=p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:p.markerBorderThickness?Math.max(1,Math.round(0.2*t)):0;"error"===p.type&&this.errorMarkerColor.push(s);f=p.legendText=this.chart.replaceKeywordsWithValue(f,p.dataPoints[0],p,q);r={markerType:r,markerColor:s,text:f,textBlock:null,chartType:p.type,markerSize:t,lineColor:p._colorSet[0],dataSeriesIndex:p.index,dataPointIndex:null,markerBorderColor:C,markerBorderThickness:u};n.push(r)}else{l(p.options.legendText)&&(p.legendText=
|
|
594
|
+
p.options.legendText);for(var x=0;x<p.dataPoints.length;x++){var v=p.dataPoints[x],r=v.legendMarkerType?v.legendMarkerType:p.legendMarkerType?p.legendMarkerType:T.getDefaultLegendMarker(p.type),f=v.legendText?v.legendText:v.name?v.name:p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:v}):v.name?v.name:"DataPoint: "+(x+1),s=v.legendMarkerColor?v.legendMarkerColor:p.legendMarkerColor?p.legendMarkerColor:v.color?v.color:
|
|
595
|
+
p.color?p.color:p._colorSet[x%p._colorSet.length],t=0.75*this.lineHeight,C=v.legendMarkerBorderColor?v.legendMarkerBorderColor:p.legendMarkerBorderColor?p.legendMarkerBorderColor:v.markerBorderColor?v.markerBorderColor:p.markerBorderColor,u=v.legendMarkerBorderThickness?v.legendMarkerBorderThickness:p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:v.markerBorderThickness||p.markerBorderThickness?Math.max(1,Math.round(0.2*t)):0,f=this.chart.replaceKeywordsWithValue(f,v,p,x),r={markerType:r,
|
|
596
|
+
markerColor:s,text:f,textBlock:null,chartType:p.type,markerSize:t,dataSeriesIndex:q,dataPointIndex:x,markerBorderColor:C,markerBorderThickness:u};(v.showInLegend||p.showInLegend&&!1!==v.showInLegend)&&n.push(r)}}l(p.legendText)&&(p.legendText=p.name)}}!0===this.reversed&&n.reverse();if(0<n.length){p=null;f=v=x=0;v=null!==this.itemWidth?null!==this.itemMaxWidth?this.itemWidth=Math.min(this.itemWidth,this.itemMaxWidth,g):this.itemMaxWidth=Math.min(this.itemWidth,g):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,
|
|
597
|
+
g):this.itemMaxWidth=g;t=0===t?0.75*this.lineHeight:t;v-=t+k;for(q=0;q<n.length;q++){r=n[q];s=v;if("line"===r.chartType||"spline"===r.chartType||"stepLine"===r.chartType)s-=2*0.1*this.lineHeight;if(!(0>=h||"undefined"===typeof h||0>=s||"undefined"===typeof s))if("horizontal"===this.orientation){r.textBlock=new la(this.ctx,{x:0,y:0,maxWidth:s,maxHeight:this.itemWrap?h:this.lineHeight,angle:0,text:r.text,textAlign:this.itemTextAlign,fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,
|
|
598
|
+
fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});r.textBlock.measureText();null!==this.itemWidth&&(r.textBlock.width=this.itemWidth-(t+k+("line"===r.chartType||"spline"===r.chartType||"stepLine"===r.chartType?2*0.1*this.lineHeight:0)));if(!p||p.width+Math.round(r.textBlock.width+t+k+(0===p.width?0:this.horizontalSpacing)+("line"===r.chartType||"spline"===r.chartType||"stepLine"===r.chartType?2*0.1*this.lineHeight:0))>g)p={items:[],width:0},m.push(p),this.height+=f,f=0;f=Math.max(f,
|
|
599
|
+
r.textBlock.height?r.textBlock.height:this.lineHeight);r.textBlock.x=p.width;r.textBlock.y=0;p.width+=Math.round(r.textBlock.width+t+k+(0===p.width?0:this.horizontalSpacing)+("line"===r.chartType||"spline"===r.chartType||"stepLine"===r.chartType?2*0.1*this.lineHeight:0));p.items.push(r);this.width=Math.max(p.width,this.width)}else r.textBlock=new la(this.ctx,{x:0,y:0,maxWidth:v,maxHeight:!0===this.itemWrap?h:1.5*this.fontSize,angle:0,text:r.text,textAlign:this.itemTextAlign,fontSize:this.fontSize,
|
|
600
|
+
fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),r.textBlock.measureText(),null!==this.itemWidth&&(r.textBlock.width=this.itemWidth-(t+k+("line"===r.chartType||"spline"===r.chartType||"stepLine"===r.chartType?2*0.1*this.lineHeight:0))),this.height<h-this.lineHeight?(p={items:[],width:0},m.push(p)):(p=m[x],x=(x+1)%m.length),p&&(this.height+=r.textBlock.height?r.textBlock.height:this.lineHeight,r.textBlock.x=p.width,r.textBlock.y=
|
|
601
|
+
0,p.width+=Math.round(r.textBlock.width+t+k+(0===p.width?0:this.horizontalSpacing)+("line"===r.chartType||"spline"===r.chartType||"stepLine"===r.chartType?2*0.1*this.lineHeight:0)),p.items.push(r),this.width=Math.max(p.width,this.width))}this.height=!1===this.itemWrap?m.length*this.lineHeight:this.height+f;this.height=Math.min(h,this.height)>=this.lineHeight?Math.min(h,this.height):0;this.width=Math.min(g,this.width)}"top"===this.verticalAlign?(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?
|
|
602
|
+
e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y1):"center"===this.verticalAlign?(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y1+e.height/2-this.height/2):"bottom"===this.verticalAlign&&(d="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width-2:e.x1+e.width/2-this.width/2,b=e.y2-this.height);this.items=n;for(q=0;q<this.items.length;q++)r=n[q],r.id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[r.id]=
|
|
603
|
+
{id:r.id,objectType:"legendItem",legendItemIndex:q,dataSeriesIndex:r.dataSeriesIndex,dataPointIndex:r.dataPointIndex};this.markerSize=t;this.rows=m;0<n.length&&0<this.height&&a.layoutManager.registerSpace(c,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:d,y1:b,x2:d+this.width,y2:b+this.height}};F.prototype.render=function(){var a=this.bounds.x1,e=this.bounds.y1,c=this.markerMargin,b=this.maxWidth,d=this.maxHeight,g=this.markerSize,h=this.rows;(0<this.borderThickness&&this.borderColor||
|
|
604
|
+
this.backgroundColor)&&this.ctx.roundRect(a,e,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var k=0,l=0;l<h.length;l++){for(var m=h[l],q=0,p=0;p<m.items.length;p++){var r=m.items[p],f=r.textBlock.x+a+(0===p?0.2*g:this.horizontalSpacing),n=e+k,s=f;this.chart.data[r.dataSeriesIndex].visible||(this.ctx.globalAlpha=0.5);this.ctx.save();this.ctx.beginPath();this.ctx.rect(a,e,b,Math.max(d-d%this.lineHeight,0));this.ctx.clip();if("line"===r.chartType||
|
|
605
|
+
"stepLine"===r.chartType||"spline"===r.chartType)this.ctx.strokeStyle=r.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(f-0.1*this.lineHeight,n+this.lineHeight/2),this.ctx.lineTo(f+0.85*this.lineHeight,n+this.lineHeight/2),this.ctx.stroke(),s-=0.1*this.lineHeight;if("error"===r.chartType){this.ctx.strokeStyle=this.errorMarkerColor[0];this.ctx.lineWidth=g/8;this.ctx.beginPath();var t=f-0.08*this.lineHeight+0.1*this.lineHeight,u=n+0.15*this.lineHeight,
|
|
606
|
+
x=0.7*this.lineHeight,v=x+0.02*this.lineHeight;this.ctx.moveTo(t,u);this.ctx.lineTo(t+x,u);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(t+x/2,u);this.ctx.lineTo(t+x/2,u+v);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(t,u+v);this.ctx.lineTo(t+x,u+v);this.ctx.stroke();this.errorMarkerColor.shift()}Y.drawMarker(f+g/2,n+this.lineHeight/2,this.ctx,r.markerType,"error"===r.chartType||"line"===r.chartType||"spline"===r.chartType?r.markerSize/2:r.markerSize,r.markerColor,r.markerBorderColor,
|
|
607
|
+
r.markerBorderThickness);r.textBlock.x=f+c+g;if("line"===r.chartType||"stepLine"===r.chartType||"spline"===r.chartType)r.textBlock.x+=0.1*this.lineHeight;r.textBlock.y=Math.round(n+this.lineHeight/2);r.textBlock.render(!0);this.ctx.restore();q=0<p?Math.max(q,r.textBlock.height?r.textBlock.height:this.lineHeight):r.textBlock.height?r.textBlock.height:this.lineHeight;this.chart.data[r.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);f=R(r.id);this.ghostCtx.fillStyle=f;this.ghostCtx.beginPath();this.ghostCtx.fillRect(s,
|
|
608
|
+
r.textBlock.y-this.lineHeight/2,r.textBlock.x+r.textBlock.width-s,r.textBlock.height?r.textBlock.height:this.lineHeight);r.x1=this.chart._eventManager.objectMap[r.id].x1=s;r.y1=this.chart._eventManager.objectMap[r.id].y1=r.textBlock.y-this.lineHeight/2;r.x2=this.chart._eventManager.objectMap[r.id].x2=r.textBlock.x+r.textBlock.width;r.y2=this.chart._eventManager.objectMap[r.id].y2=r.textBlock.y+(r.textBlock.height?r.textBlock.height:this.lineHeight)-this.lineHeight/2}k+=q}};ra(T,W);T.prototype.getDefaultAxisPlacement=
|
|
609
609
|
function(){var a=this.type;if("column"===a||"line"===a||"stepLine"===a||"spline"===a||"area"===a||"stepArea"===a||"splineArea"===a||"stackedColumn"===a||"stackedLine"===a||"bubble"===a||"scatter"===a||"stackedArea"===a||"stackedColumn100"===a||"stackedLine100"===a||"stackedArea100"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===a||"waterfall"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===a)return"xySwapped";
|
|
610
610
|
if("pie"===a||"doughnut"===a||"funnel"===a||"pyramid"===a)return"none";"error"!==a&&window.console.log("Unknown Chart Type: "+a);return null};T.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||"stepArea"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===
|
|
611
611
|
a||"waterfall"===a)return"square";if("line"===a||"stepLine"===a||"spline"===a||"pie"===a||"doughnut"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===a||"stackedArea100"===a||"funnel"===a||"pyramid"===a)return"triangle";if("error"===a)return"none";window.console.log("Unknown Chart Type: "+a);return null};T.prototype.getDataPointAtX=function(a,e,c){if(!this.dataPoints||0===this.dataPoints.length)return null;var b={dataPoint:null,distance:Infinity,index:NaN},d=null,g=0,h=0,k=1,n=
|
|
612
|
-
Infinity,m=0,
|
|
613
|
-
this.dataPoints[h],
|
|
614
|
-
a<this.chart.plotArea.x1||a>this.chart.plotArea.x2||e<this.chart.plotArea.y1||e>this.chart.plotArea.y2)return null;c=c||!1;var b=[],d=0,g=0,h=1,k=!1,n=Infinity,m=0,
|
|
615
|
-
0),this.dataPoints.length):0;else
|
|
616
|
-
|
|
617
|
-
a);
|
|
618
|
-
distance:s}),k=!0);break;case "pie":case "doughnut":t=
|
|
619
|
-
(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:0}),k=!0));break;case "funnel":case "pyramid":s=
|
|
620
|
-
break;case "boxAndWhisker":if(a>=
|
|
621
|
-
a+
|
|
622
|
-
a),Math.abs(
|
|
612
|
+
Infinity,m=0,q=0,p=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?(p=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<p?Math.min(Math.max((this.dataPoints.length-1)/p*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(p=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<p?Math.min(Math.max((this.dataPoints.length-1)/p*(a-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0));for(;;){h=0<k?p+g:p-g;if(0<=h&&h<this.dataPoints.length){var d=
|
|
613
|
+
this.dataPoints[h],r=this.axisX&&this.axisX.logarithmic?d.x>a?d.x/a:a/d.x:Math.abs(d.x-a);r<b.distance&&(l(c)||c&&!l(d.y))&&(b.dataPoint=d,b.distance=r,b.index=h);d=r;d<=n?n=d:0<k?m++:q++;if(1E3<m&&1E3<q)break}else if(0>p-g&&p+g>=this.dataPoints.length)break;-1===k?(g++,k=1):k=-1}return e||(b.dataPoint.x.getTime?b.dataPoint.x.getTime():b.dataPoint.x)!==(a.getTime?a.getTime():a)?e&&null!==b.dataPoint?b:null:b};T.prototype.getDataPointAtXY=function(a,e,c){if(!this.dataPoints||0===this.dataPoints.length||
|
|
614
|
+
a<this.chart.plotArea.x1||a>this.chart.plotArea.x2||e<this.chart.plotArea.y1||e>this.chart.plotArea.y2)return null;c=c||!1;var b=[],d=0,g=0,h=1,k=!1,n=Infinity,m=0,q=0,p=0;if("none"!==this.chart.plotInfo.axisPlacement)if(p=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:e}),this.axisX.logarithmic)var r=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<r?Math.min(Math.max((this.dataPoints.length-1)/r*Math.log(p/this.dataPoints[0].x)>>0,
|
|
615
|
+
0),this.dataPoints.length):0;else r=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<r?Math.min(Math.max((this.dataPoints.length-1)/r*(p-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;for(;;){g=0<h?p+d:p-d;if(0<=g&&g<this.dataPoints.length){var r=this.chart._eventManager.objectMap[this.dataPointIds[g]],f=this.dataPoints[g],s=null;if(r){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":case "waterfall":case "error":a>=
|
|
616
|
+
r.x1&&(a<=r.x2&&e>=r.y1&&e<=r.y2)&&(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(r.x1-a),Math.abs(r.x2-a),Math.abs(r.y1-e),Math.abs(r.y2-e))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var t=V("markerSize",f,this)||4,w=c?20:t,s=Math.sqrt(Math.pow(r.x1-a,2)+Math.pow(r.y1-e,2));s<=w&&b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:s});r=Math.abs(r.x1-
|
|
617
|
+
a);r<=n?n=r:0<h?m++:q++;s<=t/2&&(k=!0);break;case "rangeArea":case "rangeSplineArea":t=V("markerSize",f,this)||4;w=c?20:t;s=Math.min(Math.sqrt(Math.pow(r.x1-a,2)+Math.pow(r.y1-e,2)),Math.sqrt(Math.pow(r.x1-a,2)+Math.pow(r.y2-e,2)));s<=w&&b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:s});r=Math.abs(r.x1-a);r<=n?n=r:0<h?m++:q++;s<=t/2&&(k=!0);break;case "bubble":t=r.size;s=Math.sqrt(Math.pow(r.x1-a,2)+Math.pow(r.y1-e,2));s<=t/2&&(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,
|
|
618
|
+
distance:s}),k=!0);break;case "pie":case "doughnut":t=r.center;w="doughnut"===this.type?r.percentInnerRadius*r.radius:0;s=Math.sqrt(Math.pow(t.x-a,2)+Math.pow(t.y-e,2));s<r.radius&&s>w&&(s=Math.atan2(e-t.y,a-t.x),0>s&&(s+=2*Math.PI),s=Number(((180*(s/Math.PI)%360+360)%360).toFixed(12)),t=Number(((180*(r.startAngle/Math.PI)%360+360)%360).toFixed(12)),w=Number(((180*(r.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===w&&1<r.endAngle&&(w=360),t>=w&&(0!==f.y&&!l(f.y))&&(w+=360,s<t&&(s+=360)),s>t&&s<w&&
|
|
619
|
+
(b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:0}),k=!0));break;case "funnel":case "pyramid":s=r.funnelSection;e>=s.y1&&e<s.y4&&(s.y6?e>=s.y6?(g=s.x6+(s.x5-s.x6)/(s.y5-s.y6)*(e-s.y6),s=s.x3+(s.x4-s.x3)/(s.y4-s.y3)*(e-s.y3)):(g=s.x1+(s.x6-s.x1)/(s.y6-s.y1)*(e-s.y1),s=s.x2+(s.x3-s.x2)/(s.y3-s.y2)*(e-s.y2)):(g=s.x1+(s.x4-s.x1)/(s.y4-s.y1)*(e-s.y1),s=s.x2+(s.x3-s.x2)/(s.y3-s.y2)*(e-s.y2)),a>g&&a<s&&(b.push({dataPoint:f,dataPointIndex:r.dataPointIndex,dataSeries:this,distance:0}),k=!0));
|
|
620
|
+
break;case "boxAndWhisker":if(a>=r.x1-r.borderThickness/2&&a<=r.x2+r.borderThickness/2&&e>=r.y4-r.borderThickness/2&&e<=r.y1+r.borderThickness/2||Math.abs(r.x2-a+r.x1-a)<r.borderThickness&&e>=r.y1&&e<=r.y4)b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(r.x1-a),Math.abs(r.x2-a),Math.abs(r.y2-e),Math.abs(r.y3-e))}),k=!0;break;case "candlestick":if(a>=r.x1-r.borderThickness/2&&a<=r.x2+r.borderThickness/2&&e>=r.y2-r.borderThickness/2&&e<=r.y3+r.borderThickness/2||Math.abs(r.x2-
|
|
621
|
+
a+r.x1-a)<r.borderThickness&&e>=r.y1&&e<=r.y4)b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(r.x1-a),Math.abs(r.x2-a),Math.abs(r.y2-e),Math.abs(r.y3-e))}),k=!0;break;case "ohlc":if(Math.abs(r.x2-a+r.x1-a)<r.borderThickness&&e>=r.y2&&e<=r.y3||a>=r.x1&&a<=(r.x2+r.x1)/2&&e>=r.y1-r.borderThickness/2&&e<=r.y1+r.borderThickness/2||a>=(r.x1+r.x2)/2&&a<=r.x2&&e>=r.y4-r.borderThickness/2&&e<=r.y4+r.borderThickness/2)b.push({dataPoint:f,dataPointIndex:g,dataSeries:this,distance:Math.min(Math.abs(r.x1-
|
|
622
|
+
a),Math.abs(r.x2-a),Math.abs(r.y2-e),Math.abs(r.y3-e))}),k=!0}if(k||1E3<m&&1E3<q)break}}else if(0>p-d&&p+d>=this.dataPoints.length)break;-1===h?(d++,h=1):h=-1}a=null;for(e=0;e<b.length;e++)a?b[e].distance<=a.distance&&(a=b[e]):a=b[e];return a};T.prototype.getMarkerProperties=function(a,e,c,b){var d=this.dataPoints,g=d[a].markerColor?d[a].markerColor:this.markerColor?this.markerColor:d[a].color?d[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],h=d[a].markerBorderColor?d[a].markerBorderColor:
|
|
623
623
|
this.markerBorderColor?this.markerBorderColor:null,k=l(d[a].markerBorderThickness)?this.markerBorderThickness?this.markerBorderThickness:null:d[a].markerBorderThickness,n=d[a].markerType?d[a].markerType:this.markerType;a=l(d[a].markerSize)?this.markerSize:d[a].markerSize;return{x:e,y:c,ctx:b,type:n,size:a,color:g,borderColor:h,borderThickness:k}};ra(z,W);z.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var e=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/
|
|
624
|
-
Math.log(e/this.viewportMinimum)<this.noTicks-1){for(var c=z.getNiceNumber((e-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),b=Math.ceil(this.viewportMinimum/c)*c;b<e;b+=c)b<this.viewportMinimum||this.logLabelValues.push(b);this.logLabelValues.sort(Ua);this.createExtraLabelsForLog(a)}}};z.prototype.createLabels=function(){var a,e,c=0,b=0,d,g=0,h=0,k=0,b=this.interval,n=0,m,
|
|
625
|
-
[],f=
|
|
626
|
-
[],this.createExtraLabelsForLog()),b=0,k=f;b<this.logLabelValues.length;b++)if(c=this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;k<
|
|
624
|
+
Math.log(e/this.viewportMinimum)<this.noTicks-1){for(var c=z.getNiceNumber((e-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),b=Math.ceil(this.viewportMinimum/c)*c;b<e;b+=c)b<this.viewportMinimum||this.logLabelValues.push(b);this.logLabelValues.sort(Ua);this.createExtraLabelsForLog(a)}}};z.prototype.createLabels=function(){var a,e,c=0,b=0,d,g=0,h=0,k=0,b=this.interval,n=0,m,q=0.6*this.chart.height,p;a=!1;var r=this.scaleBreaks?this.scaleBreaks._appliedBreaks:
|
|
625
|
+
[],f=r.length?l(this.scaleBreaks.firstBreakIndex)?0:this.scaleBreaks.firstBreakIndex:0;if("axisX"!==this.type||"dateTime"!==this.valueType||this.logarithmic){d=this.viewportMaximum;if(this.labels&&l(this.options.interval)){a=Math.ceil(b);k=Math.ceil(this.intervalStartPosition);b=!1;for(c=k;c<this.viewportMaximum;c+=a)if(this.labels[c])b=!0;else{b=!1;break}b&&(this.interval=a,this.intervalStartPosition=k)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=
|
|
626
|
+
[],this.createExtraLabelsForLog()),b=0,k=f;b<this.logLabelValues.length;b++)if(c=this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;k<r.length&&c>r[k].endValue;k++);a=k<r.length&&c>=r[k].startValue&&c<=r[k].endValue;p=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:ea(p,this.valueFormatString,this.chart._cultureInfo),a=new la(this.ctx,{x:0,y:0,maxWidth:g,
|
|
627
627
|
maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,cornerRadius:this.labelCornerRadius,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:this.labelBorderThickness,padding:this.labelPadding}),this._labels.push({position:p,textBlock:a,effectiveHeight:null}))}k=
|
|
628
|
-
f;for(c=this.intervalStartPosition;c<=d;c=parseFloat(this.logarithmic&&this.equidistantInterval?1E-12>c*Math.pow(this.logarithmBase,this.interval)?c*Math.pow(this.logarithmBase,this.interval):(c*Math.pow(this.logarithmBase,this.interval)).toFixed(12):1E-12>this.interval?c+this.interval:(c+this.interval).toFixed(12))){for(;k<
|
|
628
|
+
f;for(c=this.intervalStartPosition;c<=d;c=parseFloat(this.logarithmic&&this.equidistantInterval?1E-12>c*Math.pow(this.logarithmBase,this.interval)?c*Math.pow(this.logarithmBase,this.interval):(c*Math.pow(this.logarithmBase,this.interval)).toFixed(12):1E-12>this.interval?c+this.interval:(c+this.interval).toFixed(12))){for(;k<r.length&&c>r[k].endValue;k++);a=k<r.length&&c>=r[k].startValue&&c<=r[k].endValue;p=c;a?(a=Math.floor((r[k].endValue-c)/this.interval),c=parseFloat(1E-12>this.interval?this.logarithmic&&
|
|
629
629
|
this.equidistantInterval?c*Math.pow(this.logarithmBase,this.interval*a):c+this.interval*a:(this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase,this.interval*a):c+this.interval*a).toFixed(12))):(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:ea(p,this.valueFormatString,this.chart._cultureInfo),a=new la(this.ctx,{x:0,y:0,maxWidth:g,maxHeight:h,angle:this.labelAngle,
|
|
630
630
|
text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",padding:this.labelPadding}),this._labels.push({position:p,textBlock:a,effectiveHeight:null}))}}else for(this.intervalStartPosition=
|
|
631
|
-
this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),d=Ta(new Date(this.viewportMaximum),this.interval,this.intervalType),k=f,c=this.intervalStartPosition;c<d;Ta(c,b,this.intervalType)){for(f=c.getTime();k<
|
|
631
|
+
this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),d=Ta(new Date(this.viewportMaximum),this.interval,this.intervalType),k=f,c=this.intervalStartPosition;c<d;Ta(c,b,this.intervalType)){for(f=c.getTime();k<r.length&&f>r[k].endValue;k++);p=f;(a=k<r.length&&f>=r[k].startValue&&f<=r[k].endValue)?(a=b,0<=Ca("second minute hour day week month year".split(" ")).indexOf(this.intervalType)&&(a*=S[this.intervalType+"Duration"]),Ta(c,a*Math.floor((r[k].endValue-f)/a),"millisecond")):
|
|
632
632
|
(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:new Date(p),label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:Fa(p,this.valueFormatString,this.chart._cultureInfo),a=new la(this.ctx,{x:0,y:0,maxWidth:g,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:h,angle:this.labelAngle,text:this.prefix+a+this.suffix,
|
|
633
633
|
textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",padding:this.labelPadding}),this._labels.push({position:p,textBlock:a,effectiveHeight:null,breaksLabelType:void 0}))}if("bottom"===this._position||"top"===this._position)l(this.conversionParameters)&&this.calculateValueToPixelConversionParameters(),c=this.conversionParameters&&this.conversionParameters.range?
|
|
634
634
|
this.conversionParameters.range:this.range,n=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval?Math.log(c)/Math.log(this.logarithmBase):Math.abs(c))*S[this.intervalType+"Duration"]*this.interval,g="undefined"===
|
|
635
635
|
typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(h="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize+("object"===typeof this.labelPadding?(this.labelPadding.top||0)+(this.labelPadding.bottom||0):2*this.labelPadding));else if("left"===this._position||"right"===this._position)n=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height*Math.log(Math.min(this._labels[this._labels.length-
|
|
636
636
|
1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*S[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(g="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),h="undefined"===typeof this.options.labelWrap||this.labelWrap?
|
|
637
637
|
0.3*this.chart.height>>0:1.5*this.labelFontSize;for(b=0;b<this._labels.length;b++){a=this._labels[b].textBlock;!this.labelAutoFit&&0>=g&&(g="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth);a.maxWidth=g;!this.labelAutoFit&&0>=h&&(h="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize+("object"===typeof this.labelPadding?(this.labelPadding.top||0)+(this.labelPadding.bottom||0):2*this.labelPadding));
|
|
638
|
-
a.maxHeight=h;var s=a.measureText();m=s.height}d=[];b=
|
|
639
|
-
g;this.sessionVariables.labelMaxHeight=h;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;for(var
|
|
638
|
+
a.maxHeight=h;var s=a.measureText();m=s.height}d=[];b=r=0;if(this.labelAutoFit||this.options.labelAutoFit)if(l(this.labelAngle)||(this.labelAngle=(this.labelAngle%360+360)%360,90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||"top"===this._position)if(g=Math.floor(0.9*n),f=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=
|
|
639
|
+
g;this.sessionVariables.labelMaxHeight=h;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;for(var A,k=a.text.split(" "),b=0;b<k.length;b++)p=k[b],this.ctx.font=a.fontStyle+" "+a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,p=this.ctx.measureText(p),p.width>f&&(A=c,f=p.width)}c=0;for(c=this.intervalStartPosition<this.viewportMinimum?1:0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=
|
|
640
640
|
this._labels[c].textBlock;s=a.measureText();for(k=c+1;k<this._labels.length;k++)if(!this._labels[k].breaksLabelType){e=this._labels[k].textBlock;e=e.measureText();break}d.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,d);Math.cos(Math.PI/180*Math.abs(this.labelAngle));Math.sin(Math.PI/180*Math.abs(this.labelAngle));k=g*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));if(l(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&
|
|
641
|
-
0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((k-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),k),p=(
|
|
641
|
+
0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((k-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),k),p=(q-(m+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/180*Math.abs(-25)),!l(this.options.labelWrap))this.labelWrap?l(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,f),p),this.sessionVariables.labelWrap=this.labelWrap,e&&s.width+e.width>>
|
|
642
642
|
0>2*g&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?-25:this.sessionVariables.labelAngle):l(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=g,e&&s.width+e.width>>0>2*g&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=
|
|
643
643
|
p)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>g?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelWrap=this.labelWrap);else{if(l(this.options.labelWrap))if(!l(this.options.labelMaxWidth))this.options.labelMaxWidth<g?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=k):(this.sessionVariables.labelAngle=-25,
|
|
644
|
-
this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h);else if(!l(e))if(k=s.width+e.width>>0,b=this.labelFontSize,f<g)k-2*g>
|
|
644
|
+
this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h);else if(!l(e))if(k=s.width+e.width>>0,b=this.labelFontSize,f<g)k-2*g>r&&(r=k-2*g,k>=2*g&&k<2.2*g?(this.sessionVariables.labelMaxWidth=g,l(this.options.labelFontSize)&&12<b&&(b=Math.floor(12/13*b),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?b:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):k>=2.2*g&&k<2.8*g?(this.sessionVariables.labelAngle=
|
|
645
645
|
-25,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelFontSize=b):k>=2.8*g&&k<3.2*g?(this.sessionVariables.labelMaxWidth=Math.max(g,f),this.sessionVariables.labelWrap=!0,l(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?b:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):k>=3.2*g&&k<3.6*g?(this.sessionVariables.labelAngle=
|
|
646
646
|
-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelFontSize=this.labelFontSize):k>3.6*g&&k<5*g?(l(this.options.labelFontSize)&&12<b&&(b=Math.floor(12/13*b),a.measureText()),this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?b:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p):k>5*g&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=
|
|
647
|
-
g,this.sessionVariables.labelFontSize=b,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=this.labelAngle));else if(
|
|
648
|
-
this._labels[
|
|
647
|
+
g,this.sessionVariables.labelFontSize=b,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=this.labelAngle));else if(A===c&&(0===A&&f+this._labels[A+1].textBlock.measureText().width-2*g>r||A===this._labels.length-1&&f+this._labels[A-1].textBlock.measureText().width-2*g>r||0<A&&A<this._labels.length-1&&f+this._labels[A+1].textBlock.measureText().width-2*g>r&&f+this._labels[A-1].textBlock.measureText().width-2*g>r))r=0===A?f+this._labels[A+1].textBlock.measureText().width-2*g:f+
|
|
648
|
+
this._labels[A-1].textBlock.measureText().width-2*g,this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?b:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p;else if(0===r)for(this.sessionVariables.labelFontSize=l(this.options.labelFontSize)?b:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.sessionVariables.labelMaxWidth=
|
|
649
649
|
Math.min(Math.max(g,f),p),s=a.measureText(),b<this._labels.length-1&&(k=b+1,e=this._labels[k].textBlock,e.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(g,f),p),e=e.measureText(),s.width+e.width>>0>2*g&&(this.sessionVariables.labelAngle=-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((k-g*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),k),p=0!=this.labelAngle?
|
|
650
|
-
(
|
|
650
|
+
(q-(m+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):g,this.sessionVariables.labelMaxHeight=this.labelWrap?(q-p*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)):1.5*this.labelFontSize,l(this.options.labelWrap))?l(this.options.labelWrap)&&(this.labelWrap&&!l(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?
|
|
651
651
|
this.options.labelMaxWidth:p,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelMaxHeight=Math.max(k,0.9*n),this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:p):(l(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?
|
|
652
652
|
this.options.labelMaxWidth:p,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=h)}this.sessionVariables.labelMaxHeight=Math.max(this.sessionVariables.labelMaxHeight,1.5*this.labelFontSize);for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,
|
|
653
653
|
a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=l(this.options.labelMaxWidth)?l(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=g:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=l(this.options.labelFontSize)?l(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:
|
|
@@ -664,11 +664,11 @@ this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWr
|
|
|
664
664
|
g):(this.sessionVariables.labelMaxHeight=h,l(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap)}for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=
|
|
665
665
|
this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(l(this.chart.stockChart)||this.chart.isNavigator||(this.sessionVariables.labelMaxHeight=h),c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=l(this.options.labelMaxWidth)?l(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=g:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=l(this.options.labelFontSize)?
|
|
666
666
|
l(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:this.options.labelFontSize,a.angle=this.labelAngle=l(this.options.labelAngle)?l(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=l(this.options.labelWrap)?l(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:
|
|
667
|
-
this.options.labelWrap,a.maxHeight=l(this.sessionVariables.labelMaxHeight)?this.sessionVariables.labelMaxHeight=h:this.sessionVariables.labelMaxHeight,a.measureText();for(c=0;c<this.stripLines.length;c++){var h=this.stripLines[c],
|
|
668
|
-
l(h.options.labelFontWeight)?this.labelFontWeight:h.labelFontWeight;h.labelFontStyle="outside"===h.labelPlacement&&l(h.options.labelFontStyle)?this.labelFontStyle:h.labelFontStyle;if("outside"===h.labelPlacement){e=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)l(h.options.labelWrap)&&!l(this.sessionVariables.stripLineLabelMaxHeight)?
|
|
669
|
-
0:1.5*h.labelFontSize+("object"===typeof h.labelPadding?(h.labelPadding.top||0)+(h.labelPadding.bottom||0):2*h.labelPadding);if("left"===this._position||"right"===this._position)l(h.options.labelWrap)&&!l(this.sessionVariables.stripLineLabelMaxHeight)?
|
|
670
|
-
l(h.labelBackgroundColor)&&(h.labelBackgroundColor="#EEEEEE")}else e="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,
|
|
671
|
-
t?"transparent":null:h.labelBackgroundColor="#EEEEEE");a=new la(this.ctx,{x:0,y:0,backgroundColor:h.labelBackgroundColor,borderColor:h.labelBorderColor,borderThickness:h.labelBorderThickness,cornerRadius:h.labelCornerRadius,maxWidth:h.options.labelMaxWidth?h.options.labelMaxWidth:e,maxHeight:
|
|
667
|
+
this.options.labelWrap,a.maxHeight=l(this.sessionVariables.labelMaxHeight)?this.sessionVariables.labelMaxHeight=h:this.sessionVariables.labelMaxHeight,a.measureText();for(c=0;c<this.stripLines.length;c++){var h=this.stripLines[c],w;h.labelFontSize="outside"===h.labelPlacement&&l(h.options.labelFontSize)?this.labelFontSize:h.labelFontSize;h.labelFontFamily="outside"===h.labelPlacement&&l(h.options.labelFontFamily)?this.labelFontFamily:h.labelFontFamily;h.labelFontWeight="outside"===h.labelPlacement&&
|
|
668
|
+
l(h.options.labelFontWeight)?this.labelFontWeight:h.labelFontWeight;h.labelFontStyle="outside"===h.labelPlacement&&l(h.options.labelFontStyle)?this.labelFontStyle:h.labelFontStyle;if("outside"===h.labelPlacement){e=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)l(h.options.labelWrap)&&!l(this.sessionVariables.stripLineLabelMaxHeight)?w=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=w=h.labelWrap?0.8*this.chart.height>>
|
|
669
|
+
0:1.5*h.labelFontSize+("object"===typeof h.labelPadding?(h.labelPadding.top||0)+(h.labelPadding.bottom||0):2*h.labelPadding);if("left"===this._position||"right"===this._position)l(h.options.labelWrap)&&!l(this.sessionVariables.stripLineLabelMaxHeight)?w=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=w=h.labelWrap?0.8*this.chart.width>>0:1.5*h.labelFontSize+("object"===typeof h.labelPadding?(h.labelPadding.top||0)+(h.labelPadding.bottom||0):2*h.labelPadding);
|
|
670
|
+
l(h.labelBackgroundColor)&&(h.labelBackgroundColor="#EEEEEE")}else e="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,w=l(h.options.labelWrap)||h.labelWrap?"bottom"===this._position||"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*h.labelFontSize+("object"===typeof h.labelPadding?(h.labelPadding.top||0)+(h.labelPadding.bottom||0):2*h.labelPadding),l(h.labelBackgroundColor)&&(l(h.startValue)&&0!==h.startValue?h.labelBackgroundColor=
|
|
671
|
+
t?"transparent":null:h.labelBackgroundColor="#EEEEEE");a=new la(this.ctx,{x:0,y:0,backgroundColor:h.labelBackgroundColor,borderColor:h.labelBorderColor,borderThickness:h.labelBorderThickness,cornerRadius:h.labelCornerRadius,maxWidth:h.options.labelMaxWidth?h.options.labelMaxWidth:e,maxHeight:w,angle:this.labelAngle,text:h.labelFormatter?h.labelFormatter({chart:this.chart,axis:this,stripLine:h.options}):h.label,textAlign:h.labelTextAlign,fontSize:h.labelFontSize,fontFamily:h.labelFontFamily,fontWeight:h.labelFontWeight,
|
|
672
672
|
fontColor:h.labelFontColor||h.color,fontStyle:h.labelFontStyle,textBaseline:"middle",padding:h.labelPadding});this._stripLineLabels.push({position:h.value,textBlock:a,effectiveHeight:null,stripLine:h})}};z.prototype.createLabelsAndCalculateWidth=function(){var a=0,e=0;this._labels=[];this._stripLineLabels=[];var c=0,b=[],d=this.chart.isNavigator?0:5;this.labelEffectiveWidth=l(this.labelEffectiveWidth)?0:this.labelEffectiveWidth;if("left"===this._position||"right"===this._position){this.createLabels();
|
|
673
673
|
for(e=0;e<this._labels.length;e++)if(!(this._labels[e].position<this.viewportMinimum||this._labels[e].position>this.viewportMaximum)){var g=this._labels[e].textBlock,g=g.measureText(),h=0,h=0===this.labelAngle?g.width:g.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+g.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<=h&&(this.labelEffectiveWidth=a=h);this._labels[e].effectiveWidth=h}for(e=0;e<this._stripLineLabels.length;e++)"outside"===this._stripLineLabels[e].stripLine.labelPlacement&&
|
|
674
674
|
(this._stripLineLabels[e].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[e].stripLine.value<=this.viewportMaximum)&&(g=this._stripLineLabels[e].textBlock,g=g.measureText(),h=0===this.labelAngle?g.width:g.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+g.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),c=Math.max(c,this._stripLineLabels[e].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<b.length?Math.max.apply(null,b):0,a+=Math.max(h,0<b.length?Math.max.apply(null,
|
|
@@ -676,57 +676,57 @@ b):h)),a<=h&&(a=h),this.stripLineLabelEffectiveWidth=this._stripLineLabels[e].ef
|
|
|
676
676
|
this._position&&"outside"===this.labelPlacement?2:5;this.labelEffectiveHeight=l(this.labelEffectiveHeight)?0:this.labelEffectiveHeight;var g=[];if("bottom"===this._position||"top"===this._position){this.createLabels();for(b=0;b<this._labels.length;b++)if(!(this._labels[b].position<this.viewportMinimum||this._labels[b].position>this.viewportMaximum)){c=this._labels[b].textBlock;c=c.measureText();var h=0,h=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+c.height*
|
|
677
677
|
Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<=h&&(this.labelEffectiveHeight=a=h);this._labels[b].effectiveHeight=h}for(b=0;b<this._stripLineLabels.length;b++)"outside"===this._stripLineLabels[b].stripLine.labelPlacement&&(this._stripLineLabels[b].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[b].stripLine.value<=this.viewportMaximum)&&(c=this._stripLineLabels[b].textBlock,c=c.measureText(),h=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+c.height*
|
|
678
678
|
Math.cos(Math.PI/180*Math.abs(this.labelAngle)),e=Math.max(e,this._stripLineLabels[b].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<g.length?Math.max.apply(null,g):0,a+=Math.max(h,0<g.length?Math.max.apply(null,g):h)),a<=h&&(a=h),this.stripLineLabelEffectiveHeight=this._stripLineLabels[b].effectiveHeight=h,g.push(h));"inside"===this.labelPlacement&&(a+=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?e+this.tickLength:Math.max(e,this.tickLength))+
|
|
679
|
-
d};z.setLayout=function(a,e,c,b,d,g){var h,k,n,m,
|
|
680
|
-
|
|
681
|
-
fontColor:
|
|
682
|
-
|
|
683
|
-
0,$=L=d=0,aa=0,V=0,Y=0,ba=h=0;if(c&&0<c.length)for(
|
|
684
|
-
h+$-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(
|
|
685
|
-
(a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(n-h),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:a[f].lineCoordinates.width),
|
|
686
|
-
Math.abs(n-h),e[f].title&&(e[f]._titleTextBlock.maxWidth=0<e[f].titleMaxWidth&&e[f].titleMaxWidth<e[f].lineCoordinates.width?e[f].titleMaxWidth:e[f].lineCoordinates.width),v.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateHeight():0)),Y+=v[f],L+=e[f]&&!
|
|
687
|
-
b[0].labelEffectiveWidth+(
|
|
688
|
-
k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle));u=
|
|
689
|
-
(k+=
|
|
690
|
-
0>a[f].labelAngle&&0<
|
|
691
|
-
1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||
|
|
692
|
-
2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.y1+=a[f].tickLength,a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2)}X+=
|
|
693
|
-
$=!0),a[0].lineCoordinates.width=a[0].lineCoordinates.x2-a[0].lineCoordinates.x1)}if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].lineCoordinates.x1=h,e[f].lineCoordinates.x2=n,e[f].lineCoordinates.width=Math.abs(n-h),e[f]._labels&&1<e[f]._labels.length&&(k=e[f]._labels[1],
|
|
694
|
-
180*Math.abs(k.textBlock.angle)),u=
|
|
695
|
-
0:5),m=e[f].lineCoordinates.y1=k+Y+L-U,e[f].lineCoordinates.y2=k,e[f].bounds={x1:h,y1:k+(Y+L-v[f]-U),x2:n,y2:m,width:n-h},e[f].bounds.height=e[f].bounds.y2-e[f].bounds.y1,"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.y1=e[0].bounds.y2-U-(e[f].labelEffectiveHeight||0)-5),"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.y1-=e[f].tickLength),U+=v[f]+e[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)$=
|
|
696
|
-
(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(
|
|
697
|
-
1].stripLineLabelEffectiveHeight||
|
|
698
|
-
k)},c[f].bounds={x1:h-(
|
|
699
|
-
c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),T+=
|
|
700
|
-
Y+L-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(
|
|
701
|
-
a[0].tickPlacement?a[0].tickLength:0):0))-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||
|
|
702
|
-
b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?b[f].titleMaxWidth:b[f].lineCoordinates.height),W+=
|
|
703
|
-
a[f]._labels&&1<a[f]._labels.length&&(
|
|
704
|
-
0)+a[f].lineCoordinates.x1:(0<h?h*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateValueToPixelConversionParameters(),e[f].calculateBreaksSizeInValues(),e[f]._labels&&1<e[f]._labels.length&&(
|
|
705
|
-
h=e[f]._labels[e[f]._labels.length-("dateTime"===e[f].valueType?2:1)].position,h=e[f].getApparentDifference(e[f].viewportMinimum,h),
|
|
706
|
-
t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)
|
|
707
|
-
e[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels()}else{p=[];
|
|
708
|
-
a[0].createLabelsAndCalculateWidth():0));Q.push(
|
|
709
|
-
"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||
|
|
710
|
-
Math.max(h,
|
|
711
|
-
(
|
|
712
|
-
|
|
713
|
-
c[f].createLabelsAndCalculateHeight():0)),T+=p[f]+c[f].margin,$+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));u.push(p);if(b&&0<b.length)for(
|
|
714
|
-
180*Math.abs(k.textBlock.angle))+(k.textBlock.height-
|
|
715
|
-
|
|
716
|
-
f;f--)k=Math.round(g.y2)-("inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveHeight||
|
|
717
|
-
c[f].labelEffectiveHeight+(
|
|
718
|
-
Y+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(k=Math.round(g.y1)+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||
|
|
719
|
-
5,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.y1-=b[f].tickLength,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:h,y1:k+(b[f].margin+U),x2:n,y2:m,width:n-h},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),U+=
|
|
720
|
-
if(a&&0<a.length)for(f=0;f<a.length;f++){$=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1+d);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;n=Math.round(g.x1+W+d);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>
|
|
721
|
-
c.length;
|
|
722
|
-
{x1:n-S,y1:k,x2:n-S,y2:m,height:Math.abs(m-k)};"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-a[f].labelEffectiveWidth-5,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);a[f].bounds={x1:n-(
|
|
723
|
-
0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();S+=
|
|
724
|
-
V-L);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>
|
|
725
|
-
b[
|
|
726
|
-
e[f].tickLength,e[f].lineCoordinates.x2=e[f].lineCoordinates.x1+e[f].lineThickness/2);e[f].bounds={x1:h+
|
|
727
|
-
|
|
728
|
-
0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateStripLinesThicknessInValues(),e[f].calculateBreaksInPixels()}for(f=0;f<
|
|
729
|
-
|
|
679
|
+
d};z.setLayout=function(a,e,c,b,d,g){var h,k,n,m,q=a[0]?a[0].chart:e[0].chart,p=q.isNavigator?0:10,r=q._axes;if(a&&0<a.length)for(var f=0;f<a.length;f++)a[f]&&a[f].calculateAxisParameters();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateAxisParameters();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateAxisParameters();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateAxisParameters();for(f=0;f<r.length;f++)if(r[f]&&r[f].scaleBreaks&&r[f].scaleBreaks._appliedBreaks.length)for(var s=
|
|
680
|
+
r[f].scaleBreaks._appliedBreaks,t=0;t<s.length&&!(s[t].startValue>r[f].viewportMaximum);t++)s[t].endValue<r[f].viewportMinimum||(l(r[f].scaleBreaks.firstBreakIndex)&&(r[f].scaleBreaks.firstBreakIndex=t),s[t].startValue>=r[f].viewPortMinimum&&(r[f].scaleBreaks.lastBreakIndex=t));for(var w=t=0,u=0,x=0,v=0,z=0,y=0,B,D,F=k=0,K,O,N,s=K=O=N=!1,f=0;f<r.length;f++)r[f]&&r[f].title&&(r[f]._titleTextBlock=new la(r[f].ctx,{text:r[f].title,fontSize:r[f].titleFontSize,fontFamily:r[f].titleFontFamily,fontWeight:r[f].titleFontWeight,
|
|
681
|
+
fontColor:r[f].titleFontColor,fontStyle:r[f].titleFontStyle,borderColor:r[f].titleBorderColor,borderThickness:r[f].titleBorderThickness,backgroundColor:r[f].titleBackgroundColor,cornerRadius:r[f].titleCornerRadius,textBaseline:"middle",textAlign:r[f].titleTextAlign,padding:r[f].titlePadding}));for(f=0;f<r.length;f++)if(r[f].title){var L=1.5*r[f].titleFontSize+("object"===typeof r[f].titlePadding?(r[f].titlePadding.top||0)+(r[f].titlePadding.bottom||0):2*r[f].titlePadding);r[f]._titleTextBlock.maxWidth=
|
|
682
|
+
r[f].titleMaxWidth||g.height;r[f]._titleTextBlock.maxHeight=r[f].titleWrap?0.8*g.width:Math.min(L,0.8*g.width);switch(r[f]._position){case "left":r[f]._titleTextBlock.angle=-90;break;case "right":r[f]._titleTextBlock.angle=90;break;default:r[f]._titleTextBlock.maxWidth=r[f].titleMaxWidth||g.width,r[f]._titleTextBlock.maxHeight=r[f].titleWrap?0.8*g.height:Math.min(L,0.8*g.height),r[f]._titleTextBlock.angle=0}}if("normal"===d){for(var x=[],v=[],z=[],y=[],Q=[],R=[],S=[],H=[];4>t;){var X=0,U=0,T=0,W=
|
|
683
|
+
0,$=L=d=0,aa=0,V=0,Y=0,ba=h=0;if(c&&0<c.length)for(z=[],f=h=0;f<c.length;f++)z.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateWidth():0)),h+=z[f],$+=c[f]&&!q.isNavigator?c[f].margin:0;else z.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));S.push(z);if(b&&0<b.length)for(y=[],f=ba=0;f<b.length;f++)y.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateWidth():0)),ba+=y[f],aa+=b[f]?b[f].margin:0;else y.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));H.push(y);h=Math.round(g.x1+
|
|
684
|
+
h+$-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0))+(!c.length||"inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveWidth||q.isNavigator?0:5);n=Math.round(Math.min(g.x2-ba-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0),q.width-p));if(a&&0<a.length)for(x=[],f=V=0;f<a.length;f++)a[f]&&
|
|
685
|
+
(a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(n-h),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:a[f].lineCoordinates.width),x.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateHeight():0)),V+=x[f],d+=a[f]&&!q.isNavigator?a[f].margin:0;else x.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(x);if(e&&0<e.length)for(v=[],f=Y=0;f<e.length;f++)e[f]&&(e[f].lineCoordinates={}),e[f].lineCoordinates.width=
|
|
686
|
+
Math.abs(n-h),e[f].title&&(e[f]._titleTextBlock.maxWidth=0<e[f].titleMaxWidth&&e[f].titleMaxWidth<e[f].lineCoordinates.width?e[f].titleMaxWidth:e[f].lineCoordinates.width),v.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateHeight():0)),Y+=v[f],L+=e[f]&&!q.isNavigator?e[f].margin:0;else v.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));R.push(v);if(a&&0<a.length){for(f=0;f<a.length;f++){if(a[f]){a[f].lineCoordinates.x1=h;n=Math.round(Math.min(g.x2-ba-aa+(b[0]?("inside"===b[0].labelPlacement?
|
|
687
|
+
b[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)-(!b.length||"inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveWidth||q.isNavigator?0:5),q.width-p));if(a[f]._labels&&1<a[f]._labels.length){var J=k=0;k=a[f]._labels[1];J="dateTime"===a[f].valueType?a[f]._labels[a[f]._labels.length-2]:a[f]._labels[a[f]._labels.length-1];w=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-
|
|
688
|
+
k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle));u=J.textBlock.width*Math.cos(Math.PI/180*Math.abs(J.textBlock.angle))+J.textBlock.height*Math.sin(Math.PI/180*Math.abs(J.textBlock.angle))}!a[f]||(!a[f].labelAutoFit||l(B)||l(D)||q.isNavigator||q.stockChart)||(k=0,0<a[f].labelAngle?(m=u-(J.textBlock.height-J.textBlock._lineHeight/2)*Math.sin(Math.PI/180*J.textBlock.angle),D+m>n&&(a[f].convertPixelToValue(D)>=a[f].viewportMinimum&&a[f].convertPixelToValue(D)<=a[f].viewportMaximum)&&
|
|
689
|
+
(k+=D+m-n-ba)):0>a[f].labelAngle?B-w<h&&B-w<a[f].viewportMinimum&&(F=h-($+a[f].tickLength+z+B-w+a[f].labelFontSize/2)):0===a[f].labelAngle&&(D+u>n&&(a[f].convertPixelToValue(D)>=a[f].viewportMinimum&&a[f].convertPixelToValue(D)<=a[f].viewportMaximum)&&(k=D+u/2-n-ba),B-w<h&&B-w<a[f].viewportMinimum&&(F=h-$-a[f].tickLength-z-B+w/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<k?n-=k:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&
|
|
690
|
+
0>a[f].labelAngle&&0<F?h+=F:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0===a[f].labelAngle&&(0<F&&(h+=F),0<k&&(n-=k)));q.panEnabled?V=l(q.sessionVariables.axisX.height)||q.stockChart?q.sessionVariables.axisX.height=V:q.sessionVariables.axisX.height:q.sessionVariables.axisX.height=V;k=Math.round(g.y2-V-d+X)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5);m=Math.round(g.y2)-("inside"!==a[a.length-
|
|
691
|
+
1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5);a[f].lineCoordinates.x2=n;a[f].lineCoordinates.width=n-h;a[f].lineCoordinates.y1=k;a[f].lineCoordinates.y2=k;a[f].bounds={x1:h,y1:k,x2:n,y2:m-(V+d-x[f]-X),width:n-h};a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1;"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.y1=a[0].bounds.y1+X+(a[f].labelEffectiveHeight||0)+(q.isNavigator?0:2),a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/
|
|
692
|
+
2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.y1+=a[f].tickLength,a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2)}X+=x[f]+a[f].margin}$=0===a[0].dataSeries.length;if(!$)for(f=0;f<a[0].dataSeries.length;f++){if(a[0].dataSeries[f].dataPoints){$=!1;break}$=!0}if($)for($=!1,f=1;f<a.length;f++)0!==a[f].dataSeries.length&&($?a[f].lineCoordinates.x2>a[0].lineCoordinates.x2&&(a[0].lineCoordinates.x2=a[f].lineCoordinates.x2):(a[0].lineCoordinates.x2=a[f].lineCoordinates.x2,
|
|
693
|
+
$=!0),a[0].lineCoordinates.width=a[0].lineCoordinates.x2-a[0].lineCoordinates.x1)}if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].lineCoordinates.x1=h,e[f].lineCoordinates.x2=n,e[f].lineCoordinates.width=Math.abs(n-h),e[f]._labels&&1<e[f]._labels.length&&(k=e[f]._labels[1],J="dateTime"===e[f].valueType?e[f]._labels[e[f]._labels.length-2]:e[f]._labels[e[f]._labels.length-1],w=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-J.textBlock.fontSize/2)*Math.sin(Math.PI/
|
|
694
|
+
180*Math.abs(k.textBlock.angle)),u=J.textBlock.width*Math.cos(Math.PI/180*Math.abs(J.textBlock.angle))+(J.textBlock.height-J.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(J.textBlock.angle))),q.panEnabled?Y=l(q.sessionVariables.axisX2.height)||q.stockChart?q.sessionVariables.axisX2.height=Y:q.sessionVariables.axisX2.height:q.sessionVariables.axisX2.height=Y,k=Math.round(g.y1)+("inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||q.isNavigator?
|
|
695
|
+
0:5),m=e[f].lineCoordinates.y1=k+Y+L-U,e[f].lineCoordinates.y2=k,e[f].bounds={x1:h,y1:k+(Y+L-v[f]-U),x2:n,y2:m,width:n-h},e[f].bounds.height=e[f].bounds.y2-e[f].bounds.y1,"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.y1=e[0].bounds.y2-U-(e[f].labelEffectiveHeight||0)-5),"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.y1-=e[f].tickLength),U+=v[f]+e[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)$=q.isNavigator?0:10,c[f]&&(h=n=Math.round((a[0]?a[0].lineCoordinates.x1:e[0].lineCoordinates.x1)+
|
|
696
|
+
(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0)),$=Math.max(c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock._lineHeight/2:p,p),k=Math.round(Math.max(g.y1+Y+L-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+5:0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),0<e.length?0:$))+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-
|
|
697
|
+
1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),$=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,m=Math.round(g.y2-V+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(q.isNavigator?0:2):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)-d-$)-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),c[f].lineCoordinates={x1:h-T,y1:k,x2:n-T,y2:m,height:Math.abs(m-
|
|
698
|
+
k)},c[f].bounds={x1:h-(z[f]+T),y1:k,x2:n-T,y2:m,height:m-k},c[f].bounds.width=c[f].bounds.x2-c[f].bounds.x1,"inside"===c[f].labelPlacement&&(c[f].lineCoordinates.x1=Math.round(c[0].bounds.x1+z[0]-T-(c[f].labelEffectiveWidth||0)-5),c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&(c[f].lineCoordinates.x1-=c[f].tickLength,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&
|
|
699
|
+
c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),T+=z[f]+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&(h=n=Math.round((a[0]?a[0].lineCoordinates.x2:e[0].lineCoordinates.x2)-(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)),$=Math.max(b[f]._labels&&0<b[f]._labels.length?b[f]._labels[b[f]._labels.length-1].textBlock.height/2:0,p),k=Math.round(Math.max(g.y1+
|
|
700
|
+
Y+L-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(q.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),0<e.length?0:$)),$=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,m=Math.round(g.y2-(V+d+$)+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(q.isNavigator?0:2):0)+("inside"===
|
|
701
|
+
a[0].tickPlacement?a[0].tickLength:0):0))-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),b[f].lineCoordinates={x1:h+W,y1:k,x2:h+W,y2:m,height:Math.abs(m-k)},b[f].bounds={x1:h+W,y1:k,x2:n+y[f]+W,y2:m,height:m-k},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,"inside"===b[f].labelPlacement&&(b[f].lineCoordinates.x1=Math.round(b[0].bounds.x1+W+(b[f].labelEffectiveWidth||0)+(q.isNavigator?0:5)),b[f].lineCoordinates.x2=
|
|
702
|
+
b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?b[f].titleMaxWidth:b[f].lineCoordinates.height),W+=y[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].calculateValueToPixelConversionParameters(),a[f].calculateBreaksSizeInValues(),
|
|
703
|
+
a[f]._labels&&1<a[f]._labels.length&&(B=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,h=a[f]._labels[a[f]._labels.length-("dateTime"===a[f].valueType?2:1)].position,h=a[f].getApparentDifference(a[f].viewportMinimum,h),D=a[f].logarithmic?(1<h?Math.log(h)/a[f].conversionParameters.lnLogarithmBase*Math.abs(a[f].conversionParameters.pixelPerUnit):
|
|
704
|
+
0)+a[f].lineCoordinates.x1:(0<h?h*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateValueToPixelConversionParameters(),e[f].calculateBreaksSizeInValues(),e[f]._labels&&1<e[f]._labels.length&&(B=(e[f].logarithmic?Math.log(e[f]._labels[1].position/e[f].viewportMinimum)/e[f].conversionParameters.lnLogarithmBase:e[f]._labels[1].position-e[f].viewportMinimum)*Math.abs(e[f].conversionParameters.pixelPerUnit)+e[f].lineCoordinates.x1,
|
|
705
|
+
h=e[f]._labels[e[f]._labels.length-("dateTime"===e[f].valueType?2:1)].position,h=e[f].getApparentDifference(e[f].viewportMinimum,h),D=e[f].logarithmic?(1<h?Math.log(h)/e[f].conversionParameters.lnLogarithmBase*Math.abs(e[f].conversionParameters.pixelPerUnit):0)+e[f].lineCoordinates.x1:(0<h?h*Math.abs(e[f].conversionParameters.pixelPerUnit):0)+e[f].lineCoordinates.x1);for(f=0;f<r.length;f++)"axisY"===r[f].type&&(r[f].calculateValueToPixelConversionParameters(),r[f].calculateBreaksSizeInValues());if(0<
|
|
706
|
+
t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)K=R[t-1][f]===R[t][f]?!0:!1;else K=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)O=S[t-1][f]===S[t][f]?!0:!1;else O=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)N=H[t-1][f]===H[t][f]?!0:!1;else N=!0}if(s&&K&&O&&N)break;t++}if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateStripLinesThicknessInValues(),
|
|
707
|
+
e[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels()}else{p=[];B=[];F=[];w=[];u=[];D=[];Q=[];for(R=[];4>t;){V=W=T=aa=$=L=d=H=S=U=Y=0;if(a&&0<a.length)for(F=[],f=W=0;f<a.length;f++)F.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateWidth():0)),W+=F[f],d+=a[f]&&!q.isNavigator?a[f].margin:0;else F.push(Math.ceil(a[0]?
|
|
708
|
+
a[0].createLabelsAndCalculateWidth():0));Q.push(F);if(e&&0<e.length)for(w=[],f=V=0;f<e.length;f++)w.push(Math.ceil(e[f]?e[f].createLabelsAndCalculateWidth():0)),V+=w[f],L+=e[f]?e[f].margin:0;else w.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateWidth():0));R.push(w);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},h=Math.round(g.x1+W+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))+(!a.length||
|
|
709
|
+
"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||q.isNavigator?0:5),n=Math.round(Math.min(g.x2-V-L+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)-(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveWidth||q.isNavigator?0:5),q.width-10)),c[f].labelAutoFit&&!l(x)&&(0<!a.length&&(h=0>c[f].labelAngle?
|
|
710
|
+
Math.max(h,x):0===c[f].labelAngle?Math.max(h,x/2):h),0<!e.length&&(n=0<c[f].labelAngle?n-v/2:0===c[f].labelAngle?n-v/2:n)),c[f].lineCoordinates.x1=h,c[f].lineCoordinates.x2=n,c[f].lineCoordinates.width=Math.abs(n-h),c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},h=Math.round(g.x1+W+d-(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+
|
|
711
|
+
(q.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))+(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveWidth||q.isNavigator?0:5),n=Math.round(Math.min(g.x2-V-L+(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)-(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveWidth||
|
|
712
|
+
q.isNavigator?0:5),b[f].chart.width-10)),b[f]&&b[f].labelAutoFit&&!l(z)&&(0<!a.length&&(h=0<b[f].labelAngle?Math.max(h,z):0===b[f].labelAngle?Math.max(h,z/2):h),0<!e.length&&(n-=y/2)),b[f].lineCoordinates.x1=h,b[f].lineCoordinates.x2=n,b[f].lineCoordinates.width=Math.abs(n-h),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width);if(c&&0<c.length)for(p=[],f=T=0;f<c.length;f++)p.push(Math.ceil(c[f]?
|
|
713
|
+
c[f].createLabelsAndCalculateHeight():0)),T+=p[f]+c[f].margin,$+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));u.push(p);if(b&&0<b.length)for(B=[],f=0;f<b.length;f++)B.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateHeight():0)),aa+=b[f].margin;else B.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));D.push(B);if(c&&0<c.length)for(f=0;f<c.length;f++)0<c[f]._labels.length&&(k=c[f]._labels[0],J=c[f]._labels[c[f]._labels.length-1],x=k.textBlock.width*Math.cos(Math.PI/
|
|
714
|
+
180*Math.abs(k.textBlock.angle))+(k.textBlock.height-J.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),v=J.textBlock.width*Math.cos(Math.PI/180*Math.abs(J.textBlock.angle))+(J.textBlock.height-J.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(J.textBlock.angle)));if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&0<b[f]._labels.length&&(k=b[f]._labels[0],J=b[f]._labels[b[f]._labels.length-1],z=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-
|
|
715
|
+
J.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),y=J.textBlock.width*Math.cos(Math.PI/180*Math.abs(J.textBlock.angle))+(J.textBlock.height-J.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(J.textBlock.angle)));if(q.panEnabled)for(f=0;f<c.length;f++)p[f]=l(q.sessionVariables.axisY[f].height)?q.sessionVariables.axisY[f].height=p[f]:q.sessionVariables.axisY[f].height;else for(f=0;f<c.length;f++)q.sessionVariables.axisY[f].height=p[f];if(c&&0<c.length)for(f=c.length-1;0<=
|
|
716
|
+
f;f--)k=Math.round(g.y2)-("inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),m=Math.round(g.y2>c[f].chart.height?c[f].chart.height:g.y2)-("inside"!==c[c.length-1].labelPlacement||c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),c[f].lineCoordinates.y1=k-(p[f]+c[f].margin+Y),c[f].lineCoordinates.y2=k-(p[f]+c[f].margin+Y),"inside"===c[f].labelPlacement&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+
|
|
717
|
+
c[f].labelEffectiveHeight+(q.isNavigator?0:2),c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&(c[f].lineCoordinates.y1+=c[f].tickLength,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:h,y1:k-(p[f]+Y+c[f].margin),x2:n,y2:m-(Y+c[f].margin),width:n-h,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),
|
|
718
|
+
Y+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(k=Math.round(g.y1)+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),m=Math.round(g.y1+(B[f]+b[f].margin+U))+("inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-1].stripLineLabelEffectiveHeight||q.isNavigator?0:5),b[f].lineCoordinates.y1=m,b[f].lineCoordinates.y2=m,"inside"===b[f].labelPlacement&&(b[f].lineCoordinates.y1=m-b[f].labelEffectiveHeight-
|
|
719
|
+
5,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&(b[f].lineCoordinates.y1-=b[f].tickLength,b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:h,y1:k+(b[f].margin+U),x2:n,y2:m,width:n-h},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),U+=B[f]+b[f].margin);
|
|
720
|
+
if(a&&0<a.length)for(f=0;f<a.length;f++){$=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;h=Math.round(g.x1+d);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;n=Math.round(g.x1+W+d);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>q.height-Math.max($,10)?q.height-Math.max($,10):g.y2-T):g.y2>q.height-Math.max($,10)?q.height-Math.max($,10):g.y2;if(c&&0<c.length)for(J=0;J<
|
|
721
|
+
c.length;J++)c[J]&&c[J].labelAutoFit&&(n=c[J].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),h=0>c[J].labelAngle||0===c[J].labelAngle?n-W:h);if(b&&0<b.length)for(J=0;J<b.length;J++)b[J]&&b[J].labelAutoFit&&(n=b[J].lineCoordinates.x1+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0),h=n-W);a[f].lineCoordinates=
|
|
722
|
+
{x1:n-S,y1:k,x2:n-S,y2:m,height:Math.abs(m-k)};"inside"===a[f].labelPlacement&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-a[f].labelEffectiveWidth-5,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);a[f].bounds={x1:n-(F[f]+S),y1:k,x2:n-S,y2:m,height:m-k};a[f].bounds.width=a[f].bounds.x2-a[f].bounds.x1;a[f].title&&(a[f]._titleTextBlock.maxWidth=
|
|
723
|
+
0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();S+=F[f]+a[f].margin}if(e&&0<e.length)for(f=0;f<e.length;f++){$=e[f]._labels&&0<e[f]._labels.length?e[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(g.x1-L);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:g.y1<Math.max($,10)?Math.max($,10):g.y1):g.y1<Math.max($,10)?Math.max($,10):g.y1;h=Math.round(g.x2-
|
|
724
|
+
V-L);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:g.y2-T>q.height-Math.max($,10)?q.height-Math.max($,10):g.y2-T):g.y2>q.height-Math.max($,10)?q.height-Math.max($,10):g.y2;if(c&&0<c.length)for(J=0;J<c.length;J++)c[J]&&c[J].labelAutoFit&&(h=c[J].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),n=0>c[J].labelAngle||0===c[J].labelAngle?h+V:h);if(b&&0<b.length)for(J=0;J<b.length;J++)b[J]&&
|
|
725
|
+
b[J].labelAutoFit&&(h=b[J].lineCoordinates.x2-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveWidth+(q.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),n=h+V);e[f].lineCoordinates={x1:h+H,y1:k,x2:h+H,y2:m,height:Math.abs(m-k)};"inside"===e[f].labelPlacement&&(e[f].lineCoordinates.x1=e[f].lineCoordinates.x1+e[f].labelEffectiveWidth+(q.isNavigator?0:5),e[f].lineCoordinates.x2=e[f].lineCoordinates.x1+e[f].lineThickness/2);"inside"===e[f].tickPlacement&&(e[f].lineCoordinates.x1+=
|
|
726
|
+
e[f].tickLength,e[f].lineCoordinates.x2=e[f].lineCoordinates.x1+e[f].lineThickness/2);e[f].bounds={x1:h+H,y1:k,x2:h+w[f]+H,y2:m,height:m-k};e[f].bounds.width=e[f].bounds.x2-e[f].bounds.x1;e[f].title&&(e[f]._titleTextBlock.maxWidth=0<e[f].titleMaxWidth&&e[f].titleMaxWidth<e[f].lineCoordinates.height?e[f].titleMaxWidth:e[f].lineCoordinates.height);e[f].calculateValueToPixelConversionParameters();e[f].calculateBreaksSizeInValues();H+=w[f]+e[f].margin}for(f=0;f<r.length;f++)"axisY"===r[f].type&&(r[f].calculateValueToPixelConversionParameters(),
|
|
727
|
+
r[f].calculateBreaksSizeInValues());if(0<t){if(a&&0<a.length)for(f=0;f<a.length;f++)s=Q[t-1][f]===Q[t][f]?!0:!1;else s=!0;if(e&&0<e.length)for(f=0;f<e.length;f++)K=R[t-1][f]===R[t][f]?!0:!1;else K=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)O=u[t-1][f]===u[t][f]?!0:!1;else O=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)N=D[t-1][f]===D[t][f]?!0:!1;else N=!0}if(s&&K&&O&&N)break;t++}if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&
|
|
728
|
+
0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(e&&0<e.length)for(f=0;f<e.length;f++)e[f].calculateStripLinesThicknessInValues(),e[f].calculateBreaksInPixels()}for(f=0;f<r.length;f++)r[f]&&l(r[f].options.titleMaxWidth)&&(r[f].titleMaxWidth="left"===r[f]._position||"right"===r[f]._position?r[f].bounds.height:r[f].bounds.width,
|
|
729
|
+
r[f].title&&(r[f]._titleTextBlock.maxWidth=r[f].titleMaxWidth||g.height))};z.render=function(a,e,c,b,d){var g=a[0]?a[0].chart:e[0].chart,h=g.ctx,k=[];k.push.apply(k,a);k.push.apply(k,e);k.push.apply(k,c);k.push.apply(k,b);g.alignVerticalAxes&&g.alignVerticalAxes();h.save();"normal"===d&&(h.beginPath(),a&&a.length&&h.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2),e&&e.length&&h.rect(2,e[e.length-1].bounds.y1,e[0].chart.width-4,e[0].bounds.y2),h.clip());if(a&&0<a.length)for(d=0;d<
|
|
730
730
|
a.length;d++)a[d].renderLabelsTicksAndTitle();if(e&&0<e.length)for(d=0;d<e.length;d++)e[d].renderLabelsTicksAndTitle();h.restore();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderLabelsTicksAndTitle();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderLabelsTicksAndTitle();g.preparePlotArea();a=g.plotArea;h.save();h.beginPath();h.rect(a.x1,a.y1,Math.abs(a.x2-a.x1),Math.abs(a.y2-a.y1));h.clip();if(k&&0<k.length){for(d=0;d<k.length;d++)k[d].renderStripLinesOfThicknessType("value");for(d=0;d<k.length;d++)k[d].renderInterlacedColors()}h.restore();
|
|
731
731
|
h=!1;if(k&&0<k.length){for(d=0;d<k.length;d++)k[d].renderGrid(),t&&(k[d].createMask(),k[d].renderBreaksBackground());for(d=0;d<k.length;d++)k[d].renderAxisLine();for(d=0;d<k.length;d++)k[d].renderStripLinesOfThicknessType("pixel"),k[d].crosshair&&k[d].crosshair.enabled&&(h=!0,g.clearedOverlayedCanvas=k[d].type)}if(h||!h&&g.clearedOverlayedCanvas&&0<=g.clearedOverlayedCanvas.indexOf("axis"))g.resetOverlayedCanvas(),g.renderCrosshairs(null,!0)};z.prototype.calculateStripLinesThicknessInValues=function(){for(var a=
|
|
732
732
|
0;a<this.stripLines.length;a++)if(null!==this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var e=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(e,c);this.stripLines[a].value=this.convertPixelToValue((this.convertValueToPixel(e)+this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};z.prototype.calculateBreaksSizeInValues=
|
|
@@ -735,40 +735,40 @@ e[g].spacing=Wa(e[g].spacing,a,8,d?0.1*a:8,d?0:3)<<0,e[g].size=0>e[g].spacing?0:
|
|
|
735
735
|
this.conversionParameters.minimum||(l(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=e),a[e].startValue>=this.conversionParameters.minimum&&(a[e].startPixel=this.convertValueToPixel(a[e].startValue),this.scaleBreaks.lastBreakIndex=e),a[e].endValue<=this.conversionParameters.maximum&&(a[e].endPixel=this.convertValueToPixel(a[e].endValue)))}};z.prototype.renderLabelsTicksAndTitle=function(){var a=this,e=!1,c=0,b=0,d=1,g=0;0!==this.labelAngle&&360!==this.labelAngle&&(d=1.2);if("undefined"===
|
|
736
736
|
typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],d=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,h,k=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>this.viewportMaximum||!(m===this._labels.length-1||h<Math.log(k/p.position)*l/d)||(c.push(p),k=p.position,h=
|
|
737
737
|
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||(h=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+=h);c>this.lineCoordinates.width*d&&this.labelAutoFit&&(e=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&
|
|
738
|
-
!this.equidistantInterval&&this.labelAutoFit){for(var c=[],
|
|
739
|
-
0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(
|
|
740
|
-
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(
|
|
741
|
-
|
|
742
|
-
Math.cos(Math.PI/180*this.labelAngle):
|
|
743
|
-
180*this.labelAngle)-(p.textBlock.height-p.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle):
|
|
744
|
-
a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(
|
|
745
|
-
2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,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||(
|
|
746
|
-
this.ctx.lineTo(b,
|
|
747
|
-
Math.sin(Math.PI/180*this.labelAngle),
|
|
748
|
-
Math.sin(Math.PI/180*this.labelAngle),
|
|
749
|
-
function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(
|
|
750
|
-
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(
|
|
751
|
-
this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(
|
|
752
|
-
0>this.labelAngle?(p.textBlock.y=("inside"===this.labelPlacement?
|
|
753
|
-
this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y=("inside"===this.labelPlacement?
|
|
754
|
-
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)&&(
|
|
755
|
-
0,b);a.ctx.lineTo(
|
|
756
|
-
p.position>this.viewportMaximum||(
|
|
757
|
-
p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:
|
|
758
|
-
("inside"===this.tickPlacement?this.tickLength:0)-5:
|
|
759
|
-
("inside"===this.tickPlacement?this.tickLength:0)-5:
|
|
760
|
-
a.tickColor;var b=1===a.ctx.lineWidth%2?(
|
|
738
|
+
!this.equidistantInterval&&this.labelAutoFit){for(var c=[],q,k=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||q<Math.log(k/p.position)*l)||(c.push(p),k=p.position,q=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(m=
|
|
739
|
+
0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(q=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+=q);b>this.lineCoordinates.height*d&&this.labelAutoFit&&(e=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var m=0,p,n;if("bottom"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],
|
|
740
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(n=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?(n.x<<0)+0.5:n.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,n.y<<0),this.ctx.lineTo(b,n.y+this.tickLength<<0),this.ctx.stroke()),e&&0!==g++%2&&this.labelAutoFit||(0===p.textBlock.angle?(n.x-=p.textBlock.width/2,n.y="inside"===this.labelPlacement?
|
|
741
|
+
n.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock._lineHeight/2+2):n.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock._lineHeight/2+5):0>this.labelAngle?(n.x=n.x-("inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),n.y="inside"===this.labelPlacement?n.y-("inside"===this.tickPlacement?this.tickLength:0)-2-(p.textBlock.height-p.textBlock._lineHeight/2)*
|
|
742
|
+
Math.cos(Math.PI/180*this.labelAngle):n.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-p.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle))):(n.x=n.x-("inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)+p.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),n.y="inside"===this.labelPlacement?n.y-("inside"===this.tickPlacement?this.tickLength:0)-2-p.textBlock.width*Math.sin(Math.PI/
|
|
743
|
+
180*this.labelAngle)-(p.textBlock.height-p.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle):n.y+("inside"===this.tickPlacement?0:this.tickLength)+5+Math.abs(p.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=n.x,p.textBlock.y=n.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)&&(n=a.getPixelCoordinatesOnAxis(p.position),
|
|
744
|
+
a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(n.x<<0)+0.5:n.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,n.y<<0);a.ctx.lineTo(b,n.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/
|
|
745
|
+
2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,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||(n=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?(n.x<<0)+0.5:n.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,n.y<<0),
|
|
746
|
+
this.ctx.lineTo(b,n.y-this.tickLength<<0),this.ctx.stroke()),e&&0!==g++%2&&this.labelAutoFit||(0===p.textBlock.angle?(n.x-=p.textBlock.width/2,n.y="inside"===this.labelPlacement?n.y+p.textBlock._lineHeight/2+("inside"===this.tickPlacement?this.tickLength:0)+5:n.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock._lineHeight/2)-2):0>this.labelAngle?(n.x=n.x-("inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)+p.textBlock.topPadding*
|
|
747
|
+
Math.sin(Math.PI/180*this.labelAngle),n.y="inside"===this.labelPlacement?n.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+p.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle):n.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle)):(n.x=n.x-("inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.topPadding*
|
|
748
|
+
Math.sin(Math.PI/180*this.labelAngle),n.y="inside"===this.labelPlacement?n.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock._lineHeight/2*Math.cos(Math.PI/180*this.labelAngle):n.y-("inside"===this.tickPlacement?0:this.tickLength)-2-((p.textBlock.height-p.textBlock._lineHeight/2)*Math.cos(Math.PI/180*this.labelAngle)+p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),p.textBlock.x=n.x,p.textBlock.y=n.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",
|
|
749
|
+
function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(n=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(n.x<<0)+0.5:n.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,n.y<<0);a.ctx.lineTo(b,n.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
|
|
750
|
+
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(n=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,
|
|
751
|
+
this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(n.y<<0)+0.5:n.y<<0,this.ctx.beginPath(),this.ctx.moveTo(n.x<<0,b),this.ctx.lineTo(n.x-this.tickLength<<0,b),this.ctx.stroke()),e&&0!==g++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=n.y-p.textBlock.topPadding,p.textBlock.x="inside"===this.labelPlacement?n.x+("inside"===this.tickPlacement?this.tickLength:0)+5:n.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):
|
|
752
|
+
0>this.labelAngle?(p.textBlock.y=("inside"===this.labelPlacement?n.y:n.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))-p.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?n.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:n.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"===
|
|
753
|
+
this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y=("inside"===this.labelPlacement?n.y:n.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))-p.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?n.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:n.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*
|
|
754
|
+
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)&&(n=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(n.y<<0)+0.5:n.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(n.x<<
|
|
755
|
+
0,b);a.ctx.lineTo(n.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||
|
|
756
|
+
p.position>this.viewportMaximum||(n=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?(n.y<<0)+0.5:n.y<<0,this.ctx.beginPath(),this.ctx.moveTo(n.x<<0,b),this.ctx.lineTo(n.x+this.tickLength<<0,b),this.ctx.stroke()),e&&0!==g++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=n.y-p.textBlock.topPadding,p.textBlock.x="inside"===this.labelPlacement?n.x-
|
|
757
|
+
p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:n.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y=("inside"===this.labelPlacement?n.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):n.y)-p.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?n.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)-
|
|
758
|
+
("inside"===this.tickPlacement?this.tickLength:0)-5:n.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?n.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):n.y)-p.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?n.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-
|
|
759
|
+
("inside"===this.tickPlacement?this.tickLength:0)-5:n.x+(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)&&(n=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
|
|
760
|
+
a.tickColor;var b=1===a.ctx.lineWidth%2?(n.y<<0)+0.5:n.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(n.x<<0,b);a.ctx.lineTo(n.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))}g=0;
|
|
761
761
|
if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",function(){for(m=0;m<a._labels.length;m++)p=a._labels[m],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||e&&0!==g++%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||e&&0!==g++%2&&this.labelAutoFit)||p.textBlock.render(!0)};z.prototype.renderInterlacedColors=
|
|
762
762
|
function(){var a=this.chart.plotArea.ctx,e,c,b=this.chart.plotArea,d=0;e=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,d=0;d<this._labels.length;d++)e?(e=this.getPixelCoordinatesOnAxis(this._labels[d].position),c=d+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[d+1].position),a.fillRect(Math.min(c.x,e.x),b.y1,Math.abs(c.x-e.x),Math.abs(b.y1-b.y2)),e=!1):
|
|
763
763
|
e=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,d=0;d<this._labels.length;d++)e?(c=this.getPixelCoordinatesOnAxis(this._labels[d].position),e=d+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[d+1].position),a.fillRect(b.x1,Math.min(c.y,e.y),Math.abs(b.x1-b.x2),Math.abs(e.y-c.y)),e=!1):e=!0;a.beginPath()};z.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&
|
|
764
|
-
0<this.stripLines.length&&a){var e=this,c,b,d=0,g=0,h=!1;b=!1;for(var k=[],n=[],m=!1,
|
|
765
|
-
this._stripLineLabels.length;d++)if(p=this.stripLines[d],c=this._stripLineLabels[d],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){p&&(this.ctx.strokeStyle=p.tickColor?p.tickColor:p.color,this.ctx.lineWidth=p.tickThickness=l(p.tickThickness)?"pixel"===p._thicknessType?p.thickness:this.thickness:p.tickThickness,l(p.opacity)||"pixel"!==p._thicknessType||(
|
|
766
|
-
p.ctx.globalAlpha=p.opacity),l(p.opacity)&&(p.opacity=p.ctx.globalAlpha));if("bottom"===this._position){var
|
|
767
|
-
b.y+=p.tickLength+5+(0>this.labelAngle?Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(
|
|
768
|
-
c.textBlock.height-c.textBlock.fontSize/2):(b.x-=(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)-c.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),b.y-=p.tickLength+2+(0<this.labelAngle?(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)))):"left"===this._position?(
|
|
769
|
-
(b.y<<0)+0.5:b.y<<0,0<p.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,
|
|
770
|
-
2*Math.sin(Math.PI/180*this.labelAngle):c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)))):"right"===this._position&&(
|
|
771
|
-
this.labelAngle),b.x=p.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle))));
|
|
764
|
+
0<this.stripLines.length&&a){var e=this,c,b,d=0,g=0,h=!1;b=!1;for(var k=[],n=[],m=!1,q,d=0;d<this.stripLines.length;d++){var p=this.stripLines[d];p._thicknessType===a&&("pixel"===a&&(p.value<this.viewportMinimum||p.value>this.viewportMaximum||l(p.value)||isNaN(this.range))||"value"===a&&(p.startValue<=this.viewportMinimum&&p.endValue<=this.viewportMinimum||p.startValue>=this.viewportMaximum&&p.endValue>=this.viewportMaximum||l(p.startValue)||l(p.endValue)||isNaN(this.range))||k.push(p))}for(d=0;d<
|
|
765
|
+
this._stripLineLabels.length;d++)if(p=this.stripLines[d],c=this._stripLineLabels[d],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){p&&(this.ctx.strokeStyle=p.tickColor?p.tickColor:p.color,this.ctx.lineWidth=p.tickThickness=l(p.tickThickness)?"pixel"===p._thicknessType?p.thickness:this.thickness:p.tickThickness,l(p.opacity)||"pixel"!==p._thicknessType||(q=p.ctx.globalAlpha,
|
|
766
|
+
p.ctx.globalAlpha=p.opacity),l(p.opacity)&&(p.opacity=p.ctx.globalAlpha));if("bottom"===this._position){var r=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;0<p.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(r,b.y<<0),this.ctx.lineTo(r,b.y+p.tickLength<<0),this.ctx.stroke());0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y+=p.tickLength+c.textBlock.fontSize/2+5):(b.x-=(0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)-c.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),
|
|
767
|
+
b.y+=p.tickLength+5+(0>this.labelAngle?Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle)):Math.abs(c.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))))}else"top"===this._position?(r=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0,0<p.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(r,b.y<<0),this.ctx.lineTo(r,b.y-p.tickLength<<0),this.ctx.stroke()),0===this.labelAngle?(b.x-=c.textBlock.width/2,b.y-=p.tickLength+
|
|
768
|
+
c.textBlock.height-c.textBlock.fontSize/2):(b.x-=(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0)-c.textBlock.topPadding*Math.sin(Math.PI/180*this.labelAngle),b.y-=p.tickLength+2+(0<this.labelAngle?(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):(c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)))):"left"===this._position?(r=1===this.ctx.lineWidth%2?
|
|
769
|
+
(b.y<<0)+0.5:b.y<<0,0<p.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,r),this.ctx.lineTo(b.x-p.tickLength<<0,r),this.ctx.stroke()),0===this.labelAngle?(b.x=b.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.tickLength-5,b.y-=c.textBlock.topPadding):(b.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+c.textBlock.topPadding*Math.cos(Math.PI/180*this.labelAngle),b.x-=p.tickLength+5+(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+c.textBlock.fontSize/
|
|
770
|
+
2*Math.sin(Math.PI/180*this.labelAngle):c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)))):"right"===this._position&&(r=1===this.ctx.lineWidth%2?(b.y<<0)+0.5:b.y<<0,0<p.tickThickness&&(this.ctx.beginPath(),this.ctx.moveTo(b.x<<0,r),this.ctx.lineTo(b.x+p.tickLength<<0,r),this.ctx.stroke()),0===this.labelAngle?(b.x=b.x+p.tickLength+5,b.y-=c.textBlock.topPadding):(b.y-=c.textBlock.topPadding*Math.cos(Math.PI/180*
|
|
771
|
+
this.labelAngle),b.x=p.tickLength+5+(0<this.labelAngle?b.x+(c.textBlock.height-c.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle):b.x-c.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle))));q&&(p.ctx.globalAlpha=q);c.textBlock.x=b.x;c.textBlock.y=b.y;n.push(c)}else p._thicknessType===a&&(l(p.opacity)&&(p.opacity=p.ctx.globalAlpha),c.textBlock.angle=-90,"bottom"===this._position?(c.textBlock.maxWidth=this.options.stripLines[d].labelMaxWidth?this.options.stripLines[d].labelMaxWidth:
|
|
772
772
|
this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-p.thickness/2>this.chart.plotArea.x1?l(p.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+p.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,l(p.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+p.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===c.stripLine.labelAlign?
|
|
773
773
|
(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y1+c.textBlock.width+3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(c.textBlock.maxWidth=this.options.stripLines[d].labelMaxWidth?this.options.stripLines[d].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),b.x-c.textBlock.height-
|
|
774
774
|
p.thickness/2>this.chart.plotArea.x1?l(p.startValue)?b.x-=c.textBlock.height-c.textBlock.fontSize/2+p.thickness/2:b.x-=c.textBlock.height/2-c.textBlock.fontSize/2:(c.textBlock.angle=90,l(p.startValue)?b.x+=c.textBlock.height-c.textBlock.fontSize/2+p.thickness/2:b.x+=c.textBlock.height/2-c.textBlock.fontSize/2),b.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+c.textBlock.width+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/
|
|
@@ -778,7 +778,7 @@ this.options.stripLines[d].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock
|
|
|
778
778
|
3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x1+3),c.textBlock.x=b.x,c.textBlock.y=b.y,n.push(c));if(!m){b=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(d=0;d<k.length;d++)p=k[d],p.showOnTop?h||(h=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();
|
|
779
779
|
this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(g=0;g<k.length;g++)p=k[g],p.showOnTop&&p.render();this.ctx.restore()},p)):p.render();for(d=0;d<n.length;d++)c=n[d],c.stripLine.showOnTop?b||(b=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(g=0;g<n.length;g++)c=n[g],"inside"===c.stripLine.labelPlacement&&c.stripLine.showOnTop&&(e.ctx.save(),e.ctx.beginPath(),e.ctx.rect(e.chart.plotArea.x1,
|
|
780
780
|
e.chart.plotArea.y1,e.chart.plotArea.width,e.chart.plotArea.height),e.ctx.clip(),c.textBlock.render(!0),e.ctx.restore())},c.textBlock)):"inside"===c.stripLine.labelPlacement&&c.textBlock.render(!0);this.ctx.restore();m=!0}if(m)for(b=!1,d=0;d<n.length;d++)c=n[d],"outside"===c.stripLine.labelPlacement&&c.textBlock.render(!0)}};z.prototype.renderBreaksBackground=function(){this.chart._breaksCanvas&&(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length&&this.maskCanvas)&&(this.chart._breaksCanvasCtx.save(),
|
|
781
|
-
this.chart._breaksCanvasCtx.beginPath(),this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height),this.chart._breaksCanvasCtx.clip(),this.chart._breaksCanvasCtx.drawImage(this.maskCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx.restore())};z.prototype.createMask=function(){if(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;t?(this.maskCanvas=
|
|
781
|
+
this.chart._breaksCanvasCtx.beginPath(),this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height),this.chart._breaksCanvasCtx.clip(),this.chart._breaksCanvasCtx.drawImage(this.maskCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx.restore())};z.prototype.createMask=function(){if(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;t?(this.maskCanvas=xa(this.chart.width,
|
|
782
782
|
this.chart.height),this.maskCtx=this.maskCanvas.getContext("2d")):(this.maskCanvas=this.chart.plotArea.canvas,this.maskCtx=this.chart.plotArea.ctx);this.maskCtx.save();this.maskCtx.beginPath();this.maskCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.maskCtx.clip();for(var e=0;e<a.length;e++)a[e].endValue<this.viewportMinimum||(a[e].startValue>this.viewportMaximum||isNaN(this.range))||a[e].render(this.maskCtx);this.maskCtx.restore()}};
|
|
783
783
|
z.prototype.renderCrosshair=function(a,e){isFinite(this.minimum)&&isFinite(this.maximum)&&this.crosshair.render(a,e)};z.prototype.showCrosshair=function(a){l(a)||(a<this.viewportMinimum||a>this.viewportMaximum)||("top"===this._position||"bottom"===this._position?this.crosshair.render(this.convertValueToPixel(a),null,a):this.crosshair.render(null,this.convertValueToPixel(a),a))};z.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var e,c=this.chart.plotArea;
|
|
784
784
|
a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(K(this.gridDashType,this.gridThickness));if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),e=this.getPixelCoordinatesOnAxis(this._labels[b].position),e=1===a.lineWidth%2?(e.x<<0)+0.5:e.x<<0,a.moveTo(e,c.y1<<0),a.lineTo(e,c.y2<<0),a.stroke());
|
|
@@ -856,10 +856,10 @@ a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseco
|
|
|
856
856
|
0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0));return a};ra(fa,W);ra(ba,W);ba.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var e=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Ca(this.parent[this.optionsName]),e=this.parent.options[this.optionsName].indexOf(this.options));
|
|
857
857
|
this.options="undefined"===typeof a?{}:a;this.parent.options[this.optionsName][e]=this.options}};ba.prototype.render=function(a){if(0!==this.spacing||0!==this.options.lineThickness&&("undefined"!==typeof this.options.lineThickness||0!==this.parent.lineThickness)){var e=this.ctx,c=this.ctx.globalAlpha;this.ctx=a||this.ctx;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();var b=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue),
|
|
858
858
|
d=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;R(this.id);var g,h,k,l,m,n;a=Math.max(this.spacing,3);var p=Math.max(0,this.lineThickness);this.ctx.lineWidth=p;this.ctx.setLineDash&&this.ctx.setLineDash(K(this.lineDashType,p));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===p%2?(b.x<<0)+0.5:b.x<<0,h=1===p%2?(d.x<<0)+0.5:
|
|
859
|
-
d.x<<0,"top"===this.scaleBreaks.parent._position?(d=this.chart.plotArea.y1,k=this.chart.plotArea.y2+p/2+0.5<<0):(d=this.chart.plotArea.y2,k=this.chart.plotArea.y1-p/2+0.5<<0,a*=-1),this.bounds={x1:b-p/2,y1:d,x2:h+p/2,y2:k},this.ctx.moveTo(b,d),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&0>=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,k),this.ctx.lineTo(h,k),this.ctx.lineTo(h,d);else if("wavy"===this.type){l=b;m=d;g=0.5;n=(k-m)/a/3;for(var
|
|
860
|
-
g*a,m+a,l+g*a,m+2*a,l,m+3*a),m+=3*a,g*=-1;this.ctx.bezierCurveTo(l+g*a,m+a,l+g*a,m+2*a,l,m+3*a);l=h;g*=-1;this.ctx.lineTo(l,m);for(
|
|
859
|
+
d.x<<0,"top"===this.scaleBreaks.parent._position?(d=this.chart.plotArea.y1,k=this.chart.plotArea.y2+p/2+0.5<<0):(d=this.chart.plotArea.y2,k=this.chart.plotArea.y1-p/2+0.5<<0,a*=-1),this.bounds={x1:b-p/2,y1:d,x2:h+p/2,y2:k},this.ctx.moveTo(b,d),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&0>=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,k),this.ctx.lineTo(h,k),this.ctx.lineTo(h,d);else if("wavy"===this.type){l=b;m=d;g=0.5;n=(k-m)/a/3;for(var r=0;r<n;r++)this.ctx.bezierCurveTo(l+
|
|
860
|
+
g*a,m+a,l+g*a,m+2*a,l,m+3*a),m+=3*a,g*=-1;this.ctx.bezierCurveTo(l+g*a,m+a,l+g*a,m+2*a,l,m+3*a);l=h;g*=-1;this.ctx.lineTo(l,m);for(r=0;r<n;r++)this.ctx.bezierCurveTo(l+g*a,m-a,l+g*a,m-2*a,l,m-3*a),m-=3*a,g*=-1}else{if("zigzag"===this.type){g=-1;m=d+a;l=b+a;n=(k-m)/a/2;for(r=0;r<n;r++)this.ctx.lineTo(l,m),l+=2*g*a,m+=2*a,g*=-1;this.ctx.lineTo(l,m);l+=h-b;for(r=0;r<n+1;r++)this.ctx.lineTo(l,m),l+=2*g*a,m-=2*a,g*=-1;this.ctx.lineTo(l+g*a,m+a)}}else if("left"===this.scaleBreaks.parent._position||"right"===
|
|
861
861
|
this.scaleBreaks.parent._position)if(d=1===p%2?(d.y<<0)+0.5:d.y<<0,k=1===p%2?(b.y<<0)+0.5:b.y<<0,"left"===this.scaleBreaks.parent._position?(b=this.chart.plotArea.x1,h=this.chart.plotArea.x2+p/2+0.5<<0):(b=this.chart.plotArea.x2,h=this.chart.plotArea.x1-p/2+0.5<<0,a*=-1),this.bounds={x1:b,y1:d-p/2,x2:h,y2:k+p/2},this.ctx.moveTo(b,d),"straight"===this.type||"left"===this.scaleBreaks.parent._position&&0>=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(h,d),this.ctx.lineTo(h,k),
|
|
862
|
-
this.ctx.lineTo(b,k);else if("wavy"===this.type){l=b;m=d;g=0.5;n=(h-l)/a/3;for(
|
|
862
|
+
this.ctx.lineTo(b,k);else if("wavy"===this.type){l=b;m=d;g=0.5;n=(h-l)/a/3;for(r=0;r<n;r++)this.ctx.bezierCurveTo(l+a,m+g*a,l+2*a,m+g*a,l+3*a,m),l+=3*a,g*=-1;this.ctx.bezierCurveTo(l+a,m+g*a,l+2*a,m+g*a,l+3*a,m);m=k;g*=-1;this.ctx.lineTo(l,m);for(r=0;r<n;r++)this.ctx.bezierCurveTo(l-a,m+g*a,l-2*a,m+g*a,l-3*a,m),l-=3*a,g*=-1}else if("zigzag"===this.type){g=1;m=d-a;l=b+a;n=(h-l)/a/2;for(r=0;r<n;r++)this.ctx.lineTo(l,m),m+=2*g*a,l+=2*a,g*=-1;this.ctx.lineTo(l,m);m+=k-d;for(r=0;r<n+1;r++)this.ctx.lineTo(l,
|
|
863
863
|
m),m+=2*g*a,l-=2*a,g*=-1;this.ctx.lineTo(l+a,m+g*a)}0<p&&this.ctx.stroke();this.ctx.closePath();this.ctx.globalAlpha=this.fillOpacity;this.ctx.globalCompositeOperation="destination-over";this.ctx.fill();this.ctx.restore();this.ctx.globalAlpha=c;this.ctx=e}};ra(ha,W);ha.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var e=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Ca(this.parent.stripLines),e=
|
|
864
864
|
this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[e]=this.options}};ha.prototype.render=function(){this.ctx.save();var a=this.parent.getPixelCoordinatesOnAxis(this.value),e=Math.abs("pixel"===this._thicknessType?this.thickness:Math.abs(this.parent.convertValueToPixel(this.endValue)-this.parent.convertValueToPixel(this.startValue)));if(0<e){var c=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();
|
|
865
865
|
var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;R(this.id);var d,g,h,k;this.ctx.lineWidth=e;this.ctx.setLineDash&&this.ctx.setLineDash(K(this.lineDashType,e));if("bottom"===this.parent._position||"top"===this.parent._position)a="pixel"===this._thicknessType?a.x:(this.parent.convertValueToPixel(this.endValue)+this.parent.convertValueToPixel(this.startValue))/2,d=g=1===this.ctx.lineWidth%2?(a<<0)+0.5:a<<0,h=this.chart.plotArea.y1,k=this.chart.plotArea.y2,this.bounds={x1:d-e/2,y1:h,x2:g+e/2,y2:k};
|
|
@@ -867,59 +867,59 @@ else if("left"===this.parent._position||"right"===this.parent._position)a="pixel
|
|
|
867
867
|
var e=this.chart,c=!1;e.resetOverlayedCanvas();e.clearedOverlayedCanvas=this.parent.type;this.chart.renderCrosshairs(this.parent,!1);var b,d="xySwapped"===e.plotInfo.axisPlacement;"bottom"===this.parent._position?b=d?e.axisY:e.axisX:"top"===this.parent._position?b=d?e.axisY2:e.axisX2:"left"===this.parent._position?b=d?e.axisX:e.axisY:"right"===this.parent._position&&(b=d?e.axisX2:e.axisY2);if(b)for(d=0;d<b.length;d++)this.parent===b[d]&&(b[d]._crosshairValue=a>=b[d].viewportMinimum&&a<=b[d].viewportMaximum?
|
|
868
868
|
a:null);b=["axisX","axisX2","axisY","axisY2"];for(d=0;d<b.length;d++)for(var g=b[d],h=0;h<e[g].length;h++){var k=e[g][h],n=k._crosshairValue;k.crosshair&&k.crosshair.enabled&&(this.parent===k&&(k.sessionVariables.crosshairShownByPixel=!1,k.sessionVariables.crosshairValue=k.crosshair._updatedValue=n||a),!l(n)&&n>=k.viewportMinimum&&n<=k.viewportMaximum?(k.showCrosshair(n),this===k.crosshair&&(c=!0)):void 0!==n&&(k.sessionVariables.crosshairValue=null,k.crosshair._updatedValue=null))}this.chart.toolTip&&
|
|
869
869
|
(this.chart.toolTip._entries&&this.chart.sessionVariables._dataHighlighted)&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return c};da.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.toolTip&&(this.chart.toolTip._entries&&this.chart.sessionVariables._dataHighlighted)&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);this.chart.renderCrosshairs(this.parent,!1);this.parent.sessionVariables._crosshairHidden=this._hidden=!0};da.prototype.render=
|
|
870
|
-
function(a,e,c){var b,d,g,h,k=null,n=null,m=null,
|
|
871
|
-
2:10>this.parent.range?1:0),this.valueFormatString=z.generateValueFormatString(this.parent.range,m)));var p=null===this.opacity?1:this.opacity,
|
|
870
|
+
function(a,e,c){var b,d,g,h,k=null,n=null,m=null,q="";this.valueFormatString||("dateTime"===this.parent.valueType?this.valueFormatString=this.parent.valueFormatString:(m=0,m="xySwapped"===this.chart.plotInfo.axisPlacement?50<this.parent.range?0:500<this.chart.width&&25>this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0):50<this.parent.range?0:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?
|
|
871
|
+
2:10>this.parent.range?1:0),this.valueFormatString=z.generateValueFormatString(this.parent.range,m)));var p=null===this.opacity?1:this.opacity,r=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness),f=this.chart.overlaidCanvasCtx,s=f.globalAlpha;f.beginPath();f.strokeStyle=this.color;f.lineWidth=r;f.save();this.labelFontSize=Math.abs(l(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize);this.labelMaxWidth=l(this.options.labelMaxWidth)?
|
|
872
872
|
0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=l(this.options.labelWrap)||this.labelWrap?0.3*this.chart.height:1.5*this.labelFontSize+("object"===typeof this.labelPadding?(this.labelPadding.top||0)+(this.labelPadding.bottom||0):2*this.labelPadding);m=new la(f,{x:0,y:0,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxWidth:this.labelMaxWidth,maxHeight:this.labelMaxHeight,angle:this.labelAngle,
|
|
873
|
-
text:
|
|
874
|
-
this.chart.sessionVariables.mouseY:e});else if("left"===this.parent._position||"right"===this.parent._position)t=this.parent.convertPixelToValue({y:e});for(var u=0;u<this.parent.dataSeries.length;u++)(
|
|
875
|
-
0;u<
|
|
876
|
-
|
|
877
|
-
|
|
873
|
+
text:q,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,padding:this.labelPadding,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"});if(this.snapToDataPoint){var t=0,q=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var w=null;if("bottom"===this.parent._position||"top"===this.parent._position)t=this.parent.dataSeries[0].axisX.convertPixelToValue({y:this.parent.sessionVariables.crosshairShownByPixel?
|
|
874
|
+
this.chart.sessionVariables.mouseY:e});else if("left"===this.parent._position||"right"===this.parent._position)t=this.parent.convertPixelToValue({y:e});for(var u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0,!0))&&0<=w.index&&(w.dataSeries=this.parent.dataSeries[u],null!==w.dataPoint.y&&w.dataSeries.visible&&q.push(w));w=null;if(0===q.length)return;q.sort(function(a,b){return a.distance-b.distance});var x=w=0;yPercent=cumulativeY=0;for(var t=Infinity,v,u=
|
|
875
|
+
0;u<q.length;u++){if("rangeBar"===q[u].dataSeries.type||"error"===q[u].dataSeries.type){if(q[u].dataPoint.y)for(var B=0;B<q[u].dataPoint.y.length;B++)x=Math.abs(a-this.parent.convertValueToPixel(q[u].dataPoint.y[B])),x<=t&&(t=x,w=u)}else"stackedBar"===q[u].dataSeries.type?(cumulativeY=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,x=Math.abs(a-this.parent.convertValueToPixel(cumulativeY)),x<=t&&(t=x,w=u)):"stackedBar100"===q[u].dataSeries.type?(x=q[0].dataPoint.x.getTime?q[0].dataPoint.x.getTime():
|
|
876
|
+
q[0].dataPoint.x,l(v)&&(v=Math.abs(a-this.parent.convertValueToPixel(100*(q[0].dataSeries.dataPointEOs[q[0].index].cumulativeY/q[0].dataSeries.plotUnit.dataPointYSums[x])))),cumulativeY=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,x=q[u].dataPoint.x.getTime?q[u].dataPoint.x.getTime():q[u].dataPoint.x,yPercent=100*(cumulativeY/q[u].dataSeries.plotUnit.dataPointYSums[x]),x=Math.abs(a-this.parent.convertValueToPixel(yPercent)),x<=v&&(v=x,w=u)):(x=Math.abs(a-this.parent.convertValueToPixel(q[u].dataPoint.y)),
|
|
877
|
+
x<=t&&(t=x,w=u));l(v)||(t=Math.min(t,v))}v=q[w];u=0;if("bottom"===this.parent._position||"top"===this.parent._position){if("rangeBar"===v.dataSeries.type||"error"===v.dataSeries.type){t=Math.abs(a-this.parent.convertValueToPixel(v.dataPoint.y[0]));for(q=0;q<v.dataPoint.y.length;q++)x=Math.abs(a-this.parent.convertValueToPixel(v.dataPoint.y[q])),x<t&&(t=x,u=q);k=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y[u])<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y[u])<<0;this.value=
|
|
878
878
|
v.dataPoint.y[u];0!==v.dataPoint.y[u]%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0)));m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.y[u]}):l(this.options.label)?ea(v.dataPoint.y[u],this.valueFormatString,this.chart._cultureInfo):this.label}else"stackedBar"===
|
|
879
|
-
v.dataSeries.type?(t=Math.abs(a-this.parent.convertValueToPixel(
|
|
880
|
-
1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:cumulativeY}):l(this.options.label)?ea(cumulativeY,this.valueFormatString,this.chart._cultureInfo):this.label):"stackedBar100"===v.dataSeries.type?(t=Math.abs(a-this.parent.convertValueToPixel(
|
|
879
|
+
v.dataSeries.type?(t=Math.abs(a-this.parent.convertValueToPixel(q[0].dataPoint.y)),cumulativeY=v.dataSeries.dataPointEOs[v.index].cumulativeY,k=1===f.lineWidth%2?(this.parent.convertValueToPixel(cumulativeY)<<0)+0.5:this.parent.convertValueToPixel(cumulativeY)<<0,this.value=cumulativeY,0!==cumulativeY%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?
|
|
880
|
+
1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:cumulativeY}):l(this.options.label)?ea(cumulativeY,this.valueFormatString,this.chart._cultureInfo):this.label):"stackedBar100"===v.dataSeries.type?(t=Math.abs(a-this.parent.convertValueToPixel(q[0].dataPoint.y)),cumulativeY=v.dataSeries.dataPointEOs[v.index].cumulativeY,x=v.dataPoint.x.getTime?v.dataPoint.x.getTime():v.dataPoint.x,yPercent=100*(cumulativeY/v.dataSeries.plotUnit.dataPointYSums[x]),
|
|
881
881
|
k=1===f.lineWidth%2?(this.parent.convertValueToPixel(yPercent)<<0)+0.5:this.parent.convertValueToPixel(yPercent)<<0,this.value=yPercent,0!==yPercent%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:yPercent}):l(this.options.label)?
|
|
882
882
|
ea(yPercent,this.valueFormatString,this.chart._cultureInfo):this.label):(k=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y)<<0,this.value=v.dataPoint.y,0!==v.dataPoint.y%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,
|
|
883
|
-
axis:this.parent,crosshair:this.options,value:v.dataPoint.y}):l(this.options.label)?ea(v.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label);b=d=k;g=this.chart.plotArea.y1;h=this.chart.plotArea.y2;this.bounds={x1:b-
|
|
884
|
-
m.fontSize/2)+2;m.y+m.height>this.chart.bounds.y2?m.y=this.chart.bounds.y2-m.height:m.y<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1)}else if("left"===this.parent._position||"right"===this.parent._position){g=h=n=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.x)<<0;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds={x1:b,y1:g-
|
|
885
|
-
this.parent.viewportMaximum;
|
|
883
|
+
axis:this.parent,crosshair:this.options,value:v.dataPoint.y}):l(this.options.label)?ea(v.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label);b=d=k;g=this.chart.plotArea.y1;h=this.chart.plotArea.y2;this.bounds={x1:b-r/2,y1:g,x2:d+r/2,y2:h};m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.width:m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1);m.y=this.parent.lineCoordinates.y2+("top"===this.parent._position?-m.height+this.parent.tickLength:
|
|
884
|
+
m.fontSize/2)+2;m.y+m.height>this.chart.bounds.y2?m.y=this.chart.bounds.y2-m.height:m.y<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1)}else if("left"===this.parent._position||"right"===this.parent._position){g=h=n=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.x)<<0;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds={x1:b,y1:g-r/2,x2:d,y2:h+r/2};u=!1;if(this.parent.labels)for(t=Math.ceil(this.parent.interval),q=0;q<
|
|
885
|
+
this.parent.viewportMaximum;q+=t)if(this.parent.labels[q])u=!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(t=this.parent.convertPixelToValue({y:e}),w=null,u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0,!0))&&0<=w.index&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?w.dataPoint.label:this.label)}else"dateTime"!==this.parent.valueType||this.parent.logarithmic?
|
|
886
886
|
(0!==v.dataPoint.x%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?ea(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label):m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,
|
|
887
887
|
axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?Fa(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=v.dataPoint.x;m.y=h+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:
|
|
888
|
-
"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){t=this.parent.convertPixelToValue({x:a});for(u=0;u<this.parent.dataSeries.length;u++)(
|
|
889
|
-
0)+0.5:this.parent.convertValueToPixel(v.dataPoint.x)<<0;g=this.chart.plotArea.y1;h=this.chart.plotArea.y2;this.bounds={x1:b-
|
|
890
|
-
this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?
|
|
888
|
+
"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){t=this.parent.convertPixelToValue({x:a});for(u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0,!0))&&0<=w.index&&(w.dataSeries=this.parent.dataSeries[u],null!==w.dataPoint.y&&w.dataSeries.visible&&q.push(w));if(0===q.length)return;q.sort(function(a,b){return a.distance-b.distance});v=q[0];b=d=k=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.x)<<
|
|
889
|
+
0)+0.5:this.parent.convertValueToPixel(v.dataPoint.x)<<0;g=this.chart.plotArea.y1;h=this.chart.plotArea.y2;this.bounds={x1:b-r/2,y1:g,x2:d+r/2,y2:h};u=!1;if(this.parent.labels)for(t=Math.ceil(this.parent.interval),q=0;q<this.parent.viewportMaximum;q+=t)if(this.parent.labels[q])u=!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(t=this.parent.convertPixelToValue({x:a}),w=null,u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0,!0))&&0<=w.index&&(m.text=
|
|
890
|
+
this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?w.dataPoint.label:this.label)}else"dateTime"!==this.parent.valueType||this.parent.logarithmic?(0!==v%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,
|
|
891
891
|
axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?ea(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label):m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.x}):l(this.options.label)?Fa(v.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=v.dataPoint.x;m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-
|
|
892
892
|
m.width);m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1);"bottom"===this.parent._position?m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position){!l(this.parent.dataSeries)&&0<this.parent.dataSeries.length&&(t=this.parent.dataSeries[0].axisX.convertPixelToValue({x:this.parent.sessionVariables.crosshairShownByPixel?this.chart.sessionVariables.mouseX:
|
|
893
|
-
a}));for(u=0;u<this.parent.dataSeries.length;u++)(
|
|
894
|
-
"ohlc"===
|
|
895
|
-
|
|
896
|
-
(n/
|
|
897
|
-
|
|
898
|
-
|
|
893
|
+
a}));for(u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0,!0))&&0<=w.index&&(w.dataSeries=this.parent.dataSeries[u],null!==w.dataPoint.y&&w.dataSeries.visible&&q.push(w));if(0===q.length)return;q.sort(function(a,b){return a.distance-b.distance});x=w=0;t=Infinity;for(u=0;u<q.length;u++){if("rangeColumn"===q[u].dataSeries.type||"rangeArea"===q[u].dataSeries.type||"error"===q[u].dataSeries.type||"rangeSplineArea"===q[u].dataSeries.type||"candlestick"===q[u].dataSeries.type||
|
|
894
|
+
"ohlc"===q[u].dataSeries.type||"boxAndWhisker"===q[u].dataSeries.type){if(q[u].dataPoint.y)for(B=0;B<q[u].dataPoint.y.length;B++)x=Math.abs(e-this.parent.convertValueToPixel(q[u].dataPoint.y[B])),x<=t&&(t=x,w=u)}else"stackedColumn"===q[u].dataSeries.type?(a=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,x=Math.abs(e-this.parent.convertValueToPixel(a)),x<=t&&(t=x,w=u)):"stackedArea"===q[u].dataSeries.type?(a=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,x=Math.abs(e-this.parent.convertValueToPixel(a)),
|
|
895
|
+
x<=t&&(t=x,w=u)):"stackedColumn100"===q[u].dataSeries.type||"stackedArea100"===q[u].dataSeries.type?(x=q[0].dataPoint.x.getTime?q[0].dataPoint.x.getTime():q[0].dataPoint.x,l(v)&&(v=Math.abs(e-this.parent.convertValueToPixel(100*(q[0].dataSeries.dataPointEOs[q[0].index].cumulativeY/q[0].dataSeries.plotUnit.dataPointYSums[x])))),"stackedColumn100"===q[u].dataSeries.type?(n=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,x=q[u].dataPoint.x.getTime?q[u].dataPoint.x.getTime():q[u].dataPoint.x,a=100*
|
|
896
|
+
(n/q[u].dataSeries.plotUnit.dataPointYSums[x]),x=Math.abs(e-this.parent.convertValueToPixel(a)),x<=v&&(v=x,w=u)):"stackedArea100"===q[u].dataSeries.type&&(n=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,x=q[u].dataPoint.x.getTime?q[u].dataPoint.x.getTime():q[u].dataPoint.x,a=100*(n/q[u].dataSeries.plotUnit.dataPointYSums[x]),x=Math.abs(e-this.parent.convertValueToPixel(a)),x<=v&&(v=x,w=u))):"waterfall"===q[u].dataSeries.type?(x=Math.abs(e-this.parent.convertValueToPixel(q[u].dataSeries.dataPointEOs[q[u].index].cumulativeSum)),
|
|
897
|
+
x<=t&&(v=t=x,w=u)):(x=Math.abs(e-this.parent.convertValueToPixel(q[u].dataPoint.y)),x<=t&&(t=x,w=u));l(v)||(t=Math.min(t,v))}v=q[w];u=0;if("rangeColumn"===v.dataSeries.type||"rangeArea"===v.dataSeries.type||"error"===v.dataSeries.type||"rangeSplineArea"===v.dataSeries.type||"candlestick"===v.dataSeries.type||"ohlc"===v.dataSeries.type||"boxAndWhisker"===v.dataSeries.type){t=Math.abs(e-this.parent.convertValueToPixel(v.dataPoint.y[0]));for(q=0;q<v.dataPoint.y.length;q++)x=Math.abs(e-this.parent.convertValueToPixel(v.dataPoint.y[q])),
|
|
898
|
+
x<t&&(t=x,u=q);n=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y[u])<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y[u])<<0;0!==v.dataPoint.y[u]%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0)));m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataPoint.y[u]}):
|
|
899
899
|
l(this.options.label)?ea(v.dataPoint.y[u],this.valueFormatString,this.chart._cultureInfo):this.label;this.value=v.dataPoint.y[u]}else"stackedColumn"===v.dataSeries.type?(a=v.dataSeries.dataPointEOs[v.index].cumulativeY,n=1===f.lineWidth%2?(this.parent.convertValueToPixel(a)<<0)+0.5:this.parent.convertValueToPixel(a)<<0,0!==a%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?
|
|
900
900
|
2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:a}):l(this.options.label)?ea(a,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=a):"stackedArea"===v.dataSeries.type?(a=v.dataSeries.dataPointEOs[v.index].cumulativeY,n=1===f.lineWidth%2?(this.parent.convertValueToPixel(a)<<0)+0.5:this.parent.convertValueToPixel(a)<<0,0!==a%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,
|
|
901
|
-
Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:a}):l(this.options.label)?ea(a,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=a):"stackedColumn100"===v.dataSeries.type?(n=v.dataSeries.dataPointEOs[v.index].cumulativeY,
|
|
901
|
+
Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:a}):l(this.options.label)?ea(a,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=a):"stackedColumn100"===v.dataSeries.type?(n=v.dataSeries.dataPointEOs[v.index].cumulativeY,x=v.dataPoint.x.getTime?v.dataPoint.x.getTime():v.dataPoint.x,a=100*(n/v.dataSeries.plotUnit.dataPointYSums[x]),
|
|
902
902
|
n=1===f.lineWidth%2?(this.parent.convertValueToPixel(a)<<0)+0.5:this.parent.convertValueToPixel(a)<<0,0!==a%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:a}):l(this.options.label)?ea(a,this.valueFormatString,this.chart._cultureInfo):
|
|
903
|
-
this.label,this.value=a):"stackedArea100"===v.dataSeries.type?(n=v.dataSeries.dataPointEOs[v.index].cumulativeY,
|
|
903
|
+
this.label,this.value=a):"stackedArea100"===v.dataSeries.type?(n=v.dataSeries.dataPointEOs[v.index].cumulativeY,x=v.dataPoint.x.getTime?v.dataPoint.x.getTime():v.dataPoint.x,a=100*(n/v.dataSeries.plotUnit.dataPointYSums[x]),n=1===f.lineWidth%2?(this.parent.convertValueToPixel(a)<<0)+0.5:this.parent.convertValueToPixel(a)<<0,0!==a%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>
|
|
904
904
|
this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:a}):l(this.options.label)?ea(a,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=a):"waterfall"===v.dataSeries.type?(n=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataSeries.dataPointEOs[v.index].cumulativeSum)<<0)+0.5:this.parent.convertValueToPixel(v.dataSeries.dataPointEOs[v.index].cumulativeSum)<<0,0!==v.dataSeries.dataPointEOs[v.index].cumulativeSum%
|
|
905
905
|
1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:v.dataSeries.dataPointEOs[v.index].cumulativeSum}):l(this.options.label)?ea(v.dataSeries.dataPointEOs[v.index].cumulativeSum,this.valueFormatString,this.chart._cultureInfo):
|
|
906
906
|
this.label,this.value=v.dataSeries.dataPointEOs[v.index].cumulativeSum):(n=1===f.lineWidth%2?(this.parent.convertValueToPixel(v.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(v.dataPoint.y)<<0,0!==v.dataPoint.y%1&&l(this.options.valueFormatString)&&(this.valueFormatString=z.generateValueFormatString(this.parent.range,Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0))),m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,
|
|
907
|
-
axis:this.parent,crosshair:this.options,value:v.dataPoint.y}):l(this.options.label)?ea(v.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=v.dataPoint.y);g=h=n;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds={x1:b,y1:g-
|
|
908
|
-
m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}
|
|
909
|
-
this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<
|
|
910
|
-
this.parent._position&&m.x+m.measureText().width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.measureText().width),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<
|
|
911
|
-
h=this.chart.plotArea.y2,this.bounds={x1:b-
|
|
912
|
-
!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(t=this.parent.convertPixelToValue({y:e}),
|
|
907
|
+
axis:this.parent,crosshair:this.options,value:v.dataPoint.y}):l(this.options.label)?ea(v.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=v.dataPoint.y);g=h=n;b=this.chart.plotArea.x1;d=this.chart.plotArea.x2;this.bounds={x1:b,y1:g-r/2,x2:d,y2:h+r/2};m.y=h+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+
|
|
908
|
+
m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}q=null;f.globalAlpha=p;0<r&&f.setLineDash&&f.setLineDash(K(this.lineDashType,r));if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1+m.fontSize/2),"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>
|
|
909
|
+
this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<r&&(f.moveTo(b,g),f.lineTo(d,h),f.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1);if("left"===this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1),"right"===
|
|
910
|
+
this.parent._position&&m.x+m.measureText().width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.measureText().width),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<r&&(f.moveTo(b,g),f.lineTo(d,h),f.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1)}else{if("bottom"===this.parent._position||"top"===this.parent._position)b=d=k=1===f.lineWidth%2?(a<<0)+0.5:a<<0,g=this.chart.plotArea.y1,
|
|
911
|
+
h=this.chart.plotArea.y2,this.bounds={x1:b-r/2,y1:g,x2:d+r/2,y2:h};else if("left"===this.parent._position||"right"===this.parent._position)g=h=n=1===f.lineWidth%2?(e<<0)+0.5:e<<0,b=this.chart.plotArea.x1,d=this.chart.plotArea.x2,this.bounds={x1:b,y1:g-r/2,x2:d,y2:h+r/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){u=!1;if(this.parent.labels)for(t=Math.ceil(this.parent.interval),q=0;q<this.parent.viewportMaximum;q+=t)if(this.parent.labels[q])u=
|
|
912
|
+
!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(t=this.parent.convertPixelToValue({y:e}),w=null,u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0))&&0<=w.index&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?w.dataPoint.label:this.label)}else m.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?
|
|
913
913
|
this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(e):c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(e):c,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(e):c}):l(this.options.label)?Fa(l(c)?this.parent.convertPixelToValue(e):c,this.valueFormatString,this.chart._cultureInfo):
|
|
914
914
|
this.label;m.y=e+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x1-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}else{if("bottom"===this.parent._position||"top"===this.parent._position)m.text=this.labelFormatter?
|
|
915
915
|
this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(a):c,this.valueFormatString,this.chart._cultureInfo):this.label,m.x=b-m.measureText().width/2,m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.width),m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1),"bottom"===this.parent._position?m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&
|
|
916
|
-
(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){u=!1;
|
|
917
|
-
this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?l(c)?
|
|
916
|
+
(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){u=!1;q="";if(this.parent.labels)for(t=Math.ceil(this.parent.interval),q=0;q<this.parent.viewportMaximum;q+=t)if(this.parent.labels[q])u=!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(t=this.parent.convertPixelToValue({x:a}),w=null,u=0;u<this.parent.dataSeries.length;u++)(w=this.parent.dataSeries[u].getDataPointAtX(t,!0))&&0<=w.index&&(m.text=this.labelFormatter?
|
|
917
|
+
this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?l(c)?w.dataPoint.label:c:this.label)}else m.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?0<this.parent.dataSeries.length?this.parent.convertPixelToValue(a):"":c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(a):
|
|
918
918
|
c,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(a):c}):l(this.options.label)?Fa(l(c)?this.parent.convertPixelToValue(a):c,this.valueFormatString,this.chart._cultureInfo):this.label;m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.width);m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1);"bottom"===this.parent._position?
|
|
919
919
|
m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position)m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent,crosshair:this.options,value:l(c)?this.parent.convertPixelToValue(e):c}):l(this.options.label)?ea(l(c)?this.parent.convertPixelToValue(e):c,this.valueFormatString,this.chart._cultureInfo):this.label,m.y=e+
|
|
920
920
|
m.fontSize/2-m.measureText().height/2+2,m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2),"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2);"left"===this.parent._position&&m.x<this.chart.bounds.x1?m.x=this.chart.bounds.x1:"right"===this.parent._position&&
|
|
921
|
-
m.x+m.measureText().width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.measureText().width:"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2);f.globalAlpha=p;0<
|
|
922
|
-
|
|
921
|
+
m.x+m.measureText().width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.measureText().width:"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+m.measureText().height>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2);f.globalAlpha=p;0<r&&("bottom"!==this.parent._position||d<=this.parent.lineCoordinates.x2)&&(f.setLineDash&&f.setLineDash(K(this.lineDashType,
|
|
922
|
+
r)),f.moveTo(b,g),f.lineTo(d,h),f.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1);this.value="bottom"===this.parent._position||"top"===this.parent._position?this.parent.convertPixelToValue(a):this.parent.convertPixelToValue(e)}if("bottom"===this.parent._position||"top"===this.parent._position)this.parent.sessionVariables.crosshairValue=this._updatedValue=this.parent.convertPixelToValue(k);if("left"===this.parent._position||"right"===this.parent._position)this.parent.sessionVariables.crosshairValue=
|
|
923
923
|
this._updatedValue=this.parent.convertPixelToValue(n);this._textBlock=m;this._label=c;l(c)||this.renderLabel();f.restore();f.globalAlpha=s};da.prototype.renderLabel=function(){this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&(l(this._textBlock)||(l(this._textBlock.text)||!("number"===typeof this._textBlock.text.valueOf()||0<this._textBlock.text.length)||this._hidden)||this._textBlock.render(!0),
|
|
924
924
|
l(this._label)&&this.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this.parent,value:this.value},this.parent))};ra(na,W);na.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("shared");this.updateOption("animationEnabled");this.updateOption("content");this.updateOption("contentFormatter");this.updateOption("reversed");this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("cornerRadius");
|
|
925
925
|
this.updateOption("fontSize");this.updateOption("fontColor");this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("fontStyle")};na.prototype._initialize=function(){this.updateOption("updated");this.updateOption("hidden");if(this.enabled){this.container=document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position="absolute";this.container.style.height="auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";
|
|
@@ -939,7 +939,7 @@ else g.push(m)}}if(0<g.length){if(this._entries=g,this.highlightObjects(g),this.
|
|
|
939
939
|
this.backgroundColor?this.backgroundColor:t?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===g[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:g[0].dataPoint.color?g[0].dataPoint.color:0<g[0].dataPoint.y?g[0].dataSeries.risingColor:g[0].dataSeries.fallingColor:"error"===g[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=
|
|
940
940
|
this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:g[0].dataSeries.color?g[0].dataSeries.color:g[0].dataSeries._colorSet[d.index%g[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:g[0].dataPoint.color?g[0].dataPoint.color:g[0].dataSeries.color?g[0].dataSeries.color:g[0].dataSeries._colorSet[g[0].index%g[0].dataSeries._colorSet.length],
|
|
941
941
|
this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:
|
|
942
|
-
"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:t?"italic":"normal"}catch(
|
|
942
|
+
"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:t?"italic":"normal"}catch(q){}"pie"===g[0].dataSeries.type||"doughnut"===g[0].dataSeries.type||"funnel"===g[0].dataSeries.type||"pyramid"===g[0].dataSeries.type||"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?a=a-10-this.container.clientWidth:
|
|
943
943
|
(a=g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x)-this.container.clientWidth<<0,a-=10);0>a&&(a=Math.max(0,a+this.container.clientWidth+20));a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));e=1!==g.length||this.shared||"line"!==g[0].dataSeries.type&&"stepLine"!==g[0].dataSeries.type&&"spline"!==g[0].dataSeries.type&&"area"!==g[0].dataSeries.type&&
|
|
944
944
|
"stepArea"!==g[0].dataSeries.type&&"splineArea"!==g[0].dataSeries.type?"bar"===g[0].dataSeries.type||"rangeBar"===g[0].dataSeries.type||"stackedBar"===g[0].dataSeries.type||"stackedBar100"===g[0].dataSeries.type?g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x):e:g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y);e=-e+10;0<e+this.container.clientHeight+5&&(e-=e+this.container.clientHeight+5-0);this.fixMozTransitionDelay(a,e);!this.animationEnabled||h?this.disableAnimation():(this.enableAnimation(),
|
|
945
945
|
this.container.style.MozTransition=this.mozContainerTransition);this.positionLeft=a;this.positionBottom=e;this.container.style.left=a+"px";this.container.style.bottom=e+"px"}else this.hide(!1),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);e=[];for(b=0;b<g.length;b++)e.push({xValue:g[b].dataPoint.x,dataPoint:g[b].dataPoint,dataSeries:g[b].dataSeries,dataPointIndex:g[b].index,dataSeriesIndex:g[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,
|
|
@@ -951,7 +951,7 @@ b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar1
|
|
|
951
951
|
!0):"candlestick"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,Math.min(d.y2,d.y3)),e.lineTo(d.x3-b,Math.min(d.y1,d.y4)),e.stroke(),e.beginPath(),e.moveTo(d.x3-b,Math.max(d.y1,d.y4)),e.lineTo(d.x3-b,Math.max(d.y2,d.y3)),e.stroke(),aa(e,d.x1,Math.min(d.y1,d.y4),d.x2,Math.max(d.y1,d.y4),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"ohlc"===
|
|
952
952
|
b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,d.y2),e.lineTo(d.x3-b,d.y3),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y1),e.lineTo(d.x1,d.y1),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4),e.lineTo(d.x2,d.y4),e.stroke(),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"boxAndWhisker"===b.type?(e.save(),e.globalAlpha=1,e.strokeStyle=d.stemColor,e.lineWidth=2*d.stemThickness,0<d.stemThickness&&(e.beginPath(),
|
|
953
953
|
e.moveTo(d.x3,d.y2+d.borderThickness/2),e.lineTo(d.x3,d.y1+d.whiskerThickness/2),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4-d.whiskerThickness/2),e.lineTo(d.x3,d.y3-d.borderThickness/2),e.stroke()),e.beginPath(),aa(e,d.x1,Math.max(d.y2,d.y3),d.x2,Math.min(d.y2,d.y3),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1,e.strokeStyle=d.whiskerColor,e.lineWidth=2*d.whiskerThickness,0<d.whiskerThickness&&(e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y4),e.lineTo(Math.ceil(d.x3+
|
|
954
|
-
d.whiskerLength/2),d.y4),e.stroke(),e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y1),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y1),e.stroke()),e.globalAlpha=1,e.strokeStyle=d.lineColor,e.lineWidth=2*d.lineThickness,0<d.lineThickness&&(e.beginPath(),e.moveTo(d.x1,d.y5),e.lineTo(d.x2,d.y5),e.stroke()),e.restore(),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"error"===b.type&&(
|
|
954
|
+
d.whiskerLength/2),d.y4),e.stroke(),e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y1),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y1),e.stroke()),e.globalAlpha=1,e.strokeStyle=d.lineColor,e.lineWidth=2*d.lineThickness,0<d.lineThickness&&(e.beginPath(),e.moveTo(d.x1,d.y5),e.lineTo(d.x2,d.y5),e.stroke()),e.restore(),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"error"===b.type&&(D(e,d.x1,d.y1,d.x2,d.y2,"white",d.whiskerProperties,d.stemProperties,d.isXYSwapped,0.3),
|
|
955
955
|
this.chart.sessionVariables._dataHighlighted=!0))}}e.restore();e.globalAlpha=1;e.beginPath()};na.prototype.getToolTipInnerHTML=function(a){var e=a.entries,c=null,b=null,d=null,g=0;a="";this.isToolTipDefinedInData=!0;for(var h=0;h<e.length;h++)if(e[h].dataSeries.toolTipContent||e[h].dataPoint.toolTipContent){this.isToolTipDefinedInData=!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))e={chart:this.chart,toolTip:this.options,entries:e},
|
|
956
956
|
c=this.contentFormatter?this.contentFormatter(e):this.content(e);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var k=null,l="",h=0;h<e.length;h++){b=e[h].dataSeries;d=e[h].dataPoint;g=e[h].index;a="";if(0===h&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?l+="undefined"!==typeof this.chart.axisX[0].labels[d.x]?this.chart.axisX[0].labels[d.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(l+="undefined"!==typeof this.chart.axisX2[0].labels[d.x]?
|
|
957
957
|
this.chart.axisX2[0].labels[d.x]:"{x}");l+="</br>";if(!b.visible)continue;l=this.chart.replaceKeywordsWithValue(l,d,b,g)}null===d.toolTipContent||"undefined"===typeof d.toolTipContent&&null===b.options.toolTipContent||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"column"===b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===
|
|
@@ -987,13 +987,13 @@ b.eventParameter={x:c.x,y:c.y,dataPoint:g,dataSeries:d.options,dataPointIndex:h,
|
|
|
987
987
|
click:"click"};e.push(this.objectMap[d.id])}else"legendItem"===b.objectType&&(d=this.chart.data[b.dataSeriesIndex],g=null!==b.dataPointIndex?d.dataPoints[b.dataPointIndex]:null,b.eventParameter={x:c.x,y:c.y,dataSeries:d.options,dataPoint:g,dataPointIndex:b.dataPointIndex,dataSeriesIndex:b.dataSeriesIndex,chart:this.chart},b.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},e.push(b));
|
|
988
988
|
d=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){g=!0;for(b=0;b<e.length;b++)if(e[b].id===this.mouseoveredObjectMaps[c].id){g=!1;break}g?this.fireEvent(this.mouseoveredObjectMaps[c],"mouseout",a):d.push(this.mouseoveredObjectMaps[c])}this.mouseoveredObjectMaps=d;for(c=0;c<e.length;c++){d=!1;for(b=0;b<this.mouseoveredObjectMaps.length;b++)if(e[c].id===this.mouseoveredObjectMaps[b].id){d=!0;break}d||(this.fireEvent(e[c],"mouseover",a),this.mouseoveredObjectMaps.push(e[c]));"click"===a.type?this.fireEvent(e[c],
|
|
989
989
|
"click",a):"mousemove"===a.type&&this.fireEvent(e[c],"mousemove",a)}}};ia.prototype.fireEvent=function(a,e,c){if(a&&e){var b=a.eventParameter,d=a.eventContext,g=a.eventContext.userContext;g&&(d&&g[d[e]])&&g[d[e]].call(g,b);"mouseout"!==e?g.cursor&&g.cursor!==c.target.style.cursor&&(c.target.style.cursor=g.cursor):(c.target.style.cursor=this.chart.panEnabled?"itemmouseout"!==d.mouseout||g.dockInsidePlotArea?"move":this.chart._defaultCursor:this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);
|
|
990
|
-
"click"===e&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],b);"click"===e&&("dataPoint"===a.objectType&&this.chart.funnelPyramidClickHandler)&&this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex],b)}};ma.prototype.animate=function(a,e,c,b,d){var g=this;this.chart.isAnimating=!0;d=d||
|
|
990
|
+
"click"===e&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],b);"click"===e&&("dataPoint"===a.objectType&&this.chart.funnelPyramidClickHandler)&&this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex],b)}};ma.prototype.animate=function(a,e,c,b,d){var g=this;this.chart.isAnimating=!0;d=d||N.easing.linear;c&&this.animations.push({startTime:(new Date).getTime()+(a?a:0),duration:e,animationCallback:c,
|
|
991
991
|
onComplete:b});for(a=[];0<this.animations.length;)if(e=this.animations.shift(),c=(new Date).getTime(),b=0,e.startTime<=c&&(b=d(Math.min(c-e.startTime,e.duration),0,1,e.duration),b=Math.min(b,1),isNaN(b)||!isFinite(b))&&(b=1),1>b&&a.push(e),e.animationCallback(b),1<=b&&e.onComplete)e.onComplete();this.animations=a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,function(){g.animate.call(g)}):this.chart.isAnimating=!1};ma.prototype.cancelAllAnimations=function(){this.animations=
|
|
992
|
-
[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var
|
|
992
|
+
[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var N={yScaleAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas,d=e.animationBase;c.drawImage(b,0,0,b.width,b.height,0,d-d*a,c.canvas.width/ka,a*c.canvas.height/ka)}},xScaleAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas,d=e.animationBase;c.drawImage(b,0,0,b.width,b.height,d-d*a,0,a*c.canvas.width/ka,c.canvas.height/
|
|
993
993
|
ka)}},xClipAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ka,b.height/ka);c.restore()}},fadeInAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ka,c.canvas.height/ka);c.restore()}},easing:{linear:function(a,e,c,b){return c*a/b+e},easeOutQuad:function(a,e,c,b){return-c*(a/=b)*(a-2)+e},easeOutQuart:function(a,e,c,b){return-c*
|
|
994
994
|
((a=a/b-1)*a*a*a-1)+e},easeInQuad:function(a,e,c,b){return c*(a/=b)*a+e},easeInQuart:function(a,e,c,b){return c*(a/=b)*a*a*a+e}}},Y={drawMarker:function(a,e,c,b,d,g,h,k){if(c){var l=1;c.fillStyle=g?g:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=k?k:0;c.setLineDash&&c.setLineDash(K("solid",k));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"square"===b?
|
|
995
995
|
(c.beginPath(),c.rect(a-d/2,e-d/2,d,d),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"triangle"===b?(c.beginPath(),c.moveTo(a-d/2,e+d/2),c.lineTo(a+d/2,e+d/2),c.lineTo(a,e-d/2),c.closePath(),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l)),c.beginPath()):"cross"===b&&(c.strokeStyle=g,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),
|
|
996
|
-
c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return s}();s.version="v3.15.
|
|
996
|
+
c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return s}();s.version="v3.15.12 GA";window.CanvasJS&&(s&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=s)})();
|
|
997
997
|
|
|
998
998
|
/*
|
|
999
999
|
excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
|