vue-data-ui 2.3.45 → 2.3.46

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 (143) hide show
  1. package/dist/{Arrow-HEq-nlrw.cjs → Arrow-C45xNtet.cjs} +1 -1
  2. package/dist/{Arrow-Ctlg95U8.js → Arrow-QBHviXQB.js} +1 -1
  3. package/dist/{BaseIcon-SOUJcJNI.js → BaseIcon-Ct3EasCg.js} +1 -1
  4. package/dist/{BaseIcon-DAllT7Xd.cjs → BaseIcon-NNgCqsH0.cjs} +1 -1
  5. package/dist/{DataTable-CpDBCn7U.cjs → DataTable-BGF6x8iX.cjs} +1 -1
  6. package/dist/{DataTable-zx4eBGpA.js → DataTable-CkeQ7c6_.js} +2 -2
  7. package/dist/{Legend-Ch4wH-kK.cjs → Legend-DjuRskVd.cjs} +1 -1
  8. package/dist/{Legend-DHmy6Ryw.js → Legend-aFYc_s9T.js} +1 -1
  9. package/dist/{Shape-Va1vqZKB.cjs → Shape-BTMZlA5Q.cjs} +1 -1
  10. package/dist/{Shape-CQnpEROe.js → Shape-DoAgLIYa.js} +1 -1
  11. package/dist/{Slicer-7qUL39RL.cjs → Slicer-BCr6bV0X.cjs} +1 -1
  12. package/dist/{Slicer-CwVoKTxE.js → Slicer-I9LVm-u8.js} +1 -1
  13. package/dist/{Title-Cw7gk_b-.js → Title-D8HoSXgM.js} +1 -1
  14. package/dist/{Title-tPZ6dD7n.cjs → Title-NelrBSGO.cjs} +1 -1
  15. package/dist/{Tooltip-mwVno8dy.cjs → Tooltip-CK94hatv.cjs} +1 -1
  16. package/dist/{Tooltip-Dh7Rk7h8.js → Tooltip-DTwn_FW5.js} +1 -1
  17. package/dist/{index-BtUHRUym.js → index-C1-FJ0sT.js} +6 -2
  18. package/dist/index-CEhe8nzy.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +2 -0
  21. package/dist/types/vue-data-ui.d.ts +2 -0
  22. package/dist/{useNestedProp-dj8NfogN.js → useNestedProp-1fJhHDhT.js} +1 -1
  23. package/dist/{useNestedProp-BgiHePG5.cjs → useNestedProp-CcMb2mLY.cjs} +1 -1
  24. package/dist/{usePrinter-DWElqLH0.cjs → usePrinter-AfD8nrd2.cjs} +1 -1
  25. package/dist/{usePrinter-CG4wyZaf.js → usePrinter-B1a6uNio.js} +1 -1
  26. package/dist/{vue-data-ui-DlEHOUpL.cjs → vue-data-ui-DfYg-sm0.cjs} +1 -1
  27. package/dist/{vue-data-ui-D9OmfznV.js → vue-data-ui-DgzO0vYA.js} +57 -57
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/{vue-ui-3d-bar-vH1iEHhl.cjs → vue-ui-3d-bar-DctYjGhv.cjs} +1 -1
  31. package/dist/{vue-ui-3d-bar-BuoAlWbG.js → vue-ui-3d-bar-ikMJ_M47.js} +7 -7
  32. package/dist/{vue-ui-accordion-BN4KrzlD.js → vue-ui-accordion-BLoKd0D-.js} +3 -3
  33. package/dist/{vue-ui-accordion-CqQkjoPn.cjs → vue-ui-accordion-CS2POBdq.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-B3d0MOlW.cjs → vue-ui-age-pyramid-6GljtWMq.cjs} +1 -1
  35. package/dist/{vue-ui-age-pyramid-NwacHWds.js → vue-ui-age-pyramid-C9hzFCN4.js} +8 -8
  36. package/dist/{vue-ui-annotator-4CFg58OC.cjs → vue-ui-annotator-BFTGfEfF.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-ByXR1gL3.js → vue-ui-annotator-DgdkTVYV.js} +1 -1
  38. package/dist/{vue-ui-candlestick-BfqazfiH.js → vue-ui-candlestick-BW-okjzH.js} +9 -9
  39. package/dist/{vue-ui-candlestick-DyA-ghJ9.cjs → vue-ui-candlestick-C31d7Jvz.cjs} +1 -1
  40. package/dist/{vue-ui-carousel-table-DYsH2Yp1.js → vue-ui-carousel-table-Cw7Vpun2.js} +4 -4
  41. package/dist/{vue-ui-carousel-table-CD2K7H-l.cjs → vue-ui-carousel-table-DlFu0byl.cjs} +1 -1
  42. package/dist/{vue-ui-chestnut-ZF9-nCi_.cjs → vue-ui-chestnut-B-H0j9-6.cjs} +1 -1
  43. package/dist/{vue-ui-chestnut-SRnaEdid.js → vue-ui-chestnut-SLvSoUlS.js} +6 -6
  44. package/dist/{vue-ui-cursor-BeoGVuIZ.js → vue-ui-cursor-BnoYo8DD.js} +2 -2
  45. package/dist/{vue-ui-cursor-BeDk95cI.cjs → vue-ui-cursor-eMGHt_Cm.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-B46dE1gK.cjs → vue-ui-dashboard-BpwA8NTi.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-DXbVeu6w.js → vue-ui-dashboard-cOx4Zbit.js} +2 -2
  48. package/dist/{vue-ui-digits-B7fD81ff.cjs → vue-ui-digits-MhR768JU.cjs} +1 -1
  49. package/dist/{vue-ui-digits-DizgKes0.js → vue-ui-digits-wo7Gctkj.js} +2 -2
  50. package/dist/{vue-ui-donut-BrI09Is-.cjs → vue-ui-donut-C4bFM2ww.cjs} +1 -1
  51. package/dist/{vue-ui-donut-B5vgDoBi.js → vue-ui-donut-CABoxvoV.js} +9 -9
  52. package/dist/{vue-ui-donut-evolution-DQuNz9i2.cjs → vue-ui-donut-evolution-DzkcS9ET.cjs} +1 -1
  53. package/dist/{vue-ui-donut-evolution-C47y1eQp.js → vue-ui-donut-evolution-r6wIb3Tt.js} +9 -9
  54. package/dist/{vue-ui-dumbbell-3rDmDs-o.js → vue-ui-dumbbell-D3pvOoxP.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-DU2QkGgz.cjs → vue-ui-dumbbell-DSSBvwhU.cjs} +1 -1
  56. package/dist/{vue-ui-flow-DOZhKpWR.js → vue-ui-flow-CCMFNXxy.js} +7 -7
  57. package/dist/{vue-ui-flow-B_x2ipPe.cjs → vue-ui-flow-Cp7EQLnA.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-DlLG0xKi.js → vue-ui-galaxy-BVu0ZEeg.js} +9 -9
  59. package/dist/{vue-ui-galaxy-BesSgZcY.cjs → vue-ui-galaxy-DHXdjlQl.cjs} +1 -1
  60. package/dist/{vue-ui-gauge-8RafppPz.js → vue-ui-gauge-DRy_VLi-.js} +5 -5
  61. package/dist/{vue-ui-gauge-BxwG1Kwo.cjs → vue-ui-gauge-nnDuY2_P.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-7kvomyBv.js → vue-ui-gizmo-B8rEv-J5.js} +2 -2
  63. package/dist/{vue-ui-gizmo-BLGwCunm.cjs → vue-ui-gizmo-Bhqq90Gt.cjs} +1 -1
  64. package/dist/{vue-ui-heatmap-DrYunXgc.js → vue-ui-heatmap-CESWvx6H.js} +8 -8
  65. package/dist/{vue-ui-heatmap-Cio9d_p1.cjs → vue-ui-heatmap-DoEghJHO.cjs} +1 -1
  66. package/dist/{vue-ui-kpi-d1wsMxlV.js → vue-ui-kpi-CBH1WOLl.js} +3 -3
  67. package/dist/{vue-ui-kpi-BqaqS0Sc.cjs → vue-ui-kpi-CHrIMR-b.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-DhJ12J5b.cjs → vue-ui-mini-loader-CP5HRcth.cjs} +1 -1
  69. package/dist/{vue-ui-mini-loader-CJwfVr_M.js → vue-ui-mini-loader-YjK49sOM.js} +2 -2
  70. package/dist/{vue-ui-molecule-DxWAKzbW.cjs → vue-ui-molecule-BIuegM-N.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-Uzqk850W.js → vue-ui-molecule-CZDSsnRY.js} +9 -9
  72. package/dist/{vue-ui-mood-radar-psceCBqR.js → vue-ui-mood-radar-CcnUPS5r.js} +9 -9
  73. package/dist/{vue-ui-mood-radar-DY8gtaPz.cjs → vue-ui-mood-radar-DYTpiKG1.cjs} +1 -1
  74. package/dist/{vue-ui-nested-donuts-Bu9OL68Y.cjs → vue-ui-nested-donuts-CvPo6PIH.cjs} +1 -1
  75. package/dist/{vue-ui-nested-donuts-CFiRn0jk.js → vue-ui-nested-donuts-Dk0HSrH4.js} +9 -9
  76. package/dist/{vue-ui-onion-kPRNeXuX.js → vue-ui-onion-C93R_Klx.js} +9 -9
  77. package/dist/{vue-ui-onion-CAxDBRGS.cjs → vue-ui-onion-C_Dy0awV.cjs} +1 -1
  78. package/dist/{vue-ui-parallel-coordinate-plot-DaVxlANN.cjs → vue-ui-parallel-coordinate-plot-Do8zOqso.cjs} +1 -1
  79. package/dist/{vue-ui-parallel-coordinate-plot-CYBmGnIu.js → vue-ui-parallel-coordinate-plot-aEJjFh7V.js} +10 -10
  80. package/dist/{vue-ui-quadrant-COeLNV2o.js → vue-ui-quadrant-7zsx3EOw.js} +10 -10
  81. package/dist/{vue-ui-quadrant-D182YkSv.cjs → vue-ui-quadrant-CMP5gv34.cjs} +1 -1
  82. package/dist/{vue-ui-quick-chart-DdsSfSj4.cjs → vue-ui-quick-chart-DlKpBf-X.cjs} +1 -1
  83. package/dist/{vue-ui-quick-chart-S7bmmFTP.js → vue-ui-quick-chart-yGY2-cME.js} +6 -6
  84. package/dist/{vue-ui-radar-BjdwArGH.js → vue-ui-radar-CBAE5b_H.js} +10 -10
  85. package/dist/{vue-ui-radar-BNYp4Cvf.cjs → vue-ui-radar-FvOQWErL.cjs} +1 -1
  86. package/dist/{vue-ui-rating-Bms5i1i6.cjs → vue-ui-rating-D4ytgNsW.cjs} +1 -1
  87. package/dist/{vue-ui-rating-D3wjp0wH.js → vue-ui-rating-DCX9Hr51.js} +2 -2
  88. package/dist/{vue-ui-relation-circle-Bh_LkmOB.cjs → vue-ui-relation-circle-C0t4M_Eb.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-D49d4Zkk.js → vue-ui-relation-circle-C5uvdRCs.js} +5 -5
  90. package/dist/{vue-ui-rings-D99azl6b.cjs → vue-ui-rings-CljU3aO-.cjs} +1 -1
  91. package/dist/{vue-ui-rings-C16aSDsP.js → vue-ui-rings-Cx9I0XCp.js} +9 -9
  92. package/dist/{vue-ui-scatter-C70x1iYX.cjs → vue-ui-scatter-BkvHY89U.cjs} +1 -1
  93. package/dist/{vue-ui-scatter-DfcaiZ96.js → vue-ui-scatter-BxrCbWPm.js} +10 -10
  94. package/dist/{vue-ui-screenshot-DvDE7zxX.cjs → vue-ui-screenshot-B198lkuF.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-Bf1vsmAF.js → vue-ui-screenshot-Cf9NK_5w.js} +1 -1
  96. package/dist/{vue-ui-skeleton-BcXNZYl9.js → vue-ui-skeleton-DogpCRv2.js} +2 -2
  97. package/dist/{vue-ui-skeleton-c-ouk0AX.cjs → vue-ui-skeleton-DpqVx122.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-CLoPBQAZ.cjs → vue-ui-smiley-Hv5SONWU.cjs} +1 -1
  99. package/dist/{vue-ui-smiley-CreoeEFq.js → vue-ui-smiley-wnlpDBHn.js} +2 -2
  100. package/dist/{vue-ui-spark-trend-DUb_IRKf.cjs → vue-ui-spark-trend-DBFYuxbh.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-D_tOD4Ta.js → vue-ui-spark-trend-_STSpU0x.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-CsIEMgM0.js → vue-ui-sparkbar-B2C4gKQS.js} +3 -3
  103. package/dist/{vue-ui-sparkbar-Bsq08omU.cjs → vue-ui-sparkbar-D1OrFmz5.cjs} +1 -1
  104. package/dist/{vue-ui-sparkgauge-Ctekz6Kd.cjs → vue-ui-sparkgauge-CgX6ZpW7.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-3YzN4m6q.js → vue-ui-sparkgauge-fsJt_SRA.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-CKDuTdfc.cjs → vue-ui-sparkhistogram-CV8k8NPB.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-CjWwG7Zl.js → vue-ui-sparkhistogram-gue0JMvB.js} +4 -4
  108. package/dist/{vue-ui-sparkline-XrDJFglg.js → vue-ui-sparkline-ClFxAQkz.js} +3 -3
  109. package/dist/{vue-ui-sparkline-B91EoUVn.cjs → vue-ui-sparkline-DN7RZ5FX.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-BKKSkrnj.js → vue-ui-sparkstackbar-3D6MkgTR.js} +3 -3
  111. package/dist/{vue-ui-sparkstackbar-r0XJQN3g.cjs → vue-ui-sparkstackbar-Dxy0P3xJ.cjs} +1 -1
  112. package/dist/{vue-ui-stackbar-CL5GsQiN.cjs → vue-ui-stackbar-BY0bcCBX.cjs} +2 -2
  113. package/dist/{vue-ui-stackbar-D4J9Z7wX.js → vue-ui-stackbar-DAFHq-wh.js} +300 -299
  114. package/dist/{vue-ui-strip-plot-DsuLc5K4.js → vue-ui-strip-plot-B3ItWHyf.js} +9 -9
  115. package/dist/{vue-ui-strip-plot--P365ByW.cjs → vue-ui-strip-plot-lfB-YBkt.cjs} +1 -1
  116. package/dist/{vue-ui-table-CGrGa90U.cjs → vue-ui-table-CiksARcd.cjs} +1 -1
  117. package/dist/{vue-ui-table-DJjj6FvX.js → vue-ui-table-Dxc80GV0.js} +1 -1
  118. package/dist/{vue-ui-table-heatmap-Dql-qWPD.js → vue-ui-table-heatmap-AI2JeTUR.js} +4 -4
  119. package/dist/{vue-ui-table-heatmap-v9N0LVg3.cjs → vue-ui-table-heatmap-C_Wr83fl.cjs} +1 -1
  120. package/dist/{vue-ui-table-sparkline-LIvHkJR_.cjs → vue-ui-table-sparkline-BPYQI2Vo.cjs} +1 -1
  121. package/dist/{vue-ui-table-sparkline-C9TVGFyf.js → vue-ui-table-sparkline-D2KWAYWO.js} +5 -5
  122. package/dist/{vue-ui-thermometer-4aCLqzTu.cjs → vue-ui-thermometer-BopRBXkF.cjs} +1 -1
  123. package/dist/{vue-ui-thermometer-BEexIekI.js → vue-ui-thermometer-szsOVqgO.js} +5 -5
  124. package/dist/{vue-ui-timer-CY7pvqXf.js → vue-ui-timer-CpuqP9iZ.js} +4 -4
  125. package/dist/{vue-ui-timer-CuJ9p9tE.cjs → vue-ui-timer-Ctcaiaej.cjs} +1 -1
  126. package/dist/{vue-ui-tiremarks-D7LgNJ-Z.js → vue-ui-tiremarks-9P4vBFZV.js} +5 -5
  127. package/dist/{vue-ui-tiremarks-BCfOhCQd.cjs → vue-ui-tiremarks-Cge2TXFU.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-HRbke0i3.cjs → vue-ui-treemap-BxdorPsS.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-Dg58TlVx.js → vue-ui-treemap-CLOwIrHN.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-BmOJ8w-M.cjs → vue-ui-vertical-bar-BREOjM7U.cjs} +1 -1
  131. package/dist/{vue-ui-vertical-bar-DYHw0QLR.js → vue-ui-vertical-bar-Br8Slvab.js} +9 -9
  132. package/dist/{vue-ui-waffle-BWDLUS-8.js → vue-ui-waffle-B62b9gwj.js} +9 -9
  133. package/dist/{vue-ui-waffle-DiNMc4kF.cjs → vue-ui-waffle-CPqrsii3.cjs} +1 -1
  134. package/dist/{vue-ui-wheel-D5EMxg2C.js → vue-ui-wheel-B3Nw-ICG.js} +5 -5
  135. package/dist/{vue-ui-wheel-DSudyI0a.cjs → vue-ui-wheel-HqeFI8W9.cjs} +1 -1
  136. package/dist/{vue-ui-word-cloud-CXx7qEQS.cjs → vue-ui-word-cloud-B_W87vAs.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BcW7UgaX.js → vue-ui-word-cloud-HgAIxI93.js} +7 -7
  138. package/dist/{vue-ui-xy-JfWTcv1D.cjs → vue-ui-xy-CWQd12R4.cjs} +1 -1
  139. package/dist/{vue-ui-xy-CAJ3QM9F.js → vue-ui-xy-DpqyiCx6.js} +12 -12
  140. package/dist/{vue-ui-xy-canvas-BFRvVrf9.cjs → vue-ui-xy-canvas-5f_5ULEA.cjs} +1 -1
  141. package/dist/{vue-ui-xy-canvas-BPAwiR3E.js → vue-ui-xy-canvas-CjGlVtb_.js} +10 -10
  142. package/package.json +1 -1
  143. package/dist/index-B2yAjO70.cjs +0 -4
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-B2yAjO70.cjs"),fe=require("./useNestedProp-BgiHePG5.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),xe=require("./usePrinter-DWElqLH0.cjs"),De=require("./Slicer-7qUL39RL.cjs"),Ie=require("./Tooltip-mwVno8dy.cjs"),Ae=require("./Title-tPZ6dD7n.cjs"),He=require("./Legend-Ch4wH-kK.cjs"),qe=require("./vue-ui-accordion-CqQkjoPn.cjs"),Ue=require("./DataTable-CpDBCn7U.cjs"),We=require("./vue-ui-skeleton-c-ouk0AX.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ge=["xmlns","viewBox"],Je={key:0},Ze=["id"],Ke=["stop-color"],Qe=["stop-color"],je=["stop-color"],et=["x1","x2","y1","y2","stroke"],tt=["x1","x2","y1","y2","stroke"],at=["x1","x2","y1","y2","stroke"],lt=["x1","x2","y1","y2","stroke"],ot=["x","y","height","rx","width","fill","stroke","stroke-width"],rt=["x","y","width","rx","height","fill","stroke","stroke-width"],st=["x1","x2","y1","y2","stroke","stroke-width"],nt=["x1","x2","y1","y2","stroke","stroke-width"],it=["x","y","font-size","fill","font-weight"],ut=["transform","font-size","fill","font-weight"],ct=["x","y","font-size","fill","font-weight"],dt={key:0},vt=["x","y","font-size","font-weight","fill"],ht=["x","y","font-size","fill","font-weight"],mt={key:0},gt=["x","y","font-size","font-weight","fill"],yt=["x1","x2","y1","y2","stroke"],bt=["x","y","font-size","font-weight","fill"],pt=["x1","x2","y1","y2","stroke"],ft=["font-size","font-weight","fill","text-anchor","transform"],kt=["text-anchor","font-size","font-weight","fill","transform"],xt=["font-size","font-weight","fill","x","y"],wt=["x","y","width","height","onClick","onMouseenter","fill"],Ct=["x","y","width","height","onClick","onMouseenter","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Lt=["onClick"],St=["innerHTML"],zt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(Y,{expose:we,emit:G}){const w=Y,{vue_ui_stackbar:Ce}=c.useConfig(),E=e.computed({get(){return!!w.dataset&&w.dataset.length},set(l){return l}}),$=e.ref(null),U=e.ref(c.createUid()),O=e.ref(!1),J=e.ref(null),W=e.ref(""),y=e.ref([]),Z=e.ref(0),K=e.ref(null),Q=e.ref(null),j=e.ref(null),ee=e.ref(0),X=e.ref(!1),T=e.ref(null),V=e.ref(!1);e.onMounted(()=>{c.objectIsEmpty(w.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):w.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{V.value=!0},10)});const t=e.computed(()=>{const l=fe.useNestedProp({userConfig:w.config,defaultConfig:Ce});return l.theme?{...fe.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||w.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:l}),g=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:te,isImaging:ae,generatePdf:le,generateImage:oe}=xe.usePrinter({elementId:`stackbar_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Be=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),re=e.ref(null),se=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const l=ke.throttle(()=>{V.value=!1;const{width:r,height:a}=ke.useResponsive({chart:$.value,title:t.value.style.chart.title.text?K.value:null,legend:t.value.style.chart.legend.show?Q.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?j.value:null});D.value.width=r,D.value.height=a,clearTimeout(se.value),se.value=setTimeout(()=>{V.value=!0},10)});re.value=new ResizeObserver(l),re.value.observe($.value.parentNode)}});const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,b=t.value.style.chart.padding.left,S=r-b-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:b,width:S,height:z<0?0:z}}),B=e.computed(()=>w.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Be.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!y.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...w.dataset.map(l=>l.series.length))});function Le(){u.value={start:0,end:Math.max(...w.dataset.map(l=>l.series.length))},ee.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),F=e.computed(()=>c.sumSeries(B.value.filter(l=>!y.value.includes(l.id))).slice(u.value.start,u.value.end)),Se=e.computed(()=>c.sumSeries(B.value.filter(l=>!y.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!y.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),x=e.computed(()=>{const l=Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),M=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),m=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),b=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=c.calculateNiceScale(b>0?0:b,n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,p=s.value.height,q=s.value.width,be=x.value[0]?x.value[0].zero:s.value.bottom,pe=x.value[0]?x.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!y.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),$e=R.signedSeries.slice(u.value.start,u.value.end),Te=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Ve=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Fe=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;let N,k;return v>0?(k=p*f,N=be-k-l[h],l[h]+=k):(k=p*f,N=be+a[h],a[h]+=Math.abs(k)),N}),Me=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;let N,k;return v>0?(k=q*f,N=pe+r[h],r[h]+=k):(k=q*f,N=pe-Math.abs(k)-o[h],o[h]+=Math.abs(k)),N}),Pe=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;return v>0?p*f:p*Math.abs(f)}),Re=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;return v>0?q*f:q*Math.abs(f)}),Oe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/Oe),series:C,signedSeries:$e,x:Te,y:Fe,height:Pe,horizontal_width:Re,horizontal_y:Ve,horizontal_x:Me}})}),ne=e.computed(()=>Se.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ie(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ue(l){const r=JSON.parse(JSON.stringify(m.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));G("selectDatapoint",{datapoint:r,period:M.value[l]})}function ce(l){T.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(m.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:m.value,config:t.value})))W.value=r({seriesIndex:l,datapoint:a,series:m.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:b,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";M.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${b};padding-bottom:6px;margin-bottom:3px;">${M.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(p=>{P+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-CEhe8nzy.cjs"),pe=require("./useNestedProp-CcMb2mLY.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),xe=require("./usePrinter-AfD8nrd2.cjs"),De=require("./Slicer-BCr6bV0X.cjs"),Ie=require("./Tooltip-CK94hatv.cjs"),Ae=require("./Title-NelrBSGO.cjs"),He=require("./Legend-DjuRskVd.cjs"),qe=require("./vue-ui-accordion-CS2POBdq.cjs"),We=require("./DataTable-BGF6x8iX.cjs"),Ue=require("./vue-ui-skeleton-DpqVx122.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ge=["xmlns","viewBox"],Je={key:0},Ze=["id"],Ke=["stop-color"],Qe=["stop-color"],je=["stop-color"],et=["x1","x2","y1","y2","stroke"],tt=["x1","x2","y1","y2","stroke"],at=["x1","x2","y1","y2","stroke"],lt=["x1","x2","y1","y2","stroke"],ot=["x","y","height","rx","width","fill","stroke","stroke-width"],rt=["x","y","width","rx","height","fill","stroke","stroke-width"],st=["x1","x2","y1","y2","stroke","stroke-width"],nt=["x1","x2","y1","y2","stroke","stroke-width"],it=["x","y","font-size","fill","font-weight"],ut=["transform","font-size","fill","font-weight"],ct=["x","y","font-size","fill","font-weight"],dt={key:0},vt=["x","y","font-size","font-weight","fill"],ht=["x","y","font-size","fill","font-weight"],gt={key:0},yt=["x","y","font-size","font-weight","fill"],mt=["x1","x2","y1","y2","stroke"],bt=["x","y","font-size","font-weight","fill"],ft=["x1","x2","y1","y2","stroke"],pt=["font-size","font-weight","fill","text-anchor","transform"],kt=["text-anchor","font-size","font-weight","fill","transform"],xt=["font-size","font-weight","fill","x","y"],wt=["x","y","width","height","onClick","onMouseenter","fill"],Ct=["x","y","width","height","onClick","onMouseenter","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Lt=["onClick"],St=["innerHTML"],zt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(Y,{expose:we,emit:G}){const y=Y,{vue_ui_stackbar:Ce}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),J=e.ref(null),U=e.ref(""),f=e.ref([]),Z=e.ref(0),K=e.ref(null),Q=e.ref(null),j=e.ref(null),ee=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1);e.onMounted(()=>{c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10)});const t=e.computed(()=>{const l=pe.useNestedProp({userConfig:y.config,defaultConfig:Ce});let r={};return l.theme?r={...pe.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}),b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:te,isImaging:ae,generatePdf:le,generateImage:oe}=xe.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Be=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),re=e.ref(null),se=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const l=ke.throttle(()=>{T.value=!1;const{width:r,height:a}=ke.useResponsive({chart:M.value,title:t.value.style.chart.title.text?K.value:null,legend:t.value.style.chart.legend.show?Q.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?j.value:null});D.value.width=r,D.value.height=a,clearTimeout(se.value),se.value=setTimeout(()=>{T.value=!0},10)});re.value=new ResizeObserver(l),re.value.observe(M.value.parentNode)}});const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Be.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!f.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function Le(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},ee.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!f.value.includes(l.id))).slice(u.value.start,u.value.end)),Se=e.computed(()=>c.sumSeries(B.value.filter(l=>!f.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!f.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,p=s.value.height,q=s.value.width,be=w.value[0]?w.value[0].zero:s.value.bottom,fe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!f.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Me=R.signedSeries.slice(u.value.start,u.value.end),$e=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Te=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Ve=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=p*k,N=be-x-l[h],l[h]+=x):(x=p*k,N=be+a[h],a[h]+=Math.abs(x)),N}),Fe=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=fe+r[h],r[h]+=x):(x=q*k,N=fe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Pe=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?p*k:p*Math.abs(k)}),Re=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),Oe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/Oe),series:C,signedSeries:Me,x:$e,y:Ve,height:Pe,horizontal_width:Re,horizontal_y:Te,horizontal_x:Fe}})}),ne=e.computed(()=>Se.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ie(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ue(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));G("selectDatapoint",{datapoint:r,period:F.value[l]})}function ce(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(p=>{P+=`
2
2
  <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
3
3
  <svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${p.id})`:p.color}"/></svg>
4
4
  ${p.name}${n||i?":":""} ${n?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:p.value,s:t.value.style.chart.bars.dataLabels.suffix,r:S}):""} ${_[0]}${i?c.dataLabel({v:isNaN(p.value/o)?0:Math.abs(p.value)/o*100,s:"%",r:z}):""}${_[1]}
5
5
  </div>
6
- `}),W.value=`<div>${P}</div>`}}function ze(l){X.value=l,Z.value+=1}function de(){g.value.showTable=!g.value.showTable}function ve(){g.value.dataLabels.show=!g.value.dataLabels.show}function he(){g.value.showTooltip=!g.value.showTooltip}function _e(){return m.value}const me=e.computed(()=>{if(m.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=m.value.map(({name:a,color:o})=>({label:a,color:o})),r=[];for(let a=u.value.start;a<u.value.end;a+=1){const o=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];B.value.forEach(n=>{o.push(Number((n.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),r.push(o)}return{head:l,body:r}});function ge(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=["",...me.value.head.map(i=>i.label)],a=me.value.body,o=l.concat([r]).concat(a),n=c.createCsvContent(o);c.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const H=e.computed(()=>{const l=[""].concat(m.value.map(n=>n.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 r=[];for(let n=0;n<L.value;n+=1){const i=m.value.map(b=>b.series[n]??0).reduce((b,S)=>b+S,0);r.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[n]??n+1].concat(m.value.map(b=>(b.series[n]??0).toFixed(t.value.table.td.roundingValue))).concat((i??0).toFixed(t.value.table.td.roundingValue)))}const a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.period].concat(m.value.map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:l,body:r.slice(0,u.value.end-u.value.start),config:a,colNames:o}});function Ne(l,r){if(G("selectLegend",m.value.find(a=>a.absoluteIndex===l)),y.value.includes(r.id))y.value=y.value.filter(a=>a!==r.id);else{if(y.value.length===B.value.length-1)return;y.value.push(r.id)}}const ye=e.computed(()=>B.value.map((l,r)=>({...l,shape:"square"})).map(l=>({...l,opacity:y.value.includes(l.id)?.5:1,segregate:()=>Ne(l.absoluteIndex,l),isSegregated:y.value.includes(l.id)}))),Ee=e.computed(()=>({cy:"stackbar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));return we({getData:_e,generatePdf:le,generateCsv:ge,generateImage:oe,toggleTable:de,toggleLabels:ve,toggleTooltip:he}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${U.value}`,ref_key:"stackbarChart",ref:$,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":X.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:K,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Ae._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(xe.UserOptions,{ref:"details",key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(ae),uid:U.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,chartElement:$.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:ze,onGeneratePdf:e.unref(le),onGenerateCsv:ge,onGenerateImage:e.unref(oe),onToggleTable:de,onToggleLabels:ve,onToggleTooltip:he},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),viewBox:`0 0 ${s.value.chartWidth<=0?10:s.value.chartWidth} ${s.value.chartHeight<=0?10:s.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,Ke),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(c.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,je)],8,Ze))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,et))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:s.value.top+d.value*o,y2:s.value.top+d.value*o,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,tt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left+d.value*o,x2:s.value.left+d.value*o,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,at))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,lt))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.y[i]<0?0:a.y[i],height:a.height[i]<0?1e-4:a.height[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":V.value})},null,10,ot))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.horizontal_y[i]<0?0:a.horizontal_y[i],width:a.horizontal_width[i]<0?1e-4:a.horizontal_width[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":V.value})},null,10,rt))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:5,x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,st)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:6,x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,nt)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:s.value.left+s.value.width/2,y:s.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,it)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top+s.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,ut)):e.createCommentVNode("",!0),g.value.dataLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[i]+a.height[i]/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ie(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ct))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&m.value.length>1?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.left+d.value*o+d.value/2,y:s.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,vt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),g.value.dataLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+(a.horizontal_width[i]<0?1e-4:a.horizontal_width[i])/2,y:a.horizontal_y[i]+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ie(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ht))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&m.value.length>1?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.right+t.value.style.chart.bars.totalValues.fontSize/3,y:s.value.top+d.value*o+d.value/2,"text-anchor":"start","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,gt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,bt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.bottom,y2:s.value.bottom+6,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,pt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${a.horizontal_x}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,ft))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:13},e.renderList(M.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,kt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:14},e.renderList(M.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3},e.toDisplayString(a),9,xt))),256)):e.createCommentVNode("",!0),g.value.showTooltip&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:15},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+o*d.value,y:s.value.top,width:d.value,height:s.value.height<0?0:s.value.height,onClick:n=>ue(o),onMouseenter:n=>ce(o),onMouseleave:r[0]||(r[0]=n=>{T.value=null,O.value=!1}),fill:o===T.value?t.value.style.chart.highlighter.color+e.unref(c.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,wt))),256)):e.createCommentVNode("",!0),g.value.showTooltip&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left,y:s.value.top+o*d.value,width:s.value.width<0?0:s.value.width,height:d.value,onClick:n=>ue(o),onMouseenter:n=>ce(o),onMouseleave:r[1]||(r[1]=n=>{T.value=null,O.value=!1}),fill:o===T.value?t.value.style.chart.highlighter.color+e.unref(c.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,Ct))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...s.value})),void 0,!0)],12,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:j,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&L.value>1?(e.openBlock(),e.createBlock(De.Slicer,{key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[u.value.start]?t.value.style.chart.grid.x.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...Y.dataset.map(a=>a.series.length)),min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":r[2]||(r[2]=a=>u.value.start=a),end:u.value.end,"onUpdate:end":r[3]||(r[3]=a=>u.value.end=a),onReset:Le},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(Ie._sfc_main,{show:g.value.showTooltip&&O.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:W.value,isCustom:e.unref(c.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:Q},[t.value.style.chart.legend.show&&E.value?(e.openBlock(),e.createBlock(He.Legend,{key:0,legendSet:ye.value,config:Ee.value,onClickMarker:r[4]||(r[4]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Lt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:ye.value},void 0,!0)],512),u.value.end-u.value.start<200?(e.openBlock(),e.createBlock(qe.default,{key:5,hideDetails:"",config:{open:g.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(Ue.DataTable,{colNames:H.value.colNames,head:H.value.head,body:H.value.body,config:H.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=a=>g.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,St)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ye))}},_t=Xe._export_sfc(zt,[["__scopeId","data-v-31c32788"]]);exports.default=_t;
6
+ `}),U.value=`<div>${P}</div>`}}function ze(l){X.value=l,Z.value+=1}function de(){b.value.showTable=!b.value.showTable}function ve(){b.value.dataLabels.show=!b.value.dataLabels.show}function he(){b.value.showTooltip=!b.value.showTooltip}function _e(){return g.value}const ge=e.computed(()=>{if(g.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=g.value.map(({name:a,color:o})=>({label:a,color:o})),r=[];for(let a=u.value.start;a<u.value.end;a+=1){const o=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];B.value.forEach(n=>{o.push(Number((n.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),r.push(o)}return{head:l,body:r}});function ye(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=["",...ge.value.head.map(i=>i.label)],a=ge.value.body,o=l.concat([r]).concat(a),n=c.createCsvContent(o);c.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const H=e.computed(()=>{const l=[""].concat(g.value.map(n=>n.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 r=[];for(let n=0;n<L.value;n+=1){const i=g.value.map(m=>m.series[n]??0).reduce((m,S)=>m+S,0);r.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[n]??n+1].concat(g.value.map(m=>(m.series[n]??0).toFixed(t.value.table.td.roundingValue))).concat((i??0).toFixed(t.value.table.td.roundingValue)))}const a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.period].concat(g.value.map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:l,body:r.slice(0,u.value.end-u.value.start),config:a,colNames:o}});function Ne(l,r){if(G("selectLegend",g.value.find(a=>a.absoluteIndex===l)),f.value.includes(r.id))f.value=f.value.filter(a=>a!==r.id);else{if(f.value.length===B.value.length-1)return;f.value.push(r.id)}}const me=e.computed(()=>B.value.map((l,r)=>({...l,shape:"square"})).map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>Ne(l.absoluteIndex,l),isSegregated:f.value.includes(l.id)}))),Ee=e.computed(()=>({cy:"stackbar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));return we({getData:_e,generatePdf:le,generateCsv:ye,generateImage:oe,toggleTable:de,toggleLabels:ve,toggleTooltip:he}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${W.value}`,ref_key:"stackbarChart",ref:M,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":X.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:K,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Ae._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(xe.UserOptions,{ref:"details",key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(ae),uid:W.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,chartElement:M.value,isTooltip:b.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:ze,onGeneratePdf:e.unref(le),onGenerateCsv:ye,onGenerateImage:e.unref(oe),onToggleTable:de,onToggleLabels:ve,onToggleTooltip:he},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),viewBox:`0 0 ${s.value.chartWidth<=0?10:s.value.chartWidth} ${s.value.chartHeight<=0?10:s.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,Ke),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(c.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,je)],8,Ze))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,et))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:s.value.top+d.value*o,y2:s.value.top+d.value*o,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,tt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left+d.value*o,x2:s.value.left+d.value*o,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,at))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,lt))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.y[i]<0?0:a.y[i],height:a.height[i]<0?1e-4:a.height[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":T.value})},null,10,ot))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.horizontal_y[i]<0?0:a.horizontal_y[i],width:a.horizontal_width[i]<0?1e-4:a.horizontal_width[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":T.value})},null,10,rt))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:5,x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,st)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:6,x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,nt)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:s.value.left+s.value.width/2,y:s.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,it)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top+s.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,ut)):e.createCommentVNode("",!0),b.value.dataLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[i]+a.height[i]/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ie(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ct))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.left+d.value*o+d.value/2,y:s.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,vt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value.dataLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+(a.horizontal_width[i]<0?1e-4:a.horizontal_width[i])/2,y:a.horizontal_y[i]+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ie(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ht))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.right+t.value.style.chart.bars.totalValues.fontSize/3,y:s.value.top+d.value*o+d.value/2,"text-anchor":"start","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,yt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,mt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,bt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.bottom,y2:s.value.bottom+6,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,ft))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${a.horizontal_x}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,pt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:13},e.renderList(F.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,kt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:14},e.renderList(F.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3},e.toDisplayString(a),9,xt))),256)):e.createCommentVNode("",!0),b.value.showTooltip&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:15},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+o*d.value,y:s.value.top,width:d.value,height:s.value.height<0?0:s.value.height,onClick:n=>ue(o),onMouseenter:n=>ce(o),onMouseleave:r[0]||(r[0]=n=>{$.value=null,O.value=!1}),fill:o===$.value?t.value.style.chart.highlighter.color+e.unref(c.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,wt))),256)):e.createCommentVNode("",!0),b.value.showTooltip&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left,y:s.value.top+o*d.value,width:s.value.width<0?0:s.value.width,height:d.value,onClick:n=>ue(o),onMouseenter:n=>ce(o),onMouseleave:r[1]||(r[1]=n=>{$.value=null,O.value=!1}),fill:o===$.value?t.value.style.chart.highlighter.color+e.unref(c.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,Ct))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...s.value})),void 0,!0)],12,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:j,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&L.value>1?(e.openBlock(),e.createBlock(De.Slicer,{key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[u.value.start]?t.value.style.chart.grid.x.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...Y.dataset.map(a=>a.series.length)),min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":r[2]||(r[2]=a=>u.value.start=a),end:u.value.end,"onUpdate:end":r[3]||(r[3]=a=>u.value.end=a),onReset:Le},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(Ie._sfc_main,{show:b.value.showTooltip&&O.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:M.value,content:U.value,isCustom:e.unref(c.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:Q},[t.value.style.chart.legend.show&&E.value?(e.openBlock(),e.createBlock(He.Legend,{key:0,legendSet:me.value,config:Ee.value,onClickMarker:r[4]||(r[4]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Lt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:me.value},void 0,!0)],512),u.value.end-u.value.start<200?(e.openBlock(),e.createBlock(qe.default,{key:5,hideDetails:"",config:{open:b.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(We.DataTable,{colNames:H.value.colNames,head:H.value.head,body:H.value.body,config:H.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=a=>b.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,St)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ye))}},_t=Xe._export_sfc(zt,[["__scopeId","data-v-6f134df9"]]);exports.default=_t;