UNPKG

vue-data-ui-hq

Version:

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

2 lines (1 loc) 25.4 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-ZfICPrrM.cjs"),X=require("./useResponsive-BJ7DTGpm.cjs"),ae=require("./Title-FbHK83tB.cjs"),Y=require("./usePrinter-B-gh2f22.cjs"),se=require("./Tooltip-C7TJODUx.cjs"),ie=require("./DataTable-CC6dPSer.cjs"),ue=require("./vue-ui-skeleton-Bvmpr51u.cjs"),de=require("./vue-ui-accordion-Dp6uTsJi.cjs"),J=require("./useNestedProp-C14rfl0j.cjs"),fe=require("./PackageVersion-D3dK8oA3.cjs"),ce=require("./PenAndPaper-PL3bp4ud.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],ge=["xmlns","viewBox"],ve=["x","y","width","height"],be=["id"],me=["stop-color"],xe=["stop-color"],ke=["id"],we=["stop-color"],Ce=["stop-color"],Ne=["x","y","width","height","fill","rx"],_e=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Se=["x","y","width","height","fill","rx"],Te={key:0},Be=["x","y","fill","font-size","font-weight"],Ae=["x","y","fill","font-size","font-weight"],$e={key:1},Ee=["x","y","font-size","fill","font-weight"],Ve={key:2},ze={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","font-size","fill","font-weight"],De=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["x","y","width","height","fill","onMouseover"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:K}){const{vue_ui_age_pyramid:Q}=a.useConfig(),u=T,m=e.computed(()=>!!u.dataset&&u.dataset.length),f=e.ref(a.createUid()),Z=e.ref(null),C=e.ref(!1),N=e.ref(""),x=e.ref(null),B=e.ref(0),y=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:o=>o}),{userOptionsVisible:_,setUserOptionsVisibility:P,keepUserOptionState:O}=ye.useUserOptionState({config:t.value});function F(){const o=J.useNestedProp({userConfig:u.config,defaultConfig:Q});return o.theme?{...J.useNestedProp({userConfig:a.themes.vue_ui_age_pyramid[o.theme]||u.config,defaultConfig:o})}:o}e.watch(()=>u.config,o=>{t.value=F(),_.value=!t.value.showOnChartHover,D(),V.value+=1,z.value+=1},{deep:!0});const I=e.ref(null);e.onMounted(()=>{D()});function D(){if(a.objectIsEmpty(u.dataset)&&a.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const o=X.throttle(()=>{const{width:s,height:l}=X.useResponsive({chart:y.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});d.value.width=s,d.value.height=l});I.value=new ResizeObserver(o),I.value.observe(y.value.parentNode)}}const{isPrinting:M,isImaging:R,generatePdf:q,generateImage:U}=Y.usePrinter({elementId:`vue-ui-age-pyramid_${f.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),n=e.computed(()=>{const o=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,s=t.value.style.layout.padding.left,l=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:s,right:l,bottom:d.value.height-t.value.style.layout.padding.bottom,width:o,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+o/2,leftChart:{width:o/2-t.value.style.layout.centerSlit.width,right:s+o/2-t.value.style.layout.centerSlit.width},rightChart:{width:o/2-t.value.style.layout.centerSlit.width,left:s+o/2+t.value.style.layout.centerSlit.width}}}),te=e.computed(()=>u.dataset.map(o=>t.value.style.layout.dataLabels.yAxis.display==="age"?o[1]:o[0])),h=e.computed(()=>{const o=oe(b.value/5),s=[],l=[];for(let r=0;r<=5;r+=1){const i=o*r,j=o*(r-5);s.push({value:i,x:n.value.left+n.value.width/2+t.value.style.layout.centerSlit.width+i/b.value*n.value.leftChart.width}),l.push({value:Math.abs(j),x:n.value.left+n.value.width/2+j/b.value*n.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:s,left:l}});function oe(o){if(o===0)return 0;const l=10**Math.floor(Math.log10(Math.abs(o)));let r;return o<0,r=Math.round(o/l)*l,r}const b=e.computed(()=>Math.max(...u.dataset.flatMap(o=>o.slice(-2).map(s=>a.checkNaN(s))))),p=e.computed(()=>u.dataset.length),le=e.computed(()=>u.dataset.map(o=>({segment:o[0],age:o[1],left:{value:o[2],proportionToMax:o[2]/b.value},right:{value:o[3],proportionToMax:o[3]/b.value}}))),g=e.computed(()=>le.value.map((o,s)=>{const l=n.value.top+n.value.height/p.value*s,r=n.value.height/p.value-t.value.style.layout.bars.gap;return{segment:o.segment,age:o.age,left:{...o.left,y:l,color:t.value.style.layout.bars.left.color,x:n.value.leftChart.right-o.left.proportionToMax*n.value.leftChart.width,width:a.checkNaN(o.left.proportionToMax*n.value.leftChart.width),height:r},right:{...o.right,y:l,color:t.value.style.layout.bars.right.color,x:n.value.rightChart.left,width:a.checkNaN(o.right.proportionToMax*n.value.rightChart.width),height:r}}})),L=e.ref(null);function re(o,s){x.value=o,L.value={datapoint:s,seriesIndex:o,series:g.value,config:t.value};const l=t.value.style.tooltip.customFormat;if(a.isFunction(l)&&a.functionReturnsString(()=>l({seriesIndex:o,datapoint:{segment:s[0],index:s[1],left:s[2],right:s[3]},series:g.value,config:t.value})))N.value=l({seriesIndex:o,datapoint:{segment:s[0],index:s[1],left:s[2],right:s[3]},series:g.value,config:t.value});else{let r="";const i=g.value[o];r+=`<div><b>${i.segment}</b></div>`,r+=`<div>${t.value.translations.age}: ${a.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,a.checkNaN(i.age),a.dataLabel({v:a.checkNaN(i.age)}),{datapoint:s,seriesIndex:o})}</div>`,r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,r+='<div style="display:flex; flex-direction:row;gap:12px">',r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${f.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${a.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,a.checkNaN(i.left.value),a.dataLabel({v:a.checkNaN(i.left.value)}),{datapoint:s,seriesIndex:o})}</b></div></div>`,r+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${f.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${a.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,a.checkNaN(i.right.value),a.dataLabel({v:a.checkNaN(i.right.value)}),{datapoint:s,seriesIndex:o})}</b></div></div>`,r+="</div>",r+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${a.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,a.checkNaN(i.right.value)+a.checkNaN(i.left.value),a.dataLabel({v:a.checkNaN(i.right.value)+a.checkNaN(i.left.value)}),{datapoint:s,seriesIndex:o})}</b></div></div>`,r+="</div>",N.value=`<div>${r}</div>`}C.value=!0}function G(){e.nextTick(()=>{const o=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],s=u.dataset.map(i=>[i[0],i[1],i[2],i[3],i[2]+i[3]]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([o]).concat(s),r=a.createCsvContent(l);a.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const o=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],s=u.dataset.map(r=>[r[0],r[1],r[2].toLocaleString(),r[3].toLocaleString(),(r[2]+r[3]).toLocaleString()]),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{head:o,body:s,config:l,colNames:o}}),v=e.ref(!1);function ne(o){v.value=o,B.value+=1}function H(){c.value.showTable=!c.value.showTable}function W(){c.value.showTooltip=!c.value.showTooltip}const w=e.ref(!1);function S(){w.value=!w.value}return K({generatePdf:q,generateCsv:G,generateImage:U,toggleTable:H,toggleTooltip:W,toggleAnnotator:S}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${e.unref(v)?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${e.unref(f)}`,style:e.normalizeStyle(`font-family:${e.unref(t).style.fontFamily};width:100%; text-align:center;background:${e.unref(t).style.backgroundColor};${e.unref(t).responsive?"height:100%":""}`),onMouseenter:s[2]||(s[2]=()=>e.unref(P)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(P)(!1))},[e.unref(t).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ce.PenAndPaper,{key:0,parent:e.unref(y),backgroundColor:e.unref(t).style.backgroundColor,color:e.unref(t).style.color,active:e.unref(w),onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.unref(ee)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),e.unref(t).style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${e.unref(V)}`,config:{title:{cy:"pyramid-div-title",...e.unref(t).style.title},subtitle:{cy:"pyramid-div-subtitle",...e.unref(t).style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),e.unref(t).userOptions.show&&e.unref(m)&&(e.unref(O)||e.unref(_))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${e.unref(B)}`,backgroundColor:e.unref(t).style.backgroundColor,color:e.unref(t).style.color,isImaging:e.unref(R),isPrinting:e.unref(M),uid:e.unref(f),hasTooltip:e.unref(t).userOptions.buttons.tooltip&&e.unref(t).style.tooltip.show,hasPdf:e.unref(t).userOptions.buttons.pdf,hasXls:e.unref(t).userOptions.buttons.csv,hasImg:e.unref(t).userOptions.buttons.img,hasTable:e.unref(t).userOptions.buttons.table,hasFullscreen:e.unref(t).userOptions.buttons.fullscreen,isFullscreen:e.unref(v),isTooltip:e.unref(c).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(w),onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:H,onToggleTooltip:W,onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(_)?"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:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":e.unref(v),"vue-data-ui-fulscreen--off":!e.unref(v)}),viewBox:`0 0 ${e.unref(d).width<=0?10:e.unref(d).width} ${e.unref(d).height<=0?10:e.unref(d).height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${e.unref(t).style.color}`)},[e.createVNode(fe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:e.unref(n).left,y:e.unref(n).top,width:e.unref(n).width,height:e.unref(n).height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${e.unref(f)}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(t).style.layout.bars.left.color},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(e.unref(t).style.layout.bars.left.color,e.unref(t).style.layout.bars.gradient.shiftHue),100-e.unref(t).style.layout.bars.gradient.intensity)},null,8,xe)],8,be),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${e.unref(f)}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(e.unref(t).style.layout.bars.right.color,e.unref(t).style.layout.bars.gradient.shiftHue),100-e.unref(t).style.layout.bars.gradient.intensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(t).style.layout.bars.right.color},null,8,Ce)],8,ke)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.left.x,y:l.left.y,width:e.unref(a.checkNaN)(l.left.width<=0?1e-4:l.left.width),height:l.left.height<=0?1e-4:l.left.height,fill:e.unref(t).style.layout.bars.gradient.underlayer,rx:e.unref(t).style.layout.bars.borderRadius},null,8,Ne),e.createElementVNode("rect",{x:l.left.x,y:l.left.y,width:l.left.width<=0?1e-4:l.left.width,height:l.left.height<=0?1e-4:l.left.height,fill:e.unref(t).style.layout.bars.gradient.show?`url(#age_pyramid_left_${e.unref(f)})`:l.left.color,rx:e.unref(t).style.layout.bars.borderRadius},null,8,_e),e.createElementVNode("rect",{x:l.right.x,y:l.right.y,width:l.right.width<=0?1e-4:l.right.width,height:l.right.height<=0?1e-4:l.right.height,fill:e.unref(t).style.layout.bars.gradient.underlayer,rx:e.unref(t).style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:l.right.x,y:l.right.y,width:l.right.width<=0?1e-4:l.right.width,height:l.right.height<=0?1e-4:l.right.height,fill:e.unref(t).style.layout.bars.gradient.show?`url(#age_pyramid_right_${e.unref(f)})`:l.right.color,rx:e.unref(t).style.layout.bars.borderRadius},null,8,Se)]))),256)),e.createElementVNode("g",null,[e.unref(t).style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("text",{x:e.unref(n).left,y:e.unref(n).top+e.unref(t).style.layout.dataLabels.sideTitles.offsetY,fill:e.unref(t).style.layout.dataLabels.sideTitles.useSideColor?e.unref(t).style.layout.bars.left.color:e.unref(t).style.layout.dataLabels.sideTitles.color,"font-size":e.unref(t).style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":e.unref(t).style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(e.unref(t).translations.female),9,Be),e.createElementVNode("text",{x:e.unref(n).right,y:e.unref(n).top+e.unref(t).style.layout.dataLabels.sideTitles.offsetY,fill:e.unref(t).style.layout.dataLabels.sideTitles.useSideColor?e.unref(t).style.layout.bars.right.color:e.unref(t).style.layout.dataLabels.sideTitles.color,"font-size":e.unref(t).style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":e.unref(t).style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(e.unref(t).translations.male),9,Ae)])):e.createCommentVNode("",!0),e.unref(t).style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r%e.unref(t).style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(n).centerX,y:e.unref(n).top+e.unref(n).height/e.unref(p)*r+e.unref(t).style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":e.unref(t).style.layout.dataLabels.yAxis.fontSize,fill:e.unref(t).style.layout.dataLabels.yAxis.color,"font-weight":e.unref(t).style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(e.unref(t).style.layout.dataLabels.yAxis.formatter,l,e.unref(a.dataLabel)({v:l}),{datapoint:l,seriesIndex:r})),9,Ee)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.unref(t).style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[e.unref(t).style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:e.unref(h).right[0].x,x2:e.unref(h).right.at(-1).x,y1:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/2,y2:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/2,stroke:e.unref(t).style.layout.grid.stroke,"stroke-width":e.unref(t).style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:e.unref(h).left[0].x,x2:e.unref(h).left.at(-1).x,y1:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/2,y2:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/2,stroke:e.unref(t).style.layout.grid.stroke,"stroke-width":e.unref(t).style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h).right,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.unref(t).style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/2,y2:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/4,stroke:e.unref(t).style.layout.grid.stroke,"stroke-width":e.unref(t).style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:l.x,y:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize*2,"font-size":e.unref(t).style.layout.dataLabels.xAxis.fontSize,fill:e.unref(t).style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":e.unref(t).style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(e.unref(t).style.layout.dataLabels.xAxis.formatter,l.value/e.unref(t).style.layout.dataLabels.xAxis.scale,e.unref(a.dataLabel)({v:l.value/e.unref(t).style.layout.dataLabels.xAxis.scale}),{datapoint:l,seriesIndex:r})),9,Ie)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h).left,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.unref(t).style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x,x2:l.x,y1:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/2,y2:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize/4,stroke:e.unref(t).style.layout.grid.stroke,"stroke-width":e.unref(t).style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:l.x,y:e.unref(n).bottom+e.unref(t).style.layout.dataLabels.xAxis.fontSize*2,"font-size":e.unref(t).style.layout.dataLabels.xAxis.fontSize,fill:e.unref(t).style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":e.unref(t).style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(e.unref(t).style.layout.dataLabels.xAxis.formatter,l.value/e.unref(t).style.layout.dataLabels.xAxis.scale,e.unref(a.dataLabel)({v:l.value/e.unref(t).style.layout.dataLabels.xAxis.scale}),{datapoint:l,seriesIndex:r})),9,Me)]))),256)),e.createElementVNode("text",{x:e.unref(n).right,y:e.unref(d).height,"text-anchor":"end","font-size":e.unref(t).style.layout.dataLabels.xAxis.fontSize,fill:e.unref(t).style.layout.dataLabels.xAxis.color,"font-weight":e.unref(t).style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(t).style.layout.dataLabels.xAxis.translation),9,Re)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n).left,y:e.unref(n).top+e.unref(n).height/e.unref(p)*r-e.unref(t).style.layout.bars.gap/2,width:e.unref(n).width<=0?1e-4:e.unref(n).width,height:e.unref(n).height/e.unref(p)<=0?1e-4:e.unref(n).height/e.unref(p),fill:e.unref(x)!==null&&e.unref(x)===r?e.unref(a.setOpacity)(e.unref(t).style.highlighter.color,e.unref(t).style.highlighter.opacity):"transparent",onMouseover:i=>re(r,l),onMouseleave:s[0]||(s[0]=i=>{x.value=null,C.value=!1})},null,40,qe)]))),256)),e.renderSlot(o.$slots,"svg",{svg:e.unref(d)},void 0,!0)],14,ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(m)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"pyramid",style:{backgroundColor:e.unref(t).style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(o.$slots,"legend",{legend:e.unref(g)},void 0,!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(se._sfc_main,{show:e.unref(c).showTooltip&&e.unref(C),backgroundColor:e.unref(t).style.tooltip.backgroundColor,color:e.unref(t).style.tooltip.color,borderRadius:e.unref(t).style.tooltip.borderRadius,borderColor:e.unref(t).style.tooltip.borderColor,borderWidth:e.unref(t).style.tooltip.borderWidth,fontSize:e.unref(t).style.tooltip.fontSize,backgroundOpacity:e.unref(t).style.tooltip.backgroundOpacity,position:e.unref(t).style.tooltip.position,offsetY:e.unref(t).style.tooltip.offsetY,parent:e.unref(y),content:e.unref(N),isFullscreen:e.unref(v),isCustom:e.unref(t).style.tooltip.customFormat&&typeof e.unref(t).style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...e.unref(L)})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...e.unref(L)})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.unref(m)?(e.openBlock(),e.createBlock(de.default,{key:8,hideDetails:"",config:{open:e.unref(c).showTable,maxHeight:1e4,body:{backgroundColor:e.unref(t).style.backgroundColor,color:e.unref(t).style.color},head:{backgroundColor:e.unref(t).style.backgroundColor,color:e.unref(t).style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ie.DataTable,{key:`table_${e.unref(z)}`,colNames:e.unref(k).colNames,head:e.unref(k).head,body:e.unref(k).body,config:e.unref(k).config,title:`${e.unref(t).style.title.text}${e.unref(t).style.title.subtitle.text?` : ${e.unref(t).style.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=l=>e.unref(c).showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,pe))}},He=he._export_sfc(Ge,[["__scopeId","data-v-5ebef784"]]);exports.default=He;