vue-data-ui 2.11.2 → 2.11.3-beta.0

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 (170) hide show
  1. package/dist/{Arrow-OttzfahM.js → Arrow-DCGOHM6k.js} +1 -1
  2. package/dist/{BaseIcon-CpIcYACc.js → BaseIcon-B7gTspPS.js} +1 -1
  3. package/dist/{ColorPicker-BnsG9Qeu.js → ColorPicker-BZpHLKFj.js} +3 -3
  4. package/dist/{DataTable-CJOtzfgn.js → DataTable-CfJNJ7NR.js} +2 -2
  5. package/dist/{Legend-DKQ4psNY.js → Legend-Ci-FO3V2.js} +2 -2
  6. package/dist/{PackageVersion-D-aPPO0L.js → PackageVersion-Bye0MT5W.js} +3 -3
  7. package/dist/{PenAndPaper-D9g_r8-6.js → PenAndPaper-YLAKASXp.js} +3 -3
  8. package/dist/{Shape-DLjaeo5U.js → Shape-B1e1H4lS.js} +1 -1
  9. package/dist/{Slicer-DuqI_UVS.js → Slicer-CWPgea7y.js} +2 -2
  10. package/dist/{Title-DIYoufYR.js → Title-DqRYBmPn.js} +1 -1
  11. package/dist/{Tooltip-BFz2yelJ.js → Tooltip-Cn5TRz5k.js} +1 -1
  12. package/dist/{dom-to-png-BB-m1MuD.js → dom-to-png-D-0uAVLJ.js} +1 -1
  13. package/dist/{img-Cyr1eIO7.js → img-DP7bwOa0.js} +1 -1
  14. package/dist/{index-d3erwTWB.js → index-BHDxYxsA.js} +1 -1
  15. package/dist/{pdf-BQRTRQlZ.js → pdf-DSSAgKci.js} +1 -1
  16. package/dist/style.css +1 -1
  17. package/dist/{useNestedProp-BqKuhIvF.js → useNestedProp-CX8MPjxN.js} +1 -1
  18. package/dist/{usePrinter-CHrKIDM7.js → usePrinter-mUOYqNDs.js} +3 -3
  19. package/dist/{vue-data-ui-BRKcN5_z.js → vue-data-ui-Bt_OX-Tr.js} +63 -63
  20. package/dist/vue-data-ui.js +1 -1
  21. package/dist/{vue-ui-3d-bar-BIw7nTYA.js → vue-ui-3d-bar-ne-FQ3BQ.js} +9 -9
  22. package/dist/{vue-ui-accordion-BJyaBDyF.js → vue-ui-accordion-BA4dEISn.js} +3 -3
  23. package/dist/{vue-ui-age-pyramid-Dn_061NF.js → vue-ui-age-pyramid-gOYNoKxJ.js} +10 -10
  24. package/dist/{vue-ui-annotator-Y65oZVga.js → vue-ui-annotator-cclttELo.js} +2 -2
  25. package/dist/{vue-ui-bullet-B5mjXy0q.js → vue-ui-bullet-CvKSOwAe.js} +8 -8
  26. package/dist/{vue-ui-candlestick-BIC2-GAV.js → vue-ui-candlestick-B6X1XUi6.js} +11 -11
  27. package/dist/{vue-ui-carousel-table-CnvQ0CeQ.js → vue-ui-carousel-table-BfRMRgxl.js} +4 -4
  28. package/dist/{vue-ui-chestnut-IsRTDol2.js → vue-ui-chestnut-CmmSzRZK.js} +8 -8
  29. package/dist/{vue-ui-chord-iSsr3a59.js → vue-ui-chord-BXpdoJTc.js} +14 -14
  30. package/dist/{vue-ui-circle-pack-CS2l9IXg.js → vue-ui-circle-pack-DACAa7Po.js} +9 -9
  31. package/dist/{vue-ui-cursor-Cq9lPDB7.js → vue-ui-cursor-BCzCHBrt.js} +2 -2
  32. package/dist/{vue-ui-dashboard-7Cm-15oc.js → vue-ui-dashboard-Asv4ojaV.js} +62 -62
  33. package/dist/{vue-ui-digits-BecNI-j7.js → vue-ui-digits-B5FgN7v8.js} +2 -2
  34. package/dist/{vue-ui-donut-D_bFxovZ.js → vue-ui-donut-BBwG3_eI.js} +12 -12
  35. package/dist/{vue-ui-donut-evolution-C8dlmVur.js → vue-ui-donut-evolution-BfZgT3LC.js} +11 -11
  36. package/dist/{vue-ui-dumbbell-Ds41wAQh.js → vue-ui-dumbbell-D6_AcFXT.js} +10 -10
  37. package/dist/{vue-ui-flow-CqdSvk4_.js → vue-ui-flow-a_27wEq2.js} +11 -11
  38. package/dist/{vue-ui-funnel-CNDgAWjp.js → vue-ui-funnel-BQIASo-h.js} +9 -9
  39. package/dist/{vue-ui-galaxy-DzUAHZ4G.js → vue-ui-galaxy-D08PJlS7.js} +11 -11
  40. package/dist/{vue-ui-gauge-Cj-4ZhyL.js → vue-ui-gauge-BST6gr3o.js} +7 -7
  41. package/dist/{vue-ui-gizmo-CCS3u0qr.js → vue-ui-gizmo-CaTpG11y.js} +3 -3
  42. package/dist/{vue-ui-heatmap-CBRd8kvj.js → vue-ui-heatmap-DiuiJH7J.js} +10 -10
  43. package/dist/{vue-ui-history-plot-4XT22zB_.js → vue-ui-history-plot-CvGSOLla.js} +11 -11
  44. package/dist/{vue-ui-kpi-B-lBgRvZ.js → vue-ui-kpi-vDq_MbTb.js} +3 -3
  45. package/dist/{vue-ui-mini-loader-_ksyazrb.js → vue-ui-mini-loader-9J8LdVRw.js} +2 -2
  46. package/dist/{vue-ui-molecule-Db_QmLY6.js → vue-ui-molecule-B1Ykknv1.js} +11 -11
  47. package/dist/{vue-ui-mood-radar-Y_CGEC1L.js → vue-ui-mood-radar-Bo_9AlGw.js} +11 -11
  48. package/dist/{vue-ui-nested-donuts-DosW9Sfg.js → vue-ui-nested-donuts-C6etC_8f.js} +11 -11
  49. package/dist/{vue-ui-onion-CQwIVcfN.js → vue-ui-onion-E77bkiI8.js} +11 -11
  50. package/dist/{vue-ui-parallel-coordinate-plot-Cdu0SvMZ.js → vue-ui-parallel-coordinate-plot-DRX5p5wU.js} +12 -12
  51. package/dist/{vue-ui-quadrant-B8H5sBMi.js → vue-ui-quadrant-BWvOT4Yn.js} +12 -12
  52. package/dist/{vue-ui-quick-chart-ClB6jwSV.js → vue-ui-quick-chart-D0yCkwLS.js} +9 -9
  53. package/dist/{vue-ui-radar-BTluZs04.js → vue-ui-radar-Dxb-NhkQ.js} +12 -12
  54. package/dist/{vue-ui-rating-CTNYeoXO.js → vue-ui-rating-BGBXFzF9.js} +2 -2
  55. package/dist/{vue-ui-relation-circle-CdHhoGcO.js → vue-ui-relation-circle-BhxPABn9.js} +7 -7
  56. package/dist/{vue-ui-ridgeline-Dr6UOfwb.js → vue-ui-ridgeline-CRKQ44VU.js} +12 -12
  57. package/dist/{vue-ui-rings-N2mHKtLh.js → vue-ui-rings-Bm_M6lPM.js} +12 -12
  58. package/dist/{vue-ui-scatter-BcJRyqbE.js → vue-ui-scatter-vrdnuI9T.js} +12 -12
  59. package/dist/{vue-ui-skeleton-BOtCpAcY.js → vue-ui-skeleton-BCAWMgrf.js} +3 -3
  60. package/dist/{vue-ui-smiley-BPqpTUTh.js → vue-ui-smiley-BbDcE-5m.js} +2 -2
  61. package/dist/{vue-ui-spark-trend-BXo8mbxJ.js → vue-ui-spark-trend-dGhL6Ncl.js} +5 -5
  62. package/dist/{vue-ui-sparkbar-DEsL52nJ.js → vue-ui-sparkbar-jBdFxBjW.js} +4 -4
  63. package/dist/{vue-ui-sparkgauge-DkawMq8d.js → vue-ui-sparkgauge-CH1PgkFm.js} +4 -4
  64. package/dist/{vue-ui-sparkhistogram-D8ZCXl7m.js → vue-ui-sparkhistogram-DxuZF7Jp.js} +5 -5
  65. package/dist/{vue-ui-sparkline-D8LYPXpr.js → vue-ui-sparkline-gCNfPXIx.js} +4 -4
  66. package/dist/{vue-ui-sparkstackbar-DzeVCG0H.js → vue-ui-sparkstackbar-CXbLZhzW.js} +5 -5
  67. package/dist/{vue-ui-stackbar-DQ9CcKUd.js → vue-ui-stackbar-CQUmq-Zs.js} +13 -13
  68. package/dist/{vue-ui-strip-plot-C6gcQLMI.js → vue-ui-strip-plot-CwH7POxM.js} +11 -11
  69. package/dist/{vue-ui-table-D7azsjo3.js → vue-ui-table-Bb1L4BbK.js} +3 -3
  70. package/dist/{vue-ui-table-heatmap-DINNMAyX.js → vue-ui-table-heatmap-Bnn-JBcA.js} +4 -4
  71. package/dist/{vue-ui-table-sparkline-BrYh6fVq.js → vue-ui-table-sparkline-Dtyp35z5.js} +5 -5
  72. package/dist/{vue-ui-thermometer-J0A6MZy_.js → vue-ui-thermometer-nqM9BT70.js} +7 -7
  73. package/dist/{vue-ui-timer-CI8zPXh3.js → vue-ui-timer-C2PW101V.js} +5 -5
  74. package/dist/{vue-ui-tiremarks-BuNik_Pf.js → vue-ui-tiremarks-C89aeRJ0.js} +7 -7
  75. package/dist/{vue-ui-treemap-oUtdOGWu.js → vue-ui-treemap-Dj1uUDg4.js} +12 -12
  76. package/dist/{vue-ui-vertical-bar-2bHPN2lr.js → vue-ui-vertical-bar-BwiU9hmU.js} +12 -12
  77. package/dist/{vue-ui-waffle-BuISvHw-.js → vue-ui-waffle-B8cjT4Kp.js} +12 -12
  78. package/dist/{vue-ui-wheel-CSy7_x22.js → vue-ui-wheel-BWUlrmeo.js} +7 -7
  79. package/dist/{vue-ui-word-cloud-DEpoSRMP.js → vue-ui-word-cloud-CLKZ_Ss2.js} +10 -10
  80. package/dist/{vue-ui-world-Cy1VBlK3.js → vue-ui-world-BA6Bpswn.js} +11 -11
  81. package/dist/{vue-ui-xy-PaM6vcjk.js → vue-ui-xy-CsHZNZlq.js} +16 -16
  82. package/dist/{vue-ui-xy-canvas-CSyX_xLO.js → vue-ui-xy-canvas-Cy_2j84B.js} +12 -12
  83. package/package.json +1 -2
  84. package/dist/Arrow-CogAJvGp.cjs +0 -1
  85. package/dist/BaseIcon-DY-33nfj.cjs +0 -1
  86. package/dist/ColorPicker-CrMLe8x_.cjs +0 -1
  87. package/dist/DataTable-CNCnRrD-.cjs +0 -1
  88. package/dist/Legend-ieOu_fKK.cjs +0 -1
  89. package/dist/PackageVersion-BxSGdh6L.cjs +0 -1
  90. package/dist/PenAndPaper-ByAFuR-l.cjs +0 -1
  91. package/dist/Shape-BQIcurpe.cjs +0 -1
  92. package/dist/Slicer-FXxFjXOP.cjs +0 -1
  93. package/dist/Title-D62pPwLz.cjs +0 -1
  94. package/dist/Tooltip-C_H6-uAa.cjs +0 -9
  95. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  96. package/dist/dom-to-png-B3SeX1JP.cjs +0 -3
  97. package/dist/img-Bl4Pt1QH.cjs +0 -1
  98. package/dist/index-Cn2tUOoX.cjs +0 -9
  99. package/dist/pdf-BQABl7QG.cjs +0 -1
  100. package/dist/useChartAccessibility-Cm7nkzTG.cjs +0 -1
  101. package/dist/useNestedProp-C8955nsn.cjs +0 -1
  102. package/dist/usePanZoom-PXRi2Rwx.cjs +0 -1
  103. package/dist/usePrinter-BrH80VBz.cjs +0 -1
  104. package/dist/useResponsive-BBkmXXaa.cjs +0 -1
  105. package/dist/useUserOptionState-BgepsfED.cjs +0 -1
  106. package/dist/vue-data-ui-BbzW2_-6.cjs +0 -9
  107. package/dist/vue-data-ui.cjs +0 -1
  108. package/dist/vue-ui-3d-bar-WFymJ4EL.cjs +0 -19
  109. package/dist/vue-ui-accordion-7GoAZx3k.cjs +0 -1
  110. package/dist/vue-ui-age-pyramid-DGpLdvsL.cjs +0 -1
  111. package/dist/vue-ui-annotator-ypStRKCB.cjs +0 -371
  112. package/dist/vue-ui-bullet-C_Ppz5nn.cjs +0 -34
  113. package/dist/vue-ui-candlestick-BrDk_pc_.cjs +0 -2
  114. package/dist/vue-ui-carousel-table-BTxtBHvb.cjs +0 -1
  115. package/dist/vue-ui-chestnut-D_NZDyDN.cjs +0 -6
  116. package/dist/vue-ui-chord-CZ66gJ7w.cjs +0 -16
  117. package/dist/vue-ui-circle-pack-lGkj98rL.cjs +0 -1
  118. package/dist/vue-ui-cursor-YZyc0ARl.cjs +0 -1
  119. package/dist/vue-ui-dashboard-jP2U4qtK.cjs +0 -1
  120. package/dist/vue-ui-digits-C5PfeED6.cjs +0 -1
  121. package/dist/vue-ui-donut-BM9i2XHJ.cjs +0 -1
  122. package/dist/vue-ui-donut-evolution-Oga32kTV.cjs +0 -1
  123. package/dist/vue-ui-dumbbell-ClzXgan7.cjs +0 -9
  124. package/dist/vue-ui-flow-Bp1oqzTj.cjs +0 -3
  125. package/dist/vue-ui-funnel-y3hN7BGU.cjs +0 -1
  126. package/dist/vue-ui-galaxy-D5vKPiFH.cjs +0 -1
  127. package/dist/vue-ui-gauge-57ahTSbZ.cjs +0 -1
  128. package/dist/vue-ui-gizmo-D5_kCO9e.cjs +0 -1
  129. package/dist/vue-ui-heatmap-B8sfOhVF.cjs +0 -1
  130. package/dist/vue-ui-history-plot-DQVpKlp1.cjs +0 -1
  131. package/dist/vue-ui-kpi-DjI1yXtc.cjs +0 -1
  132. package/dist/vue-ui-mini-loader-BpAnNEHG.cjs +0 -1
  133. package/dist/vue-ui-molecule-BqpYPmrd.cjs +0 -1
  134. package/dist/vue-ui-mood-radar-DI_FioVr.cjs +0 -1
  135. package/dist/vue-ui-nested-donuts-B0rJlEH0.cjs +0 -17
  136. package/dist/vue-ui-onion-CEHc9oKt.cjs +0 -5
  137. package/dist/vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs +0 -8
  138. package/dist/vue-ui-pattern-CT3p_iOg.cjs +0 -1
  139. package/dist/vue-ui-quadrant-DM3Afg_i.cjs +0 -1
  140. package/dist/vue-ui-quick-chart-ClJi48bc.cjs +0 -15
  141. package/dist/vue-ui-radar-f0QY_Mal.cjs +0 -1
  142. package/dist/vue-ui-rating-B71_TxmN.cjs +0 -1
  143. package/dist/vue-ui-relation-circle-DHOG2jKh.cjs +0 -1
  144. package/dist/vue-ui-ridgeline-CxhklaLX.cjs +0 -1
  145. package/dist/vue-ui-rings-DoGxh2qe.cjs +0 -2
  146. package/dist/vue-ui-scatter-BnRkkP5Z.cjs +0 -1
  147. package/dist/vue-ui-skeleton-Mcoev-5q.cjs +0 -41
  148. package/dist/vue-ui-smiley-Ch9trBZA.cjs +0 -2
  149. package/dist/vue-ui-spark-trend-PqEN-rL8.cjs +0 -1
  150. package/dist/vue-ui-sparkbar-DnRQFo63.cjs +0 -1
  151. package/dist/vue-ui-sparkgauge-C0E5Sojk.cjs +0 -1
  152. package/dist/vue-ui-sparkhistogram-Bqtsbb3w.cjs +0 -1
  153. package/dist/vue-ui-sparkline-BTruGe7A.cjs +0 -1
  154. package/dist/vue-ui-sparkstackbar-DeXUgBIH.cjs +0 -1
  155. package/dist/vue-ui-stackbar-CaFp42Tn.cjs +0 -6
  156. package/dist/vue-ui-strip-plot-DzNU6VRW.cjs +0 -1
  157. package/dist/vue-ui-table-DP2ZaGWa.cjs +0 -14
  158. package/dist/vue-ui-table-heatmap-B2gZkAqm.cjs +0 -1
  159. package/dist/vue-ui-table-sparkline-CgN2nMYT.cjs +0 -1
  160. package/dist/vue-ui-thermometer-DgZfQbR2.cjs +0 -1
  161. package/dist/vue-ui-timer-ClM5FpoU.cjs +0 -64
  162. package/dist/vue-ui-tiremarks-19Krsd1f.cjs +0 -1
  163. package/dist/vue-ui-treemap-DvmJ1MOU.cjs +0 -1
  164. package/dist/vue-ui-vertical-bar-RT-SM-us.cjs +0 -4
  165. package/dist/vue-ui-waffle-BSKRUJbJ.cjs +0 -1
  166. package/dist/vue-ui-wheel-DfBVkT9x.cjs +0 -1
  167. package/dist/vue-ui-word-cloud-BlfCmzD-.cjs +0 -1
  168. package/dist/vue-ui-world-EgFhVXSY.cjs +0 -19
  169. package/dist/vue-ui-xy-aQEDcKbT.cjs +0 -3
  170. package/dist/vue-ui-xy-canvas-C6-sYgU_.cjs +0 -9
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cn2tUOoX.cjs"),Ee=require("./useResponsive-BBkmXXaa.cjs"),We=require("./Title-D62pPwLz.cjs"),Pe=require("./usePrinter-BrH80VBz.cjs"),je=require("./DataTable-CNCnRrD-.cjs"),He=require("./Tooltip-C_H6-uAa.cjs"),Je=require("./Legend-ieOu_fKK.cjs"),Ke=require("./vue-ui-skeleton-Mcoev-5q.cjs"),Qe=require("./vue-ui-accordion-7GoAZx3k.cjs"),Fe=require("./useNestedProp-C8955nsn.cjs"),Ze=require("./PackageVersion-BxSGdh6L.cjs"),et=require("./PenAndPaper-ByAFuR-l.cjs"),tt=require("./useUserOptionState-BgepsfED.cjs"),lt=require("./Shape-BQIcurpe.cjs"),ot=require("./useChartAccessibility-Cm7nkzTG.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),nt=["id"],rt=["xmlns","viewBox"],ut=["width","height"],st={key:1},it=["id"],ct=["stop-color"],dt=["offset","stop-color"],vt=["offset","stop-color"],ht=["stop-color"],ft={key:2},mt=["id","cx","cy"],yt=["stop-color","stop-opacity"],pt=["stop-color"],gt=["id"],kt=["id"],bt=["id"],wt=["flood-color"],Ct=["id"],Bt=["flood-color"],_t=["d","stroke","filter"],xt=["d","stroke","filter"],$t=["cx","cy","r","fill","filter"],St={key:6},Nt=["stroke","d"],Et={key:0},Pt=["d","fill","stroke","stroke-width","filter"],Ft=["d","fill","stroke","stroke-width","filter"],Vt={key:0},Lt=["stroke","d"],Tt={key:0},Ot=["d","stroke","stroke-width","filter"],zt={key:1},At=["d","fill","stroke","stroke-width","filter"],Mt=["d","fill","stroke","stroke-width","filter"],Xt={key:1},Dt=["cx","cy","r","fill","stroke","stroke-width"],Yt=["cx","cy","r","fill","stroke","stroke-width"],It=["cx","cy","r","stroke"],qt=["cx","cy","r","fill"],Rt={key:0},Gt=["d","fill","onMouseenter","onClick"],Ut={key:1},Wt=["cx","cy","r","fill"],jt=["x","y","fill","font-size"],Ht=["x","y","fill","font-size"],Jt=["x","y","fill","font-size"],Kt=["x","y","fill","font-size"],Qt=["filter"],Zt={key:0},el=["x","y"],tl={key:1},ll=["cx","cy","fill","stroke","filter","onClick"],ol=["cx","cy","fill","stroke","filter","onClick"],al=["text-anchor","x","y","fill","font-size","onClick"],nl=["text-anchor","x","y","fill","font-size","onClick"],rl=["text-anchor","x","y","fill","font-size","onClick"],ul=["text-anchor","x","y","fill","font-size","onClick"],sl={key:2},il=["x","y","width"],cl=["x","y","width"],dl={key:5,class:"vue-data-ui-watermark"},vl=["onClick"],hl={key:0,style:{"font-variant-numeric":"tabular-nums"}},fl={key:1},ml=["innerHTML"],yl={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Q,{expose:Ve,emit:Le}){const{vue_ui_donut:Te}=n.useConfig(),Oe=e.useSlots(),b=Q,A=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),M=e.ref(null),Z=e.ref(null),ee=e.ref(null),Y=e.ref(null),te=e.ref(null),le=e.ref(null),oe=e.ref(0),ae=e.ref(0),ne=e.ref(0);e.onMounted(()=>{re()}),e.onBeforeUnmount(()=>{Y.value&&Y.value.disconnect()});function re(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{A.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const o=Ee.throttle(()=>{const{width:r,height:l}=Ee.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Z.value:null,legend:t.value.style.chart.legend.show?ee.value:null,source:te.value,noTitle:le.value,padding:de.value});requestAnimationFrame(()=>{u.value.width=r,u.value.height=l})});Y.value=new ResizeObserver(o),Y.value.observe(M.value.parentNode)}}const d=e.ref(n.createUid()),ze=e.ref(null),I=e.ref(!1),U=e.ref(""),p=e.ref(null),ue=e.ref(0);function se(){const o=Fe.useNestedProp({userConfig:b.config,defaultConfig:Te});return o.theme?{...Fe.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>se(),set:o=>o}),y=e.ref(!0),$=e.ref([]);function Ae(o,r=1e3,l=50){return new Promise(a=>{const s=o.length;$.value=Array(s).fill(0);let v=0;o.forEach((h,m)=>{setTimeout(()=>{const N=performance.now();function _(D){const G=Math.min((D-N)/r,1),Ue=n.easeOutCubic(G);$.value[m]=h*Ue,$.value=[...$.value],G<1?requestAnimationFrame(_):($.value[m]=h,$.value=[...$.value],v+=1,v===s&&a())}requestAnimationFrame(_)},m*l)})})}e.onMounted(async()=>{const o=b.dataset.map(r=>r.values.reduce((l,a)=>l+a,0));t.value.startAnimation.show&&await Ae(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs),y.value=!1});const{userOptionsVisible:W,setUserOptionsVisibility:ie,keepUserOptionState:ce}=tt.useUserOptionState({config:t.value}),{svgRef:j}=ot.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>b.config,o=>{t.value=se(),W.value=!t.value.userOptions.showOnChartHover,re(),oe.value+=1,ae.value+=1,ne.value+=1,c.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const de=e.computed(()=>{const{top:o,right:r,bottom:l,left:a}=t.value.style.chart.padding;return{css:`padding:${o}px ${r}px ${l}px ${a}px`,top:o,right:r,bottom:l,left:a}}),{isPrinting:ve,isImaging:he,generatePdf:fe,generateImage:me}=Pe.usePrinter({elementId:`donut__${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut",options:t.value.userOptions.print}),Me=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ye=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),u=e.ref({height:360,width:512}),T=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,r=Math.min(u.value.width,u.value.height)*o,l=r>f.value?f.value:r;return Math.max(l,3)}),pe=Le,S=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||"",patternIndex:r,seriesIndex:r,ghost:!1,pattern:`pattern_${d.value}_${r}`}))),w=e.ref(S.value);e.watch(()=>S.value,o=>w.value=o);function Xe(){return S.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const x=e.ref([]);e.ref(null),e.ref(null);const V=e.ref(!1);function ge({from:o,to:r,duration:l,onUpdate:a,onDone:s,easing:v=n.easeOutCubic}){const h=performance.now();function m(N){const _=Math.min((N-h)/l,1),D=v(_),G=o+(r-o)*D;a(G,_),_<1?requestAnimationFrame(m):(a(r,1),s&&s())}requestAnimationFrame(m)}function ke(o){const r=S.value.find((s,v)=>v===o);let a=w.value.find((s,v)=>v===o).value;if(x.value.includes(o)){let v=function(){w.value=w.value.map((m,N)=>o===N?{...m,value:s}:m)},h=function(){V.value=!0,ge({from:a,to:s,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(m,N)=>{w.value=w.value.map((_,D)=>o===D?{..._,value:m}:_)},onDone:()=>{v(),V.value=!1}})};x.value=x.value.filter(m=>m!==o);const s=r.value;t.value.serieToggleAnimation.show&&t.value.type==="classic"?h():v()}else if(x.value.length<S.value.length-1){let s=function(){x.value.push(o),w.value=w.value.map((h,m)=>o===m?{...h,value:0}:h)},v=function(){V.value=!0,ge({from:a,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(h,m)=>{w.value=w.value.map((N,_)=>o===_?{...N,value:h}:N)},onDone:()=>{s(),V.value=!1}})};t.value.serieToggleAnimation.show&&t.value.type==="classic"?v():s()}pe("selectLegend",E.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const De=e.computed(()=>b.dataset.reduce((o,r)=>o+r.values.reduce((l,a)=>l+a,0),0)),E=e.computed(()=>{if(y.value){const o=$.value.map((l,a)=>({...S.value[a],value:l,color:S.value[a].color,ghost:!1})),r=De.value-$.value.reduce((l,a)=>l+a,0);return r>0&&o.push({name:"__ghost__",value:r,color:"transparent",ghost:!0}),o}else return w.value.forEach((o,r)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),w.value.map((o,r)=>({...o,seriesIndex:r})).filter((o,r)=>!x.value.includes(r))}),be=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle",patternIndex:r})).map((o,r)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:x.value.includes(r)?.5:1,segregate:()=>!V.value&&ke(r),isSegregated:x.value.includes(r)}))),Ye=e.computed(()=>({cy:"donut-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":""})),f=e.computed(()=>{const o=Math.min(u.value.width/3,u.value.height/3);return o<55?55:o}),g=e.computed(()=>n.makeDonut({series:E.value},u.value.width/2,u.value.height/2,f.value,f.value,1.99999,2,1,360,105.25,T.value)),C=e.computed(()=>g.value.filter(o=>!o.ghost)),i=e.computed(()=>{const o=Math.max(...E.value.map(l=>l.value)),r=E.value.map(l=>l.value/o);return n.createPolarAreas({series:r,center:{x:u.value.width/2,y:u.value.height/2},maxRadius:Math.min(u.value.width,u.value.height)/3,hasGhost:y.value})});function O(o){return o.x>u.value.width/2+6?"start":o.x<u.value.width/2-6?"end":"middle"}function Ie(o){return o.middlePoint.y>u.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:u.value.width/2,centerY:u.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:u.value.width/2,centerY:u.value.height/2}).y-100}function B(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function H(o,r){const l=o.value/qe(r);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function qe(o){return[...o].map(r=>r.value).reduce((r,l)=>r+l,0)}const k=e.computed(()=>E.value.map(o=>o.value).reduce((o,r)=>o+r,0)),we=e.computed(()=>k.value/E.value.length),Ce=e.computed(()=>o=>V.value?o.proportion*100:o.value/k.value*100),J=e.ref(null),X=e.ref(!1);function Be({datapoint:o,relativeIndex:r,seriesIndex:l,show:a=!1}){J.value={datapoint:o,seriesIndex:l,config:t.value,series:S.value},I.value=a,p.value=r;let s="";const v=t.value.style.chart.tooltip.customFormat;if(X.value=!1,n.isFunction(v))try{const h=v({seriesIndex:l,datapoint:o,series:S.value,config:t.value});typeof h=="string"&&(U.value=h,X.value=!0)}catch{console.warn("Custom format cannot be applied."),X.value=!1}if(!X.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}"/>${Oe.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${d.value}_${l})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.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.tooltip.roundingValue}),{datapoint:o,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const h=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${h})</span></div>`:s+=`<b>${h}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),U.value=`<div>${s}</div>`}}function L(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${d.value})`:""}const P=e.computed(()=>{const o=E.value.map(l=>({name:l.name,color:l.color})),r=E.value.map(l=>l.value);return{head:o,body:r}});function _e(){e.nextTick(()=>{const o=P.value.head.map((a,s)=>[[a.name],[P.value.body[s]],[isNaN(P.value.body[s]/k.value)?"-":P.value.body[s]/k.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(r);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const q=e.computed(()=>{const o=[' <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>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=P.value.head.map((s,v)=>[{color:s.color,name:s.name},P.value.body[v],isNaN(P.value.body[v]/k.value)?"-":(P.value.body[v]/k.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={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:o,body:r,config:l}}),z=e.ref(!1);function Re(o){z.value=o,ue.value+=1}const xe=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ge(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function F(o,r){pe("selectDatapoint",{datapoint:o,index:r})}function $e(){c.value.showTable=!c.value.showTable}function Se(){c.value.dataLabels.show=!c.value.dataLabels.show}function Ne(){c.value.showTooltip=!c.value.showTooltip}const R=e.ref(!1);function K(){R.value=!R.value}return Ve({getData:Xe,generatePdf:fe,generateCsv:_e,generateImage:me,toggleTable:$e,toggleLabels:Se,toggleTooltip:Ne,toggleAnnotator:K}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:M,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`donut__${d.value}`,onMouseenter:r[6]||(r[6]=()=>e.unref(ie)(!0)),onMouseleave:r[7]||(r[7]=()=>e.unref(ie)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(j)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:R.value,svgRef:e.unref(j),onClose:K},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Me.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:le,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value&&(e.unref(ce)||e.unref(W))?(e.openBlock(),e.createBlock(Pe.UserOptions,{ref_key:"details",ref:ze,key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ve),isImaging:e.unref(he),uid:d.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:M.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:R.value,onToggleFullscreen:Re,onGeneratePdf:e.unref(fe),onGenerateCsv:_e,onGenerateImage:e.unref(me),onToggleTable:$e,onToggleLabels:Se,onToggleTooltip:Ne,onToggleAnnotator:K,style:e.normalizeStyle({visibility:e.unref(ce)?e.unref(W)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${de.value.css}`)},[e.createVNode(Ze._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ut)):e.createCommentVNode("",!0),t.value.type==="classic"&&!isNaN(T.value/f.value)?(e.openBlock(),e.createElementBlock("defs",st,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ct),e.createElementVNode("stop",{offset:`${(1-T.value/f.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,dt),e.createElementVNode("stop",{offset:`${(1-T.value/f.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,vt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ht)],8,it)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${d.value}`,cx:(isNaN(l.middlePoint.x/u.value.width*100)?0:l.middlePoint.x/u.value.width*100)+"%",cy:(isNaN(l.middlePoint.y/u.value.height*100)?0:l.middlePoint.y/u.value.height*100)+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(g.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":g.value[a].color},null,8,pt)],8,mt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${d.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${d.value}`},null,8,kt),r[8]||(r[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,gt),e.createElementVNode("filter",{id:`shadow_${d.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,wt)],8,bt),e.createElementVNode("filter",{id:`drop_shadow_${d.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Bt)],8,Ct)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:u.value.width/2,y:u.value.height/2},16,16,!1,!1,T.value,12,t.value.style.chart.layout.curvedMarkers),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a)},null,8,_t)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x},${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y} ${i.value[a].middlePoint.x},${i.value[a].middlePoint.y}`,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,xt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"&&t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:t.value.style.chart.backgroundColor,filter:`url(#shadow_${d.value})`},null,8,$t)):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.dataset,(l,a)=>(e.openBlock(),e.createElementBlock("defs",{key:`pattern-${l.patternIndex}`},[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a,patternId:`pattern_${d.value}_${a}`}),void 0,!0)]))),128))])):e.createCommentVNode("",!0),k.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Nt))),256)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Pt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Ft))),256))],64)):e.createCommentVNode("",!0),k.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[g.value.length>1?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${d.value})`,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ot))),256))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,At))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${d.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Mt))),256))])):(e.openBlock(),e.createElementBlock("g",Xt,[o.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:`url(#pattern_${d.value}_${g.value[0].patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Dt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${d.value})`:g.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Yt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:9,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,It)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:10,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:`url(#gradient_${d.value})`},null,8,qt)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[g.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("path",{d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>Be({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=s=>{I.value=!1,p.value=null}),onClick:s=>F(l,a)},null,40,Gt))),256))])):(e.openBlock(),e.createElementBlock("g",Ut,[e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent",onMouseenter:r[1]||(r[1]=l=>Be({datapoint:g.value[0],relativeIndex:0,seriesIndex:g.value[0].seriesIndex,show:!0})),onMouseleave:r[2]||(r[2]=l=>{I.value=!1,p.value=null}),onClick:r[3]||(r[3]=l=>F(g.value[0],o.i))},null,40,Wt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,k.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:k.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:u.value.width/2,y:u.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(V.value||y.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,we.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:we.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Kt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:L(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(xe.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:xe.value,isVisible:B(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:H(l,C.value)}),void 0,!0)])],8,el))])):(e.openBlock(),e.createElementBlock("g",tl,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a)},null,8,ll)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,ol)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,al)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,nl)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.percentage.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,rl)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.name.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,ul)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",sl,[B(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,isFirstLoad:y.value}},void 0,!0)])],8,il)):e.createCommentVNode("",!0),B(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(O(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width:O(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x),y:Ie(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:"visible",pointerEvents:"none"})},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:O(i.value[a].middlePoint),flexAlign:O(i.value[a].middlePoint),isFirstLoad:y.value}},void 0,!0)])],12,cl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Qt))),256)),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,rt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dl,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ve)||e.unref(he)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ke.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:T.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:ee},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Je.Legend,{key:`legend_${ne.value}`,legendSet:be.value,config:Ye.value,onClickMarker:r[4]||(r[4]=({i:l})=>ke(l))},e.createSlots({item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${x.value.includes(a)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),x.value.includes(a)?(e.openBlock(),e.createElementBlock("span",fl," ( "+e.toDisplayString(Ge(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",hl," ("+e.toDisplayString(isNaN(l.value/k.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,Ce.value(l),e.unref(n.dataLabel)({v:Ce.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,vl)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:a})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${d.value}_${a})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:be.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:te,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:c.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:M.value,content:U.value,isCustom:X.value,isFullscreen:z.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),A.value?(e.openBlock(),e.createBlock(Qe.default,{key:8,hideDetails:"",config:{open:c.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(je.DataTable,{key:`table_${ae.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ml)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,nt))}},pl=at._export_sfc(yl,[["__scopeId","data-v-5f5d7ad3"]]);exports.default=pl;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),De=require("./Title-D62pPwLz.cjs"),pe=require("./usePrinter-BrH80VBz.cjs"),Fe=require("./DataTable-CNCnRrD-.cjs"),Pe=require("./Legend-ieOu_fKK.cjs"),Ie=require("./vue-ui-skeleton-Mcoev-5q.cjs"),Oe=require("./Slicer-FXxFjXOP.cjs"),Te=require("./vue-ui-accordion-7GoAZx3k.cjs"),ke=require("./useNestedProp-C8955nsn.cjs"),He=require("./PackageVersion-BxSGdh6L.cjs"),Re=require("./PenAndPaper-ByAFuR-l.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),We=["id"],Xe=["xmlns","viewBox"],Ge=["x","y","width","height"],je=["id"],Ye=["stop-color"],Ke=["stop-color"],Ze=["id"],Je=["stop-color"],Qe=["stop-color"],et=["stop-color"],tt={key:1},lt=["x1","x2","y1","y2","stroke","stroke-width"],ot=["x1","x2","y1","y2","stroke","stroke-width"],at={key:0},nt=["x1","x2","y1","y2","stroke","stroke-width"],ut=["x1","x2","y1","y2","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight"],st=["text-anchor","font-size","fill","transform"],ct=["x1","y1","x2","y2","stroke","stroke-width"],it={key:1},dt=["cx","cy","r","fill"],vt={key:0},ht={key:0},yt=["d","stroke"],mt=["text-anchor","x","y","fill"],ft=["cx","cy","r","fill"],gt={key:0},pt=["cx","cy","fill"],kt={key:1},bt=["d","fill","stroke"],xt={key:2},Bt=["d","fill","stroke"],Ct=["x","y","font-size","fill"],_t=["x","y","width","fill","onClick"],Et=["x","y","width","height","onMouseenter","onClick"],Nt={key:4,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},wt=["x","y","width","height","fill"],St=["x1","y1","x2","y2","stroke"],Lt=["x1","y2","x2","y1","stroke"],zt=["cx","cy","r"],Vt=["d","stroke"],At=["cx","cy","r","fill"],$t=["d","fill","stroke"],Dt={class:"vue-ui-donut-evolution-focus"},Ft=["text-anchor","x","y","fill"],Pt=["cx","cy","r","fill"],It=["cx","cy","r","fill"],Ot=["x","y","fill"],Tt=["x","y","font-size","fill"],Ht={key:5,class:"vue-data-ui-watermark"},Rt=["onClick"],Mt={key:0},Ut={key:1},qt={key:9,ref:"source",dir:"auto"},Wt={key:0},Xt={key:1},Gt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:xe,emit:Be}){const{vue_ui_donut_evolution:Ce}=r.useConfig(),y=be,$=e.computed(()=>!!y.dataset&&y.dataset.length),i=e.ref({start:0,end:Math.max(...y.dataset.map(o=>o.values.length))});function q(){W()}const N=e.ref(null);async function W(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&N.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(i.value={start:0,end:E.value},Y.value+=1)}function _e(o){const a=E.value;return o>a?a:o<0||t.value.style.chart.zoom.startIndex!==null&&o<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:o}e.onMounted(()=>{X()});function X(){r.objectIsEmpty(y.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):y.dataset.length&&y.dataset.forEach((o,a)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:a})})}),W()}const _=e.ref(r.createUid()),m=e.ref([]),h=e.ref(null),P=e.ref(null),k=e.ref(!1),b=e.ref(null),G=e.ref(null),Ee=e.ref(null),j=e.ref(0),Y=e.ref(0),K=e.ref(0),Z=e.ref(0),J=e.ref(0),Q=Be,t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value}),{svgRef:le}=Ue.useChartAccessibility({config:t.value.style.chart.title});function oe(){const o=ke.useNestedProp({userConfig:y.config,defaultConfig:Ce});let a={};return o.theme?a={...ke.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[o.theme]||y.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:a=o,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=y.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=y.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}e.watch(()=>y.config,o=>{t.value=oe(),I.value=!t.value.userOptions.showOnChartHover,X(),K.value+=1,Z.value+=1,J.value+=1,z.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>y.dataset,o=>{q()},{deep:!0});const{isPrinting:ae,isImaging:ne,generatePdf:ue,generateImage:re}=pe.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),we=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),c=e.computed(()=>{const o=t.value.style.chart.layout.height,a=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=a-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:a,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(y.dataset.forEach((o,a)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:a}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:a})}),y.dataset.map((o,a)=>({...o,values:r.sanitizeArray(o.values),color:r.convertColorToHex(o.color)||we.value[a]||r.palette[a]||r.palette[a%r.palette.length],length:(o.values||[]).length,uid:r.createUid()})))),V=e.computed(()=>C.value.filter(o=>!m.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((a,l)=>l>=i.value.start&&l<=i.value.end)}))),E=e.computed(()=>Math.max(...V.value.map(o=>o.length))),g=e.computed(()=>c.value.width/(i.value.end-i.value.start)),f=e.computed(()=>{const o=[];for(let n=0;n<i.value.end-i.value.start;n+=1){const v=V.value.map(B=>B.values[n]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,p)=>B+p,0),U=v.map(B=>B/x),L=u.value.left+g.value*n+g.value/2;o.push({index:n,percentages:U,subtotal:d||x<0?null:x,values:v,x:L})}const a=0,l=Math.max(...o.map(n=>n.subtotal)),s=o.length===1?l*2:l;return o.map((n,v)=>{const d=g.value/2*.7,x=d>c.value.width/16?c.value.width/16:d,U=h.value===n.index?c.value.width/16:x,L=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,B=c.value.absoluteHeight-u.value.bottom-c.value.height*n.subtotal/r.calculateNiceScale(a,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...n,y:B,radius:x,activeRadius:U,hoverRadius:L,donut:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,L,L,1.99999,2,1,360,105.25,L/2),donutFocus:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},c.value.centerX,c.value.centerY,c.value.height/3.6,c.value.height/3.6,1.99999,2,1,360,105.25,c.value.height/6)}})});function D(o,a,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,o,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:o,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:a,index:l})}const O=e.computed(()=>({max:Math.max(...f.value.map(o=>o.subtotal)),min:0})),w=e.computed(()=>{const o=f.value.length===1?O.value.max*2:O.value.max;return r.calculateNiceScale(O.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function Se(o){return o/w.value.max}const Le=e.computed(()=>w.value.ticks.map(o=>({y:c.value.absoluteHeight-u.value.bottom-c.value.height*Se(o),value:o})));function se(o,a){return isNaN(o.value/r.sumByAttribute(a,"value"))?0:(o.value/r.sumByAttribute(a,"value")*100).toFixed(0)+"%"}function ce(){k.value||(h.value=null,P.value=null)}function ze(o){k.value||(h.value=o.index,P.value=o)}const T=e.ref(null);function H(o,a){o.subtotal&&(P.value=null,h.value=null,k.value=!0,b.value=o,[null,void 0].includes(a)||(T.value=a))}function ie(){b.value=null,k.value=!1,T.value=null}const de=e.computed(()=>C.value.map((o,a)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,a)=>a.value-o.value).map(o=>({...o,opacity:m.value.includes(o.uid)?.5:1,segregate:()=>R(o.uid),isSegregated:m.value.includes(o.uid)}))),ve=e.computed(()=>f.value.map(o=>o.subtotal).reduce((o,a)=>o+a,0)),Ve=e.computed(()=>({cy:"donut-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":""}));function R(o){if(m.value.includes(o))m.value=m.value.filter(a=>a!==o),Q("selectLegend",null);else{if(m.value.length===C.value.length-1)return;m.value.push(o),Q("selectLegend",C.value.find(a=>a.uid===o))}b.value&&H(f.value.find((a,l)=>l===T.value))}const S=e.computed(()=>{const o=[""].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>({name:n.name,color:n.color}))).concat(["Σ"]);let a=[];for(let n=0;n<E.value;n+=1){const v=C.value.filter(d=>!m.value.includes(d.uid)).map(d=>d.values[n]??0).reduce((d,x)=>d+x,0);a.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[n]??"-"].concat(C.value.filter(d=>!m.value.includes(d.uid)).map(d=>({value:d.values[n]??0,percentage:d.values[n]?d.values[n]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={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},s=[t.value.table.columnNames.period].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:o,body:a,config:l,colNames:s}});function Ae(){return C.value}function he(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[...S.value.head.map(v=>v.name??v)],l=[...S.value.body.map(v=>v.map(d=>d.value??d))],s=o.concat([a]).concat(l),n=r.createCsvContent(s);r.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const A=e.ref(!1);function $e(o){A.value=o,j.value+=1}function ye(){z.value.showTable=!z.value.showTable}const F=e.ref(!1);function M(){F.value=!F.value}function me(o){return o.proportion*100>t.value.style.chart.donuts.hover.hideLabelsUnderValue}function fe(o){return o.proportion*100>t.value.style.chart.donuts.zoom.hideLabelsUnderValue}return xe({getData:Ae,generatePdf:ue,generateCsv:he,generateImage:re,toggleTable:ye,toggleAnnotator:M}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:G,class:e.normalizeClass(`vue-ui-donut-evolution ${A.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;background:${t.value.style.chart.backgroundColor}`),id:_.value,onMouseenter:a[4]||(a[4]=()=>e.unref(ee)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re._sfc_main,{key:0,svgRef:e.unref(le),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:M},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Ee,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:ce},[(e.openBlock(),e.createBlock(De._sfc_main,{key:`title_${K.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(te)||e.unref(I))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(ne),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:G.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(ue),onGenerateCsv:he,onGenerateImage:e.unref(re),onToggleTable:ye,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:s})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:s})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:le,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),viewBox:`0 0 ${c.value.absoluteWidth} ${c.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(He._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:c.value.width,height:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,Ke)],8,je),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Je),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,et)],8,Ze)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",tt,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+c.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,lt),e.createElementVNode("line",{x1:u.value.left,x2:c.value.absoluteWidth-u.value.right,y1:c.value.absoluteHeight-u.value.bottom,y2:c.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ot),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:c.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,nt))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Le.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=w.value.min&&l.value<=w.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ut)):e.createCommentVNode("",!0),l.value>=w.value.min&&l.value<=w.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,rt)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:3,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===E.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+c.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,st)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<f.value.length-1&&![l.subtotal,f.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:f.value[s+1].x,y2:f.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,ct)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",it,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,dt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",vt,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,n=>(e.openBlock(),e.createElementBlock("g",null,[me(n)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(r.calcNutArrowPath)(n,{x:n.center.endX,y:n.center.endY},12,12,{x:l.x,y:l.y},!1,20),stroke:n.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,yt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("g",null,[me(n)?(e.openBlock(),e.createElementBlock("text",{key:0,"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!0,9).x,y:e.unref(r.calcMarkerOffsetY)(n,14,10),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(n.name)+": "+e.toDisplayString(se(n,l.donut))+" ("+e.toDisplayString(n.value===null?"-":D(n.value,n,v))+") ",9,mt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,ft)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",gt,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,pt)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,bt))),256))])):(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Bt))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(D(l.subtotal,l,s)),9,Ct)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:c.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:n=>H(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,_t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:c.value.height,fill:"transparent",onMouseenter:n=>ze(l),onMouseleave:ce,onClick:n=>H(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,Et))),256)),k.value?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:c.value.width,height:c.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,wt),e.createElementVNode("line",{"data-dom-to-png-ignore":"",x1:c.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:c.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,St),e.createElementVNode("line",{"data-dom-to-png-ignore":"",x1:c.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:c.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,Lt),e.createElementVNode("circle",{"data-cy-close":"",onClick:ie,onKeypress:e.withKeys(ie,["enter"]),cx:c.value.absoluteWidth-u.value.right-c.value.width/40,cy:u.value.top+c.value.height/30,r:c.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,zt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[fe(l)?(e.openBlock(),e.createElementBlock("path",{key:0,"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:c.value.centerX,y:c.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,Vt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,At),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,$t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",Dt,[fe(l)?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(se(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":D(l.value,l,s))+") ",9,Ft)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Pt),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,It),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+c.value.width/2,y:u.value.top+c.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(D(b.value.subtotal,b.value,null)),9,Ot),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,Tt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:c.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(ne)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),E.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Oe.Slicer,{ref_key:"slicerComponent",ref:N,key:`slicer_${Y.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:E.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":a[0]||(a[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":a[1]||(a[1]=l=>i.value.end=l),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:E.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:q},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${J.value}`,legendSet:de.value,config:Ve.value,onClickMarker:a[2]||(a[2]=({legend:l})=>R(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{onClick:n=>R(l.uid),style:e.normalizeStyle(`opacity:${m.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),m.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ut," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Mt," ("+e.toDisplayString(isNaN(l.value/ve.value)?"-":e.unref(r.dataLabel)({v:l.value/ve.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Rt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:de.value},void 0,!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",qt,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(Te.default,{key:10,hideDetails:"",config:{open:z.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(Fe.DataTable,{key:`table_${Z.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.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[3]||(a[3]=l=>z.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",Wt,"-")):(e.openBlock(),e.createElementBlock("b",Xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,We))}},jt=qe._export_sfc(Gt,[["__scopeId","data-v-5d9bec59"]]);exports.default=jt;
@@ -1,9 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cn2tUOoX.cjs"),Q=require("./useResponsive-BBkmXXaa.cjs"),de=require("./Title-D62pPwLz.cjs"),ee=require("./usePrinter-BrH80VBz.cjs"),ve=require("./DataTable-CNCnRrD-.cjs"),he=require("./vue-ui-skeleton-Mcoev-5q.cjs"),ye=require("./Legend-ieOu_fKK.cjs"),fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),te=require("./useNestedProp-C8955nsn.cjs"),me=require("./PackageVersion-BxSGdh6L.cjs"),be=require("./PenAndPaper-ByAFuR-l.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${c.value})`:t.value.style.chart.plots.endColor}]),ne=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),l={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.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),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%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.value,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,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("path",{d:`M
2
- ${l.startX},${l.y+t.value.style.chart.plots.radius/2}
3
- C ${l.centerX},${l.y} ${l.centerX},${l.y}
4
- ${l.endX},${l.y+t.value.style.chart.plots.radius/2}
5
- L ${l.endX},${l.y-t.value.style.chart.plots.radius/2}
6
- C ${l.centerX},${l.y} ${l.centerX},${l.y}
7
- ${l.startX},${l.y-t.value.style.chart.plots.radius/2}
8
- Z
9
- `,fill:l.endX>l.startX?`url(#grad_positive_${c.value})`:`url(#grad_negative_${c.value})`},null,8,Ye)])):(e.openBlock(),e.createElementBlock("g",Ze,[e.createElementVNode("rect",{x:l.endX>l.startX?l.startX:l.endX,y:l.y-t.value.style.chart.plots.link.strokeWidth/2,height:t.value.style.chart.plots.link.strokeWidth,width:Math.abs(l.endX-l.startX),fill:l.endX>l.startX?`url(#grad_positive_${c.value})`:`url(#grad_negative_${c.value})`},null,8,Je)])),e.createElementVNode("circle",{cx:l.startX,cy:l.y,r:t.value.style.chart.plots.radius,fill:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.value})`:t.value.style.chart.plots.startColor,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth},null,8,Ke),e.createElementVNode("circle",{cx:l.endX,cy:l.y,r:t.value.style.chart.plots.radius,fill:t.value.style.chart.plots.gradient.show?`url(#end_grad_${c.value})`:t.value.style.chart.plots.endColor,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth},null,8,Qe)]))),256)),t.value.style.chart.labels.startLabels.show?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:l.startX,y:r.value.top+(o+1)*i.value-t.value.style.chart.labels.startLabels.fontSize/3+t.value.style.chart.labels.startLabels.offsetY,fill:t.value.style.chart.labels.startLabels.useStartColor?t.value.style.chart.plots.startColor:t.value.style.chart.labels.startLabels.color,"font-size":t.value.style.chart.labels.startLabels.fontSize,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l.start,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l.start,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.startLabels.rounding}),{datapoint:l,seriesIndex:o})),9,tt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.labels.endLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:l.endX,y:r.value.top+o*i.value+t.value.style.chart.labels.endLabels.fontSize+t.value.style.chart.labels.endLabels.offsetY,fill:t.value.style.chart.labels.endLabels.useEndColor?t.value.style.chart.plots.endColor:t.value.style.chart.labels.endLabels.color,"font-size":t.value.style.chart.labels.endLabels.fontSize,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l.end,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l.end,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.endLabels.rounding}),{datapoint:l,seriesIndex:o})),9,at))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,xe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"dumbbell",style:{backgroundColor:t.value.style.chart.backgroundColor,dumbbell:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&b.value?(e.openBlock(),e.createBlock(ye.Legend,{key:`legend_${D.value}`,legendSet:Z.value,config:ne.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:4px;font-size:${t.value.style.chart.legend.fontSize}px`)},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:"0 0 20 20",height:t.value.style.chart.legend.fontSize,width:t.value.style.chart.legend.fontSize},[e.createElementVNode("circle",{cx:10,cy:10,r:9,fill:l.color},null,8,st)],8,rt)),e.createTextVNode(" "+e.toDisplayString(l.name),1)],4)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(fe.default,{key:8,hideDetails:"",config:{open:p.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(ve.DataTable,{key:`table_${O.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[0]||(n[0]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,_e))}},it=ke._export_sfc(ut,[["__scopeId","data-v-39357753"]]);exports.default=it;
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cn2tUOoX.cjs"),Le=require("./Title-D62pPwLz.cjs"),ge=require("./usePrinter-BrH80VBz.cjs"),ze=require("./DataTable-CNCnRrD-.cjs"),Fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),Ve=require("./vue-ui-skeleton-Mcoev-5q.cjs"),me=require("./useNestedProp-C8955nsn.cjs"),Ae=require("./PackageVersion-BxSGdh6L.cjs"),Ie=require("./PenAndPaper-ByAFuR-l.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),De=require("./useChartAccessibility-Cm7nkzTG.cjs"),He=require("./Tooltip-C_H6-uAa.cjs"),qe=require("./Legend-ieOu_fKK.cjs"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},je={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},Ge=["xmlns","viewBox"],We=["width","height"],Xe=["id"],Ze=["stop-color"],Je=["stop-color"],Ke=["d","fill","stroke","stroke-width"],Qe=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],et=["x","y","font-size","fill"],tt=["x","y","font-size","fill"],ot={key:4,class:"vue-data-ui-watermark"},lt=["onClick"],at={key:6,ref:"source",dir:"auto"},nt=["innerHTML"],rt={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ye,{expose:be}){const{vue_ui_flow:ke}=n.useConfig(),y=ye,V=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{G()});function G(){n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiFlow",type:"dataset"})}const A=e.ref(n.createUid()),I=e.ref(null),W=e.ref(0),X=e.ref(0),M=e.ref(!1),D=e.ref(""),Ce=e.ref(null),S=e.ref(!1);function we(o){S.value=o,W.value+=1}const t=e.computed({get:()=>Q(),set:o=>o}),{userOptionsVisible:H,setUserOptionsVisibility:Z,keepUserOptionState:J}=Me.useUserOptionState({config:t.value}),{svgRef:K}=De.useChartAccessibility({config:t.value.style.chart.title});function Q(){const o=me.useNestedProp({userConfig:y.config,defaultConfig:ke});let a=o;return o.theme?a={...me.useNestedProp({userConfig:n.themes.vue_ui_flow[o.theme]||y.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:a=o,a.nodeCategories=y.config.nodeCategories||{},a.nodeCategoryColors=y.config.nodeCategoryColors||{},a}e.watch(()=>y.config,o=>{t.value=Q(),H.value=!t.value.userOptions.showOnChartHover,G(),X.value+=1,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:oe,generateImage:le}=ge.usePrinter({elementId:`flow_${A.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),P=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ae=e.computed(()=>t.value.style.chart.nodes.gap),T=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$e=e.computed(()=>t.value.style.chart.links.width),q=e.computed(()=>!y.dataset||!y.dataset.length?[]:y.dataset.map((o,a)=>[o[0],o[1],n.checkNaN(o[2]),o[3]?n.convertColorToHex(o[3]):P.value[a]||P.value[a%P.value.length]||n.palette[a]||n.palette[a%n.palette.length]])),ne=e.computed(()=>{const o={};function a(r){o[r]||(o[r]={inflow:0,outflow:0})}q.value.forEach(([r,u,h])=>{a(r),a(u),o[r].outflow+=h,o[u].inflow+=h});let l=0;for(const r in o){const u=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,u)}return l});function xe(o){return o/ne.value*100+t.value.style.chart.nodes.minHeight}function Se(o){const a=t.value.style.chart.nodes.minHeight;return(o-a)/100*ne.value}function Te(o){const a={},l={};function r(s,c){a[s]||(a[s]={height:0,level:null,inflow:0,outflow:0,uid:n.createUid()}),a[s].level===null&&(a[s].level=c),l[c]||(l[c]=[]),l[c].includes(s)||l[c].push(s)}o.forEach(([s,c,d])=>{var i;const v=((i=a[s])==null?void 0:i.level)??0,p=v+1;r(s,v),r(c,p),a[s].children||(a[s].children=[]),a[s].children.push({target:c,value:d}),a[s].outflow+=d,a[c].inflow+=d});const u=new Set(o.map(([s])=>s)),h=new Set(o.map(([,s])=>s)),w=Array.from(u).filter(s=>!h.has(s)),_={};w.forEach((s,c)=>{_[s]=P.value[c]||n.palette[c%n.palette.length]});const b={};o.forEach(([s,c,d,v])=>{v&&(b[s]=v,b[c]=v)}),Object.keys(a).forEach((s,c)=>{var p,i;const d=(p=t.value.nodeCategories)==null?void 0:p[s],v=d?(i=t.value.nodeCategoryColors)==null?void 0:i[d]:null;a[s].color=b[s]||v||(w.includes(s)?_[s]:null)||n.palette[c%n.palette.length]});for(const s in a)a[s].height=xe(Math.max(a[s].inflow,a[s].outflow)),a[s].name=s;const C={};for(const s in l){let c=0;l[s].forEach((d,v)=>{const p=a[d];C[d]={x:parseInt(s,10)*$e.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p.height,i:v,color:p.color,value:Se(p.height)},c+=p.height+ae.value})}const x=[];for(const s of Object.keys(a)){let c=C[s].absoluteY+t.value.style.chart.padding.top;const d=a[s],v=C[s];d.children&&d.children.forEach(({target:p,value:i})=>{const f=C[p],N=a[p],F=n.checkNaN(c),he=n.checkNaN(c+i/d.outflow*v.height),j=n.checkNaN(f.y+t.value.style.chart.padding.top),pe=n.checkNaN(j+i/N.inflow*f.height);x.push({id:n.createUid(),source:s,target:p,path:`M ${n.checkNaN(v.x+T.value)} ${F} L ${n.checkNaN(v.x+T.value)} ${he} L ${n.checkNaN(f.x)} ${pe} L ${n.checkNaN(f.x)} ${j} Z`,value:i,sourceColor:d.color,targetColor:N.color}),c+=he-F,C[p].y+=pe-j})}return{nodeCoordinates:C,links:x}}const g=e.computed(()=>{const o=Te(y.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((a,l)=>({...o.nodeCoordinates[a],name:a})),links:o.links}});e.computed(()=>Be(g.value.nodes));function Be(o){const a={};for(const r in o){const{x:u,height:h}=o[r];a[u]||(a[u]=0),a[u]+=h+ae.value}return Math.max(...Object.values(a))}const E=e.computed(()=>{const{top:o,right:a,bottom:l,left:r}=t.value.style.chart.padding,u=Math.max(...g.value.nodes.map(b=>b.x)),h=r+u+T.value+a,w=Math.max(...g.value.nodes.map(b=>b.absoluteY+b.height)),_=o+w+l;return{width:h,height:_}});function _e(o){const a={},l={},r=new Set;return q.value.forEach(([u,h,w])=>{a[u]||(a[u]=[]),l[h]||(l[h]=[]),a[u].push(h),l[h].push(u)}),a[o]&&a[o].forEach(u=>r.add(u)),l[o]&&l[o].forEach(u=>r.add(u)),Array.from(r).concat(o)}const m=e.ref(null),B=e.ref(null),R=e.ref(null),O=e.ref(!1);function Ee(o){$.value=[],m.value=_e(o.name),B.value=o.name;const a=o.name,l=q.value;let r=0,u=0,h=[],w=[];const _=new Set(l.map(([i])=>i)),b=new Set(l.map(([,i])=>i)),fe=Array.from(_).filter(i=>!b.has(i)),C=l.filter(([i])=>fe.includes(i)).reduce((i,[f,N,F])=>i+F,0),x={};g.value.nodes.forEach(i=>{x[i.name]=i.color}),l.forEach(([i,f,N])=>{f===a&&(r+=N,h.push({source:i,value:N,color:x[i]})),i===a&&(u+=N,w.push({target:f,value:N,color:x[f]}))});const s=Math.max(r,u),c=C>0?s/C*100:0,d={name:a,inflow:r,outflow:u,from:h,to:w,percentOfTotal:c,color:x[a]||"#000000"};R.value={datapoint:d},M.value=!0;let v="";const p=t.value.style.chart.tooltip.customFormat;if(O.value=!1,n.isFunction(p))try{const i=p({datapoint:d,series:g.value,config:t.value});typeof i=="string"&&(D.value=i,O.value=!0)}catch{console.warn("Custom format cannot be applied.")}if(!O.value){const i=t.value.style.chart.tooltip.showPercentage?`<div>${n.dataLabel({p:t.value.style.chart.tooltip.translations.percentOfTotal,v:d.percentOfTotal,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</div>`:"";v+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${d.color}">⏹</span>${d.name}${i}</div>`,d.from.length&&(v+=`<div>${t.value.style.chart.tooltip.translations.from}</div>`,d.from.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹←</span> ${f.source}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),d.to.length&&(v+=`<div style="margin-top:6px;">${t.value.style.chart.tooltip.translations.to}</div>`,d.to.forEach(f=>{v+=`<div><span style="color:${f.color}">⏹→</span> ${f.target}: ${n.applyDataLabel(t.value.style.chart.nodes.labels.formatter,f.value,n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:f.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}))}</div>`})),D.value=v}}function re(){m.value=null,B.value=null,M.value=!1}const se=e.computed(()=>g.value.links.map(({source:o,target:a,sourceColor:l,targetColor:r,value:u})=>({source:o,target:a,sourceColor:l,targetColor:r,value:u})));function ue(){e.nextTick(()=>{const o=se.value.map((r,u)=>[[r.source],[r.target],[r.value]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=n.createCsvContent(a);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const L=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],a=se.value.map((u,h)=>[{color:u.sourceColor,name:u.source},{color:u.targetColor,name:u.target},n.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:u.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={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.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:a,config:l}});function Pe(){return g.value}function ie(){k.value.showTable=!k.value.showTable}const z=e.ref(!1);function Y(){z.value=!z.value}function ce(){k.value.showTooltip=!k.value.showTooltip}const de=e.computed(()=>{const o=new Set(g.value.nodes.map(a=>t.value.nodeCategories[a.name]||"__uncategorized__"));return Array.from(o).map(a=>({name:a,color:t.value.nodeCategoryColors[a]||n.palette[0],shape:"square",count:g.value.nodes.filter(l=>(t.value.nodeCategories[l.name]||"__uncategorized__")===a).length})).map((a,l)=>({...a,segregate:()=>U({legend:a,i:l}),opacity:$.value.length?$.value.includes(l)?1:.5:1}))}),ve=e.computed(()=>de.value.filter(o=>o.name!=="__uncategorized__")),$=e.ref([]);function U({legend:o,i:a}){var r;const l=o.name;if((r=m.value)!=null&&r.every(u=>t.value.nodeCategories[u]===l)){m.value=null,B.value=null,$.value=[];return}$.value=[a],m.value=g.value.nodes.filter(u=>t.value.nodeCategories[u.name]===l).map(u=>u.name),B.value=null}const Oe=e.computed(()=>({cy:"flow-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:t.value.style.chart.legend.paddingBottom,fontWeight:t.value.style.chart.legend.bold?"bold":"normal"}));return be({getData:Pe,generateCsv:ue,generateImage:le,generatePdf:oe,toggleTable:ie,toggleAnnotator:Y,toggleTooltip:ce,drillCategory:U,unselectNode:re}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:I,class:e.normalizeClass(`vue-ui-flow ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`flow_${A.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(Z)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:Y},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",Ue,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",je,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(J)||e.unref(H))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref:"details",key:`user_option_${W.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:A.value,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,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:k.value.showTooltip,onToggleTooltip:ce,onToggleFullscreen:we,onGeneratePdf:e.unref(oe),onGenerateCsv:ue,onGenerateImage:e.unref(le),onToggleTable:ie,onToggleAnnotator:Y,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(H)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","hasTooltip","isTooltip","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgRef",ref:K,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:E.value.width,height:E.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,We)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,Je)],8,Xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`
2
- opacity:${m.value?m.value.includes(l.source)&&m.value.includes(l.target)?1:.3:B.value?[l.target,l.source].includes(B.value)?1:.3:t.value.style.chart.links.opacity}
3
- `)},null,12,Ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(n.checkNaN)(l.absoluteY)+t.value.style.chart.padding.top,height:e.unref(n.checkNaN)(l.height),width:T.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:u=>Ee(l),onMouseleave:a[0]||(a[0]=u=>re()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.3:1}`)},null,44,Qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+T.value/2,y:e.unref(n.checkNaN)(l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(n.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(n.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+T.value/2,y:e.unref(n.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize)+t.value.style.chart.padding.top,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(n.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:r})),13,tt))),256)),e.renderSlot(o.$slots,"svg",{svg:E.value},void 0,!0)],14,Ge)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:5,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Ce},[t.value.style.chart.legend.show&&ve.value.length?(e.openBlock(),e.createBlock(qe.Legend,{key:0,legendSet:ve.value,config:Oe.value,onClickMarker:a[1]||(a[1]=l=>U(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${$.value.length?$.value.includes(r)?1:.5:1}`)},e.toDisplayString(l.name)+" ("+e.toDisplayString(l.count)+") ",13,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:de.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:k.value.showTooltip&&M.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:I.value,content:D.value,isCustom:O.value,isFullscreen:S.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(Fe.default,{key:7,hideDetails:"",config:{open:k.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(ze.DataTable,{colNames:L.value.colNames,head:L.value.head,body:L.value.body,config:L.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]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ye))}},st=Re._export_sfc(rt,[["__scopeId","data-v-6fcb877a"]]);exports.default=st;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),J=require("./useNestedProp-C8955nsn.cjs"),K=require("./usePrinter-BrH80VBz.cjs"),ue=require("./Title-D62pPwLz.cjs"),ie=require("./PenAndPaper-ByAFuR-l.cjs"),ce=require("./DataTable-CNCnRrD-.cjs"),ve=require("./vue-ui-accordion-7GoAZx3k.cjs"),Q=require("./useResponsive-BBkmXXaa.cjs"),de=require("./vue-ui-skeleton-Mcoev-5q.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./PackageVersion-BxSGdh6L.cjs"),me=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ye=["xmlns","viewBox"],ge=["width","height"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stop-color"],Le=["stroke","stroke-width"],$e=["stroke","stroke-width"],Be=["x","y","font-size","fill","font-weight"],_e=["points","fill"],Se=["stroke","stroke-width","rx"],Ne=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Te={key:5,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Pe={__name:"vue-ui-funnel",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(a=>({"58a5200a":ne.value}));const{vue_ui_funnel:te}=r.useConfig(),d=Z,b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(z);function z(){if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiFunnel",type:"dataset"}):d.dataset.forEach((a,o)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,r.error({componentName:"VueUiFunnel",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:o,height:l}=Q.useResponsive({chart:L.value,title:t.value.style.chart.title.text?O.value:null,source:V.value,noTitle:E.value});requestAnimationFrame(()=>{u.value.height=l,u.value.width=o,f.value=H(),i.value.circles=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.circles.dataLabels.fontSize,threshold:10,fallback:10}),i.value.names=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.name.fontSize,threshold:10,fallback:10}),i.value.values=r.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.bars.dataLabels.value.fontSize,threshold:10,fallback:10})})});D.value=new ResizeObserver(a),D.value.observe(L.value.parentNode)}}const L=e.ref(null),g=e.ref(r.createUid()),T=e.ref(0),A=e.ref(0),P=e.ref(0),E=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),m=e.ref(!1);function F(){const a=J.useNestedProp({userConfig:d.config,defaultConfig:te});return a.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_funnel[a.theme]||d.config,defaultConfig:a})}:a}const t=e.computed({get:()=>F(),set:a=>a}),{userOptionsVisible:_,setUserOptionsVisibility:I,keepUserOptionState:R}=he.useUserOptionState({config:t.value}),{svgRef:q}=me.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>d.config,a=>{t.value=F(),_.value=!t.value.userOptions.showOnChartHover,z(),A.value+=1,P.value+=1,i.value.circles=t.value.style.chart.circles.dataLabels.fontSize,i.value.names=t.value.style.chart.bars.dataLabels.name.fontSize,i.value.values=t.value.style.chart.bars.dataLabels.value.fontSize,k.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:M,isImaging:U,generatePdf:j,generateImage:G}=K.usePrinter({elementId:`funnel_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-funnel",options:t.value.userOptions.print}),ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),i=e.ref({circles:t.value.style.chart.circles.dataLabels.fontSize,names:t.value.style.chart.bars.dataLabels.name.fontSize,values:t.value.style.chart.bars.dataLabels.value.fontSize}),u=e.computed({get:()=>({height:t.value.style.chart.height,width:t.value.style.chart.width}),set:a=>a}),h=e.computed(()=>b.value?d.dataset.map((a,o)=>({...a,color:a.color?r.convertColorToHex(a.color):r.lightenHexColor(t.value.style.chart.bars.defaultColor,o/d.dataset.length)})):[]);setTimeout(()=>{m.value=!0},h.value.length*150);function H(){const a=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:a,top:o,right:u.value.width-t.value.style.chart.padding.right,bottom:u.value.height-t.value.style.chart.padding.bottom,width:u.value.width-a-t.value.style.chart.padding.right,height:u.value.height-o-t.value.style.chart.padding.bottom}}const f=e.ref(H()),y=e.computed(()=>f.value.height/d.dataset.length),p=e.computed(()=>y.value*t.value.style.chart.bars.gapRatio),X=e.computed(()=>f.value.width*t.value.style.chart.barCircleSpacingRatio),s=e.computed(()=>h.value.map((a,o)=>{const l=y.value-p.value,n=f.value.top+p.value/2*o+(y.value-p.value/2)*o+p.value/2,v=a.value/h.value[0].value,c=(f.value.width-l-X.value)*(a.value/h.value[0].value);return{...a,cx:f.value.left+l/2,cy:n+l/2,datapointIndex:o,fill:a.color,height:Math.max(l,0),proportion:v,r:Math.max(l/2,0),width:Math.max(c,0),x:f.value.left+l+X.value,y:n}})),le=e.computed(()=>{const a=s.value.map(o=>`${o.x+o.width},${o.y+(y.value-p.value)/2}`);return`${s.value[0].x},${s.value[0].y+(y.value-p.value)/2} ${a.toString()} ${s.value.at(-1).x},${s.value.at(-1).y+(y.value-p.value)/2}`}),oe=e.computed(()=>({x1:s.value[0].cx,y1:s.value[0].cy,x2:s.value.at(-1).cx,y2:s.value.at(-1).cy})),C=e.ref(!1);function re(a){C.value=a,T.value+=1}const ne=e.computed(()=>`${h.value.length*150}ms`),$=e.ref(!1);function S(){$.value=!$.value}function Y(){k.value.showTable=!k.value.showTable}const w=e.computed(()=>{const a=h.value.map(l=>({name:l.name,color:l.color})),o=h.value.map(l=>l.value);return{head:a,body:o}}),B=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],o=w.value.head.map((v,c)=>{const x=r.applyDataLabel(t.value.style.chart.bars.dataLabels.value.formatter,w.value.body[c],r.dataLabel({p:t.value.style.chart.bars.dataLabels.value.prefix,v:w.value.body[c],s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.table.td.roundingValue}),{datapoint:s.value[c]}),N=r.applyDataLabel(t.value.style.chart.circles.dataLabels.formatter,s.value[c].proportion*100,r.dataLabel({v:s.value[c].proportion*100,s:"%",r:t.value.table.td.roundingPercentage}),{datapoint:s.value[c]});return[{color:v.color,name:v.name},x,N]}),l={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:a,body:o,config:l}});function W(){e.nextTick(()=>{const a=w.value.head.map((n,v)=>[[n.name],[w.value.body[v]],[s.value[v].proportion*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value],["%"]]].concat(a),l=r.createCsvContent(o);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-funnel"})})}function se(){return h.value}return ee({getData:se,generatePdf:j,generateCsv:W,generateImage:G,toggleTable:Y,toggleAnnotator:S}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"funnelChart",ref:L,class:e.normalizeClass(`vue-ui-funnel ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`funnel_${g.value}`,onMouseenter:o[1]||(o[1]=()=>e.unref(I)(!0)),onMouseleave:o[2]||(o[2]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:S},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ue._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"funnel-div-title",...t.value.style.chart.title},subtitle:{cy:"funnel-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(R)||e.unref(_))?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${T.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(U),uid:g.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,chartElement:L.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleAnnotator:S,onToggleFullscreen:re,onGeneratePdf:e.unref(j),onGenerateImage:e.unref(G),onToggleTable:Y,onGenerateCsv:W,style:e.normalizeStyle({visibility:e.unref(R)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`funnel_area_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.backgroundColor,"stop-opacity":0},null,8,Ce),e.createElementVNode("stop",{offset:"20%","stop-color":t.value.style.chart.area.color},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.area.color},null,8,xe)],8,ke)]),t.value.style.chart.circleLinks.show?(e.openBlock(),e.createElementBlock("line",e.mergeProps({key:1},oe.value,{stroke:t.value.style.chart.circleLinks.color,"stroke-width":12*t.value.style.chart.circleLinks.widthRatio,"stroke-linecap":"round",class:{animated:t.value.useCssAnimation},style:{strokeDasharray:t.value.useCssAnimation?f.value.height:0,strokeDashoffset:t.value.useCssAnimation?f.value.height:0}}),null,16,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({cx:l,cy:n,r:v,fill:c},x)=>(e.openBlock(),e.createElementBlock("circle",e.mergeProps({ref_for:!0},{cx:l,cy:n,r:v,fill:c},{stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*x}ms`}}),null,16,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.cx,y:l.cy+i.value.circles/3+t.value.style.chart.circles.dataLabels.offsetY,"text-anchor":"middle","font-size":i.value.circles,fill:t.value.style.chart.circles.dataLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(l.color):t.value.style.chart.circles.dataLabels.color,"font-weight":t.value.style.chart.circles.dataLabels.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.circles.dataLabels.formatter,l.proportion*100,e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.circles.dataLabels.rounding}),{datapoint:l})),15,Be))),256)),t.value.style.chart.area.show?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:le.value,fill:`url(#funnel_area_${g.value})`,class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({transition:t.value.useCssAnimation?`all ${150*h.value.length}ms ease-in`:"none"})},null,14,_e)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,({x:l,y:n,height:v,width:c,fill:x},N)=>(e.openBlock(),e.createElementBlock("rect",e.mergeProps({ref_for:!0},{x:l,y:n,height:v,width:c,fill:x},{stroke:t.value.style.chart.bars.stroke,"stroke-width":t.value.style.chart.bars.strokeWidth,rx:t.value.style.chart.bars.borderRadius,class:{animated:t.value.useCssAnimation&&!m.value},style:{animationDelay:`${150*N}ms`}}),null,16,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.name.offsetX+12,y:l.cy-i.value.names/2+t.value.style.chart.bars.dataLabels.name.offsetY,"text-anchor":"start","font-size":i.value.names,fill:t.value.style.chart.bars.dataLabels.name.color,"font-weight":t.value.style.chart.bars.dataLabels.name.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(l.name),15,Ne),e.createElementVNode("text",{x:l.x+l.width+t.value.style.chart.bars.dataLabels.value.offsetX+12,y:l.cy+i.value.values+t.value.style.chart.bars.dataLabels.value.offsetY,"text-anchor":"start","font-size":i.value.values,fill:t.value.style.chart.bars.dataLabels.value.color,"font-weight":t.value.style.chart.bars.dataLabels.value.bold?"bold":"normal",class:e.normalizeClass({animated:t.value.useCssAnimation&&!m.value}),style:e.normalizeStyle({animationDelay:`${150*n}ms`})},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.bars.dataLabels.value.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.bars.dataLabels.value.prefix,v:l.value,s:t.value.style.chart.bars.dataLabels.value.suffix,r:t.value.style.chart.bars.dataLabels.value.rounding}),{datapoint:l})),15,ze)]))),256)),e.renderSlot(a.$slots,"svg",{svg:u.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:V,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(ve.default,{key:8,hideDetails:"",config:{open:k.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(ce.DataTable,{key:`table_${P.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.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[0]||(o[0]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,be))}},Ee=pe._export_sfc(Pe,[["__scopeId","data-v-1f0bddfb"]]);exports.default=Ee;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cn2tUOoX.cjs"),ce=require("./Legend-ieOu_fKK.cjs"),de=require("./Title-D62pPwLz.cjs"),ve=require("./Tooltip-C_H6-uAa.cjs"),he=require("./DataTable-CNCnRrD-.cjs"),Y=require("./usePrinter-BrH80VBz.cjs"),pe=require("./vue-ui-skeleton-Mcoev-5q.cjs"),fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),J=require("./useNestedProp-C8955nsn.cjs"),ye=require("./PackageVersion-BxSGdh6L.cjs"),ge=require("./PenAndPaper-ByAFuR-l.cjs"),me=require("./useUserOptionState-BgepsfED.cjs"),be=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},xe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},$e=["xmlns","viewBox"],Be=["width","height"],Se=["id"],Te=["stdDeviation"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],_e=["filter"],Ve=["d","stroke","stroke-width"],Ee=["d","stroke-width","onMouseenter","onClick"],Le={key:5,class:"vue-data-ui-watermark"},Oe=["onClick"],Fe={key:0},Ae={key:1},Ie={key:8,ref:"source",dir:"auto"},ze=["innerHTML"],De={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(K,{expose:Q,emit:Z}){const{vue_ui_galaxy:ee}=r.useConfig(),c=K,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),x=e.ref(null),te=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:F,keepUserOptionState:A}=me.useUserOptionState({config:t.value}),{svgRef:I}=be.useChartAccessibility({config:t.value.style.chart.title});function z(){const l=J.useNestedProp({userConfig:c.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:D,isImaging:q,generatePdf:M,generateImage:R}=Y.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy",options:t.value.userOptions.print}),le=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Z,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||oe.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function ae(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),re=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*re.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ne(l){y.value=l,V.value+=1}const N=e.ref(null);function se({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ue=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=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ie=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ie,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.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 j(){u.value.showTable=!u.value.showTable}function X(){u.value.showTooltip=!u.value.showTooltip}const w=e.ref(!1);function P(){w.value=!w.value}return Q({getData:ae,generatePdf:M,generateCsv:H,generateImage:R,toggleTable:j,toggleTooltip:X,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:x,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(F)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(A)||e.unref(S))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(q),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(M),onGenerateCsv:H,onGenerateImage:e.unref(R),onToggleTable:j,onToggleTooltip:X,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Te)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.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)*(d.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,Ne)):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*(d.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(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.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 ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ve)],8,_e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>se({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,Ee)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pe.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ce.Legend,{key:`legend_${O.value}`,legendSet:W.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ae," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Fe," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Oe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ve._sfc_main,{show:u.value.showTooltip&&$.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:x.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(fe.default,{key:9,hideDetails:"",config:{open:u.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(he.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ze)]),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)],46,Ce))}},qe=ke._export_sfc(De,[["__scopeId","data-v-41382c10"]]);exports.default=qe;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cn2tUOoX.cjs"),H=require("./useResponsive-BBkmXXaa.cjs"),Z=require("./usePrinter-BrH80VBz.cjs"),he=require("./vue-ui-skeleton-Mcoev-5q.cjs"),me=require("./Title-D62pPwLz.cjs"),J=require("./useNestedProp-C8955nsn.cjs"),fe=require("./PackageVersion-BxSGdh6L.cjs"),ye=require("./PenAndPaper-ByAFuR-l.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],Be={key:0},Se=["xmlns","viewBox"],_e=["width","height"],xe=["id"],Ce=["stop-color"],we=["stop-color"],Ne=["stop-color"],Fe=["id"],Ee=["stdDeviation"],$e={key:1},ze=["d","fill","stroke"],Pe=["d","fill","stroke"],Oe=["d","fill"],Me=["id","d"],Ve=["fill","font-size","font-weight"],Ie=["href","startOffset"],Xe=["x","y","text-anchor","fill","font-size","font-weight"],Ae=["d","filter"],Ye=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le=["stroke","stroke-width"],De=["stroke","stroke-width"],qe={key:8},Ge=["x","y","text-anchor","font-size","font-weight","fill"],je=["x","y","font-size","font-weight","fill"],Te={key:0},Ue=["x1","y1","x2","y2","stroke","stroke-width"],We=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke-width","filter"],Ze={key:1},Je=["d","fill","stroke","stroke-width"],Ke=["cx","cy","fill","r","stroke-width","stroke"],Qe=["x","y","font-size","fill"],et={key:5,class:"vue-data-ui-watermark"},tt={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:K}){const{vue_ui_gauge:Q}=s.useConfig(),c=w,S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),ee=e.ref(null),$=e.ref(0),_=e.ref(null),z=e.ref(null),P=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>Y(),set:a=>a}),{userOptionsVisible:N,setUserOptionsVisibility:I,keepUserOptionState:X}=pe.useUserOptionState({config:t.value}),{svgRef:A}=ke.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,a=>{t.value=Y(),N.value=!t.value.userOptions.showOnChartHover,j(),V.value+=1},{deep:!0});function Y(){const a=J.useNestedProp({userConfig:c.config,defaultConfig:Q});return a.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:R,isImaging:L,generatePdf:D,generateImage:q}=Z.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge",options:t.value.userOptions.print}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!S.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(r=>{a.push(r.from||1e-7),a.push(r.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((r,l)=>({...r,color:s.convertColorToHex(r.color)||ae.value[l]||s.palette[l],value:((r.to||0)-(r.from||0))/n*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),p=e.ref(0),d=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(a=>a.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{T(c.dataset.value)});const u=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=Math.PI*((d.value+0-p.value)/(b.value-p.value))+Math.PI;return{x1:a,y1:n,x2:a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(r),y2:n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r)}}),G=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=Math.PI*((d.value+0-p.value)/(b.value-p.value))+Math.PI,l=a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(r),f=n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r),y=o.value.pointerRadius,ie=a+y*Math.cos(r+Math.PI/2),ce=n+y*Math.sin(r+Math.PI/2),ve=a+y*Math.cos(r-Math.PI/2),de=n+y*Math.sin(r-Math.PI/2);return isNaN(l)?null:`M ${l},${f} ${ie},${ce} ${ve},${de} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:r,to:l}=k.value.series[a];if(d.value>=r&&d.value<=l)return n}return"#2D353C"}),x=e.ref(null);function j(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(a=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:a})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["from","to"]}).forEach(r=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:r,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const a=H.throttle(()=>{const{width:n,height:r}=H.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=r,o.value.centerX=n/2,o.value.centerY=h.value/2/358.4*r,o.value.bottom=r,o.value.labelFontSize=18/h.value*Math.min(r,n)<10?10:18/h.value*Math.min(r,n),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(r,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(r,n),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(r,n),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(r,n),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,r),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(n,r),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=s.translateSize({relator:Math.min(n,r),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function T(a){const n=[];(k.value.series||[]).forEach(y=>{n.push(y.from||0),n.push(y.to||0)}),b.value=Math.max(...n),p.value=Math.min(...n);let r=t.value.style.chart.animation.speed;const l=Math.abs(a-d.value)/(r*60);function f(){d.value<a?d.value=Math.min(d.value+l,a):d.value>a&&(d.value=Math.max(d.value-l,a)),d.value!==a&&requestAnimationFrame(f)}f()}const i=e.computed(()=>{const a=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,n=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:a/n,gradients:a/(n*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),v=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),re=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),g=e.computed(()=>v.value.map(a=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(a.nameOffsetRatio||1))),U=e.computed(()=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:v.value[0].firstSeparator.x,initY:v.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:r,y:l}=s.offsetFromCenterPoint({initX:v.value[0].startX,initY:v.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:r,y2:l}}),W=e.computed(()=>v.value.map(a=>{const{x:n,y:r}=s.offsetFromCenterPoint({initX:a.separator.x,initY:a.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:f}=s.offsetFromCenterPoint({initX:a.endX,initY:a.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:n,y1:r,x2:l,y2:f}}));function oe(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const r=50;let l=0;return a.map(f=>(l+=f,`${l/100*r-f/4}%`))}const le=e.computed(()=>oe(v.value.map(a=>a.proportion*100))),ne=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),se=e.computed(()=>{const a=p.value>=0?-p.value:Math.abs(p.value);return s.createHalfCircleArc({radius:t.value.style.chart.layout.indicatorArc.radius*o.value.trackSize,centerX:o.value.width/2,centerY:i.value.base,percentage:(d.value+a)/(b.value+a)})}),B=e.ref(!1);function ue(a){B.value=a,$.value+=1}const C=e.ref(!1);function E(){C.value=!C.value}return K({generatePdf:D,generateImage:q,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:_,id:`vue-ui-gauge_${m.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%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(I)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye._sfc_main,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${V.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&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value&&(e.unref(X)||e.unref(N))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ee,key:`user_options_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(R),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(q),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:l})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:l})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:l})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:l})),void 0,!0)]),key:"3"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:l})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,_e)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${m.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ce),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ne)],8,xe)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.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,Ee)],8,Fe)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(r,l)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l,patternId:`pattern_${m.value}_${l}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:r.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ze))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(v.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:`url(#pattern_${m.value}_${l})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Pe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:se.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,Oe)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${l}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 ${2*g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 -${2*g.value[l]},0`,fill:"transparent"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${m.value}_${l}`,startOffset:le.value[l]},e.toDisplayString(r.name||""),9,Ie)],8,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(re.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:r.center.endX,y:r.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(r,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(r.name||""),9,Xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Ae))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ye),e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,De))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).y,"text-anchor":r.center.startX<u.value.x1-5?"end":r.center.startX>u.value.x1+5?"start":"middle","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,r.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:r.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:o.value.markerOffset}).y,"text-anchor":"start","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,je)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Te,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":o.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Ue)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.7},null,8,We)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.3,filter:`url(#blur_${m.value})`},null,8,He)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ze,[G.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:G.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,Je)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:o.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:o.value.pointerRadius<=0?1e-4:o.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Ke)],64)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:11,x:o.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":o.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.legend.formatter,d.value,e.unref(s.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,Qe)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,be))}},at=ge._export_sfc(tt,[["__scopeId","data-v-d85f8f4f"]]);exports.default=at;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cn2tUOoX.cjs"),k=require("./useNestedProp-C8955nsn.cjs"),p=require("./PackageVersion-BxSGdh6L.cjs"),g=["viewBox","width"],v={key:0},_=["id"],y=["stop-color"],N=["stop-color"],C=["stroke"],V=["stroke"],w=["width","fill"],x=["fill"],B={key:0},E=["id"],b=["stroke"],L=["stroke","stroke-dasharray","stroke-dashoffset"],z=["filter"],G=["stroke","stroke-dasharray","stroke-dashoffset"],F=["fill"],P={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const{vue_ui_gizmo:f}=a.useConfig(),o=i,n=e.ref(a.createUid()),h=e.useSlots();e.onMounted(()=>{c()}),e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiGizmo does not support the #chart-background slot.")});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:s=>s});function d(){return k.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,s=>{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 r=2*Math.PI*35,m=r-o.dataset/100*r;return{dasharray:`${r} ${r}`,dashoffset:m}});return(s,r)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(p._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",v,[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,y),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,N)],8,_)])):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,C),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,V),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,w),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,x)):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",B,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},r[0]||(r[0]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1)]),8,E)])):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,g))}};exports.default=P;