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