diff --git a/CHANGELOG.md b/CHANGELOG.md index dc2299687ad..f23afd563cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,20 @@ 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.7.0] -- 2026-07-03 + +### Changed +- Update `sendDataToCloud` modebar button to upload chart to Plotly Cloud [[#7802](https://github.com/plotly/plotly.js/pull/7802), [#7852](https://github.com/plotly/plotly.js/pull/7852), [#7854](https://github.com/plotly/plotly.js/pull/7854)] + - NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload. + +### Fixed +- Fix stale `scattergl` error bars after toggling traces with mixed error bar visibility [[#7773](https://github.com/plotly/plotly.js/issues/7773)], with thanks to @JulienIcon for the contribution! +- Fix "unrecognized GUI edit: selections[0]..." warnings emitted after making a box or lasso selection and then calling `Plotly.react()` [[#7836](https://github.com/plotly/plotly.js/issues/7836)] +- Fix geo `fitbounds` to choose a compact longitude range when point data straddles the antimeridian [[#7837](https://github.com/plotly/plotly.js/pull/7837)], with thanks to @SharadhNaidu for the contribution! +- Preserve XML structural entities during decode when exporting SVG [[#7838](https://github.com/plotly/plotly.js/pull/7838)] +- Fix `Plotly.Fx.hover` crash on `scattermap` traces when called programmatically with a `pointNumber` selection [[#7882](https://github.com/plotly/plotly.js/pull/7882)] + + ## [3.6.0] -- 2026-06-01 ### Added diff --git a/CITATION.cff b/CITATION.cff index b75d6c50aa5..1184f92ea78 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.6.0 +version: 3.7.0 doi: 10.5281/zenodo.13964707 -date-released: 2026-06-01 +date-released: 2026-07-03 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index 1778b7b1b57..68a51412ccf 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[W++],de,we,te,se=new b,ue;++X oe)E=E.L;else if(R=p-gN(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=s5(c);if(ds.insert(A,N),!(!A&&!S)){if(A===S){ms(A),S=s5(A.site),ds.insert(N,S),N.edge=S.edge=Ou(A.site,N.site),ps(A),ps(S);return}if(!S){N.edge=Ou(A.site,N.site);return}ms(A),ms(S);var W=A.site,X=W.x,j=W.y,ee=c.x-X,de=c.y-j,we=S.site,te=we.x-X,se=we.y-j,ue=2*(ee*se-de*te),_e=ee*ee+de*de,Te=te*te+se*se,ve={x:(se*_e-de*Te)/ue+X,y:(ee*Te-te*_e)/ue+j};ev(S.edge,W,we,ve),N.edge=Ou(W,c,null,ve),S.edge=Ou(c,we,null,ve),ps(A),ps(S)}}function u5(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,W=N-p;if(!W)return E;var X=E-A,j=1/L-1/W,ee=X/W;return j?(-ee+Math.sqrt(ee*ee-2*j*(X*X/(-2*W)-N+W/2+S-L/2)))/j+A:(A+E)/2}function gN(c,p){var x=c.N;if(x)return u5(x,p);var A=c.site;return A.y===p?A.x:1/0}function f5(c){this.site=c,this.edges=[]}f5.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(c5),c.length};function bN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,R,E,N,W=eo,X=W.length,j,ee,de,we,te,se;X--;)if(j=W[X],!(!j||!j.prepare()))for(de=j.edges,we=de.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?Pe: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 va(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,W=R-A,X=N*N+W*W,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<=de?[[X,de],[ee,de],[ee,j],[X,j]]:[];_e.point=N[te]}),W}function E(N){return N.map(function(W,X){return{x:Math.round(A(W,X)/oe)*oe,y:Math.round(S(W,X)/oe)*oe,i:X}})}return R.links=function(N){return C1(E(N)).edges.filter(function(W){return W.l&&W.r}).map(function(W){return{source:N[W.l.i],target:N[W.r.i]}})},R.triangles=function(N){var W=[];return C1(E(N)).cells.forEach(function(X,j){for(var ee=X.site,de=X.edges.sort(c5),we=-1,te=de.length,se,ue,_e=de[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+"",V=k.nan===void 0?"NaN":k.nan+"";function J(U){U=o(U);var H=U.fill,Q=U.align,Z=U.sign,ne=U.symbol,ce=U.zero,ye=U.width,Se=U.comma,re=U.precision,Ce=U.trim,pe=U.type;pe==="n"?(Se=!0,pe="g"):d[pe]||(re===void 0&&(re=12),Ce=!0,pe="g"),(ce||H==="0"&&Q==="=")&&(ce=!0,H="0",Q="=");var be=ne==="$"?D:ne==="#"&&/[boxX]/.test(pe)?"0"+pe.toLowerCase():"",Ae=ne==="$"?P:/[%p]/.test(pe)?O:"",ge=d[pe],B=/[defgprs%]/.test(pe);re=re===void 0?6:/[gprs]/.test(pe)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function $(Y){var le=be,he=Ae,me,Re,Ee;if(pe==="c")he=ge(Y)+he,Y="";else{Y=+Y;var Le=Y<0||1/Y<0;if(Y=isNaN(Y)?V:ge(Math.abs(Y),re),Ce&&(Y=u(Y)),Le&&+Y==0&&Z!=="+"&&(Le=!1),le=(Le?Z==="("?Z:I:Z==="-"||Z==="("?"":Z)+le,he=(pe==="s"?g[8+f/3]:"")+he+(Le&&Z==="("?")":""),B){for(me=-1,Re=Y.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=K((Nie,Lb)=>{"use strict";Lb.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 Ka=K(Xn=>{"use strict";var gI=$1().decode,bI=cl(),j1=Array.isArray,xI=ArrayBuffer,_I=DataView;function qb(e){return xI.isView(e)&&!(e instanceof _I)}Xn.isTypedArray=qb;function Av(e){return j1(e)||qb(e)}Xn.isArrayOrTypedArray=Av;function wI(e){return!Av(e[0])}Xn.isArray1D=wI;Xn.ensureArray=function(e,r){return j1(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 ep(e){return e.constructor===ArrayBuffer}Xn.isArrayBuffer=ep;Xn.decodeTypedArraySpec=function(e){var r=[],t=TI(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;ep(l)||(l=gI(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 Eb=Or(),tp=Ka().isArrayOrTypedArray;Nb.exports=function(r,t){if(Eb(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 s7=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u7=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,f7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,EY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function wo(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&c0(a)}var PY=/(^|;)\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(Jp),o=[],s="",u=0,f=0;f=k&&b
=re.min&&(ne
")}r.text=l}function jV(e,r,t,a,n){var i=e.dtick,l=r.x,o=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),o||s==="L")r.text=Sf(Math.pow(10,l),e,n,a);else if(Ht(i)||s==="D"&&(e.minorloglabels==="complete"||gr.mod(l+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(gr.mod(l+.01,1)<.1)&&(u=!0,r.fontSize*=.75);var f=Math.pow(10,l).toExponential(0),v=f.split("e"),h=+v[1],d=Math.abs(h),m=e.exponentformat;m==="power"||Qs(m)&&m!=="SI extended"&&ey(h)||Qs(m)&&m==="SI extended"&&ry(h)?(r.text=v[0],d>0&&(r.text+="x10"),r.text==="1x10"&&(r.text="10"),h!==0&&h!==1&&(r.text+=""+(h>0?"":Lo)+d+""),r.fontSize*=1.25):(m==="e"||m==="E")&&d>2?r.text=v[0]+m+(h>0?"+":Lo)+d:(r.text=Sf(Math.pow(10,l),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,gr.mod(l,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var y=String(r.text).charAt(0);(y==="0"||y==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(l<0?.5:.25)))}}function eG(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function rG(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),l=n[0]===void 0?"":String(n[0]);t?r.text=l+" - "+i:(r.text=i,r.text2=l)}function tG(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=Sf(r.x,e,n,a)}function aG(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=nG(i);if(l[1]>=100)r.text=Sf(gr.deg2rad(r.x),e,n,a);else{var o=r.x<0;l[1]===1?l[0]===1?r.text="\u03C0":r.text=l[0]+"\u03C0":r.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),o&&(r.text=Lo+r.text)}}}else r.text=Sf(r.x,e,n,a)}function nG(e){function r(o,s){return Math.abs(o-s)<=1e-6}function t(o,s){return r(s,0)?o:t(s,o%s)}function a(o){for(var s=1;!r(Math.round(o*s)/s,o);)s*=10;return s}var n=a(e),i=e*n,l=Math.abs(t(i,n));return[Math.round(i/l),Math.round(n/l)]}var N8=["f","p","n","\u03BC","m","","k","M","G","T"],iG=["q","r","y","z","a",...N8,"P","E","Z","Y","R","Q"],Qs=e=>["SI","SI extended","B"].includes(e);function ey(e){return e>14||e<-15}function ry(e){return e>32||e<-30}function lG(e,r){return Qs(r)?!!(r==="SI extended"&&ry(e)||r!=="SI extended"&&ey(e)):!1}function Sf(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Be.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:l,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:Ht(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};R8(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,Lo);var v=Math.pow(10,-i)/2;if(l==="none"&&(o=0),e=Math.abs(e),e