diff --git a/CHANGELOG.md b/CHANGELOG.md index ba585961a91..c072094ccec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ 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.1.2] -- 2025-10-16 + +### Added +- Add "SI extended" formatting rule for tick exponents on axis labels, allowing values to be displayed with extended SI prefixes (e.g., femto, pico, atto) [[#7249](https://github.com/plotly/plotly.js/pull/7249)], with thanks to @dberardi99 for the contribution! + +### Fixed +- Fix editable `title.text` for `ternary`, `polar`, `colorbar`, and `rangeslider` (regression introduced in 3.0.0) [[#7513](https://github.com/plotly/plotly.js/pull/7513)], with thanks to @Lexachoc for the contribution! +- Fix `layout.title.subtitle` does not properly clear/remove from the chart when `subtitle` object is not in place, or `subtitle.text` set to `null`, empty string, or whitespace-only values [[#7571](https://github.com/plotly/plotly.js/pull/7571)], with thanks to @cminn10 for the contribution! +- Fix issue where `visible` property of one legend was affecting another. [[#7574](https://github.com/plotly/plotly.js/pull/7574)] +- Resolve incorrect shape clipping for domain-referenced shapes on n*10th subplot. [[#7576](https://github.com/plotly/plotly.js/pull/7576)] +- Update config diff check method to handle nested arrays [[#7579](https://github.com/plotly/plotly.js/pull/7579)] + + ## [3.1.1] -- 2025-09-29 ### Fixed diff --git a/CITATION.cff b/CITATION.cff index fa9115d4b87..c46dd550e4a 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.1.1 +version: 3.1.2 doi: 10.5281/zenodo.13964707 -date-released: 2025-09-29 +date-released: 2025-10-16 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index b7b31c1ffc6..c3b70a72a2e 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):M?N.sort(M):N;for(var W=-1,$=N.length,j=p[V++],de,_e,te,oe=new b,ce;++W<$;)(ce=oe.get(de=j(_e=N[W])))?ce.push(_e):oe.set(de,[_e]);return E?(_e=E(),te=function(xe,we){_e.set(xe,L(E,we,V))}):(_e={},te=function(xe,we){_e[xe]=L(E,we,V)}),oe.forEach(te),_e}function P(E,N){if(N>=p.length)return E;var V=[],W=x[N++];return E.forEach(function($,j){V.push({key:$,values:P(j,N)})}),W?V.sort(function($,j){return W($.key,j.key)}):V}return c.map=function(E,N){return L(N,E,0)},c.entries=function(E){return P(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return M=E,c},c.rollup=function(E){return S=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,M=c.length;x =0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),ye.hasOwnProperty(x)?{space:ye[x],local:c}:c}},be.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(Me(p,c[p]));return this}return this.each(Me(c,p))};function Me(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function M(){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?M:x:typeof p=="function"?c.local?E:P:c.local?L:S}function ge(c){return c.trim().replace(/\s+/g," ")}be.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),M=(c=Ne(c)).length,S=-1;if(p=x.classList){for(;++S ue)E=E.L;else if(P=p-aN(E,x),P>ue){if(!E.R){M=E;break}E=E.R}else{L>-ue?(M=E.P,S=E):P>-ue?(M=E,S=E.N):M=S=E;break}var N=Q3(c);if(ts.insert(M,N),!(!M&&!S)){if(M===S){ns(M),S=Q3(M.site),ts.insert(N,S),N.edge=S.edge=Du(M.site,N.site),as(M),as(S);return}if(!S){N.edge=Du(M.site,N.site);return}ns(M),ns(S);var V=M.site,W=V.x,$=V.y,j=c.x-W,de=c.y-$,_e=S.site,te=_e.x-W,oe=_e.y-$,ce=2*(j*oe-de*te),xe=j*j+de*de,we=te*te+oe*oe,he={x:(oe*xe-de*we)/ce+W,y:(j*we-te*xe)/ce+$};Yc(S.edge,V,_e,he),N.edge=Du(V,c,null,he),S.edge=Du(c,_e,null,he),as(M),as(S)}}function $3(c,p){var x=c.site,M=x.x,S=x.y,L=S-p;if(!L)return M;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-M,$=1/L-1/V,j=W/V;return $?(-j+Math.sqrt(j*j-2*$*(W*W/(-2*V)-N+V/2+S-L/2)))/$+M:(M+E)/2}function aN(c,p){var x=c.N;if(x)return $3(x,p);var M=c.site;return M.y===p?M.x:1/0}function j3(c){this.site=c,this.edges=[]}j3.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(e5),c.length};function nN(c){for(var p=c[0][0],x=c[1][0],M=c[0][1],S=c[1][1],L,P,E,N,V=Wl,W=V.length,$,j,de,_e,te,oe;W--;)if($=V[W],!(!$||!$.prepare()))for(de=$.edges,_e=de.length,j=0;j<_e;)oe=de[j].end(),E=oe.x,N=oe.y,te=de[++j%_e].start(),L=te.x,P=te.y,(_(E-L)>ue||_(N-P)>ue)&&(de.splice(j,0,new Uc(uN($.site,oe,_(E-p) 1)if(W>j){if(!M)M={x:(P-ce)/oe,y:P};else if(M.y>=E)return;x={x:(E-ce)/oe,y:E}}else{if(!M)M={x:(E-ce)/oe,y:E};else if(M.y =L)return;x={x:L,y:oe*L+ce}}else{if(!M)M={x:L,y:oe*L+ce};else if(M.x =0?c.slice(0,p):c,M=p>=0?c.slice(p+1):"in";return x=pN.get(x)||l5,M=mN.get(M)||X,yN(M(x.apply(null,r.call(arguments,1))))};function yN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function o5(c){return function(p){return 1-c(1-p)}}function s5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function gN(c){return c*c}function bN(c){return c*c*c}function xN(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 _N(c){return function(p){return Math.pow(p,c)}}function wN(c){return 1-Math.cos(c*ar)}function TN(c){return Math.pow(2,10*(c-1))}function MN(c){return 1-Math.sqrt(1-c*c)}function AN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/or*Math.asin(1/c):(c=1,x=p/4),function(M){return 1+c*Math.pow(2,-10*M)*Math.sin((M-x)*or/p)}}function kN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function SN(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=CN;function CN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,M=c.c,S=c.l,L=p.h-x,P=p.c-M,E=p.l-S;return isNaN(P)&&(P=0,M=isNaN(M)?p.c:M),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return Hn(x+L*N,M+P*N,S+E*N)+""}}e.interpolateHsl=LN;function LN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,M=c.s,S=c.l,L=p.h-x,P=p.s-M,E=p.l-S;return isNaN(P)&&(P=0,M=isNaN(M)?p.s:M),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return La(x+L*N,M+P*N,S+E*N)+""}}e.interpolateLab=qN;function qN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,M=c.a,S=c.b,L=p.l-x,P=p.a-M,E=p.b-S;return function(N){return Pc(x+L*N,M+P*N,S+E*N)+""}}e.interpolateRound=u5;function u5(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 M=p.transform.baseVal.consolidate()}return new f5(M?M.matrix:EN)})(c)};function f5(c){var p=[c.a,c.b],x=[c.c,c.d],M=v5(p),S=c5(p,x),L=v5(DN(x,p,-S))||0;p[0]*x[1] 0?L=he:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):he>0&&(p.start({type:"start",alpha:L=he}),x=Oc(c.tick)),c):L},c.start=function(){var he,Be=de.length,tr=_e.length,sr=M[0],nr=M[1],hr,dr;for(he=0;he>>1;c(p[L],x)<0?M=L+1:S=L}return M},right:function(p,x,M,S){for(arguments.length<3&&(M=0),arguments.length<4&&(S=p.length);M>>1;c(p[L],x)>0?S=L:M=L+1}return M}}}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){(M=arguments.length)<3&&(x=c.length,M<2&&(p=0));for(var M=x-p,S,L;M;)L=Math.random()*M--|0,S=c[M+p],c[M+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,M=new Array(x);x--;)M[x]=c[p[x]];return M},e.pairs=function(c){for(var p=0,x=c.length-1,M,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function Qr(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function Kt(c){return c>1?0:c<-1?Ce:Math.acos(c)}function qt(c){return c>1?ar:c<-1?-ar:Math.asin(c)}function yt(c){return((c=Math.exp(c))-1/c)/2}function At(c){return((c=Math.exp(c))+1/c)/2}function ua(c){return((c=Math.exp(2*c))-1)/(c+1)}function fa(c){return(c=Math.sin(c/2))*c}var zt=Math.SQRT2,Oa=2,yr=4;e.interpolateZoom=function(c,p){var x=c[0],M=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,V=P-M,W=N*N+V*V,$,j;if(W>4,M=M>>4|M,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(M=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(M,S,L))}function $r(c,p,x){var M=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-M,P,E,N=(S+M)/2;return L?(E=N<.5?L/(S+M):L/(2-S-M),c==S?P=(p-x)/L+(p=W&&ce.x<=j&&ce.y>=$&&ce.y<=de?[[W,de],[j,de],[j,$],[W,$]]:[];xe.point=N[te]}),V}function E(N){return N.map(function(V,W){return{x:Math.round(M(V,W)/ue)*ue,y:Math.round(S(V,W)/ue)*ue,i:W}})}return P.links=function(N){return g1(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 g1(E(N)).cells.forEach(function(W,$){for(var j=W.site,de=W.edges.sort(e5),_e=-1,te=de.length,oe,ce,xe=de[te-1].edge,we=xe.l===j?xe.r:xe.l;++_ewe&&(we=xe));return ce*=ce,oe*=oe,ce?Math.max(oe*we*N/ce,ce/(oe*he*N)):1/0}function de(te,oe,ce,xe){var we=-1,he=te.length,Be=ce.x,tr=ce.y,sr=oe?p(te.area/oe):0,nr;if(oe==ce.dx){for((xe||sr>ce.dy)&&(sr=ce.dy);++we 0&&(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,I=R.length;return F===I?R:F>I?R+new Array(F-I+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)),I=k.percent===void 0?"%":k.percent+"",O=k.minus===void 0?"-":k.minus+"",X=k.nan===void 0?"NaN":k.nan+"";function J(H){H=o(H);var G=H.fill,K=H.align,Q=H.sign,ie=H.symbol,pe=H.zero,me=H.width,Ae=H.comma,re=H.precision,Le=H.trim,fe=H.type;fe==="n"?(Ae=!0,fe="g"):d[fe]||(re===void 0&&(re=12),Le=!0,fe="g"),(pe||G==="0"&&K==="=")&&(pe=!0,G="0",K="=");var ke=ie==="$"?D:ie==="#"&&/[boxX]/.test(fe)?"0"+fe.toLowerCase():"",se=ie==="$"?R:/[%p]/.test(fe)?I:"",be=d[fe],Y=/[defgprs%]/.test(fe);re=re===void 0?6:/[gprs]/.test(fe)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function ee(B){var ye=ke,Me=se,ge,Re,Ne;if(fe==="c")Me=be(B)+Me,B="";else{B=+B;var Ee=B<0||1/B<0;if(B=isNaN(B)?X:be(Math.abs(B),re),Le&&(B=u(B)),Ee&&+B==0&&Q!=="+"&&(Ee=!1),ye=(Ee?Q==="("?Q:O:Q==="-"||Q==="("?"":Q)+ye,Me=(fe==="s"?y[8+f/3]:"")+Me+(Ee&&Q==="("?")":""),Y){for(ge=-1,Re=B.length;++ge
>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 nl=Z((oie,mb)=>{"use strict";mb.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 nn=Z(Un=>{"use strict";var $F=Y1().decode,jF=nl(),U1=Array.isArray,eI=ArrayBuffer,rI=DataView;function yb(e){return eI.isView(e)&&!(e instanceof rI)}Un.isTypedArray=yb;function vv(e){return U1(e)||yb(e)}Un.isArrayOrTypedArray=vv;function tI(e){return!vv(e[0])}Un.isArray1D=tI;Un.ensureArray=function(e,r){return U1(e)||(e=[]),e.length=r,e};var ia={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};ia.uint8c=ia.u1c;ia.uint8=ia.u1;ia.int8=ia.i1;ia.uint16=ia.u2;ia.int16=ia.i2;ia.uint32=ia.u4;ia.int32=ia.i4;ia.float32=ia.f4;ia.float64=ia.f8;function G1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=G1;Un.decodeTypedArraySpec=function(e){var r=[],t=aI(e),a=t.dtype,n=ia[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;G1(l)||(l=$F(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 bb=Hr(),W1=nn().isArrayOrTypedArray;Tb.exports=function(r,t){if(bb(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o
/g),f=0;f
/i;wn.BR_TAG_ALL=/
/gi;var J6=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,K6=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,Q6=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,sY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function co(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&$v(a)}var uY=/(^|;)\s*color:/;wn.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(Bp),o=[],s="",u=0,f=0;f=k&&b
=re.min&&(ie
=D:O<=D;O=Ye.tickIncrement(O,U,f,n)){if(b&&X++,C.rangebreaks&&!f){if(O
=h)break}if(y.length>d||O===I)break;I=O;var H={value:O};b?(z&&O!==(O|0)&&(H.simpleLabel=!0),i>1&&X%i&&(H.skipLabel=!0),y.push(H)):(H.minor=!0,_.push(H))}}if(!_||_.length<2)s=!1;else{var G=(_[1].value-_[0].value)*(o?-1:1);JG(G,r.tickformat)||(s=!1)}if(!s)w=y;else{var K=y.concat(_);l&&y.length&&(K=K.slice(1)),K=K.sort(function(ze,Ve){return ze.value-Ve.value}).filter(function(ze,Ve,Ue){return Ve===0||ze.value!==Ue[Ve-1].value});var Q=K.map(function(ze,Ve){return ze.minor===void 0&&!ze.skipLabel?Ve:null}).filter(function(ze){return ze!==null});Q.forEach(function(ze){s.map(function(Ve){var Ue=ze+Ve;Ue>=0&&Ue
")}r.text=l}function LG(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=bf(Math.pow(10,l),e,n,a);else if(It(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"||D0(m)&&Wm(h)?(r.text=v[0],d>0&&(r.text+="x10"),r.text==="1x10"&&(r.text="10"),h!==0&&h!==1&&(r.text+=""+(h>0?"":bo)+d+""),r.fontSize*=1.25):(m==="e"||m==="E")&&d>2?r.text=v[0]+m+(h>0?"+":bo)+d:(r.text=bf(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 qG(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function DG(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 EG(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=bf(r.x,e,n,a)}function PG(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=RG(i);if(l[1]>=100)r.text=bf(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=bo+r.text)}}}else r.text=bf(r.x,e,n,a)}function RG(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 zG=["f","p","n","\u03BC","m","","k","M","G","T"];function D0(e){return e==="SI"||e==="B"}function Wm(e){return e>14||e<-15}function bf(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Ye.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:l,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:It(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};w8(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,bo);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);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),o=Tt.hovertemplateString(f,v,a._d3locale,e.eventData[0]||{},e.trace._meta),o=o.replace(WV,function(h,d){return l=Dw(d,e.nameLength),""})}return[o,l]}function ZV(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(J){return J*t._invScaleX},y=function(J){return J*t._invScaleY};e.each(function(J){var U=J[n],H=J[i],G=U._id.charAt(0)==="x",K=U.range;f===0&&K&&K[0]>K[1]!==G&&(o=-1);var Q=0,ie=G?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var pe=Nw(J,r),me=J.anchor,Ae=me==="end"?-1:1,re,Le;if(me==="middle")re=J.crossPos+(G?y(pe.y-J.by/2):g(J.bx/2+J.tx2width/2)),Le=re+(G?y(J.by):g(J.bx));else if(G)re=J.crossPos+y(pt+pe.y)-y(J.by/2-pt),Le=re+y(J.by);else{var fe=g(Ae*pt+pe.x),ke=fe+g(Ae*J.bx);re=J.crossPos+Math.min(fe,ke),Le=J.crossPos+Math.max(fe,ke)}G?d!==void 0&&m!==void 0&&Math.min(Le,m)-Math.max(re,d)>1&&(H.side==="left"?(Q=H._mainLinePosition,ie=t.width):ie=H._mainLinePosition):v!==void 0&&h!==void 0&&Math.min(Le,h)-Math.max(re,v)>1&&(H.side==="top"?(Q=H._mainLinePosition,ie=t.height):ie=H._mainLinePosition)}u[f++]=[{datum:J,traceIndex:J.trace.index,dp:0,pos:J.pos,posref:J.posref,size:J.by*(G?BV:1)/2,pmin:Q,pmax:ie}]}),u.sort(function(J,U){return J[0].posref-U[0].posref||o*(U[0].traceIndex-J[0].traceIndex)});var _,w,T,b,A,C,k;function q(J){var U=J[0],H=J[J.length-1];if(w=U.pmin-U.pos-U.dp+U.size,T=H.pos+H.dp+H.size-U.pmax,w>.01){for(A=J.length-1;A>=0;A--)J[A].dp+=w;_=!1}if(!(T<.01)){if(w<-.01){for(A=J.length-1;A>=0;A--)J[A].dp-=T;_=!1}if(_){var G=0;for(b=0;b