vue-data-ui 3.20.10 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/{Arrow-D6j6ocXm.js → Arrow-_pDGXl76.js} +1 -1
  2. package/dist/{BaseDraggableDialog-4hDW-Rj2.js → BaseDraggableDialog-BvaFJWHb.js} +2 -2
  3. package/dist/{BaseIcon-DfLoHNUj.js → BaseIcon-CbDazQLH.js} +1 -1
  4. package/dist/{BaseLegendToggle-C_Db-y7s.js → BaseLegendToggle-BNRi408o.js} +1 -1
  5. package/dist/{BaseZoomControls-CG7hI_1P.js → BaseZoomControls-Dbtq9oyx.js} +2 -2
  6. package/dist/{ColorPicker-Bjwxnvfh.js → ColorPicker-B4ob7JgP.js} +2 -2
  7. package/dist/{DataTable-B--IN22e.js → DataTable-DweDyHc1.js} +2 -2
  8. package/dist/{Legend-Cz2uQ5gs.js → Legend-BLhREbj7.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-gLNJ1Lmr.js → NonSvgPenAndPaper-BzZyMJBF.js} +3 -3
  10. package/dist/{PackageVersion-BbgWxFC4.js → PackageVersion-DYLo3MRd.js} +1 -1
  11. package/dist/{PenAndPaper-DqrClVfb.js → PenAndPaper-D4aFMYZf.js} +3 -3
  12. package/dist/{Shape-BPCJfphn.js → Shape-BxFtoF1z.js} +1 -1
  13. package/dist/{Slicer-SHBj0VaV.js → Slicer-GABgkLkB.js} +2 -2
  14. package/dist/SlicerPreview-CXLgqXX8.js +1676 -0
  15. package/dist/{SparkTooltip-CfE6yCad.js → SparkTooltip-CdSRUoZN.js} +6 -6
  16. package/dist/{Title-NWp4qB4K.js → Title-DH6G8_cZ.js} +1 -1
  17. package/dist/{Tooltip-BENq327o.js → Tooltip-979Ytd8R.js} +1 -1
  18. package/dist/{UserOptions-C1NgoGu6.js → UserOptions-qFz-9Pnw.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-history-plot.js +1 -1
  46. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  47. package/dist/components/vue-ui-icon.js +1 -1
  48. package/dist/components/vue-ui-kpi.js +1 -1
  49. package/dist/components/vue-ui-mini-loader.js +1 -1
  50. package/dist/components/vue-ui-molecule.js +1 -1
  51. package/dist/components/vue-ui-mood-radar.js +1 -1
  52. package/dist/components/vue-ui-nested-donuts.js +1 -1
  53. package/dist/components/vue-ui-onion.js +1 -1
  54. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  55. package/dist/components/vue-ui-quadrant.js +1 -1
  56. package/dist/components/vue-ui-quick-chart.js +1 -1
  57. package/dist/components/vue-ui-radar.js +1 -1
  58. package/dist/components/vue-ui-rating.js +1 -1
  59. package/dist/components/vue-ui-relation-circle.js +1 -1
  60. package/dist/components/vue-ui-ridgeline.js +1 -1
  61. package/dist/components/vue-ui-rings.js +1 -1
  62. package/dist/components/vue-ui-scatter.js +1 -1
  63. package/dist/components/vue-ui-skeleton.js +1 -1
  64. package/dist/components/vue-ui-smiley.js +1 -1
  65. package/dist/components/vue-ui-spark-trend.js +1 -1
  66. package/dist/components/vue-ui-sparkbar.js +1 -1
  67. package/dist/components/vue-ui-sparkgauge.js +1 -1
  68. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  69. package/dist/components/vue-ui-sparkline.js +1 -1
  70. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  71. package/dist/components/vue-ui-stackbar.js +1 -1
  72. package/dist/components/vue-ui-stackline.js +1 -1
  73. package/dist/components/vue-ui-strip-plot.js +1 -1
  74. package/dist/components/vue-ui-table-heatmap.js +1 -1
  75. package/dist/components/vue-ui-table-sparkline.js +1 -1
  76. package/dist/components/vue-ui-table.js +1 -1
  77. package/dist/components/vue-ui-thermometer.js +1 -1
  78. package/dist/components/vue-ui-timer.js +1 -1
  79. package/dist/components/vue-ui-tiremarks.js +1 -1
  80. package/dist/components/vue-ui-treemap.js +1 -1
  81. package/dist/components/vue-ui-vertical-bar.js +1 -1
  82. package/dist/components/vue-ui-waffle.js +1 -1
  83. package/dist/components/vue-ui-wheel.js +1 -1
  84. package/dist/components/vue-ui-word-cloud.js +1 -1
  85. package/dist/components/vue-ui-world.js +1 -1
  86. package/dist/components/vue-ui-xy-canvas.js +1 -1
  87. package/dist/components/vue-ui-xy.js +1 -1
  88. package/dist/{dom-to-png-BYtB4BF3.js → dom-to-png-CtV3uxDJ.js} +1 -1
  89. package/dist/exposedLib-BJbE_A8E.js +19 -0
  90. package/dist/{img-1cKsci8e.js → img-C_RNNswI.js} +1 -1
  91. package/dist/{labelUtils-CUctkYoA.js → labelUtils-Bycs-017.js} +1 -1
  92. package/dist/{lib-DUeYQsS0.js → lib-AJRHFE5U.js} +12 -6
  93. package/dist/{pdf-D0eZ99cP.js → pdf-CdX23zf1.js} +1 -1
  94. package/dist/ssr.js +1366 -0
  95. package/dist/style.css +1 -1
  96. package/dist/types/ssr.d.ts +128 -0
  97. package/dist/types/vue-data-ui.d.ts +135 -1
  98. package/dist/{useAutoSizeLabelsInsideViewbox-BIVntRZp.js → useAutoSizeLabelsInsideViewbox-kjVKQz36.js} +1 -1
  99. package/dist/{useNestedProp-CNcoy38D.js → useNestedProp-DtcXIg7n.js} +1 -1
  100. package/dist/{usePrinter-C1Gqt_Sp.js → usePrinter-6n2MzVyV.js} +2 -2
  101. package/dist/utils.js +8 -8
  102. package/dist/{vue-data-ui-CBjd88aV.js → vue-data-ui-D2dM3IQZ.js} +68 -68
  103. package/dist/vue-data-ui.js +72 -72
  104. package/dist/vue-ui-3d-bar-0C_yshya.js +1757 -0
  105. package/dist/{vue-ui-accordion-Bpbv-VHE.js → vue-ui-accordion-DLnwuQda.js} +3 -3
  106. package/dist/vue-ui-age-pyramid-DFNELwbT.js +1238 -0
  107. package/dist/{vue-ui-annotator-Q57JevNc.js → vue-ui-annotator-BljP5cB7.js} +8 -8
  108. package/dist/vue-ui-bullet-ChQq42AN.js +710 -0
  109. package/dist/{vue-ui-bump-S-FGGlPW.js → vue-ui-bump-BVCYywuS.js} +253 -253
  110. package/dist/{vue-ui-candlestick-BaaswVai.js → vue-ui-candlestick-CQ0nfkmL.js} +276 -276
  111. package/dist/vue-ui-carousel-table-Cvi1gsKR.js +455 -0
  112. package/dist/vue-ui-chestnut-DeWbKqze.js +2010 -0
  113. package/dist/vue-ui-chord-bRXYWpGT.js +1391 -0
  114. package/dist/{vue-ui-circle-pack--4oUO8hO.js → vue-ui-circle-pack-DWO8x9gf.js} +36 -36
  115. package/dist/{vue-ui-cursor-C7zZVebz.js → vue-ui-cursor-BKGUvOWO.js} +3 -3
  116. package/dist/{vue-ui-dag-DsCnV6f0.js → vue-ui-dag-lL0juBzN.js} +20 -20
  117. package/dist/{vue-ui-dashboard-CmTnG8CS.js → vue-ui-dashboard-CEk2z8v9.js} +69 -69
  118. package/dist/{vue-ui-digits-BQ0e9Czq.js → vue-ui-digits-BAjr0eIJ.js} +3 -3
  119. package/dist/vue-ui-donut-BsSpIinL.js +2410 -0
  120. package/dist/vue-ui-donut-evolution-1UhFKEgG.js +1510 -0
  121. package/dist/vue-ui-dumbbell-ChqJicg9.js +1530 -0
  122. package/dist/{vue-ui-flow-jBINqYMb.js → vue-ui-flow-BXfzMTXx.js} +57 -57
  123. package/dist/{vue-ui-funnel-B9DsneCv.js → vue-ui-funnel-BpnC82m0.js} +32 -32
  124. package/dist/{vue-ui-galaxy-SAZjgllD.js → vue-ui-galaxy-FNzwDOH1.js} +330 -330
  125. package/dist/vue-ui-gauge-D6I78FZr.js +920 -0
  126. package/dist/{vue-ui-geo-B41ZRCPC.js → vue-ui-geo-Z1xuH8r6.js} +18 -18
  127. package/dist/{vue-ui-gizmo-PL2TAIV_.js → vue-ui-gizmo-ZlmJIh0_.js} +62 -62
  128. package/dist/{vue-ui-heatmap-NkJ_KGMs.js → vue-ui-heatmap-BWN0UBKE.js} +264 -264
  129. package/dist/{vue-ui-history-plot-B9KX1kKs.js → vue-ui-history-plot-2E6KrNhv.js} +74 -74
  130. package/dist/vue-ui-horizontal-bar-BzP7k_3J.js +1681 -0
  131. package/dist/{vue-ui-kpi-Bo4x1-vC.js → vue-ui-kpi-B9bdicir.js} +3 -3
  132. package/dist/{vue-ui-mini-loader-Bi0nsbao.js → vue-ui-mini-loader-BnLOdRA0.js} +2 -2
  133. package/dist/vue-ui-molecule-B-69fE_1.js +925 -0
  134. package/dist/{vue-ui-mood-radar-DE71e1H_.js → vue-ui-mood-radar-D3kF7iHz.js} +21 -21
  135. package/dist/{vue-ui-nested-donuts-DQhSwNYF.js → vue-ui-nested-donuts-CTmomXj1.js} +256 -256
  136. package/dist/{vue-ui-onion-X9anqRDz.js → vue-ui-onion-3fJB4mfC.js} +45 -45
  137. package/dist/{vue-ui-parallel-coordinate-plot-aN0OHwgH.js → vue-ui-parallel-coordinate-plot-CKKkbBlu.js} +39 -39
  138. package/dist/{vue-ui-quadrant-CpKMBoX9.js → vue-ui-quadrant-DGLnjwva.js} +355 -355
  139. package/dist/{vue-ui-quick-chart-BwD7IGYx.js → vue-ui-quick-chart-DJnhlEXi.js} +359 -359
  140. package/dist/vue-ui-radar-AIBX0QYs.js +1229 -0
  141. package/dist/{vue-ui-rating-D8QQctnQ.js → vue-ui-rating-pDVqT08V.js} +33 -33
  142. package/dist/vue-ui-relation-circle-BQVR8L9Y.js +924 -0
  143. package/dist/{vue-ui-ridgeline-68X0PTKo.js → vue-ui-ridgeline-CYq3APPQ.js} +54 -54
  144. package/dist/{vue-ui-rings-cDPIzhPb.js → vue-ui-rings-BgFO7NYF.js} +81 -81
  145. package/dist/vue-ui-scatter-BPu5DwaJ.js +2413 -0
  146. package/dist/{vue-ui-skeleton-BD0JzrcV.js → vue-ui-skeleton-qpdvvWtx.js} +41 -41
  147. package/dist/{vue-ui-smiley-CqwB6Uhu.js → vue-ui-smiley-DUI5n89s.js} +16 -16
  148. package/dist/{vue-ui-spark-trend-DLXJpfGh.js → vue-ui-spark-trend-CQ9ZN5sL.js} +27 -27
  149. package/dist/{vue-ui-sparkbar-5pFFPu5l.js → vue-ui-sparkbar-d6ctWlLA.js} +83 -83
  150. package/dist/{vue-ui-sparkgauge--CihPbUW.js → vue-ui-sparkgauge-HX_rqLxX.js} +44 -44
  151. package/dist/{vue-ui-sparkhistogram-CjrIcako.js → vue-ui-sparkhistogram-B_zxKMHv.js} +110 -110
  152. package/dist/vue-ui-sparkline-BSdOdtKu.js +1507 -0
  153. package/dist/{vue-ui-sparkstackbar-Dlg1W_fF.js → vue-ui-sparkstackbar-B2sqpW-w.js} +155 -155
  154. package/dist/{vue-ui-stackbar-DltfPoDm.js → vue-ui-stackbar-DH75CCpy.js} +81 -81
  155. package/dist/vue-ui-stackline-CXodezD1.js +2398 -0
  156. package/dist/{vue-ui-strip-plot-CEE-cw3d.js → vue-ui-strip-plot-C1un5Mku.js} +90 -90
  157. package/dist/{vue-ui-table-C7AvFChf.js → vue-ui-table-R-aXpHvF.js} +86 -86
  158. package/dist/{vue-ui-table-heatmap-xwfStZrD.js → vue-ui-table-heatmap-C1e_7MJ2.js} +16 -16
  159. package/dist/{vue-ui-table-sparkline-DgTHhaZI.js → vue-ui-table-sparkline-Dy-6i82F.js} +22 -22
  160. package/dist/{vue-ui-thermometer-Cg7jcmgc.js → vue-ui-thermometer-CIse_lcE.js} +21 -21
  161. package/dist/{vue-ui-timer-U045embk.js → vue-ui-timer-AlYvthQ6.js} +23 -23
  162. package/dist/{vue-ui-tiremarks-T55IpHYP.js → vue-ui-tiremarks-CP_bw6by.js} +19 -19
  163. package/dist/{vue-ui-treemap-BPQ-Ekq4.js → vue-ui-treemap-BXrV5VAp.js} +65 -65
  164. package/dist/{vue-ui-waffle-DNCJGwEA.js → vue-ui-waffle-uoqEnQ30.js} +232 -232
  165. package/dist/{vue-ui-wheel-5GuVbUOq.js → vue-ui-wheel-DLgw_xfe.js} +36 -36
  166. package/dist/{vue-ui-word-cloud-Cs-MBJJU.js → vue-ui-word-cloud-Bgu-qbcp.js} +35 -35
  167. package/dist/{vue-ui-world-D3v5f6dU.js → vue-ui-world-B93iq1ZM.js} +445 -445
  168. package/dist/vue-ui-xy-DzuOBbPL.js +4744 -0
  169. package/dist/{vue-ui-xy-canvas-Ww81eEZ6.js → vue-ui-xy-canvas-DjxM7y3T.js} +60 -60
  170. package/package.json +6 -2
  171. package/dist/SlicerPreview-CpvCUAIM.js +0 -1669
  172. package/dist/exposedLib-CI8ji8G-.js +0 -19
  173. package/dist/vue-ui-3d-bar-DmMi_eVe.js +0 -1757
  174. package/dist/vue-ui-age-pyramid-CbJDodNj.js +0 -1238
  175. package/dist/vue-ui-bullet-rCmOch09.js +0 -710
  176. package/dist/vue-ui-carousel-table-DFUP6c1B.js +0 -455
  177. package/dist/vue-ui-chestnut-DKNsQA7h.js +0 -2010
  178. package/dist/vue-ui-chord-BMkz02R6.js +0 -1391
  179. package/dist/vue-ui-donut-BLlR2VgI.js +0 -2410
  180. package/dist/vue-ui-donut-evolution-kXDchwtH.js +0 -1510
  181. package/dist/vue-ui-dumbbell-BWuXbccQ.js +0 -1530
  182. package/dist/vue-ui-gauge-NSzY9L6X.js +0 -920
  183. package/dist/vue-ui-horizontal-bar-mmoqYnkA.js +0 -1681
  184. package/dist/vue-ui-molecule-QoXYCfyP.js +0 -925
  185. package/dist/vue-ui-radar-TfxsgQrA.js +0 -1229
  186. package/dist/vue-ui-relation-circle-CMqV9U6C.js +0 -924
  187. package/dist/vue-ui-scatter-8nirnHQi.js +0 -2413
  188. package/dist/vue-ui-sparkline-DPZm7RqN.js +0 -1507
  189. package/dist/vue-ui-stackline-6agFEYxZ.js +0 -2398
  190. package/dist/vue-ui-xy-C0kcCaFA.js +0 -4747
@@ -1,4747 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { B as t, Bt as n, Ct as r, D as i, Et as a, F as o, G as s, H as c, I as l, J as u, L as ee, Lt as d, M as te, Mt as f, Nt as p, O as ne, P as re, R as ie, Rt as ae, S as oe, T as se, X as ce, a as le, c as ue, dt as m, et as h, g as de, h as fe, ht as g, i as _, j as pe, jt as me, k as he, kt as ge, l as _e, mt as ve, n as ye, nt as be, pt as xe, r as Se, s as Ce, v, vt as we, w as Te, x as Ee, y as De, z as Oe, zt as ke } from "./lib-DUeYQsS0.js";
3
- import { n as Ae, r as je, t as Me } from "./useTimeLabels-BmBRv27Y.js";
4
- import { t as Ne } from "./useConfig-DnH7Pf_2.js";
5
- import { t as Pe } from "./usePrinter-C1Gqt_Sp.js";
6
- import { n as Fe, t as Ie } from "./BaseScanner-Dr2a1Msy.js";
7
- import { t as Le } from "./useSvgExport-SVIsDot8.js";
8
- import { t as Re } from "./useNestedProp-CNcoy38D.js";
9
- import { t as ze } from "./useThemeCheck-C43Tcqmk.js";
10
- import { t as Be } from "./useStableElementSize-C7KADDKj.js";
11
- import { t as Ve } from "./useTimeLabelCollider-AEcY4Ioe.js";
12
- import { t as He } from "./img-1cKsci8e.js";
13
- import { n as Ue } from "./Title-NWp4qB4K.js";
14
- import { t as We } from "./vue_ui_xy-BA3-_LCx.js";
15
- import { t as Ge } from "./Shape-BPCJfphn.js";
16
- import { t as Ke } from "./_plugin-vue_export-helper-B3ysoDQm.js";
17
- import { t as qe } from "./SlicerPreview-CpvCUAIM.js";
18
- import { t as Je } from "./vue-ui-accordion-Bpbv-VHE.js";
19
- import { t as Ye } from "./BaseLegendToggle-C_Db-y7s.js";
20
- import { t as Xe } from "./A11yDataTable-BCbtxMU6.js";
21
- import { Fragment as y, Teleport as Ze, computed as b, createBlock as Qe, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as $e, createTextVNode as et, createVNode as tt, defineAsyncComponent as nt, getCurrentInstance as rt, guardReactiveProps as it, mergeProps as at, nextTick as ot, normalizeClass as st, normalizeProps as ct, normalizeStyle as w, onBeforeUnmount as lt, onMounted as ut, openBlock as T, ref as E, renderList as D, renderSlot as O, resolveDynamicComponent as dt, shallowRef as ft, toDisplayString as pt, toRefs as mt, unref as k, useSlots as ht, vModelCheckbox as gt, watch as _t, watchEffect as vt, withCtx as A, withDirectives as yt } from "vue";
22
- //#region src/components/vue-ui-xy.vue
23
- var bt = /* @__PURE__ */ e({ default: () => j }), xt = ["id"], St = ["id"], Ct = ["id"], wt = { style: { position: "relative" } }, Tt = [
24
- "viewBox",
25
- "aria-label",
26
- "aria-describedby"
27
- ], Et = [
28
- "x",
29
- "y",
30
- "width",
31
- "height"
32
- ], Dt = { key: 1 }, Ot = { class: "vue-ui-xy-grid" }, kt = [
33
- "stroke",
34
- "x1",
35
- "x2",
36
- "y1",
37
- "y2"
38
- ], At = [
39
- "stroke",
40
- "x1",
41
- "x2",
42
- "y1",
43
- "y2"
44
- ], jt = { key: 1 }, Mt = [
45
- "x1",
46
- "x2",
47
- "y1",
48
- "y2",
49
- "stroke"
50
- ], Nt = [
51
- "x1",
52
- "x2",
53
- "y1",
54
- "y2",
55
- "stroke"
56
- ], Pt = [
57
- "x1",
58
- "x2",
59
- "y1",
60
- "y2",
61
- "stroke"
62
- ], Ft = { key: 3 }, It = ["d", "stroke"], Lt = { key: 4 }, Rt = ["d", "stroke"], zt = ["id"], Bt = ["stop-color"], Vt = ["stop-color"], Ht = ["stop-color"], Ut = ["id"], Wt = ["stop-color"], Gt = ["stop-color"], Kt = ["stop-color"], qt = ["id"], Jt = ["stop-color"], Yt = ["stop-color"], Xt = ["id"], Zt = ["stop-color"], Qt = ["stop-color"], $t = ["id"], en = ["stop-color"], tn = ["stop-color"], nn = { key: 0 }, rn = ["id"], an = ["stop-color", "offset"], on = [
63
- "x",
64
- "y",
65
- "height",
66
- "width",
67
- "fill"
68
- ], sn = [
69
- "x",
70
- "y",
71
- "width"
72
- ], cn = { key: 0 }, ln = [
73
- "x",
74
- "y",
75
- "height",
76
- "width",
77
- "fill"
78
- ], un = [
79
- "x",
80
- "y",
81
- "height",
82
- "width",
83
- "rx",
84
- "fill",
85
- "stroke",
86
- "stroke-width"
87
- ], dn = [
88
- "x",
89
- "y",
90
- "height",
91
- "width",
92
- "rx",
93
- "fill",
94
- "stroke",
95
- "stroke-width"
96
- ], fn = [
97
- "width",
98
- "x",
99
- "y"
100
- ], pn = [
101
- "stroke",
102
- "x1",
103
- "x2",
104
- "y1",
105
- "y2"
106
- ], mn = { key: 3 }, hn = [
107
- "x1",
108
- "x2",
109
- "y1",
110
- "y2",
111
- "stroke",
112
- "stroke-width",
113
- "stroke-dasharray"
114
- ], gn = {
115
- key: 4,
116
- class: "vue-ui-xy-crosshair-selection"
117
- }, _n = [
118
- "x1",
119
- "x2",
120
- "y1",
121
- "y2",
122
- "stroke",
123
- "stroke-width",
124
- "stroke-dasharray"
125
- ], vn = [
126
- "x1",
127
- "x2",
128
- "y1",
129
- "y2",
130
- "stroke",
131
- "stroke-width",
132
- "stroke-dasharray"
133
- ], yn = [
134
- "cx",
135
- "cy",
136
- "r",
137
- "fill",
138
- "stroke",
139
- "stroke-width"
140
- ], bn = [
141
- "x",
142
- "y",
143
- "width",
144
- "height",
145
- "stroke",
146
- "stroke-width",
147
- "stroke-linecap",
148
- "stroke-linejoin",
149
- "stroke-dasharray"
150
- ], xn = ["opacity"], Sn = [
151
- "x1",
152
- "x2",
153
- "y1",
154
- "y2",
155
- "stroke",
156
- "stroke-width"
157
- ], Cn = [
158
- "fill",
159
- "font-size",
160
- "transform"
161
- ], wn = [
162
- "x1",
163
- "x2",
164
- "y1",
165
- "y2",
166
- "stroke"
167
- ], Tn = [
168
- "transform",
169
- "text-anchor",
170
- "font-size",
171
- "fill"
172
- ], En = [
173
- "x1",
174
- "x2",
175
- "y1",
176
- "y2",
177
- "stroke"
178
- ], Dn = [
179
- "transform",
180
- "font-size",
181
- "text-anchor",
182
- "fill"
183
- ], On = {
184
- key: 7,
185
- class: "vue-ui-xy-crosshair-selection"
186
- }, kn = [
187
- "transform",
188
- "font-size",
189
- "text-anchor",
190
- "fill"
191
- ], An = {
192
- key: 8,
193
- class: "vue-ui-xy-crosshair-selection"
194
- }, jn = [
195
- "cx",
196
- "cy",
197
- "r",
198
- "fill",
199
- "stroke",
200
- "stroke-width"
201
- ], Mn = [
202
- "width",
203
- "x",
204
- "y"
205
- ], Nn = { style: { width: "100%" } }, Pn = [
206
- "d",
207
- "stroke",
208
- "stroke-width",
209
- "stroke-dasharray"
210
- ], Fn = [
211
- "d",
212
- "stroke",
213
- "stroke-width",
214
- "stroke-dasharray"
215
- ], In = { key: 9 }, Ln = { key: 10 }, Rn = [
216
- "d",
217
- "fill",
218
- "fill-opacity"
219
- ], zn = { key: 0 }, Bn = ["d", "fill"], Vn = ["d", "fill"], Hn = ["d", "fill"], Un = ["d", "fill"], Wn = [
220
- "d",
221
- "stroke",
222
- "stroke-width",
223
- "stroke-dasharray"
224
- ], Gn = [
225
- "d",
226
- "stroke",
227
- "stroke-width",
228
- "stroke-dasharray"
229
- ], Kn = [
230
- "d",
231
- "stroke",
232
- "stroke-width",
233
- "stroke-dasharray"
234
- ], qn = [
235
- "d",
236
- "stroke",
237
- "stroke-width",
238
- "stroke-dasharray"
239
- ], Jn = [
240
- "width",
241
- "x",
242
- "y"
243
- ], Yn = { style: { width: "100%" } }, Xn = { key: 11 }, Zn = [
244
- "text-anchor",
245
- "font-size",
246
- "transform",
247
- "fill",
248
- "stroke",
249
- "innerHTML"
250
- ], Qn = [
251
- "x",
252
- "y",
253
- "font-size",
254
- "fill",
255
- "font-weight"
256
- ], $n = { key: 12 }, er = [
257
- "transform",
258
- "text-anchor",
259
- "font-size",
260
- "fill",
261
- "stroke",
262
- "innerHTML"
263
- ], tr = { key: 13 }, nr = ["x", "y"], rr = ["innerHTML"], ir = ["x", "y"], ar = ["innerHTML"], or = [
264
- "x1",
265
- "x2",
266
- "y1",
267
- "y2",
268
- "stroke"
269
- ], sr = { key: 14 }, cr = [
270
- "transform",
271
- "text-anchor",
272
- "font-size",
273
- "fill",
274
- "stroke",
275
- "innerHTML"
276
- ], lr = { key: 15 }, ur = ["x", "y"], dr = ["innerHTML"], fr = ["x", "y"], pr = ["innerHTML"], mr = [
277
- "x1",
278
- "x2",
279
- "y1",
280
- "y2",
281
- "stroke"
282
- ], hr = [
283
- "x",
284
- "y",
285
- "font-size",
286
- "fill",
287
- "innerHTML"
288
- ], gr = [
289
- "x",
290
- "y",
291
- "font-size",
292
- "fill",
293
- "innerHTML"
294
- ], _r = [
295
- "x",
296
- "y",
297
- "font-size",
298
- "fill",
299
- "innerHTML"
300
- ], vr = [
301
- "x",
302
- "y",
303
- "font-size",
304
- "fill",
305
- "innerHTML"
306
- ], yr = { key: 0 }, br = ["id"], xr = ["fill", "stroke"], Sr = [
307
- "x1",
308
- "x2",
309
- "y1",
310
- "y2",
311
- "stroke",
312
- "marker-end"
313
- ], Cr = [
314
- "x1",
315
- "x2",
316
- "y1",
317
- "y2",
318
- "stroke",
319
- "marker-end"
320
- ], wr = [
321
- "x",
322
- "y",
323
- "font-size",
324
- "fill",
325
- "stroke"
326
- ], Tr = [
327
- "id",
328
- "x1",
329
- "x2"
330
- ], Er = ["stop-color"], Dr = ["stop-color"], Or = [
331
- "x",
332
- "y",
333
- "width",
334
- "height",
335
- "fill",
336
- "onMouseenter"
337
- ], kr = [
338
- "font-size",
339
- "fill",
340
- "transform"
341
- ], Ar = [
342
- "x",
343
- "y",
344
- "font-size",
345
- "fill"
346
- ], jr = ["opacity"], Mr = [
347
- "text-anchor",
348
- "font-size",
349
- "fill",
350
- "transform",
351
- "onClick"
352
- ], Nr = [
353
- "text-anchor",
354
- "font-size",
355
- "fill",
356
- "transform",
357
- "innerHTML",
358
- "onClick"
359
- ], Pr = { key: 18 }, Fr = [
360
- "text-anchor",
361
- "font-size",
362
- "fill",
363
- "transform",
364
- "innerHTML"
365
- ], Ir = { key: 19 }, Lr = [
366
- "x1",
367
- "y1",
368
- "x2",
369
- "y2",
370
- "stroke",
371
- "stroke-width",
372
- "stroke-dasharray"
373
- ], Rr = [
374
- "x1",
375
- "y1",
376
- "x2",
377
- "y2",
378
- "stroke",
379
- "stroke-width",
380
- "stroke-dasharray"
381
- ], zr = [
382
- "y",
383
- "x",
384
- "width",
385
- "height",
386
- "fill"
387
- ], Br = [
388
- "id",
389
- "x",
390
- "y",
391
- "font-size",
392
- "fill",
393
- "text-anchor"
394
- ], Vr = {
395
- key: 20,
396
- style: { "pointer-events": "none" }
397
- }, Hr = ["x", "y"], Ur = ["innerHTML"], Wr = [
398
- "cx",
399
- "cy",
400
- "r",
401
- "fill"
402
- ], Gr = ["data-start", "data-end"], Kr = {
403
- key: 0,
404
- style: {
405
- position: "absolute",
406
- top: "100%",
407
- left: "0",
408
- width: "100%"
409
- },
410
- "data-dom-to-png-ignore": "",
411
- "aria-hidden": "true"
412
- }, qr = {
413
- key: 5,
414
- class: "vue-data-ui-watermark"
415
- }, Jr = {
416
- class: "vue-ui-xy-tag-arrow",
417
- height: "20",
418
- viewBox: "0 0 10 20",
419
- style: {
420
- position: "absolute",
421
- right: "100%",
422
- top: "50%",
423
- transform: "translateY(-50%)"
424
- }
425
- }, Yr = ["fill"], Xr = ["innerHTML"], Zr = {
426
- class: "vue-ui-xy-tag-arrow",
427
- height: "100%",
428
- viewBox: "0 0 10 20",
429
- style: {
430
- position: "absolute",
431
- left: "100%",
432
- top: "50%",
433
- transform: "translateY(-50%)"
434
- }
435
- }, Qr = ["fill"], $r = ["innerHTML"], ei = {
436
- class: "vue-ui-xy-tag-arrow",
437
- height: "20",
438
- viewBox: "0 0 10 20",
439
- style: {
440
- position: "absolute",
441
- right: "100%",
442
- top: "50%",
443
- transform: "translateY(-50%)"
444
- }
445
- }, ti = ["fill"], ni = ["innerHTML"], ri = {
446
- class: "vue-ui-xy-tag-arrow",
447
- height: "100%",
448
- viewBox: "0 0 10 20",
449
- style: {
450
- position: "absolute",
451
- left: "100%",
452
- top: "50%",
453
- transform: "translateY(-50%)"
454
- }
455
- }, ii = ["fill"], ai = ["innerHTML"], oi = ["id"], si = ["onClick", "onKeydown"], ci = {
456
- key: 0,
457
- viewBox: "0 0 20 12",
458
- height: "1em",
459
- width: "1.43em",
460
- "aria-hidden": "true"
461
- }, li = ["stroke", "fill"], ui = {
462
- key: 1,
463
- viewBox: "0 0 40 40",
464
- height: "1em",
465
- width: "1em",
466
- "aria-hidden": "true"
467
- }, di = ["fill"], fi = ["fill"], pi = {
468
- key: 2,
469
- viewBox: "0 0 12 12",
470
- height: "1em",
471
- width: "1em",
472
- "aria-hidden": "true"
473
- }, mi = {
474
- style: {
475
- display: "flex",
476
- "flex-direction": "row",
477
- gap: "6px",
478
- "align-items": "center",
479
- "padding-left": "6px"
480
- },
481
- "data-dom-to-png-ignore": ""
482
- }, hi = ["innerHTML"], j = /* @__PURE__ */ Ke({
483
- __name: "vue-ui-xy",
484
- props: {
485
- config: {
486
- type: Object,
487
- default() {
488
- return {};
489
- }
490
- },
491
- dataset: {
492
- type: Array,
493
- default() {
494
- return [];
495
- }
496
- },
497
- selectedXIndex: {
498
- type: Number,
499
- default: void 0
500
- }
501
- },
502
- emits: [
503
- "selectTimeLabel",
504
- "selectX",
505
- "selectLegend",
506
- "zoomStart",
507
- "zoomEnd",
508
- "zoomReset",
509
- "copyAlt"
510
- ],
511
- setup(e, { expose: Ke, emit: bt }) {
512
- let j = e, gi = nt(() => import("./DataTable-B--IN22e.js")), _i = nt(() => import("./Tooltip-BENq327o.js")), vi = nt(() => import("./UserOptions-C1NgoGu6.js").then((e) => e.n)), yi = nt(() => import("./BaseIcon-DfLoHNUj.js").then((e) => e.n)), bi = nt(() => import("./vue-ui-table-sparkline-DgTHhaZI.js").then((e) => e.n)), xi = nt(() => import("./PackageVersion-BbgWxFC4.js").then((e) => e.t)), Si = nt(() => import("./PenAndPaper-DqrClVfb.js").then((e) => e.t)), Ci = nt(() => import("./BaseDraggableDialog-4hDW-Rj2.js").then((e) => e.n)), wi = bt, Ti = ht(), Ei = rt(), { vue_ui_xy: Di } = Ne(), { isThemeValid: Oi, warnInvalidTheme: ki } = ze(), Ai = E(null), ji = E(null), Mi = E(null), Ni = E(null), Pi = E(null), Fi = E(null), Ii = E(null), Li = E(null), Ri = E(null), zi = E(null), Bi = E(null), Vi = E(null), Hi = E(null), Ui = E(null), Wi = E(0), M = E(null), Gi = E(!0), Ki = E(600), N = E(1e3), qi = E("0 0 1000 600"), Ji = E({
513
- x: 0,
514
- y: 0
515
- }), Yi = E({
516
- line: "line",
517
- bar: "bar",
518
- plot: "plot"
519
- }), Xi = E(!1), Zi = E(!1), Qi = E(!1), $i = E(null), P = E([]), F = E(c()), ea = E(0), ta = E(0), na = E(0), ra = E(!0), ia = E(0), I = E(null), aa = E(!1), oa = E(!0), sa = E(!0), L = E(null), ca = E({}), la = E(null), ua = E(!1), da = E(null), fa = E(!1), pa = E(!1), ma = E(null), R = E(null), ha = E(null), ga = E({
520
- x: 0,
521
- y: 0
522
- }), _a = ft(null), va = E(!1), ya = E(0), ba = E(0), xa = Be({
523
- elementRef: _a,
524
- minimumWidth: 2,
525
- minimumHeight: 2,
526
- stableFramesRequired: 2,
527
- once: !1,
528
- onSizeAccepted: () => {
529
- wa();
530
- }
531
- });
532
- function Sa() {
533
- _a.value = Ai.value?.parentNode ?? null;
534
- }
535
- function Ca() {
536
- return new Promise((e) => {
537
- requestAnimationFrame(() => {
538
- requestAnimationFrame(e);
539
- });
540
- });
541
- }
542
- async function wa() {
543
- let e = ++ba.value;
544
- va.value = !1, await ot(), await Ca(), await Ca(), e === ba.value && (ya.value += 1, va.value = !0);
545
- }
546
- let Ta = b(() => ({
547
- height: Ki.value,
548
- width: N.value
549
- }));
550
- function Ea(e) {
551
- return Number.isFinite(e) ? Math.max(0, Math.floor(e)) : 0;
552
- }
553
- function Da(e, t, n = 0) {
554
- return Number.isFinite(e) && Number.isFinite(t) && Math.abs(t) > 1e-9 ? e / t : n;
555
- }
556
- let Oa = E(!1), ka = E(null), Aa = E(null), z = E({
557
- xAxis: 18,
558
- yAxis: 12,
559
- dataLabels: 20,
560
- plotLabels: 10
561
- }), ja = E({
562
- plot: 3,
563
- line: 3
564
- });
565
- ut(() => {
566
- ua.value = !0, j.dataset.length && j.dataset.forEach((e, t) => {
567
- [null, void 0].includes(e.series) && ce({
568
- componentName: "VueUiXy",
569
- type: "datasetSerieAttribute",
570
- property: "series (number[])",
571
- index: t,
572
- debug: La.value
573
- });
574
- }), Sa(), xa.start(), wa();
575
- });
576
- function Ma() {
577
- if (!Object.keys(j.config || {}).length) return Di;
578
- let e = Re({
579
- userConfig: j.config,
580
- defaultConfig: Di
581
- });
582
- j.config && m(j.config, "chart.highlightArea") && (Array.isArray(j.config.chart.highlightArea) ? e.chart.highlightArea = j.config.chart.highlightArea : e.chart.highlightArea = [j.config.chart.highlightArea]), j.config && m(j.config, "chart.annotations") && Array.isArray(j.config.chart.annotations) && j.config.chart.annotations.length ? e.chart.annotations = j.config.chart.annotations.map((e) => Re({
583
- defaultConfig: Di.chart.annotations[0],
584
- userConfig: e
585
- })) : e.chart.annotations = [], j.config && m(j.config, "chart.grid.position") && j.config.chart.grid.position === "start" && j.dataset.length && j.dataset.some((e) => e.type === "bar") && (e.chart.grid.position = "middle", m(j.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), j.config && m(j.config, "chart.highlightArea") && (Array.isArray(j.config.chart.highlightArea) ? e.chart.highlightArea = j.config.chart.highlightArea.map((e) => Na({
586
- defaultConfig: Di.chart.highlightArea,
587
- userConfig: e
588
- })) : e.chart.highlightArea = Na({
589
- defaultConfig: Di.chart.highlightArea,
590
- userConfig: j.config.chart.highlightArea
591
- }));
592
- let t = e.theme;
593
- if (!t) return e;
594
- if (!Oi.value(e)) return ki(e), e;
595
- let n = Re({
596
- userConfig: We[t] || j.config,
597
- defaultConfig: e
598
- }), r = Re({
599
- userConfig: j.config,
600
- defaultConfig: n
601
- });
602
- return {
603
- ...r,
604
- customPalette: r.customPalette.length ? r.customPalette : ae[t] || a
605
- };
606
- }
607
- function Na({ defaultConfig: e, userConfig: t }) {
608
- return Re({
609
- defaultConfig: e,
610
- userConfig: t
611
- });
612
- }
613
- let Pa = b({
614
- get() {
615
- return !!j.dataset && j.dataset.length;
616
- },
617
- set(e) {
618
- return e;
619
- }
620
- }), B = E(Ma()), Fa = b(() => B.value.chart.userOptions.useCursorPointer), V = E({
621
- dataLabels: { show: !0 },
622
- showTooltip: !0,
623
- showTable: !1,
624
- isStacked: !1,
625
- useIndividualScale: !1
626
- });
627
- function Ia() {
628
- let e = B.value.chart.grid.labels.yAxis.stacked, t = B.value.chart.grid.labels.yAxis.useIndividualScale;
629
- if (!Oa.value) {
630
- V.value = {
631
- dataLabels: { show: !0 },
632
- showTooltip: B.value.chart.tooltip.show === !0,
633
- showTable: B.value.showTable === !0,
634
- isStacked: e,
635
- useIndividualScale: t
636
- }, ka.value = e, Aa.value = t, Oa.value = !0;
637
- return;
638
- }
639
- V.value.showTooltip = B.value.chart.tooltip.show === !0, e !== ka.value && (V.value.isStacked = e, ka.value = e), t !== Aa.value && (V.value.useIndividualScale = t, Aa.value = t), V.value.isStacked && (V.value.useIndividualScale = !0);
640
- }
641
- let La = b(() => !!B.value.debug), Ra = b(() => n({
642
- defaultConfig: {
643
- useCssAnimation: !1,
644
- showTable: !1,
645
- chart: {
646
- annotations: [],
647
- highlightArea: [],
648
- backgroundColor: "#99999930",
649
- grid: {
650
- stroke: "#6A6A6A",
651
- labels: {
652
- show: !1,
653
- axis: {
654
- yLabel: "",
655
- xLabel: ""
656
- },
657
- xAxisLabels: { show: !1 },
658
- yAxis: {
659
- commonScaleSteps: 10,
660
- useNiceScale: !0,
661
- scaleMin: 0,
662
- scaleMax: 134
663
- },
664
- zeroLine: { show: !0 }
665
- }
666
- },
667
- padding: {
668
- top: 12,
669
- bottom: 24,
670
- left: 24,
671
- right: 24
672
- },
673
- userOptions: { show: !1 },
674
- zoom: {
675
- show: !1,
676
- startIndex: null,
677
- endIndex: null
678
- }
679
- },
680
- bar: {
681
- serieName: { show: !1 },
682
- labels: { show: !1 },
683
- border: {
684
- useSerieColor: !1,
685
- stroke: "#999999"
686
- }
687
- },
688
- line: {
689
- dot: {
690
- useSerieColor: !1,
691
- fill: "#8A8A8A"
692
- },
693
- labels: { show: !1 }
694
- }
695
- },
696
- userConfig: B.value.skeletonConfig ?? {}
697
- })), za = b(() => j.config?.skeletonDataset ?? [{
698
- name: "",
699
- series: [
700
- 0,
701
- 1,
702
- 2,
703
- 3,
704
- 5,
705
- 8,
706
- 13,
707
- 21,
708
- 34,
709
- 55,
710
- 89,
711
- 134
712
- ],
713
- type: "line",
714
- smooth: !0,
715
- color: "#BABABA"
716
- }, {
717
- name: "",
718
- series: [
719
- 0,
720
- .5,
721
- 1,
722
- 1.5,
723
- 2.5,
724
- 4,
725
- 6.5,
726
- 10.5,
727
- 17,
728
- 27.5,
729
- 44.5,
730
- 67
731
- ],
732
- type: "bar",
733
- color: "#CACACA"
734
- }]), { loading: Ba, FINAL_DATASET: H, manualLoading: Va } = Fe({
735
- ...mt(j),
736
- FINAL_CONFIG: B,
737
- prepareConfig: Ma,
738
- callback: () => {
739
- Promise.resolve().then(async () => {
740
- (!B.value.chart.zoom.keepState || !Qo.value || W.value.start === 0 && W.value.end === 0) && await ns(), V.value.showTable = B.value.showTable;
741
- });
742
- },
743
- skeletonDataset: za.value,
744
- skeletonConfig: n({
745
- defaultConfig: B.value,
746
- userConfig: Ra.value
747
- })
748
- });
749
- function Ha(e) {
750
- let t = /* @__PURE__ */ new WeakMap();
751
- return (n, ...r) => {
752
- let i = t.get(n), a = JSON.stringify(r);
753
- if (i && i.has(a)) return i.get(a);
754
- let o = e(n, ...r);
755
- return i || (i = /* @__PURE__ */ new Map(), t.set(n, i)), i.set(a, o), o;
756
- };
757
- }
758
- let Ua = Ha((e, t) => we({
759
- data: e,
760
- threshold: t
761
- })), Wa = (e) => Ua(e, B.value.downsample.threshold), U = b({
762
- get: () => Math.max(...H.value.map((e) => Wa(e.series).length)),
763
- set: (e) => e
764
- }), W = E({
765
- start: 0,
766
- end: U.value
767
- }), Ga = E({
768
- start: 0,
769
- end: U.value
770
- }), Ka = b(() => B.value.chart.zoom.preview.enable && (Ga.value.start !== W.value.start || Ga.value.end !== W.value.end));
771
- function qa(e, t) {
772
- Ga.value[e] = t;
773
- }
774
- function Ja() {
775
- if (K.value) {
776
- let e = Tc.value.min, t = Tc.value.max, n = Number(W.value.start), r = Number(W.value.end);
777
- Number.isFinite(n) || (n = e), Number.isFinite(r) || (r = t), n = Math.max(e, Math.min(n, t)), r = Math.max(n, Math.min(r, t)), r <= n && (n = e, r = t), W.value = {
778
- start: n,
779
- end: r
780
- }, Ga.value.start = n, Ga.value.end = r, Mi.value && (Mi.value.setStartValue(n), Mi.value.setEndValue(r));
781
- return;
782
- }
783
- let e = Math.max(1, ...H.value.map((e) => Wa(e.series).length)), t = Math.max(0, Math.min(W.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(W.value.end ?? e, e));
784
- (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), W.value = {
785
- start: t,
786
- end: n
787
- }, Ga.value.start = t, Ga.value.end = n, Mi.value && (Mi.value.setStartValue(t), Mi.value.setEndValue(n));
788
- }
789
- let Ya = b(() => {
790
- let { left: e, top: t, width: n, height: r } = J.value, i = W.value.start, a = W.value.end - i, o = n / a, s = Ga.value.start - i, c = Ga.value.end - i, l = Math.max(0, Math.min(a, s)), u = Math.max(0, Math.min(a, c));
791
- return {
792
- x: e + l * o,
793
- y: t,
794
- width: (u - l) * o,
795
- height: r,
796
- fill: B.value.chart.zoom.preview.fill,
797
- stroke: B.value.chart.zoom.preview.stroke,
798
- "stroke-width": B.value.chart.zoom.preview.strokeWidth,
799
- "stroke-dasharray": B.value.chart.zoom.preview.strokeDasharray,
800
- "stroke-linecap": "round",
801
- "stroke-linejoin": "round",
802
- style: {
803
- pointerEvents: "none",
804
- transition: "none !important",
805
- animation: "none !important"
806
- }
807
- };
808
- });
809
- _t(() => j.selectedXIndex, (e) => {
810
- if ([null, void 0].includes(j.selectedXIndex)) {
811
- R.value = null;
812
- return;
813
- }
814
- let t = e - W.value.start;
815
- t < 0 || e >= W.value.end ? R.value = null : R.value = t ?? null;
816
- }, { immediate: !0 });
817
- let { isPrinting: Xa, isImaging: Za, generatePdf: Qa, generateImage: $a } = Pe({
818
- elementId: `vue-ui-xy_${F.value}`,
819
- fileName: B.value.chart.title.text || "vue-ui-xy",
820
- options: B.value.chart.userOptions.print
821
- }), eo = E(!1), to = b(() => Ee(B.value.customPalette)), no = b(() => {
822
- let e = B.value.chart.grid.labels.yAxis.scaleMin;
823
- if (e == null) return null;
824
- let t = Number(e);
825
- return Number.isFinite(t) ? t : null;
826
- }), ro = b(() => no.value === null ? gs.value : J.value.bottom), io = b(() => {
827
- let e = B.value.chart.grid.labels.yAxis.scaleMax;
828
- if (e == null) return null;
829
- let t = Number(e);
830
- return Number.isFinite(t) ? t : null;
831
- }), ao = b(() => no.value !== null || io.value !== null), oo = b(() => {
832
- let e = ho.value.filter((e) => !P.value.includes(e.id)).flatMap((e) => Array.isArray(e.series) ? e.series : []).map(mo).filter(Number.isFinite);
833
- return e.length ? {
834
- min: Math.min(...e),
835
- max: Math.max(...e)
836
- } : {
837
- min: 0,
838
- max: 1
839
- };
840
- });
841
- function so(e, t) {
842
- let n = Number.isFinite(e) ? e : 0, r = Number.isFinite(t) ? t : 1;
843
- return n === r ? r = n + 1 : n > r && ([n, r] = [r, n]), {
844
- min: n,
845
- max: r
846
- };
847
- }
848
- let co = b(() => {
849
- let { min: e, max: t } = oo.value;
850
- if (!ao.value) {
851
- let t = e;
852
- return t > 0 ? 0 : t;
853
- }
854
- let n = no.value === null ? e > 0 ? 0 : e : no.value, r = io.value === null ? t : io.value;
855
- return so(e < n ? e : n, t > r ? t : r).min;
856
- }), lo = b(() => {
857
- let { min: e, max: t } = oo.value;
858
- if (!ao.value) {
859
- let e = t;
860
- return co.value === e ? e + 1 : e;
861
- }
862
- let n = no.value === null ? e > 0 ? 0 : e : no.value, r = io.value === null ? t : io.value;
863
- return so(e < n ? e : n, t > r ? t : r).max;
864
- }), G = b(() => B.value.chart.grid.labels.yAxis.useNiceScale ? fe(co.value, lo.value < 0 ? 0 : lo.value, B.value.chart.grid.labels.yAxis.commonScaleSteps) : de(co.value, lo.value < 0 ? 0 : lo.value, B.value.chart.grid.labels.yAxis.commonScaleSteps)), uo = b(() => [null, void 0].includes(B.value.chart.grid.labels.yAxis.scaleMin) ? G.value.min >= 0 ? 0 : Math.abs(G.value.min) : -G.value.min);
865
- function fo(e) {
866
- return e && typeof e == "object" && Number.isFinite(Number(e.x)) && Number.isFinite(Number(e.y));
867
- }
868
- let K = b(() => H.value.some((e) => Array.isArray(e.series) && e.series.some(fo)));
869
- ut(() => {
870
- K.value && j.dataset.some((e) => e.type === "bar") && console.warn("Vue Data UI - VueUiXy: series of type 'bar' are not supported in continuous mode.\n\nContinuous mode requires 'line' and 'plot' series to use coordinate-based datasets:\n[{ x: number, y: number }]\n\nIf you need to mix 'bar', 'line', and 'plot' series in the same chart, all series must use the standard\n[number, number, number...]");
871
- });
872
- function po(e, t) {
873
- return e && typeof e == "object" && e.x === null && e.y === null ? {
874
- x: null,
875
- y: null,
876
- index: t,
877
- raw: e,
878
- isNull: !0
879
- } : {
880
- x: Number(e.x),
881
- y: ve(e.y) ? Number(e.y) : null,
882
- index: t,
883
- raw: e,
884
- isNull: !1
885
- };
886
- }
887
- function mo(e) {
888
- return K.value ? e.y : e;
889
- }
890
- let ho = b(() => !Gi.value && !K.value ? H.value : H.value.map((e, t) => {
891
- let n = K.value ? e.series : Wa(e.series), r = `uniqueId_${t}`;
892
- return {
893
- ...e,
894
- slotAbsoluteIndex: t,
895
- series: K.value ? n.map((e, t) => po(e, t)).filter((e) => e.x >= W.value.start && e.x <= W.value.end) : n.map((e) => ve(e) ? e : null).slice(W.value.start, W.value.end),
896
- color: De(e.color ? e.color : to.value[t] ? to.value[t] : a[t]),
897
- id: r,
898
- scaleLabel: e.scaleLabel || r
899
- };
900
- })), go = b(() => ho.value.map((e, t) => ({
901
- absoluteIndex: t,
902
- ...e,
903
- series: K.value ? e.series.map((e) => ({
904
- ...e,
905
- y: e.y === null ? null : e.y + uo.value
906
- })) : e.series.map((e) => e + uo.value),
907
- absoluteValues: K.value ? e.series.map((e) => e.y) : e.series,
908
- segregate: () => Hs(e),
909
- isSegregated: P.value.includes(e.id)
910
- }))), _o = b(() => ho.value.map((e) => ({
911
- ...e,
912
- series: K.value ? e.series.map((e) => ({
913
- ...e,
914
- y: e.y === null ? null : e.y + uo.value
915
- })) : e.series.map((e) => e + uo.value),
916
- absoluteValues: K.value ? e.series.map((e) => e.y) : e.series
917
- })).filter((e) => !P.value.includes(e.id))), vo = b(() => P.value.length === go.value.length), q = b(() => B.value.chart.grid.labels.yAxis.position === "right");
918
- function yo() {
919
- let e = 0;
920
- Bi.value && (e = Array.from(Bi.value.querySelectorAll("text")).reduce((e, t) => {
921
- let n = t.getComputedTextLength();
922
- return n > e ? n : e;
923
- }, 0));
924
- let t = Ri.value ? Ri.value.getBoundingClientRect().width + B.value.chart.grid.labels.axis.yLabelOffsetX + z.value.yAxis : 0, n = e + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + B.value.chart.grid.labels.yAxis.crosshairSize;
925
- return {
926
- left: q.value ? 0 : n + t,
927
- right: q.value ? n + t : 0,
928
- scaleLabelsOffset: n,
929
- yAxisLabelWidth: t
930
- };
931
- }
932
- function bo(e) {
933
- let t = _o.value.filter((e) => ["line", "plot"].includes(e.type)).flatMap((t) => t.series.map((n, r) => {
934
- let i = wc(n);
935
- return {
936
- datapoint: t,
937
- point: n,
938
- index: r,
939
- x: i,
940
- y: n.y,
941
- distance: Math.abs(i - e)
942
- };
943
- })).filter((e) => g(e.point?.x) && g(e.point?.y)).reduce((e, t) => !e || t.distance < e.distance ? t : e, null);
944
- if (!t) {
945
- Ds.value = [], Os.value = null, ma.value = null;
946
- return;
947
- }
948
- let n = Number(t.point.x);
949
- Ds.value = _o.value.filter((e) => ["line", "plot"].includes(e.type)).map((e) => {
950
- let t = e.series.findIndex((e) => Number(e.x) === n && g(e.y));
951
- if (t === -1) return null;
952
- let r = e.series[t];
953
- return {
954
- datapoint: e,
955
- point: r,
956
- index: t,
957
- x: wc(r),
958
- y: r.y,
959
- distance: 0
960
- };
961
- }).filter(Boolean), Os.value = wc({ x: n }), ma.value = n;
962
- }
963
- function xo(e) {
964
- if (!Number.isFinite(Number(e))) {
965
- Ds.value = [], Os.value = null;
966
- return;
967
- }
968
- let t = wc({ x: Number(e) });
969
- bo(t), Os.value = t;
970
- }
971
- let So = E(0), Co = E(0);
972
- function wo() {
973
- let e = zi.value;
974
- if (!e) {
975
- So.value = 0, Co.value = 0;
976
- return;
977
- }
978
- try {
979
- let t = e.getBBox();
980
- So.value = t?.height ?? 0, Co.value = t?.x ?? 0;
981
- } catch {
982
- So.value = 0, Co.value = 0;
983
- }
984
- }
985
- let To = b(() => {
986
- let e = 0;
987
- if (Li.value) try {
988
- e = Li.value.getBBox().height || 0;
989
- } catch {
990
- e = 0;
991
- }
992
- return e + So.value + z.value.xAxis;
993
- }), Eo = b(() => H.value.some((e) => e.useProgression));
994
- function Do() {
995
- return B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 + B.value.chart.grid.labels.yAxis.labelWidth + B.value.chart.grid.labels.axis.yLabelOffsetX + z.value.dataLabels * .8;
996
- }
997
- let J = b(() => {
998
- ya.value;
999
- let e = 0, t = 0, n = 0, r = 0;
1000
- if (B.value.chart.grid.labels.show) if (V.value.useIndividualScale && !V.value.isStacked) q.value ? t = (H.value.length - P.value.length) * Do() : e = (H.value.length - P.value.length) * (B.value.chart.grid.labels.yAxis.labelWidth + 36);
1001
- else if (V.value.useIndividualScale && V.value.isStacked) {
1002
- let n = B.value.chart.grid.labels.yAxis.labelWidth + 36;
1003
- q.value ? t = n : e = n;
1004
- } else {
1005
- let i = yo();
1006
- e = i.left, t = i.right, n = i.scaleLabelsOffset, r = i.yAxisLabelWidth;
1007
- }
1008
- let i = B.value.chart.labels.fontSize * 1.1, a = Eo.value ? 24 : 6;
1009
- zi.value && Co.value < 0 && (e += Math.abs(Co.value));
1010
- let o = N.value - e - t - a - B.value.chart.padding?.left - B.value.chart.padding?.right;
1011
- return {
1012
- top: B.value.chart.padding?.top + i,
1013
- right: e + (q.value ? 0 : B.value.chart.grid.labels.yAxis.crosshairSize) + B.value.chart.padding?.left + o,
1014
- bottom: Ki.value - To.value - B.value.chart.padding?.bottom - B.value.chart.grid.labels.axis.xLabelOffsetY,
1015
- left: e + (q.value ? 0 : B.value.chart.grid.labels.yAxis.crosshairSize) + B.value.chart.padding?.left,
1016
- height: Ki.value - To.value - B.value.chart.padding?.top - B.value.chart.padding?.bottom - i - B.value.chart.grid.labels.axis.xLabelOffsetY,
1017
- width: o,
1018
- scaleLabelX: e,
1019
- rightScaleLabelX: t,
1020
- scaleLabelsOffset: n,
1021
- yAxisLabelWidth: r,
1022
- individualOffsetX: 36
1023
- };
1024
- }), Oo = b(() => {
1025
- let e = +(B.value.chart.grid.position === "middle"), t = X.value + e, n = h(J.value?.top), r = h(J.value?.bottom);
1026
- return K.value ? B.value.chart.grid.position === "middle" ? Sc.value.map((e, t, i) => {
1027
- if (t === 0) return null;
1028
- let a = i[t - 1], o = a.x + (e.x - a.x) / 2;
1029
- return `M${o},${n} L${o},${r}`;
1030
- }).filter(Boolean).join(" ") : Sc.value.map((e) => `M${e.x},${n} L${e.x},${r}`).join(" ") : Array.from({ length: t }).map((e, t) => {
1031
- let i = B.value.chart.grid.position === "middle" ? nc(t) : tc(t);
1032
- return `M${i},${n} L${i},${r}`;
1033
- }).join(" ");
1034
- }), ko = b(() => {
1035
- if (!B.value.chart.grid.labels.xAxis.showCrosshairs) return "";
1036
- let e = B.value.chart.grid.labels.xAxis.crosshairSize, t = B.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero;
1037
- return (K.value ? Sc.value : Vo.value).map((n, r) => {
1038
- if (!n || !n.text) return null;
1039
- let i = K.value ? n.x : tc(r);
1040
- return `M${i},${t ? gs.value - (gs.value === J.value?.bottom ? 0 : e / 2) : J.value?.bottom} L${i},${t ? gs.value + e / (gs.value === J.value?.bottom ? 1 : 2) : J.value?.bottom + e}`;
1041
- }).filter(Boolean).join(" ");
1042
- });
1043
- function Ao() {
1044
- return !!Ei?.vnode.props?.onSelectTimeLabel;
1045
- }
1046
- function jo(e, t, n) {
1047
- return la.value ||= document.createElement("canvas").getContext("2d"), la.value.font = `${n || "normal"} ${e}px ${t || "sans-serif"}`, la.value;
1048
- }
1049
- function Mo() {
1050
- let e = Ai.value.querySelectorAll(".vue-ui-xy-tag");
1051
- e.length && Array.from(e).forEach((e) => e.style.opacity = "0");
1052
- }
1053
- function No(e, t, n, r, i) {
1054
- n && (ca.value[`${e}_${t}_${r}_${i}`] = n);
1055
- }
1056
- let Po = E(!1);
1057
- async function Fo(e = !1) {
1058
- await ot(), Po.value = e, aa.value && (sa.value = e);
1059
- }
1060
- function Io() {
1061
- Xi.value = !Xi.value;
1062
- }
1063
- let Y = E([]), Lo = E([]), Ro = 0;
1064
- vt(() => {
1065
- let e = ++Ro;
1066
- (async () => {
1067
- let t = Math.max(...H.value.map((e) => we({
1068
- data: e.series,
1069
- threshold: B.value.downsample.threshold
1070
- }).length)), n = await Me({
1071
- values: B.value.chart.grid.labels.xAxisLabels.values,
1072
- maxDatapoints: t,
1073
- formatter: B.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
1074
- start: W.value.start,
1075
- end: W.value.end
1076
- });
1077
- e === Ro && (Y.value = n);
1078
- })();
1079
- });
1080
- let zo = 0;
1081
- vt(() => {
1082
- let e = ++zo;
1083
- (async () => {
1084
- let t = Math.max(...H.value.map((e) => we({
1085
- data: e.series,
1086
- threshold: B.value.downsample.threshold
1087
- }).length)), n = await Me({
1088
- values: B.value.chart.grid.labels.xAxisLabels.values,
1089
- maxDatapoints: t,
1090
- formatter: B.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
1091
- start: 0,
1092
- end: U.value
1093
- });
1094
- e === zo && (Lo.value = n);
1095
- })();
1096
- });
1097
- let Bo = b(() => {
1098
- let e = B.value.chart.grid.labels.xAxisLabels.modulo;
1099
- return Y.value.length ? Math.min(e, [...new Set(Y.value.map((e) => e.text))].length) : e;
1100
- }), Vo = b(() => {
1101
- let e = B.value.chart.grid.labels.xAxisLabels, t = Y.value || [], n = Lo.value || [], r = W.value.start ?? 0, i = R.value, a = X.value, o = t.map((e) => e?.text ?? ""), s = n.map((e) => e?.text ?? "");
1102
- return Ce(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, Bo.value || 1), o, s, r, i, a);
1103
- }), Ho = b(() => (Vo.value || []).map((e) => e?.text ?? "").join("|"));
1104
- ut(() => {
1105
- requestAnimationFrame(() => {
1106
- wo();
1107
- }), _t([
1108
- () => Ho.value,
1109
- () => B.value.chart.grid.labels.xAxisLabels.rotation,
1110
- () => z.value.xAxis,
1111
- () => N.value,
1112
- () => Ki.value
1113
- ], async () => {
1114
- await ot(), requestAnimationFrame(() => {
1115
- wo();
1116
- });
1117
- }, { flush: "post" });
1118
- }), lt(() => {
1119
- So.value = 0, Co.value = 0, xa.stop();
1120
- });
1121
- function Uo(e, t) {
1122
- wi("selectTimeLabel", {
1123
- datapoint: _o.value.map((e) => ({
1124
- shape: e.shape ?? e.type === "bar" ? "square" : "circle",
1125
- name: e.name,
1126
- color: e.color,
1127
- type: e.type,
1128
- value: e.absoluteValues.find((e, n) => n === t),
1129
- comments: e.comments || [],
1130
- prefix: e.prefix || B.value.chart.labels.prefix,
1131
- suffix: e.suffix || B.value.chart.labels.suffix
1132
- })),
1133
- absoluteIndex: e.absoluteIndex,
1134
- label: e.text
1135
- });
1136
- }
1137
- let X = b(() => {
1138
- let e = Ea((W.value.end ?? 0) - (W.value.start ?? 0));
1139
- return Math.max(1, e);
1140
- });
1141
- function Wo(e) {
1142
- K.value || (I.value = e);
1143
- }
1144
- function Go(e) {
1145
- if (!K.value || !g(e)) {
1146
- ma.value = null, Ds.value = [], Os.value = null;
1147
- return;
1148
- }
1149
- ma.value = Number(e), xo(Number(e));
1150
- }
1151
- let Ko = b(() => K.value ? g(ma.value) || g(Os.value) : ![null, void 0].includes(R.value) || ![null, void 0].includes(I.value));
1152
- function qo() {
1153
- V.value.isStacked = !V.value.isStacked, V.value.isStacked ? V.value.useIndividualScale = !0 : V.value.useIndividualScale = B.value.chart.grid.labels.yAxis.useIndividualScale;
1154
- }
1155
- function Jo(e) {
1156
- La.value && e.autoScaling && (B.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${e.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), B.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${e.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
1157
- }
1158
- function Yo(e, t) {
1159
- let n = Ea(e), r = Array(n).fill(0);
1160
- for (let e = 0; e < t.length && e < n; e += 1) r[e] = t[e] ?? 0;
1161
- return r;
1162
- }
1163
- function Xo(e) {
1164
- let t = Math.max(...H.value.map((e) => Wa(e.series).length));
1165
- return e > t ? t : e < 0 || B.value.chart.zoom.startIndex !== null && e < B.value.chart.zoom.startIndex ? B.value.chart.zoom.startIndex === null ? 1 : B.value.chart.zoom.startIndex + 1 : e;
1166
- }
1167
- let Zo = E(!1), Qo = E(!1), $o = E(0), es = E(0);
1168
- function ts(e, t) {
1169
- let n = Number(e), r = Number(t);
1170
- return !Number.isFinite(n) || !Number.isFinite(r) ? !1 : !Object.is(n, r);
1171
- }
1172
- function ns() {
1173
- if (!Zo.value) {
1174
- Zo.value = !0;
1175
- try {
1176
- if (K.value) {
1177
- let e = Tc.value.min, t = Tc.value.max;
1178
- $o.value = e, es.value = t, W.value.start = e, W.value.end = t, Ga.value.start = e, Ga.value.end = t, Qo.value = !0, Mi.value && (Mi.value.setStartValue(e), Mi.value.setEndValue(t));
1179
- return;
1180
- }
1181
- let { startIndex: e, endIndex: t } = B.value.chart.zoom, n = B.value.chart.zoom.keepState ? Math.max(0, ...H.value.map((e) => Wa(e.series).length)) : Math.max(...H.value.map((e) => Wa(e.series).length));
1182
- if (B.value.chart.zoom.keepState && n <= 0) return;
1183
- $o.value = 0, es.value = n;
1184
- let r = e ?? 0, i = t == null ? n : Math.min(Xo(t + 1), n);
1185
- rs.value = !0, W.value.start = r, W.value.end = i, Ga.value.start = r, Ga.value.end = i, Ja(), Qo.value = !0;
1186
- } finally {
1187
- queueMicrotask(() => {
1188
- rs.value = !1;
1189
- }), Zo.value = !1;
1190
- }
1191
- }
1192
- }
1193
- let rs = E(!1);
1194
- function is(e) {
1195
- if (Zo.value || rs.value) return;
1196
- let t = Number(e);
1197
- wi("zoomStart", {
1198
- index: t,
1199
- isZoom: ts(t, $o.value)
1200
- }), Number.isFinite(t) && t !== W.value.start && (W.value.start = t, Ga.value.start = t, Ja());
1201
- }
1202
- function as(e) {
1203
- if (Zo.value || rs.value) return;
1204
- if (K.value) {
1205
- let t = Number(e);
1206
- if (!Number.isFinite(t)) return;
1207
- let n = Math.max(Number(W.value.start) + 1 / 10 ** B.value.chart.grid.labels.xAxis.rounding, Math.min(t, Tc.value.max));
1208
- if (wi("zoomEnd", {
1209
- index: n,
1210
- isZoom: ts(n, es.value)
1211
- }), n === W.value.end) return;
1212
- W.value.end = n, Ga.value.end = n, Ja();
1213
- return;
1214
- }
1215
- let t = Xo(e);
1216
- wi("zoomEnd", {
1217
- index: t,
1218
- isZoom: ts(t, es.value)
1219
- }), t !== W.value.end && (W.value.end = t, Ga.value.end = t, Ja());
1220
- }
1221
- async function os() {
1222
- await ns(), wi("zoomReset");
1223
- }
1224
- function ss(e) {
1225
- return ![
1226
- null,
1227
- void 0,
1228
- NaN,
1229
- Infinity,
1230
- -Infinity
1231
- ].includes(e);
1232
- }
1233
- let cs = b(() => G.value.max + uo.value);
1234
- function ls(e) {
1235
- return e / (ss(cs.value) ? cs.value : 1);
1236
- }
1237
- let us = b(() => B.value.chart.grid.labels.yAxis.reverse);
1238
- function ds(e) {
1239
- return us.value ? 1 - e : e;
1240
- }
1241
- function fs({ ratio: e, yOffset: t = 0, individualHeight: n }) {
1242
- let r = ds(e);
1243
- return J.value?.bottom - t - n * r;
1244
- }
1245
- function ps({ value: e, scaleMin: t, scaleMax: n, yOffset: r = 0, individualHeight: i }) {
1246
- return fs({
1247
- ratio: (e - t) / (n - t || 1),
1248
- yOffset: r,
1249
- individualHeight: i
1250
- });
1251
- }
1252
- let ms = b(() => B.value.chart.grid.labels.xAxis.reverse);
1253
- function hs(e) {
1254
- return ms.value ? 1 - e : e;
1255
- }
1256
- let gs = b(() => isNaN(ls(uo.value)) ? J.value?.bottom : J.value?.bottom - J.value.height * ls(uo.value));
1257
- function _s(e) {
1258
- let t = G.value.min, n = G.value.max - t;
1259
- return !Number.isFinite(e) || !Number.isFinite(n) || n === 0 ? J.value?.bottom : J.value?.bottom - J.value.height * ((e - t) / n);
1260
- }
1261
- let vs = b(() => G.value.min <= 0 && G.value.max >= 0 ? _s(0) : G.value.min > 0 ? _s(G.value.min) : _s(G.value.max));
1262
- function ys(e) {
1263
- let t = ![null, void 0].includes(B.value.chart.grid.labels.yAxis.scaleMin) && B.value.chart.grid.labels.yAxis.scaleMin > 0 && co.value >= 0 ? J.value?.bottom : gs.value;
1264
- return e.value >= 0 ? v(t - e.y <= 0 ? 1e-5 : t - e.y) : v(e.y - gs.value <= 0 ? 1e-5 : e.y - gs.value);
1265
- }
1266
- function bs(e) {
1267
- return e.value >= 0 ? v(e.zeroPosition - e.y <= 0 ? 1e-5 : e.zeroPosition - e.y) : v(e.y - e.zeroPosition <= 0 ? 1e-5 : e.zeroPosition - e.y);
1268
- }
1269
- let xs = b(() => {
1270
- let e = Math.max(1, X.value);
1271
- return {
1272
- bar: Da(Math.max(1, J.value.width), e * Math.max(1, ho.value.filter((e) => e.type === "bar" && !P.value.includes(e.id)).length), 1),
1273
- plot: $s.value,
1274
- line: $s.value
1275
- };
1276
- });
1277
- function Ss() {
1278
- return V.value.useIndividualScale && V.value.isStacked ? xs.value.line - J.value.width / X.value * .1 : xs.value.bar;
1279
- }
1280
- function Cs(e) {
1281
- return V.value.useIndividualScale && V.value.isStacked ? e.x + J.value.width / X.value * .05 : e.x + xs.value.bar / 2;
1282
- }
1283
- function ws(e) {
1284
- return e.value >= 0 ? e.y : [
1285
- null,
1286
- void 0,
1287
- NaN,
1288
- Infinity,
1289
- -Infinity
1290
- ].includes(gs.value) ? J?.bottom.value : gs.value;
1291
- }
1292
- function Ts(e) {
1293
- return e.value >= 0 ? e.y : [
1294
- null,
1295
- void 0,
1296
- NaN,
1297
- Infinity,
1298
- -Infinity
1299
- ].includes(e.zeroPosition) ? 0 : e.zeroPosition;
1300
- }
1301
- let Es = E(null), Ds = E([]), Os = E(null), ks = b(() => K.value ? [...new Set(_o.value.flatMap((e) => e.series || []).filter((e) => g(e?.x) && g(e?.y)).map((e) => Number(e.x)))].sort((e, t) => wc({ x: e }) - wc({ x: t })) : []);
1302
- function As(e) {
1303
- let t = ks.value[e];
1304
- if (!g(t)) {
1305
- Ds.value = [], Os.value = null, ma.value = null, Qi.value = !1;
1306
- return;
1307
- }
1308
- xo(Number(t));
1309
- let n = d(wc({ x: Number(t) }), J.value.top + J.value.height / 2, L.value);
1310
- n && (ga.value = n), R.value = e, ha.value = e, Qi.value = !0;
1311
- }
1312
- function js(e) {
1313
- let t = L.value;
1314
- if (!t) return null;
1315
- if (t.createSVGPoint && t.getScreenCTM) {
1316
- let n = t.createSVGPoint();
1317
- n.x = e.clientX, n.y = e.clientY;
1318
- let r = t.getScreenCTM();
1319
- if (r) {
1320
- let e = n.matrixTransform(r.inverse());
1321
- return {
1322
- x: e.x,
1323
- y: e.y,
1324
- ok: !0
1325
- };
1326
- }
1327
- }
1328
- let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
1329
- x: 0,
1330
- y: 0,
1331
- width: n.width,
1332
- height: n.height
1333
- }, i = Math.min(n.width / r.width, n.height / r.height), a = r.width * i, o = r.height * i, s = (n.width - a) / 2, c = (n.height - o) / 2;
1334
- return {
1335
- x: (e.clientX - n?.left - s) / i + r.x,
1336
- y: (e.clientY - n?.top - c) / i + r.y,
1337
- ok: !0
1338
- };
1339
- }
1340
- let Ms = 0;
1341
- function Ns(e) {
1342
- ha.value = null, !Xi.value && (Ms && cancelAnimationFrame(Ms), Ms = requestAnimationFrame(() => {
1343
- Ms = 0;
1344
- let t = js(e);
1345
- if (!t || !L.value) {
1346
- Ps();
1347
- return;
1348
- }
1349
- let { left: n, right: r, top: i, bottom: a, width: o } = J.value;
1350
- if (t.x < n || t.x > r || t.y < i || t.y > a) {
1351
- Ps();
1352
- return;
1353
- }
1354
- if (K.value) {
1355
- bo(t.x), Hc(!0, R.value ?? 0);
1356
- return;
1357
- }
1358
- let s = ac(t.x);
1359
- s == null ? Ps() : Es.value !== s && (Es.value = s, Hc(!0, s));
1360
- }));
1361
- }
1362
- function Ps() {
1363
- Ms &&= (cancelAnimationFrame(Ms), 0), Es.value = null, Hc(!1, null), Ds.value = [], Os.value = null, ma.value = null;
1364
- }
1365
- function Fs(e) {
1366
- let t = js(e);
1367
- if (t && L.value) {
1368
- let { left: e, right: n, top: r, bottom: i, width: a } = J.value;
1369
- if (t.x >= e && t.x <= n && t.y >= r && t.y <= i) {
1370
- let e = ac(t.x);
1371
- if (e != null) {
1372
- Is(e);
1373
- return;
1374
- }
1375
- }
1376
- }
1377
- Es.value != null && Is(Es.value);
1378
- }
1379
- function Is(e) {
1380
- let t = _o.value.map((t) => ({
1381
- name: t.name,
1382
- value: [
1383
- null,
1384
- void 0,
1385
- NaN
1386
- ].includes(t.absoluteValues[e]) ? null : t.absoluteValues[e],
1387
- color: t.color,
1388
- type: t.type
1389
- }));
1390
- wi("selectX", {
1391
- dataset: t,
1392
- index: e,
1393
- indexLabel: B.value.chart.grid.labels.xAxisLabels.values[e]
1394
- }), B.value.events.datapointClick && B.value.events.datapointClick({
1395
- datapoint: t,
1396
- seriesIndex: e + W.value.start
1397
- });
1398
- }
1399
- function Ls() {
1400
- return go.value.map((e) => ({
1401
- values: e.absoluteValues,
1402
- color: e.color,
1403
- name: e.name,
1404
- type: e.type
1405
- }));
1406
- }
1407
- async function Rs({ scale: e = 2 } = {}) {
1408
- if (!Ai.value) return;
1409
- let { width: t, height: n } = Ai.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await He({
1410
- domElement: Ai.value,
1411
- base64: !0,
1412
- img: !0,
1413
- scale: e
1414
- });
1415
- return {
1416
- imageUri: i,
1417
- base64: a,
1418
- title: B.value.chart.title.text,
1419
- width: t,
1420
- height: n,
1421
- aspectRatio: r
1422
- };
1423
- }
1424
- function zs() {
1425
- P.value.length ? P.value = [] : go.value.forEach((e) => {
1426
- P.value.push(e.id);
1427
- }), Vs();
1428
- }
1429
- function Bs(e, t) {
1430
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Hs(t));
1431
- }
1432
- function Vs() {
1433
- wi("selectLegend", _o.value.map((e) => ({
1434
- name: e.name,
1435
- values: e.absoluteValues,
1436
- color: e.color,
1437
- type: e.type
1438
- })));
1439
- }
1440
- function Hs(e) {
1441
- if (P.value.includes(e.id)) P.value = P.value.filter((t) => t !== e.id);
1442
- else {
1443
- if (P.value.length + 1 === ho.value.length) return;
1444
- P.value.push(e.id);
1445
- }
1446
- Vs(), ia.value += 1;
1447
- }
1448
- function Us(e) {
1449
- return go.value.length ? go.value.find((t) => t.name === e) || (B.value.debug && console.warn(`VueUiXy - Series name not found "${e}"`), null) : (B.value.debug && console.warn("VueUiXy - There are no series to show."), null);
1450
- }
1451
- function Ws(e) {
1452
- let t = Us(e);
1453
- t !== null && P.value.includes(t.id) && Hs({ id: t.id });
1454
- }
1455
- function Gs(e) {
1456
- let t = Us(e);
1457
- t !== null && (P.value.includes(t.id) || Hs({ id: t.id }));
1458
- }
1459
- let Ks = b(() => `${B.value.chart.title.text || "Chart visualization"}. ${B.value.chart.title.subtitle.text || ""}`), qs = b(() => ({ linePlot: X.value > B.value.line.dot.hideAboveMaxSerieLength })), Js = b(() => B.value.chart.userOptions.show && (!B.value.chart.title.show || !B.value.chart.title.text)), Ys = b(() => {
1460
- if (Array.isArray(B.value.chart.highlightArea)) return B.value.chart.highlightArea.map((e) => {
1461
- let t = Math.min(e.to, U.value - 1);
1462
- return {
1463
- ...e,
1464
- span: e.from === t ? 1 : t < e.from ? 0 : t - e.from + 1
1465
- };
1466
- });
1467
- let e = {
1468
- ...B.value.chart.highlightArea,
1469
- to: Math.min(B.value.chart.highlightArea.to, U.value - 1)
1470
- };
1471
- return [{
1472
- ...e,
1473
- span: e.from === e.to ? 1 : e.to < e.from ? 0 : e.to - e.from + 1
1474
- }];
1475
- }), Xs = b(() => Gi.value ? H.value.map((e, t) => ({
1476
- ...e,
1477
- series: Wa(e.series),
1478
- id: `uniqueId_${t}`,
1479
- color: De(e.color ? e.color : to.value[t] ? to.value[t] : a[t])
1480
- })) : H.value), Zs = b(() => _o.value.map((e) => {
1481
- let t = e.absoluteValues.map((e) => [void 0, null].includes(e) ? 0 : e);
1482
- return {
1483
- id: e.id,
1484
- name: e.name,
1485
- color: e.color,
1486
- values: Yo(X.value, t)
1487
- };
1488
- })), Qs = b(() => ({
1489
- responsiveBreakpoint: B.value.table.responsiveBreakpoint,
1490
- roundingValues: B.value.table.rounding,
1491
- showAverage: !1,
1492
- showMedian: !1,
1493
- showTotal: !1,
1494
- fontFamily: B.value.chart.fontFamily,
1495
- prefix: B.value.chart.labels.prefix,
1496
- suffix: B.value.chart.labels.suffix,
1497
- colNames: Y.value.map((e, t) => B.value.table.useDefaultTimeFormat ? e.text : Ic.value(t + W.value.start, B.value.table.timeFormat)),
1498
- thead: {
1499
- backgroundColor: B.value.table.th.backgroundColor,
1500
- color: B.value.table.th.color,
1501
- outline: B.value.table.th.outline
1502
- },
1503
- tbody: {
1504
- backgroundColor: B.value.table.td.backgroundColor,
1505
- color: B.value.table.td.color,
1506
- outline: B.value.table.td.outline
1507
- },
1508
- userOptions: { show: !1 },
1509
- sparkline: { animation: { show: !1 } }
1510
- })), $s = b(() => {
1511
- let e = Math.max(0, J.value?.width || 0);
1512
- return B.value.chart.grid.position === "middle" ? Da(e, Math.max(1, X.value), 1) : Da(e, Math.max(1, X.value - 1), 0);
1513
- }), ec = b(() => B.value.chart.grid.position === "middle" ? $s.value : X.value <= 1 ? Math.max(0, J.value?.width || 0) : $s.value);
1514
- function tc(e) {
1515
- let t = J.value?.left || 0;
1516
- return B.value.chart.grid.position === "middle" ? t + $s.value / 2 + $s.value * e : t + $s.value * e;
1517
- }
1518
- function nc(e) {
1519
- let t = J.value?.left || 0;
1520
- return B.value.chart.grid.position === "middle" ? t + $s.value * e : X.value <= 1 ? t : t + $s.value * e - $s.value / 2;
1521
- }
1522
- function rc(e) {
1523
- return Math.max(J.value?.left || 0, nc(e));
1524
- }
1525
- function ic(e) {
1526
- let t = J.value?.left || 0, n = J.value?.right || 0, r = nc(e), i = r + ec.value;
1527
- return Math.max(1e-5, Math.min(n, i) - Math.max(t, r));
1528
- }
1529
- function ac(e) {
1530
- let t = J.value?.left || 0, n = J.value?.right || 0;
1531
- for (let r = 0; r < X.value; r += 1) {
1532
- let i = Math.max(t, nc(r)), a = Math.min(n, nc(r) + ec.value);
1533
- if (e >= i && e <= a) return r;
1534
- }
1535
- return null;
1536
- }
1537
- function oc(e) {
1538
- let t = J.value?.left || 0, n = J.value?.right || 0, r = nc(e), i = r + ec.value;
1539
- return Math.max(1e-5, Math.min(n, i) - Math.max(t, r));
1540
- }
1541
- function sc(e) {
1542
- return Math.max(1e-5, ec.value * e);
1543
- }
1544
- let cc = b(() => le(go.value.filter((e) => !P.value.includes(e.id))));
1545
- function lc(e, t) {
1546
- let n = Object.create(null);
1547
- for (let r = 0; r < e.length; r += 1) {
1548
- let i = e[r], a = String(t(i));
1549
- n[a] || (n[a] = []), n[a].push(i);
1550
- }
1551
- return n;
1552
- }
1553
- let Z = b(() => {
1554
- let e = lc(cc.value, (e) => e.scaleLabel), t = {};
1555
- for (let [n, r] of Object.entries(e)) {
1556
- let e = r.flatMap((e) => e.absoluteValues);
1557
- t[n] = {
1558
- min: Math.min(...e) || 0,
1559
- max: Math.max(...e) || 1,
1560
- groupId: `scale_group_${c()}`
1561
- };
1562
- }
1563
- return t;
1564
- }), uc = b(() => {
1565
- let e = ho.value.filter((e) => e.type === "bar").filter((e) => !P.value.includes(e.id)).length;
1566
- return J.value.width / X.value / e - dc.value * e;
1567
- }), dc = b(() => xs.value.line * B.value.bar.periodGap), fc = b(() => Math.max(1e-5, Ss() - (V.value.useIndividualScale && V.value.isStacked ? 0 : dc.value))), pc = b(() => fc.value * Math.min(Math.abs(B.value.bar.innerGap), .95)), mc = b(() => {
1568
- if (!B.value.chart.zoom.minimap.show) return [];
1569
- let e = Xs.value.filter((e) => !P.value.includes(e.id)), t = Math.max(...e.map((e) => e.series.length)), n = [];
1570
- for (let r = 0; r < t; r += 1) n.push(e.map((e) => e.series[r] || 0).reduce((e, t) => (e || 0) + (t || 0), 0));
1571
- let r = Math.min(...n);
1572
- return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
1573
- }), hc = b(() => B.value.chart.zoom.minimap.show ? Xs.value.map((e) => ({
1574
- ...e,
1575
- isVisible: !P.value.includes(e.id)
1576
- })) : []), gc = b(() => K.value ? Ds.value.map((e) => ({
1577
- slotAbsoluteIndex: e.datapoint.slotAbsoluteIndex,
1578
- shape: e.datapoint.shape || e.datapoint.type === "bar" ? "square" : "circle",
1579
- name: e.datapoint.name,
1580
- color: e.datapoint.color,
1581
- type: e.datapoint.type,
1582
- value: e.point.raw?.y ?? e.point.y,
1583
- x: e.point.raw?.x ?? e.point.x,
1584
- comments: e.datapoint.comments || [],
1585
- prefix: e.datapoint.prefix || B.value.chart.labels.prefix,
1586
- suffix: e.datapoint.suffix || B.value.chart.labels.suffix
1587
- })) : _o.value.map((e) => ({
1588
- slotAbsoluteIndex: e.slotAbsoluteIndex,
1589
- shape: e.shape || e.type === "bar" ? "square" : "circle",
1590
- name: e.name,
1591
- color: e.color,
1592
- type: e.type,
1593
- value: e.absoluteValues.find((e, t) => t === R.value),
1594
- comments: e.comments || [],
1595
- prefix: e.prefix || B.value.chart.labels.prefix,
1596
- suffix: e.suffix || B.value.chart.labels.suffix
1597
- }))), _c = b(() => G.value.ticks.map((e) => {
1598
- let t = e >= 0 ? gs.value - J.value.height * ls(e) : gs.value + J.value.height * ls(Math.abs(e));
1599
- return {
1600
- y: us.value ? J.value.top + J.value.bottom - t : t,
1601
- value: e,
1602
- prefix: B.value.chart.labels.prefix,
1603
- suffix: B.value.chart.labels.suffix
1604
- };
1605
- })), vc = b(() => {
1606
- let e = B.value.chart.annotations;
1607
- if (!e || !Array.isArray(e) || e.every((e) => !e.show)) return [];
1608
- let t = e.filter((e) => e.show && (e.yAxis.yTop != null || e.yAxis.yBottom != null));
1609
- if (!t.length) return [];
1610
- let { left: n, right: r } = J.value, i = gs.value, a = J.value.height, o = G.value.min, s = G.value.max - o, l = (e) => i - (e - 0) / s * a;
1611
- return t.map((e) => {
1612
- let { yAxis: { yTop: t, yBottom: i, label: a } } = e, o = t != null && i != null && t !== i, s = t == null ? null : l(t), u = i == null ? null : l(i), ee = jo(a.fontSize);
1613
- ee.font = `${a.fontSize}px sans-serif`;
1614
- let d = ee.measureText(a.text).width, te = a.fontSize, f = (a.position === "start" ? n + a.padding?.left : r - a.padding?.right) + a.offsetX, p = (s != null && u != null ? Math.min(s, u) : s ?? u) - a.fontSize / 3 + a.offsetY - a.padding?.top, ne;
1615
- ne = a.textAnchor === "middle" ? f - d / 2 - a.padding?.left : a.textAnchor === "end" ? f - d - a.padding?.right : f - a.padding?.left;
1616
- let re = p - te * .75 - a.padding?.top;
1617
- return {
1618
- show: ![
1619
- s,
1620
- u,
1621
- re
1622
- ].includes(NaN),
1623
- id: `annotation_y_${c()}`,
1624
- hasArea: o,
1625
- areaHeight: o ? Math.abs(s - u) : 0,
1626
- yTop: s,
1627
- yBottom: u,
1628
- config: e.yAxis,
1629
- x1: n,
1630
- x2: r,
1631
- _text: {
1632
- x: f,
1633
- y: p
1634
- },
1635
- _box: {
1636
- x: ne,
1637
- y: re,
1638
- width: d + a.padding?.left + a.padding?.right,
1639
- height: te + a.padding?.top + a.padding?.bottom,
1640
- fill: a.backgroundColor,
1641
- stroke: a.border.stroke,
1642
- rx: a.border.rx,
1643
- ry: a.border.ry,
1644
- strokeWidth: a.border.strokeWidth
1645
- }
1646
- };
1647
- });
1648
- });
1649
- function yc(e, t) {
1650
- let n = e[t - 1], r = e[t + 1], i = !!n && !!r && n.value == null && r.value == null || !n && !!r && r.value == null || !!n && !r && n.value == null;
1651
- return ss(e[t].value) && i && B.value.line.cutNullValues;
1652
- }
1653
- let bc = b(() => {
1654
- let e = ho.value.flatMap((e) => e.series.map((e) => e.x)).filter(Number.isFinite);
1655
- if (!e.length) return {
1656
- min: 0,
1657
- max: 1
1658
- };
1659
- let t = Math.min(...e), n = Math.max(...e);
1660
- return {
1661
- min: t,
1662
- max: t === n ? n + 1 : n
1663
- };
1664
- }), xc = b(() => {
1665
- let e = B.value.chart.grid.labels.xAxis.commonScaleSteps, t = B.value.chart.grid.labels.xAxis.scaleMin, n = B.value.chart.grid.labels.xAxis.scaleMax, r = t !== null && Number.isFinite(Number(t)) ? Number(t) : bc.value.min, i = n !== null && Number.isFinite(Number(n)) ? Number(n) : bc.value.max, a = B.value.chart.grid.labels.xAxis.useNiceScale ? fe(r, i, e) : de(r, i, e);
1666
- if (B.value.chart.grid.position !== "start") return a;
1667
- let o = a.ticks.length > 1 ? a.ticks[1] - a.ticks[0] : 1;
1668
- return {
1669
- ...a,
1670
- max: a.max + o
1671
- };
1672
- }), Sc = b(() => K.value ? (ms.value ? [...xc.value.ticks].reverse() : [...xc.value.ticks]).map((e, t) => ({
1673
- id: `continuous_x_label_${t}`,
1674
- text: _(B.value.chart.grid.labels.xAxis.formatter, e, s({
1675
- v: e,
1676
- s: B.value.chart.labels.prefix,
1677
- p: B.value.chart.labels.suffix,
1678
- r: B.value.chart.grid.labels.xAxis.rounding
1679
- }), {
1680
- datapoint: e,
1681
- seriesIndex: t
1682
- }),
1683
- value: e,
1684
- x: wc({ x: e }),
1685
- index: t
1686
- })) : Vo.value);
1687
- function Cc(e, t) {
1688
- return K.value ? e.x : tc(t);
1689
- }
1690
- function wc({ x: e }) {
1691
- let t = xc.value.max - xc.value.min || 1, n = hs((e - xc.value.min) / t);
1692
- return J.value.left + J.value.width * n;
1693
- }
1694
- let Tc = b(() => {
1695
- let e = H.value.flatMap((e) => e.series || []).filter(fo).map((e) => Number(e.x)).filter(Number.isFinite);
1696
- if (!e.length) return {
1697
- min: 0,
1698
- max: 1
1699
- };
1700
- let t = Math.min(...e), n = Math.max(...e);
1701
- return {
1702
- min: t,
1703
- max: t === n ? n + 1 : n
1704
- };
1705
- }), Ec = b(() => K.value ? Tc.value.min : 0), Dc = b(() => K.value ? Tc.value.max : U.value);
1706
- function Oc(e, t) {
1707
- return K.value ? e.x == null || e.y == null ? null : wc(e) : tc(t);
1708
- }
1709
- function kc({ datapoint: e, totalSeries: t, gap: n, usableHeight: r, autoScaleValueMin: i, autoScaleValueMax: a, individualExtremes: o, forceExactScale: s = !1 }) {
1710
- let c = e.scaleSteps || B.value.chart.grid.labels.yAxis.commonScaleSteps, l = 1.0000001, u = s || !B.value.chart.grid.labels.yAxis.useNiceScale ? de : fe, ee = o.max === o.min ? o.max * l : o.max, d = a === i ? a * l : a, te = u(o.min, ee, c), f = u(i, d, c), p = te.min >= 0 ? 0 : Math.abs(te.min), ne = te.max + Math.abs(p), re = f.max + 0, ie = e.stackIndex, ae = t - 1 - ie, oe = V.value.isStacked ? 1 - e.cumulatedStackRatio : 0, se = V.value.isStacked ? r * oe + n * ae : 0, ce = V.value.isStacked ? r * e.stackRatio : J.value.height;
1711
- return {
1712
- scaleSteps: c,
1713
- individualScale: te,
1714
- autoScaleSteps: f,
1715
- individualZero: p,
1716
- autoScaleZero: 0,
1717
- individualMax: ne,
1718
- autoScaleMax: re,
1719
- yOffset: se,
1720
- individualHeight: ce,
1721
- zeroPosition: J.value?.bottom - se - ce * p / ne,
1722
- autoScaleZeroPosition: J.value?.bottom - se - ce * 0 / re
1723
- };
1724
- }
1725
- let Ac = b(() => {
1726
- let e = cc.value.filter((e) => [
1727
- "bar",
1728
- "line",
1729
- "plot"
1730
- ].includes(e.type)), t = e.length, n = B.value.chart.grid.labels.yAxis.gap, r = V.value.isStacked ? n * (t - 1) : 0, i = J.value.height - r;
1731
- return e.filter((e) => e.type === "bar").map((e, r) => {
1732
- Jo(e);
1733
- let a = Z.value[e.scaleLabel].min, o = Z.value[e.scaleLabel].max, s = {
1734
- ratios: e.absoluteValues.filter((e) => ![null, void 0].includes(e)).map((e) => (e - a) / (o - a)),
1735
- valueMin: a,
1736
- valueMax: o < 0 ? 0 : o
1737
- }, c = {
1738
- max: e.scaleMax || Math.max(...e.absoluteValues) || 1,
1739
- min: e.scaleMin || Math.min(...e.absoluteValues.filter((e) => ![void 0, null].includes(e))) > 0 ? 0 : Math.min(...e.absoluteValues.filter((e) => ![null, void 0].includes(e)))
1740
- }, { individualScale: l, autoScaleSteps: u, individualZero: ee, individualMax: d, autoScaleMax: te, yOffset: f, individualHeight: p, zeroPosition: ne, autoScaleZeroPosition: re } = kc({
1741
- datapoint: e,
1742
- totalSeries: t,
1743
- gap: n,
1744
- usableHeight: i,
1745
- autoScaleValueMin: s.valueMin,
1746
- autoScaleValueMax: s.valueMax,
1747
- individualExtremes: c
1748
- }), ie = go.value.filter((e) => e.type === "bar").filter((e) => !P.value.includes(e.id)).length, ae = e.series.map((t, n) => {
1749
- let i = V.value.useIndividualScale ? (e.absoluteValues[n] + ee) / d : ls(t), a = V.value.useIndividualScale && V.value.isStacked ? J.value?.left + J.value.width / X.value * n : J.value?.left + xs.value.bar * r + xs.value.bar * n * ie - uc.value / 2 - r * dc.value;
1750
- return {
1751
- yOffset: v(f),
1752
- individualHeight: v(p),
1753
- x: v(a),
1754
- y: fs({
1755
- ratio: i,
1756
- yOffset: f,
1757
- individualHeight: p
1758
- }),
1759
- value: e.absoluteValues[n],
1760
- zeroPosition: v(ne),
1761
- individualMax: v(d),
1762
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1763
- };
1764
- }), oe = e.absoluteValues.map((e) => u.min >= 0 ? (e - Math.abs(u.min)) / (u.max - Math.abs(u.min)) : (e + Math.abs(u.min)) / (u.max + Math.abs(u.min))), se = e.series.map((t, n) => {
1765
- let i = V.value.useIndividualScale && V.value.isStacked ? J.value?.left + J.value.width / X.value * n : J.value?.left - xs.value.bar / 2 + xs.value.bar * r + xs.value.bar * n * go.value.filter((e) => e.type === "bar").filter((e) => !P.value.includes(e.id)).length;
1766
- return {
1767
- yOffset: v(f),
1768
- individualHeight: v(p),
1769
- x: v(i),
1770
- y: v(fs({
1771
- ratio: oe[n] || 0,
1772
- yOffset: v(f),
1773
- individualHeight: v(p)
1774
- })),
1775
- value: e.absoluteValues[n],
1776
- zeroPosition: v(ne),
1777
- individualMax: v(d),
1778
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1779
- };
1780
- }), ce = l.ticks.map((t) => ({
1781
- y: ps({
1782
- value: t,
1783
- scaleMin: l.min,
1784
- scaleMax: l.max,
1785
- yOffset: f,
1786
- individualHeight: p
1787
- }),
1788
- value: t,
1789
- prefix: e.prefix || B.value.chart.labels.prefix,
1790
- suffix: e.suffix || B.value.chart.labels.suffix,
1791
- datapoint: e
1792
- })), le = u.ticks.map((t) => ({
1793
- y: fs({
1794
- ratio: (t - u.min) / (u.max - u.min || 1),
1795
- yOffset: f,
1796
- individualHeight: p
1797
- }),
1798
- value: t,
1799
- prefix: e.prefix || B.value.chart.labels.prefix,
1800
- suffix: e.suffix || B.value.chart.labels.suffix,
1801
- datapoint: e
1802
- }));
1803
- return Z.value[e.scaleLabel].name = e.name, Z.value[e.scaleLabel].groupName = e.scaleLabel, Z.value[e.scaleLabel].groupColor = B.value.chart.grid.labels.yAxis.groupColor || e.color, Z.value[e.scaleLabel].color = e.color, Z.value[e.scaleLabel].scaleYLabels = e.autoScaling ? le : ce, Z.value[e.scaleLabel].zeroPosition = e.autoScaling ? re : ne, Z.value[e.scaleLabel].individualMax = e.autoScaling ? te : d, Z.value[e.scaleLabel].scaleLabel = e.scaleLabel, Z.value[e.scaleLabel].id = e.id, Z.value[e.scaleLabel].yOffset = f, Z.value[e.scaleLabel].individualHeight = p, Z.value[e.scaleLabel].autoScaleYLabels = le, Z.value[e.scaleLabel].unique = cc.value.filter((t) => t.scaleLabel === e.scaleLabel).length === 1, {
1804
- ...e,
1805
- yOffset: f,
1806
- autoScaleYLabels: le,
1807
- individualHeight: p,
1808
- scaleYLabels: e.autoScaling ? le : ce,
1809
- individualScale: e.autoScaling ? u : l,
1810
- individualMax: e.autoScaling ? te : d,
1811
- zeroPosition: e.autoScaling ? re : ne,
1812
- plots: e.autoScaling ? se : ae,
1813
- groupId: Z.value[e.scaleLabel].groupId
1814
- };
1815
- });
1816
- }), Q = b(() => {
1817
- let e = cc.value.filter((e) => [
1818
- "bar",
1819
- "line",
1820
- "plot"
1821
- ].includes(e.type)), t = e.length, n = B.value.chart.grid.labels.yAxis.gap, r = V.value.isStacked ? n * (t - 1) : 0, i = J.value.height - r;
1822
- return e.filter((e) => e.type === "line").map((e, r) => {
1823
- Jo(e);
1824
- let a = Z.value[e.scaleLabel].min, s = Z.value[e.scaleLabel].max, c = {
1825
- ratios: e.absoluteValues.filter((e) => ![null, void 0].includes(e)).map((e) => (e - a) / (s - a)),
1826
- valueMin: a,
1827
- valueMax: s
1828
- }, u = {
1829
- max: e.scaleMax || Math.max(...e.absoluteValues) || 1,
1830
- min: e.scaleMin || (Math.min(...e.absoluteValues) > 0 ? 0 : Math.min(...e.absoluteValues))
1831
- }, { individualScale: d, autoScaleSteps: f, individualZero: p, individualMax: re, autoScaleMax: ae, yOffset: oe, individualHeight: ce, zeroPosition: le, autoScaleZeroPosition: ue } = kc({
1832
- datapoint: e,
1833
- totalSeries: t,
1834
- gap: n,
1835
- usableHeight: i,
1836
- autoScaleValueMin: c.valueMin,
1837
- autoScaleValueMax: c.valueMax,
1838
- individualExtremes: u
1839
- }), m = e.series.map((t, n) => {
1840
- if (K.value && (t.x == null || t.y == null)) return {
1841
- index: n,
1842
- x: null,
1843
- y: null,
1844
- value: null,
1845
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1846
- };
1847
- let r = V.value.useIndividualScale ? (e.absoluteValues[n] + Math.abs(p)) / re : ls(mo(t));
1848
- return {
1849
- index: n,
1850
- x: v(Oc(t, n)),
1851
- y: v(fs({
1852
- ratio: r,
1853
- yOffset: oe,
1854
- individualHeight: ce
1855
- })),
1856
- value: e.absoluteValues[n],
1857
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1858
- };
1859
- }), h = e.absoluteValues.map((e) => f.min >= 0 ? (e - Math.abs(f.min)) / (f.max - Math.abs(f.min)) : (e + Math.abs(f.min)) / (f.max + Math.abs(f.min))), de = e.series.map((t, n) => K.value && (t.x === null || t.y === null) ? {
1860
- index: n,
1861
- x: null,
1862
- y: null,
1863
- value: null,
1864
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1865
- } : [void 0, null].includes(e.absoluteValues[n]) ? {
1866
- index: n,
1867
- x: v(Oc(t, n)),
1868
- y: le,
1869
- value: e.absoluteValues[n],
1870
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1871
- } : {
1872
- index: n,
1873
- x: v(Oc(t, n)),
1874
- y: v(fs({
1875
- ratio: h[n] || 0,
1876
- yOffset: oe,
1877
- individualHeight: ce
1878
- })),
1879
- value: e.absoluteValues[n],
1880
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1881
- }), fe = e.dashIndices && Array.isArray(e.dashIndices) && e?.dashIndices?.length > 0, g = B.value.line.cutNullValues ? pe(m) : he(m.filter((e) => e.value !== null)), _ = B.value.line.cutNullValues ? pe(de) : he(de.filter((e) => e.value !== null)), me = B.value.line.cutNullValues ? ee(m) : l(m.filter((e) => e.value !== null)), ge = B.value.line.cutNullValues ? ee(de) : l(de.filter((e) => e.value !== null)), _e = o(B.value.line.cutNullValues ? m : m.filter((e) => e.value !== null)), ve = o(B.value.line.cutNullValues ? de : de.filter((e) => e.value !== null)), ye = fe ? ie(B.value.line.cutNullValues ? m : m.filter((e) => e.value !== null), e.dashIndices.map((e) => e - W.value.start)) : [], be = fe ? te(B.value.line.cutNullValues ? m : m.filter((e) => e.value !== null), e.dashIndices.map((e) => e - W.value.start)) : [], xe = d.ticks.map((t) => ({
1882
- y: ps({
1883
- value: t,
1884
- scaleMin: d.min,
1885
- scaleMax: d.max,
1886
- yOffset: oe,
1887
- individualHeight: ce
1888
- }),
1889
- value: t,
1890
- prefix: e.prefix || B.value.chart.labels.prefix,
1891
- suffix: e.suffix || B.value.chart.labels.suffix,
1892
- datapoint: e
1893
- })), Se = f.ticks.map((t) => ({
1894
- y: fs({
1895
- ratio: (t - f.min) / (f.max - f.min || 1),
1896
- yOffset: oe,
1897
- individualHeight: ce
1898
- }),
1899
- value: t,
1900
- prefix: e.prefix || B.value.chart.labels.prefix,
1901
- suffix: e.suffix || B.value.chart.labels.suffix,
1902
- datapoint: e
1903
- }));
1904
- Z.value[e.scaleLabel].name = e.name, Z.value[e.scaleLabel].groupName = e.scaleLabel, Z.value[e.scaleLabel].groupColor = B.value.chart.grid.labels.yAxis.groupColor || e.color, Z.value[e.scaleLabel].color = e.color, Z.value[e.scaleLabel].scaleYLabels = e.autoScaling ? Se : xe, Z.value[e.scaleLabel].zeroPosition = e.autoScaling ? ue : le, Z.value[e.scaleLabel].individualMax = e.autoScaling ? ae : re, Z.value[e.scaleLabel].scaleLabel = e.scaleLabel, Z.value[e.scaleLabel].id = e.id, Z.value[e.scaleLabel].yOffset = oe, Z.value[e.scaleLabel].individualHeight = ce, Z.value[e.scaleLabel].autoScaleYLabels = Se, Z.value[e.scaleLabel].unique = cc.value.filter((t) => t.scaleLabel === e.scaleLabel).length === 1;
1905
- let Ce = V.value.useIndividualScale ? e.autoScaling ? ue : le : ro.value, we = Math.max(Math.max(e.autoScaling ? ue : xe.at(-1) ? xe.at(-1).y : 0, J.value?.top), Ce), Ee = e.autoScaling ? de : m, Oe = B.value.line.cutNullValues ? Ee : Ee.filter((e) => e.value !== null), ke = e.absoluteValues.filter((e) => ![
1906
- null,
1907
- void 0,
1908
- NaN
1909
- ].includes(e)), Ae = !!e.temperatureColors && new Set(ke).size <= 1;
1910
- return {
1911
- ...e,
1912
- isFlatTemperatureLine: Ae,
1913
- temperatureColors: e.temperatureColors ? e.temperatureColors.map((e) => De(e)) : null,
1914
- yOffset: oe,
1915
- autoScaleYLabels: Se,
1916
- individualHeight: ce,
1917
- scaleYLabels: e.autoScaling ? Se : xe,
1918
- individualScale: e.autoScaling ? f : d,
1919
- individualMax: e.autoScaling ? ae : re,
1920
- zeroPosition: e.autoScaling ? ue : le,
1921
- curve: e.useStepper ? e.autoScaling ? ve : _e : e.autoScaling ? _ : g,
1922
- plots: e.autoScaling ? de : m,
1923
- dashedStraight: ye,
1924
- dashedSmooth: be,
1925
- hasDashedSegments: fe,
1926
- area: e.useArea ? e.useStepper ? o(Oe, we) : V.value.useIndividualScale ? B.value.line.cutNullValues ? se(e.autoScaling ? de : m, we) : Te(e.autoScaling ? de.filter((e) => e.value !== null) : m.filter((e) => e.value !== null), we) : B.value.line.cutNullValues ? se(m, we) : Te(m.filter((e) => e.value !== null), we) : "",
1927
- curveAreas: e.useArea ? e.useStepper ? o(Oe, we).split(";").filter(Boolean).map((e) => `M${e}Z`) : ne(e.autoScaling ? B.value.line.cutNullValues ? de : de.filter((e) => e.value !== null) : B.value.line.cutNullValues ? m : m.filter((e) => e.value !== null), we, B.value.line.cutNullValues) : [],
1928
- straight: e.useStepper ? e.autoScaling ? ve : _e : e.autoScaling ? ge : me,
1929
- groupId: Z.value[e.scaleLabel].groupId
1930
- };
1931
- });
1932
- }), $ = b(() => {
1933
- let e = cc.value.filter((e) => [
1934
- "bar",
1935
- "line",
1936
- "plot"
1937
- ].includes(e.type)), t = e.length, n = B.value.chart.grid.labels.yAxis.gap, r = V.value.isStacked ? n * (t - 1) : 0, i = J.value.height - r;
1938
- return e.filter((e) => e.type === "plot").map((e) => {
1939
- Jo(e);
1940
- let r = Z.value[e.scaleLabel].min, a = Z.value[e.scaleLabel].max, o = {
1941
- ratios: e.absoluteValues.filter((e) => ![null, void 0].includes(e)).map((e) => (e - r) / (a - r)),
1942
- valueMin: r,
1943
- valueMax: a
1944
- }, s = {
1945
- max: e.scaleMax || Math.max(...e.absoluteValues) || 1,
1946
- min: e.scaleMin || Math.min(...e.absoluteValues) > 0 ? 0 : Math.min(...e.absoluteValues)
1947
- }, { individualScale: c, autoScaleSteps: l, individualZero: u, individualMax: ee, autoScaleMax: d, yOffset: te, individualHeight: f, zeroPosition: p, autoScaleZeroPosition: ne } = kc({
1948
- datapoint: e,
1949
- totalSeries: t,
1950
- gap: n,
1951
- usableHeight: i,
1952
- autoScaleValueMin: o.valueMin,
1953
- autoScaleValueMax: o.valueMax,
1954
- individualExtremes: s,
1955
- forceExactScale: !0
1956
- }), re = e.series.map((t, n) => {
1957
- if (K.value && (t.x == null || t.y == null)) return {
1958
- index: n,
1959
- x: null,
1960
- y: null,
1961
- value: null,
1962
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1963
- };
1964
- let r = V.value.useIndividualScale ? (e.absoluteValues[n] + Math.abs(u)) / ee : ls(mo(t));
1965
- return {
1966
- index: n,
1967
- x: v(Oc(t, n)),
1968
- y: v(fs({
1969
- ratio: r,
1970
- yOffset: te,
1971
- individualHeight: f
1972
- })),
1973
- value: e.absoluteValues[n],
1974
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1975
- };
1976
- }), ie = e.absoluteValues.map((e) => l.min >= 0 ? (e - Math.abs(l.min)) / (l.max - Math.abs(l.min)) : (e + Math.abs(l.min)) / (l.max + Math.abs(l.min))), ae = e.series.map((t, n) => K.value && (t.x === null || t.y === null) ? {
1977
- index: n,
1978
- x: null,
1979
- y: null,
1980
- value: null,
1981
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1982
- } : {
1983
- index: n,
1984
- x: v(Oc(t, n)),
1985
- y: v(fs({
1986
- ratio: ie[n] || 0,
1987
- yOffset: te,
1988
- individualHeight: f
1989
- })),
1990
- value: e.absoluteValues[n],
1991
- comment: e.comments && e.comments.slice(W.value.start, W.value.end)[n] || ""
1992
- }), oe = c.ticks.map((t) => ({
1993
- y: ps({
1994
- value: t,
1995
- scaleMin: c.min,
1996
- scaleMax: c.max,
1997
- yOffset: te,
1998
- individualHeight: f
1999
- }),
2000
- value: t,
2001
- prefix: e.prefix || B.value.chart.labels.prefix,
2002
- suffix: e.suffix || B.value.chart.labels.suffix,
2003
- datapoint: e
2004
- })), se = l.ticks.map((t) => ({
2005
- y: fs({
2006
- ratio: (t - l.min) / (l.max - l.min || 1),
2007
- yOffset: te,
2008
- individualHeight: f
2009
- }),
2010
- value: t,
2011
- prefix: e.prefix || B.value.chart.labels.prefix,
2012
- suffix: e.suffix || B.value.chart.labels.suffix,
2013
- datapoint: e
2014
- }));
2015
- return Z.value[e.scaleLabel].name = e.name, Z.value[e.scaleLabel].groupName = e.scaleLabel, Z.value[e.scaleLabel].groupColor = B.value.chart.grid.labels.yAxis.groupColor || e.color, Z.value[e.scaleLabel].color = e.color, Z.value[e.scaleLabel].scaleYLabels = e.autoScaling ? se : oe, Z.value[e.scaleLabel].zeroPosition = e.autoScaling ? ne : p, Z.value[e.scaleLabel].individualMax = e.autoScaling ? d : ee, Z.value[e.scaleLabel].scaleLabel = e.scaleLabel, Z.value[e.scaleLabel].id = e.id, Z.value[e.scaleLabel].yOffset = te, Z.value[e.scaleLabel].individualHeight = f, Z.value[e.scaleLabel].autoScaleYLabels = se, Z.value[e.scaleLabel].unique = cc.value.filter((t) => t.scaleLabel === e.scaleLabel).length === 1, {
2016
- ...e,
2017
- yOffset: te,
2018
- autoScaleYLabels: se,
2019
- individualHeight: f,
2020
- scaleYLabels: e.autoScaling ? se : oe,
2021
- individualScale: e.autoScaling ? l : c,
2022
- individualMax: e.autoScaling ? d : ee,
2023
- zeroPosition: e.autoScaling ? ne : p,
2024
- plots: e.autoScaling ? ae : re,
2025
- groupId: Z.value[e.scaleLabel].groupId
2026
- };
2027
- });
2028
- }), jc = b(() => {
2029
- let e = Q.value.map((e) => ({
2030
- name: e.name,
2031
- color: e.color,
2032
- scale: e.individualScale,
2033
- scaleYLabels: e.scaleYLabels,
2034
- zero: e.zeroPosition,
2035
- max: e.individualMax,
2036
- scaleLabel: e.scaleLabel || "",
2037
- id: e.id,
2038
- yOffset: e.yOffset || 0,
2039
- individualHeight: e.individualHeight || J.value.height,
2040
- autoScaleYLabels: e.autoScaleYLabels
2041
- })), t = Ac.value.map((e) => ({
2042
- name: e.name,
2043
- color: e.color,
2044
- scale: e.individualScale,
2045
- scaleYLabels: e.scaleYLabels,
2046
- zero: e.zeroPosition,
2047
- max: e.individualMax,
2048
- scaleLabel: e.scaleLabel || "",
2049
- id: e.id,
2050
- yOffset: e.yOffset || 0,
2051
- individualHeight: e.individualHeight || J.value.height
2052
- })), n = $.value.map((e) => ({
2053
- name: e.name,
2054
- color: e.color,
2055
- scale: e.individualScale,
2056
- scaleYLabels: e.scaleYLabels,
2057
- zero: e.zeroPosition,
2058
- max: e.individualMax,
2059
- scaleLabel: e.scaleLabel || "",
2060
- id: e.id,
2061
- yOffset: e.yOffset || 0,
2062
- individualHeight: e.individualHeight || J.value.height
2063
- })), r = V.value.useIndividualScale && !V.value.isStacked ? Object.values(Z.value) : [
2064
- ...e,
2065
- ...t,
2066
- ...n
2067
- ], i = r.flatMap((e) => e).length;
2068
- return r.flatMap((e, t) => {
2069
- let n = 0;
2070
- n = V.value.isStacked ? q.value ? J.value?.right : J.value?.left : q.value ? J.value?.right + Do() * t : J.value?.left / i * (t + 1);
2071
- let r = V.value.useIndividualScale && !V.value.isStacked ? e.unique ? e.name : e.groupName : e.name;
2072
- return {
2073
- unique: e.unique,
2074
- id: e.id,
2075
- groupId: e.groupId,
2076
- scaleLabel: e.scaleLabel,
2077
- name: _(B.value.chart.grid.labels.yAxis.serieNameFormatter, r, r, e),
2078
- color: V.value.useIndividualScale && !V.value.isStacked ? e.unique ? e.color : e.groupColor : e.color,
2079
- scale: e.scale,
2080
- yOffset: e.yOffset,
2081
- individualHeight: e.individualHeight,
2082
- x: n,
2083
- yLabels: e.scaleYLabels || e.scale.ticks.map((t) => ({
2084
- y: ps({
2085
- value: t,
2086
- scaleMin: e.scale.min,
2087
- scaleMax: e.scale.max,
2088
- yOffset: e.yOffset || 0,
2089
- individualHeight: e.individualHeight
2090
- }),
2091
- value: t
2092
- }))
2093
- };
2094
- });
2095
- }), Mc = b(() => {
2096
- let e = B.value.line.interLine || {}, t = e.pairs || [], n = e.colors || [];
2097
- if (!t.length) return [];
2098
- let r = [];
2099
- return t.forEach((e, t) => {
2100
- let [i, a] = Array.isArray(e) ? e : [e.a, e.b];
2101
- if (!i || !a) return;
2102
- let o = Q.value.find((e) => e.name === i), s = Q.value.find((e) => e.name === a);
2103
- if (!o || !s || o.type !== "line" || s.type !== "line") return;
2104
- let c = n?.[t]?.[0] ?? o.color, l = n?.[t]?.[1] ?? s.color;
2105
- ue({
2106
- lineA: o.plots,
2107
- lineB: s.plots,
2108
- smoothA: !!o.smooth,
2109
- smoothB: !!s.smooth,
2110
- colorLineA: c,
2111
- colorLineB: l,
2112
- sampleStepPx: 2,
2113
- cutNullValues: B.value.line.cutNullValues
2114
- }).forEach((e, n) => {
2115
- r.push({
2116
- ...e,
2117
- key: `inter_${i}_${a}_${t}_${n}`
2118
- });
2119
- });
2120
- }), r;
2121
- }), Nc = b(() => ({
2122
- timeLabel: Y.value[R.value],
2123
- datapoint: gc.value,
2124
- seriesIndex: R.value,
2125
- series: go.value,
2126
- bars: Ac.value,
2127
- lines: Q.value,
2128
- plots: $.value,
2129
- config: B.value
2130
- })), Pc = E({
2131
- months: [],
2132
- shortMonths: [],
2133
- days: [],
2134
- shortDays: []
2135
- }), Fc = 0;
2136
- vt(() => {
2137
- let e = ++Fc, t = B.value.chart.grid.labels.xAxisLabels.datetimeFormatter;
2138
- (async () => {
2139
- let n = await je(t.locale).catch(() => je("en"));
2140
- e === Fc && (Pc.value = n.data);
2141
- })();
2142
- });
2143
- let Ic = b(() => {
2144
- let e = B.value.chart.grid.labels.xAxisLabels.datetimeFormatter, t = Ae({
2145
- useUTC: e.useUTC,
2146
- locale: Pc.value,
2147
- januaryAsYear: e.januaryAsYear
2148
- });
2149
- return (e, n) => {
2150
- let r = B.value.chart.grid.labels.xAxisLabels.values?.[e];
2151
- return r == null ? "" : t.formatDate(new Date(r), n);
2152
- };
2153
- }), Lc = b(() => (B.value.chart.grid.labels.xAxisLabels.values || []).map((e, t) => ({
2154
- text: Ic.value(t, B.value.chart.zoom.timeFormat),
2155
- absoluteIndex: t
2156
- }))), Rc = b(() => {
2157
- let e = "", t = gc.value.map((e) => e.value).filter((e) => ve(e) && e !== null).reduce((e, t) => Math.abs(e) + Math.abs(t), 0), n = K.value ? { text: _(B.value.chart.grid.labels.xAxis.formatter, Ds.value[0]?.point.raw?.x ?? Ds.value[0]?.point.x, s({
2158
- v: Ds.value[0]?.point.raw?.x ?? Ds.value[0]?.point.x,
2159
- r: B.value.chart.tooltip.roundingValue
2160
- }), {
2161
- datapoint: null,
2162
- serriesIndex: null
2163
- }) } : Y.value[R.value], r = B.value.chart.tooltip.customFormat;
2164
- if (xe(r) && be(() => r({
2165
- absoluteIndex: R.value + W.value.start,
2166
- seriesIndex: R.value,
2167
- datapoint: gc.value,
2168
- series: go.value,
2169
- bars: Ac.value,
2170
- lines: Q.value,
2171
- plots: $.value,
2172
- config: B.value,
2173
- dateLabel: n
2174
- }))) return r({
2175
- absoluteIndex: R.value + W.value.start,
2176
- seriesIndex: R.value,
2177
- datapoint: gc.value,
2178
- series: go.value,
2179
- bars: Ac.value,
2180
- lines: Q.value,
2181
- plots: $.value,
2182
- config: B.value,
2183
- dateLabel: n
2184
- });
2185
- if (n && n.text && B.value.chart.tooltip.showTimeLabel) {
2186
- let t = Ic.value(R.value + W.value.start, B.value.chart.tooltip.timeFormat);
2187
- K.value || (e += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.chart.tooltip.borderColor}; width:100%">${B.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !B.value.chart.tooltip.useDefaultTimeFormat ? t : n.text}</div>`);
2188
- }
2189
- return gc.value.forEach((r) => {
2190
- if (ve(r.value)) {
2191
- let a = "", o = "";
2192
- switch (Yi.value[r.type]) {
2193
- case "bar":
2194
- a = `<svg viewBox="0 0 40 40" height="14" width="14">${Ti.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${r.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Ti.pattern ? `url(#pattern_${F.value}_${r.slotAbsoluteIndex}` : r.color}" /></svg>`;
2195
- break;
2196
- case "line":
2197
- !r.shape || ![
2198
- "star",
2199
- "triangle",
2200
- "square",
2201
- "diamond",
2202
- "pentagon",
2203
- "hexagon"
2204
- ].includes(r.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" />` : r.shape === "triangle" ? o = `<path d="${i({
2205
- plot: {
2206
- x: 10,
2207
- y: 8
2208
- },
2209
- radius: 4,
2210
- sides: 3,
2211
- rotation: .52
2212
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : r.shape === "square" ? o = `<path d="${i({
2213
- plot: {
2214
- x: 10,
2215
- y: 8
2216
- },
2217
- radius: 4,
2218
- sides: 4,
2219
- rotation: .8
2220
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : r.shape === "diamond" ? o = `<path d="${i({
2221
- plot: {
2222
- x: 10,
2223
- y: 8
2224
- },
2225
- radius: 4,
2226
- sides: 4,
2227
- rotation: 0
2228
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : r.shape === "pentagon" ? o = `<path d="${i({
2229
- plot: {
2230
- x: 10,
2231
- y: 8
2232
- },
2233
- radius: 4,
2234
- sides: 5,
2235
- rotation: .95
2236
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : r.shape === "hexagon" ? o = `<path d="${i({
2237
- plot: {
2238
- x: 10,
2239
- y: 8
2240
- },
2241
- radius: 4,
2242
- sides: 6,
2243
- rotation: 0
2244
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : r.shape === "star" && (o = `<polygon stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" points="${re({
2245
- plot: {
2246
- x: 10,
2247
- y: 8
2248
- },
2249
- radius: 4
2250
- })}" />`), a = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${r.color}" />${o}</svg>`;
2251
- break;
2252
- case "plot":
2253
- if (!r.shape || ![
2254
- "star",
2255
- "triangle",
2256
- "square",
2257
- "diamond",
2258
- "pentagon",
2259
- "hexagon"
2260
- ].includes(r.shape)) {
2261
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" /></svg>`;
2262
- break;
2263
- }
2264
- if (r.shape === "star") {
2265
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" points="${re({
2266
- plot: {
2267
- x: 6,
2268
- y: 6
2269
- },
2270
- radius: 5
2271
- })}" /></svg>`;
2272
- break;
2273
- }
2274
- if (r.shape === "triangle") {
2275
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${i({
2276
- plot: {
2277
- x: 6,
2278
- y: 6
2279
- },
2280
- radius: 6,
2281
- sides: 3,
2282
- rotation: .52
2283
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2284
- break;
2285
- }
2286
- if (r.shape === "square") {
2287
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${i({
2288
- plot: {
2289
- x: 6,
2290
- y: 6
2291
- },
2292
- radius: 6,
2293
- sides: 4,
2294
- rotation: .8
2295
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2296
- break;
2297
- }
2298
- if (r.shape === "diamond") {
2299
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${i({
2300
- plot: {
2301
- x: 6,
2302
- y: 6
2303
- },
2304
- radius: 5,
2305
- sides: 4,
2306
- rotation: 0
2307
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2308
- break;
2309
- }
2310
- if (r.shape === "pentagon") {
2311
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${i({
2312
- plot: {
2313
- x: 6,
2314
- y: 6
2315
- },
2316
- radius: 5,
2317
- sides: 5,
2318
- rotation: .95
2319
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2320
- break;
2321
- }
2322
- if (r.shape === "hexagon") {
2323
- a = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${i({
2324
- plot: {
2325
- x: 6,
2326
- y: 6
2327
- },
2328
- radius: 5,
2329
- sides: 6,
2330
- rotation: 0
2331
- }).path}" fill="${r.color}" stroke="${B.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2332
- break;
2333
- }
2334
- default: break;
2335
- }
2336
- let c = B.value.chart.tooltip.showValue ? _(r.type === "line" ? B.value.line.labels.formatter : r.type === "bar" ? B.value.bar.labels.formatter : B.value.plot.labels.formatter, r.value, s({
2337
- p: r.prefix,
2338
- v: r.value,
2339
- s: r.suffix,
2340
- r: B.value.chart.tooltip.roundingValue
2341
- }), { datapoint: r }) : "", l = B.value.chart.tooltip.showValue ? n.text : "", u = K.value ? `
2342
- <span>${B.value.chart.grid.labels.axis.xLabel || "X"}: </span>
2343
- <span>${l}</span>,
2344
- <span>${B.value.chart.grid.labels.axis.yLabel || "Y"}: </span>
2345
- <span>${c}</span>
2346
- ` : c;
2347
- K.value ? e += `
2348
- <div style="display:flex;flex-direction:column;">
2349
- <div style="display:flex; flex-direction:row; gap:3px;">
2350
- <div style="width:20px">${a}</div>
2351
- <div style="display:flex;flex-direction:column;">
2352
- <div>${r.name}</div>
2353
- <div>${u}</div>
2354
- </div>
2355
- </div>
2356
- </div>
2357
- ` : e += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;white-space:nowrap;"><div style="width:20px">${a}</div> ${r.name}: <b>${u}</b> ${B.value.chart.tooltip.showPercentage ? `(${s({
2358
- v: v(Math.abs(r.value) / t * 100),
2359
- s: "%",
2360
- r: B.value.chart.tooltip.roundingPercentage
2361
- })})` : ""}</div>`, B.value.chart.comments.showInTooltip && r.comments.length && r.comments.slice(W.value.start, W.value.end)[R.value] && (e += `<div class="vue-data-ui-tooltip-comment" style="background:${r.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${r.color}">${r.comments.slice(W.value.start, W.value.end)[R.value]}</div>`);
2362
- }
2363
- }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${B.value.chart.tooltip.color}">${e}</div>`;
2364
- }), zc = b(() => {
2365
- if (ho.value.length === 0) return {
2366
- head: [],
2367
- body: [],
2368
- config: {},
2369
- columnNames: []
2370
- };
2371
- let e = _o.value.map((e) => ({
2372
- label: e.name,
2373
- color: e.color,
2374
- type: e.type
2375
- })), t = [];
2376
- return Y.value.forEach((e, n) => {
2377
- let r = B.value.table.useDefaultTimeFormat ? [e.text] : [Ic.value(n + W.value.start, B.value.table.timeFormat)];
2378
- _o.value.forEach((e) => {
2379
- r.push(ss(e.absoluteValues[n]) ? Number(e.absoluteValues[n].toFixed(B.value.table.rounding)) : "");
2380
- }), t.push(r);
2381
- }), {
2382
- head: e,
2383
- body: t
2384
- };
2385
- }), Bc = b(() => {
2386
- let e = B.value.table.showSum, t = [""].concat(_o.value.map((e) => e.name));
2387
- e && (t = t.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>"));
2388
- let n = [];
2389
- for (let t = 0; t < X.value; t += 1) {
2390
- let r = _o.value.map((e) => e.absoluteValues[t] ?? 0).reduce((e, t) => e + t, 0);
2391
- n.push([B.value.table.useDefaultTimeFormat ? Y.value[t]?.text ?? "-" : Ic.value(t + W.value.start, B.value.table.timeFormat)].concat(_o.value.map((e) => _(e.type === "line" ? B.value.line.labels.formatter : e.type === "bar" ? B.value.bar.labels.formatter : B.value.plot.labels.formatter, e.absoluteValues[t] ?? 0, s({
2392
- p: e.prefix || B.value.chart.labels.prefix,
2393
- v: e.absoluteValues[t] ?? 0,
2394
- s: e.suffix || B.value.chart.labels.suffix,
2395
- r: B.value.table.rounding
2396
- }))), e ? (r ?? 0).toFixed(B.value.table.rounding) : []));
2397
- }
2398
- let r = {
2399
- th: {
2400
- backgroundColor: B.value.table.th.backgroundColor,
2401
- color: B.value.table.th.color,
2402
- outline: B.value.table.th.outline
2403
- },
2404
- td: {
2405
- backgroundColor: B.value.table.td.backgroundColor,
2406
- color: B.value.table.td.color,
2407
- outline: B.value.table.td.outline
2408
- },
2409
- breakpoint: B.value.table.responsiveBreakpoint
2410
- }, i = [B.value.table.columnNames.period].concat(_o.value.map((e) => e.name), B.value.table.columnNames.total);
2411
- return {
2412
- head: t,
2413
- body: n,
2414
- config: r,
2415
- colNames: i
2416
- };
2417
- });
2418
- function Vc(e = null) {
2419
- let t = [
2420
- [B.value.chart.title.text],
2421
- [B.value.chart.title.subtitle.text],
2422
- [""]
2423
- ], n = ["", ...zc.value.head.map((e) => e.label)], r = zc.value.body, i = oe(t.concat([n]).concat(r));
2424
- e ? e(i) : u({
2425
- csvContent: i,
2426
- title: B.value.chart.title.text || "vue-ui-xy"
2427
- });
2428
- }
2429
- function Hc(e, t = null) {
2430
- if (vo.value) return;
2431
- Qi.value = e;
2432
- let n = _o.value.map((e) => ({
2433
- name: e.name,
2434
- value: [
2435
- null,
2436
- void 0,
2437
- NaN
2438
- ].includes(e.absoluteValues[t]) ? null : e.absoluteValues[t],
2439
- color: e.color,
2440
- type: e.type
2441
- }));
2442
- e ? (R.value = t, B.value.events.datapointEnter && B.value.events.datapointEnter({
2443
- datapoint: n,
2444
- seriesIndex: t + W.value.start
2445
- })) : (R.value = null, B.value.events.datapointLeave && B.value.events.datapointLeave({
2446
- datapoint: n,
2447
- seriesIndex: t + W.value.start
2448
- }));
2449
- }
2450
- function Uc() {
2451
- V.value.showTable = !V.value.showTable;
2452
- }
2453
- function Wc() {
2454
- V.value.dataLabels.show = !V.value.dataLabels.show;
2455
- }
2456
- function Gc() {
2457
- V.value.showTooltip = !V.value.showTooltip;
2458
- }
2459
- function Kc(e) {
2460
- Zi.value = e, ea.value += 1;
2461
- }
2462
- function qc() {
2463
- if (!B.value.responsiveProportionalSizing) {
2464
- z.value.dataLabels = B.value.chart.grid.labels.fontSize, z.value.yAxis = B.value.chart.grid.labels.axis.fontSize, z.value.xAxis = B.value.chart.grid.labels.xAxisLabels.fontSize, z.value.plotLabels = B.value.chart.labels.fontSize, ja.value.plot = B.value.plot.radius, ja.value.line = B.value.line.radius;
2465
- return;
2466
- }
2467
- z.value.dataLabels = ke({
2468
- relator: Ki.value,
2469
- adjuster: 400,
2470
- source: B.value.chart.grid.labels.fontSize,
2471
- threshold: 10,
2472
- fallback: 10
2473
- }), z.value.yAxis = ke({
2474
- relator: N.value,
2475
- adjuster: 1e3,
2476
- source: B.value.chart.grid.labels.axis.fontSize,
2477
- threshold: 10,
2478
- fallback: 10
2479
- }), z.value.xAxis = ke({
2480
- relator: N.value,
2481
- adjuster: 1e3,
2482
- source: B.value.chart.grid.labels.xAxisLabels.fontSize,
2483
- threshold: 10,
2484
- fallback: 10
2485
- }), z.value.plotLabels = ke({
2486
- relator: N.value,
2487
- adjuster: 800,
2488
- source: B.value.chart.labels.fontSize,
2489
- threshold: 10,
2490
- fallback: 10
2491
- }), ja.value.plot = ke({
2492
- relator: N.value,
2493
- adjuster: 800,
2494
- source: B.value.plot.radius,
2495
- threshold: 1,
2496
- fallback: 1
2497
- }), ja.value.line = ke({
2498
- relator: N.value,
2499
- adjuster: 800,
2500
- source: B.value.line.radius,
2501
- threshold: 1,
2502
- fallback: 1
2503
- });
2504
- }
2505
- function Jc() {
2506
- if (r(j.dataset) ? (ce({
2507
- componentName: "VueUiXy",
2508
- type: "dataset",
2509
- debug: La.value
2510
- }), Va.value = !0) : j.dataset.forEach((e, t) => {
2511
- [null, void 0].includes(e.name) && (ce({
2512
- componentName: "VueUiXy",
2513
- type: "datasetSerieAttribute",
2514
- property: "name (string)",
2515
- index: t,
2516
- debug: La.value
2517
- }), Va.value = !0);
2518
- }), La.value && j.dataset.forEach((e) => {
2519
- e.series.forEach((t, n) => {
2520
- ve(t) || console.warn(`VueUiXy has detected an unsafe value in your dataset:\n-----> The serie '${e.name}' contains the value '${t}' at index ${n}.\n'${t}' was converted to null to allow the chart to display.`);
2521
- });
2522
- }), r(j.dataset) || (Va.value = B.value.loading), aa.value = B.value.chart.userOptions.showOnChartHover, oa.value = B.value.chart.userOptions.keepStateOnChartLeave, sa.value = !B.value.chart.userOptions.showOnChartHover, Ia(), B.value.responsive) {
2523
- let e = Ai.value.parentNode;
2524
- Hi.value && (Hi.value.unobserve(Ui.value), Hi.value.disconnect());
2525
- let { height: t, width: n } = e.getBoundingClientRect(), r = null, i = 0;
2526
- B.value.chart.title.show && ji.value && (r = ji.value, i = r.getBoundingClientRect().height);
2527
- let a = null, o = 0;
2528
- B.value.chart.zoom.show && U.value > 6 && Pa.value && Mi.value && Mi.value.$el && (a = Mi.value.$el, o = a.getBoundingClientRect().height);
2529
- let s = null, c = 0;
2530
- B.value.chart.legend.show && Ni.value && (s = Ni.value, c = s.getBoundingClientRect().height);
2531
- let l = 0;
2532
- Pi.value && (l = Pi.value.getBoundingClientRect().height);
2533
- let u = 0;
2534
- Fi.value && (u = Fi.value.getBoundingClientRect().height), Ki.value = t - i - c - o - l - u - 12, N.value = n, qi.value = `0 0 ${N.value < 0 ? 10 : N.value} ${Ki.value < 0 ? 10 : Ki.value}`, qc();
2535
- let ee = new ResizeObserver((e) => {
2536
- for (let t of e) i = B.value.chart.title.show && ji.value ? ji.value.getBoundingClientRect().height : 0, o = Mi.value && Mi.value.$el ? Mi.value.$el.getBoundingClientRect().height : 0, c = Ni.value ? Ni.value.getBoundingClientRect().height : 0, l = Pi.value ? Pi.value.getBoundingClientRect().height : 0, u = Fi.value ? Fi.value.getBoundingClientRect().height : 0, requestAnimationFrame(() => {
2537
- Ki.value = t.contentRect.height - i - c - o - l - u - 12, N.value = t.contentBoxSize[0].inlineSize ?? t.contentRect.width, qi.value = `0 0 ${N.value < 0 ? 10 : N.value} ${Ki.value < 0 ? 10 : Ki.value}`, qc(), Sa(), wa();
2538
- });
2539
- });
2540
- Hi.value = ee, Ui.value = e, ee.observe(e);
2541
- } else Ki.value = B.value.chart.height, N.value = B.value.chart.width, z.value.dataLabels = B.value.chart.grid.labels.fontSize, z.value.yAxis = B.value.chart.grid.labels.axis.fontSize, z.value.xAxis = B.value.chart.grid.labels.xAxisLabels.fontSize, z.value.plotLabels = B.value.chart.labels.fontSize, ja.value.plot = B.value.plot.radius, ja.value.line = B.value.line.radius, qi.value = `0 0 ${N.value} ${Ki.value}`;
2542
- Sa(), wa();
2543
- }
2544
- function Yc(e) {
2545
- Ji.value = {
2546
- x: e.clientX,
2547
- y: e.clientY
2548
- };
2549
- }
2550
- ut(() => {
2551
- Jc(), ns(), document.addEventListener("mousemove", Yc, { passive: !0 }), document.addEventListener("scroll", Mo, { passive: !0 });
2552
- }), lt(() => {
2553
- document.removeEventListener("scroll", Mo, { passive: !0 }), document.removeEventListener("mousemove", Yc, { passive: !0 }), Hi.value &&= (Hi.value.unobserve(Ui.value), Hi.value.disconnect(), null);
2554
- }), Ve({
2555
- timeLabelsEls: zi,
2556
- timeLabels: Y,
2557
- slicer: W,
2558
- configRef: B,
2559
- rotationPath: [
2560
- "chart",
2561
- "grid",
2562
- "labels",
2563
- "xAxisLabels",
2564
- "rotation"
2565
- ],
2566
- autoRotatePath: [
2567
- "chart",
2568
- "grid",
2569
- "labels",
2570
- "xAxisLabels",
2571
- "autoRotate",
2572
- "enable"
2573
- ],
2574
- isAutoSize: eo,
2575
- height: Ki,
2576
- width: N,
2577
- rotation: B.value.chart.grid.labels.xAxisLabels.autoRotate.angle
2578
- });
2579
- let Xc = E(!1), Zc = E(null), Qc = E(200), $c = b(() => R.value ?? I.value ?? 0), el = b(() => {
2580
- if (!K.value) return null;
2581
- if (g(ma.value)) return Number(ma.value);
2582
- let e = Ds.value[0];
2583
- return g(e?.point?.x) ? Number(e.point.x) : null;
2584
- });
2585
- function tl() {
2586
- let e = Math.ceil(Qc.value || 200);
2587
- return Math.min(Math.max(e, 1), 200);
2588
- }
2589
- function nl() {
2590
- let e = tl(), t = (K.value && g(el.value) ? wc({ x: el.value }) : tc($c.value)) - e / 2 - (200 - e) / 2, n = J.value?.left - (200 - e) / 2, r = J.value?.right - (200 + e) / 2;
2591
- return v(Math.max(n, Math.min(t, r)));
2592
- }
2593
- ut(() => {
2594
- let e = null, t = null, n = (e) => {
2595
- cancelAnimationFrame(t), t = requestAnimationFrame(() => {
2596
- Qc.value = Math.min(Math.max(Math.ceil(e || 0), 1), 200);
2597
- });
2598
- }, r = new ResizeObserver((t) => {
2599
- let r = t.find((t) => t.target === e) || t[0];
2600
- r && n(r.contentRect.width || 200);
2601
- }), i = vt((t) => {
2602
- let i = Zc.value;
2603
- e && e !== i && (r.unobserve(e), e = null), i && i !== e && (ot(() => {
2604
- i.offsetParent !== null && n(i.offsetWidth || i.getBoundingClientRect().width || 200);
2605
- }), r.observe(i), e = i), t(() => {
2606
- e &&= (r.unobserve(e), null);
2607
- });
2608
- });
2609
- lt(() => {
2610
- try {
2611
- e && r.unobserve(e), r.disconnect(), i();
2612
- } catch {}
2613
- });
2614
- });
2615
- let rl = b(() => {
2616
- if (K.value) {
2617
- if (!Number.isFinite(Number(el.value))) return "";
2618
- } else if ([null, void 0].includes(R.value) && [null, void 0].includes(I.value)) return "";
2619
- let e = (R.value == null ? 0 : R.value) || (I.value == null ? 0 : I.value), t = B.value.chart.timeTag.customFormat;
2620
- if (Xc.value = !1, K.value) {
2621
- let e = el.value;
2622
- if (xe(t)) try {
2623
- let n = t({
2624
- absoluteIndex: e,
2625
- seriesIndex: e,
2626
- datapoint: gc.value,
2627
- bars: Ac.value,
2628
- lines: Q.value,
2629
- plots: $.value,
2630
- config: B.value
2631
- });
2632
- if (typeof n == "string") return Xc.value = !0, n;
2633
- } catch {
2634
- console.warn("Custom format cannot be applied on timeTag."), Xc.value = !1;
2635
- }
2636
- return s({
2637
- v: e,
2638
- r: B.value.chart.grid.labels.xAxis.rounding
2639
- });
2640
- }
2641
- if (xe(t)) try {
2642
- let n = t({
2643
- absoluteIndex: e + W.value.start,
2644
- seriesIndex: e,
2645
- datapoint: gc.value,
2646
- bars: Ac.value,
2647
- lines: Q.value,
2648
- plots: $.value,
2649
- config: B.value
2650
- });
2651
- if (typeof n == "string") return Xc.value = !0, n;
2652
- } catch {
2653
- console.warn("Custom format cannot be applied on timeTag."), Xc.value = !1;
2654
- }
2655
- if (!Xc.value) return [null, void 0].includes(Y.value[e]) ? "" : B.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !B.value.chart.timeTag.useDefaultFormat ? Ic.value(e + W.value.start, B.value.chart.timeTag.timeFormat) : Y.value[e].text;
2656
- });
2657
- function il({ serie: e, plot: n, type: r }) {
2658
- if (!ss(n.value)) return "";
2659
- let i = s({
2660
- p: e.prefix || B.value.chart.labels.prefix,
2661
- v: n.value,
2662
- s: e.suffix || B.value.chart.labels.suffix,
2663
- r: B.value[r].labels.rounding
2664
- });
2665
- return t({
2666
- content: K.value && g(n.x) ? `x: ${s({
2667
- v: n.x,
2668
- r: B.value.chart.grid.labels.xAxis.rounding
2669
- })}\ny: ${i}` : _(B.value[r].labels.formatter, n.value, i, {
2670
- datapoint: n,
2671
- serie: e
2672
- }),
2673
- fontSize: z.value.plotLabels,
2674
- fill: B.value[r].labels.color,
2675
- x: 0,
2676
- y: 0
2677
- });
2678
- }
2679
- function al({ plot: e }) {
2680
- let t = B.value.bar.labels.offsetY, n = Math.abs(bs(e)), r = e.value < 0, i = {
2681
- x: (V.value.useIndividualScale && V.value.isStacked ? e.x + xs.value.line / 2 : Cs(e) + Ss() / 2 - dc.value / 2) + B.value.bar.labels.offsetX,
2682
- y: v(e.y) + (B.value.bar.labels.alwaysOnTop ? t - (r ? n : 0) : e.value >= 0 ? t : -t * 3)
2683
- };
2684
- return `translate(${i.x}, ${i.y}) rotate(${B.value.bar.labels.rotation})`;
2685
- }
2686
- function ol({ plot: e, type: t }) {
2687
- let n = B.value[t].labels.offsetY, r = {
2688
- x: e.x + B.value[t].labels.offsetX,
2689
- y: v(e.y) + (B.value[t].labels.alwaysOnTop || e.value >= 0 ? n : -n * 3)
2690
- };
2691
- return `translate(${r.x}, ${r.y}) rotate(${B.value[t].labels.rotation})`;
2692
- }
2693
- function sl({ plot: e, type: t }) {
2694
- if (B.value[t].labels.textAnchor != null) return B.value[t].labels.textAnchor;
2695
- let n = e.value >= 0;
2696
- return B.value[t].labels.rotation === 0 ? "middle" : B.value[t].labels.alwaysOnTop || n ? "start" : "end";
2697
- }
2698
- let cl = b(() => K.value ? g(ma.value) ? wc({ x: Number(ma.value) }) : g(Os.value) ? Os.value : null : tc((R.value === null ? 0 : R.value) || (I.value === null ? 0 : I.value))), ll = b(() => B.value.chart.highlighter.crosshairs.show && Ko.value), ul = b(() => [
2699
- ...Q.value,
2700
- ...$.value,
2701
- ...Ac.value
2702
- ].flatMap((e) => (e.plots || []).filter((t, n) => pl(e, t, n)).filter((e) => ss(e.value)).map((t) => ({
2703
- ...t,
2704
- serie: e,
2705
- x: v(t.x),
2706
- y: v(t.y)
2707
- })))), dl = b(() => {
2708
- if (!ll.value) return null;
2709
- if (K.value) {
2710
- let e = Ds.value[0], t = e?.point?.raw?.x ?? e?.point?.x;
2711
- return g(t) ? {
2712
- x: cl.value,
2713
- text: _(B.value.chart.grid.labels.xAxis.formatter, t, s({
2714
- v: t,
2715
- r: B.value.chart.tooltip.roundingValue
2716
- }))
2717
- } : null;
2718
- }
2719
- let e = R.value === null ? I.value : R.value;
2720
- return e == null ? null : {
2721
- x: tc(e),
2722
- text: Y.value[e]?.text ?? ""
2723
- };
2724
- });
2725
- function fl(e) {
2726
- return B.value.chart.grid.labels.yAxis.position === "right" ? J.value.right : J.value.left;
2727
- }
2728
- function pl(e, t, n) {
2729
- return K.value ? Ds.value.some((n) => n.datapoint.id === e.id && n.index === t.index) : R.value !== null && R.value === n || I.value !== null && I.value === n;
2730
- }
2731
- _t(() => j.dataset, (e) => {
2732
- if (Array.isArray(e) && e.length > 0 && (Va.value = !1), B.value.chart.zoom.keepState) {
2733
- if (U.value = Math.max(0, ...H.value.map((e) => Wa(e.series).length)), U.value > 0) {
2734
- let e = W.value.start, t = W.value.end;
2735
- if (!Qo.value || e === 0 && t === 0) ns();
2736
- else {
2737
- let n = Math.max(0, Math.min(e, U.value - 1)), r = Math.max(n + 1, Math.min(t, U.value));
2738
- W.value = {
2739
- start: n,
2740
- end: r
2741
- }, Ga.value = {
2742
- start: n,
2743
- end: r
2744
- }, $o.value = 0, es.value = U.value;
2745
- }
2746
- }
2747
- } else U.value = Math.max(...H.value.map((e) => Wa(e.series).length)), W.value = {
2748
- start: 0,
2749
- end: U.value
2750
- };
2751
- Wi.value += 1, ia.value += 1, Sa(), wa(), Ja();
2752
- }, { deep: !0 }), _t(() => j.config, (e) => {
2753
- Ba.value || (B.value = Ma()), Jc(), na.value += 1, ta.value += 1, Ia(), Sa(), wa(), B.value.chart.zoom.keepState && (U.value = Math.max(0, ...H.value.map((e) => Wa(e.series).length)), U.value > 0 && (!Qo.value || W.value.start === 0 && W.value.end === 0) && ns()), Ja();
2754
- }, { deep: !0 });
2755
- let ml = E(!1);
2756
- function hl() {
2757
- let e = Ai.value?.parentNode;
2758
- if (!e) {
2759
- ml.value = !1;
2760
- return;
2761
- }
2762
- let t = e.getBoundingClientRect();
2763
- ml.value = t.width > 2 && t.height > 2;
2764
- }
2765
- ut(() => {
2766
- hl();
2767
- let e = new ResizeObserver(() => {
2768
- hl(), ml.value && (Jc(), Ja(), B.value.chart.zoom.keepState || ns());
2769
- });
2770
- Ai.value?.parentNode && e.observe(Ai.value.parentNode);
2771
- }), _t(B, () => {
2772
- Ia();
2773
- }, { immediate: !0 });
2774
- let gl = b(() => {
2775
- let e = B.value.table.useDialog && !B.value.showTable, t = V.value.showTable;
2776
- return {
2777
- component: e ? Ci : Je,
2778
- title: `${B.value.chart.title.text}${B.value.chart.title.subtitle.text ? `: ${B.value.chart.title.subtitle.text}` : ""}`,
2779
- props: e ? {
2780
- backgroundColor: B.value.table.th.backgroundColor,
2781
- color: B.value.table.th.color,
2782
- headerColor: B.value.table.th.color,
2783
- headerBg: B.value.table.th.backgroundColor,
2784
- isFullscreen: Zi.value,
2785
- fullscreenParent: Ai.value,
2786
- forcedWidth: Math.min(800, window.innerWidth * .8)
2787
- } : {
2788
- hideDetails: !0,
2789
- config: {
2790
- open: t,
2791
- maxHeight: 1e4,
2792
- body: {
2793
- backgroundColor: B.value.chart.backgroundColor,
2794
- color: B.value.chart.color
2795
- },
2796
- head: {
2797
- backgroundColor: B.value.chart.backgroundColor,
2798
- color: B.value.chart.color
2799
- }
2800
- }
2801
- }
2802
- };
2803
- });
2804
- _t(() => V.value.showTable, (e) => {
2805
- B.value.showTable || (e && B.value.table.useDialog && da.value ? da.value.open() : da.value && da.value.close && da.value.close());
2806
- });
2807
- function _l() {
2808
- V.value.showTable = !1, Vi.value && Vi.value.setTableIconState(!1);
2809
- }
2810
- let vl = b(() => go.value.map((e) => ({
2811
- shape: e.type === "bar" ? "square" : e.shape ?? "circle",
2812
- color: e.color,
2813
- name: e.name
2814
- }))), yl = b(() => B.value.chart.backgroundColor), bl = b(() => B.value.chart.legend), { exportSvg: xl, getSvg: Sl } = Le({
2815
- svg: L,
2816
- title: b(() => B.value.chart.title),
2817
- legend: bl,
2818
- legendItems: vl,
2819
- backgroundColor: yl
2820
- });
2821
- async function Cl({ isCb: e }) {
2822
- pa.value = !0, await ot();
2823
- try {
2824
- if (e) {
2825
- let { blob: e, url: t, text: n, dataUrl: r } = await Sl();
2826
- await Promise.resolve(B.value.chart.userOptions.callbacks.svg({
2827
- blob: e,
2828
- url: t,
2829
- text: n,
2830
- dataUrl: r
2831
- }));
2832
- } else await Promise.resolve(xl());
2833
- } finally {
2834
- pa.value = !1;
2835
- }
2836
- }
2837
- function wl(e) {
2838
- if (e?.stage === "start") {
2839
- fa.value = !0;
2840
- return;
2841
- }
2842
- if (e?.stage === "end") {
2843
- fa.value = !1;
2844
- return;
2845
- }
2846
- $a();
2847
- }
2848
- async function Tl() {
2849
- if (wi("copyAlt", {
2850
- config: {
2851
- ...B.value,
2852
- formattedDates: Y.value
2853
- },
2854
- dataset: {
2855
- lines: Q.value,
2856
- bars: Ac.value,
2857
- plots: $.value
2858
- }
2859
- }), !B.value.chart.userOptions.callbacks.altCopy) {
2860
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
2861
- return;
2862
- }
2863
- await Promise.resolve(B.value.chart.userOptions.callbacks.altCopy({
2864
- config: {
2865
- ...B.value,
2866
- formattedDates: Y.value
2867
- },
2868
- dataset: {
2869
- lines: Q.value,
2870
- bars: Ac.value,
2871
- plots: $.value
2872
- }
2873
- }));
2874
- }
2875
- let El = E(!1);
2876
- function Dl() {
2877
- W.value.end > W.value.start && (ha.value = null), Po.value = !0, El.value = !0;
2878
- }
2879
- function Ol() {
2880
- ha.value = null, Ps(), El.value = !1, Po.value = !1;
2881
- }
2882
- function kl(e) {
2883
- if (!L.value || Xi.value || document.activeElement !== L.value) return;
2884
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
2885
- if (!t && !n || !W.value.end && W.value.end !== 0) return;
2886
- let r = W.value.end - W.value.start;
2887
- if (r <= 0) return;
2888
- if (e.preventDefault(), e.stopPropagation(), K.value) {
2889
- let e = ks.value.length;
2890
- if (!e) return;
2891
- let r = ha.value;
2892
- r !== null && r >= 0 && r < e ? n ? (r += 1, r >= e && (r = 0)) : t && (--r, r < 0 && (r = e - 1)) : r = n ? 0 : e - 1, As(r);
2893
- return;
2894
- }
2895
- let i = ha.value, a = Es.value;
2896
- i !== null && i >= 0 && i < r ? n ? (i += 1, i >= r && (i = 0)) : t && (--i, i < 0 && (i = r - 1)) : a !== null && a >= 0 && a < r ? (i = n ? a + 1 : a - 1, i >= r && (i = 0), i < 0 && (i = r - 1)) : i = n ? 0 : r - 1, ha.value = i, Al(i), Hc(!0, i);
2897
- }
2898
- function Al(e) {
2899
- let t = W.value.end - W.value.start;
2900
- if (t <= 0) return;
2901
- let n = J.value.width / t, r = d(J.value.left + n * e + n / 2, J.value.top + J.value.height / 2, L.value);
2902
- r && (ga.value = r);
2903
- }
2904
- let jl = b(() => {
2905
- if (!Bc.value) return null;
2906
- let e = B.value.table.showSum, t = [B.value.table.columnNames.period].concat(_o.value.map((e) => e.name));
2907
- e && (t = t.concat(B.value.table.columnNames.total));
2908
- let n = Bc.value.body.slice(W.value.start, W.value.end);
2909
- return {
2910
- headers: t,
2911
- rows: n
2912
- };
2913
- });
2914
- return Ke({
2915
- getData: Ls,
2916
- getImage: Rs,
2917
- generatePdf: Qa,
2918
- generateImage: $a,
2919
- generateSvg: Cl,
2920
- generateCsv: Vc,
2921
- hideSeries: Gs,
2922
- showSeries: Ws,
2923
- toggleStack: qo,
2924
- toggleTable: Uc,
2925
- toggleLabels: Wc,
2926
- toggleTooltip: Gc,
2927
- toggleAnnotator: Io,
2928
- toggleFullscreen: Kc,
2929
- copyAlt: Tl,
2930
- resetZoom: os
2931
- }), (n, r) => (T(), S("div", {
2932
- id: `vue-ui-xy_${F.value}`,
2933
- class: st(`vue-data-ui-component vue-ui-xy ${Zi.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${B.value.useCssAnimation ? "" : "vue-ui-dna"}`),
2934
- ref_key: "chart",
2935
- ref: Ai,
2936
- style: w(`background:${B.value.chart.backgroundColor}; color:${B.value.chart.color};width:100%;font-family:${B.value.chart.fontFamily};${B.value.responsive ? "height: 100%" : ""}`),
2937
- onMouseenter: r[6] ||= () => Fo(!0),
2938
- onMouseleave: r[7] ||= () => Fo(!1),
2939
- onClick: Fs
2940
- }, [
2941
- C("div", {
2942
- id: `chart-instructions-${F.value}`,
2943
- class: "sr-only"
2944
- }, [C("p", null, pt(B.value.a11y.translations.keyboardNavigation), 1)], 8, St),
2945
- jl.value?.rows?.length ? (T(), Qe(Xe, {
2946
- key: 0,
2947
- uid: F.value,
2948
- head: jl.value.headers,
2949
- body: jl.value.rows,
2950
- notice: B.value.a11y.translations.tableAvailable,
2951
- caption: B.value.a11y.translations.tableCaption
2952
- }, null, 8, [
2953
- "uid",
2954
- "head",
2955
- "body",
2956
- "notice",
2957
- "caption"
2958
- ])) : x("", !0),
2959
- B.value.chart.userOptions.buttons.annotator && L.value ? (T(), Qe(k(Si), {
2960
- key: 1,
2961
- svgRef: L.value,
2962
- backgroundColor: B.value.chart.backgroundColor,
2963
- color: B.value.chart.color,
2964
- active: Xi.value,
2965
- isCursorPointer: Fa.value,
2966
- onClose: Io
2967
- }, {
2968
- "annotator-action-close": A(() => [O(n.$slots, "annotator-action-close", {}, void 0, !0)]),
2969
- "annotator-action-color": A(({ color: e }) => [O(n.$slots, "annotator-action-color", ct(it({ color: e })), void 0, !0)]),
2970
- "annotator-action-draw": A(({ mode: e }) => [O(n.$slots, "annotator-action-draw", ct(it({ mode: e })), void 0, !0)]),
2971
- "annotator-action-undo": A(({ disabled: e }) => [O(n.$slots, "annotator-action-undo", ct(it({ disabled: e })), void 0, !0)]),
2972
- "annotator-action-redo": A(({ disabled: e }) => [O(n.$slots, "annotator-action-redo", ct(it({ disabled: e })), void 0, !0)]),
2973
- "annotator-action-delete": A(({ disabled: e }) => [O(n.$slots, "annotator-action-delete", ct(it({ disabled: e })), void 0, !0)]),
2974
- _: 3
2975
- }, 8, [
2976
- "svgRef",
2977
- "backgroundColor",
2978
- "color",
2979
- "active",
2980
- "isCursorPointer"
2981
- ])) : x("", !0),
2982
- Js.value ? (T(), S("div", {
2983
- key: 2,
2984
- ref_key: "noTitle",
2985
- ref: Fi,
2986
- class: "vue-data-ui-no-title-space",
2987
- style: "height:36px; width: 100%; background:transparent"
2988
- }, null, 512)) : x("", !0),
2989
- B.value.chart.title.show ? (T(), S("div", {
2990
- key: 3,
2991
- ref_key: "chartTitle",
2992
- ref: ji,
2993
- class: "vue-ui-xy-title",
2994
- style: w(`font-family:${B.value.chart.fontFamily}`)
2995
- }, [(T(), Qe(Ue, {
2996
- key: `title_${na.value}`,
2997
- config: {
2998
- title: {
2999
- cy: "xy-div-title",
3000
- ...B.value.chart.title
3001
- },
3002
- subtitle: {
3003
- cy: "xy-div-subtitle",
3004
- ...B.value.chart.title.subtitle
3005
- }
3006
- }
3007
- }, null, 8, ["config"]))], 4)) : x("", !0),
3008
- C("div", { id: `legend-top-${F.value}` }, null, 8, Ct),
3009
- B.value.chart.userOptions.show && (oa.value || sa.value) ? (T(), Qe(k(vi), {
3010
- ref_key: "userOptionsRef",
3011
- ref: Vi,
3012
- key: `user_options_${ea.value}`,
3013
- backgroundColor: B.value.chart.backgroundColor,
3014
- color: B.value.chart.color,
3015
- isPrinting: k(Xa),
3016
- isImaging: k(Za),
3017
- uid: F.value,
3018
- hasTooltip: B.value.chart.userOptions.buttons.tooltip && B.value.chart.tooltip.show,
3019
- hasPdf: B.value.chart.userOptions.buttons.pdf,
3020
- hasXls: B.value.chart.userOptions.buttons.csv,
3021
- hasImg: B.value.chart.userOptions.buttons.img,
3022
- hasSvg: B.value.chart.userOptions.buttons.svg,
3023
- hasLabel: B.value.chart.userOptions.buttons.labels,
3024
- hasTable: B.value.chart.userOptions.buttons.table,
3025
- hasStack: e.dataset.length > 1 && B.value.chart.userOptions.buttons.stack,
3026
- hasFullscreen: B.value.chart.userOptions.buttons.fullscreen,
3027
- hasAltCopy: B.value.chart.userOptions.buttons.altCopy,
3028
- isStacked: V.value.isStacked,
3029
- isFullscreen: Zi.value,
3030
- chartElement: n.$refs.chart,
3031
- position: B.value.chart.userOptions.position,
3032
- isTooltip: V.value.showTooltip,
3033
- titles: { ...B.value.chart.userOptions.buttonTitles },
3034
- hasAnnotator: B.value.chart.userOptions.buttons.annotator,
3035
- isAnnotation: Xi.value,
3036
- callbacks: B.value.chart.userOptions.callbacks,
3037
- tableDialog: B.value.table.useDialog,
3038
- printScale: B.value.chart.userOptions.print.scale,
3039
- isCursorPointer: Fa.value,
3040
- onToggleFullscreen: Kc,
3041
- onGeneratePdf: k(Qa),
3042
- onGenerateCsv: Vc,
3043
- onGenerateImage: wl,
3044
- onGenerateSvg: Cl,
3045
- onToggleTable: Uc,
3046
- onToggleLabels: Wc,
3047
- onToggleStack: qo,
3048
- onToggleTooltip: Gc,
3049
- onToggleAnnotator: Io,
3050
- onCopyAlt: Tl,
3051
- style: w({ visibility: oa.value ? sa.value ? "visible" : "hidden" : "visible" })
3052
- }, $e({ _: 2 }, [
3053
- n.$slots.menuIcon ? {
3054
- name: "menuIcon",
3055
- fn: A(({ isOpen: e, color: t }) => [O(n.$slots, "menuIcon", ct(it({
3056
- isOpen: e,
3057
- color: t
3058
- })), void 0, !0)]),
3059
- key: "0"
3060
- } : void 0,
3061
- n.$slots.optionTooltip ? {
3062
- name: "optionTooltip",
3063
- fn: A(() => [O(n.$slots, "optionTooltip", {}, void 0, !0)]),
3064
- key: "1"
3065
- } : void 0,
3066
- n.$slots.optionPdf ? {
3067
- name: "optionPdf",
3068
- fn: A(() => [O(n.$slots, "optionPdf", {}, void 0, !0)]),
3069
- key: "2"
3070
- } : void 0,
3071
- n.$slots.optionCsv ? {
3072
- name: "optionCsv",
3073
- fn: A(() => [O(n.$slots, "optionCsv", {}, void 0, !0)]),
3074
- key: "3"
3075
- } : void 0,
3076
- n.$slots.optionImg ? {
3077
- name: "optionImg",
3078
- fn: A(() => [O(n.$slots, "optionImg", {}, void 0, !0)]),
3079
- key: "4"
3080
- } : void 0,
3081
- n.$slots.optionSvg ? {
3082
- name: "optionSvg",
3083
- fn: A(() => [O(n.$slots, "optionSvg", {}, void 0, !0)]),
3084
- key: "5"
3085
- } : void 0,
3086
- n.$slots.optionTable ? {
3087
- name: "optionTable",
3088
- fn: A(() => [O(n.$slots, "optionTable", {}, void 0, !0)]),
3089
- key: "6"
3090
- } : void 0,
3091
- n.$slots.optionLabels ? {
3092
- name: "optionLabels",
3093
- fn: A(() => [O(n.$slots, "optionLabels", {}, void 0, !0)]),
3094
- key: "7"
3095
- } : void 0,
3096
- n.$slots.optionStack ? {
3097
- name: "optionStack",
3098
- fn: A(({ isStack: e }) => [O(n.$slots, "optionStack", ct(it({ isStack: e })), void 0, !0)]),
3099
- key: "8"
3100
- } : void 0,
3101
- n.$slots.optionFullscreen ? {
3102
- name: "optionFullscreen",
3103
- fn: A(({ toggleFullscreen: e, isFullscreen: t }) => [O(n.$slots, "optionFullscreen", ct(it({
3104
- toggleFullscreen: e,
3105
- isFullscreen: t
3106
- })), void 0, !0)]),
3107
- key: "9"
3108
- } : void 0,
3109
- n.$slots.optionAnnotator ? {
3110
- name: "optionAnnotator",
3111
- fn: A(({ toggleAnnotator: e, isAnnotator: t }) => [O(n.$slots, "optionAnnotator", ct(it({
3112
- toggleAnnotator: e,
3113
- isAnnotator: t
3114
- })), void 0, !0)]),
3115
- key: "10"
3116
- } : void 0,
3117
- n.$slots.optionAltCopy ? {
3118
- name: "optionAltCopy",
3119
- fn: A(({ altCopy: e }) => [O(n.$slots, "optionAltCopy", ct(it({ altCopy: e })), void 0, !0)]),
3120
- key: "11"
3121
- } : void 0,
3122
- n.$slots["custom-menu-before"] ? {
3123
- name: "custom-menu-before",
3124
- fn: A(() => [O(n.$slots, "custom-menu-before", {}, void 0, !0)]),
3125
- key: "12"
3126
- } : void 0,
3127
- n.$slots["custom-menu-after"] ? {
3128
- name: "custom-menu-after",
3129
- fn: A(() => [O(n.$slots, "custom-menu-after", {}, void 0, !0)]),
3130
- key: "13"
3131
- } : void 0
3132
- ]), 1032, /* @__PURE__ */ "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".split("."))) : x("", !0),
3133
- C("div", wt, [(T(), S("svg", {
3134
- ref_key: "svgRef",
3135
- ref: L,
3136
- xmlns: "http://www.w3.org/2000/svg",
3137
- class: st([{
3138
- "vue-data-ui-fullscreen--on": Zi.value,
3139
- "vue-data-ui-fulscreen--off": !Zi.value
3140
- }, "vue-ui-xy-svg vue-data-ui-svg"]),
3141
- width: "100%",
3142
- viewBox: qi.value,
3143
- style: w({
3144
- background: "transparent",
3145
- color: B.value.chart.color,
3146
- fontFamily: B.value.chart.fontFamily
3147
- }),
3148
- "aria-label": Ks.value,
3149
- "aria-describedby": `chart-instructions-${F.value}`,
3150
- "aria-live": "polite",
3151
- role: "img",
3152
- tabindex: "0",
3153
- preserveAspectRatio: "xMidYMid",
3154
- onMousemove: Ns,
3155
- onMouseleave: Ps,
3156
- onClick: Fs,
3157
- onFocus: Dl,
3158
- onBlur: Ol,
3159
- onKeydown: kl
3160
- }, [C("g", {
3161
- ref_key: "G",
3162
- ref: Ii,
3163
- class: "vue-data-ui-g"
3164
- }, [
3165
- tt(k(xi)),
3166
- n.$slots["chart-background"] ? (T(), S("foreignObject", {
3167
- key: 0,
3168
- x: Math.max(0, J.value?.left),
3169
- y: J.value?.top,
3170
- width: Math.max(0, J.value?.width),
3171
- height: Math.max(0, J.value?.height),
3172
- style: { pointerEvents: "none" }
3173
- }, [O(n.$slots, "chart-background", {}, void 0, !0)], 8, Et)) : x("", !0),
3174
- X.value > 0 ? (T(), S("g", Dt, [
3175
- C("g", Ot, [
3176
- B.value.chart.grid.labels.xAxis.showBaseline ? (T(), S("line", {
3177
- key: 0,
3178
- stroke: B.value.chart.grid.stroke,
3179
- "stroke-width": "1",
3180
- x1: J.value?.left,
3181
- x2: J.value?.right,
3182
- y1: k(h)(J.value?.bottom),
3183
- y2: k(h)(J.value?.bottom),
3184
- "stroke-linecap": "round",
3185
- style: { animation: "none !important" }
3186
- }, null, 8, kt)) : x("", !0),
3187
- V.value.useIndividualScale ? B.value.chart.grid.showHorizontalLines ? (T(!0), S(y, { key: 2 }, D(jc.value, (e) => (T(), S("g", null, [e.id === M.value && e.yLabels.length ? (T(!0), S(y, { key: 0 }, D(e.yLabels, (t) => (T(), S("line", {
3188
- x1: J.value?.left,
3189
- x2: J.value?.right,
3190
- y1: k(h)(t.y),
3191
- y2: k(h)(t.y),
3192
- stroke: e.color,
3193
- "stroke-width": .5,
3194
- "stroke-linecap": "round",
3195
- style: { animation: "none !important" }
3196
- }, null, 8, Nt))), 256)) : e.yLabels.length ? (T(!0), S(y, { key: 1 }, D(e.yLabels, (e) => (T(), S("line", {
3197
- x1: J.value?.left,
3198
- x2: J.value?.right,
3199
- y1: k(h)(e.y),
3200
- y2: k(h)(e.y),
3201
- stroke: B.value.chart.grid.stroke,
3202
- "stroke-width": .5,
3203
- "stroke-linecap": "round",
3204
- style: { animation: "none !important" }
3205
- }, null, 8, Pt))), 256)) : x("", !0)]))), 256)) : x("", !0) : (T(), S(y, { key: 1 }, [B.value.chart.grid.labels.yAxis.showBaseline ? (T(), S("line", {
3206
- key: 0,
3207
- class: "vue-ui-xy-y-axis",
3208
- stroke: B.value.chart.grid.stroke,
3209
- "stroke-width": "1",
3210
- x1: q.value ? J.value?.right : J.value?.left,
3211
- x2: q.value ? J.value?.right : J.value?.left,
3212
- y1: k(h)(J.value?.top),
3213
- y2: k(h)(J.value?.bottom),
3214
- "stroke-linecap": "round",
3215
- style: { animation: "none !important" }
3216
- }, null, 8, At)) : x("", !0), B.value.chart.grid.showHorizontalLines ? (T(), S("g", jt, [(T(!0), S(y, null, D(_c.value, (e) => (T(), S("line", {
3217
- x1: J.value?.left,
3218
- x2: J.value?.right,
3219
- y1: k(h)(e.y),
3220
- y2: k(h)(e.y),
3221
- stroke: B.value.chart.grid.stroke,
3222
- "stroke-width": .5,
3223
- "stroke-linecap": "round",
3224
- style: { animation: "none !important" }
3225
- }, null, 8, Mt))), 256))])) : x("", !0)], 64)),
3226
- B.value.chart.grid.showVerticalLines ? (T(), S("g", Ft, [C("path", {
3227
- d: Oo.value,
3228
- "stroke-width": .5,
3229
- stroke: B.value.chart.grid.stroke,
3230
- "stroke-linecap": "round",
3231
- style: { animation: "none !important" }
3232
- }, null, 8, It)])) : x("", !0),
3233
- B.value.chart.grid.labels.xAxisLabels.show ? (T(), S("g", Lt, [C("path", {
3234
- d: ko.value,
3235
- stroke: B.value.chart.grid.stroke,
3236
- "stroke-width": 1,
3237
- "stroke-linecap": "round",
3238
- style: { animation: "none !important" }
3239
- }, null, 8, Rt)])) : x("", !0)
3240
- ]),
3241
- (T(!0), S(y, null, D(Ac.value, (e, t) => (T(), S("defs", { key: `def_rect_${t}` }, [n.$slots["bar-gradient"] ? O(n.$slots, "bar-gradient", at({
3242
- key: 0,
3243
- ref_for: !0
3244
- }, {
3245
- series: e,
3246
- positiveId: `rectGradient_pos_${t}_${F.value}`,
3247
- negativeId: `rectGradient_neg_${t}_${F.value}`
3248
- }), void 0, !0) : (T(), S(y, { key: 1 }, [C("linearGradient", {
3249
- id: `rectGradient_pos_${t}_${F.value}`,
3250
- x2: "0%",
3251
- y2: "100%"
3252
- }, [
3253
- C("stop", {
3254
- offset: "0%",
3255
- "stop-color": e.color
3256
- }, null, 8, Bt),
3257
- C("stop", {
3258
- offset: "62%",
3259
- "stop-color": `${k(p)(e.color, .02)}`
3260
- }, null, 8, Vt),
3261
- C("stop", {
3262
- offset: "100%",
3263
- "stop-color": `${k(p)(e.color, .05)}`
3264
- }, null, 8, Ht)
3265
- ], 8, zt), C("linearGradient", {
3266
- id: `rectGradient_neg_${t}_${F.value}`,
3267
- x2: "0%",
3268
- y2: "100%"
3269
- }, [
3270
- C("stop", {
3271
- offset: "0%",
3272
- "stop-color": `${k(p)(e.color, .05)}`
3273
- }, null, 8, Wt),
3274
- C("stop", {
3275
- offset: "38%",
3276
- "stop-color": `${k(p)(e.color, .02)}`
3277
- }, null, 8, Gt),
3278
- C("stop", {
3279
- offset: "100%",
3280
- "stop-color": e.color
3281
- }, null, 8, Kt)
3282
- ], 8, Ut)], 64))]))), 128)),
3283
- (T(!0), S(y, null, D($.value, (e, t) => (T(), S("defs", { key: `def_plot_${t}` }, [C("radialGradient", {
3284
- id: `plotGradient_${t}_${F.value}`,
3285
- cx: "50%",
3286
- cy: "50%",
3287
- r: "50%",
3288
- fx: "50%",
3289
- fy: "50%"
3290
- }, [C("stop", {
3291
- offset: "0%",
3292
- "stop-color": `${k(p)(e.color, .05)}`
3293
- }, null, 8, Jt), C("stop", {
3294
- offset: "100%",
3295
- "stop-color": e.color
3296
- }, null, 8, Yt)], 8, qt)]))), 128)),
3297
- (T(!0), S(y, null, D(Q.value, (e, t) => (T(), S(y, { key: `def_line_${e.id}` }, [C("defs", null, [C("radialGradient", {
3298
- id: `lineGradient_${t}_${F.value}`,
3299
- cx: "50%",
3300
- cy: "50%",
3301
- r: "50%",
3302
- fx: "50%",
3303
- fy: "50%"
3304
- }, [C("stop", {
3305
- offset: "0%",
3306
- "stop-color": `${k(p)(e.color, .05)}`
3307
- }, null, 8, Zt), C("stop", {
3308
- offset: "100%",
3309
- "stop-color": e.color
3310
- }, null, 8, Qt)], 8, Xt), n.$slots["area-gradient"] ? O(n.$slots, "area-gradient", at({
3311
- key: 0,
3312
- ref_for: !0
3313
- }, {
3314
- series: e,
3315
- id: `areaGradient_${t}_${F.value}`
3316
- }), void 0, !0) : (T(), S("linearGradient", {
3317
- key: 1,
3318
- id: `areaGradient_${t}_${F.value}`,
3319
- x1: "0%",
3320
- x2: "100%",
3321
- y1: "0%",
3322
- y2: "0%"
3323
- }, [C("stop", {
3324
- offset: "0%",
3325
- "stop-color": `${k(f)(k(p)(e.color, .03), B.value.line.area.opacity)}`
3326
- }, null, 8, en), C("stop", {
3327
- offset: "100%",
3328
- "stop-color": `${k(f)(e.color, B.value.line.area.opacity)}`
3329
- }, null, 8, tn)], 8, $t))]), e.temperatureColors && !e.isFlatTemperatureLine ? (T(), S("defs", nn, [C("linearGradient", {
3330
- id: `temperature_grad_line_${t}_${F.value}`,
3331
- gradientTransform: "rotate(90)"
3332
- }, [(T(!0), S(y, null, D(e.temperatureColors, (n, r) => (T(), S("stop", {
3333
- key: `temperature_grad_stop_${t}_${r}_${F.value}`,
3334
- "stop-color": n,
3335
- offset: k(me)(r, e.temperatureColors.length)
3336
- }, null, 8, an))), 128))], 8, rn)])) : x("", !0)], 64))), 128)),
3337
- (T(!0), S(y, null, D(Ys.value, (e) => (T(), S("g", null, [e.show ? (T(), S(y, { key: 0 }, [(T(!0), S(y, null, D(e.span, (t, n) => (T(), S("g", null, [C("rect", {
3338
- style: w({
3339
- transition: "none",
3340
- opacity: +(e.from + n >= W.value.start && e.from + n <= W.value.end - 1)
3341
- }),
3342
- x: rc(e.from + n - W.value.start),
3343
- y: J.value?.top,
3344
- height: J.value.height < 0 ? 10 : J.value.height,
3345
- width: ic(e.from + n - W.value.start),
3346
- fill: k(f)(e.color, e.opacity)
3347
- }, null, 12, on)]))), 256)), (T(!0), S(y, null, D(e.span, (t, n) => (T(), S("g", null, [e.caption.text && n === 0 ? (T(), S("foreignObject", {
3348
- key: 0,
3349
- x: rc(e.from + n - W.value.start) - (e.caption.width === "auto" ? 0 : e.caption.width / 2 - sc(e.span) / 2),
3350
- y: J.value?.top + e.caption.offsetY,
3351
- style: w({
3352
- overflow: "visible",
3353
- opacity: +(e.to >= W.value.start && e.from < W.value.end)
3354
- }),
3355
- height: "1",
3356
- width: e.caption.width === "auto" ? sc(e.span) : e.caption.width
3357
- }, [C("div", { 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"}`) }, pt(e.caption.text), 5)], 12, sn)) : x("", !0)]))), 256))], 64)) : x("", !0)]))), 256)),
3358
- Po.value && !K.value ? (T(), S("g", cn, [(T(!0), S(y, null, D(X.value, (e, t) => (T(), S("g", { key: `tooltip_trap_highlighter_${t}` }, [C("rect", {
3359
- x: rc(t),
3360
- y: J.value?.top,
3361
- height: J.value.height < 0 ? 10 : J.value.height,
3362
- width: oc(t),
3363
- fill: [
3364
- I.value,
3365
- R.value,
3366
- $i.value
3367
- ].includes(t) ? k(f)(B.value.chart.highlighter.color, B.value.chart.highlighter.crosshairs.show ? 0 : B.value.chart.highlighter.opacity) : "transparent",
3368
- style: {
3369
- transition: "none !important",
3370
- animation: "none !important"
3371
- }
3372
- }, null, 8, ln)]))), 128))])) : x("", !0),
3373
- Ac.value.length ? (T(!0), S(y, { key: 1 }, D(Ac.value, (e, t) => (T(), S("g", {
3374
- key: `serie_bar_${e.id}`,
3375
- class: st(`serie_bar_${t}`),
3376
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3377
- }, [(T(!0), S(y, null, D(e.plots, (r, i) => (T(), S("g", { key: `bar_plot_${t}_${i}` }, [
3378
- ss(r.value) ? (T(), S("rect", {
3379
- key: 0,
3380
- x: Cs(r) + pc.value / 2,
3381
- y: V.value.useIndividualScale ? Ts(r) : ws(r),
3382
- height: V.value.useIndividualScale ? Math.abs(bs(r)) : Math.abs(ys(r)),
3383
- width: fc.value - pc.value,
3384
- rx: B.value.bar.borderRadius,
3385
- fill: B.value.bar.useGradient ? r.value >= 0 ? `url(#rectGradient_pos_${t}_${F.value})` : `url(#rectGradient_neg_${t}_${F.value})` : e.color,
3386
- stroke: B.value.bar.border.useSerieColor ? e.color : B.value.bar.border.stroke,
3387
- "stroke-width": B.value.bar.border.strokeWidth,
3388
- style: w({ transition: k(Ba) || !B.value.bar.showTransition ? void 0 : `all ${B.value.bar.transitionDurationMs}ms ease-in-out` })
3389
- }, null, 12, un)) : x("", !0),
3390
- ss(r.value) && n.$slots.pattern ? (T(), S("rect", {
3391
- key: 1,
3392
- x: Cs(r) - pc.value / 2,
3393
- y: V.value.useIndividualScale ? Ts(r) : ws(r),
3394
- height: V.value.useIndividualScale ? Math.abs(bs(r)) : Math.abs(ys(r)),
3395
- width: fc.value - pc.value,
3396
- rx: B.value.bar.borderRadius,
3397
- fill: `url(#pattern_${F.value}_${e.slotAbsoluteIndex})`,
3398
- stroke: B.value.bar.border.useSerieColor ? e.color : B.value.bar.border.stroke,
3399
- "stroke-width": B.value.bar.border.strokeWidth,
3400
- style: w({ transition: k(Ba) || !B.value.bar.showTransition ? void 0 : `all ${B.value.bar.transitionDurationMs}ms ease-in-out` })
3401
- }, null, 12, dn)) : x("", !0),
3402
- r.comment && B.value.chart.comments.show ? (T(), S("foreignObject", {
3403
- key: 2,
3404
- style: { overflow: "visible" },
3405
- height: "12",
3406
- width: fc.value + B.value.chart.comments.width,
3407
- x: Cs(r) - B.value.chart.comments.width / 2 + B.value.chart.comments.offsetX,
3408
- y: k(v)(r.y) + B.value.chart.comments.offsetY + 6
3409
- }, [O(n.$slots, "plot-comment", { plot: {
3410
- ...r,
3411
- color: e.color,
3412
- seriesIndex: t,
3413
- datapointIndex: i
3414
- } }, void 0, !0)], 8, fn)) : x("", !0)
3415
- ]))), 128))], 6))), 128)) : x("", !0),
3416
- !V.value.useIndividualScale && B.value.chart.grid.labels.zeroLine.show ? (T(), S("line", {
3417
- key: 2,
3418
- stroke: B.value.chart.grid.stroke,
3419
- "stroke-width": "1",
3420
- x1: J.value?.left,
3421
- x2: J.value?.right,
3422
- y1: k(h)(vs.value),
3423
- y2: k(h)(vs.value),
3424
- "stroke-linecap": "round",
3425
- style: { animation: "none !important" }
3426
- }, null, 8, pn)) : x("", !0),
3427
- !B.value.chart.highlighter.crosshairs.show && (B.value.chart.highlighter.useLine || K.value) && Ko.value ? (T(), S("g", mn, [C("line", {
3428
- x1: cl.value,
3429
- x2: cl.value,
3430
- y1: k(h)(J.value?.top),
3431
- y2: k(h)(J.value?.bottom),
3432
- stroke: B.value.chart.highlighter.color,
3433
- "stroke-width": B.value.chart.highlighter.lineWidth,
3434
- "stroke-dasharray": B.value.chart.highlighter.lineDasharray,
3435
- "stroke-linecap": "round",
3436
- style: {
3437
- transition: "none !important",
3438
- animation: "none !important",
3439
- "pointer-events": "none"
3440
- }
3441
- }, null, 8, hn)])) : x("", !0),
3442
- ll.value ? (T(), S("g", gn, [(T(!0), S(y, null, D(ul.value, (e) => (T(), S("g", { key: `crosshair_${e.serie.id}_${e.index}` }, [
3443
- C("line", {
3444
- x1: B.value.chart.highlighter.crosshairs.stopOnPoint ? k(h)(e.x) : J.value.left,
3445
- x2: B.value.chart.highlighter.crosshairs.stopOnPoint ? k(h)(fl(e.x)) : J.value.right,
3446
- y1: k(h)(e.y),
3447
- y2: k(h)(e.y),
3448
- stroke: B.value.chart.highlighter.crosshairs.stroke,
3449
- "stroke-width": B.value.chart.highlighter.crosshairs.strokeWidth,
3450
- "stroke-dasharray": B.value.chart.highlighter.crosshairs.strokeDasharray,
3451
- "stroke-linecap": "round",
3452
- style: { "pointer-events": "none" }
3453
- }, null, 8, _n),
3454
- C("line", {
3455
- x1: k(h)(e.x),
3456
- x2: k(h)(e.x),
3457
- y1: B.value.chart.highlighter.crosshairs.stopOnPoint ? k(h)(e.y) : J.value.top,
3458
- y2: B.value.chart.highlighter.crosshairs.stopOnPoint ? k(h)(J.value.bottom) : J.value.bottom,
3459
- stroke: B.value.chart.highlighter.crosshairs.stroke,
3460
- "stroke-width": B.value.chart.highlighter.crosshairs.strokeWidth,
3461
- "stroke-dasharray": B.value.chart.highlighter.crosshairs.strokeDasharray,
3462
- "stroke-linecap": "round",
3463
- style: { "pointer-events": "none" }
3464
- }, null, 8, vn),
3465
- C("circle", {
3466
- cx: k(h)(fl(e.x)),
3467
- cy: k(h)(e.y),
3468
- r: B.value.chart.highlighter.crosshairs.dot.radius,
3469
- fill: B.value.chart.highlighter.crosshairs.dot.fill,
3470
- stroke: B.value.chart.highlighter.crosshairs.dot.stroke,
3471
- "stroke-width": B.value.chart.highlighter.crosshairs.dot.strokeWidth,
3472
- style: { "pointer-events": "none" }
3473
- }, null, 8, yn)
3474
- ]))), 128))])) : x("", !0),
3475
- B.value.chart.grid.frame.show ? (T(), S("rect", {
3476
- key: 5,
3477
- style: {
3478
- pointerEvents: "none",
3479
- transition: "none",
3480
- animation: "none !important"
3481
- },
3482
- x: Math.max(0, J.value?.left),
3483
- y: J.value?.top,
3484
- width: Math.max(0, J.value?.width),
3485
- height: J.value.height < 0 ? 0 : J.value.height,
3486
- fill: "transparent",
3487
- stroke: B.value.chart.grid.frame.stroke,
3488
- "stroke-width": B.value.chart.grid.frame.strokeWidth,
3489
- "stroke-linecap": B.value.chart.grid.frame.strokeLinecap,
3490
- "stroke-linejoin": B.value.chart.grid.frame.strokeLinejoin,
3491
- "stroke-dasharray": B.value.chart.grid.frame.strokeDasharray
3492
- }, null, 8, bn)) : x("", !0),
3493
- B.value.chart.grid.labels.show ? (T(), S("g", {
3494
- key: 6,
3495
- ref_key: "scaleLabels",
3496
- ref: Bi,
3497
- opacity: ll.value ? .2 : 1,
3498
- style: { transition: "opacity 0.2s" }
3499
- }, [V.value.useIndividualScale ? (T(), S(y, { key: 0 }, [(T(!0), S(y, null, D(jc.value, (e) => (T(), S("g", null, [C("line", {
3500
- x1: V.value.isStacked ? q.value ? J.value.right : J.value.left : q.value ? e.x : e.x - J.value.individualOffsetX,
3501
- x2: V.value.isStacked ? q.value ? J.value.right : J.value.left : q.value ? e.x : e.x - J.value.individualOffsetX,
3502
- y1: V.value.isStacked ? k(h)(J.value?.bottom - e.yOffset - e.individualHeight) : k(h)(J.value?.top),
3503
- y2: V.value.isStacked ? k(h)(J.value?.bottom - e.yOffset) : k(h)(J.value?.bottom),
3504
- stroke: e.color,
3505
- "stroke-width": B.value.chart.grid.stroke,
3506
- "stroke-linecap": "round",
3507
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
3508
- }, null, 12, Sn)]))), 256)), (T(!0), S(y, null, D(jc.value, (e) => (T(), S("g", { style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .3 : 1};transition:opacity 0.2s ease-in-out`) }, [
3509
- C("text", {
3510
- fill: e.color,
3511
- "font-size": z.value.dataLabels * .8,
3512
- "text-anchor": "middle",
3513
- transform: `translate(${V.value.isStacked ? q.value ? J.value.right + B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 + B.value.chart.grid.labels.yAxis.labelWidth + J.value.individualOffsetX + B.value.chart.grid.labels.axis.yLabelOffsetX : J.value.left - B.value.chart.grid.labels.yAxis.crosshairSize - B.value.chart.grid.labels.yAxis.scaleValueOffsetX - B.value.chart.grid.labels.yAxis.labelWidth - B.value.chart.grid.labels.axis.yLabelOffsetX : q.value ? e.x + B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 + B.value.chart.grid.labels.yAxis.labelWidth + B.value.chart.grid.labels.axis.yLabelOffsetX : e.x - z.value.dataLabels * .8 / 2}, ${V.value.isStacked ? J.value?.bottom - e.yOffset - e.individualHeight / 2 : J.value?.top + J.value.height / 2}) rotate(-90)`
3514
- }, pt(e.name) + " " + pt(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `- ${e.scaleLabel}` : ""), 9, Cn),
3515
- (T(!0), S(y, null, D(e.yLabels, (t, n) => (T(), S(y, null, [B.value.chart.grid.labels.yAxis.showCrosshairs ? (T(), S("line", {
3516
- key: 0,
3517
- x1: V.value.isStacked ? q.value ? J.value.right : J.value.left : q.value ? e.x : e.x + 3 - B.value.chart.grid.labels.yAxis.crosshairSize - J.value.individualOffsetX,
3518
- x2: V.value.isStacked ? q.value ? J.value.right + B.value.chart.grid.labels.yAxis.crosshairSize : J.value.left - B.value.chart.grid.labels.yAxis.crosshairSize : q.value ? e.x + B.value.chart.grid.labels.yAxis.crosshairSize : e.x - J.value.individualOffsetX,
3519
- y1: k(h)(t.y),
3520
- y2: k(h)(t.y),
3521
- stroke: e.color,
3522
- "stroke-width": 1,
3523
- "stroke-linecap": "round",
3524
- style: { animation: "none !important" }
3525
- }, null, 8, wn)) : x("", !0)], 64))), 256)),
3526
- (T(!0), S(y, null, D(e.yLabels, (t, n) => (T(), S("text", {
3527
- transform: `translate(${V.value.isStacked ? q.value ? J.value.right + B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 : J.value.left - B.value.chart.grid.labels.yAxis.crosshairSize - B.value.chart.grid.labels.yAxis.scaleValueOffsetX - 5 : q.value ? e.x + B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 : e.x - 5 - J.value.individualOffsetX}, ${k(h)(t.y) + z.value.dataLabels / 3})`,
3528
- "text-anchor": q.value ? "start" : "end",
3529
- "font-size": z.value.dataLabels,
3530
- fill: e.color
3531
- }, pt(k(_)(B.value.chart.grid.labels.yAxis.formatter, t.value, k(s)({
3532
- p: t.prefix,
3533
- v: t.value,
3534
- s: t.suffix,
3535
- r: B.value.chart.grid.labels.yAxis.rounding
3536
- }), {
3537
- datapoint: t.datapoint,
3538
- seriesIndex: n
3539
- })), 9, Tn))), 256))
3540
- ], 4))), 256))], 64)) : (T(!0), S(y, { key: 1 }, D(_c.value, (e, t) => (T(), S("g", { key: `yLabel_${t}` }, [ss(e) && e.value >= G.value.min && e.value <= G.value.max && B.value.chart.grid.labels.yAxis.showCrosshairs ? (T(), S("line", {
3541
- key: 0,
3542
- x1: q.value ? J.value?.right : J.value?.left,
3543
- x2: q.value ? J.value?.right + B.value.chart.grid.labels.yAxis.crosshairSize : J.value?.left - B.value.chart.grid.labels.yAxis.crosshairSize,
3544
- y1: k(h)(e.y),
3545
- y2: k(h)(e.y),
3546
- stroke: B.value.chart.grid.stroke,
3547
- "stroke-width": "1",
3548
- "stroke-linecap": "round",
3549
- style: { animation: "none !important" }
3550
- }, null, 8, En)) : x("", !0), e.value >= G.value.min && e.value <= G.value.max ? (T(), S("text", {
3551
- key: 1,
3552
- transform: `translate(${q.value ? J.value.right + B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 : J.value.scaleLabelX - B.value.chart.grid.labels.yAxis.crosshairSize}, ${k(v)(e.y + z.value.dataLabels / 3)})`,
3553
- "font-size": z.value.dataLabels,
3554
- "text-anchor": q.value ? "start" : "end",
3555
- fill: B.value.chart.grid.labels.color
3556
- }, pt(ss(e.value) ? k(_)(B.value.chart.grid.labels.yAxis.formatter, e.value, k(s)({
3557
- p: e.prefix,
3558
- v: e.value,
3559
- s: e.suffix,
3560
- r: B.value.chart.grid.labels.yAxis.rounding
3561
- })) : ""), 9, Dn)) : x("", !0)]))), 128))], 8, xn)) : x("", !0),
3562
- ll.value ? (T(), S("g", On, [(T(!0), S(y, null, D(ul.value, (e) => (T(), S("text", {
3563
- key: `crosshair_y_label_${e.serie.id}_${e.index}`,
3564
- transform: `translate(${q.value ? J.value.right + B.value.chart.grid.labels.yAxis.crosshairSize + B.value.chart.grid.labels.yAxis.scaleValueOffsetX + 5 : J.value.scaleLabelX - B.value.chart.grid.labels.yAxis.crosshairSize}, ${k(h)(e.y) + z.value.dataLabels / 3})`,
3565
- "font-size": z.value.dataLabels,
3566
- "text-anchor": q.value ? "start" : "end",
3567
- fill: B.value.chart.grid.labels.color,
3568
- style: {
3569
- transition: "none !important",
3570
- animation: "none !important",
3571
- "pointer-events": "none"
3572
- }
3573
- }, pt(k(_)(B.value.chart.grid.labels.yAxis.formatter, e.value, k(s)({
3574
- p: e.serie.prefix || B.value.chart.labels.prefix,
3575
- v: e.value,
3576
- s: e.serie.suffix || B.value.chart.labels.suffix,
3577
- r: B.value.chart.grid.labels.yAxis.rounding
3578
- }), {
3579
- datapoint: e.serie,
3580
- seriesIndex: e.index
3581
- })), 9, kn))), 128))])) : x("", !0),
3582
- dl.value ? (T(), S("g", An, [C("circle", {
3583
- cx: cl.value,
3584
- cy: k(h)(J.value?.bottom),
3585
- r: B.value.chart.highlighter.crosshairs.dot.radius,
3586
- fill: B.value.chart.highlighter.crosshairs.dot.fill,
3587
- stroke: B.value.chart.highlighter.crosshairs.dot.stroke,
3588
- "stroke-width": B.value.chart.highlighter.crosshairs.dot.strokeWidth,
3589
- style: {
3590
- transition: "none !important",
3591
- animation: "none !important",
3592
- "pointer-events": "none"
3593
- }
3594
- }, null, 8, jn)])) : x("", !0),
3595
- (T(!0), S(y, null, D($.value, (e, t) => (T(), S("g", {
3596
- key: `serie_plot_${e.id}`,
3597
- class: st(`serie_plot_${t}`),
3598
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3599
- }, [(T(!0), S(y, null, D(e.plots, (r, i) => (T(), S("g", { key: `circle_plot_${t}_${i}` }, [r && ss(r.value) ? (T(), Qe(Ge, {
3600
- key: 0,
3601
- shape: [
3602
- "triangle",
3603
- "square",
3604
- "diamond",
3605
- "pentagon",
3606
- "hexagon",
3607
- "star"
3608
- ].includes(e.shape) ? e.shape : "circle",
3609
- color: B.value.plot.useGradient ? `url(#plotGradient_${t}_${F.value})` : B.value.plot.dot.useSerieColor ? e.color : B.value.plot.dot.fill,
3610
- plot: {
3611
- x: k(v)(r.x),
3612
- y: k(v)(r.y)
3613
- },
3614
- radius: pl(e, r, i) ? (ja.value.plot || 6) * 1.5 : (yc(e.plots, i), ja.value.plot || 6),
3615
- stroke: B.value.plot.dot.useSerieColor ? B.value.chart.backgroundColor : e.color,
3616
- strokeWidth: B.value.plot.dot.strokeWidth,
3617
- transition: k(Ba) || !B.value.plot.showTransition || pl(e, r, i) ? void 0 : `all ${B.value.plot.transitionDurationMs}ms ease-in-out`
3618
- }, null, 8, [
3619
- "shape",
3620
- "color",
3621
- "plot",
3622
- "radius",
3623
- "stroke",
3624
- "strokeWidth",
3625
- "transition"
3626
- ])) : x("", !0), r.comment && B.value.chart.comments.show ? (T(), S("foreignObject", {
3627
- key: 1,
3628
- style: { overflow: "visible" },
3629
- height: "12",
3630
- width: B.value.chart.comments.width,
3631
- x: r.x - B.value.chart.comments.width / 2 + B.value.chart.comments.offsetX,
3632
- y: r.y + B.value.chart.comments.offsetY + 6
3633
- }, [C("div", Nn, [O(n.$slots, "plot-comment", { plot: {
3634
- ...r,
3635
- color: e.color,
3636
- seriesIndex: t,
3637
- datapointIndex: i
3638
- } }, void 0, !0)])], 8, Mn)) : x("", !0)]))), 128))], 6))), 128)),
3639
- (T(!0), S(y, null, D(Q.value, (e, t) => (T(), S("g", {
3640
- key: `serie_line_${e.id}`,
3641
- class: st(`serie_line_${t}`),
3642
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3643
- }, [e.smooth && e.plots.length > 1 && e.curve ? (T(), S("path", {
3644
- key: 0,
3645
- d: `M${e.curve}`,
3646
- stroke: B.value.chart.backgroundColor,
3647
- "stroke-width": B.value.line.strokeWidth + 1,
3648
- "stroke-dasharray": e.dashed ? B.value.line.strokeWidth * 2 : 0,
3649
- fill: "none",
3650
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3651
- }, null, 12, Pn)) : e.plots.length > 1 && e.straight ? (T(), S("path", {
3652
- key: 1,
3653
- d: `M${e.straight}`,
3654
- stroke: B.value.chart.backgroundColor,
3655
- "stroke-width": B.value.line.strokeWidth + 1,
3656
- "stroke-dasharray": e.dashed ? B.value.line.strokeWidth * 2 : 0,
3657
- fill: "none",
3658
- "stroke-linecap": "round",
3659
- "stroke-linejoin": "round",
3660
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3661
- }, null, 12, Fn)) : x("", !0)], 6))), 128)),
3662
- n.$slots.pattern ? (T(), S("defs", In, [(T(!0), S(y, null, D(ho.value, (e, t) => O(n.$slots, "pattern", at({ key: `serie_pattern_slot_${e.id}` }, { ref_for: !0 }, {
3663
- ...e,
3664
- seriesIndex: e.slotAbsoluteIndex,
3665
- patternId: `pattern_${F.value}_${t}`
3666
- }), void 0, !0)), 128))])) : x("", !0),
3667
- Mc.value.length && !V.value.isStacked ? (T(), S("g", Ln, [(T(!0), S(y, null, D(Mc.value, (e) => (T(), S("path", {
3668
- key: e.key,
3669
- d: e.d,
3670
- fill: e.color,
3671
- "fill-opacity": B.value.line.interLine.fillOpacity,
3672
- stroke: "none",
3673
- "pointer-events": "none",
3674
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3675
- }, null, 12, Rn))), 128))])) : x("", !0),
3676
- (T(!0), S(y, null, D(Q.value, (e, t) => (T(), S("g", {
3677
- key: `serie_line_above_${e.id}`,
3678
- class: st(`serie_line_${t}`),
3679
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3680
- }, [
3681
- e.useArea && e.plots.length > 1 ? (T(), S("g", zn, [e.smooth ? (T(!0), S(y, { key: 0 }, D(e.curveAreas, (r, i) => (T(), S(y, { key: i }, [r ? (T(), S("path", {
3682
- key: 0,
3683
- d: r,
3684
- fill: B.value.line.area.useGradient ? `url(#areaGradient_${t}_${F.value})` : k(f)(e.color, B.value.line.area.opacity),
3685
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3686
- }, null, 12, Bn)) : x("", !0), n.$slots.pattern && r ? (T(), S("path", {
3687
- key: 1,
3688
- d: r,
3689
- fill: `url(#pattern_${F.value}_${e.slotAbsoluteIndex})`,
3690
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3691
- }, null, 12, Vn)) : x("", !0)], 64))), 128)) : (T(!0), S(y, { key: 1 }, D(e.area.split(";"), (r, i) => (T(), S(y, { key: i }, [r ? (T(), S("path", {
3692
- key: 0,
3693
- d: `M${r}Z`,
3694
- fill: B.value.line.area.useGradient ? `url(#areaGradient_${t}_${F.value})` : k(f)(e.color, B.value.line.area.opacity),
3695
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3696
- }, null, 12, Hn)) : x("", !0), n.$slots.pattern && r ? (T(), S("path", {
3697
- key: 1,
3698
- d: `M${r}Z`,
3699
- fill: `url(#pattern_${F.value}_${e.slotAbsoluteIndex})`,
3700
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3701
- }, null, 12, Un)) : x("", !0)], 64))), 128))])) : x("", !0),
3702
- !e.hasDashedSegments && e.smooth && e.plots.length > 1 && e.curve ? (T(), S("path", {
3703
- key: 1,
3704
- d: `M${e.curve}`,
3705
- stroke: e.temperatureColors && !e.isFlatTemperatureLine ? `url(#temperature_grad_line_${t}_${F.value})` : e.color,
3706
- "stroke-width": B.value.line.strokeWidth,
3707
- "stroke-dasharray": e.dashed ? B.value.line.strokeWidth * 2 : 0,
3708
- fill: "none",
3709
- "stroke-linecap": "round",
3710
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3711
- }, null, 12, Wn)) : e.hasDashedSegments ? (T(), S(y, { key: 2 }, [e.smooth ? (T(!0), S(y, { key: 0 }, D(e.dashedSmooth, (n) => (T(), S("path", {
3712
- key: n.path,
3713
- fill: "none",
3714
- "stroke-linecap": "round",
3715
- "stroke-linejoin": "round",
3716
- d: `M ${n.path}`,
3717
- stroke: e.temperatureColors && !e.isFlatTemperatureLine ? `url(#temperature_grad_line_${t}_${F.value})` : e.color,
3718
- "stroke-width": B.value.line.strokeWidth,
3719
- "stroke-dasharray": n.dashed ? B.value.line.strokeWidth * 2 : 0
3720
- }, null, 8, Gn))), 128)) : (T(!0), S(y, { key: 1 }, D(e.dashedStraight, (n) => (T(), S("path", {
3721
- key: n.path,
3722
- fill: "none",
3723
- "stroke-linecap": "round",
3724
- "stroke-linejoin": "round",
3725
- d: `M ${n.path}`,
3726
- stroke: e.temperatureColors && !e.isFlatTemperatureLine ? `url(#temperature_grad_line_${t}_${F.value})` : e.color,
3727
- "stroke-width": B.value.line.strokeWidth,
3728
- "stroke-dasharray": n.dashed ? B.value.line.strokeWidth * 2 : 0
3729
- }, null, 8, Kn))), 128))], 64)) : e.plots.length > 1 && e.straight ? (T(), S("path", {
3730
- key: 3,
3731
- d: `M${e.straight}`,
3732
- stroke: e.temperatureColors && !e.isFlatTemperatureLine ? `url(#temperature_grad_line_${t}_${F.value})` : e.color,
3733
- "stroke-width": B.value.line.strokeWidth,
3734
- "stroke-dasharray": e.dashed ? B.value.line.strokeWidth * 2 : 0,
3735
- fill: "none",
3736
- "stroke-linecap": "round",
3737
- "stroke-linejoin": "round",
3738
- style: w({ transition: k(Ba) || !B.value.line.showTransition ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out` })
3739
- }, null, 12, qn)) : x("", !0),
3740
- (T(!0), S(y, null, D(e.plots, (r, i) => (T(), S(y, { key: `circle_line_${t}_${i}` }, [!qs.value.linePlot && r && ss(r.value) || qs.value.linePlot && r && ss(r.value) && (R.value !== null && R.value === i || I.value !== null && I.value === i) || yc(e.plots, i) ? (T(), Qe(Ge, {
3741
- key: 0,
3742
- shape: [
3743
- "triangle",
3744
- "square",
3745
- "diamond",
3746
- "pentagon",
3747
- "hexagon",
3748
- "star"
3749
- ].includes(e.shape) ? e.shape : "circle",
3750
- color: B.value.line.useGradient ? `url(#lineGradient_${t}_${F.value})` : B.value.line.dot.useSerieColor ? e.color : B.value.line.dot.fill,
3751
- plot: {
3752
- x: k(v)(r.x),
3753
- y: k(v)(r.y)
3754
- },
3755
- radius: pl(e, r, i) ? (ja.value.line || 6) * 1.5 : (yc(e.plots, i), ja.value.line || 6),
3756
- stroke: B.value.line.dot.useSerieColor ? B.value.chart.backgroundColor : e.color,
3757
- strokeWidth: B.value.line.dot.strokeWidth,
3758
- transition: k(Ba) || !B.value.line.showTransition || pl(e, r, i) ? void 0 : `all ${B.value.line.transitionDurationMs}ms ease-in-out`
3759
- }, null, 8, [
3760
- "shape",
3761
- "color",
3762
- "plot",
3763
- "radius",
3764
- "stroke",
3765
- "strokeWidth",
3766
- "transition"
3767
- ])) : x("", !0), r.comment && B.value.chart.comments.show ? (T(), S("foreignObject", {
3768
- key: 1,
3769
- style: { overflow: "visible" },
3770
- height: "12",
3771
- width: B.value.chart.comments.width,
3772
- x: r.x - B.value.chart.comments.width / 2 + B.value.chart.comments.offsetX,
3773
- y: r.y + B.value.chart.comments.offsetY + 6
3774
- }, [C("div", Yn, [O(n.$slots, "plot-comment", { plot: {
3775
- ...r,
3776
- color: e.color,
3777
- seriesIndex: t,
3778
- datapointIndex: i
3779
- } }, void 0, !0)])], 8, Jn)) : x("", !0)], 64))), 128))
3780
- ], 6))), 128)),
3781
- (B.value.bar.labels.show || B.value.bar.serieName.show) && V.value.dataLabels.show ? (T(), S("g", Xn, [(T(!0), S(y, null, D(Ac.value, (e, t) => (T(), S(y, { key: `xLabel_bar_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_bar_${t}_${r}` }, [n && (!Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || R.value !== null && R.value === r || I.value !== null && I.value === r) && B.value.bar.labels.show ? (T(), S("text", {
3782
- key: 0,
3783
- "text-anchor": sl({
3784
- plot: n,
3785
- type: "bar"
3786
- }),
3787
- "font-size": z.value.plotLabels,
3788
- transform: al({ plot: n }),
3789
- fill: B.value.bar.labels.color,
3790
- stroke: B.value.chart.backgroundColor,
3791
- "paint-order": "stroke",
3792
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`),
3793
- innerHTML: il({
3794
- serie: e,
3795
- plot: n,
3796
- type: "bar"
3797
- })
3798
- }, null, 12, Zn)) : x("", !0), n && B.value.bar.serieName.show ? (T(), S("text", {
3799
- key: 1,
3800
- x: V.value.useIndividualScale && V.value.isStacked ? n.x + xs.value.line / 2 : n.x + Ss() * 1.1,
3801
- y: n.y + (n.value > 0 ? B.value.bar.serieName.offsetY : -B.value.bar.serieName.offsetY * 3),
3802
- "text-anchor": "middle",
3803
- "font-size": z.value.plotLabels,
3804
- fill: B.value.bar.serieName.useSerieColor ? e.color : B.value.bar.serieName.color,
3805
- "font-weight": B.value.bar.serieName.bold ? "bold" : "normal",
3806
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3807
- }, pt(B.value.bar.serieName.useAbbreviation ? k(ye)({
3808
- source: e.name,
3809
- length: B.value.bar.serieName.abbreviationSize
3810
- }) : e.name), 13, Qn)) : x("", !0)], 64))), 128))], 64))), 128))])) : x("", !0),
3811
- B.value.plot.labels.show && V.value.dataLabels.show ? (T(), S("g", $n, [(T(!0), S(y, null, D($.value, (e, t) => (T(), S(y, { key: `xLabel_plot_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_plot_${t}_${r}` }, [n && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || pl(e, n, r) ? (T(), S("text", {
3812
- key: 0,
3813
- transform: ol({
3814
- plot: n,
3815
- type: "plot"
3816
- }),
3817
- "text-anchor": sl({
3818
- plot: n,
3819
- type: "plot"
3820
- }),
3821
- "font-size": z.value.plotLabels,
3822
- fill: B.value.plot.labels.color,
3823
- stroke: B.value.chart.backgroundColor,
3824
- "paint-order": "stroke",
3825
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`),
3826
- innerHTML: il({
3827
- serie: e,
3828
- plot: n,
3829
- type: "plot"
3830
- })
3831
- }, null, 12, er)) : x("", !0)], 64))), 128))], 64))), 128))])) : (T(), S("g", tr, [(T(!0), S(y, null, D($.value, (e, t) => (T(), S(y, { key: `xLabel_plot_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_plot_${t}_${r}` }, [B.value.plot.tag.followValue ? (T(), S(y, { key: 1 }, [[
3832
- I.value,
3833
- R.value,
3834
- $i.value
3835
- ].includes(r) && e.useTag ? (T(), S("line", {
3836
- key: 0,
3837
- class: "vue-ui-xy-tag-plot",
3838
- x1: J.value?.left,
3839
- x2: J.value?.right,
3840
- y1: n.y,
3841
- y2: n.y,
3842
- "stroke-width": 1,
3843
- "stroke-linecap": "round",
3844
- "stroke-dasharray": "2",
3845
- stroke: e.color
3846
- }, null, 8, or)) : x("", !0)], 64)) : (T(), S(y, { key: 0 }, [n && r === 0 && e.useTag && e.useTag === "start" ? (T(), S("foreignObject", {
3847
- key: 0,
3848
- x: n.x,
3849
- y: n.y - 20,
3850
- height: 24,
3851
- width: "150",
3852
- style: w(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3853
- }, [C("div", {
3854
- style: w(`padding: 3px; background:${k(f)(e.color, 80)};color:${k(Se)(e.color)};width:fit-content;font-size:${z.value.plotLabels}px;border-radius: 2px;`),
3855
- innerHTML: k(_)(B.value.plot.tag.formatter, n.value, e.name, {
3856
- datapoint: n,
3857
- seriesIndex: r,
3858
- serieName: e.name
3859
- })
3860
- }, null, 12, rr)], 12, nr)) : x("", !0), n && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (T(), S("foreignObject", {
3861
- key: 1,
3862
- x: n.x - e.name.length * (z.value.plotLabels / 2),
3863
- y: n.y - 20,
3864
- height: 24,
3865
- width: "150",
3866
- style: w(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3867
- }, [C("div", {
3868
- style: w(`padding: 3px; background:${k(f)(e.color, 80)};color:${k(Se)(e.color)};width:fit-content;font-size:${z.value.plotLabels}px;border-radius: 2px;`),
3869
- innerHTML: k(_)(B.value.plot.tag.formatter, n.value, e.name, {
3870
- datapoint: n,
3871
- seriesIndex: r,
3872
- serieName: e.name
3873
- })
3874
- }, null, 12, ar)], 12, ir)) : x("", !0)], 64))], 64))), 128))], 64))), 128))])),
3875
- B.value.line.labels.show && V.value.dataLabels.show ? (T(), S("g", sr, [(T(!0), S(y, null, D(Q.value, (e, t) => (T(), S(y, { key: `xLabel_line_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_line_${t}_${r}` }, [n && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || pl(e, n, r) ? (T(), S("text", {
3876
- key: 0,
3877
- transform: ol({
3878
- plot: n,
3879
- type: "line"
3880
- }),
3881
- "text-anchor": sl({
3882
- plot: n,
3883
- type: "line"
3884
- }),
3885
- "font-size": z.value.plotLabels,
3886
- fill: B.value.line.labels.color,
3887
- stroke: B.value.chart.backgroundColor,
3888
- "paint-order": "stroke",
3889
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`),
3890
- innerHTML: il({
3891
- serie: e,
3892
- plot: n,
3893
- type: "line"
3894
- })
3895
- }, null, 12, cr)) : x("", !0)], 64))), 128))], 64))), 128))])) : (T(), S("g", lr, [(T(!0), S(y, null, D(Q.value, (e, t) => (T(), S(y, { key: `xLabel_line_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_line_${t}_${r}` }, [B.value.line.tag.followValue ? (T(), S(y, { key: 1 }, [[
3896
- I.value,
3897
- R.value,
3898
- $i.value
3899
- ].includes(r) && e.useTag ? (T(), S("line", {
3900
- key: 0,
3901
- class: "vue-ui-xy-tag-line",
3902
- x1: J.value?.left,
3903
- x2: J.value?.right,
3904
- y1: n.y,
3905
- y2: n.y,
3906
- "stroke-width": 1,
3907
- "stroke-linecap": "round",
3908
- "stroke-dasharray": "2",
3909
- stroke: e.color
3910
- }, null, 8, mr)) : x("", !0)], 64)) : (T(), S(y, { key: 0 }, [n && r === 0 && e.useTag && e.useTag === "start" ? (T(), S("foreignObject", {
3911
- key: 0,
3912
- x: n.x,
3913
- y: n.y - 20,
3914
- height: 24,
3915
- width: "150",
3916
- style: w(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3917
- }, [C("div", {
3918
- style: w(`padding: 3px; background:${k(f)(e.color, 80)};color:${k(Se)(e.color)};width:fit-content;font-size:${z.value.plotLabels}px;border-radius: 2px;`),
3919
- innerHTML: k(_)(B.value.line.tag.formatter, n.value, e.name, {
3920
- datapoint: n,
3921
- seriesIndex: r,
3922
- serieName: e.name
3923
- })
3924
- }, null, 12, dr)], 12, ur)) : x("", !0), n && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (T(), S("foreignObject", {
3925
- key: 1,
3926
- x: n.x,
3927
- y: n.y - 20,
3928
- height: 24,
3929
- width: "150",
3930
- style: w(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3931
- }, [C("div", {
3932
- style: w(`padding: 3px; background:${k(f)(e.color, 80)};color:${k(Se)(e.color)};width:fit-content;font-size:${z.value.plotLabels}px;border-radius: 2px;`),
3933
- innerHTML: k(_)(B.value.line.tag.formatter, n.value, e.name, {
3934
- datapoint: n,
3935
- seriesIndex: r,
3936
- serieName: e.name
3937
- })
3938
- }, null, 12, pr)], 12, fr)) : x("", !0)], 64))], 64))), 128))], 64))), 128))])),
3939
- (T(!0), S(y, null, D(Q.value, (e, t) => (T(), S(y, { key: `xLabel_line_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_line_${t}_${r}` }, [n && r === 0 && e.showSerieName && e.showSerieName === "start" ? (T(), S("text", {
3940
- key: 0,
3941
- x: n.x - z.value.plotLabels,
3942
- y: n.y,
3943
- "font-size": z.value.plotLabels,
3944
- "text-anchor": "end",
3945
- fill: e.color,
3946
- innerHTML: k(Oe)({
3947
- content: e.name,
3948
- fontSize: z.value.plotLabels,
3949
- fill: e.color,
3950
- x: n.x - z.value.plotLabels,
3951
- y: n.y,
3952
- maxWords: 2
3953
- }),
3954
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3955
- }, null, 12, hr)) : x("", !0), n && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (T(), S("text", {
3956
- key: 1,
3957
- x: n.x + z.value.plotLabels,
3958
- y: n.y,
3959
- "font-size": z.value.plotLabels,
3960
- "text-anchor": "start",
3961
- fill: e.color,
3962
- innerHTML: k(Oe)({
3963
- content: e.name,
3964
- fontSize: z.value.plotLabels,
3965
- fill: e.color,
3966
- x: n.x + z.value.plotLabels,
3967
- y: n.y,
3968
- maxWords: 2
3969
- }),
3970
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3971
- }, null, 12, gr)) : x("", !0)], 64))), 128))], 64))), 128)),
3972
- (T(!0), S(y, null, D($.value, (e, t) => (T(), S(y, { key: `xLabel_plot_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `xLabel_plot_${t}_${r}` }, [n && r === 0 && e.showSerieName && e.showSerieName === "start" ? (T(), S("text", {
3973
- key: 0,
3974
- x: n.x - z.value.plotLabels,
3975
- y: n.y,
3976
- "font-size": z.value.plotLabels,
3977
- "text-anchor": "end",
3978
- fill: e.color,
3979
- innerHTML: k(Oe)({
3980
- content: e.name,
3981
- fontSize: z.value.plotLabels,
3982
- fill: e.color,
3983
- x: n.x - z.value.plotLabels,
3984
- y: n.y,
3985
- maxWords: 2
3986
- }),
3987
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
3988
- }, null, 12, _r)) : x("", !0), n && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (T(), S("text", {
3989
- key: 1,
3990
- x: n.x + z.value.plotLabels,
3991
- y: n.y,
3992
- "font-size": z.value.plotLabels,
3993
- "text-anchor": "start",
3994
- fill: e.color,
3995
- innerHTML: k(Oe)({
3996
- content: e.name,
3997
- fontSize: z.value.plotLabels,
3998
- fill: e.color,
3999
- x: n.x + z.value.plotLabels,
4000
- y: n.y,
4001
- maxWords: 2
4002
- }),
4003
- style: w(`opacity:${M.value ? M.value === e.groupId ? 1 : .2 : 1};transition:opacity 0.2s ease-in-out`)
4004
- }, null, 12, vr)) : x("", !0)], 64))), 128))], 64))), 128)),
4005
- (T(!0), S(y, null, D([
4006
- ...$.value,
4007
- ...Q.value,
4008
- ...Ac.value
4009
- ], (e, t) => (T(), S(y, { key: `progression-${t}` }, [Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(k(_e)(e.plots).trend) ? (T(), S("g", yr, [
4010
- C("defs", null, [C("marker", {
4011
- id: `progression_arrow_${t}`,
4012
- markerWidth: "9",
4013
- markerHeight: "9",
4014
- viewBox: "-1 -1 9 9",
4015
- markerUnits: "userSpaceOnUse",
4016
- refX: "7",
4017
- refY: 7 / 2,
4018
- orient: "auto",
4019
- overflow: "visible"
4020
- }, [C("polygon", {
4021
- points: "0,0 7,3.5 0,7",
4022
- fill: e.color,
4023
- stroke: B.value.chart.backgroundColor,
4024
- "stroke-width": "1",
4025
- "stroke-linejoin": "round"
4026
- }, null, 8, xr)], 8, br)]),
4027
- e.plots.length > 1 ? (T(), S("line", {
4028
- key: 0,
4029
- x1: k(_e)(e.plots).x1 + (e.type === "bar" ? Ss() : 0),
4030
- x2: k(_e)(e.plots).x2 + (e.type === "bar" ? Ss() : 0),
4031
- y1: k(h)(k(_e)(e.plots).y1),
4032
- y2: k(h)(k(_e)(e.plots).y2),
4033
- "stroke-width": 1,
4034
- stroke: B.value.chart.backgroundColor,
4035
- "stroke-dasharray": 2,
4036
- "stroke-linecap": "round",
4037
- "stroke-linejoin": "round",
4038
- "marker-end": `url(#progression_arrow_${t})`
4039
- }, null, 8, Sr)) : x("", !0),
4040
- e.plots.length > 1 ? (T(), S("line", {
4041
- key: 1,
4042
- x1: k(_e)(e.plots).x1 + (e.type === "bar" ? Ss() : 0),
4043
- x2: k(_e)(e.plots).x2 + (e.type === "bar" ? Ss() : 0),
4044
- y1: k(h)(k(_e)(e.plots).y1),
4045
- y2: k(h)(k(_e)(e.plots).y2),
4046
- "stroke-width": 1,
4047
- stroke: e.color,
4048
- "stroke-dasharray": 2,
4049
- "stroke-linecap": "round",
4050
- "stroke-linejoin": "round",
4051
- "marker-end": `url(#progression_arrow_${t})`
4052
- }, null, 8, Cr)) : x("", !0),
4053
- e.plots.length > 1 ? (T(), S("text", {
4054
- key: 2,
4055
- "text-anchor": "middle",
4056
- x: k(_e)(e.plots).x2 + (e.type === "bar" ? Ss() : 0),
4057
- y: k(_e)(e.plots).y2 - 12,
4058
- "font-size": z.value.plotLabels,
4059
- fill: e.color,
4060
- stroke: B.value.chart.backgroundColor,
4061
- "stroke-width": 4,
4062
- "stroke-linecap": "round",
4063
- "stroke-linejoin": "round",
4064
- "paint-order": "stroke fill"
4065
- }, pt(k(s)({
4066
- v: k(_e)(e.plots).trend * 100,
4067
- s: "%",
4068
- r: 2
4069
- })), 9, wr)) : x("", !0)
4070
- ])) : x("", !0)], 64))), 128)),
4071
- V.value.useIndividualScale && !V.value.isStacked ? (T(), S(y, { key: 16 }, [C("defs", null, [(T(!0), S(y, null, D(jc.value, (e, t) => (T(), S("linearGradient", {
4072
- id: `individual_scale_gradient_${F.value}_${t}`,
4073
- x1: q.value ? "100%" : "0%",
4074
- x2: q.value ? "0%" : "100%",
4075
- y1: "0%",
4076
- y2: "0%"
4077
- }, [C("stop", {
4078
- offset: "0%",
4079
- "stop-color": B.value.chart.backgroundColor,
4080
- "stop-opacity": "0"
4081
- }, null, 8, Er), C("stop", {
4082
- offset: "100%",
4083
- "stop-color": e.color,
4084
- "stop-opacity": "0.2"
4085
- }, null, 8, Dr)], 8, Tr))), 256))]), (T(!0), S(y, null, D(jc.value, (e, t) => (T(), S("rect", {
4086
- x: q.value ? e.x : e.x - B.value.chart.grid.labels.yAxis.labelWidth - J.value.individualOffsetX,
4087
- y: J.value?.top,
4088
- width: (q.value, B.value.chart.grid.labels.yAxis.labelWidth + J.value.individualOffsetX),
4089
- height: J.value.height < 0 ? 10 : J.value.height,
4090
- fill: M.value === e.groupId ? `url(#individual_scale_gradient_${F.value}_${t})` : "transparent",
4091
- onMouseenter: (t) => M.value = e.groupId,
4092
- onMouseleave: r[0] ||= (e) => M.value = null
4093
- }, null, 40, Or))), 256))], 64)) : x("", !0),
4094
- C("g", null, [B.value.chart.grid.labels.axis.yLabel && !V.value.useIndividualScale ? (T(), S("text", {
4095
- key: 0,
4096
- ref_key: "yAxisLabel",
4097
- ref: Ri,
4098
- "font-size": z.value.yAxis,
4099
- fill: B.value.chart.grid.labels.color,
4100
- transform: `translate(${q.value ? J.value.right + J.value.scaleLabelsOffset + B.value.chart.grid.labels.axis.yLabelOffsetX + z.value.yAxis : B.value.chart.grid.labels.axis.fontSize + B.value.chart.grid.labels.axis.yLabelOffsetX}, ${J.value?.top + J.value.height / 2}) rotate(-90)`,
4101
- "text-anchor": "middle",
4102
- style: { transition: "none" }
4103
- }, pt(B.value.chart.grid.labels.axis.yLabel), 9, kr)) : x("", !0), B.value.chart.grid.labels.axis.xLabel ? (T(), S("text", {
4104
- key: 1,
4105
- ref_key: "xAxisLabel",
4106
- ref: Li,
4107
- "text-anchor": "middle",
4108
- x: N.value / 2,
4109
- y: Ki.value - 3,
4110
- "font-size": z.value.yAxis,
4111
- fill: B.value.chart.grid.labels.color
4112
- }, pt(B.value.chart.grid.labels.axis.xLabel), 9, Ar)) : x("", !0)]),
4113
- B.value.chart.grid.labels.xAxisLabels.show ? (T(), S("g", {
4114
- key: 17,
4115
- ref_key: "timeLabelsEls",
4116
- ref: zi,
4117
- opacity: ll.value ? .1 : 1,
4118
- style: { transition: "opacity 0.2s" }
4119
- }, [n.$slots["time-label"] ? (T(!0), S(y, { key: 0 }, D(Sc.value, (e, t) => O(n.$slots, "time-label", at({
4120
- key: `time_label_${e.id}`,
4121
- ref_for: !0
4122
- }, {
4123
- x: Cc(e, t),
4124
- y: J.value?.bottom,
4125
- fontSize: z.value.xAxis,
4126
- fill: B.value.chart.grid.labels.xAxisLabels.color,
4127
- transform: `translate(${Cc(e, t)}, ${J.value?.bottom + z.value.xAxis * 1.3 + B.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${B.value.chart.grid.labels.xAxisLabels.rotation})`,
4128
- absoluteIndex: e.absoluteIndex,
4129
- content: e.text,
4130
- textAnchor: B.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : B.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
4131
- show: e && e.text
4132
- }), void 0, !0)), 128)) : (T(!0), S(y, { key: 1 }, D(Sc.value, (e, n) => (T(), S("g", { key: `time_label_${n}` }, [e && e.text ? (T(), S(y, { key: 0 }, [String(e.text).includes("\n") ? (T(), S("text", {
4133
- key: 1,
4134
- class: "vue-data-ui-time-label",
4135
- "text-anchor": B.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : B.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
4136
- "font-size": z.value.xAxis,
4137
- fill: B.value.chart.grid.labels.xAxisLabels.color,
4138
- transform: `translate(${Cc(e, n)}, ${J.value?.bottom + z.value.xAxis * 1.5}), rotate(${B.value.chart.grid.labels.xAxisLabels.rotation})`,
4139
- style: w({ cursor: Ao() && Fa.value ? "pointer" : "default" }),
4140
- innerHTML: k(t)({
4141
- content: String(e.text),
4142
- fontSize: z.value.xAxis,
4143
- fill: B.value.chart.grid.labels.xAxisLabels.color,
4144
- x: 0,
4145
- y: 0
4146
- }),
4147
- onClick: () => Uo(e, n)
4148
- }, null, 12, Nr)) : (T(), S("text", {
4149
- key: 0,
4150
- class: "vue-data-ui-time-label",
4151
- "text-anchor": B.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : B.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
4152
- "font-size": z.value.xAxis,
4153
- fill: B.value.chart.grid.labels.xAxisLabels.color,
4154
- transform: `translate(${Cc(e, n)}, ${J.value?.bottom + z.value.xAxis * 1.5}), rotate(${B.value.chart.grid.labels.xAxisLabels.rotation})`,
4155
- style: w({ cursor: Ao() && Fa.value ? "pointer" : "default" }),
4156
- onClick: () => Uo(e, n)
4157
- }, pt(e.text || ""), 13, Mr))], 64)) : x("", !0)]))), 128))], 8, jr)) : x("", !0),
4158
- dl.value ? (T(), S("g", Pr, [C("text", {
4159
- class: "vue-data-ui-time-label",
4160
- "text-anchor": B.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : B.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
4161
- "font-size": z.value.xAxis,
4162
- fill: B.value.chart.grid.labels.xAxisLabels.color,
4163
- transform: `translate(${dl.value.x}, ${J.value?.bottom + z.value.xAxis * 1.5}), rotate(${B.value.chart.grid.labels.xAxisLabels.rotation})`,
4164
- "font-weight": "bold",
4165
- style: {
4166
- transition: "none !important",
4167
- animation: "none !important",
4168
- "pointer-events": "none"
4169
- },
4170
- innerHTML: k(t)({
4171
- content: String(dl.value.text),
4172
- fontSize: z.value.xAxis,
4173
- fill: B.value.chart.grid.labels.xAxisLabels.color,
4174
- x: 0,
4175
- y: 0
4176
- })
4177
- }, null, 8, Fr)])) : x("", !0),
4178
- vc.value.length && !V.value.isStacked ? (T(), S("g", Ir, [(T(!0), S(y, null, D(vc.value, (e) => (T(), S("g", { key: e.uid }, [
4179
- e.yTop && e.show && isFinite(e.yTop) ? (T(), S("line", {
4180
- key: 0,
4181
- x1: e.x1,
4182
- y1: e.yTop,
4183
- x2: e.x2,
4184
- y2: e.yTop,
4185
- stroke: e.config.line.stroke,
4186
- "stroke-width": e.config.line.strokeWidth,
4187
- "stroke-dasharray": e.config.line.strokeDasharray,
4188
- "stroke-linecap": "round",
4189
- style: { animation: "none !important" }
4190
- }, null, 8, Lr)) : x("", !0),
4191
- e.yBottom && e.show && isFinite(e.yBottom) ? (T(), S("line", {
4192
- key: 1,
4193
- x1: e.x1,
4194
- y1: e.yBottom,
4195
- x2: e.x2,
4196
- y2: e.yBottom,
4197
- stroke: e.config.line.stroke,
4198
- "stroke-width": e.config.line.strokeWidth,
4199
- "stroke-dasharray": e.config.line.strokeDasharray,
4200
- "stroke-linecap": "round",
4201
- style: { animation: "none !important" }
4202
- }, null, 8, Rr)) : x("", !0),
4203
- e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (T(), S("rect", {
4204
- key: 2,
4205
- y: Math.min(e.yTop, e.yBottom),
4206
- x: e.x1,
4207
- width: J.value.width,
4208
- height: k(v)(e.areaHeight, 0),
4209
- fill: k(f)(e.config.area.fill, e.config.area.opacity),
4210
- style: { animation: "none !important" }
4211
- }, null, 8, zr)) : x("", !0),
4212
- e.config.label.text && e.show && isFinite(e._box.y) ? (T(), S("rect", at({
4213
- key: 3,
4214
- class: "vue-ui-xy-annotation-label-box"
4215
- }, { ref_for: !0 }, e._box, { style: {
4216
- animation: "none !important",
4217
- transition: "none !important"
4218
- } }), null, 16)) : x("", !0),
4219
- e.config.label.text && e.show && isFinite(e._text.y) ? (T(), S("text", {
4220
- key: 4,
4221
- id: e.id,
4222
- class: "vue-ui-xy-annotation-label",
4223
- x: e._text.x,
4224
- y: e._text.y,
4225
- "font-size": e.config.label.fontSize,
4226
- fill: e.config.label.color,
4227
- "text-anchor": e.config.label.textAnchor
4228
- }, pt(e.config.label.text), 9, Br)) : x("", !0)
4229
- ]))), 128))])) : x("", !0),
4230
- !ll.value && B.value.chart.timeTag.show && (K.value ? k(g)(el.value) : ![null, void 0].includes(R.value) || ![null, void 0].includes(I.value)) ? (T(), S("g", Vr, [(T(), S("foreignObject", {
4231
- x: nl(),
4232
- y: J.value?.bottom,
4233
- width: "200",
4234
- height: "40",
4235
- style: { overflow: "visible !important" }
4236
- }, [C("div", {
4237
- ref_key: "timeTagEl",
4238
- ref: Zc,
4239
- class: "vue-ui-xy-time-tag",
4240
- style: w(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${B.value.chart.timeTag.backgroundColor};color:${B.value.chart.timeTag.color};font-size:${B.value.chart.timeTag.fontSize}px`),
4241
- innerHTML: rl.value
4242
- }, null, 12, Ur)], 8, Hr)), C("circle", {
4243
- cx: K.value && k(g)(el.value) ? wc({ x: el.value }) : tc((R.value === null ? 0 : R.value) || (I.value === null ? 0 : I.value)),
4244
- cy: J.value?.bottom,
4245
- r: B.value.chart.timeTag.circleMarker.radius,
4246
- fill: B.value.chart.timeTag.circleMarker.color
4247
- }, null, 8, Wr)])) : x("", !0)
4248
- ])) : x("", !0),
4249
- Ka.value ? (T(), S("rect", at({ key: 2 }, Ya.value, {
4250
- "data-start": W.value.start,
4251
- "data-end": W.value.end
4252
- }), null, 16, Gr)) : x("", !0),
4253
- O(n.$slots, "svg", { svg: {
4254
- ...Ta.value,
4255
- slicer: W.value,
4256
- isPrintingImg: k(Xa) || k(Za) || fa.value,
4257
- isPrintingSvg: pa.value,
4258
- data: [
4259
- ...Q.value,
4260
- ...Ac.value,
4261
- ...$.value
4262
- ],
4263
- drawingArea: J.value
4264
- } }, void 0, !0)
4265
- ], 512)], 46, Tt)), n.$slots.hint ? (T(), S("div", Kr, [O(n.$slots, "hint", ct(it({
4266
- hint: B.value.a11y.translations.keyboardNavigation,
4267
- isVisible: El.value
4268
- })), void 0, !0)])) : x("", !0)]),
4269
- n.$slots.watermark ? (T(), S("div", qr, [O(n.$slots, "watermark", ct(it({ isPrinting: k(Xa) || k(Za) || fa.value || pa.value })), void 0, !0)])) : x("", !0),
4270
- (T(!0), S(y, null, D(Q.value, (e, t) => (T(), S(y, { key: `tag_line_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `tag_line_${t}_${r}` }, [[
4271
- I.value,
4272
- R.value,
4273
- $i.value
4274
- ].includes(r) && e.useTag && e.useTag === "end" && B.value.line.tag.followValue ? (T(), S("div", {
4275
- key: 0,
4276
- ref_for: !0,
4277
- ref: (e) => No(t, r, e, "right", "line"),
4278
- class: "vue-ui-xy-tag",
4279
- "data-tag": "right",
4280
- style: w({
4281
- position: "fixed",
4282
- top: k(ge)({
4283
- svgElement: L.value,
4284
- x: J.value?.right + B.value.line.tag.fontSize / 1.5,
4285
- y: n.y,
4286
- element: ca.value[`${t}_${r}_right_line`],
4287
- position: "right"
4288
- })?.top + "px",
4289
- left: k(ge)({
4290
- svgElement: L.value,
4291
- x: J.value?.right + B.value.line.tag.fontSize / 1.5,
4292
- y: n.y,
4293
- element: ca.value[`${t}_${r}_right_line`],
4294
- position: "right"
4295
- })?.left + "px",
4296
- height: "fit-content",
4297
- width: "fit-content",
4298
- background: e.color,
4299
- color: k(Se)(e.color),
4300
- padding: "0 6px",
4301
- fontSize: B.value.line.tag.fontSize + "px",
4302
- opacity: 1
4303
- })
4304
- }, [(T(), S("svg", Jr, [C("path", {
4305
- d: "M 0,10 10,0 10,20 Z",
4306
- fill: e.color,
4307
- stroke: "none"
4308
- }, null, 8, Yr)])), C("div", {
4309
- class: "vue-ui-xy-tag-content",
4310
- innerHTML: k(_)(B.value.line.tag.formatter, n.value, e.name, {
4311
- datapoint: n,
4312
- seriesIndex: r,
4313
- serieName: e.name
4314
- })
4315
- }, null, 8, Xr)], 4)) : x("", !0), [
4316
- I.value,
4317
- R.value,
4318
- $i.value
4319
- ].includes(r) && e.useTag && e.useTag === "start" && B.value.line.tag.followValue ? (T(), S("div", {
4320
- key: 1,
4321
- ref_for: !0,
4322
- ref: (e) => No(t, r, e, "left", "line"),
4323
- class: "vue-ui-xy-tag",
4324
- "data-tag": "left",
4325
- style: w({
4326
- position: "fixed",
4327
- top: k(ge)({
4328
- svgElement: L.value,
4329
- x: J.value?.left - B.value.line.tag.fontSize / 1.5,
4330
- y: n.y,
4331
- element: ca.value[`${t}_${r}_left_line`],
4332
- position: "left"
4333
- })?.top + "px",
4334
- left: k(ge)({
4335
- svgElement: L.value,
4336
- x: J.value?.left - B.value.line.tag.fontSize / 1.5,
4337
- y: n.y,
4338
- element: ca.value[`${t}_${r}_left_line`],
4339
- position: "left"
4340
- })?.left + "px",
4341
- height: "fit-content",
4342
- width: "fit-content",
4343
- background: e.color,
4344
- color: k(Se)(e.color),
4345
- padding: "0 6px",
4346
- fontSize: B.value.line.tag.fontSize + "px",
4347
- opacity: 1
4348
- })
4349
- }, [(T(), S("svg", Zr, [C("path", {
4350
- d: "M 0,0 10,10 0,20 Z",
4351
- fill: e.color,
4352
- stroke: "none"
4353
- }, null, 8, Qr)])), C("div", {
4354
- class: "vue-ui-xy-tag-content",
4355
- innerHTML: k(_)(B.value.line.tag.formatter, n.value, e.name, {
4356
- datapoint: n,
4357
- seriesIndex: r,
4358
- serieName: e.name
4359
- })
4360
- }, null, 8, $r)], 4)) : x("", !0)], 64))), 128))], 64))), 128)),
4361
- (T(!0), S(y, null, D($.value, (e, t) => (T(), S(y, { key: `tag_plot_${e.id}` }, [(T(!0), S(y, null, D(e.plots, (n, r) => (T(), S(y, { key: `tag_plot_${t}_${r}` }, [[
4362
- I.value,
4363
- R.value,
4364
- $i.value
4365
- ].includes(r) && e.useTag && e.useTag === "end" && B.value.plot.tag.followValue ? (T(), S("div", {
4366
- key: 0,
4367
- ref_for: !0,
4368
- ref: (e) => No(t, r, e, "right", "plot"),
4369
- class: "vue-ui-xy-tag",
4370
- "data-tag": "right",
4371
- style: w({
4372
- position: "fixed",
4373
- top: k(ge)({
4374
- svgElement: L.value,
4375
- x: J.value?.right + B.value.plot.tag.fontSize / 1.5,
4376
- y: n.y,
4377
- element: ca.value[`${t}_${r}_right_plot`],
4378
- position: "right"
4379
- })?.top + "px",
4380
- left: k(ge)({
4381
- svgElement: L.value,
4382
- x: J.value?.right + B.value.plot.tag.fontSize / 1.5,
4383
- y: n.y,
4384
- element: ca.value[`${t}_${r}_right_plot`],
4385
- position: "right"
4386
- })?.left + "px",
4387
- height: "fit-content",
4388
- width: "fit-content",
4389
- background: e.color,
4390
- color: k(Se)(e.color),
4391
- padding: "0 6px",
4392
- fontSize: B.value.plot.tag.fontSize + "px",
4393
- opacity: 1
4394
- })
4395
- }, [(T(), S("svg", ei, [C("path", {
4396
- d: "M 0,10 10,0 10,20 Z",
4397
- fill: e.color,
4398
- stroke: "none"
4399
- }, null, 8, ti)])), C("div", {
4400
- class: "vue-ui-xy-tag-content",
4401
- innerHTML: k(_)(B.value.plot.tag.formatter, n.value, e.name, {
4402
- datapoint: n,
4403
- seriesIndex: r,
4404
- serieName: e.name
4405
- })
4406
- }, null, 8, ni)], 4)) : x("", !0), [
4407
- I.value,
4408
- R.value,
4409
- $i.value
4410
- ].includes(r) && e.useTag && e.useTag === "start" && B.value.plot.tag.followValue ? (T(), S("div", {
4411
- key: 1,
4412
- ref_for: !0,
4413
- ref: (e) => No(t, r, e, "left", "plot"),
4414
- class: "vue-ui-xy-tag",
4415
- "data-tag": "left",
4416
- style: w({
4417
- position: "fixed",
4418
- top: k(ge)({
4419
- svgElement: L.value,
4420
- x: J.value?.left - B.value.plot.tag.fontSize / 1.5,
4421
- y: n.y,
4422
- element: ca.value[`${t}_${r}_left_plot`],
4423
- position: "left"
4424
- })?.top + "px",
4425
- left: k(ge)({
4426
- svgElement: L.value,
4427
- x: J.value?.left - B.value.plot.tag.fontSize / 1.5,
4428
- y: n.y,
4429
- element: ca.value[`${t}_${r}_left_plot`],
4430
- position: "left"
4431
- })?.left + "px",
4432
- height: "fit-content",
4433
- width: "fit-content",
4434
- background: e.color,
4435
- color: k(Se)(e.color),
4436
- padding: "0 6px",
4437
- fontSize: B.value.plot.tag.fontSize + "px",
4438
- opacity: 1
4439
- })
4440
- }, [(T(), S("svg", ri, [C("path", {
4441
- d: "M 0,0 10,10 0,20 Z",
4442
- fill: e.color,
4443
- stroke: "none"
4444
- }, null, 8, ii)])), C("div", {
4445
- class: "vue-ui-xy-tag-content",
4446
- innerHTML: k(_)(B.value.plot.tag.formatter, n.value, e.name, {
4447
- datapoint: n,
4448
- seriesIndex: r,
4449
- serieName: e.name
4450
- })
4451
- }, null, 8, ai)], 4)) : x("", !0)], 64))), 128))], 64))), 128)),
4452
- B.value.chart.zoom.show && U.value > 6 && Pa.value && Qo.value ? (T(), Qe(qe, {
4453
- key: 6,
4454
- ref_key: "chartSlicer",
4455
- ref: Mi,
4456
- uuid: F.value,
4457
- allMinimaps: hc.value,
4458
- background: B.value.chart.zoom.color,
4459
- borderColor: B.value.chart.backgroundColor,
4460
- customFormat: B.value.chart.zoom.customFormat,
4461
- cutNullValues: B.value.line.cutNullValues,
4462
- enableRangeHandles: B.value.chart.zoom.enableRangeHandles,
4463
- enableSelectionDrag: B.value.chart.zoom.enableSelectionDrag,
4464
- end: W.value.end,
4465
- focusOnDrag: B.value.chart.zoom.focusOnDrag,
4466
- focusRangeRatio: B.value.chart.zoom.focusRangeRatio,
4467
- fontSize: B.value.chart.zoom.fontSize,
4468
- useResetSlot: B.value.chart.zoom.useResetSlot,
4469
- immediate: !B.value.chart.zoom.preview.enable,
4470
- inputColor: B.value.chart.zoom.color,
4471
- isPreview: Ka.value,
4472
- labelLeft: Y.value[0] ? Y.value[0].text : "",
4473
- labelRight: Y.value.at(-1) ? Y.value.at(-1).text : "",
4474
- max: Dc.value,
4475
- min: Ec.value,
4476
- precision: K.value ? B.value.chart.grid.labels.xAxis.rounding : 0,
4477
- useValueRange: K.value,
4478
- minimap: mc.value,
4479
- minimapCompact: B.value.chart.zoom.minimap.compact,
4480
- minimapFrameColor: B.value.chart.zoom.minimap.frameColor,
4481
- minimapIndicatorColor: B.value.chart.zoom.minimap.indicatorColor,
4482
- minimapLineColor: B.value.chart.zoom.minimap.lineColor,
4483
- minimapMerged: B.value.chart.zoom.minimap.merged,
4484
- minimapSelectedColor: B.value.chart.zoom.minimap.selectedColor,
4485
- minimapSelectedColorOpacity: B.value.chart.zoom.minimap.selectedColorOpacity,
4486
- minimapSelectedIndex: K.value ? ma.value : I.value,
4487
- minimapSelectionRadius: B.value.chart.zoom.minimap.selectionRadius,
4488
- preciseLabels: Lc.value.length ? Lc.value : Lo.value,
4489
- refreshStartPoint: K.value ? Ec.value : B.value.chart.zoom.startIndex === null ? 0 : B.value.chart.zoom.startIndex,
4490
- refreshEndPoint: K.value ? Dc.value : B.value.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => Wa(e.series).length)) : B.value.chart.zoom.endIndex + 1,
4491
- selectColor: B.value.chart.zoom.highlightColor,
4492
- selectedSeries: gc.value,
4493
- smoothMinimap: B.value.chart.zoom.minimap.smooth,
4494
- start: W.value.start,
4495
- textColor: B.value.chart.color,
4496
- timeLabels: Lo.value,
4497
- usePreciseLabels: B.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !B.value.chart.zoom.useDefaultFormat,
4498
- valueEnd: W.value.end,
4499
- valueStart: W.value.start,
4500
- verticalHandles: B.value.chart.zoom.minimap.verticalHandles,
4501
- minScale: B.value.chart.grid.labels.yAxis.scaleMin,
4502
- maxScale: B.value.chart.grid.labels.yAxis.scaleMax,
4503
- maxWidth: B.value.chart.zoom.maxWidth,
4504
- additionalMinimapHeight: B.value.chart.zoom.minimap.additionalHeight,
4505
- handleType: B.value.chart.zoom.minimap.handleType,
4506
- handleIconColor: B.value.chart.zoom.minimap.handleIconColor,
4507
- handleBorderWidth: B.value.chart.zoom.minimap.handleBorderWidth,
4508
- handleBorderColor: B.value.chart.zoom.minimap.handleBorderColor,
4509
- handleFill: B.value.chart.zoom.minimap.handleFill,
4510
- handleWidth: B.value.chart.zoom.minimap.handleWidth,
4511
- isCursorPointer: Fa.value,
4512
- onFutureEnd: r[1] ||= (e) => qa("end", e),
4513
- onFutureStart: r[2] ||= (e) => qa("start", e),
4514
- onReset: os,
4515
- onTrapMouse: Wo,
4516
- onTrapMouseValue: Go,
4517
- "onUpdate:end": as,
4518
- "onUpdate:start": is
4519
- }, {
4520
- "reset-action": A(({ reset: e }) => [O(n.$slots, "reset-action", ct(it({ reset: e })), void 0, !0)]),
4521
- _: 3
4522
- }, 8, /* @__PURE__ */ "uuid.allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.useResetSlot.immediate.inputColor.isPreview.labelLeft.labelRight.max.min.precision.useValueRange.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshStartPoint.refreshEndPoint.selectColor.selectedSeries.smoothMinimap.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.minScale.maxScale.maxWidth.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth.isCursorPointer".split("."))) : x("", !0),
4523
- C("div", { id: `legend-bottom-${F.value}` }, null, 8, oi),
4524
- ua.value && (B.value.chart.legend.show || n.$slots.legend) ? (T(), Qe(Ze, {
4525
- key: 7,
4526
- to: B.value.chart.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
4527
- }, [C("div", {
4528
- ref_key: "chartLegend",
4529
- ref: Ni
4530
- }, [O(n.$slots, "legend", { legend: go.value }, () => [B.value.chart.legend.show ? (T(), S("div", {
4531
- key: 0,
4532
- class: "vue-ui-xy-legend",
4533
- style: w({ fontSize: `var(--legend-font-size, ${B.value.chart.legend.fontSize ?? 14}px)` })
4534
- }, [B.value.chart.legend.selectAllToggle.show && go.value.length > 2 && !k(Ba) ? (T(), Qe(Ye, {
4535
- key: 0,
4536
- backgroundColor: B.value.chart.legend.selectAllToggle.backgroundColor,
4537
- color: B.value.chart.legend.selectAllToggle.color,
4538
- fontSize: B.value.chart.legend.fontSize,
4539
- checked: P.value.length > 0,
4540
- onToggle: zs
4541
- }, null, 8, [
4542
- "backgroundColor",
4543
- "color",
4544
- "fontSize",
4545
- "checked"
4546
- ])) : x("", !0), (T(!0), S(y, null, D(go.value, (e, t) => (T(), S("div", {
4547
- key: `div_legend_item_${t}`,
4548
- onClick: (t) => Hs(e),
4549
- onKeydown: (t) => Bs(t, e),
4550
- role: "button",
4551
- tabindex: "0",
4552
- class: st({
4553
- "vue-ui-xy-legend-item-alone": go.value.length === 1,
4554
- "vue-ui-xy-legend-item": !0,
4555
- "vue-ui-xy-legend-item-segregated": P.value.includes(e.id)
4556
- }),
4557
- style: w({ cursor: Fa.value ? "pointer" : "default" })
4558
- }, [Yi.value[e.type] === "line" ? (T(), S("svg", ci, [C("rect", {
4559
- x: "0",
4560
- y: "7.5",
4561
- rx: "1.5",
4562
- stroke: B.value.chart.backgroundColor,
4563
- "stroke-width": .5,
4564
- height: "3",
4565
- width: "20",
4566
- fill: e.color
4567
- }, null, 8, li), tt(Ge, {
4568
- plot: {
4569
- x: 10,
4570
- y: 9
4571
- },
4572
- radius: 4,
4573
- color: e.color,
4574
- shape: [
4575
- "triangle",
4576
- "square",
4577
- "diamond",
4578
- "pentagon",
4579
- "hexagon",
4580
- "star"
4581
- ].includes(e.shape) ? e.shape : "circle",
4582
- stroke: B.value.chart.backgroundColor,
4583
- strokeWidth: .5
4584
- }, null, 8, [
4585
- "color",
4586
- "shape",
4587
- "stroke"
4588
- ])])) : Yi.value[e.type] === "bar" ? (T(), S("svg", ui, [Yi.value[e.type] === "bar" && n.$slots.pattern ? (T(), S("rect", {
4589
- key: 0,
4590
- x: "4",
4591
- y: "4",
4592
- rx: "1",
4593
- height: "32",
4594
- width: "32",
4595
- stroke: "none",
4596
- fill: e.color
4597
- }, null, 8, di)) : x("", !0), Yi.value[e.type] === "bar" ? (T(), S("rect", {
4598
- key: 1,
4599
- x: "4",
4600
- y: "4",
4601
- rx: "1",
4602
- height: "32",
4603
- width: "32",
4604
- stroke: "none",
4605
- fill: n.$slots.pattern ? `url(#pattern_${F.value}_${e.slotAbsoluteIndex})` : e.color
4606
- }, null, 8, fi)) : x("", !0)])) : (T(), S("svg", pi, [tt(Ge, {
4607
- plot: {
4608
- x: 6,
4609
- y: 6
4610
- },
4611
- radius: 5,
4612
- color: e.color,
4613
- shape: [
4614
- "triangle",
4615
- "square",
4616
- "diamond",
4617
- "pentagon",
4618
- "hexagon",
4619
- "star"
4620
- ].includes(e.shape) ? e.shape : "circle"
4621
- }, null, 8, ["color", "shape"])])), C("span", { style: w(`color:${B.value.chart.legend.color}`) }, pt(e.name), 5)], 46, si))), 128))], 4)) : x("", !0)], !0)], 512)], 8, ["to"])) : x("", !0),
4622
- n.$slots.source ? (T(), S("div", {
4623
- key: 8,
4624
- ref_key: "source",
4625
- ref: Pi,
4626
- dir: "auto"
4627
- }, [O(n.$slots, "source", {}, void 0, !0)], 512)) : x("", !0),
4628
- tt(k(_i), {
4629
- teleportTo: B.value.chart.tooltip.teleportTo,
4630
- show: V.value.showTooltip && Qi.value,
4631
- backgroundColor: B.value.chart.tooltip.backgroundColor,
4632
- color: B.value.chart.tooltip.color,
4633
- fontSize: B.value.chart.tooltip.fontSize,
4634
- borderRadius: B.value.chart.tooltip.borderRadius,
4635
- borderColor: B.value.chart.tooltip.borderColor,
4636
- borderWidth: B.value.chart.tooltip.borderWidth,
4637
- backgroundOpacity: B.value.chart.tooltip.backgroundOpacity,
4638
- position: B.value.chart.tooltip.position,
4639
- offsetX: B.value.chart.tooltip.offsetX,
4640
- offsetY: B.value.chart.tooltip.offsetY,
4641
- parent: n.$refs.chart,
4642
- content: Rc.value,
4643
- isFullscreen: Zi.value,
4644
- isCustom: B.value.chart.tooltip.customFormat && typeof B.value.chart.tooltip.customFormat == "function",
4645
- smooth: B.value.chart.tooltip.smooth,
4646
- backdropFilter: B.value.chart.tooltip.backdropFilter,
4647
- smoothForce: B.value.chart.tooltip.smoothForce,
4648
- smoothSnapThreshold: B.value.chart.tooltip.smoothSnapThreshold,
4649
- isA11yMode: ha.value != null,
4650
- a11yPosition: ga.value
4651
- }, {
4652
- "tooltip-before": A(() => [O(n.$slots, "tooltip-before", ct(it({ ...Nc.value })), void 0, !0)]),
4653
- tooltip: A(() => [O(n.$slots, "tooltip", ct(it({ ...Nc.value })), void 0, !0)]),
4654
- "tooltip-after": A(() => [O(n.$slots, "tooltip-after", ct(it({ ...Nc.value })), void 0, !0)]),
4655
- _: 3
4656
- }, 8, [
4657
- "teleportTo",
4658
- "show",
4659
- "backgroundColor",
4660
- "color",
4661
- "fontSize",
4662
- "borderRadius",
4663
- "borderColor",
4664
- "borderWidth",
4665
- "backgroundOpacity",
4666
- "position",
4667
- "offsetX",
4668
- "offsetY",
4669
- "parent",
4670
- "content",
4671
- "isFullscreen",
4672
- "isCustom",
4673
- "smooth",
4674
- "backdropFilter",
4675
- "smoothForce",
4676
- "smoothSnapThreshold",
4677
- "isA11yMode",
4678
- "a11yPosition"
4679
- ]),
4680
- Pa.value && B.value.chart.userOptions.buttons.table ? (T(), Qe(dt(gl.value.component), at({ key: 9 }, gl.value.props, {
4681
- ref_key: "tableUnit",
4682
- ref: da,
4683
- onClose: _l
4684
- }), $e({
4685
- content: A(() => [C("div", { style: w(`${k(Xa) || B.value.table.useDialog ? "" : "max-height:400px"};${B.value.table.useDialog ? "height: fit-content; " : ""};overflow:auto;width:100%;${B.value.table.useDialog ? "" : "margin-top:48px"}`) }, [C("div", mi, [yt(C("input", {
4686
- type: "checkbox",
4687
- "onUpdate:modelValue": r[4] ||= (e) => ra.value = e
4688
- }, null, 512), [[gt, ra.value]]), C("div", {
4689
- onClick: r[5] ||= (e) => ra.value = !ra.value,
4690
- style: w({ cursor: Fa.value ? "pointer" : "default" })
4691
- }, [tt(k(yi), {
4692
- name: "chartLine",
4693
- size: 20,
4694
- stroke: B.value.chart.color
4695
- }, null, 8, ["stroke"])], 4)]), ra.value ? (T(), Qe(k(bi), {
4696
- key: `sparkline_${ia.value}`,
4697
- dataset: Zs.value,
4698
- config: Qs.value
4699
- }, null, 8, ["dataset", "config"])) : (T(), Qe(k(gi), {
4700
- key: `table_${ta.value}`,
4701
- colNames: Bc.value.colNames,
4702
- head: Bc.value.head,
4703
- body: Bc.value.body,
4704
- config: Bc.value.config,
4705
- title: B.value.table.useDialog ? "" : gl.value.title,
4706
- withCloseButton: !B.value.table.useDialog,
4707
- onClose: _l
4708
- }, {
4709
- th: A(({ th: e }) => [C("div", { innerHTML: e }, null, 8, hi)]),
4710
- td: A(({ td: e }) => [et(pt(isNaN(Number(e)) ? e : k(s)({
4711
- p: B.value.chart.labels.prefix,
4712
- v: e,
4713
- s: B.value.chart.labels.suffix,
4714
- r: B.value.table.rounding
4715
- })), 1)]),
4716
- _: 1
4717
- }, 8, [
4718
- "colNames",
4719
- "head",
4720
- "body",
4721
- "config",
4722
- "title",
4723
- "withCloseButton"
4724
- ]))], 4)]),
4725
- _: 2
4726
- }, [B.value.table.useDialog ? {
4727
- name: "title",
4728
- fn: A(() => [et(pt(gl.value.title), 1)]),
4729
- key: "0"
4730
- } : void 0, B.value.table.useDialog ? {
4731
- name: "actions",
4732
- fn: A(() => [C("button", {
4733
- tabindex: "0",
4734
- class: "vue-ui-user-options-button",
4735
- onClick: r[3] ||= (e) => Vc(B.value.chart.userOptions.callbacks.csv)
4736
- }, [tt(k(yi), {
4737
- name: "fileCsv",
4738
- stroke: gl.value.props.color
4739
- }, null, 8, ["stroke"])])]),
4740
- key: "1"
4741
- } : void 0]), 1040)) : x("", !0),
4742
- O(n.$slots, "skeleton", {}, () => [k(Ba) ? (T(), Qe(Ie, { key: 0 })) : x("", !0)], !0)
4743
- ], 46, xt));
4744
- }
4745
- }, [["__scopeId", "data-v-22f512b5"]]);
4746
- //#endregion
4747
- export { bt as n, j as t };