@canvasjs/charts 3.10.10 → 3.10.11
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 +89 -88
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.10.
|
|
2
|
+
CanvasJS Chart - v3.10.11 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -523,23 +523,23 @@ u.x)<B&&(x/=Math.abs(Math.sin(g.indexLabelAngle)),9<x&&(x*=0.3),x>d&&(d=x)));var
|
|
|
523
523
|
A=b(l,g);var q;if(q=0>A){q=l.indexLabelTextBlock.x;var x=l.indexLabelTextBlock.y-l.indexLabelTextBlock.height/2,s=l.indexLabelTextBlock.y+l.indexLabelTextBlock.height/2,t=g.indexLabelTextBlock.y-g.indexLabelTextBlock.height/2,r=g.indexLabelTextBlock.x+g.indexLabelTextBlock.width,u=g.indexLabelTextBlock.y+g.indexLabelTextBlock.height/2;q=l.indexLabelTextBlock.x+l.indexLabelTextBlock.width<g.indexLabelTextBlock.x-p||q>r+p||x>u+p||s<t-p?!1:!0}q?(0>a&&(a=k),n!==a&&(c=n,d+=-A),0===k%Math.max(m.length/
|
|
524
524
|
10,3)&&(h=!0)):h=!0;h&&(0<d&&0<=a&&0<=c)&&(O(d,a,c),c=a=-1,d=0)}}0<d&&O(d,a,c)})()}}function g(){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=t.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}t.legend&&(t.legend.dockInsidePlotArea||"center"===t.legend.horizontalAlign&&"center"===
|
|
525
525
|
t.legend.verticalAlign)&&(t.legend.setLayout(),t.legend.render())}var t=this;if(!(0>=a.dataSeriesIndexes.length)){var k=this.data[a.dataSeriesIndexes[0]],m=k.dataPoints,p=10,q=this.plotArea,f=k.dataPointEOs,r=2,w,y=1.3,s=20/180*Math.PI,v=6,u={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},z=0;a=!1;for(var A=0;A<m.length;A++)z+=Math.abs(m[A].y),!a&&("undefined"!==typeof m[A].indexLabel&&null!==m[A].indexLabel&&0<m[A].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof m[A].label&&null!==m[A].label&&
|
|
526
|
-
0<m[A].label.toString().length)&&(a=!0);if(0!==z){a=a||"undefined"!==typeof k.indexLabel&&null!==k.indexLabel&&0<k.indexLabel.toString().length;var B="inside"!==k.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;k.radius&&(B=Ua(k.radius,B));var G="undefined"!==typeof k.innerRadius&&null!==k.innerRadius?Ua(k.innerRadius,B):0.7*B
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
t.
|
|
530
|
-
a.lineTo(Math.round(d.x6),Math.round(d.y6))),a.closePath(),a.fillStyle=b?b:d.color,a.fill(),a.globalAplha=1,a.restore())};t.prototype.renderFunnel=function(a){function d(){for(var a=0,b=[],c=0;c<C.length;c++){if("undefined"===typeof C[c].y)return-1;C[c].y="number"===typeof C[c].y?C[c].y:0;a+=Math.abs(C[c].y)}if(0===a)return-1;for(c=b[0]=0;c<C.length;c++)b.push(Math.abs(C[c].y)*G/a);return b}function c(){var a=Y,b=$,c=O,d=aa,f,e;f=R;e=T-M;d=Math.abs((e-f)*(b-a+(d-c))/2);c=aa-O;f=
|
|
531
|
-
e=d+e;for(var d=[],h=0,k=0;k<C.length;k++){if("undefined"===typeof C[k].y)return-1;C[k].y="number"===typeof C[k].y?C[k].y:0;h+=Math.abs(C[k].y)}if(0===h)return-1;for(var g=d[0]=0,n=0,l,m,b=b-a,g=!1,k=0;k<C.length;k++)a=Math.abs(C[k].y)*e/h,g?l=0==Number(c.toFixed(3))?0:a/c:(m=da*da*b*b-4*Math.abs(da)*a,0>m?(m=c,g=(b+m)*(f-n)/2,a-=g,l=f-n,n+=f-n,l+=0==m?0:a/m,n+=a/m,g=!0):(l=(Math.abs(da)*b-Math.sqrt(m))/2,m=b-2*l/Math.abs(da),n+=l,n>f&&(n-=l,m=c,g=(b+m)*(f-n)/2,a-=g,l=
|
|
532
|
-
b=m)),d.push(l);return d}function b(){if(s&&C){for(var a,b,c,d,e,h,k,n,g,m,p,q,x,t,u,w,E,v=[],A=[],z={percent:null,total:null},D=null,B=0;B<C.length;B++)E=S[B],E="undefined"!==typeof E.x5?(E.y2+E.y4)/2:(E.y2+E.y3)/2,E=f(E).x2+1,v[B]=P-E-U;E=0.5*U;for(var B=0,F=C.length-1;B<C.length||0<=F;B++,F--){b=s.reversed?C[F]:C[B];a=b.color?b.color:s.reversed?s._colorSet[(C.length-1-B)%s._colorSet.length]:s._colorSet[B%s._colorSet.length];c=b.indexLabelPlacement||s.indexLabelPlacement||
|
|
533
|
-
s.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||s.indexLabelBackgroundColor||(r?"transparent":null);e=b.indexLabelBorderColor||s.indexLabelBorderColor||(r?"transparent":null);h=l(b.indexLabelBorderThickness)?s.indexLabelBorderThickness:b.indexLabelBorderThickness;k=b.indexLabelFontColor||s.indexLabelFontColor||"#979797";n=l(b.indexLabelFontSize)?s.indexLabelFontSize:b.indexLabelFontSize;g=b.indexLabelFontStyle||s.indexLabelFontStyle||"normal";m=b.indexLabelFontFamily||
|
|
534
|
-
"arial";p=b.indexLabelFontWeight||s.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||s.options.indexLabelLineColor||a;q="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;x=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";t="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;u=s.dataPointIds[B];y._eventManager.objectMap[u]=
|
|
535
|
-
objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:S[s.reversed?C.length-1-B:B]};"inside"===s.indexLabelPlacement&&(v[B]=B!==fa?s.reversed?S[B].x2-S[B].x1:S[B].x3-S[B].x4:S[B].x3-S[B].x6,20>v[B]&&(v[B]=B!==fa?s.reversed?S[B].x3-S[B].x4:S[B].x2-S[B].x1:S[B].x2-S[B].x1,v[B]/=2));u=b.indexLabelMaxWidth?b.indexLabelMaxWidth:s.options.indexLabelMaxWidth?s.indexLabelMaxWidth:v[B];if(u>v[B]||0>u)u=v[B];A[B]="inside"===s.indexLabelPlacement?t?Math.max(S[B].height,n):1.5*n:!1;z=
|
|
536
|
-
b);if(s.indexLabelFormatter||b.indexLabelFormatter)D={chart:y.options,dataSeries:s,dataPoint:b,total:z.total,percent:z.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(D):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,s,B):s.indexLabelFormatter?s.indexLabelFormatter(D):s.indexLabel?y.replaceKeywordsWithValue(s.indexLabel,b,s,B):b.label?b.label:"";0>=q&&(q=0);1E3>u&&1E3-u<E&&(u+=1E3-u);l(s.options.indexLabelMaxWidth)&&(s.indexLabelMaxWidth=l(s.indexLabelMaxWidth)?
|
|
537
|
-
N.roundRect||za(N);c=new ka(N,{fontSize:n,fontFamily:m,fontColor:k,fontStyle:g,fontWeight:p,horizontalAlign:c,textAlign:w,backgroundColor:d,borderColor:e,borderThickness:h,maxWidth:u,maxHeight:!1===A[B]?t?4.28571429*n:1.5*n:A[B],text:b,padding:ga,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;H.push({textBlock:c,id:s.reversed?F:B,isDirty:!1,lineColor:a,lineThickness:q,lineDashType:x,height:c.height<
|
|
538
|
-
width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,f,e=[];f=!1;c=0;for(var h,k=P-$-U/2,k=s.options.indexLabelMaxWidth?s.indexLabelMaxWidth>k?k:s.indexLabelMaxWidth:k,n=H.length-1;0<=n;n--){h=C[H[n].id];c=H[n];d=c.textBlock;b=(a=q(n)<S.length?H[q(n)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+ga>b.y&&(f=!0);c=h.indexLabelMaxWidth||k;if(c>k||0>c)c=k;e.push(c)}if(f)for(n=H.length-1;0<=n;n--)a=S[n],H[n].textBlock.maxWidth=e[e.length-(n+1)],H[n].textBlock.measureText(),
|
|
539
|
-
H[n].textBlock.height===2*H[n].textBlock.padding?0:H[n].textBlock.height,H[n].textBlock.width=H[n].textBlock.width===2*H[n].textBlock.padding?0:H[n].textBlock.width,H[n].textBlock.x=P-k,c=H[n].textBlock.height<H[n].textBlock.maxHeight?H[n].textBlock.height:H[n].textBlock.maxHeight,f=H[n].textBlock.width<H[n].textBlock.maxWidth?H[n].textBlock.width:H[n].textBlock.maxWidth,H[n].height=c,H[n].width=f,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,H[n].textBlock.y=c-H[n].height/
|
|
540
|
-
(H[n].textBlock.y+H[n].height>V+z&&(H[n].textBlock.y=V+z-H[n].height),H[n].textBlock.y<ra-z&&(H[n].textBlock.y=ra-z)):(H[n].textBlock.y<V-z&&(H[n].textBlock.y=V-z),H[n].textBlock.y+H[n].height>ra+z&&(H[n].textBlock.y=ra+z-H[n].height))}function h(){var a,b,c,d;if("inside"!==s.indexLabelPlacement)for(var e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=s.reversed?"undefined"!==typeof a.x5?c>Da?f(c).x2+1:
|
|
541
|
-
1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<Da?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,H[e].textBlock.x=b+U,H[e].textBlock.y=c-H[e].height/2,s.reversed?(H[e].textBlock.y+H[e].height>V+z&&(H[e].textBlock.y=V+z-H[e].height),H[e].textBlock.y<ra-z&&(H[e].textBlock.y=ra-z)):(H[e].textBlock.y<V-z&&(H[e].textBlock.y=V-z),H[e].textBlock.y+H[e].height>ra+z&&(H[e].textBlock.y=ra+z-H[e].height)));else for(e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],b=a.height,c=
|
|
542
|
-
H[e].width,b>=c?(b=e!=fa?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=fa?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,H[e].textBlock.x=b,H[e].textBlock.y=c):H[e].isDirty=!0)}function g(){function a(b,c){var d;if(0>b||b>=H.length)return 0;var e,f=H[b].textBlock;if(0>c){c*=-1;e=p(b);d=x(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=d);return d}e=q(b);d=x(b,e);if(d>=c)return f.y+=c,c;if(b==S.length-1)return 0<d&&(f.y+=d),d;d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,
|
|
526
|
+
0<m[A].label.toString().length)&&(a=!0);if(0!==z){a=a||"undefined"!==typeof k.indexLabel&&null!==k.indexLabel&&0<k.indexLabel.toString().length;var B="inside"!==k.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;k.radius&&(B=Ua(k.radius,B));var G="undefined"!==typeof k.innerRadius&&null!==k.innerRadius?Ua(k.innerRadius,B):0.7*B,J=Math.min(G/B,(B-1)/B);this.pieDoughnutClickHandler=function(a){t.isAnimating||!l(this.explodeOnClick)&&!this.explodeOnClick||(a=
|
|
527
|
+
a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&t._animator.animate(0,500,function(a){c(a,!0);g();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});t.dispatchEvent("dataAnimationEnd",{chart:t})}))};d();n();n();n();n();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=t.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=t.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(var b=f[0].startAngle+
|
|
528
|
+
2*Math.PI*a,c=0;c<m.length;c++){var d=0===c?f[c].startAngle:e,e=d+(f[c].endAngle-f[c].startAngle),h=!1;e>b&&(e=b,h=!0);var n=m[c].color?m[c].color:k._colorSet[c%k._colorSet.length];e>d&&X(t.plotArea.ctx,f[c].center,f[c].radius,n,k.type,d,e,k.fillOpacity,f[c].percentInnerRadius);if(h)break}g();t.dispatchEvent("dataAnimationIterationEnd",{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);g();
|
|
529
|
+
t.dispatchEvent("dataAnimationIterationEnd",{chart:t})});t.dispatchEvent("dataAnimationEnd",{chart:t})});k.radius=B;"doughnut"===k.type&&(k.innerRadius=G)}}};var pa=function(a,d,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(d.y4-d.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(d.x1),Math.round(d.y1)),a.lineTo(Math.round(d.x2),Math.round(d.y2)),a.lineTo(Math.round(d.x3),Math.round(d.y3)),a.lineTo(Math.round(d.x4),Math.round(d.y4)),"undefined"!==d.x5&&(a.lineTo(Math.round(d.x5),
|
|
530
|
+
Math.round(d.y5)),a.lineTo(Math.round(d.x6),Math.round(d.y6))),a.closePath(),a.fillStyle=b?b:d.color,a.fill(),a.globalAplha=1,a.restore())};t.prototype.renderFunnel=function(a){function d(){for(var a=0,b=[],c=0;c<C.length;c++){if("undefined"===typeof C[c].y)return-1;C[c].y="number"===typeof C[c].y?C[c].y:0;a+=Math.abs(C[c].y)}if(0===a)return-1;for(c=b[0]=0;c<C.length;c++)b.push(Math.abs(C[c].y)*G/a);return b}function c(){var a=Y,b=$,c=O,d=aa,f,e;f=R;e=T-M;d=Math.abs((e-f)*(b-a+(d-c))/2);c=aa-O;f=
|
|
531
|
+
e-f;e=c*(e-T);e=Math.abs(e);e=d+e;for(var d=[],h=0,k=0;k<C.length;k++){if("undefined"===typeof C[k].y)return-1;C[k].y="number"===typeof C[k].y?C[k].y:0;h+=Math.abs(C[k].y)}if(0===h)return-1;for(var g=d[0]=0,n=0,l,m,b=b-a,g=!1,k=0;k<C.length;k++)a=Math.abs(C[k].y)*e/h,g?l=0==Number(c.toFixed(3))?0:a/c:(m=da*da*b*b-4*Math.abs(da)*a,0>m?(m=c,g=(b+m)*(f-n)/2,a-=g,l=f-n,n+=f-n,l+=0==m?0:a/m,n+=a/m,g=!0):(l=(Math.abs(da)*b-Math.sqrt(m))/2,m=b-2*l/Math.abs(da),n+=l,n>f&&(n-=l,m=c,g=(b+m)*(f-n)/2,a-=g,l=
|
|
532
|
+
f-n,n+=f-n,l+=a/m,n+=a/m,g=!0),b=m)),d.push(l);return d}function b(){if(s&&C){for(var a,b,c,d,e,h,k,n,g,m,p,q,x,t,u,w,E,v=[],A=[],z={percent:null,total:null},D=null,B=0;B<C.length;B++)E=S[B],E="undefined"!==typeof E.x5?(E.y2+E.y4)/2:(E.y2+E.y3)/2,E=f(E).x2+1,v[B]=P-E-U;E=0.5*U;for(var B=0,F=C.length-1;B<C.length||0<=F;B++,F--){b=s.reversed?C[F]:C[B];a=b.color?b.color:s.reversed?s._colorSet[(C.length-1-B)%s._colorSet.length]:s._colorSet[B%s._colorSet.length];c=b.indexLabelPlacement||s.indexLabelPlacement||
|
|
533
|
+
"outside";w=b.indexLabelTextAlign||s.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||s.indexLabelBackgroundColor||(r?"transparent":null);e=b.indexLabelBorderColor||s.indexLabelBorderColor||(r?"transparent":null);h=l(b.indexLabelBorderThickness)?s.indexLabelBorderThickness:b.indexLabelBorderThickness;k=b.indexLabelFontColor||s.indexLabelFontColor||"#979797";n=l(b.indexLabelFontSize)?s.indexLabelFontSize:b.indexLabelFontSize;g=b.indexLabelFontStyle||s.indexLabelFontStyle||"normal";m=b.indexLabelFontFamily||
|
|
534
|
+
s.indexLabelFontFamily||"arial";p=b.indexLabelFontWeight||s.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||s.options.indexLabelLineColor||a;q="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof s.indexLabelLineThickness?s.indexLabelLineThickness:2;x=b.indexLabelLineDashType||s.indexLabelLineDashType||"solid";t="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof s.indexLabelWrap?s.indexLabelWrap:!0;u=s.dataPointIds[B];y._eventManager.objectMap[u]=
|
|
535
|
+
{id:u,objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:S[s.reversed?C.length-1-B:B]};"inside"===s.indexLabelPlacement&&(v[B]=B!==fa?s.reversed?S[B].x2-S[B].x1:S[B].x3-S[B].x4:S[B].x3-S[B].x6,20>v[B]&&(v[B]=B!==fa?s.reversed?S[B].x3-S[B].x4:S[B].x2-S[B].x1:S[B].x2-S[B].x1,v[B]/=2));u=b.indexLabelMaxWidth?b.indexLabelMaxWidth:s.options.indexLabelMaxWidth?s.indexLabelMaxWidth:v[B];if(u>v[B]||0>u)u=v[B];A[B]="inside"===s.indexLabelPlacement?t?Math.max(S[B].height,n):1.5*n:!1;z=
|
|
536
|
+
y.getPercentAndTotal(s,b);if(s.indexLabelFormatter||b.indexLabelFormatter)D={chart:y.options,dataSeries:s,dataPoint:b,total:z.total,percent:z.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(D):b.indexLabel?y.replaceKeywordsWithValue(b.indexLabel,b,s,B):s.indexLabelFormatter?s.indexLabelFormatter(D):s.indexLabel?y.replaceKeywordsWithValue(s.indexLabel,b,s,B):b.label?b.label:"";0>=q&&(q=0);1E3>u&&1E3-u<E&&(u+=1E3-u);l(s.options.indexLabelMaxWidth)&&(s.indexLabelMaxWidth=l(s.indexLabelMaxWidth)?
|
|
537
|
+
u:Math.max(u,s.indexLabelMaxWidth));N.roundRect||za(N);c=new ka(N,{fontSize:n,fontFamily:m,fontColor:k,fontStyle:g,fontWeight:p,horizontalAlign:c,textAlign:w,backgroundColor:d,borderColor:e,borderThickness:h,maxWidth:u,maxHeight:!1===A[B]?t?4.28571429*n:1.5*n:A[B],text:b,padding:ga,textBaseline:"middle"});c.measureText();c.height=c.height===2*c.padding?0:c.height;c.width=c.width===2*c.padding?0:c.width;H.push({textBlock:c,id:s.reversed?F:B,isDirty:!1,lineColor:a,lineThickness:q,lineDashType:x,height:c.height<
|
|
538
|
+
c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,f,e=[];f=!1;c=0;for(var h,k=P-$-U/2,k=s.options.indexLabelMaxWidth?s.indexLabelMaxWidth>k?k:s.indexLabelMaxWidth:k,n=H.length-1;0<=n;n--){h=C[H[n].id];c=H[n];d=c.textBlock;b=(a=q(n)<S.length?H[q(n)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+ga>b.y&&(f=!0);c=h.indexLabelMaxWidth||k;if(c>k||0>c)c=k;e.push(c)}if(f)for(n=H.length-1;0<=n;n--)a=S[n],H[n].textBlock.maxWidth=e[e.length-(n+1)],H[n].textBlock.measureText(),
|
|
539
|
+
H[n].textBlock.height=H[n].textBlock.height===2*H[n].textBlock.padding?0:H[n].textBlock.height,H[n].textBlock.width=H[n].textBlock.width===2*H[n].textBlock.padding?0:H[n].textBlock.width,H[n].textBlock.x=P-k,c=H[n].textBlock.height<H[n].textBlock.maxHeight?H[n].textBlock.height:H[n].textBlock.maxHeight,f=H[n].textBlock.width<H[n].textBlock.maxWidth?H[n].textBlock.width:H[n].textBlock.maxWidth,H[n].height=c,H[n].width=f,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,H[n].textBlock.y=c-H[n].height/
|
|
540
|
+
2,s.reversed?(H[n].textBlock.y+H[n].height>V+z&&(H[n].textBlock.y=V+z-H[n].height),H[n].textBlock.y<ra-z&&(H[n].textBlock.y=ra-z)):(H[n].textBlock.y<V-z&&(H[n].textBlock.y=V-z),H[n].textBlock.y+H[n].height>ra+z&&(H[n].textBlock.y=ra+z-H[n].height))}function h(){var a,b,c,d;if("inside"!==s.indexLabelPlacement)for(var e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=s.reversed?"undefined"!==typeof a.x5?c>Da?f(c).x2+1:
|
|
541
|
+
(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<Da?f(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,H[e].textBlock.x=b+U,H[e].textBlock.y=c-H[e].height/2,s.reversed?(H[e].textBlock.y+H[e].height>V+z&&(H[e].textBlock.y=V+z-H[e].height),H[e].textBlock.y<ra-z&&(H[e].textBlock.y=ra-z)):(H[e].textBlock.y<V-z&&(H[e].textBlock.y=V-z),H[e].textBlock.y+H[e].height>ra+z&&(H[e].textBlock.y=ra+z-H[e].height)));else for(e=0;e<S.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=S[e],b=a.height,c=
|
|
542
|
+
H[e].height,d=H[e].width,b>=c?(b=e!=fa?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=fa?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,H[e].textBlock.x=b,H[e].textBlock.y=c):H[e].isDirty=!0)}function g(){function a(b,c){var d;if(0>b||b>=H.length)return 0;var e,f=H[b].textBlock;if(0>c){c*=-1;e=p(b);d=x(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=d);return d}e=q(b);d=x(b,e);if(d>=c)return f.y+=c,c;if(b==S.length-1)return 0<d&&(f.y+=d),d;d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,
|
|
543
543
|
d,e,f,h=0,n;f=(T-R+2*z)/l;n=l;for(var k,g=1;g<n;g++){e=g*f;for(var m=H.length-1;0<=m;m--)!H[m].isDirty&&(H[m].textBlock.y<e&&H[m].textBlock.y+H[m].height>e)&&(k=q(m),!(k>=H.length-1)&&H[m].textBlock.y+H[m].height+ga>H[k].textBlock.y&&(H[m].textBlock.y=H[m].textBlock.y+H[m].height-e>e-H[m].textBlock.y?e+1:e-H[m].height-1))}for(k=S.length-1;0<k;k--)if(!H[k].isDirty){e=p(k);if(0>e&&(e=0,H[e].isDirty))break;if(H[k].textBlock.y<H[e].textBlock.y+H[e].height){d=d||k;f=k;for(n=0;H[f].textBlock.y<H[e].textBlock.y+
|
|
544
544
|
H[e].height+ga;){a=a||H[f].textBlock.y+H[f].height;n+=H[f].height;n+=ga;f=e;if(0>=f){f=0;n+=H[f].height;break}e=p(f);if(0>e){f=0;n+=H[f].height;break}}if(f!=k){h=H[f].textBlock.y;a-=h;a=n-a;h=c(a,d,f);break}}}return h}function c(a,b,d){var e=[],f=0,h=0;for(a=Math.abs(a);d<=b;d++)e.push(S[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=e[d],f<a)h++,f+=H[b.id].height+ga,H[b.id].textBlock.text="",H[b.id].indexLabelText="",H[b.id].isDirty=!0,H[b.id].textBlock.measureText();
|
|
545
545
|
else break;return h}for(var d,e,f,h,n,k,l=1,m=0;m<2*l;m++){for(var s=H.length-1;0<=s&&!(0<=p(s)&&p(s),f=H[s],h=f.textBlock,k=(n=q(s)<S.length?H[q(s)]:null)?n.textBlock:null,d=+f.height.toFixed(6),e=+h.y.toFixed(6),!f.isDirty&&(n&&e+d+ga>+k.y.toFixed(6))&&(d=h.y+d+ga-k.y,e=a(s,-d),e<d&&(0<e&&(d-=e),e=a(q(s),d),e!=d)));s--);b()}}function x(a,b){return(b<S.length?H[b].textBlock.y:s.reversed?V+z:ra+z)-(0>a?s.reversed?ra-z:V-z:H[a].textBlock.y+H[a].height+ga)}function t(a,b,c){var d,e,f,n=[],g=z,l=[];
|
|
@@ -659,75 +659,76 @@ q[f]._titleTextBlock.maxHeight=q[f].titleWrap?0.8*h.height:1.5*q[f].titleFontSiz
|
|
|
659
659
|
b.length;f++)z.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateWidth():0)),aa+=z[f],$+=b[f]?b[f].margin:0;else z.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));P.push(z);n=Math.round(h.x1+S+O);r=Math.round(h.x2-aa-$>m.width-p?m.width-p:h.x2-aa-$);if(a&&0<a.length)for(v=[],f=X=0;f<a.length;f++)a[f]&&(a[f].lineCoordinates={}),a[f].lineCoordinates.width=Math.abs(r-n),a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.width?a[f].titleMaxWidth:
|
|
660
660
|
a[f].lineCoordinates.width),v.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateHeight():0)),X+=v[f],e+=a[f]&&!m.isNavigator?a[f].margin:0;else v.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));Q.push(v);if(d&&0<d.length)for(u=[],f=Z=0;f<d.length;f++)d[f]&&(d[f].lineCoordinates={}),d[f].lineCoordinates.width=Math.abs(r-n),d[f].title&&(d[f]._titleTextBlock.maxWidth=0<d[f].titleMaxWidth&&d[f].titleMaxWidth<d[f].lineCoordinates.width?d[f].titleMaxWidth:d[f].lineCoordinates.width),u.push(Math.ceil(d[f]?
|
|
661
661
|
d[f].createLabelsAndCalculateHeight():0)),Z+=u[f],Y+=d[f]&&!m.isNavigator?d[f].margin:0;else u.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateHeight():0));R.push(u);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].lineCoordinates.x1=n,r=Math.round(h.x2-aa-$>m.width-p?m.width-p:h.x2-aa-$),a[f]._labels&&1<a[f]._labels.length&&(g=k=0,k=a[f]._labels[1],g="dateTime"===a[f].valueType?a[f]._labels[a[f]._labels.length-2]:a[f]._labels[a[f]._labels.length-1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+
|
|
662
|
-
(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle))),!a[f]||(!a[f].labelAutoFit||l(B)||l(G)||m.isNavigator||m.stockChart)||(g=0,0<a[f].labelAngle?G+s>r&&(
|
|
663
|
-
a[f].labelAngle&&(G+s>r&&(g=G+s/2-r-aa),B-y<n&&B-y<a[f].viewportMinimum&&(I=n-O-a[f].tickLength-A-B+y/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<g?r-=g:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0>a[f].labelAngle&&0<I?n+=
|
|
664
|
-
X:m.sessionVariables.axisX.height:m.sessionVariables.axisX.height=X,g=Math.round(h.y2-X-e+F),k=Math.round(h.y2),a[f].lineCoordinates.x2=r,a[f].lineCoordinates.width=r-n,a[f].lineCoordinates.y1=g,a[f].lineCoordinates.y2=g,"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.y1=
|
|
665
|
-
a[f].lineCoordinates.y1+a[f].lineThickness/2),a[f].bounds={x1:n,y1:g,x2:r,y2:k-(X+e-v[f]-F),width:r-n},a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1),F+=v[f]+a[f].margin;if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].lineCoordinates.x1=Math.round(h.x1+S+O),d[f].lineCoordinates.x2=
|
|
666
|
-
1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-
|
|
667
|
-
Math.round(h.y1),k=d[f].lineCoordinates.y1=g+Z+Y-T,d[f].lineCoordinates.y2=g,"inside"===d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.y1=d[0].lineCoordinates.y1-T-(d[f].labelEffectiveHeight||0)-5),"inside"===d[f].tickPlacement&&0<f&&(d[f].lineCoordinates.y1-=
|
|
668
|
-
0<c.length)for(f=0;f<c.length;f++)O=m.isNavigator?0:10,c[f]&&(n=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),O=c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock.height/2:p,g=Math.round(h.y1+Z+Y<Math.max(O,p)?
|
|
669
|
-
|
|
670
|
-
c[f].bounds.x1,c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),U+=("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&
|
|
671
|
-
p)?Math.max(O,p):h.y1+Z+Y),O=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,k=Math.round(h.y2-(X+e+O)),b[f].lineCoordinates={x1:n+V,y1:g,x2:n+V,y2:k,height:Math.abs(k-g)},"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.x1=b[0].lineCoordinates.x2+
|
|
672
|
-
b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].bounds={x1:n+V,y1:g,x2:r+(("inside"===b[f].labelPlacement&&0===f?z[f]-5:z[f])+V),y2:k,height:k-g},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?
|
|
673
|
-
a[f].calculateBreaksSizeInValues(),a[f]._labels&&1<a[f]._labels.length&&(B=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,
|
|
674
|
-
Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1:(0<n?n*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateValueToPixelConversionParameters(),d[f].calculateBreaksSizeInValues(),d[f]._labels&&
|
|
675
|
-
d[f].lineCoordinates.x1,n=d[f]._labels[d[f]._labels.length-("dateTime"===d[f].valueType?2:1)].position,n=d[f].getApparentDifference(d[f].viewportMinimum,n),G=d[f].logarithmic?(1<n?Math.log(n)/d[f].conversionParameters.lnLogarithmBase*Math.abs(d[f].conversionParameters.pixelPerUnit):
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
Math.max(n,v/2):n),0<!d.length&&(r=0<c[f].labelAngle?r-u/2:0===c[f].labelAngle?r-u/2:r)),c[f].lineCoordinates.x1=n,c[f].lineCoordinates.x2=r,c[f].lineCoordinates.width=Math.abs(r-n),c[f].title&&(c[f]._titleTextBlock.maxWidth=
|
|
680
|
-
b[f].labelAutoFit&&!l(A)&&(0<!a.length&&(n=0<b[f].labelAngle?Math.max(n,A):0===b[f].labelAngle?Math.max(n,A/2):n),0<!d.length&&(r-=z/2)),b[f].lineCoordinates.x1=n,b[f].lineCoordinates.x2=r,b[f].lineCoordinates.width=Math.abs(r-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
180*Math.abs(k.textBlock.angle)),z=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)));if(m.panEnabled)for(f=0;f<c.length;f++)p[f]=l(m.sessionVariables.axisY[f].height)?
|
|
684
|
-
c[f].chart.height?c[f].chart.height:h.y2),c[f].lineCoordinates.y1=g-(p[f]+c[f].margin+Z),c[f].lineCoordinates.y2=g-(p[f]+c[f].margin+Z),"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+p[f]-(c[f]._titleTextBlock?c[f]._titleTextBlock.height:0)-
|
|
685
|
-
c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:n,y1:g-(p[f]+Z+c[f].margin),x2:r,y2:k-(Z+c[f].margin),width:r-n,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),
|
|
686
|
-
|
|
687
|
-
0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),F+=B[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++){O=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(h.x1+e);g=b&&
|
|
688
|
-
Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=c[O].lineCoordinates.x1,n=0>c[O].labelAngle||0===c[O].labelAngle?r-V:n);if(b&&0<b.length)for(O=0;O<b.length;O++)b[O]&&
|
|
689
|
-
(a[f]._titleTextBlock?a[f]._titleTextBlock.height:0))+a[f].tickLength+(a[f].stripLineLabelEffectiveWidth||0),a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+
|
|
690
|
-
a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();N+=I[f]+a[f].margin}if(d&&0<d.length)for(f=0;f<d.length;f++){O=d[f]._labels&&0<d[f]._labels.length?d[f]._labels[0].textBlock.fontSize/
|
|
691
|
-
c[0].lineCoordinates.y1:h.y2-U>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=0>c[O].labelAngle?Math.max(r,v):0===c[O].labelAngle?Math.max(r,v/2):r,n=
|
|
692
|
-
d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.x1=d[f].lineCoordinates.x1+(y[f]-(d[f]._titleTextBlock?d[f]._titleTextBlock.height:0)-2)-d[f].tickLength-(d[f].stripLineLabelEffectiveWidth||0),d[f].lineCoordinates.x2=d[f].lineCoordinates.x1+d[f].lineThickness/2);"inside"===d[f].tickPlacement&&
|
|
693
|
-
d[f].bounds.x2-d[f].bounds.x1;d[f].title&&(d[f]._titleTextBlock.maxWidth=0<d[f].titleMaxWidth&&d[f].titleMaxWidth<d[f].lineCoordinates.height?d[f].titleMaxWidth:d[f].lineCoordinates.height);d[f].calculateValueToPixelConversionParameters();d[f].calculateBreaksSizeInValues();P+=y[f]+
|
|
694
|
-
|
|
695
|
-
0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateStripLinesThicknessInValues(),d[f].calculateBreaksInPixels()}};A.render=function(a,d,c,b,e){e=a[0]?a[0].chart:d[0].chart;var h=
|
|
696
|
-
h.
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
if(
|
|
700
|
-
|
|
701
|
-
e.sessionVariables.crosshairShownByPixel?!0:e.sessionVariables.crosshairShownByPixel)};A.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==
|
|
702
|
-
this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};A.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===
|
|
703
|
-
this.conversionParameters.minimum),b=this.scaleBreaks&&!l(this.scaleBreaks.options.spacing),e,h=0;h<d.length;h++)e=b||!l(d[h].options.spacing),d[h].spacing=
|
|
704
|
-
|
|
705
|
-
function(){var a=this,d=!1,c=0,b=0,e=1,h=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===
|
|
706
|
-
this.
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
2
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
this.tickPlacement?0:this.tickLength)-2-(
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
("inside"===this.tickPlacement?this.tickLength:0)-5:q.x
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
662
|
+
(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle))),!a[f]||(!a[f].labelAutoFit||l(B)||l(G)||m.isNavigator||m.stockChart)||(g=0,0<a[f].labelAngle?G+s>r&&(a[f].convertPixelToValue(G)>=a[f].viewportMinimum&&a[f].convertPixelToValue(G)<=a[f].viewportMaximum)&&(g+=0<a[f].labelAngle?G+s-r-aa:0):0>a[f].labelAngle?
|
|
663
|
+
B-y<n&&B-y<a[f].viewportMinimum&&(I=n-(O+a[f].tickLength+A+B-y+a[f].labelFontSize/2)):0===a[f].labelAngle&&(G+s>r&&(a[f].convertPixelToValue(G)>=a[f].viewportMinimum&&a[f].convertPixelToValue(G)<=a[f].viewportMaximum)&&(g=G+s/2-r-aa),B-y<n&&B-y<a[f].viewportMinimum&&(I=n-O-a[f].tickLength-A-B+y/2)),a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0<a[f].labelAngle&&0<g?r-=g:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0>a[f].labelAngle&&0<I?n+=
|
|
664
|
+
I:a[f].viewportMaximum===a[f].maximum&&a[f].viewportMinimum===a[f].minimum&&0===a[f].labelAngle&&(0<I&&(n+=I),0<g&&(r-=g))),m.panEnabled?X=l(m.sessionVariables.axisX.height)||m.stockChart?m.sessionVariables.axisX.height=X:m.sessionVariables.axisX.height:m.sessionVariables.axisX.height=X,g=Math.round(h.y2-X-e+F),k=Math.round(h.y2),a[f].lineCoordinates.x2=r,a[f].lineCoordinates.width=r-n,a[f].lineCoordinates.y1=g,a[f].lineCoordinates.y2=g,"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.y1=
|
|
665
|
+
a[0].lineCoordinates.y2+F+(a[f].labelEffectiveHeight||0),a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2),"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.y1+=a[f].tickLength,a[f].lineCoordinates.y2=a[f].lineCoordinates.y1+a[f].lineThickness/2),a[f].bounds={x1:n,y1:g,x2:r,y2:k-(X+e-v[f]-F),width:r-n},a[f].bounds.height=a[f].bounds.y2-a[f].bounds.y1),F+=v[f]+a[f].margin;if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].lineCoordinates.x1=Math.round(h.x1+S+O),d[f].lineCoordinates.x2=
|
|
666
|
+
Math.round(h.x2-aa-$>m.width-p?m.width-p:h.x2-aa-$),d[f].lineCoordinates.width=Math.abs(r-n),d[f]._labels&&1<d[f]._labels.length&&(k=d[f]._labels[1],g="dateTime"===d[f].valueType?d[f]._labels[d[f]._labels.length-2]:d[f]._labels[d[f]._labels.length-1],y=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),s=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-
|
|
667
|
+
g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle))),m.panEnabled?Z=l(m.sessionVariables.axisX2.height)||m.stockChart?m.sessionVariables.axisX2.height=Z:m.sessionVariables.axisX2.height:m.sessionVariables.axisX2.height=Z,g=Math.round(h.y1),k=d[f].lineCoordinates.y1=g+Z+Y-T,d[f].lineCoordinates.y2=g,"inside"===d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.y1=d[0].lineCoordinates.y1-T-(d[f].labelEffectiveHeight||0)-5),"inside"===d[f].tickPlacement&&0<f&&(d[f].lineCoordinates.y1-=
|
|
668
|
+
d[f].tickLength),d[f].bounds={x1:n,y1:g+(Z+Y-("inside"===d[f].labelPlacement&&0===f?u[f]-5:u[f])-T),x2:r,y2:k,width:r-n},d[f].bounds.height=d[f].bounds.y2-d[f].bounds.y1,T+=("inside"===d[f].labelPlacement&&0===f?u[f]-5:u[f])+d[f].margin;if(c&&0<c.length)for(f=0;f<c.length;f++)O=m.isNavigator?0:10,c[f]&&(n=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),O=c[f]._labels&&0<c[f]._labels.length?c[f]._labels[c[f]._labels.length-1].textBlock.height/2:p,g=Math.round(h.y1+Z+Y<Math.max(O,p)?
|
|
669
|
+
Math.max(O,p):h.y1+Z+Y),r=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),O=0<a.length?0:c[f]._labels&&0<c[f]._labels.length?c[f]._labels[0].textBlock.height/2:p,k=Math.round(h.y2-X-e-O),c[f].lineCoordinates={x1:n-U,y1:g,x2:r-U,y2:k,height:Math.abs(k-g)},"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.x1=c[0].lineCoordinates.x1-U-(c[f].labelEffectiveWidth||0)-5,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.x1-=
|
|
670
|
+
c[f].tickLength,c[f].lineCoordinates.x2=c[f].lineCoordinates.x1+c[f].lineThickness/2),c[f].bounds={x1:n-(("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+U),y1:g,x2:r-U,y2:k,height:k-g},c[f].bounds.width=c[f].bounds.x2-c[f].bounds.x1,c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.height?c[f].titleMaxWidth:c[f].lineCoordinates.height),U+=("inside"===c[f].labelPlacement&&0===f?A[f]-5:A[f])+c[f].margin);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&
|
|
671
|
+
(n=Math.round(a[0]?a[0].lineCoordinates.x2:d[0].lineCoordinates.x2),r=Math.round(n),O=b[f]._labels&&0<b[f]._labels.length?b[f]._labels[b[f]._labels.length-1].textBlock.height/2:0,g=Math.round(h.y1+Z+Y<Math.max(O,p)?Math.max(O,p):h.y1+Z+Y),O=0<a.length?0:b[f]._labels&&0<b[f]._labels.length?b[f]._labels[0].textBlock.height/2:0,k=Math.round(h.y2-(X+e+O)),b[f].lineCoordinates={x1:n+V,y1:g,x2:n+V,y2:k,height:Math.abs(k-g)},"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.x1=b[0].lineCoordinates.x2+
|
|
672
|
+
V+(b[f].labelEffectiveWidth||0)+5,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),"inside"===b[f].tickPlacement&&0<f&&(b[f].lineCoordinates.x1+=b[f].tickLength,b[f].lineCoordinates.x2=b[f].lineCoordinates.x1+b[f].lineThickness/2),b[f].bounds={x1:n+V,y1:g,x2:r+(("inside"===b[f].labelPlacement&&0===f?z[f]-5:z[f])+V),y2:k,height:k-g},b[f].bounds.width=b[f].bounds.x2-b[f].bounds.x1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.height?
|
|
673
|
+
b[f].titleMaxWidth:b[f].lineCoordinates.height),V+=("inside"===b[f].labelPlacement&&0===f?z[f]-5:z[f])+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++)a[f]&&(a[f].calculateValueToPixelConversionParameters(),a[f].calculateBreaksSizeInValues(),a[f]._labels&&1<a[f]._labels.length&&(B=(a[f].logarithmic?Math.log(a[f]._labels[1].position/a[f].viewportMinimum)/a[f].conversionParameters.lnLogarithmBase:a[f]._labels[1].position-a[f].viewportMinimum)*Math.abs(a[f].conversionParameters.pixelPerUnit)+a[f].lineCoordinates.x1,
|
|
674
|
+
n=a[f]._labels[a[f]._labels.length-("dateTime"===a[f].valueType?2:1)].position,n=a[f].getApparentDifference(a[f].viewportMinimum,n),G=a[f].logarithmic?(1<n?Math.log(n)/a[f].conversionParameters.lnLogarithmBase*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1:(0<n?n*Math.abs(a[f].conversionParameters.pixelPerUnit):0)+a[f].lineCoordinates.x1));if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateValueToPixelConversionParameters(),d[f].calculateBreaksSizeInValues(),d[f]._labels&&
|
|
675
|
+
1<d[f]._labels.length&&(B=(d[f].logarithmic?Math.log(d[f]._labels[1].position/d[f].viewportMinimum)/d[f].conversionParameters.lnLogarithmBase:d[f]._labels[1].position-d[f].viewportMinimum)*Math.abs(d[f].conversionParameters.pixelPerUnit)+d[f].lineCoordinates.x1,n=d[f]._labels[d[f]._labels.length-("dateTime"===d[f].valueType?2:1)].position,n=d[f].getApparentDifference(d[f].viewportMinimum,n),G=d[f].logarithmic?(1<n?Math.log(n)/d[f].conversionParameters.lnLogarithmBase*Math.abs(d[f].conversionParameters.pixelPerUnit):
|
|
676
|
+
0)+d[f].lineCoordinates.x1:(0<n?n*Math.abs(d[f].conversionParameters.pixelPerUnit):0)+d[f].lineCoordinates.x1);for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<w){if(a&&0<a.length)for(f=0;f<a.length;f++)t=Q[w-1][f]===Q[w][f]?!0:!1;else t=!0;if(d&&0<d.length)for(f=0;f<d.length;f++)J=R[w-1][f]===R[w][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)L=N[w-1][f]===N[w][f]?!0:!1;else L=!0;if(b&&0<b.length)for(f=
|
|
677
|
+
0;f<b.length;f++)M=P[w-1][f]===P[w][f]?!0:!1;else M=!0}if(t&&J&&L&&M)break;w++}if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateStripLinesThicknessInValues(),d[f].calculateBreaksInPixels();if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),
|
|
678
|
+
b[f].calculateBreaksInPixels()}else{p=[];B=[];I=[];y=[];G=[];s=[];Q=[];for(R=[];4>w;){X=V=U=$=O=Y=e=P=N=F=Z=0;if(a&&0<a.length)for(I=[],f=V=0;f<a.length;f++)I.push(Math.ceil(a[f]?a[f].createLabelsAndCalculateWidth():0)),V+=I[f],e+=a[f]&&!m.isNavigator?a[f].margin:0;else I.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));Q.push(I);if(d&&0<d.length)for(y=[],f=X=0;f<d.length;f++)y.push(Math.ceil(d[f]?d[f].createLabelsAndCalculateWidth():0)),X+=y[f],Y+=d[f]?d[f].margin:0;else y.push(Math.ceil(d[0]?
|
|
679
|
+
d[0].createLabelsAndCalculateWidth():0));R.push(y);if(c&&0<c.length)for(f=0;f<c.length;f++)c[f].lineCoordinates={},n=Math.round(h.x1+V+e),r=Math.round(h.x2-X-Y>m.width-10?m.width-10:h.x2-X-Y),c[f].labelAutoFit&&!l(v)&&(0<!a.length&&(n=0>c[f].labelAngle?Math.max(n,v):0===c[f].labelAngle?Math.max(n,v/2):n),0<!d.length&&(r=0<c[f].labelAngle?r-u/2:0===c[f].labelAngle?r-u/2:r)),c[f].lineCoordinates.x1=n,c[f].lineCoordinates.x2=r,c[f].lineCoordinates.width=Math.abs(r-n),c[f].title&&(c[f]._titleTextBlock.maxWidth=
|
|
680
|
+
0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width);if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].lineCoordinates={},n=Math.round(h.x1+V+e),r=Math.round(h.x2-X-Y>b[f].chart.width-10?b[f].chart.width-10:h.x2-X-Y),b[f]&&b[f].labelAutoFit&&!l(A)&&(0<!a.length&&(n=0<b[f].labelAngle?Math.max(n,A):0===b[f].labelAngle?Math.max(n,A/2):n),0<!d.length&&(r-=z/2)),b[f].lineCoordinates.x1=n,b[f].lineCoordinates.x2=r,b[f].lineCoordinates.width=Math.abs(r-
|
|
681
|
+
n),b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width);if(c&&0<c.length)for(p=[],f=U=0;f<c.length;f++)p.push(Math.ceil(c[f]?c[f].createLabelsAndCalculateHeight():0)),U+=p[f]+c[f].margin,O+=c[f].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));G.push(p);if(b&&0<b.length)for(B=[],f=0;f<b.length;f++)B.push(Math.ceil(b[f]?b[f].createLabelsAndCalculateHeight():0)),$+=b[f].margin;
|
|
682
|
+
else B.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateHeight():0));s.push(B);if(c&&0<c.length)for(f=0;f<c.length;f++)0<c[f]._labels.length&&(k=c[f]._labels[0],g=c[f]._labels[c[f]._labels.length-1],v=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),u=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)));
|
|
683
|
+
if(b&&0<b.length)for(f=0;f<b.length;f++)b[f]&&0<b[f]._labels.length&&(k=b[f]._labels[0],g=b[f]._labels[b[f]._labels.length-1],A=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)),z=g.textBlock.width*Math.cos(Math.PI/180*Math.abs(g.textBlock.angle))+(g.textBlock.height-g.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(g.textBlock.angle)));if(m.panEnabled)for(f=0;f<c.length;f++)p[f]=l(m.sessionVariables.axisY[f].height)?
|
|
684
|
+
m.sessionVariables.axisY[f].height=p[f]:m.sessionVariables.axisY[f].height;else for(f=0;f<c.length;f++)m.sessionVariables.axisY[f].height=p[f];if(c&&0<c.length)for(f=c.length-1;0<=f;f--)g=Math.round(h.y2),k=Math.round(h.y2>c[f].chart.height?c[f].chart.height:h.y2),c[f].lineCoordinates.y1=g-(p[f]+c[f].margin+Z),c[f].lineCoordinates.y2=g-(p[f]+c[f].margin+Z),"inside"===c[f].labelPlacement&&0<f&&(c[f].lineCoordinates.y1=c[f].lineCoordinates.y1+p[f]-(c[f]._titleTextBlock?c[f]._titleTextBlock.height:0)-
|
|
685
|
+
c[f].tickLength-(c[f].stripLineLabelEffectiveHeight||0)-5,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),"inside"===c[f].tickPlacement&&0<f&&(c[f].lineCoordinates.y1+=c[f].tickLength,c[f].lineCoordinates.y2=c[f].lineCoordinates.y1+c[f].lineThickness/2),c[f].bounds={x1:n,y1:g-(p[f]+Z+c[f].margin),x2:r,y2:k-(Z+c[f].margin),width:r-n,height:p[f]},c[f].title&&(c[f]._titleTextBlock.maxWidth=0<c[f].titleMaxWidth&&c[f].titleMaxWidth<c[f].lineCoordinates.width?c[f].titleMaxWidth:c[f].lineCoordinates.width),
|
|
686
|
+
Z+=p[f]+c[f].margin;if(b&&0<b.length)for(f=b.length-1;0<=f;f--)b[f]&&(g=Math.round(h.y1),k=Math.round(h.y1+(B[f]+b[f].margin+F)),b[f].lineCoordinates.y1=k,b[f].lineCoordinates.y2=k,"inside"===b[f].labelPlacement&&0<f&&(b[f].lineCoordinates.y1=k-B[f]+(b[f]._titleTextBlock?b[f]._titleTextBlock.height:0)+b[f].tickLength+(b[f].stripLineLabelEffectiveHeight||0),b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),"inside"===b[f].tickPlacement&&0<f&&(b[f].lineCoordinates.y1-=b[f].tickLength,
|
|
687
|
+
b[f].lineCoordinates.y2=b[f].lineCoordinates.y1-b[f].lineThickness/2),b[f].bounds={x1:n,y1:g+(b[f].margin+F),x2:r,y2:k,width:r-n},b[f].bounds.height=b[f].bounds.y2-b[f].bounds.y1,b[f].title&&(b[f]._titleTextBlock.maxWidth=0<b[f].titleMaxWidth&&b[f].titleMaxWidth<b[f].lineCoordinates.width?b[f].titleMaxWidth:b[f].lineCoordinates.width),F+=B[f]+b[f].margin);if(a&&0<a.length)for(f=0;f<a.length;f++){O=a[f]._labels&&0<a[f]._labels.length?a[f]._labels[0].textBlock.fontSize/2:0;n=Math.round(h.x1+e);g=b&&
|
|
688
|
+
0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(O,10)?Math.max(O,10):h.y1):h.y1<Math.max(O,10)?Math.max(O,10):h.y1;r=Math.round(h.x1+V+e);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-U>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=c[O].lineCoordinates.x1,n=0>c[O].labelAngle||0===c[O].labelAngle?r-V:n);if(b&&0<b.length)for(O=0;O<b.length;O++)b[O]&&
|
|
689
|
+
b[O].labelAutoFit&&(r=b[O].lineCoordinates.x1,n=r-V);a[f].lineCoordinates={x1:r-N,y1:g,x2:r-N,y2:k,height:Math.abs(k-g)};"inside"===a[f].labelPlacement&&0<f&&(a[f].lineCoordinates.x1=a[f].lineCoordinates.x1-(I[f]-(a[f]._titleTextBlock?a[f]._titleTextBlock.height:0))+a[f].tickLength+(a[f].stripLineLabelEffectiveWidth||0),a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+a[f].lineThickness/2);"inside"===a[f].tickPlacement&&0<f&&(a[f].lineCoordinates.x1-=a[f].tickLength,a[f].lineCoordinates.x2=a[f].lineCoordinates.x1+
|
|
690
|
+
a[f].lineThickness/2);a[f].bounds={x1:r-(I[f]+N),y1:g,x2:r-N,y2:k,height:k-g};a[f].bounds.width=a[f].bounds.x2-a[f].bounds.x1;a[f].title&&(a[f]._titleTextBlock.maxWidth=0<a[f].titleMaxWidth&&a[f].titleMaxWidth<a[f].lineCoordinates.height?a[f].titleMaxWidth:a[f].lineCoordinates.height);a[f].calculateValueToPixelConversionParameters();a[f].calculateBreaksSizeInValues();N+=I[f]+a[f].margin}if(d&&0<d.length)for(f=0;f<d.length;f++){O=d[f]._labels&&0<d[f]._labels.length?d[f]._labels[0].textBlock.fontSize/
|
|
691
|
+
2:0;n=Math.round(h.x1-e);g=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(O,10)?Math.max(O,10):h.y1):h.y1<Math.max(O,10)?Math.max(O,10):h.y1;r=Math.round(h.x2-X-Y);k=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-U>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2-U):h.y2>m.height-Math.max(O,10)?m.height-Math.max(O,10):h.y2;if(c&&0<c.length)for(O=0;O<c.length;O++)c[O]&&c[O].labelAutoFit&&(r=0>c[O].labelAngle?Math.max(r,v):0===c[O].labelAngle?Math.max(r,v/2):r,n=
|
|
692
|
+
0>c[O].labelAngle||0===c[O].labelAngle?r-X:n);if(b&&0<b.length)for(O=0;O<b.length;O++)b[O]&&b[O].labelAutoFit&&(r=b[O].lineCoordinates.x2,n=r-X);d[f].lineCoordinates={x1:r+P,y1:g,x2:r+P,y2:k,height:Math.abs(k-g)};"inside"===d[f].labelPlacement&&0<f&&(d[f].lineCoordinates.x1=d[f].lineCoordinates.x1+(y[f]-(d[f]._titleTextBlock?d[f]._titleTextBlock.height:0)-2)-d[f].tickLength-(d[f].stripLineLabelEffectiveWidth||0),d[f].lineCoordinates.x2=d[f].lineCoordinates.x1+d[f].lineThickness/2);"inside"===d[f].tickPlacement&&
|
|
693
|
+
0<f&&(d[f].lineCoordinates.x1+=d[f].tickLength,d[f].lineCoordinates.x2=d[f].lineCoordinates.x1+d[f].lineThickness/2);d[f].bounds={x1:d[f].lineCoordinates.x1,y1:g,x2:r+y[f]+P,y2:k,width:r-n,height:k-g};d[f].bounds.width=d[f].bounds.x2-d[f].bounds.x1;d[f].title&&(d[f]._titleTextBlock.maxWidth=0<d[f].titleMaxWidth&&d[f].titleMaxWidth<d[f].lineCoordinates.height?d[f].titleMaxWidth:d[f].lineCoordinates.height);d[f].calculateValueToPixelConversionParameters();d[f].calculateBreaksSizeInValues();P+=y[f]+
|
|
694
|
+
d[f].margin}for(f=0;f<q.length;f++)"axisY"===q[f].type&&(q[f].calculateValueToPixelConversionParameters(),q[f].calculateBreaksSizeInValues());if(0<w){if(a&&0<a.length)for(f=0;f<a.length;f++)t=Q[w-1][f]===Q[w][f]?!0:!1;else t=!0;if(d&&0<d.length)for(f=0;f<d.length;f++)J=R[w-1][f]===R[w][f]?!0:!1;else J=!0;if(c&&0<c.length)for(f=0;f<c.length;f++)L=G[w-1][f]===G[w][f]?!0:!1;else L=!0;if(b&&0<b.length)for(f=0;f<b.length;f++)M=s[w-1][f]===s[w][f]?!0:!1;else M=!0}if(t&&J&&L&&M)break;w++}if(c&&0<c.length)for(f=
|
|
695
|
+
0;f<c.length;f++)c[f].calculateStripLinesThicknessInValues(),c[f].calculateBreaksInPixels();if(b&&0<b.length)for(f=0;f<b.length;f++)b[f].calculateStripLinesThicknessInValues(),b[f].calculateBreaksInPixels();if(a&&0<a.length)for(f=0;f<a.length;f++)a[f].calculateStripLinesThicknessInValues(),a[f].calculateBreaksInPixels();if(d&&0<d.length)for(f=0;f<d.length;f++)d[f].calculateStripLinesThicknessInValues(),d[f].calculateBreaksInPixels()}};A.render=function(a,d,c,b,e){e=a[0]?a[0].chart:d[0].chart;var h=
|
|
696
|
+
e.ctx;e.alignVerticalAxes&&e.alignVerticalAxes();h.save();h.beginPath();a&&a.length&&h.rect(2,a[0].bounds.y1,a[0].chart.width-4,a[a.length-1].bounds.y2);d&&d.length&&h.rect(2,d[d.length-1].bounds.y1,d[0].chart.width-4,d[0].bounds.y2);h.clip();if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g].renderLabelsTicksAndTitle();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderLabelsTicksAndTitle();h.restore();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderLabelsTicksAndTitle();if(b&&0<b.length)for(g=
|
|
697
|
+
0;g<b.length;g++)b[g].renderLabelsTicksAndTitle();e.preparePlotArea();g=e.plotArea;h.save();h.beginPath();h.rect(g.x1,g.y1,Math.abs(g.x2-g.x1),Math.abs(g.y2-g.y1));h.clip();if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderStripLinesOfThicknessType("value");if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderStripLinesOfThicknessType("value");if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderStripLinesOfThicknessType("value");
|
|
698
|
+
if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderInterlacedColors();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderInterlacedColors();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderInterlacedColors();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderInterlacedColors();h.restore();if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderGrid(),r&&(a[g].createMask(),a[g].renderBreaksBackground());if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderGrid(),r&&(d[g].createMask(),d[g].renderBreaksBackground());
|
|
699
|
+
if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderGrid(),r&&(c[g].createMask(),c[g].renderBreaksBackground());if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderGrid(),r&&(b[g].createMask(),b[g].renderBreaksBackground());if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].renderAxisLine();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderAxisLine();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderAxisLine();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].renderAxisLine();h=!1;if(a&&0<a.length)for(g=0;g<
|
|
700
|
+
a.length;g++)a[g].renderStripLinesOfThicknessType("pixel"),a[g].crosshair&&a[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=a[g].type);if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].renderStripLinesOfThicknessType("pixel"),d[g].crosshair&&d[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=d[g].type);if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].renderStripLinesOfThicknessType("pixel"),c[g].crosshair&&c[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=c[g].type);if(b&&0<b.length)for(g=0;g<
|
|
701
|
+
b.length;g++)b[g].renderStripLinesOfThicknessType("pixel"),b[g].crosshair&&b[g].crosshair.enabled&&(h=!0,e.clearedOverlayedCanvas=b[g].type);if(h||!h&&e.clearedOverlayedCanvas&&0<=e.clearedOverlayedCanvas.indexOf("axis"))e.resetOverlayedCanvas(),e.renderCrosshairs(null,l(e.sessionVariables.crosshairShownByPixel)||e.sessionVariables.crosshairShownByPixel?!0:e.sessionVariables.crosshairShownByPixel)};A.prototype.calculateStripLinesThicknessInValues=function(){for(var a=0;a<this.stripLines.length;a++)if(null!==
|
|
702
|
+
this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var d=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),b=this.getApparentDifference(d,c);this.stripLines[a].value=this.convertPixelToValue((this.convertValueToPixel(d)+this.convertValueToPixel(c))/2);this.stripLines[a].thickness=b;this.stripLines[a]._thicknessType="value"}};A.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===
|
|
703
|
+
this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,d=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),b=this.scaleBreaks&&!l(this.scaleBreaks.options.spacing),e,h=0;h<d.length;h++)e=b||!l(d[h].options.spacing),d[h].spacing=
|
|
704
|
+
Ua(d[h].spacing,a,8,e?0.1*a:8,e?0:3)<<0,d[h].size=0>d[h].spacing?0:Math.abs(d[h].spacing/c),this.logarithmic&&(d[h].size=Math.pow(this.logarithmBase,d[h].size))};A.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var d=0;d<a.length&&!(a[d].startValue>this.conversionParameters.maximum);d++)a[d].endValue<
|
|
705
|
+
this.conversionParameters.minimum||(l(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=d),a[d].startValue>=this.conversionParameters.minimum&&(a[d].startPixel=this.convertValueToPixel(a[d].startValue),this.scaleBreaks.lastBreakIndex=d),a[d].endValue<=this.conversionParameters.maximum&&(a[d].endPixel=this.convertValueToPixel(a[d].endValue)))}};A.prototype.renderLabelsTicksAndTitle=function(){var a=this,d=!1,c=0,b=0,e=1,h=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===
|
|
706
|
+
typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,g,l=this.viewportMaximum,r=this.lineCoordinates.width/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(k===this._labels.length-1||g<Math.log(l/p.position)*r/e)||(c.push(p),l=p.position,g=
|
|
707
|
+
p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(g=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=g);c>this.lineCoordinates.width*e&&this.labelAutoFit&&(d=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&
|
|
708
|
+
!this.equidistantInterval&&this.labelAutoFit){for(var c=[],m,l=this.viewportMaximum,r=this.lineCoordinates.height/Math.log(this.range),k=this._labels.length-1;0<=k;k--){p=this._labels[k];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(k===this._labels.length-1||m<Math.log(l/p.position)*r)||(c.push(p),l=p.position,m=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(k=
|
|
709
|
+
0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(m=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=m);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(d=!0)}}this.logarithmic&&(!this.equidistantInterval&&this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var k=0,p,q;if("bottom"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],
|
|
710
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===this.labelPlacement?
|
|
711
|
+
q.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock.fontSize/2):q.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.fontSize/2+5):0>this.labelAngle?(q.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),q.y="inside"===this.labelPlacement?q.y-("inside"===this.tickPlacement?this.tickLength:0)-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle):q.y+("inside"===this.tickPlacement?0:this.tickLength)+
|
|
712
|
+
5+Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))):(q.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,q.y="inside"===this.labelPlacement?q.y-("inside"===this.tickPlacement?this.tickLength:0)-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle):q.y+("inside"===this.tickPlacement?0:this.tickLength)+
|
|
713
|
+
5+Math.abs(p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();
|
|
714
|
+
a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height+this._titleTextBlock._lineHeight/2-1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(k=0;k<this._labels.length;k++)p=
|
|
715
|
+
this._labels[k],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===
|
|
716
|
+
this.labelPlacement?q.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):0>this.labelAngle?(q.x-="inside"===this.labelPlacement?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,q.y="inside"===this.labelPlacement?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):
|
|
717
|
+
q.y-("inside"===this.tickPlacement?0:this.tickLength)-2-(p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)):(q.x-="inside"===this.labelPlacement?0:p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle),q.y="inside"===this.labelPlacement?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5+p.textBlock.fontSize/2*Math.cos(Math.PI/180*this.labelAngle):q.y-("inside"===this.tickPlacement?0:this.tickLength)-2-((p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/
|
|
718
|
+
180*this.labelAngle)+p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();
|
|
719
|
+
a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+this._titleTextBlock._lineHeight/2+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],
|
|
720
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?
|
|
721
|
+
q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*
|
|
722
|
+
this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-
|
|
723
|
+
p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();
|
|
724
|
+
a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===this._position){for(k=0;k<this._labels.length;k++)p=this._labels[k],
|
|
725
|
+
p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),d&&0!==h++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?
|
|
726
|
+
q.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+("inside"===this.tickPlacement?0:this.tickLength)+5):0>this.labelAngle?(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x-
|
|
727
|
+
p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-p.textBlock.fontSize/2*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+(p.textBlock.height-p.textBlock.fontSize/2)*Math.sin(Math.PI/
|
|
728
|
+
180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<a._labels.length;k++)if(p=a._labels[k],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<
|
|
729
|
+
0,b);a.ctx.lineTo(q.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-this._titleTextBlock._lineHeight/2,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}h=0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",function(){for(k=0;k<
|
|
730
|
+
a._labels.length;k++)p=a._labels[k],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||d&&0!==h++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(k=0;k<this._labels.length;k++)p=this._labels[k],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||d&&0!==h++%2&&this.labelAutoFit)||p.textBlock.render(!0)};A.prototype.renderInterlacedColors=function(){var a=this.chart.plotArea.ctx,d,c,b=this.chart.plotArea,e=0;d=!0;if(("bottom"===
|
|
731
|
+
this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)d?(d=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,d.x),b.y1,Math.abs(c.x-d.x),Math.abs(b.y1-b.y2)),d=!1):d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=
|
|
731
732
|
this.interlacedColor,e=0;e<this._labels.length;e++)d?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),d=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x1,Math.min(c.y,d.y),Math.abs(b.x1-b.x2),Math.abs(d.y-c.y)),d=!1):d=!0;a.beginPath()};A.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&0<this.stripLines.length&&a){var d=this,c,b,e=0,h=0,g=!1;b=!1;for(var r=[],
|
|
732
733
|
t=[],k=!1,m,e=0;e<this.stripLines.length;e++){var p=this.stripLines[e];p._thicknessType===a&&("pixel"===a&&(p.value<this.viewportMinimum||p.value>this.viewportMaximum||l(p.value)||isNaN(this.range))||"value"===a&&(p.startValue<=this.viewportMinimum&&p.endValue<=this.viewportMinimum||p.startValue>=this.viewportMaximum&&p.endValue>=this.viewportMaximum||l(p.startValue)||l(p.endValue)||isNaN(this.range))||r.push(p))}for(e=0;e<this._stripLineLabels.length;e++)if(p=this.stripLines[e],c=this._stripLineLabels[e],
|
|
733
734
|
!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range)))if(b=this.getPixelCoordinatesOnAxis(c.position),"outside"===c.stripLine.labelPlacement){p&&(this.ctx.strokeStyle=p.color,this.ctx.lineWidth="pixel"===p._thicknessType?p.thickness:this.tickThickness,l(p.opacity)||"pixel"!==p._thicknessType||(m=p.ctx.globalAlpha,p.ctx.globalAlpha=p.opacity));if("bottom"===this._position){var q=1===this.ctx.lineWidth%2?(b.x<<0)+0.5:b.x<<0;this.ctx.beginPath();this.ctx.moveTo(q,b.y<<
|
|
@@ -956,7 +957,7 @@ ja.prototype.cancelAllAnimations=function(){this.animations=[];this.animationReq
|
|
|
956
957
|
0,b.width,b.height,e-e*a,0,a*c.canvas.width/ia,c.canvas.height/ia)}},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/ia,b.height/ia);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/ia,c.canvas.height/ia);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*
|
|
957
958
|
(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}}},aa={drawMarker:function(a,d,c,b,e,g,l,r){if(c){var t=1;c.fillStyle=g?g:"#000000";c.strokeStyle=l?l:"#000000";c.lineWidth=r?r:0;c.setLineDash&&c.setLineDash(I("solid",r));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),g&&c.fill(),r&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle=
|
|
958
959
|
"black",c.stroke(),c.globalAlpha=t))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),g&&c.fill(),r&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"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(),g&&c.fill(),r&&(l?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):"cross"===b&&(c.strokeStyle=g,c.lineWidth=e/4,c.beginPath(),
|
|
959
|
-
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];aa.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();v.version="v3.10.
|
|
960
|
+
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];aa.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();v.version="v3.10.11 GA";window.CanvasJS&&(v&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=v)})();
|
|
960
961
|
|
|
961
962
|
/*
|
|
962
963
|
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.
|