vue-data-ui 2.3.74 → 2.3.75
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-CYCrAySW.js → Arrow-BTG7M25z.js} +1 -1
- package/dist/{Arrow-DK6F5Fq3.cjs → Arrow-CZK77NmC.cjs} +1 -1
- package/dist/{BaseIcon-DBHVtm3A.cjs → BaseIcon--PMhZ3f-.cjs} +1 -1
- package/dist/{BaseIcon-kBIAYqUO.js → BaseIcon-BAOfPaXs.js} +1 -1
- package/dist/{DataTable-CKdV-L0e.js → DataTable-CQANRZju.js} +2 -2
- package/dist/{DataTable-BNFSPjhv.cjs → DataTable-DjQzrklZ.cjs} +1 -1
- package/dist/{Legend-Do2kcWFT.cjs → Legend-CtbPB0Bo.cjs} +1 -1
- package/dist/{Legend-Cj7T-DqJ.js → Legend-DX1kv21U.js} +1 -1
- package/dist/{Shape-DRDUAe_o.cjs → Shape-CadGs1Am.cjs} +1 -1
- package/dist/{Shape-Bo8ZjViG.js → Shape-kqcyauhC.js} +1 -1
- package/dist/{Slicer-D8jHSP7U.cjs → Slicer-i_oECHxH.cjs} +1 -1
- package/dist/{Slicer-4nGKvUYF.js → Slicer-yaJs-izT.js} +2 -2
- package/dist/{Title-DZjnxQdN.js → Title-C26I_HC3.js} +1 -1
- package/dist/{Title-D5cATWsL.cjs → Title-XBiDFYKD.cjs} +1 -1
- package/dist/{Tooltip--kgFEVZs.js → Tooltip-CH8GmDCG.js} +1 -1
- package/dist/{Tooltip-B8yLaegk.cjs → Tooltip-DxtWkIt5.cjs} +1 -1
- package/dist/{index-C8SH0f2u.js → index-Cm4Iry5c.js} +1 -1
- package/dist/{index-D_32ZGWd.cjs → index-DYUBiaGS.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-lS_T5lM3.js → useNestedProp-CurQIHTa.js} +1 -1
- package/dist/{useNestedProp-BvvH633N.cjs → useNestedProp-w7AMWWmz.cjs} +1 -1
- package/dist/{usePrinter-Dj50NAxo.js → usePrinter-B8RnF8_q.js} +1 -1
- package/dist/{usePrinter-BouFNHWR.cjs → usePrinter-ZlHxdaEz.cjs} +1 -1
- package/dist/{vue-data-ui-v_BbbLtJ.cjs → vue-data-ui-B7amrpT-.cjs} +1 -1
- package/dist/{vue-data-ui-DoXqU7xC.js → vue-data-ui-Bj6kEIpq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BAz41kL7.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CnoPOJHm.js → vue-ui-3d-bar-Bg9IgVVc.js} +499 -486
- package/dist/{vue-ui-accordion-Cka6b_Up.cjs → vue-ui-accordion-1WxrfiCH.cjs} +1 -1
- package/dist/{vue-ui-accordion-YHleIgkV.js → vue-ui-accordion-Cb6XBCbu.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CENg8fDg.js → vue-ui-age-pyramid-BhwmnQru.js} +182 -169
- package/dist/vue-ui-age-pyramid-CHNvRXx8.cjs +1 -0
- package/dist/{vue-ui-annotator-ByYg6QMs.cjs → vue-ui-annotator-B22cdlhA.cjs} +1 -1
- package/dist/{vue-ui-annotator-VJOLUkqJ.js → vue-ui-annotator-BiHQvMdW.js} +1 -1
- package/dist/{vue-ui-candlestick-CHsGD3bx.js → vue-ui-candlestick-Cl9dyh4l.js} +295 -279
- package/dist/vue-ui-candlestick-D7DjdYyw.cjs +2 -0
- package/dist/vue-ui-carousel-table-Do5cYRqN.cjs +1 -0
- package/dist/{vue-ui-carousel-table-RAtX3VBu.js → vue-ui-carousel-table-QsONwqNz.js} +106 -91
- package/dist/vue-ui-chestnut-CyE8MafY.cjs +6 -0
- package/dist/{vue-ui-chestnut-B5GQX0J_.js → vue-ui-chestnut-Drb01WMC.js} +215 -204
- package/dist/{vue-ui-cursor-CMm7XSSG.js → vue-ui-cursor-BP04_XbB.js} +2 -2
- package/dist/{vue-ui-cursor-DnZqLj21.cjs → vue-ui-cursor-DZeTQBKz.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ck_5L3eu.js → vue-ui-dashboard-BWdx5gjZ.js} +2 -2
- package/dist/{vue-ui-dashboard-DgEQJnLr.cjs → vue-ui-dashboard-Z63RE1XS.cjs} +1 -1
- package/dist/{vue-ui-digits-UvwUdi6U.cjs → vue-ui-digits-CBQaHW6a.cjs} +1 -1
- package/dist/{vue-ui-digits--ULH35um.js → vue-ui-digits-DUhkLcmd.js} +2 -2
- package/dist/vue-ui-donut-D2YJYgOB.cjs +1 -0
- package/dist/{vue-ui-donut-QQ1fWWvc.js → vue-ui-donut-DRPSwmGr.js} +376 -362
- package/dist/{vue-ui-donut-evolution-Cx8kBB_7.js → vue-ui-donut-evolution-gRXAyxq8.js} +270 -255
- package/dist/vue-ui-donut-evolution-jAMVgNHQ.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BYvwHpU8.js → vue-ui-dumbbell-CQo5jqSK.js} +232 -213
- package/dist/vue-ui-dumbbell-DLfZcrXq.cjs +9 -0
- package/dist/vue-ui-flow-BQ3UbMUb.js +481 -0
- package/dist/vue-ui-flow-BlX2-eEC.cjs +1 -0
- package/dist/{vue-ui-galaxy-B0L57aec.js → vue-ui-galaxy-BHWugUKG.js} +175 -162
- package/dist/vue-ui-galaxy-Cax5o6Yl.cjs +1 -0
- package/dist/vue-ui-gauge-DG6_kvKh.js +500 -0
- package/dist/vue-ui-gauge-DpGcv_00.cjs +1 -0
- package/dist/vue-ui-gizmo-D9Vh9Rmr.cjs +1 -0
- package/dist/{vue-ui-gizmo-D2RfM55X.js → vue-ui-gizmo-bV148qAf.js} +66 -53
- package/dist/{vue-ui-heatmap-DKM0DH41.js → vue-ui-heatmap-BZZUvnMa.js} +157 -143
- package/dist/vue-ui-heatmap-B_ELXKKV.cjs +1 -0
- package/dist/vue-ui-kpi-C5v7qQvZ.js +98 -0
- package/dist/vue-ui-kpi-CwVAvTB2.cjs +1 -0
- package/dist/{vue-ui-mini-loader-MywnWlYI.js → vue-ui-mini-loader-BdKizX_J.js} +2 -2
- package/dist/{vue-ui-mini-loader-CLP19Txv.cjs → vue-ui-mini-loader-DZNY-3rr.cjs} +1 -1
- package/dist/{vue-ui-molecule-CLI9iTRE.js → vue-ui-molecule-MKyrhqqm.js} +177 -167
- package/dist/vue-ui-molecule-bva6OvPc.cjs +1 -0
- package/dist/{vue-ui-mood-radar-O30wZo9a.js → vue-ui-mood-radar-BNIFFvq0.js} +172 -161
- package/dist/vue-ui-mood-radar-CzQOAyNI.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-D8o4TqTt.js → vue-ui-nested-donuts-BDAlZrMF.js} +377 -364
- package/dist/vue-ui-nested-donuts-CxdZC6JF.cjs +17 -0
- package/dist/{vue-ui-onion-Hmcke6xB.js → vue-ui-onion-CFa4VD-w.js} +191 -177
- package/dist/vue-ui-onion-Df7YcsVR.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-D7Q2zfcR.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CyChE3NP.js → vue-ui-parallel-coordinate-plot-DmqYXT-U.js} +298 -284
- package/dist/{vue-ui-quadrant-DimTQdAj.js → vue-ui-quadrant-D5jHkq9g.js} +347 -334
- package/dist/vue-ui-quadrant-ZqhcVYf5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-DxJvENid.js → vue-ui-quick-chart-BjXXSx7V.js} +483 -469
- package/dist/vue-ui-quick-chart-Dt9AsEU6.cjs +15 -0
- package/dist/vue-ui-radar-2EuZr7i2.cjs +1 -0
- package/dist/{vue-ui-radar-D_FieunT.js → vue-ui-radar-CW8EKW4o.js} +202 -189
- package/dist/{vue-ui-rating-BHW2Onru.cjs → vue-ui-rating-DrtLvVA0.cjs} +1 -1
- package/dist/{vue-ui-rating-DF1BpH4E.js → vue-ui-rating-eSWsmJUU.js} +2 -2
- package/dist/vue-ui-relation-circle-C60OTe88.cjs +1 -0
- package/dist/vue-ui-relation-circle-DiUCpEqa.js +322 -0
- package/dist/{vue-ui-rings-BqS-iece.js → vue-ui-rings-BxhLbyG0.js} +203 -189
- package/dist/vue-ui-rings-CHq-a5ZS.cjs +2 -0
- package/dist/{vue-ui-scatter-Dns49Nht.js → vue-ui-scatter-DQchX_mM.js} +284 -270
- package/dist/vue-ui-scatter-DZUZUbnk.cjs +1 -0
- package/dist/{vue-ui-screenshot-5Gsnd0Wr.js → vue-ui-screenshot-CLa9vMzM.js} +1 -1
- package/dist/{vue-ui-screenshot---q062Kd.cjs → vue-ui-screenshot-SLSIpqx2.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B4eWLjH3.js → vue-ui-skeleton-C1oUnz7R.js} +2 -2
- package/dist/{vue-ui-skeleton-fVPw-oIR.cjs → vue-ui-skeleton-ClpTCY1x.cjs} +1 -1
- package/dist/{vue-ui-smiley-B8Tyunn3.js → vue-ui-smiley-CmWHSt1S.js} +2 -2
- package/dist/{vue-ui-smiley-YfHmv0rQ.cjs → vue-ui-smiley-Daw8fPDy.cjs} +1 -1
- package/dist/vue-ui-spark-trend-CO69Dg31.js +263 -0
- package/dist/vue-ui-spark-trend-DmDlv8ie.cjs +1 -0
- package/dist/{vue-ui-sparkbar-9DBvdYn7.js → vue-ui-sparkbar-BRlqpe4e.js} +95 -87
- package/dist/vue-ui-sparkbar-BUGdi0BY.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CCxKzDjT.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CbuFESsM.js +178 -0
- package/dist/{vue-ui-sparkhistogram-BBUVmco4.js → vue-ui-sparkhistogram-B4-hrDHz.js} +79 -68
- package/dist/vue-ui-sparkhistogram-XtqX10_t.cjs +1 -0
- package/dist/vue-ui-sparkline-BZTEi9YC.cjs +1 -0
- package/dist/{vue-ui-sparkline-CeqNV6Re.js → vue-ui-sparkline-DlXNmG6M.js} +142 -123
- package/dist/vue-ui-sparkstackbar-CDmZeXnq.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-C3GMC1eW.js → vue-ui-sparkstackbar-J1YowQmP.js} +120 -104
- package/dist/{vue-ui-stackbar-DyGPrFxi.js → vue-ui-stackbar-CKIDqkkY.js} +235 -222
- package/dist/vue-ui-stackbar-CXGWukoJ.cjs +6 -0
- package/dist/vue-ui-strip-plot-CvmoRcYN.cjs +1 -0
- package/dist/{vue-ui-strip-plot-y1AnVJmq.js → vue-ui-strip-plot-JVLwIy0j.js} +246 -232
- package/dist/{vue-ui-table-B4kfykAO.js → vue-ui-table-BSi_cHh7.js} +1 -1
- package/dist/{vue-ui-table-xWvAQS-s.cjs → vue-ui-table-Dqi64VE7.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-BwghEh5t.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-YZRSzwRM.js → vue-ui-table-heatmap-CfvW3rcm.js} +106 -95
- package/dist/{vue-ui-table-sparkline-C0v2r4Kf.js → vue-ui-table-sparkline-Y6Lrrzxy.js} +151 -138
- package/dist/vue-ui-table-sparkline-bIy3kkHB.cjs +1 -0
- package/dist/{vue-ui-thermometer-D5qurIy7.js → vue-ui-thermometer-BPTs7Nxc.js} +116 -104
- package/dist/vue-ui-thermometer-DDtxYr7w.cjs +1 -0
- package/dist/{vue-ui-timer-VWjovnKL.js → vue-ui-timer-CkB7eZaE.js} +191 -176
- package/dist/vue-ui-timer-DRSSYxOX.cjs +64 -0
- package/dist/{vue-ui-tiremarks-jH6cdQOJ.js → vue-ui-tiremarks-BbOaoY8S.js} +115 -103
- package/dist/vue-ui-tiremarks-Bttwg3-p.cjs +1 -0
- package/dist/vue-ui-treemap-Chq0WQPe.cjs +1 -0
- package/dist/{vue-ui-treemap-BCc5sQLB.js → vue-ui-treemap-CoaK3wBl.js} +251 -237
- package/dist/{vue-ui-vertical-bar-2In_g5iC.js → vue-ui-vertical-bar-BA43_uHV.js} +314 -299
- package/dist/vue-ui-vertical-bar-BLIUt-HT.cjs +4 -0
- package/dist/{vue-ui-waffle-OzU830VX.js → vue-ui-waffle-BoEf8CcG.js} +285 -265
- package/dist/vue-ui-waffle-NBjY0mko.cjs +1 -0
- package/dist/vue-ui-wheel-Bgo2jpj0.js +255 -0
- package/dist/vue-ui-wheel-t5bI4a-P.cjs +1 -0
- package/dist/vue-ui-word-cloud-DPW_-Hzz.cjs +1 -0
- package/dist/vue-ui-word-cloud-Jd9_JUyi.js +512 -0
- package/dist/{vue-ui-xy-DuJtYXKl.js → vue-ui-xy-BMBYAC4z.js} +300 -274
- package/dist/vue-ui-xy-CBHEBcZK.cjs +3 -0
- package/dist/vue-ui-xy-canvas-D5FqRF4p.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-CKibMJHh.js → vue-ui-xy-canvas-LOsQ_DM-.js} +345 -327
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CwCEoPX-.cjs +0 -19
- package/dist/vue-ui-age-pyramid-GqCNpd_h.cjs +0 -1
- package/dist/vue-ui-candlestick-TdNVq_FX.cjs +0 -2
- package/dist/vue-ui-carousel-table-yXUSFk2u.cjs +0 -1
- package/dist/vue-ui-chestnut-EJj-dQSY.cjs +0 -6
- package/dist/vue-ui-donut-BqUBysA_.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BXtEnop4.cjs +0 -1
- package/dist/vue-ui-dumbbell-CjIh7KTm.cjs +0 -9
- package/dist/vue-ui-flow-hp0Hpuhn.js +0 -469
- package/dist/vue-ui-flow-u29zqSQj.cjs +0 -1
- package/dist/vue-ui-galaxy-DE1HbBi-.cjs +0 -1
- package/dist/vue-ui-gauge-B_IZrsfj.cjs +0 -1
- package/dist/vue-ui-gauge-CPyyn7cL.js +0 -488
- package/dist/vue-ui-gizmo-DR4gacOL.cjs +0 -1
- package/dist/vue-ui-heatmap-DMB_eUpA.cjs +0 -1
- package/dist/vue-ui-kpi-BAxAY13T.js +0 -84
- package/dist/vue-ui-kpi-BD21xshi.cjs +0 -1
- package/dist/vue-ui-molecule-BNsWckH-.cjs +0 -1
- package/dist/vue-ui-mood-radar-BsWE1f8R.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CYyUtXs2.cjs +0 -17
- package/dist/vue-ui-onion-D7TXJu5w.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BqZB7xKn.cjs +0 -8
- package/dist/vue-ui-quadrant-BPDTvxlT.cjs +0 -1
- package/dist/vue-ui-quick-chart-C_-ut0if.cjs +0 -15
- package/dist/vue-ui-radar-C5Kq19hg.cjs +0 -1
- package/dist/vue-ui-relation-circle-4kIYttRI.js +0 -310
- package/dist/vue-ui-relation-circle-DHMHHsqY.cjs +0 -1
- package/dist/vue-ui-rings-BqPS8NKl.cjs +0 -2
- package/dist/vue-ui-scatter-BLVcdf3d.cjs +0 -1
- package/dist/vue-ui-spark-trend-Dpv6am0Z.cjs +0 -1
- package/dist/vue-ui-spark-trend-Em9OqYyG.js +0 -251
- package/dist/vue-ui-sparkbar-BuSuwQYl.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BN5feBzp.js +0 -167
- package/dist/vue-ui-sparkgauge-DKtUZMv1.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-BmuusW02.cjs +0 -1
- package/dist/vue-ui-sparkline-Blzv-tIQ.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-D__WDEMv.cjs +0 -1
- package/dist/vue-ui-stackbar-DFqJ5K_q.cjs +0 -6
- package/dist/vue-ui-strip-plot-z9fjJ6Dj.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CGKecjtm.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CHFZG3Tg.cjs +0 -1
- package/dist/vue-ui-thermometer-DoOxxVW1.cjs +0 -1
- package/dist/vue-ui-timer-D63zHe-I.cjs +0 -64
- package/dist/vue-ui-tiremarks-Cp8YEmXh.cjs +0 -1
- package/dist/vue-ui-treemap-DJrdEFW5.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BfJJqN_z.cjs +0 -4
- package/dist/vue-ui-waffle-A2gmRbq0.cjs +0 -1
- package/dist/vue-ui-wheel-C9QXzWu1.js +0 -242
- package/dist/vue-ui-wheel-DGSh9VKq.cjs +0 -1
- package/dist/vue-ui-word-cloud-C2ZaVlfO.js +0 -498
- package/dist/vue-ui-word-cloud-DPFB1MYk.cjs +0 -1
- package/dist/vue-ui-xy-C-2-aijE.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D7wf3xab.cjs +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DYUBiaGS.cjs"),le=require("./Legend-CtbPB0Bo.cjs"),ae=require("./Title-XBiDFYKD.cjs"),oe=require("./Tooltip-DxtWkIt5.cjs"),re=require("./DataTable-DjQzrklZ.cjs"),W=require("./usePrinter-ZlHxdaEz.cjs"),ne=require("./vue-ui-skeleton-ClpTCY1x.cjs"),ue=require("./vue-ui-accordion-1WxrfiCH.cjs"),U=require("./useNestedProp-w7AMWWmz.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce=["xmlns","viewBox"],de=["id"],ve=["stdDeviation"],he=["d","stroke","stroke-width"],pe=["d","stroke","stroke-width"],ye=["filter"],fe=["d","stroke","stroke-width"],ge=["d","stroke-width","onMouseenter","onClick"],me={key:3,class:"vue-data-ui-watermark"},be=["onClick"],ke={key:0},Ce={key:1},we=["innerHTML"],xe={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:a,index:o})})})}const f=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),_=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.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=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:z,generateImage:O}=W.usePrinter({elementId:`galaxy_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=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}),$=e.ref({height:180,width:250}),s=e.ref([]);function B(l){s.value.includes(l.id)?s.value=s.value.filter(o=>o!==l.id):s.value.push(l.id),T("selectLegend",g.value.map(o=>({name:o.name,color:o.color,value:o.value})))}const p=e.computed(()=>i.dataset.map((l,o)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((a,n)=>a+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:o})).sort((l,o)=>o.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id)).map(l=>l.value).reduce((l,o)=>l+o,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let o=0;o<D.value.length;o+=1){const a=D.value[o];let n=a.value/d.value*K.value;o>0&&l.length&&(n+=l[o-1].points),l.push({points:n,...a,seriesIndex:o,proportion:a.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((o,a)=>!s.value.includes(o.id)).toSorted((o,a)=>a.points-o.points)}),m=e.ref(!1);function Q(l){m.value=l,_.value+=1}const S=e.ref(null);function Z({datapoint:l,_relativeIndex:o,seriesIndex:a,show:n=!1}){S.value={datapoint:l,seriesIndex:a,series:p.value,config:t.value},w.value=n,c.value=l.id;let u="";const y=t.value.style.chart.tooltip.customFormat;r.isFunction(y)&&r.functionReturnsString(()=>y({seriesIndex:a,datapoint:l,series:p.value,config:t.value}))?x.value=y({seriesIndex:a,datapoint:l,series:p.value,config:t.value}):(u+=`<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>`,u+=`<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&&(u+=`<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:a})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${u}</div>`)}const q=e.computed(()=>p.value.map((l,o)=>({...l,proportion:(l.value||0)/i.dataset.map(a=>(a.values||[]).reduce((n,u)=>n+u,0)).reduce((a,n)=>a+n,0),opacity:s.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:s.value.includes(l.id)}))),ee=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":""})),h=e.computed(()=>{const l=g.value.map(a=>({name:a.name,color:a.color})),o=g.value.map(a=>a.value);return{head:l,body:o}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,u)=>[[n.name],[h.value.body[u]],[isNaN(h.value.body[u]/d.value)?"-":h.value.body[u]/d.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=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%"],o=h.value.head.map((u,y)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[y],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},te,isNaN(h.value.body[y]/d.value)?"-":r.dataLabel({v:h.value.body[y]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:o,config:a}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:z,generateCsv:G,generateImage:O,toggleTable:M,toggleTooltip:A}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.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_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${P.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"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${_.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:f.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:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(z),onGenerateCsv:G,onGenerateImage:e.unref(O),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.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,ve)],8,de)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[a.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.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===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:a.path,fill:"none",stroke:a.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===a.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!==a.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,pe)):e.createCommentVNode("",!0),a.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${f.value})`},[e.createElementVNode("path",{d:a.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===a.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!==a.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,fe)],8,ye)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[a.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.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:u=>Z({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex,show:!0}),onMouseleave:o[0]||(o[0]=u=>{w.value=!1,c.value=null}),onClick:u=>T("selectDatapoint",a)},null,40,ge)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,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(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:o[1]||(o[1]=({legend:a})=>B(a))},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:u=>B(a),style:e.normalizeStyle(`opacity:${s.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:n}))+" ",1),s.value.includes(a.id)?(e.openBlock(),e.createElementBlock("span",Ce," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ke," ("+e.toDisplayString(isNaN(a.value/d.value)?"-":e.unref(r.dataLabel)({v:a.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,be)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(oe._sfc_main,{show:v.value.showTooltip&&w.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:C.value,content:x.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({...S.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ue.default,{key:6,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(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,we)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ie))}},$e=se._export_sfc(xe,[["__scopeId","data-v-5fb613d4"]]);exports.default=$e;
|
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
import { computed as p, ref as h, watch as Q, onMounted as ke, onBeforeUnmount as be, openBlock as r, createElementBlock as n, normalizeClass as ee, normalizeStyle as R, createBlock as E, withCtx as I, toDisplayString as S, createCommentVNode as g, unref as c, createSlots as _e, renderSlot as x, normalizeProps as te, guardReactiveProps as ae, createElementVNode as f, Fragment as O, renderList as A } from "vue";
|
|
2
|
+
import { u as xe, c as we, t as Fe, a as Se, p as le, b as ze, o as se, d as $e, e as X, g as re, m as oe, X as Ce, w as D, J as N, i as Me, f as Pe, D as ue } from "./index-Cm4Iry5c.js";
|
|
3
|
+
import { t as Ie, u as Oe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { u as Xe, U as Ne } from "./usePrinter-B8RnF8_q.js";
|
|
5
|
+
import Ye from "./vue-ui-skeleton-C1oUnz7R.js";
|
|
6
|
+
import { _ as Ge } from "./Title-C26I_HC3.js";
|
|
7
|
+
import { u as ne } from "./useNestedProp-CurQIHTa.js";
|
|
8
|
+
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const Ee = ["id"], Ae = { key: 0 }, De = ["xmlns", "viewBox"], je = ["id"], Ue = ["stop-color"], Be = ["stop-color"], Le = ["stop-color"], We = ["id"], Te = ["stdDeviation"], Ve = ["d", "fill", "stroke"], qe = ["d", "filter"], He = ["y", "width", "height", "fill"], Je = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ze = ["x", "y", "font-size", "font-weight", "fill"], Ke = { key: 1 }, Qe = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], et = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], tt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], at = { key: 2 }, lt = ["d", "fill", "stroke", "stroke-width"], st = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], rt = ["x", "y", "font-size", "fill"], ot = {
|
|
10
|
+
key: 3,
|
|
11
|
+
class: "vue-data-ui-watermark"
|
|
12
|
+
}, ut = {
|
|
13
|
+
__name: "vue-ui-gauge",
|
|
14
|
+
props: {
|
|
15
|
+
config: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
dataset: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(Y, { expose: ie }) {
|
|
29
|
+
const o = Y, { vue_ui_gauge: ce } = xe(), z = p(() => !!o.dataset && Object.keys(o.dataset).length > 0 && o.dataset.series && o.dataset.series.length), m = h(we()), ve = h(null), j = h(0), $ = h(null), U = h(null), B = h(null), L = h(0), e = p({
|
|
30
|
+
get: () => W(),
|
|
31
|
+
set: (a) => a
|
|
32
|
+
});
|
|
33
|
+
Q(() => o.config, (a) => {
|
|
34
|
+
e.value = W(), Z(), L.value += 1;
|
|
35
|
+
}, { deep: !0 });
|
|
36
|
+
function W() {
|
|
37
|
+
const a = ne({
|
|
38
|
+
userConfig: o.config,
|
|
39
|
+
defaultConfig: ce
|
|
40
|
+
});
|
|
41
|
+
return a.theme ? {
|
|
42
|
+
...ne({
|
|
43
|
+
userConfig: Fe.vue_ui_gauge[a.theme] || o.config,
|
|
44
|
+
defaultConfig: a
|
|
45
|
+
}),
|
|
46
|
+
customPalette: Se[a.theme] || le
|
|
47
|
+
} : a;
|
|
48
|
+
}
|
|
49
|
+
const { isPrinting: T, isImaging: V, generatePdf: q, generateImage: H } = Xe({
|
|
50
|
+
elementId: `vue-ui-gauge_${m.value}`,
|
|
51
|
+
fileName: e.value.style.chart.title.text || "vue-ui-gauge"
|
|
52
|
+
}), de = p(() => ze(e.value.customPalette)), b = p(() => {
|
|
53
|
+
if (!z.value || se(o.dataset.series || {}))
|
|
54
|
+
return {
|
|
55
|
+
value: 0,
|
|
56
|
+
series: [
|
|
57
|
+
{
|
|
58
|
+
from: 0,
|
|
59
|
+
to: 0
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
const a = [];
|
|
64
|
+
(o.dataset.series || []).forEach((l) => {
|
|
65
|
+
a.push(l.from || 0), a.push(l.to || 0);
|
|
66
|
+
});
|
|
67
|
+
const s = Math.max(...a);
|
|
68
|
+
return {
|
|
69
|
+
...o.dataset,
|
|
70
|
+
series: (o.dataset.series || []).map((l, i) => ({
|
|
71
|
+
...l,
|
|
72
|
+
color: $e(l.color) || de.value[i] || le[i],
|
|
73
|
+
value: ((l.to || 0) - (l.from || 0)) / s * 100
|
|
74
|
+
}))
|
|
75
|
+
};
|
|
76
|
+
}), y = h(512), t = h({
|
|
77
|
+
height: 358.4,
|
|
78
|
+
width: y.value,
|
|
79
|
+
top: 0,
|
|
80
|
+
bottom: 358.4,
|
|
81
|
+
centerX: 179.2,
|
|
82
|
+
centerY: y.value / 2,
|
|
83
|
+
labelFontSize: 18,
|
|
84
|
+
legendFontSize: e.value.style.chart.legend.fontSize,
|
|
85
|
+
pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
|
|
86
|
+
trackSize: e.value.style.chart.layout.track.size,
|
|
87
|
+
pointerSize: e.value.style.chart.layout.pointer.size,
|
|
88
|
+
pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
|
|
89
|
+
markerOffset: e.value.style.chart.layout.markers.offsetY + 3
|
|
90
|
+
}), C = h(0), w = h(0), v = h(e.value.style.chart.animation.use ? 0 : o.dataset.value);
|
|
91
|
+
Q(() => o.dataset.value, () => {
|
|
92
|
+
K(o.dataset.value);
|
|
93
|
+
});
|
|
94
|
+
const d = p(() => {
|
|
95
|
+
const a = t.value.width / 2, s = u.value.base, l = Math.PI * ((v.value + 0 - w.value) / (C.value - w.value)) + Math.PI;
|
|
96
|
+
return {
|
|
97
|
+
x1: a,
|
|
98
|
+
y1: s,
|
|
99
|
+
x2: a + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(l),
|
|
100
|
+
y2: s + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(l)
|
|
101
|
+
};
|
|
102
|
+
}), J = p(() => {
|
|
103
|
+
const a = t.value.width / 2, s = u.value.base, l = Math.PI * ((v.value + 0 - w.value) / (C.value - w.value)) + Math.PI, i = a + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(l), P = s + u.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(l), k = t.value.pointerRadius, ye = a + k * Math.cos(l + Math.PI / 2), ge = s + k * Math.sin(l + Math.PI / 2), pe = a + k * Math.cos(l - Math.PI / 2), me = s + k * Math.sin(l - Math.PI / 2);
|
|
104
|
+
return isNaN(i) ? null : `M ${i},${P} ${ye},${ge} ${pe},${me} Z`;
|
|
105
|
+
}), G = p(() => {
|
|
106
|
+
for (let a = 0; a < b.value.series.length; a += 1) {
|
|
107
|
+
const { color: s, from: l, to: i } = b.value.series[a];
|
|
108
|
+
if (v.value >= l && v.value <= i)
|
|
109
|
+
return s;
|
|
110
|
+
}
|
|
111
|
+
return "#2D353C";
|
|
112
|
+
}), M = h(null);
|
|
113
|
+
function Z() {
|
|
114
|
+
if (se(o.dataset) ? X({
|
|
115
|
+
componentName: "VueUiGauge",
|
|
116
|
+
type: "dataset"
|
|
117
|
+
}) : (re({
|
|
118
|
+
datasetObject: o.dataset,
|
|
119
|
+
requiredAttributes: ["value", "series"]
|
|
120
|
+
}).forEach((a) => {
|
|
121
|
+
X({
|
|
122
|
+
componentName: "VueUiGauge",
|
|
123
|
+
type: "datasetAttribute",
|
|
124
|
+
property: a
|
|
125
|
+
});
|
|
126
|
+
}), Object.hasOwn(o.dataset, "series") && (o.dataset.series.length ? o.dataset.series.forEach((a, s) => {
|
|
127
|
+
re({
|
|
128
|
+
datasetObject: a,
|
|
129
|
+
requiredAttributes: ["from", "to"]
|
|
130
|
+
}).forEach((l) => {
|
|
131
|
+
X({
|
|
132
|
+
componentName: "VueUiGauge",
|
|
133
|
+
type: "datasetSerieAttribute",
|
|
134
|
+
property: l,
|
|
135
|
+
index: s
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}) : X({
|
|
139
|
+
componentName: "VueUiGauge",
|
|
140
|
+
type: "datasetAttributeEmpty",
|
|
141
|
+
property: "series"
|
|
142
|
+
}))), K(o.dataset.value || 0), e.value.responsive) {
|
|
143
|
+
const a = Ie(() => {
|
|
144
|
+
const { width: s, height: l } = Oe({
|
|
145
|
+
chart: $.value,
|
|
146
|
+
title: e.value.style.chart.title.text ? U.value : null,
|
|
147
|
+
legend: B.value
|
|
148
|
+
});
|
|
149
|
+
t.value.width = s, t.value.height = l, t.value.centerX = s / 2, t.value.centerY = y.value / 2 / 358.4 * l, t.value.bottom = l, t.value.labelFontSize = 18 / y.value * Math.min(l, s) < 10 ? 10 : 18 / y.value * Math.min(l, s), t.value.legendFontSize = e.value.style.chart.legend.fontSize / y.value * Math.min(l, s) < 14 ? 14 : e.value.style.chart.legend.fontSize / y.value * Math.min(l, s), t.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / y.value * Math.min(l, s), t.value.trackSize = e.value.style.chart.layout.track.size / y.value * Math.min(l, s), t.value.pointerStrokeWidth = ue({
|
|
150
|
+
relator: Math.min(s, l),
|
|
151
|
+
adjuster: y.value,
|
|
152
|
+
source: e.value.style.chart.layout.pointer.strokeWidth,
|
|
153
|
+
threshold: 2,
|
|
154
|
+
fallback: 2
|
|
155
|
+
}), t.value.markerOffset = ue({
|
|
156
|
+
relator: Math.max(s, l),
|
|
157
|
+
adjuster: y.value,
|
|
158
|
+
source: e.value.style.chart.layout.markers.offsetY + 3,
|
|
159
|
+
threshold: 2,
|
|
160
|
+
fallback: 2
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
M.value = new ResizeObserver(a), M.value.observe($.value.parentNode);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
ke(() => {
|
|
167
|
+
Z();
|
|
168
|
+
}), be(() => {
|
|
169
|
+
M.value && M.value.disconnect();
|
|
170
|
+
});
|
|
171
|
+
function K(a) {
|
|
172
|
+
const s = [];
|
|
173
|
+
(b.value.series || []).forEach((k) => {
|
|
174
|
+
s.push(k.from || 0), s.push(k.to || 0);
|
|
175
|
+
}), C.value = Math.max(...s), w.value = Math.min(...s);
|
|
176
|
+
let l = e.value.style.chart.animation.speed;
|
|
177
|
+
const i = Math.abs(a - v.value) / (l * 60);
|
|
178
|
+
function P() {
|
|
179
|
+
v.value < a ? v.value = Math.min(v.value + i, a) : v.value > a && (v.value = Math.max(v.value - i, a)), v.value !== a && requestAnimationFrame(P);
|
|
180
|
+
}
|
|
181
|
+
P();
|
|
182
|
+
}
|
|
183
|
+
const u = p(() => {
|
|
184
|
+
const a = e.value.responsive ? Math.min(t.value.width, t.value.height) : t.value.width;
|
|
185
|
+
return {
|
|
186
|
+
arcs: a / 2.5,
|
|
187
|
+
gradients: a / 2.75,
|
|
188
|
+
base: e.value.responsive ? t.value.height / 2 : t.value.height * 0.7,
|
|
189
|
+
ratingBase: e.value.responsive ? t.value.height / 2 + t.value.height / 4 : t.value.height * 0.9,
|
|
190
|
+
pointerSize: e.value.responsive ? Math.min(t.value.width, t.value.height) / 3 : t.value.width / 3.2
|
|
191
|
+
};
|
|
192
|
+
}), _ = p(() => oe(
|
|
193
|
+
{ series: b.value.series },
|
|
194
|
+
t.value.width / 2,
|
|
195
|
+
u.value.base,
|
|
196
|
+
u.value.arcs,
|
|
197
|
+
u.value.arcs,
|
|
198
|
+
1,
|
|
199
|
+
1,
|
|
200
|
+
1,
|
|
201
|
+
180,
|
|
202
|
+
109.9495,
|
|
203
|
+
40 * t.value.trackSize
|
|
204
|
+
)), he = p(() => oe(
|
|
205
|
+
{ series: b.value.series },
|
|
206
|
+
t.value.width / 2,
|
|
207
|
+
u.value.base,
|
|
208
|
+
u.value.gradients,
|
|
209
|
+
u.value.gradients,
|
|
210
|
+
1,
|
|
211
|
+
1,
|
|
212
|
+
1,
|
|
213
|
+
180,
|
|
214
|
+
109.9495,
|
|
215
|
+
2 * t.value.trackSize
|
|
216
|
+
)), F = h(!1);
|
|
217
|
+
function fe(a) {
|
|
218
|
+
F.value = a, j.value += 1;
|
|
219
|
+
}
|
|
220
|
+
return ie({
|
|
221
|
+
generatePdf: q,
|
|
222
|
+
generateImage: H
|
|
223
|
+
}), (a, s) => (r(), n("div", {
|
|
224
|
+
class: ee(`vue-ui-gauge ${F.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
225
|
+
ref_key: "gaugeChart",
|
|
226
|
+
ref: $,
|
|
227
|
+
id: `vue-ui-gauge_${m.value}`,
|
|
228
|
+
style: R(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
|
|
229
|
+
}, [
|
|
230
|
+
e.value.style.chart.title.text ? (r(), n("div", {
|
|
231
|
+
key: 0,
|
|
232
|
+
ref_key: "chartTitle",
|
|
233
|
+
ref: U,
|
|
234
|
+
style: R(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
235
|
+
}, [
|
|
236
|
+
(r(), E(Ge, {
|
|
237
|
+
key: `title_${L.value}`,
|
|
238
|
+
config: {
|
|
239
|
+
title: {
|
|
240
|
+
cy: "gauge-div-title",
|
|
241
|
+
...e.value.style.chart.title
|
|
242
|
+
},
|
|
243
|
+
subtitle: {
|
|
244
|
+
cy: "gauge-div-subtitle",
|
|
245
|
+
...e.value.style.chart.title.subtitle
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}, {
|
|
249
|
+
default: I(() => [
|
|
250
|
+
e.value.translations.base && Y.dataset.base ? (r(), n("span", Ae, S(e.value.translations.base) + ": " + S(Y.dataset.base), 1)) : g("", !0)
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
}, 8, ["config"]))
|
|
254
|
+
], 4)) : g("", !0),
|
|
255
|
+
e.value.userOptions.show && z.value ? (r(), E(Ne, {
|
|
256
|
+
ref_key: "details",
|
|
257
|
+
ref: ve,
|
|
258
|
+
key: `user_options_${j.value}`,
|
|
259
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
260
|
+
color: e.value.style.chart.color,
|
|
261
|
+
isImaging: c(V),
|
|
262
|
+
isPrinting: c(T),
|
|
263
|
+
uid: m.value,
|
|
264
|
+
hasXls: !1,
|
|
265
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
266
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
267
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
268
|
+
isFullscreen: F.value,
|
|
269
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
270
|
+
chartElement: $.value,
|
|
271
|
+
onToggleFullscreen: fe,
|
|
272
|
+
onGeneratePdf: c(q),
|
|
273
|
+
onGenerateImage: c(H)
|
|
274
|
+
}, _e({ _: 2 }, [
|
|
275
|
+
a.$slots.optionPdf ? {
|
|
276
|
+
name: "optionPdf",
|
|
277
|
+
fn: I(() => [
|
|
278
|
+
x(a.$slots, "optionPdf", {}, void 0, !0)
|
|
279
|
+
]),
|
|
280
|
+
key: "0"
|
|
281
|
+
} : void 0,
|
|
282
|
+
a.$slots.optionImg ? {
|
|
283
|
+
name: "optionImg",
|
|
284
|
+
fn: I(() => [
|
|
285
|
+
x(a.$slots, "optionImg", {}, void 0, !0)
|
|
286
|
+
]),
|
|
287
|
+
key: "1"
|
|
288
|
+
} : void 0,
|
|
289
|
+
a.$slots.optionFullscreen ? {
|
|
290
|
+
name: "optionFullscreen",
|
|
291
|
+
fn: I(({ toggleFullscreen: l, isFullscreen: i }) => [
|
|
292
|
+
x(a.$slots, "optionFullscreen", te(ae({ toggleFullscreen: l, isFullscreen: i })), void 0, !0)
|
|
293
|
+
]),
|
|
294
|
+
key: "2"
|
|
295
|
+
} : void 0
|
|
296
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : g("", !0),
|
|
297
|
+
z.value ? (r(), n("svg", {
|
|
298
|
+
key: 2,
|
|
299
|
+
xmlns: c(Ce),
|
|
300
|
+
class: ee({ "vue-data-ui-fullscreen--on": F.value, "vue-data-ui-fulscreen--off": !F.value }),
|
|
301
|
+
viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
|
|
302
|
+
style: R(`max-width:100%;overflow:hidden !important;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
303
|
+
}, [
|
|
304
|
+
f("defs", null, [
|
|
305
|
+
f("radialGradient", {
|
|
306
|
+
id: `gradient_${m.value}`,
|
|
307
|
+
cx: "50%",
|
|
308
|
+
cy: "50%",
|
|
309
|
+
r: "50%",
|
|
310
|
+
fx: "50%",
|
|
311
|
+
fy: "50%"
|
|
312
|
+
}, [
|
|
313
|
+
f("stop", {
|
|
314
|
+
offset: "0%",
|
|
315
|
+
"stop-color": `#FFFFFF${c(D)[1]}`
|
|
316
|
+
}, null, 8, Ue),
|
|
317
|
+
f("stop", {
|
|
318
|
+
offset: "80%",
|
|
319
|
+
"stop-color": `#FFFFFF${c(D)[e.value.style.chart.layout.track.gradientIntensity]}`
|
|
320
|
+
}, null, 8, Be),
|
|
321
|
+
f("stop", {
|
|
322
|
+
offset: "100%",
|
|
323
|
+
"stop-color": `#FFFFFF${c(D)[1]}`
|
|
324
|
+
}, null, 8, Le)
|
|
325
|
+
], 8, je)
|
|
326
|
+
]),
|
|
327
|
+
f("defs", null, [
|
|
328
|
+
f("filter", {
|
|
329
|
+
id: `blur_${m.value}`,
|
|
330
|
+
x: "-50%",
|
|
331
|
+
y: "-50%",
|
|
332
|
+
width: "200%",
|
|
333
|
+
height: "200%"
|
|
334
|
+
}, [
|
|
335
|
+
f("feGaussianBlur", {
|
|
336
|
+
in: "SourceGraphic",
|
|
337
|
+
stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
|
|
338
|
+
}, null, 8, Te)
|
|
339
|
+
], 8, We)
|
|
340
|
+
]),
|
|
341
|
+
(r(!0), n(O, null, A(_.value, (l, i) => (r(), n("path", {
|
|
342
|
+
key: `arc_${i}`,
|
|
343
|
+
d: l.arcSlice,
|
|
344
|
+
fill: l.color,
|
|
345
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
346
|
+
"stroke-linecap": "round"
|
|
347
|
+
}, null, 8, Ve))), 128)),
|
|
348
|
+
e.value.style.chart.layout.track.useGradient ? (r(), n(O, { key: 0 }, [
|
|
349
|
+
(r(!0), n(O, null, A(he.value, (l, i) => (r(), n("path", {
|
|
350
|
+
key: `arc_${i}`,
|
|
351
|
+
d: l.arcSlice,
|
|
352
|
+
fill: "#FFFFFF",
|
|
353
|
+
stroke: "none",
|
|
354
|
+
"stroke-linecap": "round",
|
|
355
|
+
filter: `url(#blur_${m.value})`
|
|
356
|
+
}, null, 8, qe))), 128)),
|
|
357
|
+
f("rect", {
|
|
358
|
+
x: 0,
|
|
359
|
+
y: u.value.base,
|
|
360
|
+
width: t.value.width <= 0 ? 1e-4 : t.value.width,
|
|
361
|
+
height: t.value.height * 0.3 <= 0 ? 1e-4 : t.value.height * 0.3,
|
|
362
|
+
fill: e.value.style.chart.backgroundColor
|
|
363
|
+
}, null, 8, He)
|
|
364
|
+
], 64)) : g("", !0),
|
|
365
|
+
(r(!0), n(O, null, A(_.value, (l, i) => (r(), n("text", {
|
|
366
|
+
x: c(N)({
|
|
367
|
+
centerX: t.value.width / 2,
|
|
368
|
+
centerY: u.value.base,
|
|
369
|
+
initX: l.center.startX,
|
|
370
|
+
initY: l.center.startY,
|
|
371
|
+
offset: t.value.markerOffset
|
|
372
|
+
}).x,
|
|
373
|
+
y: c(N)({
|
|
374
|
+
centerX: t.value.width / 2,
|
|
375
|
+
centerY: u.value.base,
|
|
376
|
+
initX: l.center.startX,
|
|
377
|
+
initY: l.center.startY,
|
|
378
|
+
offset: t.value.markerOffset
|
|
379
|
+
}).y,
|
|
380
|
+
"text-anchor": l.center.startX < t.value.width / 2 - 5 ? "end" : l.center.startX > t.value.width / 2 + 5 ? "start" : "middle",
|
|
381
|
+
"font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
|
|
382
|
+
"font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
|
|
383
|
+
fill: e.value.style.chart.layout.markers.color
|
|
384
|
+
}, S(l.from.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, Je))), 256)),
|
|
385
|
+
f("text", {
|
|
386
|
+
x: c(N)({
|
|
387
|
+
centerX: t.value.width / 2,
|
|
388
|
+
centerY: u.value.base,
|
|
389
|
+
initX: _.value.at(-1).endX,
|
|
390
|
+
initY: _.value.at(-1).endY,
|
|
391
|
+
offset: t.value.markerOffset
|
|
392
|
+
}).x,
|
|
393
|
+
y: c(N)({
|
|
394
|
+
centerX: t.value.width / 2,
|
|
395
|
+
centerY: u.value.base,
|
|
396
|
+
initX: _.value.at(-1).endX,
|
|
397
|
+
initY: _.value.at(-1).endY,
|
|
398
|
+
offset: t.value.markerOffset
|
|
399
|
+
}).y,
|
|
400
|
+
"text-anchor": "start",
|
|
401
|
+
"font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
|
|
402
|
+
"font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
|
|
403
|
+
fill: e.value.style.chart.layout.markers.color
|
|
404
|
+
}, S(C.value.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, Ze),
|
|
405
|
+
e.value.style.chart.layout.pointer.type === "rounded" ? (r(), n("g", Ke, [
|
|
406
|
+
isNaN(d.value.x2) ? g("", !0) : (r(), n("line", {
|
|
407
|
+
key: 0,
|
|
408
|
+
x1: d.value.x1,
|
|
409
|
+
y1: d.value.y1,
|
|
410
|
+
x2: d.value.x2,
|
|
411
|
+
y2: d.value.y2,
|
|
412
|
+
stroke: e.value.style.chart.layout.pointer.stroke,
|
|
413
|
+
"stroke-width": t.value.pointerStrokeWidth,
|
|
414
|
+
"stroke-linecap": "round"
|
|
415
|
+
}, null, 8, Qe)),
|
|
416
|
+
isNaN(d.value.x2) ? g("", !0) : (r(), n("line", {
|
|
417
|
+
key: 1,
|
|
418
|
+
x1: d.value.x1,
|
|
419
|
+
y1: d.value.y1,
|
|
420
|
+
x2: d.value.x2,
|
|
421
|
+
y2: d.value.y2,
|
|
422
|
+
stroke: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
|
|
423
|
+
"stroke-linecap": "round",
|
|
424
|
+
"stroke-width": t.value.pointerStrokeWidth * 0.7
|
|
425
|
+
}, null, 8, et)),
|
|
426
|
+
!isNaN(d.value.x2) && e.value.style.chart.layout.track.useGradient ? (r(), n("line", {
|
|
427
|
+
key: 2,
|
|
428
|
+
x1: d.value.x1,
|
|
429
|
+
y1: d.value.y1,
|
|
430
|
+
x2: d.value.x2,
|
|
431
|
+
y2: d.value.y2,
|
|
432
|
+
stroke: "white",
|
|
433
|
+
"stroke-linecap": "round",
|
|
434
|
+
"stroke-width": t.value.pointerStrokeWidth * 0.3,
|
|
435
|
+
filter: `url(#blur_${m.value})`
|
|
436
|
+
}, null, 8, tt)) : g("", !0)
|
|
437
|
+
])) : (r(), n("g", at, [
|
|
438
|
+
J.value ? (r(), n("path", {
|
|
439
|
+
key: 0,
|
|
440
|
+
d: J.value,
|
|
441
|
+
fill: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
|
|
442
|
+
stroke: e.value.style.chart.layout.pointer.stroke,
|
|
443
|
+
"stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
|
|
444
|
+
"stroke-linejoin": "round"
|
|
445
|
+
}, null, 8, lt)) : g("", !0)
|
|
446
|
+
])),
|
|
447
|
+
f("circle", {
|
|
448
|
+
cx: t.value.width / 2,
|
|
449
|
+
cy: u.value.base,
|
|
450
|
+
fill: e.value.style.chart.layout.pointer.circle.color,
|
|
451
|
+
r: t.value.pointerRadius <= 0 ? 1e-4 : t.value.pointerRadius,
|
|
452
|
+
"stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
|
|
453
|
+
stroke: e.value.style.chart.layout.pointer.circle.stroke
|
|
454
|
+
}, null, 8, st),
|
|
455
|
+
f("text", {
|
|
456
|
+
x: t.value.width / 2,
|
|
457
|
+
y: u.value.ratingBase,
|
|
458
|
+
"text-anchor": "middle",
|
|
459
|
+
"font-size": t.value.legendFontSize,
|
|
460
|
+
"font-weight": "bold",
|
|
461
|
+
fill: e.value.style.chart.legend.useRatingColor ? G.value : e.value.style.chart.legend.color
|
|
462
|
+
}, S(c(Me)(
|
|
463
|
+
e.value.style.chart.legend.formatter,
|
|
464
|
+
v.value,
|
|
465
|
+
c(Pe)({
|
|
466
|
+
p: e.value.style.chart.legend.prefix + (e.value.style.chart.legend.showPlusSymbol && v.value > 0 ? "+" : ""),
|
|
467
|
+
v: v.value,
|
|
468
|
+
s: e.value.style.chart.legend.suffix,
|
|
469
|
+
r: e.value.style.chart.legend.roundingValue
|
|
470
|
+
})
|
|
471
|
+
)), 9, rt),
|
|
472
|
+
x(a.$slots, "svg", { svg: t.value }, void 0, !0)
|
|
473
|
+
], 14, De)) : g("", !0),
|
|
474
|
+
a.$slots.watermark ? (r(), n("div", ot, [
|
|
475
|
+
x(a.$slots, "watermark", te(ae({ isPrinting: c(T) || c(V) })), void 0, !0)
|
|
476
|
+
])) : g("", !0),
|
|
477
|
+
z.value ? g("", !0) : (r(), E(Ye, {
|
|
478
|
+
key: 4,
|
|
479
|
+
config: {
|
|
480
|
+
type: "gauge",
|
|
481
|
+
style: {
|
|
482
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
483
|
+
gauge: {
|
|
484
|
+
color: "#CCCCCC"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}, null, 8, ["config"])),
|
|
489
|
+
f("div", {
|
|
490
|
+
ref_key: "chartLegend",
|
|
491
|
+
ref: B
|
|
492
|
+
}, [
|
|
493
|
+
x(a.$slots, "legend", { legend: b.value }, void 0, !0)
|
|
494
|
+
], 512)
|
|
495
|
+
], 14, Ee));
|
|
496
|
+
}
|
|
497
|
+
}, gt = /* @__PURE__ */ Re(ut, [["__scopeId", "data-v-4bb1fc5d"]]);
|
|
498
|
+
export {
|
|
499
|
+
gt as default
|
|
500
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DYUBiaGS.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),R=require("./usePrinter-ZlHxdaEz.cjs"),J=require("./vue-ui-skeleton-ClpTCY1x.cjs"),K=require("./Title-XBiDFYKD.cjs"),D=require("./useNestedProp-w7AMWWmz.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=["id"],te={key:0},ae=["xmlns","viewBox"],le=["id"],oe=["stop-color"],re=["stop-color"],ne=["stop-color"],se=["id"],ue=["stdDeviation"],ie=["d","fill","stroke"],ce=["d","filter"],de=["y","width","height","fill"],ve=["x","y","text-anchor","font-size","font-weight","fill"],he=["x","y","font-size","font-weight","fill"],fe={key:1},me=["x1","y1","x2","y2","stroke","stroke-width"],ye=["x1","y1","x2","y2","stroke","stroke-width"],pe=["x1","y1","x2","y2","stroke-width","filter"],ge={key:2},ke=["d","fill","stroke","stroke-width"],be=["cx","cy","fill","r","stroke-width","stroke"],_e=["x","y","font-size","fill"],xe={key:3,class:"vue-data-ui-watermark"},we={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:G}){const s=S,{vue_ui_gauge:j}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length>0&&s.dataset.series&&s.dataset.series.length),h=e.ref(r.createUid()),A=e.ref(null),F=e.ref(0),b=e.ref(null),z=e.ref(null),B=e.ref(null),N=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});e.watch(()=>s.config,l=>{t.value=E(),O(),N.value+=1},{deep:!0});function E(){const l=D.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...D.useNestedProp({userConfig:r.themes.vue_ui_gauge[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}const{isPrinting:P,isImaging:$,generatePdf:M,generateImage:I}=R.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),q=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=e.computed(()=>{if(!k.value||r.objectIsEmpty(s.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const l=[];(s.dataset.series||[]).forEach(o=>{l.push(o.from||0),l.push(o.to||0)});const n=Math.max(...l);return{...s.dataset,series:(s.dataset.series||[]).map((o,i)=>({...o,color:r.convertColorToHex(o.color)||q.value[i]||r.palette[i],value:((o.to||0)-(o.from||0))/n*100}))}}),v=e.ref(512),a=e.ref({height:358.4,width:v.value,top:0,bottom:358.4,centerX:179.2,centerY:v.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}),_=e.ref(0),p=e.ref(0),c=e.ref(t.value.style.chart.animation.use?0:s.dataset.value);e.watch(()=>s.dataset.value,()=>{X(s.dataset.value)});const d=e.computed(()=>{const l=a.value.width/2,n=u.value.base,o=Math.PI*((c.value+0-p.value)/(_.value-p.value))+Math.PI;return{x1:l,y1:n,x2:l+u.value.pointerSize*a.value.pointerSize*.9*Math.cos(o),y2:n+u.value.pointerSize*a.value.pointerSize*.9*Math.sin(o)}}),V=e.computed(()=>{const l=a.value.width/2,n=u.value.base,o=Math.PI*((c.value+0-p.value)/(_.value-p.value))+Math.PI,i=l+u.value.pointerSize*a.value.pointerSize*.9*Math.cos(o),w=n+u.value.pointerSize*a.value.pointerSize*.9*Math.sin(o),f=a.value.pointerRadius,W=l+f*Math.cos(o+Math.PI/2),T=n+f*Math.sin(o+Math.PI/2),H=l+f*Math.cos(o-Math.PI/2),Z=n+f*Math.sin(o-Math.PI/2);return isNaN(i)?null:`M ${i},${w} ${W},${T} ${H},${Z} Z`}),C=e.computed(()=>{for(let l=0;l<m.value.series.length;l+=1){const{color:n,from:o,to:i}=m.value.series[l];if(c.value>=o&&c.value<=i)return n}return"#2D353C"}),x=e.ref(null);function O(){if(r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","series"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:l})}),Object.hasOwn(s.dataset,"series")&&(s.dataset.series.length?s.dataset.series.forEach((l,n)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["from","to"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:o,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),X(s.dataset.value||0),t.value.responsive){const l=Y.throttle(()=>{const{width:n,height:o}=Y.useResponsive({chart:b.value,title:t.value.style.chart.title.text?z.value:null,legend:B.value});a.value.width=n,a.value.height=o,a.value.centerX=n/2,a.value.centerY=v.value/2/358.4*o,a.value.bottom=o,a.value.labelFontSize=18/v.value*Math.min(o,n)<10?10:18/v.value*Math.min(o,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/v.value*Math.min(o,n)<14?14:t.value.style.chart.legend.fontSize/v.value*Math.min(o,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/v.value*Math.min(o,n),a.value.trackSize=t.value.style.chart.layout.track.size/v.value*Math.min(o,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,o),adjuster:v.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,o),adjuster:v.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});x.value=new ResizeObserver(l),x.value.observe(b.value.parentNode)}}e.onMounted(()=>{O()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function X(l){const n=[];(m.value.series||[]).forEach(f=>{n.push(f.from||0),n.push(f.to||0)}),_.value=Math.max(...n),p.value=Math.min(...n);let o=t.value.style.chart.animation.speed;const i=Math.abs(l-c.value)/(o*60);function w(){c.value<l?c.value=Math.min(c.value+i,l):c.value>l&&(c.value=Math.max(c.value-i,l)),c.value!==l&&requestAnimationFrame(w)}w()}const u=e.computed(()=>{const l=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:l/2.5,gradients:l/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),y=e.computed(()=>r.makeDonut({series:m.value.series},a.value.width/2,u.value.base,u.value.arcs,u.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),L=e.computed(()=>r.makeDonut({series:m.value.series},a.value.width/2,u.value.base,u.value.gradients,u.value.gradients,1,1,1,180,109.9495,2*a.value.trackSize)),g=e.ref(!1);function U(l){g.value=l,F.value+=1}return G({generatePdf:M,generateImage:I}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:b,id:`vue-ui-gauge_${h.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.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:z,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${N.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&&S.dataset.base?(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(S.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:A,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref($),isPrinting:e.unref(P),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:U,onGeneratePdf:e.unref(M),onGenerateImage:e.unref(I)},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:o,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,oe),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(r.opacity)[t.value.style.chart.layout.track.gradientIntensity]}`},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,ne)],8,le)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.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,ue)],8,se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:o.arcSlice,fill:o.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ie))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(o,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:o.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,ce))),128)),e.createElementVNode("rect",{x:0,y:u.value.base,width:a.value.width<=0?1e-4:a.value.width,height:a.value.height*.3<=0?1e-4:a.value.height*.3,fill:t.value.style.chart.backgroundColor},null,8,de)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:o.center.startX,initY:o.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:o.center.startX,initY:o.center.startY,offset:a.value.markerOffset}).y,"text-anchor":o.center.startX<a.value.width/2-5?"end":o.center.startX>a.value.width/2+5?"start":"middle","font-size":a.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(o.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ve))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:y.value.at(-1).endX,initY:y.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:y.value.at(-1).endX,initY:y.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.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(_.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,he),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",fe,[isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,me)),isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?C.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,ye)),!isNaN(d.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,pe)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",ge,[V.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:V.value,fill:t.value.style.chart.layout.pointer.useRatingColor?C.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,ke)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:u.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,be),e.createElementVNode("text",{x:a.value.width/2,y:u.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?C.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.legend.formatter,c.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&c.value>0?"+":""),v:c.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,_e),e.renderSlot(l.$slots,"svg",{svg:a.value},void 0,!0)],14,ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:B},[e.renderSlot(l.$slots,"legend",{legend:m.value},void 0,!0)],512)],14,ee))}},Se=Q._export_sfc(we,[["__scopeId","data-v-4bb1fc5d"]]);exports.default=Se;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DYUBiaGS.cjs"),m=require("./useNestedProp-w7AMWWmz.cjs"),k=["viewBox","width"],_={key:0},p=["id"],v=["stop-color"],g=["stop-color"],y=["stroke"],C=["stroke"],N=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),V=[E],b=["stroke"],L=["stroke","stroke-dasharray","stroke-dashoffset"],z=["filter"],G=["stroke","stroke-dasharray","stroke-dashoffset"],F=["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})},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",_,[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,g)],8,p)])):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,y),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,N),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%"},V,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,b),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,L),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,G)],8,z)):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,F)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;
|