@nebula.js/sn-funnel-chart 1.6.3 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  /*
2
- * @nebula.js/sn-funnel-chart v1.6.3
2
+ * @nebula.js/sn-funnel-chart v1.6.4
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["picasso.js","picasso-plugin-q","qlik-chart-modules","@nebula.js/stardust"],(function(e){"use strict";var t,a,n,o,r,i,s,l,u,c,d,h,f,p,m,y,g,b,x,v,q,C,$,R;return{setters:[function(e){t=e.default},function(e){a=e.default},function(e){n=e.getValue,o=e.setValue,r=e.colorService,i=e.selectionService,s=e.cache,l=e.pluginService},function(e){u=e.useElement,c=e.useSelections,d=e.useModel,h=e.useApp,f=e.useTranslator,p=e.useOptions,m=e.useState,y=e.useEffect,g=e.useStaleLayout,b=e.useTheme,x=e.useConstraints,v=e.useRect,q=e.usePlugins,C=e.useAppLayout,$=e.usePromise,R=e.onTakeSnapshot}],execute:function(){e("default",(function(e){const n=t();n.use(a),n.component("funnel",k);const{flags:o}=e;return{ext:O,qae:{properties:{initial:P},data:{targets:T}},component(){!function({picasso:e,flags:t}){const a=g(),n=b(),o=x(),r=v(),i=q(),s=C().qLocaleInfo,[u,c,d,h]=ne({picasso:e,layout:a}),f=p(),m=()=>{const e=u.element.clientWidth!==h.get("width")||u.element.clientHeight!==h.get("height");return!1!==f.chartAnimations&&t.isEnabled("IM_1355_ANIMATIONS_FUNNEL")&&!e&&!Z.propertiesHaveChanged({viewCache:h,layout:a})},[M]=$((()=>{if(!c)return Promise.resolve();const t=({getUseBaseColors:e})=>({theme:n,colorProps:{...a.color,useBaseColors:e(a)},layout:a,hc:a.qHyperCube}),o=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}}}(a),r=l({picassoInstance:e,plugins:i,pluginArgs:o});return Promise.all([c.initialize({createConfig:t}),r.initialize()]).then((()=>r))}),[a,c]);y((()=>{if(!u||!c||!M)return;const e=[{type:"q",key:"qHyperCube",data:a.qHyperCube,config:{localeInfo:s}},...c.getData()],t=function({layout:e,constraints:t,colorService:a,theme:n,pluginService:o,animationsEnabled:r}){const i=function(e){return{...e.getScales()}}(a),s=a.getPalettes(),l=[ee({layout:e,constraints:t,colorService:a,animationsEnabled:r}),Y(e,n,r),te(e)];return{palettes:s,style:{"$font-family":n.getStyle("","","fontFamily"),"$font-color":n.getStyle("","","color"),"$font-size":n.getStyle("","","fontSize")},scales:i,components:o.extendComponents(l),formatters:ae()}}({layout:a,constraints:o,colorService:c,theme:n,pluginService:M,animationsEnabled:m});u.update({data:e,settings:t}),h.set("width",u.element.clientWidth),h.set("height",u.element.clientHeight),Z.cacheProperties({viewCache:h,layout:a})}),[u,c,n.name(),M,o]),y((()=>{u&&(u.update(),h.set("width",u.element.clientWidth),h.set("height",u.element.clientHeight))}),[r.width,r.height]),y((()=>{d&&d.setLayout(a)}),[a]),R((e=>c.getSnapshotData().then((t=>(e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData=t,e))).catch((()=>e))))}({picasso:n,flags:o})}}}));const M={fill:"steelblue",num:1},w=.9,D=150,L=(e,t,a)=>{let n=0,o=0,r=0,i={},s=0;if("labelCenter"===e)n=t.bottomLeft.x,o=t.topRight.y,r=t.bottomRight.x-t.bottomLeft.x,s=t.bottomRight.y-t.topRight.y,i={share:a.share,fill:a.fill};else{const e=180/Math.PI*Math.atan((t.bottomRight.y-t.topRight.y)/(t.topRight.x-t.bottomRight.x));n=e<15&&e>=0?t.topRight.x:e>-15&&e<0?t.bottomRight.x:e<-15?(t.bottomRight.x-t.topRight.x)/2+t.topRight.x+15:(t.topRight.x-t.bottomRight.x)/2+t.bottomRight.x+15,o=t.topRight.y,r=t.width-n,s=t.bottomRight.y-t.topRight.y,i={fill:a.fill}}return{tag:e,type:"rect",x:n,y:o,width:r,height:s,data:a.data,desc:i,fill:"none"}},I=(e,t)=>{const a=(e=>{const t=(e=>{let t=0;return e.forEach((e=>{e.num>t&&(t=e.num)})),t})(e);let a=0;return e.slice().reverse().map((e=>{const n={datum:e,s:a/t,e:e.num/t};return a=e.num,n})).reverse()})(e),n=t.width*w,o=t.height*w,r=(t.width-n)/2,i=(t.height-o)/2,s=n-(n>D&&o>D?100:0),l=(o-1*(a.length-1))/a.length,u=[];return a.forEach(((e,n)=>{const o=(c=e.e,d=n<a.length-1?e.s:e.e,[.5-.5*c,.5+.5*c,.5+.5*d,.5-.5*d]).map((e=>Math.round(e*s+r)));var c,d;const h=l*n+1*n+i,f={bottomRight:{x:o[2],y:Math.round(h+l)},bottomLeft:{x:o[3],y:Math.round(h+l)},topRight:{x:o[1],y:Math.round(h)},topLeft:{x:o[0],y:Math.round(h)},width:t.width},p=`M${f.topLeft.x},${f.topLeft.y} L${f.topRight.x},${f.topRight.y} ${f.bottomRight.x},${f.bottomRight.y} ${f.bottomLeft.x},${f.bottomLeft.y}Z`;u.push({tag:"section",type:"path",d:p,data:e.datum.data,fill:e.datum.fill});const m={share:e.e,fill:e.datum.fill,data:e.datum.data};l>12&&(f.bottomRight.x-f.bottomLeft.x>32&&u.push(L("labelCenter",f,m)),u.push(L("labelLeft",f,m)))})),u},S=(e,t,a,n)=>(n-e)/n*(t-a)+a,E=(e,t,a)=>{const n=e.filter((e=>"NaN"!==e.num&&e.num>0)),o=n.length,r=a.width*w,i=a.height*w,s=Math.round((a.width-r)/2),l=Math.round((a.height-i)/2),u=r-(r>D&&i>D?100:0),c=i-1*(o-1),d=[],h=n[0].data.num.value;let f=l;return n.forEach(((e,n)=>{const o=t[n]*c,r=Math.round(S(f-l,u,.2*u,i)/2),p=Math.round(S(f-l+o,u,.2*u,i)/2),m=s+Math.round(u/2),y={bottomRight:{x:m+p,y:Math.round(f+o)},bottomLeft:{x:m-p,y:Math.round(f+o)},topRight:{x:m+r,y:f},topLeft:{x:m-r,y:f},width:a.width},g=`M${y.topLeft.x},${y.topLeft.y} L${y.topRight.x},${y.topRight.y} ${y.bottomRight.x},${y.bottomRight.y} ${y.bottomLeft.x},${y.bottomLeft.y}Z`;d.push({tag:"section",type:"path",d:g,data:e.data,fill:e.fill});const b={share:e.data.num.value/h,fill:e.fill,data:e.data};o>2&&(y.bottomRight.x-y.bottomLeft.x>32&&d.push(L("labelCenter",y,b)),d.push(L("labelLeft",y,b))),f+=o+1})),d},H=(e,t,a)=>{const n=e.filter((e=>"NaN"!==e.num&&e.num>0));if(n&&n.length>0)switch(t){case"WIDTH":return I(n,a);case"ORDER":return E(n,n.map((()=>1/n.length)),a);case"HEIGHT":return E(n,(e=>{const t=e.reduce(((e,t)=>e+t.data.num.value),0);return e.map((e=>e.data.num.value/t))})(n),a);case"AREA":return E(n,((e,t,a)=>{const n=e.reduce(((e,t)=>e+t.data.num.value),0),o=t.width*w,r=t.height*w,i=o*a,s=r*(o+i)/2,l=(o-i)/2/r,u=[];let c=0;for(let t=e.length-1;t>=0;t--){const a=e[t].data.num.value/n,o=2*l*c+i,d=-o/(2*l)+Math.sqrt(o*o/(4*l*l)+a*s/l);u[t]=d/r,c+=d}return u})(n,a,.2),a);default:return I(n,a)}return[]};var k={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:e}){const t=this.resolver.resolve({data:e,defaults:{...M,...this.style.item},settings:this.settings.settings});return H(t.items,this.settings.settings.mode,this.rect)}};const P={version:"1.6.3",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};var O={definition:{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}},sorting:{uses:"sorting"},settings:{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:e=>!e.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null};const T=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(e){switch(e.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(e,t){2===t.qHyperCubeDef.qInterColumnSortOrder.length&&1!==t.qHyperCubeDef.qInterColumnSortOrder[0]&&(t.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];var A=Object.prototype.hasOwnProperty,N=Object.prototype.toString,j=Object.defineProperty,V=Object.getOwnPropertyDescriptor,F=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===N.call(e)},B=function(e){if(!e||"[object Object]"!==N.call(e))return!1;var t,a=A.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&A.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!n)return!1;for(t in e);return void 0===t||A.call(e,t)},z=function(e,t){j&&"__proto__"===t.name?j(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},W=function(e,t){if("__proto__"===t){if(!A.call(e,t))return;if(V)return V(e,t).value}return e[t]},_=function e(){var t,a,n,o,r,i,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(a in t)n=W(s,a),s!==(o=W(t,a))&&(c&&o&&(B(o)||(r=F(o)))?(r?(r=!1,i=n&&F(n)?n:[]):i=n&&B(n)?n:{},z(s,{name:a,newValue:e(c,i,o)})):void 0!==o&&z(s,{name:a,newValue:o}));return s},G={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function U(e){const{qHyperCube:t,...a}=e,{qDataPages:r,qStackedDataPages:i,qTreeDataPages:s,...l}=t,u=_(!0,{},{...a,qHyperCube:{...l,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:c}=G;return c.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==n(u,e)&&o(u,e,null);else{const e=t[0],a=t[1].split("].")[1];n(u,e,[]).forEach((e=>{void 0!==n(e,a)&&o(e,a,null)}))}})),u}var Z={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:a,isMajor:n}){return o=>{if(e||t||a){var r;if("line"===o.type)return null!==(r=o.tickValue)&&void 0!==r?r:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(n){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?o.data.group.value+" ":""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:a,isHorizontal:n,dock:o}){return({currentNodes:r,currentRect:i,previousRect:s})=>{const l=i.x-s.x,u=i.y-s.y,c=i.width-s.width,d=i.height-s.height;e?("left"===o&&r.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==o&&"right"!==o||r.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=i.y,e.y2=e.y1+i.height):(Math.round(e.y1)<i.y||e.y1>i.y+i.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<i.y||e.y>i.y+i.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||r.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=i.x,e.x2=e.x1+i.width):(Math.round(e.x1)<i.x||e.x1>i.x+i.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<i.x||e.x>i.x+i.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?r.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):a||n?r.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):r.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;0===n&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=n,e.y-=o):e.transform=`translate(${-n}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x;0===t.y-a.y&&0===n||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;0===n&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=n):(e.x-=n,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=n,e.x2-=n);else{const t="x"===e.major.p?n/e.major.size:o/e.major.size,a="y"===e.minor.p?o/e.minor.size:n/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=a,e.minor0-=a,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x;0===t.y-a.y&&0===n||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;0===n&&0===o||e.forEach((e=>{e.cx-=n,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y,r=t.width-a.width,i=t.height-a.height;let s=-n,l=-o;e.forEach((e=>{switch(e.dock){case"right":n>0&&(s=t.width);break;case"left":r<0&&(s=-a.width);break;case"top":i<0&&(l=-a.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const a=U(t);e.set("dataIndependentProperties",JSON.stringify(a))},propertiesHaveChanged:function({viewCache:e,layout:t}){const a=U(t);return e.get("dataIndependentProperties")!==JSON.stringify(a)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function J(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function K(e){return e.formatter("num")(e.node.data.num.value)}function Q({data:e}){return e?e.label:""}function X(e){if(e.dataPoint.auto)return J;switch(e.dataPoint.labelMode){case"share":return J;case"value":return K;case"none":return null;default:return J}}function Y(e,t,a){const n=(a,n=1)=>({component:"fun",selector:a,strategy:{type:"rows",settings:{align:n,fill:".labelCenter"===a?({node:e})=>t.getContrastingColorTo(e.desc.fill):t.getStyle("","","color"),labels:".labelCenter"===a?[{label:X(e)}]:[{label:Q}],linkData:t=>".labelCenter"===a?"none"===e.dataPoint.labelMode?Math.random():`${t.data.value} ${X(e)(t)}`:`${t.data.value} ${Q(t)}`}}});return{key:"funnel-labels",type:"labels",layout:{displayOrder:2},settings:{sources:[n(".labelLeft",0),n(".labelCenter",.5)]},animations:{enabled:a,trackBy:e=>e.data}}}function ee({layout:e,constraints:t,colorService:a,animationsEnabled:n}){const o=a.getDatumProps(),r=a.getColor();return{type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...o}}},brush:t.select||t.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:e=>"section"===e.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:r,mode:e.funnel.mode},animations:{enabled:n,isMainComponent:!0,trackBy:e=>`${e.tag}: ${e.data.value}`}}}function te(e){if(!e.showDimensionTitle||!e.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;return{key:"dimension-title",type:"text",text:e.qHyperCube.qDimensionInfo[0].qFallbackTitle,layout:{dock:"top"}}}function ae(){return{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}function ne({picasso:e}){const t=u(),a=c(),n=d(),o=h(),l=f(),g=p(),[b,x]=m(),[v,q]=m(),[C,$]=m(),[R,M]=m();return y((()=>{const u=r({picasso:e,model:n,app:o,translator:l,config:{auto:!1,key:"fill"}});t.style.overflow="hidden";const c=e({renderer:{prio:[g.renderer||"svg"]}}).chart({element:t,data:[],settings:{}}),d=i({chart:c,selections:a,config:{selectionActions:!1}});return $(d),q(u),x(c),M(s()),()=>{d.destroy(),c.destroy()}}),[]),[b,v,C,R]}}}}));
7
+ System.register(["picasso.js","picasso-plugin-q","qlik-chart-modules","@nebula.js/stardust"],(function(e){"use strict";var t,a,n,o,r,i,s,l,u,c,d,h,f,p,y,m,g,b,x,v,q,C,$,R;return{setters:[function(e){t=e.default},function(e){a=e.default},function(e){n=e.getValue,o=e.setValue,r=e.colorService,i=e.selectionService,s=e.cache,l=e.pluginService},function(e){u=e.useElement,c=e.useSelections,d=e.useModel,h=e.useApp,f=e.useTranslator,p=e.useOptions,y=e.useState,m=e.useEffect,g=e.useStaleLayout,b=e.useTheme,x=e.useConstraints,v=e.useRect,q=e.usePlugins,C=e.useAppLayout,$=e.usePromise,R=e.onTakeSnapshot}],execute:function(){e("default",(function(e){const n=t();n.use(a),n.component("funnel",k);const{flags:o}=e;return{ext:A,qae:{properties:{initial:P},data:{targets:O}},component(){!function({picasso:e,flags:t}){const a=g(),n=b(),o=x(),r=v(),i=q(),s=C().qLocaleInfo,[u,c,d,h]=ne({picasso:e,layout:a}),f=p(),y=()=>{const e=u.element.clientWidth!==h.get("width")||u.element.clientHeight!==h.get("height");return!1!==f.chartAnimations&&t.isEnabled("IM_1355_ANIMATIONS_FUNNEL")&&!e&&!Z.propertiesHaveChanged({viewCache:h,layout:a})},[M]=$((()=>{if(!c)return Promise.resolve();const t=({getUseBaseColors:e})=>({theme:n,colorProps:{...a.color,useBaseColors:e(a)},layout:a,hc:a.qHyperCube}),o=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}}}(a),r=l({picassoInstance:e,plugins:i,pluginArgs:o});return Promise.all([c.initialize({createConfig:t}),r.initialize()]).then((()=>r))}),[a,c]);m((()=>{if(!u||!c||!M)return;const e=[{type:"q",key:"qHyperCube",data:a.qHyperCube,config:{localeInfo:s}},...c.getData()],t=function({layout:e,constraints:t,colorService:a,theme:n,pluginService:o,animationsEnabled:r}){const i=function(e){return{...e.getScales()}}(a),s=a.getPalettes(),l=[ee({layout:e,constraints:t,colorService:a,animationsEnabled:r}),Y(e,n,r),te(e)];return{palettes:s,style:{"$font-family":n.getStyle("","","fontFamily"),"$font-color":n.getStyle("","","color"),"$font-size":n.getStyle("","","fontSize")},scales:i,components:o.extendComponents(l),formatters:ae()}}({layout:a,constraints:o,colorService:c,theme:n,pluginService:M,animationsEnabled:y});u.update({data:e,settings:t}),h.set("width",u.element.clientWidth),h.set("height",u.element.clientHeight),Z.cacheProperties({viewCache:h,layout:a})}),[u,c,n.name(),M,o]),m((()=>{u&&(u.update(),h.set("width",u.element.clientWidth),h.set("height",u.element.clientHeight))}),[r.width,r.height]),m((()=>{d&&d.setLayout(a)}),[a]),R((e=>c.getSnapshotData().then((t=>(e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData=t,e))).catch((()=>e))))}({picasso:n,flags:o})}}}));const M={fill:"steelblue",num:1},w=.9,D=150,L=(e,t,a)=>{let n=0,o=0,r=0,i={},s=0;if("labelCenter"===e)n=t.bottomLeft.x,o=t.topRight.y,r=t.bottomRight.x-t.bottomLeft.x,s=t.bottomRight.y-t.topRight.y,i={share:a.share,fill:a.fill};else{const e=180/Math.PI*Math.atan((t.bottomRight.y-t.topRight.y)/(t.topRight.x-t.bottomRight.x));n=e<15&&e>=0?t.topRight.x:e>-15&&e<0?t.bottomRight.x:e<-15?(t.bottomRight.x-t.topRight.x)/2+t.topRight.x+15:(t.topRight.x-t.bottomRight.x)/2+t.bottomRight.x+15,o=t.topRight.y,r=t.width-n,s=t.bottomRight.y-t.topRight.y,i={fill:a.fill}}return{tag:e,type:"rect",x:n,y:o,width:r,height:s,data:a.data,desc:i,fill:"none"}},I=(e,t)=>{const a=(e=>{const t=(e=>{let t=0;return e.forEach((e=>{e.num>t&&(t=e.num)})),t})(e);let a=0;return e.slice().reverse().map((e=>{const n={datum:e,s:a/t,e:e.num/t};return a=e.num,n})).reverse()})(e),n=t.width*w,o=t.height*w,r=(t.width-n)/2,i=(t.height-o)/2,s=n-(n>D&&o>D?100:0),l=(o-1*(a.length-1))/a.length,u=[];return a.forEach(((e,n)=>{const o=(c=e.e,d=n<a.length-1?e.s:e.e,[.5-.5*c,.5+.5*c,.5+.5*d,.5-.5*d]).map((e=>Math.round(e*s+r)));var c,d;const h=l*n+1*n+i,f={bottomRight:{x:o[2],y:Math.round(h+l)},bottomLeft:{x:o[3],y:Math.round(h+l)},topRight:{x:o[1],y:Math.round(h)},topLeft:{x:o[0],y:Math.round(h)},width:t.width},p=`M${f.topLeft.x},${f.topLeft.y} L${f.topRight.x},${f.topRight.y} ${f.bottomRight.x},${f.bottomRight.y} ${f.bottomLeft.x},${f.bottomLeft.y}Z`;u.push({tag:"section",type:"path",d:p,data:e.datum.data,fill:e.datum.fill});const y={share:e.e,fill:e.datum.fill,data:e.datum.data};l>12&&(f.bottomRight.x-f.bottomLeft.x>32&&u.push(L("labelCenter",f,y)),u.push(L("labelLeft",f,y)))})),u},E=(e,t,a,n)=>(n-e)/n*(t-a)+a,H=(e,t,a)=>{const n=e.filter((e=>"NaN"!==e.num&&e.num>0)),o=n.length,r=a.width*w,i=a.height*w,s=Math.round((a.width-r)/2),l=Math.round((a.height-i)/2),u=r-(r>D&&i>D?100:0),c=i-1*(o-1),d=[],h=n[0].data.num.value;let f=l;return n.forEach(((e,n)=>{const o=t[n]*c,r=Math.round(E(f-l,u,.2*u,i)/2),p=Math.round(E(f-l+o,u,.2*u,i)/2),y=s+Math.round(u/2),m={bottomRight:{x:y+p,y:Math.round(f+o)},bottomLeft:{x:y-p,y:Math.round(f+o)},topRight:{x:y+r,y:f},topLeft:{x:y-r,y:f},width:a.width},g=`M${m.topLeft.x},${m.topLeft.y} L${m.topRight.x},${m.topRight.y} ${m.bottomRight.x},${m.bottomRight.y} ${m.bottomLeft.x},${m.bottomLeft.y}Z`;d.push({tag:"section",type:"path",d:g,data:e.data,fill:e.fill});const b={share:e.data.num.value/h,fill:e.fill,data:e.data};o>2&&(m.bottomRight.x-m.bottomLeft.x>32&&d.push(L("labelCenter",m,b)),d.push(L("labelLeft",m,b))),f+=o+1})),d},S=(e,t,a)=>{const n=e.filter((e=>"NaN"!==e.num&&e.num>0));if(n&&n.length>0)switch(t){case"WIDTH":return I(n,a);case"ORDER":return H(n,n.map((()=>1/n.length)),a);case"HEIGHT":return H(n,(e=>{const t=e.reduce(((e,t)=>e+t.data.num.value),0);return e.map((e=>e.data.num.value/t))})(n),a);case"AREA":return H(n,((e,t,a)=>{const n=e.reduce(((e,t)=>e+t.data.num.value),0),o=t.width*w,r=t.height*w,i=o*a,s=r*(o+i)/2,l=(o-i)/2/r,u=[];let c=0;for(let t=e.length-1;t>=0;t--){const a=e[t].data.num.value/n,o=2*l*c+i,d=-o/(2*l)+Math.sqrt(o*o/(4*l*l)+a*s/l);u[t]=d/r,c+=d}return u})(n,a,.2),a);default:return I(n,a)}return[]};var k={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:e}){const t=this.resolver.resolve({data:e,defaults:{...M,...this.style.item},settings:this.settings.settings});return S(t.items,this.settings.settings.mode,this.rect)}};const P={version:"1.6.4",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};var A={definition:{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}},sorting:{uses:"sorting"},settings:{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:e=>!e.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null};const O=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(e){switch(e.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(e,t){2===t.qHyperCubeDef.qInterColumnSortOrder.length&&1!==t.qHyperCubeDef.qInterColumnSortOrder[0]&&(t.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];var T=Object.prototype.hasOwnProperty,N=Object.prototype.toString,j=Object.defineProperty,V=Object.getOwnPropertyDescriptor,F=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===N.call(e)},B=function(e){if(!e||"[object Object]"!==N.call(e))return!1;var t,a=T.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&T.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!n)return!1;for(t in e);return void 0===t||T.call(e,t)},z=function(e,t){j&&"__proto__"===t.name?j(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},W=function(e,t){if("__proto__"===t){if(!T.call(e,t))return;if(V)return V(e,t).value}return e[t]},_=function e(){var t,a,n,o,r,i,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(a in t)n=W(s,a),s!==(o=W(t,a))&&(c&&o&&(B(o)||(r=F(o)))?(r?(r=!1,i=n&&F(n)?n:[]):i=n&&B(n)?n:{},z(s,{name:a,newValue:e(c,i,o)})):void 0!==o&&z(s,{name:a,newValue:o}));return s},G={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function U(e){const{qHyperCube:t,...a}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:s,qTreeDataPages:l,...u}=t,c=_(!0,{},{...a,qHyperCube:{...u,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:d}=G;return d.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==n(c,e)&&o(c,e,null);else{const e=t[0],a=t[1].split("].")[1];n(c,e,[]).forEach((e=>{void 0!==n(e,a)&&o(e,a,null)}))}})),c}var Z={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:a,isMajor:n}){return o=>{if(e||t||a){var r;if("line"===o.type)return null!==(r=o.tickValue)&&void 0!==r?r:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(n){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?o.data.group.value+" ":""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:a,isHorizontal:n,dock:o}){return({currentNodes:r,currentRect:i,previousRect:s})=>{const l=i.x-s.x,u=i.y-s.y,c=i.width-s.width,d=i.height-s.height;e?("left"===o&&r.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==o&&"right"!==o||r.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=i.y,e.y2=e.y1+i.height):(Math.round(e.y1)<i.y||e.y1>i.y+i.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<i.y||e.y>i.y+i.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||r.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=i.x,e.x2=e.x1+i.width):(Math.round(e.x1)<i.x||e.x1>i.x+i.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<i.x||e.x>i.x+i.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?r.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):a||n?r.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):r.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;0===n&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=n,e.y-=o):e.transform=`translate(${-n}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x;0===t.y-a.y&&0===n||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;0===n&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=n):(e.x-=n,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=n,e.x2-=n);else{const t="x"===e.major.p?n/e.major.size:o/e.major.size,a="y"===e.minor.p?o/e.minor.size:n/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=a,e.minor0-=a,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x;0===t.y-a.y&&0===n||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y;0===n&&0===o||e.forEach((e=>{e.cx-=n,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:a}){const n=t.x-a.x,o=t.y-a.y,r=t.width-a.width,i=t.height-a.height;let s=-n,l=-o;e.forEach((e=>{switch(e.dock){case"right":n>0&&(s=t.width);break;case"left":r<0&&(s=-a.width);break;case"top":i<0&&(l=-a.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const a=U(t);e.set("dataIndependentProperties",JSON.stringify(a))},propertiesHaveChanged:function({viewCache:e,layout:t}){const a=U(t);return e.get("dataIndependentProperties")!==JSON.stringify(a)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function J(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function K(e){return e.formatter("num")(e.node.data.num.value)}function Q({data:e}){return e?e.label:""}function X(e){if(e.dataPoint.auto)return J;switch(e.dataPoint.labelMode){case"share":return J;case"value":return K;case"none":return null;default:return J}}function Y(e,t,a){const n=(a,n=1)=>({component:"fun",selector:a,strategy:{type:"rows",settings:{align:n,fill:".labelCenter"===a?({node:e})=>t.getContrastingColorTo(e.desc.fill):t.getStyle("","","color"),labels:".labelCenter"===a?[{label:X(e)}]:[{label:Q}],linkData:t=>".labelCenter"===a?"none"===e.dataPoint.labelMode?Math.random():`${t.data.value} ${X(e)(t)}`:`${t.data.value} ${Q(t)}`}}});return{key:"funnel-labels",type:"labels",layout:{displayOrder:2},settings:{sources:[n(".labelLeft",0),n(".labelCenter",.5)]},animations:{enabled:a,trackBy:e=>e.data}}}function ee({layout:e,constraints:t,colorService:a,animationsEnabled:n}){const o=a.getDatumProps(),r=a.getColor();return{type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...o}}},brush:t.select||t.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:e=>"section"===e.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:r,mode:e.funnel.mode},animations:{enabled:n,isMainComponent:!0,trackBy:e=>`${e.tag}: ${e.data.value}`}}}function te(e){if(!e.showDimensionTitle||!e.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;return{key:"dimension-title",type:"text",text:e.qHyperCube.qDimensionInfo[0].qFallbackTitle,layout:{dock:"top"}}}function ae(){return{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}function ne({picasso:e}){const t=u(),a=c(),n=d(),o=h(),l=f(),g=p(),[b,x]=y(),[v,q]=y(),[C,$]=y(),[R,M]=y();return m((()=>{const u=r({picasso:e,model:n,app:o,translator:l,config:{auto:!1,key:"fill"}});t.style.overflow="hidden";const c=e({renderer:{prio:[g.renderer||"svg"]}}).chart({element:t,data:[],settings:{}}),d=i({chart:c,selections:a,config:{selectionActions:!1}});return $(d),q(u),x(c),M(s()),()=>{d.destroy(),c.destroy()}}),[]),[b,v,C,R]}}}}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebula.js/sn-funnel-chart",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "A sequential chart visualizing a linear process with connected stages, for example a sales process with potential revenue at each stage.",
5
5
  "author": "QlikTech International AB",
6
6
  "license": "MIT",