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