vue-data-ui 3.5.2 → 3.7.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 (199) hide show
  1. package/README.md +36 -27
  2. package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
  3. package/dist/{BaseDraggableDialog-ymf2sfB8.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
  4. package/dist/{BaseIcon-BmMbm4d0.js → BaseIcon-CofSxalQ.js} +6 -5
  5. package/dist/{ColorPicker-ChuwChMo.js → ColorPicker-e1-OSGlQ.js} +10 -10
  6. package/dist/{DataTable-BT7VF2ua.js → DataTable-CHaOCmsE.js} +2 -2
  7. package/dist/{Legend-G6GMcdAc.js → Legend-Web3GjlR.js} +10 -10
  8. package/dist/{NonSvgPenAndPaper-DVgKKLIf.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
  9. package/dist/{PackageVersion-Y7t79Jtq.js → PackageVersion-Bq_mtsqr.js} +1 -1
  10. package/dist/{PenAndPaper-SZQIAgkg.js → PenAndPaper-HCZQTkqi.js} +20 -20
  11. package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
  12. package/dist/{Slicer-D2wm0coO.js → Slicer-BFBBG6xv.js} +23 -23
  13. package/dist/{SlicerPreview-ij72TAs6.js → SlicerPreview-D76aSViW.js} +2 -2
  14. package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
  15. package/dist/{Title-BzH_LEA3.js → Title-DfFUb9hd.js} +1 -1
  16. package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
  17. package/dist/{UserOptions-CGnQt6Fd.js → UserOptions-B3I-s3Lw.js} +2 -2
  18. package/dist/components/arrow.js +1 -1
  19. package/dist/components/vue-ui-3d-bar.js +3 -3
  20. package/dist/components/vue-ui-accordion.js +1 -1
  21. package/dist/components/vue-ui-age-pyramid.js +3 -3
  22. package/dist/components/vue-ui-annotator.js +1 -1
  23. package/dist/components/vue-ui-bullet.js +3 -3
  24. package/dist/components/vue-ui-candlestick.js +3 -3
  25. package/dist/components/vue-ui-carousel-table.js +1 -1
  26. package/dist/components/vue-ui-chestnut.js +3 -3
  27. package/dist/components/vue-ui-chord.js +3 -3
  28. package/dist/components/vue-ui-circle-pack.js +3 -3
  29. package/dist/components/vue-ui-cursor.js +1 -1
  30. package/dist/components/vue-ui-dashboard.js +1 -1
  31. package/dist/components/vue-ui-digits.js +1 -1
  32. package/dist/components/vue-ui-donut-evolution.js +2 -2
  33. package/dist/components/vue-ui-donut.js +3 -3
  34. package/dist/components/vue-ui-dumbbell.js +3 -3
  35. package/dist/components/vue-ui-flow.js +3 -3
  36. package/dist/components/vue-ui-funnel.js +2 -2
  37. package/dist/components/vue-ui-galaxy.js +1 -1
  38. package/dist/components/vue-ui-gauge.js +1 -1
  39. package/dist/components/vue-ui-gizmo.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-history-plot.js +3 -3
  42. package/dist/components/vue-ui-horizontal-bar.js +3 -3
  43. package/dist/components/vue-ui-icon.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-mini-loader.js +1 -1
  46. package/dist/components/vue-ui-molecule.js +3 -3
  47. package/dist/components/vue-ui-mood-radar.js +3 -3
  48. package/dist/components/vue-ui-nested-donuts.js +2 -2
  49. package/dist/components/vue-ui-onion.js +3 -3
  50. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  51. package/dist/components/vue-ui-quadrant.js +3 -3
  52. package/dist/components/vue-ui-quick-chart.js +3 -3
  53. package/dist/components/vue-ui-radar.js +3 -3
  54. package/dist/components/vue-ui-rating.js +1 -1
  55. package/dist/components/vue-ui-relation-circle.js +3 -3
  56. package/dist/components/vue-ui-ridgeline.js +3 -3
  57. package/dist/components/vue-ui-rings.js +3 -3
  58. package/dist/components/vue-ui-scatter.js +3 -3
  59. package/dist/components/vue-ui-skeleton.js +1 -1
  60. package/dist/components/vue-ui-smiley.js +1 -1
  61. package/dist/components/vue-ui-spark-trend.js +1 -1
  62. package/dist/components/vue-ui-sparkbar.js +2 -2
  63. package/dist/components/vue-ui-sparkgauge.js +3 -3
  64. package/dist/components/vue-ui-sparkhistogram.js +3 -3
  65. package/dist/components/vue-ui-sparkline.js +3 -3
  66. package/dist/components/vue-ui-sparkstackbar.js +2 -2
  67. package/dist/components/vue-ui-stackbar.js +3 -3
  68. package/dist/components/vue-ui-stackline.js +5 -0
  69. package/dist/components/vue-ui-strip-plot.js +3 -3
  70. package/dist/components/vue-ui-table-heatmap.js +1 -1
  71. package/dist/components/vue-ui-table-sparkline.js +2 -2
  72. package/dist/components/vue-ui-table.js +1 -1
  73. package/dist/components/vue-ui-thermometer.js +3 -3
  74. package/dist/components/vue-ui-timer.js +1 -1
  75. package/dist/components/vue-ui-tiremarks.js +2 -2
  76. package/dist/components/vue-ui-treemap.js +3 -3
  77. package/dist/components/vue-ui-vertical-bar.js +1 -1
  78. package/dist/components/vue-ui-waffle.js +2 -2
  79. package/dist/components/vue-ui-wheel.js +1 -1
  80. package/dist/components/vue-ui-word-cloud.js +3 -3
  81. package/dist/components/vue-ui-world.js +1 -1
  82. package/dist/components/vue-ui-xy-canvas.js +3 -3
  83. package/dist/components/vue-ui-xy.js +3 -3
  84. package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
  85. package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
  86. package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
  87. package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +303 -9
  90. package/dist/types/vue-ui-stackline.d.ts +18 -0
  91. package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
  92. package/dist/{useNestedProp-CReNavA0.js → useNestedProp-CWo6bftQ.js} +535 -329
  93. package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
  94. package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
  95. package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
  96. package/dist/{vue-data-ui-BRaq4hRp.js → vue-data-ui-ByLTJx5V.js} +79 -77
  97. package/dist/vue-data-ui.js +226 -204
  98. package/dist/{vue-ui-3d-bar-BB4ii8Nt.js → vue-ui-3d-bar-Dkds4k5N.js} +546 -517
  99. package/dist/{vue-ui-accordion-BmFTVF1a.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
  100. package/dist/vue-ui-age-pyramid-C-fwZRYE.js +960 -0
  101. package/dist/{vue-ui-annotator-CcpaXBNK.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
  102. package/dist/vue-ui-bullet-BKVJRjGh.js +657 -0
  103. package/dist/{vue-ui-candlestick-CMP7UL6z.js → vue-ui-candlestick-BKFWHU4O.js} +596 -561
  104. package/dist/{vue-ui-carousel-table-CzOcKsDj.js → vue-ui-carousel-table-VmPH6y2g.js} +48 -48
  105. package/dist/{vue-ui-chestnut-S787oASt.js → vue-ui-chestnut-DpMHe-OI.js} +534 -505
  106. package/dist/vue-ui-chord-Djdr0PY_.js +1182 -0
  107. package/dist/vue-ui-circle-pack-CyUqNJQt.js +832 -0
  108. package/dist/{vue-ui-cursor-C3yD_TUr.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
  109. package/dist/{vue-ui-dashboard-BfEcVRxQ.js → vue-ui-dashboard-eBXj-KCw.js} +140 -140
  110. package/dist/{vue-ui-digits-pRh179Gg.js → vue-ui-digits-D382I0-w.js} +2 -2
  111. package/dist/{vue-ui-donut-B_tEm4dT.js → vue-ui-donut-BLb0kj_P.js} +634 -602
  112. package/dist/vue-ui-donut-evolution-BqrldXpI.js +1243 -0
  113. package/dist/vue-ui-dumbbell-BuZT5a-d.js +1258 -0
  114. package/dist/vue-ui-flow-LLp6ntEP.js +1026 -0
  115. package/dist/vue-ui-funnel-pILUR-OG.js +743 -0
  116. package/dist/vue-ui-galaxy-X6yiw8kx.js +837 -0
  117. package/dist/vue-ui-gauge-DBh-vFb9.js +864 -0
  118. package/dist/{vue-ui-gizmo-BQzQlUJ8.js → vue-ui-gizmo-DtyEukIP.js} +3 -3
  119. package/dist/{vue-ui-heatmap-C9MhHWpp.js → vue-ui-heatmap-mkD6QkXo.js} +501 -466
  120. package/dist/vue-ui-history-plot-CyTaBaxA.js +1239 -0
  121. package/dist/{vue-ui-kpi-jcrPjW4C.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
  122. package/dist/{vue-ui-mini-loader-DTM98mRN.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
  123. package/dist/vue-ui-molecule-UzQ3o5HW.js +782 -0
  124. package/dist/vue-ui-mood-radar-C2zkRLGy.js +930 -0
  125. package/dist/vue-ui-nested-donuts-B5OpvmJ9.js +1454 -0
  126. package/dist/vue-ui-onion-DbhIOGtF.js +944 -0
  127. package/dist/vue-ui-parallel-coordinate-plot-Dv_T4mWW.js +1080 -0
  128. package/dist/{vue-ui-quadrant-CeM23s0z.js → vue-ui-quadrant-CG6_CWsQ.js} +510 -481
  129. package/dist/{vue-ui-quick-chart-C0RMQzjC.js → vue-ui-quick-chart-DOeRhk7r.js} +795 -758
  130. package/dist/vue-ui-radar-DdHa9Hsh.js +1013 -0
  131. package/dist/{vue-ui-rating-tj97undO.js → vue-ui-rating-DtzmtJwF.js} +26 -26
  132. package/dist/vue-ui-relation-circle-B5lL4l9w.js +670 -0
  133. package/dist/vue-ui-ridgeline-3pk4Mlft.js +1302 -0
  134. package/dist/vue-ui-rings-DhyrjrZi.js +884 -0
  135. package/dist/vue-ui-scatter-DKCD70mi.js +1619 -0
  136. package/dist/{vue-ui-skeleton-87TORm6s.js → vue-ui-skeleton-CzzdmraB.js} +3 -3
  137. package/dist/{vue-ui-smiley-B74geHT3.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
  138. package/dist/vue-ui-spark-trend-BMTcxeCT.js +364 -0
  139. package/dist/vue-ui-sparkbar-DVk1JiPL.js +381 -0
  140. package/dist/vue-ui-sparkgauge-Cq9Nw_xu.js +260 -0
  141. package/dist/vue-ui-sparkhistogram-PFHlCE_k.js +411 -0
  142. package/dist/vue-ui-sparkline-BHHwO_cV.js +549 -0
  143. package/dist/vue-ui-sparkstackbar-BosVkkiC.js +470 -0
  144. package/dist/vue-ui-stackbar-Djk5CPUy.js +1867 -0
  145. package/dist/vue-ui-stackline-mU4CSol9.js +1963 -0
  146. package/dist/{vue-ui-strip-plot-C1N2n39d.js → vue-ui-strip-plot-CZQSL0GK.js} +343 -314
  147. package/dist/{vue-ui-table-CcuoPHgI.js → vue-ui-table-DMM090pe.js} +5 -5
  148. package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
  149. package/dist/{vue-ui-table-sparkline-BAxmZRff.js → vue-ui-table-sparkline-CQJc0mJY.js} +292 -263
  150. package/dist/vue-ui-thermometer-D1uxoVeZ.js +613 -0
  151. package/dist/{vue-ui-timer-BVsUQJz_.js → vue-ui-timer-jTnS3ES5.js} +25 -25
  152. package/dist/vue-ui-tiremarks-Bv-oIFVV.js +477 -0
  153. package/dist/vue-ui-treemap-B9MVtunp.js +1359 -0
  154. package/dist/{vue-ui-vertical-bar-B3gfBqD_.js → vue-ui-vertical-bar-BSbDj5qZ.js} +520 -485
  155. package/dist/{vue-ui-waffle-Bhlqo4xM.js → vue-ui-waffle-DIALVfvc.js} +376 -347
  156. package/dist/vue-ui-wheel-aUhrFpGk.js +690 -0
  157. package/dist/vue-ui-word-cloud-DZmMWsUu.js +904 -0
  158. package/dist/{vue-ui-world-C8KVyDim.js → vue-ui-world-CVLlgp2f.js} +57 -57
  159. package/dist/vue-ui-xy-Cy7mOurZ.js +3455 -0
  160. package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
  161. package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
  162. package/package.json +5 -5
  163. package/dist/themes-AUNCOb2G.js +0 -53
  164. package/dist/vue-ui-age-pyramid-8bUepd28.js +0 -933
  165. package/dist/vue-ui-bullet-BvT4scFv.js +0 -630
  166. package/dist/vue-ui-chord-Dl9Y4mcz.js +0 -1153
  167. package/dist/vue-ui-circle-pack-CU09BzOV.js +0 -803
  168. package/dist/vue-ui-donut-evolution-DiGhMwMO.js +0 -1208
  169. package/dist/vue-ui-dumbbell-BlF3CLbN.js +0 -1231
  170. package/dist/vue-ui-flow-BQi5L8mJ.js +0 -991
  171. package/dist/vue-ui-funnel-CM_6Sare.js +0 -716
  172. package/dist/vue-ui-galaxy-BnZA62Li.js +0 -808
  173. package/dist/vue-ui-gauge-DAk72bez.js +0 -835
  174. package/dist/vue-ui-history-plot-BYQh3E8U.js +0 -1204
  175. package/dist/vue-ui-molecule-Bd1OXvl3.js +0 -753
  176. package/dist/vue-ui-mood-radar-DuoiTsYn.js +0 -903
  177. package/dist/vue-ui-nested-donuts-BTswQFjz.js +0 -1419
  178. package/dist/vue-ui-onion-D-1U2Qgl.js +0 -915
  179. package/dist/vue-ui-parallel-coordinate-plot-D-7VFHas.js +0 -1051
  180. package/dist/vue-ui-radar-BSfxyur3.js +0 -984
  181. package/dist/vue-ui-relation-circle-C7uV2mIj.js +0 -641
  182. package/dist/vue-ui-ridgeline-CYMfTlwI.js +0 -1273
  183. package/dist/vue-ui-rings-C96aj57d.js +0 -855
  184. package/dist/vue-ui-scatter-CtvOXUnx.js +0 -1590
  185. package/dist/vue-ui-spark-trend-6_Ibziyv.js +0 -337
  186. package/dist/vue-ui-sparkbar-BDCocMLI.js +0 -352
  187. package/dist/vue-ui-sparkgauge-CQ4Zk9-f.js +0 -233
  188. package/dist/vue-ui-sparkhistogram-BlTV9wfn.js +0 -384
  189. package/dist/vue-ui-sparkline-DWESyiqL.js +0 -514
  190. package/dist/vue-ui-sparkstackbar-DK_7X8mL.js +0 -441
  191. package/dist/vue-ui-stackbar-BWuw8ff4.js +0 -1827
  192. package/dist/vue-ui-table-heatmap-C9EMEM3Z.js +0 -282
  193. package/dist/vue-ui-thermometer-CDrM-WFq.js +0 -584
  194. package/dist/vue-ui-tiremarks-BQH2pNkG.js +0 -450
  195. package/dist/vue-ui-treemap-6WLoCHsH.js +0 -1330
  196. package/dist/vue-ui-wheel-CqHw1WuW.js +0 -663
  197. package/dist/vue-ui-word-cloud-CKuWZGLv.js +0 -875
  198. package/dist/vue-ui-xy-Cz2qIEfi.js +0 -3424
  199. package/dist/vue-ui-xy-canvas-y4h7gEFp.js +0 -1564
@@ -1,3424 +0,0 @@
1
- import { defineAsyncComponent as Xe, useSlots as Xo, getCurrentInstance as Go, ref as x, computed as b, onMounted as ql, toRefs as Uo, watch as Al, watchEffect as Ma, onBeforeUnmount as kt, nextTick as Aa, createElementBlock as r, openBlock as n, normalizeStyle as $, normalizeClass as ll, createBlock as Te, createCommentVNode as h, createElementVNode as p, createVNode as vl, unref as v, withCtx as G, renderSlot as B, normalizeProps as ke, guardReactiveProps as _e, createSlots as Ca, Fragment as d, renderList as w, mergeProps as tl, toDisplayString as te, Teleport as qo, resolveDynamicComponent as Zo, withDirectives as Jo, vModelCheckbox as Ko, createTextVNode as Ta } from "vue";
2
- import { c as _t, f as wt, t as Qo, e as jo, m as Cl, n as al, h as za, p as Ia, q as Zl, r as Y, u as St, v as es, w as ls, x as P, y as Oa, z as Na, A as Va, B as Pa, C as ts, D as Fa, E as Ra, a as se, F as as, G as Ba, H as os, j as Ha, k as Pe, d as Fe, i as ol, s as ze, I as ss, J as Ge, K as Jl, L as $e, M as us, N as Ue, O as fe, b as is, o as Da, P as ns, Q as rs, R as dl } from "./lib-C_mNZmhD.js";
3
- import { t as cs } from "./useResponsive-DfdjqQps.js";
4
- import { u as vs, a as Kl } from "./useNestedProp-CReNavA0.js";
5
- import { u as ds } from "./usePrinter-DTzqpYKF.js";
6
- import { u as hs, B as fs } from "./BaseScanner-BgWxam9d.js";
7
- import { u as Ea, a as gs, l as ms } from "./useTimeLabels-BGFjWgrv.js";
8
- import { u as bs } from "./useSvgExport-DrjCWun4.js";
9
- import { u as xs } from "./useTimeLabelCollider-CIsgDrl9.js";
10
- import ps from "./img-BecE5qXd.js";
11
- import ys from "./Title-BzH_LEA3.js";
12
- import { t as ks } from "./themes-AUNCOb2G.js";
13
- import { _ as Ql } from "./Shape-CNXKB8O0.js";
14
- import { S as _s } from "./SlicerPreview-ij72TAs6.js";
15
- import ws from "./vue-ui-accordion-BmFTVF1a.js";
16
- import { _ as Ss } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- const $s = ["id"], Ls = ["id"], Ms = ["viewBox", "aria-label"], As = ["x", "y", "width", "height"], Cs = { key: 1 }, Ts = { class: "vue-ui-xy-grid" }, zs = ["stroke", "x1", "x2", "y1", "y2"], Is = ["stroke", "x1", "x2", "y1", "y2"], Os = { key: 1 }, Ns = ["x1", "x2", "y1", "y2", "stroke"], Vs = ["x1", "x2", "y1", "y2", "stroke"], Ps = ["x1", "x2", "y1", "y2", "stroke"], Fs = { key: 3 }, Rs = ["d", "stroke"], Bs = { key: 4 }, Hs = ["d", "stroke"], Ds = ["id"], Es = ["stop-color"], Ys = ["stop-color"], Ws = ["stop-color"], Xs = ["id"], Gs = ["stop-color"], Us = ["stop-color"], qs = ["stop-color"], Zs = ["id"], Js = ["stop-color"], Ks = ["stop-color"], Qs = ["id"], js = ["stop-color"], eu = ["stop-color"], lu = ["id"], tu = ["stop-color"], au = ["stop-color"], ou = ["x", "y", "height", "width", "fill"], su = ["x", "y", "width"], uu = { key: 0 }, iu = ["x", "y", "height", "width", "fill"], nu = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], ru = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], cu = ["width", "x", "y"], vu = ["stroke", "x1", "x2", "y1", "y2"], du = { key: 3 }, hu = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], fu = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], gu = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mu = ["fill", "font-size", "transform"], bu = ["x1", "x2", "y1", "y2", "stroke"], xu = ["x", "y", "font-size", "fill"], pu = ["x1", "x2", "y1", "y2", "stroke"], yu = ["x", "y", "font-size", "fill"], ku = ["width", "x", "y"], _u = { style: { width: "100%" } }, wu = ["d", "stroke", "stroke-width", "stroke-dasharray"], Su = ["d", "stroke", "stroke-width", "stroke-dasharray"], $u = { key: 6 }, Lu = { key: 7 }, Mu = ["d", "fill", "fill-opacity"], Au = { key: 0 }, Cu = ["d", "fill"], Tu = ["d", "fill"], zu = ["d", "fill"], Iu = ["d", "fill"], Ou = ["d", "stroke", "stroke-width", "stroke-dasharray"], Nu = ["d", "stroke", "stroke-width", "stroke-dasharray"], Vu = ["width", "x", "y"], Pu = { style: { width: "100%" } }, Fu = { key: 8 }, Ru = ["x", "y", "font-size", "fill"], Bu = ["x", "y", "font-size", "fill", "font-weight"], Hu = { key: 9 }, Du = ["x", "y", "font-size", "fill"], Eu = { key: 10 }, Yu = ["x", "y"], Wu = ["innerHTML"], Xu = ["x", "y"], Gu = ["innerHTML"], Uu = ["x1", "x2", "y1", "y2", "stroke"], qu = { key: 11 }, Zu = ["x", "y", "font-size", "fill"], Ju = { key: 12 }, Ku = ["x", "y"], Qu = ["innerHTML"], ju = ["x", "y"], ei = ["innerHTML"], li = ["x1", "x2", "y1", "y2", "stroke"], ti = ["x", "y", "font-size", "fill", "innerHTML"], ai = ["x", "y", "font-size", "fill", "innerHTML"], oi = ["x", "y", "font-size", "fill", "innerHTML"], si = ["x", "y", "font-size", "fill", "innerHTML"], ui = { key: 0 }, ii = ["id"], ni = ["fill", "stroke"], ri = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], ci = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], vi = ["x", "y", "font-size", "fill", "stroke"], di = ["id"], hi = ["stop-color"], fi = ["stop-color"], gi = ["x", "y", "width", "height", "fill", "onMouseenter"], mi = ["font-size", "fill", "transform"], bi = ["x", "y", "font-size", "fill"], xi = ["text-anchor", "font-size", "fill", "transform", "onClick"], pi = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], yi = { key: 15 }, ki = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], _i = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], wi = ["y", "x", "width", "height", "fill"], Si = ["id", "x", "y", "font-size", "fill", "text-anchor"], $i = {
18
- key: 16,
19
- style: { "pointer-events": "none" }
20
- }, Li = ["x", "y"], Mi = ["innerHTML"], Ai = ["cx", "cy", "r", "fill"], Ci = ["data-start", "data-end"], Ti = {
21
- key: 4,
22
- class: "vue-data-ui-watermark"
23
- }, zi = {
24
- class: "vue-ui-xy-tag-arrow",
25
- height: "20",
26
- viewBox: "0 0 10 20",
27
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
28
- }, Ii = ["fill"], Oi = ["innerHTML"], Ni = {
29
- class: "vue-ui-xy-tag-arrow",
30
- height: "100%",
31
- viewBox: "0 0 10 20",
32
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
33
- }, Vi = ["fill"], Pi = ["innerHTML"], Fi = {
34
- class: "vue-ui-xy-tag-arrow",
35
- height: "20",
36
- viewBox: "0 0 10 20",
37
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
38
- }, Ri = ["fill"], Bi = ["innerHTML"], Hi = {
39
- class: "vue-ui-xy-tag-arrow",
40
- height: "100%",
41
- viewBox: "0 0 10 20",
42
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
43
- }, Di = ["fill"], Ei = ["innerHTML"], Yi = ["id"], Wi = ["onClick"], Xi = {
44
- key: 0,
45
- viewBox: "0 0 20 12",
46
- height: "1em",
47
- width: "1.43em"
48
- }, Gi = ["stroke", "fill"], Ui = {
49
- key: 1,
50
- viewBox: "0 0 40 40",
51
- height: "1em",
52
- width: "1em"
53
- }, qi = ["fill"], Zi = ["fill"], Ji = {
54
- key: 2,
55
- viewBox: "0 0 12 12",
56
- height: "1em",
57
- width: "1em"
58
- }, Ki = {
59
- style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
60
- "data-dom-to-png-ignore": ""
61
- }, Qi = ["innerHTML"], ji = {
62
- __name: "vue-ui-xy",
63
- props: {
64
- config: {
65
- type: Object,
66
- default() {
67
- return {};
68
- }
69
- },
70
- dataset: {
71
- type: Array,
72
- default() {
73
- return [];
74
- }
75
- },
76
- selectedXIndex: {
77
- type: Number,
78
- default: void 0
79
- }
80
- },
81
- emits: ["selectTimeLabel", "selectX", "selectLegend"],
82
- setup(jl, { expose: Ya, emit: Wa }) {
83
- const g = jl, Xa = Xe(() => import("./DataTable-BT7VF2ua.js")), Ga = Xe(() => import("./Tooltip-oWCO1HKy.js")), Ua = Xe(() => import("./UserOptions-CGnQt6Fd.js")), $t = Xe(() => import("./BaseIcon-BmMbm4d0.js")), qa = Xe(() => import("./vue-ui-table-sparkline-BAxmZRff.js")), Za = Xe(() => import("./PackageVersion-Y7t79Jtq.js")), Ja = Xe(() => import("./PenAndPaper-SZQIAgkg.js")), Ka = Xe(() => import("./BaseDraggableDialog-ymf2sfB8.js")), et = Wa, Lt = Xo(), Qa = Go(), { vue_ui_xy: hl } = vs(), Ie = x(null), fl = x(null), Oe = x(null), sl = x(null), gl = x(null), ml = x(null), ja = x(null), lt = x(null), tt = x(null), ul = x(null), at = x(null), ot = x(null), He = x(null), st = x(null), eo = x(0), I = x(null), Mt = x(!0), ve = x(600), ee = x(1e3), Tl = x("0 0 1000 600"), lo = x({ x: 0, y: 0 }), bl = x({ line: "line", bar: "bar", plot: "plot" }), xl = x(!1), qe = x(!1), At = x(!1), Ze = x(null), J = x([]), E = x(_t()), Ct = x(0), Tt = x(0), zt = x(0), pl = x(!0), ut = x(0), V = x(null), It = x(!1), it = x(!0), zl = x(!0), ue = x(null), Re = x({}), Il = x(null), Ot = x(!1), il = x(null), _ = x(null), to = b(() => ({
84
- height: ve.value,
85
- width: ee.value
86
- }));
87
- function Nt(t) {
88
- return Number.isFinite(t) ? Math.max(0, Math.floor(t)) : 0;
89
- }
90
- function nt(t, s, e = 0) {
91
- return Number.isFinite(t) && Number.isFinite(s) && Math.abs(s) > 1e-9 ? t / s : e;
92
- }
93
- const Vt = x(!1), y = x({
94
- xAxis: 18,
95
- yAxis: 12,
96
- dataLabels: 20,
97
- plotLabels: 10
98
- }), Le = x({ plot: 3, line: 3 });
99
- ql(() => {
100
- Ot.value = !0, g.dataset.length && g.dataset.forEach((t, s) => {
101
- [null, void 0].includes(t.series) && wt({
102
- componentName: "VueUiXy",
103
- type: "datasetSerieAttribute",
104
- property: "series (number[])",
105
- index: s,
106
- debug: yl.value
107
- });
108
- });
109
- });
110
- function rt() {
111
- if (!Object.keys(g.config || {}).length)
112
- return hl;
113
- const t = Kl({
114
- userConfig: g.config,
115
- defaultConfig: hl
116
- });
117
- return g.config && fe(g.config, "chart.highlightArea") && (Array.isArray(g.config.chart.highlightArea) ? t.chart.highlightArea = g.config.chart.highlightArea : t.chart.highlightArea = [g.config.chart.highlightArea]), g.config && fe(g.config, "chart.grid.labels.yAxis.scaleMin") ? t.chart.grid.labels.yAxis.scaleMin = g.config.chart.grid.labels.yAxis.scaleMin : t.chart.grid.labels.yAxis.scaleMin = null, g.config && fe(g.config, "chart.grid.labels.yAxis.scaleMax") ? t.chart.grid.labels.yAxis.scaleMax = g.config.chart.grid.labels.yAxis.scaleMax : t.chart.grid.labels.yAxis.scaleMax = null, g.config && fe(g.config, "chart.zoom.startIndex") ? t.chart.zoom.startIndex = g.config.chart.zoom.startIndex : t.chart.zoom.startIndex = null, g.config && fe(g.config, "chart.zoom.endIndex") ? t.chart.zoom.endIndex = g.config.chart.zoom.endIndex : t.chart.zoom.endIndex = null, g.config && fe(g.config, "chart.grid.labels.yAxis.groupColor") ? t.chart.grid.labels.yAxis.groupColor = g.config.chart.grid.labels.yAxis.groupColor : t.chart.grid.labels.yAxis.groupColor = null, g.config && fe(g.config, "chart.annotations") && Array.isArray(g.config.chart.annotations) && g.config.chart.annotations.length ? t.chart.annotations = g.config.chart.annotations.map((s) => Kl({
118
- defaultConfig: hl.chart.annotations[0],
119
- userConfig: s
120
- })) : t.chart.annotations = [], g.config && fe(g.config, "chart.grid.position") && g.config.chart.grid.position === "start" && g.dataset.length && g.dataset.some((s) => s.type === "bar") && (t.chart.grid.position = "middle", fe(g.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), g.config && fe(g.config, "chart.grid.labels.yAxis.serieNameFormatter") ? t.chart.grid.labels.yAxis.serieNameFormatter = g.config.chart.grid.labels.yAxis.serieNameFormatter : t.chart.grid.labels.yAxis.serieNameFormatter = null, g.config && fe(g.config, "events.datapointEnter") ? t.events.datapointEnter = g.config.events.datapointEnter : t.events.datapointEnter = null, g.config && fe(g.config, "events.datapointLeave") ? t.events.datapointLeave = g.config.events.datapointLeave : t.events.datapointLeave = null, g.config && fe(g.config, "events.datapointClick") ? t.events.datapointClick = g.config.events.datapointClick : t.events.datapointClick = null, g.config && fe(g.config, "chart.highlightArea") && (Array.isArray(g.config.chart.highlightArea) ? t.chart.highlightArea = g.config.chart.highlightArea.map((s) => Pt({
121
- defaultConfig: hl.chart.highlightArea,
122
- userConfig: s
123
- })) : t.chart.highlightArea = Pt({
124
- defaultConfig: hl.chart.highlightArea,
125
- userConfig: g.config.chart.highlightArea
126
- })), t.theme ? {
127
- ...Kl({
128
- userConfig: ks.vue_ui_xy[t.theme] || g.config,
129
- defaultConfig: t
130
- }),
131
- customPalette: is[t.theme] || g.palette
132
- } : t;
133
- }
134
- function Pt({ defaultConfig: t, userConfig: s }) {
135
- return Kl({
136
- defaultConfig: t,
137
- userConfig: s
138
- });
139
- }
140
- const ct = b({
141
- get() {
142
- return !!g.dataset && g.dataset.length;
143
- },
144
- set(t) {
145
- return t;
146
- }
147
- }), l = x(rt()), f = x({
148
- dataLabels: { show: !0 },
149
- showTooltip: !0,
150
- showTable: !1,
151
- isStacked: !1,
152
- useIndividualScale: !1
153
- });
154
- function vt() {
155
- Vt.value ? (f.value.isStacked = l.value.chart.grid.labels.yAxis.stacked, f.value.useIndividualScale == null && (f.value.useIndividualScale = l.value.chart.grid.labels.yAxis.useIndividualScale)) : (f.value = {
156
- dataLabels: { show: !0 },
157
- showTooltip: l.value.chart.tooltip.show === !0,
158
- showTable: l.value.showTable === !0,
159
- isStacked: l.value.chart.grid.labels.yAxis.stacked,
160
- useIndividualScale: l.value.chart.grid.labels.yAxis.useIndividualScale
161
- }, Vt.value = !0);
162
- }
163
- const yl = b(() => !!l.value.debug), { loading: ie, FINAL_DATASET: ge, manualLoading: Ol } = hs({
164
- ...Uo(g),
165
- FINAL_CONFIG: l,
166
- prepareConfig: rt,
167
- callback: () => {
168
- Promise.resolve().then(async () => {
169
- await Rl(), f.value.showTable = l.value.showTable;
170
- });
171
- },
172
- skeletonDataset: [
173
- {
174
- name: "",
175
- series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
176
- type: "line",
177
- smooth: !0,
178
- color: "#BABABA"
179
- },
180
- {
181
- name: "",
182
- series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
183
- type: "bar",
184
- color: "#CACACA"
185
- }
186
- ],
187
- skeletonConfig: Qo({
188
- defaultConfig: l.value,
189
- userConfig: {
190
- useCssAnimation: !1,
191
- showTable: !1,
192
- chart: {
193
- annotations: [],
194
- highlightArea: [],
195
- backgroundColor: "#99999930",
196
- grid: {
197
- stroke: "#6A6A6A",
198
- labels: {
199
- show: !1,
200
- axis: {
201
- yLabel: "",
202
- xLabel: ""
203
- },
204
- xAxisLabels: { show: !1 },
205
- yAxis: {
206
- commonScaleSteps: 10,
207
- useNiceScale: !0,
208
- scaleMin: 0,
209
- scaleMax: 134
210
- },
211
- zeroLine: { show: !0 }
212
- }
213
- },
214
- padding: {
215
- top: 12,
216
- bottom: 24,
217
- left: 24,
218
- right: 24
219
- },
220
- userOptions: { show: !1 },
221
- zoom: {
222
- show: !1,
223
- startIndex: null,
224
- endIndex: null
225
- }
226
- },
227
- bar: {
228
- serieName: { show: !1 },
229
- labels: { show: !1 },
230
- border: {
231
- useSerieColor: !1,
232
- stroke: "#999999"
233
- }
234
- },
235
- line: {
236
- dot: {
237
- useSerieColor: !1,
238
- fill: "#8A8A8A"
239
- },
240
- labels: { show: !1 }
241
- }
242
- }
243
- })
244
- });
245
- function ao(t) {
246
- const s = /* @__PURE__ */ new WeakMap();
247
- return (e, ...u) => {
248
- let a = s.get(e);
249
- const i = JSON.stringify(u);
250
- if (a && a.has(i)) return a.get(i);
251
- const o = t(e, ...u);
252
- return a || (a = /* @__PURE__ */ new Map(), s.set(e, a)), a.set(i, o), o;
253
- };
254
- }
255
- const oo = ao((t, s) => St({ data: t, threshold: s })), De = (t) => oo(t, l.value.downsample.threshold), Ne = b({
256
- get: () => Math.max(...ge.value.map((t) => De(t.series).length)),
257
- set: (t) => t
258
- }), m = x({ start: 0, end: Ne.value }), Me = x({ start: 0, end: Ne.value }), Ft = b(() => l.value.chart.zoom.preview.enable && (Me.value.start !== m.value.start || Me.value.end !== m.value.end));
259
- function Rt(t, s) {
260
- Me.value[t] = s;
261
- }
262
- function nl() {
263
- const t = Math.max(
264
- 1,
265
- ...ge.value.map((u) => De(u.series).length)
266
- );
267
- let s = Math.max(0, Math.min(m.value.start ?? 0, t - 1)), e = Math.max(s + 1, Math.min(m.value.end ?? t, t));
268
- (!Number.isFinite(s) || !Number.isFinite(e) || e <= s) && (s = 0, e = t), m.value = { start: s, end: e }, Me.value.start = s, Me.value.end = e, Oe.value && (Oe.value.setStartValue(s), Oe.value.setEndValue(e));
269
- }
270
- const so = b(() => {
271
- const { left: t, top: s, width: e, height: u } = c.value, a = m.value.start, o = m.value.end - a, A = e / o, C = Me.value.start - a, O = Me.value.end - a, S = Math.max(0, Math.min(o, C)), T = Math.max(0, Math.min(o, O));
272
- return {
273
- x: t + S * A,
274
- y: s,
275
- width: (T - S) * A,
276
- height: u,
277
- fill: l.value.chart.zoom.preview.fill,
278
- stroke: l.value.chart.zoom.preview.stroke,
279
- "stroke-width": l.value.chart.zoom.preview.strokeWidth,
280
- "stroke-dasharray": l.value.chart.zoom.preview.strokeDasharray,
281
- "stroke-linecap": "round",
282
- "stroke-linejoin": "round",
283
- style: {
284
- pointerEvents: "none",
285
- transition: "none !important",
286
- animation: "none !important"
287
- }
288
- };
289
- });
290
- Al(() => g.selectedXIndex, (t) => {
291
- if ([null, void 0].includes(g.selectedXIndex)) {
292
- _.value = null;
293
- return;
294
- }
295
- const s = t - m.value.start;
296
- s < 0 || t >= m.value.end ? _.value = null : _.value = s ?? null;
297
- }, { immediate: !0 });
298
- const { isPrinting: dt, isImaging: Bt, generatePdf: Ht, generateImage: Dt } = ds({
299
- elementId: `vue-ui-xy_${E.value}`,
300
- fileName: l.value.chart.title.text || "vue-ui-xy",
301
- options: l.value.chart.userOptions.print
302
- }), uo = x(!1), Nl = b(() => jo(l.value.customPalette)), Vl = b(() => {
303
- if (l.value.chart.grid.labels.yAxis.scaleMin !== null)
304
- return l.value.chart.grid.labels.yAxis.scaleMin;
305
- const t = Math.min(...Be.value.filter((s) => !J.value.includes(s.id)).map((s) => Math.min(...s.series)));
306
- return t > 0 ? 0 : t;
307
- }), Pl = b(() => {
308
- if (l.value.chart.grid.labels.yAxis.scaleMax)
309
- return l.value.chart.grid.labels.yAxis.scaleMax;
310
- const t = Math.max(...Be.value.filter((s) => !J.value.includes(s.id)).map((s) => Math.max(...s.series)));
311
- return Vl.value === t ? t + 1 : t;
312
- }), Ae = b(() => l.value.chart.grid.labels.yAxis.useNiceScale ? Cl(Vl.value, Pl.value < 0 ? 0 : Pl.value, l.value.chart.grid.labels.yAxis.commonScaleSteps) : al(Vl.value, Pl.value < 0 ? 0 : Pl.value, l.value.chart.grid.labels.yAxis.commonScaleSteps)), kl = b(() => [null, void 0].includes(l.value.chart.grid.labels.yAxis.scaleMin) ? Ae.value.min >= 0 ? 0 : Math.abs(Ae.value.min) : -Ae.value.min), Be = b(() => Mt.value ? ge.value.map((t, s) => {
313
- const e = De(t.series), u = `uniqueId_${s}`;
314
- return {
315
- ...t,
316
- slotAbsoluteIndex: s,
317
- series: e.map((a) => Zl(a) ? a : null).slice(m.value.start, m.value.end),
318
- color: za(t.color ? t.color : Nl.value[s] ? Nl.value[s] : Ia[s]),
319
- id: u,
320
- scaleLabel: t.scaleLabel || u
321
- };
322
- }) : ge.value), me = b(() => Be.value.map((t, s) => ({
323
- absoluteIndex: s,
324
- ...t,
325
- series: t.series.map((e) => e + kl.value),
326
- absoluteValues: t.series,
327
- segregate: () => El(t),
328
- isSegregated: J.value.includes(t.id)
329
- }))), we = b(() => Be.value.map((t, s) => ({
330
- ...t,
331
- series: t.series.map((e) => e + kl.value),
332
- absoluteValues: t.series
333
- })).filter((t) => !J.value.includes(t.id)));
334
- function io() {
335
- let t = 0;
336
- at.value && (t = Array.from(at.value.querySelectorAll("text")).reduce((a, i) => {
337
- const o = i.getComputedTextLength();
338
- return (o > a ? o : a) + l.value.chart.grid.labels.yAxis.scaleValueOffsetX;
339
- }, 0));
340
- const s = tt.value ? tt.value.getBoundingClientRect().width + l.value.chart.grid.labels.axis.yLabelOffsetX + y.value.yAxis : 0, e = l.value.chart.grid.labels.yAxis.crosshairSize;
341
- return t + s + e;
342
- }
343
- const ht = x(0), no = cs((t) => {
344
- ht.value = t;
345
- }, 100);
346
- Ma((t) => {
347
- const s = ul.value;
348
- if (!s) return;
349
- const e = new ResizeObserver((u) => {
350
- no(u[0].contentRect.height);
351
- });
352
- e.observe(s), t(() => e.disconnect());
353
- }), kt(() => {
354
- ht.value = 0;
355
- });
356
- const Et = b(() => {
357
- let t = 0;
358
- lt.value && (t = lt.value.getBBox().height);
359
- let s = 0;
360
- return ul.value && (s = ht.value), t + s + y.value.xAxis;
361
- }), ro = b(() => ge.value.some((t) => t.useProgression)), c = b(() => {
362
- let t = 0;
363
- const s = 36;
364
- l.value.chart.grid.labels.show && (f.value.useIndividualScale && !f.value.isStacked ? t = (ge.value.length - J.value.length) * (l.value.chart.grid.labels.yAxis.labelWidth + s) : f.value.useIndividualScale && f.value.isStacked ? t = l.value.chart.grid.labels.yAxis.labelWidth + s : t = io());
365
- const e = l.value.chart.labels.fontSize * 1.1, u = ro.value ? 24 : 6;
366
- if (ul.value) {
367
- const o = ul.value.getBBox().x;
368
- o < 0 && (t += Math.abs(o));
369
- }
370
- const a = ee.value - t - l.value.chart.grid.labels.yAxis.crosshairSize - u - l.value.chart.padding.left - l.value.chart.padding.right, i = l.value.chart.grid.position === "middle" ? 0 : a / L.value / 2;
371
- return {
372
- top: l.value.chart.padding.top + e,
373
- right: ee.value - u - l.value.chart.padding.right,
374
- bottom: ve.value - Et.value - l.value.chart.padding.bottom - l.value.chart.grid.labels.axis.xLabelOffsetY,
375
- left: t + l.value.chart.grid.labels.yAxis.crosshairSize - i + l.value.chart.padding.left,
376
- height: ve.value - Et.value - l.value.chart.padding.top - l.value.chart.padding.bottom - e - l.value.chart.grid.labels.axis.xLabelOffsetY,
377
- width: a,
378
- scaleLabelX: t,
379
- individualOffsetX: s
380
- };
381
- }), co = b(() => {
382
- const t = l.value.chart.grid.position === "middle" ? 1 : 0, s = L.value + t, e = Y(c.value.top), u = Y(c.value.bottom);
383
- return Array.from({ length: s }).map((a, i) => {
384
- const o = c.value.width / L.value * i + c.value.left + U.value;
385
- return `M${o},${e} L${o},${u}`;
386
- }).join(" ");
387
- }), vo = b(() => {
388
- if (!l.value.chart.grid.labels.xAxis.showCrosshairs) return "";
389
- const t = c.value.width / L.value, s = l.value.chart.grid.labels.xAxis.crosshairSize, e = l.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero;
390
- return mt.value.map((u, a) => {
391
- if (!u || !u.text) return null;
392
- const i = c.value.left + t * a + t / 2, o = e ? ne.value - (ne.value === c.value.bottom ? 0 : s / 2) : c.value.bottom, A = e ? ne.value + s / (ne.value === c.value.bottom ? 1 : 2) : c.value.bottom + s;
393
- return `M${i},${o} L${i},${A}`;
394
- }).filter(Boolean).join(" ");
395
- });
396
- function Yt() {
397
- return !!Qa?.vnode.props?.onSelectTimeLabel;
398
- }
399
- function ho(t, s, e) {
400
- if (!Il.value) {
401
- const u = document.createElement("canvas");
402
- Il.value = u.getContext("2d");
403
- }
404
- return Il.value.font = `normal ${t}px sans-serif`, Il.value;
405
- }
406
- function Wt() {
407
- const t = Ie.value.querySelectorAll(".vue-ui-xy-tag");
408
- t.length && Array.from(t).forEach((s) => s.style.opacity = "0");
409
- }
410
- function Fl(t, s, e, u, a) {
411
- e && (Re.value[`${t}_${s}_${u}_${a}`] = e);
412
- }
413
- const Xt = x(!1);
414
- async function Gt(t = !1) {
415
- await Aa(), Xt.value = t, It.value && (zl.value = t);
416
- }
417
- function ft() {
418
- xl.value = !xl.value;
419
- }
420
- const de = b(() => {
421
- const t = Math.max(...ge.value.map((s) => St({ data: s.series, threshold: l.value.downsample.threshold }).length));
422
- return Ea({
423
- values: l.value.chart.grid.labels.xAxisLabels.values,
424
- maxDatapoints: t,
425
- formatter: l.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
426
- start: m.value.start,
427
- end: m.value.end
428
- });
429
- }), gt = b(() => {
430
- const t = Math.max(...ge.value.map((s) => St({ data: s.series, threshold: l.value.downsample.threshold }).length));
431
- return Ea({
432
- values: l.value.chart.grid.labels.xAxisLabels.values,
433
- maxDatapoints: t,
434
- formatter: l.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
435
- start: 0,
436
- end: Ne.value
437
- });
438
- }), fo = b(() => {
439
- const t = l.value.chart.grid.labels.xAxisLabels.modulo;
440
- return de.value.length ? Math.min(t, [...new Set(de.value.map((s) => s.text))].length) : t;
441
- }), mt = b(() => {
442
- const t = l.value.chart.grid.labels.xAxisLabels, s = de.value || [], e = gt.value || [], u = m.value.start ?? 0, a = _.value, i = L.value, o = s.map((C) => C?.text ?? ""), A = e.map((C) => C?.text ?? "");
443
- return es(
444
- !!t.showOnlyFirstAndLast,
445
- !!t.showOnlyAtModulo,
446
- Math.max(1, fo.value || 1),
447
- o,
448
- A,
449
- u,
450
- a,
451
- i
452
- );
453
- });
454
- function Ut(t, s) {
455
- const e = we.value.map((u) => ({
456
- shape: u.shape || null,
457
- name: u.name,
458
- color: u.color,
459
- type: u.type,
460
- value: u.absoluteValues.find((a, i) => i === s),
461
- comments: u.comments || [],
462
- prefix: u.prefix || l.value.chart.labels.prefix,
463
- suffix: u.suffix || l.value.chart.labels.suffix
464
- }));
465
- et("selectTimeLabel", {
466
- datapoint: e,
467
- absoluteIndex: t.absoluteIndex,
468
- label: t.text
469
- });
470
- }
471
- const L = b(() => {
472
- const t = Nt((m.value.end ?? 0) - (m.value.start ?? 0));
473
- return Math.max(1, t);
474
- });
475
- function go(t) {
476
- V.value = t;
477
- }
478
- function qt() {
479
- f.value.isStacked = !f.value.isStacked, f.value.isStacked ? f.value.useIndividualScale = !0 : f.value.useIndividualScale = l.value.chart.grid.labels.yAxis.useIndividualScale;
480
- }
481
- function bt(t) {
482
- yl.value && t.autoScaling && (l.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), l.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
483
- }
484
- function mo(t, s) {
485
- const e = Nt(t), u = Array(e).fill(0);
486
- for (let a = 0; a < s.length && a < e; a += 1) u[a] = s[a] ?? 0;
487
- return u;
488
- }
489
- function Zt(t) {
490
- const s = Math.max(...ge.value.map((e) => De(e.series).length));
491
- return t > s ? s : t < 0 || l.value.chart.zoom.startIndex !== null && t < l.value.chart.zoom.startIndex ? l.value.chart.zoom.startIndex !== null ? l.value.chart.zoom.startIndex + 1 : 1 : t;
492
- }
493
- const _l = x(!1), Jt = x(!1);
494
- function Rl() {
495
- if (!_l.value) {
496
- _l.value = !0;
497
- try {
498
- const { startIndex: t, endIndex: s } = l.value.chart.zoom, e = Math.max(...ge.value.map((i) => De(i.series).length)), u = t ?? 0, a = s != null ? Math.min(Zt(s + 1), e) : e;
499
- Bl.value = !0, m.value.start = u, m.value.end = a, Me.value.start = u, Me.value.end = a, nl(), Jt.value = !0;
500
- } finally {
501
- queueMicrotask(() => {
502
- Bl.value = !1;
503
- }), _l.value = !1;
504
- }
505
- }
506
- }
507
- const Bl = x(!1);
508
- function bo(t) {
509
- _l.value || Bl.value || t !== m.value.start && (m.value.start = t, Me.value.start = t, nl());
510
- }
511
- function xo(t) {
512
- if (_l.value || Bl.value) return;
513
- const s = Zt(t);
514
- s !== m.value.end && (m.value.end = s, Me.value.end = s, nl());
515
- }
516
- async function po() {
517
- await Rl();
518
- }
519
- function be(t) {
520
- return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(t);
521
- }
522
- const Kt = b(() => Ae.value.max + kl.value);
523
- function Je(t) {
524
- return t / (be(Kt.value) ? Kt.value : 1);
525
- }
526
- const ne = b(() => isNaN(Je(kl.value)) ? c.value.bottom : c.value.bottom - c.value.height * Je(kl.value));
527
- function Qt(t) {
528
- const s = ![null, void 0].includes(l.value.chart.grid.labels.yAxis.scaleMin) && l.value.chart.grid.labels.yAxis.scaleMin > 0 && Vl.value >= 0 ? c.value.bottom : ne.value;
529
- return t.value >= 0 ? P(s - t.y <= 0 ? 1e-5 : s - t.y) : P(t.y - ne.value <= 0 ? 1e-5 : t.y - ne.value);
530
- }
531
- function jt(t) {
532
- return t.value >= 0 ? P(t.zeroPosition - t.y <= 0 ? 1e-5 : t.zeroPosition - t.y) : P(t.y - t.zeroPosition <= 0 ? 1e-5 : t.zeroPosition - t.y);
533
- }
534
- const Z = b(() => {
535
- const t = Math.max(1, L.value), s = Math.max(1, c.value.width), e = Math.max(1, Be.value.filter((u) => u.type === "bar" && !J.value.includes(u.id)).length);
536
- return {
537
- bar: nt(s, t * e, 1),
538
- plot: nt(s, t, 1),
539
- line: nt(s, t, 1)
540
- };
541
- });
542
- function Ee() {
543
- return f.value.useIndividualScale && f.value.isStacked ? Z.value.line - c.value.width / L.value * 0.1 : Z.value.bar;
544
- }
545
- function Hl(t) {
546
- return f.value.useIndividualScale && f.value.isStacked ? t.x + c.value.width / L.value * 0.05 : t.x + Z.value.bar / 2;
547
- }
548
- function ea(t) {
549
- return t.value >= 0 ? t.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(ne.value) ? c.bottom.value : ne.value;
550
- }
551
- function la(t) {
552
- return t.value >= 0 ? t.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(t.zeroPosition) ? 0 : t.zeroPosition;
553
- }
554
- const wl = x(null);
555
- function ta(t) {
556
- const s = ue.value;
557
- if (!s) return null;
558
- if (s.createSVGPoint && s.getScreenCTM) {
559
- const T = s.createSVGPoint();
560
- T.x = t.clientX, T.y = t.clientY;
561
- const W = s.getScreenCTM();
562
- if (W) {
563
- const k = T.matrixTransform(W.inverse());
564
- return { x: k.x, y: k.y, ok: !0 };
565
- }
566
- }
567
- const e = s.getBoundingClientRect(), u = s.viewBox?.baseVal || { x: 0, y: 0, width: e.width, height: e.height }, a = Math.min(e.width / u.width, e.height / u.height), i = u.width * a, o = u.height * a, A = (e.width - i) / 2, C = (e.height - o) / 2, O = (t.clientX - e.left - A) / a + u.x, S = (t.clientY - e.top - C) / a + u.y;
568
- return { x: O, y: S, ok: !0 };
569
- }
570
- let Ke = 0;
571
- function yo(t) {
572
- xl.value || (Ke && cancelAnimationFrame(Ke), Ke = requestAnimationFrame(() => {
573
- Ke = 0;
574
- const s = ta(t);
575
- if (!s || !ue.value) {
576
- Dl();
577
- return;
578
- }
579
- const { left: e, right: u, top: a, bottom: i, width: o } = c.value;
580
- if (s.x < e || s.x > u || s.y < a || s.y > i) {
581
- Dl();
582
- return;
583
- }
584
- const A = s.x - e, C = o / L.value, O = Math.floor(A / C);
585
- O >= 0 && O < L.value ? wl.value !== O && (wl.value = O, ga(!0, O)) : Dl();
586
- }));
587
- }
588
- function Dl() {
589
- Ke && (cancelAnimationFrame(Ke), Ke = 0), wl.value = null, ga(!1, null);
590
- }
591
- function aa(t) {
592
- const s = ta(t);
593
- if (s && ue.value) {
594
- const { left: e, right: u, top: a, bottom: i, width: o } = c.value;
595
- if (s.x >= e && s.x <= u && s.y >= a && s.y <= i) {
596
- const A = o / Math.max(1, L.value), C = Math.floor((s.x - e) / A);
597
- if (C >= 0 && C < L.value) {
598
- oa(C);
599
- return;
600
- }
601
- }
602
- }
603
- wl.value != null && oa(wl.value);
604
- }
605
- function oa(t) {
606
- const s = we.value.map((e) => ({
607
- name: e.name,
608
- value: [null, void 0, NaN].includes(e.absoluteValues[t]) ? null : e.absoluteValues[t],
609
- color: e.color,
610
- type: e.type
611
- }));
612
- et(
613
- "selectX",
614
- {
615
- dataset: s,
616
- index: t,
617
- indexLabel: l.value.chart.grid.labels.xAxisLabels.values[t]
618
- }
619
- ), l.value.events.datapointClick && l.value.events.datapointClick({ datapoint: s, seriesIndex: t + m.value.start });
620
- }
621
- function ko() {
622
- return me.value.map((t) => ({
623
- values: t.absoluteValues,
624
- color: t.color,
625
- name: t.name,
626
- type: t.type
627
- }));
628
- }
629
- async function _o({ scale: t = 2 } = {}) {
630
- if (!Ie.value) return;
631
- const { width: s, height: e } = Ie.value.getBoundingClientRect(), u = s / e, { imageUri: a, base64: i } = await ps({ domElement: Ie.value, base64: !0, img: !0, scale: t });
632
- return {
633
- imageUri: a,
634
- base64: i,
635
- title: l.value.chart.title.text,
636
- width: s,
637
- height: e,
638
- aspectRatio: u
639
- };
640
- }
641
- function El(t) {
642
- if (J.value.includes(t.id))
643
- J.value = J.value.filter((s) => s !== t.id);
644
- else {
645
- if (J.value.length + 1 === Be.value.length) return;
646
- J.value.push(t.id);
647
- }
648
- et("selectLegend", we.value.map((s) => ({
649
- name: s.name,
650
- values: s.absoluteValues,
651
- color: s.color,
652
- type: s.type
653
- }))), ut.value += 1;
654
- }
655
- function sa(t) {
656
- if (!me.value.length)
657
- return l.value.debug && console.warn("VueUiXy - There are no series to show."), null;
658
- const s = me.value.find((e) => e.name === t);
659
- return s || (l.value.debug && console.warn(`VueUiXy - Series name not found "${t}"`), null);
660
- }
661
- function wo(t) {
662
- const s = sa(t);
663
- s !== null && J.value.includes(s.id) && El({ id: s.id });
664
- }
665
- function So(t) {
666
- const s = sa(t);
667
- s !== null && (J.value.includes(s.id) || El({ id: s.id }));
668
- }
669
- const $o = b(() => {
670
- const t = l.value.chart.title.text || "Chart visualization", s = l.value.chart.title.subtitle.text || "";
671
- return `${t}. ${s}`;
672
- }), ua = b(() => ({
673
- linePlot: L.value > l.value.line.dot.hideAboveMaxSerieLength
674
- })), Lo = b(() => l.value.chart.userOptions.show && (!l.value.chart.title.show || !l.value.chart.title.text)), Mo = b(() => {
675
- if (Array.isArray(l.value.chart.highlightArea))
676
- return l.value.chart.highlightArea.map((s) => {
677
- const e = Math.min(s.to, Ne.value - 1);
678
- return {
679
- ...s,
680
- span: s.from === e ? 1 : e < s.from ? 0 : e - s.from + 1
681
- };
682
- });
683
- const t = {
684
- ...l.value.chart.highlightArea,
685
- to: Math.min(l.value.chart.highlightArea.to, Ne.value - 1)
686
- };
687
- return [{ ...t, span: t.from === t.to ? 1 : t.to < t.from ? 0 : t.to - t.from + 1 }];
688
- }), ia = b(() => Mt.value ? ge.value.map((t, s) => ({
689
- ...t,
690
- series: De(t.series),
691
- id: `uniqueId_${s}`,
692
- color: za(t.color ? t.color : Nl.value[s] ? Nl.value[s] : Ia[s])
693
- })) : ge.value), Ao = b(() => we.value.map((t) => {
694
- const s = t.absoluteValues.map((e) => [void 0, null].includes(e) ? 0 : e);
695
- return {
696
- id: t.id,
697
- name: t.name,
698
- color: t.color,
699
- values: mo(L.value, s)
700
- };
701
- })), Co = b(() => ({
702
- responsiveBreakpoint: l.value.table.responsiveBreakpoint,
703
- roundingValues: l.value.table.rounding,
704
- showAverage: !1,
705
- showMedian: !1,
706
- showTotal: !1,
707
- fontFamily: l.value.chart.fontFamily,
708
- prefix: l.value.chart.labels.prefix,
709
- suffix: l.value.chart.labels.suffix,
710
- colNames: de.value.map((t, s) => l.value.table.useDefaultTimeFormat ? t.text : rl.value(s + m.value.start, l.value.table.timeFormat)),
711
- thead: {
712
- backgroundColor: l.value.table.th.backgroundColor,
713
- color: l.value.table.th.color,
714
- outline: l.value.table.th.outline
715
- },
716
- tbody: {
717
- backgroundColor: l.value.table.td.backgroundColor,
718
- color: l.value.table.td.color,
719
- outline: l.value.table.td.outline
720
- },
721
- userOptions: {
722
- show: !1
723
- },
724
- sparkline: {
725
- animation: { show: !1 }
726
- }
727
- })), U = b(() => l.value.chart.grid.position === "middle" ? 0 : c.value.width / L.value / 2), Qe = b(() => ls(me.value.filter((t) => !J.value.includes(t.id)))), M = b(() => {
728
- const t = Object.groupBy(Qe.value, (e) => e.scaleLabel), s = {};
729
- for (const [e, u] of Object.entries(t)) {
730
- const a = u.flatMap((i) => i.absoluteValues);
731
- s[e] = {
732
- min: Math.min(...a) || 0,
733
- max: Math.max(...a) || 1,
734
- groupId: `scale_group_${_t()}`
735
- };
736
- }
737
- return s;
738
- }), To = b(() => {
739
- const t = Be.value.filter((s) => s.type === "bar").filter((s) => !J.value.includes(s.id)).length;
740
- return c.value.width / L.value / t - Yl.value * t;
741
- }), Yl = b(() => Z.value.line * l.value.bar.periodGap), Wl = b(() => Math.max(1e-5, Ee() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Yl.value))), Xl = b(() => Wl.value * Math.min(Math.abs(l.value.bar.innerGap), 0.95)), zo = b(() => {
742
- if (!l.value.chart.zoom.minimap.show) return [];
743
- const t = ia.value.filter((a) => !J.value.includes(a.id)), s = Math.max(...t.map((a) => a.series.length)), e = [];
744
- for (let a = 0; a < s; a += 1)
745
- e.push(t.map((i) => i.series[a] || 0).reduce((i, o) => (i || 0) + (o || 0), 0));
746
- const u = Math.min(...e);
747
- return e.map((a) => a + (u < 0 ? Math.abs(u) : 0));
748
- }), Io = b(() => l.value.chart.zoom.minimap.show ? ia.value.map((s) => ({
749
- ...s,
750
- isVisible: !J.value.includes(s.id)
751
- })) : []), je = b(() => we.value.map((t) => ({
752
- slotAbsoluteIndex: t.slotAbsoluteIndex,
753
- shape: t.shape || null,
754
- name: t.name,
755
- color: t.color,
756
- type: t.type,
757
- value: t.absoluteValues.find((s, e) => e === _.value),
758
- comments: t.comments || [],
759
- prefix: t.prefix || l.value.chart.labels.prefix,
760
- suffix: t.suffix || l.value.chart.labels.suffix
761
- }))), na = b(() => Ae.value.ticks.map((t) => ({
762
- y: t >= 0 ? ne.value - c.value.height * Je(t) : ne.value + c.value.height * Je(Math.abs(t)),
763
- value: t,
764
- prefix: l.value.chart.labels.prefix,
765
- suffix: l.value.chart.labels.suffix
766
- }))), ra = b(() => {
767
- const t = l.value.chart.annotations;
768
- if (!t || !Array.isArray(t) || t.every((S) => !S.show)) return [];
769
- const s = t.filter(
770
- (S) => S.show && (S.yAxis.yTop != null || S.yAxis.yBottom != null)
771
- );
772
- if (!s.length) return [];
773
- const { left: e, right: u } = c.value, a = ne.value, i = c.value.height, o = Ae.value.min, C = Ae.value.max - o, O = (S) => {
774
- const T = (S - 0) / C;
775
- return a - T * i;
776
- };
777
- return s.map((S) => {
778
- const { yAxis: { yTop: T, yBottom: W, label: k } } = S, F = T != null && W != null && T !== W, z = T == null ? null : O(T), le = W == null ? null : O(W), re = ho(k.fontSize);
779
- re.font = `${k.fontSize}px sans-serif`;
780
- const q = re.measureText(k.text).width, Se = k.fontSize, Ve = (k.position === "start" ? e + k.padding.left : u - k.padding.right) + k.offsetX, pe = (z != null && le != null ? Math.min(z, le) : z ?? le) - k.fontSize / 3 + k.offsetY - k.padding.top;
781
- let H;
782
- k.textAnchor === "middle" ? H = Ve - q / 2 - k.padding.left : k.textAnchor === "end" ? H = Ve - q - k.padding.right : H = Ve - k.padding.left;
783
- const D = pe - Se * 0.75 - k.padding.top;
784
- return {
785
- show: ![z, le, D].includes(NaN),
786
- id: `annotation_y_${_t()}`,
787
- hasArea: F,
788
- areaHeight: F ? Math.abs(z - le) : 0,
789
- yTop: z,
790
- yBottom: le,
791
- config: S.yAxis,
792
- x1: e,
793
- x2: u,
794
- _text: { x: Ve, y: pe },
795
- _box: {
796
- x: H,
797
- y: D,
798
- width: q + k.padding.left + k.padding.right,
799
- height: Se + k.padding.top + k.padding.bottom,
800
- fill: k.backgroundColor,
801
- stroke: k.border.stroke,
802
- rx: k.border.rx,
803
- ry: k.border.ry,
804
- strokeWidth: k.border.strokeWidth
805
- }
806
- };
807
- });
808
- });
809
- function ca(t, s) {
810
- const e = t[s - 1], u = t[s + 1];
811
- let a = !!e && !!u && e.value == null && u.value == null || !e && !!u && u.value == null || !!e && !u && e.value == null;
812
- return be(t[s].value) && a && l.value.line.cutNullValues;
813
- }
814
- const Ce = b(() => {
815
- const t = Qe.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), s = t.length, e = l.value.chart.grid.labels.yAxis.gap, u = f.value.isStacked, a = u ? e * (s - 1) : 0, i = c.value.height - a;
816
- return t.filter((o) => o.type === "bar").map((o, A) => {
817
- bt(o);
818
- const C = M.value[o.scaleLabel].min, O = M.value[o.scaleLabel].max;
819
- o.absoluteValues.filter((R) => ![null, void 0].includes(R)).map((R) => (R - C) / (O - C));
820
- const S = {
821
- valueMin: C,
822
- valueMax: O < 0 ? 0 : O
823
- }, T = {
824
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
825
- min: o.scaleMin || Math.min(...o.absoluteValues.filter((R) => ![void 0, null].includes(R))) > 0 ? 0 : Math.min(...o.absoluteValues.filter((R) => ![null, void 0].includes(R)))
826
- }, W = o.scaleSteps || l.value.chart.grid.labels.yAxis.commonScaleSteps, k = 1.0000001, F = l.value.chart.grid.labels.yAxis.useNiceScale ? Cl(T.min, T.max === T.min ? T.max * k : T.max, W) : al(T.min, T.max === T.min ? T.max * k : T.max, W), z = l.value.chart.grid.labels.yAxis.useNiceScale ? Cl(S.valueMin, S.valueMax === S.valueMin ? S.valueMax * k : S.valueMax, W) : al(S.valueMin, S.valueMax === S.valueMin ? S.valueMax * k : S.valueMax, W), le = F.min >= 0 ? 0 : Math.abs(F.min), re = 0, q = F.max + le, Se = z.max + Math.abs(re), Ve = o.stackIndex, cl = s - 1 - Ve, pe = u ? 1 - o.cumulatedStackRatio : 0, H = u ? i * pe + e * cl : 0, D = u ? i * o.stackRatio : c.value.height, K = c.value.bottom - H - D * le / q, ye = c.value.bottom - H - D * re / Se, ce = me.value.filter((R) => R.type === "bar").filter((R) => !J.value.includes(R.id)).length, Ll = o.series.map((R, j) => {
827
- const We = f.value.useIndividualScale ? (o.absoluteValues[j] + le) / q : Je(R), el = f.value.useIndividualScale && f.value.isStacked ? c.value.left + c.value.width / L.value * j : c.value.left + Z.value.bar * A + Z.value.bar * j * ce - To.value / 2 - A * Yl.value;
828
- return {
829
- yOffset: P(H),
830
- individualHeight: P(D),
831
- x: P(el),
832
- y: c.value.bottom - H - D * We,
833
- value: o.absoluteValues[j],
834
- zeroPosition: P(K),
835
- individualMax: P(q),
836
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[j] || ""
837
- };
838
- }), he = o.absoluteValues.map((R) => z.min >= 0 ? (R - Math.abs(z.min)) / (z.max - Math.abs(z.min)) : (R + Math.abs(z.min)) / (z.max + Math.abs(z.min))), Ye = o.series.map((R, j) => {
839
- const We = f.value.useIndividualScale && f.value.isStacked ? c.value.left + c.value.width / L.value * j : c.value.left - Z.value.bar / 2 + Z.value.bar * A + Z.value.bar * j * me.value.filter((el) => el.type === "bar").filter((el) => !J.value.includes(el.id)).length;
840
- return {
841
- yOffset: P(H),
842
- individualHeight: P(D),
843
- x: P(We),
844
- y: P(c.value.bottom - P(H) - (P(D) * he[j] || 0)),
845
- value: o.absoluteValues[j],
846
- zeroPosition: P(K),
847
- individualMax: P(q),
848
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[j] || ""
849
- };
850
- }), X = F.ticks.map((R) => ({
851
- y: R >= 0 ? K - D * (R / q) : K + D * Math.abs(R) / q,
852
- value: R,
853
- prefix: o.prefix || l.value.chart.labels.prefix,
854
- suffix: o.suffix || l.value.chart.labels.suffix,
855
- datapoint: o
856
- })), Q = z.ticks.map((R) => {
857
- const j = (R - z.min) / (z.max - z.min);
858
- return {
859
- y: R >= 0 ? ye - D * j : ye + D * j,
860
- value: R,
861
- prefix: o.prefix || l.value.chart.labels.prefix,
862
- suffix: o.suffix || l.value.chart.labels.suffix,
863
- datapoint: o
864
- };
865
- });
866
- return M.value[o.scaleLabel].name = o.name, M.value[o.scaleLabel].groupName = o.scaleLabel, M.value[o.scaleLabel].groupColor = l.value.chart.grid.labels.yAxis.groupColor || o.color, M.value[o.scaleLabel].color = o.color, M.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Q : X, M.value[o.scaleLabel].zeroPosition = o.autoScaling ? ye : K, M.value[o.scaleLabel].individualMax = o.autoScaling ? Se : q, M.value[o.scaleLabel].scaleLabel = o.scaleLabel, M.value[o.scaleLabel].id = o.id, M.value[o.scaleLabel].yOffset = H, M.value[o.scaleLabel].individualHeight = D, M.value[o.scaleLabel].autoScaleYLabels = Q, M.value[o.scaleLabel].unique = Qe.value.filter((R) => R.scaleLabel === o.scaleLabel).length === 1, {
867
- ...o,
868
- yOffset: H,
869
- autoScaleYLabels: Q,
870
- individualHeight: D,
871
- scaleYLabels: o.autoScaling ? Q : X,
872
- individualScale: o.autoScaling ? z : F,
873
- individualMax: o.autoScaling ? Se : q,
874
- zeroPosition: o.autoScaling ? ye : K,
875
- plots: o.autoScaling ? Ye : Ll,
876
- groupId: M.value[o.scaleLabel].groupId
877
- };
878
- });
879
- }), ae = b(() => {
880
- const t = Qe.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), s = t.length, e = l.value.chart.grid.labels.yAxis.gap, u = f.value.isStacked, a = u ? e * (s - 1) : 0, i = c.value.height - a;
881
- return t.filter((o) => o.type === "line").map((o, A) => {
882
- bt(o);
883
- const C = M.value[o.scaleLabel].min, O = M.value[o.scaleLabel].max;
884
- o.absoluteValues.filter((N) => ![null, void 0].includes(N)).map((N) => (N - C) / (O - C));
885
- const S = {
886
- valueMin: C,
887
- valueMax: O
888
- }, T = {
889
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
890
- min: o.scaleMin || (Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues))
891
- }, W = o.scaleSteps || l.value.chart.grid.labels.yAxis.commonScaleSteps, k = 1.0000001, F = l.value.chart.grid.labels.yAxis.useNiceScale ? Cl(T.min, T.max === T.min ? T.max * k : T.max, W) : al(T.min, T.max === T.min ? T.max * k : T.max, W), z = l.value.chart.grid.labels.yAxis.useNiceScale ? Cl(S.valueMin, S.valueMax === S.valueMin ? S.valueMax * k : S.valueMax, W) : al(S.valueMin, S.valueMax === S.valueMin ? S.valueMax * k : S.valueMax, W), le = F.min >= 0 ? 0 : Math.abs(F.min), re = 0, q = F.max + Math.abs(le), Se = z.max + Math.abs(re), Ve = o.stackIndex, cl = s - 1 - Ve, pe = u ? 1 - o.cumulatedStackRatio : 0, H = u ? i * pe + e * cl : 0, D = u ? i * o.stackRatio : c.value.height, K = c.value.bottom - H - D * le / q, ye = c.value.bottom - H - D * re / Se, ce = o.series.map((N, oe) => {
892
- const Wo = f.value.useIndividualScale ? (o.absoluteValues[oe] + Math.abs(le)) / q : Je(N);
893
- return {
894
- x: P(c.value.left + Z.value.line / 2 + Z.value.line * oe),
895
- y: P(c.value.bottom - H - D * Wo),
896
- value: o.absoluteValues[oe],
897
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[oe] || ""
898
- };
899
- }), Ll = o.absoluteValues.map((N) => z.min >= 0 ? (N - Math.abs(z.min)) / (z.max - Math.abs(z.min)) : (N + Math.abs(z.min)) / (z.max + Math.abs(z.min))), he = o.series.map((N, oe) => [void 0, null].includes(o.absoluteValues[oe]) ? {
900
- x: P(c.value.left + Z.value.line / 2 + Z.value.line * oe),
901
- y: K,
902
- value: o.absoluteValues[oe],
903
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[oe] || ""
904
- } : {
905
- x: P(c.value.left + Z.value.line / 2 + Z.value.line * oe),
906
- y: P(c.value.bottom - H - (D * Ll[oe] || 0)),
907
- value: o.absoluteValues[oe],
908
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[oe] || ""
909
- }), Ye = l.value.line.cutNullValues ? Oa(ce) : Na(ce.filter((N) => N.value !== null)), X = l.value.line.cutNullValues ? Oa(he) : Na(he.filter((N) => N.value !== null)), Q = l.value.line.cutNullValues ? Va(ce) : Pa(ce.filter((N) => N.value !== null)), R = l.value.line.cutNullValues ? Va(he) : Pa(he.filter((N) => N.value !== null)), j = F.ticks.map((N) => ({
910
- y: N >= 0 ? K - D * (N / q) : K + D * Math.abs(N) / q,
911
- value: N,
912
- prefix: o.prefix || l.value.chart.labels.prefix,
913
- suffix: o.suffix || l.value.chart.labels.suffix,
914
- datapoint: o
915
- })), We = z.ticks.map((N) => {
916
- const oe = (N - z.min) / (z.max - z.min);
917
- return {
918
- y: N >= 0 ? ye - D * oe : ye + D * oe,
919
- value: N,
920
- prefix: o.prefix || l.value.chart.labels.prefix,
921
- suffix: o.suffix || l.value.chart.labels.suffix,
922
- datapoint: o
923
- };
924
- });
925
- M.value[o.scaleLabel].name = o.name, M.value[o.scaleLabel].groupName = o.scaleLabel, M.value[o.scaleLabel].groupColor = l.value.chart.grid.labels.yAxis.groupColor || o.color, M.value[o.scaleLabel].color = o.color, M.value[o.scaleLabel].scaleYLabels = o.autoScaling ? We : j, M.value[o.scaleLabel].zeroPosition = o.autoScaling ? ye : K, M.value[o.scaleLabel].individualMax = o.autoScaling ? Se : q, M.value[o.scaleLabel].scaleLabel = o.scaleLabel, M.value[o.scaleLabel].id = o.id, M.value[o.scaleLabel].yOffset = H, M.value[o.scaleLabel].individualHeight = D, M.value[o.scaleLabel].autoScaleYLabels = We, M.value[o.scaleLabel].unique = Qe.value.filter((N) => N.scaleLabel === o.scaleLabel).length === 1;
926
- const el = f.value.useIndividualScale ? o.autoScaling ? ye : K : ne.value, Ml = Math.max(Math.max(o.autoScaling ? ye : j.at(-1) ? j.at(-1).y : 0, c.value.top), el);
927
- return {
928
- ...o,
929
- yOffset: H,
930
- autoScaleYLabels: We,
931
- individualHeight: D,
932
- scaleYLabels: o.autoScaling ? We : j,
933
- individualScale: o.autoScaling ? z : F,
934
- individualMax: o.autoScaling ? Se : q,
935
- zeroPosition: o.autoScaling ? ye : K,
936
- curve: o.autoScaling ? X : Ye,
937
- plots: o.autoScaling ? he : ce,
938
- area: o.useArea ? f.value.useIndividualScale ? l.value.line.cutNullValues ? Fa(
939
- o.autoScaling ? he : ce,
940
- Ml
941
- ) : Ra(
942
- o.autoScaling ? he.filter((N) => N.value !== null) : ce.filter((N) => N.value !== null),
943
- Ml
944
- ) : l.value.line.cutNullValues ? Fa(ce, Ml) : Ra(ce.filter((N) => N.value !== null), Ml) : "",
945
- curveAreas: o.useArea ? ts(
946
- o.autoScaling ? l.value.line.cutNullValues ? he : he.filter((N) => N.value !== null) : l.value.line.cutNullValues ? ce : ce.filter((N) => N.value !== null),
947
- Ml,
948
- l.value.line.cutNullValues
949
- ) : [],
950
- straight: o.autoScaling ? R : Q,
951
- groupId: M.value[o.scaleLabel].groupId
952
- };
953
- });
954
- }), xe = b(() => {
955
- const t = Qe.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), s = t.length, e = l.value.chart.grid.labels.yAxis.gap, u = f.value.isStacked, a = u ? e * (s - 1) : 0, i = c.value.height - a;
956
- return t.filter((o) => o.type === "plot").map((o) => {
957
- bt(o);
958
- const A = M.value[o.scaleLabel].min, C = M.value[o.scaleLabel].max;
959
- o.absoluteValues.filter((X) => ![null, void 0].includes(X)).map((X) => (X - A) / (C - A));
960
- const O = {
961
- valueMin: A,
962
- valueMax: C
963
- }, S = {
964
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
965
- min: o.scaleMin || Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues)
966
- }, T = o.scaleSteps || l.value.chart.grid.labels.yAxis.commonScaleSteps, W = 1.0000001, k = al(S.min, S.max === S.min ? S.max * W : S.max, T), F = al(O.valueMin, O.valueMax === O.valueMin ? O.valueMax * W : O.valueMax, T), z = k.min >= 0 ? 0 : Math.abs(k.min), le = 0, re = k.max + z, q = F.max + Math.abs(le), Se = o.stackIndex, Ve = s - 1 - Se, cl = u ? 1 - o.cumulatedStackRatio : 0, pe = u ? i * cl + e * Ve : 0, H = u ? i * o.stackRatio : c.value.height, D = c.value.bottom - pe - H * z / re, K = c.value.bottom - pe - H * le / q, ye = o.series.map((X, Q) => {
967
- const R = f.value.useIndividualScale ? (o.absoluteValues[Q] + Math.abs(z)) / re : Je(X);
968
- return {
969
- x: P(c.value.left + Z.value.plot / 2 + Z.value.plot * Q),
970
- y: P(c.value.bottom - pe - H * R),
971
- value: o.absoluteValues[Q],
972
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[Q] || ""
973
- };
974
- }), ce = o.absoluteValues.map((X) => F.min >= 0 ? (X - Math.abs(F.min)) / (F.max - Math.abs(F.min)) : (X + Math.abs(F.min)) / (F.max + Math.abs(F.min))), Ll = o.series.map((X, Q) => ({
975
- x: P(c.value.left + Z.value.plot / 2 + Z.value.plot * Q),
976
- y: P(c.value.bottom - pe - (H * ce[Q] || 0)),
977
- value: o.absoluteValues[Q],
978
- comment: o.comments && o.comments.slice(m.value.start, m.value.end)[Q] || ""
979
- })), he = k.ticks.map((X) => ({
980
- y: X >= 0 ? D - H * (X / re) : D + H * Math.abs(X) / re,
981
- value: X,
982
- prefix: o.prefix || l.value.chart.labels.prefix,
983
- suffix: o.suffix || l.value.chart.labels.suffix,
984
- datapoint: o
985
- })), Ye = F.ticks.map((X) => {
986
- const Q = (X - F.min) / (F.max - F.min);
987
- return {
988
- y: X >= 0 ? K - H * Q : K + H * Q,
989
- value: X,
990
- prefix: o.prefix || l.value.chart.labels.prefix,
991
- suffix: o.suffix || l.value.chart.labels.suffix,
992
- datapoint: o
993
- };
994
- });
995
- return M.value[o.scaleLabel].name = o.name, M.value[o.scaleLabel].groupName = o.scaleLabel, M.value[o.scaleLabel].groupColor = l.value.chart.grid.labels.yAxis.groupColor || o.color, M.value[o.scaleLabel].color = o.color, M.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Ye : he, M.value[o.scaleLabel].zeroPosition = o.autoScaling ? K : D, M.value[o.scaleLabel].individualMax = o.autoScaling ? q : re, M.value[o.scaleLabel].scaleLabel = o.scaleLabel, M.value[o.scaleLabel].id = o.id, M.value[o.scaleLabel].yOffset = pe, M.value[o.scaleLabel].individualHeight = H, M.value[o.scaleLabel].autoScaleYLabels = Ye, M.value[o.scaleLabel].unique = Qe.value.filter((X) => X.scaleLabel === o.scaleLabel).length === 1, {
996
- ...o,
997
- yOffset: pe,
998
- autoScaleYLabels: Ye,
999
- individualHeight: H,
1000
- scaleYLabels: o.autoScaling ? Ye : he,
1001
- individualScale: o.autoScaling ? F : k,
1002
- individualMax: o.autoScaling ? q : re,
1003
- zeroPosition: o.autoScaling ? K : D,
1004
- plots: o.autoScaling ? Ll : ye,
1005
- groupId: M.value[o.scaleLabel].groupId
1006
- };
1007
- });
1008
- }), Sl = b(() => {
1009
- const t = ae.value.map((i) => ({
1010
- name: i.name,
1011
- color: i.color,
1012
- scale: i.individualScale,
1013
- scaleYLabels: i.scaleYLabels,
1014
- zero: i.zeroPosition,
1015
- max: i.individualMax,
1016
- scaleLabel: i.scaleLabel || "",
1017
- id: i.id,
1018
- yOffset: i.yOffset || 0,
1019
- individualHeight: i.individualHeight || c.value.height,
1020
- autoScaleYLabels: i.autoScaleYLabels
1021
- })), s = Ce.value.map((i) => ({
1022
- name: i.name,
1023
- color: i.color,
1024
- scale: i.individualScale,
1025
- scaleYLabels: i.scaleYLabels,
1026
- zero: i.zeroPosition,
1027
- max: i.individualMax,
1028
- scaleLabel: i.scaleLabel || "",
1029
- id: i.id,
1030
- yOffset: i.yOffset || 0,
1031
- individualHeight: i.individualHeight || c.value.height
1032
- })), e = xe.value.map((i) => ({
1033
- name: i.name,
1034
- color: i.color,
1035
- scale: i.individualScale,
1036
- scaleYLabels: i.scaleYLabels,
1037
- // FIX
1038
- zero: i.zeroPosition,
1039
- max: i.individualMax,
1040
- scaleLabel: i.scaleLabel || "",
1041
- id: i.id,
1042
- yOffset: i.yOffset || 0,
1043
- individualHeight: i.individualHeight || c.value.height
1044
- })), u = f.value.useIndividualScale && !f.value.isStacked ? Object.values(M.value) : [...t, ...s, ...e], a = u.flatMap((i) => i).length;
1045
- return u.flatMap((i, o) => {
1046
- let A = 0;
1047
- A = f.value.isStacked ? c.value.left : c.value.left / a * (o + 1);
1048
- const C = f.value.useIndividualScale && !f.value.isStacked ? i.unique ? i.name : i.groupName : i.name;
1049
- return {
1050
- unique: i.unique,
1051
- id: i.id,
1052
- groupId: i.groupId,
1053
- scaleLabel: i.scaleLabel,
1054
- name: se(
1055
- l.value.chart.grid.labels.yAxis.serieNameFormatter,
1056
- C,
1057
- C,
1058
- i
1059
- ),
1060
- color: f.value.useIndividualScale && !f.value.isStacked ? i.unique ? i.color : i.groupColor : i.color,
1061
- scale: i.scale,
1062
- yOffset: i.yOffset,
1063
- individualHeight: i.individualHeight,
1064
- x: A,
1065
- yLabels: i.scaleYLabels || i.scale.ticks.map((O) => ({
1066
- y: O >= 0 ? i.zero - i.individualHeight * (O / i.max) : i.zero + i.individualHeight * Math.abs(O) / i.max,
1067
- value: O
1068
- }))
1069
- };
1070
- });
1071
- }), va = b(() => {
1072
- const t = l.value.line.interLine || {}, s = t.pairs || [], e = t.colors || [];
1073
- if (!s.length) return [];
1074
- const u = [];
1075
- return s.forEach((a, i) => {
1076
- const [o, A] = Array.isArray(a) ? a : [a.a, a.b];
1077
- if (!o || !A) return;
1078
- const C = ae.value.find((k) => k.name === o), O = ae.value.find((k) => k.name === A);
1079
- if (!C || !O || C.type !== "line" || O.type !== "line") return;
1080
- const S = e?.[i]?.[0] ?? C.color, T = e?.[i]?.[1] ?? O.color;
1081
- as({
1082
- lineA: C.plots,
1083
- lineB: O.plots,
1084
- smoothA: !!C.smooth,
1085
- smoothB: !!O.smooth,
1086
- colorLineA: S,
1087
- colorLineB: T,
1088
- sampleStepPx: 2,
1089
- cutNullValues: l.value.line.cutNullValues
1090
- }).forEach((k, F) => {
1091
- u.push({ ...k, key: `inter_${o}_${A}_${i}_${F}` });
1092
- });
1093
- }), u;
1094
- }), da = b(() => ({
1095
- datapoint: je.value,
1096
- seriesIndex: _.value,
1097
- series: me.value,
1098
- bars: Ce.value,
1099
- lines: ae.value,
1100
- plots: xe.value,
1101
- config: l.value
1102
- })), rl = b(() => {
1103
- const t = l.value.chart.grid.labels.xAxisLabels.datetimeFormatter, s = gs({
1104
- useUTC: t.useUTC,
1105
- locale: ms[t.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
1106
- januaryAsYear: t.januaryAsYear
1107
- });
1108
- return (e, u) => {
1109
- const i = l.value.chart.grid.labels.xAxisLabels.values?.[e];
1110
- return i == null ? "" : s.formatDate(new Date(i), u);
1111
- };
1112
- }), ha = b(() => (l.value.chart.grid.labels.xAxisLabels.values || []).map((s, e) => ({
1113
- text: rl.value(e, l.value.chart.zoom.timeFormat),
1114
- absoluteIndex: e
1115
- }))), Oo = b(() => {
1116
- let t = "", s = je.value.map((a) => a.value).filter((a) => Zl(a) && a !== null).reduce((a, i) => Math.abs(a) + Math.abs(i), 0);
1117
- const e = de.value[_.value], u = l.value.chart.tooltip.customFormat;
1118
- if (Ba(u) && os(() => u({
1119
- absoluteIndex: _.value + m.value.start,
1120
- seriesIndex: _.value,
1121
- datapoint: je.value,
1122
- series: me.value,
1123
- bars: Ce.value,
1124
- lines: ae.value,
1125
- plots: xe.value,
1126
- config: l.value
1127
- })))
1128
- return u({
1129
- absoluteIndex: _.value + m.value.start,
1130
- seriesIndex: _.value,
1131
- datapoint: je.value,
1132
- series: me.value,
1133
- bars: Ce.value,
1134
- lines: ae.value,
1135
- plots: xe.value,
1136
- config: l.value
1137
- });
1138
- if (e && e.text && l.value.chart.tooltip.showTimeLabel) {
1139
- const a = rl.value(_.value + m.value.start, l.value.chart.tooltip.timeFormat);
1140
- t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${l.value.chart.tooltip.borderColor}; width:100%">${l.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !l.value.chart.tooltip.useDefaultTimeFormat ? a : e.text}</div>`;
1141
- }
1142
- return je.value.forEach((a) => {
1143
- if (Zl(a.value)) {
1144
- let i = "", o = "";
1145
- switch (bl.value[a.type]) {
1146
- case "bar":
1147
- i = `<svg viewBox="0 0 40 40" height="14" width="14">${Lt.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${a.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Lt.pattern ? `url(#pattern_${E.value}_${a.slotAbsoluteIndex}` : a.color}" /></svg>`;
1148
- break;
1149
- case "line":
1150
- !a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" />` : a.shape === "triangle" ? o = `<path d="${Pe({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "square" ? o = `<path d="${Pe({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "diamond" ? o = `<path d="${Pe({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "pentagon" ? o = `<path d="${Pe({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "hexagon" ? o = `<path d="${Pe({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "star" && (o = `<polygon stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" points="${Ha({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), i = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${a.color}" />${o}</svg>`;
1151
- break;
1152
- case "plot":
1153
- if (!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape)) {
1154
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;
1155
- break;
1156
- }
1157
- if (a.shape === "star") {
1158
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${Ha({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
1159
- break;
1160
- }
1161
- if (a.shape === "triangle") {
1162
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Pe({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1163
- break;
1164
- }
1165
- if (a.shape === "square") {
1166
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Pe({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1167
- break;
1168
- }
1169
- if (a.shape === "diamond") {
1170
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Pe({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1171
- break;
1172
- }
1173
- if (a.shape === "pentagon") {
1174
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Pe({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1175
- break;
1176
- }
1177
- if (a.shape === "hexagon") {
1178
- i = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Pe({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1179
- break;
1180
- }
1181
- }
1182
- t += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${i}</div> ${a.name}: <b>${l.value.chart.tooltip.showValue ? se(
1183
- a.type === "line" ? l.value.line.labels.formatter : a.type === "bar" ? l.value.bar.labels.formatter : l.value.plot.labels.formatter,
1184
- a.value,
1185
- Fe({
1186
- p: a.prefix,
1187
- v: a.value,
1188
- s: a.suffix,
1189
- r: l.value.chart.tooltip.roundingValue
1190
- }),
1191
- { datapoint: a }
1192
- ) : ""}</b> ${l.value.chart.tooltip.showPercentage ? `(${Fe({
1193
- v: P(Math.abs(a.value) / s * 100),
1194
- s: "%",
1195
- r: l.value.chart.tooltip.roundingPercentage
1196
- })})` : ""}</div>`, l.value.chart.comments.showInTooltip && a.comments.length && a.comments.slice(m.value.start, m.value.end)[_.value] && (t += `<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(m.value.start, m.value.end)[_.value]}</div>`);
1197
- }
1198
- }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${l.value.chart.tooltip.color}">${t}</div>`;
1199
- }), fa = b(() => {
1200
- if (Be.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
1201
- const t = we.value.map((e) => ({
1202
- label: e.name,
1203
- color: e.color,
1204
- type: e.type
1205
- })), s = [];
1206
- return de.value.forEach((e, u) => {
1207
- const a = l.value.table.useDefaultTimeFormat ? [e.text] : [rl.value(u + m.value.start, l.value.table.timeFormat)];
1208
- we.value.forEach((i) => {
1209
- a.push(be(i.absoluteValues[u]) ? Number(i.absoluteValues[u].toFixed(l.value.table.rounding)) : "");
1210
- }), s.push(a);
1211
- }), { head: t, body: s };
1212
- }), Gl = b(() => {
1213
- const t = l.value.table.showSum;
1214
- let s = [""].concat(we.value.map((i) => i.name));
1215
- t && (s = s.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>'));
1216
- let e = [];
1217
- for (let i = 0; i < L.value; i += 1) {
1218
- const o = we.value.map((A) => A.absoluteValues[i] ?? 0).reduce((A, C) => A + C, 0);
1219
- e.push(
1220
- [
1221
- l.value.table.useDefaultTimeFormat ? de.value[i].text ?? "-" : rl.value(i + m.value.start, l.value.table.timeFormat)
1222
- ].concat(we.value.map(
1223
- (A) => se(
1224
- A.type === "line" ? l.value.line.labels.formatter : A.type === "bar" ? l.value.bar.labels.formatter : l.value.plot.labels.formatter,
1225
- A.absoluteValues[i] ?? 0,
1226
- Fe({
1227
- p: A.prefix || l.value.chart.labels.prefix,
1228
- v: A.absoluteValues[i] ?? 0,
1229
- s: A.suffix || l.value.chart.labels.suffix,
1230
- r: l.value.table.rounding
1231
- })
1232
- )
1233
- )).concat(t ? (o ?? 0).toFixed(l.value.table.rounding) : [])
1234
- );
1235
- }
1236
- const u = {
1237
- th: {
1238
- backgroundColor: l.value.table.th.backgroundColor,
1239
- color: l.value.table.th.color,
1240
- outline: l.value.table.th.outline
1241
- },
1242
- td: {
1243
- backgroundColor: l.value.table.td.backgroundColor,
1244
- color: l.value.table.td.color,
1245
- outline: l.value.table.td.outline
1246
- },
1247
- breakpoint: l.value.table.responsiveBreakpoint
1248
- }, a = [l.value.table.columnNames.period].concat(we.value.map((i) => i.name)).concat(l.value.table.columnNames.total);
1249
- return { head: s, body: e, config: u, colNames: a };
1250
- });
1251
- function xt(t = null) {
1252
- const s = [[l.value.chart.title.text], [l.value.chart.title.subtitle.text], [""]], e = ["", ...fa.value.head.map((o) => o.label)], u = fa.value.body, a = s.concat([e]).concat(u), i = ns(a);
1253
- t ? t(i) : rs({ csvContent: i, title: l.value.chart.title.text || "vue-ui-xy" });
1254
- }
1255
- function ga(t, s = null) {
1256
- At.value = t;
1257
- const e = we.value.map((u) => ({
1258
- name: u.name,
1259
- value: [null, void 0, NaN].includes(u.absoluteValues[s]) ? null : u.absoluteValues[s],
1260
- color: u.color,
1261
- type: u.type
1262
- }));
1263
- t ? (_.value = s, l.value.events.datapointEnter && l.value.events.datapointEnter({ datapoint: e, seriesIndex: s + m.value.start })) : (_.value = null, l.value.events.datapointLeave && l.value.events.datapointLeave({ datapoint: e, seriesIndex: s + m.value.start }));
1264
- }
1265
- function ma() {
1266
- f.value.showTable = !f.value.showTable;
1267
- }
1268
- function ba() {
1269
- f.value.dataLabels.show = !f.value.dataLabels.show;
1270
- }
1271
- function xa() {
1272
- f.value.showTooltip = !f.value.showTooltip;
1273
- }
1274
- function pa(t) {
1275
- qe.value = t, Ct.value += 1;
1276
- }
1277
- function ya() {
1278
- if (!l.value.responsiveProportionalSizing) {
1279
- y.value.dataLabels = l.value.chart.grid.labels.fontSize, y.value.yAxis = l.value.chart.grid.labels.axis.fontSize, y.value.xAxis = l.value.chart.grid.labels.xAxisLabels.fontSize, y.value.plotLabels = l.value.chart.labels.fontSize, Le.value.plot = l.value.plot.radius, Le.value.line = l.value.line.radius;
1280
- return;
1281
- }
1282
- y.value.dataLabels = dl({
1283
- relator: ve.value,
1284
- adjuster: 400,
1285
- source: l.value.chart.grid.labels.fontSize,
1286
- threshold: 10,
1287
- fallback: 10
1288
- }), y.value.yAxis = dl({
1289
- relator: ee.value,
1290
- adjuster: 1e3,
1291
- source: l.value.chart.grid.labels.axis.fontSize,
1292
- threshold: 10,
1293
- fallback: 10
1294
- }), y.value.xAxis = dl({
1295
- relator: ee.value,
1296
- adjuster: 1e3,
1297
- source: l.value.chart.grid.labels.xAxisLabels.fontSize,
1298
- threshold: 10,
1299
- fallback: 10
1300
- }), y.value.plotLabels = dl({
1301
- relator: ee.value,
1302
- adjuster: 800,
1303
- source: l.value.chart.labels.fontSize,
1304
- threshold: 10,
1305
- fallback: 10
1306
- }), Le.value.plot = dl({
1307
- relator: ee.value,
1308
- adjuster: 800,
1309
- source: l.value.plot.radius,
1310
- threshold: 1,
1311
- fallback: 1
1312
- }), Le.value.line = dl({
1313
- relator: ee.value,
1314
- adjuster: 800,
1315
- source: l.value.line.radius,
1316
- threshold: 1,
1317
- fallback: 1
1318
- });
1319
- }
1320
- function pt() {
1321
- Da(g.dataset) ? (wt({
1322
- componentName: "VueUiXy",
1323
- type: "dataset",
1324
- debug: yl.value
1325
- }), Ol.value = !0) : g.dataset.forEach((s, e) => {
1326
- [null, void 0].includes(s.name) && (wt({
1327
- componentName: "VueUiXy",
1328
- type: "datasetSerieAttribute",
1329
- property: "name (string)",
1330
- index: e,
1331
- debug: yl.value
1332
- }), Ol.value = !0);
1333
- }), yl.value && g.dataset.forEach((s) => {
1334
- s.series.forEach((e, u) => {
1335
- Zl(e) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
1336
- -----> The serie '${s.name}' contains the value '${e}' at index ${u}.
1337
- '${e}' was converted to null to allow the chart to display.`);
1338
- });
1339
- }), Da(g.dataset) || (Ol.value = l.value.loading), It.value = l.value.chart.userOptions.showOnChartHover, it.value = l.value.chart.userOptions.keepStateOnChartLeave, zl.value = !l.value.chart.userOptions.showOnChartHover, vt();
1340
- const t = 12;
1341
- if (l.value.responsive) {
1342
- const e = Ie.value.parentNode;
1343
- He.value && (He.value.unobserve(st.value), He.value.disconnect());
1344
- const { height: u, width: a } = e.getBoundingClientRect();
1345
- let i = null, o = 0;
1346
- l.value.chart.title.show && fl.value && (i = fl.value, o = i.getBoundingClientRect().height);
1347
- let A = null, C = 0;
1348
- l.value.chart.zoom.show && Ne.value > 6 && ct.value && Oe.value && Oe.value.$el && (A = Oe.value.$el, C = A.getBoundingClientRect().height);
1349
- let O = null, S = 0;
1350
- l.value.chart.legend.show && sl.value && (O = sl.value, S = O.getBoundingClientRect().height);
1351
- let T = 0;
1352
- gl.value && (T = gl.value.getBoundingClientRect().height);
1353
- let W = 0;
1354
- ml.value && (W = ml.value.getBoundingClientRect().height), ve.value = u - o - S - C - T - W - t, ee.value = a, Tl.value = `0 0 ${ee.value < 0 ? 10 : ee.value} ${ve.value < 0 ? 10 : ve.value}`, ya();
1355
- const k = new ResizeObserver((F) => {
1356
- for (const z of F)
1357
- l.value.chart.title.show && fl.value ? o = fl.value.getBoundingClientRect().height : o = 0, Oe.value && Oe.value.$el ? C = Oe.value.$el.getBoundingClientRect().height : C = 0, sl.value ? S = sl.value.getBoundingClientRect().height : S = 0, gl.value ? T = gl.value.getBoundingClientRect().height : T = 0, ml.value ? W = ml.value.getBoundingClientRect().height : W = 0, requestAnimationFrame(() => {
1358
- ve.value = z.contentRect.height - o - S - C - T - W - t, ee.value = z.contentBoxSize[0].inlineSize, Tl.value = `0 0 ${ee.value < 0 ? 10 : ee.value} ${ve.value < 0 ? 10 : ve.value}`, ya();
1359
- });
1360
- });
1361
- He.value = k, st.value = e, k.observe(e);
1362
- } else
1363
- ve.value = l.value.chart.height, ee.value = l.value.chart.width, y.value.dataLabels = l.value.chart.grid.labels.fontSize, y.value.yAxis = l.value.chart.grid.labels.axis.fontSize, y.value.xAxis = l.value.chart.grid.labels.xAxisLabels.fontSize, y.value.plotLabels = l.value.chart.labels.fontSize, Le.value.plot = l.value.plot.radius, Le.value.line = l.value.line.radius, Tl.value = `0 0 ${ee.value} ${ve.value}`;
1364
- }
1365
- function ka(t) {
1366
- lo.value = {
1367
- x: t.clientX,
1368
- y: t.clientY
1369
- };
1370
- }
1371
- ql(() => {
1372
- pt(), Rl(), document.addEventListener("mousemove", ka, { passive: !0 }), document.addEventListener("scroll", Wt, { passive: !0 });
1373
- }), kt(() => {
1374
- document.removeEventListener("scroll", Wt, { passive: !0 }), document.removeEventListener("mousemove", ka, { passive: !0 }), He.value && (He.value.unobserve(st.value), He.value.disconnect(), He.value = null);
1375
- }), xs({
1376
- timeLabelsEls: ul,
1377
- timeLabels: de,
1378
- slicer: m,
1379
- configRef: l,
1380
- rotationPath: ["chart", "grid", "labels", "xAxisLabels", "rotation"],
1381
- autoRotatePath: ["chart", "grid", "labels", "xAxisLabels", "autoRotate", "enable"],
1382
- isAutoSize: uo,
1383
- height: ve,
1384
- width: ee,
1385
- rotation: l.value.chart.grid.labels.xAxisLabels.autoRotate.angle
1386
- });
1387
- const Ul = x(!1), _a = x(null), wa = x(200), No = b(
1388
- () => _.value ?? V.value ?? 0
1389
- );
1390
- function Vo() {
1391
- const t = Math.ceil(wa.value || 200);
1392
- return Math.min(Math.max(t, 1), 200);
1393
- }
1394
- function Po() {
1395
- const t = Vo(), s = 200, e = Math.max(1, L.value), u = c.value.width / e, i = c.value.left + No.value * u + u / 2 - t / 2 - (s - t) / 2, o = c.value.left - (s - t) / 2, A = c.value.right - (s + t) / 2, C = Math.max(o, Math.min(i, A));
1396
- return P(C);
1397
- }
1398
- ql(() => {
1399
- let t = null, s = null;
1400
- const e = (i) => {
1401
- cancelAnimationFrame(s), s = requestAnimationFrame(() => {
1402
- wa.value = Math.min(Math.max(Math.ceil(i || 0), 1), 200);
1403
- });
1404
- }, u = new ResizeObserver((i) => {
1405
- let o = i.find((A) => A.target === t) || i[0];
1406
- o && e(o.contentRect.width || 200);
1407
- }), a = Ma((i) => {
1408
- const o = _a.value;
1409
- t && t !== o && (u.unobserve(t), t = null), o && o !== t && (Aa(() => {
1410
- o.offsetParent !== null && e(o.offsetWidth || o.getBoundingClientRect().width || 200);
1411
- }), u.observe(o), t = o), i(() => {
1412
- t && (u.unobserve(t), t = null);
1413
- });
1414
- });
1415
- kt(() => {
1416
- try {
1417
- t && u.unobserve(t), u.disconnect(), a();
1418
- } catch {
1419
- }
1420
- });
1421
- });
1422
- const Fo = b(() => {
1423
- if ([null, void 0].includes(_.value) && [null, void 0].includes(V.value)) return "";
1424
- const t = (_.value != null ? _.value : 0) || (V.value != null ? V.value : 0), s = l.value.chart.timeTag.customFormat;
1425
- if (Ul.value = !1, Ba(s))
1426
- try {
1427
- const e = s({
1428
- absoluteIndex: t + m.value.start,
1429
- seriesIndex: t,
1430
- datapoint: je.value,
1431
- bars: Ce.value,
1432
- lines: ae.value,
1433
- plots: xe.value,
1434
- config: l.value
1435
- });
1436
- if (typeof e == "string")
1437
- return Ul.value = !0, e;
1438
- } catch {
1439
- console.warn("Custom format cannot be applied on timeTag."), Ul.value = !1;
1440
- }
1441
- if (!Ul.value)
1442
- return [null, void 0].includes(de.value[t]) ? "" : l.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !l.value.chart.timeTag.useDefaultFormat ? rl.value(t + m.value.start, l.value.chart.timeTag.timeFormat) : de.value[t].text;
1443
- });
1444
- Al(() => g.dataset, (t) => {
1445
- Array.isArray(t) && t.length > 0 && (Ol.value = !1), Ne.value = Math.max(...ge.value.map((s) => De(s.series).length)), m.value = {
1446
- start: 0,
1447
- end: Ne.value
1448
- }, eo.value += 1, ut.value += 1, nl();
1449
- }, { deep: !0 }), Al(() => g.config, (t) => {
1450
- ie.value || (l.value = rt()), pt(), zt.value += 1, Tt.value += 1, vt(), nl();
1451
- }, { deep: !0 });
1452
- const yt = x(!1);
1453
- function Sa() {
1454
- const t = Ie.value?.parentNode;
1455
- if (!t) {
1456
- yt.value = !1;
1457
- return;
1458
- }
1459
- const s = t.getBoundingClientRect();
1460
- yt.value = s.width > 2 && s.height > 2;
1461
- }
1462
- ql(() => {
1463
- Sa();
1464
- const t = new ResizeObserver(() => {
1465
- Sa(), yt.value && (pt(), nl(), Rl());
1466
- });
1467
- Ie.value?.parentNode && t.observe(Ie.value.parentNode);
1468
- }), Al(l, () => {
1469
- vt();
1470
- }, { immediate: !0 });
1471
- const $l = b(() => {
1472
- const t = l.value.table.useDialog && !l.value.showTable, s = f.value.showTable;
1473
- return {
1474
- component: t ? Ka : ws,
1475
- title: `${l.value.chart.title.text}${l.value.chart.title.subtitle.text ? `: ${l.value.chart.title.subtitle.text}` : ""}`,
1476
- props: t ? {
1477
- backgroundColor: l.value.table.th.backgroundColor,
1478
- color: l.value.table.th.color,
1479
- headerColor: l.value.table.th.color,
1480
- headerBg: l.value.table.th.backgroundColor,
1481
- isFullscreen: qe.value,
1482
- fullscreenParent: Ie.value,
1483
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
1484
- } : {
1485
- hideDetails: !0,
1486
- config: {
1487
- open: s,
1488
- maxHeight: 1e4,
1489
- body: {
1490
- backgroundColor: l.value.chart.backgroundColor,
1491
- color: l.value.chart.color
1492
- },
1493
- head: {
1494
- backgroundColor: l.value.chart.backgroundColor,
1495
- color: l.value.chart.color
1496
- }
1497
- }
1498
- }
1499
- };
1500
- });
1501
- Al(() => f.value.showTable, (t) => {
1502
- l.value.showTable || (t && l.value.table.useDialog && il.value ? il.value.open() : il.value && il.value.close && il.value.close());
1503
- });
1504
- function $a() {
1505
- f.value.showTable = !1, ot.value && ot.value.setTableIconState(!1);
1506
- }
1507
- const Ro = b(() => me.value.map((t) => ({
1508
- shape: t.type === "bar" ? "square" : t.shape ?? "circle",
1509
- color: t.color,
1510
- name: t.name
1511
- }))), Bo = b(() => l.value.chart.backgroundColor), Ho = b(() => l.value.chart.legend), Do = b(() => l.value.chart.title), { exportSvg: Eo, getSvg: Yo } = bs({
1512
- svg: ue,
1513
- title: Do,
1514
- legend: Ho,
1515
- legendItems: Ro,
1516
- backgroundColor: Bo
1517
- });
1518
- async function La({ isCb: t }) {
1519
- if (t) {
1520
- const { blob: s, url: e, text: u, dataUrl: a } = await Yo();
1521
- l.value.chart.userOptions.callbacks.svg({ blob: s, url: e, text: u, dataUrl: a });
1522
- } else
1523
- Eo();
1524
- }
1525
- return Ya({
1526
- getData: ko,
1527
- getImage: _o,
1528
- generatePdf: Ht,
1529
- generateImage: Dt,
1530
- generateSvg: La,
1531
- generateCsv: xt,
1532
- hideSeries: So,
1533
- showSeries: wo,
1534
- toggleStack: qt,
1535
- toggleTable: ma,
1536
- toggleLabels: ba,
1537
- toggleTooltip: xa,
1538
- toggleAnnotator: ft,
1539
- toggleFullscreen: pa
1540
- }), (t, s) => (n(), r("div", {
1541
- id: `vue-ui-xy_${E.value}`,
1542
- class: ll(`vue-data-ui-component vue-ui-xy ${qe.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${l.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1543
- ref_key: "chart",
1544
- ref: Ie,
1545
- style: $(`background:${l.value.chart.backgroundColor}; color:${l.value.chart.color};width:100%;font-family:${l.value.chart.fontFamily};${l.value.responsive ? "height: 100%" : ""}`),
1546
- onMouseenter: s[6] || (s[6] = () => Gt(!0)),
1547
- onMouseleave: s[7] || (s[7] = () => Gt(!1)),
1548
- onClick: aa
1549
- }, [
1550
- l.value.chart.userOptions.buttons.annotator && ue.value ? (n(), Te(v(Ja), {
1551
- key: 0,
1552
- svgRef: ue.value,
1553
- backgroundColor: l.value.chart.backgroundColor,
1554
- color: l.value.chart.color,
1555
- active: xl.value,
1556
- onClose: ft
1557
- }, {
1558
- "annotator-action-close": G(() => [
1559
- B(t.$slots, "annotator-action-close", {}, void 0, !0)
1560
- ]),
1561
- "annotator-action-color": G(({ color: e }) => [
1562
- B(t.$slots, "annotator-action-color", ke(_e({ color: e })), void 0, !0)
1563
- ]),
1564
- "annotator-action-draw": G(({ mode: e }) => [
1565
- B(t.$slots, "annotator-action-draw", ke(_e({ mode: e })), void 0, !0)
1566
- ]),
1567
- "annotator-action-undo": G(({ disabled: e }) => [
1568
- B(t.$slots, "annotator-action-undo", ke(_e({ disabled: e })), void 0, !0)
1569
- ]),
1570
- "annotator-action-redo": G(({ disabled: e }) => [
1571
- B(t.$slots, "annotator-action-redo", ke(_e({ disabled: e })), void 0, !0)
1572
- ]),
1573
- "annotator-action-delete": G(({ disabled: e }) => [
1574
- B(t.$slots, "annotator-action-delete", ke(_e({ disabled: e })), void 0, !0)
1575
- ]),
1576
- _: 3
1577
- }, 8, ["svgRef", "backgroundColor", "color", "active"])) : h("", !0),
1578
- Lo.value ? (n(), r("div", {
1579
- key: 1,
1580
- ref_key: "noTitle",
1581
- ref: ml,
1582
- class: "vue-data-ui-no-title-space",
1583
- style: "height:36px; width: 100%; background:transparent"
1584
- }, null, 512)) : h("", !0),
1585
- l.value.chart.title.show ? (n(), r("div", {
1586
- key: 2,
1587
- ref_key: "chartTitle",
1588
- ref: fl,
1589
- class: "vue-ui-xy-title",
1590
- style: $(`font-family:${l.value.chart.fontFamily}`)
1591
- }, [
1592
- (n(), Te(ys, {
1593
- key: `title_${zt.value}`,
1594
- config: {
1595
- title: {
1596
- cy: "xy-div-title",
1597
- ...l.value.chart.title
1598
- },
1599
- subtitle: {
1600
- cy: "xy-div-subtitle",
1601
- ...l.value.chart.title.subtitle
1602
- }
1603
- }
1604
- }, null, 8, ["config"]))
1605
- ], 4)) : h("", !0),
1606
- p("div", {
1607
- id: `legend-top-${E.value}`
1608
- }, null, 8, Ls),
1609
- l.value.chart.userOptions.show && (it.value || zl.value) ? (n(), Te(v(Ua), {
1610
- ref_key: "userOptionsRef",
1611
- ref: ot,
1612
- key: `user_options_${Ct.value}`,
1613
- backgroundColor: l.value.chart.backgroundColor,
1614
- color: l.value.chart.color,
1615
- isPrinting: v(dt),
1616
- isImaging: v(Bt),
1617
- uid: E.value,
1618
- hasTooltip: l.value.chart.userOptions.buttons.tooltip && l.value.chart.tooltip.show,
1619
- hasPdf: l.value.chart.userOptions.buttons.pdf,
1620
- hasXls: l.value.chart.userOptions.buttons.csv,
1621
- hasImg: l.value.chart.userOptions.buttons.img,
1622
- hasSvg: l.value.chart.userOptions.buttons.svg,
1623
- hasLabel: l.value.chart.userOptions.buttons.labels,
1624
- hasTable: l.value.chart.userOptions.buttons.table,
1625
- hasStack: jl.dataset.length > 1 && l.value.chart.userOptions.buttons.stack,
1626
- hasFullscreen: l.value.chart.userOptions.buttons.fullscreen,
1627
- isStacked: f.value.isStacked,
1628
- isFullscreen: qe.value,
1629
- chartElement: t.$refs.chart,
1630
- position: l.value.chart.userOptions.position,
1631
- isTooltip: f.value.showTooltip,
1632
- titles: { ...l.value.chart.userOptions.buttonTitles },
1633
- hasAnnotator: l.value.chart.userOptions.buttons.annotator,
1634
- isAnnotation: xl.value,
1635
- callbacks: l.value.chart.userOptions.callbacks,
1636
- tableDialog: l.value.table.useDialog,
1637
- printScale: l.value.chart.userOptions.print.scale,
1638
- onToggleFullscreen: pa,
1639
- onGeneratePdf: v(Ht),
1640
- onGenerateCsv: xt,
1641
- onGenerateImage: v(Dt),
1642
- onGenerateSvg: La,
1643
- onToggleTable: ma,
1644
- onToggleLabels: ba,
1645
- onToggleStack: qt,
1646
- onToggleTooltip: xa,
1647
- onToggleAnnotator: ft,
1648
- style: $({
1649
- visibility: it.value ? zl.value ? "visible" : "hidden" : "visible"
1650
- })
1651
- }, Ca({ _: 2 }, [
1652
- t.$slots.menuIcon ? {
1653
- name: "menuIcon",
1654
- fn: G(({ isOpen: e, color: u }) => [
1655
- B(t.$slots, "menuIcon", ke(_e({ isOpen: e, color: u })), void 0, !0)
1656
- ]),
1657
- key: "0"
1658
- } : void 0,
1659
- t.$slots.optionTooltip ? {
1660
- name: "optionTooltip",
1661
- fn: G(() => [
1662
- B(t.$slots, "optionTooltip", {}, void 0, !0)
1663
- ]),
1664
- key: "1"
1665
- } : void 0,
1666
- t.$slots.optionPdf ? {
1667
- name: "optionPdf",
1668
- fn: G(() => [
1669
- B(t.$slots, "optionPdf", {}, void 0, !0)
1670
- ]),
1671
- key: "2"
1672
- } : void 0,
1673
- t.$slots.optionCsv ? {
1674
- name: "optionCsv",
1675
- fn: G(() => [
1676
- B(t.$slots, "optionCsv", {}, void 0, !0)
1677
- ]),
1678
- key: "3"
1679
- } : void 0,
1680
- t.$slots.optionImg ? {
1681
- name: "optionImg",
1682
- fn: G(() => [
1683
- B(t.$slots, "optionImg", {}, void 0, !0)
1684
- ]),
1685
- key: "4"
1686
- } : void 0,
1687
- t.$slots.optionSvg ? {
1688
- name: "optionSvg",
1689
- fn: G(() => [
1690
- B(t.$slots, "optionSvg", {}, void 0, !0)
1691
- ]),
1692
- key: "5"
1693
- } : void 0,
1694
- t.$slots.optionTable ? {
1695
- name: "optionTable",
1696
- fn: G(() => [
1697
- B(t.$slots, "optionTable", {}, void 0, !0)
1698
- ]),
1699
- key: "6"
1700
- } : void 0,
1701
- t.$slots.optionLabels ? {
1702
- name: "optionLabels",
1703
- fn: G(() => [
1704
- B(t.$slots, "optionLabels", {}, void 0, !0)
1705
- ]),
1706
- key: "7"
1707
- } : void 0,
1708
- t.$slots.optionStack ? {
1709
- name: "optionStack",
1710
- fn: G(({ isStack: e }) => [
1711
- B(t.$slots, "optionStack", ke(_e({ isStack: e })), void 0, !0)
1712
- ]),
1713
- key: "8"
1714
- } : void 0,
1715
- t.$slots.optionFullscreen ? {
1716
- name: "optionFullscreen",
1717
- fn: G(({ toggleFullscreen: e, isFullscreen: u }) => [
1718
- B(t.$slots, "optionFullscreen", ke(_e({ toggleFullscreen: e, isFullscreen: u })), void 0, !0)
1719
- ]),
1720
- key: "9"
1721
- } : void 0,
1722
- t.$slots.optionAnnotator ? {
1723
- name: "optionAnnotator",
1724
- fn: G(({ toggleAnnotator: e, isAnnotator: u }) => [
1725
- B(t.$slots, "optionAnnotator", ke(_e({ toggleAnnotator: e, isAnnotator: u })), void 0, !0)
1726
- ]),
1727
- key: "10"
1728
- } : void 0
1729
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "tableDialog", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
1730
- (n(), r("svg", {
1731
- ref_key: "svgRef",
1732
- ref: ue,
1733
- xmlns: "http://www.w3.org/2000/svg",
1734
- class: ll([{ "vue-data-ui-fullscreen--on": qe.value, "vue-data-ui-fulscreen--off": !qe.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
1735
- width: "100%",
1736
- viewBox: Tl.value,
1737
- style: $({
1738
- background: "transparent",
1739
- color: l.value.chart.color,
1740
- fontFamily: l.value.chart.fontFamily
1741
- }),
1742
- "aria-label": $o.value,
1743
- role: "img",
1744
- "aria-live": "polite",
1745
- preserveAspectRatio: "xMidYMid",
1746
- onMousemove: yo,
1747
- onMouseleave: Dl,
1748
- onClick: aa
1749
- }, [
1750
- p("g", {
1751
- ref_key: "G",
1752
- ref: ja,
1753
- class: "vue-data-ui-g"
1754
- }, [
1755
- vl(v(Za)),
1756
- t.$slots["chart-background"] ? (n(), r("foreignObject", {
1757
- key: 0,
1758
- x: c.value.left + U.value < 0 ? 0 : c.value.left + U.value,
1759
- y: c.value.top,
1760
- width: c.value.width - (l.value.chart.grid.position === "middle" ? 0 : c.value.width / L.value) < 0 ? 0 : c.value.width - (l.value.chart.grid.position === "middle" ? 0 : c.value.width / L.value),
1761
- height: c.value.height < 0 ? 0 : c.value.height,
1762
- style: {
1763
- pointerEvents: "none"
1764
- }
1765
- }, [
1766
- B(t.$slots, "chart-background", {}, void 0, !0)
1767
- ], 8, As)) : h("", !0),
1768
- L.value > 0 ? (n(), r("g", Cs, [
1769
- p("g", Ts, [
1770
- l.value.chart.grid.labels.xAxis.showBaseline ? (n(), r("line", {
1771
- key: 0,
1772
- stroke: l.value.chart.grid.stroke,
1773
- "stroke-width": "1",
1774
- x1: c.value.left + U.value,
1775
- x2: c.value.right - U.value,
1776
- y1: v(Y)(c.value.bottom),
1777
- y2: v(Y)(c.value.bottom),
1778
- "stroke-linecap": "round",
1779
- style: { animation: "none !important" }
1780
- }, null, 8, zs)) : h("", !0),
1781
- f.value.useIndividualScale ? l.value.chart.grid.showHorizontalLines ? (n(!0), r(d, { key: 2 }, w(Sl.value, (e) => (n(), r("g", null, [
1782
- e.id === I.value && e.yLabels.length ? (n(!0), r(d, { key: 0 }, w(e.yLabels, (u) => (n(), r("line", {
1783
- x1: c.value.left + U.value,
1784
- x2: c.value.right - U.value,
1785
- y1: v(Y)(u.y),
1786
- y2: v(Y)(u.y),
1787
- stroke: e.color,
1788
- "stroke-width": 0.5,
1789
- "stroke-linecap": "round",
1790
- style: { animation: "none !important" }
1791
- }, null, 8, Vs))), 256)) : e.yLabels.length ? (n(!0), r(d, { key: 1 }, w(e.yLabels, (u) => (n(), r("line", {
1792
- x1: c.value.left + U.value,
1793
- x2: c.value.right - U.value,
1794
- y1: v(Y)(u.y),
1795
- y2: v(Y)(u.y),
1796
- stroke: l.value.chart.grid.stroke,
1797
- "stroke-width": 0.5,
1798
- "stroke-linecap": "round",
1799
- style: { animation: "none !important" }
1800
- }, null, 8, Ps))), 256)) : h("", !0)
1801
- ]))), 256)) : h("", !0) : (n(), r(d, { key: 1 }, [
1802
- l.value.chart.grid.labels.yAxis.showBaseline ? (n(), r("line", {
1803
- key: 0,
1804
- stroke: l.value.chart.grid.stroke,
1805
- "stroke-width": "1",
1806
- x1: c.value.left + U.value,
1807
- x2: c.value.left + U.value,
1808
- y1: v(Y)(c.value.top),
1809
- y2: v(Y)(c.value.bottom),
1810
- "stroke-linecap": "round",
1811
- style: { animation: "none !important" }
1812
- }, null, 8, Is)) : h("", !0),
1813
- l.value.chart.grid.showHorizontalLines ? (n(), r("g", Os, [
1814
- (n(!0), r(d, null, w(na.value, (e) => (n(), r("line", {
1815
- x1: c.value.left + U.value,
1816
- x2: c.value.right,
1817
- y1: v(Y)(e.y),
1818
- y2: v(Y)(e.y),
1819
- stroke: l.value.chart.grid.stroke,
1820
- "stroke-width": 0.5,
1821
- "stroke-linecap": "round",
1822
- style: { animation: "none !important" }
1823
- }, null, 8, Ns))), 256))
1824
- ])) : h("", !0)
1825
- ], 64)),
1826
- l.value.chart.grid.showVerticalLines ? (n(), r("g", Fs, [
1827
- p("path", {
1828
- d: co.value,
1829
- "stroke-width": 0.5,
1830
- stroke: l.value.chart.grid.stroke,
1831
- "stroke-linecap": "round",
1832
- style: { animation: "none !important" }
1833
- }, null, 8, Rs)
1834
- ])) : h("", !0),
1835
- l.value.chart.grid.labels.xAxisLabels.show ? (n(), r("g", Bs, [
1836
- p("path", {
1837
- d: vo.value,
1838
- stroke: l.value.chart.grid.stroke,
1839
- "stroke-width": 1,
1840
- "stroke-linecap": "round",
1841
- style: { animation: "none !important" }
1842
- }, null, 8, Hs)
1843
- ])) : h("", !0)
1844
- ]),
1845
- (n(!0), r(d, null, w(Ce.value, (e, u) => (n(), r("defs", {
1846
- key: `def_rect_${u}`
1847
- }, [
1848
- t.$slots["bar-gradient"] ? B(t.$slots, "bar-gradient", tl({
1849
- key: 0,
1850
- ref_for: !0
1851
- }, { series: e, positiveId: `rectGradient_pos_${u}_${E.value}`, negativeId: `rectGradient_neg_${u}_${E.value}` }), void 0, !0) : (n(), r(d, { key: 1 }, [
1852
- p("linearGradient", {
1853
- id: `rectGradient_pos_${u}_${E.value}`,
1854
- x2: "0%",
1855
- y2: "100%"
1856
- }, [
1857
- p("stop", {
1858
- offset: "0%",
1859
- "stop-color": e.color
1860
- }, null, 8, Es),
1861
- p("stop", {
1862
- offset: "62%",
1863
- "stop-color": `${v(ol)(e.color, 0.02)}`
1864
- }, null, 8, Ys),
1865
- p("stop", {
1866
- offset: "100%",
1867
- "stop-color": `${v(ol)(e.color, 0.05)}`
1868
- }, null, 8, Ws)
1869
- ], 8, Ds),
1870
- p("linearGradient", {
1871
- id: `rectGradient_neg_${u}_${E.value}`,
1872
- x2: "0%",
1873
- y2: "100%"
1874
- }, [
1875
- p("stop", {
1876
- offset: "0%",
1877
- "stop-color": `${v(ol)(e.color, 0.05)}`
1878
- }, null, 8, Gs),
1879
- p("stop", {
1880
- offset: "38%",
1881
- "stop-color": `${v(ol)(e.color, 0.02)}`
1882
- }, null, 8, Us),
1883
- p("stop", {
1884
- offset: "100%",
1885
- "stop-color": e.color
1886
- }, null, 8, qs)
1887
- ], 8, Xs)
1888
- ], 64))
1889
- ]))), 128)),
1890
- (n(!0), r(d, null, w(xe.value, (e, u) => (n(), r("defs", {
1891
- key: `def_plot_${u}`
1892
- }, [
1893
- p("radialGradient", {
1894
- id: `plotGradient_${u}_${E.value}`,
1895
- cx: "50%",
1896
- cy: "50%",
1897
- r: "50%",
1898
- fx: "50%",
1899
- fy: "50%"
1900
- }, [
1901
- p("stop", {
1902
- offset: "0%",
1903
- "stop-color": `${v(ol)(e.color, 0.05)}`
1904
- }, null, 8, Js),
1905
- p("stop", {
1906
- offset: "100%",
1907
- "stop-color": e.color
1908
- }, null, 8, Ks)
1909
- ], 8, Zs)
1910
- ]))), 128)),
1911
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r("defs", {
1912
- key: `def_line_${e.id}`
1913
- }, [
1914
- p("radialGradient", {
1915
- id: `lineGradient_${u}_${E.value}`,
1916
- cx: "50%",
1917
- cy: "50%",
1918
- r: "50%",
1919
- fx: "50%",
1920
- fy: "50%"
1921
- }, [
1922
- p("stop", {
1923
- offset: "0%",
1924
- "stop-color": `${v(ol)(e.color, 0.05)}`
1925
- }, null, 8, js),
1926
- p("stop", {
1927
- offset: "100%",
1928
- "stop-color": e.color
1929
- }, null, 8, eu)
1930
- ], 8, Qs),
1931
- t.$slots["area-gradient"] ? B(t.$slots, "area-gradient", tl({
1932
- key: 0,
1933
- ref_for: !0
1934
- }, { series: e, id: `areaGradient_${u}_${E.value}` }), void 0, !0) : (n(), r("linearGradient", {
1935
- key: 1,
1936
- id: `areaGradient_${u}_${E.value}`,
1937
- x1: "0%",
1938
- x2: "100%",
1939
- y1: "0%",
1940
- y2: "0%"
1941
- }, [
1942
- p("stop", {
1943
- offset: "0%",
1944
- "stop-color": `${v(ze)(v(ol)(e.color, 0.03), l.value.line.area.opacity)}`
1945
- }, null, 8, tu),
1946
- p("stop", {
1947
- offset: "100%",
1948
- "stop-color": `${v(ze)(e.color, l.value.line.area.opacity)}`
1949
- }, null, 8, au)
1950
- ], 8, lu))
1951
- ]))), 128)),
1952
- (n(!0), r(d, null, w(Mo.value, (e) => (n(), r("g", null, [
1953
- e.show ? (n(), r(d, { key: 0 }, [
1954
- (n(!0), r(d, null, w(e.span, (u, a) => (n(), r("g", null, [
1955
- p("rect", {
1956
- style: $({
1957
- transition: "none",
1958
- opacity: e.from + a >= m.value.start && e.from + a <= m.value.end - 1 ? 1 : 0
1959
- }),
1960
- x: c.value.left + c.value.width / L.value * (e.from + a - m.value.start),
1961
- y: c.value.top,
1962
- height: c.value.height < 0 ? 10 : c.value.height,
1963
- width: c.value.width / L.value < 0 ? 1e-5 : c.value.width / L.value,
1964
- fill: v(ze)(e.color, e.opacity)
1965
- }, null, 12, ou)
1966
- ]))), 256)),
1967
- (n(!0), r(d, null, w(e.span, (u, a) => (n(), r("g", null, [
1968
- e.caption.text && a === 0 ? (n(), r("foreignObject", {
1969
- key: 0,
1970
- x: c.value.left + c.value.width / L.value * (e.from + a - m.value.start) - (e.caption.width === "auto" ? 0 : e.caption.width / 2 - c.value.width / L.value * e.span / 2),
1971
- y: c.value.top + e.caption.offsetY,
1972
- style: $({
1973
- overflow: "visible",
1974
- opacity: e.to >= m.value.start && e.from < m.value.end ? 1 : 0
1975
- }),
1976
- height: "1",
1977
- width: e.caption.width === "auto" ? c.value.width / L.value * e.span : e.caption.width
1978
- }, [
1979
- p("div", {
1980
- style: $(`padding:${e.caption.padding}px;text-align:${e.caption.textAlign};font-size:${e.caption.fontSize}px;color:${e.caption.color};font-weight:${e.caption.bold ? "bold" : "normal"}`)
1981
- }, te(e.caption.text), 5)
1982
- ], 12, su)) : h("", !0)
1983
- ]))), 256))
1984
- ], 64)) : h("", !0)
1985
- ]))), 256)),
1986
- Xt.value ? (n(), r("g", uu, [
1987
- (n(!0), r(d, null, w(L.value, (e, u) => (n(), r("g", {
1988
- key: `tooltip_trap_highlighter_${u}`
1989
- }, [
1990
- p("rect", {
1991
- x: c.value.left + c.value.width / L.value * u,
1992
- y: c.value.top,
1993
- height: c.value.height < 0 ? 10 : c.value.height,
1994
- width: c.value.width / L.value < 0 ? 1e-5 : c.value.width / L.value,
1995
- fill: [V.value, _.value, Ze.value].includes(u) ? v(ze)(l.value.chart.highlighter.color, l.value.chart.highlighter.opacity) : "transparent",
1996
- style: { transition: "none !important", animation: "none !important" }
1997
- }, null, 8, iu)
1998
- ]))), 128))
1999
- ])) : h("", !0),
2000
- Ce.value.length ? (n(!0), r(d, { key: 1 }, w(Ce.value, (e, u) => (n(), r("g", {
2001
- key: `serie_bar_${e.id}`,
2002
- class: ll(`serie_bar_${u}`),
2003
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2004
- }, [
2005
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r("g", {
2006
- key: `bar_plot_${u}_${i}`
2007
- }, [
2008
- be(a.value) ? (n(), r("rect", {
2009
- key: 0,
2010
- x: Hl(a) + Xl.value / 2,
2011
- y: f.value.useIndividualScale ? la(a) : ea(a),
2012
- height: f.value.useIndividualScale ? Math.abs(jt(a)) : Math.abs(Qt(a)),
2013
- width: Wl.value - Xl.value,
2014
- rx: l.value.bar.borderRadius,
2015
- fill: l.value.bar.useGradient ? a.value >= 0 ? `url(#rectGradient_pos_${u}_${E.value})` : `url(#rectGradient_neg_${u}_${E.value})` : e.color,
2016
- stroke: l.value.bar.border.useSerieColor ? e.color : l.value.bar.border.stroke,
2017
- "stroke-width": l.value.bar.border.strokeWidth,
2018
- style: $({
2019
- transition: v(ie) || !l.value.bar.showTransition ? void 0 : `all ${l.value.bar.transitionDurationMs}ms ease-in-out`
2020
- })
2021
- }, null, 12, nu)) : h("", !0),
2022
- be(a.value) && t.$slots.pattern ? (n(), r("rect", {
2023
- key: 1,
2024
- x: Hl(a) - Xl.value / 2,
2025
- y: f.value.useIndividualScale ? la(a) : ea(a),
2026
- height: f.value.useIndividualScale ? Math.abs(jt(a)) : Math.abs(Qt(a)),
2027
- width: Wl.value - Xl.value,
2028
- rx: l.value.bar.borderRadius,
2029
- fill: `url(#pattern_${E.value}_${e.slotAbsoluteIndex})`,
2030
- stroke: l.value.bar.border.useSerieColor ? e.color : l.value.bar.border.stroke,
2031
- "stroke-width": l.value.bar.border.strokeWidth,
2032
- style: $({ transition: v(ie) || !l.value.bar.showTransition ? void 0 : `all ${l.value.bar.transitionDurationMs}ms ease-in-out` })
2033
- }, null, 12, ru)) : h("", !0),
2034
- a.comment && l.value.chart.comments.show ? (n(), r("foreignObject", {
2035
- key: 2,
2036
- style: { overflow: "visible" },
2037
- height: "12",
2038
- width: Wl.value / 2 + l.value.chart.comments.width,
2039
- x: Hl(a) - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
2040
- y: v(P)(a.y) + l.value.chart.comments.offsetY + 6
2041
- }, [
2042
- B(t.$slots, "plot-comment", {
2043
- plot: { ...a, color: e.color, seriesIndex: u, datapointIndex: i }
2044
- }, void 0, !0)
2045
- ], 8, cu)) : h("", !0)
2046
- ]))), 128))
2047
- ], 6))), 128)) : h("", !0),
2048
- !f.value.useIndividualScale && l.value.chart.grid.labels.zeroLine.show ? (n(), r("line", {
2049
- key: 2,
2050
- stroke: l.value.chart.grid.stroke,
2051
- "stroke-width": "1",
2052
- x1: c.value.left + U.value,
2053
- x2: c.value.right,
2054
- y1: v(Y)(ne.value),
2055
- y2: v(Y)(ne.value),
2056
- "stroke-linecap": "round",
2057
- style: { animation: "none !important" }
2058
- }, null, 8, vu)) : h("", !0),
2059
- l.value.chart.highlighter.useLine && (![null, void 0].includes(_.value) || ![null, void 0].includes(V.value)) ? (n(), r("g", du, [
2060
- p("line", {
2061
- x1: c.value.left + c.value.width / L.value * ((_.value !== null ? _.value : 0) || (V.value !== null ? V.value : 0)) + c.value.width / L.value / 2,
2062
- x2: c.value.left + c.value.width / L.value * ((_.value !== null ? _.value : 0) || (V.value !== null ? V.value : 0)) + c.value.width / L.value / 2,
2063
- y1: v(Y)(c.value.top),
2064
- y2: v(Y)(c.value.bottom),
2065
- stroke: l.value.chart.highlighter.color,
2066
- "stroke-width": l.value.chart.highlighter.lineWidth,
2067
- "stroke-dasharray": l.value.chart.highlighter.lineDasharray,
2068
- "stroke-linecap": "round",
2069
- style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
2070
- }, null, 8, hu)
2071
- ])) : h("", !0),
2072
- l.value.chart.grid.frame.show ? (n(), r("rect", {
2073
- key: 4,
2074
- style: { pointerEvents: "none", transition: "none", animation: "none !important" },
2075
- x: c.value.left + U.value < 0 ? 0 : c.value.left + U.value,
2076
- y: c.value.top,
2077
- width: c.value.width - (l.value.chart.grid.position === "middle" ? 0 : c.value.width / L.value) < 0 ? 0 : c.value.width - (l.value.chart.grid.position === "middle" ? 0 : c.value.width / L.value),
2078
- height: c.value.height < 0 ? 0 : c.value.height,
2079
- fill: "transparent",
2080
- stroke: l.value.chart.grid.frame.stroke,
2081
- "stroke-width": l.value.chart.grid.frame.strokeWidth,
2082
- "stroke-linecap": l.value.chart.grid.frame.strokeLinecap,
2083
- "stroke-linejoin": l.value.chart.grid.frame.strokeLinejoin,
2084
- "stroke-dasharray": l.value.chart.grid.frame.strokeDasharray
2085
- }, null, 8, fu)) : h("", !0),
2086
- l.value.chart.grid.labels.show ? (n(), r("g", {
2087
- key: 5,
2088
- ref_key: "scaleLabels",
2089
- ref: at
2090
- }, [
2091
- f.value.useIndividualScale ? (n(), r(d, { key: 0 }, [
2092
- (n(!0), r(d, null, w(Sl.value, (e) => (n(), r("g", null, [
2093
- p("line", {
2094
- x1: e.x + U.value - c.value.individualOffsetX,
2095
- x2: e.x + U.value - c.value.individualOffsetX,
2096
- y1: f.value.isStacked ? v(Y)(c.value.bottom - e.yOffset - e.individualHeight) : v(Y)(c.value.top),
2097
- y2: f.value.isStacked ? v(Y)(c.value.bottom - e.yOffset) : v(Y)(c.value.bottom),
2098
- stroke: e.color,
2099
- "stroke-width": l.value.chart.grid.stroke,
2100
- "stroke-linecap": "round",
2101
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
2102
- }, null, 12, gu)
2103
- ]))), 256)),
2104
- (n(!0), r(d, null, w(Sl.value, (e) => (n(), r("g", {
2105
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
2106
- }, [
2107
- p("text", {
2108
- fill: e.color,
2109
- "font-size": y.value.dataLabels * 0.8,
2110
- "text-anchor": "middle",
2111
- transform: `translate(${e.x - y.value.dataLabels * 0.8 / 2 + U.value}, ${f.value.isStacked ? c.value.bottom - e.yOffset - e.individualHeight / 2 : c.value.top + c.value.height / 2}) rotate(-90)`
2112
- }, te(e.name) + " " + te(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `-
2113
- ${e.scaleLabel}` : ""), 9, mu),
2114
- (n(!0), r(d, null, w(e.yLabels, (u, a) => (n(), r(d, null, [
2115
- l.value.chart.grid.labels.yAxis.showCrosshairs ? (n(), r("line", {
2116
- key: 0,
2117
- x1: e.x + 3 + U.value - l.value.chart.grid.labels.yAxis.crosshairSize - c.value.individualOffsetX,
2118
- x2: e.x + U.value - c.value.individualOffsetX,
2119
- y1: v(Y)(u.y),
2120
- y2: v(Y)(u.y),
2121
- stroke: e.color,
2122
- "stroke-width": 1,
2123
- "stroke-linecap": "round",
2124
- style: { animation: "none !important" }
2125
- }, null, 8, bu)) : h("", !0)
2126
- ], 64))), 256)),
2127
- (n(!0), r(d, null, w(e.yLabels, (u, a) => (n(), r("text", {
2128
- x: e.x - 5 + U.value - c.value.individualOffsetX,
2129
- y: v(Y)(u.y) + y.value.dataLabels / 3,
2130
- "font-size": y.value.dataLabels,
2131
- "text-anchor": "end",
2132
- fill: e.color
2133
- }, te(v(se)(
2134
- l.value.chart.grid.labels.yAxis.formatter,
2135
- u.value,
2136
- v(Fe)({
2137
- p: u.prefix,
2138
- v: u.value,
2139
- s: u.suffix,
2140
- r: l.value.chart.grid.labels.yAxis.rounding
2141
- }),
2142
- { datapoint: u.datapoint, seriesIndex: a }
2143
- )), 9, xu))), 256))
2144
- ], 4))), 256))
2145
- ], 64)) : (n(!0), r(d, { key: 1 }, w(na.value, (e, u) => (n(), r("g", {
2146
- key: `yLabel_${u}`
2147
- }, [
2148
- be(e) && e.value >= Ae.value.min && e.value <= Ae.value.max && l.value.chart.grid.labels.yAxis.showCrosshairs ? (n(), r("line", {
2149
- key: 0,
2150
- x1: c.value.left + U.value,
2151
- x2: c.value.left + U.value - l.value.chart.grid.labels.yAxis.crosshairSize,
2152
- y1: v(Y)(e.y),
2153
- y2: v(Y)(e.y),
2154
- stroke: l.value.chart.grid.stroke,
2155
- "stroke-width": "1",
2156
- "stroke-linecap": "round",
2157
- style: { animation: "none !important" }
2158
- }, null, 8, pu)) : h("", !0),
2159
- e.value >= Ae.value.min && e.value <= Ae.value.max ? (n(), r("text", {
2160
- key: 1,
2161
- x: c.value.scaleLabelX - l.value.chart.grid.labels.yAxis.crosshairSize,
2162
- y: v(P)(e.y + y.value.dataLabels / 3),
2163
- "font-size": y.value.dataLabels,
2164
- "text-anchor": "end",
2165
- fill: l.value.chart.grid.labels.color
2166
- }, te(be(e.value) ? v(se)(
2167
- l.value.chart.grid.labels.yAxis.formatter,
2168
- e.value,
2169
- v(Fe)({
2170
- p: e.prefix,
2171
- v: e.value,
2172
- s: e.suffix,
2173
- r: l.value.chart.grid.labels.yAxis.rounding
2174
- })
2175
- ) : ""), 9, yu)) : h("", !0)
2176
- ]))), 128))
2177
- ], 512)) : h("", !0),
2178
- (n(!0), r(d, null, w(xe.value, (e, u) => (n(), r("g", {
2179
- key: `serie_plot_${e.id}`,
2180
- class: ll(`serie_plot_${u}`),
2181
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2182
- }, [
2183
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r("g", {
2184
- key: `circle_plot_${u}_${i}`
2185
- }, [
2186
- a && be(a.value) ? (n(), Te(Ql, {
2187
- key: 0,
2188
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
2189
- color: l.value.plot.useGradient ? `url(#plotGradient_${u}_${E.value})` : l.value.plot.dot.useSerieColor ? e.color : l.value.plot.dot.fill,
2190
- plot: { x: v(P)(a.x), y: v(P)(a.y) },
2191
- radius: _.value !== null && _.value === i || V.value !== null && V.value === i ? (Le.value.plot || 6) * 1.5 : Le.value.plot || 6,
2192
- stroke: l.value.plot.dot.useSerieColor ? l.value.chart.backgroundColor : e.color,
2193
- strokeWidth: l.value.plot.dot.strokeWidth,
2194
- transition: v(ie) || !l.value.plot.showTransition || _.value !== null && _.value === i || V.value !== null && V.value === i ? void 0 : `all ${l.value.plot.transitionDurationMs}ms ease-in-out`
2195
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : h("", !0),
2196
- a.comment && l.value.chart.comments.show ? (n(), r("foreignObject", {
2197
- key: 1,
2198
- style: { overflow: "visible" },
2199
- height: "12",
2200
- width: l.value.chart.comments.width,
2201
- x: a.x - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
2202
- y: a.y + l.value.chart.comments.offsetY + 6
2203
- }, [
2204
- p("div", _u, [
2205
- B(t.$slots, "plot-comment", {
2206
- plot: { ...a, color: e.color, seriesIndex: u, datapointIndex: i }
2207
- }, void 0, !0)
2208
- ])
2209
- ], 8, ku)) : h("", !0)
2210
- ]))), 128))
2211
- ], 6))), 128)),
2212
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r("g", {
2213
- key: `serie_line_${e.id}`,
2214
- class: ll(`serie_line_${u}`),
2215
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2216
- }, [
2217
- e.smooth && e.plots.length > 1 && e.curve ? (n(), r("path", {
2218
- key: 0,
2219
- d: `M${e.curve}`,
2220
- stroke: l.value.chart.backgroundColor,
2221
- "stroke-width": l.value.line.strokeWidth + 1,
2222
- "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2223
- fill: "none",
2224
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2225
- }, null, 12, wu)) : e.plots.length > 1 && e.straight ? (n(), r("path", {
2226
- key: 1,
2227
- d: `M${e.straight}`,
2228
- stroke: l.value.chart.backgroundColor,
2229
- "stroke-width": l.value.line.strokeWidth + 1,
2230
- "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2231
- fill: "none",
2232
- "stroke-linecap": "round",
2233
- "stroke-linejoin": "round",
2234
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2235
- }, null, 12, Su)) : h("", !0)
2236
- ], 6))), 128)),
2237
- t.$slots.pattern ? (n(), r("defs", $u, [
2238
- (n(!0), r(d, null, w(Be.value, (e, u) => B(t.$slots, "pattern", tl({
2239
- key: `serie_pattern_slot_${e.id}`
2240
- }, { ref_for: !0 }, { ...e, seriesIndex: e.slotAbsoluteIndex, patternId: `pattern_${E.value}_${u}` }), void 0, !0)), 128))
2241
- ])) : h("", !0),
2242
- va.value.length && !f.value.isStacked ? (n(), r("g", Lu, [
2243
- (n(!0), r(d, null, w(va.value, (e) => (n(), r("path", {
2244
- key: e.key,
2245
- d: e.d,
2246
- fill: e.color,
2247
- "fill-opacity": l.value.line.interLine.fillOpacity,
2248
- stroke: "none",
2249
- "pointer-events": "none",
2250
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2251
- }, null, 12, Mu))), 128))
2252
- ])) : h("", !0),
2253
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r("g", {
2254
- key: `serie_line_above_${e.id}`,
2255
- class: ll(`serie_line_${u}`),
2256
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2257
- }, [
2258
- e.useArea && e.plots.length > 1 ? (n(), r("g", Au, [
2259
- e.smooth ? (n(!0), r(d, { key: 0 }, w(e.curveAreas, (a, i) => (n(), r(d, { key: i }, [
2260
- a ? (n(), r("path", {
2261
- key: 0,
2262
- d: a,
2263
- fill: l.value.line.area.useGradient ? `url(#areaGradient_${u}_${E.value})` : v(ze)(e.color, l.value.line.area.opacity),
2264
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2265
- }, null, 12, Cu)) : h("", !0),
2266
- t.$slots.pattern && a ? (n(), r("path", {
2267
- key: 1,
2268
- d: a,
2269
- fill: `url(#pattern_${E.value}_${e.slotAbsoluteIndex})`,
2270
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2271
- }, null, 12, Tu)) : h("", !0)
2272
- ], 64))), 128)) : (n(!0), r(d, { key: 1 }, w(e.area.split(";"), (a, i) => (n(), r(d, { key: i }, [
2273
- a ? (n(), r("path", {
2274
- key: 0,
2275
- d: `M${a}Z`,
2276
- fill: l.value.line.area.useGradient ? `url(#areaGradient_${u}_${E.value})` : v(ze)(e.color, l.value.line.area.opacity),
2277
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2278
- }, null, 12, zu)) : h("", !0),
2279
- t.$slots.pattern && a ? (n(), r("path", {
2280
- key: 1,
2281
- d: `M${a}Z`,
2282
- fill: `url(#pattern_${E.value}_${e.slotAbsoluteIndex})`,
2283
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2284
- }, null, 12, Iu)) : h("", !0)
2285
- ], 64))), 128))
2286
- ])) : h("", !0),
2287
- e.smooth && e.plots.length > 1 && e.curve ? (n(), r("path", {
2288
- key: 1,
2289
- d: `M${e.curve}`,
2290
- stroke: e.color,
2291
- "stroke-width": l.value.line.strokeWidth,
2292
- "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2293
- fill: "none",
2294
- "stroke-linecap": "round",
2295
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2296
- }, null, 12, Ou)) : e.plots.length > 1 && e.straight ? (n(), r("path", {
2297
- key: 2,
2298
- d: `M${e.straight}`,
2299
- stroke: e.color,
2300
- "stroke-width": l.value.line.strokeWidth,
2301
- "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2302
- fill: "none",
2303
- "stroke-linecap": "round",
2304
- "stroke-linejoin": "round",
2305
- style: $({ transition: v(ie) || !l.value.line.showTransition ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out` })
2306
- }, null, 12, Nu)) : h("", !0),
2307
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2308
- key: `circle_line_${u}_${i}`
2309
- }, [
2310
- !ua.value.linePlot && a && be(a.value) || ua.value.linePlot && a && be(a.value) && (_.value !== null && _.value === i || V.value !== null && V.value === i) || ca(e.plots, i) ? (n(), Te(Ql, {
2311
- key: 0,
2312
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
2313
- color: l.value.line.useGradient ? `url(#lineGradient_${u}_${E.value})` : l.value.line.dot.useSerieColor ? e.color : l.value.line.dot.fill,
2314
- plot: { x: v(P)(a.x), y: v(P)(a.y) },
2315
- radius: _.value !== null && _.value === i || V.value !== null && V.value === i ? (Le.value.line || 6) * 1.5 : (ca(e.plots, i), Le.value.line || 6),
2316
- stroke: l.value.line.dot.useSerieColor ? l.value.chart.backgroundColor : e.color,
2317
- strokeWidth: l.value.line.dot.strokeWidth,
2318
- transition: v(ie) || !l.value.line.showTransition || _.value !== null && _.value === i || V.value !== null && V.value === i ? void 0 : `all ${l.value.line.transitionDurationMs}ms ease-in-out`
2319
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : h("", !0),
2320
- a.comment && l.value.chart.comments.show ? (n(), r("foreignObject", {
2321
- key: 1,
2322
- style: { overflow: "visible" },
2323
- height: "12",
2324
- width: l.value.chart.comments.width,
2325
- x: a.x - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
2326
- y: a.y + l.value.chart.comments.offsetY + 6
2327
- }, [
2328
- p("div", Pu, [
2329
- B(t.$slots, "plot-comment", {
2330
- plot: { ...a, color: e.color, seriesIndex: u, datapointIndex: i }
2331
- }, void 0, !0)
2332
- ])
2333
- ], 8, Vu)) : h("", !0)
2334
- ], 64))), 128))
2335
- ], 6))), 128)),
2336
- (l.value.bar.labels.show || l.value.bar.serieName.show) && f.value.dataLabels.show ? (n(), r("g", Fu, [
2337
- (n(!0), r(d, null, w(Ce.value, (e, u) => (n(), r(d, {
2338
- key: `xLabel_bar_${e.id}`
2339
- }, [
2340
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2341
- key: `xLabel_bar_${u}_${i}`
2342
- }, [
2343
- a && (!Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === i || V.value !== null && V.value === i) && l.value.bar.labels.show ? (n(), r("text", {
2344
- key: 0,
2345
- x: f.value.useIndividualScale && f.value.isStacked ? a.x + Z.value.line / 2 : Hl(a) + Ee() / 2 - Yl.value / 2,
2346
- y: v(P)(a.y) + (a.value >= 0 ? l.value.bar.labels.offsetY : -l.value.bar.labels.offsetY * 3),
2347
- "text-anchor": "middle",
2348
- "font-size": y.value.plotLabels,
2349
- fill: l.value.bar.labels.color,
2350
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2351
- }, te(be(a.value) ? v(se)(
2352
- l.value.bar.labels.formatter,
2353
- a.value,
2354
- v(Fe)({
2355
- p: e.prefix || l.value.chart.labels.prefix,
2356
- v: a.value,
2357
- s: e.suffix || l.value.chart.labels.suffix,
2358
- r: l.value.bar.labels.rounding
2359
- }),
2360
- {
2361
- datapoint: a,
2362
- serie: e
2363
- }
2364
- ) : ""), 13, Ru)) : h("", !0),
2365
- a && l.value.bar.serieName.show ? (n(), r("text", {
2366
- key: 1,
2367
- x: f.value.useIndividualScale && f.value.isStacked ? a.x + Z.value.line / 2 : a.x + Ee() * 1.1,
2368
- y: a.y + (a.value > 0 ? l.value.bar.serieName.offsetY : -l.value.bar.serieName.offsetY * 3),
2369
- "text-anchor": "middle",
2370
- "font-size": y.value.plotLabels,
2371
- fill: l.value.bar.serieName.useSerieColor ? e.color : l.value.bar.serieName.color,
2372
- "font-weight": l.value.bar.serieName.bold ? "bold" : "normal",
2373
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2374
- }, te(l.value.bar.serieName.useAbbreviation ? v(ss)({
2375
- source: e.name,
2376
- length: l.value.bar.serieName.abbreviationSize
2377
- }) : e.name), 13, Bu)) : h("", !0)
2378
- ], 64))), 128))
2379
- ], 64))), 128))
2380
- ])) : h("", !0),
2381
- l.value.plot.labels.show && f.value.dataLabels.show ? (n(), r("g", Hu, [
2382
- (n(!0), r(d, null, w(xe.value, (e, u) => (n(), r(d, {
2383
- key: `xLabel_plot_${e.id}`
2384
- }, [
2385
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2386
- key: `xLabel_plot_${u}_${i}`
2387
- }, [
2388
- a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === i || V.value !== null && V.value === i ? (n(), r("text", {
2389
- key: 0,
2390
- x: a.x,
2391
- y: a.y + l.value.plot.labels.offsetY,
2392
- "text-anchor": "middle",
2393
- "font-size": y.value.plotLabels,
2394
- fill: l.value.plot.labels.color,
2395
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2396
- }, te(be(a.value) ? v(se)(
2397
- l.value.plot.labels.formatter,
2398
- a.value,
2399
- v(Fe)({
2400
- p: e.prefix || l.value.chart.labels.prefix,
2401
- v: a.value,
2402
- s: e.suffix || l.value.chart.labels.suffix,
2403
- r: l.value.plot.labels.rounding
2404
- }),
2405
- {
2406
- datapoint: a,
2407
- serie: e
2408
- }
2409
- ) : ""), 13, Du)) : h("", !0)
2410
- ], 64))), 128))
2411
- ], 64))), 128))
2412
- ])) : (n(), r("g", Eu, [
2413
- (n(!0), r(d, null, w(xe.value, (e, u) => (n(), r(d, {
2414
- key: `xLabel_plot_${e.id}`
2415
- }, [
2416
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2417
- key: `xLabel_plot_${u}_${i}`
2418
- }, [
2419
- l.value.plot.tag.followValue ? (n(), r(d, { key: 1 }, [
2420
- [V.value, _.value, Ze.value].includes(i) && e.useTag ? (n(), r("line", {
2421
- key: 0,
2422
- class: "vue-ui-xy-tag-plot",
2423
- x1: c.value.left,
2424
- x2: c.value.right,
2425
- y1: a.y,
2426
- y2: a.y,
2427
- "stroke-width": 1,
2428
- "stroke-linecap": "round",
2429
- "stroke-dasharray": "2",
2430
- stroke: e.color
2431
- }, null, 8, Uu)) : h("", !0)
2432
- ], 64)) : (n(), r(d, { key: 0 }, [
2433
- a && i === 0 && e.useTag && e.useTag === "start" ? (n(), r("foreignObject", {
2434
- key: 0,
2435
- x: a.x,
2436
- y: a.y - 20,
2437
- height: 24,
2438
- width: "150",
2439
- style: $(`overflow: visible; opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2440
- }, [
2441
- p("div", {
2442
- style: $(`padding: 3px; background:${v(ze)(e.color, 80)};color:${v(Ge)(e.color)};width:fit-content;font-size:${y.value.plotLabels}px;border-radius: 2px;`),
2443
- innerHTML: v(se)(
2444
- l.value.plot.tag.formatter,
2445
- a.value,
2446
- e.name,
2447
- {
2448
- datapoint: a,
2449
- seriesIndex: i,
2450
- serieName: e.name
2451
- }
2452
- )
2453
- }, null, 12, Wu)
2454
- ], 12, Yu)) : h("", !0),
2455
- a && i === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (n(), r("foreignObject", {
2456
- key: 1,
2457
- x: a.x - e.name.length * (y.value.plotLabels / 2),
2458
- y: a.y - 20,
2459
- height: 24,
2460
- width: "150",
2461
- style: $(`overflow: visible; opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2462
- }, [
2463
- p("div", {
2464
- style: $(`padding: 3px; background:${v(ze)(e.color, 80)};color:${v(Ge)(e.color)};width:fit-content;font-size:${y.value.plotLabels}px;border-radius: 2px;`),
2465
- innerHTML: v(se)(
2466
- l.value.plot.tag.formatter,
2467
- a.value,
2468
- e.name,
2469
- {
2470
- datapoint: a,
2471
- seriesIndex: i,
2472
- serieName: e.name
2473
- }
2474
- )
2475
- }, null, 12, Gu)
2476
- ], 12, Xu)) : h("", !0)
2477
- ], 64))
2478
- ], 64))), 128))
2479
- ], 64))), 128))
2480
- ])),
2481
- l.value.line.labels.show && f.value.dataLabels.show ? (n(), r("g", qu, [
2482
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r(d, {
2483
- key: `xLabel_line_${e.id}`
2484
- }, [
2485
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2486
- key: `xLabel_line_${u}_${i}`
2487
- }, [
2488
- a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === i || V.value !== null && V.value === i ? (n(), r("text", {
2489
- key: 0,
2490
- x: a.x,
2491
- y: a.y + (a.value >= 0 ? l.value.line.labels.offsetY : -l.value.line.labels.offsetY * 3),
2492
- "text-anchor": "middle",
2493
- "font-size": y.value.plotLabels,
2494
- fill: l.value.line.labels.color,
2495
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2496
- }, te(be(a.value) ? v(se)(
2497
- l.value.line.labels.formatter,
2498
- a.value,
2499
- v(Fe)({
2500
- p: e.prefix || l.value.chart.labels.prefix,
2501
- v: a.value,
2502
- s: e.suffix || l.value.chart.labels.suffix,
2503
- r: l.value.line.labels.rounding
2504
- }),
2505
- {
2506
- datapoint: a,
2507
- serie: e
2508
- }
2509
- ) : ""), 13, Zu)) : h("", !0)
2510
- ], 64))), 128))
2511
- ], 64))), 128))
2512
- ])) : (n(), r("g", Ju, [
2513
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r(d, {
2514
- key: `xLabel_line_${e.id}`
2515
- }, [
2516
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2517
- key: `xLabel_line_${u}_${i}`
2518
- }, [
2519
- l.value.line.tag.followValue ? (n(), r(d, { key: 1 }, [
2520
- [V.value, _.value, Ze.value].includes(i) && e.useTag ? (n(), r("line", {
2521
- key: 0,
2522
- class: "vue-ui-xy-tag-line",
2523
- x1: c.value.left,
2524
- x2: c.value.right,
2525
- y1: a.y,
2526
- y2: a.y,
2527
- "stroke-width": 1,
2528
- "stroke-linecap": "round",
2529
- "stroke-dasharray": "2",
2530
- stroke: e.color
2531
- }, null, 8, li)) : h("", !0)
2532
- ], 64)) : (n(), r(d, { key: 0 }, [
2533
- a && i === 0 && e.useTag && e.useTag === "start" ? (n(), r("foreignObject", {
2534
- key: 0,
2535
- x: a.x,
2536
- y: a.y - 20,
2537
- height: 24,
2538
- width: "150",
2539
- style: $(`overflow: visible; opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2540
- }, [
2541
- p("div", {
2542
- style: $(`padding: 3px; background:${v(ze)(e.color, 80)};color:${v(Ge)(e.color)};width:fit-content;font-size:${y.value.plotLabels}px;border-radius: 2px;`),
2543
- innerHTML: v(se)(
2544
- l.value.line.tag.formatter,
2545
- a.value,
2546
- e.name,
2547
- {
2548
- datapoint: a,
2549
- seriesIndex: i,
2550
- serieName: e.name
2551
- }
2552
- )
2553
- }, null, 12, Qu)
2554
- ], 12, Ku)) : h("", !0),
2555
- a && i === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (n(), r("foreignObject", {
2556
- key: 1,
2557
- x: a.x,
2558
- y: a.y - 20,
2559
- height: 24,
2560
- width: "150",
2561
- style: $(`overflow: visible; opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2562
- }, [
2563
- p("div", {
2564
- style: $(`padding: 3px; background:${v(ze)(e.color, 80)};color:${v(Ge)(e.color)};width:fit-content;font-size:${y.value.plotLabels}px;border-radius: 2px;`),
2565
- innerHTML: v(se)(
2566
- l.value.line.tag.formatter,
2567
- a.value,
2568
- e.name,
2569
- {
2570
- datapoint: a,
2571
- seriesIndex: i,
2572
- serieName: e.name
2573
- }
2574
- )
2575
- }, null, 12, ei)
2576
- ], 12, ju)) : h("", !0)
2577
- ], 64))
2578
- ], 64))), 128))
2579
- ], 64))), 128))
2580
- ])),
2581
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r(d, {
2582
- key: `xLabel_line_${e.id}`
2583
- }, [
2584
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2585
- key: `xLabel_line_${u}_${i}`
2586
- }, [
2587
- a && i === 0 && e.showSerieName && e.showSerieName === "start" ? (n(), r("text", {
2588
- key: 0,
2589
- x: a.x - y.value.plotLabels,
2590
- y: a.y,
2591
- "font-size": y.value.plotLabels,
2592
- "text-anchor": "end",
2593
- fill: e.color,
2594
- innerHTML: v(Jl)({
2595
- content: e.name,
2596
- fontSize: y.value.plotLabels,
2597
- fill: e.color,
2598
- x: a.x - y.value.plotLabels,
2599
- y: a.y,
2600
- maxWords: 2
2601
- }),
2602
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2603
- }, null, 12, ti)) : h("", !0),
2604
- a && i === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (n(), r("text", {
2605
- key: 1,
2606
- x: a.x + y.value.plotLabels,
2607
- y: a.y,
2608
- "font-size": y.value.plotLabels,
2609
- "text-anchor": "start",
2610
- fill: e.color,
2611
- innerHTML: v(Jl)({
2612
- content: e.name,
2613
- fontSize: y.value.plotLabels,
2614
- fill: e.color,
2615
- x: a.x + y.value.plotLabels,
2616
- y: a.y,
2617
- maxWords: 2
2618
- }),
2619
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2620
- }, null, 12, ai)) : h("", !0)
2621
- ], 64))), 128))
2622
- ], 64))), 128)),
2623
- (n(!0), r(d, null, w(xe.value, (e, u) => (n(), r(d, {
2624
- key: `xLabel_plot_${e.id}`
2625
- }, [
2626
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2627
- key: `xLabel_plot_${u}_${i}`
2628
- }, [
2629
- a && i === 0 && e.showSerieName && e.showSerieName === "start" ? (n(), r("text", {
2630
- key: 0,
2631
- x: a.x - y.value.plotLabels,
2632
- y: a.y,
2633
- "font-size": y.value.plotLabels,
2634
- "text-anchor": "end",
2635
- fill: e.color,
2636
- innerHTML: v(Jl)({
2637
- content: e.name,
2638
- fontSize: y.value.plotLabels,
2639
- fill: e.color,
2640
- x: a.x - y.value.plotLabels,
2641
- y: a.y,
2642
- maxWords: 2
2643
- }),
2644
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2645
- }, null, 12, oi)) : h("", !0),
2646
- a && i === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (n(), r("text", {
2647
- key: 1,
2648
- x: a.x + y.value.plotLabels,
2649
- y: a.y,
2650
- "font-size": y.value.plotLabels,
2651
- "text-anchor": "start",
2652
- fill: e.color,
2653
- innerHTML: v(Jl)({
2654
- content: e.name,
2655
- fontSize: y.value.plotLabels,
2656
- fill: e.color,
2657
- x: a.x + y.value.plotLabels,
2658
- y: a.y,
2659
- maxWords: 2
2660
- }),
2661
- style: $(`opacity:${I.value ? I.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2662
- }, null, 12, si)) : h("", !0)
2663
- ], 64))), 128))
2664
- ], 64))), 128)),
2665
- (n(!0), r(d, null, w([...xe.value, ...ae.value, ...Ce.value], (e, u) => (n(), r(d, {
2666
- key: `progression-${u}`
2667
- }, [
2668
- Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v($e)(e.plots).trend) ? (n(), r("g", ui, [
2669
- p("defs", null, [
2670
- p("marker", {
2671
- id: `progression_arrow_${u}`,
2672
- markerWidth: "9",
2673
- markerHeight: "9",
2674
- viewBox: "-1 -1 9 9",
2675
- markerUnits: "userSpaceOnUse",
2676
- refX: "7",
2677
- refY: 7 / 2,
2678
- orient: "auto",
2679
- overflow: "visible"
2680
- }, [
2681
- p("polygon", {
2682
- points: "0,0 7,3.5 0,7",
2683
- fill: e.color,
2684
- stroke: l.value.chart.backgroundColor,
2685
- "stroke-width": "1",
2686
- "stroke-linejoin": "round"
2687
- }, null, 8, ni)
2688
- ], 8, ii)
2689
- ]),
2690
- e.plots.length > 1 ? (n(), r("line", {
2691
- key: 0,
2692
- x1: v($e)(e.plots).x1 + (e.type === "bar" ? Ee() : 0),
2693
- x2: v($e)(e.plots).x2 + (e.type === "bar" ? Ee() : 0),
2694
- y1: v(Y)(v($e)(e.plots).y1),
2695
- y2: v(Y)(v($e)(e.plots).y2),
2696
- "stroke-width": 1,
2697
- stroke: l.value.chart.backgroundColor,
2698
- "stroke-dasharray": 2,
2699
- "stroke-linecap": "round",
2700
- "stroke-linejoin": "round",
2701
- "marker-end": `url(#progression_arrow_${u})`
2702
- }, null, 8, ri)) : h("", !0),
2703
- e.plots.length > 1 ? (n(), r("line", {
2704
- key: 1,
2705
- x1: v($e)(e.plots).x1 + (e.type === "bar" ? Ee() : 0),
2706
- x2: v($e)(e.plots).x2 + (e.type === "bar" ? Ee() : 0),
2707
- y1: v(Y)(v($e)(e.plots).y1),
2708
- y2: v(Y)(v($e)(e.plots).y2),
2709
- "stroke-width": 1,
2710
- stroke: e.color,
2711
- "stroke-dasharray": 2,
2712
- "stroke-linecap": "round",
2713
- "stroke-linejoin": "round",
2714
- "marker-end": `url(#progression_arrow_${u})`
2715
- }, null, 8, ci)) : h("", !0),
2716
- e.plots.length > 1 ? (n(), r("text", {
2717
- key: 2,
2718
- "text-anchor": "middle",
2719
- x: v($e)(e.plots).x2 + (e.type === "bar" ? Ee() : 0),
2720
- y: v($e)(e.plots).y2 - 12,
2721
- "font-size": y.value.plotLabels,
2722
- fill: e.color,
2723
- stroke: l.value.chart.backgroundColor,
2724
- "stroke-width": 4,
2725
- "stroke-linecap": "round",
2726
- "stroke-linejoin": "round",
2727
- "paint-order": "stroke fill"
2728
- }, te(v(Fe)({
2729
- v: v($e)(e.plots).trend * 100,
2730
- s: "%",
2731
- r: 2
2732
- })), 9, vi)) : h("", !0)
2733
- ])) : h("", !0)
2734
- ], 64))), 128)),
2735
- f.value.useIndividualScale && !f.value.isStacked ? (n(), r(d, { key: 13 }, [
2736
- p("defs", null, [
2737
- (n(!0), r(d, null, w(Sl.value, (e, u) => (n(), r("linearGradient", {
2738
- id: `individual_scale_gradient_${E.value}_${u}`,
2739
- x1: "0%",
2740
- x2: "100%",
2741
- y1: "0%",
2742
- y2: "0%"
2743
- }, [
2744
- p("stop", {
2745
- offset: "0%",
2746
- "stop-color": l.value.chart.backgroundColor,
2747
- "stop-opacity": "0"
2748
- }, null, 8, hi),
2749
- p("stop", {
2750
- offset: "100%",
2751
- "stop-color": e.color,
2752
- "stop-opacity": "0.2"
2753
- }, null, 8, fi)
2754
- ], 8, di))), 256))
2755
- ]),
2756
- (n(!0), r(d, null, w(Sl.value, (e, u) => (n(), r("rect", {
2757
- x: e.x - l.value.chart.grid.labels.yAxis.labelWidth + U.value - c.value.individualOffsetX,
2758
- y: c.value.top,
2759
- width: l.value.chart.grid.labels.yAxis.labelWidth + c.value.individualOffsetX,
2760
- height: c.value.height < 0 ? 10 : c.value.height,
2761
- fill: I.value === e.groupId ? `url(#individual_scale_gradient_${E.value}_${u})` : "transparent",
2762
- onMouseenter: (a) => I.value = e.groupId,
2763
- onMouseleave: s[0] || (s[0] = (a) => I.value = null)
2764
- }, null, 40, gi))), 256))
2765
- ], 64)) : h("", !0),
2766
- p("g", null, [
2767
- l.value.chart.grid.labels.axis.yLabel && !f.value.useIndividualScale ? (n(), r("text", {
2768
- key: 0,
2769
- ref_key: "yAxisLabel",
2770
- ref: tt,
2771
- "font-size": y.value.yAxis,
2772
- fill: l.value.chart.grid.labels.color,
2773
- transform: `translate(${l.value.chart.grid.labels.axis.fontSize}, ${c.value.top + c.value.height / 2}) rotate(-90)`,
2774
- "text-anchor": "middle",
2775
- style: { transition: "none" }
2776
- }, te(l.value.chart.grid.labels.axis.yLabel), 9, mi)) : h("", !0),
2777
- l.value.chart.grid.labels.axis.xLabel ? (n(), r("text", {
2778
- key: 1,
2779
- ref_key: "xAxisLabel",
2780
- ref: lt,
2781
- "text-anchor": "middle",
2782
- x: ee.value / 2,
2783
- y: ve.value - 3,
2784
- "font-size": y.value.yAxis,
2785
- fill: l.value.chart.grid.labels.color
2786
- }, te(l.value.chart.grid.labels.axis.xLabel), 9, bi)) : h("", !0)
2787
- ]),
2788
- l.value.chart.grid.labels.xAxisLabels.show ? (n(), r("g", {
2789
- key: 14,
2790
- ref_key: "timeLabelsEls",
2791
- ref: ul
2792
- }, [
2793
- t.$slots["time-label"] ? (n(!0), r(d, { key: 0 }, w(mt.value, (e, u) => B(t.$slots, "time-label", tl({
2794
- key: `time_label_${e.id}`,
2795
- ref_for: !0
2796
- }, {
2797
- x: c.value.left + c.value.width / L.value * u + c.value.width / L.value / 2,
2798
- y: c.value.bottom,
2799
- fontSize: y.value.xAxis,
2800
- fill: l.value.chart.grid.labels.xAxisLabels.color,
2801
- transform: `translate(${c.value.left + c.value.width / L.value * u + c.value.width / L.value / 2}, ${c.value.bottom + y.value.xAxis * 1.3 + l.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${l.value.chart.grid.labels.xAxisLabels.rotation})`,
2802
- absoluteIndex: e.absoluteIndex,
2803
- content: e.text,
2804
- textAnchor: l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2805
- show: e && e.text
2806
- }), void 0, !0)), 128)) : (n(!0), r(d, { key: 1 }, w(mt.value, (e, u) => (n(), r("g", {
2807
- key: `time_label_${u}`
2808
- }, [
2809
- e && e.text ? (n(), r(d, { key: 0 }, [
2810
- String(e.text).includes(`
2811
- `) ? (n(), r("text", {
2812
- key: 1,
2813
- class: "vue-data-ui-time-label",
2814
- "text-anchor": l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2815
- "font-size": y.value.xAxis,
2816
- fill: l.value.chart.grid.labels.xAxisLabels.color,
2817
- transform: `translate(${c.value.left + c.value.width / L.value * u + c.value.width / L.value / 2}, ${c.value.bottom + y.value.xAxis * 1.5}), rotate(${l.value.chart.grid.labels.xAxisLabels.rotation})`,
2818
- style: $({
2819
- cursor: Yt() ? "pointer" : "default"
2820
- }),
2821
- innerHTML: v(us)({
2822
- content: String(e.text),
2823
- fontSize: y.value.xAxis,
2824
- fill: l.value.chart.grid.labels.xAxisLabels.color,
2825
- x: 0,
2826
- y: 0
2827
- }),
2828
- onClick: () => Ut(e, u)
2829
- }, null, 12, pi)) : (n(), r("text", {
2830
- key: 0,
2831
- class: "vue-data-ui-time-label",
2832
- "text-anchor": l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2833
- "font-size": y.value.xAxis,
2834
- fill: l.value.chart.grid.labels.xAxisLabels.color,
2835
- transform: `translate(${c.value.left + c.value.width / L.value * u + c.value.width / L.value / 2}, ${c.value.bottom + y.value.xAxis * 1.5}), rotate(${l.value.chart.grid.labels.xAxisLabels.rotation})`,
2836
- style: $({
2837
- cursor: Yt() ? "pointer" : "default"
2838
- }),
2839
- onClick: () => Ut(e, u)
2840
- }, te(e.text || ""), 13, xi))
2841
- ], 64)) : h("", !0)
2842
- ]))), 128))
2843
- ], 512)) : h("", !0),
2844
- ra.value.length && !f.value.isStacked ? (n(), r("g", yi, [
2845
- (n(!0), r(d, null, w(ra.value, (e) => (n(), r("g", {
2846
- key: e.uid
2847
- }, [
2848
- e.yTop && e.show && isFinite(e.yTop) ? (n(), r("line", {
2849
- key: 0,
2850
- x1: e.x1,
2851
- y1: e.yTop,
2852
- x2: e.x2,
2853
- y2: e.yTop,
2854
- stroke: e.config.line.stroke,
2855
- "stroke-width": e.config.line.strokeWidth,
2856
- "stroke-dasharray": e.config.line.strokeDasharray,
2857
- "stroke-linecap": "round",
2858
- style: { animation: "none !important" }
2859
- }, null, 8, ki)) : h("", !0),
2860
- e.yBottom && e.show && isFinite(e.yBottom) ? (n(), r("line", {
2861
- key: 1,
2862
- x1: e.x1,
2863
- y1: e.yBottom,
2864
- x2: e.x2,
2865
- y2: e.yBottom,
2866
- stroke: e.config.line.stroke,
2867
- "stroke-width": e.config.line.strokeWidth,
2868
- "stroke-dasharray": e.config.line.strokeDasharray,
2869
- "stroke-linecap": "round",
2870
- style: { animation: "none !important" }
2871
- }, null, 8, _i)) : h("", !0),
2872
- e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (n(), r("rect", {
2873
- key: 2,
2874
- y: Math.min(e.yTop, e.yBottom),
2875
- x: e.x1,
2876
- width: c.value.width,
2877
- height: v(P)(e.areaHeight, 0),
2878
- fill: v(ze)(e.config.area.fill, e.config.area.opacity),
2879
- style: { animation: "none !important" }
2880
- }, null, 8, wi)) : h("", !0),
2881
- e.config.label.text && e.show && isFinite(e._box.y) ? (n(), r("rect", tl({
2882
- key: 3,
2883
- class: "vue-ui-xy-annotation-label-box"
2884
- }, { ref_for: !0 }, e._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : h("", !0),
2885
- e.config.label.text && e.show && isFinite(e._text.y) ? (n(), r("text", {
2886
- key: 4,
2887
- id: e.id,
2888
- class: "vue-ui-xy-annotation-label",
2889
- x: e._text.x,
2890
- y: e._text.y,
2891
- "font-size": e.config.label.fontSize,
2892
- fill: e.config.label.color,
2893
- "text-anchor": e.config.label.textAnchor
2894
- }, te(e.config.label.text), 9, Si)) : h("", !0)
2895
- ]))), 128))
2896
- ])) : h("", !0),
2897
- l.value.chart.timeTag.show && (![null, void 0].includes(_.value) || ![null, void 0].includes(V.value)) ? (n(), r("g", $i, [
2898
- (n(), r("foreignObject", {
2899
- x: Po(),
2900
- y: c.value.bottom,
2901
- width: "200",
2902
- height: "40",
2903
- style: { overflow: "visible !important" }
2904
- }, [
2905
- p("div", {
2906
- ref_key: "timeTagEl",
2907
- ref: _a,
2908
- class: "vue-ui-xy-time-tag",
2909
- style: $(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${l.value.chart.timeTag.backgroundColor};color:${l.value.chart.timeTag.color};font-size:${l.value.chart.timeTag.fontSize}px`),
2910
- innerHTML: Fo.value
2911
- }, null, 12, Mi)
2912
- ], 8, Li)),
2913
- p("circle", {
2914
- cx: c.value.left + c.value.width / L.value * ((_.value !== null ? _.value : 0) || (V.value !== null ? V.value : 0)) + c.value.width / L.value / 2,
2915
- cy: c.value.bottom,
2916
- r: l.value.chart.timeTag.circleMarker.radius,
2917
- fill: l.value.chart.timeTag.circleMarker.color
2918
- }, null, 8, Ai)
2919
- ])) : h("", !0)
2920
- ])) : h("", !0),
2921
- Ft.value ? (n(), r("rect", tl({ key: 2 }, so.value, {
2922
- "data-start": m.value.start,
2923
- "data-end": m.value.end
2924
- }), null, 16, Ci)) : h("", !0),
2925
- B(t.$slots, "svg", {
2926
- svg: {
2927
- ...to.value,
2928
- data: [...ae.value, ...Ce.value, ...xe.value],
2929
- drawingArea: c.value
2930
- }
2931
- }, void 0, !0)
2932
- ], 512)
2933
- ], 46, Ms)),
2934
- t.$slots.watermark ? (n(), r("div", Ti, [
2935
- B(t.$slots, "watermark", ke(_e({ isPrinting: v(dt) || v(Bt) })), void 0, !0)
2936
- ])) : h("", !0),
2937
- (n(!0), r(d, null, w(ae.value, (e, u) => (n(), r(d, {
2938
- key: `tag_line_${e.id}`
2939
- }, [
2940
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
2941
- key: `tag_line_${u}_${i}`
2942
- }, [
2943
- [V.value, _.value, Ze.value].includes(i) && e.useTag && e.useTag === "end" && l.value.line.tag.followValue ? (n(), r("div", {
2944
- key: 0,
2945
- ref_for: !0,
2946
- ref: (o) => Fl(u, i, o, "right", "line"),
2947
- class: "vue-ui-xy-tag",
2948
- "data-tag": "right",
2949
- style: $({
2950
- position: "fixed",
2951
- top: v(Ue)({
2952
- svgElement: ue.value,
2953
- x: c.value.right + l.value.line.tag.fontSize / 1.5,
2954
- y: a.y,
2955
- element: Re.value[`${u}_${i}_right_line`],
2956
- position: "right"
2957
- }).top + "px",
2958
- left: v(Ue)({
2959
- svgElement: ue.value,
2960
- x: c.value.right + l.value.line.tag.fontSize / 1.5,
2961
- y: a.y,
2962
- element: Re.value[`${u}_${i}_right_line`],
2963
- position: "right"
2964
- }).left + "px",
2965
- height: "fit-content",
2966
- width: "fit-content",
2967
- background: e.color,
2968
- color: v(Ge)(e.color),
2969
- padding: "0 6px",
2970
- fontSize: l.value.line.tag.fontSize + "px",
2971
- opacity: 1
2972
- })
2973
- }, [
2974
- (n(), r("svg", zi, [
2975
- p("path", {
2976
- d: "M 0,10 10,0 10,20 Z",
2977
- fill: e.color,
2978
- stroke: "none"
2979
- }, null, 8, Ii)
2980
- ])),
2981
- p("div", {
2982
- class: "vue-ui-xy-tag-content",
2983
- innerHTML: v(se)(
2984
- l.value.line.tag.formatter,
2985
- a.value,
2986
- e.name,
2987
- {
2988
- datapoint: a,
2989
- seriesIndex: i,
2990
- serieName: e.name
2991
- }
2992
- )
2993
- }, null, 8, Oi)
2994
- ], 4)) : h("", !0),
2995
- [V.value, _.value, Ze.value].includes(i) && e.useTag && e.useTag === "start" && l.value.line.tag.followValue ? (n(), r("div", {
2996
- key: 1,
2997
- ref_for: !0,
2998
- ref: (o) => Fl(u, i, o, "left", "line"),
2999
- class: "vue-ui-xy-tag",
3000
- "data-tag": "left",
3001
- style: $({
3002
- position: "fixed",
3003
- top: v(Ue)({
3004
- svgElement: ue.value,
3005
- x: c.value.left - l.value.line.tag.fontSize / 1.5,
3006
- y: a.y,
3007
- element: Re.value[`${u}_${i}_left_line`],
3008
- position: "left"
3009
- }).top + "px",
3010
- left: v(Ue)({
3011
- svgElement: ue.value,
3012
- x: c.value.left - l.value.line.tag.fontSize / 1.5,
3013
- y: a.y,
3014
- element: Re.value[`${u}_${i}_left_line`],
3015
- position: "left"
3016
- }).left + "px",
3017
- height: "fit-content",
3018
- width: "fit-content",
3019
- background: e.color,
3020
- color: v(Ge)(e.color),
3021
- padding: "0 6px",
3022
- fontSize: l.value.line.tag.fontSize + "px",
3023
- opacity: 1
3024
- })
3025
- }, [
3026
- (n(), r("svg", Ni, [
3027
- p("path", {
3028
- d: "M 0,0 10,10 0,20 Z",
3029
- fill: e.color,
3030
- stroke: "none"
3031
- }, null, 8, Vi)
3032
- ])),
3033
- p("div", {
3034
- class: "vue-ui-xy-tag-content",
3035
- innerHTML: v(se)(
3036
- l.value.line.tag.formatter,
3037
- a.value,
3038
- e.name,
3039
- {
3040
- datapoint: a,
3041
- seriesIndex: i,
3042
- serieName: e.name
3043
- }
3044
- )
3045
- }, null, 8, Pi)
3046
- ], 4)) : h("", !0)
3047
- ], 64))), 128))
3048
- ], 64))), 128)),
3049
- (n(!0), r(d, null, w(xe.value, (e, u) => (n(), r(d, {
3050
- key: `tag_plot_${e.id}`
3051
- }, [
3052
- (n(!0), r(d, null, w(e.plots, (a, i) => (n(), r(d, {
3053
- key: `tag_plot_${u}_${i}`
3054
- }, [
3055
- [V.value, _.value, Ze.value].includes(i) && e.useTag && e.useTag === "end" && l.value.plot.tag.followValue ? (n(), r("div", {
3056
- key: 0,
3057
- ref_for: !0,
3058
- ref: (o) => Fl(u, i, o, "right", "plot"),
3059
- class: "vue-ui-xy-tag",
3060
- "data-tag": "right",
3061
- style: $({
3062
- position: "fixed",
3063
- top: v(Ue)({
3064
- svgElement: ue.value,
3065
- x: c.value.right + l.value.plot.tag.fontSize / 1.5,
3066
- y: a.y,
3067
- element: Re.value[`${u}_${i}_right_plot`],
3068
- position: "right"
3069
- }).top + "px",
3070
- left: v(Ue)({
3071
- svgElement: ue.value,
3072
- x: c.value.right + l.value.plot.tag.fontSize / 1.5,
3073
- y: a.y,
3074
- element: Re.value[`${u}_${i}_right_plot`],
3075
- position: "right"
3076
- }).left + "px",
3077
- height: "fit-content",
3078
- width: "fit-content",
3079
- background: e.color,
3080
- color: v(Ge)(e.color),
3081
- padding: "0 6px",
3082
- fontSize: l.value.plot.tag.fontSize + "px",
3083
- opacity: 1
3084
- })
3085
- }, [
3086
- (n(), r("svg", Fi, [
3087
- p("path", {
3088
- d: "M 0,10 10,0 10,20 Z",
3089
- fill: e.color,
3090
- stroke: "none"
3091
- }, null, 8, Ri)
3092
- ])),
3093
- p("div", {
3094
- class: "vue-ui-xy-tag-content",
3095
- innerHTML: v(se)(
3096
- l.value.plot.tag.formatter,
3097
- a.value,
3098
- e.name,
3099
- {
3100
- datapoint: a,
3101
- seriesIndex: i,
3102
- serieName: e.name
3103
- }
3104
- )
3105
- }, null, 8, Bi)
3106
- ], 4)) : h("", !0),
3107
- [V.value, _.value, Ze.value].includes(i) && e.useTag && e.useTag === "start" && l.value.plot.tag.followValue ? (n(), r("div", {
3108
- key: 1,
3109
- ref_for: !0,
3110
- ref: (o) => Fl(u, i, o, "left", "plot"),
3111
- class: "vue-ui-xy-tag",
3112
- "data-tag": "left",
3113
- style: $({
3114
- position: "fixed",
3115
- top: v(Ue)({
3116
- svgElement: ue.value,
3117
- x: c.value.left - l.value.plot.tag.fontSize / 1.5,
3118
- y: a.y,
3119
- element: Re.value[`${u}_${i}_left_plot`],
3120
- position: "left"
3121
- }).top + "px",
3122
- left: v(Ue)({
3123
- svgElement: ue.value,
3124
- x: c.value.left - l.value.plot.tag.fontSize / 1.5,
3125
- y: a.y,
3126
- element: Re.value[`${u}_${i}_left_plot`],
3127
- position: "left"
3128
- }).left + "px",
3129
- height: "fit-content",
3130
- width: "fit-content",
3131
- background: e.color,
3132
- color: v(Ge)(e.color),
3133
- padding: "0 6px",
3134
- fontSize: l.value.plot.tag.fontSize + "px",
3135
- opacity: 1
3136
- })
3137
- }, [
3138
- (n(), r("svg", Hi, [
3139
- p("path", {
3140
- d: "M 0,0 10,10 0,20 Z",
3141
- fill: e.color,
3142
- stroke: "none"
3143
- }, null, 8, Di)
3144
- ])),
3145
- p("div", {
3146
- class: "vue-ui-xy-tag-content",
3147
- innerHTML: v(se)(
3148
- l.value.plot.tag.formatter,
3149
- a.value,
3150
- e.name,
3151
- {
3152
- datapoint: a,
3153
- seriesIndex: i,
3154
- serieName: e.name
3155
- }
3156
- )
3157
- }, null, 8, Ei)
3158
- ], 4)) : h("", !0)
3159
- ], 64))), 128))
3160
- ], 64))), 128)),
3161
- l.value.chart.zoom.show && Ne.value > 6 && ct.value && Jt.value ? (n(), Te(_s, {
3162
- key: 5,
3163
- ref_key: "chartSlicer",
3164
- ref: Oe,
3165
- allMinimaps: Io.value,
3166
- background: l.value.chart.zoom.color,
3167
- borderColor: l.value.chart.backgroundColor,
3168
- customFormat: l.value.chart.zoom.customFormat,
3169
- cutNullValues: l.value.line.cutNullValues,
3170
- enableRangeHandles: l.value.chart.zoom.enableRangeHandles,
3171
- enableSelectionDrag: l.value.chart.zoom.enableSelectionDrag,
3172
- end: m.value.end,
3173
- focusOnDrag: l.value.chart.zoom.focusOnDrag,
3174
- focusRangeRatio: l.value.chart.zoom.focusRangeRatio,
3175
- fontSize: l.value.chart.zoom.fontSize,
3176
- useResetSlot: l.value.chart.zoom.useResetSlot,
3177
- immediate: !l.value.chart.zoom.preview.enable,
3178
- inputColor: l.value.chart.zoom.color,
3179
- isPreview: Ft.value,
3180
- labelLeft: de.value[0] ? de.value[0].text : "",
3181
- labelRight: de.value.at(-1) ? de.value.at(-1).text : "",
3182
- max: Ne.value,
3183
- min: 0,
3184
- minimap: zo.value,
3185
- minimapCompact: l.value.chart.zoom.minimap.compact,
3186
- minimapFrameColor: l.value.chart.zoom.minimap.frameColor,
3187
- minimapIndicatorColor: l.value.chart.zoom.minimap.indicatorColor,
3188
- minimapLineColor: l.value.chart.zoom.minimap.lineColor,
3189
- minimapMerged: l.value.chart.zoom.minimap.merged,
3190
- minimapSelectedColor: l.value.chart.zoom.minimap.selectedColor,
3191
- minimapSelectedColorOpacity: l.value.chart.zoom.minimap.selectedColorOpacity,
3192
- minimapSelectedIndex: _.value,
3193
- minimapSelectionRadius: l.value.chart.zoom.minimap.selectionRadius,
3194
- preciseLabels: ha.value.length ? ha.value : gt.value,
3195
- refreshEndPoint: l.value.chart.zoom.endIndex !== null ? l.value.chart.zoom.endIndex + 1 : Math.max(...jl.dataset.map((e) => De(e.series).length)),
3196
- refreshStartPoint: l.value.chart.zoom.startIndex !== null ? l.value.chart.zoom.startIndex : 0,
3197
- selectColor: l.value.chart.zoom.highlightColor,
3198
- selectedSeries: je.value,
3199
- smoothMinimap: l.value.chart.zoom.minimap.smooth,
3200
- start: m.value.start,
3201
- textColor: l.value.chart.color,
3202
- timeLabels: gt.value,
3203
- usePreciseLabels: l.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !l.value.chart.zoom.useDefaultFormat,
3204
- valueEnd: m.value.end,
3205
- valueStart: m.value.start,
3206
- verticalHandles: l.value.chart.zoom.minimap.verticalHandles,
3207
- onFutureEnd: s[1] || (s[1] = (e) => Rt("end", e)),
3208
- onFutureStart: s[2] || (s[2] = (e) => Rt("start", e)),
3209
- onReset: po,
3210
- onTrapMouse: go,
3211
- "onUpdate:end": xo,
3212
- "onUpdate:start": bo
3213
- }, {
3214
- "reset-action": G(({ reset: e }) => [
3215
- B(t.$slots, "reset-action", ke(_e({ reset: e })), void 0, !0)
3216
- ]),
3217
- _: 3
3218
- }, 8, ["allMinimaps", "background", "borderColor", "customFormat", "cutNullValues", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "useResetSlot", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapLineColor", "minimapMerged", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapSelectionRadius", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "smoothMinimap", "start", "textColor", "timeLabels", "usePreciseLabels", "valueEnd", "valueStart", "verticalHandles"])) : h("", !0),
3219
- p("div", {
3220
- id: `legend-bottom-${E.value}`
3221
- }, null, 8, Yi),
3222
- Ot.value ? (n(), Te(qo, {
3223
- key: 6,
3224
- to: l.value.chart.legend.position === "top" ? `#legend-top-${E.value}` : `#legend-bottom-${E.value}`
3225
- }, [
3226
- l.value.chart.legend.show ? (n(), r("div", {
3227
- key: 0,
3228
- ref_key: "chartLegend",
3229
- ref: sl,
3230
- class: "vue-ui-xy-legend",
3231
- style: $({
3232
- fontSize: `var(--legend-font-size, ${l.value.chart.legend.fontSize ?? 14}px)`
3233
- })
3234
- }, [
3235
- (n(!0), r(d, null, w(me.value, (e, u) => (n(), r("div", {
3236
- key: `div_legend_item_${u}`,
3237
- onClick: (a) => El(e),
3238
- class: ll({ "vue-ui-xy-legend-item-alone": me.value.length === 1, "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": J.value.includes(e.id) })
3239
- }, [
3240
- bl.value[e.type] === "line" ? (n(), r("svg", Xi, [
3241
- p("rect", {
3242
- x: "0",
3243
- y: "7.5",
3244
- rx: "1.5",
3245
- stroke: l.value.chart.backgroundColor,
3246
- "stroke-width": 0.5,
3247
- height: "3",
3248
- width: "20",
3249
- fill: e.color
3250
- }, null, 8, Gi),
3251
- vl(Ql, {
3252
- plot: { x: 10, y: 9 },
3253
- radius: 4,
3254
- color: e.color,
3255
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
3256
- stroke: l.value.chart.backgroundColor,
3257
- strokeWidth: 0.5
3258
- }, null, 8, ["color", "shape", "stroke"])
3259
- ])) : bl.value[e.type] === "bar" ? (n(), r("svg", Ui, [
3260
- bl.value[e.type] === "bar" && t.$slots.pattern ? (n(), r("rect", {
3261
- key: 0,
3262
- x: "4",
3263
- y: "4",
3264
- rx: "1",
3265
- height: "32",
3266
- width: "32",
3267
- stroke: "none",
3268
- fill: e.color
3269
- }, null, 8, qi)) : h("", !0),
3270
- bl.value[e.type] === "bar" ? (n(), r("rect", {
3271
- key: 1,
3272
- x: "4",
3273
- y: "4",
3274
- rx: "1",
3275
- height: "32",
3276
- width: "32",
3277
- stroke: "none",
3278
- fill: t.$slots.pattern ? `url(#pattern_${E.value}_${e.slotAbsoluteIndex})` : e.color
3279
- }, null, 8, Zi)) : h("", !0)
3280
- ])) : (n(), r("svg", Ji, [
3281
- vl(Ql, {
3282
- plot: { x: 6, y: 6 },
3283
- radius: 5,
3284
- color: e.color,
3285
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle"
3286
- }, null, 8, ["color", "shape"])
3287
- ])),
3288
- p("span", {
3289
- style: $(`color:${l.value.chart.legend.color}`)
3290
- }, te(e.name), 5)
3291
- ], 10, Wi))), 128))
3292
- ], 4)) : (n(), r("div", {
3293
- key: 1,
3294
- ref_key: "chartLegend",
3295
- ref: sl
3296
- }, [
3297
- B(t.$slots, "legend", { legend: me.value }, void 0, !0)
3298
- ], 512))
3299
- ], 8, ["to"])) : h("", !0),
3300
- t.$slots.source ? (n(), r("div", {
3301
- key: 7,
3302
- ref_key: "source",
3303
- ref: gl,
3304
- dir: "auto"
3305
- }, [
3306
- B(t.$slots, "source", {}, void 0, !0)
3307
- ], 512)) : h("", !0),
3308
- vl(v(Ga), {
3309
- show: f.value.showTooltip && At.value,
3310
- backgroundColor: l.value.chart.tooltip.backgroundColor,
3311
- color: l.value.chart.tooltip.color,
3312
- fontSize: l.value.chart.tooltip.fontSize,
3313
- borderRadius: l.value.chart.tooltip.borderRadius,
3314
- borderColor: l.value.chart.tooltip.borderColor,
3315
- borderWidth: l.value.chart.tooltip.borderWidth,
3316
- backgroundOpacity: l.value.chart.tooltip.backgroundOpacity,
3317
- position: l.value.chart.tooltip.position,
3318
- offsetY: l.value.chart.tooltip.offsetY,
3319
- parent: t.$refs.chart,
3320
- content: Oo.value,
3321
- isFullscreen: qe.value,
3322
- isCustom: l.value.chart.tooltip.customFormat && typeof l.value.chart.tooltip.customFormat == "function",
3323
- smooth: l.value.chart.tooltip.smooth,
3324
- backdropFilter: l.value.chart.tooltip.backdropFilter,
3325
- smoothForce: l.value.chart.tooltip.smoothForce,
3326
- smoothSnapThreshold: l.value.chart.tooltip.smoothSnapThreshold
3327
- }, {
3328
- "tooltip-before": G(() => [
3329
- B(t.$slots, "tooltip-before", ke(_e({ ...da.value })), void 0, !0)
3330
- ]),
3331
- "tooltip-after": G(() => [
3332
- B(t.$slots, "tooltip-after", ke(_e({ ...da.value })), void 0, !0)
3333
- ]),
3334
- _: 3
3335
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
3336
- ct.value && l.value.chart.userOptions.buttons.table ? (n(), Te(Zo($l.value.component), tl({ key: 8 }, $l.value.props, {
3337
- ref_key: "tableUnit",
3338
- ref: il,
3339
- onClose: $a
3340
- }), Ca({
3341
- content: G(() => [
3342
- p("div", {
3343
- style: $(`${v(dt) || l.value.table.useDialog ? "" : "max-height:400px"};${l.value.table.useDialog ? "height: fit-content; " : ""};overflow:auto;width:100%;${l.value.table.useDialog ? "" : "margin-top:48px"}`)
3344
- }, [
3345
- p("div", Ki, [
3346
- Jo(p("input", {
3347
- type: "checkbox",
3348
- "onUpdate:modelValue": s[4] || (s[4] = (e) => pl.value = e)
3349
- }, null, 512), [
3350
- [Ko, pl.value]
3351
- ]),
3352
- p("div", {
3353
- onClick: s[5] || (s[5] = (e) => pl.value = !pl.value),
3354
- style: { cursor: "pointer" }
3355
- }, [
3356
- vl(v($t), {
3357
- name: "chartLine",
3358
- size: 20,
3359
- stroke: l.value.chart.color
3360
- }, null, 8, ["stroke"])
3361
- ])
3362
- ]),
3363
- pl.value ? (n(), Te(v(qa), {
3364
- key: `sparkline_${ut.value}`,
3365
- dataset: Ao.value,
3366
- config: Co.value
3367
- }, null, 8, ["dataset", "config"])) : (n(), Te(v(Xa), {
3368
- key: `table_${Tt.value}`,
3369
- colNames: Gl.value.colNames,
3370
- head: Gl.value.head,
3371
- body: Gl.value.body,
3372
- config: Gl.value.config,
3373
- title: l.value.table.useDialog ? "" : $l.value.title,
3374
- withCloseButton: !l.value.table.useDialog,
3375
- onClose: $a
3376
- }, {
3377
- th: G(({ th: e }) => [
3378
- p("div", { innerHTML: e }, null, 8, Qi)
3379
- ]),
3380
- td: G(({ td: e }) => [
3381
- Ta(te(isNaN(Number(e)) ? e : v(Fe)({
3382
- p: l.value.chart.labels.prefix,
3383
- v: e,
3384
- s: l.value.chart.labels.suffix,
3385
- r: l.value.table.rounding
3386
- })), 1)
3387
- ]),
3388
- _: 1
3389
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
3390
- ], 4)
3391
- ]),
3392
- _: 2
3393
- }, [
3394
- l.value.table.useDialog ? {
3395
- name: "title",
3396
- fn: G(() => [
3397
- Ta(te($l.value.title), 1)
3398
- ]),
3399
- key: "0"
3400
- } : void 0,
3401
- l.value.table.useDialog ? {
3402
- name: "actions",
3403
- fn: G(() => [
3404
- p("button", {
3405
- tabindex: "0",
3406
- class: "vue-ui-user-options-button",
3407
- onClick: s[3] || (s[3] = (e) => xt(l.value.chart.userOptions.callbacks.csv))
3408
- }, [
3409
- vl(v($t), {
3410
- name: "excel",
3411
- stroke: $l.value.props.color
3412
- }, null, 8, ["stroke"])
3413
- ])
3414
- ]),
3415
- key: "1"
3416
- } : void 0
3417
- ]), 1040)) : h("", !0),
3418
- v(ie) ? (n(), Te(fs, { key: 9 })) : h("", !0)
3419
- ], 46, $s));
3420
- }
3421
- }, bn = /* @__PURE__ */ Ss(ji, [["__scopeId", "data-v-71b071f4"]]);
3422
- export {
3423
- bn as default
3424
- };