UNPKG

vue-data-ui-hq

Version:

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

2 lines (1 loc) 23.4 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-ZfICPrrM.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Be=require("./Title-FbHK83tB.cjs"),se=require("./usePrinter-B-gh2f22.cjs"),Pe=require("./Tooltip-C7TJODUx.cjs"),_e=require("./vue-ui-sparkbar-COCIDiNC.cjs"),$e=require("./Legend-HgHPyA_4.cjs"),xe=require("./DataTable-CC6dPSer.cjs"),Ne=require("./vue-ui-skeleton-Bvmpr51u.cjs"),Te=require("./vue-ui-accordion-Dp6uTsJi.cjs"),ue=require("./useNestedProp-C14rfl0j.cjs"),Se=require("./PackageVersion-D3dK8oA3.cjs"),Ee=require("./PenAndPaper-PL3bp4ud.cjs"),Ve=require("./useUserOptionState-BgepsfED.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],Fe=["xmlns","viewBox"],Le=["width","height"],ze=["id"],Ie=["stop-color"],Re=["stop-color"],qe={key:1},Me=["x1","y1","x2","y2","stroke","stroke-width"],Ue={key:0},De=["d","stroke","stroke-width"],Ge=["d","stroke","stroke-width"],We={key:2},He=["x","y","text-anchor","font-size","fill","onMouseenter"],je=["points","stroke","stroke-width"],Xe=["points","stroke","stroke-width","fill"],Ye={key:3},Je=["cx","cy","fill","r","stroke"],Ke={key:5,class:"vue-data-ui-watermark"},Qe=["onClick"],Ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},et={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const{vue_ui_radar:fe}=l.useConfig(),d=ie,C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(l.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),y=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ve.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:fe});return o.theme?{...ue.useNestedProp({userConfig:l.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:l.themePalettes[o.theme]||l.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,j(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function j(){if(l.objectIsEmpty(d.dataset)&&l.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=le.throttle(()=>{const{width:r,height:n}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=r,u.value.height=n});B.value=new ResizeObserver(o),B.value.observe(y.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:X,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),he=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>l.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ge=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=de,i=e.ref([]),w=e.ref(null),v=e.ref(!1);function Z(o){v.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(r=>r!==o),setTimeout(()=>{v.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{v.value=!1},500)),me("selectLegend",k.value.filter((r,n)=>!i.value.includes(n)).map(r=>({name:r.name,color:r.color,proportion:r.totalProportion})))}function ye(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const f=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(l.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?l.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,r)=>{l.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(n=>{l.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${n} at index ${r}`,index:r})})}),[null,void 0].includes(d.dataset.series)?l.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,r)=>{l.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(n=>{l.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:n,index:r})})}),d.dataset.categories.map((o,r)=>({name:o.name,categoryId:`radar_category_${m.value}_${r}`,color:l.convertColorToHex(o.color)||Q.value[r]||l.palette[r]||l.palette[r%l.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,r)=>({...o,color:l.convertColorToHex(o.color)||Q.value[r]||l.palette[r]||l.palette[r%l.palette.length],serieId:`radar_serie_${m.value}_${r}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>l.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),ve=e.computed(()=>{const o=[];for(let r=0;r<S.value;r+=S.value/t.value.style.chart.layout.grid.graduations)o.push(r);return o}),g=e.computed(()=>oe.value.coordinates.map((o,r)=>{const n=p.value[r].values.map(a=>ke({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:a/(p.value[r].target||ee.value)}));return{...o,...p.value[r],plots:n}}));function E({x:o,y:r}){let n="middle";return o=Math.round(o),r=Math.round(r),o>u.value.width/2&&(o+=12,n="start"),o<u.value.width/2&&(o-=12,n="end"),r>u.value.height/2&&(r+=20),r<u.value.height/2&&(r-=12),r===u.value.height/2&&(r+=4),{x:o,y:r,anchor:n}}function ke({centerX:o,centerY:r,apexX:n,apexY:a,proportion:s}){return{x:o+(n-o)*s,y:r+(a-r)*s}}const k=e.computed(()=>{const o=p.value.map((r,n)=>r.values.map(a=>a/(r.target||ee.value)));return f.value.map((r,n)=>({...r,totalProportion:l.checkNaN(o.map(a=>a[n]).reduce((a,s)=>a+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(n)?.5:1,segregate:()=>Z(n),isSegregated:i.value.includes(n)}))}),be=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],r=d.dataset.series.map(a=>[a.name,l.applyDataLabel(a.formatter,a.target,l.dataLabel({p:a.prefix,v:a.target,s:a.suffix,r:t.value.table.td.roundingValue})),...a.values.map((s,c)=>`${l.applyDataLabel(a.formatter,s,l.dataLabel({p:f.value[c].prefix,v:s,s:f.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/a.target)?"":l.dataLabel({v:s/a.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),n={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{head:o,body:r,config:n,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function Ce(o,r){V.value=[],_.value=r,x.value=!0;let n="";O.value={datapoint:o,seriesIndex:r,series:{categories:f.value,datapoints:p.value,radar:g.value},config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(l.isFunction(a)&&l.functionReturnsString(()=>a({seriesIndex:r,datapoint:o,series:{categories:f.value,datapoints:p.value,radar:g.value},config:t.value})))N.value=a({seriesIndex:r,datapoint:o,series:{categories:f.value,datapoints:p.value,radar:g.value},config:t.value});else{n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:f.value[s].name,value:o.values[s]/o.target*100,color:f.value[s].color,suffix:"%)",prefix:`${l.dataLabel({p:f.value[s].prefix??"",v:o.values[s],s:f.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=n}}function re(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],n=d.dataset.series.map((c,ot)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),a=o.concat([r]).concat(n),s=l.createCsvContent(a);l.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function we(o){b.value=o,L.value+=1}function ne(){h.value.showTable=!h.value.showTable}function ae(){h.value.showTooltip=!h.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ce({getData:ye,generatePdf:J,generateCsv:re,generateImage:K,toggleTable:ne,toggleTooltip:ae,toggleAnnotator:A}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${e.unref(b)?"vue-data-ui-wrapper-fullscreen":""} ${e.unref(t).useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:y,id:`vue-ui-radar_${e.unref(m)}`,style:e.normalizeStyle(`font-family:${e.unref(t).style.fontFamily};width:100%; ${e.unref(t).responsive?"height: 100%;":""} text-align:center;background:${e.unref(t).style.chart.backgroundColor}`),onMouseenter:r[3]||(r[3]=()=>e.unref(G)(!0)),onMouseleave:r[4]||(r[4]=()=>e.unref(G)(!1))},[e.unref(t).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,parent:e.unref(y),backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,active:e.unref($),onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),e.unref(t).style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${e.unref(M)}`,config:{title:{cy:"radar-div-title",...e.unref(t).style.chart.title},subtitle:{cy:"radar-div-subtitle",...e.unref(t).style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),e.unref(t).userOptions.show&&e.unref(C)&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${e.unref(L)}`,backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(X),uid:e.unref(m),hasTooltip:e.unref(t).userOptions.buttons.tooltip&&e.unref(t).style.chart.tooltip.show,hasPdf:e.unref(t).userOptions.buttons.pdf,hasImg:e.unref(t).userOptions.buttons.img,hasXls:e.unref(t).userOptions.buttons.csv,hasTable:e.unref(t).userOptions.buttons.table,hasFullscreen:e.unref(t).userOptions.buttons.fullscreen,isFullscreen:e.unref(b),isTooltip:e.unref(h).showTooltip,titles:{...e.unref(t).userOptions.buttonTitles},chartElement:e.unref(y),position:e.unref(t).userOptions.position,hasAnnotator:e.unref(t).userOptions.buttons.annotator,isAnnotation:e.unref($),onToggleFullscreen:we,onGeneratePdf:e.unref(J),onGenerateCsv:re,onGenerateImage:e.unref(K),onToggleTable:ne,onToggleTooltip:ae,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},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:n,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(C)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":e.unref(b),"vue-data-ui-fulscreen--off":!e.unref(b)}),viewBox:`0 0 ${e.unref(u).width<=0?10:e.unref(u).width} ${e.unref(u).height<=0?10:e.unref(u).height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${e.unref(t).style.chart.color}`)},[e.createVNode(Se._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:e.unref(u).width<=0?10:e.unref(u).width,height:e.unref(u).height<=0?10:e.unref(u).height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Le)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(n,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${e.unref(m)}_${a}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.setOpacity)(e.unref(l.shiftHue)(n.color,.05),e.unref(t).style.chart.layout.dataPolygon.opacity)},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(l.setOpacity)(n.color,e.unref(t).style.chart.layout.dataPolygon.opacity)},null,8,Re)],8,ze))),256))]),e.unref(t).style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),n=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(u).width/2,y1:e.unref(u).height/2,x2:n.x,y2:n.y,stroke:e.unref(t).style.chart.layout.grid.stroke,"stroke-width":e.unref(t).style.chart.layout.grid.strokeWidth},null,8,Me))),256)),e.unref(t).style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ve),n=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(l.createPolygonPath)({plot:{x:e.unref(u).width/2,y:e.unref(u).height/2},radius:n,sides:e.unref(te),rotation:0}).path,fill:"none",stroke:e.unref(t).style.chart.layout.grid.stroke,"stroke-width":e.unref(t).style.chart.layout.grid.strokeWidth},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:e.unref(oe).path,fill:"none",stroke:e.unref(t).style.chart.layout.outerPolygon.stroke,"stroke-width":e.unref(t).style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ge),e.unref(t).style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(n,a)=>(e.openBlock(),e.createElementBlock("text",{x:E(n).x,y:E(n).y,"text-anchor":E(n).anchor,"font-size":e.unref(t).style.chart.layout.labels.dataLabels.fontSize,fill:e.unref(t).style.chart.layout.labels.dataLabels.color,onMouseenter:s=>Ce(n,a),onMouseleave:r[0]||(r[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(n.name),41,He))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(n,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[e.unref(t).useCssAnimation||!e.unref(t).useCssAnimation&&!e.unref(i).includes(a)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(l.makePath)(e.unref(g).map(s=>s.plots[a]),!1,!0),stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":e.unref(i).includes(a)&&e.unref(t).useCssAnimation,"animated-in":e.unref(v)&&e.unref(w)===a&&e.unref(t).useCssAnimation})},null,10,je)):e.createCommentVNode("",!0),e.unref(t).useCssAnimation||!e.unref(t).useCssAnimation&&!e.unref(i).includes(a)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(l.makePath)(e.unref(g).map(s=>s.plots[a]),!1,!0),stroke:n.color,"stroke-width":e.unref(t).style.chart.layout.dataPolygon.strokeWidth,fill:e.unref(t).style.chart.layout.dataPolygon.transparent?"transparent":e.unref(t).style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${e.unref(m)}_${a})`:e.unref(l.setOpacity)(n.color,e.unref(t).style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":e.unref(i).includes(a)&&e.unref(t).useCssAnimation,"animated-in":e.unref(v)&&e.unref(w)===a&&e.unref(t).useCssAnimation})},null,10,Xe)):e.createCommentVNode("",!0)])]))),256)),e.unref(t).style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(n,a)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:e.unref(i).includes(c)?"transparent":e.unref(f)[c].color,r:e.unref(_)!==null&&e.unref(_)===a?e.unref(t).style.chart.layout.plots.radius*1.6:e.unref(t).style.chart.layout.plots.radius,stroke:e.unref(i).includes(c)?"transparent":e.unref(t).style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":e.unref(i).includes(c)&&e.unref(t).useCssAnimation,"animated-in":e.unref(v)&&e.unref(w)===c&&e.unref(t).useCssAnimation})},null,10,Je))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:e.unref(u)},void 0,!0)],14,Fe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(C)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"radar",style:{backgroundColor:e.unref(t).style.chart.backgroundColor,radar:{grid:{color:e.unref(t).style.chart.layout.outerPolygon.stroke},shapes:{color:e.unref(t).style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[e.unref(t).style.chart.legend.show?(e.openBlock(),e.createBlock($e.Legend,{key:`legend_${e.unref(D)}`,legendSet:e.unref(k),config:e.unref(be),onClickMarker:r[1]||(r[1]=({i:n})=>Z(n))},{item:e.withCtx(({legend:n,index:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>n.segregate(),style:e.normalizeStyle(`opacity:${e.unref(i).includes(a)?.5:1}`)},e.toDisplayString(n.name)+": "+e.toDisplayString(e.unref(l.dataLabel)({v:n.totalProportion*100,s:"%",r:e.unref(t).style.chart.legend.roundingPercentage})),13,Qe)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:e.unref(k)},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:e.unref(h).showTooltip&&e.unref(x),backgroundColor:e.unref(t).style.chart.tooltip.backgroundColor,color:e.unref(t).style.chart.tooltip.color,borderRadius:e.unref(t).style.chart.tooltip.borderRadius,borderColor:e.unref(t).style.chart.tooltip.borderColor,borderWidth:e.unref(t).style.chart.tooltip.borderWidth,backgroundOpacity:e.unref(t).style.chart.tooltip.backgroundOpacity,fontSize:e.unref(t).style.chart.tooltip.fontSize,position:e.unref(t).style.chart.tooltip.position,offsetY:e.unref(t).style.chart.tooltip.offsetY,parent:e.unref(y),content:e.unref(N),isFullscreen:e.unref(b),isCustom:e.unref(t).style.chart.tooltip.customFormat&&typeof e.unref(t).style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...e.unref(O)})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof e.unref(t).style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ze,[e.createVNode(_e.default,{dataset:e.unref(V),config:e.unref(ge),backgroundOpacity:e.unref(t).style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...e.unref(O)})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),e.unref(C)?(e.openBlock(),e.createBlock(Te.default,{key:8,hideDetails:"",config:{open:e.unref(h).showTable,maxHeight:1e4,body:{backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color},head:{backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${e.unref(U)}`,colNames:e.unref(P).colNames,head:e.unref(P).head,body:e.unref(P).body,config:e.unref(P).config,title:`${e.unref(t).style.chart.title.text}${e.unref(t).style.chart.title.subtitle.text?` : ${e.unref(t).style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=n=>e.unref(h).showTable=!1)},{th:e.withCtx(({th:n})=>[e.createTextVNode(e.toDisplayString(n.name),1)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ae))}},tt=Oe._export_sfc(et,[["__scopeId","data-v-386b7e4e"]]);exports.default=tt;