vue-data-ui 2.3.46 → 2.3.47

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 (141) hide show
  1. package/dist/{Arrow-C45xNtet.cjs → Arrow-Bj64dVl2.cjs} +1 -1
  2. package/dist/{Arrow-QBHviXQB.js → Arrow-THOuTDcq.js} +1 -1
  3. package/dist/{BaseIcon-NNgCqsH0.cjs → BaseIcon-CAlmCZtL.cjs} +1 -1
  4. package/dist/{BaseIcon-Ct3EasCg.js → BaseIcon-Lz2AkAUF.js} +1 -1
  5. package/dist/{DataTable-CkeQ7c6_.js → DataTable-Cg9dMxHZ.js} +2 -2
  6. package/dist/{DataTable-BGF6x8iX.cjs → DataTable-E_zoBxXZ.cjs} +1 -1
  7. package/dist/{Legend-aFYc_s9T.js → Legend-DKGyWu7I.js} +1 -1
  8. package/dist/{Legend-DjuRskVd.cjs → Legend-L_Enr1Hx.cjs} +1 -1
  9. package/dist/{Shape-BTMZlA5Q.cjs → Shape-BLiPCHkv.cjs} +1 -1
  10. package/dist/{Shape-DoAgLIYa.js → Shape-npSEDLuX.js} +1 -1
  11. package/dist/{Slicer-I9LVm-u8.js → Slicer-DGciWCaF.js} +1 -1
  12. package/dist/{Slicer-BCr6bV0X.cjs → Slicer-DNvTnINC.cjs} +1 -1
  13. package/dist/{Title-D8HoSXgM.js → Title-C0_PhO2u.js} +1 -1
  14. package/dist/{Title-NelrBSGO.cjs → Title-DSPpszvp.cjs} +1 -1
  15. package/dist/{Tooltip-CK94hatv.cjs → Tooltip-CgSI_niS.cjs} +1 -1
  16. package/dist/{Tooltip-DTwn_FW5.js → Tooltip-dfMcr3Yl.js} +1 -1
  17. package/dist/{index-CEhe8nzy.cjs → index-Br-wm_4r.cjs} +1 -1
  18. package/dist/{index-C1-FJ0sT.js → index-ChMHOLEV.js} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-CcMb2mLY.cjs → useNestedProp-BH5s4SOa.cjs} +1 -1
  21. package/dist/{useNestedProp-1fJhHDhT.js → useNestedProp-DFwnYdme.js} +1 -1
  22. package/dist/{usePrinter-B1a6uNio.js → usePrinter-BW4S0cF1.js} +1 -1
  23. package/dist/{usePrinter-AfD8nrd2.cjs → usePrinter-DUD-LDLx.cjs} +1 -1
  24. package/dist/{vue-data-ui-DgzO0vYA.js → vue-data-ui-CbuAnIFO.js} +57 -57
  25. package/dist/{vue-data-ui-DfYg-sm0.cjs → vue-data-ui-D0OBzNWS.cjs} +1 -1
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-DctYjGhv.cjs → vue-ui-3d-bar-B9L0Q6d9.cjs} +1 -1
  29. package/dist/{vue-ui-3d-bar-ikMJ_M47.js → vue-ui-3d-bar-FHiGe0fx.js} +7 -7
  30. package/dist/{vue-ui-accordion-BLoKd0D-.js → vue-ui-accordion-Bukh98Pi.js} +3 -3
  31. package/dist/{vue-ui-accordion-CS2POBdq.cjs → vue-ui-accordion-ZPhdh-C7.cjs} +1 -1
  32. package/dist/{vue-ui-age-pyramid-6GljtWMq.cjs → vue-ui-age-pyramid-CfKlnJ-N.cjs} +1 -1
  33. package/dist/{vue-ui-age-pyramid-C9hzFCN4.js → vue-ui-age-pyramid-DLBZkGqa.js} +8 -8
  34. package/dist/{vue-ui-annotator-BFTGfEfF.cjs → vue-ui-annotator-DwJ8pgXD.cjs} +1 -1
  35. package/dist/{vue-ui-annotator-DgdkTVYV.js → vue-ui-annotator-sEd3t3Xa.js} +1 -1
  36. package/dist/{vue-ui-candlestick-C31d7Jvz.cjs → vue-ui-candlestick-CEgbkXwC.cjs} +1 -1
  37. package/dist/{vue-ui-candlestick-BW-okjzH.js → vue-ui-candlestick-DGAu46FK.js} +9 -9
  38. package/dist/{vue-ui-carousel-table-DlFu0byl.cjs → vue-ui-carousel-table-BZRMnoU1.cjs} +1 -1
  39. package/dist/{vue-ui-carousel-table-Cw7Vpun2.js → vue-ui-carousel-table-DziSeBtT.js} +4 -4
  40. package/dist/{vue-ui-chestnut-B-H0j9-6.cjs → vue-ui-chestnut-DAaMh6sq.cjs} +1 -1
  41. package/dist/{vue-ui-chestnut-SLvSoUlS.js → vue-ui-chestnut-iLTYa9Xl.js} +6 -6
  42. package/dist/{vue-ui-cursor-eMGHt_Cm.cjs → vue-ui-cursor-D5XYd9sC.cjs} +1 -1
  43. package/dist/{vue-ui-cursor-BnoYo8DD.js → vue-ui-cursor-DUwUhpoT.js} +2 -2
  44. package/dist/{vue-ui-dashboard-cOx4Zbit.js → vue-ui-dashboard-DiXf1UFz.js} +2 -2
  45. package/dist/{vue-ui-dashboard-BpwA8NTi.cjs → vue-ui-dashboard-DyB_oaXE.cjs} +1 -1
  46. package/dist/{vue-ui-digits-MhR768JU.cjs → vue-ui-digits-DVwp3Vzr.cjs} +1 -1
  47. package/dist/{vue-ui-digits-wo7Gctkj.js → vue-ui-digits-RUrqXG5U.js} +2 -2
  48. package/dist/{vue-ui-donut-CABoxvoV.js → vue-ui-donut-CIo7evf6.js} +45 -45
  49. package/dist/vue-ui-donut-CMT341XH.cjs +1 -0
  50. package/dist/{vue-ui-donut-evolution-DzkcS9ET.cjs → vue-ui-donut-evolution-BTw0E5sZ.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-r6wIb3Tt.js → vue-ui-donut-evolution-DpflCS73.js} +9 -9
  52. package/dist/{vue-ui-dumbbell-D3pvOoxP.js → vue-ui-dumbbell-BgZEQGlE.js} +8 -8
  53. package/dist/{vue-ui-dumbbell-DSSBvwhU.cjs → vue-ui-dumbbell-UGicuItz.cjs} +1 -1
  54. package/dist/{vue-ui-flow-Cp7EQLnA.cjs → vue-ui-flow-BfouRr14.cjs} +1 -1
  55. package/dist/{vue-ui-flow-CCMFNXxy.js → vue-ui-flow-BqK29554.js} +7 -7
  56. package/dist/{vue-ui-galaxy-BVu0ZEeg.js → vue-ui-galaxy-CuE0gjDn.js} +9 -9
  57. package/dist/{vue-ui-galaxy-DHXdjlQl.cjs → vue-ui-galaxy-DgIe6MYv.cjs} +1 -1
  58. package/dist/{vue-ui-gauge-nnDuY2_P.cjs → vue-ui-gauge-BKi2QGVX.cjs} +1 -1
  59. package/dist/{vue-ui-gauge-DRy_VLi-.js → vue-ui-gauge-CcuW6li6.js} +5 -5
  60. package/dist/{vue-ui-gizmo-Bhqq90Gt.cjs → vue-ui-gizmo-B9LHgK5x.cjs} +1 -1
  61. package/dist/{vue-ui-gizmo-B8rEv-J5.js → vue-ui-gizmo-Cp06yGvf.js} +2 -2
  62. package/dist/{vue-ui-heatmap-DoEghJHO.cjs → vue-ui-heatmap-D1GsWm8S.cjs} +1 -1
  63. package/dist/{vue-ui-heatmap-CESWvx6H.js → vue-ui-heatmap-D5pMKFX8.js} +8 -8
  64. package/dist/{vue-ui-kpi-CBH1WOLl.js → vue-ui-kpi-B0YwsHBF.js} +3 -3
  65. package/dist/{vue-ui-kpi-CHrIMR-b.cjs → vue-ui-kpi-DuBd9Cfw.cjs} +1 -1
  66. package/dist/{vue-ui-mini-loader-YjK49sOM.js → vue-ui-mini-loader-BCE21FIO.js} +2 -2
  67. package/dist/{vue-ui-mini-loader-CP5HRcth.cjs → vue-ui-mini-loader-CAJwCMGP.cjs} +1 -1
  68. package/dist/{vue-ui-molecule-BIuegM-N.cjs → vue-ui-molecule-DDasACBO.cjs} +1 -1
  69. package/dist/{vue-ui-molecule-CZDSsnRY.js → vue-ui-molecule-DeI-vOCp.js} +9 -9
  70. package/dist/{vue-ui-mood-radar-CcnUPS5r.js → vue-ui-mood-radar-B8IcNhp-.js} +9 -9
  71. package/dist/{vue-ui-mood-radar-DYTpiKG1.cjs → vue-ui-mood-radar-C2ylWXY4.cjs} +1 -1
  72. package/dist/{vue-ui-nested-donuts-Dk0HSrH4.js → vue-ui-nested-donuts-CgpGyxKR.js} +9 -9
  73. package/dist/{vue-ui-nested-donuts-CvPo6PIH.cjs → vue-ui-nested-donuts-DUnTzrPT.cjs} +1 -1
  74. package/dist/{vue-ui-onion-C93R_Klx.js → vue-ui-onion-B1cdXNvI.js} +9 -9
  75. package/dist/{vue-ui-onion-C_Dy0awV.cjs → vue-ui-onion-DGjKbke1.cjs} +1 -1
  76. package/dist/{vue-ui-parallel-coordinate-plot-Do8zOqso.cjs → vue-ui-parallel-coordinate-plot-BZtCTNKa.cjs} +1 -1
  77. package/dist/{vue-ui-parallel-coordinate-plot-aEJjFh7V.js → vue-ui-parallel-coordinate-plot-DWYOet0Y.js} +10 -10
  78. package/dist/{vue-ui-quadrant-CMP5gv34.cjs → vue-ui-quadrant-D4Pfvypx.cjs} +1 -1
  79. package/dist/{vue-ui-quadrant-7zsx3EOw.js → vue-ui-quadrant-bc2ZAF-e.js} +10 -10
  80. package/dist/{vue-ui-quick-chart-DlKpBf-X.cjs → vue-ui-quick-chart-CmJ7o4Sy.cjs} +1 -1
  81. package/dist/{vue-ui-quick-chart-yGY2-cME.js → vue-ui-quick-chart-U0Bwmo7o.js} +6 -6
  82. package/dist/{vue-ui-radar-FvOQWErL.cjs → vue-ui-radar-ClHJwcdQ.cjs} +1 -1
  83. package/dist/{vue-ui-radar-CBAE5b_H.js → vue-ui-radar-KXEodxY0.js} +10 -10
  84. package/dist/{vue-ui-rating-DCX9Hr51.js → vue-ui-rating-B4i_esmV.js} +2 -2
  85. package/dist/{vue-ui-rating-D4ytgNsW.cjs → vue-ui-rating-CUR8udEY.cjs} +1 -1
  86. package/dist/{vue-ui-relation-circle-C0t4M_Eb.cjs → vue-ui-relation-circle-B0IYw3cW.cjs} +1 -1
  87. package/dist/{vue-ui-relation-circle-C5uvdRCs.js → vue-ui-relation-circle-CR0-9RVH.js} +5 -5
  88. package/dist/{vue-ui-rings-Cx9I0XCp.js → vue-ui-rings-B0quOkZB.js} +9 -9
  89. package/dist/{vue-ui-rings-CljU3aO-.cjs → vue-ui-rings-dZ5s41lD.cjs} +1 -1
  90. package/dist/{vue-ui-scatter-BkvHY89U.cjs → vue-ui-scatter-B6ONtpIT.cjs} +1 -1
  91. package/dist/{vue-ui-scatter-BxrCbWPm.js → vue-ui-scatter-DGkgA3c2.js} +10 -10
  92. package/dist/{vue-ui-screenshot-Cf9NK_5w.js → vue-ui-screenshot-C54ey8-p.js} +1 -1
  93. package/dist/{vue-ui-screenshot-B198lkuF.cjs → vue-ui-screenshot-DHzHE3bq.cjs} +1 -1
  94. package/dist/{vue-ui-skeleton-DpqVx122.cjs → vue-ui-skeleton-BWu2nLeV.cjs} +1 -1
  95. package/dist/{vue-ui-skeleton-DogpCRv2.js → vue-ui-skeleton-CwTDNzek.js} +2 -2
  96. package/dist/{vue-ui-smiley-wnlpDBHn.js → vue-ui-smiley-BfHCG14T.js} +2 -2
  97. package/dist/{vue-ui-smiley-Hv5SONWU.cjs → vue-ui-smiley-YycNcszs.cjs} +1 -1
  98. package/dist/{vue-ui-spark-trend-_STSpU0x.js → vue-ui-spark-trend-DNxVD2pk.js} +4 -4
  99. package/dist/{vue-ui-spark-trend-DBFYuxbh.cjs → vue-ui-spark-trend-Dyilmz2Z.cjs} +1 -1
  100. package/dist/{vue-ui-sparkbar-B2C4gKQS.js → vue-ui-sparkbar-Bbaou7w5.js} +3 -3
  101. package/dist/{vue-ui-sparkbar-D1OrFmz5.cjs → vue-ui-sparkbar-CUxLYyQb.cjs} +1 -1
  102. package/dist/{vue-ui-sparkgauge-fsJt_SRA.js → vue-ui-sparkgauge-CX_a9jtx.js} +3 -3
  103. package/dist/{vue-ui-sparkgauge-CgX6ZpW7.cjs → vue-ui-sparkgauge-tsCLtZpw.cjs} +1 -1
  104. package/dist/{vue-ui-sparkhistogram-CV8k8NPB.cjs → vue-ui-sparkhistogram-Cwz2wQ1e.cjs} +1 -1
  105. package/dist/{vue-ui-sparkhistogram-gue0JMvB.js → vue-ui-sparkhistogram-DZVZ-RXk.js} +4 -4
  106. package/dist/{vue-ui-sparkline-DN7RZ5FX.cjs → vue-ui-sparkline-BEprcYEe.cjs} +1 -1
  107. package/dist/{vue-ui-sparkline-ClFxAQkz.js → vue-ui-sparkline-C-PJg1EI.js} +3 -3
  108. package/dist/{vue-ui-sparkstackbar-3D6MkgTR.js → vue-ui-sparkstackbar-CxPo843r.js} +3 -3
  109. package/dist/{vue-ui-sparkstackbar-Dxy0P3xJ.cjs → vue-ui-sparkstackbar-DGyE2dE3.cjs} +1 -1
  110. package/dist/{vue-ui-stackbar-BY0bcCBX.cjs → vue-ui-stackbar-BrX0uP0u.cjs} +1 -1
  111. package/dist/{vue-ui-stackbar-DAFHq-wh.js → vue-ui-stackbar-DFFORChg.js} +10 -10
  112. package/dist/{vue-ui-strip-plot-lfB-YBkt.cjs → vue-ui-strip-plot-C_J9uvvB.cjs} +1 -1
  113. package/dist/{vue-ui-strip-plot-B3ItWHyf.js → vue-ui-strip-plot-DhcPpafE.js} +9 -9
  114. package/dist/{vue-ui-table-CiksARcd.cjs → vue-ui-table-B0CfGG_e.cjs} +1 -1
  115. package/dist/{vue-ui-table-Dxc80GV0.js → vue-ui-table-BuBIC5Ep.js} +1 -1
  116. package/dist/{vue-ui-table-heatmap-C_Wr83fl.cjs → vue-ui-table-heatmap-BRNGFUm-.cjs} +1 -1
  117. package/dist/{vue-ui-table-heatmap-AI2JeTUR.js → vue-ui-table-heatmap-D3YP4078.js} +4 -4
  118. package/dist/{vue-ui-table-sparkline-D2KWAYWO.js → vue-ui-table-sparkline-BDaZLq9H.js} +5 -5
  119. package/dist/{vue-ui-table-sparkline-BPYQI2Vo.cjs → vue-ui-table-sparkline-OXdcU6JH.cjs} +1 -1
  120. package/dist/{vue-ui-thermometer-BopRBXkF.cjs → vue-ui-thermometer-BPHxKklC.cjs} +1 -1
  121. package/dist/{vue-ui-thermometer-szsOVqgO.js → vue-ui-thermometer-Dq6DVPKi.js} +5 -5
  122. package/dist/{vue-ui-timer-CpuqP9iZ.js → vue-ui-timer-C51UJ8cf.js} +4 -4
  123. package/dist/{vue-ui-timer-Ctcaiaej.cjs → vue-ui-timer-Cc5OaHL8.cjs} +1 -1
  124. package/dist/{vue-ui-tiremarks-9P4vBFZV.js → vue-ui-tiremarks-Cc9PjBa8.js} +5 -5
  125. package/dist/{vue-ui-tiremarks-Cge2TXFU.cjs → vue-ui-tiremarks-DWRRMm0S.cjs} +1 -1
  126. package/dist/{vue-ui-treemap-BxdorPsS.cjs → vue-ui-treemap-BUPvuWKn.cjs} +1 -1
  127. package/dist/{vue-ui-treemap-CLOwIrHN.js → vue-ui-treemap-Dfsnew-o.js} +9 -9
  128. package/dist/{vue-ui-vertical-bar-BREOjM7U.cjs → vue-ui-vertical-bar-4E0DyBl3.cjs} +1 -1
  129. package/dist/{vue-ui-vertical-bar-Br8Slvab.js → vue-ui-vertical-bar-aTTLZNFG.js} +9 -9
  130. package/dist/{vue-ui-waffle-B62b9gwj.js → vue-ui-waffle-CDv36WNb.js} +9 -9
  131. package/dist/{vue-ui-waffle-CPqrsii3.cjs → vue-ui-waffle-CZPrfM_0.cjs} +1 -1
  132. package/dist/{vue-ui-wheel-B3Nw-ICG.js → vue-ui-wheel-DZck6SNJ.js} +5 -5
  133. package/dist/{vue-ui-wheel-HqeFI8W9.cjs → vue-ui-wheel-IMuXbp1R.cjs} +1 -1
  134. package/dist/{vue-ui-word-cloud-HgAIxI93.js → vue-ui-word-cloud-C9bnwx69.js} +7 -7
  135. package/dist/{vue-ui-word-cloud-B_W87vAs.cjs → vue-ui-word-cloud-EVeSzBUX.cjs} +1 -1
  136. package/dist/{vue-ui-xy-DpqyiCx6.js → vue-ui-xy-BRRAfLis.js} +12 -12
  137. package/dist/{vue-ui-xy-CWQd12R4.cjs → vue-ui-xy-BVwJjkYt.cjs} +1 -1
  138. package/dist/{vue-ui-xy-canvas-CjGlVtb_.js → vue-ui-xy-canvas-5bhkoiT4.js} +10 -10
  139. package/dist/{vue-ui-xy-canvas-5f_5ULEA.cjs → vue-ui-xy-canvas-DhHEH5ib.cjs} +1 -1
  140. package/package.json +1 -1
  141. package/dist/vue-ui-donut-C4bFM2ww.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CEhe8nzy.cjs"),q=require("./Title-NelrBSGO.cjs"),P=require("./usePrinter-AfD8nrd2.cjs"),B=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-DpqVx122.cjs"),I=require("./useNestedProp-CcMb2mLY.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=["id"],G=["xmlns","viewBox"],R=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],X=["cx","cy","r","stroke","stroke-width"],j=["x","y","font-size","fill","font-weight"],H={key:3,class:"vue-data-ui-watermark"},D={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:z}){const r=S,{vue_ui_wheel:F}=s.useConfig(),f=e.computed(()=>!!r.dataset&&Object.keys(r.dataset).length),y=e.ref(s.createUid()),N=e.ref(null),g=e.ref(0),d=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=I.useNestedProp({userConfig:r.config,defaultConfig:F});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_wheel[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:k,isImaging:w,generatePdf:C,generateImage:b}=P.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),o=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function _(l,i=1){return{x:o.value.centerX+o.value.radius*Math.cos(29.85+l*Math.PI/180)*i,y:o.value.centerY+o.value.radius*Math.sin(29.85+l*Math.PI/180)*i}}const u=e.ref(t.value.style.chart.animation.use?0:r.dataset.percentage||0);e.watch(()=>r.dataset.percentage,()=>{u.value=e.ref(t.value.style.chart.animation.use?0:r.dataset.percentage||0),x()});const h=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(r.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),x(),t.value.responsive){const l=B.throttle(()=>{const{width:i,height:a}=B.useResponsive({chart:d.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=i,n.value.height=a,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(i,a)});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}),e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function x(){let l=0,i=t.value.style.chart.animation.speed,a=.005*t.value.style.chart.animation.acceleration;function c(){u.value+=i+l,l+=a,u.value<(r.dataset.percentage||0)?requestAnimationFrame(c):u.value=r.dataset.percentage||0}t.value.style.chart.animation.use&&(u.value=0,c())}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const c=u.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:E,y:V}=_(n.value.size/100*a),{x:A,y:M}=_(n.value.size/100*a,.9);l.push({x1:E,y1:V,x2:A,y2:M,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(c,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):c})}return l}),v=e.ref(!1);function O(l){v.value=l,g.value+=1}return z({generatePdf:C,generateImage:b}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(q._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref_key:"details",ref:N,key:`user_options_${g.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(k),isImaging:e.unref(w),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:v.value,titles:{...t.value.userOptions.buttonTitles},chartElement:d.value,onToggleFullscreen:O,onGeneratePdf:e.unref(C),onGenerateImage:e.unref(b)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:c})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":v.value,"vue-data-ui-fulscreen--off":!v.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,c)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&c<=u.value})},null,10,R))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:o.value.centerX,cy:o.value.centerY,r:o.value.radius*.8<=0?1e-4:o.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,X)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:o.value.centerX,y:o.value.centerY+m.value/3,"font-size":m.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,u.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,u.value,e.unref(s.dataLabel)({v:u.value,s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,j)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,G)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(k)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:4,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,U))}},Y=L._export_sfc(D,[["__scopeId","data-v-a9569c10"]]);exports.default=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Br-wm_4r.cjs"),q=require("./Title-DSPpszvp.cjs"),P=require("./usePrinter-DUD-LDLx.cjs"),B=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-BWu2nLeV.cjs"),I=require("./useNestedProp-BH5s4SOa.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=["id"],G=["xmlns","viewBox"],R=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],X=["cx","cy","r","stroke","stroke-width"],j=["x","y","font-size","fill","font-weight"],H={key:3,class:"vue-data-ui-watermark"},D={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:z}){const r=S,{vue_ui_wheel:F}=s.useConfig(),f=e.computed(()=>!!r.dataset&&Object.keys(r.dataset).length),y=e.ref(s.createUid()),N=e.ref(null),g=e.ref(0),d=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=I.useNestedProp({userConfig:r.config,defaultConfig:F});return l.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_wheel[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:k,isImaging:w,generatePdf:C,generateImage:b}=P.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),o=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function _(l,i=1){return{x:o.value.centerX+o.value.radius*Math.cos(29.85+l*Math.PI/180)*i,y:o.value.centerY+o.value.radius*Math.sin(29.85+l*Math.PI/180)*i}}const u=e.ref(t.value.style.chart.animation.use?0:r.dataset.percentage||0);e.watch(()=>r.dataset.percentage,()=>{u.value=e.ref(t.value.style.chart.animation.use?0:r.dataset.percentage||0),x()});const h=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(r.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),x(),t.value.responsive){const l=B.throttle(()=>{const{width:i,height:a}=B.useResponsive({chart:d.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=i,n.value.height=a,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(i,a)});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}),e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function x(){let l=0,i=t.value.style.chart.animation.speed,a=.005*t.value.style.chart.animation.acceleration;function c(){u.value+=i+l,l+=a,u.value<(r.dataset.percentage||0)?requestAnimationFrame(c):u.value=r.dataset.percentage||0}t.value.style.chart.animation.use&&(u.value=0,c())}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const c=u.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:E,y:V}=_(n.value.size/100*a),{x:A,y:M}=_(n.value.size/100*a,.9);l.push({x1:E,y1:V,x2:A,y2:M,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(c,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):c})}return l}),v=e.ref(!1);function O(l){v.value=l,g.value+=1}return z({generatePdf:C,generateImage:b}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(q._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref_key:"details",ref:N,key:`user_options_${g.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(k),isImaging:e.unref(w),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:v.value,titles:{...t.value.userOptions.buttonTitles},chartElement:d.value,onToggleFullscreen:O,onGeneratePdf:e.unref(C),onGenerateImage:e.unref(b)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:c})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":v.value,"vue-data-ui-fulscreen--off":!v.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,c)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&c<=u.value})},null,10,R))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:o.value.centerX,cy:o.value.centerY,r:o.value.radius*.8<=0?1e-4:o.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,X)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:o.value.centerX,y:o.value.centerY+m.value/3,"font-size":m.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,u.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,u.value,e.unref(s.dataLabel)({v:u.value,s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,j)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,G)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(k)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:4,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,U))}},Y=L._export_sfc(D,[["__scopeId","data-v-a9569c10"]]);exports.default=Y;
