vue-data-ui 3.0.0-next.32 → 3.0.0-next.34

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