vue-data-ui 2.4.47 → 2.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-C3u-U00V.cjs → Arrow-CDz_A4X6.cjs} +1 -1
- package/dist/{Arrow-C-PQX3ZC.js → Arrow-CMGb5jtB.js} +1 -1
- package/dist/{BaseIcon-8y_okNW6.cjs → BaseIcon-CqZOJaZ7.cjs} +1 -1
- package/dist/{BaseIcon-BeAMtwQX.js → BaseIcon-WyM8ZLeS.js} +1 -1
- package/dist/{DataTable-D7JlgAbC.js → DataTable-8Bk6Zg9H.js} +2 -2
- package/dist/{DataTable-CfxOc-In.cjs → DataTable-UQDVIoTq.cjs} +1 -1
- package/dist/{Legend-CEhIHRJc.js → Legend-BqySI7-3.js} +1 -1
- package/dist/{Legend-DDuxh17p.cjs → Legend-DyQhpUa7.cjs} +1 -1
- package/dist/{PackageVersion-8Ql1gdmo.js → PackageVersion-C26iHVPd.js} +1 -1
- package/dist/{PackageVersion-Df1iPzMk.cjs → PackageVersion-JL2H1ZNU.cjs} +1 -1
- package/dist/{PenAndPaper-CvGft3ku.cjs → PenAndPaper-Bmfl9PVt.cjs} +1 -1
- package/dist/{PenAndPaper-b1ZmLra1.js → PenAndPaper-XF8fq-Km.js} +3 -3
- package/dist/{Shape-D3F3Ki5y.cjs → Shape-CbUYortz.cjs} +1 -1
- package/dist/{Shape-CvBLjLSE.js → Shape-Cmue6aoD.js} +1 -1
- package/dist/{Slicer-CHKuuOOo.cjs → Slicer-DJsIXuV_.cjs} +1 -1
- package/dist/{Slicer-CRXNOGCh.js → Slicer-DnI684H6.js} +2 -2
- package/dist/{Title-URF9hufV.cjs → Title-CbiI2XAK.cjs} +1 -1
- package/dist/{Title-_dfoh5WC.js → Title-D5Wtk97z.js} +1 -1
- package/dist/{Tooltip-87gbw8Ir.cjs → Tooltip-CXWymtVK.cjs} +1 -1
- package/dist/{Tooltip-CAkj2Rmy.js → Tooltip-z6v35GbJ.js} +1 -1
- package/dist/{index-BUHajhqq.js → index-BepNt4hC.js} +6 -1
- package/dist/index-DOkp6I9s.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -0
- package/dist/types/vue-data-ui.d.ts +5 -0
- package/dist/{useNestedProp-C-g0SLHN.cjs → useNestedProp-BEjpLG7g.cjs} +1 -1
- package/dist/{useNestedProp-a0uhe7rJ.js → useNestedProp-DUC6XBU3.js} +1 -1
- package/dist/{usePrinter-DLHRtlhI.js → usePrinter-DPvuzbZK.js} +1 -1
- package/dist/{usePrinter-4Zj_RZ5v.cjs → usePrinter-Hc-LICQf.cjs} +1 -1
- package/dist/{vue-data-ui-zjfs-rk-.js → vue-data-ui-CFmnqYD2.js} +60 -60
- package/dist/{vue-data-ui-CPc7dZQe.cjs → vue-data-ui-TUbEwYZ5.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-zI1BF0gA.cjs → vue-ui-3d-bar-CYl_O7ug.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B60j7yco.js → vue-ui-3d-bar-L6JZrkbq.js} +9 -9
- package/dist/{vue-ui-accordion-2QOotHrr.js → vue-ui-accordion-C2pYIHIH.js} +3 -3
- package/dist/{vue-ui-accordion-C0oMKEv0.cjs → vue-ui-accordion-C8xohumC.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-hZLKWqN9.cjs → vue-ui-age-pyramid-CRXWyh5c.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BT7HUZpj.js → vue-ui-age-pyramid-CSCtiUKQ.js} +10 -10
- package/dist/{vue-ui-annotator-ZpGqgGMp.js → vue-ui-annotator-5Mjqr97s.js} +1 -1
- package/dist/{vue-ui-annotator-Da8-IgfK.cjs → vue-ui-annotator-DIETLcfO.cjs} +1 -1
- package/dist/{vue-ui-bullet-BfkujrD0.cjs → vue-ui-bullet-B5MHoDHB.cjs} +1 -1
- package/dist/{vue-ui-bullet-Da56_P30.js → vue-ui-bullet-C6EHD4J1.js} +8 -8
- package/dist/{vue-ui-candlestick-CblCXKhS.js → vue-ui-candlestick-BrJoYH2t.js} +11 -11
- package/dist/{vue-ui-candlestick-fM3nUsgr.cjs → vue-ui-candlestick-CYMynB3E.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-B1U41lku.js → vue-ui-carousel-table-BtNgnJg3.js} +4 -4
- package/dist/{vue-ui-carousel-table-D3rcSdcC.cjs → vue-ui-carousel-table-ZPuYe12-.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Cnvf2Aav.js → vue-ui-chestnut-BGyD7s_L.js} +8 -8
- package/dist/{vue-ui-chestnut-CtMm9Hev.cjs → vue-ui-chestnut-C1en00jI.cjs} +1 -1
- package/dist/{vue-ui-cursor-C-7zi0ol.cjs → vue-ui-cursor-BP38xePQ.cjs} +1 -1
- package/dist/{vue-ui-cursor-TzS0sCy1.js → vue-ui-cursor-DR2RWF24.js} +2 -2
- package/dist/{vue-ui-dashboard-DdMkGnE7.cjs → vue-ui-dashboard-BYygSPuJ.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ajvddjlt.js → vue-ui-dashboard-BpOAi1fs.js} +2 -2
- package/dist/{vue-ui-digits-DwB-tHKl.cjs → vue-ui-digits-C7sdWmoo.cjs} +1 -1
- package/dist/{vue-ui-digits-CBPttkF2.js → vue-ui-digits-DNrXa7E_.js} +2 -2
- package/dist/{vue-ui-donut-DidXxdXO.js → vue-ui-donut-95iv1pkT.js} +11 -11
- package/dist/{vue-ui-donut-Cz6xpVSC.cjs → vue-ui-donut-BbBw5pWR.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-B0xdulgT.js → vue-ui-donut-evolution-BneXLHZF.js} +11 -11
- package/dist/{vue-ui-donut-evolution-Dj73srrD.cjs → vue-ui-donut-evolution-DpECkYLY.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Cimude8K.js → vue-ui-dumbbell-B_T3Hlzb.js} +10 -10
- package/dist/{vue-ui-dumbbell-BdwXaRk2.cjs → vue-ui-dumbbell-lnqC1mak.cjs} +1 -1
- package/dist/{vue-ui-flow-DMNNOEJy.cjs → vue-ui-flow-DgsufNuK.cjs} +1 -1
- package/dist/{vue-ui-flow-D2ekJwov.js → vue-ui-flow-PsQyq54b.js} +9 -9
- package/dist/{vue-ui-funnel-BsKFz_A9.js → vue-ui-funnel-CxZYQkNb.js} +8 -8
- package/dist/{vue-ui-funnel-DLmzVrrA.cjs → vue-ui-funnel-Cz5qLXEC.cjs} +1 -1
- package/dist/{vue-ui-galaxy-WAy90dGq.js → vue-ui-galaxy-4EZM6VGD.js} +11 -11
- package/dist/{vue-ui-galaxy-CnZYKQA2.cjs → vue-ui-galaxy-C97nWRvH.cjs} +1 -1
- package/dist/{vue-ui-gauge-DhqOgkfq.cjs → vue-ui-gauge-BC0zGvqM.cjs} +1 -1
- package/dist/{vue-ui-gauge-Xvk_SGCc.js → vue-ui-gauge-CFy3oMIA.js} +7 -7
- package/dist/{vue-ui-gizmo-D-djUfJw.js → vue-ui-gizmo-BQlJhilX.js} +3 -3
- package/dist/{vue-ui-gizmo-B6qoNeBK.cjs → vue-ui-gizmo-BUfBljdr.cjs} +1 -1
- package/dist/{vue-ui-heatmap-jmKDOYnr.js → vue-ui-heatmap-Dyz8arCQ.js} +10 -10
- package/dist/{vue-ui-heatmap-CitZU9av.cjs → vue-ui-heatmap-zi279cjp.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BoR791Gc.js → vue-ui-history-plot-1KwhLYwx.js} +11 -11
- package/dist/{vue-ui-history-plot-EzFdtBwU.cjs → vue-ui-history-plot-BXZTRkzT.cjs} +1 -1
- package/dist/{vue-ui-kpi-CMXhw4Ll.cjs → vue-ui-kpi-BsjkNZZH.cjs} +1 -1
- package/dist/{vue-ui-kpi-CB47PO72.js → vue-ui-kpi-DjLKxPTS.js} +3 -3
- package/dist/{vue-ui-mini-loader-D4dKItUb.js → vue-ui-mini-loader-Be51Zm_Q.js} +2 -2
- package/dist/{vue-ui-mini-loader-DJx2b1Hs.cjs → vue-ui-mini-loader-UKOzmxaD.cjs} +1 -1
- package/dist/{vue-ui-molecule-C_VM1ZP2.js → vue-ui-molecule-DUQo9_oj.js} +11 -11
- package/dist/{vue-ui-molecule-CnERhdxF.cjs → vue-ui-molecule-wgNYpLlg.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BBlokNSE.cjs → vue-ui-mood-radar-D-sMgA1m.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BESMMSxA.js → vue-ui-mood-radar-D260gFQ-.js} +11 -11
- package/dist/{vue-ui-nested-donuts-r1v-A7E3.js → vue-ui-nested-donuts-Ccz2llkz.js} +11 -11
- package/dist/{vue-ui-nested-donuts-C0IAo5oO.cjs → vue-ui-nested-donuts-DCATiNcn.cjs} +1 -1
- package/dist/{vue-ui-onion-CZuFxIOX.js → vue-ui-onion-4nwZ2Xcq.js} +11 -11
- package/dist/{vue-ui-onion-PaHP7qHI.cjs → vue-ui-onion-jbgqZma_.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Bwu4Q1dB.cjs → vue-ui-parallel-coordinate-plot-D8tDqhAC.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BeAArg3p.js → vue-ui-parallel-coordinate-plot-b9zBOm3l.js} +12 -12
- package/dist/{vue-ui-quadrant-BLpgNZs9.cjs → vue-ui-quadrant-BPbKAs_R.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D5m9y_Vd.js → vue-ui-quadrant-DyhFsYAn.js} +12 -12
- package/dist/{vue-ui-quick-chart-CZ6gBVVk.cjs → vue-ui-quick-chart-BjjeoplC.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Ci4RKL62.js → vue-ui-quick-chart-kBVlNtAe.js} +9 -9
- package/dist/{vue-ui-radar-Ca1AvJAF.cjs → vue-ui-radar-Cax_LlVW.cjs} +1 -1
- package/dist/{vue-ui-radar-03mjX9gn.js → vue-ui-radar-WzkdQND3.js} +12 -12
- package/dist/{vue-ui-rating-CSSdVGTk.js → vue-ui-rating-BLj-bxOZ.js} +2 -2
- package/dist/{vue-ui-rating-Dilq1rrJ.cjs → vue-ui-rating-W2x5oPbH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DsckG4af.cjs → vue-ui-relation-circle-BC09Wo74.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-B3J9KW9u.js → vue-ui-relation-circle-Cy7KZjJK.js} +7 -7
- package/dist/{vue-ui-rings-COAgson6.js → vue-ui-rings-B2r_HrM3.js} +11 -11
- package/dist/{vue-ui-rings-6g022zEh.cjs → vue-ui-rings-BEBxWNzs.cjs} +1 -1
- package/dist/{vue-ui-scatter-BrdWaLV6.js → vue-ui-scatter-BzsoN90E.js} +12 -12
- package/dist/{vue-ui-scatter-B3t_Q_4g.cjs → vue-ui-scatter-EbhOyS1b.cjs} +1 -1
- package/dist/{vue-ui-screenshot-NpTxyR66.cjs → vue-ui-screenshot-BNvphTTn.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CWMAfSH3.js → vue-ui-screenshot-D-CteYvP.js} +1 -1
- package/dist/{vue-ui-skeleton-BXPvqUO_.js → vue-ui-skeleton-Dm5B1MER.js} +3 -3
- package/dist/{vue-ui-skeleton-D6mdHYxB.cjs → vue-ui-skeleton-G8jk4hcj.cjs} +1 -1
- package/dist/{vue-ui-smiley-BIAA0JuB.cjs → vue-ui-smiley-DQYXvPr4.cjs} +1 -1
- package/dist/{vue-ui-smiley-TNgEIMFs.js → vue-ui-smiley-H4VJmgZj.js} +2 -2
- package/dist/{vue-ui-spark-trend-BWb59zfs.cjs → vue-ui-spark-trend-DA096qRZ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Xtb0H-Ra.js → vue-ui-spark-trend-t_PBPjL2.js} +5 -5
- package/dist/{vue-ui-sparkbar-mgvNuWjK.cjs → vue-ui-sparkbar-Bx-gf5Hz.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CO0RYq4S.js → vue-ui-sparkbar-xh4kHNcW.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CfgH_pIo.cjs → vue-ui-sparkgauge--atMedaJ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cn17RyPJ.js → vue-ui-sparkgauge-BfVnT-Cl.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-yTF-QJCM.js → vue-ui-sparkhistogram-BHE8M9AE.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-BU1jgcm9.cjs → vue-ui-sparkhistogram-zunUFhA0.cjs} +1 -1
- package/dist/{vue-ui-sparkline-D80w9cUt.js → vue-ui-sparkline-B6SKeGhK.js} +4 -4
- package/dist/{vue-ui-sparkline-3ym-6DFE.cjs → vue-ui-sparkline-CvxWwt_w.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DhQNOgjS.js → vue-ui-sparkstackbar-B_KMgwOl.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-C1zVZqZh.cjs → vue-ui-sparkstackbar-Bhd7EKGG.cjs} +1 -1
- package/dist/{vue-ui-stackbar-C_b754Op.js → vue-ui-stackbar-C_P0JG4w.js} +12 -12
- package/dist/{vue-ui-stackbar-yiVhLavI.cjs → vue-ui-stackbar-suSeRgaG.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CqP7E3Fr.js → vue-ui-strip-plot-BUA3moHw.js} +11 -11
- package/dist/{vue-ui-strip-plot-CK-U0tNX.cjs → vue-ui-strip-plot-CWMQUeOe.cjs} +1 -1
- package/dist/{vue-ui-table-x2Ylaftx.cjs → vue-ui-table-BYmYQISh.cjs} +1 -1
- package/dist/{vue-ui-table-BLPLqFFd.js → vue-ui-table-BcFkS1Cj.js} +1 -1
- package/dist/{vue-ui-table-heatmap-jWG59f0S.js → vue-ui-table-heatmap-Bvt_J2PP.js} +4 -4
- package/dist/{vue-ui-table-heatmap-2Qm41w8P.cjs → vue-ui-table-heatmap-JK93Wb5V.cjs} +1 -1
- package/dist/vue-ui-table-sparkline-B7_CaLRt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-CFqGNvWi.js +573 -0
- package/dist/{vue-ui-thermometer-DVPaZfi5.cjs → vue-ui-thermometer-Dh844EJO.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CS4v4vKk.js → vue-ui-thermometer-Dm0ttenA.js} +7 -7
- package/dist/{vue-ui-timer-op_p9xjL.js → vue-ui-timer-CaFTEmwe.js} +5 -5
- package/dist/{vue-ui-timer-Bu17pe7S.cjs → vue-ui-timer-LypwXXDJ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CzNBUmn2.js → vue-ui-tiremarks-Bgm_MUY2.js} +7 -7
- package/dist/{vue-ui-tiremarks-CoKFLMWh.cjs → vue-ui-tiremarks-CFgv3kS8.cjs} +1 -1
- package/dist/{vue-ui-treemap-DXU0BagE.cjs → vue-ui-treemap--2oLnl5Z.cjs} +1 -1
- package/dist/{vue-ui-treemap-DLDn1gQ2.js → vue-ui-treemap-CERIO7kA.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BlG3HwaX.cjs → vue-ui-vertical-bar-B6P0pW6h.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BqTIL5Np.js → vue-ui-vertical-bar-BErNHsoK.js} +11 -11
- package/dist/{vue-ui-waffle-CaTFfTmj.cjs → vue-ui-waffle-BlsD3mo7.cjs} +1 -1
- package/dist/{vue-ui-waffle-DFjArEi_.js → vue-ui-waffle-DwXtzgfk.js} +11 -11
- package/dist/{vue-ui-wheel-B22xmLY4.cjs → vue-ui-wheel-Bnlv4BkN.cjs} +1 -1
- package/dist/{vue-ui-wheel-C95mjUTI.js → vue-ui-wheel-C57mnBKi.js} +7 -7
- package/dist/{vue-ui-word-cloud-Byx-M5Jn.js → vue-ui-word-cloud-C9dIGLRl.js} +10 -10
- package/dist/{vue-ui-word-cloud-05iWIjGT.cjs → vue-ui-word-cloud-MQ4ipLvb.cjs} +1 -1
- package/dist/{vue-ui-xy-lPnzrWt8.cjs → vue-ui-xy-BLxO3c8J.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-Cg0PIT5i.js → vue-ui-xy-canvas-RNuxMqDq.js} +11 -11
- package/dist/{vue-ui-xy-canvas-os8jbTXb.cjs → vue-ui-xy-canvas-xlIskwwx.cjs} +1 -1
- package/dist/{vue-ui-xy-C8YrIKK6.js → vue-ui-xy-t9BzKivu.js} +14 -14
- package/package.json +1 -1
- package/dist/index-KYU_8xrX.cjs +0 -9
- package/dist/vue-ui-table-sparkline-BEeO-aWa.js +0 -516
- package/dist/vue-ui-table-sparkline-C0vzS1F3.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-KYU_8xrX.cjs"),re=require("./Legend-DDuxh17p.cjs"),ne=require("./Title-URF9hufV.cjs"),se=require("./Tooltip-87gbw8Ir.cjs"),ue=require("./DataTable-CfxOc-In.cjs"),U=require("./usePrinter-4Zj_RZ5v.cjs"),ie=require("./vue-ui-skeleton-D6mdHYxB.cjs"),ce=require("./vue-ui-accordion-C0oMKEv0.cjs"),H=require("./useNestedProp-C-g0SLHN.cjs"),de=require("./PackageVersion-Df1iPzMk.cjs"),ve=require("./PenAndPaper-CvGft3ku.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=["id"],fe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ye={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},ge=["xmlns","viewBox"],me=["id"],be=["stdDeviation"],ke=["d","stroke","stroke-width"],Ce=["d","stroke","stroke-width"],we=["filter"],xe=["d","stroke","stroke-width"],$e=["d","stroke-width","onMouseenter","onClick"],Be={key:5,class:"vue-data-ui-watermark"},Ne=["onClick"],Te={key:0},_e={key:1},Se={key:8,ref:"source",dir:"auto"},Pe=["innerHTML"],Ve={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(X,{expose:j,emit:S}){const i=X,{vue_ui_galaxy:Y}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),k=e.ref(null),J=e.ref(null),x=e.ref(!1),$=e.ref(""),c=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),F=e.ref(0),t=e.computed({get:()=>O(),set:l=>l});function O(){const l=H.useNestedProp({userConfig:i.config,defaultConfig:Y});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=O(),P(),E.value+=1,L.value+=1,F.value+=1},{deep:!0});const{isPrinting:A,isImaging:I,generatePdf:z,generateImage:D}=U.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),K=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),B=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),S("selectLegend",m.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const h=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Q.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function Z(){return h.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),ee=e.ref(190),q=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id))),m=e.computed(()=>{const l=[];for(let a=0;a<q.value.length;a+=1){const o=q.value[a];let n=o.value/d.value*ee.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function te(l){y.value=l,V.value+=1}const T=e.ref(null);function le({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){T.value={datapoint:l,seriesIndex:o,series:h.value,config:t.value},x.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}))?$.value=f({seriesIndex:o,datapoint:l,series:h.value,config:t.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;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),$.value=`<div>${s}</div>`)}const G=e.computed(()=>h.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),oe=e.computed(()=>({cy:"galaxy-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":""})),p=e.computed(()=>{const l=m.value.map(o=>({name:o.name,color:o.color})),a=m.value.map(o=>o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=p.value.head.map((n,s)=>[[n.name],[p.value.body[s]],[isNaN(p.value.body[s]/d.value)?"-":p.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=p.value.head.map((s,f)=>{const ae=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ae,isNaN(p.value.body[f]/d.value)?"-":r.dataLabel({v:p.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={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};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function W(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function _(){w.value=!w.value}return j({getData:Z,generatePdf:z,generateCsv:M,generateImage:D,toggleTable:W,toggleTooltip:R,toggleAnnotator:_}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:k,class:e.normalizeClass(`vue-ui-galaxy ${y.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",fe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(I),uid:g.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:te,onGeneratePdf:e.unref(z),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:W,onToggleTooltip:R,onToggleAnnotator:_},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:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(de._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,be)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ke)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ce)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,xe)],8,we)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>le({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,c.value=null}),onClick:s=>S("selectDatapoint",o)},null,40,$e)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:B.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(re.Legend,{key:`legend_${F.value}`,legendSet:G.value,config:oe.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Te," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:G.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(ce.default,{key:9,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(ue.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Pe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,he))}},Ee=pe._export_sfc(Ve,[["__scopeId","data-v-9c1d1614"]]);exports.default=Ee;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DOkp6I9s.cjs"),re=require("./Legend-DyQhpUa7.cjs"),ne=require("./Title-CbiI2XAK.cjs"),se=require("./Tooltip-CXWymtVK.cjs"),ue=require("./DataTable-UQDVIoTq.cjs"),U=require("./usePrinter-Hc-LICQf.cjs"),ie=require("./vue-ui-skeleton-G8jk4hcj.cjs"),ce=require("./vue-ui-accordion-C8xohumC.cjs"),H=require("./useNestedProp-BEjpLG7g.cjs"),de=require("./PackageVersion-JL2H1ZNU.cjs"),ve=require("./PenAndPaper-Bmfl9PVt.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=["id"],fe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ye={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},ge=["xmlns","viewBox"],me=["id"],be=["stdDeviation"],ke=["d","stroke","stroke-width"],Ce=["d","stroke","stroke-width"],we=["filter"],xe=["d","stroke","stroke-width"],$e=["d","stroke-width","onMouseenter","onClick"],Be={key:5,class:"vue-data-ui-watermark"},Ne=["onClick"],Te={key:0},_e={key:1},Se={key:8,ref:"source",dir:"auto"},Pe=["innerHTML"],Ve={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(X,{expose:j,emit:S}){const i=X,{vue_ui_galaxy:Y}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),k=e.ref(null),J=e.ref(null),x=e.ref(!1),$=e.ref(""),c=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),F=e.ref(0),t=e.computed({get:()=>O(),set:l=>l});function O(){const l=H.useNestedProp({userConfig:i.config,defaultConfig:Y});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=O(),P(),E.value+=1,L.value+=1,F.value+=1},{deep:!0});const{isPrinting:A,isImaging:I,generatePdf:z,generateImage:D}=U.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),K=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),B=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),S("selectLegend",m.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const h=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Q.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function Z(){return h.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),ee=e.ref(190),q=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id))),m=e.computed(()=>{const l=[];for(let a=0;a<q.value.length;a+=1){const o=q.value[a];let n=o.value/d.value*ee.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function te(l){y.value=l,V.value+=1}const T=e.ref(null);function le({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){T.value={datapoint:l,seriesIndex:o,series:h.value,config:t.value},x.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}))?$.value=f({seriesIndex:o,datapoint:l,series:h.value,config:t.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;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),$.value=`<div>${s}</div>`)}const G=e.computed(()=>h.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),oe=e.computed(()=>({cy:"galaxy-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":""})),p=e.computed(()=>{const l=m.value.map(o=>({name:o.name,color:o.color})),a=m.value.map(o=>o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=p.value.head.map((n,s)=>[[n.name],[p.value.body[s]],[isNaN(p.value.body[s]/d.value)?"-":p.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=p.value.head.map((s,f)=>{const ae=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ae,isNaN(p.value.body[f]/d.value)?"-":r.dataLabel({v:p.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={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};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function W(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function _(){w.value=!w.value}return j({getData:Z,generatePdf:z,generateCsv:M,generateImage:D,toggleTable:W,toggleTooltip:R,toggleAnnotator:_}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:k,class:e.normalizeClass(`vue-ui-galaxy ${y.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",fe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(I),uid:g.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:te,onGeneratePdf:e.unref(z),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:W,onToggleTooltip:R,onToggleAnnotator:_},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:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(de._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,be)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ke)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ce)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,xe)],8,we)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>le({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,c.value=null}),onClick:s=>S("selectDatapoint",o)},null,40,$e)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:B.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(re.Legend,{key:`legend_${F.value}`,legendSet:G.value,config:oe.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Te," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:G.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(ce.default,{key:9,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(ue.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Pe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,he))}},Ee=pe._export_sfc(Ve,[["__scopeId","data-v-9c1d1614"]]);exports.default=Ee;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-KYU_8xrX.cjs"),j=require("./useResponsive-BJ7DTGpm.cjs"),q=require("./usePrinter-4Zj_RZ5v.cjs"),ue=require("./vue-ui-skeleton-D6mdHYxB.cjs"),ie=require("./Title-URF9hufV.cjs"),W=require("./useNestedProp-C-g0SLHN.cjs"),ce=require("./PackageVersion-Df1iPzMk.cjs"),ve=require("./PenAndPaper-CvGft3ku.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=["id"],me={key:0},fe=["xmlns","viewBox"],ye=["id"],pe=["stop-color"],ke=["stop-color"],ge=["stop-color"],be=["id"],xe=["stdDeviation"],_e=["d","fill","stroke"],Se=["id","d"],Be=["fill","font-size","font-weight"],we=["href","startOffset"],Ce=["x","y","text-anchor","fill","font-size","font-weight"],Ne=["d","filter"],Fe=["stroke","stroke-width"],ze=["stroke","stroke-width"],Pe=["stroke","stroke-width"],Ee=["stroke","stroke-width"],$e={key:4},Me=["x","y","text-anchor","font-size","font-weight","fill"],Oe=["x","y","font-size","font-weight","fill"],Ve={key:6},Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke-width","filter"],Ae={key:7},Re=["d","fill","stroke","stroke-width"],Le=["cx","cy","fill","r","stroke-width","stroke"],De=["x","y","font-size","fill"],Ge={key:5,class:"vue-data-ui-watermark"},Te={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:U}){const c=C,{vue_ui_gauge:H}=r.useConfig(),S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),y=e.ref(r.createUid()),Z=e.ref(null),z=e.ref(0),g=e.ref(null),P=e.ref(null),E=e.ref(null),$=e.ref(null),M=e.ref(null),O=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});e.watch(()=>c.config,l=>{t.value=V(),L(),O.value+=1},{deep:!0});function V(){const l=W.useNestedProp({userConfig:c.config,defaultConfig:H});return l.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_gauge[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}const{isPrinting:X,isImaging:Y,generatePdf:I,generateImage:A}=q.usePrinter({elementId:`vue-ui-gauge_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),J=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),K=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!S.value||r.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const l=[];(c.dataset.series||[]).forEach(a=>{l.push(a.from||1e-7),l.push(a.to||1e-7)});const s=Math.max(...l);return{...c.dataset,series:(c.dataset.series||[]).map((a,n)=>({...a,color:r.convertColorToHex(a.color)||K.value[n]||r.palette[n],value:((a.to||0)-(a.from||0))/s*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),x=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:c.dataset.value);e.watch(()=>c.dataset.value,()=>{D(c.dataset.value)});const u=e.computed(()=>{const l=o.value.width/2,s=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI;return{x1:l,y1:s,x2:l+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(a),y2:s+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(a)}}),R=e.computed(()=>{const l=o.value.width/2,s=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI,n=l+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(a),m=s+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(a),f=o.value.pointerRadius,oe=l+f*Math.cos(a+Math.PI/2),re=s+f*Math.sin(a+Math.PI/2),ne=l+f*Math.cos(a-Math.PI/2),se=s+f*Math.sin(a-Math.PI/2);return isNaN(n)?null:`M ${n},${m} ${oe},${re} ${ne},${se} Z`}),N=e.computed(()=>{for(let l=0;l<p.value.series.length;l+=1){const{color:s,from:a,to:n}=p.value.series[l];if(v.value>=a&&v.value<=n)return s}return"#2D353C"}),B=e.ref(null);function L(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:l})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["from","to"]}).forEach(a=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:a,index:s})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),D(c.dataset.value||0),t.value.responsive){const l=j.throttle(()=>{const{width:s,height:a}=j.useResponsive({chart:g.value,title:t.value.style.chart.title.text?P.value:null,legend:E.value,source:$.value,noTitle:M.value});o.value.width=s,o.value.height=a,o.value.centerX=s/2,o.value.centerY=h.value/2/358.4*a,o.value.bottom=a,o.value.labelFontSize=18/h.value*Math.min(a,s)<10?10:18/h.value*Math.min(a,s),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(a,s)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(a,s),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(a,s),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(a,s),o.value.pointerStrokeWidth=r.translateSize({relator:Math.min(s,a),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=r.translateSize({relator:Math.max(s,a),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=r.translateSize({relator:Math.min(s,a),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});B.value=new ResizeObserver(l),B.value.observe(g.value.parentNode)}}e.onMounted(()=>{L()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function D(l){const s=[];(p.value.series||[]).forEach(f=>{s.push(f.from||0),s.push(f.to||0)}),b.value=Math.max(...s),x.value=Math.min(...s);let a=t.value.style.chart.animation.speed;const n=Math.abs(l-v.value)/(a*60);function m(){v.value<l?v.value=Math.min(v.value+n,l):v.value>l&&(v.value=Math.max(v.value-n,l)),v.value!==l&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const l=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,s=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:l/s,gradients:l/(s*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),d=e.computed(()=>r.makeDonut({series:p.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),Q=e.computed(()=>r.makeDonut({series:p.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),k=e.computed(()=>d.value.map(l=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(l.nameOffsetRatio||1))),G=e.computed(()=>{const{x:l,y:s}=r.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:a,y:n}=r.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:l,y1:s,x2:a,y2:n}}),T=e.computed(()=>d.value.map(l=>{const{x:s,y:a}=r.offsetFromCenterPoint({initX:l.separator.x,initY:l.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:n,y:m}=r.offsetFromCenterPoint({initX:l.endX,initY:l.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:s,y1:a,x2:n,y2:m}}));function ee(l){if(l.reduce((m,f)=>m+f,0)>100)throw new Error("Total % must not exceed 100");const a=50;let n=0;return l.map(m=>(n+=m,`${n/100*a-m/4}%`))}const te=e.computed(()=>ee(d.value.map(l=>l.proportion*100))),ae=e.computed(()=>r.makeDonut({series:p.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),_=e.ref(!1);function le(l){_.value=l,z.value+=1}const w=e.ref(!1);function F(){w.value=!w.value}return U({generatePdf:I,generateImage:A,toggleAnnotator:F}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${_.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:g,id:`vue-ui-gauge_${y.value}`,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%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,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:P,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(q.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(X),uid:y.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:le,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(A),onToggleAnnotator:F},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}: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:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ce._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${y.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,pe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(r.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,ge)],8,ye)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,xe)],8,be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${n}`,d:a.arcSlice,fill:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,_e))),128)),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${y.value}_${n}`,d:`M ${u.value.x1},${u.value.y1} m -${k.value[n]},0 a ${k.value[n]},${k.value[n]} 0 1,1 ${2*k.value[n]},0 a ${k.value[n]},${k.value[n]} 0 1,1 -${2*k.value[n]},0`,fill:"transparent"},null,8,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${y.value}_${n}`,startOffset:te.value[n]},e.toDisplayString(a.name||""),9,we)],8,Be))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Q.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.center.endX,y:a.center.endY,"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(a.name||""),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ae.value,(a,n)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${n}`,d:a.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${y.value})`},null,8,Ne))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("line",e.mergeProps(G.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Fe),e.createElementVNode("line",e.mergeProps(G.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,ze),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ee))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:o.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:o.value.markerOffset}).y,"text-anchor":a.center.startX<u.value.x1-5?"end":a.center.startX>u.value.x1+5?"start":"middle","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.markers.formatter,a.from,e.unref(r.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:a.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Me))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:e.unref(r.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).y,"text-anchor":"start","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Oe)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Ve,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":o.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Xe)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?N.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.7},null,8,Ye)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.3,filter:`url(#blur_${y.value})`},null,8,Ie)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ae,[R.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:R.value,fill:t.value.style.chart.layout.pointer.useRatingColor?N.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,Re)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:o.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:o.value.pointerRadius<=0?1e-4:o.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Le),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:8,x:o.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":o.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?N.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,De)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],14,he))}},je=de._export_sfc(Te,[["__scopeId","data-v-cb288169"]]);exports.default=je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DOkp6I9s.cjs"),j=require("./useResponsive-BJ7DTGpm.cjs"),q=require("./usePrinter-Hc-LICQf.cjs"),ue=require("./vue-ui-skeleton-G8jk4hcj.cjs"),ie=require("./Title-CbiI2XAK.cjs"),W=require("./useNestedProp-BEjpLG7g.cjs"),ce=require("./PackageVersion-JL2H1ZNU.cjs"),ve=require("./PenAndPaper-Bmfl9PVt.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=["id"],me={key:0},fe=["xmlns","viewBox"],ye=["id"],pe=["stop-color"],ke=["stop-color"],ge=["stop-color"],be=["id"],xe=["stdDeviation"],_e=["d","fill","stroke"],Se=["id","d"],Be=["fill","font-size","font-weight"],we=["href","startOffset"],Ce=["x","y","text-anchor","fill","font-size","font-weight"],Ne=["d","filter"],Fe=["stroke","stroke-width"],ze=["stroke","stroke-width"],Pe=["stroke","stroke-width"],Ee=["stroke","stroke-width"],$e={key:4},Me=["x","y","text-anchor","font-size","font-weight","fill"],Oe=["x","y","font-size","font-weight","fill"],Ve={key:6},Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke-width","filter"],Ae={key:7},Re=["d","fill","stroke","stroke-width"],Le=["cx","cy","fill","r","stroke-width","stroke"],De=["x","y","font-size","fill"],Ge={key:5,class:"vue-data-ui-watermark"},Te={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:U}){const c=C,{vue_ui_gauge:H}=r.useConfig(),S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),y=e.ref(r.createUid()),Z=e.ref(null),z=e.ref(0),g=e.ref(null),P=e.ref(null),E=e.ref(null),$=e.ref(null),M=e.ref(null),O=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});e.watch(()=>c.config,l=>{t.value=V(),L(),O.value+=1},{deep:!0});function V(){const l=W.useNestedProp({userConfig:c.config,defaultConfig:H});return l.theme?{...W.useNestedProp({userConfig:r.themes.vue_ui_gauge[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}const{isPrinting:X,isImaging:Y,generatePdf:I,generateImage:A}=q.usePrinter({elementId:`vue-ui-gauge_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),J=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),K=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!S.value||r.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const l=[];(c.dataset.series||[]).forEach(a=>{l.push(a.from||1e-7),l.push(a.to||1e-7)});const s=Math.max(...l);return{...c.dataset,series:(c.dataset.series||[]).map((a,n)=>({...a,color:r.convertColorToHex(a.color)||K.value[n]||r.palette[n],value:((a.to||0)-(a.from||0))/s*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),x=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:c.dataset.value);e.watch(()=>c.dataset.value,()=>{D(c.dataset.value)});const u=e.computed(()=>{const l=o.value.width/2,s=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI;return{x1:l,y1:s,x2:l+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(a),y2:s+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(a)}}),R=e.computed(()=>{const l=o.value.width/2,s=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI,n=l+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(a),m=s+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(a),f=o.value.pointerRadius,oe=l+f*Math.cos(a+Math.PI/2),re=s+f*Math.sin(a+Math.PI/2),ne=l+f*Math.cos(a-Math.PI/2),se=s+f*Math.sin(a-Math.PI/2);return isNaN(n)?null:`M ${n},${m} ${oe},${re} ${ne},${se} Z`}),N=e.computed(()=>{for(let l=0;l<p.value.series.length;l+=1){const{color:s,from:a,to:n}=p.value.series[l];if(v.value>=a&&v.value<=n)return s}return"#2D353C"}),B=e.ref(null);function L(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:l})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["from","to"]}).forEach(a=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:a,index:s})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),D(c.dataset.value||0),t.value.responsive){const l=j.throttle(()=>{const{width:s,height:a}=j.useResponsive({chart:g.value,title:t.value.style.chart.title.text?P.value:null,legend:E.value,source:$.value,noTitle:M.value});o.value.width=s,o.value.height=a,o.value.centerX=s/2,o.value.centerY=h.value/2/358.4*a,o.value.bottom=a,o.value.labelFontSize=18/h.value*Math.min(a,s)<10?10:18/h.value*Math.min(a,s),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(a,s)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(a,s),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(a,s),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(a,s),o.value.pointerStrokeWidth=r.translateSize({relator:Math.min(s,a),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=r.translateSize({relator:Math.max(s,a),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=r.translateSize({relator:Math.min(s,a),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});B.value=new ResizeObserver(l),B.value.observe(g.value.parentNode)}}e.onMounted(()=>{L()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function D(l){const s=[];(p.value.series||[]).forEach(f=>{s.push(f.from||0),s.push(f.to||0)}),b.value=Math.max(...s),x.value=Math.min(...s);let a=t.value.style.chart.animation.speed;const n=Math.abs(l-v.value)/(a*60);function m(){v.value<l?v.value=Math.min(v.value+n,l):v.value>l&&(v.value=Math.max(v.value-n,l)),v.value!==l&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const l=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,s=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:l/s,gradients:l/(s*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),d=e.computed(()=>r.makeDonut({series:p.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),Q=e.computed(()=>r.makeDonut({series:p.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),k=e.computed(()=>d.value.map(l=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(l.nameOffsetRatio||1))),G=e.computed(()=>{const{x:l,y:s}=r.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:a,y:n}=r.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:l,y1:s,x2:a,y2:n}}),T=e.computed(()=>d.value.map(l=>{const{x:s,y:a}=r.offsetFromCenterPoint({initX:l.separator.x,initY:l.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:n,y:m}=r.offsetFromCenterPoint({initX:l.endX,initY:l.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:s,y1:a,x2:n,y2:m}}));function ee(l){if(l.reduce((m,f)=>m+f,0)>100)throw new Error("Total % must not exceed 100");const a=50;let n=0;return l.map(m=>(n+=m,`${n/100*a-m/4}%`))}const te=e.computed(()=>ee(d.value.map(l=>l.proportion*100))),ae=e.computed(()=>r.makeDonut({series:p.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),_=e.ref(!1);function le(l){_.value=l,z.value+=1}const w=e.ref(!1);function F(){w.value=!w.value}return U({generatePdf:I,generateImage:A,toggleAnnotator:F}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${_.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:g,id:`vue-ui-gauge_${y.value}`,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%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,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:P,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(q.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(X),uid:y.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:le,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(A),onToggleAnnotator:F},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}: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:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ce._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${y.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,pe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(r.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)("#FFFFFF",1)},null,8,ge)],8,ye)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,xe)],8,be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${n}`,d:a.arcSlice,fill:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,_e))),128)),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${y.value}_${n}`,d:`M ${u.value.x1},${u.value.y1} m -${k.value[n]},0 a ${k.value[n]},${k.value[n]} 0 1,1 ${2*k.value[n]},0 a ${k.value[n]},${k.value[n]} 0 1,1 -${2*k.value[n]},0`,fill:"transparent"},null,8,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${y.value}_${n}`,startOffset:te.value[n]},e.toDisplayString(a.name||""),9,we)],8,Be))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Q.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.center.endX,y:a.center.endY,"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(a.name||""),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ae.value,(a,n)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${n}`,d:a.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${y.value})`},null,8,Ne))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("line",e.mergeProps(G.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Fe),e.createElementVNode("line",e.mergeProps(G.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,ze),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ee))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:o.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:o.value.markerOffset}).y,"text-anchor":a.center.startX<u.value.x1-5?"end":a.center.startX>u.value.x1+5?"start":"middle","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.markers.formatter,a.from,e.unref(r.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:a.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Me))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:e.unref(r.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).y,"text-anchor":"start","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Oe)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Ve,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":o.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Xe)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?N.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.7},null,8,Ye)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.3,filter:`url(#blur_${y.value})`},null,8,Ie)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ae,[R.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:R.value,fill:t.value.style.chart.layout.pointer.useRatingColor?N.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,Re)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:o.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:o.value.pointerRadius<=0?1e-4:o.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Le),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:8,x:o.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":o.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?N.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,De)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],14,he))}},je=de._export_sfc(Te,[["__scopeId","data-v-cb288169"]]);exports.default=je;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed as y, ref as d, watch as he, onMounted as Xe, onBeforeUnmount as Ye, openBlock as o, createElementBlock as u, normalizeClass as de, normalizeStyle as ye, createBlock as R, createCommentVNode as h, withCtx as X, toDisplayString as C, unref as c, createSlots as Ie, renderSlot as w, normalizeProps as L, guardReactiveProps as D, createVNode as Ae, createElementVNode as g, Fragment as _, renderList as S, mergeProps as G } from "vue";
|
|
2
|
-
import { u as Re, c as Ge, t as Ee, a as We, p as fe, b as Te, o as me, d as je, e as E, g as ge, m as U, I as z, X as Le, s as B, k as De, i as V, f as q, F as H } from "./index-
|
|
2
|
+
import { u as Re, c as Ge, t as Ee, a as We, p as fe, b as Te, o as me, d as je, e as E, g as ge, m as U, I as z, X as Le, s as B, k as De, i as V, f as q, F as H } from "./index-BepNt4hC.js";
|
|
3
3
|
import { t as Ue, u as Be } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { u as Ve, U as qe } from "./usePrinter-
|
|
5
|
-
import He from "./vue-ui-skeleton-
|
|
6
|
-
import { _ as Ze } from "./Title-
|
|
7
|
-
import { u as pe } from "./useNestedProp-
|
|
8
|
-
import { _ as Je } from "./PackageVersion-
|
|
9
|
-
import { P as Ke } from "./PenAndPaper-
|
|
4
|
+
import { u as Ve, U as qe } from "./usePrinter-DPvuzbZK.js";
|
|
5
|
+
import He from "./vue-ui-skeleton-Dm5B1MER.js";
|
|
6
|
+
import { _ as Ze } from "./Title-D5Wtk97z.js";
|
|
7
|
+
import { u as pe } from "./useNestedProp-DUC6XBU3.js";
|
|
8
|
+
import { _ as Je } from "./PackageVersion-C26iHVPd.js";
|
|
9
|
+
import { P as Ke } from "./PenAndPaper-XF8fq-Km.js";
|
|
10
10
|
import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const et = ["id"], tt = { key: 0 }, at = ["xmlns", "viewBox"], lt = ["id"], rt = ["stop-color"], st = ["stop-color"], ot = ["stop-color"], ut = ["id"], nt = ["stdDeviation"], it = ["d", "fill", "stroke"], ct = ["id", "d"], vt = ["fill", "font-size", "font-weight"], ht = ["href", "startOffset"], dt = ["x", "y", "text-anchor", "fill", "font-size", "font-weight"], yt = ["d", "filter"], ft = ["stroke", "stroke-width"], mt = ["stroke", "stroke-width"], gt = ["stroke", "stroke-width"], pt = ["stroke", "stroke-width"], kt = { key: 4 }, bt = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], _t = ["x", "y", "font-size", "font-weight", "fill"], xt = { key: 6 }, wt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], zt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], $t = { key: 7 }, Ft = ["d", "fill", "stroke", "stroke-width"], Ct = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Pt = ["x", "y", "font-size", "fill"], Mt = {
|
|
12
12
|
key: 5,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as x, onMounted as C, computed as c, watch as z, openBlock as a, createElementBlock as s, normalizeStyle as G, createVNode as L, createElementVNode as t, createCommentVNode as r, Fragment as g, toDisplayString as y, unref as d } from "vue";
|
|
2
|
-
import { u as b, c as N, e as $, i as p, f as m } from "./index-
|
|
3
|
-
import { u as F } from "./useNestedProp-
|
|
4
|
-
import { _ as B } from "./PackageVersion-
|
|
2
|
+
import { u as b, c as N, e as $, i as p, f as m } from "./index-BepNt4hC.js";
|
|
3
|
+
import { u as F } from "./useNestedProp-DUC6XBU3.js";
|
|
4
|
+
import { _ as B } from "./PackageVersion-C26iHVPd.js";
|
|
5
5
|
const P = ["viewBox", "width"], V = { key: 0 }, D = ["id"], I = ["stop-color"], M = ["stop-color"], U = ["stroke"], E = ["stroke"], O = ["width", "fill"], S = ["fill"], A = { key: 0 }, j = ["id"], T = /* @__PURE__ */ t("feGaussianBlur", {
|
|
6
6
|
in: "SourceGraphic",
|
|
7
7
|
stdDeviation: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DOkp6I9s.cjs"),m=require("./useNestedProp-BEjpLG7g.cjs"),_=require("./PackageVersion-JL2H1ZNU.cjs"),k=["viewBox","width"],p={key:0},g=["id"],v=["stop-color"],y=["stop-color"],N=["stroke"],C=["stroke"],V=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),b=[E],L=["stroke"],z=["stroke","stroke-dasharray","stroke-dashoffset"],G=["filter"],F=["stroke","stroke-dasharray","stroke-dashoffset"],P=["fill"],$={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const o=i,{vue_ui_gizmo:f}=a.useConfig(),n=e.ref(a.createUid());e.onMounted(()=>{c()});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:r=>r});function d(){return m.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,r=>{t.value=d(),c()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const s=2*Math.PI*35,h=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:h}});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",p,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,v),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,y)],8,g)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,N),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,C),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(i.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,V),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,w)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",x,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},b,8,B)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,L),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,z),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,F)],8,G)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,P)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Fe, computed as h, ref as p, watch as we, onMounted as Pe, openBlock as o, createElementBlock as u, normalizeClass as K, normalizeStyle as x, createBlock as E, createCommentVNode as c, unref as i, createSlots as Ve, withCtx as w, renderSlot as f, normalizeProps as X, guardReactiveProps as H, createVNode as oe, Fragment as A, renderList as S, createElementVNode as n, toDisplayString as b, withKeys as Ie, createTextVNode as Be, nextTick as Re } from "vue";
|
|
2
|
-
import { u as Ge, o as Ee, e as _e, c as se, t as Xe, C as He, g as De, N as ue, X as Ue, G as ne, i as P, f as O, v as T, x as Ye, y as je, q as We, r as qe } from "./index-
|
|
3
|
-
import { _ as Ke } from "./Title-
|
|
4
|
-
import { u as Je, U as Qe } from "./usePrinter-
|
|
5
|
-
import { _ as Ze } from "./Tooltip-
|
|
6
|
-
import et from "./vue-ui-skeleton-
|
|
7
|
-
import tt from "./BaseIcon-
|
|
8
|
-
import lt from "./vue-ui-accordion-
|
|
9
|
-
import { u as ke } from "./useNestedProp-
|
|
10
|
-
import { _ as at } from "./PackageVersion-
|
|
11
|
-
import { P as ot } from "./PenAndPaper-
|
|
2
|
+
import { u as Ge, o as Ee, e as _e, c as se, t as Xe, C as He, g as De, N as ue, X as Ue, G as ne, i as P, f as O, v as T, x as Ye, y as je, q as We, r as qe } from "./index-BepNt4hC.js";
|
|
3
|
+
import { _ as Ke } from "./Title-D5Wtk97z.js";
|
|
4
|
+
import { u as Je, U as Qe } from "./usePrinter-DPvuzbZK.js";
|
|
5
|
+
import { _ as Ze } from "./Tooltip-z6v35GbJ.js";
|
|
6
|
+
import et from "./vue-ui-skeleton-Dm5B1MER.js";
|
|
7
|
+
import tt from "./BaseIcon-WyM8ZLeS.js";
|
|
8
|
+
import lt from "./vue-ui-accordion-C2pYIHIH.js";
|
|
9
|
+
import { u as ke } from "./useNestedProp-DUC6XBU3.js";
|
|
10
|
+
import { _ as at } from "./PackageVersion-C26iHVPd.js";
|
|
11
|
+
import { P as ot } from "./PenAndPaper-XF8fq-Km.js";
|
|
12
12
|
import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const ut = ["id"], nt = {
|
|
14
14
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-KYU_8xrX.cjs"),ce=require("./Title-URF9hufV.cjs"),Z=require("./usePrinter-4Zj_RZ5v.cjs"),ve=require("./Tooltip-87gbw8Ir.cjs"),ye=require("./vue-ui-skeleton-D6mdHYxB.cjs"),pe=require("./BaseIcon-8y_okNW6.cjs"),he=require("./vue-ui-accordion-C0oMKEv0.cjs"),ee=require("./useNestedProp-C-g0SLHN.cjs"),fe=require("./PackageVersion-Df1iPzMk.cjs"),ge=require("./PenAndPaper-CvGft3ku.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke={key:2,style:"width:100%;background:transparent"},xe=["xmlns","viewBox"],we=["x","y","width","height","fill","stroke","stroke-width"],Ce=["x","y","width","height","fill","stroke","stroke-width"],_e=["font-size","font-weight","fill","x","y"],Ne=["x","y","width","height","onMouseover"],Be={key:0},Le=["font-size","fill","x","y","font-weight"],Ve={key:0},$e=["text-anchor","font-size","fill","font-weight","transform"],Ee={key:1},Se=["x","y","width","height","stroke","stroke-width"],Ae={key:2},ze=["id"],Te=["stop-color"],Me=["stop-color"],Pe=["x","y","font-size","fill"],Fe=["x","y","height","rx","fill"],Oe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Re={key:3},qe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},He=["stop-color"],Ue=["stop-color"],Ge=["x","y","width","height","rx"],Xe=["x","y","font-size","fill"],je=["x","y","font-size","fill"],Ye=["stroke","x1","x2","y1","y2"],We=["fill","d"],Ke={key:5,class:"vue-data-ui-watermark"},Je={key:6,ref:"source",dir:"auto"},Qe={class:"vue-ui-data-table"},Ze={key:0},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:te}){const n=L;e.useCssVars(l=>({"26ea87ca":l.tdo}));const{vue_ui_heatmap:le}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(o.createUid()),$=e.ref(null),ae=e.ref(null),z=e.ref(!1),T=e.ref(""),I=e.ref(void 0),C=e.ref(null),R=e.ref(0),q=e.ref(null),oe=e.ref(null),H=e.ref(!1),U=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ee.useNestedProp({userConfig:n.config,defaultConfig:le});let s={};return l.theme?s={...ee.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=G(),M(),U.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:X,isImaging:j,generatePdf:Y,generateImage:W}=Z.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ue=e.computed(()=>t.value.table.responsiveBreakpoint);function ne(){new ResizeObserver(s=>{s.forEach(u=>{H.value=u.contentRect.width<ue.value})}).observe(q.value)}e.onMounted(M);function M(){ne()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.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:s}}),E=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:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.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*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function re(l,s,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:de}=l;I.value=de,f.value=d,_.value={datapoint:l,seriesIndex:s,series:S.value,config:t.value},z.value=!0;let O="";const D=t.value.style.tooltip.customFormat;o.isFunction(D)&&o.functionReturnsString(()=>D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}))?T.value=D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}):(O+=`<div>${c} ${g?`${g}`:""}</div>`,O+=`<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:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.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:s})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${O}</div>`)}const N=e.computed(()=>a.value.top+P.value*(1-f.value/v.value)),B=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function K(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ie(l){x.value=l,R.value+=1}function J(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return te({generatePdf:Y,generateCsv:K,generateImage:W,toggleTable:J,toggleTooltip:Q,toggleAnnotator:F}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,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}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:oe,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",ke,[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${U.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&&V.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(j),isPrinting:e.unref(X),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:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(Y),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:J,onToggleTooltip:Q,onToggleAnnotator:F},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:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),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"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(fe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(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:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+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,we),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+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,Ce),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(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.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,_e)):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:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>re(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=g=>{z.value=!1,I.value=void 0,f.value=null,C.value=null})},null,40,Ne)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Be,[e.createElementVNode("text",{"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+i.value.height*r+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[r]),9,Le)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%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(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,$e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Ee,[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,Se)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Ae,[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,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Me)],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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Pe),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,Fe),e.createElementVNode("text",{x:a.value.right+36+18,y:a.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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Oe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:N.value,y2:N.value},null,8,De)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${N.value} ${a.value.right+26},${N.value-8} ${a.value.right+26},${N.value+8}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",qe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ue)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.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,Ge),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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Xe),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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Ye)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${a.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,We)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ye.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ve._sfc_main,{show:y.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:$.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"]),V.value?(e.openBlock(),e.createBlock(he.default,{key:8,hideDetails:"",config:{open:y.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:q,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":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:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(pe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Qe,[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",Ze,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,r)=>(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,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%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",tt,e.toDisplayString(u),1)],12,et),(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",at,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,lt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,be))}},st=me._export_sfc(ot,[["__scopeId","data-v-9f65a532"]]);exports.default=st;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DOkp6I9s.cjs"),ce=require("./Title-CbiI2XAK.cjs"),Z=require("./usePrinter-Hc-LICQf.cjs"),ve=require("./Tooltip-CXWymtVK.cjs"),ye=require("./vue-ui-skeleton-G8jk4hcj.cjs"),pe=require("./BaseIcon-CqZOJaZ7.cjs"),he=require("./vue-ui-accordion-C8xohumC.cjs"),ee=require("./useNestedProp-BEjpLG7g.cjs"),fe=require("./PackageVersion-JL2H1ZNU.cjs"),ge=require("./PenAndPaper-Bmfl9PVt.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke={key:2,style:"width:100%;background:transparent"},xe=["xmlns","viewBox"],we=["x","y","width","height","fill","stroke","stroke-width"],Ce=["x","y","width","height","fill","stroke","stroke-width"],_e=["font-size","font-weight","fill","x","y"],Ne=["x","y","width","height","onMouseover"],Be={key:0},Le=["font-size","fill","x","y","font-weight"],Ve={key:0},$e=["text-anchor","font-size","fill","font-weight","transform"],Ee={key:1},Se=["x","y","width","height","stroke","stroke-width"],Ae={key:2},ze=["id"],Te=["stop-color"],Me=["stop-color"],Pe=["x","y","font-size","fill"],Fe=["x","y","height","rx","fill"],Oe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Re={key:3},qe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},He=["stop-color"],Ue=["stop-color"],Ge=["x","y","width","height","rx"],Xe=["x","y","font-size","fill"],je=["x","y","font-size","fill"],Ye=["stroke","x1","x2","y1","y2"],We=["fill","d"],Ke={key:5,class:"vue-data-ui-watermark"},Je={key:6,ref:"source",dir:"auto"},Qe={class:"vue-ui-data-table"},Ze={key:0},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:te}){const n=L;e.useCssVars(l=>({"26ea87ca":l.tdo}));const{vue_ui_heatmap:le}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(o.createUid()),$=e.ref(null),ae=e.ref(null),z=e.ref(!1),T=e.ref(""),I=e.ref(void 0),C=e.ref(null),R=e.ref(0),q=e.ref(null),oe=e.ref(null),H=e.ref(!1),U=e.ref(0),t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ee.useNestedProp({userConfig:n.config,defaultConfig:le});let s={};return l.theme?s={...ee.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=G(),M(),U.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:X,isImaging:j,generatePdf:Y,generateImage:W}=Z.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),se=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ue=e.computed(()=>t.value.table.responsiveBreakpoint);function ne(){new ResizeObserver(s=>{s.forEach(u=>{H.value=u.contentRect.width<ue.value})}).observe(q.value)}e.onMounted(M);function M(){ne()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.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:s}}),E=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:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.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*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function re(l,s,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:de}=l;I.value=de,f.value=d,_.value={datapoint:l,seriesIndex:s,series:S.value,config:t.value},z.value=!0;let O="";const D=t.value.style.tooltip.customFormat;o.isFunction(D)&&o.functionReturnsString(()=>D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}))?T.value=D({datapoint:l,seriesIndex:s,series:S.value,config:t.value}):(O+=`<div>${c} ${g?`${g}`:""}</div>`,O+=`<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:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.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:s})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${O}</div>`)}const N=e.computed(()=>a.value.top+P.value*(1-f.value/v.value)),B=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function K(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ie(l){x.value=l,R.value+=1}function J(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return te({generatePdf:Y,generateCsv:K,generateImage:W,toggleTable:J,toggleTooltip:Q,toggleAnnotator:F}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,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}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:oe,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",ke,[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${U.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&&V.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(j),isPrinting:e.unref(X),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:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(Y),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:J,onToggleTooltip:Q,onToggleAnnotator:F},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:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),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"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(fe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(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:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+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,we),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+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,Ce),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(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.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,_e)):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:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>re(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=g=>{z.value=!1,I.value=void 0,f.value=null,C.value=null})},null,40,Ne)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Be,[e.createElementVNode("text",{"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+i.value.height*r+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[r]),9,Le)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%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(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,$e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Ee,[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,Se)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Ae,[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,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Me)],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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Pe),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,Fe),e.createElementVNode("text",{x:a.value.right+36+18,y:a.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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Oe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:N.value,y2:N.value},null,8,De)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${N.value} ${a.value.right+26},${N.value-8} ${a.value.right+26},${N.value+8}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",qe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ue)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.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,Ge),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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Xe),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(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Ye)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${a.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,We)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ye.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ve._sfc_main,{show:y.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:$.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"]),V.value?(e.openBlock(),e.createBlock(he.default,{key:8,hideDetails:"",config:{open:y.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:q,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":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:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(pe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Qe,[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",Ze,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,r)=>(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,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%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",tt,e.toDisplayString(u),1)],12,et),(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",at,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,lt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,be))}},st=me._export_sfc(ot,[["__scopeId","data-v-9f65a532"]]);exports.default=st;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as c, computed as d, onMounted as Ye, onBeforeUnmount as je, watch as Be, openBlock as s, createElementBlock as r, normalizeClass as I, normalizeStyle as A, renderSlot as x, createBlock as S, createCommentVNode as v, unref as p, createSlots as We, withCtx as m, normalizeProps as Y, guardReactiveProps as j, createVNode as me, Fragment as b, renderList as k, createElementVNode as T, toDisplayString as L, createTextVNode as Ge, nextTick as He } from "vue";
|
|
2
|
-
import { u as Ee, c as ge, o as Ue, e as be, g as Re, b as Ve, d as qe, p as E, D as ke, i as F, f as O, X as Ze, l as Je, h as Ke, G as Qe, t as et, a as tt, C as U, x as lt, q as at, r as st, F as N } from "./index-
|
|
3
|
-
import { u as we } from "./useNestedProp-
|
|
4
|
-
import { u as ot, U as rt } from "./usePrinter-
|
|
5
|
-
import { _ as nt } from "./PackageVersion-
|
|
6
|
-
import { L as ut } from "./Legend-
|
|
7
|
-
import { _ as it } from "./Title-
|
|
8
|
-
import { _ as ct } from "./Tooltip-
|
|
9
|
-
import { D as vt } from "./DataTable-
|
|
10
|
-
import ht from "./vue-ui-accordion-
|
|
11
|
-
import { P as yt } from "./PenAndPaper-
|
|
12
|
-
import dt from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Ee, c as ge, o as Ue, e as be, g as Re, b as Ve, d as qe, p as E, D as ke, i as F, f as O, X as Ze, l as Je, h as Ke, G as Qe, t as et, a as tt, C as U, x as lt, q as at, r as st, F as N } from "./index-BepNt4hC.js";
|
|
3
|
+
import { u as we } from "./useNestedProp-DUC6XBU3.js";
|
|
4
|
+
import { u as ot, U as rt } from "./usePrinter-DPvuzbZK.js";
|
|
5
|
+
import { _ as nt } from "./PackageVersion-C26iHVPd.js";
|
|
6
|
+
import { L as ut } from "./Legend-BqySI7-3.js";
|
|
7
|
+
import { _ as it } from "./Title-D5Wtk97z.js";
|
|
8
|
+
import { _ as ct } from "./Tooltip-z6v35GbJ.js";
|
|
9
|
+
import { D as vt } from "./DataTable-8Bk6Zg9H.js";
|
|
10
|
+
import ht from "./vue-ui-accordion-C2pYIHIH.js";
|
|
11
|
+
import { P as yt } from "./PenAndPaper-XF8fq-Km.js";
|
|
12
|
+
import dt from "./vue-ui-skeleton-Dm5B1MER.js";
|
|
13
13
|
import { t as ft, u as xt } from "./useResponsive-CoxXLe23.js";
|
|
14
14
|
import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const mt = ["id"], gt = ["xmlns", "viewBox"], bt = { key: 0 }, kt = ["id"], wt = ["stop-color"], Ct = ["stop-color"], _t = ["stop-color"], $t = { key: 1 }, Mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], At = { key: 2 }, Tt = ["x", "y", "fill", "font-size"], Lt = ["transform", "font-size", "fill", "font-weight"], zt = { key: 4 }, St = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Nt = { key: 5 }, Pt = ["transform", "fill", "font-size", "text-anchor"], It = ["x", "y", "font-size", "fill", "font-weight"], Ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ot = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Xt = ["d", "stroke", "stroke-width"], Dt = ["d", "stroke", "stroke-width"], Yt = ["cx", "cy", "fill", "r"], jt = ["cx", "cy", "fill", "r", "stroke", "stroke-width"], Bt = { key: 1 }, Wt = ["x", "y", "font-size", "fill", "font-weight"], Gt = { key: 2 }, Ht = ["x", "y", "font-size", "font-weight", "fill"], Et = ["cx", "cy", "r", "onMouseenter", "onClick"], Ut = {
|