vue-data-ui 2.3.39 → 2.3.40

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 (144) hide show
  1. package/dist/{Arrow-gLWBasXL.cjs → Arrow-CcJ2U3U0.cjs} +1 -1
  2. package/dist/{Arrow-B0RusPlY.js → Arrow-DHJ0seDm.js} +1 -1
  3. package/dist/{BaseIcon-E5xGjSQn.js → BaseIcon-D7REqiel.js} +1 -1
  4. package/dist/{BaseIcon-Cfy7hUAu.cjs → BaseIcon-Durv5g7g.cjs} +1 -1
  5. package/dist/{DataTable-D7JJfjpO.cjs → DataTable-Di-7_6Aq.cjs} +1 -1
  6. package/dist/{DataTable-CcVgHrwx.js → DataTable-xRoJJLCK.js} +2 -2
  7. package/dist/{Legend-BPGeRVxf.js → Legend-DFjWlPTO.js} +1 -1
  8. package/dist/{Legend-BDgAlEzL.cjs → Legend-DHtuLr86.cjs} +1 -1
  9. package/dist/{Shape-DnfO-k8Q.js → Shape-Cnsn1U1B.js} +1 -1
  10. package/dist/{Shape-DDEKu71I.cjs → Shape-dOTW06jG.cjs} +1 -1
  11. package/dist/{Slicer-BhktgQpC.cjs → Slicer-B-Doztix.cjs} +1 -1
  12. package/dist/{Slicer-Dr5g4_di.js → Slicer-CdoJYj--.js} +1 -1
  13. package/dist/{Title-BngFmPpq.cjs → Title-CUD-K-0i.cjs} +1 -1
  14. package/dist/{Title-DJW7JJGo.js → Title-WVL1w90F.js} +1 -1
  15. package/dist/{Tooltip-pvQzx3z4.js → Tooltip-B5_8pR7S.js} +1 -1
  16. package/dist/{Tooltip-ztxY4WiA.cjs → Tooltip-CdjFc0lT.cjs} +1 -1
  17. package/dist/{index-CQyrBpOX.js → index-CLohkSjv.js} +543 -518
  18. package/dist/index-Clt49H-j.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +28 -17
  21. package/dist/types/vue-data-ui.d.ts +28 -17
  22. package/dist/{useNestedProp-CK_S9Ya9.js → useNestedProp-BsIUgLPI.js} +1 -1
  23. package/dist/{useNestedProp-DJwc68Re.cjs → useNestedProp-y541YeYg.cjs} +1 -1
  24. package/dist/{usePrinter-THxtdQMP.cjs → usePrinter-B9AbYwAC.cjs} +1 -1
  25. package/dist/{usePrinter-BJn_Etby.js → usePrinter-CLjymPxw.js} +1 -1
  26. package/dist/{vue-data-ui-gHSCvnDy.cjs → vue-data-ui-8vGw_xvX.cjs} +1 -1
  27. package/dist/{vue-data-ui-9yG_ZuXl.js → vue-data-ui-R6Kj9vzU.js} +57 -57
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +4 -4
  30. package/dist/{vue-ui-3d-bar-6G46Xaar.cjs → vue-ui-3d-bar-D_SoQlA7.cjs} +1 -1
  31. package/dist/{vue-ui-3d-bar-BqL1MhRd.js → vue-ui-3d-bar-tGkaU8fG.js} +7 -7
  32. package/dist/{vue-ui-accordion-DqRnuig6.js → vue-ui-accordion-B6lUgTu6.js} +3 -3
  33. package/dist/{vue-ui-accordion-BDkYau8u.cjs → vue-ui-accordion-Czitboqc.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-BPyJ5l9B.cjs → vue-ui-age-pyramid-CN27TQYe.cjs} +1 -1
  35. package/dist/{vue-ui-age-pyramid-IRh5kfKI.js → vue-ui-age-pyramid-yJgEO7Ur.js} +8 -8
  36. package/dist/{vue-ui-annotator-CS2-dXB1.cjs → vue-ui-annotator-BByjovvv.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-BlxLsUao.js → vue-ui-annotator-k8KyQmMk.js} +1 -1
  38. package/dist/{vue-ui-candlestick-bqMr_UNG.js → vue-ui-candlestick-ClOsAfCQ.js} +9 -9
  39. package/dist/{vue-ui-candlestick-D6iWs_w-.cjs → vue-ui-candlestick-DjwGhojD.cjs} +1 -1
  40. package/dist/{vue-ui-carousel-table-BmR6Xj7Q.cjs → vue-ui-carousel-table-nZYD_4Jp.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-BPbrMmZ5.js → vue-ui-carousel-table-xdb3tSHu.js} +4 -4
  42. package/dist/{vue-ui-chestnut-BlhoOgtt.js → vue-ui-chestnut-CKSdf5Wx.js} +6 -6
  43. package/dist/{vue-ui-chestnut-lh4q8a6L.cjs → vue-ui-chestnut-CQrFwjq4.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-DwilivV-.js → vue-ui-cursor-B4fFZ1Xh.js} +2 -2
  45. package/dist/{vue-ui-cursor-BWUNJ2kc.cjs → vue-ui-cursor-R-_LJ7BC.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-BCeu5EHs.cjs → vue-ui-dashboard-BGgb7Ylt.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-B1EdqIcE.js → vue-ui-dashboard-DkYbzLSj.js} +2 -2
  48. package/dist/{vue-ui-digits-DqGz7C40.cjs → vue-ui-digits-DdKxR0He.cjs} +1 -1
  49. package/dist/{vue-ui-digits-YOnGoYnu.js → vue-ui-digits-Lq_MZu0_.js} +2 -2
  50. package/dist/{vue-ui-donut-Crhz1o2x.cjs → vue-ui-donut-C5benoAI.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-irJ5g-tB.cjs → vue-ui-donut-evolution-C2nM8AVm.cjs} +1 -1
  52. package/dist/{vue-ui-donut-evolution-CGBLKyts.js → vue-ui-donut-evolution-D_b9hPYy.js} +9 -9
  53. package/dist/{vue-ui-donut-DJ3z2Uyy.js → vue-ui-donut-qzmnXplU.js} +9 -9
  54. package/dist/{vue-ui-dumbbell-YiLDRgnr.js → vue-ui-dumbbell-BTbPNzqx.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-C7lYqtns.cjs → vue-ui-dumbbell-C94N1mry.cjs} +1 -1
  56. package/dist/{vue-ui-flow-B7nJzAUa.js → vue-ui-flow-C8jT8any.js} +7 -7
  57. package/dist/{vue-ui-flow-C5XhyO1a.cjs → vue-ui-flow-CkZtvF7p.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-CkiIGplF.cjs → vue-ui-galaxy-DZKVmKTf.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-CXiYVwzF.js → vue-ui-galaxy-DuA4MPUu.js} +9 -9
  60. package/dist/{vue-ui-gauge-DQdwIuYM.js → vue-ui-gauge-CujXhTuR.js} +5 -5
  61. package/dist/{vue-ui-gauge-Box-ij8Z.cjs → vue-ui-gauge-DBhAo4ED.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-lQ-JQuH5.cjs → vue-ui-gizmo-BsxB_JfW.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-yMLEUprK.js → vue-ui-gizmo-DlWB95Xv.js} +2 -2
  64. package/dist/{vue-ui-heatmap-D9uCI4vM.cjs → vue-ui-heatmap-B6MbT38S.cjs} +1 -1
  65. package/dist/{vue-ui-heatmap-DdolYuul.js → vue-ui-heatmap-DlDIlSK-.js} +8 -8
  66. package/dist/{vue-ui-kpi-Db-iLGIK.js → vue-ui-kpi-C0kZxq3K.js} +3 -3
  67. package/dist/{vue-ui-kpi-CcufgDrC.cjs → vue-ui-kpi-CaqMEHto.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-CxJ-z9rE.cjs → vue-ui-mini-loader-DGVlizno.cjs} +1 -1
  69. package/dist/{vue-ui-mini-loader-B5ZAVomk.js → vue-ui-mini-loader-DfiHD95x.js} +2 -2
  70. package/dist/{vue-ui-molecule-C2m9xcdx.cjs → vue-ui-molecule-BTtAYDlx.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-DjClBVrK.js → vue-ui-molecule-MmZA7D4v.js} +9 -9
  72. package/dist/{vue-ui-mood-radar-CE3utSmC.cjs → vue-ui-mood-radar-C-qaQqJf.cjs} +1 -1
  73. package/dist/{vue-ui-mood-radar-UN10Owti.js → vue-ui-mood-radar-DRHMkdU1.js} +9 -9
  74. package/dist/{vue-ui-nested-donuts-DUytF3gU.js → vue-ui-nested-donuts-BZV-PTLD.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-iXADllgD.cjs → vue-ui-nested-donuts-BkpZgLg7.cjs} +1 -1
  76. package/dist/{vue-ui-onion-D5nX9TfZ.js → vue-ui-onion-Bpw8RJ7Y.js} +9 -9
  77. package/dist/{vue-ui-onion-BUI2Pkue.cjs → vue-ui-onion-C4OvOsH0.cjs} +1 -1
  78. package/dist/{vue-ui-parallel-coordinate-plot-CXOgpfTc.js → vue-ui-parallel-coordinate-plot-Bf64Wi3u.js} +10 -10
  79. package/dist/{vue-ui-parallel-coordinate-plot-q1BCGfqt.cjs → vue-ui-parallel-coordinate-plot-yFikaAWJ.cjs} +1 -1
  80. package/dist/{vue-ui-quadrant-g-zHilV9.cjs → vue-ui-quadrant-BVHTFKxd.cjs} +1 -1
  81. package/dist/{vue-ui-quadrant-BF2MCegC.js → vue-ui-quadrant-CmCcySxg.js} +10 -10
  82. package/dist/{vue-ui-quick-chart-zvfAdour.js → vue-ui-quick-chart-Cml1Twya.js} +6 -6
  83. package/dist/{vue-ui-quick-chart-Ca-2xvNg.cjs → vue-ui-quick-chart-DrZwV4mI.cjs} +1 -1
  84. package/dist/{vue-ui-radar-BjPOMUF0.cjs → vue-ui-radar-DE3BMdwV.cjs} +1 -1
  85. package/dist/{vue-ui-radar-CzEW9PsS.js → vue-ui-radar-DP1EuYGX.js} +10 -10
  86. package/dist/{vue-ui-rating-BjmKc3wq.js → vue-ui-rating-BkYeHWvl.js} +2 -2
  87. package/dist/{vue-ui-rating-BNg7w51y.cjs → vue-ui-rating-RbXEpR6a.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-DA3hM60W.cjs → vue-ui-relation-circle-Dx2XZJS8.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-BJJ7raSa.js → vue-ui-relation-circle-VO7PJR9n.js} +5 -5
  90. package/dist/{vue-ui-rings-DB7ZLrAT.cjs → vue-ui-rings-B-t-1DXJ.cjs} +1 -1
  91. package/dist/{vue-ui-rings-bHA_aSSF.js → vue-ui-rings-DxG6p7tF.js} +9 -9
  92. package/dist/{vue-ui-scatter-B6SJj98H.js → vue-ui-scatter-BRrsv69b.js} +10 -10
  93. package/dist/{vue-ui-scatter-HNeVup0c.cjs → vue-ui-scatter-ctKFC1hB.cjs} +1 -1
  94. package/dist/{vue-ui-screenshot-BiiJxMC8.js → vue-ui-screenshot-BBoHtZtA.js} +1 -1
  95. package/dist/{vue-ui-screenshot-k4Or7u-C.cjs → vue-ui-screenshot-DD0WkpyV.cjs} +1 -1
  96. package/dist/{vue-ui-skeleton-CjYyI3Lv.js → vue-ui-skeleton-Cu-FCvsL.js} +2 -2
  97. package/dist/{vue-ui-skeleton-DYdGA7uQ.cjs → vue-ui-skeleton-Gizw7vdX.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-ByuyPzc9.cjs → vue-ui-smiley-L7yruIOu.cjs} +1 -1
  99. package/dist/{vue-ui-smiley-UjJLCUmA.js → vue-ui-smiley-NkuQEkp8.js} +2 -2
  100. package/dist/{vue-ui-spark-trend-D0PCBdx2.cjs → vue-ui-spark-trend-DcBzFhgb.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-BLRiuWa6.js → vue-ui-spark-trend-MaSpDNrO.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-lF45jZmU.js → vue-ui-sparkbar-B7THOIRm.js} +3 -3
  103. package/dist/{vue-ui-sparkbar-TZC1RhBk.cjs → vue-ui-sparkbar-Dok2sQZ3.cjs} +1 -1
  104. package/dist/{vue-ui-sparkgauge-BBDYAjXD.cjs → vue-ui-sparkgauge-C4Edaz_0.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-BV0puE5M.js → vue-ui-sparkgauge-CJNO8fex.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-vCVdP_Vp.cjs → vue-ui-sparkhistogram-CDuYk_7N.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-0M-yChB2.js → vue-ui-sparkhistogram-DRsRAvI7.js} +4 -4
  108. package/dist/{vue-ui-sparkline-Cxmg-Mpb.js → vue-ui-sparkline-CfsK5XqX.js} +3 -3
  109. package/dist/{vue-ui-sparkline-mn0nDWC2.cjs → vue-ui-sparkline-KOF_6Pig.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-CKCZgV0u.cjs → vue-ui-sparkstackbar-Bd4BF7Ij.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-Dw9Bhm6u.js → vue-ui-sparkstackbar-BzvGezvJ.js} +3 -3
  112. package/dist/{vue-ui-stackbar-P-SgetqL.js → vue-ui-stackbar-0rdD887I.js} +10 -10
  113. package/dist/{vue-ui-stackbar-DH5EbkWA.cjs → vue-ui-stackbar-DXvxtOmc.cjs} +1 -1
  114. package/dist/{vue-ui-strip-plot-B4L64D2e.js → vue-ui-strip-plot-CynA1j2D.js} +9 -9
  115. package/dist/{vue-ui-strip-plot-DD1KLWvq.cjs → vue-ui-strip-plot-DRTrhZ9F.cjs} +1 -1
  116. package/dist/{vue-ui-table-B8VYN1DQ.cjs → vue-ui-table-DtaMAj7u.cjs} +1 -1
  117. package/dist/{vue-ui-table-heatmap-CvTl-kYk.js → vue-ui-table-heatmap-BDZuT9Qz.js} +4 -4
  118. package/dist/{vue-ui-table-heatmap-CTq6J5BC.cjs → vue-ui-table-heatmap-BO7xu77L.cjs} +1 -1
  119. package/dist/{vue-ui-table-DKlWL1sg.js → vue-ui-table-sVGjMZTH.js} +1 -1
  120. package/dist/{vue-ui-table-sparkline-BOmWrdlg.js → vue-ui-table-sparkline-BYv7kseR.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-BXem0A7t.cjs → vue-ui-table-sparkline-DSztHLaA.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-BsuH7l6d.js → vue-ui-thermometer-1CmzRurR.js} +5 -5
  123. package/dist/{vue-ui-thermometer-BDnoT676.cjs → vue-ui-thermometer-DDL90Qop.cjs} +1 -1
  124. package/dist/{vue-ui-timer-FXG91zBm.cjs → vue-ui-timer-CqmIqHeg.cjs} +1 -1
  125. package/dist/{vue-ui-timer-CqLYv7at.js → vue-ui-timer-DLf6i56p.js} +4 -4
  126. package/dist/{vue-ui-tiremarks-CT7yMfna.cjs → vue-ui-tiremarks-BxfUFX-N.cjs} +1 -1
  127. package/dist/{vue-ui-tiremarks-B2jU97U6.js → vue-ui-tiremarks-r7bGmMg-.js} +5 -5
  128. package/dist/{vue-ui-treemap-rOLqWnMD.cjs → vue-ui-treemap-Bs4erg0I.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-DSdNtVRs.js → vue-ui-treemap-Da1vOiTg.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-_ZuU0A54.js → vue-ui-vertical-bar-ByBJTeg-.js} +9 -9
  131. package/dist/{vue-ui-vertical-bar-DJBOce-a.cjs → vue-ui-vertical-bar-Cd4AmrnX.cjs} +1 -1
  132. package/dist/{vue-ui-waffle-BzKAYW6F.cjs → vue-ui-waffle-BEP6xNLO.cjs} +1 -1
  133. package/dist/{vue-ui-waffle-CKp48kdM.js → vue-ui-waffle-CHtCkZjz.js} +9 -9
  134. package/dist/{vue-ui-wheel-6FFJt53W.cjs → vue-ui-wheel-BBKNe16o.cjs} +1 -1
  135. package/dist/{vue-ui-wheel-DPjB5xcl.js → vue-ui-wheel-icxa1L4v.js} +5 -5
  136. package/dist/{vue-ui-word-cloud-VybUTXFv.cjs → vue-ui-word-cloud-CZnELuH6.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BY_qs7bW.js → vue-ui-word-cloud-DZOxxmkR.js} +7 -7
  138. package/dist/vue-ui-xy-DNbVDgjT.cjs +3 -0
  139. package/dist/{vue-ui-xy-canvas-BjPLlJyo.cjs → vue-ui-xy-canvas-BvaDluOT.cjs} +1 -1
  140. package/dist/{vue-ui-xy-canvas-B2mkEuiI.js → vue-ui-xy-canvas-ChKN_Cn-.js} +10 -10
  141. package/dist/{vue-ui-xy-BgBvVtwZ.js → vue-ui-xy-vIwvvGNZ.js} +465 -442
  142. package/package.json +1 -1
  143. package/dist/index-COMTToJY.cjs +0 -4
  144. package/dist/vue-ui-xy-CVxPe82S.cjs +0 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-COMTToJY.cjs"),ne=require("./Title-BngFmPpq.cjs"),W=require("./usePrinter-THxtdQMP.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-BDkYau8u.cjs"),se=require("./DataTable-D7JJfjpO.cjs"),ue=require("./BaseIcon-Cfy7hUAu.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-DJwc68Re.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-Clt49H-j.cjs"),ne=require("./Title-CUD-K-0i.cjs"),W=require("./usePrinter-B9AbYwAC.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-Czitboqc.cjs"),se=require("./DataTable-Di-7_6Aq.cjs"),ue=require("./BaseIcon-Durv5g7g.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-y541YeYg.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,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-CQyrBpOX.js";
