@canvasjs/stockcharts 1.13.8 → 1.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/canvasjs.stock.min.js +203 -202
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.stock.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS StockChart - v1.13.
|
|
2
|
+
CanvasJS StockChart - v1.13.9 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2025 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -518,11 +518,11 @@ l.options.indexLabelBorderColor:l.indexLabelBorderColor;p.indexLabelBorderThickn
|
|
|
518
518
|
c.indexLabelWrap:l.indexLabelWrap;p.indexLabelTextAlign=c.indexLabelTextAlign?c.indexLabelTextAlign:l.indexLabelTextAlign?l.indexLabelTextAlign:"left";p.startAngle=0===e?l.startAngle?l.startAngle/180*Math.PI:0:g[e-1].endAngle;p.startAngle=(p.startAngle+2*Math.PI)%(2*Math.PI);p.endAngle=p.startAngle+2*Math.PI/v*Math.abs(c.y);c=(p.endAngle+p.startAngle)/2;c=(c+2*Math.PI)%(2*Math.PI);p.midAngle=c;if(p.midAngle>Math.PI/2-u&&p.midAngle<Math.PI/2+u){if(0===a||g[d].midAngle>p.midAngle)d=e;a++}else if(p.midAngle>
|
|
519
519
|
3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u){if(0===b||g[k].midAngle>p.midAngle)k=e;b++}p.hemisphere=c>Math.PI/2&&c<=3*Math.PI/2?"left":"right";p.indexLabelTextBlock=new ma(A.plotArea.ctx,{fontSize:p.indexLabelFontSize,fontFamily:p.indexLabelFontFamily,fontColor:p.indexLabelFontColor,fontStyle:p.indexLabelFontStyle,fontWeight:p.indexLabelFontWeight,textAlign:p.indexLabelTextAlign,backgroundColor:p.indexLabelBackgroundColor,borderColor:p.indexLabelBorderColor,borderThickness:p.indexLabelBorderThickness,
|
|
520
520
|
maxWidth:p.indexLabelMaxWidth,maxHeight:p.indexLabelWrap?5*p.indexLabelFontSize:1.5*p.indexLabelFontSize,text:p.indexLabelText,padding:p.indexLabelPadding,textBaseline:"middle"});p.indexLabelTextBlock.measureText()}m=c=0;n=!1;for(e=0;e<q.length;e++)p=g[(d+e)%q.length],1<a&&(p.midAngle>Math.PI/2-u&&p.midAngle<Math.PI/2+u)&&(c<=a/2&&!n?(p.hemisphere="right",c++):(p.hemisphere="left",n=!0));n=!1;for(e=0;e<q.length;e++)p=g[(k+e)%q.length],1<b&&(p.midAngle>3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u)&&(m<=
|
|
521
|
-
b/2&&!n?(p.hemisphere="left",m++):(p.hemisphere="right",n=!0))}}function d(a,b){var d=A.plotArea.ctx;d.clearRect(r.x1,r.y1,r.width,r.height);d.fillStyle=A.backgroundColor;d.fillRect(r.x1,r.y1,r.width,r.height);for(d=0;d<q.length;d++){var
|
|
522
|
-
Math.abs(g[d].center.x-w.x)||0<Math.abs(g[d].center.y-w.y))g[d].center.x=w.x+m*(1-a),g[d].center.y=w.y+f*(1-a),n=!0;n&&b&&(m={},m.dataSeries=l,m.dataPoint=l.dataPoints[d],m.index=d,A.toolTip.highlightObjects([m]));c(A.plotArea.ctx,g[d].center,g[d].radius,q[d].color?q[d].color:l._colorSet[d%l._colorSet.length],l.type,k,
|
|
523
|
-
|
|
524
|
-
0<
|
|
525
|
-
a.indexLabelTextBlock.height/2,
|
|
521
|
+
b/2&&!n?(p.hemisphere="left",m++):(p.hemisphere="right",n=!0))}}function d(a,b){var d=A.plotArea.ctx;d.clearRect(r.x1,r.y1,r.width,r.height);d.fillStyle=A.backgroundColor;d.fillRect(r.x1,r.y1,r.width,r.height);for(d=0;d<q.length;d++){var e=g[d].startAngle,k=g[d].endAngle;if(k>e){var m=0.07*x*Math.cos(g[d].midAngle),f=0.07*x*Math.sin(g[d].midAngle),n=!1;if(q[d].exploded){if(1E-9<Math.abs(g[d].center.x-(w.x+m))||1E-9<Math.abs(g[d].center.y-(w.y+f)))g[d].center.x=w.x+m*a,g[d].center.y=w.y+f*a,n=!0}else if(0<
|
|
522
|
+
Math.abs(g[d].center.x-w.x)||0<Math.abs(g[d].center.y-w.y))g[d].center.x=w.x+m*(1-a),g[d].center.y=w.y+f*(1-a),n=!0;n&&b&&(m={},m.dataSeries=l,m.dataPoint=l.dataPoints[d],m.index=d,A.toolTip.highlightObjects([m]));c(A.plotArea.ctx,g[d].center,g[d].radius,q[d].color?q[d].color:l._colorSet[d%l._colorSet.length],l.type,e,k,l.fillOpacity,g[d].percentInnerRadius)}}d=A.plotArea.ctx;d.save();d.fillStyle="black";d.strokeStyle="grey";d.textBaseline="middle";d.lineJoin="round";for(e=e=0;e<q.length;e++)k=g[e],
|
|
523
|
+
k.indexLabelText&&(k.indexLabelTextBlock.y-=k.indexLabelTextBlock.height/2-k.indexLabelTextBlock._lineHeight/2,m=0,m="left"===k.hemisphere?"inside"!==l.indexLabelPlacement?-(k.indexLabelTextBlock.width+p):-k.indexLabelTextBlock.width/2:"inside"!==l.indexLabelPlacement?p:-k.indexLabelTextBlock.width/2,k.indexLabelTextBlock.x+=m,k.indexLabelTextBlock.render(!0),k.indexLabelTextBlock.x-=m,k.indexLabelTextBlock.y+=k.indexLabelTextBlock.height/2-k.indexLabelTextBlock._lineHeight/2,"inside"!==k.indexLabelPlacement&&
|
|
524
|
+
0<k.indexLabelLineThickness&&(m=k.center.x+x*Math.cos(k.midAngle),f=k.center.y+x*Math.sin(k.midAngle),d.strokeStyle=k.indexLabelLineColor,d.lineWidth=k.indexLabelLineThickness,d.setLineDash&&d.setLineDash(T(k.indexLabelLineDashType,k.indexLabelLineThickness)),d.beginPath(),d.moveTo(m,f),d.lineTo(k.indexLabelTextBlock.x,k.indexLabelTextBlock.y),d.lineTo(k.indexLabelTextBlock.x+("left"===k.hemisphere?-p:p),k.indexLabelTextBlock.y),d.stroke()),d.lineJoin="miter");d.save()}function b(a,b){var d=0,d=a.indexLabelTextBlock.y-
|
|
525
|
+
a.indexLabelTextBlock.height/2,k=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,c=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return d=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-k:d-c}function e(a){for(var d=null,k=1;k<q.length;k++)if(d=(a+k+g.length)%g.length,g[d].hemisphere!==g[a].hemisphere){d=null;break}else if(g[d].indexLabelText&&d!==a&&(0>b(g[d],g[a])||("right"===g[a].hemisphere?g[d].indexLabelTextBlock.y>=g[a].indexLabelTextBlock.y:
|
|
526
526
|
g[d].indexLabelTextBlock.y<=g[a].indexLabelTextBlock.y)))break;else d=null;return d}function m(a,d,k){k=(k||0)+1;if(1E3<k)return 0;d=d||0;var c=0,f=w.y-1*y,l=w.y+1*y;if(0<=a&&a<q.length){var p=g[a];if(0>d&&p.indexLabelTextBlock.y<f||0<d&&p.indexLabelTextBlock.y>l)return 0;var r=0,n=0,n=r=r=0;0>d?p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2>f&&p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+d<f&&(d=-(f-(p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+d))):p.indexLabelTextBlock.y+
|
|
527
527
|
p.indexLabelTextBlock.height/2<f&&p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+d>l&&(d=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+d-l);d=p.indexLabelTextBlock.y+d;f=0;f="right"===p.hemisphere?w.x+Math.sqrt(Math.pow(y,2)-Math.pow(d-w.y,2)):w.x-Math.sqrt(Math.pow(y,2)-Math.pow(d-w.y,2));n=w.x+x*Math.cos(p.midAngle);r=w.y+x*Math.sin(p.midAngle);r=Math.sqrt(Math.pow(f-n,2)+Math.pow(d-r,2));n=Math.acos(x/y);r=Math.acos((y*y+x*x-r*r)/(2*x*y));d=r<n?d-p.indexLabelTextBlock.y:0;f=null;
|
|
528
528
|
for(l=1;l<q.length;l++)if(f=(a-l+g.length)%g.length,g[f].hemisphere!==g[a].hemisphere){f=null;break}else if(g[f].indexLabelText&&g[f].hemisphere===g[a].hemisphere&&f!==a&&(0>b(g[f],g[a])||("right"===g[a].hemisphere?g[f].indexLabelTextBlock.y<=g[a].indexLabelTextBlock.y:g[f].indexLabelTextBlock.y>=g[a].indexLabelTextBlock.y)))break;else f=null;n=f;r=e(a);l=f=0;0>d?(l="right"===p.hemisphere?n:r,c=d,null!==l&&(n=-d,d=p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2-(g[l].indexLabelTextBlock.y+
|
|
@@ -533,17 +533,17 @@ d<f.indexLabelTextBlock.x?d=f.indexLabelTextBlock.x+15:"left"===p.hemisphere&&("
|
|
|
533
533
|
(g[z].indexLabelTextBlock.y<f.indexLabelTextBlock.y?u++:M++);u=v/(u+M||1)*M;var M=-1*(v-u),L=z=0;"right"===f.hemisphere?(z=m(a,u),M=-1*(v-z),L=m(I,M),+L.toFixed(B)<+M.toFixed(B)&&+z.toFixed(B)<=+u.toFixed(B)&&m(a,-(M-L))):(z=m(I,u),M=-1*(v-z),L=m(a,M),+L.toFixed(B)<+M.toFixed(B)&&+z.toFixed(B)<=+u.toFixed(B)&&m(I,-(M-L)))}}}}else for(a=0;a<q.length;a++)f=g[a],y="pie"===l.type?0.7*x:0.85*x,I=w.x+y*Math.cos(f.midAngle),u=w.y+y*Math.sin(f.midAngle),f.indexLabelTextBlock.x=I,f.indexLabelTextBlock.y=u;
|
|
534
534
|
for(a=0;a<q.length;a++)if(f=g[a],I=f.indexLabelTextBlock.measureText(),0!==I.height&&0!==I.width)I=I=0,"right"===f.hemisphere?(I=r.x2-(f.indexLabelTextBlock.x+f.indexLabelTextBlock.width+p),I*=-1):I=r.x1-(f.indexLabelTextBlock.x-f.indexLabelTextBlock.width-p),0<I&&(!c&&f.indexLabelText&&(u="right"===f.hemisphere?r.x2-f.indexLabelTextBlock.x:f.indexLabelTextBlock.x-r.x1,0.3*f.indexLabelTextBlock.maxWidth>u?f.indexLabelText="":f.indexLabelTextBlock.maxWidth=0.85*u,0.3*f.indexLabelTextBlock.maxWidth<
|
|
535
535
|
u&&(f.indexLabelTextBlock.x-="right"===f.hemisphere?2:-2)),Math.abs(f.indexLabelTextBlock.y-f.indexLabelTextBlock.height/2-w.y)<x||Math.abs(f.indexLabelTextBlock.y+f.indexLabelTextBlock.height/2-w.y)<x)&&(I/=Math.abs(Math.cos(f.indexLabelAngle)),9<I&&(I*=0.3),I>k&&(k=I)),I=I=0,0<f.indexLabelAngle&&f.indexLabelAngle<Math.PI?(I=r.y2-(f.indexLabelTextBlock.y+f.indexLabelTextBlock.height/2+5),I*=-1):I=r.y1-(f.indexLabelTextBlock.y-f.indexLabelTextBlock.height/2-5),0<I&&(!c&&f.indexLabelText&&(u=0<f.indexLabelAngle&&
|
|
536
|
-
f.indexLabelAngle<Math.PI?-1:1,0===m(a,I*u)&&m(a,2*u)),Math.abs(f.indexLabelTextBlock.x-w.x)<x&&(I/=Math.abs(Math.sin(f.indexLabelAngle)),9<I&&(I*=0.3),I>k&&(k=I)));var N=function(a,b,d){for(var
|
|
536
|
+
f.indexLabelAngle<Math.PI?-1:1,0===m(a,I*u)&&m(a,2*u)),Math.abs(f.indexLabelTextBlock.x-w.x)<x&&(I/=Math.abs(Math.sin(f.indexLabelAngle)),9<I&&(I*=0.3),I>k&&(k=I)));var N=function(a,b,d){for(var k=[],e=0;k.push(g[b]),b!==d;b=(b+1+q.length)%q.length);k.sort(function(a,b){return a.y-b.y});for(b=0;b<k.length;b++)if(d=k[b],e<0.7*a)e+=d.indexLabelTextBlock.height,d.indexLabelTextBlock.text="",d.indexLabelText="",d.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,d=-1,k=0,c=!1,m=0;m<
|
|
537
537
|
q.length;m++)if(c=!1,h=g[m],h.indexLabelText){var f=e(m);if(null!==f){var l=g[f];v=0;v=b(h,l);var r;if(r=0>v){r=h.indexLabelTextBlock.x;var n=h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2,A=h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2,u=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,I=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width,s=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2;r=h.indexLabelTextBlock.x+h.indexLabelTextBlock.width<l.indexLabelTextBlock.x-p||
|
|
538
538
|
r>I+p||n>s+p||A<u-p?!1:!0}r?(0>a&&(a=m),f!==a&&(d=f,k+=-v),0===m%Math.max(q.length/10,3)&&(c=!0)):c=!0;c&&(0<k&&0<=a&&0<=d)&&(N(k,a,d),d=a=-1,k=0)}}0<k&&N(k,a,d)})()}}function h(){A.plotArea.layoutManager.reset();A.title&&(A.title.dockInsidePlotArea||"center"===A.title.horizontalAlign&&"center"===A.title.verticalAlign)&&A.title.render();if(A.subtitles)for(var a=0;a<A.subtitles.length;a++){var b=A.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}A.legend&&
|
|
539
539
|
(A.legend.dockInsidePlotArea||"center"===A.legend.horizontalAlign&&"center"===A.legend.verticalAlign)&&(A.legend.setLayout(),A.legend.render())}var A=this;if(!(0>=a.dataSeriesIndexes.length)){var l=this.data[a.dataSeriesIndexes[0]],q=l.dataPoints,p=10,r=this.plotArea,g=l.dataPointEOs,s=2,y,t=1.3,u=20/180*Math.PI,B=6,w={x:(r.x2+r.x1)/2,y:(r.y2+r.y1)/2},v=0;a=!1;for(var z=0;z<q.length;z++)v+=Math.abs(q[z].y),!a&&("undefined"!==typeof q[z].indexLabel&&null!==q[z].indexLabel&&0<q[z].indexLabel.toString().length)&&
|
|
540
|
-
(a=!0),!a&&("undefined"!==typeof q[z].label&&null!==q[z].label&&0<q[z].label.toString().length)&&(a=!0);if(0!==v){a=a||"undefined"!==typeof l.indexLabel&&null!==l.indexLabel&&0<l.indexLabel.toString().length;var x="inside"!==l.indexLabelPlacement&&a?0.75*Math.min(r.width,r.height)/2:0.92*Math.min(r.width,r.height)/2;l.radius&&(x=Wa(l.radius,x));var D="undefined"!==typeof l.innerRadius&&null!==l.innerRadius?Wa(l.innerRadius,x):0.7*x,F=Math.min(D/x,(x-1)/x);this.pieDoughnutClickHandler=function(a){A.isAnimating||
|
|
540
|
+
(a=!0),!a&&("undefined"!==typeof q[z].label&&null!==q[z].label&&0<q[z].label.toString().length)&&(a=!0);if(0!==v){a=a||"undefined"!==typeof l.indexLabel&&null!==l.indexLabel&&0<l.indexLabel.toString().length;var x="inside"!==l.indexLabelPlacement&&a?0.75*Math.min(r.width,r.height)/2:0.92*Math.min(r.width,r.height)/2;l.radius&&(x=Wa(l.radius,x));var D="undefined"!==typeof l.innerRadius&&null!==l.innerRadius?Wa(l.innerRadius,x,0.7*x):0.7*x,F=Math.min(D/x,(x-1)/x);this.pieDoughnutClickHandler=function(a){A.isAnimating||
|
|
541
541
|
!f(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&A._animator.animate(0,500,function(a){d(a,!0);h();A.dispatchEvent("dataAnimationIterationEnd",{chart:A});A.dispatchEvent("dataAnimationEnd",{chart:A})}))};k();n();n();n();n();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=A.plotArea.ctx;b.clearRect(r.x1,r.y1,r.width,r.height);b.fillStyle=A.backgroundColor;b.fillRect(r.x1,
|
|
542
|
-
r.y1,r.width,r.height);for(var b=g[0].startAngle+2*Math.PI*a,d=0;d<q.length;d++){var
|
|
542
|
+
r.y1,r.width,r.height);for(var b=g[0].startAngle+2*Math.PI*a,d=0;d<q.length;d++){var k=0===d?g[d].startAngle:e,e=k+(g[d].endAngle-g[d].startAngle),m=!1;e>b&&(e=b,m=!0);var f=q[d].color?q[d].color:l._colorSet[d%l._colorSet.length];e>k&&c(A.plotArea.ctx,g[d].center,g[d].radius,f,l.type,k,e,l.fillOpacity,g[d].percentInnerRadius);if(m)break}h();A.dispatchEvent("dataAnimationIterationEnd",{chart:A});1<=a&&A.dispatchEvent("dataAnimationEnd",{chart:A})},function(){A.disableToolTip=!1;A._animator.animate(0,
|
|
543
543
|
A.animatedRender?500:0,function(a){d(a,!1);h();A.dispatchEvent("dataAnimationIterationEnd",{chart:A})});A.dispatchEvent("dataAnimationEnd",{chart:A})});l.radius=x;"doughnut"===l.type&&(l.innerRadius=D)}}};var n=function(a,k,d,b){"undefined"===typeof d&&(d=1);0>=Math.round(k.y4-k.y1)||(a.save(),a.globalAlpha=d,a.beginPath(),a.moveTo(Math.round(k.x1),Math.round(k.y1)),a.lineTo(Math.round(k.x2),Math.round(k.y2)),a.lineTo(Math.round(k.x3),Math.round(k.y3)),a.lineTo(Math.round(k.x4),Math.round(k.y4)),
|
|
544
|
-
"undefined"!==k.x5&&(a.lineTo(Math.round(k.x5),Math.round(k.y5)),a.lineTo(Math.round(k.x6),Math.round(k.y6))),a.closePath(),a.fillStyle=b?b:k.color,a.fill(),a.globalAplha=1,a.restore())};h.prototype.renderFunnel=function(a){function k(){for(var a=0,b=[],d=0;d<B.length;d++){if("undefined"===typeof B[d].y)return-1;B[d].y="number"===typeof B[d].y?B[d].y:0;a+=Math.abs(B[d].y)}if(0===a)return-1;for(d=b[0]=0;d<B.length;d++)b.push(Math.abs(B[d].y)*L/a);return b}function d(){var a=X,b=Z,d=ea,
|
|
545
|
-
c=Q-ia;
|
|
546
|
-
l+=p,l>
|
|
544
|
+
"undefined"!==k.x5&&(a.lineTo(Math.round(k.x5),Math.round(k.y5)),a.lineTo(Math.round(k.x6),Math.round(k.y6))),a.closePath(),a.fillStyle=b?b:k.color,a.fill(),a.globalAplha=1,a.restore())};h.prototype.renderFunnel=function(a){function k(){for(var a=0,b=[],d=0;d<B.length;d++){if("undefined"===typeof B[d].y)return-1;B[d].y="number"===typeof B[d].y?B[d].y:0;a+=Math.abs(B[d].y)}if(0===a)return-1;for(d=b[0]=0;d<B.length;d++)b.push(Math.abs(B[d].y)*L/a);return b}function d(){var a=X,b=Z,d=ea,k=ca,e,c;e=da;
|
|
545
|
+
c=Q-ia;k=Math.abs((c-e)*(b-a+(k-d))/2);d=ca-ea;e=c-e;c=d*(c-Q);c=Math.abs(c);c=k+c;for(var k=[],m=0,g=0;g<B.length;g++){if("undefined"===typeof B[g].y)return-1;B[g].y="number"===typeof B[g].y?B[g].y:0;m+=Math.abs(B[g].y)}if(0===m)return-1;for(var f=k[0]=0,l=0,p,q,b=b-a,f=!1,g=0;g<B.length;g++)a=Math.abs(B[g].y)*c/m,f?p=0==Number(d.toFixed(3))?0:a/d:(q=ga*ga*b*b-4*Math.abs(ga)*a,0>q?(q=d,f=(b+q)*(e-l)/2,a-=f,p=e-l,l+=e-l,p+=0==q?0:a/q,l+=a/q,f=!0):(p=(Math.abs(ga)*b-Math.sqrt(q))/2,q=b-2*p/Math.abs(ga),
|
|
546
|
+
l+=p,l>e&&(l-=p,q=d,f=(b+q)*(e-l)/2,a-=f,p=e-l,l+=e-l,p+=a/q,l+=a/q,f=!0),b=q)),k.push(p);return k}function b(){if(u&&B){for(var a,b,d,k,e,c,m,l,p,q,r,n,h,A,I,s,y,w,t=[],E=[],M={percent:null,total:null},z=null,C=0;C<B.length;C++)w=R[C],w="undefined"!==typeof w.x5?(w.y2+w.y4)/2:(w.y2+w.y3)/2,w=g(w).x2+1,t[C]=P-(isNaN(w)?0:w)-Y;w=0.5*Y;for(var C=0,G=B.length-1;C<B.length||0<=G;C++,G--){b=u.reversed?B[G]:B[C];a=b.color?b.color:u.reversed?u._colorSet[(B.length-1-C)%u._colorSet.length]:u._colorSet[C%u._colorSet.length];
|
|
547
547
|
d=b.indexLabelPlacement||u.indexLabelPlacement||"outside";y=b.indexLabelTextAlign||u.indexLabelTextAlign||"left";k=b.indexLabelBackgroundColor||u.indexLabelBackgroundColor||(v?"transparent":null);e=b.indexLabelBorderColor||u.indexLabelBorderColor||(v?"transparent":null);c=f(b.indexLabelBorderThickness)?u.indexLabelBorderThickness:b.indexLabelBorderThickness;m=f(b.indexLabelPadding)?u.options.indexLabelPadding?u.options.indexLabelPadding:u.indexLabelPadding:b.indexLabelPadding;l=b.indexLabelFontColor||
|
|
548
548
|
u.indexLabelFontColor||"#979797";p=f(b.indexLabelFontSize)?u.indexLabelFontSize:b.indexLabelFontSize;q=b.indexLabelFontStyle||u.indexLabelFontStyle||"normal";r=b.indexLabelFontFamily||u.indexLabelFontFamily||"arial";n=b.indexLabelFontWeight||u.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||u.options.indexLabelLineColor||a;h="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof u.indexLabelLineThickness?u.indexLabelLineThickness:2;A=b.indexLabelLineDashType||
|
|
549
549
|
u.indexLabelLineDashType||"solid";I="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof u.indexLabelWrap?u.indexLabelWrap:!0;s=u.dataPointIds[C];x._eventManager.objectMap[s]={id:s,objectType:"dataPoint",dataPointIndex:C,dataSeriesIndex:0,funnelSection:R[u.reversed?B.length-1-C:C]};"inside"===u.indexLabelPlacement&&(t[C]=C!==W?u.reversed?R[C].x2-R[C].x1:R[C].x3-R[C].x4:R[C].x3-R[C].x6,20>t[C]&&(t[C]=C!==W?u.reversed?R[C].x3-R[C].x4:R[C].x2-R[C].x1:R[C].x2-R[C].x1,t[C]/=2));
|
|
@@ -552,8 +552,8 @@ u,C):u.indexLabelFormatter?u.indexLabelFormatter(z):u.indexLabel?x.replaceKeywor
|
|
|
552
552
|
p:1.5*p)+("object"===typeof m?(m.top||0)+(m.bottom||0):2*m):E[C],text:b,padding:m,textBaseline:"middle"});d.measureText();d.height=d.height===2*d.padding?0:d.height;d.width=d.width===2*d.padding?0:d.width;K.push({textBlock:d,id:u.reversed?G:C,isDirty:!1,lineColor:a,lineThickness:h,lineDashType:A,height:d.height<d.maxHeight?d.height:d.maxHeight,width:d.width<d.maxWidth?d.width:d.maxWidth})}}}function e(){var a,b,d,k,e,c=[];e=!1;d=0;for(var m,g=P-Z-Y/2,g=u.options.indexLabelMaxWidth?u.indexLabelMaxWidth>
|
|
553
553
|
g?g:u.indexLabelMaxWidth:g,f=K.length-1;0<=f;f--){m=B[K[f].id];d=K[f];k=d.textBlock;b=(a=r(f)<R.length?K[r(f)]:null)?a.textBlock:null;d=d.height;a&&k.y+d+ha>b.y&&(e=!0);d=m.indexLabelMaxWidth||g;if(d>g||0>d)d=g;c.push(d)}if(e)for(f=K.length-1;0<=f;f--)a=R[f],K[f].textBlock.maxWidth=c[c.length-(f+1)],K[f].textBlock.measureText(),K[f].textBlock.height=K[f].textBlock.height===2*K[f].textBlock.padding?0:K[f].textBlock.height,K[f].textBlock.width=K[f].textBlock.width===2*K[f].textBlock.padding?0:K[f].textBlock.width,
|
|
554
554
|
K[f].textBlock.x=P-g,d=K[f].textBlock.height<K[f].textBlock.maxHeight?K[f].textBlock.height:K[f].textBlock.maxHeight,e=K[f].textBlock.width<K[f].textBlock.maxWidth?K[f].textBlock.width:K[f].textBlock.maxWidth,K[f].height=d,K[f].width=e,d="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,K[f].textBlock.y=d-K[f].height/2,u.reversed?(K[f].textBlock.y+K[f].height>aa+D&&(K[f].textBlock.y=aa+D-K[f].height),K[f].textBlock.y<xa-D&&(K[f].textBlock.y=xa-D)):(K[f].textBlock.y<aa-D&&(K[f].textBlock.y=aa-
|
|
555
|
-
D),K[f].textBlock.y+K[f].height>xa+D&&(K[f].textBlock.y=xa+D-K[f].height))}function c(){var a,b,d,
|
|
556
|
-
K[
|
|
555
|
+
D),K[f].textBlock.y+K[f].height>xa+D&&(K[f].textBlock.y=xa+D-K[f].height))}function c(){var a,b,d,k;if("inside"!==u.indexLabelPlacement)for(var e=0;e<R.length;e++)0==K[e].textBlock.text.length?K[e].isDirty=!0:(a=R[e],d="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=u.reversed?"undefined"!==typeof a.x5?d>$?g(d).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?d<$?g(d).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,K[e].textBlock.x=b+Y,K[e].textBlock.y=d-K[e].height/2,u.reversed?(K[e].textBlock.y+
|
|
556
|
+
K[e].height>aa+D&&(K[e].textBlock.y=aa+D-K[e].height),K[e].textBlock.y<xa-D&&(K[e].textBlock.y=xa-D)):(K[e].textBlock.y<aa-D&&(K[e].textBlock.y=aa-D),K[e].textBlock.y+K[e].height>xa+D&&(K[e].textBlock.y=xa+D-K[e].height)));else for(e=0;e<R.length;e++)0==K[e].textBlock.text.length?K[e].isDirty=!0:(a=R[e],b=a.height,d=K[e].height,k=K[e].width,b>=d?(b=e!=W?(a.x4+a.x3)/2-k/2:(a.x5+a.x4)/2-k/2,d=e!=W?(a.y1+a.y3)/2-d/2:(a.y1+a.y4)/2-d/2,K[e].textBlock.x=b,K[e].textBlock.y=d):K[e].isDirty=!0)}function h(){function a(b,
|
|
557
557
|
d){var k;if(0>b||b>=K.length)return 0;var e,c=K[b].textBlock;if(0>d){d*=-1;e=p(b);k=s(e,b);if(k>=d)return c.y-=d,d;if(0==b)return 0<k&&(c.y-=k),k;k+=a(e,-(d-k));0<k&&(c.y-=k);return k}e=r(b);k=s(b,e);if(k>=d)return c.y+=d,d;if(b==R.length-1)return 0<k&&(c.y+=k),k;k+=a(e,d-k);0<k&&(c.y+=k);return k}function b(){var a,k,e,c,m=0,g;c=(Q-da+2*D)/l;g=l;for(var f,q=1;q<g;q++){e=q*c;for(var n=K.length-1;0<=n;n--)!K[n].isDirty&&(K[n].textBlock.y<e&&K[n].textBlock.y+K[n].height>e)&&(f=r(n),!(f>=K.length-1)&&
|
|
558
558
|
K[n].textBlock.y+K[n].height+ha>K[f].textBlock.y&&(K[n].textBlock.y=K[n].textBlock.y+K[n].height-e>e-K[n].textBlock.y?e+1:e-K[n].height-1))}for(f=R.length-1;0<f;f--)if(!K[f].isDirty){e=p(f);if(0>e&&(e=0,K[e].isDirty))break;if(K[f].textBlock.y<K[e].textBlock.y+K[e].height){k=k||f;c=f;for(g=0;K[c].textBlock.y<K[e].textBlock.y+K[e].height+ha;){a=a||K[c].textBlock.y+K[c].height;g+=K[c].height;g+=ha;c=e;if(0>=c){c=0;g+=K[c].height;break}e=p(c);if(0>e){c=0;g+=K[c].height;break}}if(c!=f){m=K[c].textBlock.y;
|
|
559
559
|
a-=m;a=g-a;m=d(a,k,c);break}}}return m}function d(a,b,k){var e=[],c=0,m=0;for(a=Math.abs(a);k<=b;k++)e.push(R[k]);e.sort(function(a,b){return a.height-b.height});for(k=0;k<e.length;k++)if(b=e[k],c<a)m++,c+=K[b.id].height+ha,K[b.id].textBlock.text="",K[b.id].indexLabelText="",K[b.id].isDirty=!0,K[b.id].textBlock.measureText();else break;return m}for(var k,e,c,m,g,f,l=1,q=0;q<2*l;q++){for(var n=K.length-1;0<=n&&!(0<=p(n)&&p(n),c=K[n],m=c.textBlock,f=(g=r(n)<R.length?K[r(n)]:null)?g.textBlock:null,k=
|
|
@@ -859,8 +859,8 @@ a:null);b=["axisX","axisX2","axisY","axisY2"];for(e=0;e<b.length;e++)for(var m=b
|
|
|
859
859
|
(this.chart.toolTip._entries&&this.chart.sessionVariables._dataHighlighted)&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return d};W.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};W.prototype.render=
|
|
860
860
|
function(a,c,d){var b,e,m,n,h=null,A=null,l=null,q="";this.valueFormatString||("dateTime"===this.parent.valueType?this.valueFormatString=this.parent.valueFormatString:(l=0,l="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?
|
|
861
861
|
2:10>this.parent.range?1:0),this.valueFormatString=z.generateValueFormatString(this.parent.range,l)));var p=null===this.opacity?1:this.opacity,r=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness),g=this.chart.overlaidCanvasCtx,s=g.globalAlpha;g.beginPath();g.strokeStyle=this.color;g.lineWidth=r;g.save();this.labelFontSize=Math.abs(f(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize);this.labelMaxWidth=f(this.options.labelMaxWidth)?
|
|
862
|
-
0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=f(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);
|
|
863
|
-
|
|
862
|
+
0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=f(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);l=new ma(g,{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,
|
|
863
|
+
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 y=0,q=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var t=null;if("bottom"===this.parent._position||"top"===this.parent._position)y=this.parent.dataSeries[0].axisX.convertPixelToValue({y:this.parent.sessionVariables.crosshairShownByPixel?
|
|
864
864
|
this.chart.sessionVariables.mouseY:c});else if("left"===this.parent._position||"right"===this.parent._position)y=this.parent.convertPixelToValue({y:c});for(var u=0;u<this.parent.dataSeries.length;u++)(t=this.parent.dataSeries[u].getDataPointAtX(y,!0,!0))&&0<=t.index&&(t.dataSeries=this.parent.dataSeries[u],null!==t.dataPoint.y&&t.dataSeries.visible&&q.push(t));t=null;if(0===q.length)return;q.sort(function(a,b){return a.distance-b.distance});var v=t=0;yPercent=cumulativeY=0;for(var y=Infinity,w,u=
|
|
865
865
|
0;u<q.length;u++){if("rangeBar"===q[u].dataSeries.type||"error"===q[u].dataSeries.type){if(q[u].dataPoint.y)for(var x=0;x<q[u].dataPoint.y.length;x++)v=Math.abs(a-this.parent.convertValueToPixel(q[u].dataPoint.y[x])),v<=y&&(y=v,t=u)}else"stackedBar"===q[u].dataSeries.type?(cumulativeY=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,v=Math.abs(a-this.parent.convertValueToPixel(cumulativeY)),v<=y&&(y=v,t=u)):"stackedBar100"===q[u].dataSeries.type?(v=q[0].dataPoint.x.getTime?q[0].dataPoint.x.getTime():
|
|
866
866
|
q[0].dataPoint.x,f(w)&&(w=Math.abs(a-this.parent.convertValueToPixel(100*(q[0].dataSeries.dataPointEOs[q[0].index].cumulativeY/q[0].dataSeries.plotUnit.dataPointYSums[v])))),cumulativeY=q[u].dataSeries.dataPointEOs[q[u].index].cumulativeY,v=q[u].dataPoint.x.getTime?q[u].dataPoint.x.getTime():q[u].dataPoint.x,yPercent=100*(cumulativeY/q[u].dataSeries.plotUnit.dataPointYSums[v]),v=Math.abs(a-this.parent.convertValueToPixel(yPercent)),v<=w&&(w=v,t=u)):(v=Math.abs(a-this.parent.convertValueToPixel(q[u].dataPoint.y)),
|
|
@@ -895,67 +895,67 @@ Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range
|
|
|
895
895
|
0,0!==w.dataSeries.dataPointEOs[w.index].cumulativeSum%1&&f(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))),l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:w.dataSeries.dataPointEOs[w.index].cumulativeSum}):f(this.options.label)?$(w.dataSeries.dataPointEOs[w.index].cumulativeSum,
|
|
896
896
|
this.valueFormatString,this.chart._cultureInfo):this.label,this.value=w.dataSeries.dataPointEOs[w.index].cumulativeSum):(A=1===g.lineWidth%2?(this.parent.convertValueToPixel(w.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(w.dataPoint.y)<<0,0!==w.dataPoint.y%1&&f(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))),l.text=this.labelFormatter?
|
|
897
897
|
this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:w.dataPoint.y}):f(this.options.label)?$(w.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=w.dataPoint.y);m=n=A;b=this.chart.plotArea.x1;e=this.chart.plotArea.x2;this.bounds={x1:b,y1:m-r/2,x2:e,y2:n+r/2};l.y=n+l.fontSize/2-l.measureText().height/2+2;l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&
|
|
898
|
-
(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}q=null;g.globalAlpha=p;if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&l.y-l.fontSize/2<this.chart.bounds.y1&&(l.y=this.chart.bounds.y1+l.fontSize/2),"bottom"===this.parent._position&&
|
|
899
|
-
this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.height+l.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&&(g.moveTo(b,m),g.lineTo(e,n),g.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1);if("left"===this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&l.x<this.chart.bounds.x1&&
|
|
900
|
-
this.parent._position&&l.x+l.measureText().width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.measureText().width),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<r&&(g.moveTo(b,m),g.lineTo(e,n),g.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1)}else{if("bottom"===this.parent._position||"top"===this.parent._position)b=e=h=
|
|
901
|
-
n=this.chart.plotArea.y2,this.bounds={x1:b-r/2,y1:m,x2:e+r/2,y2:n};else if("left"===this.parent._position||"right"===this.parent._position)m=n=A=1===g.lineWidth%2?(c<<0)+0.5:c<<0,b=this.chart.plotArea.x1,e=this.chart.plotArea.x2,this.bounds={x1:b,y1:m-r/2,x2:e,y2:n+r/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){u=!1;if(this.parent.labels)for(y=Math.ceil(this.parent.interval),
|
|
902
|
-
|
|
903
|
-
this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(c):d}):f(this.options.label)?$(f(d)?this.parent.convertPixelToValue(c):d,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(c):d}):f(this.options.label)?
|
|
904
|
-
this.chart._cultureInfo):this.label;l.y=c+l.fontSize/2-l.measureText().height/2+2;l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x1-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}else{if("bottom"===
|
|
905
|
-
this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(a):d}):f(this.options.label)?$(f(d)?this.parent.convertPixelToValue(a):d,this.valueFormatString,this.chart._cultureInfo):this.label,l.x=b-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width),l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1),"bottom"===
|
|
906
|
-
l.fontSize/2+2:"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){u=!1;q="";if(this.parent.labels)for(y=Math.ceil(this.parent.interval),q=0;q<this.parent.viewportMaximum;q+=y)if(this.parent.labels[q])u=!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(y=this.parent.convertPixelToValue({x:a}),t=null,u=0;u<this.parent.dataSeries.length;u++)(t=
|
|
907
|
-
|
|
908
|
-
f(this.options.label)?$(f(d)?this.parent.convertPixelToValue(a):d,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(a):d}):f(this.options.label)?ra(f(d)?this.parent.convertPixelToValue(a):d,this.valueFormatString,this.chart._cultureInfo):this.label;l.x=b-l.measureText().width/2;l.x+l.width>this.chart.bounds.x2&&
|
|
909
|
-
l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1);"bottom"===this.parent._position?l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2:"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position)l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(c):d}):f(this.options.label)
|
|
910
|
-
d,this.valueFormatString,this.chart._cultureInfo):this.label,l.y=c+l.fontSize/2-l.measureText().height/2+2,l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2);
|
|
911
|
-
this.chart.bounds.x1?l.x=this.chart.bounds.x1:"right"===this.parent._position&&l.x+l.measureText().width>this.chart.bounds.x2?l.x=this.chart.bounds.x2-l.measureText().width:"top"===this.parent._position&&l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+l.measureText().height>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.height+l.fontSize/2+2);g.globalAlpha=p;0<r&&("bottom"!==
|
|
912
|
-
(g.moveTo(b,m),g.lineTo(e,n),g.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(c)}if("bottom"===this.parent._position||"top"===this.parent._position)this.parent.sessionVariables.crosshairValue=this._updatedValue=this.parent.convertPixelToValue(h);
|
|
913
|
-
this._updatedValue=this.parent.convertPixelToValue(A);this._textBlock=l;this._label=d;f(d)||this.renderLabel();g.restore();g.globalAlpha=s};W.prototype.renderLabel=function(){this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&(f(this._textBlock)||(f(this._textBlock.text)||!("number"===
|
|
914
|
-
f(this._label)&&this.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this.parent,value:this.value},this.parent))};ja(na,aa);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");
|
|
915
|
-
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=
|
|
916
|
-
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";a.style.fontWeight="normal";a.style.fontStyle=
|
|
917
|
-
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)",a.style.filter="progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666')");
|
|
918
|
-
this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};na.prototype.mouseMoveHandler=function(a,c){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(a,c),this.enabled&&this._updatedEventParameters&&!isNaN(this._prevX)&&!isNaN(this._prevY)&&
|
|
919
|
-
this.container.style.display?"hidden":"updated",this._updatedEventParameters,this))};na.prototype._updateToolTip=function(a,c,d){d="undefined"===typeof d?!0:d;this._updateOptions();this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof c){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;c=this._prevY}else this._prevX=a,this._prevY=c;var b=
|
|
920
|
-
[];if(this.chart.axisX)for(var A=0;A<this.chart.axisX.length;A++){for(var n="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX[A].convertPixelToValue({y:c}):this.chart.axisX[A].convertPixelToValue({x:a}),l=null,b=0;b<this.chart.axisX[A].dataSeries.length;b++)(l=this.chart.axisX[A].dataSeries[b].getDataPointAtX(n,d,!0))&&0<=l.index&&(l.dataSeries=this.chart.axisX[A].dataSeries[b],null!==
|
|
921
|
-
"xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX2[A].convertPixelToValue({y:c}):this.chart.axisX2[A].convertPixelToValue({x:a});l=null;for(b=0;b<this.chart.axisX2[A].dataSeries.length;b++)(l=this.chart.axisX2[A].dataSeries[b].getDataPointAtX(n,d,!0))&&0<=l.index&&(l.dataSeries=this.chart.axisX2[A].dataSeries[b],null!==l.dataPoint.y&&l.dataSeries.visible&&h.push(l));
|
|
922
|
-
a.distance-b.distance:a.distance/a.dataSeries.axisX.range-b.distance/b.dataSeries.axisX.range});d=h[0];for(b=0;b<h.length;b++)h[b].dataPoint.x.valueOf()===d.dataPoint.x.valueOf()&&m.push(h[b]);h=null}else{if(b=this.chart.getDataPointAtXY(a,c,d))this.currentDataPointIndex=b.dataPointIndex,this.currentSeriesIndex=b.dataSeries.index;else if(v)if(b=ib(a,c,this.chart._eventManager.ghostCtx),
|
|
923
|
-
b.objectType)return;this.currentSeriesIndex=b.dataSeriesIndex;this.currentDataPointIndex=0<=b.dataPointIndex?b.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){e=this.chart.data[this.currentSeriesIndex];l={};if(0<=this.currentDataPointIndex)b=e.dataPoints[this.currentDataPointIndex],l.dataSeries=e,l.dataPoint=
|
|
924
|
-
l.cumulativeSum=e.dataPointEOs[this.currentDataPointIndex].cumulativeSum);else if(this.enabled&&e&&("line"===e.type||"stepLine"===e.type||"spline"===e.type||"area"===e.type||"stepArea"===e.type||"splineArea"===e.type||"stackedArea"===e.type||"stackedArea100"===e.type||"rangeArea"===e.type||"rangeSplineArea"===e.type||
|
|
925
|
-
b=l.dataPoint);else{"toolTip"===this.chart.clearedOverlayedCanvas&&(this.chart.resetOverlayedCanvas(),this.chart.clearedOverlayedCanvas=null,this.chart.sessionVariables._dataHighlighted=!1,this.container&&(this.container.style.display="none"));return}if(!f(l)&&!f(l.dataPoint)&&!f(l.dataPoint.y))if(l.dataSeries.axisY)if(0<
|
|
926
|
-
d>-l.dataPoint.y.length&&m.push(l)}else"column"===e.type||"bar"===e.type?0>l.dataPoint.y?0>l.dataSeries.axisY.viewportMinimum&&l.dataSeries.axisY.viewportMaximum>=l.dataPoint.y&&m.push(l):l.dataSeries.axisY.viewportMinimum<=l.dataPoint.y&&0<=l.dataSeries.axisY.viewportMaximum&&m.push(l):"bubble"===e.type?
|
|
927
|
-
e.type?(d=0,l.cumulativeSumYStartValue<l.dataSeries.axisY.viewportMinimum?d--:l.cumulativeSumYStartValue>l.dataSeries.axisY.viewportMaximum&&d++,l.cumulativeSum<l.dataSeries.axisY.viewportMinimum?d--:l.cumulativeSum>l.dataSeries.axisY.viewportMaximum&&d++,2>d&&-2<d&&m.push(l)):(0<=l.dataSeries.type.indexOf("100")||
|
|
928
|
-
else m.push(l)}}if(0<m.length){if(this._entries=m,this.highlightObjects(m),this.enabled){d="";d=this.getToolTipInnerHTML({entries:m});if(null!==d){this.contentDiv.innerHTML=d;if(this.isToolTipDefinedInData&&f(this.options.content)&&f(this.options.contentFormatter))for(n=this.contentDiv.getElementsByTagName("span"),
|
|
929
|
-
this.backgroundColor?this.backgroundColor:v?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===m[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:m[0].dataPoint.color?
|
|
930
|
-
|
|
931
|
-
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=
|
|
932
|
-
"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(q){}"pie"===m[0].dataSeries.type||"doughnut"===m[0].dataSeries.type||"funnel"===m[0].dataSeries.type||"pyramid"===
|
|
933
|
-
(a=m[0].dataSeries.axisX.convertValueToPixel(m[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)-
|
|
934
|
-
"stepArea"!==m[0].dataSeries.type&&"splineArea"!==m[0].dataSeries.type?"bar"===m[0].dataSeries.type||"rangeBar"===m[0].dataSeries.type||"stackedBar"===m[0].dataSeries.type||"stackedBar100"===m[0].dataSeries.type?m[0].dataSeries.axisX.convertValueToPixel(m[0].dataPoint.x):c:m[0].dataSeries.axisY.convertValueToPixel(m[0].dataPoint.y);
|
|
935
|
-
this.container.style.MozTransition=this.mozContainerTransition);this.positionLeft=a;this.positionBottom=c;this.container.style.left=a+"px";this.container.style.bottom=c+"px"}else this.hide(!1),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);c=[];for(b=0;b<m.length;b++)c.push({xValue:m[b].dataPoint.x,
|
|
936
|
-
content:d,entries:c}}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);this._dataSeriesIndex=this._xValue=null}};na.prototype.highlightObjects=function(a){var k=this.chart.overlaidCanvasCtx;f(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas?
|
|
937
|
-
this.chart.clearedOverlayedCanvas=null;k.save();var d=this.chart.plotArea,b=0;k.beginPath();k.rect(d.x1,d.y1,d.x2-d.x1,d.y2-d.y1);k.clip();for(d=0;d<a.length;d++){var e=a[d];if((e=this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]])&&e.objectType&&"dataPoint"===e.objectType){var b=this.chart.data[e.dataSeriesIndex],
|
|
938
|
-
"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type?(m=b.getMarkerProperties(h,e.x1,e.y1,this.chart.overlaidCanvasCtx),m.size=Math.max(1.5*m.size<<0,10),m.borderColor=m.borderColor||"#FFFFFF",
|
|
939
|
-
m.size=Math.max(1.5*m.size<<0,10),m.borderColor=m.borderColor||"#FFFFFF",m.borderThickness=m.borderThickness||Math.ceil(0.1*m.size),y.drawMarkers([m])),this.chart.sessionVariables._dataHighlighted=!0):"bubble"===b.type?(m=b.getMarkerProperties(h,e.x1,e.y1,this.chart.overlaidCanvasCtx),m.size=e.size,m.color="white",m.borderColor=
|
|
940
|
-
b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?(Q(k,e.x1,e.y1,e.x2,e.y2,"white",0,null,!1,!1,!1,!1,0.3),this.chart.sessionVariables._dataHighlighted=!0):"pie"===b.type||"doughnut"===b.type?(c(k,e.center,e.radius,"white",b.type,e.startAngle,
|
|
941
|
-
|
|
942
|
-
b.type?(k.globalAlpha=1,k.strokeStyle=e.color,k.lineWidth=2*e.borderThickness,b=0===k.lineWidth%2?0:0.5,k.beginPath(),k.moveTo(e.x3-b,e.y2),k.lineTo(e.x3-b,e.y3),k.stroke(),k.beginPath(),k.moveTo(e.x3,e.y1),k.lineTo(e.x1,e.y1),k.stroke(),k.beginPath(),k.moveTo(e.x3,e.y4),k.lineTo(e.x2,e.y4),k.stroke(),
|
|
943
|
-
k.moveTo(e.x3,e.y2+e.borderThickness/2),k.lineTo(e.x3,e.y1+e.whiskerThickness/2),k.stroke(),k.beginPath(),k.moveTo(e.x3,e.y4-e.whiskerThickness/2),k.lineTo(e.x3,e.y3-e.borderThickness/2),k.stroke()),k.beginPath(),Q(k,e.x1,Math.max(e.y2,e.y3),e.x2,Math.min(e.y2,e.y3),"transparent",2*e.borderThickness,
|
|
944
|
-
e.whiskerLength/2),e.y4),k.stroke(),k.beginPath(),k.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y1),k.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y1),k.stroke()),k.globalAlpha=1,k.strokeStyle=e.lineColor,k.lineWidth=2*e.lineThickness,0<e.lineThickness&&(k.beginPath(),k.moveTo(e.x1,e.y5),k.lineTo(e.x2,
|
|
945
|
-
this.chart.sessionVariables._dataHighlighted=!0))}}k.restore();k.globalAlpha=1;k.beginPath()};na.prototype.getToolTipInnerHTML=function(a){a=a.entries;var c=null,d=null,b=null,e=0,f="";this.isToolTipDefinedInData=!0;for(var n=0;n<a.length;n++)if(a[n].dataSeries.toolTipContent||a[n].dataPoint.toolTipContent){this.isToolTipDefinedInData
|
|
946
|
-
c=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var h=null,A="",n=0;n<a.length;n++){d=a[n].dataSeries;b=a[n].dataPoint;e=a[n].index;f="";if(0===n&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?A+="undefined"!==
|
|
947
|
-
this.chart.axisX2[0].labels[b.x]:"{x}");A+="</br>";if(!d.visible)continue;A=this.chart.replaceKeywordsWithValue(A,b,d,e)}null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===d.options.toolTipContent||("line"===d.type||"stepLine"===d.type||"spline"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===
|
|
948
|
-
d.type||"stackedArea100"===d.type||"waterfall"===d.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=h!=d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+
|
|
949
|
-
d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y}, {z}"):"rangeColumn"===
|
|
950
|
-
d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y[0]}, {y[1]}"):"candlestick"===d.type||"ohlc"===
|
|
951
|
-
d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}"):"boxAndWhisker"===d.type&&
|
|
952
|
-
d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}"),
|
|
953
|
-
this.reversed?(c=this.chart.replaceKeywordsWithValue(f,b,d,e)+c,n<a.length-1&&(c="</br>"+c)):(c+=this.chart.replaceKeywordsWithValue(f,b,d,e),n<a.length-1&&(c+="</br>"))))}null!==c&&(c=A+c)}else{d=a[0].dataSeries;b=a[0].dataPoint;e=a[0].index;if(null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===d.options.toolTipContent)return null;"line"===d.type||"stepLine"===d.type||"spline"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===d.type||
|
|
954
|
-
"scatter"===d.type||"stackedColumn"===d.type||"stackedColumn100"===d.type||"stackedBar"===d.type||"stackedBar100"===d.type||"stackedArea"===d.type||"stackedArea100"===d.type||"waterfall"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+":</span> {y}":"bubble"===d.type?
|
|
955
|
-
d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+":</span> {y}, {z}":"pie"===d.type||"doughnut"===d.type||"funnel"===d.type||"pyramid"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?
|
|
956
|
-
"\"'>"+(b.name?"{name}:</span> ":b.label?"{label}:</span> ":"</span>")+"{y}":"rangeColumn"===d.type||"rangeBar"===d.type||"rangeArea"===d.type||"rangeSplineArea"===d.type||"error"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+" :</span> {y[0]}, {y[1]}":"candlestick"===
|
|
957
|
-
"ohlc"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent: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"===d.type&&(f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&
|
|
958
|
-
typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{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===c&&(c="");c+=this.chart.replaceKeywordsWithValue(f,
|
|
898
|
+
(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}q=null;g.globalAlpha=p;0<r&&g.setLineDash&&g.setLineDash(T(this.lineDashType,r));if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&l.y-l.fontSize/2<this.chart.bounds.y1&&(l.y=this.chart.bounds.y1+l.fontSize/2),"bottom"===this.parent._position&&
|
|
899
|
+
this.parent.lineCoordinates.y2+l.measureText().height>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.height+l.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&&(g.moveTo(b,m),g.lineTo(e,n),g.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1);if("left"===this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&l.x<this.chart.bounds.x1&&
|
|
900
|
+
(l.x=this.chart.bounds.x1),"right"===this.parent._position&&l.x+l.measureText().width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.measureText().width),this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&0<r&&(g.moveTo(b,m),g.lineTo(e,n),g.stroke(),this.parent.sessionVariables._crosshairHidden=this._hidden=!1)}else{if("bottom"===this.parent._position||"top"===this.parent._position)b=e=h=
|
|
901
|
+
1===g.lineWidth%2?(a<<0)+0.5:a<<0,m=this.chart.plotArea.y1,n=this.chart.plotArea.y2,this.bounds={x1:b-r/2,y1:m,x2:e+r/2,y2:n};else if("left"===this.parent._position||"right"===this.parent._position)m=n=A=1===g.lineWidth%2?(c<<0)+0.5:c<<0,b=this.chart.plotArea.x1,e=this.chart.plotArea.x2,this.bounds={x1:b,y1:m-r/2,x2:e,y2:n+r/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){u=!1;if(this.parent.labels)for(y=Math.ceil(this.parent.interval),
|
|
902
|
+
q=0;q<this.parent.viewportMaximum;q+=y)if(this.parent.labels[q])u=!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(y=this.parent.convertPixelToValue({y:c}),t=null,u=0;u<this.parent.dataSeries.length;u++)(t=this.parent.dataSeries[u].getDataPointAtX(y,!0))&&0<=t.index&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(a):d}):f(this.options.label)?t.dataPoint.label:this.label)}else l.text=
|
|
903
|
+
"dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(c):d}):f(this.options.label)?$(f(d)?this.parent.convertPixelToValue(c):d,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(c):d}):f(this.options.label)?
|
|
904
|
+
ra(f(d)?this.parent.convertPixelToValue(c):d,this.valueFormatString,this.chart._cultureInfo):this.label;l.y=c+l.fontSize/2-l.measureText().height/2+2;l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2);"left"===this.parent._position?l.x=this.parent.lineCoordinates.x1-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}else{if("bottom"===
|
|
905
|
+
this.parent._position||"top"===this.parent._position)l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(a):d}):f(this.options.label)?$(f(d)?this.parent.convertPixelToValue(a):d,this.valueFormatString,this.chart._cultureInfo):this.label,l.x=b-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width),l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1),"bottom"===
|
|
906
|
+
this.parent._position?l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2:"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){u=!1;q="";if(this.parent.labels)for(y=Math.ceil(this.parent.interval),q=0;q<this.parent.viewportMaximum;q+=y)if(this.parent.labels[q])u=!0;else{u=!1;break}if(u){if("axisX"===this.parent.type)for(y=this.parent.convertPixelToValue({x:a}),t=null,u=0;u<this.parent.dataSeries.length;u++)(t=
|
|
907
|
+
this.parent.dataSeries[u].getDataPointAtX(y,!0))&&0<=t.index&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(a):d}):f(this.options.label)?f(d)?t.dataPoint.label:d:this.label)}else l.text="dateTime"!==this.parent.valueType||this.parent.logarithmic?this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?0<this.parent.dataSeries.length?
|
|
908
|
+
this.parent.convertPixelToValue(a):"":d}):f(this.options.label)?$(f(d)?this.parent.convertPixelToValue(a):d,this.valueFormatString,this.chart._cultureInfo):this.label:this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(a):d}):f(this.options.label)?ra(f(d)?this.parent.convertPixelToValue(a):d,this.valueFormatString,this.chart._cultureInfo):this.label;l.x=b-l.measureText().width/2;l.x+l.width>this.chart.bounds.x2&&
|
|
909
|
+
(l.x=this.chart.bounds.x2-l.width);l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1);"bottom"===this.parent._position?l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2:"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position)l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:f(d)?this.parent.convertPixelToValue(c):d}):f(this.options.label)?
|
|
910
|
+
$(f(d)?this.parent.convertPixelToValue(c):d,this.valueFormatString,this.chart._cultureInfo):this.label,l.y=c+l.fontSize/2-l.measureText().height/2+2,l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2);
|
|
911
|
+
"left"===this.parent._position&&l.x<this.chart.bounds.x1?l.x=this.chart.bounds.x1:"right"===this.parent._position&&l.x+l.measureText().width>this.chart.bounds.x2?l.x=this.chart.bounds.x2-l.measureText().width:"top"===this.parent._position&&l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2+l.measureText().height>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.height+l.fontSize/2+2);g.globalAlpha=p;0<r&&("bottom"!==
|
|
912
|
+
this.parent._position||e<=this.parent.lineCoordinates.x2)&&(g.setLineDash&&g.setLineDash(T(this.lineDashType,r)),g.moveTo(b,m),g.lineTo(e,n),g.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(c)}if("bottom"===this.parent._position||"top"===this.parent._position)this.parent.sessionVariables.crosshairValue=this._updatedValue=this.parent.convertPixelToValue(h);
|
|
913
|
+
if("left"===this.parent._position||"right"===this.parent._position)this.parent.sessionVariables.crosshairValue=this._updatedValue=this.parent.convertPixelToValue(A);this._textBlock=l;this._label=d;f(d)||this.renderLabel();g.restore();g.globalAlpha=s};W.prototype.renderLabel=function(){this.value>=Math.min(this.parent.viewportMinimum,this.parent.viewportMaximum)&&this.value<=Math.max(this.parent.viewportMinimum,this.parent.viewportMaximum)&&(f(this._textBlock)||(f(this._textBlock.text)||!("number"===
|
|
914
|
+
typeof this._textBlock.text.valueOf()||0<this._textBlock.text.length)||this._hidden)||this._textBlock.render(!0),f(this._label)&&this.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this.parent,value:this.value},this.parent))};ja(na,aa);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");
|
|
915
|
+
this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("cornerRadius");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=
|
|
916
|
+
"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";a.style.fontWeight="normal";a.style.fontStyle=
|
|
917
|
+
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)",a.style.filter="progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666')");
|
|
918
|
+
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)}};na.prototype.mouseMoveHandler=function(a,c){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(a,c),this.enabled&&this._updatedEventParameters&&!isNaN(this._prevX)&&!isNaN(this._prevY)&&
|
|
919
|
+
this.container&&this.container.style&&this.dispatchEvent("none"===this.container.style.display?"hidden":"updated",this._updatedEventParameters,this))};na.prototype._updateToolTip=function(a,c,d){d="undefined"===typeof d?!0:d;this._updateOptions();this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof c){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;c=this._prevY}else this._prevX=a,this._prevY=c;var b=
|
|
920
|
+
null,e=null,m=[],n=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){var h=[];if(this.chart.axisX)for(var A=0;A<this.chart.axisX.length;A++){for(var n="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX[A].convertPixelToValue({y:c}):this.chart.axisX[A].convertPixelToValue({x:a}),l=null,b=0;b<this.chart.axisX[A].dataSeries.length;b++)(l=this.chart.axisX[A].dataSeries[b].getDataPointAtX(n,d,!0))&&0<=l.index&&(l.dataSeries=this.chart.axisX[A].dataSeries[b],null!==
|
|
921
|
+
l.dataPoint.y&&l.dataSeries.visible&&h.push(l));l=null}if(this.chart.axisX2)for(A=0;A<this.chart.axisX2.length;A++){n="xySwapped"===this.chart.plotInfo.axisPlacement?this.chart.axisX2[A].convertPixelToValue({y:c}):this.chart.axisX2[A].convertPixelToValue({x:a});l=null;for(b=0;b<this.chart.axisX2[A].dataSeries.length;b++)(l=this.chart.axisX2[A].dataSeries[b].getDataPointAtX(n,d,!0))&&0<=l.index&&(l.dataSeries=this.chart.axisX2[A].dataSeries[b],null!==l.dataPoint.y&&l.dataSeries.visible&&h.push(l));
|
|
922
|
+
l=null}if(0===h.length)return;h.sort(function(a,b){return a.dataSeries.axisX.logarithmic||b.dataSeries.axisX.logarithmic?a.distance-b.distance:a.distance/a.dataSeries.axisX.range-b.distance/b.dataSeries.axisX.range});d=h[0];for(b=0;b<h.length;b++)h[b].dataPoint.x.valueOf()===d.dataPoint.x.valueOf()&&m.push(h[b]);h=null}else{if(b=this.chart.getDataPointAtXY(a,c,d))this.currentDataPointIndex=b.dataPointIndex,this.currentSeriesIndex=b.dataSeries.index;else if(v)if(b=ib(a,c,this.chart._eventManager.ghostCtx),
|
|
923
|
+
0<b&&"undefined"!==typeof this.chart._eventManager.objectMap[b]){b=this.chart._eventManager.objectMap[b];if("legendItem"===b.objectType)return;this.currentSeriesIndex=b.dataSeriesIndex;this.currentDataPointIndex=0<=b.dataPointIndex?b.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){e=this.chart.data[this.currentSeriesIndex];l={};if(0<=this.currentDataPointIndex)b=e.dataPoints[this.currentDataPointIndex],l.dataSeries=e,l.dataPoint=
|
|
924
|
+
b,l.index=this.currentDataPointIndex,l.distance=Math.abs(b.x-n),"waterfall"===e.type&&(l.cumulativeSumYStartValue=e.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue,l.cumulativeSum=e.dataPointEOs[this.currentDataPointIndex].cumulativeSum);else if(this.enabled&&e&&("line"===e.type||"stepLine"===e.type||"spline"===e.type||"area"===e.type||"stepArea"===e.type||"splineArea"===e.type||"stackedArea"===e.type||"stackedArea100"===e.type||"rangeArea"===e.type||"rangeSplineArea"===e.type||
|
|
925
|
+
"candlestick"===e.type||"ohlc"===e.type||"boxAndWhisker"===e.type))n=e.axisX.convertPixelToValue({x:a}),l=e.getDataPointAtX(n,d,!0),f(l)||(l.dataSeries=e,this.currentDataPointIndex=l.index,b=l.dataPoint);else{"toolTip"===this.chart.clearedOverlayedCanvas&&(this.chart.resetOverlayedCanvas(),this.chart.clearedOverlayedCanvas=null,this.chart.sessionVariables._dataHighlighted=!1,this.container&&(this.container.style.display="none"));return}if(!f(l)&&!f(l.dataPoint)&&!f(l.dataPoint.y))if(l.dataSeries.axisY)if(0<
|
|
926
|
+
l.dataPoint.y.length){for(b=d=0;b<l.dataPoint.y.length;b++)l.dataPoint.y[b]<l.dataSeries.axisY.viewportMinimum?d--:l.dataPoint.y[b]>l.dataSeries.axisY.viewportMaximum&&d++;d<l.dataPoint.y.length&&d>-l.dataPoint.y.length&&m.push(l)}else"column"===e.type||"bar"===e.type?0>l.dataPoint.y?0>l.dataSeries.axisY.viewportMinimum&&l.dataSeries.axisY.viewportMaximum>=l.dataPoint.y&&m.push(l):l.dataSeries.axisY.viewportMinimum<=l.dataPoint.y&&0<=l.dataSeries.axisY.viewportMaximum&&m.push(l):"bubble"===e.type?
|
|
927
|
+
(d=this.chart._eventManager.objectMap[e.dataPointIds[l.index]].size/2,l.dataPoint.y>=l.dataSeries.axisY.viewportMinimum-d&&l.dataPoint.y<=l.dataSeries.axisY.viewportMaximum+d&&m.push(l)):"waterfall"===e.type?(d=0,l.cumulativeSumYStartValue<l.dataSeries.axisY.viewportMinimum?d--:l.cumulativeSumYStartValue>l.dataSeries.axisY.viewportMaximum&&d++,l.cumulativeSum<l.dataSeries.axisY.viewportMinimum?d--:l.cumulativeSum>l.dataSeries.axisY.viewportMaximum&&d++,2>d&&-2<d&&m.push(l)):(0<=l.dataSeries.type.indexOf("100")||
|
|
928
|
+
"stackedColumn"===e.type||"stackedBar"===e.type||"stackedArea"===e.type||l.dataPoint.y>=l.dataSeries.axisY.viewportMinimum&&l.dataPoint.y<=l.dataSeries.axisY.viewportMaximum)&&m.push(l);else m.push(l)}}if(0<m.length){if(this._entries=m,this.highlightObjects(m),this.enabled){d="";d=this.getToolTipInnerHTML({entries:m});if(null!==d){this.contentDiv.innerHTML=d;if(this.isToolTipDefinedInData&&f(this.options.content)&&f(this.options.contentFormatter))for(n=this.contentDiv.getElementsByTagName("span"),
|
|
929
|
+
b=0;b<n.length;b++)n[b]&&(n[b].style.color=n[b].getAttribute("data-color"));n=!1;"none"===this.container.style.display&&(n=!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"===m[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:m[0].dataPoint.color?
|
|
930
|
+
m[0].dataPoint.color:0<m[0].dataPoint.y?m[0].dataSeries.risingColor:m[0].dataSeries.fallingColor:"error"===m[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:m[0].dataSeries.color?m[0].dataSeries.color:m[0].dataSeries._colorSet[e.index%m[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=
|
|
931
|
+
this.options.borderColor?this.options.borderColor:m[0].dataPoint.color?m[0].dataPoint.color:m[0].dataSeries.color?m[0].dataSeries.color:m[0].dataSeries._colorSet[m[0].index%m[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=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=
|
|
932
|
+
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(q){}"pie"===m[0].dataSeries.type||"doughnut"===m[0].dataSeries.type||"funnel"===m[0].dataSeries.type||"pyramid"===
|
|
933
|
+
m[0].dataSeries.type||"bar"===m[0].dataSeries.type||"rangeBar"===m[0].dataSeries.type||"stackedBar"===m[0].dataSeries.type||"stackedBar100"===m[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=m[0].dataSeries.axisX.convertValueToPixel(m[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)-
|
|
934
|
+
this.container.clientWidth));c=1!==m.length||this.shared||"line"!==m[0].dataSeries.type&&"stepLine"!==m[0].dataSeries.type&&"spline"!==m[0].dataSeries.type&&"area"!==m[0].dataSeries.type&&"stepArea"!==m[0].dataSeries.type&&"splineArea"!==m[0].dataSeries.type?"bar"===m[0].dataSeries.type||"rangeBar"===m[0].dataSeries.type||"stackedBar"===m[0].dataSeries.type||"stackedBar100"===m[0].dataSeries.type?m[0].dataSeries.axisX.convertValueToPixel(m[0].dataPoint.x):c:m[0].dataSeries.axisY.convertValueToPixel(m[0].dataPoint.y);
|
|
935
|
+
c=-c+10;0<c+this.container.clientHeight+5&&(c-=c+this.container.clientHeight+5-0);this.fixMozTransitionDelay(a,c);!this.animationEnabled||n?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.positionLeft=a;this.positionBottom=c;this.container.style.left=a+"px";this.container.style.bottom=c+"px"}else this.hide(!1),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);c=[];for(b=0;b<m.length;b++)c.push({xValue:m[b].dataPoint.x,
|
|
936
|
+
dataPoint:m[b].dataPoint,dataSeries:m[b].dataSeries,dataPointIndex:m[b].index,dataSeriesIndex:m[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,content:d,entries:c}}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);this._dataSeriesIndex=this._xValue=null}};na.prototype.highlightObjects=function(a){var k=this.chart.overlaidCanvasCtx;f(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas?
|
|
937
|
+
(this.chart.resetOverlayedCanvas(),k.clearRect(0,0,this.chart.width,this.chart.height),this.chart.clearedOverlayedCanvas="toolTip",this.chart.sessionVariables._dataHighlighted=!1):this.chart.clearedOverlayedCanvas=null;k.save();var d=this.chart.plotArea,b=0;k.beginPath();k.rect(d.x1,d.y1,d.x2-d.x1,d.y2-d.y1);k.clip();for(d=0;d<a.length;d++){var e=a[d];if((e=this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]])&&e.objectType&&"dataPoint"===e.objectType){var b=this.chart.data[e.dataSeriesIndex],
|
|
938
|
+
m=b.dataPoints[e.dataPointIndex],h=e.dataPointIndex;!1===m.highlightEnabled||!0!==b.highlightEnabled&&!0!==m.highlightEnabled||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type?(m=b.getMarkerProperties(h,e.x1,e.y1,this.chart.overlaidCanvasCtx),m.size=Math.max(1.5*m.size<<0,10),m.borderColor=m.borderColor||"#FFFFFF",
|
|
939
|
+
m.borderThickness=m.borderThickness||Math.ceil(0.1*m.size),y.drawMarkers([m]),"undefined"!==typeof e.y2&&(m=b.getMarkerProperties(h,e.x1,e.y2,this.chart.overlaidCanvasCtx),m.size=Math.max(1.5*m.size<<0,10),m.borderColor=m.borderColor||"#FFFFFF",m.borderThickness=m.borderThickness||Math.ceil(0.1*m.size),y.drawMarkers([m])),this.chart.sessionVariables._dataHighlighted=!0):"bubble"===b.type?(m=b.getMarkerProperties(h,e.x1,e.y1,this.chart.overlaidCanvasCtx),m.size=e.size,m.color="white",m.borderColor=
|
|
940
|
+
"white",k.globalAlpha=0.3,y.drawMarkers([m]),k.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?(Q(k,e.x1,e.y1,e.x2,e.y2,"white",0,null,!1,!1,!1,!1,0.3),this.chart.sessionVariables._dataHighlighted=!0):"pie"===b.type||"doughnut"===b.type?(c(k,e.center,e.radius,"white",b.type,e.startAngle,
|
|
941
|
+
e.endAngle,0.3,e.percentInnerRadius),this.chart.sessionVariables._dataHighlighted=!0):"funnel"===b.type||"pyramid"===b.type?(n(k,e.funnelSection,0.3,"white"),this.chart.sessionVariables._dataHighlighted=!0):"candlestick"===b.type?(k.globalAlpha=1,k.strokeStyle=e.color,k.lineWidth=2*e.borderThickness,b=0===k.lineWidth%2?0:0.5,k.beginPath(),k.moveTo(e.x3-b,Math.min(e.y2,e.y3)),k.lineTo(e.x3-b,Math.min(e.y1,e.y4)),k.stroke(),k.beginPath(),k.moveTo(e.x3-b,Math.max(e.y1,e.y4)),k.lineTo(e.x3-b,Math.max(e.y2,
|
|
942
|
+
e.y3)),k.stroke(),Q(k,e.x1,Math.min(e.y1,e.y4),e.x2,Math.max(e.y1,e.y4),"transparent",2*e.borderThickness,e.color,!1,!1,!1,!1),k.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"ohlc"===b.type?(k.globalAlpha=1,k.strokeStyle=e.color,k.lineWidth=2*e.borderThickness,b=0===k.lineWidth%2?0:0.5,k.beginPath(),k.moveTo(e.x3-b,e.y2),k.lineTo(e.x3-b,e.y3),k.stroke(),k.beginPath(),k.moveTo(e.x3,e.y1),k.lineTo(e.x1,e.y1),k.stroke(),k.beginPath(),k.moveTo(e.x3,e.y4),k.lineTo(e.x2,e.y4),k.stroke(),
|
|
943
|
+
k.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"boxAndWhisker"===b.type?(k.save(),k.globalAlpha=1,k.strokeStyle=e.stemColor,k.lineWidth=2*e.stemThickness,0<e.stemThickness&&(k.beginPath(),k.moveTo(e.x3,e.y2+e.borderThickness/2),k.lineTo(e.x3,e.y1+e.whiskerThickness/2),k.stroke(),k.beginPath(),k.moveTo(e.x3,e.y4-e.whiskerThickness/2),k.lineTo(e.x3,e.y3-e.borderThickness/2),k.stroke()),k.beginPath(),Q(k,e.x1,Math.max(e.y2,e.y3),e.x2,Math.min(e.y2,e.y3),"transparent",2*e.borderThickness,
|
|
944
|
+
e.color,!1,!1,!1,!1),k.globalAlpha=1,k.strokeStyle=e.whiskerColor,k.lineWidth=2*e.whiskerThickness,0<e.whiskerThickness&&(k.beginPath(),k.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y4),k.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y4),k.stroke(),k.beginPath(),k.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y1),k.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y1),k.stroke()),k.globalAlpha=1,k.strokeStyle=e.lineColor,k.lineWidth=2*e.lineThickness,0<e.lineThickness&&(k.beginPath(),k.moveTo(e.x1,e.y5),k.lineTo(e.x2,
|
|
945
|
+
e.y5),k.stroke()),k.restore(),k.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"error"===b.type&&(x(k,e.x1,e.y1,e.x2,e.y2,"white",e.whiskerProperties,e.stemProperties,e.isXYSwapped,0.3),this.chart.sessionVariables._dataHighlighted=!0))}}k.restore();k.globalAlpha=1;k.beginPath()};na.prototype.getToolTipInnerHTML=function(a){a=a.entries;var c=null,d=null,b=null,e=0,f="";this.isToolTipDefinedInData=!0;for(var n=0;n<a.length;n++)if(a[n].dataSeries.toolTipContent||a[n].dataPoint.toolTipContent){this.isToolTipDefinedInData=
|
|
946
|
+
!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))a={chart:this.chart,toolTip:this.options,entries:a},c=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var h=null,A="",n=0;n<a.length;n++){d=a[n].dataSeries;b=a[n].dataPoint;e=a[n].index;f="";if(0===n&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?A+="undefined"!==
|
|
947
|
+
typeof this.chart.axisX[0].labels[b.x]?this.chart.axisX[0].labels[b.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(A+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}");A+="</br>";if(!d.visible)continue;A=this.chart.replaceKeywordsWithValue(A,b,d,e)}null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===d.options.toolTipContent||("line"===d.type||"stepLine"===d.type||"spline"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===
|
|
948
|
+
d.type||"column"===d.type||"bar"===d.type||"scatter"===d.type||"stackedColumn"===d.type||"stackedColumn100"===d.type||"stackedBar"===d.type||"stackedBar100"===d.type||"stackedArea"===d.type||"stackedArea100"===d.type||"waterfall"===d.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=h!=d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+
|
|
949
|
+
(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y}",h=d.axisXIndex):"bubble"===d.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=h!=d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y}, {z}"):"rangeColumn"===
|
|
950
|
+
d.type||"rangeBar"===d.type||"rangeArea"===d.type||"rangeSplineArea"===d.type||"error"===d.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=h!=d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y[0]}, {y[1]}"):"candlestick"===d.type||"ohlc"===
|
|
951
|
+
d.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=h!=d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}"):"boxAndWhisker"===d.type&&
|
|
952
|
+
(this.chart.axisX&&1<this.chart.axisX.length&&(f+=h!=d.axisXIndex?d.axisX.title?d.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}"),
|
|
953
|
+
null===c&&(c=""),d.visible&&(!0===this.reversed?(c=this.chart.replaceKeywordsWithValue(f,b,d,e)+c,n<a.length-1&&(c="</br>"+c)):(c+=this.chart.replaceKeywordsWithValue(f,b,d,e),n<a.length-1&&(c+="</br>"))))}null!==c&&(c=A+c)}else{d=a[0].dataSeries;b=a[0].dataPoint;e=a[0].index;if(null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===d.options.toolTipContent)return null;"line"===d.type||"stepLine"===d.type||"spline"===d.type||"area"===d.type||"stepArea"===d.type||"splineArea"===d.type||
|
|
954
|
+
"column"===d.type||"bar"===d.type||"scatter"===d.type||"stackedColumn"===d.type||"stackedColumn100"===d.type||"stackedBar"===d.type||"stackedBar100"===d.type||"stackedArea"===d.type||"stackedArea100"===d.type||"waterfall"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+":</span> {y}":"bubble"===d.type?
|
|
955
|
+
f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+":</span> {y}, {z}":"pie"===d.type||"doughnut"===d.type||"funnel"===d.type||"pyramid"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?
|
|
956
|
+
"":"'{color}'")+"\"'>"+(b.name?"{name}:</span> ":b.label?"{label}:</span> ":"</span>")+"{y}":"rangeColumn"===d.type||"rangeBar"===d.type||"rangeArea"===d.type||"rangeSplineArea"===d.type||"error"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(b.label?"{label}":"{x}")+" :</span> {y[0]}, {y[1]}":"candlestick"===
|
|
957
|
+
d.type||"ohlc"===d.type?f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent: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"===d.type&&(f=b.toolTipContent?b.toolTipContent:d.toolTipContent?d.toolTipContent:this.content&&
|
|
958
|
+
"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{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===c&&(c="");c+=this.chart.replaceKeywordsWithValue(f,
|
|
959
959
|
b,d,e)}return c};na.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=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}};na.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",
|
|
960
960
|
this.container.style.MsTransition="",this.container.style.transition="")};na.prototype.hide=function(a){if(this.container){var c="undefined"===typeof a||-1!==this.chart.clearedOverlayedCanvas.indexOf("axis");this.chart.sessionVariables._dataHighlighted=!1;this.container.style.display="none";this.currentSeriesIndex=-1;this._entries=this._dataSeriesIndex=this._xValue=null;this._prevY=this._prevX=NaN;this._updatedEventParameters=null;if("undefined"===typeof a||a)this.chart.resetOverlayedCanvas(),c&&
|
|
961
961
|
this.chart.renderCrosshairs(null,!1)}};na.prototype.show=function(a,c,d){this._updateToolTip(a,c,"undefined"===typeof d?!1:d)};na.prototype.showAtIndex=function(a,c){};na.prototype.showAtX=function(a,c){if(!this.enabled)return!1;!f(this.chart.clearedOverlayedCanvas)&&this.chart.clearedOverlayedCanvas.indexOf("axis")&&(this.chart.clearedOverlayedCanvas=null);this._updateOptions();var d,b,e,m=[];e=!1;c=!f(c)&&0<=c&&c<this.chart.data.length?c:0;if(this.shared)for(var n=0;n<this.chart.data.length;n++)d=
|
|
@@ -983,7 +983,7 @@ onComplete:b});for(a=[];0<this.animations.length;)if(c=this.animations.shift(),d
|
|
|
983
983
|
la)}},xClipAnimation:function(a,c){if(0!==a){var d=c.dest,b=c.source.canvas;d.save();0<a&&d.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/la,b.height/la);d.restore()}},fadeInAnimation:function(a,c){if(0!==a){var d=c.dest,b=c.source.canvas;d.save();d.globalAlpha=a;d.drawImage(b,0,0,b.width,b.height,0,0,d.canvas.width/la,d.canvas.height/la);d.restore()}},easing:{linear:function(a,c,d,b){return d*a/b+c},easeOutQuad:function(a,c,d,b){return-d*(a/=b)*(a-2)+c},easeOutQuart:function(a,c,d,b){return-d*
|
|
984
984
|
((a=a/b-1)*a*a*a-1)+c},easeInQuad:function(a,c,d,b){return d*(a/=b)*a+c},easeInQuart:function(a,c,d,b){return d*(a/=b)*a*a*a+c}}},y={drawMarker:function(a,c,d,b,e,f,n,h){if(d){var A=1;d.fillStyle=f?f:"#000000";d.strokeStyle=n?n:"#000000";d.lineWidth=h?h:0;d.setLineDash&&d.setLineDash(T("solid",h));"circle"===b?(d.moveTo(a,c),d.beginPath(),d.arc(a,c,e/2,0,2*Math.PI,!1),f&&d.fill(),h&&(n?d.stroke():(A=d.globalAlpha,d.globalAlpha=0.15,d.strokeStyle="black",d.stroke(),d.globalAlpha=A))):"square"===b?
|
|
985
985
|
(d.beginPath(),d.rect(a-e/2,c-e/2,e,e),f&&d.fill(),h&&(n?d.stroke():(A=d.globalAlpha,d.globalAlpha=0.15,d.strokeStyle="black",d.stroke(),d.globalAlpha=A))):"triangle"===b?(d.beginPath(),d.moveTo(a-e/2,c+e/2),d.lineTo(a+e/2,c+e/2),d.lineTo(a,c-e/2),d.closePath(),f&&d.fill(),h&&(n?d.stroke():(A=d.globalAlpha,d.globalAlpha=0.15,d.strokeStyle="black",d.stroke(),d.globalAlpha=A)),d.beginPath()):"cross"===b&&(d.strokeStyle=f,d.lineWidth=e/4,d.beginPath(),d.moveTo(a-e/2,c-e/2),d.lineTo(a+e/2,c+e/2),d.stroke(),
|
|
986
|
-
d.moveTo(a+e/2,c-e/2),d.lineTo(a-e/2,c+e/2),d.stroke())}},drawMarkers:function(a){for(var c=0;c<a.length;c++){var d=a[c];y.drawMarker(d.x,d.y,d.ctx,d.type,d.size,d.color,d.borderColor,d.borderThickness)}}};return h}();Ja.version="v3.13.
|
|
986
|
+
d.moveTo(a+e/2,c-e/2),d.lineTo(a-e/2,c+e/2),d.stroke())}},drawMarkers:function(a){for(var c=0;c<a.length;c++){var d=a[c];y.drawMarker(d.x,d.y,d.ctx,d.type,d.size,d.color,d.borderColor,d.borderThickness)}}};return h}();Ja.version="v3.13.9 GA";window.CanvasJS&&(Ja&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=Ja);ga.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,culture:"en",creditHref:"",creditText:"CanvasJS",exportEnabled:!1,exportFileName:"StockChart",
|
|
987
987
|
colorSet:"colorSet1",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",navigator:"readWrite",rangeSelector:"readWrite",charts:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}};ga.Navigator={enabled:!0,width:500,height:70,verticalAlign:"bottom",horizontalAlign:"left",dynamicUpdate:!0,backgroundColor:"#fff",animationEnabled:!1,animationDuration:1200,theme:"light1",colorSet:"colorSet1",
|
|
988
988
|
publicProperties:{slider:"readWrite",backgroundColor:"readWrite",animationEnabled:"readWrite",animationDuration:"readWrite",theme:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",colorSet:"readWrite",options:"readWrite",bounds:"readOnly"}};ga.RangeSelector={enabled:!0,width:500,height:35,label:"Range",verticalAlign:"top",horizontalAlign:"center",selectedRangeButtonIndex:null,publicProperties:{options:"readWrite",buttons:"readWrite",inputFields:"readWrite",
|
|
989
989
|
buttonStyle:"readWrite",bounds:"readOnly"}};ga.RangeButton={range:null,rangeType:null,label:null,style:"position: inline; margin: 5px 0;text-align:center;cursor: pointer;",backgroundColorDisabled:"#ddd",publicProperties:{options:"readWrite",bounds:"readOnly"}};ga.ButtonStyle={backgroundColor:"#fff",backgroundColorOnHover:"#2196f3",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:2,labelFontColor:"#000",labelFontColorOnHover:"#fff",labelFontSize:14,labelFontStyle:"normal",labelFontFamily:v?
|
|
@@ -1088,129 +1088,130 @@ isFinite(n.charts[e].axisX[0].maximum)){g=n.charts[e].axisX[0];break}else g||(g=
|
|
|
1088
1088
|
b.setHours(0,0,0),x=c>b&&c>(k?k.maximum:g.maximum)||c<(k?k.minimum:g.minimum)?new Date(k?k.viewportMaximum:g.maximum):new Date,b=new Date(x.getTime()),b.setDate(1),b.setMonth(0),b.setHours(0,0,0),c=Math.max(b,k?k.minimum:g.minimum),d=x):f(b)?k?(c=k.minimum,d=k.maximum):g&&(c=g.minimum,d=g.maximum):k&&g.viewportMaximum-b<(k?k.minimum:g.minimum)?(b=n.navigator.chart.axisX[0].minimum-(g.viewportMaximum-b),c=n.navigator.chart.axisX[0].minimum,d=Math.min(n.navigator.chart.axisX[0].maximum,g.viewportMaximum+
|
|
1089
1089
|
b)):(c=g.viewportMaximum-b<g.minimum?g.minimum:g.viewportMaximum-b,b=g.viewportMaximum-b<g.minimum?g.minimum-(g.viewportMaximum-b):0,d=g.viewportMaximum+b>g.maximum?g.maximum:g.viewportMaximum+b);n._rangeEventParameter={stockChart:n,source:"buttons",index:this._index,minimum:Math.min(c,d),maximum:Math.max(c,d)};this.textBlock.fontWeight="bold";this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover;this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect;
|
|
1090
1090
|
!f(a.stockChart.rangeSelector.options)&&(!f(a.stockChart.rangeSelector.options.buttonStyle)&&!f(a.stockChart.rangeSelector.options.buttonStyle.width)&&a.stockChart.rangeSelector.buttonStyle.width<a.stockChart.rangeSelector.buttonStyle.maxWidth)&&(this.textBlock.width=a.stockChart.rangeSelector.buttonStyle.width);this.rangeSelector&&this.rangeSelector.enabled&&this.rangeSelector.render();n.rangeUpdatedBy="rangeButton";n.rangeSelector.sessionVariables._clickedRangeButtonIndex=this._index;"on"!=this.state&&
|
|
1091
|
-
(this.state="on",n._rangeEventParameter.type="rangeChanging",n.dispatchEvent("rangeChanging",n._rangeEventParameter,n),n._syncCharts(c,d),n.sessionVariables._axisXMin=c,k&&"ytd"===this.rangeType?(c=(new Date).setHours(0,0,0),a=(new Date(k.viewportMaximum)).setHours(0,0,0),
|
|
1092
|
-
n._rangeEventParameter,n))}};if(b.enabled){b.cursor=this.rangeSelector.buttonStyle.cursor;this.rangeSelector.sessionVariables._clickedRangeButtonIndex===c&&(b.textBlock.fontWeight="bold",b.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect);if(!(this.navigator.slider&&this.navigator.slider.hasOptionChanged("minimum")||this.rangeSelector&&this.rangeSelector.inputFields.enabled&&
|
|
1093
|
-
this._selectedRangeButtonIndex!==c&&this.rangeSelector.sessionVariables._clickedRangeButtonIndex!==c)){d=p?"navigator"===y.maximum?this.navigator.slider.maximum:this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)?this.rangeSelector.inputFields.options.endValue:f(D)?l?l.viewportMaximum:e.
|
|
1094
|
-
this.navigator&&this.navigator.slider&&!f(this.navigator.slider.maximum)||this.rangeSelector&&this.rangeSelector.inputFields&&!f(this.rangeSelector.inputFields.endValue)||!f(D)?e.viewportMaximum:l.viewportMaximum:e.
|
|
1095
|
-
b.rangeType){var g=(new Date).setHours(0,0,0),C=(new Date(l.viewportMaximum)).setHours(0,0,0),F=(new Date(l.viewportMinimum)).setHours(0,0,0),g=g>C||g<F?l.viewportMaximum:new Date,C=new Date(g.getTime?g.getTime():g);C.setDate(1);C.setMonth(0);C.setHours(0,0,0);this._initialAxisXMax=g;this._initialAxisXMin=C}else this._initialAxisXMax=l.viewportMaximum,this._initialAxisXMin=f(q)||this._initialAxisXMax-q<
|
|
1096
|
-
g.setHours(0,0,0),a=new Date(l?l.viewportMaximum:e.maximum),a.setHours(0,0,0),x=g>a&&g>(l?l.maximum:e.maximum)||g<(l?l.minimum:e.minimum)?new Date(l?l.viewportMaximum:e.maximum):new Date,f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&this._selectedRangeButtonIndex===c&&(x="navigator"===y.maximum?this.navigator.slider.maximum:this.rangeSelector.inputFields.enabled
|
|
1097
|
-
(!this.navigator.slider||f(this.navigator.slider.options.maximum)&&f(this.rangeSelector.inputFields.options.endValue))||(b.state="off")),a=new Date(x.getTime?x.getTime():x),a.setDate(1),a.setMonth(0),a.setHours(0,0,0),a=Math.max(a,l?l.minimum:e.minimum);else if(f(r))l?(a=l.minimum,x=l.maximum):e&&(a=e.minimum,x=e.maximum),"chart"===y.maximum&&(y.maximum="rangeButton");else if(d-r<
|
|
1098
|
-
(y.maximum="rangeButton");else{this._selectedRangeButtonIndex=null;continue}g=l?l:e;r=g.minimum-(d-r);a=g.minimum;x=Math.min(g.maximum,("dateTime"===g.valueType&&"object"===typeof d?d.getTime():d)+r)}else a=d-r,x=d;f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&("on"===b.state&&"navigator"!==y.minimum)&&(b.textBlock.fontWeight="bold",b.textBlock.fontColor=
|
|
1099
|
-
y.minimum="rangeButton";y.maximum=f(y.maximum)||"chart"===y.maximum&&f(e.options.viewportMaximum)&&f(e.options.maximum)?"rangeButton":y.maximum}}f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)||c===this.rangeSelector.sessionVariables._clickedRangeButtonIndex||(b.state="off");this._axisXMin="rangeButton"===y.minimum?a:this._axisXMin;this._axisXMax=
|
|
1100
|
-
this.navigator.slider.hasOptionChanged("maximum")||D!==this._prevViewportMaximum?this._axisXMax:this.sessionVariables._axisXMax:x}else b.cursor="not-allowed"}if(this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled){this.rangeSelector.inputFields.valueType=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueType?
|
|
1101
|
-
this.rangeSelector.inputFields.
|
|
1102
|
-
(a.inputField.cursor="auto")},k.click=function(a){n.rangeSelector&&n.rangeSelector.inputFields&&!n.rangeSelector.inputFields.enabled||(a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].style.display="inline",a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].focus())};if(e&&isFinite(m)&&isFinite(h)){"dateTime"===
|
|
1103
|
-
this.options.rangeSelector.inputFields.valueFormatString?this.options.rangeSelector.inputFields.valueFormatString:"MMM DD YYYY",this.rangeSelector.inputFields.startValue=this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)?ra(this.rangeSelector.inputFields.options.startValue,this.rangeSelector.inputFields.valueFormatString):
|
|
1104
|
-
|
|
1105
|
-
"#,##0.##",this.rangeSelector.inputFields.startValue=this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)?this.rangeSelector.inputFields.options.startValue:f(a)?m:a,this.rangeSelector.inputFields.endValue=this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")
|
|
1106
|
-
this.rangeUpdatedBy?this.sessionVariables._axisXMax:e.viewportMaximum:x);var H,u;"dateTime"===this.rangeSelector.inputFields.valueType&&(H=ra(this.rangeSelector.inputFields.options.startValue||this.rangeSelector.inputFields.startValue,"YYYY-MM-DD'T'HH:mm:ss"),u=ra(this.rangeSelector.inputFields.endValue,"YYYY-MM-DD'T'HH:mm:ss"),
|
|
1107
|
-
" UTC$1$3")));"navigator"!==y.minimum&&(this._axisXMin=!f(this._axisXMin)&&!f(y.minimum)&&"chart"!==y.minimum||"chart"===y.minimum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.startValue))?this._axisXMin:"dateTime"===this.rangeSelector.inputFields.valueType?(new Date(H)).getTime():
|
|
1108
|
-
(this._axisXMax=!f(this._axisXMax)&&!f(y.maximum)&&"chart"!==y.maximum||"chart"===y.maximum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.endValue))?this._axisXMax:"dateTime"===this.rangeSelector.inputFields.valueType?(new Date(u)).getTime():this.rangeSelector.inputFields.endValue,
|
|
1109
|
-
"dateTime"===this.rangeSelector.inputFields.valueType?"YYYY-MM-DD":this.rangeSelector.inputFields.valueFormatString}this.rangeSelector&&this.rangeSelector.enabled&&this.rangeSelector.render();this.navigator&&this.navigator.slider&&(this.navigator.slider.hasOptionChanged("minimum")||
|
|
1110
|
-
"navigator"!==y.minimum||this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")&&"navigator"!==y.maximum?this.rangeUpdatedBy="rangeButton"===y.minimum?"rangeButton":"inputFields":this._prevViewportMaximum!==D?this.rangeUpdatedBy="rangeButton"===
|
|
1111
|
-
(y.minimum="rangeButton",y.maximum=f(y.maximum)?"rangeButton":y.maximum);"rangeButton"===this.rangeUpdatedBy||(f(this.rangeUpdatedBy)&&"rangeButton"===y.minimum||!this.rangeSelector||!this.rangeSelector.enabled)||this.rangeSelector.resetRangeButtons()}if(f(this._axisXMin)||f(y.minimum))this._axisXMin=
|
|
1112
|
-
null===this.sessionVariables._axisXMin&&(this._axisXMin=this.sessionVariables._axisXMin=this._initialAxisXMin);this._initialAxisXMax="navigator"===y.maximum?this.navigator.slider.maximum:"inputFields"===y.maximum?this.rangeSelector.inputFields.options.endValue:
|
|
1113
|
-
q;else if("navigator"===y.maximum&&this.navigator.slider.hasOptionChanged("maximum")||"inputFields"===y.maximum&&this.rangeSelector.inputFields.hasOptionChanged("endValue"))this._selectedRangeButtonIndex=null,this._initialAxisXMin=new Date(this._initialAxisXMax.getTime?
|
|
1114
|
-
this._prevViewportMinimum&&(this._prevViewportMinimum=z,"chart"===y.minimum&&(this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin));D!==this._prevViewportMaximum&&(this._prevViewportMaximum=D,"chart"===y.maximum&&(this.sessionVariables._axisXMax=
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
this.
|
|
1119
|
-
this.rangeSelector.inputFields.hasOptionChanged("
|
|
1120
|
-
(this.sessionVariables.
|
|
1121
|
-
this.
|
|
1122
|
-
l.minimum)
|
|
1123
|
-
y.maximum
|
|
1124
|
-
|
|
1125
|
-
k.x1:d.lineCoordinates.x1
|
|
1126
|
-
|
|
1127
|
-
0;b<
|
|
1128
|
-
|
|
1129
|
-
(this.charts[d].axisX2[b].crosshair.options.
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
"undefined"===typeof c?{}:c;var f=c.format?c.format:"png",h=c.fileName?c.fileName:this.exportFileName,s=this.canvas.cloneNode();s.setAttribute("class",
|
|
1134
|
-
y:d.panel.offsetTop}}),k.push({canvas:d.chart.overlaidCanvas,position:{x:d.panel.offsetLeft,y:d.panel.offsetTop}}));for(d=0;d<k.length;d++)a.drawImage(k[d].canvas,
|
|
1135
|
-
"px";this._canvasJSContainer.appendChild(f);var h=this,s=f.contentWindow||f.contentDocument.document||f.contentDocument;s.document.open();s.document.write('<!DOCTYPE HTML>\n<html><body><img src="'+
|
|
1136
|
-
function(c,n,h){h=null;if(!f(this.rangeSelector)){for(var s=0;s<this.rangeSelector.buttons.length;s++){var a=this.rangeSelector.buttons[s];c>=a.bounds.x1&&(c<=a.bounds.x2&&n>=a.bounds.y1&&
|
|
1137
|
-
s=h?h[0]:c,a=null;switch(c.type){case "touchstart":case "MSPointerDown":n=["mousemove","mousedown"];this._lastTouchData=Ba(s);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":n=
|
|
1138
|
-
1<h.length)){a=Ba(s);a.time=new Date;try{var d=a.y-this._lastTouchData.y,k=a.time-this._lastTouchData.time;if(1<Math.abs(d)&&this._lastTouchData.scroll||5<Math.abs(d)&&250>k)this._lastTouchData.scroll=!0}catch(b){}this._lastTouchEventType=
|
|
1139
|
-
|
|
1140
|
-
c.button&&(a=2==c.button);t.capturedEventParam&&(s=t.capturedEventParam,"mouseup"===h&&(t.capturedEventParam=null,s.stockChart.overlaidCanvas.releaseCapture?s.stockChart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",
|
|
1141
|
-
|
|
1142
|
-
f.x,f.y);"mousedown"===h&&!0===s.capture?(Chart.capturedEventParam=s,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===h&&(s.stockChart.overlaidCanvas.releaseCapture?
|
|
1143
|
-
h.x1||f.x>h.x2||f.y<h.y1||f.y>h.y2)&&this.resetOverlayedCanvas();!this.isDrag&&this._eventManager&&this._eventManager.mouseEventHandler(c)}};t.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};t.prototype.clearCanvas=mb;
|
|
1144
|
-
h=0;h<this.axisX.length;h++)this.axisX[h].lineCoordinates.x1+=f,this.axisX[h].lineCoordinates.x2-=c,this.axisX[h].lineCoordinates.width=this.axisX[h].lineCoordinates.x2-this.axisX[h].lineCoordinates.x1,this.axisX[h].bounds.x1+=f,this.axisX[h].bounds.x2-=
|
|
1145
|
-
|
|
1146
|
-
c,this.stockChart.sessionVariables._axisXMax=n,c=f(c)?this.stockChart._initialAxisXMin:c,n=f(n)?this.stockChart._initialAxisXMax:n,this.stockChart._syncCharts(c,n),this.stockChart.rangeSelector&&(this.stockChart.rangeSelector&&
|
|
1147
|
-
this.stockChart.height),this.ghostCtx.beginPath())};L.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};L.prototype.mouseEventHandler=function(c){if("mousemove"===c.type||"click"===c.type){var f=
|
|
1148
|
-
|
|
1149
|
-
mouseout:"mouseout",click:"click"},f.push(s));a=[];for(h=0;h<this.mouseoveredObjectMaps.length;h++){for(var k=!0,s=0;s<f.length;s++)if(f[s].id===this.mouseoveredObjectMaps[h].id){k=!1;break}k?this.fireEvent(this.mouseoveredObjectMaps[h],
|
|
1150
|
-
"click"===c.type?this.fireEvent(f[h],"click",c):"mousemove"===c.type&&this.fireEvent(f[h],"mousemove",c)}}};L.prototype.fireEvent=function(c,f,h){if(c&&f){var s=c.eventParameter,a=c.eventContext,k=c.eventContext.userContext;
|
|
1151
|
-
|
|
1152
|
-
this.
|
|
1153
|
-
this.
|
|
1154
|
-
this.width/2:"right"===this.horizontalAlign&&(t=h.x2-2-this.width);this.panel.style.top=v+"px";this.panel.style.left=t+"px";this.panel.style.height=this.height+"px";this.panel.style.width=this.width+"px";this.stockChart.layoutManager.registerSpace(c,
|
|
1155
|
-
if(!f(s)){var t=Math.min(s.bounds.x2,Math.max(s.bounds.x1,s.convertValueToPixel(s.reversed?Math.max(c,Math.min(s.maximum,h)):Math.min(c,Math.min(s.maximum,h))))),a=Math.max(s.bounds.x1,Math.min(s.bounds.x2,s.convertValueToPixel(s.reversed?
|
|
1156
|
-
|
|
1157
|
-
this.
|
|
1158
|
-
this.chart.overlaidCanvasCtx.
|
|
1159
|
-
2)
|
|
1160
|
-
|
|
1161
|
-
2
|
|
1162
|
-
this.slider.handleWidth/2<<0
|
|
1163
|
-
|
|
1164
|
-
2?(t-this.slider.handleBorderThickness/2<<0)+0.5:t)-Math.round(this.slider.handleBorderThickness),this.height/2
|
|
1165
|
-
this.
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
this;D(this.panel,"mousedown",function(f){c.stockChart.isDrag=!0;f.target!==c.leftHandle&&f.target!==c.rightHandle&&(c.stockChart.navigatorClicked
|
|
1169
|
-
|
|
1170
|
-
h);t=h+c.navigator.slider.width;a=s.x-(h+t)/2;if(s.x<h||s.x>t){var s=Math.max(0,h+a),d=Math.min(t+a,c.navigator.width);t+a>c.navigator.width&&
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
c.
|
|
1178
|
-
|
|
1179
|
-
c.
|
|
1180
|
-
this.
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
c.
|
|
1188
|
-
(c.stockChart.
|
|
1189
|
-
|
|
1190
|
-
s=
|
|
1191
|
-
c.stockChart.
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
this.
|
|
1197
|
-
(this.
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
(this.buttonStyle.
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
this.
|
|
1204
|
-
this.
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
0<this.buttons.length)
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
this.buttonStyle.
|
|
1212
|
-
|
|
1213
|
-
|
|
1091
|
+
(this.state="on",n._rangeEventParameter.type="rangeChanging",n.dispatchEvent("rangeChanging",n._rangeEventParameter,n),n._syncCharts(c,d),n.sessionVariables._axisXMin=c,k&&"ytd"===this.rangeType?(c=(new Date).setHours(0,0,0),a=(new Date(k?k.viewportMaximum:g.maximum)).setHours(0,0,0),g=(new Date(k?k.viewportMinimum:g.minimum)).setHours(0,0,0),n.sessionVariables._axisXMax=c>a||c<g?null:this.maximum):n.sessionVariables._axisXMax=k?k.viewportMaximum===d?null:d:g.maximum===d?null:d,n._rangeEventParameter.type=
|
|
1092
|
+
"rangeChanged",n.dispatchEvent("rangeChanged",n._rangeEventParameter,n))}};if(b.enabled){b.cursor=this.rangeSelector.buttonStyle.cursor;this.rangeSelector.sessionVariables._clickedRangeButtonIndex===c&&(b.textBlock.fontWeight="bold",b.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect);if(!(this.navigator.slider&&this.navigator.slider.hasOptionChanged("minimum")||this.rangeSelector&&this.rangeSelector.inputFields.enabled&&
|
|
1093
|
+
this.rangeSelector.inputFields.hasOptionChanged("startValue")||this._selectedRangeButtonIndex!==c&&this.rangeSelector.sessionVariables._clickedRangeButtonIndex!==c)){d=p?"navigator"===y.maximum?this.navigator.slider.maximum:this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)?this.rangeSelector.inputFields.options.endValue:f(D)?l?l.viewportMaximum:e.maximum:D:l?"undefined"===this.sessionVariables._axisXMax||null===this.sessionVariables._axisXMax&&this.rangeUpdatedBy?
|
|
1094
|
+
l.viewportMaximum:null!==this.sessionVariables._axisXMax||this.navigator&&this.navigator.slider&&!f(this.navigator.slider.maximum)||this.rangeSelector&&this.rangeSelector.inputFields&&!f(this.rangeSelector.inputFields.endValue)||!f(D)?e.viewportMaximum:l.viewportMaximum:e.maximum;d>(l?l.maximum:e.maximum)&&(d=l?l.maximum:e.maximum);if(!(!f(y.maximum)&&"rangeButton"!==y.maximum||this.rangeSelector.enabled&&this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)||
|
|
1095
|
+
this._selectedRangeButtonIndex!==c))if("ytd"===b.rangeType){var g=(new Date).setHours(0,0,0),C=(new Date(l?l.viewportMaximum:e.maximum)).setHours(0,0,0),F=(new Date(l?l.viewportMinimum:e.minimum)).setHours(0,0,0),g=g>C||g<F?l?l.viewportMaximum:e.maximum:new Date,C=new Date(g.getTime?g.getTime():g);C.setDate(1);C.setMonth(0);C.setHours(0,0,0);this._initialAxisXMax=g;this._initialAxisXMin=C}else this._initialAxisXMax=l?l.viewportMaximum:e.maximum,this._initialAxisXMin=f(q)||this._initialAxisXMax-q<
|
|
1096
|
+
(l?l.viewportMinimum:e.minimum)?l?l.viewportMinimum:e.minimum:this._initialAxisXMax-q;if("on"===b.state){if("ytd"===b.rangeType&&e)g=new Date,g.setHours(0,0,0),a=new Date(l?l.viewportMaximum:e.maximum),a.setHours(0,0,0),x=g>a&&g>(l?l.maximum:e.maximum)||g<(l?l.minimum:e.minimum)?new Date(l?l.viewportMaximum:e.maximum):new Date,f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&this._selectedRangeButtonIndex===c&&(x="navigator"===y.maximum?this.navigator.slider.maximum:this.rangeSelector.inputFields.enabled&&
|
|
1097
|
+
!f(this.rangeSelector.inputFields.options.endValue)?this.rangeSelector.inputFields.options.endValue:x,!this.navigator||(!this.navigator.slider||f(this.navigator.slider.options.maximum)&&f(this.rangeSelector.inputFields.options.endValue))||(b.state="off")),a=new Date(x.getTime?x.getTime():x),a.setDate(1),a.setMonth(0),a.setHours(0,0,0),a=Math.max(a,l?l.minimum:e.minimum);else if(f(r))l?(a=l.minimum,x=l.maximum):e&&(a=e.minimum,x=e.maximum),"chart"===y.maximum&&(y.maximum="rangeButton");else if(d-r<
|
|
1098
|
+
(l?l.minimum:e.minimum)){if("navigator"!==y.maximum&&f(this.rangeSelector.inputFields.options.endValue))"chart"===y.maximum&&(y.maximum="rangeButton");else{this._selectedRangeButtonIndex=null;continue}g=l?l:e;r=g.minimum-(d-r);a=g.minimum;x=Math.min(g.maximum,("dateTime"===g.valueType&&"object"===typeof d?d.getTime():d)+r)}else a=d-r,x=d;f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&("on"===b.state&&"navigator"!==y.minimum)&&(b.textBlock.fontWeight="bold",b.textBlock.fontColor=
|
|
1099
|
+
this.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect);y.minimum="rangeButton";y.maximum=f(y.maximum)||"chart"===y.maximum&&f(e.options.viewportMaximum)&&f(e.options.maximum)?"rangeButton":y.maximum}}f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)||c===this.rangeSelector.sessionVariables._clickedRangeButtonIndex||(b.state="off");this._axisXMin="rangeButton"===y.minimum?a:this._axisXMin;this._axisXMax=
|
|
1100
|
+
f(x)?f(this.sessionVariables._axisXMax)&&(null!==this.sessionVariables._axisXMax||!this.rangeUpdatedBy)||this.navigator&&this.navigator.slider&&this.navigator.slider.hasOptionChanged("maximum")||D!==this._prevViewportMaximum?this._axisXMax:this.sessionVariables._axisXMax:x}else b.cursor="not-allowed"}if(this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled){this.rangeSelector.inputFields.valueType=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueType?
|
|
1101
|
+
this.options.rangeSelector.inputFields.valueType:this.isDateTime?"dateTime":"number";for(c=0;c<this.rangeSelector.inputFields._textBlocks.length;c++)k=this.rangeSelector.inputFields._textBlocks[c],k.mousemove=function(a){n.rangeSelector&&n.rangeSelector.inputFields&&!n.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},k.mouseover=function(a){n.rangeSelector&&n.rangeSelector.inputFields&&!n.rangeSelector.inputFields.enabled||(a.inputField.cursor=
|
|
1102
|
+
a.stockChart.rangeSelector.inputFields.style.cursor)},k.mouseout=function(a){n.rangeSelector&&n.rangeSelector.inputFields&&!n.rangeSelector.inputFields.enabled||(a.inputField.cursor="auto")},k.click=function(a){n.rangeSelector&&n.rangeSelector.inputFields&&!n.rangeSelector.inputFields.enabled||(a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].style.display="inline",a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].focus())};if(e&&isFinite(m)&&isFinite(h)){"dateTime"===
|
|
1103
|
+
this.rangeSelector.inputFields.valueType?(this.rangeSelector.inputFields.valueFormatString=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueFormatString?this.options.rangeSelector.inputFields.valueFormatString:"MMM DD YYYY",this.rangeSelector.inputFields.startValue=this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)?ra(this.rangeSelector.inputFields.options.startValue,this.rangeSelector.inputFields.valueFormatString):
|
|
1104
|
+
f(a)?m:a,this.rangeSelector.inputFields.endValue=this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")&&!f(this.rangeSelector.inputFields.options.endValue)?ra(this.rangeSelector.inputFields.options.endValue,this.rangeSelector.inputFields.valueFormatString):f(x)?!f(this.sessionVariables._axisXMax)||null===this.sessionVariables._axisXMax&&this.rangeUpdatedBy?this.sessionVariables._axisXMax:e.viewportMaximum:x):(this.rangeSelector.inputFields.valueFormatString=
|
|
1105
|
+
this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueFormatString?this.options.rangeSelector.inputFields.valueFormatString:"#,##0.##",this.rangeSelector.inputFields.startValue=this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)?this.rangeSelector.inputFields.options.startValue:f(a)?m:a,this.rangeSelector.inputFields.endValue=this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")&&
|
|
1106
|
+
!f(this.rangeSelector.inputFields.options.endValue)?this.rangeSelector.inputFields.options.endValue:f(x)?!f(this.sessionVariables._axisXMax)||null===this.sessionVariables._axisXMax&&this.rangeUpdatedBy?this.sessionVariables._axisXMax:e.viewportMaximum:x);var H,u;"dateTime"===this.rangeSelector.inputFields.valueType&&(H=ra(this.rangeSelector.inputFields.options.startValue||this.rangeSelector.inputFields.startValue,"YYYY-MM-DD'T'HH:mm:ss"),u=ra(this.rangeSelector.inputFields.endValue,"YYYY-MM-DD'T'HH:mm:ss"),
|
|
1107
|
+
v||(H=H.replace(/-/g,"/"),u=u.replace(/-/g,"/"),H=H.replace("T"," "),u=u.replace("T"," "),H=H.replace(/(\+[0-9]{2})(\:)([0-9]{2}$)/," UTC$1$3"),u=u.replace(/(\+[0-9]{2})(\:)([0-9]{2}$)/," UTC$1$3")));"navigator"!==y.minimum&&(this._axisXMin=!f(this._axisXMin)&&!f(y.minimum)&&"chart"!==y.minimum||"chart"===y.minimum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.startValue))?this._axisXMin:"dateTime"===this.rangeSelector.inputFields.valueType?(new Date(H)).getTime():
|
|
1108
|
+
this.rangeSelector.inputFields.startValue,this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)&&(y.minimum="inputFields"));"navigator"!==y.maximum&&(this._axisXMax=!f(this._axisXMax)&&!f(y.maximum)&&"chart"!==y.maximum||"chart"===y.maximum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.endValue))?this._axisXMax:"dateTime"===this.rangeSelector.inputFields.valueType?(new Date(u)).getTime():this.rangeSelector.inputFields.endValue,
|
|
1109
|
+
this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)&&(y.maximum="inputFields"))}for(c=0;c<this.rangeSelector.inputFields.elements.length;c++)this.rangeSelector.inputFields.elements[c].title="dateTime"===this.rangeSelector.inputFields.valueType?"YYYY-MM-DD":this.rangeSelector.inputFields.valueFormatString}this.rangeSelector&&this.rangeSelector.enabled&&this.rangeSelector.render();this.navigator&&this.navigator.slider&&(this.navigator.slider.hasOptionChanged("minimum")||
|
|
1110
|
+
this.navigator.slider.hasOptionChanged("maximum"))?this.rangeUpdatedBy="rangeButton"===y.minimum?"rangeButton":"navigator":this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("startValue")&&"navigator"!==y.minimum||this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")&&"navigator"!==y.maximum?this.rangeUpdatedBy="rangeButton"===y.minimum?"rangeButton":"inputFields":this._prevViewportMaximum!==D?this.rangeUpdatedBy="rangeButton"===
|
|
1111
|
+
y.minimum?"rangeButton":"chart":this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&"rangeButton"===y.minimum&&(this.rangeUpdatedBy="rangeButton");!f(this.rangeSelector.selectedRangeButtonIndex)&&f(y.minimum)&&(y.minimum="rangeButton",y.maximum=f(y.maximum)?"rangeButton":y.maximum);"rangeButton"===this.rangeUpdatedBy||(f(this.rangeUpdatedBy)&&"rangeButton"===y.minimum||!this.rangeSelector||!this.rangeSelector.enabled)||this.rangeSelector.resetRangeButtons()}if(f(this._axisXMin)||f(y.minimum))this._axisXMin=
|
|
1112
|
+
m;if(f(this._axisXMax)||f(y.maximum))this._axisXMax=h;if(f(this._initialAxisXMin)||f(y.minimum))this._initialAxisXMin=this._axisXMin;if(p&&"rangeButton"===y.minimum){this._selectedRangeButtonIndex=this.rangeSelector.selectedRangeButtonIndex;null===this.sessionVariables._axisXMin&&(this._axisXMin=this.sessionVariables._axisXMin=this._initialAxisXMin);this._initialAxisXMax="navigator"===y.maximum?this.navigator.slider.maximum:"inputFields"===y.maximum?this.rangeSelector.inputFields.options.endValue:
|
|
1113
|
+
"chart"===y.maximum&&"ytd"!==q?D:this._initialAxisXMax;if("ytd"!==q)this._initialAxisXMax-q<(l?l.minimum:e.minimum)?(this._initialAxisXMin=l?l.minimum:e.minimum,this._selectedRangeButtonIndex=null):this._initialAxisXMin=this._initialAxisXMax-q;else if("navigator"===y.maximum&&this.navigator.slider.hasOptionChanged("maximum")||"inputFields"===y.maximum&&this.rangeSelector.inputFields.hasOptionChanged("endValue"))this._selectedRangeButtonIndex=null,this._initialAxisXMin=new Date(this._initialAxisXMax.getTime?
|
|
1114
|
+
this._initialAxisXMax.getTime():this._initialAxisXMax),this._initialAxisXMin.setDate(1),this._initialAxisXMin.setMonth(0),this._initialAxisXMin.setHours(0,0,0);this._initialAxisXMin=Math.max(this._initialAxisXMin,l?l.minimum:e.minimum)}z!==this._prevViewportMinimum&&(this._prevViewportMinimum=z,"chart"===y.minimum&&(this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin));D!==this._prevViewportMaximum&&(this._prevViewportMaximum=D,"chart"===y.maximum&&(this.sessionVariables._axisXMax=
|
|
1115
|
+
this._initialAxisXMax=this._axisXMax));if(this.rangeSelector.enabled&&this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&"navigator"!==y.minimum&&"inputFields"!==y.minimum)g=(new Date).setHours(0,0,0),C=l?(new Date(l.viewportMaximum)).setHours(0,0,0):null,F=l?(new Date(l.viewportMinimum)).setHours(0,0,0):null,this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin,this.sessionVariables._axisXMax=this._axisXMax===(l?l.viewportMaximum:e.maximum)||!f(this.rangeSelector.selectedRangeButtonIndex)&&
|
|
1116
|
+
"ytd"===this.rangeSelector.buttons[this.rangeSelector.selectedRangeButtonIndex].rangeType&&(g>C||g<F)?null:this._axisXMax;else if(g=(new Date).setHours(0,0,0),C=l?(new Date(l.viewportMaximum)).setHours(0,0,0):null,F=l?(new Date(l.viewportMinimum)).setHours(0,0,0):null,this._axisXMax=f(this.sessionVariables._axisXMax)&&(null!==this.sessionVariables._axisXMax||!this.rangeUpdatedBy)||this.navigator.enabled&&(!this.navigator.slider||this.navigator.slider.hasOptionChanged("maximum"))||"navigator"!==y.maximum&&
|
|
1117
|
+
this.rangeSelector.enabled&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")?this._axisXMax:null===this.sessionVariables._axisXMax?l?l.viewportMaximum:e.maximum:this.sessionVariables._axisXMax,this._axisXMin=f(this.sessionVariables._axisXMin)||this.navigator.enabled&&(!this.navigator.slider||this.navigator.slider.hasOptionChanged("minimum"))||"navigator"!==y.minimum&&this.rangeSelector.enabled&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("startValue")||
|
|
1118
|
+
"rangeButton"===this.rangeUpdatedBy&&(l?this._axisXMax===l.viewportMaximum:this._axisXMax===e.maximum)?this._axisXMin:this.sessionVariables._axisXMin,f(this._initialAxisXMax)||f(y.maximum))this._initialAxisXMax=l&&f(y.maximum)?l.viewportMaximum:this._axisXMax;this.rangeSelector.enabled&&this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&(this.rangeSelector.sessionVariables.selectedRangeButtonIndex=this.rangeSelector.options.selectedRangeButtonIndex);this.rangeSelector.enabled&&this.rangeSelector.inputFields.enabled&&
|
|
1119
|
+
(this.rangeSelector.inputFields.hasOptionChanged("startValue")&&(this.navigator&&this.navigator.slider&&!f(this.navigator.slider.options.minimum)?this.sessionVariables._axisXMin=this._initialAxisXMin=this._axisXMin:this.sessionVariables._axisXMin=this._initialAxisXMin=this.rangeSelector.inputFields.options.startValue,this.rangeSelector.inputFields.sessionVariables.startValue=this.rangeSelector.inputFields.options.startValue),this.rangeSelector.inputFields.hasOptionChanged("endValue")&&(this.navigator&&
|
|
1120
|
+
this.navigator.slider&&!f(this.navigator.slider.options.maximum)?this.sessionVariables._axisXMax=this._initialAxisXMax=this._axisXMax:this.sessionVariables._axisXMax=this._initialAxisXMax=this.rangeSelector.inputFields.options.endValue,this.rangeSelector.inputFields.sessionVariables.endValue=this.rangeSelector.inputFields.options.endValue));if(!f(l)){this.navigator.slider.hasOptionChanged("minimum")&&void 0!==this.navigator.slider.options.minimum&&(this.sessionVariables._axisXMin=this._initialAxisXMin=
|
|
1121
|
+
this.navigator.slider.sessionVariables.minimum=this.navigator.slider.minimum=this.navigator.slider.options.minimum);this.navigator.slider.hasOptionChanged("maximum")&&void 0!==this.navigator.slider.options.maximum&&(this.sessionVariables._axisXMax=this._initialAxisXMax=this.navigator.slider.sessionVariables.maximum=this.navigator.slider.maximum=this.navigator.slider.options.maximum);!f(this._initialAxisXMin)&&(this._initialAxisXMin<l.minimum||this._initialAxisXMin>l.maximum)&&(this._initialAxisXMin=
|
|
1122
|
+
isFinite(l.minimum)?l.minimum:this._initialAxisXMin);!f(this._initialAxisXMax)&&(this._initialAxisXMax<l.minimum||this._initialAxisXMax>l.maximum)&&(this._initialAxisXMax=isFinite(l.maximum)?l.maximum:this._initialAxisXMax);if(this._axisXMin<l.minimum||this._axisXMin>l.maximum)this._axisXMin=l.minimum;if(this._axisXMax<l.minimum||this._axisXMax>l.maximum)this._axisXMax=l.maximum;y&&(f(y.minimum)&&f(this.sessionVariables._axisXMin))&&(this._axisXMin=l.minimum);y&&(f(y.maximum)&&f(this.sessionVariables._axisXMax))&&
|
|
1123
|
+
(this._axisXMax=l.maximum)}if(y&&(f(y.minimum)&&f(y.maximum)||"rangeButton"===y.minimum&&"rangeButton"===y.maximum)&&f(this.rangeUpdatedBy)&&f(this._selectedRangeButtonIndex))for(c=0;c<this.rangeSelector.buttons.length;c++)"all"===this.rangeSelector.buttons[c].rangeType&&this.rangeSelector.buttons[c].enabled&&(this.rangeSelector.buttons[c].state="on",this.rangeSelector.selectedRangeButtonIndex=this._selectedRangeButtonIndex=c,y.minimum=y.maximum="rangeButton",this.rangeSelector.buttons[c].textBlock.fontWeight=
|
|
1124
|
+
"bold",this.rangeSelector.buttons[c].textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,this.rangeSelector.buttons[c].textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect,this.rangeSelector.buttons[c].textBlock.render(!0));!f(l)&&l.reversed?this._syncCharts(this._axisXMax,this._axisXMin):this._syncCharts(this._axisXMin,this._axisXMax)};t.prototype.setChartsLayout=function(){var c,n,h=0,s=this.width;this.isPlotAreaSet=this.isDateTime=!1;for(var a=0;a<
|
|
1125
|
+
this.charts.length;a++){c=this.charts[a];c._initialize();c.setLayout();n={};if((c.axisX[0]||c.axisX2[0])&&(c.axisY[0]||c.axisY2[0])){var k=c.axisX[0]?c.axisX[0].lineCoordinates:c.axisX2[0].lineCoordinates;if(c.axisY&&0<c.axisY.length&&c.axisY[0]){var d=c.axisY[0];n.x1=k.x1<k.x2?k.x1:d.lineCoordinates.x1;n.x2=k.x2>d.lineCoordinates.x2?k.x2:d.lineCoordinates.x2}c.axisY2&&0<c.axisY2.length&&c.axisY2[0]&&(d=c.axisY2[0],n.x1=k.x1<k.x2?k.x1:d.lineCoordinates.x1,n.x2=k.x2>d.lineCoordinates.x2?k.x2:d.lineCoordinates.x2)}for(k=
|
|
1126
|
+
0;k<c.data.length;k++)"dateTime"===c.data[k].xValueType&&(this.isDateTime=!0);h=Math.max(h,f(n.x1)?h:n.x1);s=Math.min(s,f(n.x2)?s:n.x2);c.sessionVariables.plotAreaBounds=n}this._chartsPlotAreaX1=h;this._chartsPlotAreaX2=s};t.prototype._updateSize=function(){return lb.call(this,[this.canvas,this.overlaidCanvas])};t.prototype._syncCharts=function(c,n){for(var h=this,s=null,a=Math.min(c,n),k=Math.max(c,n),d=0;d<this.charts.length;d++){s=this.charts[d];s.toolTip&&((isNaN(s.toolTip._prevX)||isNaN(s.toolTip._prevY))&&
|
|
1127
|
+
f(s.toolTip._xValue))&&s.toolTip.hide();for(var b=0;b<s.axisX.length;b++)s.axisX[b].setViewPortRange(c,n),s.axisX[b].options.labelAngle=f(s.axisX[b].options.labelAngle)?0:s.axisX[b].options.labelAngle,this.charts[d].axisX[b].crosshair&&this.charts[d].axisX[b].crosshair.enabled&&(this.charts[d].axisX[b].crosshair.options.updated||(this.charts[d].axisX[b].crosshair.options.updated=function(a){for(var b=0;b<h.charts.length;b++)if(h.charts[b]!=a.chart)for(var c=0;c<h.charts[b].axisX.length;c++)h.charts[b].axisX[c].crosshair&&
|
|
1128
|
+
h.charts[b].axisX[c].crosshair.showAt(a.value)}),this.charts[d].axisX[b].crosshair.options.hidden||(this.charts[d].axisX[b].crosshair.options.hidden=function(a){for(var b=0;b<h.charts.length;b++)if(h.charts[b]!=a.chart)for(var c=0;c<h.charts[b].axisX.length;c++)h.charts[b].axisX[c].crosshair&&h.charts[b].axisX[c].crosshair.hide()}));for(b=0;b<s.axisX2.length;b++)s.axisX2[b].setViewPortRange(c,n),s.axisX2[b].options.labelAngle=f(s.axisX2[b].options.labelAngle)?0:s.axisX2[b].options.labelAngle,this.charts[d].axisX2[b].crosshair&&
|
|
1129
|
+
this.charts[d].axisX2[b].crosshair.enabled&&(this.charts[d].axisX2[b].crosshair.options.updated||(this.charts[d].axisX2[b].crosshair.options.updated=function(a){for(var b=0;b<h.charts.length;b++)if(h.charts[b]!=a.chart)for(var c=0;c<h.charts[b].axisX2.length;c++)h.charts[b].axisX2[c].crosshair&&h.charts[b].axisX2[c].crosshair.showAt(a.value)}),this.charts[d].axisX2[b].crosshair.options.hidden||(this.charts[d].axisX2[b].crosshair.options.hidden=function(a){for(var b=0;b<h.charts.length;b++)if(h.charts[b]!=
|
|
1130
|
+
a.chart)for(var c=0;c<h.charts[b].axisX2.length;c++)h.charts[b].axisX2[c].crosshair&&h.charts[b].axisX2[c].crosshair.hide()}));s._initialize();s.setLayout();s.panEnabled=s.options.zoomEnabled&&s.zoomEnabled?!1:!0;s.renderElements();(f(this.charts[d].options.toolTip)||!f(this.charts[d].options.toolTip)&&f(this.charts[d].options.toolTip.updated))&&this.charts[d].toolTip&&(this.charts[d].toolTip.updated=function(a){for(var b=0;b<h.charts.length;b++)h.charts[b]!=a.chart&&h.charts[b].toolTip.showAtX(a.entries[0].xValue,
|
|
1131
|
+
a.entries[0].dataSeriesIndex)});(f(this.charts[d].options.toolTip)||!f(this.charts[d].options.toolTip)&&f(this.charts[d].options.toolTip.hidden))&&this.charts[d].toolTip&&(this.charts[d].toolTip.hidden=function(a){for(var b=0;b<h.charts.length;b++)h.charts[b]!=a.chart&&h.charts[b].toolTip.hide()})}this.rangeSelector&&(this.rangeSelector.enabled&&this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled)&&this.rangeSelector._updateInputFields(a,k);this.navigator&&this.navigator.enabled&&
|
|
1132
|
+
this.navigator._updateSlider(a,k)};t.prototype.destroy=function(){for(var c=this.allDOMEventHandlers,f=0;f<this.charts.length;f++)this.charts[f].destroy();this.navigator&&this.navigator.enabled&&this.navigator.chart.destroy();for(f=0;f<c.length;f++)gb(c[f][0],c[f][1],c[f][2],c[f][3]);for(this.allDOMEventHandlers=[];this.navigator&&this.navigator.enabled&&this.navigator.panel.hasChildNodes();)this.navigator.panel.removeChild(this.navigator.panel.lastChild);for(;this._canvasJSContainer&&this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild);
|
|
1133
|
+
for(;this.container&&this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild);this.container=this._canvasJSContainer=null;Da(this.canvas);Da(this.overlaidCanvas);this._eventManager&&this._eventManager.ghostCanvas&&Da(this._eventManager.ghostCanvas);this.navigator.panel=null;this.rangeSelector.panel=null};t.prototype.exportChart=function(c){c="undefined"===typeof c?{}:c;var f=c.format?c.format:"png",h=c.fileName?c.fileName:this.exportFileName,s=this.canvas.cloneNode();s.setAttribute("class",
|
|
1134
|
+
s.getAttribute("class")+"-clone");var a=s.getContext("2d");a.drawImage(this.canvas,0,0);for(var k=[],d=0;d<this.charts.length;d++){var b=this.charts[d];k.push({canvas:b.canvas,position:{x:b.container.offsetLeft,y:b.container.offsetTop}})}this.navigator&&this.navigator.enabled&&(d=this.navigator,k.push({canvas:d.chart.canvas,position:{x:d.panel.offsetLeft,y:d.panel.offsetTop}}),k.push({canvas:d.chart.overlaidCanvas,position:{x:d.panel.offsetLeft,y:d.panel.offsetTop}}));for(d=0;d<k.length;d++)a.drawImage(k[d].canvas,
|
|
1135
|
+
k[d].position.x*la,k[d].position.y*la);if(c.toDataURL)return s.toDataURL("image/"+f);db(s,f,h)};t.prototype.print=function(){var c=this.exportChart({toDataURL:!0}),f=document.createElement("iframe");f.setAttribute("class","canvasjs-chart-print-frame");S(f,{position:"absolute",width:"100%",border:0,margin:0,padding:0});f.style.height=this.height+"px";this._canvasJSContainer.appendChild(f);var h=this,s=f.contentWindow||f.contentDocument.document||f.contentDocument;s.document.open();s.document.write('<!DOCTYPE HTML>\n<html><body><img src="'+
|
|
1136
|
+
c+'"/><body/></html>');s.document.body&&s.document.body.style&&(s.document.body.style.margin="0px 0px 0px 0px",s.document.body.style.padding="0px 0px 0px 0px");s.document.close();setTimeout(function(){s.focus();s.print();setTimeout(function(){h._canvasJSContainer.removeChild(f)},1E3)},500)};t.prototype.getObjectAtXY=function(c,n,h){h=null;if(!f(this.rangeSelector)){for(var s=0;s<this.rangeSelector.buttons.length;s++){var a=this.rangeSelector.buttons[s];c>=a.bounds.x1&&(c<=a.bounds.x2&&n>=a.bounds.y1&&
|
|
1137
|
+
n<=a.bounds.y2)&&(h=a.id)}for(s=0;s<this.rangeSelector.inputFields._textBlocks.length;s++)a=this.rangeSelector.inputFields._textBlocks[s],c>=a.bounds.x1&&(c<=a.bounds.x2&&n>=a.bounds.y1&&n<=a.bounds.y2)&&(h=a.id)}return h};t.prototype._touchEventHandler=function(c){if(c.changedTouches){var n=[],h=c.changedTouches,s=h?h[0]:c,a=null;switch(c.type){case "touchstart":case "MSPointerDown":n=["mousemove","mousedown"];this._lastTouchData=Ba(s);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":n=
|
|
1138
|
+
["mousemove"];break;case "touchend":case "MSPointerUp":var k=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,n="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>k?["mouseup","click"]:["mouseup"];break;default:return}if(!(h&&1<h.length)){a=Ba(s);a.time=new Date;try{var d=a.y-this._lastTouchData.y,k=a.time-this._lastTouchData.time;if(1<Math.abs(d)&&this._lastTouchData.scroll||5<Math.abs(d)&&250>k)this._lastTouchData.scroll=!0}catch(b){}this._lastTouchEventType=
|
|
1139
|
+
c.type;if(this._lastTouchData&&this._lastTouchData.scroll)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(h=0;h<n.length;h++){a=n[h];d=document.createEvent("MouseEvent");d.initMouseEvent(a,!0,!0,window,1,s.screenX,s.screenY,s.clientX,s.clientY,!1,!1,!1,!1,0,null);s.target.dispatchEvent(d);if(this._lastTouchData&&!f(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||this._lastTouchData&&!this._lastTouchData.scroll&&250<k&&f(this._chartScroll)||"click"===a)c.preventManipulation&&
|
|
1140
|
+
c.preventManipulation(),c.preventDefault&&c.cancelable&&c.preventDefault();this._chartScroll=null}}}};t.prototype._mouseEventHandler=function(c){"undefined"===typeof c.target&&c.srcElement&&(c.target=c.srcElement);var f=Ba(c),h=c.type,s,a;c.which?a=3==c.which:c.button&&(a=2==c.button);t.capturedEventParam&&(s=t.capturedEventParam,"mouseup"===h&&(t.capturedEventParam=null,s.stockChart.overlaidCanvas.releaseCapture?s.stockChart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",
|
|
1141
|
+
s.stockChart._mouseEventHandler,!1)),s.hasOwnProperty(h)&&("mouseup"!==h||s.stockChart.overlaidCanvas.releaseCapture?c.target!==s.stockChart.overlaidCanvas&&v||s[h].call(s.context,f.x,f.y):c.target!==s.stockChart.overlaidCanvas&&(s.stockChart.isDrag=!1)));if(this._ignoreNextEvent)this._ignoreNextEvent=!1;else if(c.preventManipulation&&c.preventManipulation(),c.preventDefault&&c.preventDefault(),La&&window.console&&(window.console.log(h+" --\x3e x: "+f.x+"; y:"+f.y),a&&window.console.log(c.which),
|
|
1142
|
+
"mouseup"===h&&window.console.log("mouseup")),!a){if(!t.capturedEventParam&&this._events){for(var k=0;k<this._events.length;k++)if(this._events[k].hasOwnProperty(h))if(s=this._events[k],a=s.bounds,f.x>=a.x1&&f.x<=a.x2&&f.y>=a.y1&&f.y<=a.y2){s[h].call(s.context,f.x,f.y);"mousedown"===h&&!0===s.capture?(Chart.capturedEventParam=s,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===h&&(s.stockChart.overlaidCanvas.releaseCapture?
|
|
1143
|
+
s.stockChart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else s=null;c.target.style.cursor=s&&s.cursor?s.cursor:this._defaultCursor}h=this.bounds;(f.x<h.x1||f.x>h.x2||f.y<h.y1||f.y>h.y2)&&this.resetOverlayedCanvas();!this.isDrag&&this._eventManager&&this._eventManager.mouseEventHandler(c)}};t.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};t.prototype.clearCanvas=mb;
|
|
1144
|
+
t.prototype.getAutoFontSize=nb;ja(F,Ha);ja(N,Ma);Ja.prototype.alignVerticalAxes=function(){if(!this.isNavigator&&this.stockChart){for(var c=this.sessionVariables.plotAreaBounds,f=this.stockChart._chartsPlotAreaX1-c.x1,c=c.x2-this.stockChart._chartsPlotAreaX2,h=0;h<this.axisX.length;h++)this.axisX[h].lineCoordinates.x1+=f,this.axisX[h].lineCoordinates.x2-=c,this.axisX[h].lineCoordinates.width=this.axisX[h].lineCoordinates.x2-this.axisX[h].lineCoordinates.x1,this.axisX[h].bounds.x1+=f,this.axisX[h].bounds.x2-=
|
|
1145
|
+
c,this.axisX[h].calculateValueToPixelConversionParameters();for(h=0;h<this.axisX2.length;h++)this.axisX2[h].lineCoordinates.x1+=f,this.axisX2[h].lineCoordinates.x2-=c,this.axisX2[h].lineCoordinates.width=this.axisX2[h].lineCoordinates.x2-this.axisX2[h].lineCoordinates.x1,this.axisX2[h].bounds.x1+=f,this.axisX2[h].bounds.x2-=c,this.axisX2[h].calculateValueToPixelConversionParameters();for(h=0;h<this.axisY.length;h++)this.axisY[h].lineCoordinates.x1+=f,this.axisY[h].lineCoordinates.x2+=f,this.axisY[h].bounds.x1+=
|
|
1146
|
+
f,this.axisY[h].bounds.x2+=f;for(h=0;h<this.axisY2.length;h++)this.axisY2[h].lineCoordinates.x1-=c,this.axisY2[h].lineCoordinates.x2-=c,this.axisY2[h].bounds.x1-=c,this.axisY2[h].bounds.x2-=c}};Ja.prototype.syncCharts=function(c,n){this.stockChart&&(this.stockChart.sessionVariables._axisXMin=c,this.stockChart.sessionVariables._axisXMax=n,c=f(c)?this.stockChart._initialAxisXMin:c,n=f(n)?this.stockChart._initialAxisXMax:n,this.stockChart._syncCharts(c,n),this.stockChart.rangeSelector&&(this.stockChart.rangeSelector&&
|
|
1147
|
+
"zoom"!==this._zoomButton.getAttribute("state"))&&this.stockChart.rangeSelector.resetRangeButtons())};L.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.eventObjects=[];v&&(this.ghostCtx.clearRect(0,0,this.stockChart.width,this.stockChart.height),this.ghostCtx.beginPath())};L.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};L.prototype.mouseEventHandler=function(c){if("mousemove"===c.type||"click"===c.type){var f=
|
|
1148
|
+
[],h=Ba(c),s=null;if((s=this.stockChart.getObjectAtXY(h.x,h.y,!1))&&"undefined"!==typeof this.objectMap[s])if(s=this.objectMap[s],"rangeButton"===s.objectType){var a=this.stockChart.rangeSelector.buttons[s.rangeButtonIndex];s.eventParameter={x:h.x,y:h.y,rangeButton:a,rangeButtonIndex:s.rangeButtonIndex,stockChart:this.stockChart};s.eventContext={context:this.stockChart.rangeSelector,userContext:a,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};f.push(s)}else"inputFields"===
|
|
1149
|
+
s.objectType&&(a=this.stockChart.rangeSelector.inputFields._textBlocks[s.inputFieldIndex],s.eventParameter={x:h.x,y:h.y,inputField:a,inputFieldIndex:s.inputFieldIndex,stockChart:this.stockChart},s.eventContext={context:this.stockChart.rangeSelector,userContext:a,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"},f.push(s));a=[];for(h=0;h<this.mouseoveredObjectMaps.length;h++){for(var k=!0,s=0;s<f.length;s++)if(f[s].id===this.mouseoveredObjectMaps[h].id){k=!1;break}k?this.fireEvent(this.mouseoveredObjectMaps[h],
|
|
1150
|
+
"mouseout",c):a.push(this.mouseoveredObjectMaps[h])}this.mouseoveredObjectMaps=a;for(h=0;h<f.length;h++){a=!1;for(s=0;s<this.mouseoveredObjectMaps.length;s++)if(f[h].id===this.mouseoveredObjectMaps[s].id){a=!0;break}a||(this.fireEvent(f[h],"mouseover",c),this.mouseoveredObjectMaps.push(f[h]));"click"===c.type?this.fireEvent(f[h],"click",c):"mousemove"===c.type&&this.fireEvent(f[h],"mousemove",c)}}};L.prototype.fireEvent=function(c,f,h){if(c&&f){var s=c.eventParameter,a=c.eventContext,k=c.eventContext.userContext;
|
|
1151
|
+
k&&(a&&k[a[f]])&&k[a[f]].call(k,s);"mouseout"!==f?k.cursor&&k.cursor!==h.target.style.cursor&&(h.target.style.cursor=k.cursor):(h.target.style.cursor=this.stockChart._defaultCursor,delete c.eventParameter,delete c.eventContext)}};ja(z,aa);z.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("backgroundColor");"undefined"===typeof this.options.backgroundColor&&"undefined"!==typeof this.stockChart.options.backgroundColor&&(this.backgroundColor=this.stockChart.backgroundColor);
|
|
1152
|
+
this.backgroundColor||(this.backgroundColor="rgba(0, 0, 0, 0)");this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&v;this.updateOption("animationDuration");this.updateOption("theme");this.updateOption("verticalAlign");this.updateOption("horizontalAlign");this.updateOption("width");this.updateOption("height");this.updateOption("dynamicUpdate")};z.prototype._initialize=function(){this.options=this.stockChart.options.navigator||{_isPlaceholder:!0};this._updateOptions();
|
|
1153
|
+
var c;this.enabled&&!this.panel&&(this.panel=s("canvasjs-navigator-panel"),(c=!f(this.panel)&&this.stockChart._canvasJSContainer.contains(this.panel))||this.stockChart._canvasJSContainer.appendChild(this.panel));c=!f(this.panel)&&this.stockChart._canvasJSContainer.contains(this.panel);if(!this.enabled||0>=this.height)c&&this.stockChart._canvasJSContainer.removeChild(this.panel);else{this.height=f(this.options.height)?0.14*this.stockChart.height:parseInt(this.options.height);c||this.stockChart._canvasJSContainer.appendChild(this.panel);
|
|
1154
|
+
var h=this.stockChart.layoutManager.getFreeSpace(),t=h.x1,v=h.y1;this.width=this.options.width?this.width:h.width;"top"===this.verticalAlign?(v=h.y1+2,c="top"):(v=h.y2-this.height-2,c="bottom");"left"===this.horizontalAlign?t=h.x1-2:"center"===this.horizontalAlign?t=h.x1+h.width/2-this.width/2:"right"===this.horizontalAlign&&(t=h.x2-2-this.width);this.panel.style.top=v+"px";this.panel.style.left=t+"px";this.panel.style.height=this.height+"px";this.panel.style.width=this.width+"px";this.stockChart.layoutManager.registerSpace(c,
|
|
1155
|
+
{width:this.width,height:this.height+2});this.bounds={x1:t,y1:v,x2:t+this.width,y2:v+this.height}}};z.prototype._updateSlider=function(c,h){if(!(0>=this.height)&&this.enabled){var s=this.chart.axisX&&this.chart.axisX.length?this.chart.axisX[0]:this.chart.axisX2[0];if(!f(s)){var t=Math.min(s.bounds.x2,Math.max(s.bounds.x1,s.convertValueToPixel(s.reversed?Math.max(c,Math.min(s.maximum,h)):Math.min(c,Math.min(s.maximum,h))))),a=Math.max(s.bounds.x1,Math.min(s.bounds.x2,s.convertValueToPixel(s.reversed?
|
|
1156
|
+
Math.min(c,Math.min(s.maximum,h)):Math.max(c,Math.min(s.maximum,h)))));this.slider.panel.style.left=t+"px";this.slider.left=t;this.slider.panel.style.width=a-t+"px";this.slider.width=a-t;this.slider.minimum=Math.min(c,h);this.slider.maximum=Math.max(c,h);this.chart.resetOverlayedCanvas();this.slider.maskInverted?Q(this.chart.overlaidCanvasCtx,t,0,a,this.height,this.slider.maskColor,0,this.slider.outlineColor,0,0,0,0,this.slider.maskOpacity):(Q(this.chart.overlaidCanvasCtx,s.bounds.x1,0,t,this.height,
|
|
1157
|
+
this.slider.maskColor,0,this.slider.outlineColor,!1,!1,!1,!1,this.slider.maskOpacity),Q(this.chart.overlaidCanvasCtx,a,0,this.width,this.height,this.slider.maskColor,0,this.slider.outlineColor,!1,!1,!1,!1,this.slider.maskOpacity));this.chart.overlaidCanvasCtx.lineWidth=this.slider.outlineThickness;this.chart.overlaidCanvasCtx.strokeStyle=this.slider.outlineColor;this.chart.overlaidCanvasCtx.save();this.chart.overlaidCanvasCtx.beginPath();0<this.slider.outlineThickness&&(this.slider.outlineInverted?
|
|
1158
|
+
(this.chart.overlaidCanvasCtx.moveTo(s.bounds.x1,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?t+0.5:t,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.moveTo(1===this.slider.outlineThickness%2?t+0.5:t,this.height),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?t+0.5:t,this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?a-0.5:a,this.slider.outlineThickness/
|
|
1159
|
+
2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?a-0.5:a,this.height),this.chart.overlaidCanvasCtx.moveTo(1===this.slider.outlineThickness%2?a-0.5:a,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(this.width,this.height-this.slider.outlineThickness/2)):(this.chart.overlaidCanvasCtx.moveTo(s.bounds.x1,this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?t+0.5:t,this.slider.outlineThickness/2),
|
|
1160
|
+
this.chart.overlaidCanvasCtx.moveTo(1===this.slider.outlineThickness%2?t+0.5:t,0),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?t+0.5:t,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?a-0.5:a,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?a-0.5:a,0),this.chart.overlaidCanvasCtx.moveTo(1===this.slider.outlineThickness%2?a-0.5:a,this.slider.outlineThickness/
|
|
1161
|
+
2),this.chart.overlaidCanvasCtx.lineTo(this.width,this.slider.outlineThickness/2)));this.chart.overlaidCanvasCtx.stroke();this.chart.overlaidCanvasCtx.restore();Q(this.chart.overlaidCanvasCtx,1===this.slider.handleBorderThickness%2?t-this.slider.handleWidth/2<<0.5:t-this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2-this.slider.handleHeight/2<<0.5:this.height/2-this.slider.handleHeight/2<<0,1===this.slider.handleBorderThickness%2?t+this.slider.handleWidth/2<<0.5:t+
|
|
1162
|
+
this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2+this.slider.handleHeight/2<<0.5:this.height/2+this.slider.handleHeight/2<<0,this.slider.handleColor,this.slider.handleBorderThickness,this.slider.handleBorderColor,!1,!1,!1,!1,1);Q(this.chart.overlaidCanvasCtx,1===this.slider.handleBorderThickness%2?a-this.slider.handleWidth/2<<0.5:a-this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2-this.slider.handleHeight/2<<0.5:this.height/2-this.slider.handleHeight/
|
|
1163
|
+
2<<0,1===this.slider.handleBorderThickness%2?a+this.slider.handleWidth/2<<0.5:a+this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2+this.slider.handleHeight/2<<0.5:this.height/2+this.slider.handleHeight/2<<0,this.slider.handleColor,this.slider.handleBorderThickness,this.slider.handleBorderColor,!1,!1,!1,!1,1);this.chart.overlaidCanvasCtx.lineWidth=this.slider.handleBorderThickness;this.chart.overlaidCanvasCtx.strokeStyle=this.slider.handleBorderColor;this.chart.overlaidCanvasCtx.save();
|
|
1164
|
+
this.chart.overlaidCanvasCtx.beginPath();this.chart.overlaidCanvasCtx.moveTo((1===this.slider.handleBorderThickness%2?(t-this.slider.handleBorderThickness/2<<0)+0.5:t)-Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(t-this.slider.handleBorderThickness/2<<0)+0.5:t)-Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.moveTo((1===
|
|
1165
|
+
this.slider.handleBorderThickness%2?(t+this.slider.handleBorderThickness/2<<0)+0.5:t)+Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(t+this.slider.handleBorderThickness/2<<0)+0.5:t)+Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.moveTo((1===this.slider.handleBorderThickness%2?(a-this.slider.handleBorderThickness/
|
|
1166
|
+
2<<0)+0.5:a)-Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(a-this.slider.handleBorderThickness/2<<0)+0.5:a)-Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.moveTo((1===this.slider.handleBorderThickness%2?(a+this.slider.handleBorderThickness/2<<0)+0.5:a)+Math.round(this.slider.handleBorderThickness),this.height/
|
|
1167
|
+
2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(a+this.slider.handleBorderThickness/2<<0)+0.5:a)+Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.stroke();this.chart.overlaidCanvasCtx.restore()}}};ja(P,aa);P.prototype._updateOptions=function(){this.updateOption("maskColor");this.updateOption("maskInverted");this.updateOption("maskOpacity");this.updateOption("handleColor");
|
|
1168
|
+
this.updateOption("handleBorderColor");this.updateOption("handleBorderThickness");this.updateOption("handleWidth");this.updateOption("handleHeight");this.updateOption("outlineColor");this.updateOption("outlineThickness");this.updateOption("outlineInverted");this.updateOption("minimum");this.updateOption("maximum")};P.prototype._attachEvents=function(){var c=this;D(this.panel,"mousedown",function(f){c.stockChart.isDrag=!0;f.target!==c.leftHandle&&f.target!==c.rightHandle&&(c.stockChart.navigatorClicked=
|
|
1169
|
+
!0,c.currentHandle=c.leftHandle,c.panMode=!0,c.startPosition=Ba(f),f.target===c.currentHandle?c.startPosition.x+=c.currentHandle.offsetLeft+c.currentHandle.clientWidth/2+c.panel.offsetLeft:f.target===c.panel&&(c.startPosition.x+=c.panel.offsetLeft),c.startWidth=c.panel.clientWidth,c.startLeft=c.panel.offsetLeft)},this.stockChart.allDOMEventHandlers);D(this.panel,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(f){c.stockChart._touchEventHandler(f)},this.stockChart.allDOMEventHandlers);
|
|
1170
|
+
D(this.navigator.panel,"mousedown",function(h){if(h.target!==c.navigator.slider.panel&&h.target!==c.leftHandle&&h.target!==c.rightHandle){c.stockChart.navigatorClicked=!0;var s=Ba(h),t,a;t=0;var k=c.navigator.chart.axisX&&c.navigator.chart.axisX.length?c.navigator.chart.axisX[0]:c.navigator.chart.axisX2[0];h=c.navigator.slider.left;f(c.startLeft)&&(c.startLeft=h);t=h+c.navigator.slider.width;a=s.x-(h+t)/2;if(s.x<h||s.x>t){var s=Math.max(0,h+a),d=Math.min(t+a,c.navigator.width);t+a>c.navigator.width&&
|
|
1171
|
+
(t=t+a-c.navigator.width,s-=t);0>h+a&&(t=Math.abs(h+a),d+=t);c.stockChart._rangeEventParameter={stockChart:c.stockChart,source:"navigator",index:null,minimum:Math.min(k.convertPixelToValue(s),k.convertPixelToValue(d)),maximum:Math.max(k.convertPixelToValue(s),k.convertPixelToValue(d))};c.stockChart.sessionVariables._axisXMin=k.convertPixelToValue(s);c.stockChart.sessionVariables._axisXMax=k.convertPixelToValue(d);c.navigator.dynamicUpdate?(c.stockChart._rangeEventParameter.type="rangeChanging",c.stockChart.dispatchEvent("rangeChanging",
|
|
1172
|
+
c.stockChart._rangeEventParameter,c.stockChart),c.stockChart._syncCharts(k.convertPixelToValue(s),k.convertPixelToValue(d)),c.stockChart._rangeEventParameter.type="rangeChanged",c.stockChart.dispatchEvent("rangeChanged",c.stockChart._rangeEventParameter,c.stockChart)):c.navigator._updateSlider(c.stockChart.sessionVariables._axisXMin,c.stockChart.sessionVariables._axisXMax);a=(h=c.stockChart.rangeSelector)&&h.buttons;h&&(h.enabled&&a&&a.length)&&(k=h.sessionVariables&&h.sessionVariables._clickedRangeButtonIndex,
|
|
1173
|
+
t=h.sessionVariables&&h.sessionVariables.selectedRangeButtonIndex,k&&a[k]&&"ytd"===a[k].rangeType||f(k)&&t&&a[t]&&"ytd"===a[t].rangeType)&&(c.stockChart.rangeUpdatedBy="navigator",h.resetRangeButtons())}}},this.navigator.stockChart.allDOMEventHandlers);D(this.navigator.panel,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(f){c.stockChart._touchEventHandler(f)},this.navigator.stockChart.allDOMEventHandlers);D(this.navigator.stockChart.container,"mousemove",function(h){var s=
|
|
1174
|
+
c.navigator.chart.axisX&&c.navigator.chart.axisX.length?c.navigator.chart.axisX[0]:c.navigator.chart.axisX2[0];if(!f(c.currentHandle)&&c.startPosition){c.navigator.chart.overlaidCanvas.style.cursor=c.navigator.chart.container.style.cursor=c.navigator.panel.style.cursor="ew-resize";var t,a;t=c.currentHandle===c.leftHandle?1:-1;a=Ba(h);h=h.target||h.srcElement;a.x=h===c.currentHandle?a.x+(c.currentHandle.offsetLeft+c.currentHandle.clientWidth/2+c.panel.offsetLeft):h===c.mask||h===c.panel?a.x+(c.panel.offsetLeft+
|
|
1175
|
+
(c.handleHeld?c.leftHandle.clientWidth/2:0)):h===c.rightHandle&&c.currentHandle===c.leftHandle?a.x+(c.rightHandle.offsetLeft+c.panel.offsetLeft):h===c.leftHandle&&c.currentHandle===c.rightHandle?a.x+(c.leftHandle.offsetLeft+c.currentHandle.clientWidth/2+c.panel.offsetLeft):a.x+(c.leftHandle.clientWidth/2+("canvasjs-chart-toolbar"===h.parentElement.className?h.offsetParent.offsetLeft+h.offsetLeft-c.stockChart._chartsPlotAreaX1:h.parentElement.parentElement.parentElement===c.navigator.panel?h.offsetLeft:
|
|
1176
|
+
h.offsetLeft-c.stockChart._chartsPlotAreaX1));var k=a.x-c.startPosition.x;if(0!==k){h=c.panel.offsetLeft;var d=c.panel.clientWidth;0<t&&(h=Math.max(c.startLeft+t*k,c._left));c.panMode||(d=Math.min(c.startWidth-t*k,c.fullWidth),t*k>c.startWidth?(h=0<t?c.startLeft+c.startWidth:Math.max(a.x,c._left),d=(0<t?a.x:c.startLeft)-parseFloat(h)):0>t&&(h=c.startLeft));if(h+d<=c._left+c.fullWidth&&(2<Math.abs(c.startLeft-h)||2<Math.abs(c.startWidth-parseFloat(d)))&&(0<t&&(c.left=h,c.panel.style.left=c.left+"px"),
|
|
1177
|
+
c.panMode||(c.panel.style.width=c.width=d+"px"),!f(s))){t=s.convertPixelToValue(Math.max(s.bounds.x1,parseFloat(h)));a=s.convertPixelToValue(parseFloat(h)+parseFloat(d));c.stockChart.sessionVariables._axisXMin=t;c.stockChart.sessionVariables._axisXMax=a===s.viewportMaximum?null:a;if(c.stockChart.rangeSelector&&c.stockChart.rangeSelector.enabled){s=-1;for(h=0;h<c.stockChart.rangeSelector.buttons.length;h++)if("ytd"===c.stockChart.rangeSelector.buttons[h].rangeType){s=h;break}if(!c.panMode||c.panMode&&
|
|
1178
|
+
0<c.stockChart.rangeSelector.buttons.length&&c.stockChart.rangeSelector.buttons[s]&&"on"===c.stockChart.rangeSelector.buttons[s].state)c.stockChart.rangeUpdatedBy="navigator",c.stockChart.rangeSelector.resetRangeButtons()}c.stockChart._rangeEventParameter={stockChart:c.stockChart,source:"navigator",index:null,minimum:Math.min(t,a),maximum:Math.max(t,a)};c.navigator.dynamicUpdate?(c.stockChart._rangeEventParameter.type="rangeChanging",c.stockChart.dispatchEvent("rangeChanging",c.stockChart._rangeEventParameter,
|
|
1179
|
+
c.stockChart),c.stockChart._syncCharts(t,a),c.stockChart._rangeEventParameter.type="rangeChanged",c.stockChart.dispatchEvent("rangeChanged",c.stockChart._rangeEventParameter,c.stockChart)):c.navigator._updateSlider(c.stockChart.sessionVariables._axisXMin,c.stockChart.sessionVariables._axisXMax);c.panMode||(c.stockChart.rangeUpdatedBy="navigator")}}}else c.navigator.chart.overlaidCanvas.style.cursor=c.navigator.chart.container.style.cursor=c.navigator.panel.style.cursor="auto"},this.navigator.stockChart.allDOMEventHandlers);
|
|
1180
|
+
D(this.navigator.stockChart.container,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(f){c.stockChart._touchEventHandler(f)},this.navigator.stockChart.allDOMEventHandlers)};P.prototype._initialize=function(){var c=this,n;this.options=this.stockChart.navigator&&this.stockChart.navigator.options&&this.stockChart.navigator.options.slider?this.stockChart.navigator.options.slider:{_isPlaceholder:!0};this._updateOptions();ha&&(this.eventsAttached||(this._attachEvents(),this.eventsAttached=
|
|
1181
|
+
!0),this.handleWidth=this.options.handleWidth?this.handleWidth:8,this.handleHeight=this.options.handleHeight?Math.min(this.navigator.height,this.options.handleHeight):0.25*this.navigator.height,this.leftHandle?S(this.leftHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",left:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",padding:0,backgroundColor:"white",
|
|
1182
|
+
filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",zIndex:999}):(this.leftHandle=h("button","canvasjs-slider-handle","button"),this.leftHandle.innerHTML="||",S(this.leftHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",left:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",
|
|
1183
|
+
outline:"none",padding:0,backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",zIndex:999}),this.panel.appendChild(this.leftHandle),this.initHandle(this.leftHandle,1)),this.rightHandle?S(this.rightHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",right:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+
|
|
1184
|
+
"px",borderColor:"transparent",outline:"none",padding:"0px",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",zIndex:"999"}):(this.rightHandle=h("button","canvasjs-slider-handle","button"),this.rightHandle.innerHTML="||",S(this.rightHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",right:"-"+(this.handleWidth/
|
|
1185
|
+
2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",padding:"0px",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0,color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",zIndex:"999"}),this.panel.appendChild(this.rightHandle),this.initHandle(this.rightHandle,-1)),S(this.panel,{position:"absolute",height:this.navigator.height+
|
|
1186
|
+
"px",left:0,width:"100%",cursor:"move",backgroundColor:"white",filter:"alpha(opacity = 0)",opacity:0}),this.fullWidth=this.panel.clientWidth,this._left=this.navigator.panel.offsetLeft,D(document,"mouseup",function(h){c.panMode=!1;c.navigator.stockChart.isDrag=!1;c.navigator.slider.handleHeld=!1;var s=c.navigator.chart.axisX&&c.navigator.chart.axisX.length?c.navigator.chart.axisX[0]:c.navigator.chart.axisX2[0];if(c.stockChart.navigatorClicked&&(h=Math.min(c.stockChart.sessionVariables._axisXMin||c.stockChart._axisXMin,
|
|
1187
|
+
c.stockChart.sessionVariables._axisXMax||c.stockChart._axisXMax),s=Math.max(c.stockChart.sessionVariables._axisXMin||c.stockChart._axisXMin,c.stockChart.sessionVariables._axisXMax||s.viewportMaximum),f(c.stockChart._rangeEventParameter)&&(c.stockChart._rangeEventParameter={stockChart:c.stockChart,source:"navigator",index:null,minimum:Math.min(h,s),maximum:Math.max(h,s)}),2<Math.abs(c.startLeft-c.left)||2<Math.abs(c.startWidth-parseFloat(c.width)))){c.navigator.dynamicUpdate||(c.stockChart._rangeEventParameter.type=
|
|
1188
|
+
"rangeChanging",c.stockChart.dispatchEvent("rangeChanging",c.stockChart._rangeEventParameter,c.stockChart));for(var a=0;a<c.stockChart.charts.length;a++){n=c.stockChart.charts[a];n.toolTip&&n.toolTip.enabled&&n.toolTip.hide();for(var k=0;k<n.axisX.length;k++)n.axisX[k].setViewPortRange(h,s);for(k=0;k<n.axisX2.length;k++)n.axisX2[k].setViewPortRange(h,s);n.render()}c.stockChart.rangeSelector&&(c.stockChart.rangeSelector.enabled&&c.stockChart.rangeSelector.inputFields&&c.stockChart.rangeSelector.inputFields.enabled)&&
|
|
1189
|
+
c.stockChart.rangeSelector._updateInputFields(h,s);c.navigator.dynamicUpdate||(c.stockChart._rangeEventParameter.type="rangeChanged",c.stockChart.dispatchEvent("rangeChanged",c.stockChart._rangeEventParameter,c.stockChart))}c.stockChart.navigatorClicked=c.currentHandle=c.startPosition=c.startWidth=c.startLeft=null},this.navigator.stockChart.allDOMEventHandlers),D(document,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(h){c.panMode=!1;c.navigator.stockChart.isDrag=!1;c.navigator.slider.handleHeld=
|
|
1190
|
+
!1;var s=c.navigator.chart.axisX&&c.navigator.chart.axisX.length?c.navigator.chart.axisX[0]:c.navigator.chart.axisX2[0];if((2<Math.abs(c.startLeft-c.left)||2<Math.abs(c.startWidth-parseFloat(c.width)))&&c.stockChart.navigatorClicked){h=Math.min(c.stockChart.sessionVariables._axisXMin||c.stockChart._axisXMin,c.stockChart.sessionVariables._axisXMax||c.stockChart._axisXMax);s=Math.max(c.stockChart.sessionVariables._axisXMin||c.stockChart._axisXMin,c.stockChart.sessionVariables._axisXMax||s.viewportMaximum);
|
|
1191
|
+
f(c.stockChart._rangeEventParameter)&&(c.stockChart._rangeEventParameter={stockChart:c.stockChart,source:"navigator",index:null,minimum:Math.min(h,s),maximum:Math.max(h,s)});c.navigator.dynamicUpdate||(c.stockChart._rangeEventParameter.type="rangeChanging",c.stockChart.dispatchEvent("rangeChanging",c.stockChart._rangeEventParameter,c.stockChart));for(var a=0;a<c.stockChart.charts.length;a++){n=c.stockChart.charts[a];n.toolTip&&n.toolTip.enabled&&n.toolTip.hide();for(var k=0;k<n.axisX.length;k++)n.axisX[k].setViewPortRange(h,
|
|
1192
|
+
s);for(k=0;k<n.axisX2.length;k++)n.axisX2[k].setViewPortRange(h,s);n.render()}c.stockChart.rangeSelector&&(c.stockChart.rangeSelector.enabled&&c.stockChart.rangeSelector.inputFields&&c.stockChart.rangeSelector.inputFields.enabled)&&c.stockChart.rangeSelector._updateInputFields(h,s);c.navigator.dynamicUpdate||(c.stockChart._rangeEventParameter.type="rangeChanged",c.stockChart.dispatchEvent("rangeChanged",c.stockChart._rangeEventParameter,c.stockChart))}c.stockChart.navigatorClicked=c.currentHandle=
|
|
1193
|
+
c.startPosition=c.startWidth=c.startLeft=null},this.navigator.stockChart.allDOMEventHandlers))};P.prototype.initHandle=function(c,f){var h=this;c&&(D(c,"mousedown",function(c){h.stockChart.navigatorClicked=!0;h.currentHandle=this;h.startPosition=Ba(c);c.target===h.currentHandle?(h.startPosition.x+=h.currentHandle.offsetLeft+h.currentHandle.clientWidth/2+h.panel.offsetLeft,h.handleHeld=!0):c.target===h.panel&&(h.startPosition.x+=h.panel.offsetLeft);h.startWidth=h.panel.clientWidth;h.startLeft=h.panel.offsetLeft;
|
|
1194
|
+
c.preventDefault&&c.preventDefault();c.stopPropagation&&c.stopPropagation()},this.navigator.stockChart.allDOMEventHandlers),D(c,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(c){h.stockChart._touchEventHandler(c)},this.navigator.stockChart.allDOMEventHandlers))};ja(T,aa);T.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("verticalAlign");this.updateOption("horizontalAlign");this.updateOption("width");this.updateOption("height");this.updateOption("label");
|
|
1195
|
+
this.updateOption("selectedRangeButtonIndex")};T.prototype._initialize=function(){var c;c=0;this._updateOptions();this._label={};this.buttons=[];if(ha&&this.enabled){if(this.options.buttons)for(var h=0;h<this.options.buttons.length;h++)this.buttons.push(new W(this.stockChart,h,this.options.buttons[h]));else{for(h=0;6>h;h++)this.buttons.push(new W(this.stockChart,h));this.buttonLabels="1m 3m 6m YTD 1y All".split(" ")}this._wrapElements=!1;var s=this.stockChart.layoutManager.getFreeSpace(),t=s.x1,h=
|
|
1196
|
+
s.y1;this._shiftInputField=!0;this.width=this.options.width?this.width:s.width;f(this.buttonStyle.options.labelFontSize)&&(this.buttonStyle.labelFontSize=this.stockChart.getAutoFontSize(this.buttonStyle.labelFontSize));if(this.stockChart.title&&this.stockChart.title.text&&("top"===this.stockChart.title.verticalAlign||"right"===this.stockChart.title.horizontalAlign&&"center"===this.stockChart.title.verticalAlign&&this.stockChart.exportEnabled)||"bottom"===this.verticalAlign)this._shiftInputField=!1;
|
|
1197
|
+
if(this.stockChart.subtitles)for(h=0;h<this.stockChart.subtitles.length;h++)this.stockChart.subtitles[h]&&(this.stockChart.subtitles[h].text&&("top"===this.stockChart.subtitles[h].verticalAlign||"right"===this.stockChart.subtitles[h].horizontalAlign&&"center"===this.stockChart.subtitles[h].verticalAlign&&this.stockChart.exportEnabled))&&(this._shiftInputField=!1);this.stockChart.navigator.enabled&&"top"===this.stockChart.navigator.verticalAlign&&(this._shiftInputField=!1);this.rangeButtonsWidth=0;
|
|
1198
|
+
if(this.buttons&&0<this.buttons.length){c=f(this.stockChart.options.culture)||f(this.stockChart._cultureInfo.rangeSelector.rangeText)?this.label:this.stockChart._cultureInfo.rangeSelector.rangeText;var a=new ma(this.ctx,{x:0,y:0,backgroundColor:this.stockChart.backgroundColor,borderThickness:0,cornerRadius:0,maxWidth:0.2*this.stockChart.width,maxHeight:2*this.buttonStyle.labelFontSize,angle:0,padding:0<c.length?{left:5,right:5,top:2,bottom:2}:0,text:c,textAlign:"left",fontSize:this.buttonStyle.labelFontSize,
|
|
1199
|
+
fontFamily:this.buttonStyle.labelFontFamily,fontWeight:this.buttonStyle.labelFontWeight,fontColor:this.buttonStyle.labelFontColor,fontStyle:this.buttonStyle.labelFontStyle,textBaseline:"middle"});this._label.textBlock=a;c=this._label.textBlock.measureText().height}f(this.buttonStyle.options.maxWidth)&&(this.buttonStyle.maxWidth=(this.width-(this._label&&this._label.textBlock?this._label.textBlock.measureText().width:0))/this.buttons.length-2);for(h=0;h<this.buttons.length;h++){var k=this.buttons[h];
|
|
1200
|
+
k._index=h;a=new ma(this.ctx,{x:0,y:0,backgroundColor:this.buttonStyle.backgroundColor,borderColor:this.buttonStyle.borderColor,borderThickness:this.buttonStyle.borderThickness,cornerRadius:0,maxWidth:this.buttonStyle.options.width?this.buttonStyle.width<this.buttonStyle.maxWidth?this.buttonStyle.width:this.buttonStyle.maxWidth:this.buttonStyle.maxWidth,maxHeight:1.5*this.buttonStyle.labelFontSize+("object"===typeof this.buttonStyle.padding?(this.buttonStyle.padding.top||0)+(this.buttonStyle.padding.bottom||
|
|
1201
|
+
0):2*this.buttonStyle.padding),angle:0,padding:this.buttonStyle.padding,text:this.options.buttons&&this.options.buttons.length?f(k.label)?"":k.label:this.buttonLabels[h],textAlign:this.buttonStyle.labelTextAlign,fontSize:this.buttonStyle.labelFontSize,fontFamily:this.buttonStyle.labelFontFamily,fontWeight:this.buttonStyle.labelFontWeight,fontColor:this.buttonStyle.labelFontColor,fontStyle:this.buttonStyle.labelFontStyle,textBaseline:"middle"});!f(this.selectedRangeButtonIndex)&&this.selectedRangeButtonIndex===
|
|
1202
|
+
h&&this.hasOptionChanged("selectedRangeButtonIndex")?k.state="on":this.hasOptionChanged("selectedRangeButtonIndex")||"rangeButton"!==this.stockChart.rangeUpdatedBy||this.sessionVariables._clickedRangeButtonIndex!==h?k.state="off":k.state="on";k.textBlock=a;k.bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null};a.measureText();this.buttonStyle.width=a.width=Math.min(f(this.buttonStyle.options.width)?a.width:this.buttonStyle.options.width,a.maxWidth);this.rangeButtonsWidth+=a.width+this.buttonStyle.spacing;
|
|
1203
|
+
this.rangeButtonsHeight=a.height;c=c<a.height?a.height:c;k=this.buttons[h];k.id=++this.stockChart._eventManager.lastObjectId;this.stockChart._eventManager.objectMap[k.id]={id:k.id,objectType:"rangeButton",rangeButtonIndex:h}}this.height=parseFloat(this.options.height);if(f(this.options.height)||isNaN(this.height)||0>this.options.height){if(isNaN(this.height)||0>this.options.height)this.height=0;this.height<this.inputFieldsHeight+this.inputFields.style.borderThickness+5&&(this.height=this.inputFieldsHeight+
|
|
1204
|
+
this.inputFields.style.borderThickness+5);this.height<c+this.buttonStyle.borderThickness+5&&(this.height=c+this.buttonStyle.borderThickness+5)}this._label&&(this._label.textBlock&&this.rangeButtonsWidth&&this.inputFieldsWidth)&&this.rangeButtonsWidth+this._label.textBlock.measureText().width+5+this.inputFieldsWidth>=this.width-(this.stockChart.exportEnabled&&this._shiftInputField?40:0)&&(this.height=this.options.height?this.height:this.inputFieldsHeight+this.rangeButtonsHeight+(12+this.inputFields.style.borderThickness+
|
|
1205
|
+
this.buttonStyle.borderThickness),this._wrapElements=!0);!this.inputFields.enabled&&(0===this.buttons.length&&f(this.options.height))&&(this.height=0);"bottom"===this.verticalAlign?(h=s.y2-this.height,c="bottom"):(h=s.y1,c="top");"left"===this.horizontalAlign?t=s.x1+2:"center"===this.horizontalAlign?t=s.x1+s.width/2-this.width/2:"right"===this.horizontalAlign&&(t=s.x2-2-this.width);this.stockChart.layoutManager.registerSpace(c,{width:this.width,height:this.height});this.bounds={x1:t,y1:h,x2:t+this.width,
|
|
1206
|
+
y2:h+this.height,width:this.width,height:this.height};for(h=0;h<this.buttons.length;h++)this.buttons[h]._initialize(h)}};T.prototype.render=function(){var c;this.setButtonsLayout();this.ctx.clearRect(this.stockChart.bounds.x1,this.bounds.y1,this.stockChart.bounds.x2-this.stockChart.bounds.x1,this.bounds.y2-this.bounds.y1);Q(this.ctx,this.stockChart.bounds.x1,this.bounds.y1,this.stockChart.bounds.x2,this.bounds.y2,this.stockChart.backgroundColor,0,null,0,0,0,0,1);this._label&&this._label.textBlock&&
|
|
1207
|
+
this._label.textBlock.render(!0);for(c=0;c<this.buttons.length;c++)this.buttons[c].enabled||(this.buttons[c].textBlock.backgroundColor=this.buttons[c].backgroundColorDisabled,this.buttons[c].textBlock.borderColor=this.buttons[c].backgroundColorDisabled),this.buttons[c].render(!0);this.inputFields&&this.inputFields.enabled&&this.renderInputFields(!0)};T.prototype.setButtonsLayout=function(){var c,f,h=this.bounds.x1,s,a;this._label&&(this._label.textBlock&&0<this.buttons.length)&&(this._label.textBlock.x=
|
|
1208
|
+
h,this._label.textBlock.y=a=this.bounds.y1+(this._label.textBlock.measureText().height-this._label.textBlock.topPadding-this._label.textBlock.bottomPadding+this.buttons[0].textBlock.borderThickness)/2-this._label.textBlock.topPadding+this.buttons[0].textBlock.topPadding+2,this._label.bounds={x1:h,y1:a-this._label.textBlock.fontSize/2,x2:h+this._label.textBlock.measureText().width,y2:a+this._label.textBlock.fontSize/2,width:this._label.textBlock.measureText().width,height:this._label.textBlock.measureText().height},
|
|
1209
|
+
h+=this._label.bounds.width+(0<this._label.textBlock.text.length?5:2));for(c=0;c<this.buttons.length;c++)f=this.buttons[c],this.buttonStyle.options.width?this.buttonStyle.options.maxWidth?f.textBlock.width=this.buttonStyle.options.width<this.buttonStyle.options.maxWidth?f.textBlock.maxWidth=this.buttonStyle.width:f.textBlock.maxWidth=this.buttonStyle.maxWidth:(f.textBlock.measureText(),f.textBlock.width=f.textBlock.maxWidth=f.textBlock.maxWidth<this.buttonStyle.width?f.textBlock.maxWidth:this.buttonStyle.width):
|
|
1210
|
+
(f.textBlock.measureText(),f.textBlock.maxWidth=this.buttonStyle.maxWidth),s=h+f.textBlock.width,f.textBlock.x=f.bounds.x1=1===f.textBlock.borderThickness%2?(h<<0)+0.5:h,f.bounds.x2=s,a=(1===f.textBlock.borderThickness%2?this.bounds.y1+(f.textBlock.height-f.textBlock.topPadding-f.textBlock.bottomPadding+f.textBlock.borderThickness)/2<<0.5:this.bounds.y1+(f.textBlock.height-f.textBlock.topPadding-f.textBlock.bottomPadding+f.textBlock.borderThickness)/2)+2,f.textBlock.y=a,f.bounds.y1=a-f.textBlock._lineHeight/
|
|
1211
|
+
2,f.bounds.y2=f.bounds.y1+f.textBlock.height,this.buttonStyle.width=f.bounds.width=s-h,f.bounds.height=f.bounds.y2-f.bounds.y1,h=s+this.buttonStyle.spacing};T.prototype.resetRangeButtons=function(){for(var c=0;c<this.buttons.length;c++)this.buttons[c].enabled&&(this.buttons[c].state="off",this.buttons[c].textBlock.backgroundColor=this.buttonStyle.backgroundColor,this.buttons[c].textBlock.fontColor=this.buttonStyle.labelFontColor,this.buttons[c].textBlock.fontWeight=this.buttonStyle.labelFontWeight);
|
|
1212
|
+
this.enabled&&this.render()};T.prototype.renderInputFields=function(){this.inputFields._textBlocks[0].text="dateTime"===this.inputFields.valueType&&isFinite(this.inputFields.startValue)?ra(this.inputFields.startValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):$(this.inputFields.startValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo);this.inputFields._textBlocks[1].text="dateTime"===this.inputFields.valueType&&isFinite(this.inputFields.endValue)?ra(this.inputFields.endValue,
|
|
1213
|
+
this.inputFields.valueFormatString,this.stockChart._cultureInfo):$(this.inputFields.endValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo);this.inputFields._labels[0].text=f(this.stockChart._cultureInfo.rangeSelector.fromText)?"From":this.stockChart._cultureInfo.rangeSelector.fromText;this.inputFields._labels[1].text=f(this.stockChart._cultureInfo.rangeSelector.toText)?"To":this.stockChart._cultureInfo.rangeSelector.toText;for(var c=0,h=this.inputFields._textBlocks.length-1;0<=
|
|
1214
|
+
h;h--){var s=this.inputFields._textBlocks[h],t=s.measureText();""!==s.text&&(s._width=this.inputFields.style.options.width?this.inputFields.style.width:t.width,s._width>this.inputFields.style.maxWidth&&(s._width=this.inputFields.style.maxWidth),c+=s._width+this.inputFields.style.spacing,s.x=s.bounds.x1=1===s.borderThickness%2?(this.bounds.x2-c-(this.stockChart.exportEnabled&&this._shiftInputField?40:0)<<0)+0.5:this.bounds.x2-c-(this.stockChart.exportEnabled&&this._shiftInputField?40:0),s.bounds.x2=
|
|
1214
1215
|
s.bounds.x1+s._width,c+=this.inputFields._labels[h].measureText().width+2,this.inputFields._labels[h].x=this.inputFields._labels[h].bounds.x1=this.bounds.x2-c-(this.stockChart.exportEnabled&&this._shiftInputField?40:0),this.inputFields._labels[h].bounds.x2=this.inputFields._labels[h].bounds.x1+this.inputFields._labels[h].measureText().width,this.inputFields.style.width=s.width=s._width,s.y=(1===s.borderThickness%2?(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+this.buttonStyle.borderThickness+
|
|
1215
1216
|
8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2<<0.5:(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+this.buttonStyle.borderThickness+8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2)+2,this.inputFields._labels[h].y=(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+this.buttonStyle.borderThickness+8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2+2,s.bounds.y1=this.inputFields._labels[h].bounds.y1=
|
|
1216
1217
|
s.y-s._lineHeight/2,s.bounds.y2=this.inputFields._labels[h].bounds.y2=s.bounds.y1+t.height,t=f(this.inputFields.style.padding)||this.inputFields.style.options.width&&this.inputFields.style.width>=this.inputFields.style.options.width?0:isNaN(this.inputFields.style.padding)?(this.inputFields.style.padding.left||0)+(this.inputFields.style.padding.right||0):2*this.inputFields.style.padding,this.inputFields.elements[h].style.top=s.y-s._lineHeight/2+"px",this.inputFields.elements[h].style.left=s.bounds.x1+
|
|
@@ -1223,7 +1224,7 @@ ja(X,aa);X.prototype._updateOptions=function(){this.updateOption("enabled");this
|
|
|
1223
1224
|
0)+"px"):this.elements[c].style.padding=this.style.padding+"px",this.elements[c].style.mozAppearance=this.elements[c].style.webkitAppearance=this.elements[c].style.appearance="none",this.elements[c].style.webkitBorderRadius=0,this.elements[c].style.mozBorderRadius=0,this.elements[c].style.borderRadius=0,this.elements[c].style.boxSizing="content-box";this.parent=this.rangeSelector=this.stockChart.rangeSelector}};ja(ca,aa);ca.prototype._updateOptions=function(){this.updateOption("backgroundColor");
|
|
1224
1225
|
this.updateOption("backgroundColorOnHover");this.updateOption("backgroundColorOnSelect");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("labelFontColor");this.updateOption("labelFontColorOnHover");this.updateOption("labelFontSize");this.updateOption("labelFontStyle");this.updateOption("labelFontFamily");this.updateOption("labelFontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};
|
|
1225
1226
|
ja(ga,aa);ga.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("borderColorOnFocus");this.updateOption("fontColor");this.updateOption("fontSize");this.updateOption("fontStyle");this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return t}();
|
|
1226
|
-
ca.version="v1.13.
|
|
1227
|
+
ca.version="v1.13.9 GA";window.CanvasJS&&(ca&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=ca),ca&&!window.CanvasJS.Chart&&(window.CanvasJS.Chart=Ja,window.CanvasJS.StockChart=ca))})();
|
|
1227
1228
|
|
|
1228
1229
|
/*
|
|
1229
1230
|
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.
|