UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

2 lines (1 loc) 20.6 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CtzlfT2i.cjs"),ie=require("./useNestedProp-B5jFEsaz.cjs"),ce=require("./usePrinter-LlH3giBA.cjs"),_e=require("./Title-BGQhFU2C.cjs"),Be=require("./PenAndPaper-4dibNTrE.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./PackageVersion-DdCp9lqS.cjs"),Ne=require("./vue-ui-accordion-tUPDXqYS.cjs"),Pe=require("./DataTable-DhEDo7W6.cjs"),Ee=require("./vue-ui-skeleton-MFudy6Nx.cjs"),Te=require("./useChartAccessibility-Cm7nkzTG.cjs"),ve=require("./useResponsive-N8jl0-aC.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function de(i,d=0){const m=i.reduce((a,{x:r,r:c})=>Math.min(a,r-c-d),1/0),v=i.reduce((a,{x:r,r:c})=>Math.max(a,r+c+d),-1/0),f=i.reduce((a,{y:r,r:c})=>Math.min(a,r-c-d),1/0),n=i.reduce((a,{y:r,r:c})=>Math.max(a,r+c+d),-1/0);return[m,f,v-m,n-f]}function Fe(i,d,m){const v=i._,f=i.next._,n=v.r+f.r,a=(v.x*f.r+f.x*v.r)/n,r=(v.y*f.r+f.y*v.r)/n;return Math.max(Math.abs(a*m),Math.abs(r*d))}function fe(i,d,m){const v=Fe,f=i.length;if(!f)return i;let n,a,r;if(n=i[0],n.x=0,n.y=0,!(f>1)||(a=i[1],n.x=-a.r,a.x=n.r,a.y=0,!(f>2)))return i;he(a,n,r=i[2]),n=new q(n),a=new q(a),r=new q(r),n.next=r.previous=a,a.next=n.previous=r,r.next=a.previous=n;e:for(let c=3;c<f;++c){he(n._,a._,r=i[c]),r=new q(r);let y=a.next,b=n.previous,S=a._.r,$=n._.r;do if(S<=$){if(me(y._,r._)){a=y,n.next=a,a.previous=n,--c;continue e}S+=y._.r,y=y.next}else{if(me(b._,r._)){n=b,n.next=a,a.previous=n,--c;continue e}$+=b._.r,b=b.previous}while(y!==b.next);r.previous=n,r.next=a,n.next=a.previous=a=r;let N=v(n,m,d),O;for(;(r=r.next)!==a;)(O=v(r,m,d))<N&&(n=r,N=O);a=n.next}return i}function he(i,d,m){const v=i.x-d.x,f=i.y-d.y,n=v*v+f*f;if(n){const a=(d.r+m.r)**2,r=(i.r+m.r)**2;if(a>r){const c=(n+r-a)/(2*n),y=Math.sqrt(Math.max(0,r/n-c*c));m.x=i.x-c*v-y*f,m.y=i.y-c*f+y*v}else{const c=(n+a-r)/(2*n),y=Math.sqrt(Math.max(0,a/n-c*c));m.x=d.x+c*v-y*f,m.y=d.y+c*f+y*v}}else m.x=d.x+m.r,m.y=d.y}function me(i,d){const m=i.r+d.r-1e-6,v=d.x-i.x,f=d.y-i.y;return m>0&&m*m>v*v+f*f}class q{constructor(d){this._=d,this.next=null,this.previous=null}}const Oe=["id"],Ie=["xmlns","viewBox","height","width"],Re=["x","y","width","height"],Me=["id"],Ae=["stop-color"],qe=["stop-color"],De=["stop-color"],Le={key:0},He=["x","y","width","height","stroke","stroke-width","fill","rx","onMouseenter","onClick"],Ue=["x","y","width","height","stroke","stroke-width","fill","rx"],je=["opacity","x","y","font-size","fill","font-weight"],Ge=["opacity","x","y","font-size","fill","font-weight"],We=["cx","cy","r","opacity","stroke","stroke-width","fill"],Ye={key:0,style:{pointerEvents:"none"}},Xe={key:1},Ze=["opacity","x","y","font-size","fill","font-weight"],Je=["opacity","x","y","font-size","fill","font-weight"],Ke={key:6,class:"vue-data-ui-watermark"},Qe=["innerHTML"],et={__name:"vue-ui-circle-pack",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(i,{expose:d,emit:m}){e.useCssVars(o=>({bf62f51c:B.value,"623b642a":H.value}));const v=i,f=m,{vue_ui_circle_pack:n}=u.useConfig(),a=e.computed(()=>!!v.dataset&&v.dataset.length),r=e.ref(u.createUid()),c=e.ref(null),y=e.ref(null),b=e.ref(null),S=e.ref(0),$=e.ref(0),N=e.ref(0),O=e.ref(null),t=e.computed({get:()=>J(),set:o=>o}),{svgRef:Y}=Te.useChartAccessibility({config:t.value.style.chart.title}),{userOptionsVisible:D,setUserOptionsVisibility:X,keepUserOptionState:Z}=Se.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:v.config,defaultConfig:n});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_circle_pack[o.theme]||v.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>v.config,o=>{t.value=J(),D.value=!t.value.userOptions.showOnChartHover,L(),S.value+=1,$.value+=1,P.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:K,isImaging:Q,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`vue-ui-circle-pack_${r.value}`,fileName:t.value.style.chart.title.text||"vue-ui-circle-pack"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.ref({showTable:t.value.table.show}),oe=e.ref(null),w=e.ref({h:10,w:10}),le=e.ref(0),z=e.ref([0,0,100,100]),I=e.ref({h:0,w:0});async function L(){u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiCirclePack",type:"dataset"}),_.value=await fe(R.value),k.value=de(_.value,1).join(" "),I.value=ae(c.value);const o=ve.throttle(()=>{const{width:s,height:l,heightTitle:p,heightNoTitle:g}=ve.useResponsive({chart:c.value,title:y.value,noTitle:b.value}),G=s||10,W=l&&l>10?l:10;le.value=t.value.style.chart.title.text?p:g,requestAnimationFrame(()=>{w.value.w=G,w.value.h=W-le.value,e.nextTick(async()=>{const we=R.value.map(ze=>({...ze}));_.value=await fe(we,w.value.h,w.value.w),z.value=de(_.value,1),k.value=z.value.join(" "),I.value=ae(c.value)})})});oe.value=new ResizeObserver(o),oe.value.observe(c.value.parentNode)}e.onMounted(L);function ae(o){if(!o||!o.parentElement)return console.warn("Component or parent element is missing."),{w:0,h:0};const s=o.parentElement;if(s.offsetWidth>0&&s.offsetHeight>0)return{w:s.offsetWidth,h:s.offsetHeight};const l=window.getComputedStyle(s),p=l.width,g=l.height;return p!=="auto"&&g!=="auto"&&parseFloat(p)>0&&parseFloat(g)>0?{w:parseFloat(p),h:parseFloat(g)}:{w:0,h:0}}e.watch(()=>v.dataset,async o=>{await L()},{deep:!0});const ye=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>v.dataset.map((o,s)=>{const l=u.convertColorToHex(o.color)||ye.value[s]||u.themePalettes[t.value.theme||"default"][s%u.themePalettes[t.value.theme||"default"].length]||u.palette[s]||u.palette[s%u.palette.length];return{...o,r:o.value,id:u.createUid(),color:l}}).filter(o=>![null,void 0,1/0,-1/0].includes(o.value))),_=e.ref([]),k=e.ref("0 0 100 100"),E=e.computed(()=>Math.max(..._.value.map(o=>o.r)));function ne(o,s){return s/E.value*o}const h=e.ref(null);function ge(o){t.value.style.chart.circles.zoom.show&&(h.value=o)}const B=e.computed(()=>h.value?h.value.r:0),H=e.computed(()=>C.value?B.value:h.value?h.value.r>z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio?h.value.r:z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio:0),x=e.ref(0),be=e.computed(()=>({pointerEvents:"none",opacity:x.value,filter:`drop-shadow(0px 0px 6px ${u.darkenHexColor(h.value.color,t.value.style.chart.circles.zoom.shadowForce)})`})),T=e.ref(B.value);e.watchEffect(()=>{T.value=B.value,x.value=0;let o=null;function s(l){o||(o=l);const p=(l-o)/t.value.style.chart.circles.zoom.animationFrameMs;p<1?(T.value=B.value+(H.value-B.value)*p,x.value=0+t.value.style.chart.circles.zoom.opacity*p,requestAnimationFrame(s)):(T.value=H.value,x.value=t.value.style.chart.circles.zoom.opacity)}requestAnimationFrame(s)});const V=e.computed(()=>({name:t.value.style.chart.circles.zoom.label.name.fontSize*z.value[3]/300,value:t.value.style.chart.circles.zoom.label.value.fontSize*z.value[3]/300}));function U(o){return u.applyDataLabel(t.value.style.chart.circles.labels.value.formatter,o.value,u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:o.value,s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding}))}function ke(){return u.applyDataLabel(t.value.style.chart.circles.zoom.label.value.formatter,h.value.value,u.dataLabel({p:t.value.style.chart.circles.zoom.label.value.prefix,v:h.value.value,s:t.value.style.chart.circles.zoom.label.value.suffix,r:t.value.style.chart.circles.zoom.label.value.rounding}))}function re(o){if(!o)return 0;const s=o.r/U(o).length*(U(o).length===1?1:2);return Math.min(o.r/2.5,s)}const F=e.ref(!1);function xe(o){F.value=o,N.value+=1}const C=e.ref(!1);function j(){C.value=!C.value}const M=e.computed(()=>{const o=R.value.map(l=>({name:l.name,value:l.value,color:l.color})).toSorted((l,p)=>p.value-l.value),s=o.map(l=>l.value);return{head:o,body:s}});function se(){e.nextTick(()=>{const o=M.value.head.map((p,g)=>[[p.name],[M.value.body[g]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-circle-pack"})})}const A=e.computed(()=>{const o=[t.value.table.columnNames.datapoint,t.value.table.columnNames.value],s=M.value.head.map((g,G)=>{const W=u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:M.value.body[G],s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding});return[{color:g.color,name:g.name},W]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.datapoint,t.value.table.columnNames.value],head:o,body:s,config:l}});function ue(){P.value.showTable=!P.value.showTable}function Ce(){return R.value}return d({getData:Ce,generateCsv:se,generatePdf:ee,generateImage:te,toggleTable:ue,toggleAnnotator:j}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{id:`vue-ui-circle-pack_${r.value}`,class:e.normalizeClass(`vue-ui-circle-pack ${F.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"circlePackChart",ref:c,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;background:${t.value.style.chart.backgroundColor}; height: ${I.value.h}px; width:${I.value.w}px`),onMouseenter:s[2]||(s[2]=()=>e.unref(X)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be.PenAndPaper,{key:0,svgRef:e.unref(Y),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,scale:E.value/100,onClose:j},null,8,["svgRef","backgroundColor","color","active","scale"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),pe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:b,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:y,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&a.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_option_${N.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:r.value,hasTooltip:!1,hasLabel:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:F.value,chartElement:c.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:se,onGenerateImage:e.unref(te),onToggleTable:ue,onToggleAnnotator:j,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:p})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:p})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:p})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:p})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:p})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:p})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Y,xmlns:e.unref(u.XMLNS),viewBox:k.value,height:w.value.h,width:w.value.w,class:e.normalizeClass({"vue-data-ui-fullscreen--on":F.value,"vue-data-ui-fulscreen--off":!F.value}),style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};background:${t.value.style.chart.backgroundColor};`)},[e.createVNode($e._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.value.x,y:k.value.y,width:k.value.width,height:k.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:l.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(u.lightenHexColor)(l.color,t.value.style.chart.circles.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(u.darkenHexColor)(l.color,.1)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,De)],8,Me)]),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{...l,patternId:`pattern_${r.value}_${l.id}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*E.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${l.id})`:l.color,rx:l.r,onMouseenter:()=>ge(l),onMouseout:s[0]||(s[0]=p=>h.value=null),onClick:p=>f("selectDatapoint",l)},null,40,He),o.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*E.value/100,fill:`url(#pattern_${r.value}_${l.id})`,rx:l.r,style:{pointerEvents:"none"}},null,8,Ue)):e.createCommentVNode("",!0),o.$slots["data-label"]?e.renderSlot(o.$slots,"data-label",e.mergeProps({key:2,ref_for:!0},{...l,createTSpans:e.unref(u.createTSpans),fontSize:{name:l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,value:re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio},color:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color)}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.circles.labels.name.show&&l.name?(e.openBlock(),e.createElementBlock("text",{key:0,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.name.offsetY)-l.r/10,"font-size":l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,fill:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),t.value.style.chart.circles.labels.value.show?(e.openBlock(),e.createElementBlock("text",{key:1,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.value.offsetY)+l.r/2.5,"font-size":re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio,fill:t.value.style.chart.circles.labels.value.color?t.value.style.chart.circles.labels.value.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.value.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(U(l)),9,Ge)):e.createCommentVNode("",!0)],64))],64))),256)),h.value&&t.value.style.chart.circles.zoom.show&&!C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("circle",{style:e.normalizeStyle(be.value),cx:h.value.x,cy:h.value.y,r:T.value,opacity:x.value,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*E.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${h.value.id})`:h.value.color},null,12,We),o.$slots["zoom-label"]?(e.openBlock(),e.createElementBlock("g",Ye,[e.renderSlot(o.$slots,"zoom-label",e.normalizeProps(e.guardReactiveProps({...h.value,zoomOpacity:x.value,currentRadius:T.value,fontSize:V.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+t.value.style.chart.circles.zoom.label.name.offsetY-V.value.name/4,"text-anchor":"middle","font-size":V.value.name,fill:t.value.style.chart.circles.zoom.label.name.color?t.value.style.chart.circles.zoom.label.name.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.name.bold?"bold":"normal"},e.toDisplayString(h.value.name),9,Ze),e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+V.value.value+t.value.style.chart.circles.zoom.label.value.offsetY,"text-anchor":"middle","font-size":V.value.value,fill:t.value.style.chart.circles.zoom.label.value.color?t.value.style.chart.circles.zoom.label.value.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.value.bold?"bold":"normal"},e.toDisplayString(ke()),9,Je)]))],64)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:{...k.value}},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:5,config:{type:"circlePack",style:{color:"#CCCCCC"}}})),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:P.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Pe.DataTable,{key:`table_${$.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=l=>P.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Qe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Oe))}},tt=Ve._export_sfc(et,[["__scopeId","data-v-6e0719a8"]]);exports.default=tt;