@canvasjs/charts 3.15.7 → 3.15.8
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 +15 -14
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS Chart - v3.15.
|
|
2
|
+
CanvasJS Chart - v3.15.8 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2026 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -186,18 +186,19 @@ l(a.stockChart.rangeSelector.inputFields.options.startValue)&&l(a.stockChart.ran
|
|
|
186
186
|
"on",b.textBlock.fontWeight="bold",b.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect,b.render())),a.stockChart.rangeSelector&&a.stockChart.rangeSelector.enabled&&a.stockChart.rangeSelector.render());a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,
|
|
187
187
|
a.stockChart))},this.allDOMEventHandlers),L(this._resetButton,"mousemove",function(){c||(Q(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),L(this._resetButton,"mouseout",function(){c||(Q(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,
|
|
188
188
|
transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&Q(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers),this.overlaidCanvas.style.cursor=a._defaultCursor);this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),Na(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=
|
|
189
|
-
!1))}else this.panEnabled=this.zoomEnabled=!1;jb(this);
|
|
190
|
-
function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0,b=db(this.container);this.options.width?e=this.width:this.width=
|
|
191
|
-
parseFloat(b.
|
|
192
|
-
this.
|
|
193
|
-
this.
|
|
194
|
-
0;
|
|
195
|
-
b.
|
|
196
|
-
b.color=this.selectedColorSet[
|
|
197
|
-
(b.
|
|
198
|
-
b.type+'" with
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
!1))}else this.panEnabled=this.zoomEnabled=!1;jb(this);this._toolBar&&(this._zoomButton&&this._zoomButton.parentNode===this._toolBar&&this._toolBar.appendChild(this._zoomButton),this._resetButton&&this._resetButton.parentNode===this._toolBar&&this._toolBar.appendChild(this._resetButton),this._menuButton&&this._menuButton.parentNode===this._toolBar&&this._toolBar.appendChild(this._menuButton));"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?va(a,a._zoomButton,"zoom"):va(a,
|
|
190
|
+
a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&va(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(e in this.toolTip.options)this.toolTip.options.hasOwnProperty(e)&&this.toolTip.updateOption(e)};s.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,c=0,b=db(this.container);this.options.width?e=this.width:this.width=
|
|
191
|
+
e=0<this.container.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight)?this.container.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight):this.width;l(this.stockChart)||l(this.index)?this.options.height?c=this.height:this.height=c=0<this.container.clientHeight-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom)?this.container.clientHeight-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom):this.height:c=this.height=this.stockChart._chartsHeight[this.index];if(this.canvas.width!==
|
|
192
|
+
e*ka||this.canvas.height!==c*ka){for(b=0;b<a.length;b++)Oa(a[b],e,c);this.bounds={x1:0,y1:0,x2:this.width,y2:this.height,width:this.width,height:this.height};a=!0}else a=!1;return a};s.prototype._initialize=function(){this.isNavigator=l(this.parent)||l(this.parent._defaultsKey)||"Navigator"!==this.parent._defaultsKey?!1:!0;this._animator?this._animator.cancelAllAnimations():this._animator=new ma(this);this.removeAllEventListeners();this.disableToolTip=this.sessionVariables.disableToolTip||!1;this._axes=
|
|
193
|
+
[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=t&&this.animationEnabled&&0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=[];this._indexLabels=[];this._dataInRenderedOrder=[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,plotTypes:[]};this.layoutManager=new Ga(0,0,this.width,this.height,this.isNavigator?
|
|
194
|
+
0:2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];this.title=null;this.subtitles=[];var a=0,e=null;if(this.options.data){for(var c=0;c<this.options.data.length;c++)if(a++,!this.options.data[c].type||0<=s._supportedChartTypes.indexOf(this.options.data[c].type)){var b=new T(this,this.options.data[c],a-1,++this._eventManager.lastObjectId);if(!l(b)&&b.dataPoints)for(var d=0;d<b.dataPoints.length;d++)if(b.dataPoints[d].x&&b.dataPoints[d].x.getTime){b.xValueType="dateTime";
|
|
195
|
+
break}"error"===b.type&&(b.linkedDataSeriesIndex=l(this.options.data[c].linkedDataSeriesIndex)?c-1:this.options.data[c].linkedDataSeriesIndex,0>b.linkedDataSeriesIndex||b.linkedDataSeriesIndex>=this.options.data.length||"number"!==typeof b.linkedDataSeriesIndex||"error"===this.options.data[b.linkedDataSeriesIndex].type)&&(b.linkedDataSeriesIndex=null);null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data.length?(b._colorSet=[this.selectedColorSet[b.index%this.selectedColorSet.length]],
|
|
196
|
+
b.color=this.selectedColorSet[b.index%this.selectedColorSet.length]):"line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===b.type||"ohlc"===b.type||"waterfall"===b.type||"boxAndWhisker"===b.type?(b._colorSet=[this.selectedColorSet[0]],b.color=this.selectedColorSet[0]):b._colorSet=this.selectedColorSet:b._colorSet=[b.color];
|
|
197
|
+
if("boxAndWhisker"===b.type||"error"===b.type)b.whiskerColor=null===b.whiskerColor?b.color:b.whiskerColor,b.stemColor=null===b.stemColor?b.color:b.stemColor;null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(n):
|
|
198
|
+
b.dataPoints.sort(n));this.data.push(b);var d=b.axisPlacement,e=e||d,g;"normal"===d?"xySwapped"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===d?"normal"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?
|
|
199
|
+
g='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===d?"normal"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?g='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===d&&"none"===this.plotInfo.axisPlacement&&(g='You cannot combine "'+b.type+'" with pie chart');
|
|
200
|
+
if(g&&window.console){window.console.log(g);return}}for(c=0;c<this.data.length;c++){if("none"==e&&"error"===this.data[c].type&&window.console){window.console.log('You cannot combine "'+b.type+'" with error chart');return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=e||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=!0;this._plotAreaElements=[]};s._supportedChartTypes=
|
|
201
|
+
Ca("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));s.prototype.setLayout=function(){for(var a=this._plotAreaElements,e=0;e<this.data.length;e++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[e].axisYType||
|
|
201
202
|
"primary"===this.data[e].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new z(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new z(this,"axisY",this.options.axisY[c],c,"axisY","bottom"));this.data[e].axisY=this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?
|
|
202
203
|
this.data[e].axisYIndex:0];this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?this.data[e].axisYIndex:0].dataSeries.push(this.data[e])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new z(this,"axisY",this.options.axisY,0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new z(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[e].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[e]);
|
|
203
204
|
if("secondary"===this.data[e].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(c=0;c<this.options.axisY2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[c]=new z(this,"axisY2",this.options.axisY2[c],c,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new z(this,"axisY2",this.options.axisY2[c],c,"axisY","top"));this.data[e].axisY=this.axisY2[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<
|
|
@@ -992,7 +993,7 @@ onComplete:b});for(a=[];0<this.animations.length;)if(e=this.animations.shift(),c
|
|
|
992
993
|
ka)}},xClipAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ka,b.height/ka);c.restore()}},fadeInAnimation:function(a,e){if(0!==a){var c=e.dest,b=e.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ka,c.canvas.height/ka);c.restore()}},easing:{linear:function(a,e,c,b){return c*a/b+e},easeOutQuad:function(a,e,c,b){return-c*(a/=b)*(a-2)+e},easeOutQuart:function(a,e,c,b){return-c*
|
|
993
994
|
((a=a/b-1)*a*a*a-1)+e},easeInQuad:function(a,e,c,b){return c*(a/=b)*a+e},easeInQuart:function(a,e,c,b){return c*(a/=b)*a*a*a+e}}},Y={drawMarker:function(a,e,c,b,d,g,h,k){if(c){var l=1;c.fillStyle=g?g:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=k?k:0;c.setLineDash&&c.setLineDash(K("solid",k));"circle"===b?(c.moveTo(a,e),c.beginPath(),c.arc(a,e,d/2,0,2*Math.PI,!1),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"square"===b?
|
|
994
995
|
(c.beginPath(),c.rect(a-d/2,e-d/2,d,d),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l))):"triangle"===b?(c.beginPath(),c.moveTo(a-d/2,e+d/2),c.lineTo(a+d/2,e+d/2),c.lineTo(a,e-d/2),c.closePath(),g&&c.fill(),k&&(h?c.stroke():(l=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=l)),c.beginPath()):"cross"===b&&(c.strokeStyle=g,c.lineWidth=d/4,c.beginPath(),c.moveTo(a-d/2,e-d/2),c.lineTo(a+d/2,e+d/2),c.stroke(),
|
|
995
|
-
c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return s}();s.version="v3.15.
|
|
996
|
+
c.moveTo(a+d/2,e-d/2),c.lineTo(a-d/2,e+d/2),c.stroke())}},drawMarkers:function(a){for(var e=0;e<a.length;e++){var c=a[e];Y.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return s}();s.version="v3.15.8 GA";window.CanvasJS&&(s&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=s)})();
|
|
996
997
|
|
|
997
998
|
/*
|
|
998
999
|
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.
|