@canvasjs/stockcharts 1.16.6 → 1.16.7
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.stock.min.js +8 -7
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.stock.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS StockChart - v1.16.
|
|
2
|
+
CanvasJS StockChart - v1.16.7 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2026 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -280,9 +280,10 @@ this.axisX2[b].convertPixelToValue(this.sessionVariables.mouseX)),e(g)||g)c={cha
|
|
|
280
280
|
e(g)||g)c={chart:this,crosshair:this.axisY[b].crosshair.options,axis:this.axisY[b],value:this.axisY[b].crosshair.value},this.axisY[b].crosshair.dispatchEvent("updated",c,this.axisY[b])}else e(c)||c||this.axisY[b].showCrosshair(this.axisY[b].crosshair._updatedValue);for(b=0;b<this.axisY2.length;b++)if(c=this.axisY2[b].sessionVariables.crosshairShownByPixel,this.axisY2[b]!=a&&this.axisY2[b].crosshair&&this.axisY2[b].crosshair.enabled&&!this.axisY2[b].sessionVariables._crosshairHidden)if(c&&this.sessionVariables.mouseX>
|
|
281
281
|
this.plotArea.x1&&this.sessionVariables.mouseX<this.plotArea.x2&&this.sessionVariables.mouseY>this.plotArea.y1&&this.sessionVariables.mouseY<this.plotArea.y2){if(this.plotInfo&&"xySwapped"===this.plotInfo.axisPlacement?this.axisY2[b].crosshair.render(this.sessionVariables.mouseX,null,this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseX)):this.axisY2[b].crosshair.render(null,this.sessionVariables.mouseY,this.axisY2[b].convertPixelToValue(this.sessionVariables.mouseY)),e(g)||g)c={chart:this,
|
|
282
282
|
crosshair:this.axisY2[b].crosshair.options,axis:this.axisY2[b],value:this.axisY2[b].crosshair.value},this.axisY2[b].crosshair.dispatchEvent("updated",c,this.axisY2[b])}else e(c)||c||this.axisY2[b].showCrosshair(this.axisY2[b].crosshair._updatedValue)};l.prototype.getDataPointAtXY=function(a,g,c){c=c||!1;for(var b=[],f=this._dataInRenderedOrder.length-1;0<=f;f--){var s=null;(s=this._dataInRenderedOrder[f].getDataPointAtXY(a,g,c))&&b.push(s)}a=null;g=!1;for(c=0;c<b.length;c++)if("line"===b[c].dataSeries.type||
|
|
283
|
-
"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(f=pa("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=f/2){g=!0;break}for(c=0;c<b.length;c++)g&&"line"!==b[c].dataSeries.type&&"
|
|
284
|
-
|
|
285
|
-
a.
|
|
283
|
+
"spline"===b[c].dataSeries.type||"splineArea"===b[c].dataSeries.type||"rangeSplineArea"===b[c].dataSeries.type||"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"rangeArea"===b[c].dataSeries.type||"stackedArea"===b[c].dataSeries.type||"stackedArea100"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(f=pa("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=f/2){g=!0;break}for(c=0;c<b.length;c++)g&&"line"!==b[c].dataSeries.type&&"spline"!==b[c].dataSeries.type&&
|
|
284
|
+
"splineArea"!==b[c].dataSeries.type&&"rangeSplineArea"!==b[c].dataSeries.type&&"stepLine"!==b[c].dataSeries.type&&"area"!==b[c].dataSeries.type&&"rangeArea"!==b[c].dataSeries.type&&"stackedArea"!==b[c].dataSeries.type&&"stackedArea100"!==b[c].dataSeries.type&&"stepArea"!==b[c].dataSeries.type||(a?b[c].distance<=a.distance&&(a=b[c]):a=b[c]);return a};l.prototype.getObjectAtXY=function(a,g,c){var b=null;if(c=this.getDataPointAtXY(a,g,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(w)b=
|
|
285
|
+
gb(a,g,this._eventManager.ghostCtx);else for(c=0;c<this.legend.items.length;c++){var f=this.legend.items[c];a>=f.x1&&(a<=f.x2&&g>=f.y1&&g<=f.y2)&&(b=f.id)}return b};l.prototype.getAutoFontSize=lb;l.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};l.prototype.clearCanvas=kb;l.prototype.attachEvent=function(a){this._events.push(a)};l.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var g=[],c=a.changedTouches,
|
|
286
|
+
b=c?c[0]:a,f=null;switch(a.type){case "touchstart":case "MSPointerDown":g=["mousemove","mousedown"];this._lastTouchData=Aa(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":g=["mousemove"];break;case "touchend":case "MSPointerUp":var s=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,g="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>s?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&
|
|
286
287
|
1<c.length)){f=Aa(b);f.time=new Date;try{var D=f.y-this._lastTouchData.y,s=f.time-this._lastTouchData.time;if(1<Math.abs(D)&&this._lastTouchData.scroll||5<Math.abs(D)&&250>s)this._lastTouchData.scroll=!0,this.stockChart&&(this.stockChart._chartScroll=!0)}catch(d){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c<g.length;c++)if(f=g[c],D=document.createEvent("MouseEvent"),D.initMouseEvent(f,!0,!0,
|
|
287
288
|
window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null),b.target.dispatchEvent(D),!e(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<s||"click"===f)a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.cancelable&&a.preventDefault(),this.stockChart&&(this.stockChart._chartScroll=null)}}};l.prototype._dispatchRangeEvent=function(a,g){var c={chart:this};c.type=a;c.trigger=g;var b=[];this.axisX&&0<this.axisX.length&&b.push("axisX");
|
|
288
289
|
this.axisX2&&0<this.axisX2.length&&b.push("axisX2");this.axisY&&0<this.axisY.length&&b.push("axisY");this.axisY2&&0<this.axisY2.length&&b.push("axisY2");for(var f=0;f<b.length;f++)if(e(c[b[f]])&&(c[b[f]]=[]),"axisY"===b[f])for(var s=0;s<this.axisY.length;s++)c[b[f]].push({viewportMinimum:this[b[f]][s].sessionVariables.newViewportMinimum,viewportMaximum:this[b[f]][s].sessionVariables.newViewportMaximum});else if("axisY2"===b[f])for(s=0;s<this.axisY2.length;s++)c[b[f]].push({viewportMinimum:this[b[f]][s].sessionVariables.newViewportMinimum,
|
|
@@ -1003,7 +1004,7 @@ a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.c
|
|
|
1003
1004
|
a,c.canvas.width/ka,a*c.canvas.height/ka)}},xScaleAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas,f=d.animationBase;c.drawImage(b,0,0,b.width,b.height,f-f*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,
|
|
1004
1005
|
b.height,0,0,c.canvas.width/ka,c.canvas.height/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}}},B={drawMarker:function(a,d,c,b,f,e,h,l){if(c){var C=1;c.fillStyle=e?e:"#000000";c.strokeStyle=h?h:"#000000";c.lineWidth=l?l:0;c.setLineDash&&c.setLineDash(S("solid",
|
|
1005
1006
|
l));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,f/2,0,2*Math.PI,!1),e&&c.fill(),l&&(h?c.stroke():(C=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=C))):"square"===b?(c.beginPath(),c.rect(a-f/2,d-f/2,f,f),e&&c.fill(),l&&(h?c.stroke():(C=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=C))):"triangle"===b?(c.beginPath(),c.moveTo(a-f/2,d+f/2),c.lineTo(a+f/2,d+f/2),c.lineTo(a,d-f/2),c.closePath(),e&&c.fill(),l&&(h?c.stroke():(C=c.globalAlpha,
|
|
1006
|
-
c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=C)),c.beginPath()):"cross"===b&&(c.strokeStyle=e,c.lineWidth=f/4,c.beginPath(),c.moveTo(a-f/2,d-f/2),c.lineTo(a+f/2,d+f/2),c.stroke(),c.moveTo(a+f/2,d-f/2),c.lineTo(a-f/2,d+f/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];B.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return l}();Ha.version="v3.16.
|
|
1007
|
+
c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=C)),c.beginPath()):"cross"===b&&(c.strokeStyle=e,c.lineWidth=f/4,c.beginPath(),c.moveTo(a-f/2,d-f/2),c.lineTo(a+f/2,d+f/2),c.stroke(),c.moveTo(a+f/2,d-f/2),c.lineTo(a-f/2,d+f/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];B.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return l}();Ha.version="v3.16.7 GA";window.CanvasJS&&(Ha&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=
|
|
1007
1008
|
Ha);X.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,culture:"en",creditHref:"",creditText:"CanvasJS",exportEnabled:!1,exportFileName:"StockChart",colorSet:"colorSet1",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",navigator:"readWrite",rangeSelector:"readWrite",charts:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}};
|
|
1008
1009
|
X.Navigator={enabled:!0,width:500,height:70,verticalAlign:"bottom",horizontalAlign:"left",dynamicUpdate:!0,backgroundColor:"#fff",animationEnabled:!1,animationDuration:1200,theme:"light1",colorSet:"colorSet1",publicProperties:{slider:"readWrite",backgroundColor:"readWrite",animationEnabled:"readWrite",animationDuration:"readWrite",theme:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",colorSet:"readWrite",options:"readWrite",bounds:"readOnly"}};
|
|
1009
1010
|
X.RangeSelector={enabled:!0,width:500,height:35,label:"Range",verticalAlign:"top",horizontalAlign:"center",selectedRangeButtonIndex:null,publicProperties:{options:"readWrite",buttons:"readWrite",inputFields:"readWrite",buttonStyle:"readWrite",bounds:"readOnly"}};X.RangeButton={range:null,rangeType:null,label:null,style:"position: inline; margin: 5px 0;text-align:center;cursor: pointer;",backgroundColorDisabled:"#ddd",publicProperties:{options:"readWrite",bounds:"readOnly"}};X.ButtonStyle={backgroundColor:"#fff",
|
|
@@ -1104,7 +1105,7 @@ Math.min(t.maximum,this.navigator.slider.maximum):this.navigator.slider.maximum,
|
|
|
1104
1105
|
this._selectedRangeButtonIndex=null:this.navigator.slider&&void 0!==this.navigator.slider.options.maximum||(this.rangeSelector.inputFields.enabled&&!e(this.rangeSelector.inputFields.options.endValue)||k===this._prevViewportMaximum)||(this._selectedRangeButtonIndex=null));if(this.charts&&this.charts.length)for(d=0;d<this.charts.length;d++)if(this.charts[d].axisX&&this.charts[d].axisX.length&&isFinite(this.charts[d].axisX[0].minimum)&&isFinite(this.charts[d].axisX[0].maximum)){f=this.charts[d].axisX[0];
|
|
1105
1106
|
break}else f||(f=this.charts[d].axisX2[0]);this.rangeSelector.hasOptionChanged("selectedRangeButtonIndex")&&(this.rangeSelector.sessionVariables._clickedRangeButtonIndex=null);var H=null,M=this.navigator&&this.navigator.slider&&this.navigator.slider.hasOptionChanged("maximum")||this.rangeSelector&&this.rangeSelector.inputFields&&this.rangeSelector.inputFields.hasOptionChanged("endValue")||k!==this._prevViewportMaximum;!e(this.rangeSelector.selectedRangeButtonIndex)&&this.rangeSelector.selectedRangeButtonIndex<
|
|
1106
1107
|
this.rangeSelector.buttons.length&&(d=this.rangeSelector.buttons[this.rangeSelector.selectedRangeButtonIndex],-1!==wa("year month week day hour minute second millisecond number".split(" ")).indexOf(d.rangeType)?H=d.range*E[d.rangeType+"Duration"]:"ytd"===d.rangeType&&(H="ytd"));for(d=0;d<this.rangeSelector.buttons.length;d++){y=null;b=this.rangeSelector.buttons[d];-1!==wa("year month week day hour minute second millisecond number".split(" ")).indexOf(b.rangeType)?y=b.range*E[b.rangeType+"Duration"]:
|
|
1107
|
-
"ytd"===b.rangeType?y="ytd":"all"===b.rangeType&&(y=null);if("ytd"===b.rangeType&&this.isDateTime||0!==y&&y<g)b.enabled=!0;b.mousemove=function(a){V(h.rangeSelector.ctx,h.rangeSelector.buttons[0].bounds.x1-h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.bounds.y1,h.rangeSelector.buttons[h.rangeSelector.buttons.length-1].bounds.x2+h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.buttons[h.rangeSelector.buttons.length-1].bounds.y2+h.rangeSelector.buttonStyle.borderThickness/
|
|
1108
|
+
"ytd"===b.rangeType?y="ytd":"all"===b.rangeType&&(y=null);if("ytd"===b.rangeType&&this.isDateTime||isFinite(g)&&0!==y&&y<g)b.enabled=!0;b.mousemove=function(a){V(h.rangeSelector.ctx,h.rangeSelector.buttons[0].bounds.x1-h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.bounds.y1,h.rangeSelector.buttons[h.rangeSelector.buttons.length-1].bounds.x2+h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.buttons[h.rangeSelector.buttons.length-1].bounds.y2+h.rangeSelector.buttonStyle.borderThickness/
|
|
1108
1109
|
2,h.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<h.rangeSelector.buttons.length;b++)h.rangeSelector.buttons[b]===this&&"off"===this.state&&this.enabled||h.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};b.mouseover=function(a){V(h.rangeSelector.ctx,
|
|
1109
1110
|
h.rangeSelector.buttons[0].bounds.x1-h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.bounds.y1,h.rangeSelector.buttons[h.rangeSelector.buttons.length-1].bounds.x2+h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.buttons[h.rangeSelector.buttons.length-1].bounds.y2+h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.stockChart.backgroundColor,0,null,0,0,0,0,1);for(var b=0;b<h.rangeSelector.buttons.length;b++)h.rangeSelector.buttons[b]===this&&"off"===this.state&&
|
|
1110
1111
|
this.enabled||h.rangeSelector.buttons[b].textBlock.render(!0);this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};b.mouseout=function(a){V(h.rangeSelector.ctx,h.rangeSelector.buttons[0].bounds.x1-h.rangeSelector.buttonStyle.borderThickness/2,h.rangeSelector.bounds.y1,h.rangeSelector.buttons[h.rangeSelector.buttons.length-
|
|
@@ -1273,7 +1274,7 @@ this.elements[d].style.height=this.style.fontSize+"px",this.elements[d].style.fo
|
|
|
1273
1274
|
(this.style.padding.left||0)+"px"):this.elements[d].style.padding=this.style.padding+"px",this.elements[d].style.mozAppearance=this.elements[d].style.webkitAppearance=this.elements[d].style.appearance="none",this.elements[d].style.webkitBorderRadius=0,this.elements[d].style.mozBorderRadius=0,this.elements[d].style.borderRadius=0,this.elements[d].style.boxSizing="content-box";this.parent=this.rangeSelector=this.stockChart.rangeSelector}};ja(Z,Y);Z.prototype._updateOptions=function(){this.updateOption("backgroundColor");
|
|
1274
1275
|
this.updateOption("backgroundColorOnHover");this.updateOption("backgroundColorOnSelect");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("labelFontColor");this.updateOption("labelFontColorOnHover");this.updateOption("labelFontSize");this.updateOption("labelFontStyle");this.updateOption("labelFontFamily");this.updateOption("labelFontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};
|
|
1275
1276
|
ja(ga,Y);ga.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");this.updateOption("borderColorOnFocus");this.updateOption("fontColor");this.updateOption("fontSize");this.updateOption("fontStyle");this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return q}();
|
|
1276
|
-
T.version="v1.16.
|
|
1277
|
+
T.version="v1.16.7 GA";window.CanvasJS&&(T&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=T),T&&!window.CanvasJS.Chart&&(window.CanvasJS.Chart=Ha,window.CanvasJS.StockChart=T))})();
|
|
1277
1278
|
|
|
1278
1279
|
/*
|
|
1279
1280
|
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.
|