vue-data-ui 3.21.4 → 3.21.6

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