UNPKG

vue-data-ui

Version:

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

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