@canvasjs/charts 3.8.5 → 3.8.6
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 +73 -73
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.8.
|
|
2
|
+
CanvasJS Chart - v3.8.6 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -25,24 +25,24 @@ ya.appendChild(D);sa.appendChild(ya)}ya.style.display="";K(ya,{position:"absolut
|
|
|
25
25
|
2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[d||"solid"])for(var v=0;v<p.length;v++)p[v]*=l;else p=[];return p}function I(d,l,T,v,$){v=v||[];$=p($)?hb?{passive:!1,capture:!1}:!1:$;v.push([d,l,T,$]);return d.addEventListener?(d.addEventListener(l,T,$),T):d.attachEvent?(v=function(l){l=l||window.event;l.preventDefault=l.preventDefault||function(){l.returnValue=!1};l.stopPropagation=l.stopPropagation||function(){l.cancelBubble=!0};T.call(d,l)},d.attachEvent("on"+l,v),v):
|
|
26
26
|
!1}function ib(d){if(d._menuButton)d.exportEnabled?(K(d._menuButton,{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor}),Ma(d._menuButton),ta(d,d._menuButton,"menu"),0>=navigator.userAgent.search("MSIE")&&d._menuButton.childNodes[0]&&K(d._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"})):xa(d._menuButton);else if(d.exportEnabled&&v){var l=!1;d._menuButton=document.createElement("button");ta(d,d._menuButton,"menu");d._toolBar.appendChild(d._menuButton);
|
|
27
27
|
I(d._menuButton,"touchstart",function(d){l=!0},d.allDOMEventHandlers);I(d._menuButton,"click",function(){"none"!==d._dropdownMenu.style.display||d._dropDownCloseTime&&500>=(new Date).getTime()-d._dropDownCloseTime.getTime()||(d._dropdownMenu.style.display="block",d._menuButton.blur(),d._dropdownMenu.focus())},d.allDOMEventHandlers,!0);I(d._menuButton,"mousemove",function(){l||(K(d._menuButton,{backgroundColor:d.toolbar.itemBackgroundColorOnHover,color:d.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
|
|
28
|
-
K(d._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},d.allDOMEventHandlers,!0);I(d._menuButton,"mouseout",function(){l||(K(d._menuButton,{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&K(d._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},d.allDOMEventHandlers,!0)}if(d.exportEnabled&&d._dropdownMenu){var p
|
|
29
|
-
color:d.toolbar.fontColor,boxShadow:"2px 2px 10px "+p});for(var p=d._dropdownMenu.childNodes,V=[d._cultureInfo.printText,d._cultureInfo.saveJPGText,d._cultureInfo.savePNGText],$=0;$<V.length;$++)K(p[$],{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor}),p[$].innerHTML=V[$]}else!d._dropdownMenu&&(d.exportEnabled&&v)&&(l=!1,d._dropdownMenu=document.createElement("div"),d._dropdownMenu.setAttribute("tabindex",-1),p
|
|
30
|
-
{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:d.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px "+p}),d._dropdownMenu.style.display="none",d._toolBar.appendChild(d._dropdownMenu),I(d._dropdownMenu,
|
|
31
|
-
d._dropDownCloseTime=new Date},d.allDOMEventHandlers,!0),p=document.createElement("div"),K(p,{padding:"12px 8px 12px 8px"}),p.innerHTML=d._cultureInfo.printText,p.style.backgroundColor=d.toolbar.itemBackgroundColor,p.style.color=d.toolbar.fontColor,d._dropdownMenu.appendChild(p),I(p,"touchstart",function(d){l=!0},d.allDOMEventHandlers),I(p,"mousemove",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColorOnHover,this.style.color=d.toolbar.fontColorOnHover)},
|
|
32
|
-
|
|
33
|
-
I(p,"mousemove",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColorOnHover,this.style.color=d.toolbar.fontColorOnHover)},d.allDOMEventHandlers,!0),I(p,"mouseout",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColor,this.style.color=d.toolbar.fontColor)},d.allDOMEventHandlers,!0),I(p,"click",function(){d.exportChart({format:"jpeg",fileName:d.exportFileName});xa(d._dropdownMenu)},d.allDOMEventHandlers,!0),p=document.createElement("div"),
|
|
34
|
-
p.innerHTML=d._cultureInfo.savePNGText,p.style.backgroundColor=d.toolbar.itemBackgroundColor,p.style.color=d.toolbar.fontColor,d._dropdownMenu.appendChild(p),I(p,"touchstart",function(d){l=!0},d.allDOMEventHandlers),I(p,"mousemove",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColorOnHover,this.style.color=d.toolbar.fontColorOnHover)},d.allDOMEventHandlers,!0),I(p,"mouseout",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColor,
|
|
35
|
-
d.allDOMEventHandlers,!0),I(p,"click",function(){d.exportChart({format:"png",fileName:d.exportFileName});xa(d._dropdownMenu)},d.allDOMEventHandlers,!0))}function bb(d,l,p){d*=ma;l*=ma;d=p.getImageData(d,l,2,2).data;l=!0;for(p=0;4>p;p++)if(d[p]!==d[p+4]|d[p]!==d[p+8]|d[p]!==d[p+12]){l=!1;break}return l?d[0]<<16|d[1]<<8|d[2]:0}function na(d,l,p){return d in l?l[d]:p[d]}function Na(d,l,T,V){v&&cb?(V=!p(V)&&V?d.getContext("2d",{willReadFrequently:!0}):d.getContext("2d"),
|
|
36
|
-
V.mozBackingStorePixelRatio||V.msBackingStorePixelRatio||V.oBackingStorePixelRatio||V.backingStorePixelRatio||1,ma=Ua/Oa,d.width=l*ma,d.height=T*ma,Ua!==Oa&&(d.style.width=l+"px",d.style.height=T+"px",V.scale(ma,ma))):(d.width=l,d.height=T)}function jb(d){if(!kb){var l=!1,p=!1;"undefined"===typeof ra.Chart.creditHref?(d.creditHref=ja("iuuqr;..b`ow`rkr/bnl."),d.creditText=ja("B`ow`rKR/bnl")):(l=d.updateOption("creditText"),p=d.updateOption("creditHref"));if(d.creditHref&&
|
|
37
|
-
(d._creditLink=document.createElement("a"),d._creditLink.setAttribute("class","canvasjs-chart-credit"),d._creditLink.setAttribute("title","JavaScript Charts"),K(d._creditLink,{outline:"none",margin:"0px",position:"absolute",right:"2px",top:d.height-14+"px",color:"dimgrey",textDecoration:"none",fontSize:"11px",fontFamily:"Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"}),d._creditLink.setAttribute("tabIndex",-1),d._creditLink.setAttribute("target","_blank"));
|
|
38
|
-
p)d._creditLink.setAttribute("href",d.creditHref),d._creditLink.innerHTML=d.creditText;d._creditLink&&d.creditHref&&d.creditText?(d._creditLink.parentElement||d._canvasJSContainer.appendChild(d._creditLink),d._creditLink.style.top=d.height-14+"px"):d._creditLink.parentElement&&d._canvasJSContainer.removeChild(d._creditLink)}}}function va(d,l,p){Ia&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var V=document.createElement("canvas");V.setAttribute("class","canvasjs-chart-canvas");
|
|
39
|
-
d,l,p);v||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(V);return V}function K(d,l){for(var p in l)d.style[p]=l[p]}function ta(d,l,p){l.getAttribute("state")||(l.style.backgroundColor=d.toolbar.itemBackgroundColor,l.style.color=d.toolbar.fontColor,l.style.border="none",K(l,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));l.getAttribute("state")!==p&&(l.setAttribute("state",p),l.setAttribute("type","button"),K(l,{padding:"5px 12px",
|
|
40
|
-
"float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),l.innerHTML="<img src='"+lb[p].image+"' alt='"+d._cultureInfo[p+"Text"]+"' />",K(l.childNodes[0],{height:"95%",pointerEvents:"none"}));l.setAttribute("title",d._cultureInfo[p+"Text"])}function Ma(){for(var d=null,l=0;l<arguments.length;l++)d=arguments[l],d.style&&(d.style.display="inline")}function xa(){for(var d=null,l=0;l<arguments.length;l++)(d=arguments[l])&&d.style&&(d.style.display=
|
|
41
|
-
l,p,v,$){if(null===d||"undefined"===typeof d)return"undefined"===typeof p?l:p;d=parseFloat(d.toString())*(0<=d.toString().indexOf("%")?l/100:1);"undefined"!==typeof v&&(d=Math.min(v,d),"undefined"!==typeof $&&(d=Math.max($,d)));return!isNaN(d)&&d<=l&&0<=d?d:"undefined"===typeof p?l:p}function Z(d,l,v,V,$){this._defaultsKey=d;this._themeOptionsKey=l;this._index=V;this.parent=$;this._eventListeners=[];d={};this.theme&&p(this.parent)&&p(l)&&p(V)?d=p(this.predefinedThemes[this.theme])?
|
|
42
|
-
this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[l])&&(null===V?d=this.parent.themeOptions[l]:0<this.parent.themeOptions[l].length&&(V=Math.min(this.parent.themeOptions[l].length-1,V),d=this.parent.themeOptions[l][V]));this.themeOptions=d;this.options=v?v:{_isPlaceholder:!0};this.setOptions(this.options,d)}function Fa(d,l,p,v,$){"undefined"===typeof $&&($=0);this._padding=$;this._x1=d;this._y1=l;this._x2=p;this._y2=v;this._rightOccupied=
|
|
43
|
-
this._bottomOccupied=this._topOccupied=this._padding}function ka(d,l){ka.base.constructor.call(this,"TextBlock",null,l,null,null);this.ctx=d;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Wa(d,l){Wa.base.constructor.call(this,"Toolbar","toolbar",l,null,d);this.chart=d;this.canvas=d.canvas;this.ctx=this.chart.ctx;this.optionsName="toolbar"}function Ba(d,l){Ba.base.constructor.call(this,"Title","title",l,null,d);this.chart=d;this.canvas=d.canvas;this.ctx=this.chart.ctx;
|
|
44
|
-
"title";if(p(this.options.margin)&&d.options.subtitles)for(var v=d.options.subtitles,V=0;V<v.length;V++)if((p(v[V].horizontalAlign)&&"center"===this.horizontalAlign||v[V].horizontalAlign===this.horizontalAlign)&&(p(v[V].verticalAlign)&&"top"===this.verticalAlign||v[V].verticalAlign===this.verticalAlign)&&!v[V].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=
|
|
45
|
-
null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ja(d,l,p){Ja.base.constructor.call(this,"Subtitle","subtitles",l,p,d);this.chart=d;this.canvas=d.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;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Xa(){this.pool=[]}function Ka(d){var l;d&&La[d]&&(l=La[d]);Ka.base.constructor.call(this,
|
|
28
|
+
K(d._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},d.allDOMEventHandlers,!0);I(d._menuButton,"mouseout",function(){l||(K(d._menuButton,{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&K(d._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},d.allDOMEventHandlers,!0)}if(d.exportEnabled&&d._dropdownMenu){var p=d.theme&&-1!==d.theme.indexOf("dark")?"black":"#888888";K(d._dropdownMenu,
|
|
29
|
+
{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor,boxShadow:"2px 2px 10px "+p});for(var p=d._dropdownMenu.childNodes,V=[d._cultureInfo.printText,d._cultureInfo.saveJPGText,d._cultureInfo.savePNGText],$=0;$<V.length;$++)K(p[$],{backgroundColor:d.toolbar.itemBackgroundColor,color:d.toolbar.fontColor}),p[$].innerHTML=V[$]}else!d._dropdownMenu&&(d.exportEnabled&&v)&&(l=!1,d._dropdownMenu=document.createElement("div"),d._dropdownMenu.setAttribute("tabindex",-1),p=d.theme&&-1!==d.theme.indexOf("dark")?
|
|
30
|
+
"black":"#888888",K(d._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:d.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px "+p}),d._dropdownMenu.style.display="none",d._toolBar.appendChild(d._dropdownMenu),I(d._dropdownMenu,
|
|
31
|
+
"blur",function(){xa(d._dropdownMenu);d._dropDownCloseTime=new Date},d.allDOMEventHandlers,!0),p=document.createElement("div"),K(p,{padding:"12px 8px 12px 8px"}),p.innerHTML=d._cultureInfo.printText,p.style.backgroundColor=d.toolbar.itemBackgroundColor,p.style.color=d.toolbar.fontColor,d._dropdownMenu.appendChild(p),I(p,"touchstart",function(d){l=!0},d.allDOMEventHandlers),I(p,"mousemove",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColorOnHover,this.style.color=d.toolbar.fontColorOnHover)},
|
|
32
|
+
d.allDOMEventHandlers,!0),I(p,"mouseout",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColor,this.style.color=d.toolbar.fontColor)},d.allDOMEventHandlers,!0),I(p,"click",function(){d.print();xa(d._dropdownMenu)},d.allDOMEventHandlers,!0),p=document.createElement("div"),K(p,{padding:"12px 8px 12px 8px"}),p.innerHTML=d._cultureInfo.saveJPGText,p.style.backgroundColor=d.toolbar.itemBackgroundColor,p.style.color=d.toolbar.fontColor,d._dropdownMenu.appendChild(p),I(p,"touchstart",function(d){l=
|
|
33
|
+
!0},d.allDOMEventHandlers),I(p,"mousemove",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColorOnHover,this.style.color=d.toolbar.fontColorOnHover)},d.allDOMEventHandlers,!0),I(p,"mouseout",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColor,this.style.color=d.toolbar.fontColor)},d.allDOMEventHandlers,!0),I(p,"click",function(){d.exportChart({format:"jpeg",fileName:d.exportFileName});xa(d._dropdownMenu)},d.allDOMEventHandlers,!0),p=document.createElement("div"),
|
|
34
|
+
K(p,{padding:"12px 8px 12px 8px"}),p.innerHTML=d._cultureInfo.savePNGText,p.style.backgroundColor=d.toolbar.itemBackgroundColor,p.style.color=d.toolbar.fontColor,d._dropdownMenu.appendChild(p),I(p,"touchstart",function(d){l=!0},d.allDOMEventHandlers),I(p,"mousemove",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColorOnHover,this.style.color=d.toolbar.fontColorOnHover)},d.allDOMEventHandlers,!0),I(p,"mouseout",function(){l||(this.style.backgroundColor=d.toolbar.itemBackgroundColor,
|
|
35
|
+
this.style.color=d.toolbar.fontColor)},d.allDOMEventHandlers,!0),I(p,"click",function(){d.exportChart({format:"png",fileName:d.exportFileName});xa(d._dropdownMenu)},d.allDOMEventHandlers,!0))}function bb(d,l,p){d*=ma;l*=ma;d=p.getImageData(d,l,2,2).data;l=!0;for(p=0;4>p;p++)if(d[p]!==d[p+4]|d[p]!==d[p+8]|d[p]!==d[p+12]){l=!1;break}return l?d[0]<<16|d[1]<<8|d[2]:0}function na(d,l,p){return d in l?l[d]:p[d]}function Na(d,l,T,V){v&&cb?(V=!p(V)&&V?d.getContext("2d",{willReadFrequently:!0}):d.getContext("2d"),
|
|
36
|
+
Oa=V.webkitBackingStorePixelRatio||V.mozBackingStorePixelRatio||V.msBackingStorePixelRatio||V.oBackingStorePixelRatio||V.backingStorePixelRatio||1,ma=Ua/Oa,d.width=l*ma,d.height=T*ma,Ua!==Oa&&(d.style.width=l+"px",d.style.height=T+"px",V.scale(ma,ma))):(d.width=l,d.height=T)}function jb(d){if(!kb){var l=!1,p=!1;"undefined"===typeof ra.Chart.creditHref?(d.creditHref=ja("iuuqr;..b`ow`rkr/bnl."),d.creditText=ja("B`ow`rKR/bnl")):(l=d.updateOption("creditText"),p=d.updateOption("creditHref"));if(d.creditHref&&
|
|
37
|
+
d.creditText){d._creditLink||(d._creditLink=document.createElement("a"),d._creditLink.setAttribute("class","canvasjs-chart-credit"),d._creditLink.setAttribute("title","JavaScript Charts"),K(d._creditLink,{outline:"none",margin:"0px",position:"absolute",right:"2px",top:d.height-14+"px",color:"dimgrey",textDecoration:"none",fontSize:"11px",fontFamily:"Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"}),d._creditLink.setAttribute("tabIndex",-1),d._creditLink.setAttribute("target","_blank"));
|
|
38
|
+
if(0===d.renderCount||l||p)d._creditLink.setAttribute("href",d.creditHref),d._creditLink.innerHTML=d.creditText;d._creditLink&&d.creditHref&&d.creditText?(d._creditLink.parentElement||d._canvasJSContainer.appendChild(d._creditLink),d._creditLink.style.top=d.height-14+"px"):d._creditLink.parentElement&&d._canvasJSContainer.removeChild(d._creditLink)}}}function va(d,l,p){Ia&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var V=document.createElement("canvas");V.setAttribute("class","canvasjs-chart-canvas");
|
|
39
|
+
Na(V,d,l,p);v||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(V);return V}function K(d,l){for(var p in l)d.style[p]=l[p]}function ta(d,l,p){l.getAttribute("state")||(l.style.backgroundColor=d.toolbar.itemBackgroundColor,l.style.color=d.toolbar.fontColor,l.style.border="none",K(l,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));l.getAttribute("state")!==p&&(l.setAttribute("state",p),l.setAttribute("type","button"),K(l,{padding:"5px 12px",
|
|
40
|
+
cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),l.innerHTML="<img src='"+lb[p].image+"' alt='"+d._cultureInfo[p+"Text"]+"' />",K(l.childNodes[0],{height:"95%",pointerEvents:"none"}));l.setAttribute("title",d._cultureInfo[p+"Text"])}function Ma(){for(var d=null,l=0;l<arguments.length;l++)d=arguments[l],d.style&&(d.style.display="inline")}function xa(){for(var d=null,l=0;l<arguments.length;l++)(d=arguments[l])&&d.style&&(d.style.display=
|
|
41
|
+
"none")}function Va(d,l,p,v,$){if(null===d||"undefined"===typeof d)return"undefined"===typeof p?l:p;d=parseFloat(d.toString())*(0<=d.toString().indexOf("%")?l/100:1);"undefined"!==typeof v&&(d=Math.min(v,d),"undefined"!==typeof $&&(d=Math.max($,d)));return!isNaN(d)&&d<=l&&0<=d?d:"undefined"===typeof p?l:p}function Z(d,l,v,V,$){this._defaultsKey=d;this._themeOptionsKey=l;this._index=V;this.parent=$;this._eventListeners=[];d={};this.theme&&p(this.parent)&&p(l)&&p(V)?d=p(this.predefinedThemes[this.theme])?
|
|
42
|
+
this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[l])&&(null===V?d=this.parent.themeOptions[l]:0<this.parent.themeOptions[l].length&&(V=Math.min(this.parent.themeOptions[l].length-1,V),d=this.parent.themeOptions[l][V]));this.themeOptions=d;this.options=v?v:{_isPlaceholder:!0};this.setOptions(this.options,d)}function Fa(d,l,p,v,$){"undefined"===typeof $&&($=0);this._padding=$;this._x1=d;this._y1=l;this._x2=p;this._y2=v;this._rightOccupied=
|
|
43
|
+
this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function ka(d,l){ka.base.constructor.call(this,"TextBlock",null,l,null,null);this.ctx=d;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Wa(d,l){Wa.base.constructor.call(this,"Toolbar","toolbar",l,null,d);this.chart=d;this.canvas=d.canvas;this.ctx=this.chart.ctx;this.optionsName="toolbar"}function Ba(d,l){Ba.base.constructor.call(this,"Title","title",l,null,d);this.chart=d;this.canvas=d.canvas;this.ctx=this.chart.ctx;
|
|
44
|
+
this.optionsName="title";if(p(this.options.margin)&&d.options.subtitles)for(var v=d.options.subtitles,V=0;V<v.length;V++)if((p(v[V].horizontalAlign)&&"center"===this.horizontalAlign||v[V].horizontalAlign===this.horizontalAlign)&&(p(v[V].verticalAlign)&&"top"===this.verticalAlign||v[V].verticalAlign===this.verticalAlign)&&!v[V].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=
|
|
45
|
+
this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ja(d,l,p){Ja.base.constructor.call(this,"Subtitle","subtitles",l,p,d);this.chart=d;this.canvas=d.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;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Xa(){this.pool=[]}function Ka(d){var l;d&&La[d]&&(l=La[d]);Ka.base.constructor.call(this,
|
|
46
46
|
"CultureInfo",null,l,null,null)}var Ia=!1,wa={},v=!!document.createElement("canvas").getContext,ra={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",interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",
|
|
47
47
|
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",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:v?"transparent":null,margin:5,wrap:!0,
|
|
48
48
|
maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Subtitle:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:14,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,margin:2,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Toolbar:{itemBackgroundColor:"white",
|
|
@@ -165,29 +165,29 @@ function oa(a,e){oa.base.constructor.call(this,"ToolTip","toolTip",e,null,a);thi
|
|
|
165
165
|
null;this.ghostCanvas=va(this.chart.width,this.chart.height,!0);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function X(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;this.animations=[];this.animationRequestId=null}qa(l,Z);l.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&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],f=a[e][2],h=a[e][3],h=h||!1;
|
|
166
166
|
c.removeEventListener?c.removeEventListener(b,f,h):c.detachEvent&&c.detachEvent("on"+b,f)}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);for(;this._dropdownMenu&&this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild);
|
|
167
167
|
this.container=this._canvasJSContainer=null;this.toolTip.container=null;this.canvas&&za(this.canvas);this.overlaidCanvas&&za(this.overlaidCanvas);this._preRenderCanvas&&za(this._preRenderCanvas);this._breaksCanvas&&za(this._breaksCanvas);this._eventManager&&this._eventManager.ghostCanvas&&za(this._eventManager.ghostCanvas);this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=this._zoomButton=null};l.prototype._updateOptions=function(){var a=this;this.updateOption("width");this.updateOption("height");
|
|
168
|
-
this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.updateOption("colorSet")&&(this.selectedColorSet="undefined"!==typeof Ca[this.colorSet]?Ca[this.colorSet]:Ca.colorSet1);this.updateOption("backgroundColor");this.stockChart&&
|
|
169
|
-
this.stockChart.backgroundColor);this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this._cultureInfo=new Ka(this.options.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&v;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");
|
|
170
|
-
if(this.options.zoomEnabled||this.panEnabled){if(this._zoomButton)K(this._zoomButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),ta(this,this._zoomButton,"zoom"),0>=navigator.userAgent.search("MSIE")&&this._zoomButton.childNodes[0]&&
|
|
171
|
-
ta(this,this._zoomButton,"pan");this._toolBar.appendChild(this._zoomButton);this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor;I(this._zoomButton,"touchstart",function(a){e=!0},this.allDOMEventHandlers);I(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,
|
|
172
|
-
function(){e?e=!1:(K(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&K(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);I(this._zoomButton,"mouseout",
|
|
173
|
-
K(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?(K(this._resetButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=
|
|
174
|
-
(e=!1,xa(this._resetButton=document.createElement("button")),ta(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor,this._toolBar.appendChild(this._resetButton),I(this._resetButton,
|
|
175
|
-
a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,ta(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=
|
|
176
|
-
null,a.sessionVariables.
|
|
177
|
-
{WebkitFilter:"invert(0%)",filter:"invert(0%)"});xa(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter={stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,maximum:null});a._dispatchRangeEvent("rangeChanging","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanging",
|
|
178
|
-
"reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,a.stockChart))},this.allDOMEventHandlers),I(this._resetButton,"mousemove",function(){e||(K(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,
|
|
179
|
-
this.allDOMEventHandlers),I(this._resetButton,"mouseout",function(){e||(K(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&K(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers),
|
|
180
|
-
(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),Ma(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))}else this.panEnabled=this.zoomEnabled=!1;ib(this);"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?ta(a,a._zoomButton,"zoom"):ta(a,a._zoomButton,"pan"),
|
|
181
|
-
this.options.toolTip);for(var c in this.toolTip.options)this.toolTip.options.hasOwnProperty(c)&&this.toolTip.updateOption(c)};l.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0;this.options.width?e=this.width:this.width=e=0<this.container.clientWidth?
|
|
182
|
-
c=this.height=this.stockChart._chartsHeight[this.index];if(this.canvas.width!==e*ma||this.canvas.height!==c*ma){for(var b=0;b<a.length;b++)Na(a[b],e,c);this.bounds={x1:0,y1:0,x2:this.width,y2:this.height,width:this.width,height:this.height};a=!0}else a=!1;return a};l.prototype._initialize=function(){this.isNavigator=
|
|
183
|
-
this.disableToolTip=!1;this._axes=[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=v&&this.animationEnabled&&0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=
|
|
184
|
-
this.height,this.isNavigator?0:2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];this.title=null;this.subtitles=[];var a=0,e=null;if(this.options.data){for(var c=0;c<this.options.data.length;c++)if(a++,!this.options.data[c].type||0<=l._supportedChartTypes.indexOf(this.options.data[c].type)){var b=
|
|
185
|
-
"dateTime";break}"error"===b.type&&(b.linkedDataSeriesIndex=p(this.options.data[c].linkedDataSeriesIndex)?c-1:this.options.data[c].linkedDataSeriesIndex,0>b.linkedDataSeriesIndex||b.linkedDataSeriesIndex>=this.options.data.length||"number"!==typeof b.linkedDataSeriesIndex||"error"===this.options.data[b.linkedDataSeriesIndex].type)&&
|
|
186
|
-
b.color=this.selectedColorSet[b.index%this.selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===
|
|
187
|
-
b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(d):b.dataPoints.sort(d));
|
|
188
|
-
|
|
189
|
-
'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===f&&"none"===this.plotInfo.axisPlacement&&(h='You cannot combine "'+b.type+'" with pie chart');if(h&&window.console){window.console.log(h);
|
|
190
|
-
return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=e||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=!0;this._plotAreaElements=[]};l._supportedChartTypes=Ea("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));
|
|
168
|
+
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&&p(this.options.theme))&&(this.theme=this.stockChart.theme);this.updateOption("colorSet")&&(this.selectedColorSet="undefined"!==typeof Ca[this.colorSet]?Ca[this.colorSet]:Ca.colorSet1);this.updateOption("backgroundColor");this.stockChart&&
|
|
169
|
+
(this.stockChart.options&&"undefined"!==typeof this.stockChart.options.backgroundColor&&p(this.options.backgroundColor))&&(this.backgroundColor=this.stockChart.backgroundColor);this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this._cultureInfo=new Ka(this.options.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&v;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");
|
|
170
|
+
this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.toolbar=new Wa(this,this.options.toolbar);if(this.options.zoomEnabled||this.panEnabled){if(this._zoomButton)K(this._zoomButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),ta(this,this._zoomButton,"zoom"),0>=navigator.userAgent.search("MSIE")&&this._zoomButton.childNodes[0]&&
|
|
171
|
+
K(this._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});else{var e=!1;xa(this._zoomButton=document.createElement("button"));ta(this,this._zoomButton,"pan");this._toolBar.appendChild(this._zoomButton);this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor;I(this._zoomButton,"touchstart",function(a){e=!0},this.allDOMEventHandlers);I(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,
|
|
172
|
+
ta(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,ta(a,a._zoomButton,"pan"));a.render()},this.allDOMEventHandlers);I(this._zoomButton,"mousemove",function(){e?e=!1:(K(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&K(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);I(this._zoomButton,"mouseout",
|
|
173
|
+
function(){e||(K(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&K(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?(K(this._resetButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),0>=
|
|
174
|
+
navigator.userAgent.search("MSIE")&&this._resetButton.childNodes[0]&&K(this._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}),this._resetButton.title=this._cultureInfo.resetText):(e=!1,xa(this._resetButton=document.createElement("button")),ta(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor,this._toolBar.appendChild(this._resetButton),I(this._resetButton,
|
|
175
|
+
"touchstart",function(a){e=!0},this.allDOMEventHandlers),I(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,ta(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=
|
|
176
|
+
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=null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=
|
|
177
|
+
null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();0>=navigator.userAgent.search("MSIE")&&K(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});xa(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter={stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,maximum:null});a._dispatchRangeEvent("rangeChanging","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanging",
|
|
178
|
+
a.stockChart.dispatchEvent("rangeChanging",a.stockChart._rangeEventParameter,a.stockChart));a.render();a.syncCharts&&a.syncCharts(null,null);a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,a.stockChart))},this.allDOMEventHandlers),I(this._resetButton,"mousemove",function(){e||(K(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,
|
|
179
|
+
transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&K(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),I(this._resetButton,"mouseout",function(){e||(K(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&K(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers),
|
|
180
|
+
this.overlaidCanvas.style.cursor=a._defaultCursor);this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),Ma(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))}else this.panEnabled=this.zoomEnabled=!1;ib(this);"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?ta(a,a._zoomButton,"zoom"):ta(a,a._zoomButton,"pan"),
|
|
181
|
+
a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&ta(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(var c in this.toolTip.options)this.toolTip.options.hasOwnProperty(c)&&this.toolTip.updateOption(c)};l.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0;this.options.width?e=this.width:this.width=e=0<this.container.clientWidth?
|
|
182
|
+
this.container.clientWidth:this.width;p(this.stockChart)||p(this.index)?this.options.height?c=this.height:this.height=c=0<this.container.clientHeight?this.container.clientHeight:this.height:c=this.height=this.stockChart._chartsHeight[this.index];if(this.canvas.width!==e*ma||this.canvas.height!==c*ma){for(var b=0;b<a.length;b++)Na(a[b],e,c);this.bounds={x1:0,y1:0,x2:this.width,y2:this.height,width:this.width,height:this.height};a=!0}else a=!1;return a};l.prototype._initialize=function(){this.isNavigator=
|
|
183
|
+
p(this.parent)||p(this.parent._defaultsKey)||"Navigator"!==this.parent._defaultsKey?!1:!0;this._animator?this._animator.cancelAllAnimations():this._animator=new X(this);this.removeAllEventListeners();this.disableToolTip=!1;this._axes=[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=v&&this.animationEnabled&&0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=
|
|
184
|
+
[];this._indexLabels=[];this._dataInRenderedOrder=[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,plotTypes:[]};this.layoutManager=new Fa(0,0,this.width,this.height,this.isNavigator?0:2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];this.title=null;this.subtitles=[];var a=0,e=null;if(this.options.data){for(var c=0;c<this.options.data.length;c++)if(a++,!this.options.data[c].type||0<=l._supportedChartTypes.indexOf(this.options.data[c].type)){var b=
|
|
185
|
+
new W(this,this.options.data[c],a-1,++this._eventManager.lastObjectId);if(!p(b)&&b.dataPoints)for(var f=0;f<b.dataPoints.length;f++)if(b.dataPoints[f].x&&b.dataPoints[f].x.getTime){b.xValueType="dateTime";break}"error"===b.type&&(b.linkedDataSeriesIndex=p(this.options.data[c].linkedDataSeriesIndex)?c-1:this.options.data[c].linkedDataSeriesIndex,0>b.linkedDataSeriesIndex||b.linkedDataSeriesIndex>=this.options.data.length||"number"!==typeof b.linkedDataSeriesIndex||"error"===this.options.data[b.linkedDataSeriesIndex].type)&&
|
|
186
|
+
(b.linkedDataSeriesIndex=null);null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data.length?(b._colorSet=[this.selectedColorSet[b.index%this.selectedColorSet.length]],b.color=this.selectedColorSet[b.index%this.selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===
|
|
187
|
+
b.type||"ohlc"===b.type||"waterfall"===b.type||"boxAndWhisker"===b.type?[this.selectedColorSet[0]]:this.selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(d):b.dataPoints.sort(d));
|
|
188
|
+
this.data.push(b);var f=b.axisPlacement,e=e||f,h;"normal"===f?"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===f?"normal"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?h='You cannot combine "'+
|
|
189
|
+
b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===f?"normal"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===f&&"none"===this.plotInfo.axisPlacement&&(h='You cannot combine "'+b.type+'" with pie chart');if(h&&window.console){window.console.log(h);
|
|
190
|
+
return}}for(c=0;c<this.data.length;c++){if("none"==e&&"error"===this.data[c].type&&window.console){window.console.log('You cannot combine "'+b.type+'" with error chart');return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=e||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=!0;this._plotAreaElements=[]};l._supportedChartTypes=Ea("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));
|
|
191
191
|
l.prototype.setLayout=function(){for(var a=this._plotAreaElements,e=0;e<this.data.length;e++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[e].axisYType||"primary"===this.data[e].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new D(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===
|
|
192
192
|
this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new D(this,"axisY",this.options.axisY[c],c,"axisY","bottom"));this.data[e].axisY=this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?this.data[e].axisYIndex:0];this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?this.data[e].axisYIndex:0].dataSeries.push(this.data[e])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new D(this,"axisY",this.options.axisY,
|
|
193
193
|
0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new D(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[e].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[e]);if("secondary"===this.data[e].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(c=0;c<this.options.axisY2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[c]=new D(this,"axisY2",this.options.axisY2[c],c,
|
|
@@ -572,12 +572,12 @@ new ka(this.ctx,{x:0,y:0,maxWidth:u,maxHeight:!0===this.itemWrap?r:1.5*this.font
|
|
|
572
572
|
width:0},k.push(q)):(q=k[z],z=(z+1)%k.length),q&&(this.height+=n.textBlock.height?n.textBlock.height:this.lineHeight,n.textBlock.x=q.width,n.textBlock.y=0,q.width+=Math.round(n.textBlock.width+w+d+(0===q.width?0:this.horizontalSpacing)+("line"===n.chartType||"spline"===n.chartType||"stepLine"===n.chartType?2*0.1*this.lineHeight:0)),q.items.push(n),this.width=Math.max(q.width,this.width))}this.height=!1===this.itemWrap?k.length*this.lineHeight:this.height+g;this.height=Math.min(r,this.height);this.width=
|
|
573
573
|
Math.min(h,this.width)}"top"===this.verticalAlign?(f="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,b=e.y1):"center"===this.verticalAlign?(f="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,b=e.y1+e.height/2-this.height/2):"bottom"===this.verticalAlign&&(f="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,b=e.y2-this.height);
|
|
574
574
|
this.items=l;for(m=0;m<this.items.length;m++)n=l[m],n.id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[n.id]={id:n.id,objectType:"legendItem",legendItemIndex:m,dataSeriesIndex:n.dataSeriesIndex,dataPointIndex:n.dataPointIndex};this.markerSize=w;this.rows=k;0<l.length&&a.layoutManager.registerSpace(c,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:f,y1:b,x2:f+this.width,y2:b+this.height}};S.prototype.render=function(){var a=this.bounds.x1,e=this.bounds.y1,
|
|
575
|
-
c=this.markerMargin,b=this.maxWidth,f=this.maxHeight,h=this.markerSize,
|
|
576
|
-
this.ctx.save();this.ctx.beginPath();this.ctx.rect(a,e,b,Math.max(f-f%this.lineHeight,0));this.ctx.clip();if("line"===n.chartType||"stepLine"===n.chartType||"spline"===n.chartType)this.ctx.strokeStyle=n.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(g-0.1*this.lineHeight,
|
|
577
|
-
this.ctx.lineWidth=h/8;this.ctx.beginPath();var
|
|
578
|
-
n.chartType||"line"===n.chartType||"spline"===n.chartType?n.markerSize/2:n.markerSize,n.markerColor,n.markerBorderColor,n.markerBorderThickness);n.textBlock.x=g+c+h;if("line"===n.chartType||"stepLine"===n.chartType||"spline"===n.chartType)n.textBlock.x+=0.1*this.lineHeight;n.textBlock.y=Math.round(
|
|
575
|
+
c=this.markerMargin,b=this.maxWidth,f=this.maxHeight,h=this.markerSize,d=this.rows;(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(a,e,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var p=0,l=0;l<d.length;l++){for(var k=d[l],m=0,q=0;q<k.items.length;q++){var n=k.items[q],g=n.textBlock.x+a+(0===q?0.2*h:this.horizontalSpacing),v=e+p,w=g;this.chart.data[n.dataSeriesIndex].visible||(this.ctx.globalAlpha=0.5);
|
|
576
|
+
this.ctx.save();this.ctx.beginPath();this.ctx.rect(a,e,b,Math.max(f-f%this.lineHeight,0));this.ctx.clip();if("line"===n.chartType||"stepLine"===n.chartType||"spline"===n.chartType)this.ctx.strokeStyle=n.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(g-0.1*this.lineHeight,v+this.lineHeight/2),this.ctx.lineTo(g+0.85*this.lineHeight,v+this.lineHeight/2),this.ctx.stroke(),w-=0.1*this.lineHeight;if("error"===n.chartType){this.ctx.strokeStyle=this.errorMarkerColor[0];
|
|
577
|
+
this.ctx.lineWidth=h/8;this.ctx.beginPath();var y=g-0.08*this.lineHeight+0.1*this.lineHeight,s=v+0.15*this.lineHeight,z=0.7*this.lineHeight,u=z+0.02*this.lineHeight;this.ctx.moveTo(y,s);this.ctx.lineTo(y+z,s);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(y+z/2,s);this.ctx.lineTo(y+z/2,s+u);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(y,s+u);this.ctx.lineTo(y+z,s+u);this.ctx.stroke();this.errorMarkerColor.shift()}Y.drawMarker(g+h/2,v+this.lineHeight/2,this.ctx,n.markerType,"error"===
|
|
578
|
+
n.chartType||"line"===n.chartType||"spline"===n.chartType?n.markerSize/2:n.markerSize,n.markerColor,n.markerBorderColor,n.markerBorderThickness);n.textBlock.x=g+c+h;if("line"===n.chartType||"stepLine"===n.chartType||"spline"===n.chartType)n.textBlock.x+=0.1*this.lineHeight;n.textBlock.y=Math.round(v+this.lineHeight/2);n.textBlock.render(!0);this.ctx.restore();m=0<q?Math.max(m,n.textBlock.height?n.textBlock.height:this.lineHeight):n.textBlock.height?n.textBlock.height:this.lineHeight;this.chart.data[n.dataSeriesIndex].visible||
|
|
579
579
|
(this.ctx.globalAlpha=1);g=O(n.id);this.ghostCtx.fillStyle=g;this.ghostCtx.beginPath();this.ghostCtx.fillRect(w,n.textBlock.y-this.lineHeight/2,n.textBlock.x+n.textBlock.width-w,n.textBlock.height?n.textBlock.height:this.lineHeight);n.x1=this.chart._eventManager.objectMap[n.id].x1=w;n.y1=this.chart._eventManager.objectMap[n.id].y1=n.textBlock.y-this.lineHeight/2;n.x2=this.chart._eventManager.objectMap[n.id].x2=n.textBlock.x+n.textBlock.width;n.y2=this.chart._eventManager.objectMap[n.id].y2=n.textBlock.y+
|
|
580
|
-
(n.textBlock.height?n.textBlock.height:this.lineHeight)-this.lineHeight/2}
|
|
580
|
+
(n.textBlock.height?n.textBlock.height:this.lineHeight)-this.lineHeight/2}p+=m}};qa(W,Z);W.prototype.getDefaultAxisPlacement=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||
|
|
581
581
|
"boxAndWhisker"===a||"waterfall"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===a)return"xySwapped";if("pie"===a||"doughnut"===a||"funnel"===a||"pyramid"===a)return"none";"error"!==a&&window.console.log("Unknown Chart Type: "+a);return null};W.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"===
|
|
582
582
|
a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===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};W.prototype.getDataPointAtX=function(a,e){if(!this.dataPoints||
|
|
583
583
|
0===this.dataPoints.length)return null;var c={dataPoint:null,distance:Infinity,index:NaN},b=null,f=0,h=0,d=1,p=Infinity,l=0,k=0,m=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?(m=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),m=1<m?Math.min(Math.max((this.dataPoints.length-1)/m*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(m=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,m=0<m?Math.min(Math.max((this.dataPoints.length-
|
|
@@ -874,8 +874,8 @@ this.updateOption("reversed");this.updateOption("backgroundColor");this.updateOp
|
|
|
874
874
|
"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)";this.container.style.zIndex="1000";this.container.style.pointerEvents="none";this.container.style.display="none";var a=document.createElement("div");a.style.width="auto";a.style.height="auto";a.style.minWidth="50px";a.style.lineHeight="normal";a.style.margin="0px 0px 0px 0px";a.style.padding="5px";a.style.fontFamily="Calibri, Arial, Georgia, serif";
|
|
875
875
|
a.style.fontWeight="normal";a.style.fontStyle=v?"italic":"normal";a.style.fontSize="14px";a.style.color="#000000";a.style.textShadow="1px 1px 1px rgba(0, 0, 0, 0.1)";a.style.textAlign="left";a.style.border="2px solid gray";a.style.background=v?"rgba(255,255,255,.9)":"rgb(255,255,255)";a.style.textIndent="0px";a.style.whiteSpace="nowrap";a.style.borderRadius="5px";a.style.MozUserSelect="none";a.style.WebkitUserSelect="none";a.style.msUserSelect="none";a.style.userSelect="none";v||(a.style.filter="alpha(opacity = 90)",
|
|
876
876
|
a.style.filter="progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666')");a.innerText="Sample Tooltip";this.container.appendChild(a);this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};oa.prototype.mouseMoveHandler=function(a,e){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),
|
|
877
|
-
this._updateToolTip(a,e)
|
|
878
|
-
e;var b=null,f=null,d=[],l=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){var t=[];if(this.chart.axisX)for(var A=0;A<this.chart.axisX.length;A++){for(var l="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX[A].convertPixelToValue({y:e}):this.chart.axisX[A].convertPixelToValue({x:a}),k=null,b=0;b<this.chart.axisX[A].dataSeries.length;b++)(k=this.chart.axisX[A].dataSeries[b].getDataPointAtX(l,c))&&0<=k.index&&(k.dataSeries=this.chart.axisX[A].dataSeries[b],
|
|
877
|
+
this._updateToolTip(a,e),this.enabled&&(this._updatedEventParameters&&!isNaN(this._prevX)&&!isNaN(this._prevY))&&this.dispatchEvent("updated",this._updatedEventParameters,this))};oa.prototype._updateToolTip=function(a,e,c){c="undefined"===typeof c?!0:c;this._updateOptions();this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof e){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;e=this._prevY}else this._prevX=
|
|
878
|
+
a,this._prevY=e;var b=null,f=null,d=[],l=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){var t=[];if(this.chart.axisX)for(var A=0;A<this.chart.axisX.length;A++){for(var l="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX[A].convertPixelToValue({y:e}):this.chart.axisX[A].convertPixelToValue({x:a}),k=null,b=0;b<this.chart.axisX[A].dataSeries.length;b++)(k=this.chart.axisX[A].dataSeries[b].getDataPointAtX(l,c))&&0<=k.index&&(k.dataSeries=this.chart.axisX[A].dataSeries[b],
|
|
879
879
|
null!==k.dataPoint.y&&k.dataSeries.visible&&t.push(k));k=null}if(this.chart.axisX2)for(A=0;A<this.chart.axisX2.length;A++){l="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX2[A].convertPixelToValue({y:e}):this.chart.axisX2[A].convertPixelToValue({x:a});k=null;for(b=0;b<this.chart.axisX2[A].dataSeries.length;b++)(k=this.chart.axisX2[A].dataSeries[b].getDataPointAtX(l,c))&&0<=k.index&&(k.dataSeries=this.chart.axisX2[A].dataSeries[b],null!==k.dataPoint.y&&k.dataSeries.visible&&t.push(k));
|
|
880
880
|
k=null}if(0===t.length)return;t.sort(function(a,b){return a.distance-b.distance});c=t[0];for(b=0;b<t.length;b++)t[b].dataPoint.x.valueOf()===c.dataPoint.x.valueOf()&&d.push(t[b]);t=null}else{if(b=this.chart.getDataPointAtXY(a,e,c))this.currentDataPointIndex=b.dataPointIndex,this.currentSeriesIndex=b.dataSeries.index;else if(v)if(b=bb(a,e,this.chart._eventManager.ghostCtx),0<b&&"undefined"!==typeof this.chart._eventManager.objectMap[b]){b=this.chart._eventManager.objectMap[b];if("legendItem"===b.objectType)return;
|
|
881
881
|
this.currentSeriesIndex=b.dataSeriesIndex;this.currentDataPointIndex=0<=b.dataPointIndex?b.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){f=this.chart.data[this.currentSeriesIndex];k={};if(0<=this.currentDataPointIndex)b=f.dataPoints[this.currentDataPointIndex],k.dataSeries=f,k.dataPoint=b,k.index=this.currentDataPointIndex,k.distance=Math.abs(b.x-l),"waterfall"===f.type&&(k.cumulativeSumYStartValue=f.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue,
|
|
@@ -914,30 +914,30 @@ this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'
|
|
|
914
914
|
this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+"</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}":"boxAndWhisker"===c.type&&(h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?
|
|
915
915
|
"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+"</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}");null===e&&(e="");e+=this.chart.replaceKeywordsWithValue(h,b,c,d)}return e};oa.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=
|
|
916
916
|
this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=a;this.container.style.MsTransition=a;this.container.style.transition=a;this.container.style.MozTransition=this.mozContainerTransition}};oa.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};oa.prototype.hide=function(a){this.container&&
|
|
917
|
-
(this.container.style.display="none",this.currentSeriesIndex=-1,this._entries=this._dataSeriesIndex=this._xValue=null,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};oa.prototype.show=function(a,e,c){this._updateToolTip(a,e,"undefined"===typeof c?!1:c)};oa.prototype.showAtIndex=function(a,e){};oa.prototype.showAtX=function(a,e){if(!this.enabled)return!1;this.chart.clearedOverlayedCanvas=null;this._updateOptions();var c,
|
|
918
|
-
e:0;if(this.shared)for(var l=0;l<this.chart.data.length;l++)c=this.chart.data[l],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!p(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,h.push(b));else c=this.chart.data[e],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!p(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,h.push(b));if(0<h.length){for(l=0;l<h.length;l++)if(b=h[l],(this.shared||0<=b.dataSeries.type.indexOf("100"))&&b.dataPoint.x>=b.dataSeries.axisX.viewportMinimum&&
|
|
919
|
-
|
|
920
|
-
l=0;l<b.length;l++)b[l]&&(b[l].style.color=b[l].getAttribute("data-color"));l=!1;"none"===this.container.style.display&&(l=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:v?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=
|
|
921
|
-
h[0].dataPoint.color:0<h[0].dataPoint.y?h[0].dataSeries.risingColor:h[0].dataSeries.fallingColor:"error"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[c.index%h[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=
|
|
922
|
-
this.options.borderColor?this.options.borderColor:h[0].dataPoint.color?h[0].dataPoint.color:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[h[0].index%h[0].dataSeries._colorSet.length],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=
|
|
923
|
-
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:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:v?"italic":"normal"}catch(t){}"pie"===h[0].dataSeries.type||"doughnut"===
|
|
924
|
-
h[0].dataSeries.type?c=mouseX-10-this.container.clientWidth:(c="bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===h[0].dataSeries.type?h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y)-this.container.clientWidth<<0:h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>
|
|
925
|
-
this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));h=1!==h.length||this.shared||"line"!==h[0].dataSeries.type&&"stepLine"!==h[0].dataSeries.type&&"spline"!==h[0].dataSeries.type&&"area"!==h[0].dataSeries.type&&"stepArea"!==h[0].dataSeries.type&&"splineArea"!==h[0].dataSeries.type?"bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===
|
|
926
|
-
h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y):h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y);h=-h+10;0<h+this.container.clientHeight+5&&(h-=h+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,h);!this.animationEnabled||l?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=
|
|
927
|
-
a;this._dataSeriesIndex=e;this._prevY=this._prevX=NaN;return!0};oa.prototype.fixMozTransitionDelay=function(a,e){if(20<this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-e,2))?this.mozContainerTransition=this.getContainerTransition(0.1):
|
|
928
|
-
oa.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ia.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];v&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ia.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};
|
|
929
|
-
a.type||"click"===a.type){var e=[],c=Qa(a),b=null;if((b=this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=this.objectMap[b],"dataPoint"===b.objectType){var d=this.chart.data[b.dataSeriesIndex],h=d.dataPoints[b.dataPointIndex],l=b.dataPointIndex;b.eventParameter={x:c.x,y:c.y,dataPoint:h,dataSeries:d.options,dataPointIndex:l,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:h,userContext:h,mouseover:"mouseover",
|
|
930
|
-
click:"click"};e.push(b);b=this.objectMap[d.id];b.eventParameter={x:c.x,y:c.y,dataPoint:h,dataSeries:d.options,dataPointIndex:l,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:d,userContext:d.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};e.push(this.objectMap[d.id])}else"legendItem"===b.objectType&&(d=this.chart.data[b.dataSeriesIndex],h=null!==b.dataPointIndex?d.dataPoints[b.dataPointIndex]:null,
|
|
931
|
-
dataPoint:h,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));d=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){h=!0;for(b=0;b<e.length;b++)if(e[b].id===this.mouseoveredObjectMaps[c].id){h=!1;break}h?this.fireEvent(this.mouseoveredObjectMaps[c],
|
|
932
|
-
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],"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,h=a.eventContext.userContext;
|
|
933
|
-
c.target.style.cursor&&(c.target.style.cursor=h.cursor):(c.target.style.cursor=this.chart.panEnabled?"itemmouseout"!==d.mouseout||h.dockInsidePlotArea?"move":this.chart._defaultCursor:this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===e&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],b);"click"===e&&("dataPoint"===
|
|
934
|
-
b)}};X.prototype.animate=function(a,e,c,b,d){var h=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,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),
|
|
935
|
-
a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,function(){h.animate.call(h)}):this.chart.isAnimating=!1};X.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var N=
|
|
936
|
-
c.canvas.width/ma,a*c.canvas.height/ma)}},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/ma,c.canvas.height/ma)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ma,b.height/ma);c.restore()}},
|
|
937
|
-
b.height,0,0,c.canvas.width/ma,c.canvas.height/ma);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},Y={drawMarker:function(a,d,c,b,f,h,l,p){if(c){var t=
|
|
938
|
-
p));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,f/2,0,2*Math.PI,!1),h&&c.fill(),p&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"square"===b?(c.beginPath(),c.rect(a-f/2,d-f/2,f,f),h&&c.fill(),p&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"triangle"===b?(c.beginPath(),
|
|
939
|
-
c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):"cross"===b&&(c.strokeStyle=h,c.lineWidth=f/4,c.beginPath(),c.moveTo(a-f/2,d-f/2),c.lineTo(a+f/2,d+f/2),c.stroke(),c.moveTo(a+f/2,d-f/2),c.lineTo(a-f/2,d+f/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,
|
|
940
|
-
t)})();
|
|
917
|
+
(this.container.style.display="none",this.currentSeriesIndex=-1,this._entries=this._dataSeriesIndex=this._xValue=null,this._prevY=this._prevX=NaN,this._updatedEventParameters=null,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};oa.prototype.show=function(a,e,c){this._updateToolTip(a,e,"undefined"===typeof c?!1:c)};oa.prototype.showAtIndex=function(a,e){};oa.prototype.showAtX=function(a,e){if(!this.enabled)return!1;this.chart.clearedOverlayedCanvas=null;this._updateOptions();var c,
|
|
918
|
+
b,d,h=[];d=!1;e=!p(e)&&0<=e&&e<this.chart.data.length?e:0;if(this.shared)for(var l=0;l<this.chart.data.length;l++)c=this.chart.data[l],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!p(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,h.push(b));else c=this.chart.data[e],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!p(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,h.push(b));if(0<h.length){for(l=0;l<h.length;l++)if(b=h[l],(this.shared||0<=b.dataSeries.type.indexOf("100"))&&b.dataPoint.x>=b.dataSeries.axisX.viewportMinimum&&
|
|
919
|
+
b.dataPoint.x<=b.dataSeries.axisX.viewportMaximum){d=!1;break}else if(b.dataPoint.x<b.dataSeries.axisX.viewportMinimum||b.dataPoint.x>b.dataSeries.axisX.viewportMaximum||b.dataPoint.y<b.dataSeries.axisY.viewportMinimum||b.dataPoint.y>b.dataSeries.axisY.viewportMaximum)d=!0;else{d=!1;break}if(d)return this.hide(),!1;this.highlightObjects(h);this._entries=h;l="";l=this.getToolTipInnerHTML({entries:h});if(null!==l){this.contentDiv.innerHTML=l;if(this.isToolTipDefinedInData&&p(this.options.content)&&
|
|
920
|
+
p(this.options.contentFormatter))for(b=this.contentDiv.getElementsByTagName("span"),l=0;l<b.length;l++)b[l]&&(b[l].style.color=b[l].getAttribute("data-color"));l=!1;"none"===this.container.style.display&&(l=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:v?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=
|
|
921
|
+
this.options.borderColor?this.options.borderColor:h[0].dataPoint.color?h[0].dataPoint.color:0<h[0].dataPoint.y?h[0].dataSeries.risingColor:h[0].dataSeries.fallingColor:"error"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[c.index%h[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=
|
|
922
|
+
this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:h[0].dataPoint.color?h[0].dataPoint.color:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[h[0].index%h[0].dataSeries._colorSet.length],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=
|
|
923
|
+
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:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:v?"italic":"normal"}catch(t){}"pie"===h[0].dataSeries.type||"doughnut"===
|
|
924
|
+
h[0].dataSeries.type||"funnel"===h[0].dataSeries.type||"pyramid"===h[0].dataSeries.type?c=mouseX-10-this.container.clientWidth:(c="bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===h[0].dataSeries.type?h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y)-this.container.clientWidth<<0:h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>
|
|
925
|
+
Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));h=1!==h.length||this.shared||"line"!==h[0].dataSeries.type&&"stepLine"!==h[0].dataSeries.type&&"spline"!==h[0].dataSeries.type&&"area"!==h[0].dataSeries.type&&"stepArea"!==h[0].dataSeries.type&&"splineArea"!==h[0].dataSeries.type?"bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===
|
|
926
|
+
h[0].dataSeries.type?h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x):h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y):h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y);h=-h+10;0<h+this.container.clientHeight+5&&(h-=h+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,h);!this.animationEnabled||l?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=
|
|
927
|
+
h+"px"}else return this.hide(!1),!1}else return this.hide(),!1;this._xValue=a;this._dataSeriesIndex=e;this._prevY=this._prevX=NaN;return!0};oa.prototype.fixMozTransitionDelay=function(a,e){if(20<this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-e,2))?this.mozContainerTransition=this.getContainerTransition(0.1):
|
|
928
|
+
this.mozContainerTransition=this.getContainerTransition(0)}};oa.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ia.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];v&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ia.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};
|
|
929
|
+
ia.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var e=[],c=Qa(a),b=null;if((b=this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=this.objectMap[b],"dataPoint"===b.objectType){var d=this.chart.data[b.dataSeriesIndex],h=d.dataPoints[b.dataPointIndex],l=b.dataPointIndex;b.eventParameter={x:c.x,y:c.y,dataPoint:h,dataSeries:d.options,dataPointIndex:l,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:h,userContext:h,mouseover:"mouseover",
|
|
930
|
+
mousemove:"mousemove",mouseout:"mouseout",click:"click"};e.push(b);b=this.objectMap[d.id];b.eventParameter={x:c.x,y:c.y,dataPoint:h,dataSeries:d.options,dataPointIndex:l,dataSeriesIndex:d.index,chart:this.chart};b.eventContext={context:d,userContext:d.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};e.push(this.objectMap[d.id])}else"legendItem"===b.objectType&&(d=this.chart.data[b.dataSeriesIndex],h=null!==b.dataPointIndex?d.dataPoints[b.dataPointIndex]:null,
|
|
931
|
+
b.eventParameter={x:c.x,y:c.y,dataSeries:d.options,dataPoint:h,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));d=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){h=!0;for(b=0;b<e.length;b++)if(e[b].id===this.mouseoveredObjectMaps[c].id){h=!1;break}h?this.fireEvent(this.mouseoveredObjectMaps[c],
|
|
932
|
+
"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],"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,h=a.eventContext.userContext;
|
|
933
|
+
h&&(d&&h[d[e]])&&h[d[e]].call(h,b);"mouseout"!==e?h.cursor&&h.cursor!==c.target.style.cursor&&(c.target.style.cursor=h.cursor):(c.target.style.cursor=this.chart.panEnabled?"itemmouseout"!==d.mouseout||h.dockInsidePlotArea?"move":this.chart._defaultCursor:this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===e&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],b);"click"===e&&("dataPoint"===
|
|
934
|
+
a.objectType&&this.chart.funnelPyramidClickHandler)&&this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex],b)}};X.prototype.animate=function(a,e,c,b,d){var h=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,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),
|
|
935
|
+
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(){h.animate.call(h)}):this.chart.isAnimating=!1};X.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var N=
|
|
936
|
+
{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/ma,a*c.canvas.height/ma)}},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/ma,c.canvas.height/ma)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ma,b.height/ma);c.restore()}},
|
|
937
|
+
fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ma,c.canvas.height/ma);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},Y={drawMarker:function(a,d,c,b,f,h,l,p){if(c){var t=
|
|
938
|
+
1;c.fillStyle=h?h:"#000000";c.strokeStyle=l?l:"#000000";c.lineWidth=p?p:0;c.setLineDash&&c.setLineDash(H("solid",p));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,f/2,0,2*Math.PI,!1),h&&c.fill(),p&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"square"===b?(c.beginPath(),c.rect(a-f/2,d-f/2,f,f),h&&c.fill(),p&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"triangle"===b?(c.beginPath(),
|
|
939
|
+
c.moveTo(a-f/2,d+f/2),c.lineTo(a+f/2,d+f/2),c.lineTo(a,d-f/2),c.closePath(),h&&c.fill(),p&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):"cross"===b&&(c.strokeStyle=h,c.lineWidth=f/4,c.beginPath(),c.moveTo(a-f/2,d-f/2),c.lineTo(a+f/2,d+f/2),c.stroke(),c.moveTo(a+f/2,d-f/2),c.lineTo(a-f/2,d+f/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,
|
|
940
|
+
c.borderThickness)}}};return l}();t.version="v3.8.6 GA";window.CanvasJS&&(t&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=t)})();
|
|
941
941
|
|
|
942
942
|
/*
|
|
943
943
|
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.
|