vue-data-ui-hq
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
15 lines • 54.7 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-ZfICPrrM.cjs"),ze=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./BaseIcon-DO69J5Rk.cjs"),Ge=require("./Tooltip-C7TJODUx.cjs"),Ne=require("./usePrinter-B-gh2f22.cjs"),Xe=require("./Slicer-CtTQxL9r.cjs"),Ye=require("./vue-ui-skeleton-Bvmpr51u.cjs"),Ve=require("./useNestedProp-C14rfl0j.cjs"),Ze=require("./PackageVersion-D3dK8oA3.cjs"),Je=require("./PenAndPaper-PL3bp4ud.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:d,barLineSwitch:B=6}){let h=null,_=null,L=0;if((typeof d=="number"||typeof d=="string")&&console.warn(`The provided dataset (${d}) is not sufficient to build a chart`),ee(d)&&(P(d)&&(d.length<B?h=S.BAR:h=S.LINE,_=d,L=d.length),fe(d))){if(!nt(d))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(d[0]),G=Object.values(d[0]);if(!U.some(E=>rt(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;$e(G,E=>typeof E=="number")&&(h=S.DONUT,_=d),$e(G,E=>Array.isArray(E)&&P(E))&&(Fe(d)>B?h=S.LINE:h=S.BAR,L=Fe(d),_=d.map(E=>({...E,data:ot(E,F=>P(F))}))),d=d.map(E=>Pe(E)),_=_.map(E=>Pe(E))}return ee(d)&&[...new Set(d.flatMap(U=>Array.isArray(U)))][0],{dataset:d,type:h,usableDataset:_,maxSeriesLength:L}}function Ie(d){return!d||ee(d)&&!d.length}function ee(d){return Array.isArray(d)}function P(d){if(!ee(d)||Ie(d))return!1;const B=d.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function fe(d){return!ee(d)||Ie(d)||!![...new Set(d.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!d.map(h=>Object.keys(h).length>0).includes(!1)}function tt(d,B){const h=Object.keys(d).sort(),_=Object.keys(B).sort();if(h.length!==_.length)return!1;for(let L=0;L<h.length;L+=1){const V=h[L],M=_[L];if(V!==M||typeof d[V]!=typeof B[M])return!1}return!0}function nt(d){if(d.length<=1)return!0;for(let B=0;B<d.length;B+=1)for(let h=B+1;h<d.length;h+=1)if(!tt(d[B],d[h]))return!1;return!0}function rt(d){return Ke.includes(d.toUpperCase())}function $e(d,B){let h=[];for(let _=0;_<d.length;_+=1)h.push(B(d[_]));return h.includes(!0)}function Fe(d){return Math.max(...[...d].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function ot(d,B){return Object.values(d).filter(h=>B(h))[0]}function Pe(d){const B={};for(let h in d)d.hasOwnProperty(h)&&(B[h.toUpperCase()]=d[h]);return B}const lt=["id"],at=["xmlns","viewBox"],it=["x","y","width","height"],ut=["x","y","width","height"],st=["width","height"],ct=["id"],ft=["id"],dt=["id"],mt=["flood-color"],ht={key:0,class:"donut-label-connectors"},pt=["d","stroke","stroke-width","filter"],kt=["cx","cy","r","fill","filter"],gt={class:"donut"},vt=["d","fill","stroke","stroke-width","filter"],yt=["d","onMouseenter","onClick"],xt={key:1,class:"donut-labels quick-animation"},St=["cx","cy","fill","stroke","filter"],bt=["text-anchor","x","y","fill","font-size","filter"],Bt=["text-anchor","x","y","fill","font-size","filter"],wt={key:2,class:"donut-hollow quick-animation"},Et=["x","y","font-size","fill"],At=["x","y","font-size","fill"],Lt={key:0,class:"line-grid"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],_t=["x1","x2","y1","y2","stroke","stroke-width"],zt={key:1,class:"line-axis"},Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt=["x1","x2","y1","y2","stroke","stroke-width"],$t={key:2,class:"yLabels"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],Pt=["x","y","font-size","fill"],It={key:3,class:"periodLabels"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["font-size","text-anchor","fill","transform"],Rt={class:"plots"},Dt={class:"line-plot-series"},Mt=["d","stroke","stroke-width"],Ut=["d","stroke","stroke-width"],qt=["d","stroke","stroke-width"],Wt=["d","stroke","stroke-width"],jt=["cx","cy","fill","stroke"],Ht={key:4,class:"dataLabels"},Gt=["font-size","fill","x","y"],Xt={class:"tooltip-traps"},Yt=["x","y","height","width","fill","onMouseenter","onClick"],Zt={key:0,class:"line-grid"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt={key:1,class:"line-axis"},en=["x1","x2","y1","y2","stroke","stroke-width"],tn=["x1","x2","y1","y2","stroke","stroke-width"],nn={key:2,class:"yLabels"},rn=["x1","x2","y1","y2","stroke","stroke-width"],on=["x","y","font-size","fill"],ln={key:3,class:"periodLabels"},an=["x1","x2","y1","y2","stroke","stroke-width"],un=["font-size","text-anchor","transform","fill"],sn={class:"plots"},cn=["x","width","height","y","fill","stroke","stroke-width"],fn=["to"],dn=["from","to"],mn={key:4,class:"dataLabels"},hn=["x","y","font-size","fill"],pn={class:"tooltip-traps"},kn=["x","y","height","width","fill","onMouseenter","onClick"],gn={key:6,class:"axis-labels"},vn={key:0},yn=["font-size","fill","x","y"],xn={key:1},Sn=["font-size","fill","x","y"],bn={key:2},Bn=["font-size","fill","transform"],wn={key:3},En=["font-size","fill","transform"],An={key:6,class:"vue-data-ui-watermark"},Ln=["onClick"],Cn=["onClick"],_n=["onClick"],zn={key:1,class:"vue-ui-quick-chart-not-processable"},Nn={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(d,{expose:B,emit:h}){const{vue_ui_quick_chart:_}=i.useConfig(),L=d,V=e.ref(null),M=e.ref(null),U=e.ref(null),G=e.ref(null),E=e.ref(i.createUid()),F=e.ref(!1),X=e.ref(null),T=e.ref(""),$=e.ref(null),he=e.ref(null),pe=e.ref(null),x=e.ref([]),ke=e.ref(0),te=e.ref(0),t=e.computed({get:()=>ye(),set:r=>r}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),ge=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),ne=e.ref(!t.value.showUserOptionsOnChartHover);function ve(r=!1){Te.value&&(ne.value=r)}function ye(){const r=Ve.useNestedProp({userConfig:L.config,defaultConfig:_});let s={};return r.theme?s={...Ve.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[r.theme]||L.config,defaultConfig:r}),customPalette:i.themePalettes[r.theme]||i.palette}:s=r,L.config&&i.hasDeepProperty(L.config,"zoomStartIndex")?s.zoomStartIndex=L.config.zoomStartIndex:s.zoomStartIndex=null,L.config&&i.hasDeepProperty(L.config,"zoomEndIndex")?s.zoomEndIndex=L.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>L.config,r=>{t.value=ye(),g.value.width=t.value.width,g.value.height=t.value.height,ne.value=!t.value.showUserOptionsOnChartHover,be()},{deep:!0}),e.watch(()=>L.dataset,r=>{p.value=Z.value,v.value.start=0,v.value.end=p.value.maxSeriesLength,te.value+=1},{deep:!0});const Y=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),q=h,Z=e.computed(()=>{const r=et({dataset:i.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return r||console.error("VueUiQuickChart : Dataset is not processable"),r}),p=e.ref(Z.value),Oe=e.computed(()=>!!p.value),b=e.computed(()=>p.value?p.value.type:null);e.watch(()=>b.value,r=>{r||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:re,isImaging:oe,generatePdf:xe,generateImage:Se}=Ne.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),g=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{be()});function be(){if(t.value.responsive){const r=ze.throttle(()=>{const{width:s,height:n}=ze.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?G.value:null,source:he.value,noTitle:pe.value});g.value.width=s,g.value.height=n});ae.value=new ResizeObserver(r),ae.value.observe(V.value.parentNode)}Ce()}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const De=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.BAR:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.DONUT:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;default:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`}});function Be(r){return[...r].map(s=>s.value).reduce((s,n)=>s+n,0)}function J(r){return t.value.blurOnHover&&![null,void 0].includes($.value)&&$.value!==r?`url(#blur_${E.value})`:""}function we(r,s){x.value.includes(r)?x.value=x.value.filter(n=>n!==r):x.value.length<s&&x.value.push(r)}const Ee=e.ref(null),Ae=e.ref(null),ie=e.ref(!1);function Me(r,s){ie.value=!0;let n=r.value;const a=Z.value.dataset.find((u,m)=>r.id===`donut_${m}`).VALUE;if(x.value.includes(r.id)){let u=function(){n>a?(ie.value=!1,cancelAnimationFrame(Ae.value),p.value={...p.value,dataset:p.value.dataset.map((m,C)=>r.id===`donut_${C}`?{...m,value:a,VALUE:a}:m)}):(n+=a*.025,p.value={...p.value,dataset:p.value.dataset.map((m,C)=>r.id===`donut_${C}`?{...m,value:n,VALUE:n}:m)},Ae.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==r.id),u()}else if(s.length>1){let u=function(){n<a/100?(ie.value=!1,cancelAnimationFrame(Ee.value),x.value.push(r.id),p.value={...p.value,dataset:p.value.dataset.map((m,C)=>r.id===`donut_${C}`?{...m,value:0,VALUE:0}:m)}):(n/=1.1,p.value={...p.value,dataset:p.value.dataset.map((m,C)=>r.id===`donut_${C}`?{...m,value:n,VALUE:n}:m)},Ee.value=requestAnimationFrame(u))};u()}}const I=e.ref(null);function Ue(r){I.value=r}const Le=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const r=p.value.dataset.map((o,l)=>({...o,value:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${l}`,id:`donut_${l}`})).map((o,l)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[l+t.value.paletteStartIndex]||i.palette[l+t.value.paletteStartIndex]||i.palette[(l+t.value.paletteStartIndex)%i.palette.length],immutableValue:o.value}));function s(o,l){return i.dataLabel({v:isNaN(o.value/Be(l))?0:o.value/Be(l)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function n(o){return o.proportion*100>t.value.donutHideLabelUnderPercentage}function a(o,l){const y=Z.value.dataset.find((A,z)=>`donut_${z}`===o).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(l.toFixed(0))).length)}function u({datapoint:o,seriesIndex:l}){X.value={datapoint:o,seriesIndex:l,config:t.value,dataset:r},$.value=o.id;const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:o,seriesIndex:l,series:r,config:t.value})))T.value=y({datapoint:o,seriesIndex:l,series:r,config:t.value});else{let k="";k+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,k+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,k+=`<b>${i.applyDataLabel(t.value.formatter,o.value,i.dataLabel({p:t.value.valuePrefix,v:o.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:o,seriesIndex:l})}</b>`,k+=`<span>(${i.dataLabel({v:o.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${k}</div>`}F.value=!0}function m(){F.value=!1,$.value=null,I.value=null}const C={centerX:g.value.width/2,centerY:g.value.height/2},N=r.filter(o=>!x.value.includes(o.id)).map(o=>o.value||0).reduce((o,l)=>o+l,0),j=r.map((o,l)=>({...o,proportion:(o.value||0)/N,value:o.value||0,absoluteValue:Z.value.dataset.find((y,k)=>`donut_${k}`===o.id).VALUE})),O=g.value.width/2,H=g.value.height/2,R=g.value.height*t.value.donutRadiusRatio;return{dataset:j.filter(o=>!x.value.includes(o.id)),legend:j,drawingArea:C,displayArcPercentage:s,isArcBigEnough:n,useTooltip:u,killTooltip:m,getSpaces:a,total:N,cx:O,cy:H,radius:R,chart:i.makeDonut({series:r.filter(o=>!x.value.includes(o.id))},O,H,R,R,1.99999,2,1,360,105.25,g.value.height*Le.value)}}),v=e.ref({start:0,end:p.value.maxSeriesLength});function qe(){Ce()}const W=e.ref(null);async function Ce(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&W.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),W.value&&W.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),W.value&&W.value.setEndValue(We(t.value.zoomEndIndex+1)))):(v.value={start:0,end:p.value.maxSeriesLength},te.value+=1)}function We(r){const s=p.value.maxSeriesLength;return r>s?s:r<0||t.value.zoomStartIndex!==null&&r<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:r}const je=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let r=[];P(p.value.dataset)&&(r=p.value.dataset),fe(p.value.dataset)&&(r=p.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=P(r)?r.length:Math.max(...r.map(u=>u.values.length));let n=[];if(P(r))n=r;else for(let u=0;u<s;u+=1)n.push(r.map(m=>m.values[u]||0).reduce((m,C)=>(m||0)+(C||0),0));const a=Math.min(...n);return n.map(u=>u+(a<0?Math.abs(a):0))}),f=e.computed(()=>{if(b.value!==S.LINE)return null;const r={height:g.value.height,width:g.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:r.width-t.value.xyPaddingRight,bottom:r.height-t.value.xyPaddingBottom,width:r.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:r.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let n=[];P(p.value.dataset)&&(n=[{values:p.value.dataset.slice(v.value.start,v.value.end),absoluteIndices:p.value.dataset.map((o,l)=>l).slice(v.value.start,v.value.end),name:t.value.title,color:Y.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),fe(p.value.dataset)&&(n=p.value.dataset.map((o,l)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${l}`,id:`line_${l}`})).map((o,l)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[l+t.value.paletteStartIndex]||i.palette[l+t.value.paletteStartIndex]||i.palette[(l+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(v.value.start,v.value.end),absoluteIndices:o.values.map((y,k)=>k).slice(v.value.start,v.value.end)})));const a={max:Math.max(...n.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...n.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...n.map(o=>o.values.length))},u=i.calculateNiceScale(a.min<0?a.min:0,a.max<0?0:a.max,t.value.xyScaleSegments),m=a.min<0?Math.abs(a.min):0,C=a.max<0?s.top:s.bottom-m/(u.max+m)*s.height,N=s.width/a.maxSeries,j=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),O=n.map((o,l)=>({...o,coordinates:o.values.map((y,k)=>({x:s.left+N*(k+1)-N/2,y:s.bottom-(y+m)/(u.max+m)*s.height,value:y}))})).map(o=>{let l=[];return o.coordinates.forEach(y=>{l.push(`${y.x},${y.y} `)}),{...o,linePath:l.join(" ")}});function H(o){$.value=o,I.value=o;const l=n.map(k=>({...k,value:k.values[o],absoluteIndex:k.absoluteIndices[o]})).filter(k=>!x.value.includes(k.id));X.value={datapoint:l,seriesIndex:o,config:t.value,dataset:n};const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:l,seriesIndex:o,series:n,config:t.value})))T.value=y({datapoint:l,seriesIndex:o,series:n,config:t.value});else{let k="";t.value.xyPeriods[l[0].absoluteIndex]&&(k+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[l[0].absoluteIndex]}</div>`),l.forEach((A,z)=>{k+=`
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${A.color}"/></svg>
<span>${A.name}:</span>
<b>${i.applyDataLabel(t.value.formatter,A.value,i.dataLabel({p:t.value.valuePrefix,v:A.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:A,seriesIndex:z})}
</b>
</div>
`}),T.value=k}F.value=!0}function R(){$.value=null,F.value=!1}return{absoluteZero:C,dataset:O.filter(o=>!x.value.includes(o.id)),legend:O,drawingArea:s,extremes:a,slotSize:N,yLabels:j,useTooltip:H,killTooltip:R}}),c=e.computed(()=>{if(b.value!==S.BAR)return null;const r={height:g.value.height,width:g.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:r.width-t.value.xyPaddingRight,bottom:r.height-t.value.xyPaddingBottom,width:r.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:r.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let n=[];P(p.value.dataset)&&(n=[{values:p.value.dataset.slice(v.value.start,v.value.end),absoluteIndices:p.value.dataset.map((l,y)=>y).slice(v.value.start,v.value.end),name:t.value.title,color:Y.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"bar_0"}]),fe(p.value.dataset)&&(n=p.value.dataset.map((l,y)=>({...l,values:l.VALUE||l.DATA||l.SERIE||l.SERIES||l.VALUES||l.NUM||0,name:l.NAME||l.DESCRIPTION||l.TITLE||l.LABEL||`Serie ${y}`,id:`bar_${y}`})).map((l,y)=>({...l,color:l.COLOR?i.convertColorToHex(l.COLOR):Y.value[y+t.value.paletteStartIndex]||i.palette[y+t.value.paletteStartIndex]||i.palette[(y+t.value.paletteStartIndex)%i.palette.length],values:l.values.slice(v.value.start,v.value.end),absoluteIndices:l.values.map((k,A)=>A).slice(v.value.start,v.value.end)})));const a={max:Math.max(...n.filter(l=>!x.value.includes(l.id)).flatMap(l=>l.values))<0?0:Math.max(...n.filter(l=>!x.value.includes(l.id)).flatMap(l=>l.values)),min:Math.min(...n.filter(l=>!x.value.includes(l.id)).flatMap(l=>l.values)),maxSeries:Math.max(...n.filter(l=>!x.value.includes(l.id)).map(l=>l.values.length))},u=i.calculateNiceScale(a.min<0?a.min:0,a.max,t.value.xyScaleSegments),m=u.min<0?Math.abs(u.min):0,C=s.bottom-m/(u.max+m)*s.height,N=s.width/a.maxSeries,j=u.ticks.map(l=>({y:s.bottom-s.height*((l+m)/(u.max+m)),x:s.left-8,value:l})),O=n.map((l,y)=>({...l,coordinates:l.values.map((k,A)=>{const z=(k+m)/(a.max+m)*s.height,Q=Math.abs(k)/Math.abs(a.min)*(s.height-C),me=m/(a.max+m)*s.height,K=N/n.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/n.filter(D=>!x.value.includes(D.id)).length;return{x:s.left+N*A+K*y+t.value.barGap/2,y:k>0?s.bottom-z:C,height:k>0?z-me:Q,value:k,width:K}})})),H=n.filter(l=>!x.value.includes(l.id)).map((l,y)=>({...l,coordinates:l.values.map((k,A)=>{const z=(k+m)/(a.max+m)*s.height,Q=Math.abs(k)/(a.max+m)*s.height,me=m/(a.max+m)*s.height,K=N/n.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/n.filter(D=>!x.value.includes(D.id)).length;return{x:s.left+N*A+K*y+t.value.barGap/2,y:k>0?s.bottom-z:C,height:k>0?z-me:Q,value:k,width:K}})}));function R(l){$.value=l,I.value=l;const y=n.map(A=>({...A,value:A.values[l],absoluteIndex:A.absoluteIndices[l]})).filter(A=>!x.value.includes(A.id));X.value={datapoint:y,seriesIndex:l,config:t.value,dataset:n};const k=t.value.tooltipCustomFormat;if(i.isFunction(k)&&i.functionReturnsString(()=>k({datapoint:y,seriesIndex:l,series:n,config:t.value})))T.value=k({point:y,seriesIndex:l,series:n,config:t.value});else{let A="";t.value.xyPeriods[y[0].absoluteIndex]&&(A+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[y[0].absoluteIndex]}</div>`),y.forEach((z,Q)=>{A+=`
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
<svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${z.color}"/></svg>
<span>${z.name}:</span>
<b>${i.applyDataLabel(t.value.formatter,z.value,i.dataLabel({p:t.value.valuePrefix,v:z.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:z,seriesIndex:Q})}
</b>
</div>
`}),T.value=A}F.value=!0}function o(){F.value=!1,$.value=null,I.value=null}return{absoluteZero:C,dataset:H.filter(l=>!x.value.includes(l.id)),legend:O,drawingArea:s,extremes:a,slotSize:N,yLabels:j,useTooltip:R,killTooltip:o}}),ue=e.ref(!1);function He(r){ue.value=r,ke.value+=1}function _e(){le.value.showTooltip=!le.value.showTooltip}const se=e.ref(!1);function de(){se.value=!se.value}return B({generatePdf:xe,generateImage:Se,toggleTooltip:_e,toggleAnnotator:de}),(r,s)=>e.unref(Oe)?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${e.unref(b)}_${e.unref(E)}`,ref_key:"quickChart",ref:V,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":e.unref(ue)}),style:e.normalizeStyle(`background:${e.unref(t).backgroundColor};color:${e.unref(t).color};font-family:${e.unref(t).fontFamily}; position: relative; ${e.unref(t).responsive?"height: 100%":""}`),onMouseenter:s[5]||(s[5]=()=>ve(!0)),onMouseleave:s[6]||(s[6]=()=>ve(!1))},[e.unref(t).userOptionsButtons.annotator?(e.openBlock(),e.createBlock(Je.PenAndPaper,{key:0,parent:e.unref(V),backgroundColor:e.unref(t).backgroundColor,color:e.unref(t).color,active:e.unref(se),onClose:de},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.unref(Re)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:pe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),e.unref(t).showUserOptions&&(e.unref(ge)||e.unref(ne))?(e.openBlock(),e.createBlock(Ne.UserOptions,{ref:"details",key:`user_option_${e.unref(ke)}`,backgroundColor:e.unref(t).backgroundColor,color:e.unref(t).color,isPrinting:e.unref(re),isImaging:e.unref(oe),uid:e.unref(E),hasTooltip:e.unref(t).userOptionsButtons.tooltip&&e.unref(t).showTooltip,hasPdf:e.unref(t).userOptionsButtons.pdf,hasImg:e.unref(t).userOptionsButtons.img,hasFullscreen:e.unref(t).userOptionsButtons.fullscreen,hasXls:!1,isTooltip:e.unref(le).showTooltip,isFullscreen:e.unref(ue),titles:{...e.unref(t).userOptionsButtonTitles},chartElement:e.unref(V),position:e.unref(t).userOptionsPosition,hasAnnotator:e.unref(t).userOptionsButtons.annotator,isAnnotation:e.unref(se),onToggleFullscreen:He,onGeneratePdf:e.unref(xe),onGenerateImage:e.unref(Se),onToggleTooltip:_e,onToggleAnnotator:de,style:e.normalizeStyle({visibility:e.unref(ge)?e.unref(ne)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:a})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:a})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(t).title?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"quickChartTitle",ref:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;color:${e.unref(t).color};font-size:${e.unref(t).titleFontSize}px;font-weight:${e.unref(t).titleBold?"bold":"normal"};text-align:${e.unref(t).titleTextAlign}`)},e.toDisplayString(e.unref(t).title),5)):e.createCommentVNode("",!0),e.unref(b)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(i.XMLNS),viewBox:e.unref(De),style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${e.unref(t).color}`)},[e.createVNode(Ze._sfc_main),r.$slots["chart-background"]&&e.unref(b)===S.BAR?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:e.unref(c).drawingArea.left,y:e.unref(c).drawingArea.top,width:e.unref(c).drawingArea.width,height:e.unref(c).drawingArea.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,it)):e.createCommentVNode("",!0),r.$slots["chart-background"]&&e.unref(b)===S.LINE?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:e.unref(f).drawingArea.left,y:e.unref(f).drawingArea.top,width:e.unref(f).drawingArea.width,height:e.unref(f).drawingArea.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ut)):e.createCommentVNode("",!0),r.$slots["chart-background"]&&e.unref(b)===S.DONUT?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:0,y:0,width:e.unref(g).width,height:e.unref(g).height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,st)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${e.unref(E)}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${e.unref(E)}`},null,8,ft),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,ct),e.createElementVNode("filter",{id:`shadow_${e.unref(E)}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":e.unref(t).donutShadowColor},null,8,mt)],8,dt)]),e.unref(b)===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.unref(t).showDataLabels?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w).chart,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(w).isArcBigEnough(n)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(i.calcNutArrowPath)(n,{x:e.unref(g).width/2,y:e.unref(g).height/2},16,16,!1,!1,e.unref(g).height*e.unref(Le)),stroke:n.color,"stroke-width":e.unref(t).donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:J(n.id)},null,8,pt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:e.unref(w).cx,cy:e.unref(w).cy,r:e.unref(w).radius,fill:e.unref(t).backgroundColor,filter:e.unref(t).donutUseShadow?`url(#shadow_${e.unref(E)})`:""},null,8,kt),e.createElementVNode("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w).chart,(n,a)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:n.color,stroke:e.unref(t).backgroundColor,"stroke-width":e.unref(t).donutStrokeWidth,filter:J(n.id)},null,8,vt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w).chart,(n,a)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:"transparent",onMouseenter:u=>e.unref(w).useTooltip({datapoint:n,seriesIndex:a}),onMouseout:s[0]||(s[0]=u=>e.unref(w).killTooltip()),onClick:u=>q("selectDatapoint",n)},null,40,yt))),256))]),e.unref(t).showDataLabels?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w).chart,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(w).isArcBigEnough(n)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(i.calcMarkerOffsetX)(n).x,cy:e.unref(i.calcMarkerOffsetY)(n)-3.7,fill:n.color,stroke:e.unref(t).backgroundColor,"stroke-width":1,r:3,filter:J(n.id)},null,8,St)):e.createCommentVNode("",!0),e.unref(w).isArcBigEnough(n)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(i.calcMarkerOffsetX)(n,!0,20).anchor,x:e.unref(i.calcMarkerOffsetX)(n,!0).x,y:e.unref(i.calcMarkerOffsetY)(n),fill:e.unref(t).color,"font-size":e.unref(t).dataLabelFontSize,filter:J(n.id)},e.toDisplayString(e.unref(w).displayArcPercentage(n,e.unref(w).chart))+" ("+e.toDisplayString(e.unref(i.applyDataLabel)(e.unref(t).formatter,n.value,e.unref(i.dataLabel)({p:e.unref(t).valuePrefix,v:n.value,s:e.unref(t).valueSuffix,r:e.unref(t).dataLabelRoundingValue}),{datapoint:n,seriesIndex:a}))+") ",9,bt)):e.createCommentVNode("",!0),e.unref(w).isArcBigEnough(n,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(i.calcMarkerOffsetX)(n).anchor,x:e.unref(i.calcMarkerOffsetX)(n,!0).x,y:e.unref(i.calcMarkerOffsetY)(n)+e.unref(t).dataLabelFontSize,fill:e.unref(t).color,"font-size":e.unref(t).dataLabelFontSize,filter:J(n.id)},e.toDisplayString(n.name),9,Bt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.unref(t).donutShowTotal?(e.openBlock(),e.createElementBlock("g",wt,[e.createElementVNode("text",{"text-anchor":"middle",x:e.unref(w).drawingArea.centerX,y:e.unref(w).drawingArea.centerY-e.unref(t).donutTotalLabelFontSize/2,"font-size":e.unref(t).donutTotalLabelFontSize,fill:e.unref(t).color},e.toDisplayString(e.unref(t).donutTotalLabelText),9,Et),e.createElementVNode("text",{"text-anchor":"middle",x:e.unref(w).drawingArea.centerX,y:e.unref(w).drawingArea.centerY+e.unref(t).donutTotalLabelFontSize,"font-size":e.unref(t).donutTotalLabelFontSize,fill:e.unref(t).color},e.toDisplayString(e.unref(i.dataLabel)({p:e.unref(t).valuePrefix,v:e.unref(w).total,s:e.unref(t).valueSuffix,r:e.unref(t).dataLabelRoundingValue})),9,At)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.unref(b)===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.unref(t).xyShowGrid?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).yLabels,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.y<=e.unref(f).drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(f).drawingArea.left,x2:e.unref(f).drawingArea.right,y1:n.y,y2:n.y,stroke:e.unref(t).xyGridStroke,"stroke-width":e.unref(t).xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Ct)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).extremes.maxSeries+1,(n,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(f).drawingArea.left+e.unref(f).slotSize*a,x2:e.unref(f).drawingArea.left+e.unref(f).slotSize*a,y1:e.unref(f).drawingArea.top,y2:e.unref(f).drawingArea.bottom,stroke:e.unref(t).xyGridStroke,"stroke-width":e.unref(t).xyGridStrokeWidth,"stroke-linecap":"round"},null,8,_t))),256))])):e.createCommentVNode("",!0),e.unref(t).xyShowAxis?(e.openBlock(),e.createElementBlock("g",zt,[e.createElementVNode("line",{x1:e.unref(f).drawingArea.left,x2:e.unref(f).drawingArea.left,y1:e.unref(f).drawingArea.top,y2:e.unref(f).drawingArea.bottom,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Nt),e.createElementVNode("line",{x1:e.unref(f).drawingArea.left,x2:e.unref(f).drawingArea.right,y1:isNaN(e.unref(f).absoluteZero)?e.unref(f).drawingArea.bottom:e.unref(f).absoluteZero,y2:isNaN(e.unref(f).absoluteZero)?e.unref(f).drawingArea.bottom:e.unref(f).absoluteZero,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Vt)])):e.createCommentVNode("",!0),e.unref(t).xyShowScale?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).yLabels,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.y<=e.unref(f).drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:n.x+4,x2:e.unref(f).drawingArea.left,y1:n.y,y2:n.y,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ft)):e.createCommentVNode("",!0),n.y<=e.unref(f).drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:n.x,y:n.y+e.unref(t).xyLabelsYFontSize/3,"text-anchor":"end","font-size":e.unref(t).xyLabelsYFontSize,fill:e.unref(t).color},e.toDisplayString(e.unref(i.applyDataLabel)(e.unref(t).formatter,n.value,e.unref(i.dataLabel)({p:e.unref(t).valuePrefix,v:n.value,s:e.unref(t).valueSuffix,r:e.unref(t).dataLabelRoundingValue}),{datapoint:n,seriesIndex:a})),9,Pt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.unref(t).xyShowScale&&e.unref(t).xyPeriods.length?(e.openBlock(),e.createElementBlock("g",It,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).xyPeriods.slice(e.unref(v).start,e.unref(v).end),(n,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(f).drawingArea.left+e.unref(f).slotSize*(a+1)-e.unref(f).slotSize/2,x2:e.unref(f).drawingArea.left+e.unref(f).slotSize*(a+1)-e.unref(f).slotSize/2,y1:e.unref(f).drawingArea.bottom,y2:e.unref(f).drawingArea.bottom+4,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).xyPeriods.slice(e.unref(v).start,e.unref(v).end),(n,a)=>(e.openBlock(),e.createElementBlock("text",{"font-size":e.unref(t).xyLabelsXFontSize,"text-anchor":e.unref(t).xyPeriodLabelsRotation>0?"start":e.unref(t).xyPeriodLabelsRotation<0?"end":"middle",fill:e.unref(t).color,transform:`translate(${e.unref(f).drawingArea.left+e.unref(f).slotSize*(a+1)-e.unref(f).slotSize/2}, ${e.unref(f).drawingArea.bottom+e.unref(t).xyLabelsXFontSize+6}), rotate(${e.unref(t).xyPeriodLabelsRotation})`},e.toDisplayString(n),9,Ot))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).dataset,(n,a)=>(e.openBlock(),e.createElementBlock("g",Dt,[e.unref(t).lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(i.createSmoothPath)(n.coordinates)}`,stroke:e.unref(t).backgroundColor,"stroke-width":e.unref(t).lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":e.unref(t).lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Mt),e.createElementVNode("path",{d:`M ${e.unref(i.createSmoothPath)(n.coordinates)}`,stroke:n.color,"stroke-width":e.unref(t).lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":e.unref(t).lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Ut)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:`M ${n.linePath}`,stroke:e.unref(t).backgroundColor,"stroke-width":e.unref(t).lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":e.unref(t).lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,qt),e.createElementVNode("path",{d:`M ${n.linePath}`,stroke:n.color,"stroke-width":e.unref(t).lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":e.unref(t).lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Wt)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:e.unref(i.checkNaN)(u.y),r:3,fill:n.color,stroke:e.unref(t).backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,jt))),256))]))),256))]),e.unref(t).showDataLabels?(e.openBlock(),e.createElementBlock("g",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).dataset,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":e.unref(t).dataLabelFontSize,fill:n.color,x:u.x,y:e.unref(i.checkNaN)(u.y)-e.unref(t).dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(i.applyDataLabel)(e.unref(t).formatter,e.unref(i.checkNaN)(u.value),e.unref(i.dataLabel)({p:e.unref(t).valuePrefix,v:e.unref(i.checkNaN)(u.value),s:e.unref(t).valueSuffix,r:e.unref(t).dataLabelRoundingValue}),{datapoint:u,seriesIndex:m})),9,Gt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).extremes.maxSeries,(n,a)=>(e.openBlock(),e.createElementBlock("rect",{x:e.unref(f).drawingArea.left+a*e.unref(f).slotSize,y:e.unref(f).drawingArea.top,height:e.unref(f).drawingArea.height<=0?1e-5:e.unref(f).drawingArea.height,width:e.unref(f).slotSize<=0?1e-5:e.unref(f).slotSize,fill:[e.unref($),e.unref(I)].includes(a)?e.unref(t).xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${e.unref(t).xyHighlighterOpacity}`),onMouseenter:u=>e.unref(f).useTooltip(a),onMouseleave:s[1]||(s[1]=u=>e.unref(f).killTooltip()),onClick:u=>q("selectDatapoint",e.unref(f).dataset.map(m=>({...m,value:m.values[a]})))},null,44,Yt))),256))])],64)):e.createCommentVNode("",!0),e.unref(b)===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.unref(t).xyShowGrid?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).yLabels,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.y<=e.unref(c).drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(c).drawingArea.left,x2:e.unref(c).drawingArea.right,y1:n.y,y2:n.y,stroke:e.unref(t).xyGridStroke,"stroke-width":e.unref(t).xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Jt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).extremes.maxSeries+1,(n,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(c).drawingArea.left+e.unref(c).slotSize*a,x2:e.unref(c).drawingArea.left+e.unref(c).slotSize*a,y1:e.unref(c).drawingArea.top,y2:e.unref(c).drawingArea.bottom,stroke:e.unref(t).xyGridStroke,"stroke-width":e.unref(t).xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Qt))),256))])):e.createCommentVNode("",!0),e.unref(t).xyShowAxis?(e.openBlock(),e.createElementBlock("g",Kt,[e.createElementVNode("line",{x1:e.unref(c).drawingArea.left,x2:e.unref(c).drawingArea.left,y1:e.unref(c).drawingArea.top,y2:e.unref(c).drawingArea.bottom,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,en),e.createElementVNode("line",{x1:e.unref(c).drawingArea.left,x2:e.unref(c).drawingArea.right,y1:isNaN(e.unref(c).absoluteZero)?e.unref(c).drawingArea.bottom:e.unref(c).absoluteZero,y2:isNaN(e.unref(c).absoluteZero)?e.unref(c).drawingArea.bottom:e.unref(c).absoluteZero,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,tn)])):e.createCommentVNode("",!0),e.unref(t).xyShowScale?(e.openBlock(),e.createElementBlock("g",nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).yLabels,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.y<=e.unref(c).drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:n.x+4,x2:e.unref(c).drawingArea.left,y1:n.y,y2:n.y,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,rn)):e.createCommentVNode("",!0),n.y<=e.unref(c).drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:n.x,y:n.y+e.unref(t).xyLabelsYFontSize/3,"text-anchor":"end","font-size":e.unref(t).xyLabelsYFontSize,fill:e.unref(t).color},e.toDisplayString(e.unref(i.applyDataLabel)(e.unref(t).formatter,n.value,e.unref(i.dataLabel)({p:e.unref(t).valuePrefix,v:n.value,s:e.unref(t).valueSuffix,r:e.unref(t).dataLabelRoundingValue}),{datapoint:n,seriesIndex:a})),9,on)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.unref(t).xyShowScale&&e.unref(t).xyPeriods.length?(e.openBlock(),e.createElementBlock("g",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).xyPeriods.slice(e.unref(v).start,e.unref(v).end),(n,a)=>(e.openBlock(),e.createElementBlock("line",{x1:e.unref(c).drawingArea.left+e.unref(c).slotSize*(a+1)-e.unref(c).slotSize/2,x2:e.unref(c).drawingArea.left+e.unref(c).slotSize*(a+1)-e.unref(c).slotSize/2,y1:e.unref(c).drawingArea.bottom,y2:e.unref(c).drawingArea.bottom+4,stroke:e.unref(t).xyAxisStroke,"stroke-width":e.unref(t).xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,an))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).xyPeriods.slice(e.unref(v).start,e.unref(v).end),(n,a)=>(e.openBlock(),e.createElementBlock("text",{"font-size":e.unref(t).xyLabelsXFontSize,"text-anchor":e.unref(t).xyPeriodLabelsRotation>0?"start":e.unref(t).xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${e.unref(c).drawingArea.left+e.unref(c).slotSize*(a+1)-e.unref(c).slotSize/2}, ${e.unref(c).drawingArea.bottom+e.unref(t).xyLabelsXFontSize+6}) rotate(${e.unref(t).xyPeriodLabelsRotation})`,fill:e.unref(t).color},e.toDisplayString(n),9,un))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).dataset,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("rect",{x:u.x,width:u.width<=0?1e-5:u.width,height:e.unref(i.checkNaN)(u.height<=0?1e-5:u.height),y:e.unref(i.checkNaN)(u.y),fill:n.color,stroke:e.unref(t).backgroundColor,"stroke-width":e.unref(t).barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":e.unref(t).barAnimated&&u.value<0})},[e.unref(t).barAnimated&&u.value>0&&!e.unref(re)&&!e.unref(oe)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:u.height,dur:"0.5s"},null,8,fn)):e.createCommentVNode("",!0),e.unref(t).barAnimated&&u.value>0&&!e.unref(re)&&!e.unref(oe)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:e.unref(c).absoluteZero,to:e.unref(c).absoluteZero-u.height,dur:"0.5s"},null,8,dn)):e.createCommentVNode("",!0)],10,cn))),256))],64))),256))]),e.unref(t).showDataLabels?(e.openBlock(),e.createElementBlock("g",mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).dataset,(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("text",{x:u.x+u.width/2,y:e.unref(i.checkNaN)(u.y)-e.unref(t).dataLabelFontSize/2,"text-anchor":"middle","font-size":e.unref(t).dataLabelFontSize,fill:n.color,class:"quick-animation"},e.toDisplayString(e.unref(i.applyDataLabel)(e.unref(t).formatter,e.unref(i.checkNaN)(u.value),e.unref(i.dataLabel)({p:e.unref(t).valuePrefix,v:e.unref(i.checkNaN)(u.value),s:e.unref(t).valueSuffix,r:e.unref(t).dataLabelRoundingValue}),{datapoint:u,seriesIndex:m})),9,hn))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).extremes.maxSeries,(n,a)=>(e.openBlock(),e.createElementBlock("rect",{x:e.unref(c).drawingArea.left+a*e.unref(c).slotSize,y:e.unref(c).drawingArea.top,height:e.unref(c).drawingArea.height<=0?1e-5:e.unref(c).drawingArea.height,width:e.unref(c).slotSize<=0?1e-5:e.unref(c).slotSize,fill:[e.unref($),e.unref(I)].includes(a)?e.unref(t).xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${e.unref(t).xyHighlighterOpacity}`),onMouseenter:u=>e.unref(c).useTooltip(a),onMouseleave:s[2]||(s[2]=u=>e.unref(c).killTooltip()),onClick:u=>q("selectDatapoint",e.unref(c).dataset.map(m=>({...m,value:m.values[a]})))},null,44,kn))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(e.unref(b))?(e.openBlock(),e.createElementBlock("g",gn,[e.unref(t).xAxisLabel&&e.unref(b)===S.LINE?(e.openBlock(),e.createElementBlock("g",vn,[e.createElementVNode("text",{"font-size":e.unref(t).axisLabelsFontSize,fill:e.unref(t).color,"text-anchor":"middle",x:e.unref(f).drawingArea.left+e.unref(f).drawingArea.width/2,y:e.unref(g).height-e.unref(t).axisLabelsFontSize/3},e.toDisplayString(e.unref(t).xAxisLabel),9,yn)])):e.createCommentVNode("",!0),e.unref(t).xAxisLabel&&e.unref(b)===S.BAR?(e.openBlock(),e.createElementBlock("g",xn,[e.createElementVNode("text",{"font-size":e.unref(t).axisLabelsFontSize,fill:e.unref(t).color,"text-anchor":"middle",x:e.unref(c).drawingArea.left+e.unref(c).drawingArea.width/2,y:e.unref(g).height-e.unref(t).axisLabelsFontSize/3},e.toDisplayString(e.unref(t).xAxisLabel),9,Sn)])):e.createCommentVNode("",!0),e.unref(t).yAxisLabel&&e.unref(b)===S.LINE?(e.openBlock(),e.createElementBlock("g",bn,[e.createElementVNode("text",{"font-size":e.unref(t).axisLabelsFontSize,fill:e.unref(t).color,transform:`translate(${e.unref(t).axisLabelsFontSize}, ${e.unref(f).drawingArea.top+e.unref(f).drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(e.unref(t).yAxisLabel),9,Bn)])):e.createCommentVNode("",!0),e.unref(t).yAxisLabel&&e.unref(b)===S.BAR?(e.openBlock(),e.createElementBlock("g",wn,[e.createElementVNode("text",{"font-size":e.unref(t).axisLabelsFontSize,fill:e.unref(t).color,transform:`translate(${e.unref(t).axisLabelsFontSize}, ${e.unref(c).drawingArea.top+e.unref(c).drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(e.unref(t).yAxisLabel),9,En)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,at)):e.createCommentVNode("",!0),e.unref(b)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ye.default,{key:5,config:{type:"line",style:{backgroundColor:e.unref(t).backgroundColor,line:{axis:{color:e.unref(t).xyAxisStroke},path:{color:e.unref(t).xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",An,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(re)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(e.unref(b))&&e.unref(t).zoomXy&&e.unref(p).maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${e.unref(te)}`,ref_key:"quickChartSlicer",ref:G},[(e.openBlock(),e.createBlock(Xe.Slicer,{ref_key:"slicerComponent",ref:W,key:`slicer_${e.unref(te)}`,background:e.unref(t).zoomColor,borderColor:e.unref(t).backgroundColor,fontSize:e.unref(t).zoomFontSize,useResetSlot:e.unref(t).zoomUseResetSlot,labelLeft:e.unref(t).xyPeriods[e.unref(v).start]?e.unref(t).xyPeriods[e.unref(v).start]:"",labelRight:e.unref(t).xyPeriods[e.unref(v).end-1]?e.unref(t).xyPeriods[e.unref(v).end-1]:"",textColor:e.unref(t).color,inputColor:e.unref(t).zoomColor,selectColor:e.unref(t).zoomHighlightColor,max:e.unref(p).maxSeriesLength,min:0,valueStart:e.unref(v).start,valueEnd:e.unref(v).end,smoothMinimap:e.unref(t).zoomMinimap.smooth,minimapSelectedColor:e.unref(t).zoomMinimap.selectedColor,minimapSelectedColorOpacity:e.unref(t).zoomMinimap.selectedColorOpacity,minimapSelectionRadius:e.unref(t).zoomMinimap.selectionRadius,minimapLineColor:e.unref(t).zoomMinimap.lineColor,minimap:e.unref(je),minimapIndicatorColor:e.unref(t).zoomMinimap.indicatorColor,minimapSelectedIndex:e.unref(I),start:e.unref(v).start,"onUpdate:start":s[3]||(s[3]=n=>e.unref(v).start=n),end:e.unref(v).end,"onUpdate:end":s[4]||(s[4]=n=>e.unref(v).end=n),refreshStartPoint:e.unref(t).zoomStartIndex!==null?e.unref(t).zoomStartIndex:0,refreshEndPoint:e.unref(t).zoomEndIndex!==null?e.unref(t).zoomEndIndex+1:e.unref(p).maxSeriesLength,onReset:qe,onTrapMouse:Ue},{"reset-action":e.withCtx(({reset:n})=>[e.renderSlot(r.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:n})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","minimapSelectedIndex","start","end","refreshStartPoint","refreshEndPoint"]))])):e.createCommentVNode("",!0),e.unref(t).showLegend?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${e.unref(t).color}`)},[e.unref(b)===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(w).legend,(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Me(n,e.unref(w).dataset),q("selectLegend",n)},style:e.normalizeStyle(`cursor: ${e.unref(w).legend.length>1?"pointer":"default"}; opacity:${e.unref(x).includes(n.id)?"0.5":"1"}`)},[e.unref(t).useCustomLegend?e.renderSlot(r.$slots,"legend",e.mergeProps({key:0,ref_for:!0},{legend:n}),void 0,!0):