diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d08a00060..40c38459472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,17 @@ To see all merged commits on the master branch that will be part of the next plo where X.Y.Z is the semver of most recent plotly.js release. +## [3.5.1] -- 2026-05-01 + +### Changed + +- Reduce NPM bundle size by removing unneeded files [[#7746](https://github.com/plotly/plotly.js/pull/7746)] + +### Fixed + +- Fix bug where certain `axis.minallowed` values could cause axis to be reversed [[#7761](https://github.com/plotly/plotly.js/pull/7761)] + + ## [3.5.0] -- 2026-04-03 ### Added diff --git a/CITATION.cff b/CITATION.cff index b910369179b..38d294398c5 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,7 +9,7 @@ authors: - family-names: "Samimi" given-names: "Mojtaba" title: "Open source Plotly charting library" -version: 3.5.0 +version: 3.5.1 doi: 10.5281/zenodo.13964707 -date-released: 2026-04-03 +date-released: 2026-05-01 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index c57d5027cb6..59b737594be 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo ```html
- + @@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo Alternatively, you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag. ```html ``` @@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more atp?1:c>=p?0:NaN}e.descending=function(c,p){return p =p.length)return S?S.call(c,N):A?N.sort(A):N;for(var X=-1,j=N.length,ee=p[G++],he,we,te,se=new b,ue;++X p?1:c>=p?0:NaN}e.descending=function(c,p){return p =p.length)return S?S.call(c,N):A?N.sort(A):N;for(var X=-1,j=N.length,ee=p[G++],he,we,te,se=new b,ue;++X oe)E=E.L;else if(R=p-mN(E,x),R>oe){if(!E.R){A=E;break}E=E.R}else{L>-oe?(A=E.P,S=E):R>-oe?(A=E,S=E.N):A=S=E;break}var N=o5(c);if(hs.insert(A,N),!(!A&&!S)){if(A===S){ps(A),S=o5(A.site),hs.insert(N,S),N.edge=S.edge=Hu(A.site,N.site),ds(A),ds(S);return}if(!S){N.edge=Hu(A.site,N.site);return}ps(A),ps(S);var G=A.site,X=G.x,j=G.y,ee=c.x-X,he=c.y-j,we=S.site,te=we.x-X,se=we.y-j,ue=2*(ee*se-he*te),_e=ee*ee+he*he,Te=te*te+se*se,ce={x:(se*_e-he*Te)/ue+X,y:(ee*Te-te*_e)/ue+j};jc(S.edge,G,we,ce),N.edge=Hu(G,c,null,ce),S.edge=Hu(c,we,null,ce),ds(A),ds(S)}}function s5(c,p){var x=c.site,A=x.x,S=x.y,L=S-p;if(!L)return A;var R=c.P;if(!R)return-1/0;x=R.site;var E=x.x,N=x.y,G=N-p;if(!G)return E;var X=E-A,j=1/L-1/G,ee=X/G;return j?(-ee+Math.sqrt(ee*ee-2*j*(X*X/(-2*G)-N+G/2+S-L/2)))/j+A:(A+E)/2}function mN(c,p){var x=c.N;if(x)return s5(x,p);var A=c.site;return A.y===p?A.x:1/0}function u5(c){this.site=c,this.edges=[]}u5.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(f5),c.length};function yN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,R,E,N,G=jl,X=G.length,j,ee,he,we,te,se;X--;)if(j=G[X],!(!j||!j.prepare()))for(he=j.edges,we=he.length,ee=0;ee>>1;c(p[L],x)<0?A=L+1:S=L}return A},right:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A>>1;c(p[L],x)>0?S=L:A=L+1}return A}}}var y=m(v);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,S,L;A;)L=Math.random()*A--|0,S=c[A+p],c[A+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function lt(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function _t(c){return c>1?0:c<-1?Ee:Math.acos(c)}function gt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Bt(c){return((c=Math.exp(c))-1/c)/2}function zt(c){return((c=Math.exp(c))+1/c)/2}function Oa(c){return((c=Math.exp(2*c))-1)/(c+1)}function ca(c){return(c=Math.sin(c/2))*c}var aa=Math.SQRT2,Ba=2,na=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],R=p[1],E=p[2],N=L-x,G=R-A,X=N*N+G*G,j,ee;if(X>4,A=A>>4|A,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(A,S,L))}function $r(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-A,R,E,N=(S+A)/2;return L?(E=N<.5?L/(S+A):L/(2-S-A),c==S?R=(p-x)/L+(p>>1;c(p[L],x)<0?A=L+1:S=L}return A},right:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A>>1;c(p[L],x)>0?S=L:A=L+1}return A}}}var y=m(v);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,S,L;A;)L=Math.random()*A--|0,S=c[A+p],c[A+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function lt(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function _t(c){return c>1?0:c<-1?Ee:Math.acos(c)}function gt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Bt(c){return((c=Math.exp(c))-1/c)/2}function zt(c){return((c=Math.exp(c))+1/c)/2}function Oa(c){return((c=Math.exp(2*c))-1)/(c+1)}function ca(c){return(c=Math.sin(c/2))*c}var aa=Math.SQRT2,Ba=2,na=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],R=p[1],E=p[2],N=L-x,G=R-A,X=N*N+G*G,j,ee;if(X>4,A=A>>4|A,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(A,S,L))}function $r(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-A,R,E,N=(S+A)/2;return L?(E=N<.5?L/(S+A):L/(2-S-A),c==S?R=(p-x)/L+(p=X&&ue.x<=ee&&ue.y>=j&&ue.y<=he?[[X,he],[ee,he],[ee,j],[X,j]]:[];_e.point=N[te]}),G}function E(N){return N.map(function(G,X){return{x:Math.round(A(G,X)/oe)*oe,y:Math.round(S(G,X)/oe)*oe,i:X}})}return R.links=function(N){return k1(E(N)).edges.filter(function(G){return G.l&&G.r}).map(function(G){return{source:N[G.l.i],target:N[G.r.i]}})},R.triangles=function(N){var G=[];return k1(E(N)).cells.forEach(function(X,j){for(var ee=X.site,he=X.edges.sort(f5),we=-1,te=he.length,se,ue,_e=he[te-1].edge,Te=_e.l===ee?_e.r:_e.l;++we0&&(P=0);break}return P>0?k.slice(0,P)+k.slice(z+1):k}var f;function v(k,q){var D=t(k,q);if(!D)return k+"";var P=D[0],z=D[1],F=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,O=P.length;return F===O?P:F>O?P+new Array(F-O+1).join("0"):F>0?P.slice(0,F)+"."+P.slice(F):"0."+new Array(1-F).join("0")+t(k,Math.max(0,q+F-1))[0]}function h(k,q){var D=t(k,q);if(!D)return k+"";var P=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+P:P.length>z+1?P.slice(0,z+1)+"."+P.slice(z+1):P+new Array(z-P.length+2).join("0")}var d={"%":function(k,q){return(k*100).toFixed(q)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,q){return k.toExponential(q)},f:function(k,q){return k.toFixed(q)},g:function(k,q){return k.toPrecision(q)},o:function(k){return Math.round(k).toString(8)},p:function(k,q){return h(k*100,q)},r:h,s:v,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var y=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(k){var q=k.grouping===void 0||k.thousands===void 0?m:n(y.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",P=k.currency===void 0?"":k.currency[1]+"",z=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:i(y.call(k.numerals,String)),O=k.percent===void 0?"%":k.percent+"",I=k.minus===void 0?"-":k.minus+"",W=k.nan===void 0?"NaN":k.nan+"";function Z(Y){Y=o(Y);var H=Y.fill,Q=Y.align,K=Y.sign,ne=Y.symbol,pe=Y.zero,ye=Y.width,Se=Y.comma,re=Y.precision,Ce=Y.trim,de=Y.type;de==="n"?(Se=!0,de="g"):d[de]||(re===void 0&&(re=12),Ce=!0,de="g"),(pe||H==="0"&&Q==="=")&&(pe=!0,H="0",Q="=");var be=ne==="$"?D:ne==="#"&&/[boxX]/.test(de)?"0"+de.toLowerCase():"",ge=ne==="$"?P:/[%p]/.test(de)?O:"",ke=d[de],B=/[defgprs%]/.test(de);re=re===void 0?6:/[gprs]/.test(de)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function $(U){var le=be,ve=ge,me,De,Re;if(de==="c")ve=ke(U)+ve,U="";else{U=+U;var Le=U<0||1/U<0;if(U=isNaN(U)?W:ke(Math.abs(U),re),Ce&&(U=u(U)),Le&&+U==0&&K!=="+"&&(Le=!1),le=(Le?K==="("?K:I:K==="-"||K==="("?"":K)+le,ve=(de==="s"?g[8+f/3]:"")+ve+(Le&&K==="("?")":""),B){for(me=-1,De=U.length;++me
>4,g[f++]=(h&15)<<4|d>>2,g[f++]=(d&3)<<6|m&63;return y};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var cl=J((Pie,Cb)=>{"use strict";Cb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var on=J(Xn=>{"use strict";var mI=K1().decode,yI=cl(),Q1=Array.isArray,gI=ArrayBuffer,bI=DataView;function Lb(e){return gI.isView(e)&&!(e instanceof bI)}Xn.isTypedArray=Lb;function Mv(e){return Q1(e)||Lb(e)}Xn.isArrayOrTypedArray=Mv;function xI(e){return!Mv(e[0])}Xn.isArray1D=xI;Xn.ensureArray=function(e,r){return Q1(e)||(e=[]),e.length=r,e};var sa={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};sa.uint8c=sa.u1c;sa.uint8=sa.u1;sa.int8=sa.i1;sa.uint16=sa.u2;sa.int16=sa.i2;sa.uint32=sa.u4;sa.int32=sa.i4;sa.float32=sa.f4;sa.float64=sa.f8;function $1(e){return e.constructor===ArrayBuffer}Xn.isArrayBuffer=$1;Xn.decodeTypedArraySpec=function(e){var r=[],t=_I(e),a=t.dtype,n=sa[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;$1(l)||(l=mI(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,v=+o[0],h=i*v,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var Db=Or(),ep=on().isArrayOrTypedArray;zb.exports=function(r,t){if(Db(t))t=String(t);else if(typeof t!="string"||t.slice(-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o
/g),h=0;h
/i;An.BR_TAG_ALL=/
/gi;var o7=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,s7=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,u7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,qY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function _o(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&f0(a)}var DY=/(^|;)\s*color:/;An.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,l=e.split(Xp),o=[],s="",u=0,f=0;f=k&&b
=re.min&&(ne
=D:I<=D;I=Ye.tickIncrement(I,V,f,n)){if(b&&W++,C.rangebreaks&&!f){if(I
=h)break}if(g.length>d||I===O)break;O=I;var Y={value:I};b?(z&&I!==(I|0)&&(Y.simpleLabel=!0),i>1&&W%i&&(Y.skipLabel=!0),g.push(Y)):(Y.minor=!0,_.push(Y))}}if(!_||_.length<2)s=!1;else{var H=(_[1].value-_[0].value)*(o?-1:1);gG(H,r.tickformat)||(s=!1)}if(!s)w=g;else{var Q=g.concat(_);l&&g.length&&(Q=Q.slice(1)),Q=Q.sort(function(Fe,Oe){return Fe.value-Oe.value}).filter(function(Fe,Oe,Ge){return Oe===0||Fe.value!==Ge[Oe-1].value});var K=Q.map(function(Fe,Oe){return Fe.minor===void 0&&!Fe.skipLabel?Oe:null}).filter(function(Fe){return Fe!==null});K.forEach(function(Fe){s.map(function(Oe){var Ge=Fe+Oe;Ge>=0&&Ge