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