@canvasjs/stockcharts 1.12.3 → 1.12.4

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 CHANGED
@@ -1,4 +1,4 @@
1
- CanvasJS StockChart - v1.12.3 GA - https://canvasjs.com/
1
+ CanvasJS StockChart - v1.12.4 GA - https://canvasjs.com/
2
2
  Copyright 2025 fenopix
3
3
 
4
4
  --------------------- License Information --------------------
@@ -1,5 +1,5 @@
1
1
  /*
2
- CanvasJS StockChart - v1.12.3 GA - https://canvasjs.com/
2
+ CanvasJS StockChart - v1.12.4 GA - https://canvasjs.com/
3
3
  Copyright 2025 fenopix
4
4
 
5
5
  --------------------- License Information --------------------
@@ -405,132 +405,132 @@ u),w&&(f.lineTo(v,ba),f.lineTo(v,u))):(k.beginPath(),k.moveTo(v,u),w&&(f.beginPa
405
405
  {id:K,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:s,x1:v,y1:u},0!==l[s].markerSize&&(0<l[s].markerSize||0<h.markerSize)&&(ba=h.getMarkerProperties(s,v,u,k),t.push(ba),K=R(K),w&&t.push({x:v,y:u,ctx:f,type:ba.type,size:ba.size,color:K,borderColor:K,borderThickness:ba.borderThickness})),(l[s].indexLabel||h.indexLabel||l[s].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:l[s],dataSeries:h,point:{x:v,y:u},direction:0>l[s].y===a.axisY.reversed?
406
406
  1:-1,color:F}))}b();m.drawMarkers(t)}}w&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),k.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&k.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&k.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),k.clearRect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.restore());k.restore();return{source:e,
407
407
  dest:this.plotArea.ctx,animationCallback:z.xClipAnimation,easingFunction:z.easing.linear,animationBase:0}}};v.prototype.renderStackedArea=function(a){function g(){if(!(1>n.length)){for(0<F.lineThickness&&b.stroke();0<n.length;){var a=n.pop();b.lineTo(a.x,a.y);w&&v.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=F.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();w&&(v.closePath(),v.fill(),v.beginPath());n=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=
408
- null,k=null,f=[],d=this.plotArea,t=[],n=[],q=[],p=[],r=0,h,l,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx,u,K,x;w&&v.beginPath();b.save();w&&v.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(v.beginPath(),v.rect(d.x1,d.y1,d.width,d.height),v.clip());for(var e=[],A=0;A<a.dataSeriesIndexes.length;A++){var C=a.dataSeriesIndexes[A],F=this.data[C],y=F.dataPoints;F.dataPointIndexes=[];for(r=0;r<y.length;r++)C=y[r].x.getTime?
408
+ null,k=null,f=[],d=this.plotArea,l=[],n=[],q=[],p=[],r=0,h,t,s=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),v=this._eventManager.ghostCtx,u,K,x;w&&v.beginPath();b.save();w&&v.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(v.beginPath(),v.rect(d.x1,d.y1,d.width,d.height),v.clip());for(var e=[],A=0;A<a.dataSeriesIndexes.length;A++){var C=a.dataSeriesIndexes[A],F=this.data[C],y=F.dataPoints;F.dataPointIndexes=[];for(r=0;r<y.length;r++)C=y[r].x.getTime?
409
409
  y[r].x.getTime():y[r].x,F.dataPointIndexes[C]=r,e[C]||(q.push(C),e[C]=!0);q.sort(Xa)}for(A=0;A<a.dataSeriesIndexes.length;A++){C=a.dataSeriesIndexes[A];F=this.data[C];y=F.dataPoints;K=!0;n=[];r=F.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:C};r=R(r);v.fillStyle=r;if(0<q.length){var e=F._colorSet[0],D=F.lineColor=F.options.lineColor||e,M=D;b.fillStyle=e;b.strokeStyle=D;b.lineWidth=F.lineThickness;x="solid";if(b.setLineDash){var ca=U(F.nullDataLineDashType,F.lineThickness);
410
- x=F.lineDashType;var fa=U(x,F.lineThickness);b.setLineDash(fa)}for(var ba=!0,r=0;r<q.length;r++){var k=q[r],ja=null,ja=0<=F.dataPointIndexes[k]?y[F.dataPointIndexes[k]]:{x:k,y:null};if(!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax&&(!F.connectNullData||!ba)))if("number"!==typeof ja.y)F.connectNullData||(ba||K)||g(),ba=!0;else{h=a.axisX.convertValueToPixel(k);var ta=t[k]?t[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ja.y+(p[k]?
411
- p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;l=a.axisY.convertValueToPixel(p[k])}else l=a.axisY.convertValueToPixel(ja.y),l-=ta;n.push({x:h,y:s-ta});t[k]=s-l;K||ba?(!K&&F.connectNullData?(b.setLineDash&&(F.options.nullDataLineDashType||x===F.lineDashType&&F.lineDashType!==F.nullDataLineDashType)&&(K=n.pop(),x=n[n.length-1],g(),b.moveTo(u.x,u.y),n.push(x),n.push(K),x=F.nullDataLineDashType,b.setLineDash(ca)),b.lineTo(h,l),w&&v.lineTo(h,l)):(b.beginPath(),b.moveTo(h,l),w&&(v.beginPath(),v.moveTo(h,
412
- l))),ba=K=!1):(b.lineTo(h,l),w&&v.lineTo(h,l),0==r%250&&(g(),b.moveTo(h,l),w&&v.moveTo(h,l),n.push({x:h,y:s-ta})));u={x:h,y:l};r<y.length-1&&(M!==(y[r].lineColor||D)||x!==(y[r].lineDashType||F.lineDashType))&&(g(),b.beginPath(),b.moveTo(h,l),n.push({x:h,y:s-ta}),M=y[r].lineColor||D,b.strokeStyle=M,b.setLineDash&&(y[r].lineDashType?(x=y[r].lineDashType,b.setLineDash(U(x,F.lineThickness))):(x=F.lineDashType,b.setLineDash(fa))));if(0<=F.dataPointIndexes[k]){var ga=F.dataPointIds[F.dataPointIndexes[k]];
413
- this._eventManager.objectMap[ga]={id:ga,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:F.dataPointIndexes[k],x1:h,y1:l}}0<=F.dataPointIndexes[k]&&0!==ja.markerSize&&(0<ja.markerSize||0<F.markerSize)&&(ta=F.getMarkerProperties(F.dataPointIndexes[k],h,l,b),f.push(ta),k=R(ga),w&&f.push({x:h,y:l,ctx:v,type:ta.type,size:ta.size,color:k,borderColor:k,borderThickness:ta.borderThickness}));(ja.indexLabel||F.indexLabel||ja.indexLabelFormatter||F.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",
414
- dataPoint:ja,dataSeries:F,point:{x:h,y:l},direction:0>ja.y===a.axisY.reversed?1:-1,color:e})}}g();b.moveTo(h,l);w&&v.moveTo(h,l)}delete F.dataPointIndexes}m.drawMarkers(f);w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
410
+ x=F.lineDashType;var fa=U(x,F.lineThickness);b.setLineDash(fa)}for(var ba=!0,r=0;r<q.length;r++){var k=q[r],ja=null,ja=0<=F.dataPointIndexes[k]?y[F.dataPointIndexes[k]]:{x:k,y:null};if(!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax&&(!F.connectNullData||!ba)))if("number"!==typeof ja.y)F.connectNullData||(ba||K)||g(),ba=!0;else{h=a.axisX.convertValueToPixel(k);var ta=l[k]?l[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ja.y+(p[k]?
411
+ p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;t=a.axisY.convertValueToPixel(p[k])}else t=a.axisY.convertValueToPixel(ja.y),t-=ta;n.push({x:h,y:s-ta});l[k]=s-t;K||ba?(!K&&F.connectNullData?(b.setLineDash&&(F.options.nullDataLineDashType||x===F.lineDashType&&F.lineDashType!==F.nullDataLineDashType)&&(K=n.pop(),x=n[n.length-1],g(),b.moveTo(u.x,u.y),n.push(x),n.push(K),x=F.nullDataLineDashType,b.setLineDash(ca)),b.lineTo(h,t),w&&v.lineTo(h,t)):(b.beginPath(),b.moveTo(h,t),w&&(v.beginPath(),v.moveTo(h,
412
+ t))),ba=K=!1):(b.lineTo(h,t),w&&v.lineTo(h,t),0==r%250&&(g(),b.moveTo(h,t),w&&v.moveTo(h,t),n.push({x:h,y:s-ta})));u={x:h,y:t};r<y.length-1&&(M!==(y[r].lineColor||D)||x!==(y[r].lineDashType||F.lineDashType))&&(g(),b.beginPath(),b.moveTo(h,t),n.push({x:h,y:s-ta}),M=y[r].lineColor||D,b.strokeStyle=M,b.setLineDash&&(y[r].lineDashType?(x=y[r].lineDashType,b.setLineDash(U(x,F.lineThickness))):(x=F.lineDashType,b.setLineDash(fa))));if(0<=F.dataPointIndexes[k]){var ga=F.dataPointIds[F.dataPointIndexes[k]];
413
+ this._eventManager.objectMap[ga]={id:ga,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:F.dataPointIndexes[k],x1:h,y1:t}}0<=F.dataPointIndexes[k]&&0!==ja.markerSize&&(0<ja.markerSize||0<F.markerSize)&&(ta=F.getMarkerProperties(F.dataPointIndexes[k],h,t,b),f.push(ta),k=R(ga),w&&f.push({x:h,y:t,ctx:v,type:ta.type,size:ta.size,color:k,borderColor:k,borderThickness:ta.borderThickness}));(ja.indexLabel||F.indexLabel||ja.indexLabelFormatter||F.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",
414
+ dataPoint:ja,dataSeries:F,point:{x:h,y:t},direction:0>ja.y===a.axisY.reversed?1:-1,color:e})}}g();b.moveTo(h,t);w&&v.moveTo(h,t)}delete F.dataPointIndexes}m.drawMarkers(f);w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
415
415
  0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),v.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:z.xClipAnimation,easingFunction:z.easing.linear,animationBase:0}}};v.prototype.renderStackedArea100=function(a){function g(){for(0<F.lineThickness&&b.stroke();0<n.length;){var a=n.pop();b.lineTo(a.x,a.y);w&&x.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=F.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();w&&(x.closePath(),x.fill(),x.beginPath());n=[]}
416
- var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,f=this.plotArea,d=[],l=[],n=[],q=[],p=[],r=0,h,t,s,v,u,K=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x=this._eventManager.ghostCtx;b.save();w&&x.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();w&&(x.beginPath(),x.rect(f.x1,f.y1,f.width,f.height),x.clip());for(var e=[],A=0;A<a.dataSeriesIndexes.length;A++){var C=a.dataSeriesIndexes[A],
416
+ var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,f=this.plotArea,d=[],t=[],n=[],q=[],p=[],r=0,h,l,s,v,u,K=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),x=this._eventManager.ghostCtx;b.save();w&&x.save();b.beginPath();b.rect(f.x1,f.y1,f.width,f.height);b.clip();w&&(x.beginPath(),x.rect(f.x1,f.y1,f.width,f.height),x.clip());for(var e=[],A=0;A<a.dataSeriesIndexes.length;A++){var C=a.dataSeriesIndexes[A],
417
417
  F=this.data[C],y=F.dataPoints;F.dataPointIndexes=[];for(r=0;r<y.length;r++)C=y[r].x.getTime?y[r].x.getTime():y[r].x,F.dataPointIndexes[C]=r,e[C]||(q.push(C),e[C]=!0);q.sort(Xa)}for(A=0;A<a.dataSeriesIndexes.length;A++){C=a.dataSeriesIndexes[A];F=this.data[C];y=F.dataPoints;v=!0;e=F.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:C};e=R(e);x.fillStyle=e;n=[];if(0<q.length){var e=F._colorSet[r%F._colorSet.length],D=F.lineColor=F.options.lineColor||e,M=D;b.fillStyle=e;b.strokeStyle=
418
418
  D;b.lineWidth=F.lineThickness;u="solid";if(b.setLineDash){var ca=U(F.nullDataLineDashType,F.lineThickness);u=F.lineDashType;var fa=U(u,F.lineThickness);b.setLineDash(fa)}for(var ba=!0,r=0;r<q.length;r++){var k=q[r],ja=null,ja=0<=F.dataPointIndexes[k]?y[F.dataPointIndexes[k]]:{x:k,y:null};if(!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax&&(!F.connectNullData||!ba)))if("number"!==typeof ja.y)F.connectNullData||(ba||v)||g(),ba=!0;else{var ta;ta=0!==a.dataPointYSums[k]?100*(ja.y/a.dataPointYSums[k]):
419
- 0;h=a.axisX.convertValueToPixel(k);var ga=l[k]?l[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ta+(p[k]?p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;t=a.axisY.convertValueToPixel(p[k])}else t=a.axisY.convertValueToPixel(ta),t-=ga;n.push({x:h,y:K-ga});l[k]=K-t;v||ba?(!v&&F.connectNullData?(b.setLineDash&&(F.options.nullDataLineDashType||u===F.lineDashType&&F.lineDashType!==F.nullDataLineDashType)&&(v=n.pop(),u=n[n.length-1],g(),b.moveTo(s.x,
420
- s.y),n.push(u),n.push(v),u=F.nullDataLineDashType,b.setLineDash(ca)),b.lineTo(h,t),w&&x.lineTo(h,t)):(b.beginPath(),b.moveTo(h,t),w&&(x.beginPath(),x.moveTo(h,t))),ba=v=!1):(b.lineTo(h,t),w&&x.lineTo(h,t),0==r%250&&(g(),b.moveTo(h,t),w&&x.moveTo(h,t),n.push({x:h,y:K-ga})));s={x:h,y:t};r<y.length-1&&(M!==(y[r].lineColor||D)||u!==(y[r].lineDashType||F.lineDashType))&&(g(),b.beginPath(),b.moveTo(h,t),n.push({x:h,y:K-ga}),M=y[r].lineColor||D,b.strokeStyle=M,b.setLineDash&&(y[r].lineDashType?(u=y[r].lineDashType,
421
- b.setLineDash(U(u,F.lineThickness))):(u=F.lineDashType,b.setLineDash(fa))));if(0<=F.dataPointIndexes[k]){var H=F.dataPointIds[F.dataPointIndexes[k]];this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:F.dataPointIndexes[k],x1:h,y1:t}}0<=F.dataPointIndexes[k]&&0!==ja.markerSize&&(0<ja.markerSize||0<F.markerSize)&&(ga=F.getMarkerProperties(F.dataPointIndexes[k],h,t,b),d.push(ga),k=R(H),w&&d.push({x:h,y:t,ctx:x,type:ga.type,size:ga.size,color:k,borderColor:k,
422
- borderThickness:ga.borderThickness}));(ja.indexLabel||F.indexLabel||ja.indexLabelFormatter||F.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ja,dataSeries:F,point:{x:h,y:t},direction:0>ja.y===a.axisY.reversed?1:-1,color:e})}}g();b.moveTo(h,t);w&&x.moveTo(h,t)}delete F.dataPointIndexes}m.drawMarkers(d);w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,
419
+ 0;h=a.axisX.convertValueToPixel(k);var ga=t[k]?t[k]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[k]=ta+(p[k]?p[k]:0);if(0>=p[k]&&a.axisY.logarithmic)continue;l=a.axisY.convertValueToPixel(p[k])}else l=a.axisY.convertValueToPixel(ta),l-=ga;n.push({x:h,y:K-ga});t[k]=K-l;v||ba?(!v&&F.connectNullData?(b.setLineDash&&(F.options.nullDataLineDashType||u===F.lineDashType&&F.lineDashType!==F.nullDataLineDashType)&&(v=n.pop(),u=n[n.length-1],g(),b.moveTo(s.x,
420
+ s.y),n.push(u),n.push(v),u=F.nullDataLineDashType,b.setLineDash(ca)),b.lineTo(h,l),w&&x.lineTo(h,l)):(b.beginPath(),b.moveTo(h,l),w&&(x.beginPath(),x.moveTo(h,l))),ba=v=!1):(b.lineTo(h,l),w&&x.lineTo(h,l),0==r%250&&(g(),b.moveTo(h,l),w&&x.moveTo(h,l),n.push({x:h,y:K-ga})));s={x:h,y:l};r<y.length-1&&(M!==(y[r].lineColor||D)||u!==(y[r].lineDashType||F.lineDashType))&&(g(),b.beginPath(),b.moveTo(h,l),n.push({x:h,y:K-ga}),M=y[r].lineColor||D,b.strokeStyle=M,b.setLineDash&&(y[r].lineDashType?(u=y[r].lineDashType,
421
+ b.setLineDash(U(u,F.lineThickness))):(u=F.lineDashType,b.setLineDash(fa))));if(0<=F.dataPointIndexes[k]){var H=F.dataPointIds[F.dataPointIndexes[k]];this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:F.dataPointIndexes[k],x1:h,y1:l}}0<=F.dataPointIndexes[k]&&0!==ja.markerSize&&(0<ja.markerSize||0<F.markerSize)&&(ga=F.getMarkerProperties(F.dataPointIndexes[k],h,l,b),d.push(ga),k=R(H),w&&d.push({x:h,y:l,ctx:x,type:ga.type,size:ga.size,color:k,borderColor:k,
422
+ borderThickness:ga.borderThickness}));(ja.indexLabel||F.indexLabel||ja.indexLabelFormatter||F.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ja,dataSeries:F,point:{x:h,y:l},direction:0>ja.y===a.axisY.reversed?1:-1,color:e})}}g();b.moveTo(h,l);w&&x.moveTo(h,l)}delete F.dataPointIndexes}m.drawMarkers(d);w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,
423
423
  this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(f.x1,f.y1,f.width,f.height),x.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:z.xClipAnimation,easingFunction:z.easing.linear,animationBase:0}}};v.prototype.renderBubble=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;
424
- if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,k,f;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=-Infinity,t=Infinity,n=0;n<a.dataSeriesIndexes.length;n++)for(var q=a.dataSeriesIndexes[n],p=this.data[q],r=p.dataPoints,h=0,e=0;e<r.length;e++)k=r[e].getTime?k=r[e].x.getTime():k=
425
- r[e].x,k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax||"undefined"===typeof r[e].z||(h=r[e].z,h>d&&(d=h),h<t&&(t=h));for(var l=25*Math.PI,s=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,l),n=0;n<a.dataSeriesIndexes.length;n++)if(q=a.dataSeriesIndexes[n],p=this.data[q],r=p.dataPoints,0<r.length)for(c.strokeStyle="#4572A7 ",e=0;e<r.length;e++)if(k=r[e].getTime?k=r[e].x.getTime():k=r[e].x,!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax)&&"number"===typeof r[e].y){k=
426
- a.axisX.convertValueToPixel(k);f=a.axisY.convertValueToPixel(r[e].y);var h=r[e].z,v=2*Math.max(Math.sqrt((d===t?s/2:l+(s-l)/(d-t)*(h-t))/Math.PI)<<0,1),h=p.getMarkerProperties(e,c);h.size=v;c.globalAlpha=p.fillOpacity;m.drawMarker(k,f,c,h.type,h.size,h.color,h.borderColor,h.borderThickness);c.globalAlpha=1;var u=p.dataPointIds[e];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:e,x1:k,y1:f,size:v};v=R(u);w&&m.drawMarker(k,f,this._eventManager.ghostCtx,
424
+ if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,k,f;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=-Infinity,l=Infinity,n=0;n<a.dataSeriesIndexes.length;n++)for(var q=a.dataSeriesIndexes[n],p=this.data[q],r=p.dataPoints,h=0,e=0;e<r.length;e++)k=r[e].getTime?k=r[e].x.getTime():k=
425
+ r[e].x,k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax||"undefined"===typeof r[e].z||(h=r[e].z,h>d&&(d=h),h<l&&(l=h));for(var t=25*Math.PI,s=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,t),n=0;n<a.dataSeriesIndexes.length;n++)if(q=a.dataSeriesIndexes[n],p=this.data[q],r=p.dataPoints,0<r.length)for(c.strokeStyle="#4572A7 ",e=0;e<r.length;e++)if(k=r[e].getTime?k=r[e].x.getTime():k=r[e].x,!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax)&&"number"===typeof r[e].y){k=
426
+ a.axisX.convertValueToPixel(k);f=a.axisY.convertValueToPixel(r[e].y);var h=r[e].z,v=2*Math.max(Math.sqrt((d===l?s/2:t+(s-t)/(d-l)*(h-l))/Math.PI)<<0,1),h=p.getMarkerProperties(e,c);h.size=v;c.globalAlpha=p.fillOpacity;m.drawMarker(k,f,c,h.type,h.size,h.color,h.borderColor,h.borderThickness);c.globalAlpha=1;var u=p.dataPointIds[e];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:e,x1:k,y1:f,size:v};v=R(u);w&&m.drawMarker(k,f,this._eventManager.ghostCtx,
427
427
  h.type,h.size,v,v,h.borderThickness);(r[e].indexLabel||p.indexLabel||r[e].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:r[e],dataSeries:p,point:{x:k,y:f},direction:1,bounds:{x1:k-h.size/2,y1:f-h.size/2,x2:k+h.size/2,y2:f+h.size/2},color:null})}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
428
428
  c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderScatter=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=
429
- this.plotArea,e=0,k,f;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var t=a.dataSeriesIndexes[d],n=this.data[t],q=n.dataPoints;if(0<q.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var p=0,r=0,e=0;e<q.length;e++)if(k=q[e].getTime?
429
+ this.plotArea,e=0,k,f;c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var l=a.dataSeriesIndexes[d],n=this.data[l],q=n.dataPoints;if(0<q.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var p=0,r=0,e=0;e<q.length;e++)if(k=q[e].getTime?
430
430
  k=q[e].x.getTime():k=q[e].x,!(k<a.axisX.dataInfo.viewPortMin||k>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[e].y){k=a.axisX.convertValueToPixel(k);f=a.axisY.convertValueToPixel(q[e].y);var h=n.getMarkerProperties(e,k,f,c);c.globalAlpha=n.fillOpacity;m.drawMarker(h.x,h.y,h.ctx,h.type,h.size,h.color,h.borderColor,h.borderThickness);c.globalAlpha=1;Math.sqrt((p-k)*(p-k)+(r-f)*(r-f))<Math.min(h.size,5)&&q.length>Math.min(this.plotArea.width,this.plotArea.height)||(p=n.dataPointIds[e],this._eventManager.objectMap[p]=
431
- {id:p,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:e,x1:k,y1:f},p=R(p),w&&m.drawMarker(h.x,h.y,this._eventManager.ghostCtx,h.type,h.size,p,p,h.borderThickness),(q[e].indexLabel||n.indexLabel||q[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:q[e],dataSeries:n,point:{x:k,y:f},direction:1,bounds:{x1:k-h.size/2,y1:f-h.size/2,x2:k+h.size/2,y2:f+h.size/2},color:null}),p=k,r=f)}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),
431
+ {id:p,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:e,x1:k,y1:f},p=R(p),w&&m.drawMarker(h.x,h.y,this._eventManager.ghostCtx,h.type,h.size,p,p,h.borderThickness),(q[e].indexLabel||n.indexLabel||q[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:q[e],dataSeries:n,point:{x:k,y:f},direction:1,bounds:{x1:k-h.size/2,y1:f-h.size/2,x2:k+h.size/2,y2:f+h.size/2},color:null}),p=k,r=f)}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),
432
432
  c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,
433
- animationBase:0}}};v.prototype.renderCandlestick=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,d=this.plotArea,m=0,t,n,q,p,r,h,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,l=a.axisX.dataInfo.minDiff;isFinite(l)||
434
- (l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.7*d.width*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>k&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<e)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));l<e&&(l=e);l>k&&(l=k);c.save();w&&b.save();c.beginPath();c.rect(d.x1,d.y1,d.width,
435
- d.height);c.clip();w&&(b.beginPath(),b.rect(d.x1,d.y1,d.width,d.height),b.clip());for(var s=0;s<a.dataSeriesIndexes.length;s++){var v=a.dataSeriesIndexes[s],u=this.data[v],K=u.dataPoints;if(0<K.length)for(var x=5<l&&u.bevelEnabled?!0:!1,m=0;m<K.length;m++)if(K[m].getTime?h=K[m].x.getTime():h=K[m].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&!f(K[m].y)&&K[m].y.length&&"number"===typeof K[m].y[0]&&"number"===typeof K[m].y[1]&&"number"===typeof K[m].y[2]&&"number"===typeof K[m].y[3]){t=
436
- a.axisX.convertValueToPixel(h);n=a.axisY.convertValueToPixel(K[m].y[0]);q=a.axisY.convertValueToPixel(K[m].y[1]);p=a.axisY.convertValueToPixel(K[m].y[2]);r=a.axisY.convertValueToPixel(K[m].y[3]);var A=t-l/2<<0,C=A+l<<0,k=u.options.fallingColor?u.fallingColor:u._colorSet[0],e=K[m].color?K[m].color:u._colorSet[0],F=Math.round(Math.max(1,0.15*l)),y=0===F%2?0:0.5,D=u.dataPointIds[m];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:m,x1:A,y1:n,x2:C,y2:q,x3:t,
437
- y3:p,x4:t,y4:r,borderThickness:F,color:e};c.strokeStyle=e;c.beginPath();c.lineWidth=F;b.lineWidth=Math.max(F,4);"candlestick"===u.type?(c.moveTo(t-y,q),c.lineTo(t-y,Math.min(n,r)),c.stroke(),c.moveTo(t-y,Math.max(n,r)),c.lineTo(t-y,p),c.stroke(),X(c,A,Math.min(n,r),C,Math.max(n,r),K[m].y[0]<=K[m].y[3]?u.risingColor:k,F,e,x,x,!1,!1,u.fillOpacity),w&&(e=R(D),b.strokeStyle=e,b.moveTo(t-y,q),b.lineTo(t-y,Math.min(n,r)),b.stroke(),b.moveTo(t-y,Math.max(n,r)),b.lineTo(t-y,p),b.stroke(),X(b,A,Math.min(n,
438
- r),C,Math.max(n,r),e,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(c.moveTo(t-y,q),c.lineTo(t-y,p),c.stroke(),c.beginPath(),c.moveTo(t,n),c.lineTo(A,n),c.stroke(),c.beginPath(),c.moveTo(t,r),c.lineTo(C,r),c.stroke(),w&&(e=R(D),b.strokeStyle=e,b.moveTo(t-y,q),b.lineTo(t-y,p),b.stroke(),b.beginPath(),b.moveTo(t,n),b.lineTo(A,n),b.stroke(),b.beginPath(),b.moveTo(t,r),b.lineTo(C,r),b.stroke()));(K[m].indexLabel||u.indexLabel||K[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:u.type,
433
+ animationBase:0}}};v.prototype.renderCandlestick=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=null,d=this.plotArea,m=0,l,n,q,p,r,h,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,t=a.axisX.dataInfo.minDiff;isFinite(t)||
434
+ (t=0.3*Math.abs(a.axisX.range));t=this.options.dataPointWidth?this.dataPointWidth:0.7*d.width*(a.axisX.logarithmic?Math.log(t)/Math.log(a.axisX.range):Math.abs(t)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>k&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<e)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));t<e&&(t=e);t>k&&(t=k);c.save();w&&b.save();c.beginPath();c.rect(d.x1,d.y1,d.width,
435
+ d.height);c.clip();w&&(b.beginPath(),b.rect(d.x1,d.y1,d.width,d.height),b.clip());for(var s=0;s<a.dataSeriesIndexes.length;s++){var v=a.dataSeriesIndexes[s],u=this.data[v],K=u.dataPoints;if(0<K.length)for(var x=5<t&&u.bevelEnabled?!0:!1,m=0;m<K.length;m++)if(K[m].getTime?h=K[m].x.getTime():h=K[m].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&!f(K[m].y)&&K[m].y.length&&"number"===typeof K[m].y[0]&&"number"===typeof K[m].y[1]&&"number"===typeof K[m].y[2]&&"number"===typeof K[m].y[3]){l=
436
+ a.axisX.convertValueToPixel(h);n=a.axisY.convertValueToPixel(K[m].y[0]);q=a.axisY.convertValueToPixel(K[m].y[1]);p=a.axisY.convertValueToPixel(K[m].y[2]);r=a.axisY.convertValueToPixel(K[m].y[3]);var A=l-t/2<<0,C=A+t<<0,k=u.options.fallingColor?u.fallingColor:u._colorSet[0],e=K[m].color?K[m].color:u._colorSet[0],F=Math.round(Math.max(1,0.15*t)),y=0===F%2?0:0.5,D=u.dataPointIds[m];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:m,x1:A,y1:n,x2:C,y2:q,x3:l,
437
+ y3:p,x4:l,y4:r,borderThickness:F,color:e};c.strokeStyle=e;c.beginPath();c.lineWidth=F;b.lineWidth=Math.max(F,4);"candlestick"===u.type?(c.moveTo(l-y,q),c.lineTo(l-y,Math.min(n,r)),c.stroke(),c.moveTo(l-y,Math.max(n,r)),c.lineTo(l-y,p),c.stroke(),X(c,A,Math.min(n,r),C,Math.max(n,r),K[m].y[0]<=K[m].y[3]?u.risingColor:k,F,e,x,x,!1,!1,u.fillOpacity),w&&(e=R(D),b.strokeStyle=e,b.moveTo(l-y,q),b.lineTo(l-y,Math.min(n,r)),b.stroke(),b.moveTo(l-y,Math.max(n,r)),b.lineTo(l-y,p),b.stroke(),X(b,A,Math.min(n,
438
+ r),C,Math.max(n,r),e,0,null,!1,!1,!1,!1))):"ohlc"===u.type&&(c.moveTo(l-y,q),c.lineTo(l-y,p),c.stroke(),c.beginPath(),c.moveTo(l,n),c.lineTo(A,n),c.stroke(),c.beginPath(),c.moveTo(l,r),c.lineTo(C,r),c.stroke(),w&&(e=R(D),b.strokeStyle=e,b.moveTo(l-y,q),b.lineTo(l-y,p),b.stroke(),b.beginPath(),b.moveTo(l,n),b.lineTo(A,n),b.stroke(),b.beginPath(),b.moveTo(l,r),b.lineTo(C,r),b.stroke()));(K[m].indexLabel||u.indexLabel||K[m].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:u.type,
439
439
  dataPoint:K[m],dataSeries:u,point:{x:A+(C-A)/2,y:a.axisY.reversed?p:q},direction:1,bounds:{x1:A,y1:Math.min(q,p),x2:C,y2:Math.max(q,p)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,
440
- this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderBoxAndWhisker=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=this.plotArea,d=0,m,t,n,q,p,r,h,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?
441
- this.dataPointWidth:1,d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.7*k.width*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>d&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&
442
- (this.dataPointMinWidth&&d<e)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));l<e&&(l=e);l>d&&(l=d);c.save();w&&b.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();w&&(b.beginPath(),b.rect(k.x1,k.y1,k.width,k.height),b.clip());for(var s=!1,s=!!a.axisY.reversed,v=0;v<a.dataSeriesIndexes.length;v++){var u=a.dataSeriesIndexes[v],K=this.data[u],x=K.dataPoints;if(0<x.length)for(var A=5<l&&K.bevelEnabled?!0:!1,d=0;d<x.length;d++)if(x[d].getTime?h=x[d].x.getTime():
443
- h=x[d].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&!f(x[d].y)&&x[d].y.length&&"number"===typeof x[d].y[0]&&"number"===typeof x[d].y[1]&&"number"===typeof x[d].y[2]&&"number"===typeof x[d].y[3]&&"number"===typeof x[d].y[4]&&5===x[d].y.length){m=a.axisX.convertValueToPixel(h);t=a.axisY.convertValueToPixel(x[d].y[0]);n=a.axisY.convertValueToPixel(x[d].y[1]);q=a.axisY.convertValueToPixel(x[d].y[2]);p=a.axisY.convertValueToPixel(x[d].y[3]);r=a.axisY.convertValueToPixel(x[d].y[4]);
444
- var C=m-l/2<<0,F=m+l/2<<0,e=x[d].color?x[d].color:K._colorSet[0],y=Math.round(Math.max(1,0.15*l)),D=0===y%2?0:0.5,M=x[d].whiskerColor?x[d].whiskerColor:x[d].color?K.whiskerColor?K.whiskerColor:x[d].color:K.whiskerColor?K.whiskerColor:e,ca="number"===typeof x[d].whiskerThickness?x[d].whiskerThickness:"number"===typeof K.options.whiskerThickness?K.whiskerThickness:y,fa=x[d].whiskerDashType?x[d].whiskerDashType:K.whiskerDashType,ba=f(x[d].whiskerLength)?f(K.options.whiskerLength)?l:K.whiskerLength:x[d].whiskerLength,
445
- ba="number"===typeof ba?0>=ba?0:ba>=l?l:ba:"string"===typeof ba?parseInt(ba)*l/100>l?l:parseInt(ba)*l/100:l,ja=1===Math.round(ca)%2?0.5:0,ta=x[d].stemColor?x[d].stemColor:x[d].color?K.stemColor?K.stemColor:x[d].color:K.stemColor?K.stemColor:e,ga="number"===typeof x[d].stemThickness?x[d].stemThickness:"number"===typeof K.options.stemThickness?K.stemThickness:y,H=1===Math.round(ga)%2?0.5:0,G=x[d].stemDashType?x[d].stemDashType:K.stemDashType,L=x[d].lineColor?x[d].lineColor:x[d].color?K.lineColor?K.lineColor:
446
- x[d].color:K.lineColor?K.lineColor:e,J="number"===typeof x[d].lineThickness?x[d].lineThickness:"number"===typeof K.options.lineThickness?K.lineThickness:y,P=x[d].lineDashType?x[d].lineDashType:K.lineDashType,T=1===Math.round(J)%2?0.5:0,O=K.upperBoxColor,Q=K.lowerBoxColor,Z=f(K.options.fillOpacity)?1:K.fillOpacity,S=K.dataPointIds[d];this._eventManager.objectMap[S]={id:S,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:d,x1:C,y1:t,x2:F,y2:n,x3:m,y3:q,x4:m,y4:p,y5:r,borderThickness:y,color:e,
447
- stemThickness:ga,stemColor:ta,whiskerThickness:ca,whiskerLength:ba,whiskerColor:M,lineThickness:J,lineColor:L};c.save();0<ga&&(c.beginPath(),c.strokeStyle=ta,c.lineWidth=ga,c.setLineDash&&c.setLineDash(U(G,ga)),c.moveTo(m-H,n),c.lineTo(m-H,t),c.stroke(),c.moveTo(m-H,p),c.lineTo(m-H,q),c.stroke());c.restore();b.lineWidth=Math.max(y,4);c.beginPath();X(c,C,Math.min(r,n),F,Math.max(n,r),Q,0,e,s?A:!1,s?!1:A,!1,!1,Z);c.beginPath();X(c,C,Math.min(q,r),F,Math.max(r,q),O,0,e,s?!1:A,s?A:!1,!1,!1,Z);c.beginPath();
448
- c.lineWidth=y;c.strokeStyle=e;c.rect(C-D,Math.min(n,q)-D,F-C+2*D,Math.max(n,q)-Math.min(n,q)+2*D);c.stroke();c.save();0<J&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(U(P,J)),c.strokeStyle=L,c.lineWidth=J,c.moveTo(C,r-T),c.lineTo(F,r-T),c.stroke());c.restore();c.save();0<ca&&(c.beginPath(),c.setLineDash&&c.setLineDash(U(fa,ca)),c.strokeStyle=M,c.lineWidth=ca,c.moveTo(m-ba/2<<0,p-ja),c.lineTo(m+ba/2<<0,p-ja),c.stroke(),c.moveTo(m-ba/2<<0,t+ja),c.lineTo(m+ba/2<<0,t+ja),c.stroke());c.restore();
449
- w&&(e=R(S),b.strokeStyle=e,b.lineWidth=ga,0<ga&&(b.moveTo(m-D-H,n),b.lineTo(m-D-H,Math.max(t,p)),b.stroke(),b.moveTo(m-D-H,Math.min(t,p)),b.lineTo(m-D-H,q),b.stroke()),X(b,C,Math.max(n,q),F,Math.min(n,q),e,0,null,!1,!1,!1,!1),0<ca&&(b.beginPath(),b.lineWidth=ca,b.moveTo(m+ba/2,p-ja),b.lineTo(m-ba/2,p-ja),b.stroke(),b.moveTo(m+ba/2,t+ja),b.lineTo(m-ba/2,t+ja),b.stroke()));(x[d].indexLabel||K.indexLabel||x[d].indexLabelFormatter||K.indexLabelFormatter)&&this._indexLabels.push({chartType:K.type,dataPoint:x[d],
450
- dataSeries:K,point:{x:C+(F-C)/2,y:a.axisY.reversed?t:p},direction:1,bounds:{x1:C,y1:Math.min(t,p),x2:F,y2:Math.max(t,p)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),
451
- c.clearRect(k.x1,k.y1,k.width,k.height),b.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderRangeColumn=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,k=0,d,m,t,k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;d=this.options.dataPointMaxWidth?
440
+ this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderBoxAndWhisker=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=this.plotArea,d=0,m,l,n,q,p,r,h,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?
441
+ this.dataPointWidth:1,d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,t=a.axisX.dataInfo.minDiff;isFinite(t)||(t=0.3*Math.abs(a.axisX.range));t=this.options.dataPointWidth?this.dataPointWidth:0.7*k.width*(a.axisX.logarithmic?Math.log(t)/Math.log(a.axisX.range):Math.abs(t)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>d&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&
442
+ (this.dataPointMinWidth&&d<e)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));t<e&&(t=e);t>d&&(t=d);c.save();w&&b.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);c.clip();w&&(b.beginPath(),b.rect(k.x1,k.y1,k.width,k.height),b.clip());for(var s=!1,s=!!a.axisY.reversed,v=0;v<a.dataSeriesIndexes.length;v++){var u=a.dataSeriesIndexes[v],K=this.data[u],x=K.dataPoints;if(0<x.length)for(var A=5<t&&K.bevelEnabled?!0:!1,d=0;d<x.length;d++)if(x[d].getTime?h=x[d].x.getTime():
443
+ h=x[d].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&!f(x[d].y)&&x[d].y.length&&"number"===typeof x[d].y[0]&&"number"===typeof x[d].y[1]&&"number"===typeof x[d].y[2]&&"number"===typeof x[d].y[3]&&"number"===typeof x[d].y[4]&&5===x[d].y.length){m=a.axisX.convertValueToPixel(h);l=a.axisY.convertValueToPixel(x[d].y[0]);n=a.axisY.convertValueToPixel(x[d].y[1]);q=a.axisY.convertValueToPixel(x[d].y[2]);p=a.axisY.convertValueToPixel(x[d].y[3]);r=a.axisY.convertValueToPixel(x[d].y[4]);
444
+ var C=m-t/2<<0,F=m+t/2<<0,e=x[d].color?x[d].color:K._colorSet[0],y=Math.round(Math.max(1,0.15*t)),D=0===y%2?0:0.5,M=x[d].whiskerColor?x[d].whiskerColor:x[d].color?K.whiskerColor?K.whiskerColor:x[d].color:K.whiskerColor?K.whiskerColor:e,ca="number"===typeof x[d].whiskerThickness?x[d].whiskerThickness:"number"===typeof K.options.whiskerThickness?K.whiskerThickness:y,fa=x[d].whiskerDashType?x[d].whiskerDashType:K.whiskerDashType,ba=f(x[d].whiskerLength)?f(K.options.whiskerLength)?t:K.whiskerLength:x[d].whiskerLength,
445
+ ba="number"===typeof ba?0>=ba?0:ba>=t?t:ba:"string"===typeof ba?parseInt(ba)*t/100>t?t:parseInt(ba)*t/100:t,ja=1===Math.round(ca)%2?0.5:0,ta=x[d].stemColor?x[d].stemColor:x[d].color?K.stemColor?K.stemColor:x[d].color:K.stemColor?K.stemColor:e,ga="number"===typeof x[d].stemThickness?x[d].stemThickness:"number"===typeof K.options.stemThickness?K.stemThickness:y,H=1===Math.round(ga)%2?0.5:0,G=x[d].stemDashType?x[d].stemDashType:K.stemDashType,L=x[d].lineColor?x[d].lineColor:x[d].color?K.lineColor?K.lineColor:
446
+ x[d].color:K.lineColor?K.lineColor:e,J="number"===typeof x[d].lineThickness?x[d].lineThickness:"number"===typeof K.options.lineThickness?K.lineThickness:y,P=x[d].lineDashType?x[d].lineDashType:K.lineDashType,T=1===Math.round(J)%2?0.5:0,O=K.upperBoxColor,Q=K.lowerBoxColor,Z=f(K.options.fillOpacity)?1:K.fillOpacity,S=K.dataPointIds[d];this._eventManager.objectMap[S]={id:S,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:d,x1:C,y1:l,x2:F,y2:n,x3:m,y3:q,x4:m,y4:p,y5:r,borderThickness:y,color:e,
447
+ stemThickness:ga,stemColor:ta,whiskerThickness:ca,whiskerLength:ba,whiskerColor:M,lineThickness:J,lineColor:L};c.save();0<ga&&(c.beginPath(),c.strokeStyle=ta,c.lineWidth=ga,c.setLineDash&&c.setLineDash(U(G,ga)),c.moveTo(m-H,n),c.lineTo(m-H,l),c.stroke(),c.moveTo(m-H,p),c.lineTo(m-H,q),c.stroke());c.restore();b.lineWidth=Math.max(y,4);c.beginPath();X(c,C,Math.min(r,n),F,Math.max(n,r),Q,0,e,s?A:!1,s?!1:A,!1,!1,Z);c.beginPath();X(c,C,Math.min(q,r),F,Math.max(r,q),O,0,e,s?!1:A,s?A:!1,!1,!1,Z);c.beginPath();
448
+ c.lineWidth=y;c.strokeStyle=e;c.rect(C-D,Math.min(n,q)-D,F-C+2*D,Math.max(n,q)-Math.min(n,q)+2*D);c.stroke();c.save();0<J&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(U(P,J)),c.strokeStyle=L,c.lineWidth=J,c.moveTo(C,r-T),c.lineTo(F,r-T),c.stroke());c.restore();c.save();0<ca&&(c.beginPath(),c.setLineDash&&c.setLineDash(U(fa,ca)),c.strokeStyle=M,c.lineWidth=ca,c.moveTo(m-ba/2<<0,p-ja),c.lineTo(m+ba/2<<0,p-ja),c.stroke(),c.moveTo(m-ba/2<<0,l+ja),c.lineTo(m+ba/2<<0,l+ja),c.stroke());c.restore();
449
+ w&&(e=R(S),b.strokeStyle=e,b.lineWidth=ga,0<ga&&(b.moveTo(m-D-H,n),b.lineTo(m-D-H,Math.max(l,p)),b.stroke(),b.moveTo(m-D-H,Math.min(l,p)),b.lineTo(m-D-H,q),b.stroke()),X(b,C,Math.max(n,q),F,Math.min(n,q),e,0,null,!1,!1,!1,!1),0<ca&&(b.beginPath(),b.lineWidth=ca,b.moveTo(m+ba/2,p-ja),b.lineTo(m-ba/2,p-ja),b.stroke(),b.moveTo(m+ba/2,l+ja),b.lineTo(m-ba/2,l+ja),b.stroke()));(x[d].indexLabel||K.indexLabel||x[d].indexLabelFormatter||K.indexLabelFormatter)&&this._indexLabels.push({chartType:K.type,dataPoint:x[d],
450
+ dataSeries:K,point:{x:C+(F-C)/2,y:a.axisY.reversed?l:p},direction:1,bounds:{x1:C,y1:Math.min(l,p),x2:F,y2:Math.max(l,p)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),
451
+ c.clearRect(k.x1,k.y1,k.width,k.height),b.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderRangeColumn=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,k=0,d,m,l,k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;d=this.options.dataPointMaxWidth?
452
452
  this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;var n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&k>d&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
453
- d<k)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));n<k&&(n=k);n>d&&(n=d);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var q=0;q<a.dataSeriesIndexes.length;q++){var p=a.dataSeriesIndexes[q],r=this.data[p],h=r.dataPoints;if(0<h.length)for(var l=5<n&&r.bevelEnabled?!0:!1,
454
- k=0;k<h.length;k++)if(h[k].getTime?t=h[k].x.getTime():t=h[k].x,!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax)&&!f(h[k].y)&&h[k].y.length&&"number"===typeof h[k].y[0]&&"number"===typeof h[k].y[1]){b=a.axisX.convertValueToPixel(t);d=a.axisY.convertValueToPixel(h[k].y[0]);m=a.axisY.convertValueToPixel(h[k].y[1]);var s=a.axisX.reversed?b+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+q)*n<<0:b-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+q)*n<<0,v=a.axisX.reversed?
455
- s-n<<0:s+n<<0,b=h[k].color?h[k].color:r._colorSet[k%r._colorSet.length];if(d>m){var u=d;d=m;m=u}u=r.dataPointIds[k];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:k,x1:s,y1:d,x2:v,y2:m};X(c,a.axisX.reversed?v:s,d,a.axisX.reversed?s:v,m,b,0,b,l,l,!1,!1,r.fillOpacity);b=R(u);w&&X(this._eventManager.ghostCtx,a.axisX.reversed?v:s,d,a.axisX.reversed?s:v,m,b,0,null,!1,!1,!1,!1);if(h[k].indexLabel||r.indexLabel||h[k].indexLabelFormatter||r.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",
453
+ d<k)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));n<k&&(n=k);n>d&&(n=d);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var q=0;q<a.dataSeriesIndexes.length;q++){var p=a.dataSeriesIndexes[q],r=this.data[p],h=r.dataPoints;if(0<h.length)for(var t=5<n&&r.bevelEnabled?!0:!1,
454
+ k=0;k<h.length;k++)if(h[k].getTime?l=h[k].x.getTime():l=h[k].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&!f(h[k].y)&&h[k].y.length&&"number"===typeof h[k].y[0]&&"number"===typeof h[k].y[1]){b=a.axisX.convertValueToPixel(l);d=a.axisY.convertValueToPixel(h[k].y[0]);m=a.axisY.convertValueToPixel(h[k].y[1]);var s=a.axisX.reversed?b+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+q)*n<<0:b-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+q)*n<<0,v=a.axisX.reversed?
455
+ s-n<<0:s+n<<0,b=h[k].color?h[k].color:r._colorSet[k%r._colorSet.length];if(d>m){var u=d;d=m;m=u}u=r.dataPointIds[k];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:k,x1:s,y1:d,x2:v,y2:m};X(c,a.axisX.reversed?v:s,d,a.axisX.reversed?s:v,m,b,0,b,t,t,!1,!1,r.fillOpacity);b=R(u);w&&X(this._eventManager.ghostCtx,a.axisX.reversed?v:s,d,a.axisX.reversed?s:v,m,b,0,null,!1,!1,!1,!1);if(h[k].indexLabel||r.indexLabel||h[k].indexLabelFormatter||r.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",
456
456
  dataPoint:h[k],dataSeries:r,indexKeyword:0,point:{x:s+(v-s)/2,y:h[k].y[1]>=h[k].y[0]?m:d},direction:h[k].y[1]>=h[k].y[0]?-1:1,bounds:{x1:s,y1:Math.min(d,m),x2:v,y2:Math.max(d,m)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:h[k],dataSeries:r,indexKeyword:1,point:{x:s+(v-s)/2,y:h[k].y[1]>=h[k].y[0]?d:m},direction:h[k].y[1]>=h[k].y[0]?1:-1,bounds:{x1:s,y1:Math.min(d,m),x2:v,y2:Math.max(d,m)},color:b})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation=
457
457
  "source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderError=
458
- function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=!1,d=this.plotArea,m=0,t,n,q,p,r,h,l,s=a.axisX.dataInfo.minDiff;isFinite(s)||(s=0.3*Math.abs(a.axisX.range));c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,
458
+ function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,k=!1,d=this.plotArea,m=0,l,n,q,p,r,h,t,s=a.axisX.dataInfo.minDiff;isFinite(s)||(s=0.3*Math.abs(a.axisX.range));c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,
459
459
  d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var v=0,u=0;u<this.data.length;u++)!this.data[u].type.match(/(bar|column)/ig)||!this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&v||v++;for(var K=0;K<a.dataSeriesIndexes.length;K++){var x=a.dataSeriesIndexes[K],y=this.data[x],C=y.dataPoints,F=f(y._linkedSeries)?!1:y._linkedSeries.type.match(/(bar|column)/ig)&&y._linkedSeries.visible?!0:!1,D=0;if(F)for(e=y._linkedSeries.id,u=0;u<e;u++)!this.data[u].type.match(/(bar|column)/ig)||
460
460
  !this.data[u].visible||this.data[u].type.match(/(stacked)/ig)&&D||(this.data[u].type.match(/(range)/ig)&&(k=!0),D++);e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(F?v:1)))<<0:0.3*this.width;k&&(m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
461
461
  b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(F?v:1)))<<0:0.03*this.width);u=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?d.height:d.width)*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))/(F?v:1))<<0;this.dataPointMaxWidth&&e>m&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<e)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));u<e&&
462
462
  (u=e);u>m&&(u=m);if(0<C.length)for(var G=y._colorSet,m=0;m<C.length;m++){var e=y.lineColor=y.options.color?y.options.color:G[0],M={color:C[m].whiskerColor?C[m].whiskerColor:C[m].color?y.whiskerColor?y.whiskerColor:C[m].color:y.whiskerColor?y.whiskerColor:e,thickness:f(C[m].whiskerThickness)?y.whiskerThickness:C[m].whiskerThickness,dashType:C[m].whiskerDashType?C[m].whiskerDashType:y.whiskerDashType,length:f(C[m].whiskerLength)?f(y.options.whiskerLength)?u:y.options.whiskerLength:C[m].whiskerLength,
463
463
  trimLength:f(C[m].whiskerLength)?f(y.options.whiskerLength)?50:0:0};M.length="number"===typeof M.length?0>=M.length?0:M.length>=u?u:M.length:"string"===typeof M.length?parseInt(M.length)*u/100>u?u:parseInt(M.length)*u/100>u:u;M.thickness="number"===typeof M.thickness?0>M.thickness?0:Math.round(M.thickness):2;var ca={color:C[m].stemColor?C[m].stemColor:C[m].color?y.stemColor?y.stemColor:C[m].color:y.stemColor?y.stemColor:e,thickness:C[m].stemThickness?C[m].stemThickness:y.stemThickness,dashType:C[m].stemDashType?
464
- C[m].stemDashType:y.stemDashType};ca.thickness="number"===typeof ca.thickness?0>ca.thickness?0:Math.round(ca.thickness):2;C[m].getTime?l=C[m].x.getTime():l=C[m].x;if(!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&!f(C[m].y)&&C[m].y.length&&"number"===typeof C[m].y[0]&&"number"===typeof C[m].y[1]){var fa=a.axisX.convertValueToPixel(l);b?n=fa:t=fa;fa=a.axisY.convertValueToPixel(C[m].y[0]);b?q=fa:r=fa;fa=a.axisY.convertValueToPixel(C[m].y[1]);b?p=fa:h=fa;b?(r=a.axisX.reversed?n+(F?
465
- v:1)*u/2-(F?D-1:0)*u<<0:n-(F?v:1)*u/2+(F?D-1:0)*u<<0,h=a.axisX.reversed?r-u<<0:r+u<<0):(q=a.axisX.reversed?t+(F?v:1)*u/2-(F?D-1:0)*u<<0:t-(F?v:1)*u/2+(F?D-1:0)*u<<0,p=a.axisX.reversed?q-u<<0:q+u<<0);!b&&r>h&&(fa=r,r=h,h=fa);b&&q>p&&(fa=q,q=p,p=fa);fa=y.dataPointIds[m];this._eventManager.objectMap[fa]={id:fa,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:m,x1:Math.min(q,p),y1:Math.min(r,h),x2:Math.max(p,q),y2:Math.max(h,r),isXYSwapped:b,stemProperties:ca,whiskerProperties:M};A(c,Math.min(q,
464
+ C[m].stemDashType:y.stemDashType};ca.thickness="number"===typeof ca.thickness?0>ca.thickness?0:Math.round(ca.thickness):2;C[m].getTime?t=C[m].x.getTime():t=C[m].x;if(!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax)&&!f(C[m].y)&&C[m].y.length&&"number"===typeof C[m].y[0]&&"number"===typeof C[m].y[1]){var fa=a.axisX.convertValueToPixel(t);b?n=fa:l=fa;fa=a.axisY.convertValueToPixel(C[m].y[0]);b?q=fa:r=fa;fa=a.axisY.convertValueToPixel(C[m].y[1]);b?p=fa:h=fa;b?(r=a.axisX.reversed?n+(F?
465
+ v:1)*u/2-(F?D-1:0)*u<<0:n-(F?v:1)*u/2+(F?D-1:0)*u<<0,h=a.axisX.reversed?r-u<<0:r+u<<0):(q=a.axisX.reversed?l+(F?v:1)*u/2-(F?D-1:0)*u<<0:l-(F?v:1)*u/2+(F?D-1:0)*u<<0,p=a.axisX.reversed?q-u<<0:q+u<<0);!b&&r>h&&(fa=r,r=h,h=fa);b&&q>p&&(fa=q,q=p,p=fa);fa=y.dataPointIds[m];this._eventManager.objectMap[fa]={id:fa,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:m,x1:Math.min(q,p),y1:Math.min(r,h),x2:Math.max(p,q),y2:Math.max(h,r),isXYSwapped:b,stemProperties:ca,whiskerProperties:M};A(c,Math.min(q,
466
466
  p),Math.min(r,h),Math.max(p,q),Math.max(h,r),e,M,ca,b);w&&A(this._eventManager.ghostCtx,q,r,p,h,e,M,ca,b);if(C[m].indexLabel||y.indexLabel||C[m].indexLabelFormatter||y.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:C[m],dataSeries:y,indexKeyword:0,point:{x:b?C[m].y[1]>=C[m].y[0]?q:p:q+(p-q)/2,y:b?r+(h-r)/2:C[m].y[1]>=C[m].y[0]?h:r},direction:C[m].y[1]>=C[m].y[0]?-1:1,bounds:{x1:b?Math.min(q,p):q,y1:b?r:Math.min(r,h),x2:b?Math.max(q,p):p,y2:b?h:Math.max(r,h)},color:e,axisSwapped:b}),
467
467
  this._indexLabels.push({chartType:"error",dataPoint:C[m],dataSeries:y,indexKeyword:1,point:{x:b?C[m].y[1]>=C[m].y[0]?p:q:q+(p-q)/2,y:b?r+(h-r)/2:C[m].y[1]>=C[m].y[0]?r:h},direction:C[m].y[1]>=C[m].y[0]?1:-1,bounds:{x1:b?Math.min(q,p):q,y1:b?r:Math.min(r,h),x2:b?Math.max(q,p):p,y2:b?h:Math.max(r,h)},color:e,axisSwapped:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
468
468
  a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderRangeBar=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:
469
- g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,k=0,d,m,t,n,k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?this.dataPointWidth:0.9*
469
+ g;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,k=0,d,m,l,n,k=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?this.dataPointWidth:0.9*
470
470
  (e.height*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&k>d&&(k=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&d<k)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,k));q<k&&(q=k);q>d&&(q=d);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();w&&(this._eventManager.ghostCtx.beginPath(),
471
- this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var r=a.dataSeriesIndexes[p],h=this.data[r],l=h.dataPoints;if(0<l.length){var s=5<q&&h.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<l.length;k++)if(l[k].getTime?n=l[k].x.getTime():n=l[k].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&!f(l[k].y)&&l[k].y.length&&"number"===typeof l[k].y[0]&&"number"===typeof l[k].y[1]){d=a.axisY.convertValueToPixel(l[k].y[0]);
472
- m=a.axisY.convertValueToPixel(l[k].y[1]);t=a.axisX.convertValueToPixel(n);t=a.axisX.reversed?t+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+p)*q<<0:t-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+p)*q<<0;var v=a.axisX.reversed?t-q<<0:t+q<<0;d>m&&(b=d,d=m,m=b);b=l[k].color?l[k].color:h._colorSet[k%h._colorSet.length];X(c,d,a.axisX.reversed?v:t,m,a.axisX.reversed?t:v,b,0,null,s,!1,!1,!1,h.fillOpacity);b=h.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",
473
- dataSeriesIndex:r,dataPointIndex:k,x1:d,y1:t,x2:m,y2:v};b=R(b);w&&X(this._eventManager.ghostCtx,d,a.axisX.reversed?v:t,m,a.axisX.reversed?t:v,b,0,null,!1,!1,!1,!1);if(l[k].indexLabel||h.indexLabel||l[k].indexLabelFormatter||h.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:l[k],dataSeries:h,indexKeyword:0,point:{x:l[k].y[1]>=l[k].y[0]?d:m,y:t+(v-t)/2},direction:l[k].y[1]>=l[k].y[0]?-1:1,bounds:{x1:Math.min(d,m),y1:t,x2:Math.max(d,m),y2:v},color:b}),this._indexLabels.push({chartType:"rangeBar",
474
- dataPoint:l[k],dataSeries:h,indexKeyword:1,point:{x:l[k].y[1]>=l[k].y[0]?m:d,y:t+(v-t)/2},direction:l[k].y[1]>=l[k].y[0]?1:-1,bounds:{x1:Math.min(d,m),y1:t,x2:Math.max(d,m),y2:v},color:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
475
- 0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderRangeArea=function(a){function g(){if(K){for(var a=null,c=l.length-1;0<=c;c--)a=l[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=q.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<q.lineThickness){b.beginPath();
476
- b.moveTo(a.x,a.y2);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y2);b.moveTo(l[0].x,l[0].y1);for(c=0;c<l.length;c++)a=l[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(t,s);e.beginPath();e.moveTo(t,s);K={x:t,y:s};l=[];l.push({x:t,y1:s,y2:v})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=[],d=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(e.beginPath(),
477
- e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var l=[],n=a.dataSeriesIndexes[f],q=this.data[n],p=q.dataPoints,k=q.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:n};k=R(k);e.fillStyle=k;var k=[],r=!0,h=0,t,s,v,u,K=null;if(0<p.length){var x=q._colorSet[h%q._colorSet.length],A=q.lineColor=q.options.lineColor||x,C=A;b.fillStyle=x;b.strokeStyle=A;b.lineWidth=q.lineThickness;var y="solid";if(b.setLineDash){var D=U(q.nullDataLineDashType,
478
- q.lineThickness),y=q.lineDashType,G=U(y,q.lineThickness);b.setLineDash(G)}for(var M=!0;h<p.length;h++)if(u=p[h].x.getTime?p[h].x.getTime():p[h].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!q.connectNullData||!M)))if(null!==p[h].y&&p[h].y.length&&"number"===typeof p[h].y[0]&&"number"===typeof p[h].y[1]){t=a.axisX.convertValueToPixel(u);s=a.axisY.convertValueToPixel(p[h].y[0]);v=a.axisY.convertValueToPixel(p[h].y[1]);r||M?(q.connectNullData&&!r?(b.setLineDash&&(q.options.nullDataLineDashType||
479
- y===q.lineDashType&&q.lineDashType!==q.nullDataLineDashType)&&(l[l.length-1].newLineDashArray=G,y=q.nullDataLineDashType,b.setLineDash(D)),b.lineTo(t,s),w&&e.lineTo(t,s),l.push({x:t,y1:s,y2:v})):(b.beginPath(),b.moveTo(t,s),K={x:t,y:s},l=[],l.push({x:t,y1:s,y2:v}),w&&(e.beginPath(),e.moveTo(t,s))),M=r=!1):(b.lineTo(t,s),l.push({x:t,y1:s,y2:v}),w&&e.lineTo(t,s),0==h%250&&g());u=q.dataPointIds[h];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:h,x1:t,y1:s,
480
- y2:v};h<p.length-1&&(C!==(p[h].lineColor||A)||y!==(p[h].lineDashType||q.lineDashType))&&(g(),C=p[h].lineColor||A,l[l.length-1].newStrokeStyle=C,b.strokeStyle=C,b.setLineDash&&(p[h].lineDashType?(y=p[h].lineDashType,l[l.length-1].newLineDashArray=U(y,q.lineThickness),b.setLineDash(l[l.length-1].newLineDashArray)):(y=q.lineDashType,l[l.length-1].newLineDashArray=G,b.setLineDash(G))));if(0!==p[h].markerSize&&(0<p[h].markerSize||0<q.markerSize)){var ca=q.getMarkerProperties(h,t,v,b);k.push(ca);var fa=
481
- R(u);w&&k.push({x:t,y:v,ctx:e,type:ca.type,size:ca.size,color:fa,borderColor:fa,borderThickness:ca.borderThickness});ca=q.getMarkerProperties(h,t,s,b);k.push(ca);fa=R(u);w&&k.push({x:t,y:s,ctx:e,type:ca.type,size:ca.size,color:fa,borderColor:fa,borderThickness:ca.borderThickness})}if(p[h].indexLabel||q.indexLabel||p[h].indexLabelFormatter||q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[h],dataSeries:q,indexKeyword:0,point:{x:t,y:s},direction:p[h].y[0]>p[h].y[1]===
482
- a.axisY.reversed?-1:1,color:x}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[h],dataSeries:q,indexKeyword:1,point:{x:t,y:v},direction:p[h].y[0]>p[h].y[1]===a.axisY.reversed?1:-1,color:x})}else M||r||g(),M=!0;g();m.drawMarkers(k)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
471
+ this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var r=a.dataSeriesIndexes[p],h=this.data[r],t=h.dataPoints;if(0<t.length){var s=5<q&&h.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(k=0;k<t.length;k++)if(t[k].getTime?n=t[k].x.getTime():n=t[k].x,!(n<a.axisX.dataInfo.viewPortMin||n>a.axisX.dataInfo.viewPortMax)&&!f(t[k].y)&&t[k].y.length&&"number"===typeof t[k].y[0]&&"number"===typeof t[k].y[1]){d=a.axisY.convertValueToPixel(t[k].y[0]);
472
+ m=a.axisY.convertValueToPixel(t[k].y[1]);l=a.axisX.convertValueToPixel(n);l=a.axisX.reversed?l+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+p)*q<<0:l-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+p)*q<<0;var v=a.axisX.reversed?l-q<<0:l+q<<0;d>m&&(b=d,d=m,m=b);b=t[k].color?t[k].color:h._colorSet[k%h._colorSet.length];X(c,d,a.axisX.reversed?v:l,m,a.axisX.reversed?l:v,b,0,null,s,!1,!1,!1,h.fillOpacity);b=h.dataPointIds[k];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",
473
+ dataSeriesIndex:r,dataPointIndex:k,x1:d,y1:l,x2:m,y2:v};b=R(b);w&&X(this._eventManager.ghostCtx,d,a.axisX.reversed?v:l,m,a.axisX.reversed?l:v,b,0,null,!1,!1,!1,!1);if(t[k].indexLabel||h.indexLabel||t[k].indexLabelFormatter||h.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:t[k],dataSeries:h,indexKeyword:0,point:{x:t[k].y[1]>=t[k].y[0]?d:m,y:l+(v-l)/2},direction:t[k].y[1]>=t[k].y[0]?-1:1,bounds:{x1:Math.min(d,m),y1:l,x2:Math.max(d,m),y2:v},color:b}),this._indexLabels.push({chartType:"rangeBar",
474
+ dataPoint:t[k],dataSeries:h,indexKeyword:1,point:{x:t[k].y[1]>=t[k].y[0]?m:d,y:l+(v-l)/2},direction:t[k].y[1]>=t[k].y[0]?1:-1,bounds:{x1:Math.min(d,m),y1:l,x2:Math.max(d,m),y2:v},color:b})}}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
475
+ 0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};v.prototype.renderRangeArea=function(a){function g(){if(K){for(var a=null,c=t.length-1;0<=c;c--)a=t[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=q.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<q.lineThickness){b.beginPath();
476
+ b.moveTo(a.x,a.y2);for(c=0;c<t.length;c++)a=t[c],b.lineTo(a.x,a.y2);b.moveTo(t[0].x,t[0].y1);for(c=0;c<t.length;c++)a=t[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(l,s);e.beginPath();e.moveTo(l,s);K={x:l,y:s};t=[];t.push({x:l,y1:s,y2:v})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=[],d=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(e.beginPath(),
477
+ e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var t=[],n=a.dataSeriesIndexes[f],q=this.data[n],p=q.dataPoints,k=q.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:n};k=R(k);e.fillStyle=k;var k=[],r=!0,h=0,l,s,v,u,K=null;if(0<p.length){var x=q._colorSet[h%q._colorSet.length],A=q.lineColor=q.options.lineColor||x,C=A;b.fillStyle=x;b.strokeStyle=A;b.lineWidth=q.lineThickness;var y="solid";if(b.setLineDash){var D=U(q.nullDataLineDashType,
478
+ q.lineThickness),y=q.lineDashType,G=U(y,q.lineThickness);b.setLineDash(G)}for(var M=!0;h<p.length;h++)if(u=p[h].x.getTime?p[h].x.getTime():p[h].x,!(u<a.axisX.dataInfo.viewPortMin||u>a.axisX.dataInfo.viewPortMax&&(!q.connectNullData||!M)))if(null!==p[h].y&&p[h].y.length&&"number"===typeof p[h].y[0]&&"number"===typeof p[h].y[1]){l=a.axisX.convertValueToPixel(u);s=a.axisY.convertValueToPixel(p[h].y[0]);v=a.axisY.convertValueToPixel(p[h].y[1]);r||M?(q.connectNullData&&!r?(b.setLineDash&&(q.options.nullDataLineDashType||
479
+ y===q.lineDashType&&q.lineDashType!==q.nullDataLineDashType)&&(t[t.length-1].newLineDashArray=G,y=q.nullDataLineDashType,b.setLineDash(D)),b.lineTo(l,s),w&&e.lineTo(l,s),t.push({x:l,y1:s,y2:v})):(b.beginPath(),b.moveTo(l,s),K={x:l,y:s},t=[],t.push({x:l,y1:s,y2:v}),w&&(e.beginPath(),e.moveTo(l,s))),M=r=!1):(b.lineTo(l,s),t.push({x:l,y1:s,y2:v}),w&&e.lineTo(l,s),0==h%250&&g());u=q.dataPointIds[h];this._eventManager.objectMap[u]={id:u,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:h,x1:l,y1:s,
480
+ y2:v};h<p.length-1&&(C!==(p[h].lineColor||A)||y!==(p[h].lineDashType||q.lineDashType))&&(g(),C=p[h].lineColor||A,t[t.length-1].newStrokeStyle=C,b.strokeStyle=C,b.setLineDash&&(p[h].lineDashType?(y=p[h].lineDashType,t[t.length-1].newLineDashArray=U(y,q.lineThickness),b.setLineDash(t[t.length-1].newLineDashArray)):(y=q.lineDashType,t[t.length-1].newLineDashArray=G,b.setLineDash(G))));if(0!==p[h].markerSize&&(0<p[h].markerSize||0<q.markerSize)){var ca=q.getMarkerProperties(h,l,v,b);k.push(ca);var fa=
481
+ R(u);w&&k.push({x:l,y:v,ctx:e,type:ca.type,size:ca.size,color:fa,borderColor:fa,borderThickness:ca.borderThickness});ca=q.getMarkerProperties(h,l,s,b);k.push(ca);fa=R(u);w&&k.push({x:l,y:s,ctx:e,type:ca.type,size:ca.size,color:fa,borderColor:fa,borderThickness:ca.borderThickness})}if(p[h].indexLabel||q.indexLabel||p[h].indexLabelFormatter||q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[h],dataSeries:q,indexKeyword:0,point:{x:l,y:s},direction:p[h].y[0]>p[h].y[1]===
482
+ a.axisY.reversed?-1:1,color:x}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[h],dataSeries:q,indexKeyword:1,point:{x:l,y:v},direction:p[h].y[0]>p[h].y[1]===a.axisY.reversed?1:-1,color:x})}else M||r||g(),M=!0;g();m.drawMarkers(k)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
483
483
  this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:z.xClipAnimation,easingFunction:z.easing.linear,animationBase:0}}};v.prototype.renderRangeSplineArea=function(a){function g(a,c){var g=s(v,2);if(0<g.length){if(0<n.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(g[0].x,
484
484
  g[0].y);for(var h=0;h<g.length-3;h+=3){if(g[h].newStrokeStyle||g[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(g[h].x,g[h].y),g[h].newStrokeStyle&&(b.strokeStyle=g[h].newStrokeStyle),g[h].newLineDashArray&&b.setLineDash(g[h].newLineDashArray);b.bezierCurveTo(g[h+1].x,g[h+1].y,g[h+2].x,g[h+2].y,g[h+3].x,g[h+3].y)}}b.beginPath();b.moveTo(g[0].x,g[0].y);w&&(e.beginPath(),e.moveTo(g[0].x,g[0].y));for(h=0;h<g.length-3;h+=3)b.bezierCurveTo(g[h+1].x,g[h+1].y,g[h+2].x,g[h+2].y,g[h+3].x,g[h+3].y),
485
485
  w&&e.bezierCurveTo(g[h+1].x,g[h+1].y,g[h+2].x,g[h+2].y,g[h+3].x,g[h+3].y);g=s(A,2);b.lineTo(A[A.length-1].x,A[A.length-1].y);for(h=g.length-1;2<h;h-=3)b.bezierCurveTo(g[h-1].x,g[h-1].y,g[h-2].x,g[h-2].y,g[h-3].x,g[h-3].y),w&&e.bezierCurveTo(g[h-1].x,g[h-1].y,g[h-2].x,g[h-2].y,g[h-3].x,g[h-3].y);b.closePath();b.globalAlpha=n.fillOpacity;b.fill();w&&(e.closePath(),e.fill());b.globalAlpha=1;if(0<n.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(g[0].x,g[0].y);for(var k=
486
486
  h=0;h<g.length-3;h+=3,k++){if(v[k].newStrokeStyle||v[k].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(g[h].x,g[h].y),v[k].newStrokeStyle&&(b.strokeStyle=v[k].newStrokeStyle),v[k].newLineDashArray&&b.setLineDash(v[k].newLineDashArray);b.bezierCurveTo(g[h+1].x,g[h+1].y,g[h+2].x,g[h+2].y,g[h+3].x,g[h+3].y)}g=s(v,2);b.moveTo(g[0].x,g[0].y);for(k=h=0;h<g.length-3;h+=3,k++){if(v[k].newStrokeStyle||v[k].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(g[h].x,g[h].y),v[k].newStrokeStyle&&(b.strokeStyle=
487
- v[k].newStrokeStyle),v[k].newLineDashArray&&b.setLineDash(v[k].newLineDashArray);b.bezierCurveTo(g[h+1].x,g[h+1].y,g[h+2].x,g[h+2].y,g[h+3].x,g[h+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=[],d=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(e.beginPath(),e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var l=
488
- a.dataSeriesIndexes[f],n=this.data[l],q=n.dataPoints,k=n.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:l};k=R(k);e.fillStyle=k;var k=[],p=0,r,h,t,v=[],A=[];if(0<q.length){var u=n._colorSet[p%n._colorSet.length],K=n.lineColor=n.options.lineColor||u,x=K;b.fillStyle=u;b.lineWidth=n.lineThickness;var y="solid",C;if(b.setLineDash){var F=U(n.nullDataLineDashType,n.lineThickness),y=n.lineDashType;C=U(y,n.lineThickness)}for(h=!1;p<q.length;p++)if(r=q[p].x.getTime?q[p].x.getTime():
489
- q[p].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!h)))if(null!==q[p].y&&q[p].y.length&&"number"===typeof q[p].y[0]&&"number"===typeof q[p].y[1]){r=a.axisX.convertValueToPixel(r);h=a.axisY.convertValueToPixel(q[p].y[0]);t=a.axisY.convertValueToPixel(q[p].y[1]);var D=n.dataPointIds[p];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:p,x1:r,y1:h,y2:t};v[v.length]={x:r,y:h};A[A.length]={x:r,y:t};p<q.length-1&&(x!==
487
+ v[k].newStrokeStyle),v[k].newLineDashArray&&b.setLineDash(v[k].newLineDashArray);b.bezierCurveTo(g[h+1].x,g[h+1].y,g[h+2].x,g[h+2].y,g[h+3].x,g[h+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=w?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,k=[],d=this.plotArea;b.save();w&&e.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();w&&(e.beginPath(),e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var f=0;f<a.dataSeriesIndexes.length;f++){var t=
488
+ a.dataSeriesIndexes[f],n=this.data[t],q=n.dataPoints,k=n.id;this._eventManager.objectMap[k]={objectType:"dataSeries",dataSeriesIndex:t};k=R(k);e.fillStyle=k;var k=[],p=0,r,h,l,v=[],A=[];if(0<q.length){var u=n._colorSet[p%n._colorSet.length],K=n.lineColor=n.options.lineColor||u,x=K;b.fillStyle=u;b.lineWidth=n.lineThickness;var y="solid",C;if(b.setLineDash){var F=U(n.nullDataLineDashType,n.lineThickness),y=n.lineDashType;C=U(y,n.lineThickness)}for(h=!1;p<q.length;p++)if(r=q[p].x.getTime?q[p].x.getTime():
489
+ q[p].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!h)))if(null!==q[p].y&&q[p].y.length&&"number"===typeof q[p].y[0]&&"number"===typeof q[p].y[1]){r=a.axisX.convertValueToPixel(r);h=a.axisY.convertValueToPixel(q[p].y[0]);l=a.axisY.convertValueToPixel(q[p].y[1]);var D=n.dataPointIds[p];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:p,x1:r,y1:h,y2:l};v[v.length]={x:r,y:h};A[A.length]={x:r,y:l};p<q.length-1&&(x!==
490
490
  (q[p].lineColor||K)||y!==(q[p].lineDashType||n.lineDashType))&&(x=q[p].lineColor||K,v[v.length-1].newStrokeStyle=x,b.setLineDash&&(q[p].lineDashType?(y=q[p].lineDashType,v[v.length-1].newLineDashArray=U(y,n.lineThickness)):(y=n.lineDashType,v[v.length-1].newLineDashArray=C)));if(0!==q[p].markerSize&&(0<q[p].markerSize||0<n.markerSize)){var G=n.getMarkerProperties(p,r,h,b);k.push(G);var M=R(D);w&&k.push({x:r,y:h,ctx:e,type:G.type,size:G.size,color:M,borderColor:M,borderThickness:G.borderThickness});
491
- G=n.getMarkerProperties(p,r,t,b);k.push(G);M=R(D);w&&k.push({x:r,y:t,ctx:e,type:G.type,size:G.size,color:M,borderColor:M,borderThickness:G.borderThickness})}if(q[p].indexLabel||n.indexLabel||q[p].indexLabelFormatter||n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:q[p],dataSeries:n,indexKeyword:0,point:{x:r,y:h},direction:q[p].y[0]<=q[p].y[1]?-1:1,color:u}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:q[p],dataSeries:n,indexKeyword:1,point:{x:r,
492
- y:t},direction:q[p].y[0]<=q[p].y[1]?1:-1,color:u});h=!1}else 0<p&&!h&&(n.connectNullData?b.setLineDash&&(0<v.length&&(n.options.nullDataLineDashType||!q[p-1].lineDashType))&&(v[v.length-1].newLineDashArray=F,y=n.nullDataLineDashType):(g(C,K),v=[],A=[])),h=!0;g(C,K);m.drawMarkers(k)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,
491
+ G=n.getMarkerProperties(p,r,l,b);k.push(G);M=R(D);w&&k.push({x:r,y:l,ctx:e,type:G.type,size:G.size,color:M,borderColor:M,borderThickness:G.borderThickness})}if(q[p].indexLabel||n.indexLabel||q[p].indexLabelFormatter||n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:q[p],dataSeries:n,indexKeyword:0,point:{x:r,y:h},direction:q[p].y[0]<=q[p].y[1]?-1:1,color:u}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:q[p],dataSeries:n,indexKeyword:1,point:{x:r,
492
+ y:l},direction:q[p].y[0]<=q[p].y[1]?1:-1,color:u});h=!1}else 0<p&&!h&&(n.connectNullData?b.setLineDash&&(0<v.length&&(n.options.nullDataLineDashType||!q[p-1].lineDashType))&&(v[v.length-1].newLineDashArray=F,y=n.nullDataLineDashType):(g(C,K),v=[],A=[])),h=!0;g(C,K);m.drawMarkers(k)}}w&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,
493
493
  0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:z.xClipAnimation,easingFunction:z.easing.linear,animationBase:0}}};v.prototype.renderWaterfall=function(a){var g=a.targetCanvasCtx||this.plotArea.ctx,c=w?this._preRenderCtx:g;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,
494
494
  e=null,k=this.plotArea,d=0,f,m,n,q,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var r=a.axisX.dataInfo.minDiff;isFinite(r)||(r=0.3*Math.abs(a.axisX.range));r=this.options.dataPointWidth?
495
495
  this.dataPointWidth:0.6*(k.width*(a.axisX.logarithmic?Math.log(r)/Math.log(a.axisX.range):Math.abs(r)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&d>m&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<d)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,d));r<d&&(r=d);r>m&&(r=m);c.save();w&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(k.x1,k.y1,k.width,k.height);
496
- c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.clip());for(var h=0;h<a.dataSeriesIndexes.length;h++){var l=a.dataSeriesIndexes[h],t=this.data[l],s=t.dataPoints,e=t._colorSet[0];t.risingColor=t.options.risingColor?t.options.risingColor:e;t.fallingColor=t.options.fallingColor?t.options.fallingColor:"#e40a0a";var u="number"===typeof t.options.lineThickness?Math.round(t.lineThickness):1,v=1===Math.round(u)%
497
- 2?-0.5:0;if(0<s.length)for(var x=5<r&&t.bevelEnabled?!0:!1,A=!1,C=null,y=null,d=0;d<s.length;d++)if(s[d].getTime?q=s[d].x.getTime():q=s[d].x,"number"!==typeof s[d].y){if(0<d&&!A&&t.connectNullData)var D=t.options.nullDataLineDashType||!s[d-1].lineDashType?t.nullDataLineDashType:s[d-1].lineDashType;A=!0}else{f=a.axisX.convertValueToPixel(q);m=0===t.dataPointEOs[d].cumulativeSum?p:a.axisY.convertValueToPixel(t.dataPointEOs[d].cumulativeSum);n=0===t.dataPointEOs[d].cumulativeSumYStartValue?p:a.axisY.convertValueToPixel(t.dataPointEOs[d].cumulativeSumYStartValue);
498
- f=a.axisX.reversed?f+a.plotType.totalDataSeries*r/2-(a.previousDataSeriesCount+h)*r<<0:f-a.plotType.totalDataSeries*r/2+(a.previousDataSeriesCount+h)*r<<0;var G=a.axisX.reversed?f-r<<0:f+r<<0;m>n&&(e=m,m=n,n=e);a.axisY.reversed&&(e=m,m=n,n=e);e=t.dataPointIds[d];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:l,dataPointIndex:d,x1:f,y1:m,x2:G,y2:n};var M=s[d].color?s[d].color:0<s[d].y?t.risingColor:t.fallingColor;X(c,a.axisX.reversed?G:f,a.axisY.reversed?n:m,a.axisX.reversed?
499
- f:G,a.axisY.reversed?m:n,M,0,M,x,x,!1,!1,t.fillOpacity);e=R(e);w&&X(this._eventManager.ghostCtx,a.axisX.reversed?G:f,m,a.axisX.reversed?f:G,n,e,0,null,!1,!1,!1,!1);var ca,M=f;ca="undefined"!==typeof s[d].isIntermediateSum&&!0===s[d].isIntermediateSum||"undefined"!==typeof s[d].isCumulativeSum&&!0===s[d].isCumulativeSum?0<s[d].y?m:n:0<s[d].y?n:m;0<d&&C&&(!A||t.connectNullData)&&(A&&c.setLineDash&&c.setLineDash(U(D,u)),c.beginPath(),c.moveTo(C,y-v),c.lineTo(M,ca-v),0<u&&c.stroke(),w&&(b.beginPath(),
500
- b.moveTo(C,y-v),b.lineTo(M,ca-v),0<u&&b.stroke()));A=!1;C=G;y=0<s[d].y?m:n;M=s[d].lineDashType?s[d].lineDashType:t.options.lineDashType?t.options.lineDashType:"shortDash";c.strokeStyle=s[d].lineColor?s[d].lineColor:t.options.lineColor?t.options.lineColor:"#9e9e9e";c.lineWidth=u;c.setLineDash&&(M=U(M,u),c.setLineDash(M));(s[d].indexLabel||t.indexLabel||s[d].indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:s[d],dataSeries:t,point:{x:f+(G-f)/2,y:0<=
496
+ c.clip();w&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(k.x1,k.y1,k.width,k.height),this._eventManager.ghostCtx.clip());for(var h=0;h<a.dataSeriesIndexes.length;h++){var t=a.dataSeriesIndexes[h],l=this.data[t],s=l.dataPoints,e=l._colorSet[0];l.risingColor=l.options.risingColor?l.options.risingColor:e;l.fallingColor=l.options.fallingColor?l.options.fallingColor:"#e40a0a";var u="number"===typeof l.options.lineThickness?Math.round(l.lineThickness):1,v=1===Math.round(u)%
497
+ 2?-0.5:0;if(0<s.length)for(var x=5<r&&l.bevelEnabled?!0:!1,A=!1,C=null,y=null,d=0;d<s.length;d++)if(s[d].getTime?q=s[d].x.getTime():q=s[d].x,"number"!==typeof s[d].y){if(0<d&&!A&&l.connectNullData)var D=l.options.nullDataLineDashType||!s[d-1].lineDashType?l.nullDataLineDashType:s[d-1].lineDashType;A=!0}else{f=a.axisX.convertValueToPixel(q);m=0===l.dataPointEOs[d].cumulativeSum?p:a.axisY.convertValueToPixel(l.dataPointEOs[d].cumulativeSum);n=0===l.dataPointEOs[d].cumulativeSumYStartValue?p:a.axisY.convertValueToPixel(l.dataPointEOs[d].cumulativeSumYStartValue);
498
+ f=a.axisX.reversed?f+a.plotType.totalDataSeries*r/2-(a.previousDataSeriesCount+h)*r<<0:f-a.plotType.totalDataSeries*r/2+(a.previousDataSeriesCount+h)*r<<0;var G=a.axisX.reversed?f-r<<0:f+r<<0;m>n&&(e=m,m=n,n=e);a.axisY.reversed&&(e=m,m=n,n=e);e=l.dataPointIds[d];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:d,x1:f,y1:m,x2:G,y2:n};var M=s[d].color?s[d].color:0<s[d].y?l.risingColor:l.fallingColor;X(c,a.axisX.reversed?G:f,a.axisY.reversed?n:m,a.axisX.reversed?
499
+ f:G,a.axisY.reversed?m:n,M,0,M,x,x,!1,!1,l.fillOpacity);e=R(e);w&&X(this._eventManager.ghostCtx,a.axisX.reversed?G:f,m,a.axisX.reversed?f:G,n,e,0,null,!1,!1,!1,!1);var ca,M=f;ca="undefined"!==typeof s[d].isIntermediateSum&&!0===s[d].isIntermediateSum||"undefined"!==typeof s[d].isCumulativeSum&&!0===s[d].isCumulativeSum?0<s[d].y?m:n:0<s[d].y?n:m;0<d&&C&&(!A||l.connectNullData)&&(A&&c.setLineDash&&c.setLineDash(U(D,u)),c.beginPath(),c.moveTo(C,y-v),c.lineTo(M,ca-v),0<u&&c.stroke(),w&&(b.beginPath(),
500
+ b.moveTo(C,y-v),b.lineTo(M,ca-v),0<u&&b.stroke()));A=!1;C=G;y=0<s[d].y?m:n;M=s[d].lineDashType?s[d].lineDashType:l.options.lineDashType?l.options.lineDashType:"shortDash";c.strokeStyle=s[d].lineColor?s[d].lineColor:l.options.lineColor?l.options.lineColor:"#9e9e9e";c.lineWidth=u;c.setLineDash&&(M=U(M,u),c.setLineDash(M));(s[d].indexLabel||l.indexLabel||s[d].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:s[d],dataSeries:l,point:{x:f+(G-f)/2,y:0<=
501
501
  s[d].y?m:n},direction:0>s[d].y===a.axisY.reversed?1:-1,bounds:{x1:f,y1:Math.min(m,n),x2:G,y2:Math.max(m,n)},color:e})}}w&&(g.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(k.x1,
502
502
  k.y1,k.width,k.height),this._eventManager.ghostCtx.restore());c.restore();return{source:g,dest:this.plotArea.ctx,animationCallback:z.fadeInAnimation,easingFunction:z.easing.easeInQuad,animationBase:0}}};var d=function(a,g,c,b,e,k,d,f,m){if(!(0>c)){"undefined"===typeof f&&(f=1);if(!w){var n=Number((d%(2*Math.PI)).toFixed(8));Number((k%(2*Math.PI)).toFixed(8))===n&&(d-=1E-4)}a.save();a.globalAlpha=f;"pie"===e?(a.beginPath(),a.moveTo(g.x,g.y),a.arc(g.x,g.y,c,k,d,!1),a.fillStyle=b,a.strokeStyle="white",
503
503
  a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(g.x,g.y,c,k,d,!1),0<=m&&a.arc(g.x,g.y,m*c,d,k,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};v.prototype.renderPie=function(a){function g(){if(n&&q){var a=0,b=0,c=0,g=0;f(n.options.indexLabelMaxWidth)&&(n.indexLabelMaxWidth=0.33*r.width);for(var e=0;e<q.length;e++){var k=q[e],d=n.dataPointIds[e];h[e].id=d;h[e].objectType="dataPoint";h[e].dataPointIndex=e;h[e].dataSeriesIndex=
504
- 0;var p=h[e],m={percent:null,total:null},B=null,m=l.getPercentAndTotal(n,k);if(n.indexLabelFormatter||k.indexLabelFormatter)B={chart:l.options,dataSeries:n,dataPoint:k,total:m.total,percent:m.percent};m=k.indexLabelFormatter?k.indexLabelFormatter(B):k.indexLabel?l.replaceKeywordsWithValue(k.indexLabel,k,n,e):n.indexLabelFormatter?n.indexLabelFormatter(B):n.indexLabel?l.replaceKeywordsWithValue(n.indexLabel,k,n,e):k.label?k.label:"";l._eventManager.objectMap[d]=p;p.center={x:x.x,y:x.y};p.y=k.y;p.radius=
504
+ 0;var p=h[e],m={percent:null,total:null},B=null,m=t.getPercentAndTotal(n,k);if(n.indexLabelFormatter||k.indexLabelFormatter)B={chart:t.options,dataSeries:n,dataPoint:k,total:m.total,percent:m.percent};m=k.indexLabelFormatter?k.indexLabelFormatter(B):k.indexLabel?t.replaceKeywordsWithValue(k.indexLabel,k,n,e):n.indexLabelFormatter?n.indexLabelFormatter(B):n.indexLabel?t.replaceKeywordsWithValue(n.indexLabel,k,n,e):k.label?k.label:"";t._eventManager.objectMap[d]=p;p.center={x:x.x,y:x.y};p.y=k.y;p.radius=
505
505
  y;p.percentInnerRadius=G;p.indexLabelText=m;p.indexLabelPlacement=n.indexLabelPlacement;p.indexLabelLineColor=k.indexLabelLineColor?k.indexLabelLineColor:n.options.indexLabelLineColor?n.options.indexLabelLineColor:k.color?k.color:n._colorSet[e%n._colorSet.length];p.indexLabelLineThickness=f(k.indexLabelLineThickness)?n.indexLabelLineThickness:k.indexLabelLineThickness;p.indexLabelLineDashType=k.indexLabelLineDashType?k.indexLabelLineDashType:n.indexLabelLineDashType;p.indexLabelFontColor=k.indexLabelFontColor?
506
506
  k.indexLabelFontColor:n.indexLabelFontColor;p.indexLabelFontStyle=k.indexLabelFontStyle?k.indexLabelFontStyle:n.indexLabelFontStyle;p.indexLabelFontWeight=k.indexLabelFontWeight?k.indexLabelFontWeight:n.indexLabelFontWeight;p.indexLabelFontSize=f(k.indexLabelFontSize)?n.indexLabelFontSize:k.indexLabelFontSize;p.indexLabelFontFamily=k.indexLabelFontFamily?k.indexLabelFontFamily:n.indexLabelFontFamily;p.indexLabelBackgroundColor=k.indexLabelBackgroundColor?k.indexLabelBackgroundColor:n.options.indexLabelBackgroundColor?
507
507
  n.options.indexLabelBackgroundColor:n.indexLabelBackgroundColor;p.indexLabelBorderColor=k.indexLabelBorderColor?k.indexLabelBorderColor:n.options.indexLabelBorderColor?n.options.indexLabelBorderColor:n.indexLabelBorderColor;p.indexLabelBorderThickness=k.indexLabelBorderThickness?k.indexLabelBorderThickness:n.options.indexLabelBorderThickness?n.options.indexLabelBorderThickness:n.indexLabelBorderThickness;p.indexLabelPadding=k.indexLabelPadding?k.indexLabelPadding:n.options.indexLabelPadding?n.options.indexLabelPadding:
508
508
  n.indexLabelPadding;p.indexLabelMaxWidth=k.indexLabelMaxWidth?k.indexLabelMaxWidth:n.indexLabelMaxWidth;p.indexLabelWrap="undefined"!==typeof k.indexLabelWrap?k.indexLabelWrap:n.indexLabelWrap;p.indexLabelTextAlign=k.indexLabelTextAlign?k.indexLabelTextAlign:n.indexLabelTextAlign?n.indexLabelTextAlign:"left";p.startAngle=0===e?n.startAngle?n.startAngle/180*Math.PI:0:h[e-1].endAngle;p.startAngle=(p.startAngle+2*Math.PI)%(2*Math.PI);p.endAngle=p.startAngle+2*Math.PI/A*Math.abs(k.y);k=(p.endAngle+p.startAngle)/
509
- 2;k=(k+2*Math.PI)%(2*Math.PI);p.midAngle=k;if(p.midAngle>Math.PI/2-u&&p.midAngle<Math.PI/2+u){if(0===a||h[c].midAngle>p.midAngle)c=e;a++}else if(p.midAngle>3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u){if(0===b||h[g].midAngle>p.midAngle)g=e;b++}p.hemisphere=k>Math.PI/2&&k<=3*Math.PI/2?"left":"right";p.indexLabelTextBlock=new na(l.plotArea.ctx,{fontSize:p.indexLabelFontSize,fontFamily:p.indexLabelFontFamily,fontColor:p.indexLabelFontColor,fontStyle:p.indexLabelFontStyle,fontWeight:p.indexLabelFontWeight,
509
+ 2;k=(k+2*Math.PI)%(2*Math.PI);p.midAngle=k;if(p.midAngle>Math.PI/2-u&&p.midAngle<Math.PI/2+u){if(0===a||h[c].midAngle>p.midAngle)c=e;a++}else if(p.midAngle>3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u){if(0===b||h[g].midAngle>p.midAngle)g=e;b++}p.hemisphere=k>Math.PI/2&&k<=3*Math.PI/2?"left":"right";p.indexLabelTextBlock=new na(t.plotArea.ctx,{fontSize:p.indexLabelFontSize,fontFamily:p.indexLabelFontFamily,fontColor:p.indexLabelFontColor,fontStyle:p.indexLabelFontStyle,fontWeight:p.indexLabelFontWeight,
510
510
  textAlign:p.indexLabelTextAlign,backgroundColor:p.indexLabelBackgroundColor,borderColor:p.indexLabelBorderColor,borderThickness:p.indexLabelBorderThickness,maxWidth:p.indexLabelMaxWidth,maxHeight:p.indexLabelWrap?5*p.indexLabelFontSize:1.5*p.indexLabelFontSize,text:p.indexLabelText,padding:p.indexLabelPadding,textBaseline:"middle"});p.indexLabelTextBlock.measureText()}d=k=0;m=!1;for(e=0;e<q.length;e++)p=h[(c+e)%q.length],1<a&&(p.midAngle>Math.PI/2-u&&p.midAngle<Math.PI/2+u)&&(k<=a/2&&!m?(p.hemisphere=
511
- "right",k++):(p.hemisphere="left",m=!0));m=!1;for(e=0;e<q.length;e++)p=h[(g+e)%q.length],1<b&&(p.midAngle>3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u)&&(d<=b/2&&!m?(p.hemisphere="left",d++):(p.hemisphere="right",m=!0))}}function c(a,b){var c=l.plotArea.ctx;c.clearRect(r.x1,r.y1,r.width,r.height);c.fillStyle=l.backgroundColor;c.fillRect(r.x1,r.y1,r.width,r.height);for(c=0;c<q.length;c++){var g=h[c].startAngle,e=h[c].endAngle;if(e>g){var k=0.07*y*Math.cos(h[c].midAngle),f=0.07*y*Math.sin(h[c].midAngle),
512
- m=!1;if(q[c].exploded){if(1E-9<Math.abs(h[c].center.x-(x.x+k))||1E-9<Math.abs(h[c].center.y-(x.y+f)))h[c].center.x=x.x+k*a,h[c].center.y=x.y+f*a,m=!0}else if(0<Math.abs(h[c].center.x-x.x)||0<Math.abs(h[c].center.y-x.y))h[c].center.x=x.x+k*(1-a),h[c].center.y=x.y+f*(1-a),m=!0;m&&b&&(k={},k.dataSeries=n,k.dataPoint=n.dataPoints[c],k.index=c,l.toolTip.highlightObjects([k]));d(l.plotArea.ctx,h[c].center,h[c].radius,q[c].color?q[c].color:n._colorSet[c%n._colorSet.length],n.type,g,e,n.fillOpacity,h[c].percentInnerRadius)}}c=
513
- l.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(g=g=0;g<q.length;g++)e=h[g],e.indexLabelText&&(e.indexLabelTextBlock.y-=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock.fontSize/2,k=0,k="left"===e.hemisphere?"inside"!==n.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==n.indexLabelPlacement?p:-e.indexLabelTextBlock.width/2,e.indexLabelTextBlock.x+=k,e.indexLabelTextBlock.render(!0),e.indexLabelTextBlock.x-=
514
- k,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock.fontSize/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(k=e.center.x+y*Math.cos(e.midAngle),f=e.center.y+y*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(U(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(k,f),c.lineTo(e.indexLabelTextBlock.x,e.indexLabelTextBlock.y),c.lineTo(e.indexLabelTextBlock.x+
511
+ "right",k++):(p.hemisphere="left",m=!0));m=!1;for(e=0;e<q.length;e++)p=h[(g+e)%q.length],1<b&&(p.midAngle>3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u)&&(d<=b/2&&!m?(p.hemisphere="left",d++):(p.hemisphere="right",m=!0))}}function c(a,b){var c=t.plotArea.ctx;c.clearRect(r.x1,r.y1,r.width,r.height);c.fillStyle=t.backgroundColor;c.fillRect(r.x1,r.y1,r.width,r.height);for(c=0;c<q.length;c++){var g=h[c].startAngle,e=h[c].endAngle;if(e>g){var k=0.07*y*Math.cos(h[c].midAngle),f=0.07*y*Math.sin(h[c].midAngle),
512
+ m=!1;if(q[c].exploded){if(1E-9<Math.abs(h[c].center.x-(x.x+k))||1E-9<Math.abs(h[c].center.y-(x.y+f)))h[c].center.x=x.x+k*a,h[c].center.y=x.y+f*a,m=!0}else if(0<Math.abs(h[c].center.x-x.x)||0<Math.abs(h[c].center.y-x.y))h[c].center.x=x.x+k*(1-a),h[c].center.y=x.y+f*(1-a),m=!0;m&&b&&(k={},k.dataSeries=n,k.dataPoint=n.dataPoints[c],k.index=c,t.toolTip.highlightObjects([k]));d(t.plotArea.ctx,h[c].center,h[c].radius,q[c].color?q[c].color:n._colorSet[c%n._colorSet.length],n.type,g,e,n.fillOpacity,h[c].percentInnerRadius)}}c=
513
+ t.plotArea.ctx;c.save();c.fillStyle="black";c.strokeStyle="grey";c.textBaseline="middle";c.lineJoin="round";for(g=g=0;g<q.length;g++)e=h[g],e.indexLabelText&&(e.indexLabelTextBlock.y-=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,k=0,k="left"===e.hemisphere?"inside"!==n.indexLabelPlacement?-(e.indexLabelTextBlock.width+p):-e.indexLabelTextBlock.width/2:"inside"!==n.indexLabelPlacement?p:-e.indexLabelTextBlock.width/2,e.indexLabelTextBlock.x+=k,e.indexLabelTextBlock.render(!0),
514
+ e.indexLabelTextBlock.x-=k,e.indexLabelTextBlock.y+=e.indexLabelTextBlock.height/2-e.indexLabelTextBlock._lineHeight/2,"inside"!==e.indexLabelPlacement&&0<e.indexLabelLineThickness&&(k=e.center.x+y*Math.cos(e.midAngle),f=e.center.y+y*Math.sin(e.midAngle),c.strokeStyle=e.indexLabelLineColor,c.lineWidth=e.indexLabelLineThickness,c.setLineDash&&c.setLineDash(U(e.indexLabelLineDashType,e.indexLabelLineThickness)),c.beginPath(),c.moveTo(k,f),c.lineTo(e.indexLabelTextBlock.x,e.indexLabelTextBlock.y),c.lineTo(e.indexLabelTextBlock.x+
515
515
  ("left"===e.hemisphere?-p:p),e.indexLabelTextBlock.y),c.stroke()),c.lineJoin="miter");c.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,g=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,h=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-g:c-h}function e(a){for(var c=null,g=1;g<q.length;g++)if(c=(a+g+h.length)%h.length,h[c].hemisphere!==
516
516
  h[a].hemisphere){c=null;break}else if(h[c].indexLabelText&&c!==a&&(0>b(h[c],h[a])||("right"===h[a].hemisphere?h[c].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y:h[c].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y)))break;else c=null;return c}function k(a,c,g){g=(g||0)+1;if(1E3<g)return 0;c=c||0;var d=0,f=x.y-1*s,n=x.y+1*s;if(0<=a&&a<q.length){var p=h[a];if(0>c&&p.indexLabelTextBlock.y<f||0<c&&p.indexLabelTextBlock.y>n)return 0;var r=0,m=0,m=r=r=0;0>c?p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/
517
517
  2>f&&p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c<f&&(c=-(f-(p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c))):p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2<f&&p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c>n&&(c=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c-n);c=p.indexLabelTextBlock.y+c;f=0;f="right"===p.hemisphere?x.x+Math.sqrt(Math.pow(s,2)-Math.pow(c-x.y,2)):x.x-Math.sqrt(Math.pow(s,2)-Math.pow(c-x.y,2));m=x.x+y*Math.cos(p.midAngle);r=x.y+y*
518
518
  Math.sin(p.midAngle);r=Math.sqrt(Math.pow(f-m,2)+Math.pow(c-r,2));m=Math.acos(y/s);r=Math.acos((s*s+y*y-r*r)/(2*y*s));c=r<m?c-p.indexLabelTextBlock.y:0;f=null;for(n=1;n<q.length;n++)if(f=(a-n+h.length)%h.length,h[f].hemisphere!==h[a].hemisphere){f=null;break}else if(h[f].indexLabelText&&h[f].hemisphere===h[a].hemisphere&&f!==a&&(0>b(h[f],h[a])||("right"===h[a].hemisphere?h[f].indexLabelTextBlock.y<=h[a].indexLabelTextBlock.y:h[f].indexLabelTextBlock.y>=h[a].indexLabelTextBlock.y)))break;else f=null;
519
519
  m=f;r=e(a);n=f=0;0>c?(n="right"===p.hemisphere?m:r,d=c,null!==n&&(m=-c,c=p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2-(h[n].indexLabelTextBlock.y+h[n].indexLabelTextBlock.height/2),c-m<z&&(f=-m,n=k(n,f,g+1),+n.toFixed(w)>+f.toFixed(w)&&(d=c>z?-(c-z):-(m-(n-f)))))):0<c&&(n="right"===p.hemisphere?r:m,d=c,null!==n&&(m=c,c=h[n].indexLabelTextBlock.y-h[n].indexLabelTextBlock.height/2-(p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2),c-m<z&&(f=m,n=k(n,f,g+1),+n.toFixed(w)<+f.toFixed(w)&&
520
520
  (d=c>z?c-z:m-(f-n)))));d&&(g=p.indexLabelTextBlock.y+d,c=0,c="right"===p.hemisphere?x.x+Math.sqrt(Math.pow(s,2)-Math.pow(g-x.y,2)):x.x-Math.sqrt(Math.pow(s,2)-Math.pow(g-x.y,2)),p.midAngle>Math.PI/2-u&&p.midAngle<Math.PI/2+u?(f=(a-1+h.length)%h.length,f=h[f],a=h[(a+1+h.length)%h.length],"left"===p.hemisphere&&"right"===f.hemisphere&&c>f.indexLabelTextBlock.x?c=f.indexLabelTextBlock.x-15:"right"===p.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x+15)):p.midAngle>
521
- 3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u&&(f=(a-1+h.length)%h.length,f=h[f],a=h[(a+1+h.length)%h.length],"right"===p.hemisphere&&"left"===f.hemisphere&&c<f.indexLabelTextBlock.x?c=f.indexLabelTextBlock.x+15:"left"===p.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),p.indexLabelTextBlock.y=g,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-x.y,p.indexLabelTextBlock.x-x.x))}return d}function m(){var a=l.plotArea.ctx;a.fillStyle=
522
- "grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,g=0,d=!0,c=0;10>c&&(1>c||0<g);c++){if(n.radius||!n.radius&&"undefined"!==typeof n.innerRadius&&null!==n.innerRadius&&y-g<=D)d=!1;d&&(y-=g);g=0;if("inside"!==n.indexLabelPlacement){s=y*v;for(a=0;a<q.length;a++){var f=h[a];f.indexLabelTextBlock.x=x.x+s*Math.cos(f.midAngle);f.indexLabelTextBlock.y=x.y+s*Math.sin(f.midAngle);f.indexLabelAngle=f.midAngle;f.radius=y;f.percentInnerRadius=G}for(var B,t,a=0;a<q.length;a++){var f=
523
- h[a],u=e(a);if(null!==u){B=h[a];t=h[u];var A=0,A=b(B,t)-z;if(0>A){for(var C=t=0,$=0;$<q.length;$++)$!==a&&h[$].hemisphere===f.hemisphere&&(h[$].indexLabelTextBlock.y<f.indexLabelTextBlock.y?t++:C++);t=A/(t+C||1)*C;var C=-1*(A-t),L=$=0;"right"===f.hemisphere?($=k(a,t),C=-1*(A-$),L=k(u,C),+L.toFixed(w)<+C.toFixed(w)&&+$.toFixed(w)<=+t.toFixed(w)&&k(a,-(C-L))):($=k(u,t),C=-1*(A-$),L=k(a,C),+L.toFixed(w)<+C.toFixed(w)&&+$.toFixed(w)<=+t.toFixed(w)&&k(u,-(C-L)))}}}}else for(a=0;a<q.length;a++)f=h[a],s=
524
- "pie"===n.type?0.7*y:0.85*y,u=x.x+s*Math.cos(f.midAngle),t=x.y+s*Math.sin(f.midAngle),f.indexLabelTextBlock.x=u,f.indexLabelTextBlock.y=t;for(a=0;a<q.length;a++)if(f=h[a],u=f.indexLabelTextBlock.measureText(),0!==u.height&&0!==u.width)u=u=0,"right"===f.hemisphere?(u=r.x2-(f.indexLabelTextBlock.x+f.indexLabelTextBlock.width+p),u*=-1):u=r.x1-(f.indexLabelTextBlock.x-f.indexLabelTextBlock.width-p),0<u&&(!d&&f.indexLabelText&&(t="right"===f.hemisphere?r.x2-f.indexLabelTextBlock.x:f.indexLabelTextBlock.x-
525
- r.x1,0.3*f.indexLabelTextBlock.maxWidth>t?f.indexLabelText="":f.indexLabelTextBlock.maxWidth=0.85*t,0.3*f.indexLabelTextBlock.maxWidth<t&&(f.indexLabelTextBlock.x-="right"===f.hemisphere?2:-2)),Math.abs(f.indexLabelTextBlock.y-f.indexLabelTextBlock.height/2-x.y)<y||Math.abs(f.indexLabelTextBlock.y+f.indexLabelTextBlock.height/2-x.y)<y)&&(u/=Math.abs(Math.cos(f.indexLabelAngle)),9<u&&(u*=0.3),u>g&&(g=u)),u=u=0,0<f.indexLabelAngle&&f.indexLabelAngle<Math.PI?(u=r.y2-(f.indexLabelTextBlock.y+f.indexLabelTextBlock.height/
526
- 2+5),u*=-1):u=r.y1-(f.indexLabelTextBlock.y-f.indexLabelTextBlock.height/2-5),0<u&&(!d&&f.indexLabelText&&(t=0<f.indexLabelAngle&&f.indexLabelAngle<Math.PI?-1:1,0===k(a,u*t)&&k(a,2*t)),Math.abs(f.indexLabelTextBlock.x-x.x)<y&&(u/=Math.abs(Math.sin(f.indexLabelAngle)),9<u&&(u*=0.3),u>g&&(g=u)));var J=function(a,b,c){for(var g=[],e=0;g.push(h[b]),b!==c;b=(b+1+q.length)%q.length);g.sort(function(a,b){return a.y-b.y});for(b=0;b<g.length;b++)if(c=g[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text=
527
- "",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,g=0,k=!1,d=0;d<q.length;d++)if(k=!1,B=h[d],B.indexLabelText){var f=e(d);if(null!==f){var n=h[f];A=0;A=b(B,n);var r;if(r=0>A){r=B.indexLabelTextBlock.x;var m=B.indexLabelTextBlock.y-B.indexLabelTextBlock.height/2,t=B.indexLabelTextBlock.y+B.indexLabelTextBlock.height/2,l=n.indexLabelTextBlock.y-n.indexLabelTextBlock.height/2,u=n.indexLabelTextBlock.x+n.indexLabelTextBlock.width,z=n.indexLabelTextBlock.y+
528
- n.indexLabelTextBlock.height/2;r=B.indexLabelTextBlock.x+B.indexLabelTextBlock.width<n.indexLabelTextBlock.x-p||r>u+p||m>z+p||t<l-p?!1:!0}r?(0>a&&(a=d),f!==a&&(c=f,g+=-A),0===d%Math.max(q.length/10,3)&&(k=!0)):k=!0;k&&(0<g&&0<=a&&0<=c)&&(J(g,a,c),c=a=-1,g=0)}}0<g&&J(g,a,c)})()}}function t(){l.plotArea.layoutManager.reset();l.title&&(l.title.dockInsidePlotArea||"center"===l.title.horizontalAlign&&"center"===l.title.verticalAlign)&&l.title.render();if(l.subtitles)for(var a=0;a<l.subtitles.length;a++){var b=
529
- l.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}l.legend&&(l.legend.dockInsidePlotArea||"center"===l.legend.horizontalAlign&&"center"===l.legend.verticalAlign)&&(l.legend.setLayout(),l.legend.render())}var l=this;if(!(0>=a.dataSeriesIndexes.length)){var n=this.data[a.dataSeriesIndexes[0]],q=n.dataPoints,p=10,r=this.plotArea,h=n.dataPointEOs,z=2,s,v=1.3,u=20/180*Math.PI,w=6,x={x:(r.x2+r.x1)/2,y:(r.y2+r.y1)/2},A=0;a=!1;for(var C=0;C<q.length;C++)A+=
521
+ 3*Math.PI/2-u&&p.midAngle<3*Math.PI/2+u&&(f=(a-1+h.length)%h.length,f=h[f],a=h[(a+1+h.length)%h.length],"right"===p.hemisphere&&"left"===f.hemisphere&&c<f.indexLabelTextBlock.x?c=f.indexLabelTextBlock.x+15:"left"===p.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),p.indexLabelTextBlock.y=g,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-x.y,p.indexLabelTextBlock.x-x.x))}return d}function m(){var a=t.plotArea.ctx;a.fillStyle=
522
+ "grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,g=0,d=!0,c=0;10>c&&(1>c||0<g);c++){if(n.radius||!n.radius&&"undefined"!==typeof n.innerRadius&&null!==n.innerRadius&&y-g<=D)d=!1;d&&(y-=g);g=0;if("inside"!==n.indexLabelPlacement){s=y*v;for(a=0;a<q.length;a++){var f=h[a];f.indexLabelTextBlock.x=x.x+s*Math.cos(f.midAngle);f.indexLabelTextBlock.y=x.y+s*Math.sin(f.midAngle);f.indexLabelAngle=f.midAngle;f.radius=y;f.percentInnerRadius=G}for(var B,l,a=0;a<q.length;a++){var f=
523
+ h[a],u=e(a);if(null!==u){B=h[a];l=h[u];var A=0,A=b(B,l)-z;if(0>A){for(var C=l=0,$=0;$<q.length;$++)$!==a&&h[$].hemisphere===f.hemisphere&&(h[$].indexLabelTextBlock.y<f.indexLabelTextBlock.y?l++:C++);l=A/(l+C||1)*C;var C=-1*(A-l),L=$=0;"right"===f.hemisphere?($=k(a,l),C=-1*(A-$),L=k(u,C),+L.toFixed(w)<+C.toFixed(w)&&+$.toFixed(w)<=+l.toFixed(w)&&k(a,-(C-L))):($=k(u,l),C=-1*(A-$),L=k(a,C),+L.toFixed(w)<+C.toFixed(w)&&+$.toFixed(w)<=+l.toFixed(w)&&k(u,-(C-L)))}}}}else for(a=0;a<q.length;a++)f=h[a],s=
524
+ "pie"===n.type?0.7*y:0.85*y,u=x.x+s*Math.cos(f.midAngle),l=x.y+s*Math.sin(f.midAngle),f.indexLabelTextBlock.x=u,f.indexLabelTextBlock.y=l;for(a=0;a<q.length;a++)if(f=h[a],u=f.indexLabelTextBlock.measureText(),0!==u.height&&0!==u.width)u=u=0,"right"===f.hemisphere?(u=r.x2-(f.indexLabelTextBlock.x+f.indexLabelTextBlock.width+p),u*=-1):u=r.x1-(f.indexLabelTextBlock.x-f.indexLabelTextBlock.width-p),0<u&&(!d&&f.indexLabelText&&(l="right"===f.hemisphere?r.x2-f.indexLabelTextBlock.x:f.indexLabelTextBlock.x-
525
+ r.x1,0.3*f.indexLabelTextBlock.maxWidth>l?f.indexLabelText="":f.indexLabelTextBlock.maxWidth=0.85*l,0.3*f.indexLabelTextBlock.maxWidth<l&&(f.indexLabelTextBlock.x-="right"===f.hemisphere?2:-2)),Math.abs(f.indexLabelTextBlock.y-f.indexLabelTextBlock.height/2-x.y)<y||Math.abs(f.indexLabelTextBlock.y+f.indexLabelTextBlock.height/2-x.y)<y)&&(u/=Math.abs(Math.cos(f.indexLabelAngle)),9<u&&(u*=0.3),u>g&&(g=u)),u=u=0,0<f.indexLabelAngle&&f.indexLabelAngle<Math.PI?(u=r.y2-(f.indexLabelTextBlock.y+f.indexLabelTextBlock.height/
526
+ 2+5),u*=-1):u=r.y1-(f.indexLabelTextBlock.y-f.indexLabelTextBlock.height/2-5),0<u&&(!d&&f.indexLabelText&&(l=0<f.indexLabelAngle&&f.indexLabelAngle<Math.PI?-1:1,0===k(a,u*l)&&k(a,2*l)),Math.abs(f.indexLabelTextBlock.x-x.x)<y&&(u/=Math.abs(Math.sin(f.indexLabelAngle)),9<u&&(u*=0.3),u>g&&(g=u)));var J=function(a,b,c){for(var g=[],e=0;g.push(h[b]),b!==c;b=(b+1+q.length)%q.length);g.sort(function(a,b){return a.y-b.y});for(b=0;b<g.length;b++)if(c=g[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text=
527
+ "",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,g=0,k=!1,d=0;d<q.length;d++)if(k=!1,B=h[d],B.indexLabelText){var f=e(d);if(null!==f){var n=h[f];A=0;A=b(B,n);var r;if(r=0>A){r=B.indexLabelTextBlock.x;var m=B.indexLabelTextBlock.y-B.indexLabelTextBlock.height/2,l=B.indexLabelTextBlock.y+B.indexLabelTextBlock.height/2,t=n.indexLabelTextBlock.y-n.indexLabelTextBlock.height/2,u=n.indexLabelTextBlock.x+n.indexLabelTextBlock.width,z=n.indexLabelTextBlock.y+
528
+ n.indexLabelTextBlock.height/2;r=B.indexLabelTextBlock.x+B.indexLabelTextBlock.width<n.indexLabelTextBlock.x-p||r>u+p||m>z+p||l<t-p?!1:!0}r?(0>a&&(a=d),f!==a&&(c=f,g+=-A),0===d%Math.max(q.length/10,3)&&(k=!0)):k=!0;k&&(0<g&&0<=a&&0<=c)&&(J(g,a,c),c=a=-1,g=0)}}0<g&&J(g,a,c)})()}}function l(){t.plotArea.layoutManager.reset();t.title&&(t.title.dockInsidePlotArea||"center"===t.title.horizontalAlign&&"center"===t.title.verticalAlign)&&t.title.render();if(t.subtitles)for(var a=0;a<t.subtitles.length;a++){var b=
529
+ t.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}t.legend&&(t.legend.dockInsidePlotArea||"center"===t.legend.horizontalAlign&&"center"===t.legend.verticalAlign)&&(t.legend.setLayout(),t.legend.render())}var t=this;if(!(0>=a.dataSeriesIndexes.length)){var n=this.data[a.dataSeriesIndexes[0]],q=n.dataPoints,p=10,r=this.plotArea,h=n.dataPointEOs,z=2,s,v=1.3,u=20/180*Math.PI,w=6,x={x:(r.x2+r.x1)/2,y:(r.y2+r.y1)/2},A=0;a=!1;for(var C=0;C<q.length;C++)A+=
530
530
  Math.abs(q[C].y),!a&&("undefined"!==typeof q[C].indexLabel&&null!==q[C].indexLabel&&0<q[C].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof q[C].label&&null!==q[C].label&&0<q[C].label.toString().length)&&(a=!0);if(0!==A){a=a||"undefined"!==typeof n.indexLabel&&null!==n.indexLabel&&0<n.indexLabel.toString().length;var y="inside"!==n.indexLabelPlacement&&a?0.75*Math.min(r.width,r.height)/2:0.92*Math.min(r.width,r.height)/2;n.radius&&(y=Va(n.radius,y));var D="undefined"!==typeof n.innerRadius&&
531
- null!==n.innerRadius?Va(n.innerRadius,y):0.7*y,G=Math.min(D/y,(y-1)/y);this.pieDoughnutClickHandler=function(a){l.isAnimating||!f(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&l._animator.animate(0,500,function(a){c(a,!0);t();l.dispatchEvent("dataAnimationIterationEnd",{chart:l});l.dispatchEvent("dataAnimationEnd",{chart:l})}))};g();m();m();m();m();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:
532
- 0,function(a){var b=l.plotArea.ctx;b.clearRect(r.x1,r.y1,r.width,r.height);b.fillStyle=l.backgroundColor;b.fillRect(r.x1,r.y1,r.width,r.height);for(var b=h[0].startAngle+2*Math.PI*a,c=0;c<q.length;c++){var g=0===c?h[c].startAngle:e,e=g+(h[c].endAngle-h[c].startAngle),k=!1;e>b&&(e=b,k=!0);var f=q[c].color?q[c].color:n._colorSet[c%n._colorSet.length];e>g&&d(l.plotArea.ctx,h[c].center,h[c].radius,f,n.type,g,e,n.fillOpacity,h[c].percentInnerRadius);if(k)break}t();l.dispatchEvent("dataAnimationIterationEnd",
533
- {chart:l});1<=a&&l.dispatchEvent("dataAnimationEnd",{chart:l})},function(){l.disableToolTip=!1;l._animator.animate(0,l.animatedRender?500:0,function(a){c(a,!1);t();l.dispatchEvent("dataAnimationIterationEnd",{chart:l})});l.dispatchEvent("dataAnimationEnd",{chart:l})});n.radius=y;"doughnut"===n.type&&(n.innerRadius=D)}}};var t=function(a,g,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(g.y4-g.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(g.x1),Math.round(g.y1)),a.lineTo(Math.round(g.x2),
531
+ null!==n.innerRadius?Va(n.innerRadius,y):0.7*y,G=Math.min(D/y,(y-1)/y);this.pieDoughnutClickHandler=function(a){t.isAnimating||!f(this.explodeOnClick)&&!this.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&t._animator.animate(0,500,function(a){c(a,!0);l();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});t.dispatchEvent("dataAnimationEnd",{chart:t})}))};g();m();m();m();m();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:
532
+ 0,function(a){var b=t.plotArea.ctx;b.clearRect(r.x1,r.y1,r.width,r.height);b.fillStyle=t.backgroundColor;b.fillRect(r.x1,r.y1,r.width,r.height);for(var b=h[0].startAngle+2*Math.PI*a,c=0;c<q.length;c++){var g=0===c?h[c].startAngle:e,e=g+(h[c].endAngle-h[c].startAngle),k=!1;e>b&&(e=b,k=!0);var f=q[c].color?q[c].color:n._colorSet[c%n._colorSet.length];e>g&&d(t.plotArea.ctx,h[c].center,h[c].radius,f,n.type,g,e,n.fillOpacity,h[c].percentInnerRadius);if(k)break}l();t.dispatchEvent("dataAnimationIterationEnd",
533
+ {chart:t});1<=a&&t.dispatchEvent("dataAnimationEnd",{chart:t})},function(){t.disableToolTip=!1;t._animator.animate(0,t.animatedRender?500:0,function(a){c(a,!1);l();t.dispatchEvent("dataAnimationIterationEnd",{chart:t})});t.dispatchEvent("dataAnimationEnd",{chart:t})});n.radius=y;"doughnut"===n.type&&(n.innerRadius=D)}}};var t=function(a,g,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(g.y4-g.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(g.x1),Math.round(g.y1)),a.lineTo(Math.round(g.x2),
534
534
  Math.round(g.y2)),a.lineTo(Math.round(g.x3),Math.round(g.y3)),a.lineTo(Math.round(g.x4),Math.round(g.y4)),"undefined"!==g.x5&&(a.lineTo(Math.round(g.x5),Math.round(g.y5)),a.lineTo(Math.round(g.x6),Math.round(g.y6))),a.closePath(),a.fillStyle=b?b:g.color,a.fill(),a.globalAplha=1,a.restore())};v.prototype.renderFunnel=function(a){function g(){for(var a=0,b=[],c=0;c<y.length;c++){if("undefined"===typeof y[c].y)return-1;y[c].y="number"===typeof y[c].y?y[c].y:0;a+=Math.abs(y[c].y)}if(0===a)return-1;for(c=
535
535
  b[0]=0;c<y.length;c++)b.push(Math.abs(y[c].y)*G/a);return b}function c(){var a=V,b=X,c=T,g=Y,e,k;e=ba;k=O-ga;g=Math.abs((k-e)*(b-a+(g-c))/2);c=Y-T;e=k-e;k=c*(k-O);k=Math.abs(k);k=g+k;for(var g=[],h=0,d=0;d<y.length;d++){if("undefined"===typeof y[d].y)return-1;y[d].y="number"===typeof y[d].y?y[d].y:0;h+=Math.abs(y[d].y)}if(0===h)return-1;for(var f=g[0]=0,n=0,p,q,b=b-a,f=!1,d=0;d<y.length;d++)a=Math.abs(y[d].y)*k/h,f?p=0==Number(c.toFixed(3))?0:a/c:(q=ha*ha*b*b-4*Math.abs(ha)*a,0>q?(q=c,f=(b+q)*(e-
536
536
  n)/2,a-=f,p=e-n,n+=e-n,p+=0==q?0:a/q,n+=a/q,f=!0):(p=(Math.abs(ha)*b-Math.sqrt(q))/2,q=b-2*p/Math.abs(ha),n+=p,n>e&&(n-=p,q=c,f=(b+q)*(e-n)/2,a-=f,p=e-n,n+=e-n,p+=a/q,n+=a/q,f=!0),b=q)),g.push(p);return g}function b(){if(u&&y){for(var a,b,c,g,e,k,d,n,p,q,r,m,B,l,t,z,s,v,x=[],N=[],E={percent:null,total:null},C=null,$=0;$<y.length;$++)v=S[$],v="undefined"!==typeof v.x5?(v.y2+v.y4)/2:(v.y2+v.y3)/2,v=h(v).x2+1,x[$]=P-(isNaN(v)?0:v)-Z;v=0.5*Z;for(var $=0,D=y.length-1;$<y.length||0<=D;$++,D--){b=u.reversed?
@@ -963,7 +963,7 @@ ka.prototype.cancelAllAnimations=function(){this.animations=[];this.animationReq
963
963
  0,b.width,b.height,e-e*a,0,a*c.canvas.width/ma,c.canvas.height/ma)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ma,b.height/ma);c.restore()}},fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ma,c.canvas.height/ma);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*
964
964
  (a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},m={drawMarker:function(a,d,c,b,e,f,m,t){if(c){var l=1;c.fillStyle=f?f:"#000000";c.strokeStyle=m?m:"#000000";c.lineWidth=t?t:0;c.setLineDash&&c.setLineDash(U("solid",t));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),f&&c.fill(),t&&(m?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle=
965
965
  "black",c.stroke(),c.globalAlpha=l))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),f&&c.fill(),t&&(m?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),f&&c.fill(),t&&(m?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l)),c.beginPath()):"cross"===b&&(c.strokeStyle=f,c.lineWidth=e/4,c.beginPath(),
966
- c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];m.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return v}();Ia.version="v3.12.3 GA";window.CanvasJS&&(Ia&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=Ia);ia.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,culture:"en",
966
+ c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];m.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return v}();Ia.version="v3.12.4 GA";window.CanvasJS&&(Ia&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=Ia);ia.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,culture:"en",
967
967
  creditHref:"",creditText:"CanvasJS",exportEnabled:!1,exportFileName:"StockChart",colorSet:"colorSet1",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",navigator:"readWrite",rangeSelector:"readWrite",charts:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}};ia.Navigator={enabled:!0,width:500,height:70,verticalAlign:"bottom",horizontalAlign:"left",dynamicUpdate:!0,backgroundColor:"#fff",
968
968
  animationEnabled:!1,animationDuration:1200,theme:"light1",colorSet:"colorSet1",publicProperties:{slider:"readWrite",backgroundColor:"readWrite",animationEnabled:"readWrite",animationDuration:"readWrite",theme:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",colorSet:"readWrite",options:"readWrite",bounds:"readOnly"}};ia.RangeSelector={enabled:!0,width:500,height:35,label:"Range",verticalAlign:"top",horizontalAlign:"center",selectedRangeButtonIndex:null,
969
969
  publicProperties:{options:"readWrite",buttons:"readWrite",inputFields:"readWrite",buttonStyle:"readWrite",bounds:"readOnly"}};ia.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"}};ia.ButtonStyle={backgroundColor:"#fff",backgroundColorOnHover:"#2196f3",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:2,labelFontColor:"#000",
@@ -1027,43 +1027,44 @@ this.charts[0].options.colorSet?this.charts[0].options.colorSet:this.colorSet;th
1027
1027
  new R(this,this.options&&this.options.rangeSelector?this.options.rangeSelector:null);this.rangeSelector.buttonStyle=new V(this,this.rangeSelector.options&&this.rangeSelector.options.buttonStyle?this.rangeSelector.options.buttonStyle:null);this.rangeSelector.inputFields=new U(this,this.rangeSelector.options&&this.rangeSelector.options.inputFields?this.rangeSelector.options.inputFields:null);this.rangeSelector.inputFields.style=new aa(this,this.rangeSelector.inputFields.options&&this.rangeSelector.inputFields.options.style?
1028
1028
  this.rangeSelector.inputFields.options.style:null);this.rangeSelector.inputFields.style._updateOptions();this.rangeSelector.inputFields._initialize();this.rangeSelector.inputFields.sessionVariables=g?g:this.rangeSelector.inputFields.sessionVariables;if(this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled)for(this.rangeSelector.inputFields._textBlocks=[],this.rangeSelector.inputFields._labels=[],this.rangeSelector.inputFieldsWidth=0,m=this.rangeSelector.inputFields.style.maxWidth=
1029
1029
  this.rangeSelector.inputFields.style.options.maxWidth?this.rangeSelector.inputFields.style.options.maxWidth:0.4*this.rangeSelector.width,z=0;z<this.rangeSelector.inputFields.elements.length;z++)t=new na(this.rangeSelector.ctx,{x:0,y:0,backgroundColor:this.rangeSelector.inputFields.style.backgroundColor,borderColor:this.rangeSelector.inputFields.style.borderColor,borderThickness:this.rangeSelector.inputFields.style.borderThickness,cornerRadius:0,maxWidth:!f(this.rangeSelector.inputFields.style.options.width)&&
1030
- this.rangeSelector.inputFields.style.options.width<m?this.rangeSelector.inputFields.style.width:m,maxHeight:2*this.rangeSelector.inputFields.style.fontSize,angle:0,padding:this.rangeSelector.inputFields.style.padding,text:this.rangeSelector.inputFields.valueFormatString,textAlign:this.rangeSelector.inputFields.style.textAlign,fontSize:this.rangeSelector.inputFields.style.fontSize,fontFamily:this.rangeSelector.inputFields.style.fontFamily,fontWeight:this.rangeSelector.inputFields.style.fontWeight,
1031
- fontColor:this.rangeSelector.inputFields.style.fontColor,fontStyle:this.rangeSelector.inputFields.style.fontStyle,textBaseline:"middle"}),g=t.measureText(),d=new na(this.rangeSelector.ctx,{x:0,y:0,backgroundColor:w?"transparent":null,borderColor:this.rangeSelector.inputFields.style.borderColor,borderThickness:0,cornerRadius:0,maxWidth:0.2*this.width,maxHeight:2*this.rangeSelector.inputFields.style.fontSize,angle:0,padding:this.rangeSelector.inputFields.style.padding,text:"From",textAlign:"left",fontSize:this.rangeSelector.inputFields.style.fontSize,
1032
- fontFamily:this.rangeSelector.inputFields.style.fontFamily,fontWeight:this.rangeSelector.inputFields.style.fontWeight,fontColor:this.rangeSelector.inputFields.style.fontColor,fontStyle:this.rangeSelector.inputFields.style.fontStyle,textBaseline:"middle"}),this.rangeSelector.inputFields._textBlocks.push(t),this.rangeSelector.inputFields._labels.push(d),this.rangeSelector.inputFields._textBlocks[z].bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null},this.rangeSelector.inputFields._labels[z].bounds=
1033
- {x1:null,x2:null,y1:null,y2:null,width:null,height:null},t=f(this.rangeSelector.inputFields.style.options.width)?g.width:this.rangeSelector.inputFields.style.width>t.maxWidth?t.maxWidth:this.rangeSelector.inputFields.style.width,this.rangeSelector.inputFieldsWidth+=t+this.rangeSelector.inputFields.style.spacing+d.measureText().width,this.rangeSelector.inputFieldsHeight=f(this.rangeSelector.inputFieldsHeight)||this.rangeSelector.inputFieldsHeight<g.height?g.height:this.rangeSelector.inputFieldsHeight,
1034
- g=this.rangeSelector.inputFields._textBlocks[z],g.id=++this.rangeSelector.stockChart._eventManager.lastObjectId,this.rangeSelector.stockChart._eventManager.objectMap[g.id]={id:g.id,objectType:"inputFields",inputFieldIndex:z};this.rangeSelector.buttonStyle._updateOptions();this.rangeSelector.sessionVariables=a?a:this.rangeSelector.sessionVariables;this.rangeSelector._initialize();this._objectsInitialized=!0};s.prototype.render=function(d){var t=this;d&&(this.options=d);this._initialize();this.title&&
1035
- this.title.render();if(this.subtitles)for(d=0;d<this.subtitles.length;d++)this.subtitles[d].render();var z;if(this.options.charts){z=Array(this.options.charts.length);var m=this.layoutManager.getFreeSpace(),a=m.height,m=m.height,g=this.options.charts.length;for(d=0;d<this.options.charts.length;d++)!f(this.options.charts[d].height)&&parseFloat(this.options.charts[d].height)&&(z[d]=0<=this.options.charts[d].height.toString().indexOf("%")?Math.floor(Va(this.options.charts[d].height,a,Math.floor(m/g),
1036
- this.height,0)):this.options.charts[d].height,m-=z[d],g--);m=Math.floor(m/g);for(d=0;d<this.options.charts.length;d++)f(z[d])&&(z[d]=m);var c,g=this.options.charts,b=this.charts;this.charts=[];for(d=0;d<g.length;d++){m=this.layoutManager.getFreeSpace();a=g[d];a.animationEnabled=f(g[d].animationEnabled)?this.animationEnabled:g[d].animationEnabled;a.animationDuration=f(g[d].animationDuration)?this.animationDuration:g[d].animationDuration;for(c=b.length;0<c--&&b[c].options!==a;);0<=c?(this.charts[d]=
1037
- b[c],this.charts[d].options=a):(c=l("canvasjs-chart-panel"),c.style.height=z[d]+"px",this._canvasJSContainer.appendChild(c),this.charts[d]=new Ia(c,a,{parent:this,isOptionsInArray:!0,index:d,height:z[d],predefinedThemes:Qa,optionsName:"charts",stockChart:this}));this.charts[d].index=d;this.charts[d].panel.style.width=m.width+"px";this.charts[d].panel.style.top=m.y1+"px";this.charts[d].panel.style.left=m.x1+"px";this.charts[d].panel.style.height=z[d]+"px";this.layoutManager.registerSpace("top",{width:m.width,
1038
- height:z[d]})}this._chartsHeight=z;b=null;for(d=0;d<this.charts.length;d++)if(!f(this.options.charts[d].data))for(b=0;b<this.options.charts[d].data.length;b++)z=this.options.charts[d].data[b],0<=s._supportedChartTypes.indexOf(z.type)||f(z.type)||(ea=!1,window.console&&window.console.log("CanvasJS Error: "+z.type+" Chart is not Supported in StockChart"));if(!ea)return;this.setChartsLayout();for(d=z=0;d<this.charts.length;d++)if(f(this.charts[d].options.colorSet)&&f(this.charts[d].options.theme)){this.charts[d].selectedColorSet=
1039
- [];for(b=z;b<z+this.charts[d].data.length;b++)this.charts[d].selectedColorSet.push(this.selectedColorSet[b%this.selectedColorSet.length]);z+=this.charts[d].data.length}else for(this.charts[d].selectedColorSet=[],b=0;b<this.charts[d].data.length;b++){if(f(this.charts[d].colorSet)||!f(this.charts[d].colorSet)&&f(oa[this.charts[d].colorSet]))this.charts[d].colorSet="colorSet1";this.charts[d].selectedColorSet.push(oa[this.charts[d].colorSet][b%oa[this.charts[d].colorSet].length])}if(this.navigator&&this.navigator.enabled)if(f(this.navigator.options.colorSet)&&
1040
- f(this.navigator.options.theme))if(this.navigator.options.data){this.navigator.chart.selectedColorSet=[];for(b=z;b<z+this.navigator.chart.data.length;b++)this.navigator.chart.selectedColorSet.push(this.selectedColorSet[b%this.selectedColorSet.length]);z+=this.navigator.chart.data.length}else this.navigator.chart.selectedColorSet=this.charts[0].selectedColorSet,this.navigator.colorSet=this.charts&&this.charts[0]&&this.charts[0].options.colorSet?this.charts[0].colorSet:this.colorSet;else this.navigator.colorSet=
1041
- this.navigator.chart.colorSet="undefined"!==typeof this.navigator.options.colorSet?this.navigator.options.colorSet:this.navigator.chart.colorSet,this.navigator.chart.selectedColorSet="undefined"!==typeof oa[this.navigator.colorSet]?oa[this.navigator.colorSet]:oa.colorSet1}if(this.navigator&&this.navigator.enabled){for(d=0;d<this.navigator.chart.data.length;d++)0<=s._supportedChartTypes.indexOf(this.navigator.chart.data[d].type)||(ea=!1,window.console&&window.console.log("CanvasJS Error: "+this.navigator.chart.data[d].type+
1042
- " Chart is not Supported in Navigator"));if(ea){var e=this.navigator.chart.axisX&&this.navigator.chart.axisX.length?this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0];e&&(e.bounds&&e.bounds.x1>this._chartsPlotAreaX1)&&(this._chartsPlotAreaX1=e.bounds.x1);this.navigator.width=this.navigator.chart.width=this.navigator.slider.fullWidth=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+(e&&e.bounds?e.bounds.x1:0);d=this._chartsPlotAreaX1+
1043
- this.layoutManager.getFreeSpace().x1-(e&&e.bounds?e.bounds.x1:0);this.navigator.panel.style.left=d+"px";this.navigator.panel.style.width=this.navigator.chart.panel.style.width=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+(e&&e.bounds?e.bounds.x1:0)+"px";this._canvasJSContainer.style.overflowX=this.options.navigator&&this.options.navigator.width&&this.options.navigator.width+d>=this.width?"visible":"hidden";0<this.navigator.height&&this.navigator.chart.render(this.navigator._chartOptions);
1044
- d=va("backgroundColor animationEnabled animationDuration theme axisX axisX2 axisY axisY2 data".split(" "));for(var k in this.navigator.chart)0<=d.indexOf(k)&&(this.navigator[k]=this.navigator.chart[k]=f(this.navigator.chart.options[k])?this[k]||null:this.navigator.chart[k])}}z=k=null;var b=0,g=a=null,m={},v,A;for(d=0;d<this.charts.length;d++)for(c=this.charts[d].axisX&&this.charts[d].axisX.length?this.charts[d].axisX:this.charts[d].axisX2,k=k||(c&&0<c.length?c[0].minimum:null),z=z||(c&&0<c.length?
1045
- c[0].maximum:null),b=0;b<c.length;b++)e=c[b],e.minimum<k&&(k=e.minimum),e.maximum>z&&(z=e.maximum),f(e.options.viewportMinimum)||(this._axisXMin=v=e.options.viewportMinimum,m.minimum="chart"),f(e.options.viewportMaximum)||(this._axisXMax=A=e.options.viewportMaximum,m.maximum="chart");var y;this.navigator&&(this.navigator.enabled&&this.navigator.chart&&ea)&&(y=this.navigator.chart.axisX&&0<this.navigator.chart.axisX.length?this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0],f(this.navigator.options.slider)||
1046
- void 0===this.navigator.options.slider.minimum||(this._axisXMin=this.navigator.slider.minimum=Math.max(y.minimum,this.navigator.slider.minimum),m.minimum="navigator"),f(this.navigator.options.slider)||void 0===this.navigator.options.slider.maximum||(this._axisXMax=this.navigator.slider.maximum=Math.min(y.maximum,this.navigator.slider.maximum),m.maximum="navigator"));if(this.rangeSelector&&this.rangeSelector.enabled){b=y?y.maximum-y.minimum:z-k;this._selectedRangeButtonIndex=this.navigator.slider&&
1047
- void 0!==this.navigator.slider.options.minimum||this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)||!this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")?this._selectedRangeButtonIndex:this.rangeSelector.selectedRangeButtonIndex;!f(this._selectedRangeButtonIndex)&&this._selectedRangeButtonIndex<this.rangeSelector.buttons.length&&(this.rangeSelector.buttons[this._selectedRangeButtonIndex].state="on");this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")||
1048
- (this.navigator.slider&&(this.navigator.slider.hasOptionChanged("minimum")||this.navigator.slider.hasOptionChanged("maximum"))?this._selectedRangeButtonIndex=null:(!this.navigator.slider||void 0===this.navigator.slider.options.maximum)&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")||(!this.navigator.slider||f(this.navigator.slider.options.minimum))&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("startValue")?
1049
- this._selectedRangeButtonIndex=null:this.navigator.slider&&void 0!==this.navigator.slider.options.maximum||(this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)||A===this._prevViewportMaximum)||(this._selectedRangeButtonIndex=null));this.charts&&this.charts.length&&(e=this.charts[0].axisX&&this.charts[0].axisX.length?this.charts[0].axisX[0]:this.charts[0].axisX2[0]);this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&(this.rangeSelector.sessionVariables._clickedRangeButtonIndex=
1050
- null);for(d=0;d<this.rangeSelector.buttons.length;d++){var n=null;c=this.rangeSelector.buttons[d];-1!==va("year month week day hour minute second millisecond number".split(" ")).indexOf(c.rangeType)?n=c.range*Y[c.rangeType+"Duration"]:"ytd"===c.rangeType?n="ytd":"all"===c.rangeType&&(n=null);if("ytd"===c.rangeType||0!==n&&n<b)c.enabled=!0;c.mousemove=function(a){X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1,t.rangeSelector.buttons[t.rangeSelector.buttons.length-
1051
- 1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[0].textBlock.y-t.rangeSelector.buttons[0].textBlock._lineHeight/2+t.rangeSelector.rangeButtonsHeight+t.rangeSelector.buttonStyle.borderThickness,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<t.rangeSelector.buttons.length;b++)t.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||t.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=
1052
- a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};c.mouseover=function(a){X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[0].textBlock.y-t.rangeSelector.buttons[0].textBlock._lineHeight/
1053
- 2+t.rangeSelector.rangeButtonsHeight+t.rangeSelector.buttonStyle.borderThickness,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<t.rangeSelector.buttons.length;b++)t.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||t.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,
1054
- this.textBlock.render(!0))};c.mouseout=function(a){X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[0].textBlock.y-t.rangeSelector.buttons[0].textBlock._lineHeight/2+t.rangeSelector.rangeButtonsHeight+t.rangeSelector.buttonStyle.borderThickness,t.rangeSelector.stockChart.backgroundColor,
1055
- 0,null,0,0,0,0,1);for(var b=0;b<t.rangeSelector.buttons.length;b++)t.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||t.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColor,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColor,this.textBlock.render(!0))};c.click=function(a){if(this.enabled){var b=0,c=null,d=null;X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-
1056
- t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[0].textBlock.y-t.rangeSelector.buttons[0].textBlock._lineHeight/2+t.rangeSelector.rangeButtonsHeight+t.rangeSelector.buttonStyle.borderThickness,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var e=0;e<t.rangeSelector.buttons.length;e++)t.rangeSelector.buttons[e]!=this&&(t.rangeSelector.buttons[e].state=
1057
- "off"),t.rangeSelector.buttons[e].textBlock.fontWeight=t.rangeSelector.buttonStyle.labelFontWeight,t.rangeSelector.buttons[e].textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColor,t.rangeSelector.buttons[e].textBlock.backgroundColor=a.stockChart.rangeSelector.buttons[e].enabled?a.stockChart.rangeSelector.buttonStyle.backgroundColor:a.stockChart.rangeSelector.buttons[e].backgroundColorDisabled,t.rangeSelector.buttons[e].textBlock.measureText(),!f(t.rangeSelector.options)&&(!f(t.rangeSelector.options.buttonStyle)&&
1058
- !f(t.rangeSelector.options.buttonStyle.width)&&t.rangeSelector.buttonStyle.width<t.rangeSelector.buttonStyle.maxWidth)&&(t.rangeSelector.buttons[e].textBlock.width=t.rangeSelector.buttonStyle.width),t.rangeSelector.buttons[e].textBlock.render(!0);var g;t.charts&&t.charts.length&&(g=t.charts[0].axisX&&t.charts[0].axisX.length?t.charts[0].axisX[0]:t.charts[0].axisX2[0]);var k;t.navigator&&t.navigator.chart&&(k=t.navigator.chart.axisX?t.navigator.chart.axisX[0]:t.navigator.chart.axisX2[0]);-1!==va("year month week day hour minute second millisecond number".split(" ")).indexOf(this.rangeType)?
1059
- b=this.range*Y[this.rangeType+"Duration"]:"all"===this.rangeType&&(b=null);"ytd"===this.rangeType&&g?(c=new Date(g.viewportMaximum),c.setDate(1),c.setMonth(0),b=c.getTime(),c=Math.max(b,k?k.minimum:g.minimum),d=g.viewportMaximum):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)?(k=t.navigator.chart.axisX[0].minimum-(g.viewportMaximum-b),c=t.navigator.chart.axisX[0].minimum,d=Math.min(t.navigator.chart.axisX[0].maximum,g.viewportMaximum+k)):
1060
- (c=g.viewportMaximum-b<g.minimum?g.minimum:g.viewportMaximum-b,k=g.viewportMaximum-b<g.minimum?g.minimum-(g.viewportMaximum-b):0,d=g.viewportMaximum+k>g.maximum?g.maximum:g.viewportMaximum+k);t._rangeEventParameter={stockChart:t,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;
1061
- this.textBlock.measureText();!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.textBlock.render(!0);t.rangeUpdatedBy="rangeButton";t.rangeSelector.sessionVariables._clickedRangeButtonIndex=this._index;"on"!=this.state&&(this.state="on",
1062
- t._rangeEventParameter.type="rangeChanging",t.dispatchEvent("rangeChanging",t._rangeEventParameter,t),t._syncCharts(c,d),t.sessionVariables._axisXMin=c,t.sessionVariables._axisXMax=d,t._rangeEventParameter.type="rangeChanged",t.dispatchEvent("rangeChanged",t._rangeEventParameter,t))}};if(c.enabled){c.cursor=this.rangeSelector.buttonStyle.cursor;this.rangeSelector.sessionVariables._clickedRangeButtonIndex===d&&(c.textBlock.fontWeight="bold",c.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,
1063
- c.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect,c.textBlock.measureText());if("on"===c.state&&"navigator"!==m.minimum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.startValue))&&!f(this._selectedRangeButtonIndex)){f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&("on"===c.state&&"navigator"!==m.minimum)&&(c.textBlock.fontWeight="bold",c.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,
1064
- c.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect,c.textBlock.measureText());if("ytd"===c.rangeType&&e)a=new Date(e.viewportMaximum),a.setDate(1),a.setMonth(0),a=a.getTime();else if(f(n))y?(a=y.minimum,g=y.maximum):e&&(a=e.minimum,g=e.maximum),"chart"===m.maximum&&(m.maximum="rangeButton");else{var q=this.navigator&&this.navigator.slider&&this.navigator.slider.hasOptionChanged("maximum")||this.rangeSelector&&this.rangeSelector.inputFields&&this.rangeSelector.inputFields.hasOptionChanged("endValue")?
1065
- "navigator"===m.maximum?this.navigator.slider.maximum:this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)?this.rangeSelector.inputFields.options.endValue:f(e.options.viewportMaximum)?e.viewportMaximum:e.options.viewportMaximum:e.viewportMaximum;q>(y?y.maximum:e.maximum)&&(q=y?y.maximum:e.maximum);if(q-n<(y?y.minimum:e.minimum)){if("navigator"!==m.maximum&&f(this.rangeSelector.inputFields.options.endValue))"chart"===m.maximum&&(m.maximum="rangeButton");else{this._selectedRangeButtonIndex=
1066
- null;continue}g=y?y:e;n=g.minimum-(q-n);a=g.minimum;g=Math.min(g.maximum,("dateTime"===g.valueType&&"object"===typeof q?q.getTime():q)+n)}else a=q-n,g=q}m.minimum="rangeButton";m.maximum=f(m.maximum)||"chart"===m.maximum&&f(e.options.viewportMaximum)?"rangeButton":m.maximum}f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)||d===this.rangeSelector.sessionVariables._clickedRangeButtonIndex||(c.state="off");this._axisXMin="rangeButton"===m.minimum&&(f(this._axisXMin)||this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex"))?
1030
+ this.rangeSelector.inputFields.style.options.width<m?this.rangeSelector.inputFields.style.width:m,maxHeight:1.5*this.rangeSelector.inputFields.style.fontSize+("object"===typeof this.rangeSelector.inputFields.style.padding?(this.rangeSelector.inputFields.style.padding.top||0)+(this.rangeSelector.inputFields.style.padding.bottom||0):2*this.rangeSelector.inputFields.style.padding),angle:0,padding:this.rangeSelector.inputFields.style.padding,text:this.rangeSelector.inputFields.valueFormatString,textAlign:this.rangeSelector.inputFields.style.textAlign,
1031
+ fontSize:this.rangeSelector.inputFields.style.fontSize,fontFamily:this.rangeSelector.inputFields.style.fontFamily,fontWeight:this.rangeSelector.inputFields.style.fontWeight,fontColor:this.rangeSelector.inputFields.style.fontColor,fontStyle:this.rangeSelector.inputFields.style.fontStyle,textBaseline:"middle"}),g=t.measureText(),d=new na(this.rangeSelector.ctx,{x:0,y:0,backgroundColor:w?"transparent":null,borderColor:this.rangeSelector.inputFields.style.borderColor,borderThickness:0,cornerRadius:0,
1032
+ maxWidth:0.2*this.width,maxHeight:1.5*this.rangeSelector.inputFields.style.fontSize+("object"===typeof this.rangeSelector.inputFields.style.padding?(this.rangeSelector.inputFields.style.padding.top||0)+(this.rangeSelector.inputFields.style.padding.bottom||0):2*this.rangeSelector.inputFields.style.padding),angle:0,padding:this.rangeSelector.inputFields.style.padding,text:"From",textAlign:"left",fontSize:this.rangeSelector.inputFields.style.fontSize,fontFamily:this.rangeSelector.inputFields.style.fontFamily,
1033
+ fontWeight:this.rangeSelector.inputFields.style.fontWeight,fontColor:this.rangeSelector.inputFields.style.fontColor,fontStyle:this.rangeSelector.inputFields.style.fontStyle,textBaseline:"middle"}),this.rangeSelector.inputFields._textBlocks.push(t),this.rangeSelector.inputFields._labels.push(d),this.rangeSelector.inputFields._textBlocks[z].bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null},this.rangeSelector.inputFields._labels[z].bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null},
1034
+ t=f(this.rangeSelector.inputFields.style.options.width)?g.width:this.rangeSelector.inputFields.style.width>t.maxWidth?t.maxWidth:this.rangeSelector.inputFields.style.width,this.rangeSelector.inputFieldsWidth+=t+this.rangeSelector.inputFields.style.spacing+d.measureText().width,this.rangeSelector.inputFieldsHeight=f(this.rangeSelector.inputFieldsHeight)||this.rangeSelector.inputFieldsHeight<g.height?g.height:this.rangeSelector.inputFieldsHeight,g=this.rangeSelector.inputFields._textBlocks[z],g.id=
1035
+ ++this.rangeSelector.stockChart._eventManager.lastObjectId,this.rangeSelector.stockChart._eventManager.objectMap[g.id]={id:g.id,objectType:"inputFields",inputFieldIndex:z};this.rangeSelector.buttonStyle._updateOptions();this.rangeSelector.sessionVariables=a?a:this.rangeSelector.sessionVariables;this.rangeSelector._initialize();this._objectsInitialized=!0};s.prototype.render=function(d){var t=this;d&&(this.options=d);this._initialize();this.title&&this.title.render();if(this.subtitles)for(d=0;d<this.subtitles.length;d++)this.subtitles[d].render();
1036
+ var z;if(this.options.charts){z=Array(this.options.charts.length);var m=this.layoutManager.getFreeSpace(),a=m.height,m=m.height,g=this.options.charts.length;for(d=0;d<this.options.charts.length;d++)!f(this.options.charts[d].height)&&parseFloat(this.options.charts[d].height)&&(z[d]=0<=this.options.charts[d].height.toString().indexOf("%")?Math.floor(Va(this.options.charts[d].height,a,Math.floor(m/g),this.height,0)):this.options.charts[d].height,m-=z[d],g--);m=Math.floor(m/g);for(d=0;d<this.options.charts.length;d++)f(z[d])&&
1037
+ (z[d]=m);var c,g=this.options.charts,b=this.charts;this.charts=[];for(d=0;d<g.length;d++){m=this.layoutManager.getFreeSpace();a=g[d];a.animationEnabled=f(g[d].animationEnabled)?this.animationEnabled:g[d].animationEnabled;a.animationDuration=f(g[d].animationDuration)?this.animationDuration:g[d].animationDuration;for(c=b.length;0<c--&&b[c].options!==a;);0<=c?(this.charts[d]=b[c],this.charts[d].options=a):(c=l("canvasjs-chart-panel"),c.style.height=z[d]+"px",this._canvasJSContainer.appendChild(c),this.charts[d]=
1038
+ new Ia(c,a,{parent:this,isOptionsInArray:!0,index:d,height:z[d],predefinedThemes:Qa,optionsName:"charts",stockChart:this}));this.charts[d].index=d;this.charts[d].panel.style.width=m.width+"px";this.charts[d].panel.style.top=m.y1+"px";this.charts[d].panel.style.left=m.x1+"px";this.charts[d].panel.style.height=z[d]+"px";this.layoutManager.registerSpace("top",{width:m.width,height:z[d]})}this._chartsHeight=z;b=null;for(d=0;d<this.charts.length;d++)if(!f(this.options.charts[d].data))for(b=0;b<this.options.charts[d].data.length;b++)z=
1039
+ this.options.charts[d].data[b],0<=s._supportedChartTypes.indexOf(z.type)||f(z.type)||(ea=!1,window.console&&window.console.log("CanvasJS Error: "+z.type+" Chart is not Supported in StockChart"));if(!ea)return;this.setChartsLayout();for(d=z=0;d<this.charts.length;d++)if(f(this.charts[d].options.colorSet)&&f(this.charts[d].options.theme)){this.charts[d].selectedColorSet=[];for(b=z;b<z+this.charts[d].data.length;b++)this.charts[d].selectedColorSet.push(this.selectedColorSet[b%this.selectedColorSet.length]);
1040
+ z+=this.charts[d].data.length}else for(this.charts[d].selectedColorSet=[],b=0;b<this.charts[d].data.length;b++){if(f(this.charts[d].colorSet)||!f(this.charts[d].colorSet)&&f(oa[this.charts[d].colorSet]))this.charts[d].colorSet="colorSet1";this.charts[d].selectedColorSet.push(oa[this.charts[d].colorSet][b%oa[this.charts[d].colorSet].length])}if(this.navigator&&this.navigator.enabled)if(f(this.navigator.options.colorSet)&&f(this.navigator.options.theme))if(this.navigator.options.data){this.navigator.chart.selectedColorSet=
1041
+ [];for(b=z;b<z+this.navigator.chart.data.length;b++)this.navigator.chart.selectedColorSet.push(this.selectedColorSet[b%this.selectedColorSet.length]);z+=this.navigator.chart.data.length}else this.navigator.chart.selectedColorSet=this.charts[0].selectedColorSet,this.navigator.colorSet=this.charts&&this.charts[0]&&this.charts[0].options.colorSet?this.charts[0].colorSet:this.colorSet;else this.navigator.colorSet=this.navigator.chart.colorSet="undefined"!==typeof this.navigator.options.colorSet?this.navigator.options.colorSet:
1042
+ this.navigator.chart.colorSet,this.navigator.chart.selectedColorSet="undefined"!==typeof oa[this.navigator.colorSet]?oa[this.navigator.colorSet]:oa.colorSet1}if(this.navigator&&this.navigator.enabled){for(d=0;d<this.navigator.chart.data.length;d++)0<=s._supportedChartTypes.indexOf(this.navigator.chart.data[d].type)||(ea=!1,window.console&&window.console.log("CanvasJS Error: "+this.navigator.chart.data[d].type+" Chart is not Supported in Navigator"));if(ea){var e=this.navigator.chart.axisX&&this.navigator.chart.axisX.length?
1043
+ this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0];e&&(e.bounds&&e.bounds.x1>this._chartsPlotAreaX1)&&(this._chartsPlotAreaX1=e.bounds.x1);this.navigator.width=this.navigator.chart.width=this.navigator.slider.fullWidth=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+(e&&e.bounds?e.bounds.x1:0);d=this._chartsPlotAreaX1+this.layoutManager.getFreeSpace().x1-(e&&e.bounds?e.bounds.x1:0);this.navigator.panel.style.left=d+"px";this.navigator.panel.style.width=
1044
+ this.navigator.chart.panel.style.width=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+(e&&e.bounds?e.bounds.x1:0)+"px";this._canvasJSContainer.style.overflowX=this.options.navigator&&this.options.navigator.width&&this.options.navigator.width+d>=this.width?"visible":"hidden";0<this.navigator.height&&this.navigator.chart.render(this.navigator._chartOptions);d=va("backgroundColor animationEnabled animationDuration theme axisX axisX2 axisY axisY2 data".split(" "));
1045
+ for(var k in this.navigator.chart)0<=d.indexOf(k)&&(this.navigator[k]=this.navigator.chart[k]=f(this.navigator.chart.options[k])?this[k]||null:this.navigator.chart[k])}}z=k=null;var b=0,g=a=null,m={},v,A;for(d=0;d<this.charts.length;d++)for(c=this.charts[d].axisX&&this.charts[d].axisX.length?this.charts[d].axisX:this.charts[d].axisX2,k=k||(c&&0<c.length?c[0].minimum:null),z=z||(c&&0<c.length?c[0].maximum:null),b=0;b<c.length;b++)e=c[b],e.minimum<k&&(k=e.minimum),e.maximum>z&&(z=e.maximum),f(e.options.viewportMinimum)||
1046
+ (this._axisXMin=v=e.options.viewportMinimum,m.minimum="chart"),f(e.options.viewportMaximum)||(this._axisXMax=A=e.options.viewportMaximum,m.maximum="chart");var y;this.navigator&&(this.navigator.enabled&&this.navigator.chart&&ea)&&(y=this.navigator.chart.axisX&&0<this.navigator.chart.axisX.length?this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0],f(this.navigator.options.slider)||void 0===this.navigator.options.slider.minimum||(this._axisXMin=this.navigator.slider.minimum=Math.max(y.minimum,
1047
+ this.navigator.slider.minimum),m.minimum="navigator"),f(this.navigator.options.slider)||void 0===this.navigator.options.slider.maximum||(this._axisXMax=this.navigator.slider.maximum=Math.min(y.maximum,this.navigator.slider.maximum),m.maximum="navigator"));if(this.rangeSelector&&this.rangeSelector.enabled){b=y?y.maximum-y.minimum:z-k;this._selectedRangeButtonIndex=this.navigator.slider&&void 0!==this.navigator.slider.options.minimum||this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.startValue)||
1048
+ !this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")?this._selectedRangeButtonIndex:this.rangeSelector.selectedRangeButtonIndex;!f(this._selectedRangeButtonIndex)&&this._selectedRangeButtonIndex<this.rangeSelector.buttons.length&&(this.rangeSelector.buttons[this._selectedRangeButtonIndex].state="on");this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")||(this.navigator.slider&&(this.navigator.slider.hasOptionChanged("minimum")||this.navigator.slider.hasOptionChanged("maximum"))?
1049
+ this._selectedRangeButtonIndex=null:(!this.navigator.slider||void 0===this.navigator.slider.options.maximum)&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("endValue")||(!this.navigator.slider||f(this.navigator.slider.options.minimum))&&this.rangeSelector.inputFields.enabled&&this.rangeSelector.inputFields.hasOptionChanged("startValue")?this._selectedRangeButtonIndex=null:this.navigator.slider&&void 0!==this.navigator.slider.options.maximum||(this.rangeSelector.inputFields.enabled&&
1050
+ !f(this.rangeSelector.inputFields.options.endValue)||A===this._prevViewportMaximum)||(this._selectedRangeButtonIndex=null));this.charts&&this.charts.length&&(e=this.charts[0].axisX&&this.charts[0].axisX.length?this.charts[0].axisX[0]:this.charts[0].axisX2[0]);this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&(this.rangeSelector.sessionVariables._clickedRangeButtonIndex=null);for(d=0;d<this.rangeSelector.buttons.length;d++){var n=null;c=this.rangeSelector.buttons[d];-1!==va("year month week day hour minute second millisecond number".split(" ")).indexOf(c.rangeType)?
1051
+ n=c.range*Y[c.rangeType+"Duration"]:"ytd"===c.rangeType?n="ytd":"all"===c.rangeType&&(n=null);if("ytd"===c.rangeType||0!==n&&n<b)c.enabled=!0;c.mousemove=function(a){X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-
1052
+ 1].bounds.y2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<t.rangeSelector.buttons.length;b++)t.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||t.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};
1053
+ c.mouseover=function(a){X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.y2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<
1054
+ t.rangeSelector.buttons.length;b++)t.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||t.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};c.mouseout=function(a){X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/
1055
+ 2,t.rangeSelector.bounds.y1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.y2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<t.rangeSelector.buttons.length;b++)t.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||t.rangeSelector.buttons[b].textBlock.render(!0);
1056
+ this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColor,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColor,this.textBlock.render(!0))};c.click=function(a){if(this.enabled){var b=0,c=null,d=null;X(t.rangeSelector.ctx,t.rangeSelector.buttons[0].bounds.x1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.bounds.y1-t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-
1057
+ 1].bounds.x2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.buttons[t.rangeSelector.buttons.length-1].bounds.y2+t.rangeSelector.buttonStyle.borderThickness/2,t.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var e=0;e<t.rangeSelector.buttons.length;e++)t.rangeSelector.buttons[e]!=this&&(t.rangeSelector.buttons[e].state="off"),t.rangeSelector.buttons[e].textBlock.fontWeight=t.rangeSelector.buttonStyle.labelFontWeight,t.rangeSelector.buttons[e].textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColor,
1058
+ t.rangeSelector.buttons[e].textBlock.backgroundColor=a.stockChart.rangeSelector.buttons[e].enabled?a.stockChart.rangeSelector.buttonStyle.backgroundColor:a.stockChart.rangeSelector.buttons[e].backgroundColorDisabled,t.rangeSelector.buttons[e].textBlock.measureText(),!f(t.rangeSelector.options)&&(!f(t.rangeSelector.options.buttonStyle)&&!f(t.rangeSelector.options.buttonStyle.width)&&t.rangeSelector.buttonStyle.width<t.rangeSelector.buttonStyle.maxWidth)&&(t.rangeSelector.buttons[e].textBlock.width=
1059
+ t.rangeSelector.buttonStyle.width),t.rangeSelector.buttons[e].textBlock.render(!0);var g;t.charts&&t.charts.length&&(g=t.charts[0].axisX&&t.charts[0].axisX.length?t.charts[0].axisX[0]:t.charts[0].axisX2[0]);var k;t.navigator&&t.navigator.chart&&(k=t.navigator.chart.axisX?t.navigator.chart.axisX[0]:t.navigator.chart.axisX2[0]);-1!==va("year month week day hour minute second millisecond number".split(" ")).indexOf(this.rangeType)?b=this.range*Y[this.rangeType+"Duration"]:"all"===this.rangeType&&(b=
1060
+ null);"ytd"===this.rangeType&&g?(c=new Date(g.viewportMaximum),c.setDate(1),c.setMonth(0),b=c.getTime(),c=Math.max(b,k?k.minimum:g.minimum),d=g.viewportMaximum):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)?(k=t.navigator.chart.axisX[0].minimum-(g.viewportMaximum-b),c=t.navigator.chart.axisX[0].minimum,d=Math.min(t.navigator.chart.axisX[0].maximum,g.viewportMaximum+k)):(c=g.viewportMaximum-b<g.minimum?g.minimum:g.viewportMaximum-b,k=g.viewportMaximum-
1061
+ b<g.minimum?g.minimum-(g.viewportMaximum-b):0,d=g.viewportMaximum+k>g.maximum?g.maximum:g.viewportMaximum+k);t._rangeEventParameter={stockChart:t,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;this.textBlock.measureText();!f(a.stockChart.rangeSelector.options)&&
1062
+ (!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.textBlock.render(!0);t.rangeUpdatedBy="rangeButton";t.rangeSelector.sessionVariables._clickedRangeButtonIndex=this._index;"on"!=this.state&&(this.state="on",t._rangeEventParameter.type="rangeChanging",t.dispatchEvent("rangeChanging",
1063
+ t._rangeEventParameter,t),t._syncCharts(c,d),t.sessionVariables._axisXMin=c,t.sessionVariables._axisXMax=d,t._rangeEventParameter.type="rangeChanged",t.dispatchEvent("rangeChanged",t._rangeEventParameter,t))}};if(c.enabled){c.cursor=this.rangeSelector.buttonStyle.cursor;this.rangeSelector.sessionVariables._clickedRangeButtonIndex===d&&(c.textBlock.fontWeight="bold",c.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,c.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect,
1064
+ c.textBlock.measureText());if("on"===c.state&&"navigator"!==m.minimum&&(!this.rangeSelector.inputFields.enabled||f(this.rangeSelector.inputFields.options.startValue))&&!f(this._selectedRangeButtonIndex)){f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)&&("on"===c.state&&"navigator"!==m.minimum)&&(c.textBlock.fontWeight="bold",c.textBlock.fontColor=this.rangeSelector.buttonStyle.labelFontColorOnHover,c.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect,
1065
+ c.textBlock.measureText());if("ytd"===c.rangeType&&e)a=new Date(e.viewportMaximum),a.setDate(1),a.setMonth(0),a=a.getTime();else if(f(n))y?(a=y.minimum,g=y.maximum):e&&(a=e.minimum,g=e.maximum),"chart"===m.maximum&&(m.maximum="rangeButton");else{var q=this.navigator&&this.navigator.slider&&this.navigator.slider.hasOptionChanged("maximum")||this.rangeSelector&&this.rangeSelector.inputFields&&this.rangeSelector.inputFields.hasOptionChanged("endValue")?"navigator"===m.maximum?this.navigator.slider.maximum:
1066
+ this.rangeSelector.inputFields.enabled&&!f(this.rangeSelector.inputFields.options.endValue)?this.rangeSelector.inputFields.options.endValue:f(e.options.viewportMaximum)?e.viewportMaximum:e.options.viewportMaximum:e.viewportMaximum;q>(y?y.maximum:e.maximum)&&(q=y?y.maximum:e.maximum);if(q-n<(y?y.minimum:e.minimum)){if("navigator"!==m.maximum&&f(this.rangeSelector.inputFields.options.endValue))"chart"===m.maximum&&(m.maximum="rangeButton");else{this._selectedRangeButtonIndex=null;continue}g=y?y:e;n=
1067
+ g.minimum-(q-n);a=g.minimum;g=Math.min(g.maximum,("dateTime"===g.valueType&&"object"===typeof q?q.getTime():q)+n)}else a=q-n,g=q}m.minimum="rangeButton";m.maximum=f(m.maximum)||"chart"===m.maximum&&f(e.options.viewportMaximum)?"rangeButton":m.maximum}f(this.rangeSelector.sessionVariables._clickedRangeButtonIndex)||d===this.rangeSelector.sessionVariables._clickedRangeButtonIndex||(c.state="off");this._axisXMin="rangeButton"===m.minimum&&(f(this._axisXMin)||this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex"))?
1067
1068
  a:this._axisXMin;this._axisXMax=f(g)?f(this.sessionVariables._axisXMax)?this._axisXMax:this.sessionVariables._axisXMax:g}else c.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?this.options.rangeSelector.inputFields.valueType:this.isDateTime?"dateTime":"number";for(d=0;d<this.rangeSelector.inputFields._textBlocks.length;d++)e=
1068
1069
  this.rangeSelector.inputFields._textBlocks[d],e.mousemove=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},e.mouseover=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},e.mouseout=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||
1069
1070
  (a.inputField.cursor="auto")},e.click=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||(a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].style.display="inline",a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].focus())};if(isFinite(k)&&isFinite(z)){"dateTime"===this.rangeSelector.inputFields.valueType?(this.rangeSelector.inputFields.valueFormatString=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&
@@ -1159,25 +1160,25 @@ this.width:s.width;f(this.buttonStyle.options.labelFontSize)&&(this.buttonStyle.
1159
1160
  (this.stockChart.subtitles[l].text&&("top"===this.stockChart.subtitles[l].verticalAlign||"right"===this.stockChart.subtitles[l].horizontalAlign&&"center"===this.stockChart.subtitles[l].verticalAlign&&this.stockChart.exportEnabled))&&(this._shiftInputField=!1);this.stockChart.navigator.enabled&&"top"===this.stockChart.navigator.verticalAlign&&(this._shiftInputField=!1);this.rangeButtonsWidth=0;if(this.buttons&&0<this.buttons.length){var a=new na(this.ctx,{x:0,y:0,backgroundColor:this.stockChart.backgroundColor,
1160
1161
  borderThickness:0,cornerRadius:0,maxWidth:0.2*this.stockChart.width,maxHeight:2*this.buttonStyle.labelFontSize,angle:0,padding:{left:5,right:5,top:2,bottom:2},text:f(this.stockChart.options.culture)||f(this.stockChart._cultureInfo.rangeSelector.rangeText)?this.label:this.stockChart._cultureInfo.rangeSelector.rangeText,textAlign:"left",fontSize:this.buttonStyle.labelFontSize,fontFamily:this.buttonStyle.labelFontFamily,fontWeight:this.buttonStyle.labelFontWeight,fontColor:this.buttonStyle.labelFontColor,
1161
1162
  fontStyle:this.buttonStyle.labelFontStyle,textBaseline:"middle"});this._label.textBlock=a;d=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(l=0;l<this.buttons.length;l++){var g=this.buttons[l];g._index=l;a=new na(this.ctx,{x:0,y:0,backgroundColor:this.buttonStyle.backgroundColor,borderColor:this.buttonStyle.borderColor,
1162
- 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:2*this.buttonStyle.labelFontSize,angle:0,padding:this.buttonStyle.padding,text:this.options.buttons&&this.options.buttons.length?f(g.label)?"":g.label:this.buttonLabels[l],textAlign:this.buttonStyle.labelTextAlign,fontSize:this.buttonStyle.labelFontSize,fontFamily:this.buttonStyle.labelFontFamily,
1163
- fontWeight:this.buttonStyle.labelFontWeight,fontColor:this.buttonStyle.labelFontColor,fontStyle:this.buttonStyle.labelFontStyle,textBaseline:"middle"});!f(this.selectedRangeButtonIndex)&&this.selectedRangeButtonIndex===l&&this.hasOptionChanged("selectedRangeButtonIndex")?g.state="on":this.hasOptionChanged("selectedRangeButtonIndex")||"rangeButton"!==this.stockChart.rangeUpdatedBy||this.sessionVariables._clickedRangeButtonIndex!==l?g.state="off":g.state="on";g.textBlock=a;g.bounds={x1:null,x2:null,
1164
- 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;this.rangeButtonsHeight=a.height;d=d<a.height?a.height:d;g=this.buttons[l];g.id=++this.stockChart._eventManager.lastObjectId;this.stockChart._eventManager.objectMap[g.id]={id:g.id,objectType:"rangeButton",rangeButtonIndex:l}}this.height=parseFloat(this.options.height);
1165
- 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+this.inputFields.style.borderThickness+5);this.height<d+this.buttonStyle.borderThickness+5&&(this.height=d+this.buttonStyle.borderThickness+5)}this._label&&(this._label.textBlock&&this.rangeButtonsWidth&&this.inputFieldsWidth)&&this.rangeButtonsWidth+this._label.textBlock.measureText().width+
1166
- this.inputFieldsWidth>=this.width-(this.stockChart.exportEnabled&&this._shiftInputField?40:0)&&(this.height=this.options.height?this.height:2*this.height,this._wrapElements=!0);!this.inputFields.enabled&&(0===this.buttons.length&&f(this.options.height))&&(this.height=0);"bottom"===this.verticalAlign?(l=s.y2-this.height,d="bottom"):(l=s.y1,d="top");"left"===this.horizontalAlign?m=s.x1+2:"center"===this.horizontalAlign?m=s.x1+s.width/2-this.width/2:"right"===this.horizontalAlign&&(m=s.x2-2-this.width);
1167
- this.stockChart.layoutManager.registerSpace(d,{width:this.width,height:this.height});this.bounds={x1:m,y1:l,x2:m+this.width,y2:l+this.height,width:this.width,height:this.height};for(l=0;l<this.buttons.length;l++)this.buttons[l]._initialize(l)}};R.prototype.render=function(){var d;this.setButtonsLayout();X(this.ctx,this.bounds.x1,this.bounds.y1,this.bounds.x2,this.bounds.y2,this.stockChart.backgroundColor,0,null,0,0,0,0,1);this._label&&this._label.textBlock&&this._label.textBlock.render(!0);for(d=
1168
- 0;d<this.buttons.length;d++)this.buttons[d].enabled||(this.buttons[d].textBlock.backgroundColor=this.buttons[d].backgroundColorDisabled,this.buttons[d].textBlock.borderColor=this.buttons[d].backgroundColorDisabled),this.buttons[d].render(!0);this.inputFields&&this.inputFields.enabled&&this.renderInputFields(!0)};R.prototype.setButtonsLayout=function(){var d,f,l=this.bounds.x1+5,m,a;this._label&&(this._label.textBlock&&0<this.buttons.length)&&(this._label.textBlock.x=l,this._label.textBlock.y=a=this.bounds.y1+
1169
- (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:l,y1:a-this._label.textBlock.fontSize/2,x2:l+this._label.textBlock.measureText().width,y2:a+this._label.textBlock.fontSize/2,width:this._label.textBlock.measureText().width,height:this._label.textBlock.measureText().height},l+=this._label.bounds.width);
1170
- for(d=0;d<this.buttons.length;d++)f=this.buttons[d],this.buttonStyle.options.width?f.textBlock.width=this.buttonStyle.options.maxWidth?this.buttonStyle.options.width<this.buttonStyle.options.maxWidth?f.textBlock.maxWidth=this.buttonStyle.width:f.textBlock.maxWidth=this.buttonStyle.maxWidth:f.textBlock.maxWidth=f.textBlock.maxWidth<this.buttonStyle.width?f.textBlock.maxWidth:this.buttonStyle.width:this.buttonStyle.options.maxWidth&&(f.textBlock.maxWidth=this.buttonStyle.maxWidth),m=l+f.textBlock.width,
1171
- f.textBlock.x=f.bounds.x1=1===f.textBlock.borderThickness%2?(l<<0)+0.5:l,f.bounds.x2=m,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.height/2,f.bounds.y2=f.bounds.y1+f.textBlock.height,f.bounds.width=m-l,f.bounds.height=f.bounds.y2-
1172
- f.bounds.y1,l=m+this.buttonStyle.spacing,f.textBlock.maxWidth=this.buttonStyle.maxWidth};R.prototype.resetRangeButtons=function(){for(var d=0;d<this.buttons.length;d++)this.buttons[d].enabled&&(this.buttons[d].state="off",this.buttons[d].textBlock.backgroundColor=this.buttonStyle.backgroundColor,this.buttons[d].textBlock.fontColor=this.buttonStyle.labelFontColor,this.buttons[d].textBlock.fontWeight=this.buttonStyle.labelFontWeight,this.buttons[d].textBlock.measureText(),!f(this.options)&&(!f(this.options.buttonStyle)&&
1173
- !f(this.options.buttonStyle.width)&&this.buttonStyle.width<this.buttonStyle.maxWidth)&&(this.buttons[d].textBlock.width=this.buttonStyle.width),this.buttons[d].textBlock.render(!0))};R.prototype.renderInputFields=function(){this.inputFields._textBlocks[0].text="dateTime"===this.inputFields.valueType&&isFinite(this.inputFields.startValue)?qa(this.inputFields.startValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):da(this.inputFields.startValue,this.inputFields.valueFormatString,
1174
- this.stockChart._cultureInfo);this.inputFields._textBlocks[1].text="dateTime"===this.inputFields.valueType&&isFinite(this.inputFields.endValue)?qa(this.inputFields.endValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):da(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=
1175
- f(this.stockChart._cultureInfo.rangeSelector.toText)?"To":this.stockChart._cultureInfo.rangeSelector.toText;for(var d=0,l=this.inputFields._textBlocks.length-1;0<=l;l--){var s=this.inputFields._textBlocks[l],m=s.measureText();""!==s.text&&(s._width=this.inputFields.style.options.width?this.inputFields.style.width:this.inputFields.style.width=Math.abs(m.width-s._width)<=("dateTime"===this.inputFields.valueType?s.leftPadding+s.rightPadding:(s.leftPadding+s.rightPadding)/2)?s._width:m.width+s.leftPadding+
1176
- s.rightPadding,s._width>this.inputFields.style.maxWidth&&(s._width=this.inputFields.style.maxWidth),d+=s._width+this.inputFields.style.spacing,s.x=s.bounds.x1=1===s.borderThickness%2?(this.bounds.x2-d-(this.stockChart.exportEnabled&&this._shiftInputField?40:0)<<0)+0.5:this.bounds.x2-d-(this.stockChart.exportEnabled&&this._shiftInputField?40:0),s.bounds.x2=s.bounds.x1+s._width,d+=this.inputFields._labels[l].measureText().width+2,this.inputFields._labels[l].x=this.inputFields._labels[l].bounds.x1=this.bounds.x2-
1177
- d-(this.stockChart.exportEnabled&&this._shiftInputField?40:0),this.inputFields._labels[l].bounds.x2=this.inputFields._labels[l].bounds.x1+this.inputFields._labels[l].measureText().width,this.inputFields.style.width=s.width=s._width,s.y=(1===s.borderThickness%2?(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2<<0.5:(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+8:this.bounds.y1)+(s.height-s.topPadding-
1178
- s.bottomPadding+s.borderThickness)/2)+2,this.inputFields._labels[l].y=(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2+2,s.bounds.y1=this.inputFields._labels[l].bounds.y1=s.y-s._lineHeight/2,s.bounds.y2=this.inputFields._labels[l].bounds.y2=s.bounds.y1+m.height,m=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)?
1179
- (this.inputFields.style.padding.left||0)+(this.inputFields.style.padding.right||0):2*this.inputFields.style.padding,this.inputFields.elements[l].style.top=s.y-s._lineHeight/2+"px",this.inputFields.elements[l].style.left=s.bounds.x1+s.borderThickness/2+"px",this.inputFields.elements[l].style.width=this.inputFields.style.width-this.inputFields.style.borderThickness-m+"px",0===m&&(this.inputFields.elements[l].style.paddingLeft=0,this.inputFields.elements[l].style.paddingRight=0),this.inputFields._labels[l].render(!0),
1180
- s.render(!0))}};R.prototype._updateInputFields=function(d,f){!this.inputFields.elements[0].focused&&isFinite(d)&&(this.inputFields.elements[0].value="dateTime"===this.inputFields.valueType?qa(d,"YYYY-MM-DD"):da(d,this.inputFields.valueFormatString));!this.inputFields.elements[1].focused&&isFinite(f)&&(this.inputFields.elements[1].value="dateTime"===this.inputFields.valueType?qa(f,"YYYY-MM-DD"):da(f,this.inputFields.valueFormatString));for(var l=0;l<this.inputFields.elements.length;l++)this.inputFields.elements[l].focused&&
1163
+ 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||0):2*this.buttonStyle.padding),angle:0,padding:this.buttonStyle.padding,text:this.options.buttons&&this.options.buttons.length?
1164
+ f(g.label)?"":g.label:this.buttonLabels[l],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===l&&this.hasOptionChanged("selectedRangeButtonIndex")?g.state="on":this.hasOptionChanged("selectedRangeButtonIndex")||
1165
+ "rangeButton"!==this.stockChart.rangeUpdatedBy||this.sessionVariables._clickedRangeButtonIndex!==l?g.state="off":g.state="on";g.textBlock=a;g.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;this.rangeButtonsHeight=a.height;d=d<a.height?a.height:d;g=this.buttons[l];g.id=++this.stockChart._eventManager.lastObjectId;
1166
+ this.stockChart._eventManager.objectMap[g.id]={id:g.id,objectType:"rangeButton",rangeButtonIndex:l}}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+this.inputFields.style.borderThickness+5);this.height<d+this.buttonStyle.borderThickness+5&&(this.height=d+this.buttonStyle.borderThickness+
1167
+ 5)}this._label&&(this._label.textBlock&&this.rangeButtonsWidth&&this.inputFieldsWidth)&&this.rangeButtonsWidth+this._label.textBlock.measureText().width+this.inputFieldsWidth>=this.width-(this.stockChart.exportEnabled&&this._shiftInputField?40:0)&&(this.height=this.options.height?this.height:2*this.height,this._wrapElements=!0);!this.inputFields.enabled&&(0===this.buttons.length&&f(this.options.height))&&(this.height=0);"bottom"===this.verticalAlign?(l=s.y2-this.height,d="bottom"):(l=s.y1,d="top");
1168
+ "left"===this.horizontalAlign?m=s.x1+2:"center"===this.horizontalAlign?m=s.x1+s.width/2-this.width/2:"right"===this.horizontalAlign&&(m=s.x2-2-this.width);this.stockChart.layoutManager.registerSpace(d,{width:this.width,height:this.height});this.bounds={x1:m,y1:l,x2:m+this.width,y2:l+this.height,width:this.width,height:this.height};for(l=0;l<this.buttons.length;l++)this.buttons[l]._initialize(l)}};R.prototype.render=function(){var d;this.setButtonsLayout();X(this.ctx,this.bounds.x1,this.bounds.y1,
1169
+ this.bounds.x2,this.bounds.y2,this.stockChart.backgroundColor,0,null,0,0,0,0,1);this._label&&this._label.textBlock&&this._label.textBlock.render(!0);for(d=0;d<this.buttons.length;d++)this.buttons[d].enabled||(this.buttons[d].textBlock.backgroundColor=this.buttons[d].backgroundColorDisabled,this.buttons[d].textBlock.borderColor=this.buttons[d].backgroundColorDisabled),this.buttons[d].render(!0);this.inputFields&&this.inputFields.enabled&&this.renderInputFields(!0)};R.prototype.setButtonsLayout=function(){var d,
1170
+ f,l=this.bounds.x1+5,m,a;this._label&&(this._label.textBlock&&0<this.buttons.length)&&(this._label.textBlock.x=l,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:l,y1:a-this._label.textBlock.fontSize/2,x2:l+this._label.textBlock.measureText().width,y2:a+this._label.textBlock.fontSize/
1171
+ 2,width:this._label.textBlock.measureText().width,height:this._label.textBlock.measureText().height},l+=this._label.bounds.width);for(d=0;d<this.buttons.length;d++)f=this.buttons[d],this.buttonStyle.options.width?f.textBlock.width=this.buttonStyle.options.maxWidth?this.buttonStyle.options.width<this.buttonStyle.options.maxWidth?f.textBlock.maxWidth=this.buttonStyle.width:f.textBlock.maxWidth=this.buttonStyle.maxWidth:f.textBlock.maxWidth=f.textBlock.maxWidth<this.buttonStyle.width?f.textBlock.maxWidth:
1172
+ this.buttonStyle.width:f.textBlock.maxWidth=this.buttonStyle.maxWidth,m=l+f.textBlock.width,f.textBlock.x=f.bounds.x1=1===f.textBlock.borderThickness%2?(l<<0)+0.5:l,f.bounds.x2=m,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=this.bounds.y1,f.bounds.y2=
1173
+ f.bounds.y1+f.textBlock.height,f.bounds.width=m-l,f.bounds.height=f.bounds.y2-f.bounds.y1,l=m+this.buttonStyle.spacing};R.prototype.resetRangeButtons=function(){for(var d=0;d<this.buttons.length;d++)this.buttons[d].enabled&&(this.buttons[d].state="off",this.buttons[d].textBlock.backgroundColor=this.buttonStyle.backgroundColor,this.buttons[d].textBlock.fontColor=this.buttonStyle.labelFontColor,this.buttons[d].textBlock.fontWeight=this.buttonStyle.labelFontWeight,this.buttons[d].textBlock.measureText(),
1174
+ !f(this.options)&&(!f(this.options.buttonStyle)&&!f(this.options.buttonStyle.width)&&this.buttonStyle.width<this.buttonStyle.maxWidth)&&(this.buttons[d].textBlock.width=this.buttonStyle.width),this.buttons[d].textBlock.render(!0))};R.prototype.renderInputFields=function(){this.inputFields._textBlocks[0].text="dateTime"===this.inputFields.valueType&&isFinite(this.inputFields.startValue)?qa(this.inputFields.startValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):da(this.inputFields.startValue,
1175
+ this.inputFields.valueFormatString,this.stockChart._cultureInfo);this.inputFields._textBlocks[1].text="dateTime"===this.inputFields.valueType&&isFinite(this.inputFields.endValue)?qa(this.inputFields.endValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):da(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;
1176
+ this.inputFields._labels[1].text=f(this.stockChart._cultureInfo.rangeSelector.toText)?"To":this.stockChart._cultureInfo.rangeSelector.toText;for(var d=0,l=this.inputFields._textBlocks.length-1;0<=l;l--){var s=this.inputFields._textBlocks[l],m=s.measureText();""!==s.text&&(s._width=this.inputFields.style.options.width?this.inputFields.style.width:this.inputFields.style.width=Math.abs(m.width-s._width)<=("dateTime"===this.inputFields.valueType?s.leftPadding+s.rightPadding:(s.leftPadding+s.rightPadding)/
1177
+ 2)?s._width:m.width+s.leftPadding+s.rightPadding,s._width>this.inputFields.style.maxWidth&&(s._width=this.inputFields.style.maxWidth),d+=s._width+this.inputFields.style.spacing,s.x=s.bounds.x1=1===s.borderThickness%2?(this.bounds.x2-d-(this.stockChart.exportEnabled&&this._shiftInputField?40:0)<<0)+0.5:this.bounds.x2-d-(this.stockChart.exportEnabled&&this._shiftInputField?40:0),s.bounds.x2=s.bounds.x1+s._width,d+=this.inputFields._labels[l].measureText().width+2,this.inputFields._labels[l].x=this.inputFields._labels[l].bounds.x1=
1178
+ this.bounds.x2-d-(this.stockChart.exportEnabled&&this._shiftInputField?40:0),this.inputFields._labels[l].bounds.x2=this.inputFields._labels[l].bounds.x1+this.inputFields._labels[l].measureText().width,this.inputFields.style.width=s.width=s._width,s.y=(1===s.borderThickness%2?(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2<<0.5:(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+8:this.bounds.y1)+(s.height-
1179
+ s.topPadding-s.bottomPadding+s.borderThickness)/2)+2,this.inputFields._labels[l].y=(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+8:this.bounds.y1)+(s.height-s.topPadding-s.bottomPadding+s.borderThickness)/2+2,s.bounds.y1=this.inputFields._labels[l].bounds.y1=s.y-s._lineHeight/2,s.bounds.y2=this.inputFields._labels[l].bounds.y2=s.bounds.y1+m.height,m=f(this.inputFields.style.padding)||this.inputFields.style.options.width&&this.inputFields.style.width>=this.inputFields.style.options.width?
1180
+ 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[l].style.top=s.y-s._lineHeight/2+"px",this.inputFields.elements[l].style.left=s.bounds.x1+s.borderThickness/2+"px",this.inputFields.elements[l].style.width=this.inputFields.style.width-this.inputFields.style.borderThickness-m+"px",0===m&&(this.inputFields.elements[l].style.paddingLeft=0,this.inputFields.elements[l].style.paddingRight=
1181
+ 0),this.inputFields._labels[l].render(!0),s.render(!0))}};R.prototype._updateInputFields=function(d,f){!this.inputFields.elements[0].focused&&isFinite(d)&&(this.inputFields.elements[0].value="dateTime"===this.inputFields.valueType?qa(d,"YYYY-MM-DD"):da(d,this.inputFields.valueFormatString));!this.inputFields.elements[1].focused&&isFinite(f)&&(this.inputFields.elements[1].value="dateTime"===this.inputFields.valueType?qa(f,"YYYY-MM-DD"):da(f,this.inputFields.valueFormatString));for(var l=0;l<this.inputFields.elements.length;l++)this.inputFields.elements[l].focused&&
1181
1182
  this.inputFields.elements[l].focus();this.inputFields.startValue=d;this.inputFields.endValue=f;this.render()};ha(O,W);O.prototype._updateOptions=function(){this.updateOption("style");this.updateOption("label");this.updateOption("range");this.updateOption("rangeType")};O.prototype._initialize=function(d){this._updateOptions();var l="1m 3m 6m YTD 1y All".split(" "),s=[1,3,6,null,1,null],m="month month month ytd year all".split(" ");this.range="undefined"!==typeof this.options.range?this.range:f(s[d])?
1182
1183
  null:s[d];this.rangeType="undefined"!==typeof this.options.rangeType?this.rangeType:m[d];this.label=this.textBlock.text=f(this.options.label)?l[d]:this.label};O.prototype.render=function(){this.textBlock.render(!0)};ha(U,W);U.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("startValue");this.updateOption("endValue");this.updateOption("valueType");this.updateOption("valueFormatString")};U.prototype._initialize=function(){this._updateOptions();f(this.style.options.fontSize)&&
1183
1184
  (this.style.fontSize=this.stockChart.getAutoFontSize(this.style.fontSize));if(!f(this.elements))for(var d=0;d<this.elements.length;d++)this.elements[d].style.position="absolute",this.elements[d].style.display="none";if(this.enabled){for(d=0;d<this.elements.length;d++)this.elements[d].style.position="absolute",this.elements[d].style.display=this.elements[d].focused?"inline":"none",this.elements[d].style.backgroundColor="transparent",this.elements[d].style.border="none",this.elements[d].style.outline=
@@ -1185,7 +1186,7 @@ null:s[d];this.rangeType="undefined"!==typeof this.options.rangeType?this.rangeT
1185
1186
  0)+"px",this.elements[d].style.paddingRight=(this.style.padding.right||0)+"px",this.elements[d].style.paddingBottom=(this.style.padding.bottom||0)+"px",this.elements[d].style.paddingLeft=(this.style.padding.left||0)+"px"):this.elements[d].style.padding=this.style.padding+"px",this.elements[d].style.mozAppearance=this.elements[d].style.webkitAppearance=this.elements[d].style.appearance="none",this.elements[d].style.webkitBorderRadius=0,this.elements[d].style.mozBorderRadius=0,this.elements[d].style.borderRadius=
1186
1187
  0,this.elements[d].style.boxSizing="content-box";this.parent=this.rangeSelector=this.stockChart.rangeSelector}};ha(V,W);V.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("backgroundColorOnHover");this.updateOption("backgroundColorOnSelect");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("labelFontColor");this.updateOption("labelFontColorOnHover");this.updateOption("labelFontSize");this.updateOption("labelFontStyle");
1187
1188
  this.updateOption("labelFontFamily");this.updateOption("labelFontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};ha(aa,W);aa.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("borderColorOnFocus");this.updateOption("fontColor");this.updateOption("fontSize");this.updateOption("fontStyle");
1188
- this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return s}();aa.version="v1.12.3 GA";window.CanvasJS&&(aa&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=aa),aa&&!window.CanvasJS.Chart&&(window.CanvasJS.Chart=Ia,window.CanvasJS.StockChart=aa))})();
1189
+ this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return s}();aa.version="v1.12.4 GA";window.CanvasJS&&(aa&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=aa),aa&&!window.CanvasJS.Chart&&(window.CanvasJS.Chart=Ia,window.CanvasJS.StockChart=aa))})();
1189
1190
 
1190
1191
  /*
1191
1192
  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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canvasjs/stockcharts",
3
- "version": "1.12.3",
3
+ "version": "1.12.4",
4
4
  "description": "CanvasJS JavaScript StockCharts - Official",
5
5
  "main": "canvasjs.stock.min.js",
6
6
  "keywords": [