@@ -1,13 +1,13 @@
1
1
  import { useCssVars as we, computed as f, openBlock as i, createElementBlock as v, createVNode as q, renderSlot as m, createElementVNode as C, normalizeStyle as N, pushScopeId as xe, popScopeId as $e, ref as c, watch as te, onMounted as Se, onBeforeUnmount as Fe, createCommentVNode as F, createBlock as L, unref as p, createSlots as Ne, withCtx as h, normalizeProps as X, guardReactiveProps as j, normalizeClass as ae, Fragment as _e, renderList as Pe, toDisplayString as oe, createTextVNode as Te, nextTick as le } from "vue";
2
- import { u as ze, T as Ie, c as se, t as Ae, a as Oe, p as E, o as Me, e as ne, g as De, f as We, X as Be, q as Ee, r as Re } from "./index-C1-FJ0sT.js";
3
- import { _ as Ue } from "./Title-D8HoSXgM.js";
4
- import { u as Ve, U as Ge } from "./usePrinter-B1a6uNio.js";
2
+ import { u as ze, T as Ie, c as se, t as Ae, a as Oe, p as E, o as Me, e as ne, g as De, f as We, X as Be, q as Ee, r as Re } from "./index-ChMHOLEV.js";
3
+ import { _ as Ue } from "./Title-C0_PhO2u.js";
4
+ import { u as Ve, U as Ge } from "./usePrinter-BW4S0cF1.js";
5
5
  import { d as Le, t as Xe, u as je } from "./useResponsive-NZB-WLRF.js";
