@canvasjs/charts 3.16.0 → 3.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/canvasjs.min.js +74 -74
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.16.
|
|
2
|
+
CanvasJS Chart - v3.16.3 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2026 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -675,39 +675,39 @@ l(n.options.labelFontWeight)?this.labelFontWeight:n.labelFontWeight;n.labelFontS
|
|
|
675
675
|
l(n.labelBackgroundColor)&&(n.labelBackgroundColor="#EEEEEE")}else e="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,y=l(n.options.labelWrap)||n.labelWrap?"bottom"===this._position||"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*n.labelFontSize+("object"===typeof n.labelPadding?(n.labelPadding.top||0)+(n.labelPadding.bottom||0):2*n.labelPadding),l(n.labelBackgroundColor)&&(l(n.startValue)&&0!==n.startValue?n.labelBackgroundColor=
|
|
676
676
|
t?"transparent":null:n.labelBackgroundColor="#EEEEEE");l(n.options.labelAngle)?n.labelAngle=this.labelAngle:(n.labelAngle=(n.options.labelAngle%360+360)%360,90<n.labelAngle&&270>n.labelAngle?n.labelAngle-=180:270<=n.labelAngle&&360>=n.labelAngle&&(n.labelAngle-=360));a=new ma(this.ctx,{x:0,y:0,backgroundColor:n.labelBackgroundColor,borderColor:n.labelBorderColor,borderThickness:n.labelBorderThickness,cornerRadius:n.labelCornerRadius,maxWidth:n.options.labelMaxWidth?n.options.labelMaxWidth:e,maxHeight:y,
|
|
677
677
|
angle:n.labelAngle,text:n.labelFormatter?n.labelFormatter({chart:this.chart,axis:this,stripLine:n.options}):n.label,textAlign:n.labelTextAlign,fontSize:n.labelFontSize,fontFamily:n.labelFontFamily,fontWeight:n.labelFontWeight,fontColor:n.labelFontColor||n.color,fontStyle:n.labelFontStyle,textBaseline:"middle",padding:n.labelPadding});this._stripLineLabels.push({position:n.value,textBlock:a,effectiveHeight:null,stripLine:n})}};A.prototype.createLabelsAndCalculateWidth=function(){var a=0,e=0;this._labels=
|
|
678
|
-
[];this._stripLineLabels=[];var c=0,b=[],d=this.chart.isNavigator?0:5;this.labelEffectiveWidth=l(this.labelEffectiveWidth)?0:this.labelEffectiveWidth;if("left"===this._position||"right"===this._position){this.createLabels();for(e=0;e<this._labels.length;e++)if(!(this._labels[e].position<this.viewportMinimum||this._labels[e].position>this.viewportMaximum)){var f=this._labels[e].textBlock,f=f.measureText(),n=0,n=0===this.labelAngle?f.width:f.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+
|
|
679
|
-
Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<=n&&(this.labelEffectiveWidth=a=n);this._labels[e].effectiveWidth=n}for(e=0;e<this._stripLineLabels.length;e++)"outside"===this._stripLineLabels[e].stripLine.labelPlacement&&(this._stripLineLabels[e].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[e].stripLine.value<=this.viewportMaximum)&&(f=this._stripLineLabels[e].textBlock,n=this._stripLineLabels[e].stripLine,f=f.measureText(),n=0===n.labelAngle?f.width:
|
|
680
|
-
Math.abs(n.labelAngle))+f.height*Math.sin(Math.PI/180*Math.abs(n.labelAngle)),c=Math.max(c,this._stripLineLabels[e].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<b.length?Math.max.apply(null,b):0,a+=Math.max(n,0<b.length?Math.max.apply(null,b):n)),a<=n&&(a=n),this.stripLineLabelEffectiveWidth=this._stripLineLabels[e].effectiveWidth=n,b.push(n));"inside"===this.labelPlacement&&(a+=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===
|
|
681
|
-
Math.max(c,this.tickLength))+d};A.prototype.createLabelsAndCalculateHeight=function(){var a=0;this._labels=[];this._stripLineLabels=[];var e=0,c,b=0,d=this.chart.isNavigator?0:"bottom"===this._position&&"inside"===this.labelPlacement||"top"===this._position&&"outside"===this.labelPlacement?2:5;this.labelEffectiveHeight=l(this.labelEffectiveHeight)?0:this.labelEffectiveHeight;var f=[];if("bottom"===this._position||"top"===this._position){this.createLabels();for(b=
|
|
682
|
-
this.viewportMinimum||this._labels[b].position>this.viewportMaximum)){c=this._labels[b].textBlock;c=c.measureText();var n=0,n=0===this.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+c.height*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<=n&&(this.labelEffectiveHeight=a=n);this._labels[b].effectiveHeight=n}for(b=0;b<this._stripLineLabels.length;b++)"outside"===this._stripLineLabels[b].stripLine.labelPlacement&&
|
|
683
|
-
this._stripLineLabels[b].stripLine.value<=this.viewportMaximum)&&(c=this._stripLineLabels[b].textBlock,n=this._stripLineLabels[b].stripLine,c=c.measureText(),n=0===n.labelAngle?c.height:c.width*Math.sin(Math.PI/180*Math.abs(n.labelAngle))+c.height*Math.cos(Math.PI/180*Math.abs(n.labelAngle)),e=Math.max(e,this._stripLineLabels[b].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<f.length?Math.max.apply(null,
|
|
684
|
-
this._stripLineLabels[b].effectiveHeight=n,f.push(n));"inside"===this.labelPlacement&&(a+=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?e+this.tickLength:Math.max(e,this.tickLength))+d};A.setLayout=function(a,e,c,b,d,f){var n,h,r,k,p=a[0]?a[0].chart:e[0].chart,m=p.isNavigator?0:10,q=p._axes;if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g]&&
|
|
685
|
-
0<c.length)for(g=0;g<c.length;g++)c[g].calculateAxisParameters();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateAxisParameters();for(g=0;g<q.length;g++)if(q[g]&&q[g].scaleBreaks&&q[g].scaleBreaks._appliedBreaks.length)for(var t=q[g].scaleBreaks._appliedBreaks,B=0;B<t.length&&!(t[B].startValue>q[g].viewportMaximum);B++)t[B].endValue<q[g].viewportMinimum||(l(q[g].scaleBreaks.firstBreakIndex)&&
|
|
686
|
-
B));for(var y=B=0,u=0,w=0,v=0,x=0,z=0,A,C,E=h=0,F,J,M,t=F=J=M=!1,g=0;g<q.length;g++)q[g]&&q[g].title&&(q[g]._titleTextBlock=new ma(q[g].ctx,{text:q[g].title,fontSize:q[g].titleFontSize,fontFamily:q[g].titleFontFamily,fontWeight:q[g].titleFontWeight,fontColor:q[g].titleFontColor,fontStyle:q[g].titleFontStyle,borderColor:q[g].titleBorderColor,borderThickness:q[g].titleBorderThickness,backgroundColor:q[g].titleBackgroundColor,
|
|
687
|
-
padding:q[g].titlePadding}));for(g=0;g<q.length;g++)if(q[g].title){var K=1.5*q[g].titleFontSize+("object"===typeof q[g].titlePadding?(q[g].titlePadding.top||0)+(q[g].titlePadding.bottom||0):2*q[g].titlePadding);q[g]._titleTextBlock.maxWidth=q[g].titleMaxWidth||f.height;q[g]._titleTextBlock.maxHeight=q[g].titleWrap?0.8*f.width:Math.min(K,0.8*f.width);switch(q[g]._position){case "left":q[g]._titleTextBlock.angle
|
|
688
|
-
q[g].titleMaxWidth||f.width,q[g]._titleTextBlock.maxHeight=q[g].titleWrap?0.8*f.height:Math.min(K,0.8*f.height),q[g]._titleTextBlock.angle=0}}if("normal"===d){for(var w=[],v=[],x=[],z=[],Q=[],R=[],T=[],G=[];4>B;){var X=0,V=0,S=0,U=0,$=K=d=0,aa=0,W=0,Y=0,ca=n=0;if(c&&0<c.length)for(x=[],g=n=0;g<c.length;g++)x.push(Math.ceil(c[g]?c[g].createLabelsAndCalculateWidth():0)),n+=x[g],$+=c[g]&&!p.isNavigator?c[g].margin:
|
|
689
|
-
0<b.length)for(z=[],g=ca=0;g<b.length;g++)z.push(Math.ceil(b[g]?b[g].createLabelsAndCalculateWidth():0)),ca+=z[g],aa+=b[g]?b[g].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));G.push(z);n=Math.round(f.x1+n+$-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0))+(!c.length||"inside"!==c[c.length-1].labelPlacement||
|
|
690
|
-
0:5);r=Math.round(Math.min(f.x2-ca-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0),p.width-m));if(a&&0<a.length)for(w=[],g=W=0;g<a.length;g++)a[g]&&(a[g].lineCoordinates={}),a[g].lineCoordinates.width=Math.abs(r-n),a[g].title&&(a[g]._titleTextBlock.maxWidth=0<a[g].titleMaxWidth&&a[g].titleMaxWidth<a[g].lineCoordinates.width?a[g].titleMaxWidth:
|
|
691
|
-
0)),W+=w[g],d+=a[g]&&!p.isNavigator?a[g].margin:0;else w.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(w);if(e&&0<e.length)for(v=[],g=Y=0;g<e.length;g++)e[g]&&(e[g].lineCoordinates={}),e[g].lineCoordinates.width=Math.abs(r-n),e[g].title&&(e[g]._titleTextBlock.maxWidth=0<e[g].titleMaxWidth&&e[g].titleMaxWidth<e[g].lineCoordinates.width?e[g].titleMaxWidth:e[g].lineCoordinates.width),v.push(Math.ceil(e[g]?
|
|
692
|
-
e[g].margin:0;else v.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));R.push(v);if(a&&0<a.length){for(g=0;g<a.length;g++){if(a[g]){a[g].lineCoordinates.x1=n;r=Math.round(Math.min(f.x2-ca-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)-(!b.length||"inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-
|
|
693
|
-
1<a[g]._labels.length){var I=h=0;h=a[g]._labels[1];I="dateTime"===a[g].valueType?a[g]._labels[a[g]._labels.length-2]:a[g]._labels[a[g]._labels.length-1];y=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-h.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle));u=I.textBlock.width*Math.cos(Math.PI/180*Math.abs(I.textBlock.angle))+I.textBlock.height*Math.sin(Math.PI/
|
|
694
|
-
p.stockChart)||(h=0,0<a[g].labelAngle?(k=u-(I.textBlock.height-I.textBlock._lineHeight/2)*Math.sin(Math.PI/180*I.textBlock.angle),C+k>r&&(a[g].convertPixelToValue(C)>=a[g].viewportMinimum&&a[g].convertPixelToValue(C)<=a[g].viewportMaximum)&&(h+=C+k-r-ca)):0>a[g].labelAngle?A-y<n&&A-y<a[g].viewportMinimum&&(E=n-($+a[g].tickLength+x+A-y+a[g].labelFontSize/2)):0===a[g].labelAngle&&(C+u>r&&(a[g].convertPixelToValue(C)>=
|
|
695
|
-
r-ca),A-y<n&&A-y<a[g].viewportMinimum&&(E=n-$-a[g].tickLength-x-A+y/2)),a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0<a[g].labelAngle&&0<h?r-=h:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0>a[g].labelAngle&&0<E?n+=E:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0===a[g].labelAngle&&(0<E&&(n+=E),0<h&&(r-=h)));p.panEnabled?W=l(p.sessionVariables.axisX.height)||
|
|
696
|
-
p.sessionVariables.axisX.height=W;h=Math.round(f.y2-W-d+X)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5);k=Math.round(f.y2)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5);a[g].lineCoordinates.x2=r;a[g].lineCoordinates.width=r-n;a[g].lineCoordinates.y1=h;a[g].lineCoordinates.y2=
|
|
697
|
-
a[g].bounds.y2-a[g].bounds.y1;"inside"===a[g].labelPlacement&&(a[g].lineCoordinates.y1=a[0].bounds.y1+X+(a[g].labelEffectiveHeight||0)+(p.isNavigator?0:2),a[g].lineCoordinates.y2=a[g].lineCoordinates.y1+a[g].lineThickness/2);"inside"===a[g].tickPlacement&&(a[g].lineCoordinates.y1+=a[g].tickLength,a[g].lineCoordinates.y2=a[g].lineCoordinates.y1+a[g].lineThickness/2)}X+=w[g]+a[g].margin}$=0===a[0].dataSeries.length;if(!$)for(g=
|
|
698
|
-
|
|
699
|
-
e[g].valueType?e[g]._labels[e[g]._labels.length-2]:e[g]._labels[e[g]._labels.length-1],y=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-I.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),u=I.textBlock.width*Math.cos(Math.PI/180*Math.abs(I.textBlock.angle))+(I.textBlock.height-I.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(I.textBlock.angle))),p.panEnabled?
|
|
700
|
-
Y:p.sessionVariables.axisX2.height:p.sessionVariables.axisX2.height=Y,h=Math.round(f.y1)+("inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),k=e[g].lineCoordinates.y1=h+Y+K-V,e[g].lineCoordinates.y2=h,e[g].bounds={x1:n,y1:h+(Y+K-v[g]-V),x2:r,y2:k,width:r-n},e[g].bounds.height=e[g].bounds.y2-e[g].bounds.y1,"inside"===e[g].labelPlacement&&(e[g].lineCoordinates.y1=
|
|
701
|
-
e[g].tickPlacement&&(e[g].lineCoordinates.y1-=e[g].tickLength),V+=v[g]+e[g].margin;if(c&&0<c.length)for(g=0;g<c.length;g++)$=p.isNavigator?0:10,c[g]&&(n=r=Math.round((a[0]?a[0].lineCoordinates.x1:e[0].lineCoordinates.x1)+(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0)),$=Math.max(c[g]._labels&&0<c[g]._labels.length?c[g]._labels[c[g]._labels.length-
|
|
702
|
-
K-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+5:0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),0<e.length?0:$))+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),$=0<a.length?0:c[g]._labels&&0<c[g]._labels.length?c[g]._labels[0].textBlock.height/2:m,k=Math.round(f.y2-W+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+
|
|
703
|
-
a[0].tickLength:0):0)-d-$)-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),c[g].lineCoordinates={x1:n-S,y1:h,x2:r-S,y2:k,height:Math.abs(k-h)},c[g].bounds={x1:n-(x[g]+S),y1:h,x2:r-S,y2:k,height:k-h},c[g].bounds.width=c[g].bounds.x2-c[g].bounds.x1,"inside"===c[g].labelPlacement&&(c[g].lineCoordinates.x1=Math.round(c[0].bounds.x1+x[0]-S-(c[g].labelEffectiveWidth||
|
|
704
|
-
c[g].lineThickness/2),"inside"===c[g].tickPlacement&&(c[g].lineCoordinates.x1-=c[g].tickLength,c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.height?c[g].titleMaxWidth:c[g].lineCoordinates.height),S+=x[g]+c[g].margin);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&(n=r=Math.round((a[0]?a[0].lineCoordinates.x2:e[0].lineCoordinates.x2)-
|
|
705
|
-
b[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)),$=Math.max(b[g]._labels&&0<b[g]._labels.length?b[g]._labels[b[g]._labels.length-1].textBlock.height/2:0,m),h=Math.round(Math.max(f.y1+Y+K-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(p.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-
|
|
706
|
-
0:5),0<e.length?0:$)),$=0<a.length?0:b[g]._labels&&0<b[g]._labels.length?b[g]._labels[0].textBlock.height/2:0,k=Math.round(f.y2-(W+d+$)+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(p.isNavigator?0:2):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),b[g].lineCoordinates={x1:n+U,y1:h,x2:n+
|
|
707
|
-
U,y1:h,x2:r+z[g]+U,y2:k,height:k-h},b[g].bounds.width=b[g].bounds.x2-b[g].bounds.x1,"inside"===b[g].labelPlacement&&(b[g].lineCoordinates.x1=Math.round(b[0].bounds.x1+U+(b[g].labelEffectiveWidth||0)+(p.isNavigator?0:5)),b[g].lineCoordinates.x2=b[g].lineCoordinates.x1+b[g].lineThickness/2),"inside"===b[g].tickPlacement&&(b[g].lineCoordinates.x1+=b[g].tickLength,b[g].lineCoordinates.x2=b[g].lineCoordinates.x1+b[g].lineThickness/2),b[g].title&&(b[g]._titleTextBlock.maxWidth=
|
|
708
|
-
b[g].lineCoordinates.height?b[g].titleMaxWidth:b[g].lineCoordinates.height),U+=z[g]+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].calculateValueToPixelConversionParameters(),a[g].calculateBreaksSizeInValues(),a[g]._labels&&1<a[g]._labels.length&&(A=(a[g].logarithmic?Math.log(a[g]._labels[1].position/a[g].viewportMinimum)/a[g].conversionParameters.lnLogarithmBase:a[g]._labels[1].position-a[g].viewportMinimum)*Math.abs(a[g].conversionParameters.pixelPerUnit)+
|
|
709
|
-
n=a[g]._labels[a[g]._labels.length-("dateTime"===a[g].valueType?2:1)].position,n=a[g].getApparentDifference(a[g].viewportMinimum,n),C=a[g].logarithmic?(1<n?Math.log(n)/a[g].conversionParameters.lnLogarithmBase*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1:(0<n?n*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1));if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].calculateValueToPixelConversionParameters(),e[g].calculateBreaksSizeInValues(),
|
|
710
|
-
1<e[g]._labels.length&&(A=(e[g].logarithmic?Math.log(e[g]._labels[1].position/e[g].viewportMinimum)/e[g].conversionParameters.lnLogarithmBase:e[g]._labels[1].position-e[g].viewportMinimum)*Math.abs(e[g].conversionParameters.pixelPerUnit)+e[g].lineCoordinates.x1,n=e[g]._labels[e[g]._labels.length-("dateTime"===e[g].valueType?2:1)].position,n=e[g].getApparentDifference(e[g].viewportMinimum,n),C=e[g].logarithmic?(1<n?Math.log(n)/e[g].conversionParameters.lnLogarithmBase*Math.abs(e[g].conversionParameters.pixelPerUnit):
|
|
678
|
+
[];this._stripLineLabels=[];var c=0,b=[],d=this.chart.isNavigator?0:5;this.labelEffectiveWidth=l(this.labelEffectiveWidth)?0:this.labelEffectiveWidth;if("left"===this._position||"right"===this._position){this.createLabels();for(e=0;e<this._labels.length;e++)if(!(this._labels[e].position<this.viewportMinimum||this._labels[e].position>this.viewportMaximum)){var f=this._labels[e].textBlock,f=f.measureText(),n=0,n=0===this.labelAngle?Math.ceil(f.width):Math.ceil(f.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+
|
|
679
|
+
f.height*Math.sin(Math.PI/180*Math.abs(this.labelAngle)));a<=n&&(this.labelEffectiveWidth=a=n);this._labels[e].effectiveWidth=n}for(e=0;e<this._stripLineLabels.length;e++)"outside"===this._stripLineLabels[e].stripLine.labelPlacement&&(this._stripLineLabels[e].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[e].stripLine.value<=this.viewportMaximum)&&(f=this._stripLineLabels[e].textBlock,n=this._stripLineLabels[e].stripLine,f=f.measureText(),n=0===n.labelAngle?Math.ceil(f.width):Math.ceil(f.width*
|
|
680
|
+
Math.cos(Math.PI/180*Math.abs(n.labelAngle))+f.height*Math.sin(Math.PI/180*Math.abs(n.labelAngle))),c=Math.max(c,this._stripLineLabels[e].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<b.length?Math.max.apply(null,b):0,a+=Math.max(n,0<b.length?Math.max.apply(null,b):n)),a<=n&&(a=n),this.stripLineLabelEffectiveWidth=this._stripLineLabels[e].effectiveWidth=n,b.push(n));"inside"===this.labelPlacement&&(a+=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===
|
|
681
|
+
this.tickPlacement?c+this.tickLength:Math.max(c,this.tickLength))+d};A.prototype.createLabelsAndCalculateHeight=function(){var a=0;this._labels=[];this._stripLineLabels=[];var e=0,c,b=0,d=this.chart.isNavigator?0:"bottom"===this._position&&"inside"===this.labelPlacement||"top"===this._position&&"outside"===this.labelPlacement?2:5;this.labelEffectiveHeight=l(this.labelEffectiveHeight)?0:this.labelEffectiveHeight;var f=[];if("bottom"===this._position||"top"===this._position){this.createLabels();for(b=
|
|
682
|
+
0;b<this._labels.length;b++)if(!(this._labels[b].position<this.viewportMinimum||this._labels[b].position>this.viewportMaximum)){c=this._labels[b].textBlock;c=c.measureText();var n=0,n=0===this.labelAngle?Math.ceil(c.height):Math.ceil(c.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+c.height*Math.cos(Math.PI/180*Math.abs(this.labelAngle)));a<=n&&(this.labelEffectiveHeight=a=n);this._labels[b].effectiveHeight=n}for(b=0;b<this._stripLineLabels.length;b++)"outside"===this._stripLineLabels[b].stripLine.labelPlacement&&
|
|
683
|
+
(this._stripLineLabels[b].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[b].stripLine.value<=this.viewportMaximum)&&(c=this._stripLineLabels[b].textBlock,n=this._stripLineLabels[b].stripLine,c=c.measureText(),n=0===n.labelAngle?Math.ceil(c.height):Math.ceil(c.width*Math.sin(Math.PI/180*Math.abs(n.labelAngle))+c.height*Math.cos(Math.PI/180*Math.abs(n.labelAngle))),e=Math.max(e,this._stripLineLabels[b].stripLine.tickLength),"inside"===this.labelPlacement&&(a-=0<f.length?Math.max.apply(null,
|
|
684
|
+
f):0,a+=Math.max(n,0<f.length?Math.max.apply(null,f):n)),a<=n&&(a=n),this.stripLineLabelEffectiveHeight=this._stripLineLabels[b].effectiveHeight=n,f.push(n));"inside"===this.labelPlacement&&(a+=d)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?e+this.tickLength:Math.max(e,this.tickLength))+d};A.setLayout=function(a,e,c,b,d,f){var n,h,r,k,p=a[0]?a[0].chart:e[0].chart,m=p.isNavigator?0:10,q=p._axes;if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g]&&
|
|
685
|
+
a[g].calculateAxisParameters();if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].calculateAxisParameters();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateAxisParameters();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateAxisParameters();for(g=0;g<q.length;g++)if(q[g]&&q[g].scaleBreaks&&q[g].scaleBreaks._appliedBreaks.length)for(var t=q[g].scaleBreaks._appliedBreaks,B=0;B<t.length&&!(t[B].startValue>q[g].viewportMaximum);B++)t[B].endValue<q[g].viewportMinimum||(l(q[g].scaleBreaks.firstBreakIndex)&&
|
|
686
|
+
(q[g].scaleBreaks.firstBreakIndex=B),t[B].startValue>=q[g].viewPortMinimum&&(q[g].scaleBreaks.lastBreakIndex=B));for(var y=B=0,u=0,w=0,v=0,x=0,z=0,A,C,E=h=0,F,J,M,t=F=J=M=!1,g=0;g<q.length;g++)q[g]&&q[g].title&&(q[g]._titleTextBlock=new ma(q[g].ctx,{text:q[g].title,fontSize:q[g].titleFontSize,fontFamily:q[g].titleFontFamily,fontWeight:q[g].titleFontWeight,fontColor:q[g].titleFontColor,fontStyle:q[g].titleFontStyle,borderColor:q[g].titleBorderColor,borderThickness:q[g].titleBorderThickness,backgroundColor:q[g].titleBackgroundColor,
|
|
687
|
+
cornerRadius:q[g].titleCornerRadius,textBaseline:"middle",textAlign:q[g].titleTextAlign,padding:q[g].titlePadding}));for(g=0;g<q.length;g++)if(q[g].title){var K=1.5*q[g].titleFontSize+("object"===typeof q[g].titlePadding?(q[g].titlePadding.top||0)+(q[g].titlePadding.bottom||0):2*q[g].titlePadding);q[g]._titleTextBlock.maxWidth=q[g].titleMaxWidth||f.height;q[g]._titleTextBlock.maxHeight=q[g].titleWrap?0.8*f.width:Math.min(K,0.8*f.width);switch(q[g]._position){case "left":q[g]._titleTextBlock.angle=
|
|
688
|
+
-90;break;case "right":q[g]._titleTextBlock.angle=90;break;default:q[g]._titleTextBlock.maxWidth=q[g].titleMaxWidth||f.width,q[g]._titleTextBlock.maxHeight=q[g].titleWrap?0.8*f.height:Math.min(K,0.8*f.height),q[g]._titleTextBlock.angle=0}}if("normal"===d){for(var w=[],v=[],x=[],z=[],Q=[],R=[],T=[],G=[];4>B;){var X=0,V=0,S=0,U=0,$=K=d=0,aa=0,W=0,Y=0,ca=n=0;if(c&&0<c.length)for(x=[],g=n=0;g<c.length;g++)x.push(Math.ceil(c[g]?c[g].createLabelsAndCalculateWidth():0)),n+=x[g],$+=c[g]&&!p.isNavigator?c[g].margin:
|
|
689
|
+
0;else x.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));T.push(x);if(b&&0<b.length)for(z=[],g=ca=0;g<b.length;g++)z.push(Math.ceil(b[g]?b[g].createLabelsAndCalculateWidth():0)),ca+=z[g],aa+=b[g]?b[g].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));G.push(z);n=Math.round(f.x1+n+$-(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0))+(!c.length||"inside"!==c[c.length-1].labelPlacement||
|
|
690
|
+
c[c.length-1].title||c[c.length-1].stripLineLabelEffectiveWidth||p.isNavigator?0:5);r=Math.round(Math.min(f.x2-ca-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0),p.width-m));if(a&&0<a.length)for(w=[],g=W=0;g<a.length;g++)a[g]&&(a[g].lineCoordinates={}),a[g].lineCoordinates.width=Math.abs(r-n),a[g].title&&(a[g]._titleTextBlock.maxWidth=0<a[g].titleMaxWidth&&a[g].titleMaxWidth<a[g].lineCoordinates.width?a[g].titleMaxWidth:
|
|
691
|
+
a[g].lineCoordinates.width),w.push(Math.ceil(a[g]?a[g].createLabelsAndCalculateHeight():0)),W+=w[g],d+=a[g]&&!p.isNavigator?a[g].margin:0;else w.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(w);if(e&&0<e.length)for(v=[],g=Y=0;g<e.length;g++)e[g]&&(e[g].lineCoordinates={}),e[g].lineCoordinates.width=Math.abs(r-n),e[g].title&&(e[g]._titleTextBlock.maxWidth=0<e[g].titleMaxWidth&&e[g].titleMaxWidth<e[g].lineCoordinates.width?e[g].titleMaxWidth:e[g].lineCoordinates.width),v.push(Math.ceil(e[g]?
|
|
692
|
+
e[g].createLabelsAndCalculateHeight():0)),Y+=v[g],K+=e[g]&&!p.isNavigator?e[g].margin:0;else v.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));R.push(v);if(a&&0<a.length){for(g=0;g<a.length;g++){if(a[g]){a[g].lineCoordinates.x1=n;r=Math.round(Math.min(f.x2-ca-aa+(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)-(!b.length||"inside"!==b[b.length-1].labelPlacement||b[b.length-1].title||b[b.length-
|
|
693
|
+
1].stripLineLabelEffectiveWidth||p.isNavigator?0:5),p.width-m));if(a[g]._labels&&1<a[g]._labels.length){var I=h=0;h=a[g]._labels[1];I="dateTime"===a[g].valueType?a[g]._labels[a[g]._labels.length-2]:a[g]._labels[a[g]._labels.length-1];y=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-h.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle));u=I.textBlock.width*Math.cos(Math.PI/180*Math.abs(I.textBlock.angle))+I.textBlock.height*Math.sin(Math.PI/
|
|
694
|
+
180*Math.abs(I.textBlock.angle))}!a[g]||(!a[g].labelAutoFit||l(A)||l(C)||p.isNavigator||p.stockChart)||(h=0,0<a[g].labelAngle?(k=u-(I.textBlock.height-I.textBlock._lineHeight/2)*Math.sin(Math.PI/180*I.textBlock.angle),C+k>r&&(a[g].convertPixelToValue(C)>=a[g].viewportMinimum&&a[g].convertPixelToValue(C)<=a[g].viewportMaximum)&&(h+=C+k-r-ca)):0>a[g].labelAngle?A-y<n&&A-y<a[g].viewportMinimum&&(E=n-($+a[g].tickLength+x+A-y+a[g].labelFontSize/2)):0===a[g].labelAngle&&(C+u>r&&(a[g].convertPixelToValue(C)>=
|
|
695
|
+
a[g].viewportMinimum&&a[g].convertPixelToValue(C)<=a[g].viewportMaximum)&&(h=C+u/2-r-ca),A-y<n&&A-y<a[g].viewportMinimum&&(E=n-$-a[g].tickLength-x-A+y/2)),a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0<a[g].labelAngle&&0<h?r-=h:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0>a[g].labelAngle&&0<E?n+=E:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0===a[g].labelAngle&&(0<E&&(n+=E),0<h&&(r-=h)));p.panEnabled?W=l(p.sessionVariables.axisX.height)||
|
|
696
|
+
p.stockChart?p.sessionVariables.axisX.height=W:p.sessionVariables.axisX.height:p.sessionVariables.axisX.height=W;h=Math.round(f.y2-W-d+X)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5);k=Math.round(f.y2)-("inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5);a[g].lineCoordinates.x2=r;a[g].lineCoordinates.width=r-n;a[g].lineCoordinates.y1=h;a[g].lineCoordinates.y2=
|
|
697
|
+
h;a[g].bounds={x1:n,y1:h,x2:r,y2:k-(W+d-w[g]-X),width:r-n};a[g].bounds.height=a[g].bounds.y2-a[g].bounds.y1;"inside"===a[g].labelPlacement&&(a[g].lineCoordinates.y1=a[0].bounds.y1+X+(a[g].labelEffectiveHeight||0)+(p.isNavigator?0:2),a[g].lineCoordinates.y2=a[g].lineCoordinates.y1+a[g].lineThickness/2);"inside"===a[g].tickPlacement&&(a[g].lineCoordinates.y1+=a[g].tickLength,a[g].lineCoordinates.y2=a[g].lineCoordinates.y1+a[g].lineThickness/2)}X+=w[g]+a[g].margin}$=0===a[0].dataSeries.length;if(!$)for(g=
|
|
698
|
+
0;g<a[0].dataSeries.length;g++){if(a[0].dataSeries[g].dataPoints){$=!1;break}$=!0}if($)for($=!1,g=1;g<a.length;g++)0!==a[g].dataSeries.length&&($?a[g].lineCoordinates.x2>a[0].lineCoordinates.x2&&(a[0].lineCoordinates.x2=a[g].lineCoordinates.x2):(a[0].lineCoordinates.x2=a[g].lineCoordinates.x2,$=!0),a[0].lineCoordinates.width=a[0].lineCoordinates.x2-a[0].lineCoordinates.x1)}if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].lineCoordinates.x1=n,e[g].lineCoordinates.x2=r,e[g].lineCoordinates.width=Math.abs(r-
|
|
699
|
+
n),e[g]._labels&&1<e[g]._labels.length&&(h=e[g]._labels[1],I="dateTime"===e[g].valueType?e[g]._labels[e[g]._labels.length-2]:e[g]._labels[e[g]._labels.length-1],y=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-I.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),u=I.textBlock.width*Math.cos(Math.PI/180*Math.abs(I.textBlock.angle))+(I.textBlock.height-I.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(I.textBlock.angle))),p.panEnabled?
|
|
700
|
+
Y=l(p.sessionVariables.axisX2.height)||p.stockChart?p.sessionVariables.axisX2.height=Y:p.sessionVariables.axisX2.height:p.sessionVariables.axisX2.height=Y,h=Math.round(f.y1)+("inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),k=e[g].lineCoordinates.y1=h+Y+K-V,e[g].lineCoordinates.y2=h,e[g].bounds={x1:n,y1:h+(Y+K-v[g]-V),x2:r,y2:k,width:r-n},e[g].bounds.height=e[g].bounds.y2-e[g].bounds.y1,"inside"===e[g].labelPlacement&&(e[g].lineCoordinates.y1=
|
|
701
|
+
e[0].bounds.y2-V-(e[g].labelEffectiveHeight||0)-5),"inside"===e[g].tickPlacement&&(e[g].lineCoordinates.y1-=e[g].tickLength),V+=v[g]+e[g].margin;if(c&&0<c.length)for(g=0;g<c.length;g++)$=p.isNavigator?0:10,c[g]&&(n=r=Math.round((a[0]?a[0].lineCoordinates.x1:e[0].lineCoordinates.x1)+(c[0]?("inside"===c[0].labelPlacement?c[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===c[0].tickPlacement?c[0].tickLength:0):0)),$=Math.max(c[g]._labels&&0<c[g]._labels.length?c[g]._labels[c[g]._labels.length-
|
|
702
|
+
1].textBlock._lineHeight/2:m,m),h=Math.round(Math.max(f.y1+Y+K-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+5:0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0),0<e.length?0:$))+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),$=0<a.length?0:c[g]._labels&&0<c[g]._labels.length?c[g]._labels[0].textBlock.height/2:m,k=Math.round(f.y2-W+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+
|
|
703
|
+
(p.isNavigator?0:2):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0)-d-$)-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),c[g].lineCoordinates={x1:n-S,y1:h,x2:r-S,y2:k,height:Math.abs(k-h)},c[g].bounds={x1:n-(x[g]+S),y1:h,x2:r-S,y2:k,height:k-h},c[g].bounds.width=c[g].bounds.x2-c[g].bounds.x1,"inside"===c[g].labelPlacement&&(c[g].lineCoordinates.x1=Math.round(c[0].bounds.x1+x[0]-S-(c[g].labelEffectiveWidth||
|
|
704
|
+
0)-5),c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),"inside"===c[g].tickPlacement&&(c[g].lineCoordinates.x1-=c[g].tickLength,c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.height?c[g].titleMaxWidth:c[g].lineCoordinates.height),S+=x[g]+c[g].margin);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&(n=r=Math.round((a[0]?a[0].lineCoordinates.x2:e[0].lineCoordinates.x2)-
|
|
705
|
+
(b[0]?("inside"===b[0].labelPlacement?b[0].labelEffectiveWidth+(p.isNavigator?0:5):0)+("inside"===b[0].tickPlacement?b[0].tickLength:0):0)),$=Math.max(b[g]._labels&&0<b[g]._labels.length?b[g]._labels[b[g]._labels.length-1].textBlock.height/2:0,m),h=Math.round(Math.max(f.y1+Y+K-(e[0]?("inside"===e[0].labelPlacement?e[0].labelEffectiveHeight+(p.isNavigator?0:5):0)+("inside"===e[0].tickPlacement?e[0].tickLength:0):0)+(!e.length||"inside"!==e[e.length-1].labelPlacement||e[e.length-1].title||e[e.length-
|
|
706
|
+
1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),0<e.length?0:$)),$=0<a.length?0:b[g]._labels&&0<b[g]._labels.length?b[g]._labels[0].textBlock.height/2:0,k=Math.round(f.y2-(W+d+$)+(a[0]?("inside"===a[0].labelPlacement?a[0].labelEffectiveHeight+(p.isNavigator?0:2):0)+("inside"===a[0].tickPlacement?a[0].tickLength:0):0))-(!a.length||"inside"!==a[a.length-1].labelPlacement||a[a.length-1].title||a[a.length-1].stripLineLabelEffectiveHeight||p.isNavigator?0:5),b[g].lineCoordinates={x1:n+U,y1:h,x2:n+
|
|
707
|
+
U,y2:k,height:Math.abs(k-h)},b[g].bounds={x1:n+U,y1:h,x2:r+z[g]+U,y2:k,height:k-h},b[g].bounds.width=b[g].bounds.x2-b[g].bounds.x1,"inside"===b[g].labelPlacement&&(b[g].lineCoordinates.x1=Math.round(b[0].bounds.x1+U+(b[g].labelEffectiveWidth||0)+(p.isNavigator?0:5)),b[g].lineCoordinates.x2=b[g].lineCoordinates.x1+b[g].lineThickness/2),"inside"===b[g].tickPlacement&&(b[g].lineCoordinates.x1+=b[g].tickLength,b[g].lineCoordinates.x2=b[g].lineCoordinates.x1+b[g].lineThickness/2),b[g].title&&(b[g]._titleTextBlock.maxWidth=
|
|
708
|
+
0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.height?b[g].titleMaxWidth:b[g].lineCoordinates.height),U+=z[g]+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].calculateValueToPixelConversionParameters(),a[g].calculateBreaksSizeInValues(),a[g]._labels&&1<a[g]._labels.length&&(A=(a[g].logarithmic?Math.log(a[g]._labels[1].position/a[g].viewportMinimum)/a[g].conversionParameters.lnLogarithmBase:a[g]._labels[1].position-a[g].viewportMinimum)*Math.abs(a[g].conversionParameters.pixelPerUnit)+
|
|
709
|
+
a[g].lineCoordinates.x1,n=a[g]._labels[a[g]._labels.length-("dateTime"===a[g].valueType?2:1)].position,n=a[g].getApparentDifference(a[g].viewportMinimum,n),C=a[g].logarithmic?(1<n?Math.log(n)/a[g].conversionParameters.lnLogarithmBase*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1:(0<n?n*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1));if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].calculateValueToPixelConversionParameters(),e[g].calculateBreaksSizeInValues(),
|
|
710
|
+
e[g]._labels&&1<e[g]._labels.length&&(A=(e[g].logarithmic?Math.log(e[g]._labels[1].position/e[g].viewportMinimum)/e[g].conversionParameters.lnLogarithmBase:e[g]._labels[1].position-e[g].viewportMinimum)*Math.abs(e[g].conversionParameters.pixelPerUnit)+e[g].lineCoordinates.x1,n=e[g]._labels[e[g]._labels.length-("dateTime"===e[g].valueType?2:1)].position,n=e[g].getApparentDifference(e[g].viewportMinimum,n),C=e[g].logarithmic?(1<n?Math.log(n)/e[g].conversionParameters.lnLogarithmBase*Math.abs(e[g].conversionParameters.pixelPerUnit):
|
|
711
711
|
0)+e[g].lineCoordinates.x1:(0<n?n*Math.abs(e[g].conversionParameters.pixelPerUnit):0)+e[g].lineCoordinates.x1);for(g=0;g<q.length;g++)"axisY"===q[g].type&&(q[g].calculateValueToPixelConversionParameters(),q[g].calculateBreaksSizeInValues());if(0<B){if(a&&0<a.length)for(g=0;g<a.length;g++)t=Q[B-1][g]===Q[B][g]?!0:!1;else t=!0;if(e&&0<e.length)for(g=0;g<e.length;g++)F=R[B-1][g]===R[B][g]?!0:!1;else F=!0;if(c&&0<c.length)for(g=0;g<c.length;g++)J=T[B-1][g]===T[B][g]?!0:!1;else J=!0;if(b&&0<b.length)for(g=
|
|
712
712
|
0;g<b.length;g++)M=G[B-1][g]===G[B][g]?!0:!1;else M=!0}if(t&&F&&J&&M)break;B++}if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].calculateStripLinesThicknessInValues(),a[g].calculateBreaksInPixels();if(e&&0<e.length)for(g=0;g<e.length;g++)e[g].calculateStripLinesThicknessInValues(),e[g].calculateBreaksInPixels();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateStripLinesThicknessInValues(),c[g].calculateBreaksInPixels();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateStripLinesThicknessInValues(),
|
|
713
713
|
b[g].calculateBreaksInPixels()}else{m=[];A=[];E=[];y=[];u=[];C=[];Q=[];for(R=[];4>B;){W=U=S=aa=$=K=d=G=T=V=Y=0;if(a&&0<a.length)for(E=[],g=U=0;g<a.length;g++)E.push(Math.ceil(a[g]?a[g].createLabelsAndCalculateWidth():0)),U+=E[g],d+=a[g]&&!p.isNavigator?a[g].margin:0;else E.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));Q.push(E);if(e&&0<e.length)for(y=[],g=W=0;g<e.length;g++)y.push(Math.ceil(e[g]?e[g].createLabelsAndCalculateWidth():0)),W+=y[g],K+=e[g]?e[g].margin:0;else y.push(Math.ceil(e[0]?
|
|
@@ -950,45 +950,45 @@ this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSe
|
|
|
950
950
|
this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:t?"italic":"normal"}catch(p){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type||"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type||"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-
|
|
951
951
|
this.container.clientWidth<<0,a-=10);0>a&&(a=Math.max(0,a+this.container.clientWidth+20));a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));e=1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?
|
|
952
952
|
"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):e:f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);e=-e+10;0<e+this.container.clientHeight+5&&(e-=e+this.container.clientHeight+5-0);this.fixMozTransitionDelay(a,e);!this.animationEnabled||h?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);
|
|
953
|
-
this.positionLeft=a;this.positionBottom=e;this.container.style.left=a+"px";this.container.style.bottom=e+"px"}else this.
|
|
954
|
-
this
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
"
|
|
979
|
-
|
|
980
|
-
c.
|
|
981
|
-
b.
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
this.
|
|
987
|
-
|
|
988
|
-
f[0].
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
953
|
+
this.positionLeft=a;this.positionBottom=e;this.container.style.left=a+"px";this.container.style.bottom=e+"px"}else this.container.style.display="none";e=[];for(b=0;b<f.length;b++)e.push({xValue:f[b].dataPoint.x,dataPoint:f[b].dataPoint,dataSeries:f[b].dataSeries,dataPointIndex:f[b].index,dataSeriesIndex:f[b].dataSeries._index});this._updatedEventParameters={chart:this.chart,toolTip:this.options,content:c,entries:e}}}else this.hide(),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},
|
|
954
|
+
this);this._dataSeriesIndex=this._xValue=null}};oa.prototype.highlightObjects=function(a){var e=this.chart.overlaidCanvasCtx;l(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas?(this.chart.resetOverlayedCanvas(),e.clearRect(0,0,this.chart.width,this.chart.height),this.chart.clearedOverlayedCanvas="toolTip",this.chart.sessionVariables._dataHighlighted=!1):this.chart.clearedOverlayedCanvas=null;e.save();var c=this.chart.plotArea,b=0;e.beginPath();e.rect(c.x1,c.y1,c.x2-
|
|
955
|
+
c.x1,c.y2-c.y1);e.clip();for(c=0;c<a.length;c++){var d=a[c];if((d=this.chart._eventManager.objectMap[d.dataSeries.dataPointIds[d.index]])&&d.objectType&&"dataPoint"===d.objectType){var b=this.chart.data[d.dataSeriesIndex],f=b.dataPoints[d.dataPointIndex],h=d.dataPointIndex;!1===f.highlightEnabled||!0!==b.highlightEnabled&&!0!==f.highlightEnabled||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===
|
|
956
|
+
b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type?(f=b.getMarkerProperties(h,d.x1,d.y1,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||Math.ceil(0.1*f.size),Y.drawMarkers([f]),"undefined"!==typeof d.y2&&(f=b.getMarkerProperties(h,d.x1,d.y2,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||
|
|
957
|
+
Math.ceil(0.1*f.size),Y.drawMarkers([f])),this.chart.sessionVariables._dataHighlighted=!0):"bubble"===b.type?(f=b.getMarkerProperties(h,d.x1,d.y1,this.chart.overlaidCanvasCtx),f.size=d.size,f.color="white",f.borderColor="white",e.globalAlpha=0.3,Y.drawMarkers([f]),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===
|
|
958
|
+
b.type||"waterfall"===b.type?(aa(e,d.x1,d.y1,d.x2,d.y2,"white",0,null,!1,!1,!1,!1,0.3),this.chart.sessionVariables._dataHighlighted=!0):"pie"===b.type||"doughnut"===b.type?(sa(e,d.center,d.radius,"white",b.type,d.startAngle,d.endAngle,0.3,d.percentInnerRadius),this.chart.sessionVariables._dataHighlighted=!0):"funnel"===b.type||"pyramid"===b.type?(ta(e,d.funnelSection,0.3,"white"),this.chart.sessionVariables._dataHighlighted=!0):"candlestick"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=
|
|
959
|
+
2*d.borderThickness,b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,Math.min(d.y2,d.y3)),e.lineTo(d.x3-b,Math.min(d.y1,d.y4)),e.stroke(),e.beginPath(),e.moveTo(d.x3-b,Math.max(d.y1,d.y4)),e.lineTo(d.x3-b,Math.max(d.y2,d.y3)),e.stroke(),aa(e,d.x1,Math.min(d.y1,d.y4),d.x2,Math.max(d.y1,d.y4),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"ohlc"===b.type?(e.globalAlpha=1,e.strokeStyle=d.color,e.lineWidth=2*d.borderThickness,
|
|
960
|
+
b=0===e.lineWidth%2?0:0.5,e.beginPath(),e.moveTo(d.x3-b,d.y2),e.lineTo(d.x3-b,d.y3),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y1),e.lineTo(d.x1,d.y1),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4),e.lineTo(d.x2,d.y4),e.stroke(),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"boxAndWhisker"===b.type?(e.save(),e.globalAlpha=1,e.strokeStyle=d.stemColor,e.lineWidth=2*d.stemThickness,0<d.stemThickness&&(e.beginPath(),e.moveTo(d.x3,d.y2+d.borderThickness/2),e.lineTo(d.x3,d.y1+d.whiskerThickness/
|
|
961
|
+
2),e.stroke(),e.beginPath(),e.moveTo(d.x3,d.y4-d.whiskerThickness/2),e.lineTo(d.x3,d.y3-d.borderThickness/2),e.stroke()),e.beginPath(),aa(e,d.x1,Math.max(d.y2,d.y3),d.x2,Math.min(d.y2,d.y3),"transparent",2*d.borderThickness,d.color,!1,!1,!1,!1),e.globalAlpha=1,e.strokeStyle=d.whiskerColor,e.lineWidth=2*d.whiskerThickness,0<d.whiskerThickness&&(e.beginPath(),e.moveTo(Math.floor(d.x3-d.whiskerLength/2),d.y4),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y4),e.stroke(),e.beginPath(),e.moveTo(Math.floor(d.x3-
|
|
962
|
+
d.whiskerLength/2),d.y1),e.lineTo(Math.ceil(d.x3+d.whiskerLength/2),d.y1),e.stroke()),e.globalAlpha=1,e.strokeStyle=d.lineColor,e.lineWidth=2*d.lineThickness,0<d.lineThickness&&(e.beginPath(),e.moveTo(d.x1,d.y5),e.lineTo(d.x2,d.y5),e.stroke()),e.restore(),e.globalAlpha=1,this.chart.sessionVariables._dataHighlighted=!0):"error"===b.type&&(C(e,d.x1,d.y1,d.x2,d.y2,"white",d.whiskerProperties,d.stemProperties,d.isXYSwapped,0.3),this.chart.sessionVariables._dataHighlighted=!0))}}e.restore();e.globalAlpha=
|
|
963
|
+
1;e.beginPath()};oa.prototype.getToolTipInnerHTML=function(a){var e=a.entries,c=null,b=null,d=null,f=0;a="";this.isToolTipDefinedInData=!0;for(var h=0;h<e.length;h++)if(e[h].dataSeries.toolTipContent||e[h].dataPoint.toolTipContent){this.isToolTipDefinedInData=!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))e={chart:this.chart,toolTip:this.options,entries:e},c=this.contentFormatter?this.contentFormatter(e):this.content(e);else if(this.shared&&
|
|
964
|
+
"none"!==this.chart.plotInfo.axisPlacement){for(var l=null,r="",h=0;h<e.length;h++){b=e[h].dataSeries;d=e[h].dataPoint;f=e[h].index;a="";if(0===h&&this.isToolTipDefinedInData&&!this.content){this.chart.axisX&&0<this.chart.axisX.length?r+="undefined"!==typeof this.chart.axisX[0].labels[d.x]?this.chart.axisX[0].labels[d.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(r+="undefined"!==typeof this.chart.axisX2[0].labels[d.x]?this.chart.axisX2[0].labels[d.x]:"{x}");r+="</br>";if(!b.visible)continue;
|
|
965
|
+
r=this.chart.replaceKeywordsWithValue(r,d,b,f)}null===d.toolTipContent||"undefined"===typeof d.toolTipContent&&null===b.options.toolTipContent||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"column"===b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"waterfall"===b.type?(this.chart.axisX&&
|
|
966
|
+
1<this.chart.axisX.length&&(a+=l!=b.axisXIndex?b.axisX.title?b.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y}",l=b.axisXIndex):"bubble"===b.type?(this.chart.axisX&&1<this.chart.axisX.length&&(a+=l!=b.axisXIndex?b.axisX.title?b.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),
|
|
967
|
+
a+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y}, {z}"):"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type?(this.chart.axisX&&1<this.chart.axisX.length&&(a+=l!=b.axisXIndex?b.axisX.title?b.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=d.toolTipContent?
|
|
968
|
+
d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span> {y[0]}, {y[1]}"):"candlestick"===b.type||"ohlc"===b.type?(this.chart.axisX&&1<this.chart.axisX.length&&(a+=l!=b.axisXIndex?b.axisX.title?b.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?
|
|
969
|
+
this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}"):"boxAndWhisker"===b.type&&(this.chart.axisX&&1<this.chart.axisX.length&&(a+=l!=b.axisXIndex?b.axisX.title?b.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),a+=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:
|
|
970
|
+
"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>{name}:</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}"),null===c&&(c=""),b.visible&&(!0===this.reversed?(c=this.chart.replaceKeywordsWithValue(a,d,b,f)+c,h<e.length-
|
|
971
|
+
1&&(c="</br>"+c)):(c+=this.chart.replaceKeywordsWithValue(a,d,b,f),h<e.length-1&&(c+="</br>"))))}null!==c&&(c=r+c)}else{b=e[0].dataSeries;d=e[0].dataPoint;f=e[0].index;if(null===d.toolTipContent||"undefined"===typeof d.toolTipContent&&null===b.options.toolTipContent)return null;"line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"column"===b.type||"bar"===b.type||"scatter"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||
|
|
972
|
+
"stackedBar"===b.type||"stackedBar100"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"waterfall"===b.type?a=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(d.label?"{label}":"{x}")+":</span> {y}":"bubble"===b.type?a=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?
|
|
973
|
+
this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(d.label?"{label}":"{x}")+":</span> {y}, {z}":"pie"===b.type||"doughnut"===b.type||"funnel"===b.type||"pyramid"===b.type?a=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(d.name?"{name}:</span> ":d.label?"{label}:</span> ":
|
|
974
|
+
"</span>")+"{y}":"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type?a=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(d.label?"{label}":"{x}")+" :</span> {y[0]}, {y[1]}":"candlestick"===b.type||"ohlc"===b.type?a=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:
|
|
975
|
+
this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?"":"'{color}'")+"\"'>"+(d.label?"{label}":"{x}")+"</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}":"boxAndWhisker"===b.type&&(a=d.toolTipContent?d.toolTipContent:b.toolTipContent?b.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span data-color='\""+(this.options.fontColor?
|
|
976
|
+
"":"'{color}'")+"\"'>"+(d.label?"{label}":"{x}")+"</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}");null===c&&(c="");c+=this.chart.replaceKeywordsWithValue(a,d,b,f)}this.content=a;return c};oa.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=
|
|
977
|
+
this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=a;this.container.style.MsTransition=a;this.container.style.transition=a;this.container.style.MozTransition=this.mozContainerTransition}};oa.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};oa.prototype.hide=function(a){if(this.container){var e=
|
|
978
|
+
"undefined"===typeof a||-1!==this.chart.clearedOverlayedCanvas.indexOf("axis");this.chart.sessionVariables._dataHighlighted=!1;this.container.style.display="none";this.currentSeriesIndex=-1;this._entries=this._dataSeriesIndex=this._xValue=null;this._prevY=this._prevX=NaN;this._updatedEventParameters=null;if("undefined"===typeof a||a)this.chart.resetOverlayedCanvas(),e&&this.chart.renderCrosshairs(null,!1)}};oa.prototype.show=function(a,e,c){this._updateToolTip(a,e,"undefined"===typeof c?!1:c)};oa.prototype.showAtIndex=
|
|
979
|
+
function(a,e){};oa.prototype.showAtX=function(a,e){if(!this.enabled)return!1;!l(this.chart.clearedOverlayedCanvas)&&this.chart.clearedOverlayedCanvas.indexOf("axis")&&(this.chart.clearedOverlayedCanvas=null);this._updateOptions();var c,b,d,f=[];d=!1;e=!l(e)&&0<=e&&e<this.chart.data.length?e:0;if(this.shared)for(var h=0;h<this.chart.data.length;h++)c=this.chart.data[h],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!l(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,this.chart.data[e].axisX.convertValueToPixel(a)===
|
|
980
|
+
c.axisX.convertValueToPixel(b.dataPoint.x)&&f.push(b));else this.chart.data&&0<this.chart.data.length&&(c=this.chart.data[e],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!l(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,f.push(b)));if(0<f.length){for(h=0;h<f.length;h++)if(b=f[h],d=0<=b.dataSeries.type.indexOf("stacked")?b.dataSeries.dataPointEOs[b.index].cumulativeY:b.dataPoint.y,(this.shared||0<=b.dataSeries.type.indexOf("100"))&&b.dataSeries.axisX&&b.dataPoint.x>=b.dataSeries.axisX.viewportMinimum&&
|
|
981
|
+
b.dataPoint.x<=b.dataSeries.axisX.viewportMaximum){d=!1;break}else if(b.dataSeries.axisX&&b.dataSeries.axisY&&(b.dataPoint.x<b.dataSeries.axisX.viewportMinimum||b.dataPoint.x>b.dataSeries.axisX.viewportMaximum||d<b.dataSeries.axisY.viewportMinimum||d>b.dataSeries.axisY.viewportMaximum))d=!0;else{d=!1;break}if(d)return this.hide(),!1;this.highlightObjects(f);"toolTip"===this.chart.clearedOverlayedCanvas&&this.chart.renderCrosshairs(null,!1);this._entries=f;h="";h=this.getToolTipInnerHTML({entries:f});
|
|
982
|
+
if(null!==h){this.contentDiv.innerHTML=h;if(this.isToolTipDefinedInData&&l(this.options.content)&&l(this.options.contentFormatter))for(d=this.contentDiv.getElementsByTagName("span"),h=0;h<d.length;h++)d[h]&&(d[h].style.color=d[h].getAttribute("data-color"));h=!1;"none"===this.container.style.display&&(h=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:t?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===f[0].dataSeries.type?
|
|
983
|
+
this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:0<f[0].dataPoint.y?f[0].dataSeries.risingColor:f[0].dataSeries.fallingColor:"error"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:
|
|
984
|
+
f[0].dataSeries._colorSet[c.index%f[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=
|
|
985
|
+
this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=
|
|
986
|
+
this.fontStyle?this.fontStyle:t?"italic":"normal"}catch(r){}if("pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type)c=f[0].dataSeries.dataPointEOs[f[0].index].center.x+f[0].dataSeries.radius*Math.cos(f[0].dataSeries.dataPointEOs[f[0].index].midAngle)+-("left"===f[0].dataSeries.dataPointEOs[f[0].index].hemisphere?0:this.container.clientWidth);else if("funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type)d=f[0].dataSeries.dataPointEOs[f[0].index].sectionsofFunnel,c=(d.x1+d.x2-
|
|
987
|
+
this.container.clientWidth)/2;else{if("bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type){var x=f[0].dataPoint.x;d=f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY?f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY:f[0].dataPoint.y;d="stackedBar100"===f[0].dataSeries.type?100*(d/f[0].dataSeries.plotUnit.dataPointYSums[x]):f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY?f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY:
|
|
988
|
+
f[0].dataPoint.y;c=f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?f[0].dataPoint.y[f[0].dataPoint.y.length-1]:d)-this.container.clientWidth<<0}else c=f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0;c-=10}0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));1!==
|
|
989
|
+
f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type?(b=f[0].dataSeries.dataPointEOs[f[0].index].center.y+f[0].dataSeries.radius*Math.sin(f[0].dataSeries.dataPointEOs[f[0].index].midAngle),b<f[0].dataSeries.dataPointEOs[f[0].index].center.y&&(b+=this.container.clientHeight)):
|
|
990
|
+
"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?(d=f[0].dataSeries.dataPointEOs[f[0].dataSeries.reversed?f[0].dataSeries.dataPointEOs.length-1-f[0].index:f[0].index].sectionsofFunnel,b="undefined"!==typeof d.x5?(d.y2+d.y4)/2:(d.y2+d.y3)/2+this.container.clientHeight/2):"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?b=f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):(x=f[0].dataPoint.x,
|
|
991
|
+
d=f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY?f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY:f[0].dataPoint.y,d=0<=b.dataSeries.type.indexOf("100")?100*(d/f[0].dataSeries.plotUnit.dataPointYSums[x]):f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY?f[0].dataSeries.dataPointEOs[f[0].index].cumulativeY:f[0].dataPoint.y,b=f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y.length?f[0].dataPoint.y[f[0].dataPoint.y.length-1]:d)):b=f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);
|
|
992
992
|
b=-b+10;0<b+this.container.clientHeight+5&&(b-=b+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,b);!this.animationEnabled||h?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=b+"px"}else return this.hide(!1),!1}else return this.hide(),!1;this._xValue=a;this._dataSeriesIndex=e;this._prevY=this._prevX=NaN;return!0};oa.prototype.fixMozTransitionDelay=function(a,e){if(20<
|
|
993
993
|
this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-e,2))?this.mozContainerTransition=this.getContainerTransition(0.1):this.mozContainerTransition=this.getContainerTransition(0)}};oa.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ja.prototype.reset=
|
|
994
994
|
function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];t&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ja.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ja.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var e=[],c=Ra(a),b=null;if((b=this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=
|
|
@@ -1002,7 +1002,7 @@ function(){f.animate.call(f)}):this.chart.isAnimating=!1};na.prototype.cancelAll
|
|
|
1002
1002
|
b=e.source.canvas,d=e.animationBase;c.drawImage(b,0,0,b.width,b.height,d-d*a,0,a*c.canvas.width/la,c.canvas.height/la)}},xClipAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/la,b.height/la);c.restore()}},fadeInAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/la,c.canvas.height/la);c.restore()}},easing:{linear:function(a,e,
|
|
1003
1003
|
c,b){return c*a/b+e},easeOutQuad:function(a,e,c,b){return-c*(a/=b)*(a-2)+e},easeOutQuart:function(a,e,c,b){return-c*((a=a/b-1)*a*a*a-1)+e},easeInQuad:function(a,e,c,b){return c*(a/=b)*a+e},easeInQuart:function(a,e,c,b){return c*(a/=b)*a*a*a+e}}},Y={drawMarker:function(a,e,c,b,d,f,h,l){if(c){var r=1;c.fillStyle=f?f:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=l?l:0;c.setLineDash&&c.setLineDash(J("solid",l));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),f&&c.fill(),l&&
|
|
1004
1004
|
(h?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"square"===b?(c.beginPath(),c.rect(a-d/2,e-d/2,d,d),f&&c.fill(),l&&(h?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"triangle"===b?(c.beginPath(),c.moveTo(a-d/2,e+d/2),c.lineTo(a+d/2,e+d/2),c.lineTo(a,e-d/2),c.closePath(),f&&c.fill(),l&&(h?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r)),c.beginPath()):
|
|
1005
|
-
"cross"===b&&(c.strokeStyle=f,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return r}();r.version="v3.16.
|
|
1005
|
+
"cross"===b&&(c.strokeStyle=f,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return r}();r.version="v3.16.3 GA";window.CanvasJS&&(r&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=r)})();
|
|
1006
1006
|
|
|
1007
1007
|
/*
|
|
1008
1008
|
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.
|