vue-data-ui-hq
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
2 lines (1 loc) • 23.7 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-ZfICPrrM.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-B-gh2f22.cjs"),fe=require("./vue-ui-skeleton-Bvmpr51u.cjs"),de=require("./Title-FbHK83tB.cjs"),Z=require("./useNestedProp-C14rfl0j.cjs"),he=require("./PackageVersion-D3dK8oA3.cjs"),me=require("./PenAndPaper-PL3bp4ud.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ge={key:0},ve=["xmlns","viewBox"],be=["width","height"],Se=["id"],xe=["stop-color"],_e=["stop-color"],we=["stop-color"],Be=["id"],Ce=["stdDeviation"],Ne=["d","fill","stroke"],Fe=["id","d"],ze=["fill","font-size","font-weight"],Ee=["href","startOffset"],Pe=["x","y","text-anchor","fill","font-size","font-weight"],$e=["d","filter"],Oe=["stroke","stroke-width"],Me=["stroke","stroke-width"],Ve=["stroke","stroke-width"],Xe=["stroke","stroke-width"],Ye={key:5},Ie=["x","y","text-anchor","font-size","font-weight","fill"],Ae=["x","y","font-size","font-weight","fill"],Re={key:7},Le=["x1","y1","x2","y2","stroke","stroke-width"],De=["x1","y1","x2","y2","stroke","stroke-width"],Ge=["x1","y1","x2","y2","stroke-width","filter"],je={key:8},qe=["d","fill","stroke","stroke-width"],Te=["cx","cy","fill","r","stroke-width","stroke"],Ue=["x","y","font-size","fill"],We={key:5,class:"vue-data-ui-watermark"},He={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const{vue_ui_gauge:K}=s.useConfig(),c=C,_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),p=e.ref(s.createUid()),Q=e.ref(null),E=e.ref(0),v=e.ref(null),P=e.ref(null),$=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:Y}=ye.useUserOptionState({config:t.value});e.watch(()=>c.config,r=>{t.value=I(),N.value=!t.value.showOnChartHover,j(),V.value+=1},{deep:!0});function I(){const r=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return r.theme?{...Z.useNestedProp({userConfig:s.themes.vue_ui_gauge[r.theme]||c.config,defaultConfig:r}),customPalette:s.themePalettes[r.theme]||s.palette}:r}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!_.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const r=[];(c.dataset.series||[]).forEach(n=>{r.push(n.from||1e-7),r.push(n.to||1e-7)});const a=Math.max(...r);return{...c.dataset,series:(c.dataset.series||[]).map((n,l)=>({...n,color:s.convertColorToHex(n.color)||te.value[l]||s.palette[l],value:((n.to||0)-(n.from||0))/a*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),S=e.ref(0),f=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(r=>r.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{q(c.dataset.value)});const u=e.computed(()=>{const r=o.value.width/2,a=i.value.base,n=Math.PI*((f.value+0-S.value)/(b.value-S.value))+Math.PI;return{x1:r,y1:a,x2:r+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(n),y2:a+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(n)}}),G=e.computed(()=>{const r=o.value.width/2,a=i.value.base,n=Math.PI*((f.value+0-S.value)/(b.value-S.value))+Math.PI,l=r+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(n),m=a+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(n),y=o.value.pointerRadius,le=r+y*Math.cos(n+Math.PI/2),ue=a+y*Math.sin(n+Math.PI/2),ie=r+y*Math.cos(n-Math.PI/2),ce=a+y*Math.sin(n-Math.PI/2);return isNaN(l)?null:`M ${l},${m} ${le},${ue} ${ie},${ce} Z`}),F=e.computed(()=>{for(let r=0;r<k.value.series.length;r+=1){const{color:a,from:n,to:l}=k.value.series[r];if(f.value>=n&&f.value<=l)return a}return"#2D353C"}),w=e.ref(null);function j(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(r=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:r})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((r,a)=>{s.getMissingDatasetAttributes({datasetObject:r,requiredAttributes:["from","to"]}).forEach(n=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:n,index:a})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),q(c.dataset.value||0),t.value.responsive){const r=W.throttle(()=>{const{width:a,height:n}=W.useResponsive({chart:v.value,title:t.value.style.chart.title.text?P.value:null,legend:$.value,source:O.value,noTitle:M.value});o.value.width=a,o.value.height=n,o.value.centerX=a/2,o.value.centerY=h.value/2/358.4*n,o.value.bottom=n,o.value.labelFontSize=18/h.value*Math.min(n,a)<10?10:18/h.value*Math.min(n,a),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(n,a)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(n,a),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(n,a),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(n,a),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(a,n),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(a,n),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=s.translateSize({relator:Math.min(a,n),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});w.value=new ResizeObserver(r),w.value.observe(v.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function q(r){const a=[];(k.value.series||[]).forEach(y=>{a.push(y.from||0),a.push(y.to||0)}),b.value=Math.max(...a),S.value=Math.min(...a);let n=t.value.style.chart.animation.speed;const l=Math.abs(r-f.value)/(n*60);function m(){f.value<r?f.value=Math.min(f.value+l,r):f.value>r&&(f.value=Math.max(f.value-l,r)),f.value!==r&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const r=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,a=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:r/a,gradients:r/(a*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),d=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),re=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),g=e.computed(()=>d.value.map(r=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(r.nameOffsetRatio||1))),T=e.computed(()=>{const{x:r,y:a}=s.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:n,y:l}=s.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:r,y1:a,x2:n,y2:l}}),U=e.computed(()=>d.value.map(r=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:r.separator.x,initY:r.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:m}=s.offsetFromCenterPoint({initX:r.endX,initY:r.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:l,y2:m}}));function ne(r){if(r.reduce((m,y)=>m+y,0)>100)throw new Error("Total % must not exceed 100");const n=50;let l=0;return r.map(m=>(l+=m,`${l/100*n-m/4}%`))}const oe=e.computed(()=>ne(d.value.map(r=>r.proportion*100))),ae=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),x=e.ref(!1);function se(r){x.value=r,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:z}),(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${e.unref(x)?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:v,id:`vue-ui-gauge_${e.unref(p)}`,style:e.normalizeStyle(`font-family:${e.unref(t).style.fontFamily};width:100%; text-align:center;background:${e.unref(t).style.chart.backgroundColor};${e.unref(t).responsive?"height: 100%":""}`),onMouseenter:a[0]||(a[0]=()=>e.unref(X)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(X)(!1))},[e.unref(t).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:e.unref(v),backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,active:e.unref(B),onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.unref(ee)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),e.unref(t).style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:P,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${e.unref(V)}`,config:{title:{cy:"gauge-div-title",...e.unref(t).style.chart.title},subtitle:{cy:"gauge-div-subtitle",...e.unref(t).style.chart.title.subtitle}}},{default:e.withCtx(()=>[e.unref(t).translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(e.unref(t).translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),e.unref(t).userOptions.show&&e.unref(_)&&(e.unref(Y)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${e.unref(E)}`,backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:e.unref(p),hasXls:!1,hasPdf:e.unref(t).userOptions.buttons.pdf,hasImg:e.unref(t).userOptions.buttons.img,hasFullscreen:e.unref(t).userOptions.buttons.fullscreen,isFullscreen:e.unref(x),titles:{...e.unref(t).userOptions.buttonTitles},chartElement:e.unref(v),position:e.unref(t).userOptions.position,hasAnnotator:e.unref(t).userOptions.buttons.annotator,isAnnotation:e.unref(B),onToggleFullscreen:se,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:l})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:l})),void 0,!0)]),key:"2"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:l})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:l})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(_)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":e.unref(x),"vue-data-ui-fulscreen--off":!e.unref(x)}),viewBox:`0 0 ${e.unref(o).width<=0?10:e.unref(o).width} ${e.unref(o).height<=0?10:e.unref(o).height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${e.unref(t).style.chart.color}`)},[e.createVNode(he._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:e.unref(o).width<=0?10:e.unref(o).width,height:e.unref(o).height<=0?10:e.unref(o).height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${e.unref(p)}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",e.unref(t).style.chart.layout.track.gradientIntensity)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,we)],8,Se)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${e.unref(p)}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/e.unref(t).style.chart.layout.track.gradientIntensity},null,8,Ce)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(n,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:n.arcSlice,fill:n.color,stroke:e.unref(t).style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ne))),128)),e.unref(t).style.chart.layout.segmentNames.show&&e.unref(t).style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(n,l)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${e.unref(p)}_${l}`,d:`M ${e.unref(u).x1},${e.unref(u).y1} m -${e.unref(g)[l]},0 a ${e.unref(g)[l]},${e.unref(g)[l]} 0 1,1 ${2*e.unref(g)[l]},0 a ${e.unref(g)[l]},${e.unref(g)[l]} 0 1,1 -${2*e.unref(g)[l]},0`,fill:"transparent"},null,8,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(n,l)=>(e.openBlock(),e.createElementBlock("text",{fill:e.unref(t).style.chart.layout.segmentNames.useSerieColor?n.color:e.unref(t).style.chart.layout.segmentNames.color,"font-size":e.unref(o).segmentFontSize,"font-weight":e.unref(t).style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${e.unref(p)}_${l}`,startOffset:e.unref(oe)[l]},e.toDisplayString(n.name||""),9,Ee)],8,ze))),256))],64)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.segmentNames.show&&!e.unref(t).style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(re),(n,l)=>(e.openBlock(),e.createElementBlock("text",{x:n.center.endX,y:n.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(n,!1,12).anchor,fill:e.unref(t).style.chart.layout.segmentNames.useSerieColor?n.color:e.unref(t).style.chart.layout.segmentNames.color,"font-size":e.unref(o).segmentFontSize,"font-weight":e.unref(t).style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(n.name||""),9,Pe))),256)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(e.unref(ae),(n,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:n.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${e.unref(p)})`},null,8,$e))),128)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("line",e.mergeProps(e.unref(T),{stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Oe),e.createElementVNode("line",e.mergeProps(e.unref(T),{stroke:e.unref(t).style.chart.layout.segmentSeparators.stroke,"stroke-width":e.unref(t).style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},n,{stroke:e.unref(t).style.chart.backgroundColor,"stroke-width":e.unref(t).style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},n,{stroke:e.unref(t).style.chart.layout.segmentSeparators.stroke,"stroke-width":e.unref(t).style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Xe))),256))],64)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(n,l)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:e.unref(u).x1,centerY:e.unref(i).base,initX:n.center.startX,initY:n.center.startY,offset:e.unref(o).markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:e.unref(u).x1,centerY:e.unref(i).base,initX:n.center.startX,initY:n.center.startY,offset:e.unref(o).markerOffset}).y,"text-anchor":n.center.startX<e.unref(u).x1-5?"end":n.center.startX>e.unref(u).x1+5?"start":"middle","font-size":e.unref(o).labelFontSize*e.unref(t).style.chart.layout.markers.fontSizeRatio,"font-weight":`${e.unref(t).style.chart.layout.markers.bold?"bold":"normal"}`,fill:e.unref(t).style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(e.unref(t).style.chart.layout.markers.formatter,n.from,e.unref(s.dataLabel)({p:e.unref(t).style.chart.layout.markers.prefix,v:n.from,s:e.unref(t).style.chart.layout.markers.suffix,r:e.unref(t).style.chart.layout.markers.roundingValue}))),9,Ie))),256))])):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:e.unref(s.offsetFromCenterPoint)({centerX:e.unref(o).width/2,centerY:e.unref(i).base,initX:e.unref(d).at(-1).endX,initY:e.unref(d).at(-1).endY,offset:e.unref(o).markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:e.unref(o).width/2,centerY:e.unref(i).base,initX:e.unref(d).at(-1).endX,initY:e.unref(d).at(-1).endY,offset:e.unref(o).markerOffset}).y,"text-anchor":"start","font-size":e.unref(o).labelFontSize*e.unref(t).style.chart.layout.markers.fontSizeRatio,"font-weight":`${e.unref(t).style.chart.layout.markers.bold?"bold":"normal"}`,fill:e.unref(t).style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(e.unref(t).style.chart.layout.markers.formatter,e.unref(b),e.unref(s.dataLabel)({p:e.unref(t).style.chart.layout.markers.prefix,v:e.unref(b),s:e.unref(t).style.chart.layout.markers.suffix,r:e.unref(t).style.chart.layout.markers.roundingValue}))),9,Ae)):e.createCommentVNode("",!0),e.unref(t).style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Re,[isNaN(e.unref(u).x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(u).x1,y1:e.unref(u).y1,x2:e.unref(u).x2,y2:e.unref(u).y2,stroke:e.unref(t).style.chart.layout.pointer.stroke,"stroke-width":e.unref(o).pointerStrokeWidth,"stroke-linecap":"round"},null,8,Le)),isNaN(e.unref(u).x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:e.unref(u).x1,y1:e.unref(u).y1,x2:e.unref(u).x2,y2:e.unref(u).y2,stroke:e.unref(t).style.chart.layout.pointer.useRatingColor?e.unref(F):e.unref(t).style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":e.unref(o).pointerStrokeWidth*.7},null,8,De)),!isNaN(e.unref(u).x2)&&e.unref(t).style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:e.unref(u).x1,y1:e.unref(u).y1,x2:e.unref(u).x2,y2:e.unref(u).y2,stroke:"white","stroke-linecap":"round","stroke-width":e.unref(o).pointerStrokeWidth*.3,filter:`url(#blur_${e.unref(p)})`},null,8,Ge)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",je,[e.unref(G)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(G),fill:e.unref(t).style.chart.layout.pointer.useRatingColor?e.unref(F):e.unref(t).style.chart.layout.pointer.color,stroke:e.unref(t).style.chart.layout.pointer.stroke,"stroke-width":e.unref(t).style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,qe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:e.unref(o).width/2,cy:e.unref(i).base,fill:e.unref(t).style.chart.layout.pointer.circle.color,r:e.unref(o).pointerRadius<=0?1e-4:e.unref(o).pointerRadius,"stroke-width":e.unref(t).style.chart.layout.pointer.circle.strokeWidth,stroke:e.unref(t).style.chart.layout.pointer.circle.stroke},null,8,Te),e.unref(t).style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(o).width/2,y:e.unref(i).ratingBase,"text-anchor":"middle","font-size":e.unref(o).legendFontSize,"font-weight":"bold",fill:e.unref(t).style.chart.legend.useRatingColor?e.unref(F):e.unref(t).style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(e.unref(t).style.chart.legend.formatter,e.unref(f),e.unref(s.dataLabel)({p:e.unref(t).style.chart.legend.prefix+(e.unref(t).style.chart.legend.showPlusSymbol&&e.unref(f)>0?"+":""),v:e.unref(f),s:e.unref(t).style.chart.legend.suffix,r:e.unref(t).style.chart.legend.roundingValue}))),9,Ue)):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"svg",{svg:e.unref(o)},void 0,!0)],14,ve)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(_)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:6,config:{type:"gauge",style:{backgroundColor:e.unref(t).style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(r.$slots,"legend",{legend:e.unref(k)},void 0,!0)],512),r.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,ke))}},Ze=pe._export_sfc(He,[["__scopeId","data-v-f8647d77"]]);exports.default=Ze;
;