6
- import qe from "./vue-ui-accordion-BLoKd0D-.js";
7
- import { D as He } from "./DataTable-CkeQ7c6_.js";
8
- import Ye from "./BaseIcon-Ct3EasCg.js";
6
+ import qe from "./vue-ui-accordion-Bukh98Pi.js";
7
+ import { D as He } from "./DataTable-Cg9dMxHZ.js";
8
+ import Ye from "./BaseIcon-Lz2AkAUF.js";
9
9
  import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as re } from "./useNestedProp-1fJhHDhT.js";
10
+ import { u as re } from "./useNestedProp-DFwnYdme.js";
11
11
  const Je = (r) => (xe("data-v-3fd7d274"), r = r(), $e(), r), Ke = { "data-html2canvas-ignore": "" }, Qe = {
12
12
  key: 0,
13
13
  class: "reset-wrapper"
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CEhe8nzy.cjs"),ne=require("./Title-NelrBSGO.cjs"),W=require("./usePrinter-AfD8nrd2.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-CS2POBdq.cjs"),se=require("./DataTable-BGF6x8iX.cjs"),ue=require("./BaseIcon-NNgCqsH0.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-CcMb2mLY.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const $=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&($.value=new ResizeObserver(X),$.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),N=e.ref({showTable:t.value.table.show});function Y(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function J(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),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],head:o,body:a,config:l}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){N.value.showTable=!N.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:N.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(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),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)],12,ye))}},$e=L._export_sfc(Se,[["__scopeId","data-v-04df2736"]]);exports.default=$e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Br-wm_4r.cjs"),ne=require("./Title-DSPpszvp.cjs"),W=require("./usePrinter-DUD-LDLx.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-ZPhdh-C7.cjs"),se=require("./DataTable-E_zoBxXZ.cjs"),ue=require("./BaseIcon-CAlmCZtL.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-BH5s4SOa.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const $=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&($.value=new ResizeObserver(X),$.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),N=e.ref({showTable:t.value.table.show});function Y(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function J(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),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],head:o,body:a,config:l}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){N.value.showTable=!N.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:N.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(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),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)],12,ye))}},$e=L._export_sfc(Se,[["__scopeId","data-v-04df2736"]]);exports.default=$e;
@@ -1,16 +1,16 @@
1
1
  import { p as J } from "./pdf-97UbtKC2.js";
2
- import { U as K, s as Q } from "./usePrinter-B1a6uNio.js";
3
- import { c as Z, a as j, t as $, v as ee, p as te, u as ae, P as X, J as P, f as q, F as le, D as re, i as ie, U as se, S as oe, V as ne, W as he, Y as ce, d as de, z as ue, b as ge, q as fe, M as be, Z as me, r as Ie, e as Ne, x as xe, _ as _e, w as Fe, $ as ye, o as Ae, s as Le, C as Se, y as Ce } from "./index-C1-FJ0sT.js";
4
- import { D as ke } from "./DataTable-CkeQ7c6_.js";
5
- import { _ as we } from "./Title-D8HoSXgM.js";
6
- import { _ as Oe, u as ve } from "./Tooltip-DTwn_FW5.js";
7
- import { _ as Ge } from "./Shape-DoAgLIYa.js";
8
- import ze from "./BaseIcon-Ct3EasCg.js";
9
- import pe from "./vue-ui-table-sparkline-D2KWAYWO.js";
10
- import Me from "./vue-ui-skeleton-DogpCRv2.js";
11
- import { S as Pe } from "./Slicer-I9LVm-u8.js";
12
- import Te from "./vue-ui-accordion-BLoKd0D-.js";
13
- import { u as U } from "./useNestedProp-1fJhHDhT.js";
2
+ import { U as K, s as Q } from "./usePrinter-BW4S0cF1.js";
3
+ import { c as Z, a as j, t as $, v as ee, p as te, u as ae, P as X, J as P, f as q, F as le, D as re, i as ie, U as se, S as oe, V as ne, W as he, Y as ce, d as de, z as ue, b as ge, q as fe, M as be, Z as me, r as Ie, e as Ne, x as xe, _ as _e, w as Fe, $ as ye, o as Ae, s as Le, C as Se, y as Ce } from "./index-ChMHOLEV.js";
4
+ import { D as ke } from "./DataTable-Cg9dMxHZ.js";
5
+ import { _ as we } from "./Title-C0_PhO2u.js";
6
+ import { _ as Oe, u as ve } from "./Tooltip-dfMcr3Yl.js";
7
+ import { _ as Ge } from "./Shape-npSEDLuX.js";
8
+ import ze from "./BaseIcon-Lz2AkAUF.js";
9
+ import pe from "./vue-ui-table-sparkline-BDaZLq9H.js";
10
+ import Me from "./vue-ui-skeleton-CwTDNzek.js";
11
+ import { S as Pe } from "./Slicer-DGciWCaF.js";
12
+ import Te from "./vue-ui-accordion-Bukh98Pi.js";
13
+ import { u as U } from "./useNestedProp-DFwnYdme.js";
14
14
  import { resolveComponent as T, openBlock as r, createElementBlock as i, normalizeClass as M, normalizeStyle as L, createVNode as Y, createCommentVNode as h, createBlock as V, createSlots as Ve, withCtx as z, renderSlot as v, normalizeProps as W, guardReactiveProps as B, createElementVNode as u, Fragment as b, renderList as I, toDisplayString as C, withDirectives as Re, vModelCheckbox as De, createTextVNode as Ee } from "vue";
