vue-data-ui 2.4.89 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +8 -1
  2. package/dist/{Arrow-CbP9kLxJ.cjs → Arrow-CDKNBZrn.cjs} +1 -1
  3. package/dist/{Arrow-CuAfInZx.js → Arrow-DO1Kr0tq.js} +1 -1
  4. package/dist/{BaseIcon-C8eZuK3O.cjs → BaseIcon-BKYwMJ4Y.cjs} +1 -1
  5. package/dist/{BaseIcon-BpNWrQFd.js → BaseIcon-DVY6e_YL.js} +4 -3
  6. package/dist/{DataTable-CBJXWv2y.js → DataTable-D4_TjSBJ.js} +2 -2
  7. package/dist/{DataTable-D-lEfCvI.cjs → DataTable-ZowHAjXC.cjs} +1 -1
  8. package/dist/{Legend-BHqhIxpn.cjs → Legend-CcoLuZn0.cjs} +1 -1
  9. package/dist/{Legend-BSpbp1BZ.js → Legend-K7NRkzGf.js} +2 -2
  10. package/dist/PackageVersion-Cun_qdX7.cjs +1 -0
  11. package/dist/{PackageVersion-DtBpSOiQ.js → PackageVersion-DKr8jVlI.js} +1 -1
  12. package/dist/{PenAndPaper-B2XkoPXE.js → PenAndPaper-CurhQVkh.js} +3 -3
  13. package/dist/{PenAndPaper-JJPSlM7l.cjs → PenAndPaper-u46MyY7W.cjs} +1 -1
  14. package/dist/{Shape-Do_AzV1G.cjs → Shape-B6dlN2je.cjs} +1 -1
  15. package/dist/{Shape-BOPYNx7w.js → Shape-C4LyHNQ3.js} +1 -1
  16. package/dist/{Slicer-Ztz1Ij0w.cjs → Slicer-BIzpsKb9.cjs} +1 -1
  17. package/dist/{Slicer-ChE3bif9.js → Slicer-CP2dQhd5.js} +2 -2
  18. package/dist/{Title-ccoiJ0mq.js → Title-C4aoNP1T.js} +1 -1
  19. package/dist/{Title-0PbYWvbk.cjs → Title-bDp_4dQV.cjs} +1 -1
  20. package/dist/{Tooltip-DvT_JgqK.js → Tooltip-CG6ZX21C.js} +1 -1
  21. package/dist/{Tooltip-yfpr967Z.cjs → Tooltip-fEuHWstj.cjs} +1 -1
  22. package/dist/documentation/installation.md +2 -1
  23. package/dist/index-CHCA909R.cjs +9 -0
  24. package/dist/{index-CbMgQMOZ.js → index-DAAFXQJj.js} +709 -542
  25. package/dist/style.css +1 -1
  26. package/dist/types/vue-data-ui.d.cts +1140 -384
  27. package/dist/types/vue-data-ui.d.ts +1140 -384
  28. package/dist/{useNestedProp-BbHX6tgE.cjs → useNestedProp--1nKK7i0.cjs} +1 -1
  29. package/dist/{useNestedProp-vYrmxXEi.js → useNestedProp-DMtJzMiX.js} +1 -1
  30. package/dist/{usePrinter-sMoxYV4s.js → usePrinter-BvlefWMW.js} +1 -1
  31. package/dist/{usePrinter-CCvLCahd.cjs → usePrinter-xicwiw8r.cjs} +1 -1
  32. package/dist/{vue-data-ui-cjdjZcIN.js → vue-data-ui-59LZYiyy.js} +68 -66
  33. package/dist/vue-data-ui-DfZfDAuq.cjs +9 -0
  34. package/dist/vue-data-ui.cjs +1 -1
  35. package/dist/vue-data-ui.js +59 -58
  36. package/dist/{vue-ui-3d-bar-BCUFEN3E.js → vue-ui-3d-bar-Bm56SoLy.js} +41 -41
  37. package/dist/{vue-ui-3d-bar-BIxPk-3O.cjs → vue-ui-3d-bar-CZlGwiDq.cjs} +11 -11
  38. package/dist/{vue-ui-accordion-D0YEkQP_.cjs → vue-ui-accordion-B4PyxVUm.cjs} +1 -1
  39. package/dist/{vue-ui-accordion-DXPXhPPW.js → vue-ui-accordion-B67N9Oo8.js} +3 -3
  40. package/dist/vue-ui-age-pyramid-D9DN4SYa.cjs +1 -0
  41. package/dist/{vue-ui-age-pyramid-Bu2gLwi_.js → vue-ui-age-pyramid-DCMUbrYc.js} +12 -12
  42. package/dist/{vue-ui-annotator-np4TLsbB.cjs → vue-ui-annotator-CNrWYokB.cjs} +1 -1
  43. package/dist/{vue-ui-annotator-rRlHgjug.js → vue-ui-annotator-MuRFw529.js} +1 -1
  44. package/dist/{vue-ui-bullet-BG4ZoJWg.js → vue-ui-bullet-Bojb2p0l.js} +42 -42
  45. package/dist/vue-ui-bullet-DJjM56tB.cjs +34 -0
  46. package/dist/{vue-ui-candlestick-zm-vNhJF.cjs → vue-ui-candlestick-B3J5_Q_K.cjs} +2 -2
  47. package/dist/{vue-ui-candlestick-Bs_FB1xf.js → vue-ui-candlestick-DXMPVZ0k.js} +13 -13
  48. package/dist/{vue-ui-carousel-table-D73qjY94.js → vue-ui-carousel-table-CQAWsXet.js} +26 -26
  49. package/dist/vue-ui-carousel-table-WNkO6kVE.cjs +1 -0
  50. package/dist/{vue-ui-chestnut-BKka1suh.js → vue-ui-chestnut-CChxV7D2.js} +11 -11
  51. package/dist/{vue-ui-chestnut-BZ7WKn-P.cjs → vue-ui-chestnut-DUHyQSIc.cjs} +2 -2
  52. package/dist/vue-ui-circle-pack-Bo9NTyE5.cjs +1 -0
  53. package/dist/vue-ui-circle-pack-feW9MRNc.js +639 -0
  54. package/dist/{vue-ui-cursor-CKQ7lIEU.js → vue-ui-cursor-CTNCoeO1.js} +2 -2
  55. package/dist/{vue-ui-cursor-BvDKJ-EE.cjs → vue-ui-cursor-Y79oTXbN.cjs} +1 -1
  56. package/dist/{vue-ui-dashboard-CLDULZmZ.js → vue-ui-dashboard-CTk7cXk3.js} +2 -2
  57. package/dist/{vue-ui-dashboard-CU18bFKg.cjs → vue-ui-dashboard-ht0wjO32.cjs} +1 -1
  58. package/dist/{vue-ui-digits-_Q3BPnPQ.js → vue-ui-digits-CRfqQd-4.js} +2 -2
  59. package/dist/{vue-ui-digits-ZsDxljaT.cjs → vue-ui-digits-CSzsY3pv.cjs} +1 -1
  60. package/dist/{vue-ui-donut-uSvi7mes.js → vue-ui-donut-D6U1P8MA.js} +15 -15
  61. package/dist/vue-ui-donut-DhQt8Zro.cjs +1 -0
  62. package/dist/{vue-ui-donut-evolution-DeaRL3Qp.js → vue-ui-donut-evolution-BSk3uqC8.js} +42 -42
  63. package/dist/vue-ui-donut-evolution-ZOfJ13fG.cjs +1 -0
  64. package/dist/vue-ui-dumbbell-Cc2vQuKa.cjs +9 -0
  65. package/dist/{vue-ui-dumbbell-DxOC8F_T.js → vue-ui-dumbbell-DwNJ0t9t.js} +12 -12
  66. package/dist/vue-ui-flow-BbKP10ov.cjs +1 -0
  67. package/dist/{vue-ui-flow-Cli1Nia2.js → vue-ui-flow-CQisc_LK.js} +11 -11
  68. package/dist/{vue-ui-funnel-DUSetrwZ.js → vue-ui-funnel-DA82mX-l.js} +12 -12
  69. package/dist/vue-ui-funnel-DybxnhPr.cjs +1 -0
  70. package/dist/vue-ui-galaxy-C-hNndez.cjs +1 -0
  71. package/dist/{vue-ui-galaxy-B6chdxw9.js → vue-ui-galaxy-Co-39JiJ.js} +29 -29
  72. package/dist/{vue-ui-gauge-BWsStiRt.js → vue-ui-gauge-TvTF5LS6.js} +46 -46
  73. package/dist/vue-ui-gauge-gWdl5oo1.cjs +1 -0
  74. package/dist/{vue-ui-gizmo-CIZXKQaP.cjs → vue-ui-gizmo-BQoNUgtQ.cjs} +1 -1
  75. package/dist/{vue-ui-gizmo-BwPZP3S1.js → vue-ui-gizmo-KnX0YMoX.js} +3 -3
  76. package/dist/vue-ui-heatmap-B5xnkUqI.cjs +1 -0
  77. package/dist/{vue-ui-heatmap-DPO0-7Kr.js → vue-ui-heatmap-BYhGn41t.js} +32 -32
  78. package/dist/{vue-ui-history-plot-Bn1Pt_Ti.js → vue-ui-history-plot-8n3FPjHp.js} +33 -33
  79. package/dist/vue-ui-history-plot-BFZOwwn-.cjs +1 -0
  80. package/dist/{vue-ui-kpi-DyI2-86Q.cjs → vue-ui-kpi-BRrkDdp5.cjs} +1 -1
  81. package/dist/{vue-ui-kpi-BbeBozJ_.js → vue-ui-kpi-r9o6PDR7.js} +3 -3
  82. package/dist/{vue-ui-mini-loader-DkkBYJla.cjs → vue-ui-mini-loader-BXBmMZE5.cjs} +1 -1
  83. package/dist/{vue-ui-mini-loader-BbXkCdaA.js → vue-ui-mini-loader-z5Tjy9_F.js} +2 -2
  84. package/dist/vue-ui-molecule-BS-uVTx6.cjs +1 -0
  85. package/dist/{vue-ui-molecule-b4smncqZ.js → vue-ui-molecule-Hmix0fg_.js} +13 -13
  86. package/dist/vue-ui-mood-radar-D3bJvAUA.cjs +1 -0
  87. package/dist/{vue-ui-mood-radar-BdT3nuEz.js → vue-ui-mood-radar-cQQYzxOe.js} +13 -13
  88. package/dist/{vue-ui-nested-donuts-DttOstux.js → vue-ui-nested-donuts-BQ-orCsy.js} +14 -14
  89. package/dist/{vue-ui-nested-donuts-ko1-nRO2.cjs → vue-ui-nested-donuts-CJoByLIN.cjs} +2 -2
  90. package/dist/{vue-ui-onion-CFjFt2g0.cjs → vue-ui-onion-2gpWMiK3.cjs} +2 -2
  91. package/dist/{vue-ui-onion-TYSsqogk.js → vue-ui-onion-DMdgBAGm.js} +13 -13
  92. package/dist/{vue-ui-parallel-coordinate-plot-DzBoNAa1.cjs → vue-ui-parallel-coordinate-plot-BkksCptE.cjs} +2 -2
  93. package/dist/{vue-ui-parallel-coordinate-plot-CAqhUHot.js → vue-ui-parallel-coordinate-plot-CORjvdpu.js} +35 -35
  94. package/dist/{vue-ui-quadrant-BQH_Xifg.js → vue-ui-quadrant-C7z-xan4.js} +14 -14
  95. package/dist/vue-ui-quadrant-DwLVQDkC.cjs +1 -0
  96. package/dist/{vue-ui-quick-chart-CULnpCgG.js → vue-ui-quick-chart-BNBYa1qm.js} +9 -9
  97. package/dist/{vue-ui-quick-chart-Bz-nNd-y.cjs → vue-ui-quick-chart-DQ_0L2k8.cjs} +1 -1
  98. package/dist/{vue-ui-radar-Cx-rxEMq.js → vue-ui-radar-BJalnvQ0.js} +14 -14
  99. package/dist/vue-ui-radar-DMug3I3r.cjs +1 -0
  100. package/dist/{vue-ui-rating-BKQNJZ0P.cjs → vue-ui-rating-CAtmkCip.cjs} +1 -1
  101. package/dist/{vue-ui-rating-F9PTlU7Q.js → vue-ui-rating-YrpteNHP.js} +2 -2
  102. package/dist/vue-ui-relation-circle-6WgpxOdi.cjs +1 -0
  103. package/dist/{vue-ui-relation-circle-DegxFhlA.js → vue-ui-relation-circle-CaX6ryF7.js} +37 -37
  104. package/dist/{vue-ui-rings-fJvO6eX_.js → vue-ui-rings-B94ER7yb.js} +36 -36
  105. package/dist/{vue-ui-rings-B18Wqo7x.cjs → vue-ui-rings-DwXSWAh9.cjs} +2 -2
  106. package/dist/{vue-ui-scatter-nVMhmeVK.js → vue-ui-scatter-R_o-56au.js} +14 -14
  107. package/dist/vue-ui-scatter-klHezU7g.cjs +1 -0
  108. package/dist/{vue-ui-screenshot-CL_BGDeM.cjs → vue-ui-screenshot-BJBVXs5F.cjs} +1 -1
  109. package/dist/{vue-ui-screenshot-DsGxjAas.js → vue-ui-screenshot-CawOtRGf.js} +1 -1
  110. package/dist/{vue-ui-skeleton-odlG21I6.js → vue-ui-skeleton-BM3ut-zl.js} +457 -377
  111. package/dist/vue-ui-skeleton-DsMIGHB3.cjs +41 -0
  112. package/dist/{vue-ui-smiley-CcM-XG7o.js → vue-ui-smiley-DX5k4pRq.js} +2 -2
  113. package/dist/{vue-ui-smiley-DjCnF05n.cjs → vue-ui-smiley-bh_FuZmP.cjs} +1 -1
  114. package/dist/{vue-ui-spark-trend-DbfmJnyG.js → vue-ui-spark-trend-BSLfkSAJ.js} +5 -5
  115. package/dist/{vue-ui-spark-trend-B3wvoHdy.cjs → vue-ui-spark-trend-N88_MES6.cjs} +1 -1
  116. package/dist/{vue-ui-sparkbar-DkwgnqvW.js → vue-ui-sparkbar-CgV-sv7t.js} +4 -4
  117. package/dist/{vue-ui-sparkbar-Unem3qlf.cjs → vue-ui-sparkbar-NRuy_wAW.cjs} +1 -1
  118. package/dist/{vue-ui-sparkgauge-CFNCtwjD.js → vue-ui-sparkgauge-YOs41cOi.js} +4 -4
  119. package/dist/{vue-ui-sparkgauge-1oonX7Pt.cjs → vue-ui-sparkgauge-h9hOQBbL.cjs} +1 -1
  120. package/dist/{vue-ui-sparkhistogram-BDq3T-6n.js → vue-ui-sparkhistogram-BHVoP35U.js} +5 -5
  121. package/dist/{vue-ui-sparkhistogram-C2FOzWbO.cjs → vue-ui-sparkhistogram-BIoA2rZ8.cjs} +1 -1
  122. package/dist/{vue-ui-sparkline-BXCPWLbx.cjs → vue-ui-sparkline-C3lqwFGV.cjs} +1 -1
  123. package/dist/{vue-ui-sparkline-CDGqFfbA.js → vue-ui-sparkline-nIfo0etd.js} +4 -4
  124. package/dist/{vue-ui-sparkstackbar-Crr9O93o.cjs → vue-ui-sparkstackbar-CBBZJlfz.cjs} +1 -1
  125. package/dist/{vue-ui-sparkstackbar-BGDxXx1H.js → vue-ui-sparkstackbar-CMH38Bht.js} +5 -5
  126. package/dist/{vue-ui-stackbar-CXVJgWTO.js → vue-ui-stackbar-CBzYWzrX.js} +15 -15
  127. package/dist/{vue-ui-stackbar-YULKQ4Q2.cjs → vue-ui-stackbar-CwwOCVW2.cjs} +2 -2
  128. package/dist/{vue-ui-strip-plot-D-_BcZGB.js → vue-ui-strip-plot-3UZVAou8.js} +13 -13
  129. package/dist/vue-ui-strip-plot-Dp2kJ7iQ.cjs +1 -0
  130. package/dist/{vue-ui-table-DCR-izqY.cjs → vue-ui-table-B3s1IcfE.cjs} +1 -1
  131. package/dist/{vue-ui-table-BKMfZhPB.js → vue-ui-table-CDmWHO-z.js} +1 -1
  132. package/dist/vue-ui-table-heatmap-BsZvR-Zs.cjs +1 -0
  133. package/dist/{vue-ui-table-heatmap-BYnl_vUh.js → vue-ui-table-heatmap-CZD0-bMz.js} +8 -8
  134. package/dist/vue-ui-table-sparkline-BqGa1gwS.cjs +1 -0
  135. package/dist/{vue-ui-table-sparkline-C1Xx-B2E.js → vue-ui-table-sparkline-nCnQKAqx.js} +8 -8
  136. package/dist/{vue-ui-thermometer-Ba5L3NM-.js → vue-ui-thermometer-Be7yQtd0.js} +12 -12
  137. package/dist/vue-ui-thermometer-dk2T8fWc.cjs +1 -0
  138. package/dist/{vue-ui-timer-CrJJnZKN.js → vue-ui-timer-B7jYXTxP.js} +5 -5
  139. package/dist/{vue-ui-timer-BLM1ZnqH.cjs → vue-ui-timer-DMPyhmkw.cjs} +1 -1
  140. package/dist/vue-ui-tiremarks-B2YzKOZ9.cjs +1 -0
  141. package/dist/{vue-ui-tiremarks-C0FaGxaE.js → vue-ui-tiremarks-BysMKDiL.js} +9 -9
  142. package/dist/vue-ui-treemap-BgPQTI0-.cjs +1 -0
  143. package/dist/{vue-ui-treemap-DUUBok0Z.js → vue-ui-treemap-CVEo4sPM.js} +40 -40
  144. package/dist/{vue-ui-vertical-bar-DGSL6lGQ.js → vue-ui-vertical-bar-DqNS7Ash.js} +36 -36
  145. package/dist/{vue-ui-vertical-bar-qY3NE5sf.cjs → vue-ui-vertical-bar-tR8BBtIQ.cjs} +2 -2
  146. package/dist/vue-ui-waffle-CNIMp_6k.cjs +1 -0
  147. package/dist/{vue-ui-waffle-DeDjMqj4.js → vue-ui-waffle-pwRzgt1I.js} +40 -40
  148. package/dist/{vue-ui-wheel-D2pWanO3.js → vue-ui-wheel-U-zWCCQP.js} +18 -18
  149. package/dist/vue-ui-wheel-yVszAJvl.cjs +1 -0
  150. package/dist/vue-ui-word-cloud-D2bvq4zl.cjs +1 -0
  151. package/dist/{vue-ui-word-cloud-DDubuSNu.js → vue-ui-word-cloud-RI8RK0o-.js} +38 -38
  152. package/dist/{vue-ui-xy-DvaJ_oyE.js → vue-ui-xy-BqbnfSBo.js} +14 -14
  153. package/dist/{vue-ui-xy-BKEjcTkg.cjs → vue-ui-xy-Iprttv_w.cjs} +1 -1
  154. package/dist/{vue-ui-xy-canvas-CgzTusyc.cjs → vue-ui-xy-canvas-7QgtFfPE.cjs} +3 -3
  155. package/dist/{vue-ui-xy-canvas-DpTDw8Rv.js → vue-ui-xy-canvas-CauFtYWC.js} +13 -13
  156. package/package.json +3 -2
  157. package/dist/PackageVersion-fh_T3pry.cjs +0 -1
  158. package/dist/index-DHTOdsmm.cjs +0 -9
  159. package/dist/vue-data-ui-B4yl-5k7.cjs +0 -9
  160. package/dist/vue-ui-age-pyramid-JUp6_DQU.cjs +0 -1
  161. package/dist/vue-ui-bullet-DuPHT9m_.cjs +0 -34
  162. package/dist/vue-ui-carousel-table-CVlt3x_V.cjs +0 -1
  163. package/dist/vue-ui-donut-BTLM3pc-.cjs +0 -1
  164. package/dist/vue-ui-donut-evolution-B9b0VDlt.cjs +0 -1
  165. package/dist/vue-ui-dumbbell-D0-fNbuR.cjs +0 -9
  166. package/dist/vue-ui-flow-CVX1Booa.cjs +0 -1
  167. package/dist/vue-ui-funnel-CkrA8ZGZ.cjs +0 -1
  168. package/dist/vue-ui-galaxy-XLY4fBs_.cjs +0 -1
  169. package/dist/vue-ui-gauge-DKv2V1ZR.cjs +0 -1
  170. package/dist/vue-ui-heatmap-DpZM0Il7.cjs +0 -1
  171. package/dist/vue-ui-history-plot-DyTTxsEC.cjs +0 -1
  172. package/dist/vue-ui-molecule-CVg3G3jq.cjs +0 -1
  173. package/dist/vue-ui-mood-radar-bRCa4Y3L.cjs +0 -1
  174. package/dist/vue-ui-quadrant-Cx1wlTvP.cjs +0 -1
  175. package/dist/vue-ui-radar-gWd0pEpW.cjs +0 -1
  176. package/dist/vue-ui-relation-circle-B3PfO20q.cjs +0 -1
  177. package/dist/vue-ui-scatter-ZJO-zIjS.cjs +0 -1
  178. package/dist/vue-ui-skeleton-BZDfN8kq.cjs +0 -41
  179. package/dist/vue-ui-strip-plot-D2tY6IaY.cjs +0 -1
  180. package/dist/vue-ui-table-heatmap-BQk6Gd_E.cjs +0 -1
  181. package/dist/vue-ui-table-sparkline-Fk2HnXUF.cjs +0 -1
  182. package/dist/vue-ui-thermometer-CUa9blx-.cjs +0 -1
  183. package/dist/vue-ui-tiremarks-C0ic3lVR.cjs +0 -1
  184. package/dist/vue-ui-treemap-C7lv9JcH.cjs +0 -1
  185. package/dist/vue-ui-waffle-lANO8NSp.cjs +0 -1
  186. package/dist/vue-ui-wheel-yw94VIYd.cjs +0 -1
  187. package/dist/vue-ui-word-cloud-BQuOLoHD.cjs +0 -1
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-DHTOdsmm.cjs"),V=require("./DataTable-D-lEfCvI.cjs"),E=require("./Title-0PbYWvbk.cjs"),v=require("./Tooltip-yfpr967Z.cjs"),z=require("./usePrinter-CCvLCahd.cjs"),P=require("./Shape-Do_AzV1G.cjs"),M=require("./BaseIcon-C8eZuK3O.cjs"),T=require("./vue-ui-table-sparkline-Fk2HnXUF.cjs"),D=require("./vue-ui-skeleton-BZDfN8kq.cjs"),R=require("./Slicer-Ztz1Ij0w.cjs"),H=require("./vue-ui-accordion-D0YEkQP_.cjs"),p=require("./useNestedProp-BbHX6tgE.cjs"),W=require("./PackageVersion-fh_T3pry.cjs"),q=require("./PenAndPaper-JJPSlM7l.cjs"),t=require("vue"),Y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=h.createUid(),U={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:V.DataTable,Shape:P._sfc_main,Title:E._sfc_main,Tooltip:v._sfc_main,UserOptions:z.UserOptions,BaseIcon:M.default,TableSparkline:T.default,Skeleton:D.default,Slicer:R.Slicer,Accordion:H.default,PackageVersion:W._sfc_main,PenAndPaper:q.PenAndPaper},data(){this.dataset.forEach((c,r)=>{[null,void 0].includes(c.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:r})});const l=this.config.downsample&&this.config.downsample.threshold?this.config.downsample.threshold:500,i=Math.max(...this.dataset.map(c=>this.largestTriangleThreeBucketsArray({data:c.series,threshold:l}).length)),o={start:0,end:i};return{themePalettes:h.themePalettes,themes:h.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:h.opacity,useSafeValues:!0,palette:h.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"},isAnnotator:!1,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:h.createUid(),step:0,tableStep:0,titleStep:0,slicer:o,__to__:null,maxX:i,showSparklineTable:!0,segregateStep:0,sliderId:X,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null,showUserOptionsOnChartHover:!1,keepUserOptionState:!0,userOptionsVisible:!0}},watch:{dataset:{handler(l,i){this.maxX=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(l,i){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1,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}},deep:!0}},computed:{optimize(){return{linePlot:this.maxSeries>this.FINAL_CONFIG.line.dot.hideAboveMaxSerieLength}},hasOptionsNoTitle(){return this.FINAL_CONFIG.chart.userOptions.show&&(!this.FINAL_CONFIG.chart.title.show||!this.FINAL_CONFIG.chart.title.text)},minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const l=this.datasetWithIds.filter(r=>!this.segregatedSeries.includes(r.id)),i=Math.max(...l.map(r=>r.series.length)),o=[];for(let r=0;r<i;r+=1)o.push(l.map(e=>e.series[r]||0).reduce((e,m)=>(e||0)+(m||0),0));const c=Math.min(...o);return o.map(r=>r+(c<0?Math.abs(c):0))},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 l=this.lineSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height,autoScaleYLabels:r.autoScaleYLabels})),i=this.barSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height})),o=this.plotSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height})),c=[...l,...i,...o].flatMap(r=>r).length;return[...l,...i,...o].flatMap((r,e)=>({id:r.id,scaleLabel:r.scaleLabel,name:r.name,color:r.color,scale:r.scale,yOffset:r.yOffset,individualHeight:r.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/c*(e+1),yLabels:r.scaleYLabels||r.scale.ticks.map(m=>({y:m>=0?r.zero-r.individualHeight*(m/r.max):r.zero+r.individualHeight*Math.abs(m)/r.max,value:m}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const l=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(l,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){return this.prepareConfig()},set:function(l){return l}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(l=>l.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const l=this.FINAL_CONFIG.chart.highlightArea;return[{...l,span:l.from===l.to?1:l.to<l.from?0:l.to-l.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return[null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)?this.niceScale.min>=0?0:Math.abs(this.niceScale.min):-this.niceScale.min},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,series:this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold}),id:`uniqueId_${i}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((l,i)=>{const o=this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold});return{...l,slotAbsoluteIndex:i,series:o.map(c=>this.isSafeValue(c)?c:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(l.color?l.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`}}):this.dataset},relativeDataset(){return this.safeDataset.map((l,i)=>({...l,series:l.series.map(o=>o+this.relativeZero),absoluteValues:l.series})).filter(l=>!this.segregatedSeries.includes(l.id))},tableSparklineDataset(){return this.relativeDataset.map(l=>{const i=l.absoluteValues.map(o=>[void 0,null].includes(o)?0:o);return{id:l.id,name:l.name,color:l.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((l,i)=>({absoluteIndex:i,...l,series:l.series.map(o=>o+this.relativeZero),absoluteValues:l.series,segregate:()=>this.segregate(l),isSegregated:this.segregatedSeries.includes(l.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="bar").map((l,i)=>{this.checkAutoScaleError(l);const o=Math.min(...l.absoluteValues.filter(g=>![null,void 0].includes(g))),c=Math.max(...l.absoluteValues.filter(g=>![null,void 0].includes(g))),e={ratios:l.absoluteValues.filter(g=>![null,void 0].includes(g)).map(g=>(g-o)/(c-o)),valueMin:o,valueMax:c<0?0:c},m={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues.filter(g=>![void 0,null].includes(g)))>0?0:Math.min(...l.absoluteValues.filter(g=>![null,void 0].includes(g)))},I=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,_=1.0000001,u=this.calculateNiceScaleWithExactExtremes(m.min,m.max===m.min?m.max*_:m.max,I),N=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*_:e.valueMax,I),O=u.min>=0?0:Math.abs(u.min),C=0,y=u.max+O,A=N.max+Math.abs(C),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,b=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,w=this.drawingArea.bottom-f-b*O/y,a=this.drawingArea.bottom-f-b*C/A,n=this.absoluteDataset.filter(g=>g.type==="bar").filter(g=>!this.segregatedSeries.includes(g.id)).length,s=l.series.map((g,S)=>{const F=this.mutableConfig.useIndividualScale?(l.absoluteValues[S]+O)/y:this.ratioToMax(g),k=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*S:this.drawingArea.left+this.slot.bar*i+this.slot.bar*S*n-this.barSlot/2-i*this.barPeriodGap;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(k),y:this.drawingArea.bottom-f-b*F,value:l.absoluteValues[S],zeroPosition:this.checkNaN(w),individualMax:this.checkNaN(y),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),d=l.absoluteValues.map(g=>N.min>=0?(g-Math.abs(N.min))/(N.max-Math.abs(N.min)):(g+Math.abs(N.min))/(N.max+Math.abs(N.min))),G=l.series.map((g,S)=>{const F=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*S:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*S*this.absoluteDataset.filter(k=>k.type==="bar").filter(k=>!this.segregatedSeries.includes(k.id)).length;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(F),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(f)-(this.checkNaN(b)*d[S]||0)),value:l.absoluteValues[S],zeroPosition:this.checkNaN(w),individualMax:this.checkNaN(y),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),x=u.ticks.map(g=>({y:g>=0?w-b*(g/y):w+b*Math.abs(g)/y,value:g,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),L=N.ticks.map(g=>{const S=(g-N.min)/(N.max-N.min);return{y:g>=0?a-b*S:a+b*S,value:g,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:f,autoScaleYLabels:L,individualHeight:b,scaleYLabels:l.autoScaling?L:x,individualScale:l.autoScaling?N:u,individualMax:l.autoScaling?A:y,zeroPosition:l.autoScaling?a:w,plots:l.autoScaling?G:s}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(l=>!this.segregatedSeries.includes(l.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="line").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(F=>![void 0,null].includes(F))),o=Math.max(...l.absoluteValues.filter(F=>![void 0,null].includes(F)))||1,r={ratios:l.absoluteValues.filter(F=>![null,void 0].includes(F)).map(F=>(F-i)/(o-i)),valueMin:i,valueMax:o},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||(Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues))},m=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,_=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,m),u=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*I:r.valueMax,m),N=_.min>=0?0:Math.abs(_.min),O=0,C=_.max+Math.abs(N),y=u.max+Math.abs(O),A=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-A-f*N/C,w=this.drawingArea.bottom-A-f*O/y,a=l.series.map((F,k)=>{const B=this.mutableConfig.useIndividualScale?(l.absoluteValues[k]+Math.abs(N))/C:this.ratioToMax(F);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:this.checkNaN(this.drawingArea.bottom-A-f*B),value:l.absoluteValues[k],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),n=l.absoluteValues.map(F=>u.min>=0?(F-Math.abs(u.min))/(u.max-Math.abs(u.min)):(F+Math.abs(u.min))/(u.max+Math.abs(u.min))),s=l.series.map((F,k)=>[void 0,null].includes(l.absoluteValues[k])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:b,value:l.absoluteValues[k],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[k]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:this.checkNaN(this.drawingArea.bottom-A-(f*n[k]||0)),value:l.absoluteValues[k],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[k]||""}),d=this.createSmoothPath(a),G=this.createSmoothPath(s),x=this.createStraightPath(a),L=this.createStraightPath(s),g=_.ticks.map(F=>({y:F>=0?b-f*(F/C):b+f*Math.abs(F)/C,value:F,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),S=u.ticks.map(F=>{const k=(F-u.min)/(u.max-u.min);return{y:F>=0?w-f*k:w+f*k,value:F,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:A,autoScaleYLabels:S,individualHeight:f,scaleYLabels:l.autoScaling?S:g,individualScale:l.autoScaling?u:_,individualMax:l.autoScaling?y:C,zeroPosition:l.autoScaling?w:b,curve:l.autoScaling?G:d,plots:l.autoScaling?s:a,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?s:a,l.autoScaling?w:b):this.createArea(a):"",straight:l.autoScaling?L:x}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(x=>![null,void 0].includes(x))),o=Math.max(...l.absoluteValues.filter(x=>![null,void 0].includes(x)))||1,r={ratios:l.absoluteValues.filter(x=>![null,void 0].includes(x)).map(x=>(x-i)/(o-i)),valueMin:i,valueMax:o},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues)},m=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,_=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,m),u=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*I:r.valueMax,m),N=_.min>=0?0:Math.abs(_.min),O=0,C=_.max+N,y=u.max+Math.abs(O),A=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-A-f*N/C,w=this.drawingArea.bottom-A-f*O/y,a=l.series.map((x,L)=>{const g=this.mutableConfig.useIndividualScale?(l.absoluteValues[L]+Math.abs(N))/C:this.ratioToMax(x);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*L),y:this.checkNaN(this.drawingArea.bottom-A-f*g),value:l.absoluteValues[L],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[L]||""}}),n=l.absoluteValues.map(x=>u.min>=0?(x-Math.abs(u.min))/(u.max-Math.abs(u.min)):(x+Math.abs(u.min))/(u.max+Math.abs(u.min))),s=l.series.map((x,L)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*L),y:this.checkNaN(this.drawingArea.bottom-A-(f*n[L]||0)),value:l.absoluteValues[L],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[L]||""})),d=_.ticks.map(x=>({y:x>=0?b-f*(x/C):b+f*Math.abs(x)/C,value:x,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),G=u.ticks.map(x=>{const L=(x-u.min)/(u.max-u.min);return{y:x>=0?w-f*L:w+f*L,value:x,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:A,autoScaleYLabels:G,individualHeight:f,scaleYLabels:l.autoScaling?G:d,individualScale:l.autoScaling?u:_,individualMax:l.autoScaling?y:C,zeroPosition:l.autoScaling?w:b,plots:l.autoScaling?s:a}})},drawingArea(){const l=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+l,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+l)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(l=>!this.segregatedSeries.includes(l.id)).map(l=>Math.max(...l.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const l=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return l>0?0:l},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(){const l=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),i=[];for(let o=0;o<l;o+=1)i.push({text:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[o]||String(o),absoluteIndex:o});return i.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(l=>l.type==="bar").filter(l=>!this.segregatedSeries.includes(l.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const l=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/l-this.barPeriodGap*l},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(l=>l!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=this.relativeDataset.map(o=>({label:o.name,color:o.color,type:o.type})),i=[];return this.timeLabels.forEach((o,c)=>{const r=[o.text];this.relativeDataset.forEach(e=>{r.push(this.canShowValue(e.absoluteValues[c])?Number(e.absoluteValues[c].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(r)}),{head:l,body:i}},dataTable(){const l=this.FINAL_CONFIG.table.showSum;let i=[""].concat(this.relativeDataset.map(e=>e.name));l&&(i=i.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 e=0;e<this.maxSeries;e+=1){const m=this.relativeDataset.map(I=>I.absoluteValues[e]??0).reduce((I,_)=>I+_,0);o.push([this.timeLabels[e].text??"-"].concat(this.relativeDataset.map(I=>this.applyDataLabel(I.type==="line"?this.FINAL_CONFIG.line.labels.formatter:I.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,I.absoluteValues[e]??0,this.dataLabel({p:I.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:I.absoluteValues[e]??0,s:I.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(m??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const c={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},r=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:i,body:o,config:c,colNames:r}},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(l=>({slotAbsoluteIndex:l.slotAbsoluteIndex,shape:l.shape||null,name:l.name,color:l.color,type:l.type,value:l.absoluteValues.find((i,o)=>o===this.selectedSerieIndex),comments:l.comments||[],prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix}))},tooltipContent(){let l="",i=this.selectedSeries.map(r=>r.value).filter(r=>this.isSafeValue(r)&&r!==null).reduce((r,e)=>Math.abs(r)+Math.abs(e),0);const o=this.timeLabels[this.selectedSerieIndex],c=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(c)&&this.functionReturnsString(()=>c({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?c({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(o&&o.text&&this.FINAL_CONFIG.chart.tooltip.showTimeLabel&&(l+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${o.text}</div>`),this.selectedSeries.forEach(r=>{if(this.isSafeValue(r.value)){let e="",m="";switch(this.icons[r.type]){case"bar":e=`<svg viewBox="0 0 40 40" height="14" width="14">${this.$slots.pattern?`<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${r.color}" />`:""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${this.$slots.pattern?`url(#pattern_${this.uniqueId}_${r.slotAbsoluteIndex}`:r.color}" /></svg>`;break;case"line":!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)?m=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" />`:r.shape==="triangle"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="square"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="diamond"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="pentagon"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="hexagon"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="star"&&(m=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" points="${h.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${r.color}" />${m}</svg>`;break;case"plot":if(!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)){e=`<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="${r.color}" /></svg>`;break}if(r.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" points="${h.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(r.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}l+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${r.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(r.type==="line"?this.FINAL_CONFIG.line.labels.formatter:r.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,r.value,this.dataLabel({p:r.prefix,v:r.value,s:r.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:r}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${h.dataLabel({v:this.checkNaN(Math.abs(r.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&r.comments.length&&r.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${r.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${r.color}">${r.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}">${l}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(l=>({y:l>=0?this.zero-this.drawingArea.height*this.ratioToMax(l):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(l)),value:l,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.prepareChart(),this.setupSlicer(),document.addEventListener("mousemove",l=>{this.clientPosition={x:l.clientX,y:l.clientY}})},methods:{abbreviate:h.abbreviate,adaptColorToBackground:h.adaptColorToBackground,applyDataLabel:h.applyDataLabel,assignStackRatios:h.assignStackRatios,calcLinearProgression:h.calcLinearProgression,calculateNiceScaleWithExactExtremes:h.calculateNiceScaleWithExactExtremes,checkNaN:h.checkNaN,closestDecimal:h.closestDecimal,convertColorToHex:h.convertColorToHex,convertConfigColors:h.convertConfigColors,convertCustomPalette:h.convertCustomPalette,createCsvContent:h.createCsvContent,createSmoothPath:h.createSmoothPath,createStraightPath:h.createStraightPath,createTSpans:h.createTSpans,dataLabel:h.dataLabel,downloadCsv:h.downloadCsv,error:h.error,forceValidValue:h.forceValidValue,functionReturnsString:h.functionReturnsString,hasDeepProperty:h.hasDeepProperty,isFunction:h.isFunction,isSafeValue:h.isSafeValue,largestTriangleThreeBucketsArray:h.largestTriangleThreeBucketsArray,objectIsEmpty:h.objectIsEmpty,setOpacity:h.setOpacity,shiftHue:h.shiftHue,translateSize:h.translateSize,treeShake:h.treeShake,useMouse:v.useMouse,useNestedProp:p.useNestedProp,setUserOptionsVisibility(l=!1){this.showUserOptionsOnChartHover&&(this.userOptionsVisible=l)},toggleAnnotator(){this.isAnnotator=!this.isAnnotator},selectTimeLabel(l,i){const o=this.relativeDataset.map(c=>({shape:c.shape||null,name:c.name,color:c.color,type:c.type,value:c.absoluteValues.find((r,e)=>e===i),comments:c.comments||[],prefix:c.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:c.suffix||this.FINAL_CONFIG.chart.labels.suffix}));this.$emit("selectTimeLabel",{datapoint:o,absoluteIndex:l.absoluteIndex,label:l.text})},getHighlightAreaPosition(l){const i=this.drawingArea.left+this.drawingArea.width/this.maxSeries*(l.from-this.slicer.start),o=this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span<0?1e-5:this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span;return{x:i<this.drawingArea.left?this.drawingArea.left:i,width:o}},prepareConfig(){const l=h.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return l;const i=this.useNestedProp({userConfig:this.config,defaultConfig:l});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.startIndex")?i.chart.zoom.startIndex=this.config.chart.zoom.startIndex:i.chart.zoom.startIndex=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.endIndex")?i.chart.zoom.endIndex=this.config.chart.zoom.endIndex:i.chart.zoom.endIndex=null,i.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((l,i)=>{[null,void 0].includes(l.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(l=>{l.series.forEach((i,o)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-CHCA909R.cjs"),V=require("./DataTable-ZowHAjXC.cjs"),E=require("./Title-bDp_4dQV.cjs"),v=require("./Tooltip-fEuHWstj.cjs"),z=require("./usePrinter-xicwiw8r.cjs"),P=require("./Shape-B6dlN2je.cjs"),M=require("./BaseIcon-BKYwMJ4Y.cjs"),T=require("./vue-ui-table-sparkline-BqGa1gwS.cjs"),D=require("./vue-ui-skeleton-DsMIGHB3.cjs"),R=require("./Slicer-BIzpsKb9.cjs"),H=require("./vue-ui-accordion-B4PyxVUm.cjs"),p=require("./useNestedProp--1nKK7i0.cjs"),W=require("./PackageVersion-Cun_qdX7.cjs"),q=require("./PenAndPaper-u46MyY7W.cjs"),t=require("vue"),Y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=h.createUid(),U={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:V.DataTable,Shape:P._sfc_main,Title:E._sfc_main,Tooltip:v._sfc_main,UserOptions:z.UserOptions,BaseIcon:M.default,TableSparkline:T.default,Skeleton:D.default,Slicer:R.Slicer,Accordion:H.default,PackageVersion:W._sfc_main,PenAndPaper:q.PenAndPaper},data(){this.dataset.forEach((c,r)=>{[null,void 0].includes(c.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:r})});const l=this.config.downsample&&this.config.downsample.threshold?this.config.downsample.threshold:500,i=Math.max(...this.dataset.map(c=>this.largestTriangleThreeBucketsArray({data:c.series,threshold:l}).length)),o={start:0,end:i};return{themePalettes:h.themePalettes,themes:h.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:h.opacity,useSafeValues:!0,palette:h.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"},isAnnotator:!1,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:h.createUid(),step:0,tableStep:0,titleStep:0,slicer:o,__to__:null,maxX:i,showSparklineTable:!0,segregateStep:0,sliderId:X,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null,showUserOptionsOnChartHover:!1,keepUserOptionState:!0,userOptionsVisible:!0}},watch:{dataset:{handler(l,i){this.maxX=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(l,i){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1,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}},deep:!0}},computed:{optimize(){return{linePlot:this.maxSeries>this.FINAL_CONFIG.line.dot.hideAboveMaxSerieLength}},hasOptionsNoTitle(){return this.FINAL_CONFIG.chart.userOptions.show&&(!this.FINAL_CONFIG.chart.title.show||!this.FINAL_CONFIG.chart.title.text)},minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const l=this.datasetWithIds.filter(r=>!this.segregatedSeries.includes(r.id)),i=Math.max(...l.map(r=>r.series.length)),o=[];for(let r=0;r<i;r+=1)o.push(l.map(e=>e.series[r]||0).reduce((e,m)=>(e||0)+(m||0),0));const c=Math.min(...o);return o.map(r=>r+(c<0?Math.abs(c):0))},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 l=this.lineSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height,autoScaleYLabels:r.autoScaleYLabels})),i=this.barSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height})),o=this.plotSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height})),c=[...l,...i,...o].flatMap(r=>r).length;return[...l,...i,...o].flatMap((r,e)=>({id:r.id,scaleLabel:r.scaleLabel,name:r.name,color:r.color,scale:r.scale,yOffset:r.yOffset,individualHeight:r.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/c*(e+1),yLabels:r.scaleYLabels||r.scale.ticks.map(m=>({y:m>=0?r.zero-r.individualHeight*(m/r.max):r.zero+r.individualHeight*Math.abs(m)/r.max,value:m}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const l=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(l,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){return this.prepareConfig()},set:function(l){return l}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(l=>l.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const l=this.FINAL_CONFIG.chart.highlightArea;return[{...l,span:l.from===l.to?1:l.to<l.from?0:l.to-l.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return[null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)?this.niceScale.min>=0?0:Math.abs(this.niceScale.min):-this.niceScale.min},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,series:this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold}),id:`uniqueId_${i}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((l,i)=>{const o=this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold});return{...l,slotAbsoluteIndex:i,series:o.map(c=>this.isSafeValue(c)?c:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(l.color?l.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`}}):this.dataset},relativeDataset(){return this.safeDataset.map((l,i)=>({...l,series:l.series.map(o=>o+this.relativeZero),absoluteValues:l.series})).filter(l=>!this.segregatedSeries.includes(l.id))},tableSparklineDataset(){return this.relativeDataset.map(l=>{const i=l.absoluteValues.map(o=>[void 0,null].includes(o)?0:o);return{id:l.id,name:l.name,color:l.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((l,i)=>({absoluteIndex:i,...l,series:l.series.map(o=>o+this.relativeZero),absoluteValues:l.series,segregate:()=>this.segregate(l),isSegregated:this.segregatedSeries.includes(l.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="bar").map((l,i)=>{this.checkAutoScaleError(l);const o=Math.min(...l.absoluteValues.filter(g=>![null,void 0].includes(g))),c=Math.max(...l.absoluteValues.filter(g=>![null,void 0].includes(g))),e={ratios:l.absoluteValues.filter(g=>![null,void 0].includes(g)).map(g=>(g-o)/(c-o)),valueMin:o,valueMax:c<0?0:c},m={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues.filter(g=>![void 0,null].includes(g)))>0?0:Math.min(...l.absoluteValues.filter(g=>![null,void 0].includes(g)))},I=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,_=1.0000001,u=this.calculateNiceScaleWithExactExtremes(m.min,m.max===m.min?m.max*_:m.max,I),N=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*_:e.valueMax,I),O=u.min>=0?0:Math.abs(u.min),C=0,y=u.max+O,A=N.max+Math.abs(C),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,b=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,w=this.drawingArea.bottom-f-b*O/y,a=this.drawingArea.bottom-f-b*C/A,n=this.absoluteDataset.filter(g=>g.type==="bar").filter(g=>!this.segregatedSeries.includes(g.id)).length,s=l.series.map((g,S)=>{const F=this.mutableConfig.useIndividualScale?(l.absoluteValues[S]+O)/y:this.ratioToMax(g),k=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*S:this.drawingArea.left+this.slot.bar*i+this.slot.bar*S*n-this.barSlot/2-i*this.barPeriodGap;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(k),y:this.drawingArea.bottom-f-b*F,value:l.absoluteValues[S],zeroPosition:this.checkNaN(w),individualMax:this.checkNaN(y),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),d=l.absoluteValues.map(g=>N.min>=0?(g-Math.abs(N.min))/(N.max-Math.abs(N.min)):(g+Math.abs(N.min))/(N.max+Math.abs(N.min))),G=l.series.map((g,S)=>{const F=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*S:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*S*this.absoluteDataset.filter(k=>k.type==="bar").filter(k=>!this.segregatedSeries.includes(k.id)).length;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(F),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(f)-(this.checkNaN(b)*d[S]||0)),value:l.absoluteValues[S],zeroPosition:this.checkNaN(w),individualMax:this.checkNaN(y),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),x=u.ticks.map(g=>({y:g>=0?w-b*(g/y):w+b*Math.abs(g)/y,value:g,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),L=N.ticks.map(g=>{const S=(g-N.min)/(N.max-N.min);return{y:g>=0?a-b*S:a+b*S,value:g,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:f,autoScaleYLabels:L,individualHeight:b,scaleYLabels:l.autoScaling?L:x,individualScale:l.autoScaling?N:u,individualMax:l.autoScaling?A:y,zeroPosition:l.autoScaling?a:w,plots:l.autoScaling?G:s}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(l=>!this.segregatedSeries.includes(l.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="line").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(F=>![void 0,null].includes(F))),o=Math.max(...l.absoluteValues.filter(F=>![void 0,null].includes(F)))||1,r={ratios:l.absoluteValues.filter(F=>![null,void 0].includes(F)).map(F=>(F-i)/(o-i)),valueMin:i,valueMax:o},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||(Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues))},m=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,_=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,m),u=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*I:r.valueMax,m),N=_.min>=0?0:Math.abs(_.min),O=0,C=_.max+Math.abs(N),y=u.max+Math.abs(O),A=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-A-f*N/C,w=this.drawingArea.bottom-A-f*O/y,a=l.series.map((F,k)=>{const B=this.mutableConfig.useIndividualScale?(l.absoluteValues[k]+Math.abs(N))/C:this.ratioToMax(F);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:this.checkNaN(this.drawingArea.bottom-A-f*B),value:l.absoluteValues[k],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),n=l.absoluteValues.map(F=>u.min>=0?(F-Math.abs(u.min))/(u.max-Math.abs(u.min)):(F+Math.abs(u.min))/(u.max+Math.abs(u.min))),s=l.series.map((F,k)=>[void 0,null].includes(l.absoluteValues[k])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:b,value:l.absoluteValues[k],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[k]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:this.checkNaN(this.drawingArea.bottom-A-(f*n[k]||0)),value:l.absoluteValues[k],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[k]||""}),d=this.createSmoothPath(a),G=this.createSmoothPath(s),x=this.createStraightPath(a),L=this.createStraightPath(s),g=_.ticks.map(F=>({y:F>=0?b-f*(F/C):b+f*Math.abs(F)/C,value:F,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),S=u.ticks.map(F=>{const k=(F-u.min)/(u.max-u.min);return{y:F>=0?w-f*k:w+f*k,value:F,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:A,autoScaleYLabels:S,individualHeight:f,scaleYLabels:l.autoScaling?S:g,individualScale:l.autoScaling?u:_,individualMax:l.autoScaling?y:C,zeroPosition:l.autoScaling?w:b,curve:l.autoScaling?G:d,plots:l.autoScaling?s:a,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?s:a,l.autoScaling?w:b):this.createArea(a):"",straight:l.autoScaling?L:x}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(x=>![null,void 0].includes(x))),o=Math.max(...l.absoluteValues.filter(x=>![null,void 0].includes(x)))||1,r={ratios:l.absoluteValues.filter(x=>![null,void 0].includes(x)).map(x=>(x-i)/(o-i)),valueMin:i,valueMax:o},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues)},m=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,_=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,m),u=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*I:r.valueMax,m),N=_.min>=0?0:Math.abs(_.min),O=0,C=_.max+N,y=u.max+Math.abs(O),A=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-A-f*N/C,w=this.drawingArea.bottom-A-f*O/y,a=l.series.map((x,L)=>{const g=this.mutableConfig.useIndividualScale?(l.absoluteValues[L]+Math.abs(N))/C:this.ratioToMax(x);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*L),y:this.checkNaN(this.drawingArea.bottom-A-f*g),value:l.absoluteValues[L],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[L]||""}}),n=l.absoluteValues.map(x=>u.min>=0?(x-Math.abs(u.min))/(u.max-Math.abs(u.min)):(x+Math.abs(u.min))/(u.max+Math.abs(u.min))),s=l.series.map((x,L)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*L),y:this.checkNaN(this.drawingArea.bottom-A-(f*n[L]||0)),value:l.absoluteValues[L],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[L]||""})),d=_.ticks.map(x=>({y:x>=0?b-f*(x/C):b+f*Math.abs(x)/C,value:x,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),G=u.ticks.map(x=>{const L=(x-u.min)/(u.max-u.min);return{y:x>=0?w-f*L:w+f*L,value:x,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:A,autoScaleYLabels:G,individualHeight:f,scaleYLabels:l.autoScaling?G:d,individualScale:l.autoScaling?u:_,individualMax:l.autoScaling?y:C,zeroPosition:l.autoScaling?w:b,plots:l.autoScaling?s:a}})},drawingArea(){const l=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+l,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+l)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(l=>!this.segregatedSeries.includes(l.id)).map(l=>Math.max(...l.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const l=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return l>0?0:l},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(){const l=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),i=[];for(let o=0;o<l;o+=1)i.push({text:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[o]||String(o),absoluteIndex:o});return i.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(l=>l.type==="bar").filter(l=>!this.segregatedSeries.includes(l.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const l=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/l-this.barPeriodGap*l},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(l=>l!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=this.relativeDataset.map(o=>({label:o.name,color:o.color,type:o.type})),i=[];return this.timeLabels.forEach((o,c)=>{const r=[o.text];this.relativeDataset.forEach(e=>{r.push(this.canShowValue(e.absoluteValues[c])?Number(e.absoluteValues[c].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(r)}),{head:l,body:i}},dataTable(){const l=this.FINAL_CONFIG.table.showSum;let i=[""].concat(this.relativeDataset.map(e=>e.name));l&&(i=i.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 e=0;e<this.maxSeries;e+=1){const m=this.relativeDataset.map(I=>I.absoluteValues[e]??0).reduce((I,_)=>I+_,0);o.push([this.timeLabels[e].text??"-"].concat(this.relativeDataset.map(I=>this.applyDataLabel(I.type==="line"?this.FINAL_CONFIG.line.labels.formatter:I.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,I.absoluteValues[e]??0,this.dataLabel({p:I.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:I.absoluteValues[e]??0,s:I.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(m??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const c={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},r=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:i,body:o,config:c,colNames:r}},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(l=>({slotAbsoluteIndex:l.slotAbsoluteIndex,shape:l.shape||null,name:l.name,color:l.color,type:l.type,value:l.absoluteValues.find((i,o)=>o===this.selectedSerieIndex),comments:l.comments||[],prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix}))},tooltipContent(){let l="",i=this.selectedSeries.map(r=>r.value).filter(r=>this.isSafeValue(r)&&r!==null).reduce((r,e)=>Math.abs(r)+Math.abs(e),0);const o=this.timeLabels[this.selectedSerieIndex],c=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(c)&&this.functionReturnsString(()=>c({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?c({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(o&&o.text&&this.FINAL_CONFIG.chart.tooltip.showTimeLabel&&(l+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${o.text}</div>`),this.selectedSeries.forEach(r=>{if(this.isSafeValue(r.value)){let e="",m="";switch(this.icons[r.type]){case"bar":e=`<svg viewBox="0 0 40 40" height="14" width="14">${this.$slots.pattern?`<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${r.color}" />`:""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${this.$slots.pattern?`url(#pattern_${this.uniqueId}_${r.slotAbsoluteIndex}`:r.color}" /></svg>`;break;case"line":!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)?m=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" />`:r.shape==="triangle"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="square"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="diamond"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="pentagon"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="hexagon"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="star"&&(m=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" points="${h.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${r.color}" />${m}</svg>`;break;case"plot":if(!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)){e=`<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="${r.color}" /></svg>`;break}if(r.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" points="${h.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(r.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}l+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${r.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(r.type==="line"?this.FINAL_CONFIG.line.labels.formatter:r.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,r.value,this.dataLabel({p:r.prefix,v:r.value,s:r.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:r}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${h.dataLabel({v:this.checkNaN(Math.abs(r.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&r.comments.length&&r.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${r.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${r.color}">${r.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}">${l}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(l=>({y:l>=0?this.zero-this.drawingArea.height*this.ratioToMax(l):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(l)),value:l,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.prepareChart(),this.setupSlicer(),document.addEventListener("mousemove",l=>{this.clientPosition={x:l.clientX,y:l.clientY}})},methods:{abbreviate:h.abbreviate,adaptColorToBackground:h.adaptColorToBackground,applyDataLabel:h.applyDataLabel,assignStackRatios:h.assignStackRatios,calcLinearProgression:h.calcLinearProgression,calculateNiceScaleWithExactExtremes:h.calculateNiceScaleWithExactExtremes,checkNaN:h.checkNaN,closestDecimal:h.closestDecimal,convertColorToHex:h.convertColorToHex,convertConfigColors:h.convertConfigColors,convertCustomPalette:h.convertCustomPalette,createCsvContent:h.createCsvContent,createSmoothPath:h.createSmoothPath,createStraightPath:h.createStraightPath,createTSpans:h.createTSpans,dataLabel:h.dataLabel,downloadCsv:h.downloadCsv,error:h.error,forceValidValue:h.forceValidValue,functionReturnsString:h.functionReturnsString,hasDeepProperty:h.hasDeepProperty,isFunction:h.isFunction,isSafeValue:h.isSafeValue,largestTriangleThreeBucketsArray:h.largestTriangleThreeBucketsArray,objectIsEmpty:h.objectIsEmpty,setOpacity:h.setOpacity,shiftHue:h.shiftHue,translateSize:h.translateSize,treeShake:h.treeShake,useMouse:v.useMouse,useNestedProp:p.useNestedProp,setUserOptionsVisibility(l=!1){this.showUserOptionsOnChartHover&&(this.userOptionsVisible=l)},toggleAnnotator(){this.isAnnotator=!this.isAnnotator},selectTimeLabel(l,i){const o=this.relativeDataset.map(c=>({shape:c.shape||null,name:c.name,color:c.color,type:c.type,value:c.absoluteValues.find((r,e)=>e===i),comments:c.comments||[],prefix:c.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:c.suffix||this.FINAL_CONFIG.chart.labels.suffix}));this.$emit("selectTimeLabel",{datapoint:o,absoluteIndex:l.absoluteIndex,label:l.text})},getHighlightAreaPosition(l){const i=this.drawingArea.left+this.drawingArea.width/this.maxSeries*(l.from-this.slicer.start),o=this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span<0?1e-5:this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span;return{x:i<this.drawingArea.left?this.drawingArea.left:i,width:o}},prepareConfig(){const l=h.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return l;const i=this.useNestedProp({userConfig:this.config,defaultConfig:l});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.startIndex")?i.chart.zoom.startIndex=this.config.chart.zoom.startIndex:i.chart.zoom.startIndex=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.endIndex")?i.chart.zoom.endIndex=this.config.chart.zoom.endIndex:i.chart.zoom.endIndex=null,i.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((l,i)=>{[null,void 0].includes(l.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(l=>{l.series.forEach((i,o)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
2
2
  -----> The serie '${l.name}' contains the value '${i}' at index ${o}.
3
3
  '${i}' was converted to null to allow the chart to display.`)})}),this.showUserOptionsOnChartHover=this.FINAL_CONFIG.chart.userOptions.showOnChartHover,this.keepUserOptionState=this.FINAL_CONFIG.chart.userOptions.keepStateOnChartLeave,this.userOptionsVisible=!this.FINAL_CONFIG.chart.userOptions.showOnChartHover,this.mutableConfig={dataLabels:{show:!0},showTooltip:this.FINAL_CONFIG.chart.tooltip.show===!0,showTable:this.FINAL_CONFIG.showTable===!0,isStacked:this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,useIndividualScale:this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},this.FINAL_CONFIG.responsive){const i=this.$refs.chart.parentNode,{height:o,width:c}=i.getBoundingClientRect();let r=null,e=0;this.FINAL_CONFIG.chart.title.show&&(r=this.$refs.chartTitle,e=r.getBoundingClientRect().height);let m=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(m=this.$refs.chartSlicer.$el,I=m.getBoundingClientRect().height);let _=null,u=0;this.FINAL_CONFIG.chart.legend.show&&(_=this.$refs.chartLegend,u=_.getBoundingClientRect().height);let N=0;this.$refs.source&&(N=this.$refs.source.getBoundingClientRect().height);let O=0;this.$refs.noTitle&&(O=this.$refs.noTitle.getBoundingClientRect().height),this.height=o-e-u-I-N-O,this.width=c,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(y=>{for(const A of y)this.$refs.chartTitle&&(e=this.$refs.chartTitle.getBoundingClientRect().height),this.$refs.chartSlicer&&this.$refs.chartSlicer.$el&&(I=this.$refs.chartSlicer.$el.getBoundingClientRect().height),this.$refs.chartLegend&&(u=this.$refs.chartLegend.getBoundingClientRect().height),this.$refs.source&&(N=this.$refs.source.getBoundingClientRect().height),requestAnimationFrame(()=>{this.height=A.contentBoxSize[0].blockSize-e-u-I-N-24,this.width=A.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()})}).observe(i)}else this.height=this.FINAL_CONFIG.chart.height,this.width=this.FINAL_CONFIG.chart.width,this.viewBox=`0 0 ${this.width} ${this.height}`,this.fontSizes.dataLabels=this.FINAL_CONFIG.chart.grid.labels.fontSize,this.fontSizes.yAxis=this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,this.fontSizes.xAxis=this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,this.fontSizes.plotLabels=this.FINAL_CONFIG.chart.labels.fontSize,this.plotRadii.plot=this.FINAL_CONFIG.plot.radius,this.plotRadii.line=this.FINAL_CONFIG.line.radius},selectMinimapIndex(l){this.selectedMinimapIndex=l},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(l){l.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${l.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: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(l){if(!l[0])return[-10,-10,"",-10,-10];const i={x:l[0].x,y:this.zero},o={x:l.at(-1).x,y:this.zero},c=[];return l.forEach(r=>{c.push(`${r.x},${r.y} `)}),[i.x,i.y,...c,o.x,o.y].toString()},createIndividualArea(l,i){if(!l[0])return[-10,-10,"",-10,-10];const o={x:l[0]?l[0].x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},c={x:l.at(-1)?l.at(-1).x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},r=[];return l.filter(e=>!!e).forEach(e=>{r.push(`${e.x},${e.y} `)}),[o.x,o.y,...r,c.x,c.y].toString()},createStar:h.createStar,createPolygonPath:h.createPolygonPath,fillArray(l,i){let o=Array(l).fill(0);for(let c=0;c<i.length&&c<l;c+=1)o[c]=i[c];return o},async setupSlicer(){(this.FINAL_CONFIG.chart.zoom.startIndex!==null||this.FINAL_CONFIG.chart.zoom.endIndex!==null)&&this.$refs.chartSlicer?(this.FINAL_CONFIG.chart.zoom.startIndex!==null&&(await this.$nextTick(),await this.$nextTick(),this.$refs.chartSlicer.setStartValue(this.FINAL_CONFIG.chart.zoom.startIndex)),this.FINAL_CONFIG.chart.zoom.endIndex!==null&&(await this.$nextTick(),await this.$nextTick(),this.$refs.chartSlicer.setEndValue(this.validSlicerEnd(this.FINAL_CONFIG.chart.zoom.endIndex+1)))):(this.slicer={start:0,end:Math.max(...this.dataset.map(l=>this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length))},this.slicerStep+=1)},refreshSlicer(){this.setupSlicer()},validSlicerEnd(l){const i=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length));return l>i?i:l<0||this.FINAL_CONFIG.chart.zoom.startIndex!==null&&l<this.FINAL_CONFIG.chart.zoom.startIndex?this.FINAL_CONFIG.chart.zoom.startIndex!==null?this.FINAL_CONFIG.chart.zoom.startIndex+1:1:l},calcRectHeight(l){const i=![null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)&&this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin>0&&this.min>=0?this.drawingArea.bottom:this.zero;return l.value>=0?this.checkNaN(i-l.y<=0?1e-5:i-l.y):this.checkNaN(l.y-this.zero<=0?1e-5:l.y-this.zero)},calcIndividualHeight(l){return l.value>=0?this.checkNaN(l.zeroPosition-l.y<=0?1e-5:l.zeroPosition-l.y):this.checkNaN(l.y-l.zeroPosition<=0?1e-5:l.zeroPosition-l.y)},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(l){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?l.x+this.drawingArea.width/this.maxSeries*.05:l.x+this.slot.bar/2},calcRectY(l){return l.value>=0?l.y:this.zero},calcIndividualRectY(l){return l.value>=0?l.y:[null,void 0,NaN,1/0,-1/0].includes(l.zeroPosition)?0:l.zeroPosition},canShowValue(l){return![null,void 0,NaN,1/0,-1/0].includes(l)},findClosestValue(l,i){let o=i[0],c=Math.abs(l-i[0]);for(let r=1;r<i.length;r+=1){const e=Math.abs(l-i[r]);e<c&&i[r]<l&&(o=i[r],c=e)}return o},ratioToMax(l){return l/(this.canShowValue(this.absoluteMax)?this.absoluteMax:1)},selectX(l){this.$emit("selectX",{dataset:this.relativeDataset.map(i=>({name:i.name,value:[null,void 0,NaN].includes(i.absoluteValues[l])?null:i.absoluteValues[l],color:i.color,type:i.type})),index:l,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l]})},getData(){return this.absoluteDataset.map(l=>({values:l.absoluteValues,color:l.color,name:l.name,type:l.type}))},segregate(l){if(this.segregatedSeries.includes(l.id))this.segregatedSeries=this.segregatedSeries.filter(i=>i!==l.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(l.id)}this.$emit("selectLegend",this.relativeDataset.map(i=>({name:i.name,values:i.absoluteValues,color:i.color,type:i.type}))),this.segregateStep+=1},toggleTooltipVisibility(l,i=null){this.isTooltip=l,l?this.selectedSerieIndex=i:this.selectedSerieIndex=null},toggleFullscreen(l){this.isFullscreen=l,this.step+=1},showSpinnerPdf(){this.isPrinting=!0},async generatePdf(){this.showSpinnerPdf(),clearTimeout(this.__to__),this.isPrinting=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./pdf-9cRTLjY8.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})}catch(l){console.error("Error generating PDF:",l)}finally{this.isPrinting=!1}},100)},generateCsv(){const l=[[this.FINAL_CONFIG.chart.title.text],[this.FINAL_CONFIG.chart.title.subtitle.text],[""]],i=["",...this.table.head.map(e=>e.label)],o=this.table.body,c=l.concat([i]).concat(o),r=this.createCsvContent(c);this.downloadCsv({csvContent:r,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},async generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.isImaging=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./img-BFCs759q.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png"})}catch(l){console.error("Error generating image:",l)}finally{this.isImaging=!1}},100)}}},Z=["id"],J={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%; background:transparent"},K=["viewBox"],Q=["x","y","width","height"],j={key:1},$={class:"vue-ui-xy-grid"},ee=["stroke","x1","x2","y1","y2"],te=["stroke","x1","x2","y1","y2"],re={key:1},le=["x1","x2","y1","y2","stroke"],ae=["x1","x2","y1","y2","stroke"],ie=["x1","x2","y1","y2","stroke"],se={key:3},ne=["x1","x2","y1","y2","stroke"],oe=["id"],ce=["stop-color"],he=["stop-color"],de=["stop-color"],ue=["id"],me=["stop-color"],ge=["stop-color"],Ne=["stop-color"],fe=["id"],Ie=["stop-color"],xe=["stop-color"],Fe=["id"],be=["stop-color"],ke=["stop-color"],_e=["id"],Ae=["stop-color"],Ce=["stop-color"],ye=["x","y","height","width","fill"],Le=["x","y","width"],Se=["x","y","height","width","fill"],we=["x","y","height","width","rx","fill","stroke","stroke-width"],Oe=["x","y","height","width","rx","fill","stroke","stroke-width"],Ge=["width","x","y"],ve={key:0},pe=["id"],Be=["fill"],Ve=["x1","x2","y1","y2","stroke","marker-end"],Ee=["x","y","font-size","fill"],ze=["stroke","x1","x2","y1","y2"],Pe={key:2},Me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Te=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],De={key:4},Re=["x1","x2","y1","y2","stroke","stroke-width"],He=["fill","font-size","transform"],We=["x1","x2","y1","y2","stroke"],qe=["x","y","font-size","fill"],Ye=["x1","x2","y1","y2","stroke"],Xe=["x","y","font-size","fill"],Ue=["width","x","y"],Ze={style:{width:"100%"}},Je={key:0},Ke=["id"],Qe=["fill"],je=["x1","x2","y1","y2","stroke","marker-end"],$e=["x","y","font-size","fill"],et=["d","stroke","stroke-width","stroke-dasharray"],tt=["d","stroke","stroke-width","stroke-dasharray"],rt={key:5},lt={key:0},at=["d","fill"],it=["d","fill"],st=["d","fill"],nt=["d","fill"],ot=["d","stroke","stroke-width","stroke-dasharray"],ct=["d","stroke","stroke-width","stroke-dasharray"],ht=["width","x","y"],dt={style:{width:"100%"}},ut={key:3},mt=["id"],gt=["fill"],Nt=["x1","x2","y1","y2","stroke","marker-end"],ft=["x","y","font-size","fill"],It={key:6},xt=["x","y","font-size","fill"],Ft=["x","y","font-size","fill","font-weight"],bt={key:7},kt=["x","y","font-size","fill"],_t=["x","y"],At=["x","y"],Ct={key:8},yt=["x","y","font-size","fill"],Lt=["x","y"],St=["x","y"],wt=["x","y","font-size","fill","innerHTML"],Ot=["x","y","font-size","fill","innerHTML"],Gt=["x","y","font-size","fill","innerHTML"],vt=["x","y","font-size","fill","innerHTML"],pt=["x","y","width","height","fill","onMouseenter"],Bt=["font-size","fill","transform"],Vt=["x","y","font-size","fill"],Et={key:10},zt=["text-anchor","font-size","fill","transform","onClick"],Pt=["x","y","height","width","onMouseenter","onClick"],Mt={key:11,style:{"pointer-events":"none"}},Tt=["x","y"],Dt=["cx","cy","r","fill"],Rt={key:5,class:"vue-data-ui-watermark"},Ht=["onClick"],Wt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},qt=["stroke","fill"],Yt={key:1,viewBox:"0 0 40 40",height:"14",width:"14"},Xt=["fill"],Ut=["fill"],Zt={key:2,viewBox:"0 0 12 12",height:"14",width:"14"},Jt={key:9,ref:"chartLegend"},Kt={key:10,ref:"source",dir:"auto"},Qt={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},jt=["innerHTML"];function $t(l,i,o,c,r,e){const m=t.resolveComponent("PenAndPaper"),I=t.resolveComponent("Title"),_=t.resolveComponent("UserOptions"),u=t.resolveComponent("PackageVersion"),N=t.resolveComponent("Shape"),O=t.resolveComponent("Skeleton"),C=t.resolveComponent("Slicer"),y=t.resolveComponent("Tooltip"),A=t.resolveComponent("BaseIcon"),f=t.resolveComponent("TableSparkline"),b=t.resolveComponent("DataTable"),w=t.resolveComponent("Accordion");return t.openBlock(),t.createElementBlock("div",{id:`vue-ui-xy_${r.uniqueId}`,class:t.normalizeClass(`vue-ui-xy ${r.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${e.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:t.normalizeStyle(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive?"height: 100%":""}`),onMouseenter:i[7]||(i[7]=()=>e.setUserOptionsVisibility(!0)),onMouseleave:i[8]||(i[8]=()=>e.setUserOptionsVisibility(!1))},[e.FINAL_CONFIG.chart.userOptions.buttons.annotator?(t.openBlock(),t.createBlock(m,{key:0,parent:l.$refs.chart,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,active:r.isAnnotator,onClose:e.toggleAnnotator},null,8,["parent","backgroundColor","color","active","onClose"])):t.createCommentVNode("",!0),e.hasOptionsNoTitle?(t.openBlock(),t.createElementBlock("div",J,null,512)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.title.show?(t.openBlock(),t.createElementBlock("div",{key:2,ref:"chartTitle",class:"vue-ui-xy-title",style:t.normalizeStyle(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[(t.openBlock(),t.createBlock(I,{key:`title_${r.titleStep}`,config:{title:{cy:"xy-div-title",...e.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...e.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"]))],4)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.userOptions.show&&e.isDataset&&(r.keepUserOptionState||r.userOptionsVisible)?(t.openBlock(),t.createBlock(_,{ref:"defails",key:`user_options_${r.step}`,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,isPrinting:r.isPrinting,isImaging:r.isImaging,uid:r.uniqueId,hasTooltip:e.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&e.FINAL_CONFIG.chart.tooltip.show,hasPdf:e.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:e.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:e.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:e.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:e.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:o.dataset.length>1&&e.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:r.mutableConfig.isStacked,isFullscreen:r.isFullscreen,chartElement:l.$refs.chart,position:e.FINAL_CONFIG.chart.userOptions.position,isTooltip:r.mutableConfig.showTooltip,titles:{...e.FINAL_CONFIG.chart.userOptions.buttonTitles},hasAnnotator:e.FINAL_CONFIG.chart.userOptions.buttons.annotator,isAnnotation:r.isAnnotator,onToggleFullscreen:e.toggleFullscreen,onGeneratePdf:e.generatePdf,onGenerateCsv:e.generateCsv,onGenerateImage:e.generateImage,onToggleTable:e.toggleTable,onToggleLabels:e.toggleLabels,onToggleStack:e.toggleStack,onToggleTooltip:e.toggleTooltip,onToggleAnnotator:e.toggleAnnotator,style:t.normalizeStyle({visibility:r.keepUserOptionState?r.userOptionsVisible?"visible":"hidden":"visible"})},t.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionStack?{name:"optionStack",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:t.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[t.renderSlot(l.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:t.withCtx(({toggleAnnotator:a,isAnnotator:n})=>[t.renderSlot(l.$slots,"optionAnnotator",t.normalizeProps(t.guardReactiveProps({toggleAnnotator:a,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip","onToggleAnnotator","style"])):t.createCommentVNode("",!0),e.isDataset?(t.openBlock(),t.createElementBlock("svg",{key:4,xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass([{"vue-data-ui-fullscreen--on":r.isFullscreen,"vue-data-ui-fulscreen--off":!r.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:r.viewBox,style:t.normalizeStyle(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[t.createVNode(u),l.$slots["chart-background"]?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.xPadding<0?0:e.drawingArea.left+e.xPadding,y:e.drawingArea.top,width:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries)<0?0:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries),height:e.drawingArea.height<0?0:e.drawingArea.height,style:{pointerEvents:"none"}},[t.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Q)):t.createCommentVNode("",!0),e.maxSeries>0?(t.openBlock(),t.createElementBlock("g",j,[t.createElementVNode("g",$,[e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(e.drawingArea.bottom),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-linecap":"round"},null,8,ee)):t.createCommentVNode("",!0),r.mutableConfig.useIndividualScale?e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[a.id===r.selectedScale&&a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.yLabels,n=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(n.y),y2:e.forceValidValue(n.y),stroke:a.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,ae))),256)):a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(a.yLabels,n=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(n.y),y2:e.forceValidValue(n.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,ie))),256)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left+e.xPadding,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-linecap":"round"},null,8,te)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(),t.createElementBlock("g",re,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yLabels,a=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(a.y),y2:e.forceValidValue(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,le))),256))])):t.createCommentVNode("",!0)],64)),e.FINAL_CONFIG.chart.grid.showVerticalLines?(t.openBlock(),t.createElementBlock("g",se,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries+(e.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(a,n)=>(t.openBlock(),t.createElementBlock("line",{key:`grid_vertical_line_${n}`,x1:e.drawingArea.width/e.maxSeries*n+e.drawingArea.left+e.xPadding,x2:e.drawingArea.width/e.maxSeries*n+e.drawingArea.left+e.xPadding,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-width":"0.5",stroke:e.FINAL_CONFIG.chart.grid.stroke},null,8,ne))),128))])):t.createCommentVNode("",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,n)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_rect_${n}`},[t.createElementVNode("linearGradient",{id:`rectGradient_pos_${n}_${r.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,ce),t.createElementVNode("stop",{offset:"62%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,he),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,de)],8,oe),t.createElementVNode("linearGradient",{id:`rectGradient_neg_${n}_${r.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,me),t.createElementVNode("stop",{offset:"38%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,ge),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ne)],8,ue)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_plot_${n}`},[t.createElementVNode("radialGradient",{id:`plotGradient_${n}_${r.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,Ie),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,xe)],8,fe)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_line_${n}`},[t.createElementVNode("radialGradient",{id:`lineGradient_${n}_${r.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,be),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ke)],8,Fe),t.createElementVNode("linearGradient",{id:`areaGradient_${n}_${r.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.setOpacity(e.shiftHue(a.color,.03),e.FINAL_CONFIG.line.area.opacity)}`},null,8,Ae),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)}`},null,8,Ce)],8,_e)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.highlightAreas,a=>(t.openBlock(),t.createElementBlock("g",null,[a.show?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.span,(n,s)=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("rect",{style:t.normalizeStyle({transition:"none",opacity:a.from+s>=r.slicer.start&&a.from+s<=r.slicer.end-1?1:0}),x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+s-r.slicer.start),y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:e.setOpacity(a.color,a.opacity)},null,12,ye),a.caption.text&&s===0?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+s-r.slicer.start)-(a.caption.width==="auto"?0:a.caption.width/2-e.drawingArea.width/e.maxSeries*a.span/2),y:e.drawingArea.top+a.caption.offsetY,style:t.normalizeStyle({overflow:"visible",opacity:a.to>=r.slicer.start&&a.from<r.slicer.end?1:0}),height:"1",width:a.caption.width==="auto"?e.drawingArea.width/e.maxSeries*a.span:a.caption.width},[t.createElementVNode("div",{style:t.normalizeStyle(`padding:${a.caption.padding}px;text-align:${a.caption.textAlign};font-size:${a.caption.fontSize}px;color:${a.caption.color};font-weight:${a.caption.bold?"bold":"normal"}`)},t.toDisplayString(a.caption.text),5)],12,Le)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0)]))),256)),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_highlighter_${n}`},[t.createElementVNode("rect",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*n,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(n)?e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color,e.FINAL_CONFIG.chart.highlighter.opacity):"transparent"},null,8,Se)]))),128))]),e.barSet.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.barSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_bar_${n}`,class:t.normalizeClass(`serie_bar_${n}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`bar_plot_${n}_${d}`},[e.canShowValue(s.value)?(t.openBlock(),t.createElementBlock("rect",{key:0,x:e.calcRectX(s),y:r.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:r.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:e.FINAL_CONFIG.bar.useGradient?s.value>=0?`url(#rectGradient_pos_${n}_${r.uniqueId})`:`url(#rectGradient_neg_${n}_${r.uniqueId})`:a.color,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,we)):t.createCommentVNode("",!0),e.canShowValue(s.value)&&l.$slots.pattern?(t.openBlock(),t.createElementBlock("rect",{key:1,x:e.calcRectX(s),y:r.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:r.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Oe)):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,style:{overflow:"visible"},height:"12",width:(e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)/2)+e.FINAL_CONFIG.chart.comments.width,x:e.calcRectX(s)-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:e.checkNaN(s.y)+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:n,datapointIndex:d}},void 0,!0)],8,Ge)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",ve,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`bar_arrow_${n}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Be)],8,pe)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${n})`},null,8,Ve)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,Ee)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)):t.createCommentVNode("",!0),!r.mutableConfig.useIndividualScale&&e.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(t.openBlock(),t.createElementBlock("line",{key:1,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(e.zero),y2:e.forceValidValue(e.zero),"stroke-linecap":"round"},null,8,ze)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.highlighter.useLine&&(![null,void 0].includes(r.selectedSerieIndex)||![null,void 0].includes(r.selectedMinimapIndex))?(t.openBlock(),t.createElementBlock("g",Pe,[t.createElementVNode("line",{x1:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,x2:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),stroke:e.FINAL_CONFIG.chart.highlighter.color,"stroke-width":e.FINAL_CONFIG.chart.highlighter.lineWidth,"stroke-dasharray":e.FINAL_CONFIG.chart.highlighter.lineDasharray,"stroke-linecap":"round",style:{transition:"none !important",animation:"none !important","pointer-events":"none"}},null,8,Me)])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.frame.show?(t.openBlock(),t.createElementBlock("rect",{key:3,style:{pointerEvents:"none",transition:"none"},x:e.drawingArea.left+e.xPadding<0?0:e.drawingArea.left+e.xPadding,y:e.drawingArea.top,width:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries)<0?0:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries),height:e.drawingArea.height<0?0:e.drawingArea.height,fill:"transparent",stroke:e.FINAL_CONFIG.chart.grid.frame.stroke,"stroke-width":e.FINAL_CONFIG.chart.grid.frame.strokeWidth,"stroke-linecap":e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,"stroke-linejoin":e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,"stroke-dasharray":e.FINAL_CONFIG.chart.grid.frame.strokeDasharray},null,8,Te)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.show?(t.openBlock(),t.createElementBlock("g",De,[r.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("line",{x1:a.x+e.xPadding,x2:a.x+e.xPadding,y1:r.mutableConfig.isStacked?e.forceValidValue(e.drawingArea.bottom-a.yOffset-a.individualHeight):e.forceValidValue(e.drawingArea.top),y2:r.mutableConfig.isStacked?e.forceValidValue(e.drawingArea.bottom-a.yOffset):e.forceValidValue(e.drawingArea.bottom),stroke:a.color,"stroke-width":e.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,Re)]))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",{style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("text",{fill:a.color,"font-size":r.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5+e.xPadding}, ${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset-a.individualHeight/2:e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`},t.toDisplayString(a.name)+" "+t.toDisplayString(a.scaleLabel?`- ${a.scaleLabel}`:""),9,He),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(n,s)=>(t.openBlock(),t.createElementBlock("line",{x1:a.x-3+e.xPadding,x2:a.x+e.xPadding,y1:e.forceValidValue(n.y),y2:e.forceValidValue(n.y),stroke:a.color,"stroke-width":1,"stroke-linecap":"round"},null,8,We))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(n,s)=>(t.openBlock(),t.createElementBlock("text",{x:a.x-5+e.xPadding,y:e.forceValidValue(n.y)+r.fontSizes.dataLabels/3,"font-size":r.fontSizes.dataLabels,"text-anchor":"end",fill:a.color},t.toDisplayString(e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,n.value,e.dataLabel({p:n.prefix,v:n.value,s:n.suffix,r:1}),{datapoint:n.datapoint,seriesIndex:s})),9,qe))),256))],4))),256))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.yLabels,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`yLabel_${n}`},[e.canShowValue(a)&&a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left-5+e.xPadding,y1:e.forceValidValue(a.y),y2:e.forceValidValue(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,Ye)):t.createCommentVNode("",!0),a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("text",{key:1,x:e.drawingArea.left-7+e.xPadding,y:e.checkNaN(a.y+r.fontSizes.dataLabels/3),"font-size":r.fontSizes.dataLabels,"text-anchor":"end",fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.canShowValue(a.value)?e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,a.value,e.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:1})):""),9,Xe)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_plot_${n}`,class:t.normalizeClass(`serie_plot_${n}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_plot_${n}_${d}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(N,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${n}_${r.uniqueId})`:e.FINAL_CONFIG.plot.dot.useSerieColor?a.color:e.FINAL_CONFIG.plot.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:r.selectedSerieIndex!==null&&r.selectedSerieIndex===d||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===d?(r.plotRadii.plot||6)*1.5:r.plotRadii.plot||6,stroke:e.FINAL_CONFIG.plot.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.plot.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",Ze,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:n,datapointIndex:d}},void 0,!0)])],8,Ue)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",Je,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`plot_arrow_${n}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Qe)],8,Ke)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${n})`},null,8,je)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,$e)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${n}`,class:t.normalizeClass(`serie_line_${n}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${a.curve}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,et)):a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.straight}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,tt)):t.createCommentVNode("",!0)],6))),128)),l.$slots.pattern?(t.openBlock(),t.createElementBlock("defs",rt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.safeDataset,(a,n)=>t.renderSlot(l.$slots,"pattern",t.mergeProps({key:`serie_pattern_slot_${n}`},{...a,seriesIndex:a.slotAbsoluteIndex,patternId:`pattern_${r.uniqueId}_${n}`}),void 0,!0)),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${n}`,class:t.normalizeClass(`serie_line_${n}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.useArea&&a.plots.length>1?(t.openBlock(),t.createElementBlock("g",lt,[a.smooth?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("path",{d:`M ${a.plots[0]?a.plots[0].x:Math.min(...a.plots.filter(s=>!!s).map(s=>s.x))},${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} ${a.curve} L ${a.plots.at(-1)?a.plots.at(-1).x:e.drawingArea.left+e.slot.line*n+e.slot.line/2},${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${n}_${r.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,at),l.$slots.pattern?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M ${a.plots[0]?a.plots[0].x:Math.min(...a.plots.filter(s=>!!s).map(s=>s.x))},${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} ${a.curve} L ${a.plots.at(-1)?a.plots.at(-1).x:e.drawingArea.left+e.slot.line*n+e.slot.line/2},${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} Z`,fill:`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`},null,8,it)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("path",{d:`M${a.area}Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${n}_${r.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,st),l.$slots.pattern?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${a.area}Z`,fill:`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`},null,8,nt)):t.createCommentVNode("",!0)],64))])):t.createCommentVNode("",!0),a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.curve}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round"},null,8,ot)):a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M${a.straight}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,ct)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`circle_line_${n}_${d}`},[!e.optimize.linePlot&&s&&e.canShowValue(s.value)||e.optimize.linePlot&&s&&e.canShowValue(s.value)&&(r.selectedSerieIndex!==null&&r.selectedSerieIndex===d||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===d)?(t.openBlock(),t.createBlock(N,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${n}_${r.uniqueId})`:e.FINAL_CONFIG.line.dot.useSerieColor?a.color:e.FINAL_CONFIG.line.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:r.selectedSerieIndex!==null&&r.selectedSerieIndex===d||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===d?(r.plotRadii.line||6)*1.5:r.plotRadii.line||6,stroke:e.FINAL_CONFIG.line.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.line.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",dt,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:n,datapointIndex:d}},void 0,!0)])],8,ht)):t.createCommentVNode("",!0)],64))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",ut,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`line_arrow_${n}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,gt)],8,mt)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${n})`},null,8,Nt)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,ft)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(e.FINAL_CONFIG.bar.labels.show||e.FINAL_CONFIG.bar.serieName.show)&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",It,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_bar_${n}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_bar_${n}_${d}`},[s&&(!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||r.selectedSerieIndex!==null&&r.selectedSerieIndex===d||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===d)&&e.FINAL_CONFIG.bar.labels.show?(t.openBlock(),t.createElementBlock("text",{key:0,x:r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?s.x+e.slot.line/2:e.calcRectX(s)+e.calcRectWidth()/2-e.barPeriodGap/2,y:e.checkNaN(s.y)+(s.value>=0?e.FINAL_CONFIG.bar.labels.offsetY:-e.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.bar.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.bar.labels.rounding}),{datapoint:s,serie:a}):""),9,xt)):t.createCommentVNode("",!0),s&&e.FINAL_CONFIG.bar.serieName.show?(t.openBlock(),t.createElementBlock("text",{key:1,x:r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?s.x+e.slot.line/2:s.x+e.calcRectWidth()*1.1,y:s.y+(s.value>0?e.FINAL_CONFIG.bar.serieName.offsetY:-e.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.serieName.useSerieColor?a.color:e.FINAL_CONFIG.bar.serieName.color,"font-weight":e.FINAL_CONFIG.bar.serieName.bold?"bold":"normal"},t.toDisplayString(e.FINAL_CONFIG.bar.serieName.useAbbreviation?e.abbreviate({source:a.name,length:e.FINAL_CONFIG.bar.serieName.abbreviationSize}):a.name),9,Ft)):t.createCommentVNode("",!0)],64))),128))],64))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.plot.labels.show&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",bt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${n}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${n}_${d}`},[s&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||r.selectedSerieIndex!==null&&r.selectedSerieIndex===d||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===d?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+e.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.plot.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.plot.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.plot.labels.rounding}),{datapoint:s,serie:a}):""),9,kt)):t.createCommentVNode("",!0),s&&d===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,_t)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-a.name.length*(r.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,At)):t.createCommentVNode("",!0)],64))),128))],64))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.line.labels.show&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",Ct,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${n}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${n}_${d}`},[s&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||r.selectedSerieIndex!==null&&r.selectedSerieIndex===d||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===d?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+(s.value>=0?e.FINAL_CONFIG.line.labels.offsetY:-e.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.line.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.line.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.line.labels.rounding}),{datapoint:s,serie:a}):""),9,yt)):t.createCommentVNode("",!0),s&&d===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,Lt)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-a.name.length*(r.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,St)):t.createCommentVNode("",!0)],64))),128))],64))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${n}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${n}_${d}`},[s&&d===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x-r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,wt)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x+r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Ot)):t.createCommentVNode("",!0)],64))),128))],64))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${n}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${n}_${d}`},[s&&d===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x-r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Gt)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x+r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,vt)):t.createCommentVNode("",!0)],64))),128))],64))),128)),r.mutableConfig.useIndividualScale&&!r.mutableConfig.isStacked?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:9},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("rect",{x:a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+e.xPadding,y:e.drawingArea.top,width:e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:e.drawingArea.height<0?10:e.drawingArea.height,fill:r.selectedScale===a.id?e.setOpacity(a.color,20):"transparent",onMouseenter:n=>r.selectedScale=a.id,onMouseleave:i[0]||(i[0]=n=>r.selectedScale=null)},null,40,pt))),256)):t.createCommentVNode("",!0),t.createElementVNode("g",null,[e.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!r.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock("text",{key:0,"font-size":r.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${r.fontSizes.yAxis+e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,Bt)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.width/2,y:e.drawingArea.bottom+r.fontSizes.yAxis+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":r.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,Vt)):t.createCommentVNode("",!0)]),t.createTextVNode('v-for="(label, i) in timeLabels" :key="`time_label_${i}`" '),e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(t.openBlock(),t.createElementBlock("g",Et,[l.$slots["time-label"]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.timeLabels,(a,n)=>t.renderSlot(l.$slots,"time-label",t.normalizeProps(t.mergeProps({key:`time_label_${n}`},{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*n+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,fontSize:r.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*n+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,absoluteIndex:a.absoluteIndex,content:a.text,textAnchor:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle",show:a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(n===0||n===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&r.selectedSerieIndex===n&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&n%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0})),void 0,!0)),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.timeLabels,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${n}`},[a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(n===0||n===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&r.selectedSerieIndex===n&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&n%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(t.openBlock(),t.createElementBlock("text",{key:0,"text-anchor":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":r.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*n+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,style:{cursor:"pointer"},onClick:()=>e.selectTimeLabel(a,n)},t.toDisplayString(a.text||""),9,zt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,n)=>(t.openBlock(),t.createElementBlock("rect",{key:`tooltip_trap_${n}`,"data-cy-trap":"",x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*n,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:"transparent",onMouseenter:s=>e.toggleTooltipVisibility(!0,n),onMouseleave:i[1]||(i[1]=s=>e.toggleTooltipVisibility(!1)),onClick:s=>e.selectX(n)},null,40,Pt))),128))]),e.FINAL_CONFIG.chart.timeTag.show&&(![null,void 0].includes(r.selectedSerieIndex)||![null,void 0].includes(r.selectedMinimapIndex))?(t.openBlock(),t.createElementBlock("g",Mt,[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))-100+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[t.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:t.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)},t.toDisplayString(e.timeLabels[(r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0)].text||(r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0)),5)],8,Tt)),t.createElementVNode("circle",{cx:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,cy:e.drawingArea.bottom,r:e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,fill:e.FINAL_CONFIG.chart.timeTag.circleMarker.color},null,8,Dt)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"svg",{svg:e.svg},void 0,!0)],14,K)):t.createCommentVNode("",!0),l.$slots.watermark?(t.openBlock(),t.createElementBlock("div",Rt,[t.renderSlot(l.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:r.isPrinting||r.isImaging})),void 0,!0)])):t.createCommentVNode("",!0),e.isDataset?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(O,{key:6,config:{type:"line",style:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:e.FINAL_CONFIG.chart.grid.stroke},path:{color:e.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),e.FINAL_CONFIG.chart.zoom.show&&r.maxX>6&&e.isDataset?(t.openBlock(),t.createBlock(C,{ref:"chartSlicer",key:`slicer_${r.slicerStep}`,background:e.FINAL_CONFIG.chart.zoom.color,fontSize:e.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:e.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r.slicer.start],labelRight:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r.slicer.end-1],textColor:e.FINAL_CONFIG.chart.color,inputColor:e.FINAL_CONFIG.chart.zoom.color,selectColor:e.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:e.FINAL_CONFIG.chart.backgroundColor,minimap:e.minimap,smoothMinimap:e.FINAL_CONFIG.chart.zoom.minimap.smooth,minimapSelectedColor:e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,minimapSelectionRadius:e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,minimapLineColor:e.FINAL_CONFIG.chart.zoom.minimap.lineColor,minimapSelectedColorOpacity:e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:r.selectedSerieIndex,minimapIndicatorColor:e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,verticalHandles:e.FINAL_CONFIG.chart.zoom.minimap.verticalHandles,max:r.maxX,min:0,valueStart:r.slicer.start,valueEnd:r.slicer.end,start:r.slicer.start,"onUpdate:start":i[2]||(i[2]=a=>r.slicer.start=a),end:r.slicer.end,"onUpdate:end":i[3]||(i[3]=a=>r.slicer.end=a),refreshStartPoint:e.FINAL_CONFIG.chart.zoom.startIndex!==null?e.FINAL_CONFIG.chart.zoom.startIndex:0,refreshEndPoint:e.FINAL_CONFIG.chart.zoom.endIndex!==null?e.FINAL_CONFIG.chart.zoom.endIndex+1:Math.max(...o.dataset.map(a=>e.largestTriangleThreeBucketsArray({data:a.series,threshold:e.FINAL_CONFIG.downsample.threshold}).length)),enableRangeHandles:e.FINAL_CONFIG.chart.zoom.enableRangeHandles,enableSelectionDrag:e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,onReset:e.refreshSlicer,onTrapMouse:e.selectMinimapIndex},{"reset-action":t.withCtx(({reset:a})=>[t.renderSlot(l.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","minimap","smoothMinimap","minimapSelectedColor","minimapSelectionRadius","minimapLineColor","minimapSelectedColorOpacity","minimapSelectedIndex","minimapIndicatorColor","verticalHandles","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag","onReset","onTrapMouse"])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.legend.show?(t.openBlock(),t.createElementBlock("div",{key:8,ref:"chartLegend",class:"vue-ui-xy-legend",style:t.normalizeStyle(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.absoluteDataset,(a,n)=>(t.openBlock(),t.createElementBlock("div",{key:`div_legend_item_${n}`,onClick:s=>e.segregate(a),class:t.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":r.segregatedSeries.includes(a.id)})},[r.icons[a.type]==="line"?(t.openBlock(),t.createElementBlock("svg",Wt,[t.createElementVNode("rect",{x:"0",y:"7.5",rx:"1.5",stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":.5,height:"3",width:"20",fill:a.color},null,8,qt),t.createVNode(N,{plot:{x:10,y:9},radius:4,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",stroke:e.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["color","shape","stroke"])])):r.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("svg",Yt,[r.icons[a.type]==="bar"&&l.$slots.pattern?(t.openBlock(),t.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"40",width:"40",stroke:"none",fill:a.color},null,8,Xt)):t.createCommentVNode("",!0),r.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("rect",{key:1,x:"0",y:"0",rx:"1",height:"40",width:"40",stroke:"none",fill:l.$slots.pattern?`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`:a.color},null,8,Ut)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("svg",Zt,[t.createVNode(N,{plot:{x:6,y:6},radius:5,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle"},null,8,["color","shape"])])),t.createElementVNode("span",{style:t.normalizeStyle(`color:${e.FINAL_CONFIG.chart.legend.color}`)},t.toDisplayString(a.name),5)],10,Ht))),128))],4)):(t.openBlock(),t.createElementBlock("div",Jt,[t.renderSlot(l.$slots,"legend",{legend:e.absoluteDataset},void 0,!0)],512)),l.$slots.source?(t.openBlock(),t.createElementBlock("div",Kt,[t.renderSlot(l.$slots,"source",{},void 0,!0)],512)):t.createCommentVNode("",!0),t.createVNode(y,{show:r.mutableConfig.showTooltip&&r.isTooltip,backgroundColor:e.FINAL_CONFIG.chart.tooltip.backgroundColor,color:e.FINAL_CONFIG.chart.tooltip.color,fontSize:e.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:e.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:e.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:e.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,position:e.FINAL_CONFIG.chart.tooltip.position,offsetY:e.FINAL_CONFIG.chart.tooltip.offsetY,parent:l.$refs.chart,content:e.tooltipContent,isFullscreen:r.isFullscreen,isCustom:e.FINAL_CONFIG.chart.tooltip.customFormat&&typeof e.FINAL_CONFIG.chart.tooltip.customFormat=="function"},{"tooltip-before":t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip-before",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),"tooltip-after":t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip-after",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.isDataset?(t.openBlock(),t.createBlock(w,{key:11,hideDetails:"",config:{open:r.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color},head:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color}}},{content:t.withCtx(()=>[t.createElementVNode("div",{style:t.normalizeStyle(`${r.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[t.createElementVNode("div",Qt,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[4]||(i[4]=a=>r.showSparklineTable=a)},null,512),[[t.vModelCheckbox,r.showSparklineTable]]),t.createElementVNode("div",{onClick:i[5]||(i[5]=a=>r.showSparklineTable=!r.showSparklineTable),style:{cursor:"pointer"}},[t.createVNode(A,{name:"chartLine",size:20,stroke:e.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),r.showSparklineTable?(t.openBlock(),t.createBlock(f,{key:`sparkline_${r.segregateStep}`,dataset:e.tableSparklineDataset,config:e.tableSparklineConfig},null,8,["dataset","config"])):(t.openBlock(),t.createBlock(b,{key:`table_${r.tableStep}`,colNames:e.dataTable.colNames,head:e.dataTable.head,body:e.dataTable.body,config:e.dataTable.config,title:`${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text?` : ${e.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:i[6]||(i[6]=a=>r.mutableConfig.showTable=!1)},{th:t.withCtx(({th:a})=>[t.createElementVNode("div",{innerHTML:a},null,8,jt)]),td:t.withCtx(({td:a})=>[t.createTextVNode(t.toDisplayString(isNaN(Number(a))?a:e.dataLabel({p:e.FINAL_CONFIG.chart.labels.prefix,v:a,s:e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):t.createCommentVNode("",!0)],46,Z)}const er=Y._export_sfc(U,[["render",$t],["__scopeId","data-v-2ea54cd5"]]);exports.default=er;
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-DHTOdsmm.cjs"),c=require("./useResponsive-BJ7DTGpm.cjs"),ot=require("./Tooltip-yfpr967Z.cjs"),rt=require("./Legend-BHqhIxpn.cjs"),nt=require("./Title-0PbYWvbk.cjs"),ut=require("./Slicer-Ztz1Ij0w.cjs"),Ee=require("./usePrinter-CCvLCahd.cjs"),st=require("./vue-ui-accordion-D0YEkQP_.cjs"),it=require("./DataTable-D-lEfCvI.cjs"),ct=require("./vue-ui-skeleton-BZDfN8kq.cjs"),Ne=require("./useNestedProp-BbHX6tgE.cjs"),vt=require("./PenAndPaper-JJPSlM7l.cjs"),dt=require("./useUserOptionState-BgepsfED.cjs"),ht=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),yt=["id"],ft=["onClick"],gt={key:2,class:"vue-data-ui-watermark"},pt=["innerHTML"],mt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(re,{expose:Be,emit:De}){const p=re,{vue_ui_xy_canvas:Fe}=u.useConfig(),Z=l.ref(u.createUid()),N=l.ref(null),S=l.ref(null),B=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),H=l.ref(!1),y=l.ref(null),V=l.ref(""),ne=l.ref(null),C=l.ref([]),O=l.ref(1),M=l.ref(!0),z=l.ref(!0),G=l.ref(null),ue=l.ref(0),se=l.ref(0),U=l.ref(!1),ie=l.ref(null),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),j=l.ref(0),J=l.ref(0),K=l.ref(0),Q=l.computed(()=>!!p.dataset&&p.dataset.length),Ae=l.useSlots();l.onMounted(()=>{Ae["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>fe(),set:e=>e}),{userOptionsVisible:ee,setUserOptionsVisibility:he,keepUserOptionState:ye}=dt.useUserOptionState({config:t.value});function fe(){const e=Ne.useNestedProp({userConfig:p.config,defaultConfig:Fe});let a={};return e.theme?a={...Ne.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||p.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:a=e,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.min")?a.style.chart.scale.min=p.config.style.chart.scale.min:a.style.chart.scale.min=null,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.max")?a.style.chart.scale.max=p.config.style.chart.scale.max:a.style.chart.scale.max=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=p.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=p.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}l.watch(()=>p.config,e=>{t.value=fe(),ee.value=!t.value.showOnChartHover,le(),j.value+=1,J.value+=1,K.value+=1,s.value.showTable=t.value.table.show,s.value.showDataLabels=t.value.style.chart.dataLabels.show,s.value.stacked=t.value.style.chart.stacked,s.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>p.dataset,()=>{le(),j.value+=1,J.value+=1,K.value+=1},{deep:!0});const ge=l.ref(t.value.style.chart.aspectRatio),{isPrinting:pe,isImaging:me,generatePdf:be,generateImage:xe}=Ee.usePrinter({elementId:`xy_canvas_${Z.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.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 He(e){U.value=e,se.value+=1}const ke=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>R.value?Math.max(...R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),o=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Le(e,a){return e/a}function Ve({hasAutoScale:e,series:a,min:r,max:d,scale:h,yOffset:m,individualHeight:v,stackIndex:b=null}){return a.map((L,oe)=>{const $=h.min<0?Math.abs(h.min):0,I=Le(L+$,$+h.max);let P,D;e&&(P=Math.abs(h.min),D=Le(L+P,h.max+P));let F=0;return b===null?F=o.value.bottom-o.value.height*(e?D:I):F=o.value.bottom-m-v*(e?D:I),{x:o.value.left+o.value.slot*oe+o.value.slot/2,y:F,value:L}})}const x=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),a=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,a===e?e+1<0?0:e+1:a<0?0:a,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=o.value.bottom-o.value.height*(d/(r.max+d)),m=r.ticks.map(v=>({y:o.value.bottom-o.value.height*((v+d)/(r.max+d)),x:o.value.left-8,value:v}));return{absoluteMin:d,max:a,min:e,scale:r,yLabels:m,zero:h}}),Ue=l.computed(()=>f.value.map(e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-CHCA909R.cjs"),c=require("./useResponsive-BJ7DTGpm.cjs"),ot=require("./Tooltip-fEuHWstj.cjs"),rt=require("./Legend-CcoLuZn0.cjs"),nt=require("./Title-bDp_4dQV.cjs"),ut=require("./Slicer-BIzpsKb9.cjs"),Ee=require("./usePrinter-xicwiw8r.cjs"),st=require("./vue-ui-accordion-B4PyxVUm.cjs"),it=require("./DataTable-ZowHAjXC.cjs"),ct=require("./vue-ui-skeleton-DsMIGHB3.cjs"),Ne=require("./useNestedProp--1nKK7i0.cjs"),vt=require("./PenAndPaper-u46MyY7W.cjs"),dt=require("./useUserOptionState-BgepsfED.cjs"),ht=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ft=["id"],yt=["onClick"],gt={key:2,class:"vue-data-ui-watermark"},pt=["innerHTML"],mt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(re,{expose:Be,emit:De}){const p=re,{vue_ui_xy_canvas:Fe}=u.useConfig(),Z=l.ref(u.createUid()),N=l.ref(null),S=l.ref(null),B=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),H=l.ref(!1),f=l.ref(null),V=l.ref(""),ne=l.ref(null),C=l.ref([]),O=l.ref(1),M=l.ref(!0),z=l.ref(!0),G=l.ref(null),ue=l.ref(0),se=l.ref(0),U=l.ref(!1),ie=l.ref(null),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),j=l.ref(0),J=l.ref(0),K=l.ref(0),Q=l.computed(()=>!!p.dataset&&p.dataset.length),Ae=l.useSlots();l.onMounted(()=>{Ae["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>ye(),set:e=>e}),{userOptionsVisible:ee,setUserOptionsVisibility:he,keepUserOptionState:fe}=dt.useUserOptionState({config:t.value});function ye(){const e=Ne.useNestedProp({userConfig:p.config,defaultConfig:Fe});let a={};return e.theme?a={...Ne.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||p.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:a=e,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.min")?a.style.chart.scale.min=p.config.style.chart.scale.min:a.style.chart.scale.min=null,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.max")?a.style.chart.scale.max=p.config.style.chart.scale.max:a.style.chart.scale.max=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=p.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=p.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}l.watch(()=>p.config,e=>{t.value=ye(),ee.value=!t.value.userOptions.showOnChartHover,le(),j.value+=1,J.value+=1,K.value+=1,s.value.showTable=t.value.table.show,s.value.showDataLabels=t.value.style.chart.dataLabels.show,s.value.stacked=t.value.style.chart.stacked,s.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>p.dataset,()=>{le(),j.value+=1,J.value+=1,K.value+=1},{deep:!0});const ge=l.ref(t.value.style.chart.aspectRatio),{isPrinting:pe,isImaging:me,generatePdf:be,generateImage:xe}=Ee.usePrinter({elementId:`xy_canvas_${Z.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.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 He(e){U.value=e,se.value+=1}const ke=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>R.value?Math.max(...R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),o=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Le(e,a){return e/a}function Ve({hasAutoScale:e,series:a,min:r,max:d,scale:h,yOffset:m,individualHeight:v,stackIndex:b=null}){return a.map((L,oe)=>{const $=h.min<0?Math.abs(h.min):0,I=Le(L+$,$+h.max);let P,D;e&&(P=Math.abs(h.min),D=Le(L+P,h.max+P));let F=0;return b===null?F=o.value.bottom-o.value.height*(e?D:I):F=o.value.bottom-m-v*(e?D:I),{x:o.value.left+o.value.slot*oe+o.value.slot/2,y:F,value:L}})}const x=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),a=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,a===e?e+1<0?0:e+1:a<0?0:a,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=o.value.bottom-o.value.height*(d/(r.max+d)),m=r.ticks.map(v=>({y:o.value.bottom-o.value.height*((v+d)/(r.max+d)),x:o.value.left-8,value:v}));return{absoluteMin:d,max:a,min:e,scale:r,yLabels:m,zero:h}}),Ue=l.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}"/>
5
5
  </svg>
6
6
  <span>${e.name?e.name+": ":""}</span>
7
- <span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[y.value],u.dataLabel({p:e.prefix||"",v:e.series[y.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:y.value})}</span>
7
+ <span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],u.dataLabel({p:e.prefix||"",v:e.series[f.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:f.value})}</span>
8
8
  </div>
9
- `)),R=l.computed(()=>p.dataset.map((e,a)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:a,color:u.convertColorToHex(e.color||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length])})));l.watch(w,e=>{e&&Ce()});const f=l.computed(()=>u.assignStackRatios(R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex))).map((e,a)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,a)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,d=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const m={ratios:e.series.filter(A=>![null,void 0].includes(A)).map(A=>(A-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let b;e.autoScaling?b=u.calculateNiceScale(m.valueMin,m.valueMax,v):b=u.calculateNiceScale(m.valueMin<0?m.valueMin:0,m.valueMax<=0?0:m.valueMax,v);const L=s.value.stacked?o.value.height*(1-e.cumulatedStackRatio):0,oe=s.value.stacked?o.value.height/t.value.style.chart.stackGap:0,$=s.value.stacked?o.value.height*e.stackRatio-oe:o.value.height,I=b.min<0?Math.abs(b.min):0;let P;e.autoScaling&&s.value.stacked&&d<=0?P=o.value.bottom-L-$:P=o.value.bottom-L-$*(I/(b.max+I));const D=b.ticks.map((A,at)=>({y:o.value.bottom-L-$*(at/(b.ticks.length-1)),x:o.value.left-8,value:A})),F=Ve({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:x.value.min,max:s.value.stacked?d:x.value.max,scale:s.value.stacked?b:x.value.scale,yOffset:L,individualHeight:$,stackIndex:s.value.stacked?a:null});return{...e,coordinatesLine:F,min:r,max:d,localScale:b,localZero:P,localMin:I,localYLabels:D,yOffset:L,individualHeight:$}})),n=l.ref({start:0,end:w.value});function Ce(){we()}const E=l.ref(null);async function we(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&E.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:w.value},ue.value+=1)}function _e(e){const a=w.value;return e>a?a:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const qe=l.computed(()=>f.value.filter(e=>["line","plot",void 0].includes(e.type))),k=l.computed(()=>f.value.filter(e=>e.type==="bar"));function We(){if(!S.value)return;const e=B.value.offsetWidth,a=B.value.offsetHeight;S.value.width=e*O.value*2,S.value.height=a*O.value*2,g.value=e*O.value*2,T.value=a*O.value*2,i.value.scale(O.value,O.value),te()}function Xe(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,o.value.canvasWidth,o.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?f.value.forEach(e=>{for(let a=0;a<n.value.end-n.value.start+1;a+=1)c.line(i.value,[{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&f.value.forEach(e=>{for(let a=n.value.start;a<n.value.end;a+=1)a%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?f.value.forEach(e=>{e.localYLabels.forEach((a,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y},{x:o.value.right,y:e.localYLabels[r+1].y},{x:o.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):f.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(a=>{c.line(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&f.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.localZero},{x:o.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&f.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.left,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),c.line(i.value,[{x:o.value.right,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((a,r)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,a.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:a.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:a,seriesIndex:r}),a.x+t.value.style.chart.grid.y.axisLabels.offsetX,a.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),f.value.forEach(e=>{c.text(i.value,e.name,g.value/35,o.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)c.line(i.value,[{x:o.value.left+o.value.slot*e,y:o.value.top},{x:o.value.left+o.value.slot*e,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?x.value.yLabels.forEach((e,a)=>{a<x.value.yLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y},{x:o.value.right,y:x.value.yLabels[a+1].y},{x:o.value.left,y:x.value.yLabels[a+1].y}],{fillColor:a%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):x.value.yLabels.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.top},{x:o.value.left,y:o.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.bottom},{x:o.value.right,y:o.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:o.value.left,y:x.value.zero},{x:o.value.right,y:x.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&x.value.yLabels.forEach((e,a)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:a}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,o.value.bottom-o.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,T.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Ye(e){for(let a=0;a<e.coordinatesLine.length;a+=1){const r=(y.value===a?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[a].x,y:e.coordinatesLine[a].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function Ze(e){for(let a=0;a<e.coordinatesLine.length;a+=1)c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[a].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[a].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[a],seriesIndex:a}),e.coordinatesLine[a].x,e.coordinatesLine[a].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ge(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===y.value+n.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,o.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,y.value!==null?y.value+n.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Se(){c.line(i.value,[{x:o.value.left+o.value.slot*y.value+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*y.value+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function je(){k.value.forEach((e,a)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:e.coordinatesLine[r].y},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:s.value.stacked?e.localZero:x.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:u.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.4/(s.value.stacked?1:k.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:x.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Je(e){e.useArea?s.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:x.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:x.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ke(){f.value.forEach((e,a)=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function te(){Xe(),M.value?(z.value&&y.value!==null&&t.value.style.chart.selector.show&&Se(),je(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ke(),qe.value.forEach(e=>{(e.type==="line"||!e.type)&&Je(e),z.value&&(Ye(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Ze(e))}),G.value=c.cloneCanvas(S.value)):(G.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(G.value,0,0)),z.value&&y.value!==null&&t.value.style.chart.selector.show&&Se(),z.value&&y.value!==null&&f.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[y.value])return;e.coordinatesLine[y.value].x!==void 0&&e.coordinatesLine[y.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[y.value].x,y:e.coordinatesLine[y.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ge(),M.value=!1}const _=c.debounce(()=>{z.value=!0,We()},w.value>200?10:1,!z.value);function Qe(e){const{left:a}=S.value.getBoundingClientRect(),r=e.clientX-a;if(r*2<o.value.left||r*2>o.value.right){H.value=!1,y.value=null;return}const d=r*2-o.value.left;if(y.value=Math.floor(d/o.value.slot),H.value=!0,!z.value)return;let h="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:y.value,datapoint:f.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===y.value)})),series:f.value,config:t.value}))?V.value=m({seriesIndex:y.value,datapoint:f.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===y.value)})),series:f.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[y.value]&&(h+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[y.value]}</div>`),h+=Ue.value.join(""),V.value=h),z.value=!1}l.watch(()=>y.value,e=>{_()}),l.watch(()=>n.value,e=>{M.value=!0,te()},{deep:!0}),l.watch(()=>s.value.showDataLabels,e=>{M.value=!0,te()}),l.watch(()=>s.value.stacked,e=>{M.value=!0,z.value=!0,_()});function et(){H.value=!1,y.value=null,V.value=""}const q=l.ref(null),W=l.ref(null);l.onMounted(()=>{le()});function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):S.value&&(i.value=S.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:a,height:r}=c.useResponsive({chart:N.value,title:t.value.style.chart.title.text?ie.value:null,legend:t.value.style.chart.legend.show?ce.value:null,slicer:t.value.style.chart.zoom.show&&w.value>1?ve.value:null,source:de.value});requestAnimationFrame(()=>{ge.value=`${a} / ${r}`})});q.value=new ResizeObserver(e),q.value.observe(N.value.parentNode)}W.value=new ResizeObserver(e=>{for(const a of e)a.contentBoxSize&&B.value&&(M.value=!0,_())}),W.value.observe(B.value),we()}l.onBeforeUnmount(()=>{W.value&&W.value.disconnect(),q.value&&q.value.disconnect()});function ze(e){De("selectLegend",f.value.find(a=>a.absoluteIndex===e)),C.value.includes(e)?C.value=C.value.filter(a=>a!==e):C.value.push(e),M.value=!0,_()}const $e=l.computed(()=>R.value.map((e,a)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:C.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ze(e.absoluteIndex),isSegregated:C.value.includes(e.absoluteIndex)}))),tt=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),X=l.computed(()=>{const e=[""].concat(f.value.map(h=>h.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 a=[];for(let h=0;h<w.value;h+=1){const m=f.value.map(v=>v.series[h]??0).reduce((v,b)=>v+b,0);a.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[h]??h+1].concat(f.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((m??0).toFixed(t.value.table.rounding)))}const r={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},d=[t.value.table.columnNames.period].concat(f.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:a.slice(0,n.value.end-n.value.start),config:r,colNames:d}}),Te=l.computed(()=>{if(f.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=f.value.map(r=>({label:r.name,color:r.color,type:r.type})),a=[];for(let r=n.value.start;r<n.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];f.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),a.push(d)}return{head:e,body:a}});function Ie(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=["",...Te.value.head.map(m=>m.label)],r=Te.value.body,d=e.concat([a]).concat(r),h=u.createCsvContent(d);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function lt(){return f.value}function Pe(){s.value.showTable=!s.value.showTable}function Me(){s.value.showDataLabels=!s.value.showDataLabels}function Oe(){s.value.stacked=!s.value.stacked}function Re(){s.value.showTooltip=!s.value.showTooltip}const Y=l.ref(!1);function ae(){Y.value=!Y.value}return Be({getData:lt,generateCsv:Ie,generatePdf:be,generateImage:xe,toggleTable:Pe,toggleLabels:Me,toggleStack:Oe,toggleTooltip:Re,toggleAnnotator:ae}),(e,a)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:N,id:`xy_canvas_${Z.value}`,class:l.normalizeClass(`vue-ui-donut ${U.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:a[5]||(a[5]=()=>l.unref(he)(!0)),onMouseleave:a[6]||(a[6]=()=>l.unref(he)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ie,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(nt._sfc_main,{key:`title_${j.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Q.value&&(l.unref(ye)||l.unref(ee))?(l.openBlock(),l.createBlock(Ee.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(pe),isImaging:l.unref(me),uid:Z.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:re.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:U.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:He,onGeneratePdf:l.unref(be),onGenerateCsv:Ie,onGenerateImage:l.unref(xe),onToggleTable:Pe,onToggleLabels:Me,onToggleStack:Oe,onToggleTooltip:Re,onToggleAnnotator:ae,style:l.normalizeStyle({visibility:l.unref(ye)?l.unref(ee)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:d})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:d})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${ge.value}`),ref_key:"container",ref:B},[Q.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:S,style:{width:"100%",height:"100%"},onMousemove:a[0]||(a[0]=r=>Qe(r)),onMouseleave:et},null,544)):(l.openBlock(),l.createBlock(ct.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(ot._sfc_main,{show:s.value.showTooltip&&H.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:V.value,isFullscreen:U.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ve,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&w.value>1?(l.openBlock(),l.createBlock(ut.Slicer,{ref_key:"slicerComponent",ref:E,key:`slicer_${ue.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:w.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":a[1]||(a[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":a[2]||(a[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Ce},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ce},[t.value.style.chart.legend.show&&Q.value?(l.openBlock(),l.createBlock(rt.Legend,{legendSet:$e.value,config:tt.value,key:`legend_${K.value}`,onClickMarker:a[3]||(a[3]=({i:r})=>ze(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${C.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,ft)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:$e.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",gt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(pe)||l.unref(me)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:de,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(st.default,{key:4,hideDetails:"",config:{open:s.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:l.withCtx(()=>[(l.openBlock(),l.createBlock(it.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.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[4]||(a[4]=r=>s.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,pt)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&f.value.length?(l.openBlock(),l.createBlock(vt.PenAndPaper,{key:5,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:ae},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,yt))}},bt=ht._export_sfc(mt,[["__scopeId","data-v-45e3ad69"]]);exports.default=bt;
9
+ `)),R=l.computed(()=>p.dataset.map((e,a)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:a,color:u.convertColorToHex(e.color||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length])})));l.watch(w,e=>{e&&Ce()});const y=l.computed(()=>u.assignStackRatios(R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex))).map((e,a)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,a)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,d=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const m={ratios:e.series.filter(A=>![null,void 0].includes(A)).map(A=>(A-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let b;e.autoScaling?b=u.calculateNiceScale(m.valueMin,m.valueMax,v):b=u.calculateNiceScale(m.valueMin<0?m.valueMin:0,m.valueMax<=0?0:m.valueMax,v);const L=s.value.stacked?o.value.height*(1-e.cumulatedStackRatio):0,oe=s.value.stacked?o.value.height/t.value.style.chart.stackGap:0,$=s.value.stacked?o.value.height*e.stackRatio-oe:o.value.height,I=b.min<0?Math.abs(b.min):0;let P;e.autoScaling&&s.value.stacked&&d<=0?P=o.value.bottom-L-$:P=o.value.bottom-L-$*(I/(b.max+I));const D=b.ticks.map((A,at)=>({y:o.value.bottom-L-$*(at/(b.ticks.length-1)),x:o.value.left-8,value:A})),F=Ve({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:x.value.min,max:s.value.stacked?d:x.value.max,scale:s.value.stacked?b:x.value.scale,yOffset:L,individualHeight:$,stackIndex:s.value.stacked?a:null});return{...e,coordinatesLine:F,min:r,max:d,localScale:b,localZero:P,localMin:I,localYLabels:D,yOffset:L,individualHeight:$}})),n=l.ref({start:0,end:w.value});function Ce(){we()}const E=l.ref(null);async function we(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&E.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:w.value},ue.value+=1)}function _e(e){const a=w.value;return e>a?a:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const qe=l.computed(()=>y.value.filter(e=>["line","plot",void 0].includes(e.type))),k=l.computed(()=>y.value.filter(e=>e.type==="bar"));function We(){if(!S.value)return;const e=B.value.offsetWidth,a=B.value.offsetHeight;S.value.width=e*O.value*2,S.value.height=a*O.value*2,g.value=e*O.value*2,T.value=a*O.value*2,i.value.scale(O.value,O.value),te()}function Xe(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,o.value.canvasWidth,o.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?y.value.forEach(e=>{for(let a=0;a<n.value.end-n.value.start+1;a+=1)c.line(i.value,[{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&y.value.forEach(e=>{for(let a=n.value.start;a<n.value.end;a+=1)a%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?y.value.forEach(e=>{e.localYLabels.forEach((a,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y},{x:o.value.right,y:e.localYLabels[r+1].y},{x:o.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):y.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(a=>{c.line(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&y.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.localZero},{x:o.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&y.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.left,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),c.line(i.value,[{x:o.value.right,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((a,r)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,a.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:a.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:a,seriesIndex:r}),a.x+t.value.style.chart.grid.y.axisLabels.offsetX,a.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),y.value.forEach(e=>{c.text(i.value,e.name,g.value/35,o.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)c.line(i.value,[{x:o.value.left+o.value.slot*e,y:o.value.top},{x:o.value.left+o.value.slot*e,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?x.value.yLabels.forEach((e,a)=>{a<x.value.yLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y},{x:o.value.right,y:x.value.yLabels[a+1].y},{x:o.value.left,y:x.value.yLabels[a+1].y}],{fillColor:a%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):x.value.yLabels.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.top},{x:o.value.left,y:o.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.bottom},{x:o.value.right,y:o.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:o.value.left,y:x.value.zero},{x:o.value.right,y:x.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&x.value.yLabels.forEach((e,a)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:a}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,o.value.bottom-o.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,T.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Ye(e){for(let a=0;a<e.coordinatesLine.length;a+=1){const r=(f.value===a?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[a].x,y:e.coordinatesLine[a].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function Ze(e){for(let a=0;a<e.coordinatesLine.length;a+=1)c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[a].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[a].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[a],seriesIndex:a}),e.coordinatesLine[a].x,e.coordinatesLine[a].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ge(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,o.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Se(){c.line(i.value,[{x:o.value.left+o.value.slot*f.value+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*f.value+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function je(){k.value.forEach((e,a)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:e.coordinatesLine[r].y},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:s.value.stacked?e.localZero:x.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:u.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.4/(s.value.stacked?1:k.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:x.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Je(e){e.useArea?s.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:x.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:x.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ke(){y.value.forEach((e,a)=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function te(){Xe(),M.value?(z.value&&f.value!==null&&t.value.style.chart.selector.show&&Se(),je(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ke(),qe.value.forEach(e=>{(e.type==="line"||!e.type)&&Je(e),z.value&&(Ye(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Ze(e))}),G.value=c.cloneCanvas(S.value)):(G.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(G.value,0,0)),z.value&&f.value!==null&&t.value.style.chart.selector.show&&Se(),z.value&&f.value!==null&&y.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ge(),M.value=!1}const _=c.debounce(()=>{z.value=!0,We()},w.value>200?10:1,!z.value);function Qe(e){const{left:a}=S.value.getBoundingClientRect(),r=e.clientX-a;if(r*2<o.value.left||r*2>o.value.right){H.value=!1,f.value=null;return}const d=r*2-o.value.left;if(f.value=Math.floor(d/o.value.slot),H.value=!0,!z.value)return;let h="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}))?V.value=m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(h+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),h+=Ue.value.join(""),V.value=h),z.value=!1}l.watch(()=>f.value,e=>{_()}),l.watch(()=>n.value,e=>{M.value=!0,te()},{deep:!0}),l.watch(()=>s.value.showDataLabels,e=>{M.value=!0,te()}),l.watch(()=>s.value.stacked,e=>{M.value=!0,z.value=!0,_()});function et(){H.value=!1,f.value=null,V.value=""}const q=l.ref(null),W=l.ref(null);l.onMounted(()=>{le()});function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):S.value&&(i.value=S.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:a,height:r}=c.useResponsive({chart:N.value,title:t.value.style.chart.title.text?ie.value:null,legend:t.value.style.chart.legend.show?ce.value:null,slicer:t.value.style.chart.zoom.show&&w.value>1?ve.value:null,source:de.value});requestAnimationFrame(()=>{ge.value=`${a} / ${r}`})});q.value=new ResizeObserver(e),q.value.observe(N.value.parentNode)}W.value=new ResizeObserver(e=>{for(const a of e)a.contentBoxSize&&B.value&&(M.value=!0,_())}),W.value.observe(B.value),we()}l.onBeforeUnmount(()=>{W.value&&W.value.disconnect(),q.value&&q.value.disconnect()});function ze(e){De("selectLegend",y.value.find(a=>a.absoluteIndex===e)),C.value.includes(e)?C.value=C.value.filter(a=>a!==e):C.value.push(e),M.value=!0,_()}const $e=l.computed(()=>R.value.map((e,a)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:C.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ze(e.absoluteIndex),isSegregated:C.value.includes(e.absoluteIndex)}))),tt=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),X=l.computed(()=>{const e=[""].concat(y.value.map(h=>h.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 a=[];for(let h=0;h<w.value;h+=1){const m=y.value.map(v=>v.series[h]??0).reduce((v,b)=>v+b,0);a.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[h]??h+1].concat(y.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((m??0).toFixed(t.value.table.rounding)))}const r={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},d=[t.value.table.columnNames.period].concat(y.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:a.slice(0,n.value.end-n.value.start),config:r,colNames:d}}),Te=l.computed(()=>{if(y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=y.value.map(r=>({label:r.name,color:r.color,type:r.type})),a=[];for(let r=n.value.start;r<n.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];y.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),a.push(d)}return{head:e,body:a}});function Ie(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=["",...Te.value.head.map(m=>m.label)],r=Te.value.body,d=e.concat([a]).concat(r),h=u.createCsvContent(d);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function lt(){return y.value}function Pe(){s.value.showTable=!s.value.showTable}function Me(){s.value.showDataLabels=!s.value.showDataLabels}function Oe(){s.value.stacked=!s.value.stacked}function Re(){s.value.showTooltip=!s.value.showTooltip}const Y=l.ref(!1);function ae(){Y.value=!Y.value}return Be({getData:lt,generateCsv:Ie,generatePdf:be,generateImage:xe,toggleTable:Pe,toggleLabels:Me,toggleStack:Oe,toggleTooltip:Re,toggleAnnotator:ae}),(e,a)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:N,id:`xy_canvas_${Z.value}`,class:l.normalizeClass(`vue-ui-donut ${U.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:a[5]||(a[5]=()=>l.unref(he)(!0)),onMouseleave:a[6]||(a[6]=()=>l.unref(he)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ie,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(nt._sfc_main,{key:`title_${j.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Q.value&&(l.unref(fe)||l.unref(ee))?(l.openBlock(),l.createBlock(Ee.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(pe),isImaging:l.unref(me),uid:Z.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:re.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:U.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:He,onGeneratePdf:l.unref(be),onGenerateCsv:Ie,onGenerateImage:l.unref(xe),onToggleTable:Pe,onToggleLabels:Me,onToggleStack:Oe,onToggleTooltip:Re,onToggleAnnotator:ae,style:l.normalizeStyle({visibility:l.unref(fe)?l.unref(ee)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:d})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:d})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${ge.value}`),ref_key:"container",ref:B},[Q.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:S,style:{width:"100%",height:"100%"},onMousemove:a[0]||(a[0]=r=>Qe(r)),onMouseleave:et},null,544)):(l.openBlock(),l.createBlock(ct.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(ot._sfc_main,{show:s.value.showTooltip&&H.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:V.value,isFullscreen:U.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ve,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&w.value>1?(l.openBlock(),l.createBlock(ut.Slicer,{ref_key:"slicerComponent",ref:E,key:`slicer_${ue.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:w.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":a[1]||(a[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":a[2]||(a[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Ce},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ce},[t.value.style.chart.legend.show&&Q.value?(l.openBlock(),l.createBlock(rt.Legend,{legendSet:$e.value,config:tt.value,key:`legend_${K.value}`,onClickMarker:a[3]||(a[3]=({i:r})=>ze(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${C.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,yt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:$e.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",gt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(pe)||l.unref(me)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:de,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(st.default,{key:4,hideDetails:"",config:{open:s.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:l.withCtx(()=>[(l.openBlock(),l.createBlock(it.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.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[4]||(a[4]=r=>s.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,pt)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&y.value.length?(l.openBlock(),l.createBlock(vt.PenAndPaper,{key:5,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:ae},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,ft))}},bt=ht._export_sfc(mt,[["__scopeId","data-v-13fe7bc4"]]);exports.default=bt;