vue-data-ui-hq
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
2 lines (1 loc) • 42.5 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-ZfICPrrM.cjs"),be=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./Title-FbHK83tB.cjs"),we=require("./usePrinter-B-gh2f22.cjs"),Te=require("./DataTable-CC6dPSer.cjs"),Xe=require("./Tooltip-C7TJODUx.cjs"),De=require("./Legend-HgHPyA_4.cjs"),Me=require("./vue-ui-skeleton-Bvmpr51u.cjs"),Ye=require("./vue-ui-accordion-Dp6uTsJi.cjs"),Ce=require("./useNestedProp-C14rfl0j.cjs"),Ae=require("./PackageVersion-D3dK8oA3.cjs"),Ie=require("./PenAndPaper-PL3bp4ud.cjs"),qe=require("./useUserOptionState-BgepsfED.cjs"),Ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["id"],Ue=["xmlns","viewBox"],je=["width","height"],He={key:1},We=["id"],Je=["stop-color"],Ke=["offset","stop-color"],Qe=["offset","stop-color"],Ze=["stop-color"],et={key:2},tt=["id","cx","cy"],lt=["stop-color","stop-opacity"],ot=["stop-color"],nt=["id"],rt=["id"],at=["id"],ut=["flood-color"],st=["id"],it=["flood-color"],ct=["d","stroke","filter"],ft=["x1","y1","x2","y2","stroke","filter"],dt=["cx","cy","r","fill","filter"],ht=["stroke","d"],yt=["d","fill","stroke","stroke-width","filter"],mt={key:0},pt=["stroke","d"],vt={key:0},gt=["d","stroke","stroke-width","filter"],kt=["d","fill","stroke","stroke-width","filter"],bt={key:1},wt=["cx","cy","r","fill","stroke","stroke-width"],Ct=["cx","cy","r","stroke"],Bt=["cx","cy","r","fill"],xt={key:0},_t=["d","fill","onMouseenter","onClick"],St={key:1},Nt=["cx","cy","r","fill"],Pt=["x","y","fill","font-size"],$t=["x","y","fill","font-size"],Et=["x","y","fill","font-size"],Lt=["x","y","fill","font-size"],Vt=["filter"],Ft={key:0},Ot=["x","y"],zt={key:1},Tt=["cx","cy","fill","stroke","filter","onClick"],Xt=["cx","cy","fill","stroke","filter","onClick"],Dt=["text-anchor","x","y","fill","font-size","onClick"],Mt=["text-anchor","x","y","fill","font-size","onClick"],Yt=["text-anchor","x","y","fill","font-size","onClick"],At=["text-anchor","x","y","fill","font-size","onClick"],It={key:2},qt=["x","y","width"],Gt=["x","y","width"],Rt={key:5,class:"vue-data-ui-watermark"},Ut=["onClick"],jt={key:0,style:{"font-variant-numeric":"tabular-nums"}},Ht={key:1},Wt=["innerHTML"],Jt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Be,{expose:xe,emit:_e}){const{vue_ui_donut:Se}=r.useConfig(),b=Be,E=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),N=e.ref(null),G=e.ref(null),R=e.ref(null),O=e.ref(null),U=e.ref(null),j=e.ref(null),H=e.ref(0),W=e.ref(0),J=e.ref(0);e.onMounted(()=>{K()}),e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});function K(){if(r.objectIsEmpty(b.dataset)?r.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,u)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{E.value=!1,r.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const o=be.throttle(()=>{const{width:u,height:l}=be.useResponsive({chart:N.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:U.value,noTitle:j.value});a.value.width=u,a.value.height=l});O.value=new ResizeObserver(o),O.value.observe(N.value.parentNode)}}const y=e.ref(r.createUid()),Ne=e.ref(null),z=e.ref(!1),D=e.ref(""),p=e.ref(null),Q=e.ref(0);function Z(){const o=Ce.useNestedProp({userConfig:b.config,defaultConfig:Se});return o.theme?{...Ce.useNestedProp({userConfig:r.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}const t=e.computed({get:()=>Z(),set:o=>o}),{userOptionsVisible:M,setUserOptionsVisibility:ee,keepUserOptionState:te}=qe.useUserOptionState({config:t.value});e.watch(()=>b.config,o=>{t.value=Z(),M.value=!t.value.showOnChartHover,K(),H.value+=1,W.value+=1,J.value+=1},{deep:!0});const{isPrinting:le,isImaging:oe,generatePdf:ne,generateImage:re}=we.usePrinter({elementId:`donut__${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),Pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),a=e.ref({height:360,width:512}),L=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,u=a.value.width*o,l=u>m.value?m.value:u;return l<24?24:l}),ue=_e,_=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:r.convertColorToHex(o.color)||ae.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:o.values.reduce((l,n)=>l+n,0),absoluteValues:o.values,comment:o.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,o=>g.value=o);function $e(){return _.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const w=e.ref([]),se=e.ref(null),ie=e.ref(null),S=e.ref(!1);function ce(o){const u=_.value.find((s,h)=>h===o),l=g.value.find((s,h)=>h===o);let n=l.value;if(w.value.includes(o)){let h=function(){n>s?(cancelAnimationFrame(se.value),g.value=g.value.map((d,q)=>o===q?{...d,value:s}:d),S.value=!1):(S.value=!0,n+=s*.025,g.value=g.value.map((d,q)=>o===q?{...d,value:n}:d),se.value=requestAnimationFrame(h))};w.value=w.value.filter(d=>d!==o);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){n<l.value/100?(cancelAnimationFrame(ie.value),w.value.push(o),g.value=g.value.map((h,d)=>o===d?{...h,value:0}:h),S.value=!1):(S.value=!0,n/=1.1,g.value=g.value.map((h,d)=>o===d?{...h,value:n}:h),ie.value=requestAnimationFrame(s))};s()}ue("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((o,u)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),g.value.map((o,u)=>({...o,seriesIndex:u})).filter((o,u)=>!w.value.includes(u)))),fe=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:r.convertColorToHex(o.color)||ae.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:(o.values||[]).reduce((l,n)=>l+n,0),shape:"circle"})).map((o,u)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((n,s)=>n+s,0)).reduce((l,n)=>l+n,0),opacity:w.value.includes(u)?.5:1,segregate:()=>!S.value&&ce(u),isSegregated:w.value.includes(u)}))),Ee=e.computed(()=>({cy:"donut-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":""})),m=e.computed(()=>{const o=Math.min(a.value.width/3,a.value.height/3);return o<55?55:o}),f=e.computed(()=>r.makeDonut({series:C.value},a.value.width/2,a.value.height/2,m.value,m.value,1.99999,2,1,360,105.25,L.value)),i=e.computed(()=>{const o=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/o);return r.createPolarAreas({series:u,center:{x:a.value.width/2,y:a.value.height/2},maxRadius:Math.min(a.value.width,a.value.height)/3})});function P(o){return o.x>a.value.width/2+6?"start":o.x<a.value.width/2-6?"end":"middle"}function Le(o){return o.middlePoint.y>a.value.height/2?r.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:a.value.width/2,centerY:a.value.height/2}).y:r.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:a.value.width/2,centerY:a.value.height/2}).y-100}function k(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Y(o,u){const l=o.value/Ve(u);return isNaN(l)?0:r.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,r.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function Ve(o){return[...o].map(u=>u.value).reduce((u,l)=>u+l,0)}const v=e.computed(()=>C.value.map(o=>o.value).reduce((o,u)=>o+u,0)),de=e.computed(()=>v.value/C.value.length),he=e.computed(()=>o=>S.value?o.proportion*100:o.value/v.value*100),A=e.ref(null),V=e.ref(!1);function ye({datapoint:o,relativeIndex:u,seriesIndex:l,show:n=!1}){A.value={datapoint:o,seriesIndex:l,config:t.value,series:_.value},z.value=n,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(V.value=!1,r.isFunction(h))try{const d=h({seriesIndex:l,datapoint:o,series:_.value,config:t.value});typeof d=="string"&&(D.value=d,V.value=!0)}catch{console.warn("Custom format cannot be applied."),V.value=!1}if(!V.value){if(s+=`<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>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const d=r.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,r.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${d})</span></div>`:s+=`<b>${d}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),D.value=`<div>${s}</div>`}}function F(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${y.value})`:""}const B=e.computed(()=>{const o=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:o,body:u}});function me(){e.nextTick(()=>{const o=B.value.head.map((n,s)=>[[n.name],[B.value.body[s]],[isNaN(B.value.body[s]/v.value)?"-":B.value.body[s]/v.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(u);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const T=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=B.value.head.map((s,h)=>{const d=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:B.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},d,isNaN(B.value.body[h]/v.value)?"-":(B.value.body[h]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),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.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:o,body:u,config:l}}),$=e.ref(!1);function Fe(o){$.value=o,Q.value+=1}const pe=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Oe(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function x(o,u){ue("selectDatapoint",{datapoint:o,index:u})}function ve(){c.value.showTable=!c.value.showTable}function ge(){c.value.dataLabels.show=!c.value.dataLabels.show}function ke(){c.value.showTooltip=!c.value.showTooltip}const X=e.ref(!1);function I(){X.value=!X.value}return xe({getData:$e,generatePdf:ne,generateCsv:me,generateImage:re,toggleTable:ve,toggleLabels:ge,toggleTooltip:ke,toggleAnnotator:I}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:N,class:e.normalizeClass(`vue-ui-donut ${e.unref($)?"vue-data-ui-wrapper-fullscreen":""} ${e.unref(t).useCssAnimation?"":"vue-ui-dna"}`),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}`),id:`donut__${e.unref(y)}`,onMouseenter:u[6]||(u[6]=()=>e.unref(ee)(!0)),onMouseleave:u[7]||(u[7]=()=>e.unref(ee)(!1))},[e.unref(t).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:e.unref(N),backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,active:e.unref(X),onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),e.unref(Pe)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:j,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:G,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`title_${e.unref(H)}`,config:{title:{cy:"donut-div-title",...e.unref(t).style.chart.title},subtitle:{cy:"donut-div-subtitle",...e.unref(t).style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),e.unref(t).userOptions.show&&e.unref(E)&&(e.unref(te)||e.unref(M))?(e.openBlock(),e.createBlock(we.UserOptions,{ref_key:"details",ref:Ne,key:`user_option_${e.unref(Q)}`,backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(oe),uid:e.unref(y),hasTooltip:e.unref(t).style.chart.tooltip.show&&e.unref(t).userOptions.buttons.tooltip,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,hasLabel:e.unref(t).userOptions.buttons.labels,hasFullscreen:e.unref(t).userOptions.buttons.fullscreen,isFullscreen:e.unref($),chartElement:e.unref(N),position:e.unref(t).userOptions.position,isTooltip:e.unref(c).showTooltip,titles:{...e.unref(t).userOptions.buttonTitles},hasAnnotator:e.unref(t).userOptions.buttons.annotator,isAnnotation:e.unref(X),onToggleFullscreen:Fe,onGeneratePdf:e.unref(ne),onGenerateCsv:me,onGenerateImage:e.unref(re),onToggleTable:ve,onToggleLabels:ge,onToggleTooltip:ke,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(M)?"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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(E)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":e.unref($),"vue-data-ui-fulscreen--off":!e.unref($)}),viewBox:`0 0 ${e.unref(a).width<=0?10:e.unref(a).width} ${e.unref(a).height<=0?10:e.unref(a).height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${e.unref(t).style.chart.color}`)},[e.createVNode(Ae._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:e.unref(a).width<=0?10:e.unref(a).width,height:e.unref(a).height<=0?10:e.unref(a).height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,je)):e.createCommentVNode("",!0),e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock("defs",He,[e.unref(t).style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${e.unref(y)}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(t).style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Je),e.createElementVNode("stop",{offset:`${(1-e.unref(L)/e.unref(m))*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Ke),e.createElementVNode("stop",{offset:`${(1-e.unref(L)/e.unref(m)/2)*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",e.unref(t).style.chart.gradientIntensity)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(t).style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ze)],8,We)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(t).type==="polar"?(e.openBlock(),e.createElementBlock("defs",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${n}_${e.unref(y)}`,cx:l.middlePoint.x/e.unref(a).width*100+"%",cy:l.middlePoint.y/e.unref(a).height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(e.unref(f)[n].color,.05),"stop-opacity":e.unref(t).style.chart.gradientIntensity/100},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(f)[n].color},null,8,ot)],8,tt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${e.unref(y)}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${e.unref(y)}`},null,8,rt),u[8]||(u[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,nt),e.createElementVNode("filter",{id:`shadow_${e.unref(y)}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":e.unref(t).style.chart.layout.donut.shadowColor},null,8,ut)],8,at),e.createElementVNode("filter",{id:`drop_shadow_${e.unref(y)}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":e.unref(t).style.chart.layout.donut.shadowColor},null,8,it)],8,st)]),e.unref(t).type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(r.calcNutArrowPath)(l,{x:e.unref(a).width/2,y:e.unref(a).height/2},16,16,!1,!1,e.unref(L)),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:F(n)},null,8,ct)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),e.unref(t).type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:24,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x,y1:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:24,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).y,x2:e.unref(i)[n].middlePoint.x,y2:e.unref(i)[n].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:F(n)},null,8,ft)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),e.unref(t).type==="classic"&&e.unref(t).style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:e.unref(a).width/2,cy:e.unref(a).height/2,r:e.unref(m)<=0?10:e.unref(m),fill:e.unref(t).style.chart.backgroundColor,filter:`url(#shadow_${e.unref(y)})`},null,8,dt)):e.createCommentVNode("",!0),e.unref(v)&&e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:e.unref(t).style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,ht))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(r.setOpacity)(l.color,80),stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.donut.borderWidth,filter:F(n)},null,8,yt))),256))],64)):e.createCommentVNode("",!0),e.unref(v)&&e.unref(t).type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.unref(f).length>1?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:e.unref(t).style.chart.backgroundColor,d:e.unref(i)[n].path,fill:"#FFFFFF"},null,8,pt))),256)),e.unref(t).style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:e.unref(i)[n].path,fill:"transparent",stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${e.unref(y)})`},null,8,gt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:e.unref(i)[n].path,fill:e.unref(t).style.chart.useGradient?`url(#polar_gradient_${n}_${e.unref(y)})`:l.color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.donut.borderWidth,filter:F(n)},null,8,kt))),256))])):(e.openBlock(),e.createElementBlock("g",bt,[e.createElementVNode("circle",{cx:e.unref(a).width/2,cy:e.unref(a).height/2,r:e.unref(m),fill:e.unref(t).style.chart.useGradient?`url(#polar_gradient_0_${e.unref(y)})`:e.unref(f)[0].color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.donut.borderWidth},null,8,wt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:8,cx:e.unref(a).width/2,cy:e.unref(a).height/2,r:e.unref(m)<=0?10:e.unref(m),fill:"transparent",stroke:e.unref(t).style.chart.backgroundColor},null,8,Ct)),e.unref(t).style.chart.useGradient&&e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:9,cx:e.unref(a).width/2,cy:e.unref(a).height/2,r:e.unref(m)<=0?10:e.unref(m),fill:`url(#gradient_${e.unref(y)})`},null,8,Bt)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[e.unref(f).length>1||e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:e.unref(t).type==="classic"?l.arcSlice:e.unref(i)[n].path,fill:e.unref(p)===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>ye({datapoint:l,relativeIndex:n,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{z.value=!1,p.value=null}),onClick:s=>x(l,n)},null,40,_t))),256))])):(e.openBlock(),e.createElementBlock("g",St,[e.createElementVNode("circle",{cx:e.unref(a).width/2,cy:e.unref(a).height/2,r:e.unref(m),fill:e.unref(p)===o.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>ye({datapoint:e.unref(f)[0],relativeIndex:0,seriesIndex:e.unref(f)[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{z.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>x(e.unref(f)[0],o.i))},null,40,Nt)]))],64)):e.createCommentVNode("",!0),e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[e.unref(t).style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:e.unref(a).width/2,y:e.unref(a).height/2-(e.unref(t).style.chart.layout.labels.hollow.average.show?e.unref(t).style.chart.layout.labels.hollow.total.fontSize:0)+e.unref(t).style.chart.layout.labels.hollow.total.offsetY,fill:e.unref(t).style.chart.layout.labels.hollow.total.color,"font-size":e.unref(t).style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(e.unref(t).style.chart.layout.labels.hollow.total.text),13,Pt)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.unref(a).width/2,y:e.unref(a).height/2+e.unref(t).style.chart.layout.labels.hollow.total.fontSize-(e.unref(t).style.chart.layout.labels.hollow.average.show?e.unref(t).style.chart.layout.labels.hollow.total.fontSize:0)+e.unref(t).style.chart.layout.labels.hollow.total.value.offsetY,fill:e.unref(t).style.chart.layout.labels.hollow.total.value.color,"font-size":e.unref(t).style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.hollow.total.value.formatter,e.unref(v),e.unref(r.dataLabel)({p:e.unref(t).style.chart.layout.labels.hollow.total.value.prefix,v:e.unref(v),s:e.unref(t).style.chart.layout.labels.hollow.total.value.suffix}))),13,$t)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:e.unref(a).width/2,y:e.unref(a).height/2+(e.unref(t).style.chart.layout.labels.hollow.total.show?e.unref(t).style.chart.layout.labels.hollow.average.fontSize:0)+e.unref(t).style.chart.layout.labels.hollow.average.offsetY,fill:e.unref(t).style.chart.layout.labels.hollow.average.color,"font-size":e.unref(t).style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(e.unref(t).style.chart.layout.labels.hollow.average.text),13,Et)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:e.unref(a).width/2,y:e.unref(a).height/2+(e.unref(t).style.chart.layout.labels.hollow.total.show?e.unref(t).style.chart.layout.labels.hollow.average.fontSize:0)+e.unref(t).style.chart.layout.labels.hollow.average.fontSize+e.unref(t).style.chart.layout.labels.hollow.average.value.offsetY,fill:e.unref(t).style.chart.layout.labels.hollow.average.value.color,"font-size":e.unref(t).style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(e.unref(S)?"--":e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.hollow.average.value.formatter,e.unref(de),e.unref(r.dataLabel)({p:e.unref(t).style.chart.layout.labels.hollow.average.value.prefix,v:e.unref(de),s:e.unref(t).style.chart.layout.labels.hollow.average.value.suffix,r:e.unref(t).style.chart.layout.labels.hollow.average.value.rounding}))),13,Lt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(l,n)=>(e.openBlock(),e.createElementBlock("g",{filter:F(n),class:e.normalizeClass({animated:e.unref(t).useCssAnimation})},[e.unref(t).style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ft,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(r.calcMarkerOffsetX)(l).x-120:e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(r.calcMarkerOffsetX)(l).x-60:e.unref(r.calcMarkerOffsetX)(l).x,y:e.unref(r.calcMarkerOffsetY)(l)-(e.unref(pe)?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!e.unref(t).useBlurOnHover||[null,void 0].includes(e.unref(p))||e.unref(p)===n,isSafari:e.unref(pe),isVisible:k(l)&&e.unref(c).dataLabels.show,textAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Y(l,e.unref(f))}),void 0,!0)])],8,Ot))])):(e.openBlock(),e.createElementBlock("g",zt,[e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(r.calcMarkerOffsetX)(l).x,cy:e.unref(r.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":1,r:3,filter:!e.unref(t).useBlurOnHover||[null,void 0].includes(e.unref(p))||e.unref(p)===n?"":`url(#blur_${e.unref(y)})`,onClick:s=>x(l,n)},null,8,Tt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.unref(t).type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:24,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x,cy:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:24,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).y,fill:l.color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":1,r:3,filter:!e.unref(t).useBlurOnHover||[null,void 0].includes(e.unref(p))||e.unref(p)===n?"":`url(#blur_${e.unref(y)})`,onClick:s=>x(l,n)},null,8,Xt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:e.unref(t).style.chart.layout.labels.percentage.color,"font-size":e.unref(t).style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,n)},e.toDisplayString(Y(l,e.unref(f)))+" "+e.toDisplayString(e.unref(t).style.chart.layout.labels.value.show?`(${e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.value.formatter,l.value,e.unref(r.dataLabel)({p:e.unref(t).style.chart.layout.labels.dataLabels.prefix,v:l.value,s:e.unref(t).style.chart.layout.labels.dataLabels.suffix,r:e.unref(t).style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Dt)):e.createCommentVNode("",!0),k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(r.calcMarkerOffsetX)(l).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(r.calcMarkerOffsetY)(l)+e.unref(t).style.chart.layout.labels.percentage.fontSize,fill:e.unref(t).style.chart.layout.labels.name.color,"font-size":e.unref(t).style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,n)},e.toDisplayString(l.name),13,Mt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.unref(t).type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":P(e.unref(i)[n].middlePoint),x:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x,y:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).y,fill:e.unref(t).style.chart.layout.labels.percentage.color,"font-size":e.unref(t).style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,n)},e.toDisplayString(Y(l,e.unref(f)))+" "+e.toDisplayString(e.unref(t).style.chart.layout.labels.value.show?`(${e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.value.formatter,l.value,e.unref(r.dataLabel)({p:e.unref(t).style.chart.layout.labels.dataLabels.prefix,v:l.value,s:e.unref(t).style.chart.layout.labels.dataLabels.suffix,r:e.unref(t).style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Yt)):e.createCommentVNode("",!0),k(l)&&e.unref(c).dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":P(e.unref(i)[n].middlePoint),x:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x,y:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).y+e.unref(t).style.chart.layout.labels.percentage.fontSize,fill:e.unref(t).style.chart.layout.labels.name.color,"font-size":e.unref(t).style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${e.unref(t).style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,n)},e.toDisplayString(l.name),13,At)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),e.unref(c).dataLabels.show&&e.unref(t).style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",It,[k(l)&&e.unref(t).type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:e.unref(t).style.chart.comments.offsetX+(e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(r.calcMarkerOffsetX)(l).x-e.unref(t).style.chart.comments.width:e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(r.calcMarkerOffsetX)(l).x-e.unref(t).style.chart.comments.width/2:e.unref(r.calcMarkerOffsetX)(l).x),y:e.unref(r.calcMarkerOffsetY)(l)+24+e.unref(t).style.chart.comments.offsetY,width:e.unref(t).style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,qt)):e.createCommentVNode("",!0),k(l)&&e.unref(t).type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:e.unref(t).style.chart.comments.offsetX+(P(e.unref(i)[n].middlePoint)==="end"?e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x-e.unref(t).style.chart.comments.width:P(e.unref(i)[n].middlePoint)==="middle"?e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x-e.unref(t).style.chart.comments.width/2:e.unref(r.offsetFromCenterPoint)({initX:e.unref(i)[n].middlePoint.x,initY:e.unref(i)[n].middlePoint.y,offset:42,centerX:e.unref(a).width/2,centerY:e.unref(a).height/2}).x),y:Le(e.unref(i)[n])+e.unref(t).style.chart.comments.offsetY,width:e.unref(t).style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:P(e.unref(i)[n].middlePoint),flexAlign:P(e.unref(i)[n].middlePoint)}},void 0,!0)])],8,Gt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Vt))),256)),e.renderSlot(o.$slots,"svg",{svg:e.unref(a)},void 0,!0)],14,Ue)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(E)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me.default,{key:6,config:{type:"donut",style:{backgroundColor:e.unref(t).style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:e.unref(L)*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[e.unref(t).style.chart.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${e.unref(J)}`,legendSet:e.unref(fe),config:e.unref(Ee),onClickMarker:u[4]||(u[4]=({i:l})=>ce(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${e.unref(w).includes(n)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.value.formatter,l.value,e.unref(r.dataLabel)({p:e.unref(t).style.chart.layout.labels.dataLabels.prefix,v:l.value,s:e.unref(t).style.chart.layout.labels.dataLabels.suffix,r:e.unref(t).style.chart.legend.roundingValue}),{datapoint:l,index:n}))+" ",1),e.unref(w).includes(n)?(e.openBlock(),e.createElementBlock("span",Ht," ( "+e.toDisplayString(Oe(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",jt," ("+e.toDisplayString(isNaN(l.value/e.unref(v))?"-":e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.percentage.formatter,e.unref(he)(l),e.unref(r.dataLabel)({v:e.unref(he)(l),s:"%",r:e.unref(t).style.chart.legend.roundingPercentage})))+") ",1))],12,Ut)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:e.unref(fe)},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Xe._sfc_main,{show:e.unref(c).showTooltip&&e.unref(z),backgroundColor:e.unref(t).style.chart.tooltip.backgroundColor,color:e.unref(t).style.chart.tooltip.color,fontSize:e.unref(t).style.chart.tooltip.fontSize,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,position:e.unref(t).style.chart.tooltip.position,offsetY:e.unref(t).style.chart.tooltip.offsetY,parent:e.unref(N),content:e.unref(D),isCustom:e.unref(V),isFullscreen:e.unref($)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...e.unref(A)})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...e.unref(A)})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),e.unref(E)?(e.openBlock(),e.createBlock(Ye.default,{key:8,hideDetails:"",config:{open:e.unref(c).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(Te.DataTable,{key:`table_${e.unref(W)}`,colNames:e.unref(T).colNames,head:e.unref(T).head,body:e.unref(T).body,config:e.unref(T).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:u[5]||(u[5]=l=>e.unref(c).showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Wt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.percentage.formatter,l,e.unref(r.dataLabel)({v:l,s:"%",r:e.unref(t).style.chart.layout.labels.percentage.rounding})):e.unref(r.applyDataLabel)(e.unref(t).style.chart.layout.labels.value.formatter,l,e.unref(r.dataLabel)({p:e.unref(t).style.chart.layout.labels.dataLabels.prefix,v:l,s:e.unref(t).style.chart.layout.labels.dataLabels.suffix,r:e.unref(t).style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},Kt=Ge._export_sfc(Jt,[["__scopeId","data-v-1a12aa08"]]);exports.default=Kt;
;