vue-data-ui-hq
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
7 lines (6 loc) • 45.1 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-ZfICPrrM.cjs"),Me=require("./useNestedProp-C14rfl0j.cjs"),Te=require("./useResponsive-BJ7DTGpm.cjs"),Ve=require("./usePrinter-B-gh2f22.cjs"),rt=require("./Slicer-CtTQxL9r.cjs"),ot=require("./Tooltip-C7TJODUx.cjs"),nt=require("./Title-FbHK83tB.cjs"),at=require("./Legend-HgHPyA_4.cjs"),lt=require("./vue-ui-accordion-Dp6uTsJi.cjs"),st=require("./DataTable-CC6dPSer.cjs"),it=require("./vue-ui-skeleton-Bvmpr51u.cjs"),ut=require("./PackageVersion-D3dK8oA3.cjs"),ct=require("./PenAndPaper-PL3bp4ud.cjs"),dt=require("./useUserOptionState-BgepsfED.cjs"),ft=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ht=["id"],mt=["xmlns","viewBox"],gt=["x","y","width","height"],yt={key:1},bt=["id"],pt=["stop-color"],vt=["stop-color"],kt=["stop-color"],xt=["x1","x2","y1","y2","stroke"],wt=["x1","x2","y1","y2","stroke"],Bt=["x1","x2","y1","y2","stroke"],Ct=["x1","x2","y1","y2","stroke"],St=["x","y","height","rx","width","fill","stroke","stroke-width"],Lt=["x","y","width","rx","height","fill","stroke","stroke-width"],zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt=["x1","x2","y1","y2","stroke","stroke-width"],Et=["x","y","font-size","fill","font-weight"],_t=["transform","font-size","fill","font-weight"],$t=["x","y","font-size","fill","font-weight"],Mt={key:0},Tt=["x","y","font-size","font-weight","fill"],Vt=["x","y","font-size","fill","font-weight"],Pt={key:0},Ft=["x","y","font-size","font-weight","fill"],It=["x1","x2","y1","y2","stroke"],Ot=["x","y","font-size","font-weight","fill"],Rt=["x1","x2","y1","y2","stroke"],Dt=["font-size","font-weight","fill","text-anchor","transform"],At={key:0},qt={key:1},Ht=["text-anchor","font-size","font-weight","fill","transform","onClick"],Ut={key:0},Wt={key:1},Yt=["font-size","font-weight","fill","x","y","onClick"],Xt=["x","y","width","height","onClick","onMouseenter","fill"],Gt=["x","y","width","height","onClick","onMouseenter","fill"],Jt={key:4,class:"vue-data-ui-watermark"},Zt=["onClick"],Kt=["innerHTML"],Qt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend","selectTimeLabel"],setup(X,{expose:Pe,emit:Fe}){const{vue_ui_stackbar:Ie}=c.useConfig(),f=X,G=Fe,$=e.computed({get(){return!!f.dataset&&f.dataset.length},set(o){return o}}),M=e.ref(null),J=e.ref(c.createUid()),R=e.ref(!1),ee=e.ref(null),Z=e.ref(""),p=e.ref([]),te=e.ref(0),re=e.ref(null),oe=e.ref(null),ne=e.ref(null),ae=e.ref(null),le=e.ref(0),D=e.ref(!1),V=e.ref(null),P=e.ref(!1),Oe=e.ref(0),Re=e.ref(0),De=e.ref(0),T=e.ref(null);e.onMounted(()=>{Q()});const t=e.computed({get:()=>ue(),set:o=>o}),{userOptionsVisible:K,setUserOptionsVisibility:se,keepUserOptionState:ie}=dt.useUserOptionState({config:t.value});function ue(){const o=Me.useNestedProp({userConfig:f.config,defaultConfig:Ie});let n={};return o.theme?n={...Me.useNestedProp({userConfig:c.themes.vue_ui_stackbar[o.theme]||f.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:n=o,f.config&&c.hasDeepProperty(f.config,"style.chart.grid.scale.scaleMin")?n.style.chart.grid.scale.scaleMin=f.config.style.chart.grid.scale.scaleMin:n.style.chart.grid.scale.scaleMin=null,f.config&&c.hasDeepProperty(f.config,"style.chart.grid.scale.scaleMax")?n.style.chart.grid.scale.scaleMax=f.config.style.chart.grid.scale.scaleMax:n.style.chart.grid.scale.scaleMax=null,f.config&&c.hasDeepProperty(f.config,"style.chart.zoom.startIndex")?n.style.chart.zoom.startIndex=f.config.style.chart.zoom.startIndex:n.style.chart.zoom.startIndex=null,f.config&&c.hasDeepProperty(f.config,"style.chart.zoom.endIndex")?n.style.chart.zoom.endIndex=f.config.style.chart.zoom.endIndex:n.style.chart.zoom.endIndex=null,n}e.watch(()=>f.config,o=>{t.value=ue(),K.value=!t.value.showOnChartHover,Q(),Oe.value+=1,Re.value+=1,De.value+=1},{deep:!0}),e.watch(()=>f.dataset,o=>{ye()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:ce,isImaging:de,generatePdf:fe,generateImage:he}=Ve.usePrinter({elementId:`stackbar_${J.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),A=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ae=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),me=e.ref(null),ge=e.ref(null);e.onMounted(()=>{Q()});function Q(){if(c.objectIsEmpty(f.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):f.dataset.forEach((o,n)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","series"]}).forEach(r=>{$.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:r,index:n})})}),setTimeout(()=>{P.value=!0},10),t.value.responsive){const o=Te.throttle(()=>{P.value=!1;const{width:n,height:r}=Te.useResponsive({chart:M.value,title:t.value.style.chart.title.text?re.value:null,legend:t.value.style.chart.legend.show?oe.value:null,slicer:t.value.style.chart.zoom.show&&S.value>1?ne.value:null,source:ae.value});A.value.width=n,A.value.height=r,clearTimeout(ge.value),ge.value=setTimeout(()=>{P.value=!0},10)});me.value=new ResizeObserver(o),me.value.observe(M.value.parentNode)}be()}const l=e.computed(()=>{const{height:o,width:n}=A.value,{right:r}=A.value.paddingRatio,a=t.value.style.chart.padding.top,s=n-n*r,i=o-t.value.style.chart.padding.bottom,y=t.value.style.chart.padding.left,z=n-y-n*r,N=o-a-t.value.style.chart.padding.bottom;return{chartHeight:o,chartWidth:n,top:a,right:s,bottom:i,left:y,width:z,height:N<0?0:N}}),C=e.computed(()=>f.dataset.map((o,n)=>{const r=c.convertColorToHex(o.color)||Ae.value[n]||c.palette[n]||c.palette[n%c.palette.length];return{...o,series:JSON.parse(JSON.stringify(o.series)).map(a=>t.value.style.chart.bars.distributed?Math.abs(a):a),signedSeries:o.series.map(a=>a>=0?1:-1),absoluteIndex:n,id:c.createUid(),color:r}})),S=e.computed(()=>Math.max(...C.value.filter(o=>!p.value.includes(o.id)).map(o=>o.series.length))),u=e.ref({start:0,end:Math.max(...f.dataset.map(o=>o.series.length))});function ye(){be()}async function be(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&T.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),T.value&&T.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),T.value&&T.value.setEndValue(qe(t.value.style.chart.zoom.endIndex+1)))):(u.value={start:0,end:Math.max(...f.dataset.map(o=>o.series.length))},le.value+=1)}function qe(o){const n=Math.max(...f.dataset.map(r=>r.series.length));return o>n?n:o<0||t.value.style.chart.zoom.startIndex!==null&&o<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:o}const d=e.computed(()=>{let o;return t.value.orientation==="vertical"?o=l.value.width/(u.value.end-u.value.start):o=l.value.height/(u.value.end-u.value.start),o<=0?0:o}),F=e.computed(()=>c.sumSeries(C.value.filter(o=>!p.value.includes(o.id))).slice(u.value.start,u.value.end)),He=e.computed(()=>c.sumSeries(C.value.filter(o=>!p.value.includes(o.id)).map(o=>({...o,series:o.series.map((n,r)=>o.signedSeries[r]===-1&&n>=0?-n:n)}))).slice(u.value.start,u.value.end)),q=e.computed(()=>{const o=C.value.filter(n=>!p.value.includes(n.id));return{positive:c.sumSeries(o.map(n=>({...n,series:n.series.slice(u.value.start,u.value.end).map(r=>r>=0?r:0)}))),negative:c.sumSeries(o.map(n=>({...n,series:n.series.slice(u.value.start,u.value.end).map(r=>r<0?r:0)})))}}),w=e.computed(()=>{const o=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...q.value.positive),n=Math.min(...q.value.negative),r=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(n)?0:n,a=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(r>0?0:r,o<0?0:o,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(r>0?0:r,o<0?0:o,t.value.style.chart.grid.scale.ticks);return a.ticks.map(s=>({zero:l.value.bottom-l.value.height*(Math.abs(a.min)/(a.max+Math.abs(a.min))),y:l.value.bottom-l.value.height*((s+Math.abs(a.min))/(a.max+Math.abs(a.min))),x:l.value.left-8,horizontal_zero:l.value.left+l.value.width*(Math.abs(a.min)/(a.max+Math.abs(a.min))),horizontal_x:l.value.left+l.value.width*((s+Math.abs(a.min))/(a.max+Math.abs(a.min))),horizontal_y:l.value.bottom-8,value:s}))}),L=e.computed(()=>{const o=[];for(let n=0;n<S.value;n+=1)o.push({text:t.value.style.chart.grid.x.timeLabels.values[n]||String(n),absoluteIndex:n});return o.slice(u.value.start,u.value.end)}),g=e.computed(()=>{if(!$.value)return[];let o=Array(S.value).fill(0),n=Array(S.value).fill(0),r=Array(S.value).fill(0),a=Array(S.value).fill(0);const s=Math.max(...q.value.positive)||0,i=Math.min(...q.value.negative),y=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,z=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:y>0?0:y,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:s<0?0:s,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:y>0?0:y,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:s<0?0:s,t.value.style.chart.grid.scale.ticks),{min:N,max:I}=z,E=I+(N>=0?0:Math.abs(N))||1,v=l.value.height,Y=l.value.width,_e=w.value[0]?w.value[0].zero:l.value.bottom,$e=w.value[0]?w.value[0].horizontal_zero:l.value.left;return C.value.filter(O=>!p.value.includes(O.id)).map(O=>{const B=O.series.slice(u.value.start,u.value.end),Ge=O.signedSeries.slice(u.value.start,u.value.end),Je=B.map((h,m)=>l.value.left+d.value*m+d.value*t.value.style.chart.bars.gapRatio/4),Ze=B.map((h,m)=>l.value.top+d.value*m+d.value*t.value.style.chart.bars.gapRatio/4),Ke=B.map((h,m)=>{const k=t.value.style.chart.bars.distributed?(h||0)/F.value[m]:(h||0)/E;let _,x;return h>0?(x=v*k,_=_e-x-o[m],o[m]+=x):(x=v*k,_=_e+r[m],r[m]+=Math.abs(x)),_}),Qe=B.map((h,m)=>{const k=t.value.style.chart.bars.distributed?(h||0)/F.value[m]:(h||0)/E;let _,x;return h>0?(x=Y*k,_=$e+n[m],n[m]+=x):(x=Y*k,_=$e-Math.abs(x)-a[m],a[m]+=Math.abs(x)),_}),je=B.map((h,m)=>{const k=t.value.style.chart.bars.distributed?(h||0)/F.value[m]:(h||0)/E;return h>0?v*k:v*Math.abs(k)}),et=B.map((h,m)=>{const k=t.value.style.chart.bars.distributed?(h||0)/F.value[m]:(h||0)/E;return h>0?Y*k:Y*Math.abs(k)}),tt=B.map(h=>Math.abs(h)).reduce((h,m)=>h+m,0);return{...O,proportions:B.map((h,m)=>t.value.style.chart.bars.distributed?(h||0)/F.value[m]:(h||0)/tt),series:B,signedSeries:Ge,x:Je,y:Ke,height:je,horizontal_width:et,horizontal_y:Ze,horizontal_x:Qe}})}),pe=e.computed(()=>He.value.map((o,n)=>({value:o,sign:o>=0?1:-1})));function H(o,n,r,a,s){const i=s===-1&&o>=0?-o:o;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:n,seriesIndex:r,datapointIndex:a})}function ve(o,n,r,a){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,o,c.dataLabel({v:isNaN(o)?0:o,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:n,seriesIndex:r,datapointIndex:a})}function ke(o){const n=JSON.parse(JSON.stringify(g.value)).map(r=>({name:r.name,value:r.series[o]===0?0:r.series[o]||null,proportion:r.proportions[o]||null,color:r.color,id:r.id}));G("selectDatapoint",{datapoint:n,period:L.value[o]})}function xe(o){V.value=o,R.value=!0;const n=t.value.style.chart.tooltip.customFormat,r=JSON.parse(JSON.stringify(g.value)).map(s=>({name:s.name,value:s.series[o]===0?0:(s.signedSeries[o]===-1&&s.series[o]>=0?-s.series[o]:s.series[o])||null,proportion:s.proportions[o]||null,color:s.color,id:s.id})),a=r.map(s=>Math.abs(s.value)).reduce((s,i)=>s+i,0);if(c.isFunction(n)&&c.functionReturnsString(()=>n({seriesIndex:o,datapoint:r,series:g.value,config:t.value})))Z.value=n({seriesIndex:o,datapoint:r,series:g.value,config:t.value});else{const{showValue:s,showPercentage:i,borderColor:y,roundingValue:z,roundingPercentage:N}=t.value.style.chart.tooltip;let I="";L.value[o]&&L.value[o].text&&t.value.style.chart.tooltip.showTimeLabel&&(I+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${y};padding-bottom:6px;margin-bottom:3px;">${L.value[o].text}</div>`);const E=[s&&i?"(":"",s&&i?")":""];r.reverse().forEach(v=>{I+=`
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${v.id})`:v.color}"/></svg>
${v.name}${s||i?":":""} ${s?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:v.value,s:t.value.style.chart.bars.dataLabels.suffix,r:z}):""} ${E[0]}${i?c.dataLabel({v:isNaN(v.value/a)?0:Math.abs(v.value)/a*100,s:"%",r:N}):""}${E[1]}
</div>
`}),Z.value=`<div>${I}</div>`}}function Ue(o){D.value=o,te.value+=1}function we(){b.value.showTable=!b.value.showTable}function Be(){b.value.dataLabels.show=!b.value.dataLabels.show}function Ce(){b.value.showTooltip=!b.value.showTooltip}function We(){return g.value}const Se=e.computed(()=>{if(g.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const o=g.value.map(({name:r,color:a})=>({label:r,color:a})),n=[];for(let r=u.value.start;r<u.value.end;r+=1){const a=[t.value.style.chart.grid.x.timeLabels.values[r]||r+1];C.value.forEach(s=>{a.push(Number((s.series[r]||0).toFixed(t.value.table.td.roundingValue)))}),n.push(a)}return{head:o,body:n}});function Le(){const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],n=["",...Se.value.head.map(i=>i.label)],r=Se.value.body,a=o.concat([n]).concat(r),s=c.createCsvContent(a);c.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const U=e.computed(()=>{const o=[""].concat(g.value.map(s=>s.name)).concat(' <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>');let n=[];for(let s=0;s<S.value;s+=1){const i=g.value.map(y=>y.series[s]??0).reduce((y,z)=>y+z,0);n.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[s]??s+1].concat(g.value.map(y=>(y.series[s]??0).toFixed(t.value.table.td.roundingValue))).concat((i??0).toFixed(t.value.table.td.roundingValue)))}const r={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},a=[t.value.table.columnNames.period].concat(g.value.map(s=>s.name)).concat(t.value.table.columnNames.total);return{head:o,body:n.slice(0,u.value.end-u.value.start),config:r,colNames:a}});function Ye(o,n){if(G("selectLegend",g.value.find(r=>r.absoluteIndex===o)),p.value.includes(n.id))p.value=p.value.filter(r=>r!==n.id);else{if(p.value.length===C.value.length-1)return;p.value.push(n.id)}}const ze=e.computed(()=>C.value.map((o,n)=>({...o,shape:"square"})).map(o=>({...o,opacity:p.value.includes(o.id)?.5:1,segregate:()=>Ye(o.absoluteIndex,o),isSegregated:p.value.includes(o.id)}))),Xe=e.computed(()=>({cy:"stackbar-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":""})),W=e.ref(!1);function j(){W.value=!W.value}function Ne(o,n){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[n]===0?0:(a.signedSeries[n]===-1&&a.series[n]>=0?-a.series[n]:a.series[n])||null,proportion:a.proportions[n]||null,color:a.color,id:a.id}));G("selectTimeLabel",{datapoint:r,absoluteIndex:o.absoluteIndex,label:o.text})}function Ee(o,n){return t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?t.value.style.chart.bars.dataLabels.hideEmptyPercentages?n>0:!0:t.value.style.chart.bars.dataLabels.hideEmptyValues?o!==0:!0}return Pe({getData:We,generatePdf:fe,generateCsv:Le,generateImage:he,toggleTable:we,toggleLabels:Be,toggleTooltip:Ce,toggleAnnotator:j}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${e.unref(J)}`,ref_key:"stackbarChart",ref:M,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":e.unref(D)}),style:e.normalizeStyle(`background:${e.unref(t).style.chart.backgroundColor};color:${e.unref(t).style.chart.color};font-family:${e.unref(t).style.fontFamily}; position: relative; ${e.unref(t).responsive?"height: 100%":""}`),onMouseenter:n[6]||(n[6]=()=>e.unref(se)(!0)),onMouseleave:n[7]||(n[7]=()=>e.unref(se)(!1))},[e.unref(t).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ct.PenAndPaper,{key:0,parent:e.unref(M),backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,active:e.unref(W),onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),e.unref(t).style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:re,style:"width:100%;background:transparent;padding-bottom:24px"},[e.createVNode(nt._sfc_main,{config:{title:{cy:"stackbar-title",...e.unref(t).style.chart.title},subtitle:{cy:"stackbar-subtitle",...e.unref(t).style.chart.title.subtitle}}},null,8,["config"])],512)):e.createCommentVNode("",!0),e.unref(t).userOptions.show&&e.unref($)&&(e.unref(ie)||e.unref(K))?(e.openBlock(),e.createBlock(Ve.UserOptions,{ref:"details",key:`user_option_${e.unref(te)}`,backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,isPrinting:e.unref(ce),isImaging:e.unref(de),uid:e.unref(J),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(D),chartElement:e.unref(M),position:e.unref(t).userOptions.position,isTooltip:e.unref(b).showTooltip,titles:{...e.unref(t).userOptions.buttonTitles},hasAnnotator:e.unref(t).userOptions.buttons.annotator,isAnnotation:e.unref(W),onToggleFullscreen:Ue,onGeneratePdf:e.unref(fe),onGenerateCsv:Le,onGenerateImage:e.unref(he),onToggleTable:we,onToggleLabels:Be,onToggleTooltip:Ce,onToggleAnnotator:j,style:e.normalizeStyle({visibility:e.unref(ie)?e.unref(K)?"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:r,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:a})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:a})),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.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(c.XMLNS),viewBox:`0 0 ${e.unref(l).chartWidth<=0?10:e.unref(l).chartWidth} ${e.unref(l).chartHeight<=0?10:e.unref(l).chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${e.unref(t).style.chart.color}`)},[e.createVNode(ut._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:e.unref(l).left,y:e.unref(l).top,width:e.unref(l).width<=0?10:e.unref(l).width,height:e.unref(l).height<=0?10:e.unref(l).height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,gt)):e.createCommentVNode("",!0),e.unref(t).style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(r,a)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${r.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":r.color},null,8,pt),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(c.lightenHexColor)(r.color,e.unref(t).style.chart.bars.gradient.intensity/100)},null,8,vt),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,kt)],8,bt))),256))])):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.x.showHorizontalLines&&e.unref(t).orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(w),(r,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(l).left,x2:e.unref(l).right,y1:r.y,y2:r.y,stroke:e.unref(t).style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,xt))),256)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.x.showHorizontalLines&&e.unref(t).orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(u).end-e.unref(u).start+1,(r,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(l).left,x2:e.unref(l).right,y1:e.unref(l).top+e.unref(d)*a,y2:e.unref(l).top+e.unref(d)*a,stroke:e.unref(t).style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,wt))),256)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.y.showVerticalLines&&e.unref(t).orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(e.unref(u).end-e.unref(u).start+1,(r,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(l).left+e.unref(d)*a,x2:e.unref(l).left+e.unref(d)*a,y1:e.unref(l).top,y2:e.unref(l).bottom,stroke:e.unref(t).style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Bt))),256)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.x.showHorizontalLines&&e.unref(t).orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(e.unref(w),(r,a)=>(e.openBlock(),e.createElementBlock("line",{x1:r.horizontal_x,x2:r.horizontal_x,y1:e.unref(l).top,y2:e.unref(l).bottom,stroke:e.unref(t).style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Ct))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(r,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.unref(t).orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.x,(s,i)=>(e.openBlock(),e.createElementBlock("rect",{x:s,y:r.y[i]<0?0:r.y[i],height:r.height[i]<0?1e-4:r.height[i],rx:e.unref(t).style.chart.bars.borderRadius>r.height[i]/2?(r.height[i]<0?0:r.height[i])/2:e.unref(t).style.chart.bars.borderRadius,width:e.unref(d)*(1-e.unref(t).style.chart.bars.gapRatio/2),fill:e.unref(t).style.chart.bars.gradient.show?`url(#gradient_${r.id})`:r.color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":e.unref(t).useCssAnimation,"vue-data-ui-bar-transition":e.unref(P)})},null,10,St))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.horizontal_x,(s,i)=>(e.openBlock(),e.createElementBlock("rect",{x:s,y:r.horizontal_y[i]<0?0:r.horizontal_y[i],width:r.horizontal_width[i]<0?1e-4:r.horizontal_width[i],rx:e.unref(t).style.chart.bars.borderRadius>r.height[i]/2?(r.height[i]<0?0:r.height[i])/2:e.unref(t).style.chart.bars.borderRadius,height:e.unref(d)*(1-e.unref(t).style.chart.bars.gapRatio/2),fill:e.unref(t).style.chart.bars.gradient.show?`url(#gradient_${r.id})`:r.color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":e.unref(t).useCssAnimation,"vue-data-ui-bar-transition":e.unref(P)})},null,10,Lt))),256))]))),256)),e.unref(t).style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:6,x1:e.unref(l).left,x2:e.unref(l).right,y1:e.unref(l).bottom,y2:e.unref(l).bottom,stroke:e.unref(t).style.chart.grid.x.axisColor,"stroke-width":e.unref(t).style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,zt)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.y.showAxis&&!e.unref(t).style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:7,x1:e.unref(l).left,x2:e.unref(l).left,y1:e.unref(l).top,y2:e.unref(l).bottom,stroke:e.unref(t).style.chart.grid.y.axisColor,"stroke-width":e.unref(t).style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Nt)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.x.axisName.show&&e.unref(t).style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,x:e.unref(l).left+e.unref(l).width/2,y:e.unref(l).chartHeight+e.unref(t).style.chart.grid.x.axisName.offsetY,"font-size":e.unref(t).style.chart.grid.x.axisName.fontSize,fill:e.unref(t).style.chart.grid.x.axisName.color,"font-weight":e.unref(t).style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(t).style.chart.grid.x.axisName.text),9,Et)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.y.axisName.show&&e.unref(t).style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:9,transform:`translate(${e.unref(t).style.chart.grid.y.axisName.fontSize+e.unref(t).style.chart.grid.y.axisName.offsetX}, ${e.unref(l).top+e.unref(l).height/2}) rotate(-90)`,"font-size":e.unref(t).style.chart.grid.y.axisName.fontSize,fill:e.unref(t).style.chart.grid.y.axisName.color,"font-weight":e.unref(t).style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(t).style.chart.grid.y.axisName.text),9,_t)):e.createCommentVNode("",!0),e.unref(b).dataLabels.show&&e.unref(t).orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(r,a)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.x,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[Ee(r.series[i],r.proportions[i])?(e.openBlock(),e.createElementBlock("text",{key:0,x:s+e.unref(d)*(1-e.unref(t).style.chart.bars.gapRatio/2)/2,y:r.y[i]+r.height[i]/2+e.unref(t).style.chart.bars.dataLabels.fontSize/3,"font-size":e.unref(t).style.chart.bars.dataLabels.fontSize,fill:e.unref(t).style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(r.color):e.unref(t).style.chart.bars.dataLabels.color,"font-weight":e.unref(t).style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(t).style.chart.bars.showDistributedPercentage&&e.unref(t).style.chart.bars.distributed?ve(r.proportions[i]*100,r,a,i):H(r.series[i],r,a,i,r.signedSeries[i])),9,$t)):e.createCommentVNode("",!0)],64))),256))]))),256)),e.unref(t).style.chart.bars.totalValues.show&&e.unref(g).length>1?(e.openBlock(),e.createElementBlock("g",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pe),(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!e.unref(t).style.chart.bars.dataLabels.hideEmptyValues||r.value!==0?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(l).left+e.unref(d)*a+e.unref(d)/2,y:e.unref(l).top-e.unref(t).style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":e.unref(t).style.chart.bars.totalValues.fontSize,"font-weight":e.unref(t).style.chart.bars.totalValues.bold?"bold":"normal",fill:e.unref(t).style.chart.bars.totalValues.color},e.toDisplayString(H(r.value,r,a,r.sign)),9,Tt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.unref(b).dataLabels.show&&e.unref(t).orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(r,a)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.horizontal_x,(s,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[Ee(r.series[i],r.proportions[i])?(e.openBlock(),e.createElementBlock("text",{key:0,x:s+(r.horizontal_width[i]<0?1e-4:r.horizontal_width[i])/2,y:r.horizontal_y[i]+e.unref(d)*(1-e.unref(t).style.chart.bars.gapRatio/2)/2+e.unref(t).style.chart.bars.dataLabels.fontSize/3,"font-size":e.unref(t).style.chart.bars.dataLabels.fontSize,fill:e.unref(t).style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(r.color):e.unref(t).style.chart.bars.dataLabels.color,"font-weight":e.unref(t).style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(t).style.chart.bars.showDistributedPercentage&&e.unref(t).style.chart.bars.distributed?ve(r.proportions[i]*100,r,a,i):H(r.series[i],r,a,i,r.signedSeries[i])),9,Vt)):e.createCommentVNode("",!0)],64))),256))]))),256)),e.unref(t).style.chart.bars.totalValues.show&&e.unref(g).length>1?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pe),(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!e.unref(t).style.chart.bars.dataLabels.hideEmptyValues||r.value!==0?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(l).right+e.unref(t).style.chart.bars.totalValues.fontSize/3,y:e.unref(l).top+e.unref(d)*a+e.unref(d)/2,"text-anchor":"start","font-size":e.unref(t).style.chart.bars.totalValues.fontSize,"font-weight":e.unref(t).style.chart.bars.totalValues.bold?"bold":"normal",fill:e.unref(t).style.chart.bars.totalValues.color},e.toDisplayString(H(r.value,r,a,r.sign)),9,Ft)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.y.axisLabels.show&&!e.unref(t).style.chart.bars.distributed&&e.unref(t).orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(r,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(l).left,x2:e.unref(l).left-6,y1:r.y,y2:r.y,stroke:e.unref(t).style.chart.grid.x.axisColor,"stroke-width":1},null,8,It))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(r,a)=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+e.unref(t).style.chart.grid.y.axisLabels.fontSize/3,"font-size":e.unref(t).style.chart.grid.y.axisLabels.fontSize,"font-weight":e.unref(t).style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:e.unref(t).style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(c.dataLabel)({p:e.unref(t).style.chart.bars.dataLabels.prefix,v:r.value,s:e.unref(t).style.chart.bars.dataLabels.suffix,r:e.unref(t).style.chart.grid.y.axisLabels.rounding})),9,Ot))),256))],64)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.y.axisLabels.show&&!e.unref(t).style.chart.bars.distributed&&e.unref(t).orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:13},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(r,a)=>(e.openBlock(),e.createElementBlock("line",{x1:r.horizontal_x,x2:r.horizontal_x,y1:e.unref(l).bottom,y2:e.unref(l).bottom+6,stroke:e.unref(t).style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Rt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(r,a)=>(e.openBlock(),e.createElementBlock("text",{"font-size":e.unref(t).style.chart.grid.x.timeLabels.fontSize,"font-weight":e.unref(t).style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:e.unref(t).style.chart.grid.y.axisLabels.color,"text-anchor":e.unref(t).style.chart.grid.x.timeLabels.rotation>0?"start":e.unref(t).style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${r.horizontal_x}, ${e.unref(l).bottom+e.unref(t).style.chart.grid.x.timeLabels.fontSize*1.3+e.unref(t).style.chart.grid.x.timeLabels.offsetY}), rotate(${e.unref(t).style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(c.dataLabel)({p:e.unref(t).style.chart.bars.dataLabels.prefix,v:r.value,s:e.unref(t).style.chart.bars.dataLabels.suffix,r:e.unref(t).style.chart.grid.y.axisLabels.rounding})),9,Dt))),256))],64)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.x.timeLabels.show&&e.unref(t).orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:14},[o.$slots["time-label"]?(e.openBlock(),e.createElementBlock("g",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L),(r,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.renderSlot(o.$slots,"time-label",e.mergeProps({ref_for:!0},{x:e.unref(l).left+e.unref(d)*a+e.unref(d)/2,y:e.unref(l).bottom+e.unref(t).style.chart.grid.x.timeLabels.fontSize*1.3+e.unref(t).style.chart.grid.x.timeLabels.offsetY,fontSize:e.unref(t).style.chart.grid.x.timeLabels.fontSize,fill:e.unref(t).style.chart.grid.x.timeLabels.color,transform:`translate(${e.unref(l).left+e.unref(d)*a+e.unref(d)/2}, ${e.unref(l).bottom+e.unref(t).style.chart.grid.x.timeLabels.fontSize*1.3+e.unref(t).style.chart.grid.x.timeLabels.offsetY}), rotate(${e.unref(t).style.chart.grid.x.timeLabels.rotation})`,absoluteIndex:r.absoluteIndex,content:r.text,textAnchor:e.unref(t).style.chart.grid.x.timeLabels.rotation>0?"start":e.unref(t).style.chart.grid.x.timeLabels.rotation<0?"end":"middle",show:!0}),void 0,!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",qt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L),(r,a)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":e.unref(t).style.chart.grid.x.timeLabels.rotation>0?"start":e.unref(t).style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":e.unref(t).style.chart.grid.x.timeLabels.fontSize,"font-weight":e.unref(t).style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:e.unref(t).style.chart.grid.x.timeLabels.color,transform:`translate(${e.unref(l).left+e.unref(d)*a+e.unref(d)/2}, ${e.unref(l).bottom+e.unref(t).style.chart.grid.x.timeLabels.fontSize*1.3+e.unref(t).style.chart.grid.x.timeLabels.offsetY}), rotate(${e.unref(t).style.chart.grid.x.timeLabels.rotation})`,style:{cursor:"pointer"},onClick:()=>Ne(r,a)},e.toDisplayString(r.text),9,Ht))),256))]))],64)):e.createCommentVNode("",!0),e.unref(t).style.chart.grid.x.timeLabels.show&&e.unref(t).orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:15},[o.$slots["time-label"]?(e.openBlock(),e.createElementBlock("g",Ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L),(r,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.renderSlot(o.$slots,"time-label",e.mergeProps({ref_for:!0},{x:e.unref(l).left-8,y:e.unref(l).top+e.unref(d)*a+e.unref(d)/2+e.unref(t).style.chart.grid.y.axisLabels.fontSize/3,fontSize:e.unref(t).style.chart.grid.x.timeLabels.fontSize,fill:e.unref(t).style.chart.grid.x.timeLabels.color,transform:null,absoluteIndex:r.absoluteIndex,content:r.text,textAnchor:"end",show:!0}),void 0,!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L),(r,a)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":e.unref(t).style.chart.grid.y.axisLabels.fontSize,"font-weight":e.unref(t).style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:e.unref(t).style.chart.grid.y.axisLabels.color,x:e.unref(l).left-8,y:e.unref(l).top+e.unref(d)*a+e.unref(d)/2+e.unref(t).style.chart.grid.y.axisLabels.fontSize/3,style:{cursor:"pointer"},onClick:()=>Ne(r,a)},e.toDisplayString(r.text),9,Yt))),256))]))],64)):e.createCommentVNode("",!0),e.unref(b).showTooltip&&e.unref(t).orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(e.unref(u).end-e.unref(u).start,(r,a)=>(e.openBlock(),e.createElementBlock("rect",{x:e.unref(l).left+a*e.unref(d),y:e.unref(l).top,width:e.unref(d),height:e.unref(l).height<0?0:e.unref(l).height,onClick:s=>ke(a),onMouseenter:s=>xe(a),onMouseleave:n[0]||(n[0]=s=>{V.value=null,R.value=!1}),fill:a===e.unref(V)?e.unref(t).style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:e.unref(t).style.chart.highlighter.opacity/100})},null,44,Xt))),256)):e.createCommentVNode("",!0),e.unref(b).showTooltip&&e.unref(t).orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:17},e.renderList(e.unref(u).end-e.unref(u).start,(r,a)=>(e.openBlock(),e.createElementBlock("rect",{x:e.unref(l).left,y:e.unref(l).top+a*e.unref(d),width:e.unref(l).width<0?0:e.unref(l).width,height:e.unref(d),onClick:s=>ke(a),onMouseenter:s=>xe(a),onMouseleave:n[1]||(n[1]=s=>{V.value=null,R.value=!1}),fill:a===e.unref(V)?e.unref(t).style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:e.unref(t).style.chart.highlighter.opacity/100})},null,44,Gt))),256)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...e.unref(l)})),void 0,!0)],12,mt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Jt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ce)||e.unref(de)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref($)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(it.default,{key:5,config:{type:"bar",style:{backgroundColor:e.unref(t).style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:ne,style:e.normalizeStyle(`width:100%;background:${e.unref(t).style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[e.unref(t).style.chart.zoom.show&&e.unref(S)>1?(e.openBlock(),e.createBlock(rt.Slicer,{ref_key:"slicerComponent",ref:T,key:`slicer_${e.unref(le)}`,background:e.unref(t).style.chart.zoom.color,borderColor:e.unref(t).style.chart.backgroundColor,fontSize:e.unref(t).style.chart.zoom.fontSize,useResetSlot:e.unref(t).style.chart.zoom.useResetSlot,labelLeft:e.unref(t).style.chart.grid.x.timeLabels.values[e.unref(u).start]?e.unref(t).style.chart.grid.x.timeLabels.values[e.unref(u).start]:"",labelRight:e.unref(t).style.chart.grid.x.timeLabels.values[e.unref(u).end-1]?e.unref(t).style.chart.grid.x.timeLabels.values[e.unref(u).end-1]:"",textColor:e.unref(t).style.chart.color,inputColor:e.unref(t).style.chart.zoom.color,selectColor:e.unref(t).style.chart.zoom.highlightColor,max:Math.max(...X.dataset.map(r=>r.series.length)),min:0,valueStart:e.unref(u).start,valueEnd:e.unref(u).end,start:e.unref(u).start,"onUpdate:start":n[2]||(n[2]=r=>e.unref(u).start=r),end:e.unref(u).end,"onUpdate:end":n[3]||(n[3]=r=>e.unref(u).end=r),refreshStartPoint:e.unref(t).style.chart.zoom.startIndex!==null?e.unref(t).style.chart.zoom.startIndex:0,refreshEndPoint:e.unref(t).style.chart.zoom.endIndex!==null?e.unref(t).style.chart.zoom.endIndex+1:Math.max(...X.dataset.map(r=>r.series.length)),onReset:ye},{"reset-action":e.withCtx(({reset:r})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"])):e.createCommentVNode("",!0)],4),e.createVNode(ot._sfc_main,{show:e.unref(b).showTooltip&&e.unref(R),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(M),content:e.unref(Z),isFullscreen:e.unref(D),isCustom:e.unref(c.isFunction)(e.unref(t).style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...e.unref(ee)})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...e.unref(ee)})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:oe},[e.unref(t).style.chart.legend.show&&e.unref($)?(e.openBlock(),e.createBlock(at.Legend,{key:0,legendSet:e.unref(ze),config:e.unref(Xe),onClickMarker:n[4]||(n[4]=({legend:r})=>r.segregate())},{item:e.withCtx(({legend:r})=>[e.createElementVNode("div",{onClick:a=>r.segregate(),style:e.normalizeStyle(`opacity:${e.unref(p).includes(r.id)?.5:1}`)},e.toDisplayString(r.name),13,Zt)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:e.unref(ze)},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:ae,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.unref(u).end-e.unref(u).start<200?(e.openBlock(),e.createBlock(lt.default,{key:7,hideDetails:"",config:{open:e.unref(b).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.createVNode(st.DataTable,{colNames:e.unref(U).colNames,head:e.unref(U).head,body:e.unref(U).body,config:e.unref(U).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:n[5]||(n[5]=r=>e.unref(b).showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r},null,8,Kt)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(r))?r:e.unref(c.dataLabel)({p:e.unref(t).style.chart.bars.dataLabels.prefix,v:r,s:e.unref(t).style.chart.bars.dataLabels.suffix,r:e.unref(t).table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ht))}},jt=ft._export_sfc(Qt,[["__scopeId","data-v-16d24da7"]]);exports.default=jt;
;