@canvasjs/stockcharts 1.7.37 → 1.7.38
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 +4 -4
- package/package.json +1 -1
package/LICENSE
CHANGED
package/canvasjs.stock.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CanvasJS StockChart - v1.7.
|
|
2
|
+
CanvasJS StockChart - v1.7.38 GA - https://canvasjs.com/
|
|
3
3
|
Copyright 2024 fenopix
|
|
4
4
|
|
|
5
5
|
--------------------- License Information --------------------
|
|
@@ -542,7 +542,7 @@ E[K].label&&0<E[K].label.toString().length)&&(L=!0),!L&&"function"===typeof v.in
|
|
|
542
542
|
(P=f(v.options.neckHeight)?0.35*D:v.neckHeight,I=f(v.options.neckWidth)?0.25*a:v.neckWidth,"string"===typeof P&&P.match(/%$/)?(P=parseInt(P),P=P*D/100):P=parseInt(P),"string"===typeof I&&I.match(/%$/)?(I=parseInt(I),I=I*a/100):I=parseInt(I),P>D?P=D:0>=P&&(P=0),I>a?I=a-0.5:0>=I&&(I=0)):"pyramid"===v.type&&(I=P=0,v.reversed=v.reversed?!1:!0);var C=K+a/2,Y=K,Z=K+a,S=v.reversed?M:O,T=C-I/2,$=C+I/2,ea=v.reversed?O+P:M-P,aa=v.reversed?O:M;a=[];var C=[],U=[],F=[],W=O,da,ha=(ea-S)/(T-Y),ja=-ha,K="area"===
|
|
543
543
|
(v.valueRepresents?v.valueRepresents:"height")?c():g();if(-1!==K){if(v.reversed)for(F.push(W),I=K.length-1;0<I;I--)W+=K[I],F.push(W);else for(I=0;I<K.length;I++)W+=K[I],F.push(W);if(v.reversed)for(I=0;I<K.length;I++)F[I]<ea?(a.push(T),C.push($),da=I):(a.push((F[I]-S+ha*Y)/ha),C.push((F[I]-S+ja*Z)/ja));else for(I=0;I<K.length;I++)F[I]<ea?(a.push((F[I]-S+ha*Y)/ha),C.push((F[I]-S+ja*Z)/ja),da=I):(a.push(T),C.push($));for(I=0;I<K.length-1;I++)W=v.reversed?E[E.length-1-I].color?E[E.length-1-I].color:v._colorSet[(E.length-
|
|
544
544
|
1-I)%v._colorSet.length]:E[I].color?E[I].color:v._colorSet[I%v._colorSet.length],I===da?U.push({x1:a[I],y1:F[I],x2:C[I],y2:F[I],x3:$,y3:ea,x4:C[I+1],y4:F[I+1],x5:a[I+1],y5:F[I+1],x6:T,y6:ea,id:I,height:F[I+1]-F[I],color:W}):U.push({x1:a[I],y1:F[I],x2:C[I],y2:F[I],x3:C[I+1],y3:F[I+1],x4:a[I+1],y4:F[I+1],id:I,height:F[I+1]-F[I],color:W});var ia=2,J=[],qa=!1,fa=[],oa=[],K=!1;a=a=0;Fa(fa);for(I=0;I<E.length;I++)E[I].exploded&&(K=!0,v.reversed?fa.push(E.length-1-I):fa.push(I));N.clearRect(y.x1,y.y1,y.width,
|
|
545
|
-
y.height);N.fillStyle=z.backgroundColor;N.fillRect(y.x1,y.y1,y.width,y.height);if(L&&v.visible&&(b(),h(),
|
|
545
|
+
y.height);N.fillStyle=z.backgroundColor;N.fillRect(y.x1,y.y1,y.width,y.height);if(L&&v.visible&&(b(),h(),"inside"!==v.indexLabelPlacement)){e();d();for(I=0;I<E.length;I++)J[I].isDirty||(a=J[I].textBlock.x+J[I].width,a=(Q-a)/2,0==I&&(G=a),G>a&&(G=a));for(I=0;I<U.length;I++)U[I].x1+=G,U[I].x2+=G,U[I].x3+=G,U[I].x4+=G,U[I].x5&&(U[I].x5+=G,U[I].x6+=G),J[I].textBlock.x+=G}for(I=0;I<U.length;I++)G=U[I],r(N,G,v.fillOpacity),oa.push(G.y1);B(N);L&&v.visible&&("inside"===v.indexLabelPlacement||z.animationEnabled||
|
|
546
546
|
n(N),z.animationEnabled||w());if(!L)for(I=0;I<E.length;I++)G=v.dataPointIds[I],a={id:G,objectType:"dataPoint",dataPointIndex:I,dataSeriesIndex:0,funnelSection:U[v.reversed?E.length-1-I:I]},z._eventManager.objectMap[G]=a;!z.animationEnabled&&K?t(z,-1,0):z.animationEnabled&&!z.animatedRender&&t(z,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!qa&&!z.isAnimating&&(f(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=v.reversed?E.length-1-a.dataPointIndex:a.dataPointIndex,0<=
|
|
547
547
|
b)){a=b;if("funnel"===v.type||"pyramid"===v.type)v.reversed?E[E.length-1-a].exploded=E[E.length-1-a].exploded?!1:!0:E[a].exploded=E[a].exploded?!1:!0;t(z,b,500)}};return{source:N,dest:this.plotArea.ctx,animationCallback:function(a,b){u.fadeInAnimation(a,b);1<=a&&(t(z,-1,500),B(z.plotArea.ctx||z.ctx))},easingFunction:u.easing.easeInQuad,animationBase:0}}}}};t.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||
|
|
548
548
|
window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();t.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;t.prototype.set=function(a,g,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=g,c&&this.render()):t.base.set.call(this,a,g,c)};t.prototype.exportChart=
|
|
@@ -931,7 +931,7 @@ this.chart.requestAnimFrame.call(window,function(){h.animate.call(h)}):this.char
|
|
|
931
931
|
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/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,
|
|
932
932
|
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,e,h,f,r){if(c){var u=1;c.fillStyle=h?h:"#000000";c.strokeStyle=f?f:"#000000";c.lineWidth=r?r:0;c.setLineDash&&c.setLineDash(R("solid",r));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),h&&c.fill(),
|
|
933
933
|
r&&(f?c.stroke():(u=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=u))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),h&&c.fill(),r&&(f?c.stroke():(u=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=u))):"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(),h&&c.fill(),r&&(f?c.stroke():(u=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=u)),c.beginPath()):
|
|
934
|
-
"cross"===b&&(c.strokeStyle=h,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];B.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();Ka.version="v3.7.
|
|
934
|
+
"cross"===b&&(c.strokeStyle=h,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];B.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return t}();Ka.version="v3.7.38 GA";window.CanvasJS&&(Ka&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=Ka);da.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",
|
|
935
935
|
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"}};da.Navigator={enabled:!0,width:500,height:70,verticalAlign:"bottom",horizontalAlign:"center",
|
|
936
936
|
dynamicUpdate:!0,backgroundColor:"#fff",animationEnabled:!1,animationDuration:1200,theme:"light1",publicProperties:{slider:"readWrite",backgroundColor:"readWrite",animationEnabled:"readWrite",animationDuration:"readWrite",theme:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly"}};da.RangeSelector={enabled:!0,width:500,height:35,label:"Range",verticalAlign:"top",horizontalAlign:"center",selectedRangeButtonIndex:null,
|
|
937
937
|
publicProperties:{options:"readWrite",buttons:"readWrite",inputFields:"readWrite",buttonStyle:"readWrite",bounds:"readOnly"}};da.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"}};da.ButtonStyle={backgroundColor:"#fff",backgroundColorOnHover:"#2196f3",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:2,labelFontColor:"#000",
|
|
@@ -1117,7 +1117,7 @@ l[d]:this.label};N.prototype.render=function(){this.textBlock.render(!0)};ha(V,Z
|
|
|
1117
1117
|
this.style.fontFamily,this.elements[d].style.fontWeight=this.style.fontWeight,this.elements[d].style.lineHeight=1,isNaN(this.style.padding)?(this.elements[d].style.paddingTop=this.style.padding.top+"px",this.elements[d].style.paddingRight=this.style.padding.right+"px",this.elements[d].style.paddingBottom=this.style.padding.bottom+"px",this.elements[d].style.paddingLeft=this.style.padding.left+"px"):this.elements[d].style.padding=this.style.padding+"px",this.elements[d].style.mozAppearance=this.elements[d].style.webkitAppearance=
|
|
1118
1118
|
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}};ha(W,Z);W.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("backgroundColorOnHover");this.updateOption("backgroundColorOnSelect");this.updateOption("borderColor");this.updateOption("borderThickness");
|
|
1119
1119
|
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")};ha($,Z);$.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");
|
|
1120
|
-
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 F}();S.version="v1.7.
|
|
1120
|
+
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 F}();S.version="v1.7.38 GA";window.CanvasJS&&(S&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=S),S&&!window.CanvasJS.Chart&&
|
|
1121
1121
|
(window.CanvasJS.Chart=Ka,window.CanvasJS.StockChart=S))})();
|
|
1122
1122
|
|
|
1123
1123
|
/*
|