diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b0bf4c9e78..641012ac4d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,21 @@ 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.4.0] -- 2026-02-20 + +### Added + - Add support for clicking legend titles to toggle visibility of all traces in legend [[#7698](https://github.com/plotly/plotly.js/pull/7698)] + - Add support for shapes to reference multiple axes [[#7666](https://github.com/plotly/plotly.js/pull/7666)] + - Add support for dashed marker lines in scatter plots [[#7673](https://github.com/plotly/plotly.js/pull/7673)], with thanks to @chrimaho for the contribution! + +### Changed +- Increase axis autorange when bar charts have outside text labels, to avoid labels being clipped [[#7675](https://github.com/plotly/plotly.js/pull/7675)] + +### Fixed + - Fix issue where some traces in stacked area charts were not rendering their fill correctly after certain sequences of hide/show operations in the legend [[#7668](https://github.com/plotly/plotly.js/pull/7668)] + - Fix out of bounds index during scattergl animation trace type [[#7676](https://github.com/plotly/plotly.js/pull/7676)], with thanks to @BJohnBraddock for the contribution! + + ## [3.3.1] -- 2025-12-12 ### Added diff --git a/CITATION.cff b/CITATION.cff index 99c80904a5e..74ba74ad1d5 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.3.1 +version: 3.4.0 doi: 10.5281/zenodo.13964707 -date-released: 2025-12-12 +date-released: 2026-02-20 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index 94222d63b94..973ba546d36 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 W=-1,j=N.length,ee=p[V++],he,Te,te,oe=new b,ue;++W =0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),ye.hasOwnProperty(x)?{space:ye[x],local:c}:c}},ge.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(we(p,c[p]));return this}return this.each(we(c,p))};function we(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function A(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?A:x:typeof p=="function"?c.local?E:P:c.local?L:S}function pe(c){return c.trim().replace(/\s+/g," ")}ge.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),A=(c=Fe(c)).length,S=-1;if(p=x.classList){for(;++S=0;)(L=x[A])&&(S&&S!==L.nextSibling&&S.parentNode.insertBefore(L,S),S=L);return this},ge.sort=function(c){c=be.apply(this,arguments);for(var p=-1,x=this.length;++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 g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.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 it(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?De:Math.acos(c)}function yt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Dt(c){return((c=Math.exp(c))-1/c)/2}function Kt(c){return((c=Math.exp(c))+1/c)/2}function La(c){return((c=Math.exp(2*c))-1)/(c+1)}function sa(c){return(c=Math.sin(c/2))*c}var ua=Math.SQRT2,vr=2,lt=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,V=P-A,W=N*N+V*V,j,ee;if(W1){var Jl=bn[0],tl=bn[1],lv=Jl[0]-tl[0],ob=Jl[1]-tl[1];Kr=lv*lv+ob*ob}}function Xl(){var Yn=e.touches(je),pa,gn,hi,bn;av.call(je);for(var ss=0,Jl=Yn.length;ss 1?1:p,x=x<0?0:x>1?1:x,S=x<=.5?x*(1+p):x+p-x*p,A=2*x-S;function L(E){return E>360?E-=360:E<0&&(E+=360),E<60?A+(S-A)*E/60:E<180?S:E<240?A+(S-A)*(240-E)/60:A}function P(E){return Math.round(L(E)*255)}return new qa(P(c+120),P(c),P(c-120))}e.hcl=Qt;function Qt(c,p,x){return this instanceof Qt?(this.h=+c,this.c=+p,void(this.l=+x)):arguments.length<2?c instanceof Qt?new Qt(c.h,c.c,c.l):c instanceof St?Nc(c.l,c.a,c.b):Nc((c=or((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new Qt(c,p,x)}var ci=Qt.prototype=new bt;ci.brighter=function(c){return new Qt(this.h,this.c,Math.min(100,this.l+wt*(arguments.length?c:1)))},ci.darker=function(c){return new Qt(this.h,this.c,Math.max(0,this.l-wt*(arguments.length?c:1)))},ci.rgb=function(){return mn(this.h,this.c,this.l).rgb()};function mn(c,p,x){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new St(x,Math.cos(c*=Mr)*p,Math.sin(c)*p)}e.lab=St;function St(c,p,x){return this instanceof St?(this.l=+c,this.a=+p,void(this.b=+x)):arguments.length<2?c instanceof St?new St(c.l,c.a,c.b):c instanceof Qt?mn(c.h,c.c,c.l):or((c=qa(c)).r,c.g,c.b):new St(c,p,x)}var wt=18,ca=.95047,Yl=1,Ul=1.08883,el=St.prototype=new bt;el.brighter=function(c){return new St(Math.min(100,this.l+wt*(arguments.length?c:1)),this.a,this.b)},el.darker=function(c){return new St(Math.max(0,this.l-wt*(arguments.length?c:1)),this.a,this.b)},el.rgb=function(){return zc(this.l,this.a,this.b)};function zc(c,p,x){var A=(c+16)/116,S=A+p/500,L=A-x/200;return S=qu(S)*ca,A=qu(A)*Yl,L=qu(L)*Ul,new qa(Eu(3.2404542*S-1.5371385*A-.4985314*L),Eu(-.969266*S+1.8760108*A+.041556*L),Eu(.0556434*S-.2040259*A+1.0572252*L))}function Nc(c,p,x){return c>0?new Qt(Math.atan2(x,p)*Br,Math.sqrt(p*p+x*x),c):new Qt(NaN,NaN,c)}function qu(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function Du(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Eu(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=qa;function qa(c,p,x){return this instanceof qa?(this.r=~~c,this.g=~~p,void(this.b=~~x)):arguments.length<2?c instanceof qa?new qa(c.r,c.g,c.b):Gr(""+c,qa,pn):new qa(c,p,x)}function Fc(c){return new qa(c>>16,c>>8&255,c&255)}function es(c){return Fc(c)+""}var rs=qa.prototype=new bt;rs.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,x=this.g,A=this.b,S=30;return!p&&!x&&!A?new qa(S,S,S):(p&&p
le)E=E.L;else if(P=p-cN(E,x),P>le){if(!E.R){A=E;break}E=E.R}else{L>-le?(A=E.P,S=E):P>-le?(A=E,S=E.N):A=S=E;break}var N=e5(c);if(ns.insert(A,N),!(!A&&!S)){if(A===S){ls(A),S=e5(A.site),ns.insert(N,S),N.edge=S.edge=zu(A.site,N.site),is(A),is(S);return}if(!S){N.edge=zu(A.site,N.site);return}ls(A),ls(S);var V=A.site,W=V.x,j=V.y,ee=c.x-W,he=c.y-j,Te=S.site,te=Te.x-W,oe=Te.y-j,ue=2*(ee*oe-he*te),xe=ee*ee+he*he,Ae=te*te+oe*oe,ve={x:(oe*xe-he*Ae)/ue+W,y:(ee*Ae-te*xe)/ue+j};Vc(S.edge,V,Te,ve),N.edge=zu(V,c,null,ve),S.edge=zu(c,Te,null,ve),is(A),is(S)}}function r5(c,p){var x=c.site,A=x.x,S=x.y,L=S-p;if(!L)return A;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,N=x.y,V=N-p;if(!V)return E;var W=E-A,j=1/L-1/V,ee=W/V;return j?(-ee+Math.sqrt(ee*ee-2*j*(W*W/(-2*V)-N+V/2+S-L/2)))/j+A:(A+E)/2}function cN(c,p){var x=c.N;if(x)return r5(x,p);var A=c.site;return A.y===p?A.x:1/0}function t5(c){this.site=c,this.edges=[]}t5.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(a5),c.length};function vN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,P,E,N,V=Gl,W=V.length,j,ee,he,Te,te,oe;W--;)if(j=V[W],!(!j||!j.prepare()))for(he=j.edges,Te=he.length,ee=0;ee 1)if(W>ee){if(!A)A={x:(P-ue)/oe,y:P};else if(A.y>=E)return;x={x:(E-ue)/oe,y:E}}else{if(!A)A={x:(E-ue)/oe,y:E};else if(A.y =L)return;x={x:L,y:oe*L+ue}}else{if(!A)A={x:L,y:oe*L+ue};else if(A.x =0?c.slice(0,p):c,A=p>=0?c.slice(p+1):"in";return x=TN.get(x)||u5,A=MN.get(A)||J,AN(A(x.apply(null,r.call(arguments,1))))};function AN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function f5(c){return function(p){return 1-c(1-p)}}function c5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function kN(c){return c*c}function SN(c){return c*c*c}function CN(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,x=p*c;return 4*(c<.5?x:3*(c-p)+x-.75)}function LN(c){return function(p){return Math.pow(p,c)}}function qN(c){return 1-Math.cos(c*sr)}function DN(c){return Math.pow(2,10*(c-1))}function EN(c){return 1-Math.sqrt(1-c*c)}function PN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/ar*Math.asin(1/c):(c=1,x=p/4),function(A){return 1+c*Math.pow(2,-10*A)*Math.sin((A-x)*ar/p)}}function RN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function zN(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=NN;function NN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,A=c.c,S=c.l,L=p.h-x,P=p.c-A,E=p.l-S;return isNaN(P)&&(P=0,A=isNaN(A)?p.c:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return mn(x+L*N,A+P*N,S+E*N)+""}}e.interpolateHsl=FN;function FN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,A=c.s,S=c.l,L=p.h-x,P=p.s-A,E=p.l-S;return isNaN(P)&&(P=0,A=isNaN(A)?p.s:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return pn(x+L*N,A+P*N,S+E*N)+""}}e.interpolateLab=IN;function IN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,A=c.a,S=c.b,L=p.l-x,P=p.a-A,E=p.b-S;return function(N){return zc(x+L*N,A+P*N,S+E*N)+""}}e.interpolateRound=v5;function v5(c,p){return p-=c,function(x){return Math.round(c+p*x)}}e.transform=function(c){var p=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(x){if(x!=null){p.setAttribute("transform",x);var A=p.transform.baseVal.consolidate()}return new h5(A?A.matrix:ON)})(c)};function h5(c){var p=[c.a,c.b],x=[c.c,c.d],A=p5(p),S=d5(p,x),L=p5(HN(x,p,-S))||0;p[0]*x[1] 0?L=ve:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):ve>0&&(p.start({type:"start",alpha:L=ve}),x=Yc(c.tick)),c):L},c.start=function(){var ve,Ue=he.length,nr=Te.length,ur=A[0],ir=A[1],dr,pr;for(ve=0;ve=W&&ue.x<=ee&&ue.y>=j&&ue.y<=he?[[W,he],[ee,he],[ee,j],[W,j]]:[];xe.point=N[te]}),V}function E(N){return N.map(function(V,W){return{x:Math.round(A(V,W)/le)*le,y:Math.round(S(V,W)/le)*le,i:W}})}return P.links=function(N){return w1(E(N)).edges.filter(function(V){return V.l&&V.r}).map(function(V){return{source:N[V.l.i],target:N[V.r.i]}})},P.triangles=function(N){var V=[];return w1(E(N)).cells.forEach(function(W,j){for(var ee=W.site,he=W.edges.sort(a5),Te=-1,te=he.length,oe,ue,xe=he[te-1].edge,Ae=xe.l===ee?xe.r:xe.l;++Te0&&(R=0);break}return R>0?k.slice(0,R)+k.slice(z+1):k}var f;function v(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1],F=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,H=R.length;return F===H?R:F>H?R+new Array(F-H+1).join("0"):F>0?R.slice(0,F)+"."+R.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 R=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+R:R.length>z+1?R.slice(0,z+1)+"."+R.slice(z+1):R+new Array(z-R.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 g=Array.prototype.map,y=["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(g.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",R=k.currency===void 0?"":k.currency[1]+"",z=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:i(g.call(k.numerals,String)),H=k.percent===void 0?"%":k.percent+"",O=k.minus===void 0?"-":k.minus+"",J=k.nan===void 0?"NaN":k.nan+"";function X(I){I=o(I);var Y=I.fill,K=I.align,Q=I.sign,ne=I.symbol,me=I.zero,de=I.width,ke=I.comma,re=I.precision,Ce=I.trim,ce=I.type;ce==="n"?(ke=!0,ce="g"):d[ce]||(re===void 0&&(re=12),Ce=!0,ce="g"),(me||Y==="0"&&K==="=")&&(me=!0,Y="0",K="=");var _e=ne==="$"?D:ne==="#"&&/[boxX]/.test(ce)?"0"+ce.toLowerCase():"",se=ne==="$"?R:/[%p]/.test(ce)?H:"",ge=d[ce],B=/[defgprs%]/.test(ce);re=re===void 0?6:/[gprs]/.test(ce)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function $(U){var ye=_e,we=se,pe,Re,Fe;if(ce==="c")we=ge(U)+we,U="";else{U=+U;var Ee=U<0||1/U<0;if(U=isNaN(U)?J:ge(Math.abs(U),re),Ce&&(U=u(U)),Ee&&+U==0&&Q!=="+"&&(Ee=!1),ye=(Ee?Q==="("?Q:O:Q==="-"||Q==="("?"":Q)+ye,we=(ce==="s"?y[8+f/3]:"")+we+(Ee&&Q==="("?")":""),B){for(pe=-1,Re=U.length;++pe
>4,y[f++]=(h&15)<<4|d>>2,y[f++]=(d&3)<<6|m&63;return g};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var al=Z((Tie,_b)=>{"use strict";_b.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 an=Z(Un=>{"use strict";var cI=W1().decode,vI=al(),Z1=Array.isArray,hI=ArrayBuffer,dI=DataView;function wb(e){return hI.isView(e)&&!(e instanceof dI)}Un.isTypedArray=wb;function pv(e){return Z1(e)||wb(e)}Un.isArrayOrTypedArray=pv;function pI(e){return!pv(e[0])}Un.isArray1D=pI;Un.ensureArray=function(e,r){return Z1(e)||(e=[]),e.length=r,e};var na={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};na.uint8c=na.u1c;na.uint8=na.u1;na.int8=na.i1;na.uint16=na.u2;na.int16=na.i2;na.uint32=na.u4;na.int32=na.i4;na.float32=na.f4;na.float64=na.f8;function X1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=X1;Un.decodeTypedArraySpec=function(e){var r=[],t=mI(e),a=t.dtype,n=na[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;X1(l)||(l=cI(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 Mb=Hr(),K1=an().isArrayOrTypedArray;Cb.exports=function(r,t){if(Mb(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),f=0;f
/i;Tn.BR_TAG_ALL=/
/gi;var e7=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,r7=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,t7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,TY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function vo(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&r0(a)}var MY=/(^|;)\s*color:/;Tn.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(Up),o=[],s="",u=0,f=0;f=k&&b
=re.min&&(ne
=D:O<=D;O=Ve.tickIncrement(O,G,f,n)){if(b&&J++,C.rangebreaks&&!f){if(O
=h)break}if(y.length>d||O===H)break;H=O;var I={value:O};b?(z&&O!==(O|0)&&(I.simpleLabel=!0),i>1&&J%i&&(I.skipLabel=!0),y.push(I)):(I.minor=!0,_.push(I))}}if(!_||_.length<2)s=!1;else{var Y=(_[1].value-_[0].value)*(o?-1:1);cG(Y,r.tickformat)||(s=!1)}if(!s)w=y;else{var K=y.concat(_);l&&y.length&&(K=K.slice(1)),K=K.sort(function(Ne,Be){return Ne.value-Be.value}).filter(function(Ne,Be,Ge){return Be===0||Ne.value!==Ge[Be-1].value});var Q=K.map(function(Ne,Be){return Ne.minor===void 0&&!Ne.skipLabel?Be:null}).filter(function(Ne){return Ne!==null});Q.forEach(function(Ne){s.map(function(Be){var Ge=Ne+Be;Ge>=0&&Ge
")}r.text=l}function VV(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=wf(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"||Bs(m)&&m!=="SI extended"&&Xm(h)||Bs(m)&&m==="SI extended"&&Jm(h)?(r.text=v[0],d>0&&(r.text+="x10"),r.text==="1x10"&&(r.text="10"),h!==0&&h!==1&&(r.text+=""+(h>0?"":xo)+d+""),r.fontSize*=1.25):(m==="e"||m==="E")&&d>2?r.text=v[0]+m+(h>0?"+":xo)+d:(r.text=wf(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 g=String(r.text).charAt(0);(g==="0"||g==="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 GV(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function WV(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 ZV(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=wf(r.x,e,n,a)}function XV(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=JV(i);if(l[1]>=100)r.text=wf(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=xo+r.text)}}}else r.text=wf(r.x,e,n,a)}function JV(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 C8=["f","p","n","\u03BC","m","","k","M","G","T"],KV=["q","r","y","z","a",...C8,"P","E","Z","Y","R","Q"],Bs=e=>["SI","SI extended","B"].includes(e);function Xm(e){return e>14||e<-15}function Jm(e){return e>32||e<-30}function QV(e,r){return Bs(r)?!!(r==="SI extended"&&Jm(e)||r!=="SI extended"&&Xm(e)):!1}function wf(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Ve.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]};k8(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,xo);var v=Math.pow(10,-i)/2;if(l==="none"&&(o=0),e=Math.abs(e),e
"),e.yLabel!==void 0&&(o+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(o+=(o?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?o=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(o=e.yLabel):e.yLabel===void 0?o=e.xLabel:o="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(o+=(o?"
":"")+e.text),e.extraText!==void 0&&(o+=(o?"
":"")+e.extraText),i&&o===""&&!e.hovertemplate&&(l===""&&i.remove(),o=l),(h=(v=e.trace)==null?void 0:v.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:f=!1}=e;if(f){let d=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(d[s+"other"]=d[s+"Val"],d[s+"otherLabel"]=d[s+"Label"]),o=Mt.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:a._d3locale,template:f}),o=o.replace(sW,(m,g)=>(l=Nw(g,e.nameLength),""))}return[o,l]}function uW(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",l=0,o=1,s=e.size(),u=new Array(s),f=0,v=a.minX,h=a.maxX,d=a.minY,m=a.maxY,g=function(X){return X*t._invScaleX},y=function(X){return X*t._invScaleY};e.each(function(X){var G=X[n],I=X[i],Y=G._id.charAt(0)==="x",K=G.range;f===0&&K&&K[0]>K[1]!==Y&&(o=-1);var Q=0,ne=Y?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var me=Bw(X,r),de=X.anchor,ke=de==="end"?-1:1,re,Ce;if(de==="middle")re=X.crossPos+(Y?y(me.y-X.by/2):g(X.bx/2+X.tx2width/2)),Ce=re+(Y?y(X.by):g(X.bx));else if(Y)re=X.crossPos+y(pt+me.y)-y(X.by/2-pt),Ce=re+y(X.by);else{var ce=g(ke*pt+me.x),_e=ce+g(ke*X.bx);re=X.crossPos+Math.min(ce,_e),Ce=X.crossPos+Math.max(ce,_e)}Y?d!==void 0&&m!==void 0&&Math.min(Ce,m)-Math.max(re,d)>1&&(I.side==="left"?(Q=I._mainLinePosition,ne=t.width):ne=I._mainLinePosition):v!==void 0&&h!==void 0&&Math.min(Ce,h)-Math.max(re,v)>1&&(I.side==="top"?(Q=I._mainLinePosition,ne=t.height):ne=I._mainLinePosition)}u[f++]=[{datum:X,traceIndex:X.trace.index,dp:0,pos:X.pos,posref:X.posref,size:X.by*(Y?aW:1)/2,pmin:Q,pmax:ne}]}),u.sort(function(X,G){return X[0].posref-G[0].posref||o*(G[0].traceIndex-X[0].traceIndex)});var _,w,T,b,M,C,k;function q(X){var G=X[0],I=X[X.length-1];if(w=G.pmin-G.pos-G.dp+G.size,T=I.pos+I.dp+I.size-G.pmax,w>.01){for(M=X.length-1;M>=0;M--)X[M].dp+=w;_=!1}if(!(T<.01)){if(w<-.01){for(M=X.length-1;M>=0;M--)X[M].dp-=T;_=!1}if(_){var Y=0;for(b=0;b