15
15
  import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const We = Z(), Be = {
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./pdf-Cz3729tZ.cjs"),v=require("./usePrinter-AfD8nrd2.cjs"),d=require("./index-CEhe8nzy.cjs"),E=require("./DataTable-BGF6x8iX.cjs"),z=require("./Title-NelrBSGO.cjs"),G=require("./Tooltip-CK94hatv.cjs"),V=require("./Shape-BTMZlA5Q.cjs"),P=require("./BaseIcon-NNgCqsH0.cjs"),M=require("./vue-ui-table-sparkline-BPYQI2Vo.cjs"),T=require("./vue-ui-skeleton-DpqVx122.cjs"),D=require("./Slicer-BCr6bV0X.cjs"),R=require("./vue-ui-accordion-CS2POBdq.cjs"),B=require("./useNestedProp-CcMb2mLY.cjs"),e=require("vue"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=d.createUid(),q={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:E.DataTable,Shape:V._sfc_main,Title:z._sfc_main,Tooltip:G._sfc_main,UserOptions:v.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default},data(){this.dataset.forEach((n,g)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:g})});const a=Math.max(...this.dataset.map(n=>n.series.length)),i={start:0,end:a};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,slicer:i,__to__:null,maxX:a,showSparklineTable:!0,segregateStep:0,sliderId:W,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3}}},computed:{customPalette(){return this.convertCustomPalette(this.FINAL_CONFIG.customPalette)},backgroundColor(){return this.FINAL_CONFIG.chart.backgroundColor},slicerColor(){return this.FINAL_CONFIG.chart.zoom.color},allScales(){const a=this.lineSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height,autoScaleYLabels:l.autoScaleYLabels})),i=this.barSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),n=this.plotSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),g=[...a,...i,...n].flatMap(l=>l).length;return[...a,...i,...n].flatMap((l,t)=>({id:l.id,scaleLabel:l.scaleLabel,name:l.name,color:l.color,scale:l.scale,yOffset:l.yOffset,individualHeight:l.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/g*(t+1),yLabels:l.scaleYLabels||l.scale.ticks.map(m=>({y:m>=0?l.zero-l.individualHeight*(m/l.max):l.zero+l.individualHeight*Math.abs(m)/l.max,value:m}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const a=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(a,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){const a=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return a;const i=this.useNestedProp({userConfig:this.config,defaultConfig:a});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,i.theme?{...B.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},set:function(a){return a}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(a=>a.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const a=this.FINAL_CONFIG.chart.highlightArea;return[{...a,span:a.from===a.to?1:a.to<a.from?0:a.to-a.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return this.niceScale.min>=0?0:Math.abs(this.niceScale.min)},absoluteMax(){return this.niceScale.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((a,i)=>({...a,series:a.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(a.color?a.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`})):this.dataset},relativeDataset(){return this.safeDataset.map((a,i)=>({...a,series:a.series.map(n=>n+this.relativeZero),absoluteValues:a.series})).filter(a=>!this.segregatedSeries.includes(a.id))},tableSparklineDataset(){return this.relativeDataset.map(a=>{const i=a.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:a.id,name:a.name,color:a.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((a,i)=>({absoluteIndex:i,...a,series:a.series.map(n=>n+this.relativeZero),absoluteValues:a.series,segregate:()=>this.segregate(a),isSegregated:this.segregatedSeries.includes(a.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="bar").map((a,i)=>{this.checkAutoScaleError(a);const n=Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),g=Math.max(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),t={ratios:a.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(g-n)),valueMin:n,valueMax:g<0?0:g},m={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c)))},I=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,u=this.calculateNiceScaleWithExactExtremes(m.min,m.max,I),N=this.calculateNiceScaleWithExactExtremes(t.valueMin,t.valueMax,I),S=u.min>=0?0:Math.abs(u.min),x=0,y=u.max+S,C=N.max+Math.abs(x),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,F=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,r=this.drawingArea.bottom-f-F*S/y,o=this.drawingArea.bottom-f-F*x/C,s=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale?(a.absoluteValues[k]+S)/y:this.ratioToMax(c),O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left+this.slot.bar*i+this.slot.bar*k*s-this.barSlot/2-i*this.barPeriodGap;return{yOffset:f,individualHeight:F,x:O,y:this.drawingArea.bottom-f-F*w,value:a.absoluteValues[k],zeroPosition:r,individualMax:y,comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),L=a.absoluteValues.map(c=>N.min>=0?(c-Math.abs(N.min))/(N.max-Math.abs(N.min)):(c+Math.abs(N.min))/(N.max+Math.abs(N.min))),A=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*k*this.absoluteDataset.filter(O=>O.type==="bar").filter(O=>!this.segregatedSeries.includes(O.id)).length;return{yOffset:f,individualHeight:F,x:w,y:this.drawingArea.bottom-f-(F*L[k]||0),value:a.absoluteValues[k],zeroPosition:r,individualMax:y,comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),b=u.ticks.map(c=>({y:c>=0?r-F*(c/y):r+F*Math.abs(c)/y,value:c})),_=N.ticks.map(c=>{const k=(c-N.min)/(N.max-N.min);return{y:c>=0?o-F*k:o+F*k,value:c}});return{...a,yOffset:f,autoScaleYLabels:_,individualHeight:F,scaleYLabels:a.autoScaling?_:b,individualScale:a.autoScaling?N:u,individualMax:a.autoScaling?C:y,zeroPosition:a.autoScaling?o:r,plots:a.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(a=>!this.segregatedSeries.includes(a.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="line").map(a=>{this.checkAutoScaleError(a);const i=Math.min(...a.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...a.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,l={ratios:a.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-i)/(n-i)),valueMin:i,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||(Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues))},m=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScaleWithExactExtremes(t.min,t.max,m),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax,m),N=I.min>=0?0:Math.abs(I.min),S=0,x=I.max+Math.abs(N),y=u.max+Math.abs(S),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-f*N/x,r=this.drawingArea.bottom-C-f*S/y,o=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale?(a.absoluteValues[k]+Math.abs(N))/x:this.ratioToMax(c);return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*k,y:this.drawingArea.bottom-C-f*w,value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),s=a.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=a.series.map((c,k)=>{if(![void 0,null].includes(a.absoluteValues[k]))return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*k,y:this.drawingArea.bottom-C-(f*s[k]||0),value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),L=this.createSmoothPath(o),A=this.createSmoothPath(h),b=I.ticks.map(c=>({y:c>=0?F-f*(c/x):F+f*Math.abs(c)/x,value:c})),_=u.ticks.map(c=>{const k=(c-u.min)/(u.max-u.min);return{y:c>=0?r-f*k:r+f*k,value:c}});return{...a,yOffset:C,autoScaleYLabels:_,individualHeight:f,scaleYLabels:a.autoScaling?_:b,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:x,zeroPosition:a.autoScaling?r:F,curve:a.autoScaling?A:L,plots:a.autoScaling?h:o,area:a.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(a.autoScaling?h:o,a.autoScaling?r:F):this.createArea(o):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="plot").map(a=>{this.checkAutoScaleError(a);const i=Math.min(...a.absoluteValues.filter(b=>![null,void 0].includes(b))),n=Math.max(...a.absoluteValues.filter(b=>![null,void 0].includes(b)))||1,l={ratios:a.absoluteValues.filter(b=>![null,void 0].includes(b)).map(b=>(b-i)/(n-i)),valueMin:i,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues)},m=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScaleWithExactExtremes(t.min,t.max,m),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax,m),N=I.min>=0?0:Math.abs(I.min),S=0,x=I.max+N,y=u.max+Math.abs(S),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-f*N/x,r=this.drawingArea.bottom-C-f*S/y,o=a.series.map((b,_)=>{const c=this.mutableConfig.useIndividualScale?(a.absoluteValues[_]+Math.abs(N))/x:this.ratioToMax(b);return{x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*_,y:this.drawingArea.bottom-C-f*c,value:a.absoluteValues[_],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[_]||""}}),s=a.absoluteValues.map(b=>u.min>=0?(b-Math.abs(u.min))/(u.max-Math.abs(u.min)):(b+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=a.series.map((b,_)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*_,y:this.drawingArea.bottom-C-(f*s[_]||0),value:a.absoluteValues[_],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),L=I.ticks.map(b=>({y:b>=0?F-f*(b/x):F+f*Math.abs(b)/x,value:b})),A=u.ticks.map(b=>{const _=(b-u.min)/(u.max-u.min);return{y:b>=0?r-f*_:r+f*_,value:b}});return{...a,yOffset:C,autoScaleYLabels:A,individualHeight:f,scaleYLabels:a.autoScaling?A:L,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:x,zeroPosition:a.autoScaling?r:F,plots:a.autoScaling?h:o}})},drawingArea(){const a=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+a,height:this.height-(this.FINAL_CONFIG.chart.padding.top+this.FINAL_CONFIG.chart.padding.bottom),width:this.width-(this.FINAL_CONFIG.chart.padding.right+this.FINAL_CONFIG.chart.padding.left+a)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(a=>!this.segregatedSeries.includes(a.id)).map(a=>Math.max(...a.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const a=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return a>0?0:a},niceScale(){return this.calculateNiceScaleWithExactExtremes(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(a=>a.type==="bar").filter(a=>!this.segregatedSeries.includes(a.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const a=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/a-this.barPeriodGap*a},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(a=>a!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const a=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),i=[];return this.timeLabels.forEach((n,g)=>{const l=[n];this.relativeDataset.forEach(t=>{l.push(this.canShowValue(t.absoluteValues[g])?Number(t.absoluteValues[g].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(l)}),{head:a,body:i}},dataTable(){const a=[""].concat(this.relativeDataset.map(l=>l.name)).concat(' <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>');let i=[];for(let l=0;l<this.maxSeries;l+=1){const t=this.relativeDataset.map(m=>m.absoluteValues[l]??0).reduce((m,I)=>m+I,0);i.push([this.timeLabels[l]??"-"].concat(this.relativeDataset.map(m=>(m.absoluteValues[l]??0).toFixed(this.FINAL_CONFIG.table.rounding))).concat((t??0).toFixed(this.FINAL_CONFIG.table.rounding)))}const n={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},g=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(l=>l.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:a,body:i,config:n,colNames:g}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(a=>({shape:a.shape||null,name:a.name,color:a.color,type:a.type,value:a.absoluteValues.find((i,n)=>n===this.selectedSerieIndex),comments:a.comments||[]}))},tooltipContent(){let a="",i=this.selectedSeries.map(l=>l.value).filter(l=>this.isSafeValue(l)&&l!==null).reduce((l,t)=>Math.abs(l)+Math.abs(t),0);const n=this.timeLabels[this.selectedSerieIndex],g=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(g)&&this.functionReturnsString(()=>g({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?g({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(a+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n}</div>`),this.selectedSeries.forEach(l=>{if(this.isSafeValue(l.value)){let t="",m="";switch(this.icons[l.type]){case"bar":t=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${l.color}" /></svg>`;break;case"line":!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)?m=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" />`:l.shape==="triangle"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="square"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="diamond"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="pentagon"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="hexagon"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="star"&&(m=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),t=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${l.color}" />${m}</svg>`;break;case"plot":if(!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)){t=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" /></svg>`;break}if(l.shape==="star"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(l.shape==="triangle"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="square"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="diamond"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="pentagon"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="hexagon"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}a+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${t}</div> ${l.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(l.type==="line"?this.FINAL_CONFIG.line.labels.formatter:l.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,l.value,this.dataLabel({p:this.FINAL_CONFIG.chart.labels.prefix,v:l.value,s:this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:l}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(l.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&l.comments.length&&l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(a+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${a}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(a=>({y:a>=0?this.zero-this.drawingArea.height*this.ratioToMax(a):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(a)),value:a}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((a,i)=>{[null,void 0].includes(a.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(a=>{a.series.forEach((i,n)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./pdf-Cz3729tZ.cjs"),v=require("./usePrinter-DUD-LDLx.cjs"),d=require("./index-Br-wm_4r.cjs"),E=require("./DataTable-E_zoBxXZ.cjs"),z=require("./Title-DSPpszvp.cjs"),G=require("./Tooltip-CgSI_niS.cjs"),V=require("./Shape-BLiPCHkv.cjs"),P=require("./BaseIcon-CAlmCZtL.cjs"),M=require("./vue-ui-table-sparkline-OXdcU6JH.cjs"),T=require("./vue-ui-skeleton-BWu2nLeV.cjs"),D=require("./Slicer-DNvTnINC.cjs"),R=require("./vue-ui-accordion-ZPhdh-C7.cjs"),B=require("./useNestedProp-BH5s4SOa.cjs"),e=require("vue"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=d.createUid(),q={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:E.DataTable,Shape:V._sfc_main,Title:z._sfc_main,Tooltip:G._sfc_main,UserOptions:v.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default},data(){this.dataset.forEach((n,g)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:g})});const a=Math.max(...this.dataset.map(n=>n.series.length)),i={start:0,end:a};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,slicer:i,__to__:null,maxX:a,showSparklineTable:!0,segregateStep:0,sliderId:W,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3}}},computed:{customPalette(){return this.convertCustomPalette(this.FINAL_CONFIG.customPalette)},backgroundColor(){return this.FINAL_CONFIG.chart.backgroundColor},slicerColor(){return this.FINAL_CONFIG.chart.zoom.color},allScales(){const a=this.lineSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height,autoScaleYLabels:l.autoScaleYLabels})),i=this.barSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),n=this.plotSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),g=[...a,...i,...n].flatMap(l=>l).length;return[...a,...i,...n].flatMap((l,t)=>({id:l.id,scaleLabel:l.scaleLabel,name:l.name,color:l.color,scale:l.scale,yOffset:l.yOffset,individualHeight:l.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/g*(t+1),yLabels:l.scaleYLabels||l.scale.ticks.map(m=>({y:m>=0?l.zero-l.individualHeight*(m/l.max):l.zero+l.individualHeight*Math.abs(m)/l.max,value:m}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const a=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(a,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){const a=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return a;const i=this.useNestedProp({userConfig:this.config,defaultConfig:a});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,i.theme?{...B.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},set:function(a){return a}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(a=>a.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const a=this.FINAL_CONFIG.chart.highlightArea;return[{...a,span:a.from===a.to?1:a.to<a.from?0:a.to-a.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return this.niceScale.min>=0?0:Math.abs(this.niceScale.min)},absoluteMax(){return this.niceScale.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((a,i)=>({...a,series:a.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(a.color?a.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`})):this.dataset},relativeDataset(){return this.safeDataset.map((a,i)=>({...a,series:a.series.map(n=>n+this.relativeZero),absoluteValues:a.series})).filter(a=>!this.segregatedSeries.includes(a.id))},tableSparklineDataset(){return this.relativeDataset.map(a=>{const i=a.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:a.id,name:a.name,color:a.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((a,i)=>({absoluteIndex:i,...a,series:a.series.map(n=>n+this.relativeZero),absoluteValues:a.series,segregate:()=>this.segregate(a),isSegregated:this.segregatedSeries.includes(a.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="bar").map((a,i)=>{this.checkAutoScaleError(a);const n=Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),g=Math.max(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),t={ratios:a.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(g-n)),valueMin:n,valueMax:g<0?0:g},m={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c)))},I=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,u=this.calculateNiceScaleWithExactExtremes(m.min,m.max,I),N=this.calculateNiceScaleWithExactExtremes(t.valueMin,t.valueMax,I),S=u.min>=0?0:Math.abs(u.min),x=0,y=u.max+S,C=N.max+Math.abs(x),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,F=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,r=this.drawingArea.bottom-f-F*S/y,o=this.drawingArea.bottom-f-F*x/C,s=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale?(a.absoluteValues[k]+S)/y:this.ratioToMax(c),O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left+this.slot.bar*i+this.slot.bar*k*s-this.barSlot/2-i*this.barPeriodGap;return{yOffset:f,individualHeight:F,x:O,y:this.drawingArea.bottom-f-F*w,value:a.absoluteValues[k],zeroPosition:r,individualMax:y,comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),L=a.absoluteValues.map(c=>N.min>=0?(c-Math.abs(N.min))/(N.max-Math.abs(N.min)):(c+Math.abs(N.min))/(N.max+Math.abs(N.min))),A=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*k*this.absoluteDataset.filter(O=>O.type==="bar").filter(O=>!this.segregatedSeries.includes(O.id)).length;return{yOffset:f,individualHeight:F,x:w,y:this.drawingArea.bottom-f-(F*L[k]||0),value:a.absoluteValues[k],zeroPosition:r,individualMax:y,comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),b=u.ticks.map(c=>({y:c>=0?r-F*(c/y):r+F*Math.abs(c)/y,value:c})),_=N.ticks.map(c=>{const k=(c-N.min)/(N.max-N.min);return{y:c>=0?o-F*k:o+F*k,value:c}});return{...a,yOffset:f,autoScaleYLabels:_,individualHeight:F,scaleYLabels:a.autoScaling?_:b,individualScale:a.autoScaling?N:u,individualMax:a.autoScaling?C:y,zeroPosition:a.autoScaling?o:r,plots:a.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(a=>!this.segregatedSeries.includes(a.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="line").map(a=>{this.checkAutoScaleError(a);const i=Math.min(...a.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...a.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,l={ratios:a.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-i)/(n-i)),valueMin:i,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||(Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues))},m=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScaleWithExactExtremes(t.min,t.max,m),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax,m),N=I.min>=0?0:Math.abs(I.min),S=0,x=I.max+Math.abs(N),y=u.max+Math.abs(S),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-f*N/x,r=this.drawingArea.bottom-C-f*S/y,o=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale?(a.absoluteValues[k]+Math.abs(N))/x:this.ratioToMax(c);return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*k,y:this.drawingArea.bottom-C-f*w,value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),s=a.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=a.series.map((c,k)=>{if(![void 0,null].includes(a.absoluteValues[k]))return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*k,y:this.drawingArea.bottom-C-(f*s[k]||0),value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),L=this.createSmoothPath(o),A=this.createSmoothPath(h),b=I.ticks.map(c=>({y:c>=0?F-f*(c/x):F+f*Math.abs(c)/x,value:c})),_=u.ticks.map(c=>{const k=(c-u.min)/(u.max-u.min);return{y:c>=0?r-f*k:r+f*k,value:c}});return{...a,yOffset:C,autoScaleYLabels:_,individualHeight:f,scaleYLabels:a.autoScaling?_:b,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:x,zeroPosition:a.autoScaling?r:F,curve:a.autoScaling?A:L,plots:a.autoScaling?h:o,area:a.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(a.autoScaling?h:o,a.autoScaling?r:F):this.createArea(o):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="plot").map(a=>{this.checkAutoScaleError(a);const i=Math.min(...a.absoluteValues.filter(b=>![null,void 0].includes(b))),n=Math.max(...a.absoluteValues.filter(b=>![null,void 0].includes(b)))||1,l={ratios:a.absoluteValues.filter(b=>![null,void 0].includes(b)).map(b=>(b-i)/(n-i)),valueMin:i,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues)},m=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScaleWithExactExtremes(t.min,t.max,m),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax,m),N=I.min>=0?0:Math.abs(I.min),S=0,x=I.max+N,y=u.max+Math.abs(S),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-f*N/x,r=this.drawingArea.bottom-C-f*S/y,o=a.series.map((b,_)=>{const c=this.mutableConfig.useIndividualScale?(a.absoluteValues[_]+Math.abs(N))/x:this.ratioToMax(b);return{x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*_,y:this.drawingArea.bottom-C-f*c,value:a.absoluteValues[_],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[_]||""}}),s=a.absoluteValues.map(b=>u.min>=0?(b-Math.abs(u.min))/(u.max-Math.abs(u.min)):(b+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=a.series.map((b,_)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*_,y:this.drawingArea.bottom-C-(f*s[_]||0),value:a.absoluteValues[_],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),L=I.ticks.map(b=>({y:b>=0?F-f*(b/x):F+f*Math.abs(b)/x,value:b})),A=u.ticks.map(b=>{const _=(b-u.min)/(u.max-u.min);return{y:b>=0?r-f*_:r+f*_,value:b}});return{...a,yOffset:C,autoScaleYLabels:A,individualHeight:f,scaleYLabels:a.autoScaling?A:L,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:x,zeroPosition:a.autoScaling?r:F,plots:a.autoScaling?h:o}})},drawingArea(){const a=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+a,height:this.height-(this.FINAL_CONFIG.chart.padding.top+this.FINAL_CONFIG.chart.padding.bottom),width:this.width-(this.FINAL_CONFIG.chart.padding.right+this.FINAL_CONFIG.chart.padding.left+a)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(a=>!this.segregatedSeries.includes(a.id)).map(a=>Math.max(...a.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const a=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return a>0?0:a},niceScale(){return this.calculateNiceScaleWithExactExtremes(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(a=>a.type==="bar").filter(a=>!this.segregatedSeries.includes(a.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const a=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/a-this.barPeriodGap*a},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(a=>a!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const a=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),i=[];return this.timeLabels.forEach((n,g)=>{const l=[n];this.relativeDataset.forEach(t=>{l.push(this.canShowValue(t.absoluteValues[g])?Number(t.absoluteValues[g].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(l)}),{head:a,body:i}},dataTable(){const a=[""].concat(this.relativeDataset.map(l=>l.name)).concat(' <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>');let i=[];for(let l=0;l<this.maxSeries;l+=1){const t=this.relativeDataset.map(m=>m.absoluteValues[l]??0).reduce((m,I)=>m+I,0);i.push([this.timeLabels[l]??"-"].concat(this.relativeDataset.map(m=>(m.absoluteValues[l]??0).toFixed(this.FINAL_CONFIG.table.rounding))).concat((t??0).toFixed(this.FINAL_CONFIG.table.rounding)))}const n={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},g=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(l=>l.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:a,body:i,config:n,colNames:g}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(a=>({shape:a.shape||null,name:a.name,color:a.color,type:a.type,value:a.absoluteValues.find((i,n)=>n===this.selectedSerieIndex),comments:a.comments||[]}))},tooltipContent(){let a="",i=this.selectedSeries.map(l=>l.value).filter(l=>this.isSafeValue(l)&&l!==null).reduce((l,t)=>Math.abs(l)+Math.abs(t),0);const n=this.timeLabels[this.selectedSerieIndex],g=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(g)&&this.functionReturnsString(()=>g({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?g({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(a+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n}</div>`),this.selectedSeries.forEach(l=>{if(this.isSafeValue(l.value)){let t="",m="";switch(this.icons[l.type]){case"bar":t=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${l.color}" /></svg>`;break;case"line":!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)?m=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" />`:l.shape==="triangle"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="square"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="diamond"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="pentagon"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="hexagon"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="star"&&(m=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),t=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${l.color}" />${m}</svg>`;break;case"plot":if(!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)){t=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" /></svg>`;break}if(l.shape==="star"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(l.shape==="triangle"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="square"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="diamond"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="pentagon"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="hexagon"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}a+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${t}</div> ${l.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(l.type==="line"?this.FINAL_CONFIG.line.labels.formatter:l.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,l.value,this.dataLabel({p:this.FINAL_CONFIG.chart.labels.prefix,v:l.value,s:this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:l}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(l.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&l.comments.length&&l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(a+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${a}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(a=>({y:a>=0?this.zero-this.drawingArea.height*this.ratioToMax(a):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(a)),value:a}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((a,i)=>{[null,void 0].includes(a.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(a=>{a.series.forEach((i,n)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
2
2
  -----> The serie '${a.name}' contains the value '${i}' at index ${n}.
3
3
  '${i}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",a=>{this.clientPosition={x:a.clientX,y:a.clientY}}),this.mutableConfig={dataLabels:{show:!0},showTooltip:this.FINAL_CONFIG.chart.tooltip.show===!0,showTable:this.FINAL_CONFIG.showTable===!0,isStacked:this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,useIndividualScale:this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},this.FINAL_CONFIG.responsive){const i=this.$refs.chart.parentNode,{height:n,width:g}=i.getBoundingClientRect();let l=null,t=0;this.FINAL_CONFIG.chart.title.show&&(l=this.$refs.chartTitle,t=l.getBoundingClientRect().height);let m=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(m=this.$refs.chartSlicer.$el,I=m.getBoundingClientRect().height);let u=null,N=0;this.FINAL_CONFIG.chart.legend.show&&(u=this.$refs.chartLegend,N=u.getBoundingClientRect().height),this.height=n-t-N-I,this.width=g,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(x=>{for(const y of x)l&&(t=l.getBoundingClientRect().height),m&&(I=m.getBoundingClientRect().height),u&&(N=u.getBoundingClientRect().height),this.height=y.contentBoxSize[0].blockSize-t-N-I-24,this.width=y.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()}).observe(i)}else this.height=this.FINAL_CONFIG.chart.height,this.width=this.FINAL_CONFIG.chart.width,this.viewBox=`0 0 ${this.width} ${this.height}`,this.fontSizes.dataLabels=this.FINAL_CONFIG.chart.grid.labels.fontSize,this.fontSizes.yAxis=this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,this.fontSizes.xAxis=this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,this.fontSizes.plotLabels=this.FINAL_CONFIG.chart.labels.fontSize,this.plotRadii.plot=this.FINAL_CONFIG.plot.radius,this.plotRadii.line=this.FINAL_CONFIG.line.radius},methods:{abbreviate:d.abbreviate,adaptColorToBackground:d.adaptColorToBackground,applyDataLabel:d.applyDataLabel,assignStackRatios:d.assignStackRatios,calcLinearProgression:d.calcLinearProgression,calculateNiceScaleWithExactExtremes:d.calculateNiceScaleWithExactExtremes,checkNaN:d.checkNaN,closestDecimal:d.closestDecimal,convertColorToHex:d.convertColorToHex,convertConfigColors:d.convertConfigColors,convertCustomPalette:d.convertCustomPalette,createCsvContent:d.createCsvContent,createSmoothPath:d.createSmoothPath,createTSpans:d.createTSpans,dataLabel:d.dataLabel,downloadCsv:d.downloadCsv,error:d.error,functionReturnsString:d.functionReturnsString,hasDeepProperty:d.hasDeepProperty,img:v.saveAsImage,isFunction:d.isFunction,isSafeValue:d.isSafeValue,objectIsEmpty:d.objectIsEmpty,pdf:p.pdf,shiftHue:d.shiftHue,translateSize:d.translateSize,treeShake:d.treeShake,useMouse:G.useMouse,useNestedProp:B.useNestedProp,convertSizes(){this.fontSizes.dataLabels=this.translateSize({relator:this.height,adjuster:400,source:this.FINAL_CONFIG.chart.grid.labels.fontSize,threshold:10,fallback:10}),this.fontSizes.yAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,threshold:10,fallback:10}),this.fontSizes.xAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,threshold:10,fallback:10}),this.fontSizes.plotLabels=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.chart.labels.fontSize,threshold:10,fallback:10}),this.plotRadii.plot=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.plot.radius,threshold:1,fallback:1}),this.plotRadii.line=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.line.radius,threshold:1,fallback:1})},toggleStack(){this.mutableConfig.isStacked=!this.mutableConfig.isStacked,this.mutableConfig.isStacked?this.mutableConfig.useIndividualScale=!0:this.mutableConfig.useIndividualScale=this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},toggleTable(){this.mutableConfig.showTable=!this.mutableConfig.showTable},toggleLabels(){this.mutableConfig.dataLabels.show=!this.mutableConfig.dataLabels.show},toggleTooltip(){this.mutableConfig.showTooltip=!this.mutableConfig.showTooltip},checkAutoScaleError(a){a.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`),this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked||console.warn(`VueUiXy (datapoint: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(a){if(!a[0])return[-10,-10,"",-10,-10];const i={x:a[0].x,y:this.zero},n={x:a.at(-1).x,y:this.zero},g=[];return a.forEach(l=>{g.push(`${l.x},${l.y} `)}),[i.x,i.y,...g,n.x,n.y].toString()},createIndividualArea(a,i){if(!a[0])return[-10,-10,"",-10,-10];const n={x:a[0]?a[0].x:Math.min(...a.filter(t=>!!t).map(t=>t.x)),y:i},g={x:a.at(-1)?a.at(-1).x:Math.min(...a.filter(t=>!!t).map(t=>t.x)),y:i},l=[];return a.filter(t=>!!t).forEach(t=>{l.push(`${t.x},${t.y} `)}),[n.x,n.y,...l,g.x,g.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(a,i){let n=Array(a).fill(0);for(let g=0;g<i.length&&g<a;g+=1)n[g]=i[g];return n},refreshSlicer(){this.slicer={start:0,end:Math.max(...this.dataset.map(a=>a.series.length))},this.slicerStep+=1},calcRectHeight(a){return a.value>=0?this.zero-a.y<=0?1e-5:this.zero-a.y:a.y-this.zero<=0?1e-5:a.y-this.zero},calcIndividualHeight(a){return a.value>=0?a.zeroPosition-a.y<=0?1e-5:a.zeroPosition-a.y:a.y-a.zeroPosition<=0?1e-5:a.zeroPosition-a.y},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(a){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?a.x+this.drawingArea.width/this.maxSeries*.05:a.x+this.slot.bar/2},calcRectY(a){return a.value>=0?a.y:this.zero},calcIndividualRectY(a){return a.value>=0?a.y:a.zeroPosition},canShowValue(a){return![null,void 0,NaN].includes(a)},findClosestValue(a,i){let n=i[0],g=Math.abs(a-i[0]);for(let l=1;l<i.length;l+=1){const t=Math.abs(a-i[l]);t<g&&i[l]<a&&(n=i[l],g=t)}return n},ratioToMax(a){return a/this.absoluteMax},selectX(a){this.$emit("selectX",{dataset:this.relativeDataset.map(i=>({name:i.name,value:[null,void 0,NaN].includes(i.absoluteValues[a])?null:i.absoluteValues[a],color:i.color,type:i.type})),index:a,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[a]})},getData(){return this.absoluteDataset.map(a=>({values:a.absoluteValues,color:a.color,name:a.name,type:a.type}))},segregate(a){if(this.segregatedSeries.includes(a.id))this.segregatedSeries=this.segregatedSeries.filter(i=>i!==a.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(a.id)}this.$emit("selectLegend",this.relativeDataset.map(i=>({name:i.name,values:i.absoluteValues,color:i.color,type:i.type}))),this.segregateStep+=1},toggleTooltipVisibility(a,i=null){this.isTooltip=a,a?this.selectedSerieIndex=i:this.selectedSerieIndex=null},toggleFullscreen(a){this.isFullscreen=a,this.step+=1},showSpinnerPdf(){this.isPrinting=!0},generatePdf(){this.showSpinnerPdf(),clearTimeout(this.__to__),this.__to__=setTimeout(()=>{this.pdf({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"}).finally(()=>{this.isPrinting=!1})},100)},generateCsv(){const a=[[this.FINAL_CONFIG.chart.title.text],[this.FINAL_CONFIG.chart.title.subtitle.text],[""]],i=["",...this.table.head.map(t=>t.label)],n=this.table.body,g=a.concat([i]).concat(n),l=this.createCsvContent(g);this.downloadCsv({csvContent:l,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.__to__=setTimeout(()=>{this.img({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png"}).finally(()=>{this.isImaging=!1})},100)}}},Y=["id"],X=["viewBox"],U={key:0},Z={class:"vue-ui-xy-grid"},J=["stroke","x1","x2","y1","y2"],K=["stroke","x1","x2","y1","y2"],Q={key:1},j=["x1","x2","y1","y2","stroke"],$=["x1","x2","y1","y2","stroke"],ee=["x1","x2","y1","y2","stroke"],te={key:3},le=["x1","x2","y1","y2","stroke"],re=["id"],ae=["stop-color"],ie=["stop-color"],se=["stop-color"],oe=["id"],ne=["stop-color"],ce=["stop-color"],he=["stop-color"],de=["id"],ue=["stop-color"],ge=["stop-color"],me=["id"],fe=["stop-color"],Ne=["stop-color"],ke=["id"],be=["stop-color"],Ie=["stop-color"],Fe=["x","y","height","width","fill"],xe=["x","y","width"],ye=["x","y","height","width","fill"],_e=["x","y","height","width","rx","fill","stroke","stroke-width"],Ce=["width","x","y"],Se={key:0},Ae=["id"],Le=["fill"],we=["x1","x2","y1","y2","stroke","marker-end"],Oe=["x","y","font-size","fill"],ve=["stroke","x1","x2","y1","y2"],Ge={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],pe=["y","width","height","fill"],Ee=["x","y","width","height","fill"],ze=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],Ve={key:4},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["fill","font-size","transform"],Te=["x1","x2","y1","y2","stroke"],De=["x","y","font-size","fill"],Re=["x1","x2","y1","y2","stroke"],He=["x","y","font-size","fill"],We=["width","x","y"],qe={style:{width:"100%"}},Ye={key:0},Xe=["id"],Ue=["fill"],Ze=["x1","x2","y1","y2","stroke","marker-end"],Je=["x","y","font-size","fill"],Ke=["d","stroke","stroke-width","stroke-dasharray"],Qe={key:1},je=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e={key:0},et=["d","fill"],tt=["d","fill"],lt=["d","stroke","stroke-width","stroke-dasharray"],rt={key:2},at=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],it=["width","x","y"],st={style:{width:"100%"}},ot={key:3},nt=["id"],ct=["fill"],ht=["x1","x2","y1","y2","stroke","marker-end"],dt=["x","y","font-size","fill"],ut={key:5},gt=["x","y","font-size","fill"],mt=["x","y","font-size","fill","font-weight"],ft={key:6},Nt=["x","y","font-size","fill"],kt=["x","y"],bt=["x","y"],It={key:7},Ft=["x","y","font-size","fill"],xt=["x","y"],yt=["x","y"],_t=["x","y","font-size","fill","innerHTML"],Ct=["x","y","font-size","fill","innerHTML"],St=["x","y","font-size","fill","innerHTML"],At=["x","y","font-size","fill","innerHTML"],Lt=["x","y","width","height","fill","onMouseenter"],wt=["font-size","fill","transform"],Ot=["x","y","font-size","fill"],vt={key:9},Gt=["text-anchor","font-size","fill","transform"],Bt=["x","y","height","width","onMouseenter","onClick"],pt={key:10},Et=["x","y"],zt=["cx","cy","r","fill"],Vt={key:3,class:"vue-data-ui-watermark"},Pt=["onClick"],Mt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Tt=["fill"],Dt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Rt=["fill"],Ht={key:7,ref:"chartLegend"},Wt={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},qt=["innerHTML"];function Yt(a,i,n,g,l,t){const m=e.resolveComponent("Title"),I=e.resolveComponent("UserOptions"),u=e.resolveComponent("Shape"),N=e.resolveComponent("Skeleton"),S=e.resolveComponent("Slicer"),x=e.resolveComponent("Tooltip"),y=e.resolveComponent("BaseIcon"),C=e.resolveComponent("TableSparkline"),f=e.resolveComponent("DataTable"),F=e.resolveComponent("Accordion");return e.openBlock(),e.createElementBlock("div",{id:`vue-ui-xy_${l.uniqueId}`,class:e.normalizeClass(`vue-ui-xy ${l.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${t.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.chart.backgroundColor}; color:${t.FINAL_CONFIG.chart.color};width:100%;${t.FINAL_CONFIG.chart.title.text?"":"padding-top:36px"};font-family:${t.FINAL_CONFIG.chart.fontFamily};${t.FINAL_CONFIG.responsive?"height: 100%":""}`)},[t.FINAL_CONFIG.chart.title.show?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"chartTitle",class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.FINAL_CONFIG.chart.fontFamily}`)},[e.createVNode(m,{config:{title:{cy:"xy-div-title",...t.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...t.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.userOptions.show&&t.isDataset?(e.openBlock(),e.createBlock(I,{ref:"defails",key:`user_options_${l.step}`,backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,color:t.FINAL_CONFIG.chart.color,isPrinting:l.isPrinting,isImaging:l.isImaging,uid:l.uniqueId,hasTooltip:t.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&t.FINAL_CONFIG.chart.tooltip.show,hasPdf:t.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:t.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:t.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:t.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:t.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:n.dataset.length>1&&t.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:t.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:l.mutableConfig.isStacked,isFullscreen:l.isFullscreen,chartElement:a.$refs.chart,isTooltip:l.mutableConfig.showTooltip,titles:{...t.FINAL_CONFIG.chart.userOptions.buttonTitles},onToggleFullscreen:t.toggleFullscreen,onGeneratePdf:t.generatePdf,onGenerateCsv:t.generateCsv,onGenerateImage:t.generateImage,onToggleTable:t.toggleTable,onToggleLabels:t.toggleLabels,onToggleStack:t.toggleStack,onToggleTooltip:t.toggleTooltip},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionStack?{name:"optionStack",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","isTooltip","titles","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip"])):e.createCommentVNode("",!0),t.isDataset?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([{"vue-data-ui-fullscreen--on":l.isFullscreen,"vue-data-ui-fulscreen--off":!l.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:l.viewBox,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.chart.backgroundColor}; color:${t.FINAL_CONFIG.chart.color}; font-family:${t.FINAL_CONFIG.chart.fontFamily}`)},[t.maxSeries>0?(e.openBlock(),e.createElementBlock("g",U,[e.createElementVNode("g",Z,[t.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:t.drawingArea.bottom,y2:t.drawingArea.bottom,"stroke-linecap":"round"},null,8,J)):e.createCommentVNode("",!0),l.mutableConfig.useIndividualScale?t.FINAL_CONFIG.chart.grid.showHorizontalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("g",null,[r.id===l.selectedScale&&r.yLabels.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.yLabels,o=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:o.y,y2:o.y,stroke:r.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,$))),256)):r.yLabels.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.yLabels,o=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:o.y,y2:o.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,ee))),256)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.left+t.xPadding,y1:t.drawingArea.top,y2:t.drawingArea.bottom,"stroke-linecap":"round"},null,8,K)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.grid.showHorizontalLines?(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.yLabels,r=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:r.y,y2:r.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,j))),256))])):e.createCommentVNode("",!0)],64)),t.FINAL_CONFIG.chart.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.maxSeries+(t.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(r,o)=>(e.openBlock(),e.createElementBlock("line",{key:`grid_vertical_line_${o}`,x1:t.drawingArea.width/t.maxSeries*o+t.drawingArea.left+t.xPadding,x2:t.drawingArea.width/t.maxSeries*o+t.drawingArea.left+t.xPadding,y1:t.drawingArea.top,y2:t.drawingArea.bottom,"stroke-width":"0.5",stroke:t.FINAL_CONFIG.chart.grid.stroke},null,8,le))),128))])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.barSet,(r,o)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_rect_${o}`},[e.createElementVNode("linearGradient",{id:`rectGradient_pos_${o}_${l.uniqueId}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":r.color},null,8,ae),e.createElementVNode("stop",{offset:"62%","stop-color":`${t.shiftHue(r.color,.02)}DE`},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.shiftHue(r.color,.05)}66`},null,8,se)],8,re),e.createElementVNode("linearGradient",{id:`rectGradient_neg_${o}_${l.uniqueId}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.05)}66`},null,8,ne),e.createElementVNode("stop",{offset:"38%","stop-color":`${t.shiftHue(r.color,.02)}DE`},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,he)],8,oe)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,o)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_plot_${o}`},[e.createElementVNode("radialGradient",{id:`plotGradient_${o}_${l.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.05)}`},null,8,ue),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,ge)],8,de)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,o)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_line_${o}`},[e.createElementVNode("radialGradient",{id:`lineGradient_${o}_${l.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.05)}`},null,8,fe),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,Ne)],8,me),e.createElementVNode("linearGradient",{id:`areaGradient_${o}_${l.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.03)}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Ie)],8,ke)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.highlightAreas,r=>(e.openBlock(),e.createElementBlock("g",null,[r.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("rect",{x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*(r.from-l.slicer.start),y:t.drawingArea.top,height:t.drawingArea.height<0?10:t.drawingArea.height,width:t.drawingArea.width/t.maxSeries*r.span<0?1e-5:t.drawingArea.width/t.maxSeries*r.span,fill:`${r.color}${l.opacity[r.opacity]}`},null,8,Fe),r.caption.text?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*(r.from-l.slicer.start)-(r.caption.width==="auto"?0:r.caption.width/2-t.drawingArea.width/t.maxSeries*r.span/2),y:t.drawingArea.top+r.caption.offsetY,style:{overflow:"visible"},height:"1",width:r.caption.width==="auto"?t.drawingArea.width/t.maxSeries*r.span:r.caption.width},[e.createElementVNode("div",{style:e.normalizeStyle(`padding:${r.caption.padding}px;text-align:${r.caption.textAlign};font-size:${r.caption.fontSize}px;color:${r.caption.color};font-weight:${r.caption.bold?"bold":"normal"}`)},e.toDisplayString(r.caption.text),5)],8,xe)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.maxSeries,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`tooltip_trap_${o}`},[e.createElementVNode("rect",{x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*o,y:t.drawingArea.top,height:t.drawingArea.height<0?10:t.drawingArea.height,width:t.drawingArea.width/t.maxSeries<0?1e-5:t.drawingArea.width/t.maxSeries,fill:l.selectedSerieIndex===o||l.selectedRowIndex===o?`${t.FINAL_CONFIG.chart.highlighter.color}${l.opacity[t.FINAL_CONFIG.chart.highlighter.opacity]}`:"transparent"},null,8,ye)]))),128))]),t.barSet.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.barSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_bar_${o}`,class:e.normalizeClass(`serie_bar_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`bar_plot_${o}_${h}`},[t.canShowValue(s.value)?(e.openBlock(),e.createElementBlock("rect",{key:0,x:t.calcRectX(s),y:l.mutableConfig.useIndividualScale?t.calcIndividualRectY(s):t.calcRectY(s),height:l.mutableConfig.useIndividualScale?Math.abs(t.calcIndividualHeight(s)):Math.abs(t.calcRectHeight(s)),width:t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap)<0?1e-5:t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap),rx:t.FINAL_CONFIG.bar.borderRadius,fill:t.FINAL_CONFIG.bar.useGradient?s.value>=0?`url(#rectGradient_pos_${o}_${l.uniqueId})`:`url(#rectGradient_neg_${o}_${l.uniqueId})`:r.color,stroke:t.FINAL_CONFIG.bar.border.useSerieColor?r.color:t.FINAL_CONFIG.bar.border.stroke,"stroke-width":t.FINAL_CONFIG.bar.border.strokeWidth},null,8,_e)):e.createCommentVNode("",!0),s.comment&&t.FINAL_CONFIG.chart.comments.show?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:(t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap)<0?1e-5:t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap)/2)+t.FINAL_CONFIG.chart.comments.width,x:t.calcRectX(s)-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:s.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.renderSlot(a.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)],8,Ce)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",Se,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`bar_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,Le)],8,Ae)]),r.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(r.plots).x1,x2:t.calcLinearProgression(r.plots).x2,y1:t.calcLinearProgression(r.plots).y1,y2:t.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${o})`},null,8,we)):e.createCommentVNode("",!0),r.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(r.plots).x2,y:t.calcLinearProgression(r.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:r.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Oe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)):e.createCommentVNode("",!0),!l.mutableConfig.useIndividualScale&&t.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(e.openBlock(),e.createElementBlock("line",{key:1,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:t.zero,y2:t.zero,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.highlighter.useLine&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("line",{x1:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex+t.drawingArea.width/t.maxSeries/2,x2:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex+t.drawingArea.width/t.maxSeries/2,y1:t.drawingArea.top,y2:t.drawingArea.bottom,stroke:t.FINAL_CONFIG.chart.highlighter.color,"stroke-width":t.FINAL_CONFIG.chart.highlighter.lineWidth,"stroke-dasharray":t.FINAL_CONFIG.chart.highlighter.lineDasharray,"stroke-linecap":"round",style:{transition:"none !important",animation:"none !important","pointer-events":"none"}},null,8,Be)])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{x:0,y:t.drawingArea.top,width:t.FINAL_CONFIG.chart.padding.left-1+t.xPadding,height:t.drawingArea.height<0?10:t.drawingArea.height,fill:t.FINAL_CONFIG.chart.backgroundColor},null,8,pe),e.createElementVNode("rect",{x:t.drawingArea.right+1-t.xPadding,y:t.drawingArea.top,width:t.FINAL_CONFIG.chart.padding.right-1+t.xPadding,height:t.drawingArea.height<0?10:t.drawingArea.height,fill:t.FINAL_CONFIG.chart.backgroundColor},null,8,Ee)]),t.FINAL_CONFIG.chart.grid.frame.show?(e.openBlock(),e.createElementBlock("rect",{key:3,style:{pointerEvents:"none"},x:t.drawingArea.left+t.xPadding,y:t.drawingArea.top,width:t.drawingArea.width-(t.FINAL_CONFIG.chart.grid.position==="middle"?0:t.drawingArea.width/t.maxSeries),height:t.drawingArea.height,fill:"transparent",stroke:t.FINAL_CONFIG.chart.grid.frame.stroke,"stroke-width":t.FINAL_CONFIG.chart.grid.frame.strokeWidth,"stroke-linecap":t.FINAL_CONFIG.chart.grid.frame.strokeLinecap,"stroke-linejoin":t.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,"stroke-dasharray":t.FINAL_CONFIG.chart.grid.frame.strokeDasharray},null,8,ze)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.grid.labels.show?(e.openBlock(),e.createElementBlock("g",Ve,[l.mutableConfig.useIndividualScale?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:r.x+t.xPadding,x2:r.x+t.xPadding,y1:l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset-r.individualHeight:t.drawingArea.top,y2:l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset:t.drawingArea.bottom,stroke:r.color,"stroke-width":t.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,Pe)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("g",{style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[e.createElementVNode("text",{fill:r.color,"font-size":l.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${r.x-t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5}, ${l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset-r.individualHeight/2:t.drawingArea.top+t.drawingArea.height/2}) rotate(-90)`},e.toDisplayString(r.name)+" "+e.toDisplayString(r.scaleLabel?`- ${r.scaleLabel}`:""),9,Me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.yLabels,(o,s)=>(e.openBlock(),e.createElementBlock("line",{x1:r.x-3+t.xPadding,x2:r.x+t.xPadding,y1:o.y,y2:o.y,stroke:r.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Te))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.yLabels,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:r.x-5+t.xPadding,y:o.y+t.xPadding,"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:r.color},e.toDisplayString(t.applyDataLabel(t.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,o.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:o.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:1}))),9,De))),256))],4))),256))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.yLabels,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`yLabel_${o}`},[t.canShowValue(r)&&r.value>=t.niceScale.min&&r.value<=t.niceScale.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.left-5+t.xPadding,y1:r.y,y2:r.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,Re)):e.createCommentVNode("",!0),r.value>=t.niceScale.min&&r.value<=t.niceScale.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.drawingArea.left-7+t.xPadding,y:r.y+l.fontSizes.dataLabels/3,"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:t.FINAL_CONFIG.chart.grid.labels.color},e.toDisplayString(t.canShowValue(r.value)?t.applyDataLabel(t.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,r.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:r.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:1})):""),9,He)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_plot_${o}`,class:e.normalizeClass(`serie_plot_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`circle_plot_${o}_${h}`},[t.canShowValue(s.value)?(e.openBlock(),e.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:t.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${o}_${l.uniqueId})`:r.color,plot:{x:s.x,y:s.y},radius:l.selectedSerieIndex!==null&&l.selectedSerieIndex===h?(l.plotRadii.plot||6)*1.5:l.plotRadii.plot||6,stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["shape","color","plot","radius","stroke"])):e.createCommentVNode("",!0),s.comment&&t.FINAL_CONFIG.chart.comments.show?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:t.FINAL_CONFIG.chart.comments.width,x:s.x-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:s.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.createElementVNode("div",qe,[e.renderSlot(a.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)])],8,We)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",Ye,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`plot_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,Ue)],8,Xe)]),r.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(r.plots).x1,x2:t.calcLinearProgression(r.plots).x2,y1:t.calcLinearProgression(r.plots).y1,y2:t.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${o})`},null,8,Ze)):e.createCommentVNode("",!0),r.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(r.plots).x2,y:t.calcLinearProgression(r.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:r.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Je)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${o}`,class:e.normalizeClass(`serie_line_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.smooth&&r.plots.length>1?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M${r.curve}`,stroke:t.FINAL_CONFIG.chart.backgroundColor,"stroke-width":t.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,Ke)):r.plots.length>1?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<r.plots.length-1&&r.plots[h+1]&&t.canShowValue(s.value)&&t.canShowValue(r.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.x,x2:r.plots[h+1].x,y1:s.y,y2:r.plots[h+1].y,stroke:t.FINAL_CONFIG.chart.backgroundColor,"stroke-width":t.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,je)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${o}`,class:e.normalizeClass(`serie_line_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.useArea&&r.plots.length>1?(e.openBlock(),e.createElementBlock("g",$e,[r.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${r.plots[0]?r.plots[0].x:Math.min(...r.plots.filter(s=>!!s).map(s=>s.x))},${l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset:t.drawingArea.bottom} ${r.curve} L ${r.plots.at(-1)?r.plots.at(-1).x:t.drawingArea.left+t.slot.line*o+t.slot.line/2},${l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset:t.drawingArea.bottom} Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${l.uniqueId})`:`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,et)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${r.area}Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${l.uniqueId})`:`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,tt))])):e.createCommentVNode("",!0),r.smooth&&r.plots.length>1?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${r.curve}`,stroke:r.color,"stroke-width":t.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,lt)):r.plots.length>1?(e.openBlock(),e.createElementBlock("g",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<r.plots.length-1&&r.plots[h+1]&&t.canShowValue(s.value)&&t.canShowValue(r.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.x,x2:r.plots[h+1].x,y1:s.y,y2:r.plots[h+1].y,stroke:r.color,"stroke-width":t.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,at)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`circle_line_${o}_${h}`},[s&&t.canShowValue(s.value)?(e.openBlock(),e.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:t.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${o}_${l.uniqueId})`:r.color,plot:{x:s.x,y:s.y},radius:l.selectedSerieIndex!==null&&l.selectedSerieIndex===h?(l.plotRadii.line||6)*1.5:l.plotRadii.line,stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["shape","color","plot","radius","stroke"])):e.createCommentVNode("",!0),s.comment&&t.FINAL_CONFIG.chart.comments.show?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:t.FINAL_CONFIG.chart.comments.width,x:s.x-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:s.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.createElementVNode("div",st,[e.renderSlot(a.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)])],8,it)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`line_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,ct)],8,nt)]),r.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(r.plots).x1,x2:t.calcLinearProgression(r.plots).x2,y1:t.calcLinearProgression(r.plots).y1,y2:t.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${o})`},null,8,ht)):e.createCommentVNode("",!0),r.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(r.plots).x2,y:t.calcLinearProgression(r.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:r.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,dt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)),(t.FINAL_CONFIG.bar.labels.show||t.FINAL_CONFIG.bar.serieName.show)&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.barSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${o}`,class:e.normalizeClass(`xLabel_bar_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${o}_${h}`},[s&&(!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0)&&t.FINAL_CONFIG.bar.labels.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?s.x+t.slot.line/2:t.calcRectX(s)+t.calcRectWidth()/2-t.barPeriodGap/2,y:s.y+(s.value>0?t.FINAL_CONFIG.bar.labels.offsetY:-t.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.bar.labels.color},e.toDisplayString(t.canShowValue(s.value)?t.applyDataLabel(t.FINAL_CONFIG.bar.labels.formatter,s.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.bar.labels.rounding}),{datapoint:s,serie:r}):""),9,gt)):e.createCommentVNode("",!0),s&&t.FINAL_CONFIG.bar.serieName.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?s.x+t.slot.line/2:s.x+t.calcRectWidth()*1.1,y:s.y+(s.value>0?t.FINAL_CONFIG.bar.serieName.offsetY:-t.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.bar.serieName.useSerieColor?r.color:t.FINAL_CONFIG.bar.serieName.color,"font-weight":t.FINAL_CONFIG.bar.serieName.bold?"bold":"normal"},e.toDisplayString(t.FINAL_CONFIG.bar.serieName.useAbbreviation?t.abbreviate({source:r.name,length:t.FINAL_CONFIG.bar.serieName.abbreviationSize}):r.name),9,mt)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.plot.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${o}`,class:e.normalizeClass(`xLabel_plot_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.x,y:s.y+t.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.plot.labels.color},e.toDisplayString(t.canShowValue(s.value)?t.applyDataLabel(t.FINAL_CONFIG.plot.labels.formatter,s.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.plot.labels.rounding}),{datapoint:s,serie:r}):""),9,Nt)):e.createCommentVNode("",!0),s&&h===0&&r.useTag&&r.useTag==="start"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,kt)):e.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:s.x-r.name.length*(l.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,bt)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.line.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",It,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${o}`,class:e.normalizeClass(`xLabel_line_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.x,y:s.y+(s.value>0?t.FINAL_CONFIG.line.labels.offsetY:-t.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.line.labels.color},e.toDisplayString(t.canShowValue(s.value)?t.applyDataLabel(t.FINAL_CONFIG.line.labels.formatter,s.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.line.labels.rounding}),{datapoint:s,serie:r}):""),9,Ft)):e.createCommentVNode("",!0),s&&h===0&&r.useTag&&r.useTag==="start"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,xt)):e.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:s.x-r.name.length*(l.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,yt)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${o}`,class:e.normalizeClass(`xLabel_line_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&h===0&&r.showSerieName&&r.showSerieName==="start"?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.x-l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:s.x-l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,_t)):e.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.x+l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:s.x+l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Ct)):e.createCommentVNode("",!0)]))),128))],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${o}`,class:e.normalizeClass(`xLabel_plot_${o}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(s,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&h===0&&r.showSerieName&&r.showSerieName==="start"?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.x-l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:s.x-l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,St)):e.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.x+l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:s.x+l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,At)):e.createCommentVNode("",!0)]))),128))],6))),128)),l.mutableConfig.useIndividualScale&&!l.mutableConfig.isStacked?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:8},e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("rect",{x:r.x-t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,y:t.drawingArea.top,width:t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:t.drawingArea.height<0?10:t.drawingArea.height,fill:l.selectedScale===r.id?`${r.color}20`:"transparent",onMouseenter:o=>l.selectedScale=r.id,onMouseleave:i[0]||(i[0]=o=>l.selectedScale=null)},null,40,Lt))),256)):e.createCommentVNode("",!0),e.createElementVNode("g",null,[t.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!l.mutableConfig.useIndividualScale?(e.openBlock(),e.createElementBlock("text",{key:0,"font-size":l.fontSizes.yAxis,fill:t.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${l.fontSizes.yAxis+t.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${t.drawingArea.top+t.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},e.toDisplayString(t.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,wt)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:l.width/2,y:t.drawingArea.bottom+l.fontSizes.yAxis+l.fontSizes.xAxis*1.3+t.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":l.fontSizes.yAxis,fill:t.FINAL_CONFIG.chart.grid.labels.color},e.toDisplayString(t.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,Ot)):e.createCommentVNode("",!0)]),t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timeLabels,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`time_label_${o}`},[r&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(o===0||o===t.timeLabels.length-1)&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&l.selectedSerieIndex===o&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&o%Math.floor((this.slicer.end-this.slicer.start)/t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":l.fontSizes.xAxis,fill:t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${t.drawingArea.left+t.drawingArea.width/t.maxSeries*o+t.drawingArea.width/t.maxSeries/2}, ${t.drawingArea.bottom+l.fontSizes.xAxis*1.3+t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`},e.toDisplayString(r||""),9,Gt)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.maxSeries,(r,o)=>(e.openBlock(),e.createElementBlock("g",{key:`tooltip_trap_${o}`},[e.createElementVNode("rect",{"data-cy-trap":"",x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*o,y:t.drawingArea.top,height:t.drawingArea.height<0?10:t.drawingArea.height,width:t.drawingArea.width/t.maxSeries<0?1e-5:t.drawingArea.width/t.maxSeries,fill:"transparent",onMouseenter:s=>t.toggleTooltipVisibility(!0,o),onMouseleave:i[1]||(i[1]=s=>t.toggleTooltipVisibility(!1)),onClick:s=>t.selectX(o)},null,40,Bt)]))),128))]),t.FINAL_CONFIG.chart.timeTag.show&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",pt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex-100+t.drawingArea.width/t.maxSeries/2,y:t.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[e.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:e.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${t.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${t.FINAL_CONFIG.chart.timeTag.color};font-size:${t.FINAL_CONFIG.chart.timeTag.fontSize}px`)},e.toDisplayString(t.timeLabels[l.selectedSerieIndex]||l.selectedSerieIndex),5)],8,Et)),e.createElementVNode("circle",{cx:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex+t.drawingArea.width/t.maxSeries/2,cy:t.drawingArea.bottom,r:t.FINAL_CONFIG.chart.timeTag.circleMarker.radius,fill:t.FINAL_CONFIG.chart.timeTag.circleMarker.color},null,8,zt)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.svg},void 0,!0)],14,X)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Vt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:l.isPrinting||l.isImaging})),void 0,!0)])):e.createCommentVNode("",!0),t.isDataset?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N,{key:4,config:{type:"line",style:{backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:t.FINAL_CONFIG.chart.grid.stroke},path:{color:t.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),t.FINAL_CONFIG.chart.zoom.show&&l.maxX>6&&t.isDataset?(e.openBlock(),e.createBlock(S,{ref:"chartSlicer",key:`slicer_${l.slicerStep}`,background:t.FINAL_CONFIG.chart.zoom.color,fontSize:t.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:t.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.start],labelRight:t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.end-1],textColor:t.FINAL_CONFIG.chart.color,inputColor:t.FINAL_CONFIG.chart.zoom.color,selectColor:t.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:t.FINAL_CONFIG.chart.backgroundColor,max:l.maxX,min:0,valueStart:l.slicer.start,valueEnd:l.slicer.end,start:l.slicer.start,"onUpdate:start":i[2]||(i[2]=r=>l.slicer.start=r),end:l.slicer.end,"onUpdate:end":i[3]||(i[3]=r=>l.slicer.end=r),onReset:t.refreshSlicer},{"reset-action":e.withCtx(({reset:r})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","max","valueStart","valueEnd","start","end","onReset"])):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:6,ref:"chartLegend",class:"vue-ui-xy-legend",style:e.normalizeStyle(`font-size:${t.FINAL_CONFIG.chart.legend.fontSize}px`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.absoluteDataset,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:`div_legend_item_${o}`,onClick:s=>t.segregate(r),class:e.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":l.segregatedSeries.includes(r.id)})},[l.icons[r.type]==="line"?(e.openBlock(),e.createElementBlock("svg",Mt,[e.createElementVNode("rect",{x:"0",y:"7",rx:"3",stroke:"none",height:"4",width:"20",fill:r.color},null,8,Tt),e.createVNode(u,{plot:{x:10,y:9},radius:4,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:1},null,8,["color","shape","stroke"])])):(e.openBlock(),e.createElementBlock("svg",Dt,[l.icons[r.type]==="bar"?(e.openBlock(),e.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"12",width:"12",stroke:"none",fill:r.color},null,8,Rt)):(e.openBlock(),e.createBlock(u,{key:1,plot:{x:6,y:6},radius:5,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle"},null,8,["color","shape"]))])),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.FINAL_CONFIG.chart.legend.color}`)},e.toDisplayString(r.name),5)],10,Pt))),128))],4)):(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(a.$slots,"legend",{legend:t.absoluteDataset},void 0,!0)],512)),e.createVNode(x,{show:l.mutableConfig.showTooltip&&l.isTooltip,backgroundColor:t.FINAL_CONFIG.chart.tooltip.backgroundColor,color:t.FINAL_CONFIG.chart.tooltip.color,fontSize:t.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:t.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:t.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:t.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:t.FINAL_CONFIG.chart.tooltip.backgroundOpacity,position:t.FINAL_CONFIG.chart.tooltip.position,offsetY:t.FINAL_CONFIG.chart.tooltip.offsetY,parent:a.$refs.chart,content:t.tooltipContent,isCustom:t.FINAL_CONFIG.chart.tooltip.customFormat&&typeof t.FINAL_CONFIG.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...t.dataTooltipSlot})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...t.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),t.isDataset?(e.openBlock(),e.createBlock(F,{key:8,hideDetails:"",config:{open:l.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,color:t.FINAL_CONFIG.chart.color},head:{backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,color:t.FINAL_CONFIG.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(`${l.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[e.createElementVNode("div",Wt,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[4]||(i[4]=r=>l.showSparklineTable=r)},null,512),[[e.vModelCheckbox,l.showSparklineTable]]),e.createElementVNode("div",{onClick:i[5]||(i[5]=r=>l.showSparklineTable=!l.showSparklineTable),style:{cursor:"pointer"}},[e.createVNode(y,{name:"chartLine",size:20,stroke:t.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),l.showSparklineTable?(e.openBlock(),e.createBlock(C,{key:`sparkline_${l.segregateStep}`,dataset:t.tableSparklineDataset,config:t.tableSparklineConfig},null,8,["dataset","config"])):(e.openBlock(),e.createBlock(f,{key:1,colNames:t.dataTable.colNames,head:t.dataTable.head,body:t.dataTable.body,config:t.dataTable.config,title:`${t.FINAL_CONFIG.chart.title.text}${t.FINAL_CONFIG.chart.title.subtitle.text?` : ${t.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:i[6]||(i[6]=r=>l.mutableConfig.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r},null,8,qt)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(r))?r:t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:r,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Y)}const Xt=H._export_sfc(q,[["render",Yt],["__scopeId","data-v-c25cc064"]]);exports.default=Xt;
@@ -1,15 +1,15 @@
1
1
  import { ref as d, computed as m, watch as re, onMounted as ha, onBeforeUnmount as ya, openBlock as T, createElementBlock as se, normalizeStyle as X, normalizeClass as fa, createVNode as ye, createCommentVNode as A, createBlock as Z, unref as E, createSlots as ga, withCtx as b, renderSlot as k, normalizeProps as G, guardReactiveProps as V, createElementVNode as j, toDisplayString as We, createTextVNode as pa } from "vue";
2
- import { u as ma, c as ba, t as xa, a as La, p as N, b as ka, A as fe, i as q, f as J, d as Ye, U as Ca, o as wa, e as Sa, w as Be, x as $a, q as za, r as Ta, v as K, l as Ma } from "./index-C1-FJ0sT.js";
2
+ import { u as ma, c as ba, t as xa, a as La, p as N, b as ka, A as fe, i as q, f as J, d as Ye, U as Ca, o as wa, e as Sa, w as Be, x as $a, q as za, r as Ta, v as K, l as Ma } from "./index-ChMHOLEV.js";
3
3
  import { d as Ra, c as Ia, a as Ue, t as Oa, l as C, r as ge, b as O, p as Xe, u as Pa } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Fa } from "./Tooltip-DTwn_FW5.js";
5
- import { L as Ea } from "./Legend-aFYc_s9T.js";
6
- import { _ as Na } from "./Title-D8HoSXgM.js";
7
- import { S as _a } from "./Slicer-I9LVm-u8.js";
8
- import { u as Da, U as Ha } from "./usePrinter-B1a6uNio.js";
9
- import Wa from "./vue-ui-accordion-BLoKd0D-.js";
10
- import { D as Ya } from "./DataTable-CkeQ7c6_.js";
11
- import Ba from "./vue-ui-skeleton-DogpCRv2.js";
12
- import { u as Ae } from "./useNestedProp-1fJhHDhT.js";
4
+ import { _ as Fa } from "./Tooltip-dfMcr3Yl.js";
5
+ import { L as Ea } from "./Legend-DKGyWu7I.js";
6
+ import { _ as Na } from "./Title-C0_PhO2u.js";
7
+ import { S as _a } from "./Slicer-DGciWCaF.js";
8
+ import { u as Da, U as Ha } from "./usePrinter-BW4S0cF1.js";
9
+ import Wa from "./vue-ui-accordion-Bukh98Pi.js";
10
+ import { D as Ya } from "./DataTable-Cg9dMxHZ.js";
11
+ import Ba from "./vue-ui-skeleton-CwTDNzek.js";
12
+ import { u as Ae } from "./useNestedProp-DFwnYdme.js";
13
13
  import { _ as Ua } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const Xa = ["id"], Aa = ["onClick"], Za = {
15
15
  key: 2,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-CEhe8nzy.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),qe=require("./Tooltip-CK94hatv.cjs"),Ye=require("./Legend-DjuRskVd.cjs"),Ue=require("./Title-NelrBSGO.cjs"),Xe=require("./Slicer-BCr6bV0X.cjs"),xe=require("./usePrinter-AfD8nrd2.cjs"),Ae=require("./vue-ui-accordion-CS2POBdq.cjs"),Ze=require("./DataTable-BGF6x8iX.cjs"),Ge=require("./vue-ui-skeleton-DpqVx122.cjs"),Le=require("./useNestedProp-CcMb2mLY.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Ke=["onClick"],Qe={key:2,class:"vue-data-ui-watermark"},et=["innerHTML"],tt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(J,{expose:ke,emit:Ce}){const R=J,{vue_ui_xy_canvas:we}=s.useConfig(),U=a.ref(s.createUid()),D=a.ref(null),C=a.ref(null),I=a.ref(null),i=a.ref(null),g=a.ref(1),z=a.ref(1),_=a.ref(!1),f=a.ref(null),H=a.ref(""),K=a.ref(null),k=a.ref([]),N=a.ref(1),M=a.ref(!0),w=a.ref(!0),X=a.ref(null),Q=a.ref(0),ee=a.ref(0),A=a.ref(!1),te=a.ref(null),ae=a.ref(null),le=a.ref(null),Z=a.computed(()=>!!R.dataset&&R.dataset.length),t=a.computed(()=>{const e=Le.useNestedProp({userConfig:R.config,defaultConfig:we});return e.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_xy_canvas[e.theme]||R.config,defaultConfig:e}),customPalette:s.themePalettes[e.theme]||s.palette}:e}),oe=a.ref(t.value.style.chart.aspectRatio),{isPrinting:re,isImaging:ue,generatePdf:ne,generateImage:se}=xe.usePrinter({elementId:`xy_canvas_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),n=a.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Se(e){A.value=e,ee.value+=1}const ie=a.computed(()=>s.convertCustomPalette(t.value.customPalette)),P=a.computed(()=>Math.max(...E.value.filter((e,o)=>!k.value.includes(e.absoluteIndex)).map(e=>e.series.length))),l=a.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:z.value,left:g.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function ve(e,o){return e/o}function ze({hasAutoScale:e,series:o,min:r,max:d,scale:h,yOffset:p,individualHeight:v,stackIndex:m=null}){return o.map((L,j)=>{const S=h.min<0?Math.abs(h.min):0,$=ve(L+S,S+h.max);let T,O;e&&(T=Math.abs(h.min),O=ve(L+T,h.max+T));let F=0;return m===null?F=l.value.bottom-l.value.height*(e?O:$):F=l.value.bottom-p-v*(e?O:$),{x:l.value.left+l.value.slot*j+l.value.slot/2,y:F,value:L}})}const b=a.computed(()=>{const e=Math.min(...E.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),o=Math.max(...E.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),r=s.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=l.value.bottom-l.value.height*(d/(r.max+d)),p=r.ticks.map(v=>({y:l.value.bottom-l.value.height*((v+d)/(r.max+d)),x:l.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:p,zero:h}}),$e=a.computed(()=>y.value.map(e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-Br-wm_4r.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),qe=require("./Tooltip-CgSI_niS.cjs"),Ye=require("./Legend-L_Enr1Hx.cjs"),Ue=require("./Title-DSPpszvp.cjs"),Xe=require("./Slicer-DNvTnINC.cjs"),xe=require("./usePrinter-DUD-LDLx.cjs"),Ae=require("./vue-ui-accordion-ZPhdh-C7.cjs"),Ze=require("./DataTable-E_zoBxXZ.cjs"),Ge=require("./vue-ui-skeleton-BWu2nLeV.cjs"),Le=require("./useNestedProp-BH5s4SOa.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Ke=["onClick"],Qe={key:2,class:"vue-data-ui-watermark"},et=["innerHTML"],tt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(J,{expose:ke,emit:Ce}){const R=J,{vue_ui_xy_canvas:we}=s.useConfig(),U=a.ref(s.createUid()),D=a.ref(null),C=a.ref(null),I=a.ref(null),i=a.ref(null),g=a.ref(1),z=a.ref(1),_=a.ref(!1),f=a.ref(null),H=a.ref(""),K=a.ref(null),k=a.ref([]),N=a.ref(1),M=a.ref(!0),w=a.ref(!0),X=a.ref(null),Q=a.ref(0),ee=a.ref(0),A=a.ref(!1),te=a.ref(null),ae=a.ref(null),le=a.ref(null),Z=a.computed(()=>!!R.dataset&&R.dataset.length),t=a.computed(()=>{const e=Le.useNestedProp({userConfig:R.config,defaultConfig:we});return e.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_xy_canvas[e.theme]||R.config,defaultConfig:e}),customPalette:s.themePalettes[e.theme]||s.palette}:e}),oe=a.ref(t.value.style.chart.aspectRatio),{isPrinting:re,isImaging:ue,generatePdf:ne,generateImage:se}=xe.usePrinter({elementId:`xy_canvas_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),n=a.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Se(e){A.value=e,ee.value+=1}const ie=a.computed(()=>s.convertCustomPalette(t.value.customPalette)),P=a.computed(()=>Math.max(...E.value.filter((e,o)=>!k.value.includes(e.absoluteIndex)).map(e=>e.series.length))),l=a.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:z.value,left:g.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function ve(e,o){return e/o}function ze({hasAutoScale:e,series:o,min:r,max:d,scale:h,yOffset:p,individualHeight:v,stackIndex:m=null}){return o.map((L,j)=>{const S=h.min<0?Math.abs(h.min):0,$=ve(L+S,S+h.max);let T,O;e&&(T=Math.abs(h.min),O=ve(L+T,h.max+T));let F=0;return m===null?F=l.value.bottom-l.value.height*(e?O:$):F=l.value.bottom-p-v*(e?O:$),{x:l.value.left+l.value.slot*j+l.value.slot/2,y:F,value:L}})}const b=a.computed(()=>{const e=Math.min(...E.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),o=Math.max(...E.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),r=s.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=l.value.bottom-l.value.height*(d/(r.max+d)),p=r.ticks.map(v=>({y:l.value.bottom-l.value.height*((v+d)/(r.max+d)),x:l.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:p,zero:h}}),$e=a.computed(()=>y.value.map(e=>`
2
2
  <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
3
  <svg viewBox="0 0 10 10" height="12" width="12">
4
4
  <circle cx="5" cy="5" r="5" fill="${e.color}"/>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "2.3.46",
4
+ "version": "2.3.47",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [