@bino-bi/bn-template-engine 1.0.0-next.26 → 1.0.0-next.27
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/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-0a19e8af.entry.js +1 -0
- package/dist/bn-template-engine/p-0f6ece5a.entry.js +1 -0
- package/dist/bn-template-engine/p-13db2986.entry.js +1 -0
- package/dist/bn-template-engine/p-1b35c4ac.entry.js +1 -0
- package/dist/bn-template-engine/{p-0fb02c57.entry.js → p-4602d613.entry.js} +1 -1
- package/dist/bn-template-engine/{p-fcfbb329.entry.js → p-489438ed.entry.js} +1 -1
- package/dist/bn-template-engine/{p-5d7a3a77.entry.js → p-6f86159c.entry.js} +1 -1
- package/dist/bn-template-engine/{p-45508f1b.entry.js → p-7401e3f3.entry.js} +1 -1
- package/dist/bn-template-engine/{p-b27009eb.entry.js → p-83d50a14.entry.js} +1 -1
- package/dist/bn-template-engine/{p-qRZrT-U3.js → p-BCr2-Ka-.js} +1 -1
- package/dist/bn-template-engine/{p-BbmobTg0.js → p-BEkgk7Ij.js} +1 -1
- package/dist/bn-template-engine/{p-CsJ84YRk.js → p-BVYKc5cH.js} +1 -1
- package/dist/bn-template-engine/{p-CWWWM-XC.js → p-BeLWoM0Q.js} +1 -1
- package/dist/bn-template-engine/p-CHZZqoB7.js +1 -0
- package/dist/bn-template-engine/p-CURM2Nrr.js +1 -0
- package/dist/bn-template-engine/{p-DVrDYxlh.js → p-Ckhir6Ux.js} +1 -1
- package/dist/bn-template-engine/{p-EtT29btN.js → p-Ct0wEGrw.js} +1 -1
- package/dist/bn-template-engine/p-CtEA0ZQc.js +1 -0
- package/dist/bn-template-engine/{p-DjPXefnq.js → p-DJ5KJ6GF.js} +1 -1
- package/dist/bn-template-engine/{p-BcaI745G.js → p-DoIuKI09.js} +1 -1
- package/dist/bn-template-engine/{p-B5Jd_eCX.js → p-DwGg2_vO.js} +1 -1
- package/dist/bn-template-engine/{p-CG_Bcm6V.js → p-Z-mcXias.js} +1 -1
- package/dist/bn-template-engine/p-aeba74a4.entry.js +1 -0
- package/dist/bn-template-engine/{p-4419db8f.entry.js → p-b4dabaf9.entry.js} +1 -1
- package/dist/bn-template-engine/{p-a5867a4c.entry.js → p-d083f0e6.entry.js} +1 -1
- package/dist/bn-template-engine/p-ee09f216.entry.js +1 -0
- package/dist/bn-template-engine/p-f00b189f.entry.js +1 -0
- package/dist/cjs/{AxisConfig-DwiNUyYG.js → AxisConfig-CbNnsmGC.js} +1 -1
- package/dist/cjs/{LabelCollisionManager-Bv-xkeXw.js → LabelCollisionManager-tOT40-pH.js} +2 -2
- package/dist/cjs/{Order-2wRydarc.js → Order-C5XgrPzr.js} +1 -1
- package/dist/cjs/SVGStyle-C1LhLgbT.js +6513 -0
- package/dist/cjs/{SVGVariancesStyleGroup-CiI4GeWe.js → SVGVariancesStyleGroup-C2Ys_Iz6.js} +1 -1
- package/dist/cjs/{VarianceMeasure-CQlSRzlp.js → VarianceMeasure-uph4FBRa.js} +1 -1
- package/dist/cjs/{XYChartDataRow-C2FdL58s.js → XYChartDataRow-BNqTnXnX.js} +4 -4
- package/dist/cjs/bn-asset_21.cjs.entry.js +79 -42
- package/dist/cjs/bn-chart-bubble.cjs.entry.js +15 -14
- package/dist/cjs/bn-chart-bullet.cjs.entry.js +14 -13
- package/dist/cjs/bn-chart-scatter.cjs.entry.js +14 -13
- package/dist/cjs/bn-grid.cjs.entry.js +5 -5
- package/dist/cjs/bn-image.cjs.entry.js +4 -4
- package/dist/cjs/bn-internationalization.cjs.entry.js +1 -1
- package/dist/cjs/bn-ruleset.cjs.entry.js +1 -1
- package/dist/cjs/bn-text.cjs.entry.js +5 -5
- package/dist/cjs/bn-tree.cjs.entry.js +5 -5
- package/dist/cjs/{context-protocol-DcTEh1rq.js → context-protocol-G4pi217i.js} +10 -10
- package/dist/cjs/{diagnostics-CTgbq_Gc.js → diagnostics-CRfecdNZ.js} +1 -1
- package/dist/cjs/editor-companion.cjs.entry.js +1 -1
- package/dist/cjs/{svgChartElements-tDA43aYj.js → emptyState-B3kPjSFO.js} +27 -4
- package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +9 -8
- package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +9 -8
- package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +9 -8
- package/dist/cjs/{scaling-Dsb5_NXy.js → scaling-BGTK5H0H.js} +1 -1
- package/dist/cjs/{withScalingGroup-CFIc5-6s.js → withScalingGroup-DrFV_zsQ.js} +1 -1
- package/dist/cjs/{withStyled-D0jLwCib.js → withStyled-CZCnmfPw.js} +3 -3
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +37 -0
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +3 -1
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +37 -5
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +3 -2
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +37 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +3 -1
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +37 -5
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +3 -2
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +37 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +3 -1
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +37 -5
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +3 -2
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +37 -5
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +16 -2
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +4 -4
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +37 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +24 -2
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +37 -0
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +4 -4
- package/dist/collection/components/bn-table/bn-table.css +38 -1
- package/dist/collection/components/bn-table/bn-table.js +4 -2
- package/dist/collection/components/bn-table/ibcs-table.css +37 -0
- package/dist/collection/components/bn-table/ibcs-table.js +5 -3
- package/dist/collection/stores/internationalization.js +10 -10
- package/dist/collection/utils/emptyState.js +21 -0
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/emptyState.js +1 -0
- package/dist/components/ibcs-chart-bubble2.js +1 -1
- package/dist/components/ibcs-chart-bullet2.js +1 -1
- package/dist/components/ibcs-chart-scatter2.js +1 -1
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/svg.esm.js +1 -0
- package/dist/esm/{AxisConfig-KqzWQbML.js → AxisConfig-CEFoGHUN.js} +1 -1
- package/dist/esm/{LabelCollisionManager-585bQMtP.js → LabelCollisionManager-Dou5LvUs.js} +2 -2
- package/dist/esm/{Order-DZVWjEL_.js → Order-Tn0j255j.js} +1 -1
- package/dist/esm/SVGStyle-BSuFK9YW.js +6503 -0
- package/dist/esm/{SVGVariancesStyleGroup-DO5QJfRQ.js → SVGVariancesStyleGroup-D52LMGw8.js} +1 -1
- package/dist/esm/{VarianceMeasure-DDjChp8C.js → VarianceMeasure-BXWH7oAW.js} +1 -1
- package/dist/esm/{XYChartDataRow-Dn83Tqh9.js → XYChartDataRow-D272UFel.js} +4 -4
- package/dist/esm/bn-asset_21.entry.js +70 -33
- package/dist/esm/bn-chart-bubble.entry.js +12 -11
- package/dist/esm/bn-chart-bullet.entry.js +11 -10
- package/dist/esm/bn-chart-scatter.entry.js +11 -10
- package/dist/esm/bn-grid.entry.js +5 -5
- package/dist/esm/bn-image.entry.js +4 -4
- package/dist/esm/bn-internationalization.entry.js +1 -1
- package/dist/esm/bn-ruleset.entry.js +1 -1
- package/dist/esm/bn-text.entry.js +5 -5
- package/dist/esm/bn-tree.entry.js +5 -5
- package/dist/esm/{context-protocol-B-vdGKeG.js → context-protocol-D_ysqCp8.js} +10 -10
- package/dist/esm/{diagnostics-CiquIw8B.js → diagnostics-BjZRZraG.js} +1 -1
- package/dist/esm/editor-companion.entry.js +1 -1
- package/dist/esm/{svgChartElements-B3YClivG.js → emptyState-DqkM4Yc5.js} +27 -5
- package/dist/esm/ibcs-chart-bubble.entry.js +9 -8
- package/dist/esm/ibcs-chart-bullet.entry.js +9 -8
- package/dist/esm/ibcs-chart-scatter.entry.js +9 -8
- package/dist/esm/{scaling-Dggyeqts.js → scaling-YbP727FC.js} +1 -1
- package/dist/esm/{withScalingGroup-DNBSqRC0.js → withScalingGroup-Byn-W6z8.js} +1 -1
- package/dist/esm/{withStyled-DoNsbwS3.js → withStyled-3yRswBcf.js} +3 -3
- package/dist/types/utils/emptyState.d.ts +10 -0
- package/package.json +2 -2
- package/dist/bn-template-engine/p-03304284.entry.js +0 -1
- package/dist/bn-template-engine/p-461fdffa.entry.js +0 -1
- package/dist/bn-template-engine/p-62cc95b7.entry.js +0 -1
- package/dist/bn-template-engine/p-829212c3.entry.js +0 -1
- package/dist/bn-template-engine/p-BcLsoDrW.js +0 -1
- package/dist/bn-template-engine/p-D5e8I9Qe.js +0 -1
- package/dist/bn-template-engine/p-TuLpbB5O.js +0 -1
- package/dist/bn-template-engine/p-bfa87b07.entry.js +0 -1
- package/dist/bn-template-engine/p-ceb80db3.entry.js +0 -1
- package/dist/bn-template-engine/p-f06c3703.entry.js +0 -1
- package/dist/cjs/SVGStyle-DoxylrEQ.js +0 -8219
- package/dist/components/layoutObserver.js +0 -1
- package/dist/components/main.js +0 -1
- package/dist/esm/SVGStyle-OrPkzjcb.js +0 -8209
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as s,g as h}from"./p-C5UYpZUU.js";import{r as e,m as n,s as o,g as l,d as r}from"./p-D5e8I9Qe.js";import{C as a,S as d,F as c,I as u,a as v,b as m,c as b,P as f}from"./p-TuLpbB5O.js";import{X as w,r as p,a as g,b as x,P as y,F as M,c as $,S as L}from"./p-qRZrT-U3.js";import{g as S}from"./p-DVrDYxlh.js";import{N as k}from"./p-DsTzlzxQ.js";import{r as T}from"./p-BbmobTg0.js";class z{constructor(t,i,s,h,e){this.mode=t,this.vMax=i,this.rMaxPx=s,this.rMinPx=h,this.areaPerUnitPx2=e}static local(t,i,s){return new z("local",t,i,s,0)}static grouped(t){return new z("grouped",0,0,0,t)}radius(t){return"grouped"===this.mode?t<=0?0:Math.sqrt(this.areaPerUnitPx2*t/Math.PI):this.vMax<=0||t<=0?this.rMinPx:Math.max(this.rMinPx,this.rMaxPx*Math.sqrt(t/this.vMax))}}class D{constructor(t,i,s,h,e,n){var o,l,r,a;this.ruleSet=t,this.config=h,this.styles=e,this.availableWidth=n,this.warnings=[],this.canvasHeight=0,this.i18nMap=new Map,this.hatchPatterns=new Set,this.scaleOverflowCount=0,this.svgRoot=null;const d=new w,c=""!==s?i.exec(`SELECT * FROM ${s}`):[],u=(null!=c?c:[]).map((t=>d.adapt(t)));this.data=p(u,{pointLevel:h.pointLevel,seriesLevel:h.seriesLevel,facetLevel:null!==h.facet?"rowgroup"===h.facet.level?"rowGroup":"category":null,measures:{x:null!==(o=T(h.x.measure))&&void 0!==o?o:{kind:"scenario",slot:"ac1"},y:null!==(l=T(h.y.measure))&&void 0!==l?l:{kind:"scenario",slot:"ac2"},size:null!==(r=T(h.size.measure))&&void 0!==r?r:{kind:"scenario",slot:"ac3"},share:null!==h.share&&null!==(a=T(h.share.measure))&&void 0!==a?a:void 0},compareFamily:h.compareFamily,domains:{x:{min:h.x.min,max:h.x.max},y:{min:h.y.min,max:h.y.max}},limit:h.limit,limitBy:"size"}),this.warnings.push(...this.data.warnings)}get em(){return this.styles.fontStyles.size}fontFamily(){return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/,"")}textWidth(t,i=!1){const s=a(t,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px",fontWeight:i?"bold":"normal"}).width;return Number.isFinite(s)&&s>0?s:.6*t.length*this.em}drawText(t,i,s,h,e={}){var n,o;t.text(i).font({size:this.styles.fontStyles.size,weight:e.bold?"bold":"normal",anchor:null!==(n=e.anchor)&&void 0!==n?n:"start"}).fill(null!==(o=e.color)&&void 0!==o?o:this.styles.fontStyles.color).attr({x:s,y:h,"font-family":this.fontFamily()})}hasNoData(){return 0===this.data.totalPoints}getWarnings(){return this.warnings}getAllocatedCanvasWidth(){return this.availableWidth}getAllocatedCanvasHeight(){return this.canvasHeight}setI18n(t){this.i18nMap=t}addWarningOnce(t,i){this.warnings.some((i=>i.code===t))||this.warnings.push({code:t,data:i})}primaryColorIndex(){const t=T(this.config.size.measure);return null===t||"variance"===t.kind?10:this.ruleSet.getScenarioColorIndex(t.slot)}compareColorIndex(){return this.ruleSet.getScenarioColorIndex(`${this.config.compareFamily}1`)}seriesHue(t){const{color:i,overflowed:s}=e(t,this.styles.seriesColors);return s&&this.addWarningOnce("xy-series-overflow",{}),i}familyDisplayName(t){return this.ruleSet.getScenario(`${t}1`).group}legendModel(){var t,i;const s=[],h=null!==(i=null!==(t=this.config.size.label)&&void 0!==t?t:this.i18nMap.get("legend.size"))&&void 0!==i?i:"";""!==h&&(s.push(h),void 0!==this.config.size.unit&&""!==this.config.size.unit&&s.push(`${this.i18nMap.get("axis.in")||"in"} ${this.config.size.unit}`));const e=this.seriesHue(0),o=[];if(null!==this.config.compareFamily){const t=T(this.config.size.measure),i=null!==t&&"scenario"===t.kind?t.slot.replace(/\d+$/,""):"ac";o.push({label:this.familyDisplayName(this.config.compareFamily),treatment:n(this.compareColorIndex(),e,"bubble")}),o.push({label:this.familyDisplayName(i),treatment:n(this.primaryColorIndex(),e,"bubble")})}const l=this.data.series.map((t=>{var i;return{label:""===t.key?null!==(i=this.ruleSet.getScenario("").name)&&void 0!==i?i:"Series":t.key,treatment:n(this.primaryColorIndex(),this.seriesHue(t.index),"bubble")}}));return{sizeCaption:s,title:this.i18nMap.get("legend.title")||null,compareEntries:o,entries:l}}toString(){const t=new d;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}axisTitle(t,i){var s;const h=null!==(s=t.label)&&void 0!==s?s:"";return""===h?"":void 0===t.unit||""===t.unit?h:`${h} ${i} ${t.unit}`}draw(t){var i,s,h,e,n,o,l,r,a,d,c;this.warnings=this.data.warnings.slice(),this.hatchPatterns.clear(),this.scaleOverflowCount=0,this.svgRoot=t;const u=this.em,v=this.styles.padding,m=this.i18nMap.get("axis.in")||"in",b=t.group(),f=new g(this.styles),w=this.legendModel(),p=this.config.legend.show&&(w.entries.length>0||w.sizeCaption.length>0),x=p?f.measure(w,this.config.legend.position):{width:0,height:0},y="right"===this.config.legend.position&&p?x.width+u:0,$=""!==this.config.chartTitle?1.6*u:0,L=this.axisTitle(this.config.y,m),S=this.axisTitle(this.config.x,m),T=""!==L?1.4*u:.4*u,D=1.4*u+(""!==S?1.3*u:0);let N,C=3*u,W={x:0,y:0,width:0,height:0},j=[];const F=Math.max(1,this.data.facets.length),H=null===(i=this.config.facet)||void 0===i?void 0:i.columns,P=k.domain(null!==(h=null===(s=this.data.extents)||void 0===s?void 0:s.xMin)&&void 0!==h?h:0,null!==(n=null===(e=this.data.extents)||void 0===e?void 0:e.xMax)&&void 0!==n?n:1,{min:this.config.x.min,max:this.config.x.max}),A=k.domain(null!==(l=null===(o=this.data.extents)||void 0===o?void 0:o.yMin)&&void 0!==l?l:0,null!==(a=null===(r=this.data.extents)||void 0===r?void 0:r.yMax)&&void 0!==a?a:1,{min:this.config.y.min,max:this.config.y.max});for(let t=0;t<2;t++){const t=Math.max(10,this.availableWidth-v.left-v.right-C-y);W={x:v.left+C,y:v.top+$+T,width:t,height:t/this.config.aspect},N=new M(F,H,W,this.styles.scaleFactors.panelGap*u);const i=N.panelRect(0).height,s=Math.max(4,Math.min(8,Math.round(i/(4*u)))),h=new k(A[0],A[1],i,0);j=h.ticks(s);const e=k.tickDecimals(j);C=Math.max(...j.map((t=>this.textWidth(this.formatTick(t,e)))),u)+this.styles.scaleFactors.axisTickLength*u+.4*u}this.canvasHeight=W.y+W.height+D+("bottom"===this.config.legend.position&&p?x.height+u:0)+v.bottom,""!==this.config.chartTitle&&this.drawText(b,this.config.chartTitle,v.left,v.top+u,{bold:!0}),""!==L&&this.drawAxisTitleText(b,this.config.y,m,v.left,W.y-.6*u,"start");const I=this.buildPanels(N,P,A),U=I[0].xScale.ticks(Math.max(3,Math.min(8,Math.round(I[0].rect.width/(7*u))))),B=k.tickDecimals(U),E=k.tickDecimals(j),Y=this.config.sizeAreaPerUnit>0?z.grouped(this.config.sizeAreaPerUnit):z.local(null!==(c=null===(d=this.data.extents)||void 0===d?void 0:d.sizeMax)&&void 0!==c?c:0,this.styles.scaleFactors.bubbleMaxRadius*u,this.styles.scaleFactors.bubbleMinRadius*u);0===this.data.facets.length?this.drawPanel(b,I[0],{key:"",points:[]},Y,U,j,B,E,!0,!0):this.data.facets.forEach(((t,i)=>{this.drawPanel(b,I[i],t,Y,U,j,B,E,N.isOuterLeft(i),N.isOuterBottom(i),this.data.facets.length>1?t.key:"")})),""!==S&&this.drawAxisTitleText(b,this.config.x,m,W.x+W.width,W.y+W.height+2.6*u,"end"),p&&("right"===this.config.legend.position?f.draw(b,w,W.x+W.width+u,W.y,"right"):f.draw(b,w,W.x,W.y+W.height+D,"bottom")),this.scaleOverflowCount>0&&this.addWarningOnce("bubble-scale-overflow",{count:String(this.scaleOverflowCount)}),t.group().addClass("annotations")}drawAxisTitleText(t,i,s,h,e,n){var o;const l=null!==(o=i.label)&&void 0!==o?o:"",r=void 0!==i.unit&&""!==i.unit?`${s} ${i.unit}`:"",a=.3*this.em;"start"===n?(this.drawText(t,l,h,e,{bold:!0}),""!==r&&this.drawText(t,r,h+this.textWidth(l,!0)+a,e,{})):""!==r?(this.drawText(t,r,h,e,{anchor:"end"}),this.drawText(t,l,h-this.textWidth(r)-a,e,{anchor:"end",bold:!0})):this.drawText(t,l,h,e,{anchor:"end",bold:!0})}buildPanels(t,i,s){const h=[];for(let e=0;e<t.count;e++){const n=t.panelRect(e),o=new k(i[0],i[1],n.x,n.x+n.width),l=new k(s[0],s[1],n.y+n.height,n.y);h.push({rect:n,xScale:o,yScale:l,frame:new x(o,l,n,this.styles)})}return h}treatmentFill(t,i,s){return!0!==t.hatch?t.fill:(this.ensureHatchPattern(i,s),`url(#xy-fc-${i})`)}ensureHatchPattern(t,i){this.hatchPatterns.has(t)||null===this.svgRoot||(this.hatchPatterns.add(t),this.svgRoot.defs().pattern(10,10,(t=>{t.rect(10,10).fill("#ffffff"),t.line(0,10,10,0).stroke({color:i,width:2}),t.line(-2.5,2.5,2.5,-2.5).stroke({color:i,width:2}),t.line(7.5,12.5,12.5,7.5).stroke({color:i,width:2})})).id(`xy-fc-${t}`))}drawPanel(t,i,s,h,e,l,r,a,d,c,u=""){var v,m,b,f;const w=t.group(),p=this.em;i.frame.drawBands(w,this.config.x.highlight,this.config.y.highlight),i.frame.drawGrid(w,l,void 0===this.config.x.refLine&&void 0===this.config.y.refLine&&i.rect.width>30*p?e:void 0),i.frame.drawRefLines(w,this.config.x.refLine,this.config.y.refLine),i.frame.drawFrame(w);const g=w.group().id("compare"),x=w.group().id("primary"),M=new y(i.rect,this.styles.scaleFactors.labelToMark*p),$=[...s.points].sort(((t,i)=>{var s,h;return(null!==(s=i.size)&&void 0!==s?s:0)-(null!==(h=t.size)&&void 0!==h?h:0)})),L=[];for(const t of $){const s=null!==(m=null===(v=this.data.series.find((i=>i.key===t.seriesKey)))||void 0===v?void 0:v.index)&&void 0!==m?m:0,e=this.seriesHue(s),l=n(this.primaryColorIndex(),e,"bubble"),r=i.xScale.scale(t.x),a=i.yScale.scale(t.y),d=h.radius(null!==(b=t.size)&&void 0!==b?b:0);if(this.config.sizeAreaPerUnit>0&&this.bubbleExceedsPanel(i.rect,r,a,d)&&this.scaleOverflowCount++,null!=t.compare){const o=n(this.compareColorIndex(),e,"bubble"),l=i.xScale.scale(t.compare.x),r=i.yScale.scale(t.compare.y),a=h.radius(null!==(f=t.compare.size)&&void 0!==f?f:0);this.drawBubble(g,l,r,a,o,s,e),M.registerMark(l,r,a),this.config.labels.values&&void 0!==t.compare.size&&a>=1.2*p&&this.drawValueLabel(g,l,r,a,t.compare.size,o.fill)}this.drawBubble(x,r,a,d,l,s,e),M.registerMark(r,a,d),void 0!==t.share&&d>0&&this.drawShareSlice(x,r,a,d,t.share,o(e)),this.config.labels.values&&void 0!==t.size&&this.drawValueLabel(x,r,a,d,t.size,!0===l.hatch?"#ffffff":l.fill),L.push({point:t,cx:r,cy:a,r:d,seriesIndex:s,hue:e,treatment:l})}this.drawNameLabels(w,M,L),i.frame.drawTickLabels(w,{ticksX:e,ticksY:l,xDecimals:r,yDecimals:a,showXLabels:c,showYLabels:d}),""!==u&&i.frame.drawPanelTitle(w,u)}bubbleExceedsPanel(t,i,s,h){return i-h<t.x||i+h>t.x+t.width||s-h<t.y||s+h>t.y+t.height}drawBubble(t,i,s,h,e,n,o){h<=0||t.circle(2*h).center(i,s).fill(this.treatmentFill(e,n,o)).stroke({color:e.stroke,width:e.strokeWidth})}drawShareSlice(t,i,s,h,e,n){if(e<=0)return;if(e>=1)return void t.circle(2*h).center(i,s).fill(n);const o=2*e*Math.PI,l=i+h*Math.sin(o),r=s-h*Math.cos(o),a=o>Math.PI?1:0;t.path(`M ${i} ${s} L ${i} ${s-h} A ${h} ${h} 0 ${a} 1 ${l} ${r} Z`).fill(n).stroke("none")}drawValueLabel(t,i,s,h,e,n){const o=c.number(e,"decimal",1,1);this.textWidth(o)+.4*this.em>2*h||this.drawText(t,o,i,s+.35*this.em,{anchor:"middle",color:S(n.startsWith("#")?n:"#ffffff")})}drawNameLabels(t,i,s){const h=[...s].sort(((t,i)=>{var s,h;return(null!==(s=i.point.size)&&void 0!==s?s:0)-(null!==(h=t.point.size)&&void 0!==h?h:0)})),{selected:e,unknownNames:n}=i.selectCandidates(h,this.config.labels.points,this.config.labels.max,(t=>t.point.name));n.length>0&&this.addWarningOnce("xy-label-unknown",{names:n.join(", ")});const o=e.map((t=>({name:t.point.name,cx:t.cx,cy:t.cy,r:t.r,width:this.textWidth(t.point.name),height:1.1*this.em})));for(const s of i.place(o))this.drawText(t,s.candidate.name,s.x,s.y+.9*s.candidate.height,{})}formatTick(t,i){return c.number(t,"decimal",i,i)}}const N=["xy-duplicate-point","xy-point-clipped","xy-variance-nodata","xy-label-unknown","xy-series-overflow","xy-point-budget","bubble-size-negative","bubble-share-range","bubble-scale-overflow"],C=class{constructor(i){t(this,i),this.tableName="",this.dataVersion=0,this.chartTitle="",this.share=null,this.compareFamily=null,this.facet=null,this.pointLevel="category",this.seriesLevel=null,this.aspect=16/9,this.limit=0,this.filter="",this.sizeAreaPerUnit=0,this.i18n=new Map,this.containerWidth=0,this.svgMarkup=""}getDb(){return this.stores||(this.stores=l(this.element)),this.stores.db.db}componentWillLoad(){this.rebuild()}componentWillUpdate(){this.rebuild()}rebuild(){const t=this.prepareStyle(),i=this.tableName?r(this.tableName,this.filter):"";this.chart=new D(new u(this.ruleSetConfig),this.getDb(),i,{chartTitle:this.chartTitle,x:this.x,y:this.y,size:this.size,share:this.share,compareFamily:this.compareFamily,labels:this.labels,legend:this.legend,facet:this.facet,pointLevel:this.pointLevel,seriesLevel:this.seriesLevel,aspect:this.aspect,limit:this.limit,sizeAreaPerUnit:this.sizeAreaPerUnit},t,this.containerWidth||0),this.chart.setI18n(this.i18n),this.svgMarkup=this.chart.hasNoData()?"":this.chart.toString(),this.syncWarnings(this.chart.getWarnings())}syncWarnings(t){if(void 0===this.errors)return;const i=new Map(t.map((t=>[t.code,t.data])));for(const t of N){const s=`WARN_${t}`;if(i.has(t)){const h=void 0!==this.translate?this.translate(`.${t}`,i.get(t)):t;this.errors.addOrReplace({id:s,type:"warning",message:h})}else this.errors.remove(s)}}prepareStyle(){return new $(new L,new v,new m(new b),new f).adapt(this.styles)}render(){if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const t=this.i18n.get("no-data")||"==No Data==";return i(s,null,i("p",{class:"warning"},t))}return i(s,null,i("div",{innerHTML:this.svgMarkup}))}get element(){return h(this)}};C.style=':host{position:relative;display:inline-block}.warning{font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}';export{C as ibcs_chart_bubble}
|
|
1
|
+
import{r as t,h as i,H as s,g as h}from"./p-C5UYpZUU.js";import{r as e,m as n,s as o,g as a,d as l}from"./p-CURM2Nrr.js";import{C as r,S as d,F as c,I as u,a as v,b as m,c as b,P as f}from"./p-CHZZqoB7.js";import{X as p,r as w,a as g,b as x,P as y,F as M,c as $,S as k}from"./p-BCr2-Ka-.js";import{g as z}from"./p-Ckhir6Ux.js";import{N as S}from"./p-DsTzlzxQ.js";import{r as C}from"./p-BEkgk7Ij.js";class L{constructor(t,i,s,h,e){this.mode=t,this.vMax=i,this.rMaxPx=s,this.rMinPx=h,this.areaPerUnitPx2=e}static local(t,i,s){return new L("local",t,i,s,0)}static grouped(t){return new L("grouped",0,0,0,t)}radius(t){return"grouped"===this.mode?t<=0?0:Math.sqrt(this.areaPerUnitPx2*t/Math.PI):this.vMax<=0||t<=0?this.rMinPx:Math.max(this.rMinPx,this.rMaxPx*Math.sqrt(t/this.vMax))}}class N{constructor(t,i,s,h,e,n){var o,a,l,r;this.ruleSet=t,this.config=h,this.styles=e,this.availableWidth=n,this.warnings=[],this.canvasHeight=0,this.i18nMap=new Map,this.hatchPatterns=new Set,this.scaleOverflowCount=0,this.svgRoot=null;const d=new p,c=""!==s?i.exec(`SELECT * FROM ${s}`):[],u=(null!=c?c:[]).map((t=>d.adapt(t)));this.data=w(u,{pointLevel:h.pointLevel,seriesLevel:h.seriesLevel,facetLevel:null!==h.facet?"rowgroup"===h.facet.level?"rowGroup":"category":null,measures:{x:null!==(o=C(h.x.measure))&&void 0!==o?o:{kind:"scenario",slot:"ac1"},y:null!==(a=C(h.y.measure))&&void 0!==a?a:{kind:"scenario",slot:"ac2"},size:null!==(l=C(h.size.measure))&&void 0!==l?l:{kind:"scenario",slot:"ac3"},share:null!==h.share&&null!==(r=C(h.share.measure))&&void 0!==r?r:void 0},compareFamily:h.compareFamily,domains:{x:{min:h.x.min,max:h.x.max},y:{min:h.y.min,max:h.y.max}},limit:h.limit,limitBy:"size"}),this.warnings.push(...this.data.warnings)}get em(){return this.styles.fontStyles.size}fontFamily(){return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/,"")}textWidth(t,i=!1){const s=r(t,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px",fontWeight:i?"bold":"normal"}).width;return Number.isFinite(s)&&s>0?s:.6*t.length*this.em}drawText(t,i,s,h,e={}){var n,o;t.text(i).font({size:this.styles.fontStyles.size,weight:e.bold?"bold":"normal",anchor:null!==(n=e.anchor)&&void 0!==n?n:"start"}).fill(null!==(o=e.color)&&void 0!==o?o:this.styles.fontStyles.color).attr({x:s,y:h,"font-family":this.fontFamily()})}hasNoData(){return 0===this.data.totalPoints}getWarnings(){return this.warnings}getAllocatedCanvasWidth(){return this.availableWidth}getAllocatedCanvasHeight(){return this.canvasHeight}setI18n(t){this.i18nMap=t}addWarningOnce(t,i){this.warnings.some((i=>i.code===t))||this.warnings.push({code:t,data:i})}primaryColorIndex(){const t=C(this.config.size.measure);return null===t||"variance"===t.kind?10:this.ruleSet.getScenarioColorIndex(t.slot)}compareColorIndex(){return this.ruleSet.getScenarioColorIndex(`${this.config.compareFamily}1`)}seriesHue(t){const{color:i,overflowed:s}=e(t,this.styles.seriesColors);return s&&this.addWarningOnce("xy-series-overflow",{}),i}familyDisplayName(t){return this.ruleSet.getScenario(`${t}1`).group}legendModel(){var t,i;const s=[],h=null!==(i=null!==(t=this.config.size.label)&&void 0!==t?t:this.i18nMap.get("legend.size"))&&void 0!==i?i:"";""!==h&&(s.push(h),void 0!==this.config.size.unit&&""!==this.config.size.unit&&s.push(`${this.i18nMap.get("axis.in")||"in"} ${this.config.size.unit}`));const e=this.seriesHue(0),o=[];if(null!==this.config.compareFamily){const t=C(this.config.size.measure),i=null!==t&&"scenario"===t.kind?t.slot.replace(/\d+$/,""):"ac";o.push({label:this.familyDisplayName(this.config.compareFamily),treatment:n(this.compareColorIndex(),e,"bubble")}),o.push({label:this.familyDisplayName(i),treatment:n(this.primaryColorIndex(),e,"bubble")})}const a=this.data.series.map((t=>{var i;return{label:""===t.key?null!==(i=this.ruleSet.getScenario("").name)&&void 0!==i?i:"Series":t.key,treatment:n(this.primaryColorIndex(),this.seriesHue(t.index),"bubble")}}));return{sizeCaption:s,title:this.i18nMap.get("legend.title")||null,compareEntries:o,entries:a}}toString(){const t=new d;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}axisTitle(t,i){var s;const h=null!==(s=t.label)&&void 0!==s?s:"";return""===h?"":void 0===t.unit||""===t.unit?h:`${h} ${i} ${t.unit}`}draw(t){var i,s,h,e,n,o,a,l,r,d,c;this.warnings=this.data.warnings.slice(),this.hatchPatterns.clear(),this.scaleOverflowCount=0,this.svgRoot=t;const u=this.em,v=this.styles.padding,m=this.i18nMap.get("axis.in")||"in",b=t.group(),f=new g(this.styles),p=this.legendModel(),w=this.config.legend.show&&(p.entries.length>0||p.sizeCaption.length>0),x=w?f.measure(p,this.config.legend.position):{width:0,height:0},y="right"===this.config.legend.position&&w?x.width+u:0,$=""!==this.config.chartTitle?1.6*u:0,k=this.axisTitle(this.config.y,m),z=this.axisTitle(this.config.x,m),C=""!==k?1.4*u:.4*u,N=1.4*u+(""!==z?1.3*u:0);let j,T=3*u,W={x:0,y:0,width:0,height:0},D=[];const F=Math.max(1,this.data.facets.length),P=null===(i=this.config.facet)||void 0===i?void 0:i.columns,U=S.domain(null!==(h=null===(s=this.data.extents)||void 0===s?void 0:s.xMin)&&void 0!==h?h:0,null!==(n=null===(e=this.data.extents)||void 0===e?void 0:e.xMax)&&void 0!==n?n:1,{min:this.config.x.min,max:this.config.x.max}),A=S.domain(null!==(a=null===(o=this.data.extents)||void 0===o?void 0:o.yMin)&&void 0!==a?a:0,null!==(r=null===(l=this.data.extents)||void 0===l?void 0:l.yMax)&&void 0!==r?r:1,{min:this.config.y.min,max:this.config.y.max});for(let t=0;t<2;t++){const t=Math.max(10,this.availableWidth-v.left-v.right-T-y);W={x:v.left+T,y:v.top+$+C,width:t,height:t/this.config.aspect},j=new M(F,P,W,this.styles.scaleFactors.panelGap*u);const i=j.panelRect(0).height,s=Math.max(4,Math.min(8,Math.round(i/(4*u)))),h=new S(A[0],A[1],i,0);D=h.ticks(s);const e=S.tickDecimals(D);T=Math.max(...D.map((t=>this.textWidth(this.formatTick(t,e)))),u)+this.styles.scaleFactors.axisTickLength*u+.4*u}this.canvasHeight=W.y+W.height+N+("bottom"===this.config.legend.position&&w?x.height+u:0)+v.bottom,""!==this.config.chartTitle&&this.drawText(b,this.config.chartTitle,v.left,v.top+u,{bold:!0}),""!==k&&this.drawAxisTitleText(b,this.config.y,m,v.left,W.y-.6*u,"start");const H=this.buildPanels(j,U,A),I=H[0].xScale.ticks(Math.max(3,Math.min(8,Math.round(H[0].rect.width/(7*u))))),B=S.tickDecimals(I),E=S.tickDecimals(D),Z=this.config.sizeAreaPerUnit>0?L.grouped(this.config.sizeAreaPerUnit):L.local(null!==(c=null===(d=this.data.extents)||void 0===d?void 0:d.sizeMax)&&void 0!==c?c:0,this.styles.scaleFactors.bubbleMaxRadius*u,this.styles.scaleFactors.bubbleMinRadius*u);0===this.data.facets.length?this.drawPanel(b,H[0],{key:"",points:[]},Z,I,D,B,E,!0,!0):this.data.facets.forEach(((t,i)=>{this.drawPanel(b,H[i],t,Z,I,D,B,E,j.isOuterLeft(i),j.isOuterBottom(i),this.data.facets.length>1?t.key:"")})),""!==z&&this.drawAxisTitleText(b,this.config.x,m,W.x+W.width,W.y+W.height+2.6*u,"end"),w&&("right"===this.config.legend.position?f.draw(b,p,W.x+W.width+u,W.y,"right"):f.draw(b,p,W.x,W.y+W.height+N,"bottom")),this.scaleOverflowCount>0&&this.addWarningOnce("bubble-scale-overflow",{count:String(this.scaleOverflowCount)}),t.group().addClass("annotations")}drawAxisTitleText(t,i,s,h,e,n){var o;const a=null!==(o=i.label)&&void 0!==o?o:"",l=void 0!==i.unit&&""!==i.unit?`${s} ${i.unit}`:"",r=.3*this.em;"start"===n?(this.drawText(t,a,h,e,{bold:!0}),""!==l&&this.drawText(t,l,h+this.textWidth(a,!0)+r,e,{})):""!==l?(this.drawText(t,l,h,e,{anchor:"end"}),this.drawText(t,a,h-this.textWidth(l)-r,e,{anchor:"end",bold:!0})):this.drawText(t,a,h,e,{anchor:"end",bold:!0})}buildPanels(t,i,s){const h=[];for(let e=0;e<t.count;e++){const n=t.panelRect(e),o=new S(i[0],i[1],n.x,n.x+n.width),a=new S(s[0],s[1],n.y+n.height,n.y);h.push({rect:n,xScale:o,yScale:a,frame:new x(o,a,n,this.styles)})}return h}treatmentFill(t,i,s){return!0!==t.hatch?t.fill:(this.ensureHatchPattern(i,s),`url(#xy-fc-${i})`)}ensureHatchPattern(t,i){this.hatchPatterns.has(t)||null===this.svgRoot||(this.hatchPatterns.add(t),this.svgRoot.defs().pattern(10,10,(t=>{t.rect(10,10).fill("#ffffff"),t.line(0,10,10,0).stroke({color:i,width:2}),t.line(-2.5,2.5,2.5,-2.5).stroke({color:i,width:2}),t.line(7.5,12.5,12.5,7.5).stroke({color:i,width:2})})).id(`xy-fc-${t}`))}drawPanel(t,i,s,h,e,a,l,r,d,c,u=""){var v,m,b,f;const p=t.group(),w=this.em;i.frame.drawBands(p,this.config.x.highlight,this.config.y.highlight),i.frame.drawGrid(p,a,void 0===this.config.x.refLine&&void 0===this.config.y.refLine&&i.rect.width>30*w?e:void 0),i.frame.drawRefLines(p,this.config.x.refLine,this.config.y.refLine),i.frame.drawFrame(p);const g=p.group().id("compare"),x=p.group().id("primary"),M=new y(i.rect,this.styles.scaleFactors.labelToMark*w),$=[...s.points].sort(((t,i)=>{var s,h;return(null!==(s=i.size)&&void 0!==s?s:0)-(null!==(h=t.size)&&void 0!==h?h:0)})),k=[];for(const t of $){const s=null!==(m=null===(v=this.data.series.find((i=>i.key===t.seriesKey)))||void 0===v?void 0:v.index)&&void 0!==m?m:0,e=this.seriesHue(s),a=n(this.primaryColorIndex(),e,"bubble"),l=i.xScale.scale(t.x),r=i.yScale.scale(t.y),d=h.radius(null!==(b=t.size)&&void 0!==b?b:0);if(this.config.sizeAreaPerUnit>0&&this.bubbleExceedsPanel(i.rect,l,r,d)&&this.scaleOverflowCount++,null!=t.compare){const o=n(this.compareColorIndex(),e,"bubble"),a=i.xScale.scale(t.compare.x),l=i.yScale.scale(t.compare.y),r=h.radius(null!==(f=t.compare.size)&&void 0!==f?f:0);this.drawBubble(g,a,l,r,o,s,e),M.registerMark(a,l,r),this.config.labels.values&&void 0!==t.compare.size&&r>=1.2*w&&this.drawValueLabel(g,a,l,r,t.compare.size,o.fill)}this.drawBubble(x,l,r,d,a,s,e),M.registerMark(l,r,d),void 0!==t.share&&d>0&&this.drawShareSlice(x,l,r,d,t.share,o(e)),this.config.labels.values&&void 0!==t.size&&this.drawValueLabel(x,l,r,d,t.size,!0===a.hatch?"#ffffff":a.fill),k.push({point:t,cx:l,cy:r,r:d,seriesIndex:s,hue:e,treatment:a})}this.drawNameLabels(p,M,k),i.frame.drawTickLabels(p,{ticksX:e,ticksY:a,xDecimals:l,yDecimals:r,showXLabels:c,showYLabels:d}),""!==u&&i.frame.drawPanelTitle(p,u)}bubbleExceedsPanel(t,i,s,h){return i-h<t.x||i+h>t.x+t.width||s-h<t.y||s+h>t.y+t.height}drawBubble(t,i,s,h,e,n,o){h<=0||t.circle(2*h).center(i,s).fill(this.treatmentFill(e,n,o)).stroke({color:e.stroke,width:e.strokeWidth})}drawShareSlice(t,i,s,h,e,n){if(e<=0)return;if(e>=1)return void t.circle(2*h).center(i,s).fill(n);const o=2*e*Math.PI,a=i+h*Math.sin(o),l=s-h*Math.cos(o),r=o>Math.PI?1:0;t.path(`M ${i} ${s} L ${i} ${s-h} A ${h} ${h} 0 ${r} 1 ${a} ${l} Z`).fill(n).stroke("none")}drawValueLabel(t,i,s,h,e,n){const o=c.number(e,"decimal",1,1);this.textWidth(o)+.4*this.em>2*h||this.drawText(t,o,i,s+.35*this.em,{anchor:"middle",color:z(n.startsWith("#")?n:"#ffffff")})}drawNameLabels(t,i,s){const h=[...s].sort(((t,i)=>{var s,h;return(null!==(s=i.point.size)&&void 0!==s?s:0)-(null!==(h=t.point.size)&&void 0!==h?h:0)})),{selected:e,unknownNames:n}=i.selectCandidates(h,this.config.labels.points,this.config.labels.max,(t=>t.point.name));n.length>0&&this.addWarningOnce("xy-label-unknown",{names:n.join(", ")});const o=e.map((t=>({name:t.point.name,cx:t.cx,cy:t.cy,r:t.r,width:this.textWidth(t.point.name),height:1.1*this.em})));for(const s of i.place(o))this.drawText(t,s.candidate.name,s.x,s.y+.9*s.candidate.height,{})}formatTick(t,i){return c.number(t,"decimal",i,i)}}const j=["xy-duplicate-point","xy-point-clipped","xy-variance-nodata","xy-label-unknown","xy-series-overflow","xy-point-budget","bubble-size-negative","bubble-share-range","bubble-scale-overflow"],T=class{constructor(i){t(this,i),this.tableName="",this.dataVersion=0,this.chartTitle="",this.share=null,this.compareFamily=null,this.facet=null,this.pointLevel="category",this.seriesLevel=null,this.aspect=16/9,this.limit=0,this.filter="",this.sizeAreaPerUnit=0,this.i18n=new Map,this.containerWidth=0,this.svgMarkup=""}getDb(){return this.stores||(this.stores=a(this.element)),this.stores.db.db}componentWillLoad(){this.rebuild()}componentWillUpdate(){this.rebuild()}rebuild(){const t=this.prepareStyle(),i=this.tableName?l(this.tableName,this.filter):"";this.chart=new N(new u(this.ruleSetConfig),this.getDb(),i,{chartTitle:this.chartTitle,x:this.x,y:this.y,size:this.size,share:this.share,compareFamily:this.compareFamily,labels:this.labels,legend:this.legend,facet:this.facet,pointLevel:this.pointLevel,seriesLevel:this.seriesLevel,aspect:this.aspect,limit:this.limit,sizeAreaPerUnit:this.sizeAreaPerUnit},t,this.containerWidth||0),this.chart.setI18n(this.i18n),this.svgMarkup=this.chart.hasNoData()?"":this.chart.toString(),this.syncWarnings(this.chart.getWarnings())}syncWarnings(t){if(void 0===this.errors)return;const i=new Map(t.map((t=>[t.code,t.data])));for(const t of j){const s=`WARN_${t}`;if(i.has(t)){const h=void 0!==this.translate?this.translate(`.${t}`,i.get(t)):t;this.errors.addOrReplace({id:s,type:"warning",message:h})}else this.errors.remove(s)}}prepareStyle(){return new $(new k,new v,new m(new b),new f).adapt(this.styles)}render(){var t;if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const h=null!==(t=this.i18n.get("no-data"))&&void 0!==t?t:"No Data";return i(s,{class:"no-data"},i("div",{class:"empty-state"},h))}return i(s,null,i("div",{innerHTML:this.svgMarkup}))}get element(){return h(this)}};T.style=':host(.no-data){display:block;box-sizing:border-box;width:100%;height:100%}:host(.no-data)>div{float:none;width:100%;height:100%}:host(.no-data) .no-data~.no-data{display:none}.empty-state{box-sizing:border-box;display:flex;align-items:center;justify-content:center;float:none;width:100%;height:100%;min-height:3em;margin:0;padding:0.5em;overflow:hidden;border:0.1em dashed #ddd;color:#808080;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);font-style:normal;text-align:center}:host{position:relative;display:inline-block}';export{T as ibcs_chart_bubble}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as o,g as e}from"./p-C5UYpZUU.js";import{a as n,w as s,g as a,p as
|
|
1
|
+
import{r as t,h as i,H as o,g as e}from"./p-C5UYpZUU.js";import{a as n,w as s,g as a,p as r}from"./p-Ct0wEGrw.js";import{w as l,a as d}from"./p-DtLI_CzV.js";import{w as c,b as f}from"./p-BVYKc5cH.js";import{s as v}from"./p-BA48JiHe.js";import"./p-CURM2Nrr.js";import"./p-BEkgk7Ij.js";import"./p-DwGg2_vO.js";const h=/\b(__proto__|globalThis)\b|\.constructor\b/,u=class{constructor(i){t(this,i),this.data={},c(this),l(this),this.errors=d(this),this.t=n(this).t,s(this,((t,i)=>{this.data=Object.assign(Object.assign({},this.data),{[t]:i})})),this.componentStyle=f(this)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"no_value",type:"warning",message:"Empty value"}):this.errors.remove("no_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const i=Number(t);isNaN(i)||i<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}evalTemplate(t){if(!t)return"";if(h.test(t))return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:"Template contains forbidden pattern"}),"";try{const i=new Proxy({data:this.data,t:this.t},{has:()=>!0,get:(t,i)=>i===Symbol.unscopables?void 0:t[i],set:()=>!0}),o=new Function("sandbox","with(sandbox){try{return`"+t+'`}catch(e){return""}}').call(i,i);return this.errors.remove("ERR_value_eval"),null!=o?String(o):""}catch(t){return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:`Template evaluation failed: ${t instanceof Error?t.message:String(t)}`}),""}}prepareStyle(){return this.componentStyle((t=>{var i,o,e,n,s,a,r,l,d,c,f,v,h,u,p,b,m,g,w,y,_,R;return{fontStyles:{font:`${null!==(n=null!==(o=null===(i=t["bn-text"])||void 0===i?void 0:i.fontSizePx)&&void 0!==o?o:null===(e=t.global)||void 0===e?void 0:e.fontSizePx)&&void 0!==n?n:13.3333}px ${null!==(l=null!==(a=null===(s=t["bn-text"])||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:null===(r=t.global)||void 0===r?void 0:r.fontFamily)&&void 0!==l?l:"'Noto Sans', sans-serif"}`,size:null!==(v=null!==(c=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==c?c:null===(f=t.global)||void 0===f?void 0:f.fontSizePx)&&void 0!==v?v:13.3333,color:null!==(b=null!==(u=null===(h=t["bn-text"])||void 0===h?void 0:h.fontColor)&&void 0!==u?u:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==b?b:"#000000",background:null!==(y=null!==(g=null===(m=t["bn-text"])||void 0===m?void 0:m.fontBackgroundColor)&&void 0!==g?g:null===(w=t.global)||void 0===w?void 0:w.fontBackgroundColor)&&void 0!==y?y:"#ffffff",leading:null!==(R=null===(_=t["bn-text"])||void 0===_?void 0:_.leading)&&void 0!==R?R:1.8}}}))}applyScaling(t){const i=this.element,{mode:o,factor:e}=r(this.scale),{width:n,height:s}=a(i),l=i.scrollHeight>i.clientHeight+1?i.clientHeight:s,d=n,c=d>0&&i.scrollWidth>d+1,f=l>0&&i.scrollHeight>l+1,v=c||f;if(d<=0&&l<=0)return;if("none"===o){if(v){const t=[];c&&t.push(`w:${i.scrollWidth}>${Math.round(d)}`),f&&t.push(`h:${i.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===o){if(v){const t=[];c&&t.push(`w:${i.scrollWidth}>${Math.round(d)}`),f&&t.push(`h:${i.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${e} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}i.style.setProperty("--bn-font-size",`${t}px`);const h=i.scrollWidth,u=i.scrollHeight,p=i.clientHeight,b=u>p+1?p:s,m=d<=0||h<=d+1,g=b<=0||u<=b+1;if(m&&g)return void this.errors.remove("AUTO_scale");const w=Math.min(1,!m&&d>0?d/h:1,!g&&b>0?b/u:1);i.style.setProperty("--bn-font-size",t*w+"px"),"empty"===o?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${w.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){this.container.innerHTML=v(this.evalTemplate(this.value)),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:e,factor:n}=r(this.scale),s="factor"===e?t.size*n+"px":`${t.size}px`,a={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":s,"--bn-font-color":t.color,"--bn-font-background":t.background};return i(o,{key:"b5516777bb29ddddf3fb43ff518fdc383c86a812",style:a},i("div",{key:"dc325b0679f0a151ac60d32cae70f2a2f14ae205"},i("span",{key:"fcdc9c6cb9224428e7b47df3ac10336bcdffb260",class:"container",ref:t=>{this.container=t}})))}get element(){return e(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};u.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{u as bn_text}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as i,g as r}from"./p-C5UYpZUU.js";import{w as a}from"./p-CTrNbSXN.js";import{g as e,f as n}from"./p-CURM2Nrr.js";import{w as o,a as h}from"./p-DtLI_CzV.js";const c=class{constructor(s){t(this,s),this.namespace="_system",o(this),this.errors=h(this),a(this,(t=>{this.stores||(this.stores=e(this.element));try{const s=n(JSON.parse(t)),i=this.namespace||"_system",r=Object.assign({},this.stores.internationalization.get(i));r[this.code]=Object.assign(Object.assign({},r[this.code]),s),this.stores.internationalization.set(i,r)}catch(t){console.error(t)}}))}render(){return s(i,{key:"1b5e46fd06494aada4db697402746be6bcf950db"})}get element(){return r(this)}};c.style="bn-internationalization{display:none}";export{c as bn_internationalization}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,d as i,f as s,h as e,H as a,g as r}from"./p-C5UYpZUU.js";import{o as n}from"./p-CtEA0ZQc.js";import{w as o,s as l,o as h,c as d}from"./p-DJ5KJ6GF.js";import{a as u}from"./p-CURM2Nrr.js";import{w as c,a as p,g as v,p as f}from"./p-Ct0wEGrw.js";import{i as m,a as g,w as y,b,c as x}from"./p-BVYKc5cH.js";import{w,a as _}from"./p-DtLI_CzV.js";import{r as $,s as R}from"./p-BEkgk7Ij.js";import{f as S,c as L,d as E,e as j,p as A,t as C}from"./p-Z-mcXias.js";import"./index.esm.js";import"./p-DwGg2_vO.js";const N={rowGroup:0,category:1,subCategory:2},O=class{validateX(t){this.validateAxisSpec("x",t)}validateY(t){this.validateAxisSpec("y",t)}validateIso(t){this.validateObjectSpec("iso",t,null,(t=>S(t)))}validateLevel(t){const i="ERR_level",s=["auto","category","subcategory"];m(t)||s.includes(t.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`level: invalid value '${t}' — expected ${s.join("/")}; using 'auto'.`})}validateSeriesLevel(t){const i="ERR_seriesLevel",s=["auto","rowgroup","category","none"];m(t)||s.includes(t.trim().toLowerCase())?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`series-level: invalid value '${t}' — expected ${s.join("/")}; using 'auto'.`})}validateFacet(t){this.validateObjectSpec("facet",t,null,(t=>L(t)))}validateLabels(t){this.validateObjectSpec("labels",t,null,(t=>E(t,this.labelDefaults())))}validateLegend(t){this.validateObjectSpec("legend",t,null,(t=>j(t)))}validateAspect(t){const i="ERR_aspect";m(t)||null!==this.parseAspect(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`aspect: invalid value '${t}' — expected "w:h" (e.g. "16:9"); using the default.`})}validateLimit(t){const i="ERR_limit";g(t)&&Number(t)>=0?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`limit: invalid value '${t}' — expected a non-negative integer; using 0.`})}validateScale(t){const i="ERR_scale";if(m(t))return void this.errors.remove(i);const{mode:s,factor:e}=f(t);"factor"===s&&(void 0===e||e<=0)?this.errors.addOrReplace({id:i,type:"warning",message:`scale: invalid value '${t}' — expected none/auto or a positive number.`}):this.errors.remove(i)}constructor(i){t(this,i),this.datasetName="",this.dataVersion=0,this.datasetMeta=null,this.appliedScaleFactor=1,this.layoutObserver=null,this.activeErrors=new Set,this.chartTitle="",this.filter="",this.iso="",this.level="auto",this.seriesLevel="auto",this.facet="",this.labels="",this.legend="",this.aspect="16:9",this.limit=0,this._autoScaleGuard=!1,this._lastObservedWidth=0,this.translateForInner=(t,i)=>this.t(t,i),y(this),w(this),c(this,(t=>{this.datasetName=(null==t?void 0:t.startsWith("$"))?t.substring(1):t||"",this.dataVersion=this.dataVersion+1}),((t,i)=>{this.datasetMeta=i})),this.errors=_(this),this.componentStyle=b(this),this.ruleSetConfig=o(this),this.t=p(this).t}componentWillLoad(){this.validateX(this.x),this.validateY(this.y),this.validateIso(this.iso),this.validateLevel(this.level),this.validateSeriesLevel(this.seriesLevel),this.validateFacet(this.facet),this.validateLabels(this.labels),this.validateLegend(this.legend),this.validateAspect(this.aspect),this.validateLimit(this.limit),this.validateScale(this.scale)}componentDidRender(){l(this.element,"ibcs-chart-scatter");const{mode:t}=f(this.scale);if("auto"!==t&&"empty"!==t){this._autoScaleGuard=!1;const t=v(this.element),i="WARN_overflow";return void(t.width>0&&this.element.scrollWidth>t.width+1?this.errors.addOrReplace({id:i,type:"warning",message:"Chart exceeds available space and will be cut off. Check the scale value."}):this.errors.remove(i))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const s=this.element,{width:e}=v(s);if(e<=0)return;this._lastObservedWidth=e;const a=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333})),r=s.scrollWidth,n=this.appliedScaleFactor;if(!Number.isFinite(r)||r<=e+1)return void this.errors.remove("AUTO_scale");const o=Math.max(.3,n*(e-1)/r);Math.abs(o-n)<.01||(s.style.setProperty("--bn-font-size",a*o+"px"),"empty"===t?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${o.toFixed(3)}`}):this.errors.remove("AUTO_scale"),this._autoScaleGuard=!0,i((()=>{this.appliedScaleFactor=o})))}componentDidLoad(){this.layoutObserver=h(this.element,(()=>{if(this._autoScaleGuard)return;const{width:t}=v(this.element);t>0&&Math.abs(t-this._lastObservedWidth)>2&&(this._lastObservedWidth=t,s(this))})),requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(this._autoScaleGuard)return;const{width:t}=v(this.element);this._lastObservedWidth=t,s(this)}))}))}disconnectedCallback(){var t;null===(t=this.layoutObserver)||void 0===t||t.disconnect(),this.layoutObserver=null}labelDefaults(){return{points:"auto",values:!1,max:12}}setBlockingError(t,i){null===i?(this.errors.remove(t),this.activeErrors.delete(t)):(this.errors.addOrReplace({id:t,type:"error",message:i}),this.activeErrors.add(t))}hasBlockingErrors(){return this.activeErrors.size>0}validateAxisSpec(t,i){var s;const e=`ERR_xy_json_${t}`,a=`ERR_xy_measure_${t}`,r=`WARN_xy_fields_${t}`,n="x"===t||"y"===t||"size"===t,{data:o,parseError:l}=A(i,"measure");if(l)return this.setBlockingError(e,this.t(".xy-prop-json",{prop:t})),this.setBlockingError(a,null),void this.errors.remove(r);if(this.setBlockingError(e,null),null===o)return this.setBlockingError(a,n?this.t(".xy-measure-invalid",{prop:t,measure:""}):null),void this.errors.remove(r);const h="share"===t?null:C(o),d=null!==(s=o.measure)&&void 0!==s?s:"";x(d)?this.setBlockingError(a,null):this.setBlockingError(a,this.t(".xy-measure-invalid",{prop:t,measure:d})),this.reportSpecIssues(r,t,h)}validateObjectSpec(t,i,s,e){const a=`ERR_xy_json_${t}`,r=`WARN_xy_fields_${t}`,{data:n,parseError:o}=A(i,s);if(o)return this.setBlockingError(a,this.t(".xy-prop-json",{prop:t})),void this.errors.remove(r);this.setBlockingError(a,null),null!==n?this.reportSpecIssues(r,t,e(n)):this.errors.remove(r)}reportSpecIssues(t,i,s){const e=[];null!==s&&s.invalidFields.length>0&&e.push(`invalid: ${s.invalidFields.join(", ")}`),null!==s&&s.unknownKeys.length>0&&e.push(`unknown: ${s.unknownKeys.join(", ")}`),e.length>0?this.errors.addOrReplace({id:t,type:"warning",message:`${i}: ignored sub-fields (${e.join("; ")}).`}):this.errors.remove(t)}prepareAxis(t,i){const{data:s,parseError:e}=A(i,"measure");if(e||null===s)return null;const{config:a}=C(s);return null!==a&&x(a.measure)?(void 0!==a.min&&void 0!==a.max&&a.min>=a.max?(this.errors.addOrReplace({id:`WARN_xy_domain_${t}`,type:"warning",message:`${t}: min must be smaller than max; the override is ignored.`}),a.min=void 0,a.max=void 0):this.errors.remove(`WARN_xy_domain_${t}`),a):null}prepareIso(){const{data:t,parseError:i}=A(this.iso,null);return i||null===t?null:S(t).config}prepareLabels(){const t=this.labelDefaults(),{data:i,parseError:s}=A(this.labels,null);return s||null===i?{points:t.points,values:t.values,max:t.max}:E(i,t).config}prepareLegend(){const{data:t,parseError:i}=A(this.legend,null);return i||null===t?{show:!0,position:"right"}:j(t).config}prepareFacet(){const{data:t,parseError:i}=A(this.facet,null);return i||null===t?null:L(t).config}preparePointLevel(){var t,i;const s=null===(t=this.level)||void 0===t?void 0:t.trim().toLowerCase();if("category"===s)return"category";if("subcategory"===s)return"subCategory";const e=null===(i=this.datasetMeta)||void 0===i?void 0:i.suggestedLevel;return"rowGroup"===e||"category"===e||"subCategory"===e?e:"category"}prepareSeriesLevel(t){var i;const s=null===(i=this.seriesLevel)||void 0===i?void 0:i.trim().toLowerCase();return"none"===s?null:"rowgroup"===s?"rowGroup":"category"===s||"subCategory"===t?"category":"category"===t?"rowGroup":null}validateCrossProp(t,i){const s=new Set;for(const i of t){if(void 0===i)continue;const t=$(i);null!==t&&"scenario"===t.kind&&s.add(R(t.slot))}this.setBlockingError("ERR_xy_family",s.size>1?this.t(".xy-family-mixed",{families:[...s].join(", ")}):null);const e=this.preparePointLevel(),a=this.prepareSeriesLevel(e),r=null!==i?"rowgroup"===i.level?"rowGroup":"category":null;let n=null;if(null!==a&&N[a]>=N[e]&&(n=`series '${a}' vs point '${e}'`),null!==r){const t=null!=a?a:e;N[r]>=N[t]&&(n=`facet '${r}' vs '${t}'`)}this.setBlockingError("ERR_xy_level_order",null!==n?this.t(".xy-level-order",{detail:n}):null)}parseAspect(t){const i=/^\s*(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)\s*$/.exec(null!=t?t:"");if(null===i)return null;const s=Number(i[1]),e=Number(i[2]);return s<=0||e<=0?null:s/e}prepareAspect(){var t;return null!==(t=this.parseAspect(this.aspect))&&void 0!==t?t:16/9}prepareLimit(){const t=Math.floor(Number(this.limit)||0);return t>0?t:0}i18nLocalKeys(){return["no-data","axis.in","legend.title"]}prepareI18n(){const t=new Map(this.i18nLocalKeys().map((t=>[t,this.t(".".concat(t))]))),i=new Map(u.map((t=>[t,this.t("global.".concat(t))])));return new Map([...i.entries(),...t.entries()])}prepareStyle(){const t=this.getEffectiveScaleFactor(),i=this.element.localName;return this.componentStyle((s=>{const e=s.global.fontSizePx*t;return{scaleFactors:s[i].scaleFactors,fontStyles:{font:`${e}px ${s.global.fontFamily}`,size:e,color:s.global.fontColor,background:s.global.fontBackgroundColor,leading:1.8},axisStyles:s[i].axisStyles,seriesColors:s[i].seriesColors,padding:s[i].padding}}))}async getLayoutState(t){var i;const s=null!==(i=null==t?void 0:t.detail)&&void 0!==i?i:"summary",e=n(this.element),a=this.getEffectiveScaleFactor(),r=Number.isFinite(a)&&a>0?a:1,o=this.componentStyle((t=>{var i;return(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}))*r;return d(this.element,"ibcs-chart-scatter",this.chartTitle||void 0,{fontSizePx:o,appliedScaleFactor:r},e,s)}getEffectiveScaleFactor(){const{mode:t,factor:i}=f(this.scale);return"factor"===t?i:"auto"===t||"empty"===t?this.appliedScaleFactor:1}getFontStyles(){const t=this.getEffectiveScaleFactor();return this.componentStyle((i=>{var s,e,a,r;const n=(null===(s=i.global)||void 0===s?void 0:s.fontSizePx)||13.3333;return{"--bn-font-family":(null===(e=i.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*t+"px","--bn-font-color":(null===(a=i.global)||void 0===a?void 0:a.fontColor)||"#000000","--bn-font-background":(null===(r=i.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}getDataStructure(){const t={};for(const i of["ac","pp","fc","pl"])for(const s of[1,2,3,4])t[`${i}${s}`]={type:"number",isOptional:!0,description:""};for(const[i,s]of Object.entries(this.mappedAxes())){if(null===s)continue;const e=$(s.measure);null!==e&&("scenario"===e.kind?t[e.slot].description=`${i}: ${"label"in s&&void 0!==s.label?s.label:s.measure}`:(t[e.measure.base].description=`${i}: ${s.measure} (base)`,t[e.measure.delta].description=`${i}: ${s.measure} (delta)`))}return{[this.dataStructureName()]:Object.assign({operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!0,description:""},rowGroupIndex:{type:"number",isOptional:!0,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!0,description:""},subCategoryIndex:{type:"number",isOptional:!0,description:""}},t)}}mappedAxes(){return{x:this.prepareAxis("x",this.x),y:this.prepareAxis("y",this.y)}}dataStructureName(){return"IScatterChartDataRow"}chartTemplate(){const t=this.prepareAxis("x",this.x),i=this.prepareAxis("y",this.y),s=this.prepareFacet();if(this.validateCrossProp([null==t?void 0:t.measure,null==i?void 0:i.measure],s),this.hasBlockingErrors()||null===t||null===i)return null;const a=this.preparePointLevel(),r=this.prepareI18n(),n=this.prepareStyle(),o=v(this.element).width;return e("ibcs-chart-scatter",{tableName:this.datasetName,dataVersion:this.dataVersion,chartTitle:this.chartTitle,x:t,y:i,iso:this.prepareIso(),labels:this.prepareLabels(),legend:this.prepareLegend(),facet:s,pointLevel:a,seriesLevel:this.prepareSeriesLevel(a),aspect:this.prepareAspect(),limit:this.prepareLimit(),filter:this.filter,styles:n,i18n:r,containerWidth:o,ruleSetConfig:this.ruleSetConfig(),errors:this.errors,translate:this.translateForInner})}render(){return e(a,{key:"c89cf155219b71044f049ad2b941cdd155f13162",style:this.getFontStyles()},e("div",{key:"f61225de4c4b7b53e223a268fc25d9bd783ed712",class:"container"},this.chartTemplate()))}get element(){return r(this)}static get watchers(){return{x:[{validateX:0}],y:[{validateY:0}],iso:[{validateIso:0}],level:[{validateLevel:0}],seriesLevel:[{validateSeriesLevel:0}],facet:[{validateFacet:0}],labels:[{validateLabels:0}],legend:[{validateLegend:0}],aspect:[{validateAspect:0}],limit:[{validateLimit:0}],scale:[{validateScale:0}]}}};O.style=':host(.no-data){display:block;box-sizing:border-box;width:100%;height:100%}:host(.no-data)>div{float:none;width:100%;height:100%}:host(.no-data) .no-data~.no-data{display:none}.empty-state{box-sizing:border-box;display:flex;align-items:center;justify-content:center;float:none;width:100%;height:100%;min-height:3em;margin:0;padding:0.5em;overflow:hidden;border:0.1em dashed #ddd;color:#808080;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);font-style:normal;text-align:center}:host{display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.container{display:flex;flex-direction:column}';export{O as bn_chart_scatter}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var SVGStyle = require('./SVGStyle-
|
|
4
|
-
require('./VarianceMeasure-
|
|
3
|
+
var SVGStyle = require('./SVGStyle-C1LhLgbT.js');
|
|
4
|
+
require('./VarianceMeasure-uph4FBRa.js');
|
|
5
5
|
|
|
6
6
|
/** SI metric prefix for number scaling (e.g. prefix="M", value=1000000 divides displayed values by one million). */
|
|
7
7
|
class SiPrefix {
|