UNPKG

vue-data-ui-hq

Version:

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

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