3
- import { _ as Ue } from "./Title-DJW7JJGo.js";
4
- import { u as Ve, U as Ge } from "./usePrinter-BJn_Etby.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-CLohkSjv.js";
3
+ import { _ as Ue } from "./Title-WVL1w90F.js";
4
+ import { u as Ve, U as Ge } from "./usePrinter-CLjymPxw.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-DqRnuig6.js";
7
- import { D as He } from "./DataTable-CcVgHrwx.js";
8
- import Ye from "./BaseIcon-E5xGjSQn.js";
6
+ import qe from "./vue-ui-accordion-B6lUgTu6.js";
7
+ import { D as He } from "./DataTable-xRoJJLCK.js";
8
+ import Ye from "./BaseIcon-D7REqiel.js";
9
9
  import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as re } from "./useNestedProp-CK_S9Ya9.js";
10
+ import { u as re } from "./useNestedProp-BsIUgLPI.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"
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./pdf-Cz3729tZ.cjs"),O=require("./usePrinter-B9AbYwAC.cjs"),d=require("./index-Clt49H-j.cjs"),E=require("./DataTable-Di-7_6Aq.cjs"),z=require("./Title-CUD-K-0i.cjs"),G=require("./Tooltip-CdjFc0lT.cjs"),V=require("./Shape-dOTW06jG.cjs"),P=require("./BaseIcon-Durv5g7g.cjs"),T=require("./vue-ui-table-sparkline-DSztHLaA.cjs"),M=require("./vue-ui-skeleton-Gizw7vdX.cjs"),D=require("./Slicer-B-Doztix.cjs"),R=require("./vue-ui-accordion-Czitboqc.cjs"),B=require("./useNestedProp-y541YeYg.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:O.UserOptions,BaseIcon:P.default,TableSparkline:T.default,Skeleton:M.default,Slicer:D.Slicer,Accordion:R.default},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});const a=Math.max(...this.dataset.map(n=>n.series.length)),o={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:o,__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})),o=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})),m=[...a,...o,...n].flatMap(l=>l).length;return[...a,...o,...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/m*(t+1),yLabels:l.scaleYLabels||l.scale.ticks.map(g=>({y:g>=0?l.zero-l.individualHeight*(g/l.max):l.zero+l.individualHeight*Math.abs(g)/l.max,value:g}))}))},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 o=this.useNestedProp({userConfig:this.config,defaultConfig:a});return"highlightArea"in this.config.chart&&(Array.isArray(this.config.chart.highlightArea)?o.chart.highlightArea=this.config.chart.highlightArea:o.chart.highlightArea=[this.config.chart.highlightArea]),o.theme?{...B.useNestedProp({userConfig:this.themes.vue_ui_xy[o.theme]||this.config,defaultConfig:o}),customPalette:this.themePalettes[o.theme]||this.palette}:o},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(o=>({...o,span:o.from===o.to?1:o.to<o.from?0:o.to-o.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,o)=>({...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[o]?this.customPalette[o]:this.palette[o]),id:`uniqueId_${o}`})):this.dataset},relativeDataset(){return this.safeDataset.map((a,o)=>({...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 o=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,o)}})},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,o)=>({absoluteIndex:o,...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,o)=>{this.checkAutoScaleError(a);const n=Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),m=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)/(m-n)),valueMin:n,valueMax:m<0?0:m},g={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(g.min,g.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,s=this.drawingArea.bottom-f-F*x/C,i=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),v=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left+this.slot.bar*o+this.slot.bar*k*i-this.barSlot/2-o*this.barPeriodGap;return{yOffset:f,individualHeight:F,x:v,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]||""}}),A=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))),L=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*o+this.slot.bar*k*this.absoluteDataset.filter(v=>v.type==="bar").filter(v=>!this.segregatedSeries.includes(v.id)).length;return{yOffset:f,individualHeight:F,x:w,y:this.drawingArea.bottom-f-(F*A[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?s-F*k:s+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?s:r,plots:a.autoScaling?L: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 o=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-o)/(n-o)),valueMin:o,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||(Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues))},g=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScaleWithExactExtremes(t.min,t.max,g),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax,g),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,s=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]||""}}),i=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*i[k]||0),value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),A=this.createSmoothPath(s),L=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?L:A,plots:a.autoScaling?h:s,area:a.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(a.autoScaling?h:s,a.autoScaling?r:F):this.createArea(s):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="plot").map(a=>{this.checkAutoScaleError(a);const o=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-o)/(n-o)),valueMin:o,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues)},g=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScaleWithExactExtremes(t.min,t.max,g),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax,g),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,s=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)[_]||""}}),i=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*i[_]||0),value:a.absoluteValues[_],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),A=I.ticks.map(b=>({y:b>=0?F-f*(b/x):F+f*Math.abs(b)/x,value:b})),L=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:L,individualHeight:f,scaleYLabels:a.autoScaling?L:A,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:x,zeroPosition:a.autoScaling?r:F,plots:a.autoScaling?h:s}})},drawingArea(){const a=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(o=>!this.segregatedSeries.includes(o.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 Math.max(...this.safeDataset.filter(a=>!this.segregatedSeries.includes(a.id)).map(a=>Math.max(...a.series)))},min(){const a=Math.min(...this.safeDataset.filter(o=>!this.segregatedSeries.includes(o.id)).map(o=>Math.min(...o.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(o=>o.type==="bar").filter(o=>!this.segregatedSeries.includes(o.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})),o=[];return this.timeLabels.forEach((n,m)=>{const l=[n];this.relativeDataset.forEach(t=>{l.push(this.canShowValue(t.absoluteValues[m])?Number(t.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),o.push(l)}),{head:a,body:o}},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 o=[];for(let l=0;l<this.maxSeries;l+=1){const t=this.relativeDataset.map(g=>g.absoluteValues[l]??0).reduce((g,I)=>g+I,0);o.push([this.timeLabels[l]??"-"].concat(this.relativeDataset.map(g=>(g.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},m=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(l=>l.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:a,body:o,config:n,colNames:m}},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((o,n)=>n===this.selectedSerieIndex),comments:a.comments||[]}))},tooltipContent(){let a="",o=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],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({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="",g="";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)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" />`:l.shape==="triangle"?g=`<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"?g=`<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"?g=`<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"?g=`<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"?g=`<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"&&(g=`<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}" />${g}</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)/o*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,o)=>{[null,void 0].includes(a.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:o})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(a=>{a.series.forEach((o,n)=>{this.isSafeValue(o)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
2
+ -----> The serie '${a.name}' contains the value '${o}' at index ${n}.
3
+ '${o}' 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 o=this.$refs.chart.parentNode,{height:n,width:m}=o.getBoundingClientRect();let l=null,t=0;this.FINAL_CONFIG.chart.title.show&&(l=this.$refs.chartTitle,t=l.getBoundingClientRect().height);let g=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(g=this.$refs.chartSlicer.$el,I=g.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=m,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),g&&(I=g.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(o)}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,assignStackRatios:d.assignStackRatios,applyDataLabel:d.applyDataLabel,calculateNiceScaleWithExactExtremes:d.calculateNiceScaleWithExactExtremes,checkNaN:d.checkNaN,createSmoothPath:d.createSmoothPath,isSafeValue:d.isSafeValue,treeShake:d.treeShake,shiftHue:d.shiftHue,pdf:p.pdf,img:O.saveAsImage,convertColorToHex:d.convertColorToHex,convertConfigColors:d.convertConfigColors,convertCustomPalette:d.convertCustomPalette,downloadCsv:d.downloadCsv,createCsvContent:d.createCsvContent,adaptColorToBackground:d.adaptColorToBackground,calcLinearProgression:d.calcLinearProgression,useMouse:G.useMouse,closestDecimal:d.closestDecimal,dataLabel:d.dataLabel,isFunction:d.isFunction,functionReturnsString:d.functionReturnsString,error:d.error,objectIsEmpty:d.objectIsEmpty,createTSpans:d.createTSpans,useNestedProp:B.useNestedProp,translateSize:d.translateSize,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 o={x:a[0].x,y:this.zero},n={x:a.at(-1).x,y:this.zero},m=[];return a.forEach(l=>{m.push(`${l.x},${l.y} `)}),[o.x,o.y,...m,n.x,n.y].toString()},createIndividualArea(a,o){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:o},m={x:a.at(-1)?a.at(-1).x:Math.min(...a.filter(t=>!!t).map(t=>t.x)),y:o},l=[];return a.filter(t=>!!t).forEach(t=>{l.push(`${t.x},${t.y} `)}),[n.x,n.y,...l,m.x,m.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(a,o){let n=Array(a).fill(0);for(let m=0;m<o.length&&m<a;m+=1)n[m]=o[m];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,o){let n=o[0],m=Math.abs(a-o[0]);for(let l=1;l<o.length;l+=1){const t=Math.abs(a-o[l]);t<m&&o[l]<a&&(n=o[l],m=t)}return n},ratioToMax(a){return a/this.absoluteMax},selectX(a){this.$emit("selectX",{dataset:this.relativeDataset.map(o=>({name:o.name,value:[null,void 0,NaN].includes(o.absoluteValues[a])?null:o.absoluteValues[a],color:o.color,type:o.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(o=>o!==a.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(a.id)}this.$emit("selectLegend",this.relativeDataset.map(o=>({name:o.name,values:o.absoluteValues,color:o.color,type:o.type}))),this.segregateStep+=1},toggleTooltipVisibility(a,o=null){this.isTooltip=a,a?this.selectedSerieIndex=o: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],[""]],o=["",...this.table.head.map(t=>t.label)],n=this.table.body,m=a.concat([o]).concat(n),l=this.createCsvContent(m);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"],oe=["stop-color"],se=["id"],ne=["stop-color"],ce=["stop-color"],he=["stop-color"],de=["id"],ue=["stop-color"],me=["stop-color"],ge=["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","rx","fill","stroke","stroke-width"],_e=["width","x","y"],Ce={key:0},Se=["id"],Le=["fill"],Ae=["x1","x2","y1","y2","stroke","marker-end"],we=["x","y","font-size","fill"],ve=["stroke","x1","x2","y1","y2"],Oe=["y","width","height","fill"],Ge=["x","y","width","height","fill"],Be=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],pe={key:3},Ee=["x1","x2","y1","y2","stroke","stroke-width"],ze=["fill","font-size","transform"],Ve=["x1","x2","y1","y2","stroke"],Pe=["x","y","font-size","fill"],Te=["x1","x2","y1","y2","stroke"],Me=["x","y","font-size","fill"],De=["width","x","y"],Re={style:{width:"100%"}},He={key:0},We=["id"],qe=["fill"],Ye=["x1","x2","y1","y2","stroke","marker-end"],Xe=["x","y","font-size","fill"],Ue=["d","stroke","stroke-width","stroke-dasharray"],Ze={key:1},Je=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ke={key:0},Qe=["d","fill"],je=["d","fill"],$e=["d","stroke","stroke-width","stroke-dasharray"],et={key:2},tt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],lt=["width","x","y"],rt={style:{width:"100%"}},at={key:3},it=["id"],ot=["fill"],st=["x1","x2","y1","y2","stroke","marker-end"],nt=["x","y","font-size","fill"],ct={key:4},ht=["x","y","font-size","fill"],dt=["x","y","font-size","fill","font-weight"],ut={key:5},mt=["x","y","font-size","fill"],gt=["x","y"],ft=["x","y"],Nt={key:6},kt=["x","y","font-size","fill"],bt=["x","y"],It=["x","y"],Ft=["x","y","font-size","fill","innerHTML"],xt=["x","y","font-size","fill","innerHTML"],yt=["x","y","font-size","fill","innerHTML"],_t=["x","y","font-size","fill","innerHTML"],Ct=["x","y","width","height","fill","onMouseenter"],St=["font-size","fill","transform"],Lt=["x","y","font-size","fill"],At={key:8},wt=["text-anchor","font-size","fill","transform"],vt=["x","y","height","width","fill","onMouseenter","onClick"],Ot={key:9},Gt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Bt={key:10},pt=["x","y"],Et=["cx","cy","r","fill"],zt={key:3,class:"vue-data-ui-watermark"},Vt=["onClick"],Pt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Tt=["fill"],Mt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Dt=["fill"],Rt={key:7,ref:"chartLegend"},Ht={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},Wt=["innerHTML"];function qt(a,o,n,m,l,t){const g=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(g,{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:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:s})),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,s=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:s.y,y2:s.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,s=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left+t.xPadding,x2:t.drawingArea.right-t.xPadding,y1:s.y,y2:s.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,s)=>(e.openBlock(),e.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:t.drawingArea.width/t.maxSeries*s+t.drawingArea.left+t.xPadding,x2:t.drawingArea.width/t.maxSeries*s+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,s)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_rect_${s}`},[e.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${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,oe)],8,re),e.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${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,se)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_plot_${s}`},[e.createElementVNode("radialGradient",{id:`plotGradient_${s}_${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,me)],8,de)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_line_${s}`},[e.createElementVNode("radialGradient",{id:`lineGradient_${s}_${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,ge),e.createElementVNode("linearGradient",{id:`areaGradient_${s}_${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)),t.barSet.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.barSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_bar_${s}`,class:e.normalizeClass(`serie_bar_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`bar_plot_${s}_${h}`},[t.canShowValue(i.value)?(e.openBlock(),e.createElementBlock("rect",{key:0,x:t.calcRectX(i),y:l.mutableConfig.useIndividualScale?t.calcIndividualRectY(i):t.calcRectY(i),height:l.mutableConfig.useIndividualScale?Math.abs(t.calcIndividualHeight(i)):Math.abs(t.calcRectHeight(i)),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?i.value>=0?`url(#rectGradient_pos_${s}_${l.uniqueId})`:`url(#rectGradient_neg_${s}_${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,ye)):e.createCommentVNode("",!0),i.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(i)-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:i.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.renderSlot(a.$slots,"plot-comment",{plot:{...i,color:r.color}},void 0,!0)],8,_e)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",Ce,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`bar_arrow_${s}`,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,Se)]),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_${s})`},null,8,Ae)):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,we)):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),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,Oe),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,Ge)]),t.FINAL_CONFIG.chart.grid.frame.show?(e.openBlock(),e.createElementBlock("rect",{key:2,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,Be)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.grid.labels.show?(e.openBlock(),e.createElementBlock("g",pe,[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,Ee)]))),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,ze),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.yLabels,(s,i)=>(e.openBlock(),e.createElementBlock("line",{x1:r.x-3+t.xPadding,x2:r.x+t.xPadding,y1:s.y,y2:s.y,stroke:r.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.yLabels,(s,i)=>(e.openBlock(),e.createElementBlock("text",{x:r.x-5+t.xPadding,y:s.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,s.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:1}))),9,Pe))),256))],4))),256))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.yLabels,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`yLabel_${s}`},[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,Te)):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,Me)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_plot_${s}`,class:e.normalizeClass(`serie_plot_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`circle_plot_${s}_${h}`},[t.canShowValue(i.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_${s}_${l.uniqueId})`:r.color,plot:{x:i.x,y:i.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),i.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:i.x-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:i.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.createElementVNode("div",Re,[e.renderSlot(a.$slots,"plot-comment",{plot:{...i,color:r.color}},void 0,!0)])],8,De)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",He,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`plot_arrow_${s}`,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,qe)],8,We)]),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_${s})`},null,8,Ye)):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,Xe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${s}`,class:e.normalizeClass(`serie_line_${s}`),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,Ue)):r.plots.length>1?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${s}_${h}`},[i&&h<r.plots.length-1&&r.plots[h+1]&&t.canShowValue(i.value)&&t.canShowValue(r.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:i.x,x2:r.plots[h+1].x,y1:i.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,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${s}`,class:e.normalizeClass(`serie_line_${s}`),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",Ke,[r.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${r.plots[0]?r.plots[0].x:Math.min(...r.plots.filter(i=>!!i).map(i=>i.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*s+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_${s}_${l.uniqueId})`:`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Qe)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${r.area}Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${s}_${l.uniqueId})`:`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,je))])):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,$e)):r.plots.length>1?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${s}_${h}`},[i&&h<r.plots.length-1&&r.plots[h+1]&&t.canShowValue(i.value)&&t.canShowValue(r.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:i.x,x2:r.plots[h+1].x,y1:i.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,tt)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`circle_line_${s}_${h}`},[i&&t.canShowValue(i.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_${s}_${l.uniqueId})`:r.color,plot:{x:i.x,y:i.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),i.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:i.x-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:i.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.createElementVNode("div",rt,[e.renderSlot(a.$slots,"plot-comment",{plot:{...i,color:r.color}},void 0,!0)])],8,lt)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",at,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`line_arrow_${s}`,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,ot)],8,it)]),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_${s})`},null,8,st)):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,nt)):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",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.barSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${s}`,class:e.normalizeClass(`xLabel_bar_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${s}_${h}`},[i&&(!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?i.x+t.slot.line/2:t.calcRectX(i)+t.calcRectWidth()/2-t.barPeriodGap/2,y:i.y+(i.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(i.value)?t.applyDataLabel(t.FINAL_CONFIG.bar.labels.formatter,i.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.bar.labels.rounding}),{datapoint:i,serie:r}):""),9,ht)):e.createCommentVNode("",!0),i&&t.FINAL_CONFIG.bar.serieName.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?i.x+t.slot.line/2:i.x+t.calcRectWidth()*1.1,y:i.y+(i.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,dt)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.plot.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}`,class:e.normalizeClass(`xLabel_plot_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}_${h}`},[i&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x,y:i.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(i.value)?t.applyDataLabel(t.FINAL_CONFIG.plot.labels.formatter,i.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.plot.labels.rounding}),{datapoint:i,serie:r}):""),9,mt)):e.createCommentVNode("",!0),i&&h===0&&r.useTag&&r.useTag==="start"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:i.x,y:i.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,gt)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:i.x-r.name.length*(l.fontSizes.plotLabels/2),y:i.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,ft)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.line.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}`,class:e.normalizeClass(`xLabel_line_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}_${h}`},[i&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x,y:i.y+(i.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(i.value)?t.applyDataLabel(t.FINAL_CONFIG.line.labels.formatter,i.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.line.labels.rounding}),{datapoint:i,serie:r}):""),9,kt)):e.createCommentVNode("",!0),i&&h===0&&r.useTag&&r.useTag==="start"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:i.x,y:i.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),i&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:i.x-r.name.length*(l.fontSizes.plotLabels/2),y:i.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,It)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}`,class:e.normalizeClass(`xLabel_line_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}_${h}`},[i&&h===0&&r.showSerieName&&r.showSerieName==="start"?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x-l.fontSizes.plotLabels,y:i.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:i.x-l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,Ft)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(e.openBlock(),e.createElementBlock("text",{key:1,x:i.x+l.fontSizes.plotLabels,y:i.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:i.x+l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,xt)):e.createCommentVNode("",!0)]))),128))],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}`,class:e.normalizeClass(`xLabel_plot_${s}`),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,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}_${h}`},[i&&h===0&&r.showSerieName&&r.showSerieName==="start"?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x-l.fontSizes.plotLabels,y:i.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:i.x-l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,yt)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(e.openBlock(),e.createElementBlock("text",{key:1,x:i.x+l.fontSizes.plotLabels,y:i.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:i.x+l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,_t)):e.createCommentVNode("",!0)]))),128))],6))),128)),l.mutableConfig.useIndividualScale&&!l.mutableConfig.isStacked?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:7},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:s=>l.selectedScale=r.id,onMouseleave:o[0]||(o[0]=s=>l.selectedScale=null)},null,40,Ct))),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,St)):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,Lt)):e.createCommentVNode("",!0)]),t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timeLabels,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`time_label_${s}`},[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&&(s===0||s===t.timeLabels.length-1)&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&l.selectedSerieIndex===s&&!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&&s%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*s+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,wt)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.maxSeries,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`tooltip_trap_${s}`},[e.createElementVNode("rect",{"data-cy-trap":"",x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*s,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===s||l.selectedRowIndex===s?`${t.FINAL_CONFIG.chart.highlighter.color}${l.opacity[t.FINAL_CONFIG.chart.highlighter.opacity]}`:"transparent",onMouseenter:i=>t.toggleTooltipVisibility(!0,s),onMouseleave:o[1]||(o[1]=i=>t.toggleTooltipVisibility(!1)),onClick:i=>t.selectX(s)},null,40,vt)]))),128))]),t.FINAL_CONFIG.chart.highlighter.useLine&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",Ot,[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,Gt)])):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.timeTag.show&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",Bt,[(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,pt)),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,Et)])):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",zt,[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":o[2]||(o[2]=r=>l.slicer.start=r),end:l.slicer.end,"onUpdate:end":o[3]||(o[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,s)=>(e.openBlock(),e.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:i=>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",Pt,[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",Mt,[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,Dt)):(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,Vt))),128))],4)):(e.openBlock(),e.createElementBlock("div",Rt,[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",Ht,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=r=>l.showSparklineTable=r)},null,512),[[e.vModelCheckbox,l.showSparklineTable]]),e.createElementVNode("div",{onClick:o[5]||(o[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:o[6]||(o[6]=r=>l.mutableConfig.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r},null,8,Wt)]),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 Yt=H._export_sfc(q,[["render",qt],["__scopeId","data-v-58a339d5"]]);exports.default=Yt;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-COMTToJY.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),qe=require("./Tooltip-ztxY4WiA.cjs"),Ye=require("./Legend-BDgAlEzL.cjs"),Ue=require("./Title-BngFmPpq.cjs"),Xe=require("./Slicer-BhktgQpC.cjs"),xe=require("./usePrinter-THxtdQMP.cjs"),Ae=require("./vue-ui-accordion-BDkYau8u.cjs"),Ze=require("./DataTable-D7JJfjpO.cjs"),Ge=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),Le=require("./useNestedProp-DJwc68Re.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-Clt49H-j.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),qe=require("./Tooltip-CdjFc0lT.cjs"),Ye=require("./Legend-DHtuLr86.cjs"),Ue=require("./Title-CUD-K-0i.cjs"),Xe=require("./Slicer-B-Doztix.cjs"),xe=require("./usePrinter-B9AbYwAC.cjs"),Ae=require("./vue-ui-accordion-Czitboqc.cjs"),Ze=require("./DataTable-Di-7_6Aq.cjs"),Ge=require("./vue-ui-skeleton-Gizw7vdX.cjs"),Le=require("./useNestedProp-y541YeYg.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}"/>
@@ -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-CQyrBpOX.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-CLohkSjv.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-pvQzx3z4.js";
5
- import { L as Ea } from "./Legend-BPGeRVxf.js";
6
- import { _ as Na } from "./Title-DJW7JJGo.js";
7
- import { S as _a } from "./Slicer-Dr5g4_di.js";
8
- import { u as Da, U as Ha } from "./usePrinter-BJn_Etby.js";
9
- import Wa from "./vue-ui-accordion-DqRnuig6.js";
10
- import { D as Ya } from "./DataTable-CcVgHrwx.js";
11
- import Ba from "./vue-ui-skeleton-CjYyI3Lv.js";
12
- import { u as Ae } from "./useNestedProp-CK_S9Ya9.js";
4
+ import { _ as Fa } from "./Tooltip-B5_8pR7S.js";
5
+ import { L as Ea } from "./Legend-DFjWlPTO.js";
6
+ import { _ as Na } from "./Title-WVL1w90F.js";
7
+ import { S as _a } from "./Slicer-CdoJYj--.js";
8
+ import { u as Da, U as Ha } from "./usePrinter-CLjymPxw.js";
9
+ import Wa from "./vue-ui-accordion-B6lUgTu6.js";
10
+ import { D as Ya } from "./DataTable-xRoJJLCK.js";
11
+ import Ba from "./vue-ui-skeleton-Cu-FCvsL.js";
12
+ import { u as Ae } from "./useNestedProp-BsIUgLPI.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,