@canvasjs/charts 3.7.29 → 3.7.30

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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/canvasjs.min.js +26 -26
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- CanvasJS Chart - v3.7.29 GA - https://canvasjs.com/
1
+ CanvasJS Chart - v3.7.30 GA - https://canvasjs.com/
2
2
  Copyright 2023 fenopix
3
3
 
4
4
  --------------------- License Information --------------------
package/canvasjs.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- CanvasJS Chart - v3.7.29 GA - https://canvasjs.com/
2
+ CanvasJS Chart - v3.7.30 GA - https://canvasjs.com/
3
3
  Copyright 2023 fenopix
4
4
 
5
5
  --------------------- License Information --------------------
@@ -518,30 +518,30 @@ b[0]=0;c<y.length;c++)b.push(Math.abs(y[c].y)*E/a);return b}function c(){var a=T
518
518
  2,a-=k,m=e-h,h+=e-h,m+=0==p?0:a/p,h+=a/p,k=!0):(m=(Math.abs(aa)*b-Math.sqrt(p))/2,p=b-2*m/Math.abs(aa),h+=m,h>e&&(h-=m,p=c,k=(b+p)*(e-h)/2,a-=k,m=e-h,h+=e-h,m+=a/p,h+=a/p,k=!0),b=p)),d.push(m);return d}function b(){if(u&&y){for(var a,b,c,d,e,f,l,k,h,m,p,q,t,n,r,C=[],x=[],v={percent:null,total:null},z=null,D=0;D<y.length;D++)r=R[D],r="undefined"!==typeof r.x5?(r.y2+r.y4)/2:(r.y2+r.y3)/2,r=g(r).x2+1,C[D]=K-r-X;r=0.5*X;for(var D=0,B=y.length-1;D<y.length||0<=B;D++,B--){b=u.reversed?y[B]:y[D];a=b.color?
519
519
  b.color:u.reversed?u._colorSet[(y.length-1-D)%u._colorSet.length]:u._colorSet[D%u._colorSet.length];c=b.indexLabelPlacement||u.indexLabelPlacement||"outside";n=b.indexLabelTextAlign||u.indexLabelTextAlign||"left";d=b.indexLabelBackgroundColor||u.indexLabelBackgroundColor||(w?"transparent":null);e=b.indexLabelFontColor||u.indexLabelFontColor||"#979797";f=s(b.indexLabelFontSize)?u.indexLabelFontSize:b.indexLabelFontSize;l=b.indexLabelFontStyle||u.indexLabelFontStyle||"normal";k=b.indexLabelFontFamily||
520
520
  u.indexLabelFontFamily||"arial";h=b.indexLabelFontWeight||u.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||u.options.indexLabelLineColor||a;m="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof u.indexLabelLineThickness?u.indexLabelLineThickness:2;p=b.indexLabelLineDashType||u.indexLabelLineDashType||"solid";q="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof u.indexLabelWrap?u.indexLabelWrap:!0;t=u.dataPointIds[D];A._eventManager.objectMap[t]=
521
- {id:t,objectType:"dataPoint",dataPointIndex:D,dataSeriesIndex:0,funnelSection:R[u.reversed?y.length-1-D:D]};"inside"===u.indexLabelPlacement&&(C[D]=D!==ca?u.reversed?R[D].x2-R[D].x1:R[D].x3-R[D].x4:R[D].x3-R[D].x6,20>C[D]&&(C[D]=D!==ca?u.reversed?R[D].x3-R[D].x4:R[D].x2-R[D].x1:R[D].x2-R[D].x1,C[D]/=2));t=b.indexLabelMaxWidth?b.indexLabelMaxWidth:u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:C[D];if(t>C[D]||0>t)t=C[D];x[D]="inside"===u.indexLabelPlacement?R[D].height:!1;v=A.getPercentAndTotal(u,
522
- b);if(u.indexLabelFormatter||b.indexLabelFormatter)z={chart:A.options,dataSeries:u,dataPoint:b,total:v.total,percent:v.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(z):b.indexLabel?A.replaceKeywordsWithValue(b.indexLabel,b,u,D):u.indexLabelFormatter?u.indexLabelFormatter(z):u.indexLabel?A.replaceKeywordsWithValue(u.indexLabel,b,u,D):b.label?b.label:"";0>=m&&(m=0);1E3>t&&1E3-t<r&&(t+=1E3-t);P.roundRect||Da(P);c=new ja(P,{fontSize:f,fontFamily:k,fontColor:e,fontStyle:l,fontWeight:h,horizontalAlign:c,
523
- textAlign:n,backgroundColor:d,maxWidth:t,maxHeight:!1===x[D]?q?4.28571429*f:1.5*f:x[D],text:b,padding:da});c.measureText();I.push({textBlock:c,id:u.reversed?B:D,isDirty:!1,lineColor:a,lineThickness:m,lineDashType:p,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,e,f=[];e=!1;c=0;for(var g,l=K-V-X/2,l=u.options.indexLabelMaxWidth?u.indexLabelMaxWidth>l?l:u.indexLabelMaxWidth:l,k=I.length-1;0<=k;k--){g=y[I[k].id];c=I[k];d=c.textBlock;
524
- b=(a=q(k)<R.length?I[q(k)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+da>b.y&&(e=!0);c=g.indexLabelMaxWidth||l;if(c>l||0>c)c=l;f.push(c)}if(e)for(k=I.length-1;0<=k;k--)a=R[k],I[k].textBlock.maxWidth=f[f.length-(k+1)],I[k].textBlock.measureText(),I[k].textBlock.x=K-l,c=I[k].textBlock.height<I[k].textBlock.maxHeight?I[k].textBlock.height:I[k].textBlock.maxHeight,e=I[k].textBlock.width<I[k].textBlock.maxWidth?I[k].textBlock.width:I[k].textBlock.maxWidth,I[k].height=c,I[k].width=e,c="undefined"!==typeof a.x5?
525
- (a.y2+a.y4)/2:(a.y2+a.y3)/2,I[k].textBlock.y=c-I[k].height/2,u.reversed?(I[k].textBlock.y+I[k].height>U+z&&(I[k].textBlock.y=U+z-I[k].height),I[k].textBlock.y<ta-z&&(I[k].textBlock.y=ta-z)):(I[k].textBlock.y<U-z&&(I[k].textBlock.y=U-z),I[k].textBlock.y+I[k].height>ta+z&&(I[k].textBlock.y=ta+z-I[k].height))}function f(){var a,b,c,d;if("inside"!==u.indexLabelPlacement)for(var e=0;e<R.length;e++)0==I[e].textBlock.text.length?I[e].isDirty=!0:(a=R[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/
526
- 2,b=u.reversed?"undefined"!==typeof a.x5?c>Ca?g(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<Ca?g(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,I[e].textBlock.x=b+X,I[e].textBlock.y=c-I[e].height/2,u.reversed?(I[e].textBlock.y+I[e].height>U+z&&(I[e].textBlock.y=U+z-I[e].height),I[e].textBlock.y<ta-z&&(I[e].textBlock.y=ta-z)):(I[e].textBlock.y<U-z&&(I[e].textBlock.y=U-z),I[e].textBlock.y+I[e].height>ta+z&&(I[e].textBlock.y=ta+z-I[e].height)));else for(e=0;e<R.length;e++)0==I[e].textBlock.text.length?
527
- I[e].isDirty=!0:(a=R[e],b=a.height,c=I[e].height,d=I[e].width,b>=c?(b=e!=ca?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=ca?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,I[e].textBlock.x=b,I[e].textBlock.y=c):I[e].isDirty=!0)}function l(){function a(b,c){var d;if(0>b||b>=I.length)return 0;var e,f=I[b].textBlock;if(0>c){c*=-1;e=p(b);d=h(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=h(b,e);if(d>=c)return f.y+=c,c;if(b==R.length-1)return 0<d&&(f.y+=d),d;
528
- d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,d,e,f,g=0,l;f=(N-$+2*z)/m;l=m;for(var k,h=1;h<l;h++){e=h*f;for(var t=I.length-1;0<=t;t--)!I[t].isDirty&&(I[t].textBlock.y<e&&I[t].textBlock.y+I[t].height>e)&&(k=q(t),!(k>=I.length-1)&&I[t].textBlock.y+I[t].height+da>I[k].textBlock.y&&(I[t].textBlock.y=I[t].textBlock.y+I[t].height-e>e-I[t].textBlock.y?e+1:e-I[t].height-1))}for(k=R.length-1;0<k;k--)if(!I[k].isDirty){e=p(k);if(0>e&&(e=0,I[e].isDirty))break;if(I[k].textBlock.y<I[e].textBlock.y+I[e].height){d=
529
- d||k;f=k;for(l=0;I[f].textBlock.y<I[e].textBlock.y+I[e].height+da;){a=a||I[f].textBlock.y+I[f].height;l+=I[f].height;l+=da;f=e;if(0>=f){f=0;l+=I[f].height;break}e=p(f);if(0>e){f=0;l+=I[f].height;break}}if(f!=k){g=I[f].textBlock.y;a-=g;a=l-a;g=c(a,d,f);break}}}return g}function c(a,b,d){var e=[],f=0,g=0;for(a=Math.abs(a);d<=b;d++)e.push(R[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=e[d],f<a)g++,f+=I[b.id].height+da,I[b.id].textBlock.text="",I[b.id].indexLabelText=
530
- "",I[b.id].isDirty=!0,I[b.id].textBlock.measureText();else break;return g}for(var d,e,f,g,l,k,m=1,r=0;r<2*m;r++){for(var n=I.length-1;0<=n&&!(0<=p(n)&&p(n),f=I[n],g=f.textBlock,k=(l=q(n)<R.length?I[q(n)]:null)?l.textBlock:null,d=+f.height.toFixed(6),e=+g.y.toFixed(6),!f.isDirty&&(l&&e+d+da>+k.y.toFixed(6))&&(d=g.y+d+da-k.y,e=a(n,-d),e<d&&(0<e&&(d-=e),e=a(q(n),d),e!=d)));n--);b()}}function h(a,b){return(b<R.length?I[b].textBlock.y:u.reversed?U+z:ta+z)-(0>a?u.reversed?ta-z:U-z:I[a].textBlock.y+I[a].height+
531
- da)}function n(a,b,c){var d,e,g,l=[],h=z,p=[];-1!==b&&(0<=Z.indexOf(b)?(e=Z.indexOf(b),Z.splice(e,1)):(Z.push(b),Z=Z.sort(function(a,b){return a-b})));if(0===Z.length)l=ia;else{e=z*(1!=Z.length||0!=Z[0]&&Z[0]!=R.length-1?2:1)/k();for(var q=0;q<R.length;q++){if(1==Z.length&&0==Z[0]){if(0===q){l.push(ia[q]);d=h;continue}}else 0===q&&(d=-1*h);l.push(ia[q]+d);if(0<=Z.indexOf(q)||q<R.length&&0<=Z.indexOf(q+1))d+=e}}g=function(){for(var a=[],b=0;b<R.length;b++)a.push(l[b]-R[b].y1);return a}();var t={startTime:(new Date).getTime(),
532
- duration:c||500,easingFunction:function(a,b,c,d){return M.easing.easeOutQuart(a,b,c,d)},changeSection:function(a){for(var b,c,d=0;d<R.length;d++)b=g[d],c=R[d],b*=a,"undefined"===typeof p[d]&&(p[d]=0),0>p&&(p*=-1),c.y1+=b-p[d],c.y2+=b-p[d],c.y3+=b-p[d],c.y4+=b-p[d],c.y5&&(c.y5+=b-p[d],c.y6+=b-p[d]),p[d]=b}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ha=!0;d.clearRect(x.x1,x.y1,x.x2-x.x1,x.y2-x.y1);d.fillStyle=a.backgroundColor;d.fillRect(x.x1,x.y1,x.width,x.height);t.changeSection(c,
533
- b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[y.length-1-b]:u.dataPoints[b];e.index=u.reversed?y.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<R.length;e++)ra(d,R[e],u.fillOpacity);v(d);L&&("inside"!==u.indexLabelPlacement?m(d):f(),r(d));1<=c&&(ha=!1)},null,M.easing.easeOutQuart)}function k(){for(var a=0,b=0;b<R.length-1;b++)(0<=Z.indexOf(b)||0<=Z.indexOf(b+1))&&a++;return a}function m(a){for(var b,c,d,e,f=0;f<R.length;f++)e=1===I[f].lineThickness%2?0.5:0,c=((R[f].y2+R[f].y4)/
534
- 2<<0)+e,b=g(c).x2-1,d=I[f].textBlock.x,e=(I[f].textBlock.y+I[f].height/2<<0)+e,I[f].isDirty||0==I[f].lineThickness||(a.strokeStyle=I[f].lineColor,a.lineWidth=I[f].lineThickness,a.setLineDash&&a.setLineDash(J(I[f].lineDashType,I[f].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&I[a].isDirty;a--);return a}function q(a){for(a+=1;a<=R.length&&a!=R.length&&I[a].isDirty;a++);return a}function g(a){for(var b,c=0;c<y.length;c++)if(R[c].y1<a&&R[c].y4>
535
- a){b=R[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function r(a){for(var b=0;b<R.length;b++)I[b].isDirty||(a&&(I[b].textBlock.ctx=a),I[b].textBlock.render(!0))}function v(a){A.plotArea.layoutManager.reset();a.roundRect||Da(a);A.title&&(A.title.dockInsidePlotArea||"center"===A.title.horizontalAlign&&"center"===A.title.verticalAlign)&&(A.title.ctx=a,A.title.render());if(A.subtitles)for(var b=
536
- 0;b<A.subtitles.length;b++){var c=A.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)A.subtitles.ctx=a,c.render()}A.legend&&(A.legend.dockInsidePlotArea||"center"===A.legend.horizontalAlign&&"center"===A.legend.verticalAlign)&&(A.legend.ctx=a,A.legend.setLayout(),A.legend.render());va.fNg&&va.fNg(A)}var A=this;if(!(0>=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],y=u.dataPoints,x=this.plotArea,z=0.025*x.width,B=0.01*x.width,
537
- D=0,E=x.height-2*z,G=Math.min(x.width-2*B,2.8*x.height),L=!1,S=0;S<y.length;S++)if(!L&&("undefined"!==typeof y[S].indexLabel&&null!==y[S].indexLabel&&0<y[S].indexLabel.toString().length)&&(L=!0),!L&&("undefined"!==typeof y[S].label&&null!==y[S].label&&0<y[S].label.toString().length)&&(L=!0),!L&&"function"===typeof u.indexLabelFormatter||"function"===typeof y[S].indexLabelFormatter)L=!0;L=L||"undefined"!==typeof u.indexLabel&&null!==u.indexLabel&&0<u.indexLabel.toString().length;"inside"!==u.indexLabelPlacement&&
538
- L||(B=(x.width-0.75*G)/2);var S=x.x1+B,K=x.x2-B,$=x.y1+z,N=x.y2-z,P=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=u.length&&(u.dataPoints&&u.visible)&&0!==y.length){var Q,F;a=75*G/100;var X=30*(K-a)/100;"funnel"===u.type?(Q=s(u.options.neckHeight)?0.35*E:u.neckHeight,F=s(u.options.neckWidth)?0.25*a:u.neckWidth,"string"===typeof Q&&Q.match(/%$/)?(Q=parseInt(Q),Q=Q*E/100):Q=parseInt(Q),"string"===typeof F&&F.match(/%$/)?(F=parseInt(F),F=F*a/100):F=parseInt(F),Q>E?Q=E:0>=Q&&(Q=0),F>a?F=a-0.5:
539
- 0>=F&&(F=0)):"pyramid"===u.type&&(F=Q=0,u.reversed=u.reversed?!1:!0);var B=S+a/2,T=S,V=S+a,U=u.reversed?N:$,O=B-F/2,W=B+F/2,Ca=u.reversed?$+Q:N-Q,ta=u.reversed?$:N;a=[];var B=[],R=[],G=[],Y=$,ca,aa=(Ca-U)/(O-T),fa=-aa,S="area"===(u.valueRepresents?u.valueRepresents:"height")?c():d();if(-1!==S){if(u.reversed)for(G.push(Y),F=S.length-1;0<F;F--)Y+=S[F],G.push(Y);else for(F=0;F<S.length;F++)Y+=S[F],G.push(Y);if(u.reversed)for(F=0;F<S.length;F++)G[F]<Ca?(a.push(O),B.push(W),ca=F):(a.push((G[F]-U+aa*T)/
540
- aa),B.push((G[F]-U+fa*V)/fa));else for(F=0;F<S.length;F++)G[F]<Ca?(a.push((G[F]-U+aa*T)/aa),B.push((G[F]-U+fa*V)/fa),ca=F):(a.push(O),B.push(W));for(F=0;F<S.length-1;F++)Y=u.reversed?y[y.length-1-F].color?y[y.length-1-F].color:u._colorSet[(y.length-1-F)%u._colorSet.length]:y[F].color?y[F].color:u._colorSet[F%u._colorSet.length],F===ca?R.push({x1:a[F],y1:G[F],x2:B[F],y2:G[F],x3:W,y3:Ca,x4:B[F+1],y4:G[F+1],x5:a[F+1],y5:G[F+1],x6:O,y6:Ca,id:F,height:G[F+1]-G[F],color:Y}):R.push({x1:a[F],y1:G[F],x2:B[F],
541
- y2:G[F],x3:B[F+1],y3:G[F+1],x4:a[F+1],y4:G[F+1],id:F,height:G[F+1]-G[F],color:Y});var da=2,I=[],ha=!1,Z=[],ia=[],S=!1;a=a=0;Ea(Z);for(F=0;F<y.length;F++)y[F].exploded&&(S=!0,u.reversed?Z.push(y.length-1-F):Z.push(F));P.clearRect(x.x1,x.y1,x.width,x.height);P.fillStyle=A.backgroundColor;P.fillRect(x.x1,x.y1,x.width,x.height);if(L&&u.visible&&(b(),f(),e(),"inside"!==u.indexLabelPlacement)){l();for(F=0;F<y.length;F++)I[F].isDirty||(a=I[F].textBlock.x+I[F].width,a=(K-a)/2,0==F&&(D=a),D>a&&(D=a));for(F=
542
- 0;F<R.length;F++)R[F].x1+=D,R[F].x2+=D,R[F].x3+=D,R[F].x4+=D,R[F].x5&&(R[F].x5+=D,R[F].x6+=D),I[F].textBlock.x+=D}for(F=0;F<R.length;F++)D=R[F],ra(P,D,u.fillOpacity),ia.push(D.y1);v(P);L&&u.visible&&("inside"===u.indexLabelPlacement||A.animationEnabled||m(P),A.animationEnabled||r());if(!L)for(F=0;F<y.length;F++)D=u.dataPointIds[F],a={id:D,objectType:"dataPoint",dataPointIndex:F,dataSeriesIndex:0,funnelSection:R[u.reversed?y.length-1-F:F]},A._eventManager.objectMap[D]=a;!A.animationEnabled&&S?n(A,
543
- -1,0):A.animationEnabled&&!A.animatedRender&&n(A,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ha&&!A.isAnimating&&(s(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=u.reversed?y.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===u.type||"pyramid"===u.type)u.reversed?y[y.length-1-a].exploded=y[y.length-1-a].exploded?!1:!0:y[a].exploded=y[a].exploded?!1:!0;n(A,b,500)}};return{source:P,dest:this.plotArea.ctx,animationCallback:function(a,b){M.fadeInAnimation(a,
544
- b);1<=a&&(n(A,-1,500),v(A.plotArea.ctx||A.ctx))},easingFunction:M.easing.easeInQuad,animationBase:0}}}}};n.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();n.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||
521
+ {id:t,objectType:"dataPoint",dataPointIndex:D,dataSeriesIndex:0,funnelSection:R[u.reversed?y.length-1-D:D]};"inside"===u.indexLabelPlacement&&(C[D]=D!==ca?u.reversed?R[D].x2-R[D].x1:R[D].x3-R[D].x4:R[D].x3-R[D].x6,20>C[D]&&(C[D]=D!==ca?u.reversed?R[D].x3-R[D].x4:R[D].x2-R[D].x1:R[D].x2-R[D].x1,C[D]/=2));t=b.indexLabelMaxWidth?b.indexLabelMaxWidth:u.options.indexLabelMaxWidth?u.indexLabelMaxWidth:C[D];if(t>C[D]||0>t)t=C[D];x[D]="inside"===u.indexLabelPlacement?q?Math.max(R[D].height,f):1.5*f:!1;v=
522
+ A.getPercentAndTotal(u,b);if(u.indexLabelFormatter||b.indexLabelFormatter)z={chart:A.options,dataSeries:u,dataPoint:b,total:v.total,percent:v.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(z):b.indexLabel?A.replaceKeywordsWithValue(b.indexLabel,b,u,D):u.indexLabelFormatter?u.indexLabelFormatter(z):u.indexLabel?A.replaceKeywordsWithValue(u.indexLabel,b,u,D):b.label?b.label:"";0>=m&&(m=0);1E3>t&&1E3-t<r&&(t+=1E3-t);P.roundRect||Da(P);c=new ja(P,{fontSize:f,fontFamily:k,fontColor:e,fontStyle:l,
523
+ fontWeight:h,horizontalAlign:c,textAlign:n,backgroundColor:d,maxWidth:t,maxHeight:!1===x[D]?q?4.28571429*f:1.5*f:x[D],text:b,padding:da});c.measureText();I.push({textBlock:c,id:u.reversed?B:D,isDirty:!1,lineColor:a,lineThickness:m,lineDashType:p,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,e,f=[];e=!1;c=0;for(var g,l=K-V-X/2,l=u.options.indexLabelMaxWidth?u.indexLabelMaxWidth>l?l:u.indexLabelMaxWidth:l,k=I.length-1;0<=k;k--){g=
524
+ y[I[k].id];c=I[k];d=c.textBlock;b=(a=q(k)<R.length?I[q(k)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+da>b.y&&(e=!0);c=g.indexLabelMaxWidth||l;if(c>l||0>c)c=l;f.push(c)}if(e)for(k=I.length-1;0<=k;k--)a=R[k],I[k].textBlock.maxWidth=f[f.length-(k+1)],I[k].textBlock.measureText(),I[k].textBlock.x=K-l,c=I[k].textBlock.height<I[k].textBlock.maxHeight?I[k].textBlock.height:I[k].textBlock.maxHeight,e=I[k].textBlock.width<I[k].textBlock.maxWidth?I[k].textBlock.width:I[k].textBlock.maxWidth,I[k].height=c,
525
+ I[k].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,I[k].textBlock.y=c-I[k].height/2,u.reversed?(I[k].textBlock.y+I[k].height>U+z&&(I[k].textBlock.y=U+z-I[k].height),I[k].textBlock.y<ta-z&&(I[k].textBlock.y=ta-z)):(I[k].textBlock.y<U-z&&(I[k].textBlock.y=U-z),I[k].textBlock.y+I[k].height>ta+z&&(I[k].textBlock.y=ta+z-I[k].height))}function f(){var a,b,c,d;if("inside"!==u.indexLabelPlacement)for(var e=0;e<R.length;e++)0==I[e].textBlock.text.length?I[e].isDirty=!0:(a=R[e],c="undefined"!==
526
+ typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=u.reversed?"undefined"!==typeof a.x5?c>Ca?g(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<Ca?g(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,I[e].textBlock.x=b+X,I[e].textBlock.y=c-I[e].height/2,u.reversed?(I[e].textBlock.y+I[e].height>U+z&&(I[e].textBlock.y=U+z-I[e].height),I[e].textBlock.y<ta-z&&(I[e].textBlock.y=ta-z)):(I[e].textBlock.y<U-z&&(I[e].textBlock.y=U-z),I[e].textBlock.y+I[e].height>ta+z&&(I[e].textBlock.y=ta+z-I[e].height)));
527
+ else for(e=0;e<R.length;e++)0==I[e].textBlock.text.length?I[e].isDirty=!0:(a=R[e],b=a.height,c=I[e].height,d=I[e].width,b>=c?(b=e!=ca?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=ca?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,I[e].textBlock.x=b,I[e].textBlock.y=c):I[e].isDirty=!0)}function l(){function a(b,c){var d;if(0>b||b>=I.length)return 0;var e,f=I[b].textBlock;if(0>c){c*=-1;e=p(b);d=h(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=h(b,e);if(d>=
528
+ c)return f.y+=c,c;if(b==R.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,d,e,f,g=0,l;f=(N-$+2*z)/m;l=m;for(var k,h=1;h<l;h++){e=h*f;for(var t=I.length-1;0<=t;t--)!I[t].isDirty&&(I[t].textBlock.y<e&&I[t].textBlock.y+I[t].height>e)&&(k=q(t),!(k>=I.length-1)&&I[t].textBlock.y+I[t].height+da>I[k].textBlock.y&&(I[t].textBlock.y=I[t].textBlock.y+I[t].height-e>e-I[t].textBlock.y?e+1:e-I[t].height-1))}for(k=R.length-1;0<k;k--)if(!I[k].isDirty){e=p(k);if(0>e&&(e=0,I[e].isDirty))break;
529
+ if(I[k].textBlock.y<I[e].textBlock.y+I[e].height){d=d||k;f=k;for(l=0;I[f].textBlock.y<I[e].textBlock.y+I[e].height+da;){a=a||I[f].textBlock.y+I[f].height;l+=I[f].height;l+=da;f=e;if(0>=f){f=0;l+=I[f].height;break}e=p(f);if(0>e){f=0;l+=I[f].height;break}}if(f!=k){g=I[f].textBlock.y;a-=g;a=l-a;g=c(a,d,f);break}}}return g}function c(a,b,d){var e=[],f=0,g=0;for(a=Math.abs(a);d<=b;d++)e.push(R[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=e[d],f<a)g++,f+=I[b.id].height+
530
+ da,I[b.id].textBlock.text="",I[b.id].indexLabelText="",I[b.id].isDirty=!0,I[b.id].textBlock.measureText();else break;return g}for(var d,e,f,g,l,k,m=1,r=0;r<2*m;r++){for(var n=I.length-1;0<=n&&!(0<=p(n)&&p(n),f=I[n],g=f.textBlock,k=(l=q(n)<R.length?I[q(n)]:null)?l.textBlock:null,d=+f.height.toFixed(6),e=+g.y.toFixed(6),!f.isDirty&&(l&&e+d+da>+k.y.toFixed(6))&&(d=g.y+d+da-k.y,e=a(n,-d),e<d&&(0<e&&(d-=e),e=a(q(n),d),e!=d)));n--);b()}}function h(a,b){return(b<R.length?I[b].textBlock.y:u.reversed?U+z:
531
+ ta+z)-(0>a?u.reversed?ta-z:U-z:I[a].textBlock.y+I[a].height+da)}function n(a,b,c){var d,e,g,l=[],h=z,p=[];-1!==b&&(0<=Z.indexOf(b)?(e=Z.indexOf(b),Z.splice(e,1)):(Z.push(b),Z=Z.sort(function(a,b){return a-b})));if(0===Z.length)l=ia;else{e=z*(1!=Z.length||0!=Z[0]&&Z[0]!=R.length-1?2:1)/k();for(var q=0;q<R.length;q++){if(1==Z.length&&0==Z[0]){if(0===q){l.push(ia[q]);d=h;continue}}else 0===q&&(d=-1*h);l.push(ia[q]+d);if(0<=Z.indexOf(q)||q<R.length&&0<=Z.indexOf(q+1))d+=e}}g=function(){for(var a=[],b=
532
+ 0;b<R.length;b++)a.push(l[b]-R[b].y1);return a}();var t={startTime:(new Date).getTime(),duration:c||500,easingFunction:function(a,b,c,d){return M.easing.easeOutQuart(a,b,c,d)},changeSection:function(a){for(var b,c,d=0;d<R.length;d++)b=g[d],c=R[d],b*=a,"undefined"===typeof p[d]&&(p[d]=0),0>p&&(p*=-1),c.y1+=b-p[d],c.y2+=b-p[d],c.y3+=b-p[d],c.y4+=b-p[d],c.y5&&(c.y5+=b-p[d],c.y6+=b-p[d]),p[d]=b}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ha=!0;d.clearRect(x.x1,x.y1,x.x2-x.x1,x.y2-
533
+ x.y1);d.fillStyle=a.backgroundColor;d.fillRect(x.x1,x.y1,x.width,x.height);t.changeSection(c,b);var e={};e.dataSeries=u;e.dataPoint=u.reversed?u.dataPoints[y.length-1-b]:u.dataPoints[b];e.index=u.reversed?y.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<R.length;e++)ra(d,R[e],u.fillOpacity);v(d);L&&("inside"!==u.indexLabelPlacement?m(d):f(),r(d));1<=c&&(ha=!1)},null,M.easing.easeOutQuart)}function k(){for(var a=0,b=0;b<R.length-1;b++)(0<=Z.indexOf(b)||0<=Z.indexOf(b+1))&&a++;return a}function m(a){for(var b,
534
+ c,d,e,f=0;f<R.length;f++)e=1===I[f].lineThickness%2?0.5:0,c=((R[f].y2+R[f].y4)/2<<0)+e,b=g(c).x2-1,d=I[f].textBlock.x,e=(I[f].textBlock.y+I[f].height/2<<0)+e,I[f].isDirty||0==I[f].lineThickness||(a.strokeStyle=I[f].lineColor,a.lineWidth=I[f].lineThickness,a.setLineDash&&a.setLineDash(J(I[f].lineDashType,I[f].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&I[a].isDirty;a--);return a}function q(a){for(a+=1;a<=R.length&&a!=R.length&&I[a].isDirty;a++);
535
+ return a}function g(a){for(var b,c=0;c<y.length;c++)if(R[c].y1<a&&R[c].y4>a){b=R[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function r(a){for(var b=0;b<R.length;b++)I[b].isDirty||(a&&(I[b].textBlock.ctx=a),I[b].textBlock.render(!0))}function v(a){A.plotArea.layoutManager.reset();a.roundRect||Da(a);A.title&&(A.title.dockInsidePlotArea||"center"===A.title.horizontalAlign&&"center"===
536
+ A.title.verticalAlign)&&(A.title.ctx=a,A.title.render());if(A.subtitles)for(var b=0;b<A.subtitles.length;b++){var c=A.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)A.subtitles.ctx=a,c.render()}A.legend&&(A.legend.dockInsidePlotArea||"center"===A.legend.horizontalAlign&&"center"===A.legend.verticalAlign)&&(A.legend.ctx=a,A.legend.setLayout(),A.legend.render());va.fNg&&va.fNg(A)}var A=this;if(!(0>=a.dataSeriesIndexes.length)){for(var u=this.data[a.dataSeriesIndexes[0]],
537
+ y=u.dataPoints,x=this.plotArea,z=0.025*x.width,B=0.01*x.width,D=0,E=x.height-2*z,G=Math.min(x.width-2*B,2.8*x.height),L=!1,S=0;S<y.length;S++)if(!L&&("undefined"!==typeof y[S].indexLabel&&null!==y[S].indexLabel&&0<y[S].indexLabel.toString().length)&&(L=!0),!L&&("undefined"!==typeof y[S].label&&null!==y[S].label&&0<y[S].label.toString().length)&&(L=!0),!L&&"function"===typeof u.indexLabelFormatter||"function"===typeof y[S].indexLabelFormatter)L=!0;L=L||"undefined"!==typeof u.indexLabel&&null!==u.indexLabel&&
538
+ 0<u.indexLabel.toString().length;"inside"!==u.indexLabelPlacement&&L||(B=(x.width-0.75*G)/2);var S=x.x1+B,K=x.x2-B,$=x.y1+z,N=x.y2-z,P=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=u.length&&(u.dataPoints&&u.visible)&&0!==y.length){var Q,F;a=75*G/100;var X=30*(K-a)/100;"funnel"===u.type?(Q=s(u.options.neckHeight)?0.35*E:u.neckHeight,F=s(u.options.neckWidth)?0.25*a:u.neckWidth,"string"===typeof Q&&Q.match(/%$/)?(Q=parseInt(Q),Q=Q*E/100):Q=parseInt(Q),"string"===typeof F&&F.match(/%$/)?(F=parseInt(F),
539
+ F=F*a/100):F=parseInt(F),Q>E?Q=E:0>=Q&&(Q=0),F>a?F=a-0.5:0>=F&&(F=0)):"pyramid"===u.type&&(F=Q=0,u.reversed=u.reversed?!1:!0);var B=S+a/2,T=S,V=S+a,U=u.reversed?N:$,O=B-F/2,W=B+F/2,Ca=u.reversed?$+Q:N-Q,ta=u.reversed?$:N;a=[];var B=[],R=[],G=[],Y=$,ca,aa=(Ca-U)/(O-T),fa=-aa,S="area"===(u.valueRepresents?u.valueRepresents:"height")?c():d();if(-1!==S){if(u.reversed)for(G.push(Y),F=S.length-1;0<F;F--)Y+=S[F],G.push(Y);else for(F=0;F<S.length;F++)Y+=S[F],G.push(Y);if(u.reversed)for(F=0;F<S.length;F++)G[F]<
540
+ Ca?(a.push(O),B.push(W),ca=F):(a.push((G[F]-U+aa*T)/aa),B.push((G[F]-U+fa*V)/fa));else for(F=0;F<S.length;F++)G[F]<Ca?(a.push((G[F]-U+aa*T)/aa),B.push((G[F]-U+fa*V)/fa),ca=F):(a.push(O),B.push(W));for(F=0;F<S.length-1;F++)Y=u.reversed?y[y.length-1-F].color?y[y.length-1-F].color:u._colorSet[(y.length-1-F)%u._colorSet.length]:y[F].color?y[F].color:u._colorSet[F%u._colorSet.length],F===ca?R.push({x1:a[F],y1:G[F],x2:B[F],y2:G[F],x3:W,y3:Ca,x4:B[F+1],y4:G[F+1],x5:a[F+1],y5:G[F+1],x6:O,y6:Ca,id:F,height:G[F+
541
+ 1]-G[F],color:Y}):R.push({x1:a[F],y1:G[F],x2:B[F],y2:G[F],x3:B[F+1],y3:G[F+1],x4:a[F+1],y4:G[F+1],id:F,height:G[F+1]-G[F],color:Y});var da=2,I=[],ha=!1,Z=[],ia=[],S=!1;a=a=0;Ea(Z);for(F=0;F<y.length;F++)y[F].exploded&&(S=!0,u.reversed?Z.push(y.length-1-F):Z.push(F));P.clearRect(x.x1,x.y1,x.width,x.height);P.fillStyle=A.backgroundColor;P.fillRect(x.x1,x.y1,x.width,x.height);if(L&&u.visible&&(b(),f(),e(),"inside"!==u.indexLabelPlacement)){l();for(F=0;F<y.length;F++)I[F].isDirty||(a=I[F].textBlock.x+
542
+ I[F].width,a=(K-a)/2,0==F&&(D=a),D>a&&(D=a));for(F=0;F<R.length;F++)R[F].x1+=D,R[F].x2+=D,R[F].x3+=D,R[F].x4+=D,R[F].x5&&(R[F].x5+=D,R[F].x6+=D),I[F].textBlock.x+=D}for(F=0;F<R.length;F++)D=R[F],ra(P,D,u.fillOpacity),ia.push(D.y1);v(P);L&&u.visible&&("inside"===u.indexLabelPlacement||A.animationEnabled||m(P),A.animationEnabled||r());if(!L)for(F=0;F<y.length;F++)D=u.dataPointIds[F],a={id:D,objectType:"dataPoint",dataPointIndex:F,dataSeriesIndex:0,funnelSection:R[u.reversed?y.length-1-F:F]},A._eventManager.objectMap[D]=
543
+ a;!A.animationEnabled&&S?n(A,-1,0):A.animationEnabled&&!A.animatedRender&&n(A,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ha&&!A.isAnimating&&(s(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=u.reversed?y.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===u.type||"pyramid"===u.type)u.reversed?y[y.length-1-a].exploded=y[y.length-1-a].exploded?!1:!0:y[a].exploded=y[a].exploded?!1:!0;n(A,b,500)}};return{source:P,dest:this.plotArea.ctx,animationCallback:function(a,
544
+ b){M.fadeInAnimation(a,b);1<=a&&(n(A,-1,500),v(A.plotArea.ctx||A.ctx))},easingFunction:M.easing.easeInQuad,animationBase:0}}}}};n.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();n.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||
545
545
  window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;n.prototype.set=function(a,d,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=d,c&&this.render()):n.base.set.call(this,a,d,c)};n.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var d=a.format?a.format:"png",c=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+d);var b=this.canvas;if(b&&d&&c){c=c+"."+d;a="image/"+d;var b=b.toDataURL(a),e=!1,
546
546
  f=document.createElement("a");f.download=c;f.href=b;if("undefined"!==typeof Blob&&new Blob){for(var l=b.replace(/^data:[a-z\/]*;base64,/,""),l=atob(l),h=new ArrayBuffer(l.length),h=new Uint8Array(h),n=0;n<l.length;n++)h[n]=l.charCodeAt(n);d=new Blob([h.buffer],{type:"image/"+d});try{window.navigator.msSaveBlob(d,c),e=!0}catch(k){f.dataset.downloadurl=[a,f.download,f.href].join(":"),f.href=window.URL.createObjectURL(d)}}if(!e)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",
547
547
  !0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),f.dispatchEvent?f.dispatchEvent(event):f.fireEvent&&f.fireEvent("onclick")}catch(m){d=window.open(),d.document.write("<img src='"+b+"'></img><div>Please right click on the image and save it to your device</div>"),d.document.close()}}};n.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),d=document.createElement("iframe");d.setAttribute("class","canvasjs-chart-print-frame");V(d,{position:"absolute",width:"100%",border:"0px",margin:"0px 0px 0px 0px",
@@ -929,7 +929,7 @@ this.chart.requestAnimFrame.call(window,function(){f.animate.call(f)}):this.char
929
929
  d){if(0!==a){var c=d.dest,b=d.source.canvas,e=d.animationBase;c.drawImage(b,0,0,b.width,b.height,e-e*a,0,a*c.canvas.width/la,c.canvas.height/la)}},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/la,b.height/la);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/la,c.canvas.height/la);c.restore()}},easing:{linear:function(a,
930
930
  d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},W={drawMarker:function(a,d,c,b,e,f,h,n){if(c){var s=1;c.fillStyle=f?f:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=n?n:0;c.setLineDash&&c.setLineDash(J("solid",n));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),f&&c.fill(),
931
931
  n&&(h?c.stroke():(s=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=s))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),f&&c.fill(),n&&(h?c.stroke():(s=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=s))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),f&&c.fill(),n&&(h?c.stroke():(s=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=s)),c.beginPath()):
932
- "cross"===b&&(c.strokeStyle=f,c.lineWidth=e/4,c.beginPath(),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];W.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return n}();B.version="v3.7.29 GA";window.CanvasJS&&(B&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=B)})();
932
+ "cross"===b&&(c.strokeStyle=f,c.lineWidth=e/4,c.beginPath(),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];W.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return n}();B.version="v3.7.30 GA";window.CanvasJS&&(B&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=B)})();
933
933
 
934
934
  /*
935
935
  excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canvasjs/charts",
3
- "version": "3.7.29",
3
+ "version": "3.7.30",
4
4
  "description": "CanvasJS JavaScript Charts",
5
5
  "main": "canvasjs.min.js",
6
6
  "keywords": [