vue-data-ui 3.15.12 → 3.16.1

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