UNPKG

vue-data-ui

Version:

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

2 lines (1 loc) 24.2 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-_gyicZFE.cjs"),re=require("./useResponsive-N8jl0-aC.cjs"),ge=require("./Title-CsERtJKI.cjs"),se=require("./usePrinter-BRTNfg7r.cjs"),ke=require("./Tooltip-C06-4zGf.cjs"),xe=require("./DataTable-DL8_xKlk.cjs"),Ce=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),we=require("./Shape-C_rBdSHr.cjs"),Be=require("./vue-ui-accordion-8mzPx86h.cjs"),ne=require("./useNestedProp-BJQoarHp.cjs"),Se=require("./PackageVersion-DHtx9fnE.cjs"),$e=require("./PenAndPaper-DPoMEHE6.cjs"),Ne=require("./useUserOptionState-BgepsfED.cjs"),Te=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],Pe=["xmlns","viewBox"],Ee=["x","y","width","height"],Ae={key:1},ze={key:0},Ve=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Oe={key:1},Fe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],De=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","fill","font-size"],We=["x","y","font-size","fill"],qe=["fill","font-size","transform"],Re=["fill","font-size","x","y"],Ge=["x1","x2","y1","y2","stroke"],Ue=["cx","cy","fill"],He=["cx","cy","fill"],je=["id"],Xe=["stop-color"],Ye=["stop-color"],Je=["stop-color"],Ke={key:0},Qe=["x","y","font-size","fill"],Ze={key:5,class:"vue-data-ui-watermark"},et=["innerHTML"],tt={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ue,{expose:ie,emit:ce}){const{vue_ui_strip_plot:ve}=r.useConfig(),v=ue,de=ce,p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(r.createUid()),F=e.ref(0),P=e.ref(!1),E=e.ref(""),g=e.ref(null),D=e.ref(null),M=e.ref(null),I=e.ref(null),W=e.ref(!1),q=e.ref(0),R=e.ref(0),t=e.computed({get:()=>j(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:G,keepUserOptionState:U}=Ne.useUserOptionState({config:t.value}),{svgRef:H}=Te.useChartAccessibility({config:t.value.style.chart.title});function j(){const l=ne.useNestedProp({userConfig:v.config,defaultConfig:ve});return l.theme?{...ne.useNestedProp({userConfig:r.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>v.config,l=>{t.value=j(),A.value=!t.value.userOptions.showOnChartHover,X(),q.value+=1,R.value+=1,c.value.dataLabels.show=t.value.style.chart.labels.bestPlotLabel.show,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const C=e.ref(null);e.onMounted(()=>{X()});function X(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(o=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:o,index:s})}),l.plots&&l.plots.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=re.throttle(()=>{const{width:s,height:o}=re.useResponsive({chart:g.value,title:t.value.style.chart.title.text?D.value:null,source:M.value,noTitle:I.value});requestAnimationFrame(()=>{w.value=o,y.value.width=s,y.value.height=o,x.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=r.translateSize({relator:Math.min(o,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})})});C.value=new ResizeObserver(l),C.value.observe(g.value.parentNode)}W.value=!0,setTimeout(()=>{k.value=!1},pe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=se.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),he=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),k=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),x=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:x.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),a=e.computed(()=>{const l=x.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:x.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:x.value,absoluteHeight:w.value,absoluteWidth:l}}),S=e.computed(()=>p.value?v.dataset.map((l,s)=>{const o=r.createUid();return{...l,id:o,color:l.color?r.convertColorToHex(l.color):Z.value[s]||r.palette[s]||r.palette[s%r.palette.length],plots:l.plots.map(n=>({...n,value:r.checkNaN(n.value),parentId:o,color:l.color?r.convertColorToHex(l.color):Z.value[s]||r.palette[s]||r.palette[s%r.palette.length],id:r.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(S.value||[]).map((l,s)=>({...l,plots:l.plots.map(o=>({...o,x:a.value.left+(s+1)*a.value.stripWidth-a.value.stripWidth/2}))}))),pe=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),z=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(o=>o.value));return{max:Math.max(...l),min:Math.min(...l)}}),f=e.computed(()=>r.calculateNiceScale(z.value.min<0?z.value.min:0,z.value.max,t.value.style.chart.grid.scaleSteps)),fe=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(o=>({...o,y:a.value.bottom-(o.value+Math.abs(f.value.min))/(f.value.max+Math.abs(f.value.min))*a.value.height}))}))),ee=e.computed(()=>f.value.ticks.map(l=>({y:a.value.bottom-a.value.height*((l+Math.abs(f.value.min))/(f.value.max+Math.abs(f.value.min))),x1:a.value.left,x2:a.value.right,value:l}))),V=e.ref(null),i=e.ref(null);function me({datapoint:l,seriesIndex:s}){V.value={datapoint:l,seriesIndex:s,config:t.value,series:S.value},P.value=!0,i.value=l;const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:s,datapoint:l,series:S.value,config:t.value})))E.value=o({seriesIndex:s,datapoint:l,series:S.value,config:t.value});else{let n="";n+=`<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="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${r.applyDataLabel(t.value.style.chart.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</div>`,E.value=`<div>${n}</div>`}}const $=e.computed(()=>{const l=h.value.flatMap(o=>JSON.parse(JSON.stringify(o.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${o.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(o=>JSON.parse(JSON.stringify(o.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function te(){e.nextTick(()=>{const l=$.value.head.map((n,u)=>[[n.name],[$.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const N=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=$.value.head.map((u,m)=>{const _=r.dataLabel({p:t.value.style.chart.labels.prefix,v:$.value.body[m],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},_]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:o}}),b=e.ref(!1);function ye(l){b.value=l,F.value+=1}function be(){return h.value}function le(){c.value.showTable=!c.value.showTable}function oe(){c.value.dataLabels.show=!c.value.dataLabels.show}function ae(){c.value.showTooltip=!c.value.showTooltip}const T=e.ref(!1);function O(){T.value=!T.value}return ie({getData:be,generatePdf:K,generateCsv:te,generateImage:Q,toggleTable:le,toggleLabels:oe,toggleTooltip:ae,toggleAnnotator:O}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:g,class:e.normalizeClass(`vue-ui-strip-plot ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`,onMouseenter:s[2]||(s[2]=()=>e.unref(G)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock($e.PenAndPaper,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:T.value,onClose:O},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),he.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:D,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value&&(e.unref(U)||e.unref(A))?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Y),isImaging:e.unref(J),uid:L.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:T.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(K),onGenerateCsv:te,onGenerateImage:e.unref(Q),onToggleTable:le,onToggleLabels:oe,onToggleTooltip:ae,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(U)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[e.createVNode(Se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.value.left,y:a.value.top,width:a.value.width,height:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",Ae,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,o=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y,y2:o.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,Ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,n)=>(e.openBlock(),e.createElementBlock("line",{x1:a.value.left+(n+1)*a.value.stripWidth,x2:a.value.left+(n+1)*a.value.stripWidth,y1:a.value.top,y2:a.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,Fe))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:a.value.left,x2:a.value.left,y1:a.value.top,y2:a.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,De),e.createElementVNode("line",{x1:a.value.left,x2:a.value.right,y1:a.value.bottom,y2:a.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ee.value,(o,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.labels.prefix,v:o.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding}),{datapoint:o,seriesIndex:n})),9,Ie))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(h.value,(o,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.value.left+(n+1)*a.value.stripWidth-a.value.stripWidth/2,y:a.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(o.name),9,We))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${a.value.top+a.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,qe)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:5,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:a.value.left+a.value.width/2,y:a.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Re)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[e.createElementVNode("line",{x1:a.value.left,x2:a.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ge),e.createElementVNode("circle",{cx:a.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ue),e.createElementVNode("circle",{cx:a.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,He)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,o=>(e.openBlock(),e.createElementBlock("radialGradient",{id:o.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Xe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(o.color,.1)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Je)],8,je))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fe.value,(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.plots,(u,m)=>(e.openBlock(),e.createBlock(we._sfc_main,e.mergeProps({plot:{x:u.x,y:W.value?u.y:a.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${o.id})`:o.color,onMouseenter:_=>me({datapoint:u,seriesIndex:m}),onMouseleave:s[0]||(s[0]=_=>{P.value=!1,i.value=null}),onClick:_=>de("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${k.value?`transition-delay:${m*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&k.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!k.value},ref_for:!0},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.plots,(u,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m===o.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&k.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(r.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(r.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}),{datapoint:u,seriesIndex:m}):""),13,Qe)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:a.value},void 0,!0)],14,Pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:6,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ke._sfc_main,{show:c.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:E.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),p.value?(e.openBlock(),e.createBlock(Be.default,{key:8,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(xe.DataTable,{key:`table_${R.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},lt=_e._export_sfc(tt,[["__scopeId","data-v-fd6179c0"]]);exports.default=lt;