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