UNPKG

vue-data-ui

Version:

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

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