vue-data-ui
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
2 lines (1 loc) • 28.2 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-_gyicZFE.cjs"),he=require("./Title-CsERtJKI.cjs"),ae=require("./usePrinter-BRTNfg7r.cjs"),fe=require("./Tooltip-C06-4zGf.cjs"),ge=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),me=require("./BaseIcon-q0bEOOzl.cjs"),be=require("./vue-ui-accordion-8mzPx86h.cjs"),oe=require("./useNestedProp-BJQoarHp.cjs"),ke=require("./PackageVersion-DHtx9fnE.cjs"),xe=require("./PenAndPaper-DPoMEHE6.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],Be={key:2,style:"width:100%;background:transparent"},Le=["xmlns","viewBox"],$e=["width","height"],Ve=["x","y","width","height","fill","stroke","stroke-width"],Ee=["x","y","width","height","fill","stroke","stroke-width"],Se=["font-size","font-weight","fill","x","y"],Ae=["x","y","width","height","onMouseover"],ze={key:0},Te=["font-size","fill","x","y","font-weight"],Oe={key:1},Me=["text-anchor","font-size","fill","font-weight","transform"],Pe={key:2},Fe=["x","y","width","height","stroke","stroke-width"],De={key:3},Ie=["id"],Re=["stop-color"],qe=["stop-color"],Ue=["x","y","font-size","fill"],He=["x","y","height","rx","fill"],Ge=["x","y","font-size","fill"],Xe=["stroke","x1","x2","y1","y2"],je=["fill","d"],We={key:4},Ye={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Ke=["stop-color"],Je=["stop-color"],Qe=["x","y","width","height","rx"],Ze=["x","y","font-size","fill"],et=["x","y","font-size","fill"],tt=["stroke","x1","x2","y1","y2"],lt=["fill","d"],at={key:5,class:"vue-data-ui-watermark"},ot={key:6,ref:"source",dir:"auto"},st={class:"vue-ui-data-table"},ut={key:0},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it=["data-cell"],dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ct={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:se}){e.useCssVars(l=>({d6e15a20:l.tdo}));const{vue_ui_heatmap:ue}=s.useConfig(),r=L,$=e.computed(()=>!!r.dataset&&r.dataset.length);s.objectIsEmpty(r.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),A=e.ref(null),ne=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),re=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:O,setUserOptionsVisibility:X,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:W}=Ce.useChartAccessibility({config:t.value.style.title});function Y(){const l=oe.useNestedProp({userConfig:r.config,defaultConfig:ue});let a={};return l.theme?a={...oe.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:a=l,r.config&&s.hasDeepProperty(r.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>r.config,l=>{t.value=Y(),O.value=!t.value.userOptions.showOnChartHover,M(),G.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>r.dataset,()=>{M()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=ae.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),de=e.computed(()=>t.value.table.responsiveBreakpoint);function ce(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<de.value})}).observe(U.value)}e.onMounted(M);function M(){ce()}const k=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<r.dataset.length?r.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*r.dataset.length),p=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=r.dataset.flatMap(u=>u.values);return l.reduce((u,n)=>u+n,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<r.dataset.length?r.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),E=e.computed(()=>(r.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ve(l,a,u,n){C.value={x:u,y:n};const{value:d,yAxisName:c,xAxisName:g,id:pe}=l;R.value=pe,f.value=d,_.value={datapoint:l,seriesIndex:a,series:E.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:E.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:E.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/p.value)),B=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/p.value));e.computed(()=>{const l=r.dataset.map(u=>({name:u.name})),a=r.dataset.map(u=>u.values);return{head:l,body:a}});function ee(){e.nextTick(()=>{const l=["",...r.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<r.dataset.length;g+=1)c.push([r.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=s.createCsvContent(u);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ye(l){x.value=l,q.value+=1}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const S=e.ref(!1);function F(){S.value=!S.value}return se({generatePdf:Q,generateCsv:ee,generateImage:Z,toggleTable:te,toggleTooltip:le,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:A,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,svgRef:e.unref(W),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:S.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:re,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(j)||e.unref(O))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(K),uid:w.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(Q),onGenerateCsv:ee,onGenerateImage:e.unref(Z),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:u,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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:W,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ke._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:y.value.width,height:y.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,$e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*n+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Ve),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*n+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Ee),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*n+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,Se)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*n,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ve(d,n,o.value.left+i.value.width*c,o.value.top+i.value.height*n),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,Ae)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*n+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[n]),9,Te)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Me)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Fe)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,qe)],8,Ie)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,He),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ge),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Xe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,je)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Ye,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Je)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Qe),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,et),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,tt)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,lt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(fe._sfc_main,{show:v.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:A.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"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","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(be.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table atom-data-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>v.value.showTable=!1,["enter"]))},[e.createVNode(me.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",st,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",rt,e.toDisplayString(u),1)],12,nt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",dt,e.toDisplayString(isNaN(d.values[n])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,it))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ne))}},vt=_e._export_sfc(ct,[["__scopeId","data-v-83ad9004"]]);exports.default=vt;
;