@canvasjs/charts 3.7.14 → 3.7.16
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/canvasjs.min.js +5 -5
- package/package.json +1 -1
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.7.
|
|
2
|
+
CanvasJS Chart - v3.7.16 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2023 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -200,7 +200,7 @@ typeof this.axisY[c].options.margin&&(this.axisY[c].margin=10)}if(this.axisY2){f
|
|
|
200
200
|
"px solid "+this.toolbar.buttonBorderColor,this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor):(va(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));hb(this);this._processData();
|
|
201
201
|
this.options.title&&(this.title=new Ba(this,this.options.title),this.title.dockInsidePlotArea?a.push(this.title):this.title.setLayout());if(this.options.subtitles)for(d=0;d<this.options.subtitles.length;d++)c=new Ka(this,this.options.subtitles[d],d),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new E(this,this.options.legend);for(d=0;d<this.data.length;d++)(this.data[d].showInLegend||"pie"===this.data[d].type||"doughnut"===this.data[d].type||"funnel"===this.data[d].type||
|
|
202
202
|
"pyramid"===this.data[d].type)&&this.legend.dataSeries.push(this.data[d]);this.legend.dockInsidePlotArea?a.push(this.legend):this.legend.setLayout();for(d=0;d<this._axes.length;d++)if(this._axes[d].scaleBreaks&&this._axes[d].scaleBreaks._appliedBreaks.length){w?(this._breaksCanvas=ta(this.width,this.height,!0),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=ta(this.width,this.height);this._preRenderCtx=
|
|
203
|
-
this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||D.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};l.prototype.renderElements=function(){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var d=0;d<this.subtitles.length;d++)this.subtitles[d].dockInsidePlotArea||this.subtitles[d].render();this.legend.dockInsidePlotArea||
|
|
203
|
+
this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||D.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};l.prototype.renderElements=function(){if(this.height){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var d=0;d<this.subtitles.length;d++)this.subtitles[d].dockInsidePlotArea||this.subtitles[d].render();this.legend.dockInsidePlotArea||
|
|
204
204
|
this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)D.render(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement);else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(d=0;d<a.length;d++)a[d].setLayout(),a[d].render();var c=[];if(this.animatedRender){var b=ta(this.width,this.height);b.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}kb(this);var a=this.ctx.miterLimit,e;this.ctx.miterLimit=
|
|
205
205
|
3;w&&this._breaksCanvas&&(this._preRenderCtx.drawImage(this.canvas,0,0,this.width,this.height),this._preRenderCtx.drawImage(this._breaksCanvas,0,0,this.width,this.height),this._breaksCanvasCtx.globalCompositeOperation="source-atop",this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(d=0;d<this.plotInfo.plotTypes.length;d++)for(var f=this.plotInfo.plotTypes[d],m=0;m<f.plotUnits.length;m++){var u=f.plotUnits[m],
|
|
206
206
|
C=null;u.targetCanvas&&za(u.targetCanvas);u.targetCanvas=null;this.animatedRender&&(u.targetCanvas=ta(this.width,this.height),u.targetCanvasCtx=u.targetCanvas.getContext("2d"),e=u.targetCanvasCtx.miterLimit,u.targetCanvasCtx.miterLimit=3);"line"===u.type?C=this.renderLine(u):"stepLine"===u.type?C=this.renderStepLine(u):"spline"===u.type?C=this.renderSpline(u):"column"===u.type?C=this.renderColumn(u):"bar"===u.type?C=this.renderBar(u):"area"===u.type?C=this.renderArea(u):"stepArea"===u.type?C=this.renderStepArea(u):
|
|
@@ -210,7 +210,7 @@ u.type&&(C=this.renderBoxAndWhisker(u));for(var k=0;k<u.dataSeriesIndexes.length
|
|
|
210
210
|
(e=ta(this.width,this.height).getContext("2d"),c.push(this.renderIndexLabels(e)));var n=this;if(0<c.length)n.disableToolTip=!0,n._animator.animate(200,n.animationDuration,function(a){n.ctx.clearRect(0,0,n.width,n.height);n.ctx.drawImage(b,0,0,Math.floor(n.width*ka),Math.floor(n.height*ka),0,0,n.width,n.height);for(var e=0;e<c.length;e++)C=c[e],1>a&&"undefined"!==typeof C.startTimePercent?a>=C.startTimePercent&&C.animationCallback(C.easingFunction(a-C.startTimePercent,0,1,1-C.startTimePercent),C):
|
|
211
211
|
C.animationCallback(C.easingFunction(a,0,1,1),C);n.dispatchEvent("dataAnimationIterationEnd",{chart:n})},function(){c=[];for(var a=0;a<n.plotInfo.plotTypes.length;a++)for(var e=n.plotInfo.plotTypes[a],d=0;d<e.plotUnits.length;d++){var f=e.plotUnits[d];f.targetCanvas&&za(f.targetCanvas);f.targetCanvas=null}b=null;n.disableToolTip=!1;n.dispatchEvent("dataAnimationEnd",{chart:n})});else{if(n._breaksCanvas)if(w)n.plotArea.ctx.drawImage(n._breaksCanvas,0,0,this.width,this.height);else for(k=0;k<n._axes.length;k++)n._axes[k].createMask();
|
|
212
212
|
0<n._indexLabels.length&&n.renderIndexLabels();n.dispatchEvent("dataAnimationIterationEnd",{chart:n});n.dispatchEvent("dataAnimationEnd",{chart:n})}this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||va(this._zoomButton,this._resetButton);this.toolTip._updateToolTip();this.renderCount++;Ja&&(n=this,setTimeout(function(){var a=document.getElementById("ghostCanvasCopy");a&&(Oa(a,n.width,n.height),a.getContext("2d").drawImage(n._eventManager.ghostCanvas,
|
|
213
|
-
0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx);for(k=0;k<this._axes.length;k++)this._axes[k].maskCanvas&&(delete this._axes[k].maskCanvas,delete this._axes[k].maskCtx)};l.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();this._preRenderCanvas&&za(this._preRenderCanvas)};l.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,
|
|
213
|
+
0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx);for(k=0;k<this._axes.length;k++)this._axes[k].maskCanvas&&(delete this._axes[k].maskCanvas,delete this._axes[k].maskCtx)}};l.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();this._preRenderCanvas&&za(this._preRenderCanvas)};l.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,
|
|
214
214
|
mousemove:this._plotAreaMouseMove,cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};l.prototype.categoriseDataSeries=function(){for(var a="",d=0;d<this.data.length;d++)if(a=this.data[d],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=l._supportedChartTypes.indexOf(a.type)){for(var c=null,b=!1,e=null,f=!1,m=0;m<this.plotInfo.plotTypes.length;m++)if(this.plotInfo.plotTypes[m].type===a.type){b=!0;c=this.plotInfo.plotTypes[m];break}b||(c={type:a.type,totalDataSeries:0,
|
|
215
215
|
plotUnits:[]},this.plotInfo.plotTypes.push(c));for(m=0;m<c.plotUnits.length;m++)if(c.plotUnits[m].axisYType===a.axisYType&&c.plotUnits[m].axisXType===a.axisXType&&c.plotUnits[m].axisYIndex===a.axisYIndex&&c.plotUnits[m].axisXIndex===a.axisXIndex){f=!0;e=c.plotUnits[m];break}f||(e={type:a.type,previousDataSeriesCount:0,index:c.plotUnits.length,plotType:c,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===a.axisYType?this.axisY[0<=a.axisYIndex&&
|
|
216
216
|
a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[],yAbsTotals:[]},c.plotUnits.push(e));c.totalDataSeries++;e.dataSeriesIndexes.push(d);a.plotUnit=e}for(d=0;d<this.plotInfo.plotTypes.length;d++)for(c=this.plotInfo.plotTypes[d],
|
|
@@ -501,7 +501,7 @@ g[a].indexLabelTextBlock.y)))break;else c=null;return c}function f(a,c,d){d=(d||
|
|
|
501
501
|
Math.PI/2-t&&p.midAngle<Math.PI/2+t?(k=(a-1+g.length)%g.length,k=g[k],a=g[(a+1+g.length)%g.length],"left"===p.hemisphere&&"right"===k.hemisphere&&c>k.indexLabelTextBlock.x?c=k.indexLabelTextBlock.x-15:"right"===p.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x+15)):p.midAngle>3*Math.PI/2-t&&p.midAngle<3*Math.PI/2+t&&(k=(a-1+g.length)%g.length,k=g[k],a=g[(a+1+g.length)%g.length],"right"===p.hemisphere&&"left"===k.hemisphere&&c<k.indexLabelTextBlock.x?c=k.indexLabelTextBlock.x+
|
|
502
502
|
15:"left"===p.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),p.indexLabelTextBlock.y=d,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-y.y,p.indexLabelTextBlock.x-y.x))}return m}function m(){var a=l.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,d=0,m=!0,c=0;10>c&&(1>c||0<d);c++){if(k.radius||!k.radius&&"undefined"!==typeof k.innerRadius&&null!==k.innerRadius&&
|
|
503
503
|
B-d<=D)m=!1;m&&(B-=d);d=0;if("inside"!==k.indexLabelPlacement){w=B*v;for(a=0;a<n.length;a++){var h=g[a];h.indexLabelTextBlock.x=y.x+w*Math.cos(h.midAngle);h.indexLabelTextBlock.y=y.y+w*Math.sin(h.midAngle);h.indexLabelAngle=h.midAngle;h.radius=B;h.percentInnerRadius=E}for(var u,r,a=0;a<n.length;a++){var h=g[a],t=e(a);if(null!==t){u=g[a];r=g[t];var z=0,z=b(u,r)-s;if(0>z){for(var x=r=0,F=0;F<n.length;F++)F!==a&&g[F].hemisphere===h.hemisphere&&(g[F].indexLabelTextBlock.y<h.indexLabelTextBlock.y?r++:
|
|
504
|
-
x++);r=z/(r+x||1)*x;var x=-1*(z-r),I=F=0;"right"===h.hemisphere?(F=f(a,r),x=-1*(z-F),I=f(t,x),+I.toFixed(A)<+x.toFixed(A)&&+F.toFixed(A)<=+r.toFixed(A)&&f(a,-(x-I))):(F=f(t,r),x=-1*(z-F),I=f(a,x),+I.toFixed(A)<+x.toFixed(A)&&+F.toFixed(A)<=+r.toFixed(A)&&f(t,-(x-I)))}}}}else for(a=0;a<n.length;a++)h=g[a],w="pie"===k.type?0.7*B:0.
|
|
504
|
+
x++);r=z/(r+x||1)*x;var x=-1*(z-r),I=F=0;"right"===h.hemisphere?(F=f(a,r),x=-1*(z-F),I=f(t,x),+I.toFixed(A)<+x.toFixed(A)&&+F.toFixed(A)<=+r.toFixed(A)&&f(a,-(x-I))):(F=f(t,r),x=-1*(z-F),I=f(a,x),+I.toFixed(A)<+x.toFixed(A)&&+F.toFixed(A)<=+r.toFixed(A)&&f(t,-(x-I)))}}}}else for(a=0;a<n.length;a++)h=g[a],w="pie"===k.type?0.7*B:0.85*B,t=y.x+w*Math.cos(h.midAngle),r=y.y+w*Math.sin(h.midAngle),h.indexLabelTextBlock.x=t,h.indexLabelTextBlock.y=r;for(a=0;a<n.length;a++)if(h=g[a],t=h.indexLabelTextBlock.measureText(),
|
|
505
505
|
0!==t.height&&0!==t.width)t=t=0,"right"===h.hemisphere?(t=q.x2-(h.indexLabelTextBlock.x+h.indexLabelTextBlock.width+p),t*=-1):t=q.x1-(h.indexLabelTextBlock.x-h.indexLabelTextBlock.width-p),0<t&&(!m&&h.indexLabelText&&(r="right"===h.hemisphere?q.x2-h.indexLabelTextBlock.x:h.indexLabelTextBlock.x-q.x1,0.3*h.indexLabelTextBlock.maxWidth>r?h.indexLabelText="":h.indexLabelTextBlock.maxWidth=0.85*r,0.3*h.indexLabelTextBlock.maxWidth<r&&(h.indexLabelTextBlock.x-="right"===h.hemisphere?2:-2)),Math.abs(h.indexLabelTextBlock.y-
|
|
506
506
|
h.indexLabelTextBlock.height/2-y.y)<B||Math.abs(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2-y.y)<B)&&(t/=Math.abs(Math.cos(h.indexLabelAngle)),9<t&&(t*=0.3),t>d&&(d=t)),t=t=0,0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?(t=q.y2-(h.indexLabelTextBlock.y+h.indexLabelTextBlock.height/2+5),t*=-1):t=q.y1-(h.indexLabelTextBlock.y-h.indexLabelTextBlock.height/2-5),0<t&&(!m&&h.indexLabelText&&(r=0<h.indexLabelAngle&&h.indexLabelAngle<Math.PI?-1:1,0===f(a,t*r)&&f(a,2*r)),Math.abs(h.indexLabelTextBlock.x-
|
|
507
507
|
y.x)<B&&(t/=Math.abs(Math.sin(h.indexLabelAngle)),9<t&&(t*=0.3),t>d&&(d=t)));var M=function(a,b,c){for(var d=[],e=0;d.push(g[b]),b!==c;b=(b+1+n.length)%n.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,d=0,f=!1,k=0;k<n.length;k++)if(f=!1,u=g[k],u.indexLabelText){var m=e(k);if(null!==m){var h=g[m];z=0;
|
|
@@ -925,7 +925,7 @@ this.animationRequestId=this.chart.requestAnimFrame.call(window,function(){f.ani
|
|
|
925
925
|
ka)}},xScaleAnimation:function(a,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/ka,c.canvas.height/ka)}},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/ka,b.height/ka);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/ka,c.canvas.height/
|
|
926
926
|
ka);c.restore()}},easing:{linear:function(a,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}}},$={drawMarker:function(a,d,c,b,e,f,h,l){if(c){var r=1;c.fillStyle=f?f:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=l?l:0;c.setLineDash&&c.setLineDash(I("solid",l));"circle"===b?(c.moveTo(a,d),c.beginPath(),
|
|
927
927
|
c.arc(a,d,e/2,0,2*Math.PI,!1),f&&c.fill(),l&&(h?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),f&&c.fill(),l&&(h?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=r))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),f&&c.fill(),l&&(h?c.stroke():(r=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle=
|
|
928
|
-
"black",c.stroke(),c.globalAlpha=r)),c.beginPath()):"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];$.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return l}();x.version="v3.7.
|
|
928
|
+
"black",c.stroke(),c.globalAlpha=r)),c.beginPath()):"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];$.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return l}();x.version="v3.7.16 GA";window.CanvasJS&&(x&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=x)})();
|
|
929
929
|
/*tslint:enable*/
|
|
930
930
|
/*eslint-enable*/
|
|
931
931
|
/*jshint ignore:end*/
|