vue-data-ui-hq
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
9 lines (8 loc) • 25.4 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-ZfICPrrM.cjs"),ue=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./Title-FbHK83tB.cjs"),Se=require("./Legend-HgHPyA_4.cjs"),ze=require("./Tooltip-C7TJODUx.cjs"),Ne=require("./Shape-C3YtaYr4.cjs"),ce=require("./usePrinter-B-gh2f22.cjs"),Ae=require("./DataTable-CC6dPSer.cjs"),Te=require("./vue-ui-accordion-Dp6uTsJi.cjs"),Pe=require("./vue-ui-skeleton-Bvmpr51u.cjs"),de=require("./useNestedProp-C14rfl0j.cjs"),Fe=require("./PackageVersion-D3dK8oA3.cjs"),Me=require("./PenAndPaper-PL3bp4ud.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ie=["id"],Le=["xmlns","viewBox"],Ve=["x","y","width","height"],Oe={style:{"pointer-events":"none"}},De=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","fill","font-size","font-weight"],Ue=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","fill","font-size","font-weight"],We={key:0},je=["x","y","font-size","fill"],He=["width","x","y"],Ge={style:{width:"100%"}},Ye=["x","y","fill","font-weight","font-size","onMouseenter"],Xe=["d","stroke","stroke-width","onMouseenter"],Je=["d","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Qe=["onClick"],Ze=["innerHTML"],et={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(fe,{expose:pe,emit:he}){const{vue_ui_parallel_coordinate_plot:me}=i.useConfig(),b=fe,x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),L=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),U=e.ref(0),R=e.ref(0),W=e.ref(0),T=e.ref(i.createUid()),w=e.ref(!1);function ve(o){w.value=o,L.value+=1}const t=e.computed({get:()=>G(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:H}=_e.useUserOptionState({config:t.value});function G(){const o=de.useNestedProp({userConfig:b.config,defaultConfig:me});return o.theme?{...de.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[o.theme]||b.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}e.watch(()=>b.config,o=>{t.value=G(),P.value=!t.value.showOnChartHover,Y(),U.value+=1,W.value+=1,R.value+=1},{deep:!0});const S=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((o,l)=>{i.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","series"]}).forEach(n=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:n,index:l})})}),t.value.responsive){const o=ue.throttle(()=>{const{width:l,height:n}=ue.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});d.value.width=l,d.value.height=n,d.value.plotSize=i.translateSize({relator:Math.min(l,n),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),d.value.ticksFontSize=i.translateSize({relator:Math.min(l,n),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),d.value.datapointFontSize=i.translateSize({relator:Math.min(l,n),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),d.value.axisNameFontSize=i.translateSize({relator:Math.min(l,n),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});S.value=new ResizeObserver(o),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:X,isImaging:J,generatePdf:K,generateImage:Q}=ce.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),ye=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),d=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),c=e.computed(()=>{const{top:o,right:l,bottom:n,left:a}=t.value.style.chart.padding,s=d.value.height,r=d.value.width;return{chartHeight:s,chartWidth:r,height:s-o-n,width:r-a-l,top:o,left:a,right:r-l,bottom:s-n}}),ge=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),y=e.ref([]);function Z(o){y.value.includes(o)?y.value=y.value.filter(l=>l!==o):y.value.push(o)}const k=e.computed(()=>b.dataset.map((o,l)=>{const n=i.convertColorToHex(o.color)||ge.value[l]||i.palette[l]||i.palette[l%i.palette.length];return{...o,series:o.series.map(a=>({...a,id:i.createUid(),color:n})),seriesIndex:l,color:n,id:i.createUid(),shape:o.shape||"circle"}})),be=e.computed(()=>k.value.map(o=>({...o,opacity:y.value.includes(o.id)?.5:1,segregate:()=>Z(o.id),isSegregated:y.value.includes(o.id)}))),ke=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ee=e.computed(()=>Math.max(...k.value.filter(o=>!y.value.includes(o.id)).map(o=>Math.max(...o.series.flatMap(l=>l.values.length))))),v=e.computed(()=>c.value.width/ee.value),F=e.computed(()=>k.value.filter(o=>!y.value.includes(o.id))),m=e.computed(()=>{let o=[];for(let l=0;l<ee.value;l+=1){const n=Math.min(...F.value.flatMap(f=>f.series.map(A=>A.values[l]||0)||0)),a=Math.max(...F.value.flatMap(f=>f.series.map(A=>A.values[l]||0)||0)),s=a===n?n/4:n,r=a===n?a*2:a,u=i.calculateNiceScale(s,r,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((f,A)=>{const we=u.min<0?f+Math.abs(u.min):f-Math.abs(u.min),Be=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:c.value.bottom-c.value.height*(we/Be),x:c.value.left+v.value*l+v.value/2,value:f}});o.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[l]||`Y-${l+1}`})}return o}),M=e.computed(()=>F.value.map((o,l)=>({...o,series:o.series.map((n,a)=>({...n,datapoints:n.values.map((s,r)=>{const u=m.value[r].scale.min<0?(s||0)+Math.abs(m.value[r].scale.min):(s||0)-Math.abs(m.value[r].scale.min),g=m.value[r].scale.min<0?m.value[r].scale.max+Math.abs(m.value[r].scale.min):m.value[r].scale.max-Math.abs(m.value[r].scale.min);return{name:n.name,seriesName:o.name,axisIndex:r,datapointIndex:a,seriesIndex:l,value:s||0,x:c.value.left+v.value*r+v.value/2,y:c.value.bottom-c.value.height*(u/g),comment:n.comments&&n.comments[r]||""}})}))})).map(o=>({...o,series:o.series.map(l=>{const n=i.createStraightPath(l.datapoints),a=i.createSmoothPath(l.datapoints),s=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${a}`:`M ${n}`);return{...l,smoothPath:a,straightPath:n,pathLength:s}})})));function te({value:o,index:l,datapoint:n}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[l]||null,o,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[l]||"",v:o,s:t.value.style.chart.yAxis.labels.suffixes[l]||"",r:t.value.style.chart.yAxis.labels.roundings[l]||0}),{datapoint:n,seriesIndex:l})}const p=e.ref(null),_=e.ref(null),B=e.ref(!1),E=e.ref("");function z({shape:o,serieName:l,serie:n,relativeIndex:a,seriesIndex:s}){_.value={serie:n,relativeIndex:a,seriesIndex:s,series:k.value,scales:m.value},B.value=!0,p.value=n.id;let r="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:n,seriesIndex:n.seriesIndex,series:k.value,config:t.value,scales:m.value}))?E.value=u({serie:n,seriesIndex:n.seriesIndex,series:k.value,config:t.value,scales:m.value}):(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l?l+" - ":""}${n.name}</div>`,m.value.map(g=>g.name).forEach((g,f)=>{r+=`
<div class="vue-ui-tooltip-item" style="text-align:left">
<span>${g}: </span>
<span>
${i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[f]||null,n.datapoints[f].value,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[f]||"",v:n.datapoints[f].value,s:t.value.style.chart.yAxis.labels.suffixes[f]||"",r:t.value.style.chart.yAxis.labels.roundings[f]||""}),{datapoint:n.datapoints[f],seriesIndex:f})}
</span>
</div>
`,t.value.style.chart.comments.showInTooltip&&n.datapoints[f].comment&&(r+=`<div class="vue-data-ui-tooltip-comment" style="background:${n.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${n.color}">${n.datapoints[f].comment}</div>`)}),E.value=`<div>${r}</div>`)}function xe(){return k.value}const $=e.computed(()=>{const o=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(s=>s.name)),l=M.value.flatMap((s,r)=>s.series.map(u=>[s.name].concat([u.name]).concat(u.values))),n={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},a=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(s=>s.name));return{body:l,head:o,config:n,colNames:a}}),oe=e.computed(()=>M.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:$.value.head,body:$.value.body});function ne(){const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],l=oe.value.head,n=oe.value.body,a=o.concat([l]).concat(n),s=i.createCsvContent(a);i.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}const le=he;function Ce(o){le("selectDatapoint",o)}function ae(o){le("selectLegend",{...o,isSegregated:!o.isSegregated,opacity:o.isSegregated?1:.5})}function re(){h.value.showTable=!h.value.showTable}function se(){h.value.dataLabels.show=!h.value.dataLabels.show}function ie(){h.value.showTooltip=!h.value.showTooltip}const N=e.ref(!1);function I(){N.value=!N.value}return pe({getData:xe,generateCsv:ne,generatePdf:K,generateImage:Q,toggleTable:re,toggleLabels:se,toggleTooltip:ie,toggleAnnotator:I}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:C,class:e.normalizeClass(`vue-ui-pcp ${e.unref(w)?"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:`pcp_${e.unref(T)}`,onMouseenter:l[6]||(l[6]=()=>e.unref(j)(!0)),onMouseleave:l[7]||(l[7]=()=>e.unref(j)(!1))},[e.unref(t).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:e.unref(C),backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,active:e.unref(N),onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.unref(ye)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,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:V,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${e.unref(U)}`,config:{title:{cy:"pcp-div-title",...e.unref(t).style.chart.title},subtitle:{cy:"pcp-div-subtitle",...e.unref(t).style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),e.unref(t).userOptions.show&&e.unref(x)&&(e.unref(H)||e.unref(P))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_options_${e.unref(L)}`,backgroundColor:e.unref(t).style.chart.backgroundColor,color:e.unref(t).style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(J),uid:e.unref(T),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,isFullscreen:e.unref(w),isTooltip:e.unref(h).showTooltip,titles:{...e.unref(t).userOptions.buttonTitles},chartElement:e.unref(C),position:e.unref(t).userOptions.position,hasAnnotator:e.unref(t).userOptions.buttons.annotator,isAnnotation:e.unref(N),onToggleFullscreen:ve,onGeneratePdf:e.unref(K),onGenerateCsv:ne,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleLabels:se,onToggleTooltip:ie,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(x)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":e.unref(w),"vue-data-ui-fulscreen--off":!e.unref(w)}),viewBox:`0 0 ${e.unref(c).chartWidth<=0?10:e.unref(c).chartWidth} ${e.unref(c).chartHeight<=0?10:e.unref(c).chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${e.unref(t).style.chart.color}`)},[e.createVNode(Fe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:e.unref(c).left,y:e.unref(c).top,width:e.unref(c).width,height:e.unref(c).height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(n,a)=>(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("line",{x1:e.unref(c).left+e.unref(v)*a+e.unref(v)/2,x2:e.unref(c).left+e.unref(v)*a+e.unref(v)/2,y1:e.unref(c).top,y2:e.unref(c).bottom,stroke:e.unref(t).style.chart.yAxis.stroke,"stroke-width":e.unref(t).style.chart.yAxis.strokeWidth},null,8,De),e.createElementVNode("text",{x:e.unref(c).left+e.unref(v)*a+e.unref(v)/2,y:e.unref(c).top-24,fill:e.unref(t).style.chart.yAxis.labels.axisNamesColor,"font-size":e.unref(d).axisNameFontSize,"font-weight":e.unref(t).style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(n.name),9,qe),e.unref(t).style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.ticks,s=>(e.openBlock(),e.createElementBlock("line",{x1:s.x,x2:s.x-10,y1:s.y,y2:s.y,stroke:e.unref(t).style.chart.yAxis.stroke,"stroke-width":e.unref(t).style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${e.unref(p)&&!e.unref(h).showTooltip?.2:1}`)},null,12,Ue))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.ticks,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x-12+e.unref(t).style.chart.yAxis.labels.ticks.offsetX,y:s.y+e.unref(t).style.chart.yAxis.labels.ticks.offsetY+e.unref(d).ticksFontSize/3,fill:e.unref(t).style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":e.unref(d).ticksFontSize,"font-weight":e.unref(t).style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${e.unref(p)&&!e.unref(h).showTooltip?.2:1}`)},e.toDisplayString(te({value:s.value,index:a,datapoint:s})),13,Re))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(M),n=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.series,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.unref(t).style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.datapoints,r=>(e.openBlock(),e.createBlock(Ne._sfc_main,{plot:{x:r.x,y:r.y},color:n.color,shape:n.shape,radius:n.shape==="triangle"?e.unref(d).plotSize*1.2:e.unref(d).plotSize,stroke:e.unref(t).style.chart.backgroundColor,strokeWidth:.5,onMouseenter:u=>z({shape:n.shape,serieName:n.name,serie:a,relativeIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:l[0]||(l[0]=u=>{p.value=null,B.value=!1}),style:e.normalizeStyle(`opacity:${e.unref(p)?e.unref(p)===a.id?e.unref(t).style.chart.plots.opacity:.2:e.unref(t).style.chart.plots.opacity}`),onClick:()=>Ce(r)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),e.unref(h).showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(p)&&e.unref(p)===a.id&&a.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:a.datapoints[0].x-e.unref(d).ticksFontSize,y:a.datapoints[0].y+e.unref(d).ticksFontSize/3,"text-anchor":"end","font-size":e.unref(d).ticksFontSize,fill:n.color,"font-weight":"bold"},e.toDisplayString(a.name),9,je)):e.createCommentVNode("",!0)],64)),e.unref(t).style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.datapoints,r=>(e.openBlock(),e.createElementBlock("g",null,[r.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:e.unref(t).style.chart.comments.width,x:r.x-e.unref(t).style.chart.comments.width/2+e.unref(t).style.chart.comments.offsetX,y:r.y+e.unref(t).style.chart.comments.offsetY+6},[e.createElementVNode("div",Ge,[e.renderSlot(o.$slots,"plot-comment",{plot:{...r,color:n.color}},void 0,!0)])],8,He)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(h).dataLabels.show||e.unref(p)&&e.unref(p)===a.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.datapoints,(r,u)=>(e.openBlock(),e.createElementBlock("text",{x:r.x+12+e.unref(t).style.chart.yAxis.labels.datapoints.offsetX,y:r.y+e.unref(t).style.chart.yAxis.labels.datapoints.offsetY+e.unref(d).datapointFontSize/3,fill:e.unref(t).style.chart.yAxis.labels.datapoints.useSerieColor?n.color:e.unref(t).style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":e.unref(t).style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":e.unref(d).datapointFontSize,onMouseenter:g=>z({shape:n.shape,serieName:n.name,serie:a,relativeIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:l[1]||(l[1]=g=>{p.value=null,B.value=!1}),style:e.normalizeStyle(`opacity:${e.unref(p)?e.unref(p)===a.id?1:.2:1}`)},e.toDisplayString(te({value:r.value,index:u,datapoint:r})),45,Ye))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${e.unref(t).style.chart.lines.smooth?a.smoothPath:a.straightPath}`,stroke:n.color,"stroke-width":e.unref(t).style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":e.unref(t).useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:r=>z({shape:n.shape,serieName:n.name,serie:a,relativeIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:l[2]||(l[2]=r=>{p.value=null,B.value=!1}),style:e.normalizeStyle(`opacity:${e.unref(p)?e.unref(p)===a.id?e.unref(t).style.chart.lines.opacity:.2:e.unref(t).style.chart.lines.opacity}; stroke-dasharray:${a.pathLength}; stroke-dashoffset: ${e.unref(t).useCssAnimation?a.pathLength:0}`)},null,46,Xe),e.unref(h).showTooltip?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M${e.unref(t).style.chart.lines.smooth?a.smoothPath:a.straightPath}`,stroke:"transparent","stroke-width":12,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":e.unref(t).useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:r=>z({shape:n.shape,serieName:n.name,serie:a,relativeIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:l[3]||(l[3]=r=>{p.value=null,B.value=!1}),style:{opacity:"0"}},null,42,Je)):e.createCommentVNode("",!0)]))),256))]))),256)),e.renderSlot(o.$slots,"svg",{svg:e.unref(c)},void 0,!0)],14,Le)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:6,config:{type:"parallelCoordinatePlot",style:{backgroundColor:e.unref(t).style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.unref(t).style.chart.legend.show&&e.unref(x)?(e.openBlock(),e.createBlock(Se.Legend,{key:`legend_${e.unref(R)}`,legendSet:e.unref(be),config:e.unref(ke),onClickMarker:l[4]||(l[4]=({legend:n})=>{Z(n.id),ae(n)})},{item:e.withCtx(({legend:n,index:a})=>[e.createElementVNode("div",{onClick:s=>{n.segregate(),ae(n)},style:e.normalizeStyle(`opacity:${e.unref(y).includes(n.id)?.5:1}`)},e.toDisplayString(n.name),13,Qe)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:e.unref(k)},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:e.unref(h).showTooltip&&e.unref(B),backgroundColor:e.unref(t).style.chart.tooltip.backgroundColor,color:e.unref(t).style.chart.tooltip.color,fontSize:e.unref(t).style.chart.tooltip.fontSize,borderRadius:e.unref(t).style.chart.tooltip.borderRadius,borderColor:e.unref(t).style.chart.tooltip.borderColor,borderWidth:e.unref(t).style.chart.tooltip.borderWidth,backgroundOpacity:e.unref(t).style.chart.tooltip.backgroundOpacity,position:e.unref(t).style.chart.tooltip.position,offsetY:e.unref(t).style.chart.tooltip.offsetY,parent:e.unref(C),content:e.unref(E),isFullscreen:e.unref(w),isCustom:e.unref(i.isFunction)(e.unref(t).style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...e.unref(_)})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...e.unref(_)})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.unref(x)?(e.openBlock(),e.createBlock(Te.default,{key:8,hideDetails:"",config:{open:e.unref(h).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(Ae.DataTable,{key:`table_${e.unref(W)}`,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:l[5]||(l[5]=n=>e.unref(h).showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n},null,8,Ze)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},tt=Ee._export_sfc(et,[["__scopeId","data-v-4eba3ce7"]]);exports.default=tt;
;