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

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 (91) hide show
  1. package/dist/{Arrow-DiI9PrPS.js → Arrow-VgHimrRb.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C0Kz_kZp.js → BaseDraggableDialog-S80pCP_z.js} +2 -2
  3. package/dist/{BaseIcon-B_tGgA4H.js → BaseIcon-CVvwtj-w.js} +1 -1
  4. package/dist/{ColorPicker-CNsQt00F.js → ColorPicker-DhGMsdlx.js} +2 -2
  5. package/dist/{DataTable-Cm1oLidx.js → DataTable-CQqQt3fP.js} +2 -2
  6. package/dist/{Legend-DlUDcF1t.js → Legend-DAN5L1lo.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-CLlxRJK1.js → NonSvgPenAndPaper-s0PFQNll.js} +3 -3
  8. package/dist/{PackageVersion-DZMJZGOu.js → PackageVersion-DGlLBQOn.js} +1 -1
  9. package/dist/{PenAndPaper-BDNLADWh.js → PenAndPaper-hAK7vneq.js} +3 -3
  10. package/dist/{Shape-Br_SZ_x0.js → Shape-CjeprST6.js} +1 -1
  11. package/dist/{Slicer-DMU3nifX.js → Slicer-8WIL9Cfq.js} +2 -2
  12. package/dist/{SparkTooltip-B6xp9zx_.js → SparkTooltip-DeTWOnTg.js} +1 -1
  13. package/dist/{Title-B5lsq0cx.js → Title-Bo-MVYcn.js} +1 -1
  14. package/dist/{Tooltip-CrAURNKT.js → Tooltip-DD9Ly0Pw.js} +1 -1
  15. package/dist/{UserOptions-CksX2mn0.js → UserOptions-dJLhbxrH.js} +2 -2
  16. package/dist/{dom-to-png-CIBDe8BB.js → dom-to-png-CjNOdM-6.js} +1 -1
  17. package/dist/{img-CWXYkVMQ.js → img-59KgIaXp.js} +1 -1
  18. package/dist/{index-DB4XIP_N.js → index-h6tbqLot.js} +775 -764
  19. package/dist/{pdf-Dm-ieKMv.js → pdf-CVKcemYx.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +5 -0
  22. package/dist/types/vue-data-ui.d.ts +5 -0
  23. package/dist/{useNestedProp-iTa19l34.js → useNestedProp-D059IOwh.js} +1 -1
  24. package/dist/{usePrinter-id381vkp.js → usePrinter-BuJDNOzF.js} +2 -2
  25. package/dist/{useTimeLabels-DFkUfjfs.js → useTimeLabels-DkzmKfZn.js} +21 -21
  26. package/dist/{vue-data-ui-WdvK3lBL.js → vue-data-ui-CnP-8qvV.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-CtiAXSRA.js → vue-ui-3d-bar-2BDo53CG.js} +6 -6
  29. package/dist/{vue-ui-accordion-DAT3uTMD.js → vue-ui-accordion-DyBJ-mad.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-LuljyG04.js → vue-ui-age-pyramid-DlD9Y8xr.js} +6 -6
  31. package/dist/{vue-ui-annotator-CzHa2GlG.js → vue-ui-annotator-BoWAUlmS.js} +2 -2
  32. package/dist/{vue-ui-bullet-BEzXYrWC.js → vue-ui-bullet-CfUFHtlX.js} +7 -7
  33. package/dist/{vue-ui-candlestick-DSaFw3wl.js → vue-ui-candlestick-DDS8WYxh.js} +8 -8
  34. package/dist/{vue-ui-carousel-table-D1CLPWmk.js → vue-ui-carousel-table-D2xngvtB.js} +4 -4
  35. package/dist/{vue-ui-chestnut-D3FNLdep.js → vue-ui-chestnut-D1pWQozg.js} +5 -5
  36. package/dist/{vue-ui-chord-CFT-LcE4.js → vue-ui-chord-DEK-Wk7B.js} +8 -8
  37. package/dist/{vue-ui-circle-pack-Bl_cyLTg.js → vue-ui-circle-pack-CeykLpx8.js} +6 -6
  38. package/dist/{vue-ui-cursor-C2XYAY0n.js → vue-ui-cursor-D86Y-gg1.js} +2 -2
  39. package/dist/{vue-ui-dashboard-4ZwAsn1N.js → vue-ui-dashboard-CwWcub4O.js} +62 -62
  40. package/dist/{vue-ui-digits-Da5mTaOQ.js → vue-ui-digits-CBD1fasp.js} +2 -2
  41. package/dist/{vue-ui-donut-B6QlrBEH.js → vue-ui-donut-DzM857Mw.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-Tv7oj7TE.js → vue-ui-donut-evolution-BPTk5wKW.js} +9 -9
  43. package/dist/{vue-ui-dumbbell-LNnnDec4.js → vue-ui-dumbbell-Dqm2btrM.js} +7 -7
  44. package/dist/{vue-ui-flow-B618L2Da.js → vue-ui-flow-C-JgLHsh.js} +7 -7
  45. package/dist/{vue-ui-funnel-DS_tcSnW.js → vue-ui-funnel-Dm3aCwVL.js} +6 -6
  46. package/dist/{vue-ui-galaxy-C5qk-fEV.js → vue-ui-galaxy-siSx2yn6.js} +5 -5
  47. package/dist/{vue-ui-gauge-C33XPj6b.js → vue-ui-gauge-BgIR1PlQ.js} +6 -6
  48. package/dist/{vue-ui-gizmo-Cr6zUxnq.js → vue-ui-gizmo-CPIlfu1s.js} +3 -3
  49. package/dist/{vue-ui-heatmap-ksiw1nTI.js → vue-ui-heatmap-D_8NEANa.js} +26 -24
  50. package/dist/{vue-ui-history-plot-DM_vTyiY.js → vue-ui-history-plot-DOWu_0wY.js} +7 -7
  51. package/dist/{vue-ui-kpi-BgFQSUVT.js → vue-ui-kpi-BqGvPVuE.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-BEpehl5X.js → vue-ui-mini-loader-C3RV5-mc.js} +2 -2
  53. package/dist/{vue-ui-molecule-BIQFbPof.js → vue-ui-molecule-DsMfjmG0.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-RShxk3Bz.js → vue-ui-mood-radar-CRWVJjIb.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-dMBxBBnZ.js → vue-ui-nested-donuts-D5gnJmVK.js} +9 -9
  56. package/dist/{vue-ui-onion-ZVZ6wpNM.js → vue-ui-onion-D1qHQTBl.js} +7 -7
  57. package/dist/{vue-ui-parallel-coordinate-plot-1a3BGVsh.js → vue-ui-parallel-coordinate-plot-BnAveZOI.js} +8 -8
  58. package/dist/{vue-ui-quadrant-XCnxKrJd.js → vue-ui-quadrant-B7Lqriri.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-BQJqdHxB.js → vue-ui-quick-chart-CvQRgbKq.js} +7 -7
  60. package/dist/{vue-ui-radar-CeXlq2A-.js → vue-ui-radar-D494eivm.js} +7 -7
  61. package/dist/{vue-ui-rating-DTq-mZyU.js → vue-ui-rating-CTHYICJA.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-k8viefM-.js → vue-ui-relation-circle-DMtH5ofd.js} +6 -6
  63. package/dist/{vue-ui-ridgeline-B8oddwmZ.js → vue-ui-ridgeline-BiDnGLX5.js} +9 -9
  64. package/dist/{vue-ui-rings-9XT1ePuY.js → vue-ui-rings-DXGyAl3y.js} +8 -8
  65. package/dist/{vue-ui-scatter-oM-LVerf.js → vue-ui-scatter-Ds7sncxR.js} +8 -8
  66. package/dist/{vue-ui-skeleton-DDLBx4bb.js → vue-ui-skeleton-DIJ5u0HF.js} +3 -3
  67. package/dist/{vue-ui-smiley-D5ybBkdY.js → vue-ui-smiley-Dyhet6zb.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-Tl-sOjqa.js → vue-ui-spark-trend-rhXFuApA.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-Ce6dYcF4.js → vue-ui-sparkbar-COfmi6KI.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-DRHrbpSl.js → vue-ui-sparkgauge-DJOsuPG-.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-DBtPWFim.js → vue-ui-sparkhistogram-DV3KR-q5.js} +4 -4
  72. package/dist/{vue-ui-sparkline-DcF2ugGh.js → vue-ui-sparkline-kf86uahK.js} +4 -4
  73. package/dist/{vue-ui-sparkstackbar-C01iI0y3.js → vue-ui-sparkstackbar-DPpQkxUm.js} +3 -3
  74. package/dist/{vue-ui-stackbar-BeCCgw_v.js → vue-ui-stackbar-CASe4O-t.js} +10 -10
  75. package/dist/{vue-ui-strip-plot-CsK2a1mH.js → vue-ui-strip-plot-DRfNBQ9A.js} +7 -7
  76. package/dist/{vue-ui-table-COjBJDmq.js → vue-ui-table-Cg422ltc.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-DfxMcAr9.js → vue-ui-table-heatmap-BCDOpShn.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-0BC6BxKt.js → vue-ui-table-sparkline-MtUkhn2K.js} +4 -4
  79. package/dist/{vue-ui-thermometer-Bf2_qGBi.js → vue-ui-thermometer-Bz4qJzLC.js} +6 -6
  80. package/dist/{vue-ui-timer-BC9tH4qB.js → vue-ui-timer-Da3hWBUk.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-ya8ABi9I.js → vue-ui-tiremarks-Bafaf_gE.js} +6 -6
  82. package/dist/{vue-ui-treemap-BSHptMc8.js → vue-ui-treemap-CSQjMeIP.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-B_Oa-v87.js → vue-ui-vertical-bar-tLYgt_Pg.js} +9 -9
  84. package/dist/{vue-ui-waffle-DHB8v3nh.js → vue-ui-waffle-ir_3LGj_.js} +8 -8
  85. package/dist/{vue-ui-wheel-Bi28_KVB.js → vue-ui-wheel-bDEJ_vBc.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-BcQ2cfcu.js → vue-ui-word-cloud-BLQ-MfCc.js} +6 -6
  87. package/dist/{vue-ui-world-aLL9NUDQ.js → vue-ui-world-_IoWGh3p.js} +6 -6
  88. package/dist/{vue-ui-xy-canvas-sUpmc7gl.js → vue-ui-xy-canvas-DDRJMmPT.js} +9 -9
  89. package/dist/vue-ui-xy-dnlLx-v4.js +3739 -0
  90. package/package.json +1 -1
  91. package/dist/vue-ui-xy-BxonzF88.js +0 -3710
@@ -0,0 +1,3739 @@
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-h6tbqLot.js";
3
+ import { u as Nt } from "./useNestedProp-D059IOwh.js";
4
+ import { u as wa } from "./useTimeLabels-DkzmKfZn.js";
5
+ import { u as yo } from "./useTimeLabelCollider-V7AOiPLB.js";
6
+ import { S as ko } from "./Slicer-8WIL9Cfq.js";
7
+ import wo from "./BaseIcon-CVvwtj-w.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-Bo-MVYcn.js";
11
+ import { _ as bt } from "./Shape-CjeprST6.js";
12
+ import _o from "./img-59KgIaXp.js";
13
+ import { u as Lo } from "./usePrinter-BuJDNOzF.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), se = 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, se.value - 1);
155
+ ue.value = g, $l.value && ($l.value.value = String(g)), he("futureStart", g);
156
+ }
157
+ }), pl = k({
158
+ get() {
159
+ return se.value;
160
+ },
161
+ set(b) {
162
+ const g = Math.max(b, ue.value + 1);
163
+ se.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(se.value));
180
+ }, 150);
181
+ }
182
+ function Gl() {
183
+ clearTimeout(yl), he("update:start", Number(ue.value)), he("update:end", Number(se.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 = (se.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 * ((se.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: se.value
209
+ }), je(
210
+ () => d.min,
211
+ (b) => {
212
+ Number(ue.value) < Number(b) && (ue.value = Number(b)), Number(se.value) < Number(b) && (se.value = Number(b));
213
+ }
214
+ ), je(
215
+ () => d.max,
216
+ (b) => {
217
+ Number(ue.value) > Number(b) && (ue.value = Number(b)), Number(se.value) > Number(b) && (se.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 * ((se.value - ue.value) / d.max) - fe.value
256
+ })), ie = y(d.minimapSelectedIndex);
257
+ je(() => d.minimapSelectedIndex, (b) => {
258
+ ie.value = b + d.valueStart;
259
+ }, { immediate: !0 });
260
+ function re(b) {
261
+ ie.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
+ se.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, se.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, se], 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 === se.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
+ ie.value !== null ? (u(!0), i(x, { key: 0 }, _(Tl.value, (h, U) => (u(), i("g", null, [
497
+ ie.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) => re(h),
521
+ onMouseleave: g[2] || (g[2] = (we) => {
522
+ ie.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-CQqQt3fP.js")), ue = fl(() => import("./Tooltip-DD9Ly0Pw.js")), se = fl(() => import("./UserOptions-dJLhbxrH.js")), xl = fl(() => import("./BaseIcon-CVvwtj-w.js")), Xl = fl(() => import("./vue-ui-table-sparkline-MtUkhn2K.js")), Il = fl(() => import("./vue-ui-accordion-DyBJ-mad.js")), bl = fl(() => import("./PackageVersion-DGlLBQOn.js")), pl = fl(() => import("./PenAndPaper-hAK7vneq.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), ie = y(600), re = 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: ie.value,
710
+ width: re.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 = re.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: re.value - s - l.value.chart.padding.right,
948
+ bottom: ie.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: ie.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: ie.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: re.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: re.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: re.value,
1751
+ adjuster: 800,
1752
+ source: l.value.chart.labels.fontSize,
1753
+ threshold: 10,
1754
+ fallback: 10
1755
+ }), Me.value.plot = Fl({
1756
+ relator: re.value,
1757
+ adjuster: 800,
1758
+ source: l.value.plot.radius,
1759
+ threshold: 1,
1760
+ fallback: 1
1761
+ }), Me.value.line = Fl({
1762
+ relator: re.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), ie.value = s - o - C - D - O - q - t, re.value = a, Ol.value = `0 0 ${re.value < 0 ? 10 : re.value} ${ie.value < 0 ? 10 : ie.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
+ ie.value = T.contentRect.height - o - C - D - O - q - t, re.value = T.contentBoxSize[0].inlineSize, Ol.value = `0 0 ${re.value < 0 ? 10 : re.value} ${ie.value < 0 ? 10 : ie.value}`, ha();
1817
+ });
1818
+ });
1819
+ Y.value = z, il.value = e, z.observe(e);
1820
+ } else
1821
+ ie.value = l.value.chart.height, re.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 ${re.value} ${ie.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
+ }), je(() => d.dataset, (t) => {
1841
+ Array.isArray(t) && t.length > 0 && (b.value = !1), g.value = Math.max(...X.value.map((c) => Ke({
1842
+ data: c.series,
1843
+ threshold: l.value.downsample.threshold
1844
+ }).length)), h.value = {
1845
+ start: 0,
1846
+ end: g.value
1847
+ }, fe.value += 1, Rl.value += 1;
1848
+ }, { deep: !0 }), je(() => d.config, (t) => {
1849
+ tl.value || (l.value = El()), fa(), ql.value += 1, it.value += 1, m.value = {
1850
+ dataLabels: {
1851
+ show: !0
1852
+ },
1853
+ showTooltip: l.value.chart.tooltip.show === !0,
1854
+ showTable: l.value.showTable === !0,
1855
+ isStacked: l.value.chart.grid.labels.yAxis.stacked,
1856
+ useIndividualScale: l.value.chart.grid.labels.yAxis.useIndividualScale
1857
+ };
1858
+ }, { deep: !0 }), je(l, () => {
1859
+ m.value = {
1860
+ dataLabels: {
1861
+ show: !0
1862
+ },
1863
+ showTooltip: l.value.chart.tooltip.show === !0,
1864
+ showTable: l.value.showTable === !0,
1865
+ isStacked: l.value.chart.grid.labels.yAxis.stacked,
1866
+ useIndividualScale: l.value.chart.grid.labels.yAxis.useIndividualScale
1867
+ };
1868
+ }, { immediate: !0 }), $t({
1869
+ getData: Ha,
1870
+ getImage: Va,
1871
+ generatePdf: nt,
1872
+ generateImage: Ht,
1873
+ generateCsv: ia,
1874
+ toggleStack: Gt,
1875
+ toggleTable: na,
1876
+ toggleLabels: ca,
1877
+ toggleTooltip: va,
1878
+ toggleAnnotator: zt,
1879
+ toggleFullscreen: da
1880
+ }), (t, c) => (u(), i("div", {
1881
+ id: `vue-ui-xy_${K.value}`,
1882
+ class: ze(`vue-ui-xy ${ll.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${l.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1883
+ ref_key: "chart",
1884
+ ref: he,
1885
+ 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%" : ""}`),
1886
+ onMouseenter: c[10] || (c[10] = () => Yt(!0)),
1887
+ onMouseleave: c[11] || (c[11] = () => Yt(!1))
1888
+ }, [
1889
+ l.value.chart.userOptions.buttons.annotator && be.value ? (u(), Ye(v(pl), {
1890
+ key: 0,
1891
+ svgRef: be.value,
1892
+ backgroundColor: l.value.chart.backgroundColor,
1893
+ color: l.value.chart.color,
1894
+ active: rl.value,
1895
+ onClose: zt
1896
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
1897
+ Ba.value ? (u(), i("div", {
1898
+ key: 1,
1899
+ ref_key: "noTitle",
1900
+ ref: wl,
1901
+ class: "vue-data-ui-no-title-space",
1902
+ style: "height:36px; width: 100%; background:transparent"
1903
+ }, null, 512)) : f("", !0),
1904
+ l.value.chart.title.show ? (u(), i("div", {
1905
+ key: 2,
1906
+ ref_key: "chartTitle",
1907
+ ref: xe,
1908
+ class: "vue-ui-xy-title",
1909
+ style: I(`font-family:${l.value.chart.fontFamily}`)
1910
+ }, [
1911
+ (u(), Ye($o, {
1912
+ key: `title_${ql.value}`,
1913
+ config: {
1914
+ title: {
1915
+ cy: "xy-div-title",
1916
+ ...l.value.chart.title
1917
+ },
1918
+ subtitle: {
1919
+ cy: "xy-div-subtitle",
1920
+ ...l.value.chart.title.subtitle
1921
+ }
1922
+ }
1923
+ }, null, 8, ["config"]))
1924
+ ], 4)) : f("", !0),
1925
+ l.value.chart.userOptions.show && (Pl.value || Hl.value) ? (u(), Ye(v(se), {
1926
+ ref: "defails",
1927
+ key: `user_options_${st.value}`,
1928
+ backgroundColor: l.value.chart.backgroundColor,
1929
+ color: l.value.chart.color,
1930
+ isPrinting: v(Kl),
1931
+ isImaging: v(rt),
1932
+ uid: K.value,
1933
+ hasTooltip: l.value.chart.userOptions.buttons.tooltip && l.value.chart.tooltip.show,
1934
+ hasPdf: l.value.chart.userOptions.buttons.pdf,
1935
+ hasXls: l.value.chart.userOptions.buttons.csv,
1936
+ hasImg: l.value.chart.userOptions.buttons.img,
1937
+ hasLabel: l.value.chart.userOptions.buttons.labels,
1938
+ hasTable: l.value.chart.userOptions.buttons.table,
1939
+ hasStack: M.dataset.length > 1 && l.value.chart.userOptions.buttons.stack,
1940
+ hasFullscreen: l.value.chart.userOptions.buttons.fullscreen,
1941
+ isStacked: m.value.isStacked,
1942
+ isFullscreen: ll.value,
1943
+ chartElement: t.$refs.chart,
1944
+ position: l.value.chart.userOptions.position,
1945
+ isTooltip: m.value.showTooltip,
1946
+ titles: { ...l.value.chart.userOptions.buttonTitles },
1947
+ hasAnnotator: l.value.chart.userOptions.buttons.annotator,
1948
+ isAnnotation: rl.value,
1949
+ callbacks: l.value.chart.userOptions.callbacks,
1950
+ printScale: l.value.chart.userOptions.print.scale,
1951
+ onToggleFullscreen: da,
1952
+ onGeneratePdf: v(nt),
1953
+ onGenerateCsv: ia,
1954
+ onGenerateImage: v(Ht),
1955
+ onToggleTable: na,
1956
+ onToggleLabels: ca,
1957
+ onToggleStack: Gt,
1958
+ onToggleTooltip: va,
1959
+ onToggleAnnotator: zt,
1960
+ style: I({
1961
+ visibility: Pl.value ? Hl.value ? "visible" : "hidden" : "visible"
1962
+ })
1963
+ }, eo({ _: 2 }, [
1964
+ t.$slots.menuIcon ? {
1965
+ name: "menuIcon",
1966
+ fn: me(({ isOpen: e, color: s }) => [
1967
+ J(t.$slots, "menuIcon", sl(gl({ isOpen: e, color: s })), void 0, !0)
1968
+ ]),
1969
+ key: "0"
1970
+ } : void 0,
1971
+ t.$slots.optionTooltip ? {
1972
+ name: "optionTooltip",
1973
+ fn: me(() => [
1974
+ J(t.$slots, "optionTooltip", {}, void 0, !0)
1975
+ ]),
1976
+ key: "1"
1977
+ } : void 0,
1978
+ t.$slots.optionPdf ? {
1979
+ name: "optionPdf",
1980
+ fn: me(() => [
1981
+ J(t.$slots, "optionPdf", {}, void 0, !0)
1982
+ ]),
1983
+ key: "2"
1984
+ } : void 0,
1985
+ t.$slots.optionCsv ? {
1986
+ name: "optionCsv",
1987
+ fn: me(() => [
1988
+ J(t.$slots, "optionCsv", {}, void 0, !0)
1989
+ ]),
1990
+ key: "3"
1991
+ } : void 0,
1992
+ t.$slots.optionImg ? {
1993
+ name: "optionImg",
1994
+ fn: me(() => [
1995
+ J(t.$slots, "optionImg", {}, void 0, !0)
1996
+ ]),
1997
+ key: "4"
1998
+ } : void 0,
1999
+ t.$slots.optionTable ? {
2000
+ name: "optionTable",
2001
+ fn: me(() => [
2002
+ J(t.$slots, "optionTable", {}, void 0, !0)
2003
+ ]),
2004
+ key: "5"
2005
+ } : void 0,
2006
+ t.$slots.optionLabels ? {
2007
+ name: "optionLabels",
2008
+ fn: me(() => [
2009
+ J(t.$slots, "optionLabels", {}, void 0, !0)
2010
+ ]),
2011
+ key: "6"
2012
+ } : void 0,
2013
+ t.$slots.optionStack ? {
2014
+ name: "optionStack",
2015
+ fn: me(() => [
2016
+ J(t.$slots, "optionStack", {}, void 0, !0)
2017
+ ]),
2018
+ key: "7"
2019
+ } : void 0,
2020
+ t.$slots.optionFullscreen ? {
2021
+ name: "optionFullscreen",
2022
+ fn: me(({ toggleFullscreen: e, isFullscreen: s }) => [
2023
+ J(t.$slots, "optionFullscreen", sl(gl({ toggleFullscreen: e, isFullscreen: s })), void 0, !0)
2024
+ ]),
2025
+ key: "8"
2026
+ } : void 0,
2027
+ t.$slots.optionAnnotator ? {
2028
+ name: "optionAnnotator",
2029
+ fn: me(({ toggleAnnotator: e, isAnnotator: s }) => [
2030
+ J(t.$slots, "optionAnnotator", sl(gl({ toggleAnnotator: e, isAnnotator: s })), void 0, !0)
2031
+ ]),
2032
+ key: "9"
2033
+ } : void 0
2034
+ ]), 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),
2035
+ (u(), i("svg", {
2036
+ ref_key: "svgRef",
2037
+ ref: be,
2038
+ xmlns: "http://www.w3.org/2000/svg",
2039
+ class: ze([{ "vue-data-ui-fullscreen--on": ll.value, "vue-data-ui-fulscreen--off": !ll.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
2040
+ width: "100%",
2041
+ viewBox: Ol.value,
2042
+ style: I({
2043
+ background: "transparent",
2044
+ color: l.value.chart.color,
2045
+ fontFamily: l.value.chart.fontFamily
2046
+ }),
2047
+ "aria-label": Ea.value,
2048
+ role: "img",
2049
+ "aria-live": "polite",
2050
+ preserveAspectRatio: "xMidYMid",
2051
+ onMousemove: Na,
2052
+ onMouseleave: jt,
2053
+ onClick: Ra
2054
+ }, [
2055
+ p("g", {
2056
+ ref_key: "G",
2057
+ ref: Lt,
2058
+ class: "vue-data-ui-g"
2059
+ }, [
2060
+ Wl(v(bl)),
2061
+ t.$slots["chart-background"] ? (u(), i("foreignObject", {
2062
+ key: 0,
2063
+ x: n.value.left + ee.value < 0 ? 0 : n.value.left + ee.value,
2064
+ y: n.value.top,
2065
+ 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),
2066
+ height: n.value.height < 0 ? 0 : n.value.height,
2067
+ style: {
2068
+ pointerEvents: "none"
2069
+ }
2070
+ }, [
2071
+ J(t.$slots, "chart-background", {}, void 0, !0)
2072
+ ], 8, Qo)) : f("", !0),
2073
+ $.value > 0 ? (u(), i("g", jo, [
2074
+ p("g", eu, [
2075
+ l.value.chart.grid.labels.xAxis.showBaseline ? (u(), i("line", {
2076
+ key: 0,
2077
+ stroke: l.value.chart.grid.stroke,
2078
+ "stroke-width": "1",
2079
+ x1: n.value.left + ee.value,
2080
+ x2: n.value.right - ee.value,
2081
+ y1: v(W)(n.value.bottom),
2082
+ y2: v(W)(n.value.bottom),
2083
+ "stroke-linecap": "round",
2084
+ style: { animation: "none !important" }
2085
+ }, null, 8, lu)) : f("", !0),
2086
+ m.value.useIndividualScale ? l.value.chart.grid.showHorizontalLines ? (u(!0), i(x, { key: 2 }, _(lt.value, (e) => (u(), i("g", null, [
2087
+ e.id === L.value && e.yLabels.length ? (u(!0), i(x, { key: 0 }, _(e.yLabels, (s) => (u(), i("line", {
2088
+ x1: n.value.left + ee.value,
2089
+ x2: n.value.right - ee.value,
2090
+ y1: v(W)(s.y),
2091
+ y2: v(W)(s.y),
2092
+ stroke: e.color,
2093
+ "stroke-width": 0.5,
2094
+ "stroke-linecap": "round",
2095
+ style: { animation: "none !important" }
2096
+ }, null, 8, uu))), 256)) : e.yLabels.length ? (u(!0), i(x, { key: 1 }, _(e.yLabels, (s) => (u(), i("line", {
2097
+ x1: n.value.left + ee.value,
2098
+ x2: n.value.right - ee.value,
2099
+ y1: v(W)(s.y),
2100
+ y2: v(W)(s.y),
2101
+ stroke: l.value.chart.grid.stroke,
2102
+ "stroke-width": 0.5,
2103
+ "stroke-linecap": "round",
2104
+ style: { animation: "none !important" }
2105
+ }, null, 8, su))), 256)) : f("", !0)
2106
+ ]))), 256)) : f("", !0) : (u(), i(x, { key: 1 }, [
2107
+ l.value.chart.grid.labels.yAxis.showBaseline ? (u(), i("line", {
2108
+ key: 0,
2109
+ stroke: l.value.chart.grid.stroke,
2110
+ "stroke-width": "1",
2111
+ x1: n.value.left + ee.value,
2112
+ x2: n.value.left + ee.value,
2113
+ y1: v(W)(n.value.top),
2114
+ y2: v(W)(n.value.bottom),
2115
+ "stroke-linecap": "round",
2116
+ style: { animation: "none !important" }
2117
+ }, null, 8, tu)) : f("", !0),
2118
+ l.value.chart.grid.showHorizontalLines ? (u(), i("g", au, [
2119
+ (u(!0), i(x, null, _(aa.value, (e) => (u(), i("line", {
2120
+ x1: n.value.left + ee.value,
2121
+ x2: n.value.right,
2122
+ y1: v(W)(e.y),
2123
+ y2: v(W)(e.y),
2124
+ stroke: l.value.chart.grid.stroke,
2125
+ "stroke-width": 0.5,
2126
+ "stroke-linecap": "round",
2127
+ style: { animation: "none !important" }
2128
+ }, null, 8, ou))), 256))
2129
+ ])) : f("", !0)
2130
+ ], 64)),
2131
+ l.value.chart.grid.showVerticalLines ? (u(), i("g", iu, [
2132
+ p("path", {
2133
+ d: Aa.value,
2134
+ "stroke-width": 0.5,
2135
+ stroke: l.value.chart.grid.stroke,
2136
+ "stroke-linecap": "round",
2137
+ style: { animation: "none !important" }
2138
+ }, null, 8, ru)
2139
+ ])) : f("", !0),
2140
+ l.value.chart.grid.labels.xAxisLabels.show ? (u(), i("g", nu, [
2141
+ p("path", {
2142
+ d: Ca.value,
2143
+ stroke: l.value.chart.grid.stroke,
2144
+ "stroke-width": 1,
2145
+ "stroke-linecap": "round",
2146
+ style: { animation: "none !important" }
2147
+ }, null, 8, cu)
2148
+ ])) : f("", !0)
2149
+ ]),
2150
+ (u(!0), i(x, null, _(vl.value, (e, s) => (u(), i("defs", {
2151
+ key: `def_rect_${s}`
2152
+ }, [
2153
+ p("linearGradient", {
2154
+ id: `rectGradient_pos_${s}_${K.value}`,
2155
+ x2: "0%",
2156
+ y2: "100%"
2157
+ }, [
2158
+ p("stop", {
2159
+ offset: "0%",
2160
+ "stop-color": e.color
2161
+ }, null, 8, du),
2162
+ p("stop", {
2163
+ offset: "62%",
2164
+ "stop-color": `${v(zl)(e.color, 0.02)}`
2165
+ }, null, 8, hu),
2166
+ p("stop", {
2167
+ offset: "100%",
2168
+ "stop-color": `${v(zl)(e.color, 0.05)}`
2169
+ }, null, 8, fu)
2170
+ ], 8, vu),
2171
+ p("linearGradient", {
2172
+ id: `rectGradient_neg_${s}_${K.value}`,
2173
+ x2: "0%",
2174
+ y2: "100%"
2175
+ }, [
2176
+ p("stop", {
2177
+ offset: "0%",
2178
+ "stop-color": `${v(zl)(e.color, 0.05)}`
2179
+ }, null, 8, mu),
2180
+ p("stop", {
2181
+ offset: "38%",
2182
+ "stop-color": `${v(zl)(e.color, 0.02)}`
2183
+ }, null, 8, xu),
2184
+ p("stop", {
2185
+ offset: "100%",
2186
+ "stop-color": e.color
2187
+ }, null, 8, bu)
2188
+ ], 8, gu)
2189
+ ]))), 128)),
2190
+ (u(!0), i(x, null, _(Ze.value, (e, s) => (u(), i("defs", {
2191
+ key: `def_plot_${s}`
2192
+ }, [
2193
+ p("radialGradient", {
2194
+ id: `plotGradient_${s}_${K.value}`,
2195
+ cx: "50%",
2196
+ cy: "50%",
2197
+ r: "50%",
2198
+ fx: "50%",
2199
+ fy: "50%"
2200
+ }, [
2201
+ p("stop", {
2202
+ offset: "0%",
2203
+ "stop-color": `${v(zl)(e.color, 0.05)}`
2204
+ }, null, 8, yu),
2205
+ p("stop", {
2206
+ offset: "100%",
2207
+ "stop-color": e.color
2208
+ }, null, 8, ku)
2209
+ ], 8, pu)
2210
+ ]))), 128)),
2211
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i("defs", {
2212
+ key: `def_line_${s}`
2213
+ }, [
2214
+ p("radialGradient", {
2215
+ id: `lineGradient_${s}_${K.value}`,
2216
+ cx: "50%",
2217
+ cy: "50%",
2218
+ r: "50%",
2219
+ fx: "50%",
2220
+ fy: "50%"
2221
+ }, [
2222
+ p("stop", {
2223
+ offset: "0%",
2224
+ "stop-color": `${v(zl)(e.color, 0.05)}`
2225
+ }, null, 8, Su),
2226
+ p("stop", {
2227
+ offset: "100%",
2228
+ "stop-color": e.color
2229
+ }, null, 8, $u)
2230
+ ], 8, wu),
2231
+ p("linearGradient", {
2232
+ id: `areaGradient_${s}_${K.value}`,
2233
+ x1: "0%",
2234
+ x2: "100%",
2235
+ y1: "0%",
2236
+ y2: "0%"
2237
+ }, [
2238
+ p("stop", {
2239
+ offset: "0%",
2240
+ "stop-color": `${v(Xe)(v(zl)(e.color, 0.03), l.value.line.area.opacity)}`
2241
+ }, null, 8, Lu),
2242
+ p("stop", {
2243
+ offset: "100%",
2244
+ "stop-color": `${v(Xe)(e.color, l.value.line.area.opacity)}`
2245
+ }, null, 8, Mu)
2246
+ ], 8, _u)
2247
+ ]))), 128)),
2248
+ (u(!0), i(x, null, _(Fa.value, (e) => (u(), i("g", null, [
2249
+ e.show ? (u(), i(x, { key: 0 }, [
2250
+ (u(!0), i(x, null, _(e.span, (s, a) => (u(), i("g", null, [
2251
+ p("rect", {
2252
+ style: I({
2253
+ transition: "none",
2254
+ opacity: e.from + a >= h.value.start && e.from + a <= h.value.end - 1 ? 1 : 0
2255
+ }),
2256
+ x: n.value.left + n.value.width / $.value * (e.from + a - h.value.start),
2257
+ y: n.value.top,
2258
+ height: n.value.height < 0 ? 10 : n.value.height,
2259
+ width: n.value.width / $.value < 0 ? 1e-5 : n.value.width / $.value,
2260
+ fill: v(Xe)(e.color, e.opacity)
2261
+ }, null, 12, Au)
2262
+ ]))), 256)),
2263
+ (u(!0), i(x, null, _(e.span, (s, a) => (u(), i("g", null, [
2264
+ e.caption.text && a === 0 ? (u(), i("foreignObject", {
2265
+ key: 0,
2266
+ 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),
2267
+ y: n.value.top + e.caption.offsetY,
2268
+ style: I({
2269
+ overflow: "visible",
2270
+ opacity: e.to >= h.value.start && e.from < h.value.end ? 1 : 0
2271
+ }),
2272
+ height: "1",
2273
+ width: e.caption.width === "auto" ? n.value.width / $.value * e.span : e.caption.width
2274
+ }, [
2275
+ p("div", {
2276
+ 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"}`)
2277
+ }, te(e.caption.text), 5)
2278
+ ], 12, Cu)) : f("", !0)
2279
+ ]))), 256))
2280
+ ], 64)) : f("", !0)
2281
+ ]))), 256)),
2282
+ Wt.value ? (u(), i("g", zu, [
2283
+ (u(!0), i(x, null, _($.value, (e, s) => (u(), i("g", {
2284
+ key: `tooltip_trap_highlighter_${s}`
2285
+ }, [
2286
+ p("rect", {
2287
+ x: n.value.left + n.value.width / $.value * s,
2288
+ y: n.value.top,
2289
+ height: n.value.height < 0 ? 10 : n.value.height,
2290
+ width: n.value.width / $.value < 0 ? 1e-5 : n.value.width / $.value,
2291
+ fill: [P.value, S.value, Ee.value].includes(s) ? v(Xe)(l.value.chart.highlighter.color, l.value.chart.highlighter.opacity) : "transparent"
2292
+ }, null, 8, Iu)
2293
+ ]))), 128))
2294
+ ])) : f("", !0),
2295
+ vl.value.length ? (u(!0), i(x, { key: 1 }, _(vl.value, (e, s) => (u(), i("g", {
2296
+ key: `serie_bar_${s}`,
2297
+ class: ze(`serie_bar_${s}`),
2298
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2299
+ }, [
2300
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i("g", {
2301
+ key: `bar_plot_${s}_${r}`
2302
+ }, [
2303
+ Ne(a.value) ? (u(), i("rect", {
2304
+ key: 0,
2305
+ x: ht(a),
2306
+ y: m.value.useIndividualScale ? Qt(a) : Kt(a),
2307
+ height: m.value.useIndividualScale ? Math.abs(Jt(a)) : Math.abs(Zt(a)),
2308
+ width: Fe() - (m.value.useIndividualScale && m.value.isStacked ? 0 : ul.value) < 0 ? 1e-5 : Fe() - (m.value.useIndividualScale && m.value.isStacked ? 0 : ul.value),
2309
+ rx: l.value.bar.borderRadius,
2310
+ fill: l.value.bar.useGradient ? a.value >= 0 ? `url(#rectGradient_pos_${s}_${K.value})` : `url(#rectGradient_neg_${s}_${K.value})` : e.color,
2311
+ stroke: l.value.bar.border.useSerieColor ? e.color : l.value.bar.border.stroke,
2312
+ "stroke-width": l.value.bar.border.strokeWidth,
2313
+ style: I(`${v(tl) ? "transition:none !important" : ""}`)
2314
+ }, null, 12, Tu)) : f("", !0),
2315
+ Ne(a.value) && t.$slots.pattern ? (u(), i("rect", {
2316
+ key: 1,
2317
+ x: ht(a),
2318
+ y: m.value.useIndividualScale ? Qt(a) : Kt(a),
2319
+ height: m.value.useIndividualScale ? Math.abs(Jt(a)) : Math.abs(Zt(a)),
2320
+ width: Fe() - (m.value.useIndividualScale && m.value.isStacked ? 0 : ul.value) < 0 ? 1e-5 : Fe() - (m.value.useIndividualScale && m.value.isStacked ? 0 : ul.value),
2321
+ rx: l.value.bar.borderRadius,
2322
+ fill: `url(#pattern_${K.value}_${e.slotAbsoluteIndex})`,
2323
+ stroke: l.value.bar.border.useSerieColor ? e.color : l.value.bar.border.stroke,
2324
+ "stroke-width": l.value.bar.border.strokeWidth
2325
+ }, null, 8, Ou)) : f("", !0),
2326
+ a.comment && l.value.chart.comments.show ? (u(), i("foreignObject", {
2327
+ key: 2,
2328
+ style: { overflow: "visible" },
2329
+ height: "12",
2330
+ 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,
2331
+ x: ht(a) - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
2332
+ y: v(H)(a.y) + l.value.chart.comments.offsetY + 6
2333
+ }, [
2334
+ J(t.$slots, "plot-comment", {
2335
+ plot: { ...a, color: e.color, seriesIndex: s, datapointIndex: r }
2336
+ }, void 0, !0)
2337
+ ], 8, Nu)) : f("", !0)
2338
+ ]))), 128)),
2339
+ Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(j)(e.plots).trend) ? (u(), i("g", Ru, [
2340
+ p("defs", null, [
2341
+ p("marker", {
2342
+ id: `bar_arrow_${s}`,
2343
+ markerWidth: 7,
2344
+ markerHeight: 7,
2345
+ refX: "0",
2346
+ refY: 7 / 2,
2347
+ orient: "auto"
2348
+ }, [
2349
+ p("polygon", {
2350
+ points: `0 0, 7 ${7 / 2}, 0 7`,
2351
+ fill: e.color
2352
+ }, null, 8, Hu)
2353
+ ], 8, Pu)
2354
+ ]),
2355
+ e.plots.length > 1 ? (u(), i("line", {
2356
+ key: 0,
2357
+ x1: v(j)(e.plots).x1 + Fe(),
2358
+ x2: v(j)(e.plots).x2 + Fe(),
2359
+ y1: v(W)(v(j)(e.plots).y1),
2360
+ y2: v(W)(v(j)(e.plots).y2),
2361
+ "stroke-width": 1,
2362
+ stroke: e.color,
2363
+ "stroke-dasharray": 2,
2364
+ "marker-end": `url(#bar_arrow_${s})`
2365
+ }, null, 8, Vu)) : f("", !0),
2366
+ e.plots.length > 1 ? (u(), i("text", {
2367
+ key: 1,
2368
+ "text-anchor": "middle",
2369
+ x: v(j)(e.plots).x2 + Fe(),
2370
+ y: v(j)(e.plots).y2 - 6,
2371
+ "font-size": w.value.plotLabels,
2372
+ fill: e.color
2373
+ }, te(v(Pe)({
2374
+ v: v(j)(e.plots).trend * 100,
2375
+ s: "%",
2376
+ r: 2
2377
+ })), 9, Eu)) : f("", !0)
2378
+ ])) : f("", !0)
2379
+ ], 6))), 128)) : f("", !0),
2380
+ !m.value.useIndividualScale && l.value.chart.grid.labels.zeroLine.show ? (u(), i("line", {
2381
+ key: 2,
2382
+ stroke: l.value.chart.grid.stroke,
2383
+ "stroke-width": "1",
2384
+ x1: n.value.left + ee.value,
2385
+ x2: n.value.right - ee.value,
2386
+ y1: v(W)(Se.value),
2387
+ y2: v(W)(Se.value),
2388
+ "stroke-linecap": "round",
2389
+ style: { animation: "none !important" }
2390
+ }, null, 8, Bu)) : f("", !0),
2391
+ l.value.chart.highlighter.useLine && (![null, void 0].includes(S.value) || ![null, void 0].includes(P.value)) ? (u(), i("g", Fu, [
2392
+ p("line", {
2393
+ 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,
2394
+ 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,
2395
+ y1: v(W)(n.value.top),
2396
+ y2: v(W)(n.value.bottom),
2397
+ stroke: l.value.chart.highlighter.color,
2398
+ "stroke-width": l.value.chart.highlighter.lineWidth,
2399
+ "stroke-dasharray": l.value.chart.highlighter.lineDasharray,
2400
+ "stroke-linecap": "round",
2401
+ style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
2402
+ }, null, 8, Wu)
2403
+ ])) : f("", !0),
2404
+ l.value.chart.grid.frame.show ? (u(), i("rect", {
2405
+ key: 4,
2406
+ style: { pointerEvents: "none", transition: "none", animation: "none !important" },
2407
+ x: n.value.left + ee.value < 0 ? 0 : n.value.left + ee.value,
2408
+ y: n.value.top,
2409
+ 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),
2410
+ height: n.value.height < 0 ? 0 : n.value.height,
2411
+ fill: "transparent",
2412
+ stroke: l.value.chart.grid.frame.stroke,
2413
+ "stroke-width": l.value.chart.grid.frame.strokeWidth,
2414
+ "stroke-linecap": l.value.chart.grid.frame.strokeLinecap,
2415
+ "stroke-linejoin": l.value.chart.grid.frame.strokeLinejoin,
2416
+ "stroke-dasharray": l.value.chart.grid.frame.strokeDasharray
2417
+ }, null, 8, Yu)) : f("", !0),
2418
+ l.value.chart.grid.labels.show ? (u(), i("g", {
2419
+ key: 5,
2420
+ ref_key: "scaleLabels",
2421
+ ref: Sl
2422
+ }, [
2423
+ m.value.useIndividualScale ? (u(), i(x, { key: 0 }, [
2424
+ (u(!0), i(x, null, _(lt.value, (e) => (u(), i("g", null, [
2425
+ p("line", {
2426
+ x1: e.x + ee.value - n.value.individualOffsetX,
2427
+ x2: e.x + ee.value - n.value.individualOffsetX,
2428
+ y1: m.value.isStacked ? v(W)(n.value.bottom - e.yOffset - e.individualHeight) : v(W)(n.value.top),
2429
+ y2: m.value.isStacked ? v(W)(n.value.bottom - e.yOffset) : v(W)(n.value.bottom),
2430
+ stroke: e.color,
2431
+ "stroke-width": l.value.chart.grid.stroke,
2432
+ "stroke-linecap": "round",
2433
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
2434
+ }, null, 12, Xu)
2435
+ ]))), 256)),
2436
+ (u(!0), i(x, null, _(lt.value, (e) => (u(), i("g", {
2437
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
2438
+ }, [
2439
+ p("text", {
2440
+ fill: e.color,
2441
+ "font-size": w.value.dataLabels * 0.8,
2442
+ "text-anchor": "middle",
2443
+ 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)`
2444
+ }, te(e.name) + " " + te(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `-
2445
+ ${e.scaleLabel}` : ""), 9, Du),
2446
+ (u(!0), i(x, null, _(e.yLabels, (s, a) => (u(), i(x, null, [
2447
+ l.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), i("line", {
2448
+ key: 0,
2449
+ x1: e.x + 3 + ee.value - l.value.chart.grid.labels.yAxis.crosshairSize - n.value.individualOffsetX,
2450
+ x2: e.x + ee.value - n.value.individualOffsetX,
2451
+ y1: v(W)(s.y),
2452
+ y2: v(W)(s.y),
2453
+ stroke: e.color,
2454
+ "stroke-width": 1,
2455
+ "stroke-linecap": "round",
2456
+ style: { animation: "none !important" }
2457
+ }, null, 8, Gu)) : f("", !0)
2458
+ ], 64))), 256)),
2459
+ (u(!0), i(x, null, _(e.yLabels, (s, a) => (u(), i("text", {
2460
+ x: e.x - 5 + ee.value - n.value.individualOffsetX,
2461
+ y: v(W)(s.y) + w.value.dataLabels / 3,
2462
+ "font-size": w.value.dataLabels,
2463
+ "text-anchor": "end",
2464
+ fill: e.color
2465
+ }, te(v(ke)(
2466
+ l.value.chart.grid.labels.yAxis.formatter,
2467
+ s.value,
2468
+ v(Pe)({
2469
+ p: s.prefix,
2470
+ v: s.value,
2471
+ s: s.suffix,
2472
+ r: l.value.chart.grid.labels.yAxis.rounding
2473
+ }),
2474
+ { datapoint: s.datapoint, seriesIndex: a }
2475
+ )), 9, Uu))), 256))
2476
+ ], 4))), 256))
2477
+ ], 64)) : (u(!0), i(x, { key: 1 }, _(aa.value, (e, s) => (u(), i("g", {
2478
+ key: `yLabel_${s}`
2479
+ }, [
2480
+ Ne(e) && e.value >= Be.value.min && e.value <= Be.value.max && l.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), i("line", {
2481
+ key: 0,
2482
+ x1: n.value.left,
2483
+ x2: n.value.left - l.value.chart.grid.labels.yAxis.crosshairSize,
2484
+ y1: v(W)(e.y),
2485
+ y2: v(W)(e.y),
2486
+ stroke: l.value.chart.grid.stroke,
2487
+ "stroke-width": "1",
2488
+ "stroke-linecap": "round",
2489
+ style: { animation: "none !important" }
2490
+ }, null, 8, qu)) : f("", !0),
2491
+ e.value >= Be.value.min && e.value <= Be.value.max ? (u(), i("text", {
2492
+ key: 1,
2493
+ x: n.value.scaleLabelX - l.value.chart.grid.labels.yAxis.crosshairSize,
2494
+ y: v(H)(e.y + w.value.dataLabels / 3),
2495
+ "font-size": w.value.dataLabels,
2496
+ "text-anchor": "end",
2497
+ fill: l.value.chart.grid.labels.color
2498
+ }, te(Ne(e.value) ? v(ke)(
2499
+ l.value.chart.grid.labels.yAxis.formatter,
2500
+ e.value,
2501
+ v(Pe)({
2502
+ p: e.prefix,
2503
+ v: e.value,
2504
+ s: e.suffix,
2505
+ r: l.value.chart.grid.labels.yAxis.rounding
2506
+ })
2507
+ ) : ""), 9, Zu)) : f("", !0)
2508
+ ]))), 128))
2509
+ ], 512)) : f("", !0),
2510
+ (u(!0), i(x, null, _(Ze.value, (e, s) => (u(), i("g", {
2511
+ key: `serie_plot_${s}`,
2512
+ class: ze(`serie_plot_${s}`),
2513
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2514
+ }, [
2515
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i("g", {
2516
+ key: `circle_plot_${s}_${r}`
2517
+ }, [
2518
+ a && Ne(a.value) ? (u(), Ye(bt, {
2519
+ key: 0,
2520
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
2521
+ color: l.value.plot.useGradient ? `url(#plotGradient_${s}_${K.value})` : l.value.plot.dot.useSerieColor ? e.color : l.value.plot.dot.fill,
2522
+ plot: { x: v(H)(a.x), y: v(H)(a.y) },
2523
+ radius: S.value !== null && S.value === r || P.value !== null && P.value === r ? (Me.value.plot || 6) * 1.5 : Me.value.plot || 6,
2524
+ stroke: l.value.plot.dot.useSerieColor ? l.value.chart.backgroundColor : e.color,
2525
+ strokeWidth: l.value.plot.dot.strokeWidth
2526
+ }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : f("", !0),
2527
+ a.comment && l.value.chart.comments.show ? (u(), i("foreignObject", {
2528
+ key: 1,
2529
+ style: { overflow: "visible" },
2530
+ height: "12",
2531
+ width: l.value.chart.comments.width,
2532
+ x: a.x - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
2533
+ y: a.y + l.value.chart.comments.offsetY + 6
2534
+ }, [
2535
+ p("div", Ku, [
2536
+ J(t.$slots, "plot-comment", {
2537
+ plot: { ...a, color: e.color, seriesIndex: s, datapointIndex: r }
2538
+ }, void 0, !0)
2539
+ ])
2540
+ ], 8, Ju)) : f("", !0)
2541
+ ]))), 128)),
2542
+ Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(j)(e.plots).trend) ? (u(), i("g", Qu, [
2543
+ p("defs", null, [
2544
+ p("marker", {
2545
+ id: `plot_arrow_${s}`,
2546
+ markerWidth: 7,
2547
+ markerHeight: 7,
2548
+ refX: "0",
2549
+ refY: 7 / 2,
2550
+ orient: "auto"
2551
+ }, [
2552
+ p("polygon", {
2553
+ points: `0 0, 7 ${7 / 2}, 0 7`,
2554
+ fill: e.color
2555
+ }, null, 8, es)
2556
+ ], 8, ju)
2557
+ ]),
2558
+ e.plots.length > 1 ? (u(), i("line", {
2559
+ key: 0,
2560
+ x1: v(j)(e.plots).x1,
2561
+ x2: v(j)(e.plots).x2,
2562
+ y1: v(W)(v(j)(e.plots).y1),
2563
+ y2: v(W)(v(j)(e.plots).y2),
2564
+ "stroke-width": 1,
2565
+ stroke: e.color,
2566
+ "stroke-dasharray": 2,
2567
+ "marker-end": `url(#plot_arrow_${s})`
2568
+ }, null, 8, ls)) : f("", !0),
2569
+ e.plots.length > 1 ? (u(), i("text", {
2570
+ key: 1,
2571
+ "text-anchor": "middle",
2572
+ x: v(j)(e.plots).x2,
2573
+ y: v(j)(e.plots).y2 - 6,
2574
+ "font-size": w.value.plotLabels,
2575
+ fill: e.color
2576
+ }, te(v(Pe)({
2577
+ v: v(j)(e.plots).trend * 100,
2578
+ s: "%",
2579
+ r: 2
2580
+ })), 9, ts)) : f("", !0)
2581
+ ])) : f("", !0)
2582
+ ], 6))), 128)),
2583
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i("g", {
2584
+ key: `serie_line_${s}`,
2585
+ class: ze(`serie_line_${s}`),
2586
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2587
+ }, [
2588
+ e.smooth && e.plots.length > 1 && e.curve ? (u(), i("path", {
2589
+ key: 0,
2590
+ d: `M${e.curve}`,
2591
+ stroke: l.value.chart.backgroundColor,
2592
+ "stroke-width": l.value.line.strokeWidth + 1,
2593
+ "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2594
+ fill: "none"
2595
+ }, null, 8, as)) : e.plots.length > 1 && e.straight ? (u(), i("path", {
2596
+ key: 1,
2597
+ d: `M${e.straight}`,
2598
+ stroke: l.value.chart.backgroundColor,
2599
+ "stroke-width": l.value.line.strokeWidth + 1,
2600
+ "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2601
+ fill: "none",
2602
+ "stroke-linecap": "round",
2603
+ "stroke-linejoin": "round"
2604
+ }, null, 8, os)) : f("", !0)
2605
+ ], 6))), 128)),
2606
+ t.$slots.pattern ? (u(), i("defs", us, [
2607
+ (u(!0), i(x, null, _(al.value, (e, s) => J(t.$slots, "pattern", gt({
2608
+ key: `serie_pattern_slot_${s}`
2609
+ }, { ref_for: !0 }, { ...e, seriesIndex: e.slotAbsoluteIndex, patternId: `pattern_${K.value}_${s}` }), void 0, !0)), 128))
2610
+ ])) : f("", !0),
2611
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i("g", {
2612
+ key: `serie_line_${s}`,
2613
+ class: ze(`serie_line_${s}`),
2614
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2615
+ }, [
2616
+ e.useArea && e.plots.length > 1 ? (u(), i("g", ss, [
2617
+ e.smooth ? (u(!0), i(x, { key: 0 }, _(e.curveAreas, (a, r) => (u(), i(x, { key: r }, [
2618
+ a ? (u(), i("path", {
2619
+ key: 0,
2620
+ d: a,
2621
+ fill: l.value.line.area.useGradient ? `url(#areaGradient_${s}_${K.value})` : v(Xe)(e.color, l.value.line.area.opacity)
2622
+ }, null, 8, is)) : f("", !0),
2623
+ t.$slots.pattern && a ? (u(), i("path", {
2624
+ key: 1,
2625
+ d: a,
2626
+ fill: `url(#pattern_${K.value}_${e.slotAbsoluteIndex})`
2627
+ }, null, 8, rs)) : f("", !0)
2628
+ ], 64))), 128)) : (u(!0), i(x, { key: 1 }, _(e.area.split(";"), (a, r) => (u(), i(x, { key: r }, [
2629
+ a ? (u(), i("path", {
2630
+ key: 0,
2631
+ d: `M${a}Z`,
2632
+ fill: l.value.line.area.useGradient ? `url(#areaGradient_${s}_${K.value})` : v(Xe)(e.color, l.value.line.area.opacity)
2633
+ }, null, 8, ns)) : f("", !0),
2634
+ t.$slots.pattern && a ? (u(), i("path", {
2635
+ key: 1,
2636
+ d: `M${a}Z`,
2637
+ fill: `url(#pattern_${K.value}_${e.slotAbsoluteIndex})`
2638
+ }, null, 8, cs)) : f("", !0)
2639
+ ], 64))), 128))
2640
+ ])) : f("", !0),
2641
+ e.smooth && e.plots.length > 1 && e.curve ? (u(), i("path", {
2642
+ key: 1,
2643
+ d: `M${e.curve}`,
2644
+ stroke: e.color,
2645
+ "stroke-width": l.value.line.strokeWidth,
2646
+ "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2647
+ fill: "none",
2648
+ "stroke-linecap": "round"
2649
+ }, null, 8, vs)) : e.plots.length > 1 && e.straight ? (u(), i("path", {
2650
+ key: 2,
2651
+ d: `M${e.straight}`,
2652
+ stroke: e.color,
2653
+ "stroke-width": l.value.line.strokeWidth,
2654
+ "stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
2655
+ fill: "none",
2656
+ "stroke-linecap": "round",
2657
+ "stroke-linejoin": "round"
2658
+ }, null, 8, ds)) : f("", !0),
2659
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2660
+ key: `circle_line_${s}_${r}`
2661
+ }, [
2662
+ !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, {
2663
+ key: 0,
2664
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
2665
+ color: l.value.line.useGradient ? `url(#lineGradient_${s}_${K.value})` : l.value.line.dot.useSerieColor ? e.color : l.value.line.dot.fill,
2666
+ plot: { x: v(H)(a.x), y: v(H)(a.y) },
2667
+ radius: S.value !== null && S.value === r || P.value !== null && P.value === r ? (Me.value.line || 6) * 1.5 : Me.value.line || 6,
2668
+ stroke: l.value.line.dot.useSerieColor ? l.value.chart.backgroundColor : e.color,
2669
+ strokeWidth: l.value.line.dot.strokeWidth
2670
+ }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : f("", !0),
2671
+ a.comment && l.value.chart.comments.show ? (u(), i("foreignObject", {
2672
+ key: 1,
2673
+ style: { overflow: "visible" },
2674
+ height: "12",
2675
+ width: l.value.chart.comments.width,
2676
+ x: a.x - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
2677
+ y: a.y + l.value.chart.comments.offsetY + 6
2678
+ }, [
2679
+ p("div", fs, [
2680
+ J(t.$slots, "plot-comment", {
2681
+ plot: { ...a, color: e.color, seriesIndex: s, datapointIndex: r }
2682
+ }, void 0, !0)
2683
+ ])
2684
+ ], 8, hs)) : f("", !0)
2685
+ ], 64))), 128)),
2686
+ Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(j)(e.plots).trend) ? (u(), i("g", gs, [
2687
+ p("defs", null, [
2688
+ p("marker", {
2689
+ id: `line_arrow_${s}`,
2690
+ markerWidth: 7,
2691
+ markerHeight: 7,
2692
+ refX: "0",
2693
+ refY: 7 / 2,
2694
+ orient: "auto"
2695
+ }, [
2696
+ p("polygon", {
2697
+ points: `0 0, 7 ${7 / 2}, 0 7`,
2698
+ fill: e.color
2699
+ }, null, 8, xs)
2700
+ ], 8, ms)
2701
+ ]),
2702
+ e.plots.length > 1 ? (u(), i("line", {
2703
+ key: 0,
2704
+ x1: v(j)(e.plots).x1,
2705
+ x2: v(j)(e.plots).x2,
2706
+ y1: v(W)(v(j)(e.plots).y1),
2707
+ y2: v(W)(v(j)(e.plots).y2),
2708
+ "stroke-width": 1,
2709
+ stroke: e.color,
2710
+ "stroke-dasharray": 2,
2711
+ "marker-end": `url(#line_arrow_${s})`
2712
+ }, null, 8, bs)) : f("", !0),
2713
+ e.plots.length > 1 ? (u(), i("text", {
2714
+ key: 1,
2715
+ "text-anchor": "middle",
2716
+ x: v(j)(e.plots).x2,
2717
+ y: v(j)(e.plots).y2 - 6,
2718
+ "font-size": w.value.plotLabels,
2719
+ fill: e.color
2720
+ }, te(v(Pe)({
2721
+ v: v(j)(e.plots).trend * 100,
2722
+ s: "%",
2723
+ r: 2
2724
+ })), 9, ps)) : f("", !0)
2725
+ ])) : f("", !0)
2726
+ ], 6))), 128)),
2727
+ (l.value.bar.labels.show || l.value.bar.serieName.show) && m.value.dataLabels.show ? (u(), i("g", ys, [
2728
+ (u(!0), i(x, null, _(vl.value, (e, s) => (u(), i(x, {
2729
+ key: `xLabel_bar_${s}`
2730
+ }, [
2731
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2732
+ key: `xLabel_bar_${s}_${r}`
2733
+ }, [
2734
+ 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", {
2735
+ key: 0,
2736
+ x: m.value.useIndividualScale && m.value.isStacked ? a.x + oe.value.line / 2 : ht(a) + Fe() / 2 - ul.value / 2,
2737
+ y: v(H)(a.y) + (a.value >= 0 ? l.value.bar.labels.offsetY : -l.value.bar.labels.offsetY * 3),
2738
+ "text-anchor": "middle",
2739
+ "font-size": w.value.plotLabels,
2740
+ fill: l.value.bar.labels.color,
2741
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2742
+ }, te(Ne(a.value) ? v(ke)(
2743
+ l.value.bar.labels.formatter,
2744
+ a.value,
2745
+ v(Pe)({
2746
+ p: e.prefix || l.value.chart.labels.prefix,
2747
+ v: a.value,
2748
+ s: e.suffix || l.value.chart.labels.suffix,
2749
+ r: l.value.bar.labels.rounding
2750
+ }),
2751
+ {
2752
+ datapoint: a,
2753
+ serie: e
2754
+ }
2755
+ ) : ""), 13, ks)) : f("", !0),
2756
+ a && l.value.bar.serieName.show ? (u(), i("text", {
2757
+ key: 1,
2758
+ x: m.value.useIndividualScale && m.value.isStacked ? a.x + oe.value.line / 2 : a.x + Fe() * 1.1,
2759
+ y: a.y + (a.value > 0 ? l.value.bar.serieName.offsetY : -l.value.bar.serieName.offsetY * 3),
2760
+ "text-anchor": "middle",
2761
+ "font-size": w.value.plotLabels,
2762
+ fill: l.value.bar.serieName.useSerieColor ? e.color : l.value.bar.serieName.color,
2763
+ "font-weight": l.value.bar.serieName.bold ? "bold" : "normal",
2764
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2765
+ }, te(l.value.bar.serieName.useAbbreviation ? v(fo)({
2766
+ source: e.name,
2767
+ length: l.value.bar.serieName.abbreviationSize
2768
+ }) : e.name), 13, ws)) : f("", !0)
2769
+ ], 64))), 128))
2770
+ ], 64))), 128))
2771
+ ])) : f("", !0),
2772
+ l.value.plot.labels.show && m.value.dataLabels.show ? (u(), i("g", Ss, [
2773
+ (u(!0), i(x, null, _(Ze.value, (e, s) => (u(), i(x, {
2774
+ key: `xLabel_plot_${s}`
2775
+ }, [
2776
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2777
+ key: `xLabel_plot_${s}_${r}`
2778
+ }, [
2779
+ a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || S.value !== null && S.value === r || P.value !== null && P.value === r ? (u(), i("text", {
2780
+ key: 0,
2781
+ x: a.x,
2782
+ y: a.y + l.value.plot.labels.offsetY,
2783
+ "text-anchor": "middle",
2784
+ "font-size": w.value.plotLabels,
2785
+ fill: l.value.plot.labels.color,
2786
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2787
+ }, te(Ne(a.value) ? v(ke)(
2788
+ l.value.plot.labels.formatter,
2789
+ a.value,
2790
+ v(Pe)({
2791
+ p: e.prefix || l.value.chart.labels.prefix,
2792
+ v: a.value,
2793
+ s: e.suffix || l.value.chart.labels.suffix,
2794
+ r: l.value.plot.labels.rounding
2795
+ }),
2796
+ {
2797
+ datapoint: a,
2798
+ serie: e
2799
+ }
2800
+ ) : ""), 13, $s)) : f("", !0)
2801
+ ], 64))), 128))
2802
+ ], 64))), 128))
2803
+ ])) : (u(), i("g", _s, [
2804
+ (u(!0), i(x, null, _(Ze.value, (e, s) => (u(), i(x, {
2805
+ key: `xLabel_plot_${s}`
2806
+ }, [
2807
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2808
+ key: `xLabel_plot_${s}_${r}`
2809
+ }, [
2810
+ l.value.plot.tag.followValue ? (u(), i(x, { key: 1 }, [
2811
+ [P.value, S.value, Ee.value].includes(r) && e.useTag ? (u(), i("line", {
2812
+ key: 0,
2813
+ class: "vue-ui-xy-tag-plot",
2814
+ x1: n.value.left,
2815
+ x2: n.value.right,
2816
+ y1: a.y,
2817
+ y2: a.y,
2818
+ "stroke-width": 1,
2819
+ "stroke-linecap": "round",
2820
+ "stroke-dasharray": "2",
2821
+ stroke: e.color
2822
+ }, null, 8, zs)) : f("", !0)
2823
+ ], 64)) : (u(), i(x, { key: 0 }, [
2824
+ a && r === 0 && e.useTag && e.useTag === "start" ? (u(), i("foreignObject", {
2825
+ key: 0,
2826
+ x: a.x,
2827
+ y: a.y - 20,
2828
+ height: 24,
2829
+ width: "150",
2830
+ style: I(`overflow: visible; opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2831
+ }, [
2832
+ p("div", {
2833
+ 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;`),
2834
+ innerHTML: v(ke)(
2835
+ l.value.plot.tag.formatter,
2836
+ a.value,
2837
+ e.name,
2838
+ {
2839
+ datapoint: a,
2840
+ seriesIndex: r,
2841
+ serieName: e.name
2842
+ }
2843
+ )
2844
+ }, null, 12, Ms)
2845
+ ], 12, Ls)) : f("", !0),
2846
+ a && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (u(), i("foreignObject", {
2847
+ key: 1,
2848
+ x: a.x - e.name.length * (w.value.plotLabels / 2),
2849
+ y: a.y - 20,
2850
+ height: 24,
2851
+ width: "150",
2852
+ style: I(`overflow: visible; opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2853
+ }, [
2854
+ p("div", {
2855
+ 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;`),
2856
+ innerHTML: v(ke)(
2857
+ l.value.plot.tag.formatter,
2858
+ a.value,
2859
+ e.name,
2860
+ {
2861
+ datapoint: a,
2862
+ seriesIndex: r,
2863
+ serieName: e.name
2864
+ }
2865
+ )
2866
+ }, null, 12, Cs)
2867
+ ], 12, As)) : f("", !0)
2868
+ ], 64))
2869
+ ], 64))), 128))
2870
+ ], 64))), 128))
2871
+ ])),
2872
+ l.value.line.labels.show && m.value.dataLabels.show ? (u(), i("g", Is, [
2873
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i(x, {
2874
+ key: `xLabel_line_${s}`
2875
+ }, [
2876
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2877
+ key: `xLabel_line_${s}_${r}`
2878
+ }, [
2879
+ a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || S.value !== null && S.value === r || P.value !== null && P.value === r ? (u(), i("text", {
2880
+ key: 0,
2881
+ x: a.x,
2882
+ y: a.y + (a.value >= 0 ? l.value.line.labels.offsetY : -l.value.line.labels.offsetY * 3),
2883
+ "text-anchor": "middle",
2884
+ "font-size": w.value.plotLabels,
2885
+ fill: l.value.line.labels.color,
2886
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2887
+ }, te(Ne(a.value) ? v(ke)(
2888
+ l.value.line.labels.formatter,
2889
+ a.value,
2890
+ v(Pe)({
2891
+ p: e.prefix || l.value.chart.labels.prefix,
2892
+ v: a.value,
2893
+ s: e.suffix || l.value.chart.labels.suffix,
2894
+ r: l.value.line.labels.rounding
2895
+ }),
2896
+ {
2897
+ datapoint: a,
2898
+ serie: e
2899
+ }
2900
+ ) : ""), 13, Ts)) : f("", !0)
2901
+ ], 64))), 128))
2902
+ ], 64))), 128))
2903
+ ])) : (u(), i("g", Os, [
2904
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i(x, {
2905
+ key: `xLabel_line_${s}`
2906
+ }, [
2907
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2908
+ key: `xLabel_line_${s}_${r}`
2909
+ }, [
2910
+ l.value.line.tag.followValue ? (u(), i(x, { key: 1 }, [
2911
+ [P.value, S.value, Ee.value].includes(r) && e.useTag ? (u(), i("line", {
2912
+ key: 0,
2913
+ class: "vue-ui-xy-tag-line",
2914
+ x1: n.value.left,
2915
+ x2: n.value.right,
2916
+ y1: a.y,
2917
+ y2: a.y,
2918
+ "stroke-width": 1,
2919
+ "stroke-linecap": "round",
2920
+ "stroke-dasharray": "2",
2921
+ stroke: e.color
2922
+ }, null, 8, Vs)) : f("", !0)
2923
+ ], 64)) : (u(), i(x, { key: 0 }, [
2924
+ a && r === 0 && e.useTag && e.useTag === "start" ? (u(), i("foreignObject", {
2925
+ key: 0,
2926
+ x: a.x,
2927
+ y: a.y - 20,
2928
+ height: 24,
2929
+ width: "150",
2930
+ style: I(`overflow: visible; opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2931
+ }, [
2932
+ p("div", {
2933
+ 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;`),
2934
+ innerHTML: v(ke)(
2935
+ l.value.line.tag.formatter,
2936
+ a.value,
2937
+ e.name,
2938
+ {
2939
+ datapoint: a,
2940
+ seriesIndex: r,
2941
+ serieName: e.name
2942
+ }
2943
+ )
2944
+ }, null, 12, Rs)
2945
+ ], 12, Ns)) : f("", !0),
2946
+ a && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (u(), i("foreignObject", {
2947
+ key: 1,
2948
+ x: a.x,
2949
+ y: a.y - 20,
2950
+ height: 24,
2951
+ width: "150",
2952
+ style: I(`overflow: visible; opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2953
+ }, [
2954
+ p("div", {
2955
+ 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;`),
2956
+ innerHTML: v(ke)(
2957
+ l.value.line.tag.formatter,
2958
+ a.value,
2959
+ e.name,
2960
+ {
2961
+ datapoint: a,
2962
+ seriesIndex: r,
2963
+ serieName: e.name
2964
+ }
2965
+ )
2966
+ }, null, 12, Hs)
2967
+ ], 12, Ps)) : f("", !0)
2968
+ ], 64))
2969
+ ], 64))), 128))
2970
+ ], 64))), 128))
2971
+ ])),
2972
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i(x, {
2973
+ key: `xLabel_line_${s}`
2974
+ }, [
2975
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
2976
+ key: `xLabel_line_${s}_${r}`
2977
+ }, [
2978
+ a && r === 0 && e.showSerieName && e.showSerieName === "start" ? (u(), i("text", {
2979
+ key: 0,
2980
+ x: a.x - w.value.plotLabels,
2981
+ y: a.y,
2982
+ "font-size": w.value.plotLabels,
2983
+ "text-anchor": "end",
2984
+ fill: e.color,
2985
+ innerHTML: v(xt)({
2986
+ content: e.name,
2987
+ fontSize: w.value.plotLabels,
2988
+ fill: e.color,
2989
+ x: a.x - w.value.plotLabels,
2990
+ y: a.y,
2991
+ maxWords: 2
2992
+ }),
2993
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2994
+ }, null, 12, Es)) : f("", !0),
2995
+ a && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (u(), i("text", {
2996
+ key: 1,
2997
+ x: a.x + w.value.plotLabels,
2998
+ y: a.y,
2999
+ "font-size": w.value.plotLabels,
3000
+ "text-anchor": "start",
3001
+ fill: e.color,
3002
+ innerHTML: v(xt)({
3003
+ content: e.name,
3004
+ fontSize: w.value.plotLabels,
3005
+ fill: e.color,
3006
+ x: a.x + w.value.plotLabels,
3007
+ y: a.y,
3008
+ maxWords: 2
3009
+ }),
3010
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3011
+ }, null, 12, Bs)) : f("", !0)
3012
+ ], 64))), 128))
3013
+ ], 64))), 128)),
3014
+ (u(!0), i(x, null, _(Ze.value, (e, s) => (u(), i(x, {
3015
+ key: `xLabel_plot_${s}`
3016
+ }, [
3017
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
3018
+ key: `xLabel_plot_${s}_${r}`
3019
+ }, [
3020
+ a && r === 0 && e.showSerieName && e.showSerieName === "start" ? (u(), i("text", {
3021
+ key: 0,
3022
+ x: a.x - w.value.plotLabels,
3023
+ y: a.y,
3024
+ "font-size": w.value.plotLabels,
3025
+ "text-anchor": "end",
3026
+ fill: e.color,
3027
+ innerHTML: v(xt)({
3028
+ content: e.name,
3029
+ fontSize: w.value.plotLabels,
3030
+ fill: e.color,
3031
+ x: a.x - w.value.plotLabels,
3032
+ y: a.y,
3033
+ maxWords: 2
3034
+ }),
3035
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3036
+ }, null, 12, Fs)) : f("", !0),
3037
+ a && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (u(), i("text", {
3038
+ key: 1,
3039
+ x: a.x + w.value.plotLabels,
3040
+ y: a.y,
3041
+ "font-size": w.value.plotLabels,
3042
+ "text-anchor": "start",
3043
+ fill: e.color,
3044
+ innerHTML: v(xt)({
3045
+ content: e.name,
3046
+ fontSize: w.value.plotLabels,
3047
+ fill: e.color,
3048
+ x: a.x + w.value.plotLabels,
3049
+ y: a.y,
3050
+ maxWords: 2
3051
+ }),
3052
+ style: I(`opacity:${L.value ? L.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3053
+ }, null, 12, Ws)) : f("", !0)
3054
+ ], 64))), 128))
3055
+ ], 64))), 128)),
3056
+ m.value.useIndividualScale && !m.value.isStacked ? (u(), i(x, { key: 12 }, [
3057
+ p("defs", null, [
3058
+ (u(!0), i(x, null, _(lt.value, (e, s) => (u(), i("linearGradient", {
3059
+ id: `individual_scale_gradient_${K.value}_${s}`,
3060
+ x1: "0%",
3061
+ x2: "100%",
3062
+ y1: "0%",
3063
+ y2: "0%"
3064
+ }, [
3065
+ p("stop", {
3066
+ offset: "0%",
3067
+ "stop-color": l.value.chart.backgroundColor,
3068
+ "stop-opacity": "0"
3069
+ }, null, 8, Xs),
3070
+ p("stop", {
3071
+ offset: "100%",
3072
+ "stop-color": e.color,
3073
+ "stop-opacity": "0.2"
3074
+ }, null, 8, Ds)
3075
+ ], 8, Ys))), 256))
3076
+ ]),
3077
+ (u(!0), i(x, null, _(lt.value, (e, s) => (u(), i("rect", {
3078
+ x: e.x - l.value.chart.grid.labels.yAxis.labelWidth + ee.value - n.value.individualOffsetX,
3079
+ y: n.value.top,
3080
+ width: l.value.chart.grid.labels.yAxis.labelWidth + n.value.individualOffsetX,
3081
+ height: n.value.height < 0 ? 10 : n.value.height,
3082
+ fill: L.value === e.groupId ? `url(#individual_scale_gradient_${K.value}_${s})` : "transparent",
3083
+ onMouseenter: (a) => L.value = e.groupId,
3084
+ onMouseleave: c[0] || (c[0] = (a) => L.value = null)
3085
+ }, null, 40, Gs))), 256))
3086
+ ], 64)) : f("", !0),
3087
+ p("g", null, [
3088
+ l.value.chart.grid.labels.axis.yLabel && !m.value.useIndividualScale ? (u(), i("text", {
3089
+ key: 0,
3090
+ ref_key: "yAxisLabel",
3091
+ ref: Tl,
3092
+ "font-size": w.value.yAxis,
3093
+ fill: l.value.chart.grid.labels.color,
3094
+ transform: `translate(${l.value.chart.grid.labels.axis.fontSize}, ${n.value.top + n.value.height / 2}) rotate(-90)`,
3095
+ "text-anchor": "middle",
3096
+ style: { transition: "none" }
3097
+ }, te(l.value.chart.grid.labels.axis.yLabel), 9, Us)) : f("", !0),
3098
+ l.value.chart.grid.labels.axis.xLabel ? (u(), i("text", {
3099
+ key: 1,
3100
+ ref_key: "xAxisLabel",
3101
+ ref: Ie,
3102
+ "text-anchor": "middle",
3103
+ x: re.value / 2,
3104
+ y: ie.value - 3,
3105
+ "font-size": w.value.yAxis,
3106
+ fill: l.value.chart.grid.labels.color
3107
+ }, te(l.value.chart.grid.labels.axis.xLabel), 9, qs)) : f("", !0)
3108
+ ]),
3109
+ l.value.chart.grid.labels.xAxisLabels.show ? (u(), i("g", {
3110
+ key: 13,
3111
+ ref_key: "timeLabelsEls",
3112
+ ref: el
3113
+ }, [
3114
+ t.$slots["time-label"] ? (u(!0), i(x, { key: 0 }, _(Q.value, (e, s) => J(t.$slots, "time-label", gt({
3115
+ key: `time_label_${s}`,
3116
+ ref_for: !0
3117
+ }, {
3118
+ x: n.value.left + n.value.width / $.value * s + n.value.width / $.value / 2,
3119
+ y: n.value.bottom,
3120
+ fontSize: w.value.xAxis,
3121
+ fill: l.value.chart.grid.labels.xAxisLabels.color,
3122
+ 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})`,
3123
+ absoluteIndex: e.absoluteIndex,
3124
+ content: e.text,
3125
+ textAnchor: l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3126
+ 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
3127
+ }), void 0, !0)), 128)) : (u(!0), i(x, { key: 1 }, _(Q.value, (e, s) => (u(), i("g", {
3128
+ key: `time_label_${s}`
3129
+ }, [
3130
+ 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 }, [
3131
+ String(e.text).includes(`
3132
+ `) ? (u(), i("text", {
3133
+ key: 1,
3134
+ "text-anchor": l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3135
+ "font-size": w.value.xAxis,
3136
+ fill: l.value.chart.grid.labels.xAxisLabels.color,
3137
+ 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})`,
3138
+ style: I({
3139
+ cursor: Bt() ? "pointer" : "default"
3140
+ }),
3141
+ innerHTML: v(go)({
3142
+ content: String(e.text),
3143
+ fontSize: w.value.xAxis,
3144
+ fill: l.value.chart.grid.labels.xAxisLabels.color,
3145
+ x: 0,
3146
+ y: 0
3147
+ }),
3148
+ onClick: () => Xt(e, s)
3149
+ }, null, 12, Js)) : (u(), i("text", {
3150
+ key: 0,
3151
+ class: "vue-data-ui-time-label",
3152
+ "text-anchor": l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3153
+ "font-size": w.value.xAxis,
3154
+ fill: l.value.chart.grid.labels.xAxisLabels.color,
3155
+ 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})`,
3156
+ style: I({
3157
+ cursor: Bt() ? "pointer" : "default"
3158
+ }),
3159
+ onClick: () => Xt(e, s)
3160
+ }, te(e.text || ""), 13, Zs))
3161
+ ], 64)) : f("", !0)
3162
+ ]))), 128))
3163
+ ], 512)) : f("", !0),
3164
+ oa.value.length && !m.value.isStacked ? (u(), i("g", Ks, [
3165
+ (u(!0), i(x, null, _(oa.value, (e) => (u(), i("g", {
3166
+ key: e.uid
3167
+ }, [
3168
+ e.yTop && e.show && isFinite(e.yTop) ? (u(), i("line", {
3169
+ key: 0,
3170
+ x1: e.x1,
3171
+ y1: e.yTop,
3172
+ x2: e.x2,
3173
+ y2: e.yTop,
3174
+ stroke: e.config.line.stroke,
3175
+ "stroke-width": e.config.line.strokeWidth,
3176
+ "stroke-dasharray": e.config.line.strokeDasharray,
3177
+ "stroke-linecap": "round",
3178
+ style: { animation: "none !important" }
3179
+ }, null, 8, Qs)) : f("", !0),
3180
+ e.yBottom && e.show && isFinite(e.yBottom) ? (u(), i("line", {
3181
+ key: 1,
3182
+ x1: e.x1,
3183
+ y1: e.yBottom,
3184
+ x2: e.x2,
3185
+ y2: e.yBottom,
3186
+ stroke: e.config.line.stroke,
3187
+ "stroke-width": e.config.line.strokeWidth,
3188
+ "stroke-dasharray": e.config.line.strokeDasharray,
3189
+ "stroke-linecap": "round",
3190
+ style: { animation: "none !important" }
3191
+ }, null, 8, js)) : f("", !0),
3192
+ e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (u(), i("rect", {
3193
+ key: 2,
3194
+ y: Math.min(e.yTop, e.yBottom),
3195
+ x: e.x1,
3196
+ width: n.value.width,
3197
+ height: v(H)(e.areaHeight, 0),
3198
+ fill: v(Xe)(e.config.area.fill, e.config.area.opacity),
3199
+ style: { animation: "none !important" }
3200
+ }, null, 8, ei)) : f("", !0),
3201
+ e.config.label.text && e.show && isFinite(e._box.y) ? (u(), i("rect", gt({
3202
+ key: 3,
3203
+ class: "vue-ui-xy-annotation-label-box"
3204
+ }, { ref_for: !0 }, e._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : f("", !0),
3205
+ e.config.label.text && e.show && isFinite(e._text.y) ? (u(), i("text", {
3206
+ key: 4,
3207
+ id: e.id,
3208
+ class: "vue-ui-xy-annotation-label",
3209
+ x: e._text.x,
3210
+ y: e._text.y,
3211
+ "font-size": e.config.label.fontSize,
3212
+ fill: e.config.label.color,
3213
+ "text-anchor": e.config.label.textAnchor
3214
+ }, te(e.config.label.text), 9, li)) : f("", !0)
3215
+ ]))), 128))
3216
+ ])) : f("", !0),
3217
+ l.value.chart.timeTag.show && (![null, void 0].includes(S.value) || ![null, void 0].includes(P.value)) ? (u(), i("g", ti, [
3218
+ (u(), i("foreignObject", {
3219
+ 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,
3220
+ y: n.value.bottom,
3221
+ width: "200",
3222
+ height: "40",
3223
+ style: { overflow: "visible !important" }
3224
+ }, [
3225
+ p("div", {
3226
+ class: "vue-ui-xy-time-tag",
3227
+ 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`)
3228
+ }, 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)
3229
+ ], 8, ai)),
3230
+ p("circle", {
3231
+ 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,
3232
+ cy: n.value.bottom,
3233
+ r: l.value.chart.timeTag.circleMarker.radius,
3234
+ fill: l.value.chart.timeTag.circleMarker.color
3235
+ }, null, 8, oi)
3236
+ ])) : f("", !0)
3237
+ ])) : f("", !0),
3238
+ we.value ? (u(), i("rect", sl(gt({ key: 2 }, Mt.value)), null, 16)) : f("", !0),
3239
+ J(t.$slots, "svg", { svg: Jl.value }, void 0, !0)
3240
+ ], 512)
3241
+ ], 46, Ko)),
3242
+ t.$slots.watermark ? (u(), i("div", ui, [
3243
+ J(t.$slots, "watermark", sl(gl({ isPrinting: v(Kl) || v(rt) })), void 0, !0)
3244
+ ])) : f("", !0),
3245
+ (u(!0), i(x, null, _(We.value, (e, s) => (u(), i(x, {
3246
+ key: `tag_line_${s}`
3247
+ }, [
3248
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
3249
+ key: `tag_line_${s}_${r}`
3250
+ }, [
3251
+ [P.value, S.value, Ee.value].includes(r) && e.useTag && e.useTag === "end" && l.value.line.tag.followValue ? (u(), i("div", {
3252
+ key: 0,
3253
+ ref_for: !0,
3254
+ ref: (o) => vt(s, r, o, "right", "line"),
3255
+ class: "vue-ui-xy-tag",
3256
+ "data-tag": "right",
3257
+ style: I({
3258
+ position: "fixed",
3259
+ top: v(ml)({
3260
+ svgElement: be.value,
3261
+ x: n.value.right + l.value.line.tag.fontSize / 1.5,
3262
+ y: a.y,
3263
+ element: pe.value[`${s}_${r}_right_line`],
3264
+ position: "right"
3265
+ }).top + "px",
3266
+ left: v(ml)({
3267
+ svgElement: be.value,
3268
+ x: n.value.right + l.value.line.tag.fontSize / 1.5,
3269
+ y: a.y,
3270
+ element: pe.value[`${s}_${r}_right_line`],
3271
+ position: "right"
3272
+ }).left + "px",
3273
+ height: "fit-content",
3274
+ width: "fit-content",
3275
+ background: e.color,
3276
+ color: v(De)(e.color),
3277
+ padding: "0 6px",
3278
+ fontSize: l.value.line.tag.fontSize + "px",
3279
+ opacity: 1
3280
+ })
3281
+ }, [
3282
+ (u(), i("svg", si, [
3283
+ p("path", {
3284
+ d: "M 0,10 10,0 10,20 Z",
3285
+ fill: e.color,
3286
+ stroke: "none"
3287
+ }, null, 8, ii)
3288
+ ])),
3289
+ p("div", {
3290
+ class: "vue-ui-xy-tag-content",
3291
+ innerHTML: v(ke)(
3292
+ l.value.line.tag.formatter,
3293
+ a.value,
3294
+ e.name,
3295
+ {
3296
+ datapoint: a,
3297
+ seriesIndex: r,
3298
+ serieName: e.name
3299
+ }
3300
+ )
3301
+ }, null, 8, ri)
3302
+ ], 4)) : f("", !0),
3303
+ [P.value, S.value, Ee.value].includes(r) && e.useTag && e.useTag === "start" && l.value.line.tag.followValue ? (u(), i("div", {
3304
+ key: 1,
3305
+ ref_for: !0,
3306
+ ref: (o) => vt(s, r, o, "left", "line"),
3307
+ class: "vue-ui-xy-tag",
3308
+ "data-tag": "left",
3309
+ style: I({
3310
+ position: "fixed",
3311
+ top: v(ml)({
3312
+ svgElement: be.value,
3313
+ x: n.value.left - l.value.line.tag.fontSize / 1.5,
3314
+ y: a.y,
3315
+ element: pe.value[`${s}_${r}_left_line`],
3316
+ position: "left"
3317
+ }).top + "px",
3318
+ left: v(ml)({
3319
+ svgElement: be.value,
3320
+ x: n.value.left - l.value.line.tag.fontSize / 1.5,
3321
+ y: a.y,
3322
+ element: pe.value[`${s}_${r}_left_line`],
3323
+ position: "left"
3324
+ }).left + "px",
3325
+ height: "fit-content",
3326
+ width: "fit-content",
3327
+ background: e.color,
3328
+ color: v(De)(e.color),
3329
+ padding: "0 6px",
3330
+ fontSize: l.value.line.tag.fontSize + "px",
3331
+ opacity: 1
3332
+ })
3333
+ }, [
3334
+ (u(), i("svg", ni, [
3335
+ p("path", {
3336
+ d: "M 0,0 10,10 0,20 Z",
3337
+ fill: e.color,
3338
+ stroke: "none"
3339
+ }, null, 8, ci)
3340
+ ])),
3341
+ p("div", {
3342
+ class: "vue-ui-xy-tag-content",
3343
+ innerHTML: v(ke)(
3344
+ l.value.line.tag.formatter,
3345
+ a.value,
3346
+ e.name,
3347
+ {
3348
+ datapoint: a,
3349
+ seriesIndex: r,
3350
+ serieName: e.name
3351
+ }
3352
+ )
3353
+ }, null, 8, vi)
3354
+ ], 4)) : f("", !0)
3355
+ ], 64))), 128))
3356
+ ], 64))), 128)),
3357
+ (u(!0), i(x, null, _(Ze.value, (e, s) => (u(), i(x, {
3358
+ key: `tag_plot_${s}`
3359
+ }, [
3360
+ (u(!0), i(x, null, _(e.plots, (a, r) => (u(), i(x, {
3361
+ key: `tag_plot_${s}_${r}`
3362
+ }, [
3363
+ [P.value, S.value, Ee.value].includes(r) && e.useTag && e.useTag === "end" && l.value.plot.tag.followValue ? (u(), i("div", {
3364
+ key: 0,
3365
+ ref_for: !0,
3366
+ ref: (o) => vt(s, r, o, "right", "plot"),
3367
+ class: "vue-ui-xy-tag",
3368
+ "data-tag": "right",
3369
+ style: I({
3370
+ position: "fixed",
3371
+ top: v(ml)({
3372
+ svgElement: be.value,
3373
+ x: n.value.right + l.value.plot.tag.fontSize / 1.5,
3374
+ y: a.y,
3375
+ element: pe.value[`${s}_${r}_right_plot`],
3376
+ position: "right"
3377
+ }).top + "px",
3378
+ left: v(ml)({
3379
+ svgElement: be.value,
3380
+ x: n.value.right + l.value.plot.tag.fontSize / 1.5,
3381
+ y: a.y,
3382
+ element: pe.value[`${s}_${r}_right_plot`],
3383
+ position: "right"
3384
+ }).left + "px",
3385
+ height: "fit-content",
3386
+ width: "fit-content",
3387
+ background: e.color,
3388
+ color: v(De)(e.color),
3389
+ padding: "0 6px",
3390
+ fontSize: l.value.plot.tag.fontSize + "px",
3391
+ opacity: 1
3392
+ })
3393
+ }, [
3394
+ (u(), i("svg", di, [
3395
+ p("path", {
3396
+ d: "M 0,10 10,0 10,20 Z",
3397
+ fill: e.color,
3398
+ stroke: "none"
3399
+ }, null, 8, hi)
3400
+ ])),
3401
+ p("div", {
3402
+ class: "vue-ui-xy-tag-content",
3403
+ innerHTML: v(ke)(
3404
+ l.value.plot.tag.formatter,
3405
+ a.value,
3406
+ e.name,
3407
+ {
3408
+ datapoint: a,
3409
+ seriesIndex: r,
3410
+ serieName: e.name
3411
+ }
3412
+ )
3413
+ }, null, 8, fi)
3414
+ ], 4)) : f("", !0),
3415
+ [P.value, S.value, Ee.value].includes(r) && e.useTag && e.useTag === "start" && l.value.plot.tag.followValue ? (u(), i("div", {
3416
+ key: 1,
3417
+ ref_for: !0,
3418
+ ref: (o) => vt(s, r, o, "left", "plot"),
3419
+ class: "vue-ui-xy-tag",
3420
+ "data-tag": "left",
3421
+ style: I({
3422
+ position: "fixed",
3423
+ top: v(ml)({
3424
+ svgElement: be.value,
3425
+ x: n.value.left - l.value.plot.tag.fontSize / 1.5,
3426
+ y: a.y,
3427
+ element: pe.value[`${s}_${r}_left_plot`],
3428
+ position: "left"
3429
+ }).top + "px",
3430
+ left: v(ml)({
3431
+ svgElement: be.value,
3432
+ x: n.value.left - l.value.plot.tag.fontSize / 1.5,
3433
+ y: a.y,
3434
+ element: pe.value[`${s}_${r}_left_plot`],
3435
+ position: "left"
3436
+ }).left + "px",
3437
+ height: "fit-content",
3438
+ width: "fit-content",
3439
+ background: e.color,
3440
+ color: v(De)(e.color),
3441
+ padding: "0 6px",
3442
+ fontSize: l.value.plot.tag.fontSize + "px",
3443
+ opacity: 1
3444
+ })
3445
+ }, [
3446
+ (u(), i("svg", gi, [
3447
+ p("path", {
3448
+ d: "M 0,0 10,10 0,20 Z",
3449
+ fill: e.color,
3450
+ stroke: "none"
3451
+ }, null, 8, mi)
3452
+ ])),
3453
+ p("div", {
3454
+ class: "vue-ui-xy-tag-content",
3455
+ innerHTML: v(ke)(
3456
+ l.value.plot.tag.formatter,
3457
+ a.value,
3458
+ e.name,
3459
+ {
3460
+ datapoint: a,
3461
+ seriesIndex: r,
3462
+ serieName: e.name
3463
+ }
3464
+ )
3465
+ }, null, 8, xi)
3466
+ ], 4)) : f("", !0)
3467
+ ], 64))), 128))
3468
+ ], 64))), 128)),
3469
+ l.value.chart.zoom.preview.enable ? (u(), i(x, { key: 5 }, [
3470
+ l.value.chart.zoom.show && g.value > 6 && _l.value ? (u(), Ye(Zo, {
3471
+ ref_key: "chartSlicer",
3472
+ ref: Le,
3473
+ key: `slicer_${fe.value}`,
3474
+ background: l.value.chart.zoom.color,
3475
+ fontSize: l.value.chart.zoom.fontSize,
3476
+ useResetSlot: l.value.chart.zoom.useResetSlot,
3477
+ labelLeft: Q.value[0] ? Q.value[0].text : "",
3478
+ labelRight: Q.value.at(-1) ? Q.value.at(-1).text : "",
3479
+ textColor: l.value.chart.color,
3480
+ inputColor: l.value.chart.zoom.color,
3481
+ selectColor: l.value.chart.zoom.highlightColor,
3482
+ borderColor: l.value.chart.backgroundColor,
3483
+ minimap: ta.value,
3484
+ smoothMinimap: l.value.chart.zoom.minimap.smooth,
3485
+ minimapSelectedColor: l.value.chart.zoom.minimap.selectedColor,
3486
+ minimapSelectionRadius: l.value.chart.zoom.minimap.selectionRadius,
3487
+ minimapLineColor: l.value.chart.zoom.minimap.lineColor,
3488
+ minimapSelectedColorOpacity: l.value.chart.zoom.minimap.selectedColorOpacity,
3489
+ minimapSelectedIndex: S.value,
3490
+ minimapIndicatorColor: l.value.chart.zoom.minimap.indicatorColor,
3491
+ verticalHandles: l.value.chart.zoom.minimap.verticalHandles,
3492
+ max: g.value,
3493
+ min: 0,
3494
+ valueStart: h.value.start,
3495
+ valueEnd: h.value.end,
3496
+ start: h.value.start,
3497
+ "onUpdate:start": c[1] || (c[1] = (e) => h.value.start = e),
3498
+ end: h.value.end,
3499
+ "onUpdate:end": c[2] || (c[2] = (e) => h.value.end = e),
3500
+ refreshStartPoint: l.value.chart.zoom.startIndex !== null ? l.value.chart.zoom.startIndex : 0,
3501
+ 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)),
3502
+ enableRangeHandles: l.value.chart.zoom.enableRangeHandles,
3503
+ enableSelectionDrag: l.value.chart.zoom.enableSelectionDrag,
3504
+ onReset: Ut,
3505
+ onTrapMouse: Dt,
3506
+ onFutureStart: c[3] || (c[3] = (e) => cl("start", e)),
3507
+ onFutureEnd: c[4] || (c[4] = (e) => cl("end", e)),
3508
+ timeLabels: Ia.value,
3509
+ isPreview: we.value
3510
+ }, {
3511
+ "reset-action": me(({ reset: e }) => [
3512
+ J(t.$slots, "reset-action", sl(gl({ reset: e })), void 0, !0)
3513
+ ]),
3514
+ _: 3
3515
+ }, 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)
3516
+ ], 64)) : (u(), i(x, { key: 6 }, [
3517
+ l.value.chart.zoom.show && g.value > 6 && _l.value ? (u(), Ye(ko, {
3518
+ ref_key: "chartSlicer",
3519
+ ref: Le,
3520
+ key: `slicer_${fe.value}`,
3521
+ background: l.value.chart.zoom.color,
3522
+ fontSize: l.value.chart.zoom.fontSize,
3523
+ useResetSlot: l.value.chart.zoom.useResetSlot,
3524
+ labelLeft: Q.value[0] ? Q.value[0].text : "",
3525
+ labelRight: Q.value.at(-1) ? Q.value.at(-1).text : "",
3526
+ textColor: l.value.chart.color,
3527
+ inputColor: l.value.chart.zoom.color,
3528
+ selectColor: l.value.chart.zoom.highlightColor,
3529
+ borderColor: l.value.chart.backgroundColor,
3530
+ minimap: ta.value,
3531
+ smoothMinimap: l.value.chart.zoom.minimap.smooth,
3532
+ minimapSelectedColor: l.value.chart.zoom.minimap.selectedColor,
3533
+ minimapSelectionRadius: l.value.chart.zoom.minimap.selectionRadius,
3534
+ minimapLineColor: l.value.chart.zoom.minimap.lineColor,
3535
+ minimapSelectedColorOpacity: l.value.chart.zoom.minimap.selectedColorOpacity,
3536
+ minimapSelectedIndex: S.value,
3537
+ minimapIndicatorColor: l.value.chart.zoom.minimap.indicatorColor,
3538
+ verticalHandles: l.value.chart.zoom.minimap.verticalHandles,
3539
+ max: g.value,
3540
+ min: 0,
3541
+ valueStart: h.value.start,
3542
+ valueEnd: h.value.end,
3543
+ start: h.value.start,
3544
+ "onUpdate:start": c[5] || (c[5] = (e) => h.value.start = e),
3545
+ end: h.value.end,
3546
+ "onUpdate:end": c[6] || (c[6] = (e) => h.value.end = e),
3547
+ refreshStartPoint: l.value.chart.zoom.startIndex !== null ? l.value.chart.zoom.startIndex : 0,
3548
+ 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)),
3549
+ enableRangeHandles: l.value.chart.zoom.enableRangeHandles,
3550
+ enableSelectionDrag: l.value.chart.zoom.enableSelectionDrag,
3551
+ onReset: Ut,
3552
+ onTrapMouse: Dt
3553
+ }, {
3554
+ "reset-action": me(({ reset: e }) => [
3555
+ J(t.$slots, "reset-action", sl(gl({ reset: e })), void 0, !0)
3556
+ ]),
3557
+ _: 3
3558
+ }, 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)
3559
+ ], 64)),
3560
+ l.value.chart.legend.show ? (u(), i("div", {
3561
+ key: 7,
3562
+ ref_key: "chartLegend",
3563
+ ref: Ue,
3564
+ class: "vue-ui-xy-legend",
3565
+ style: I(`font-size:${l.value.chart.legend.fontSize}px`)
3566
+ }, [
3567
+ (u(!0), i(x, null, _(ol.value, (e, s) => (u(), i("div", {
3568
+ key: `div_legend_item_${s}`,
3569
+ onClick: (a) => ea(e),
3570
+ class: ze({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": ae.value.includes(e.id) })
3571
+ }, [
3572
+ Ve.value[e.type] === "line" ? (u(), i("svg", pi, [
3573
+ p("rect", {
3574
+ x: "0",
3575
+ y: "7.5",
3576
+ rx: "1.5",
3577
+ stroke: l.value.chart.backgroundColor,
3578
+ "stroke-width": 0.5,
3579
+ height: "3",
3580
+ width: "20",
3581
+ fill: e.color
3582
+ }, null, 8, yi),
3583
+ Wl(bt, {
3584
+ plot: { x: 10, y: 9 },
3585
+ radius: 4,
3586
+ color: e.color,
3587
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
3588
+ stroke: l.value.chart.backgroundColor,
3589
+ strokeWidth: 0.5
3590
+ }, null, 8, ["color", "shape", "stroke"])
3591
+ ])) : Ve.value[e.type] === "bar" ? (u(), i("svg", ki, [
3592
+ Ve.value[e.type] === "bar" && t.$slots.pattern ? (u(), i("rect", {
3593
+ key: 0,
3594
+ x: "0",
3595
+ y: "0",
3596
+ rx: "1",
3597
+ height: "40",
3598
+ width: "40",
3599
+ stroke: "none",
3600
+ fill: e.color
3601
+ }, null, 8, wi)) : f("", !0),
3602
+ Ve.value[e.type] === "bar" ? (u(), i("rect", {
3603
+ key: 1,
3604
+ x: "0",
3605
+ y: "0",
3606
+ rx: "1",
3607
+ height: "40",
3608
+ width: "40",
3609
+ stroke: "none",
3610
+ fill: t.$slots.pattern ? `url(#pattern_${K.value}_${e.slotAbsoluteIndex})` : e.color
3611
+ }, null, 8, Si)) : f("", !0)
3612
+ ])) : (u(), i("svg", $i, [
3613
+ Wl(bt, {
3614
+ plot: { x: 6, y: 6 },
3615
+ radius: 5,
3616
+ color: e.color,
3617
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle"
3618
+ }, null, 8, ["color", "shape"])
3619
+ ])),
3620
+ p("span", {
3621
+ style: I(`color:${l.value.chart.legend.color}`)
3622
+ }, te(e.name), 5)
3623
+ ], 10, bi))), 128))
3624
+ ], 4)) : (u(), i("div", {
3625
+ key: 8,
3626
+ ref_key: "chartLegend",
3627
+ ref: Ue
3628
+ }, [
3629
+ J(t.$slots, "legend", { legend: ol.value }, void 0, !0)
3630
+ ], 512)),
3631
+ t.$slots.source ? (u(), i("div", {
3632
+ key: 9,
3633
+ ref_key: "source",
3634
+ ref: kl,
3635
+ dir: "auto"
3636
+ }, [
3637
+ J(t.$slots, "source", {}, void 0, !0)
3638
+ ], 512)) : f("", !0),
3639
+ Wl(v(ue), {
3640
+ show: m.value.showTooltip && Nl.value,
3641
+ backgroundColor: l.value.chart.tooltip.backgroundColor,
3642
+ color: l.value.chart.tooltip.color,
3643
+ fontSize: l.value.chart.tooltip.fontSize,
3644
+ borderRadius: l.value.chart.tooltip.borderRadius,
3645
+ borderColor: l.value.chart.tooltip.borderColor,
3646
+ borderWidth: l.value.chart.tooltip.borderWidth,
3647
+ backgroundOpacity: l.value.chart.tooltip.backgroundOpacity,
3648
+ position: l.value.chart.tooltip.position,
3649
+ offsetY: l.value.chart.tooltip.offsetY,
3650
+ parent: t.$refs.chart,
3651
+ content: Ga.value,
3652
+ isFullscreen: ll.value,
3653
+ isCustom: l.value.chart.tooltip.customFormat && typeof l.value.chart.tooltip.customFormat == "function",
3654
+ smooth: l.value.chart.tooltip.smooth,
3655
+ backdropFilter: l.value.chart.tooltip.backdropFilter
3656
+ }, {
3657
+ "tooltip-before": me(() => [
3658
+ J(t.$slots, "tooltip-before", sl(gl({ ...ua.value })), void 0, !0)
3659
+ ]),
3660
+ "tooltip-after": me(() => [
3661
+ J(t.$slots, "tooltip-after", sl(gl({ ...ua.value })), void 0, !0)
3662
+ ]),
3663
+ _: 3
3664
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
3665
+ _l.value ? (u(), Ye(v(Il), {
3666
+ key: 10,
3667
+ hideDetails: "",
3668
+ config: {
3669
+ open: m.value.showTable,
3670
+ maxHeight: 1e4,
3671
+ body: {
3672
+ backgroundColor: l.value.chart.backgroundColor,
3673
+ color: l.value.chart.color
3674
+ },
3675
+ head: {
3676
+ backgroundColor: l.value.chart.backgroundColor,
3677
+ color: l.value.chart.color
3678
+ }
3679
+ }
3680
+ }, {
3681
+ content: me(() => [
3682
+ p("div", {
3683
+ style: I(`${v(Kl) ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
3684
+ }, [
3685
+ p("div", _i, [
3686
+ Rt(p("input", {
3687
+ type: "checkbox",
3688
+ "onUpdate:modelValue": c[7] || (c[7] = (e) => nl.value = e)
3689
+ }, null, 512), [
3690
+ [lo, nl.value]
3691
+ ]),
3692
+ p("div", {
3693
+ onClick: c[8] || (c[8] = (e) => nl.value = !nl.value),
3694
+ style: { cursor: "pointer" }
3695
+ }, [
3696
+ Wl(v(xl), {
3697
+ name: "chartLine",
3698
+ size: 20,
3699
+ stroke: l.value.chart.color
3700
+ }, null, 8, ["stroke"])
3701
+ ])
3702
+ ]),
3703
+ nl.value ? (u(), Ye(v(Xl), {
3704
+ key: `sparkline_${Rl.value}`,
3705
+ dataset: Ya.value,
3706
+ config: Xa.value
3707
+ }, null, 8, ["dataset", "config"])) : (u(), Ye(v(Ge), {
3708
+ key: `table_${it.value}`,
3709
+ colNames: ft.value.colNames,
3710
+ head: ft.value.head,
3711
+ body: ft.value.body,
3712
+ config: ft.value.config,
3713
+ title: `${l.value.chart.title.text}${l.value.chart.title.subtitle.text ? ` : ${l.value.chart.title.subtitle.text}` : ""}`,
3714
+ onClose: c[9] || (c[9] = (e) => m.value.showTable = !1)
3715
+ }, {
3716
+ th: me(({ th: e }) => [
3717
+ p("div", { innerHTML: e }, null, 8, Li)
3718
+ ]),
3719
+ td: me(({ td: e }) => [
3720
+ to(te(isNaN(Number(e)) ? e : v(Pe)({
3721
+ p: l.value.chart.labels.prefix,
3722
+ v: e,
3723
+ s: l.value.chart.labels.suffix,
3724
+ r: l.value.table.rounding
3725
+ })), 1)
3726
+ ]),
3727
+ _: 1
3728
+ }, 8, ["colNames", "head", "body", "config", "title"]))
3729
+ ], 4)
3730
+ ]),
3731
+ _: 1
3732
+ }, 8, ["config"])) : f("", !0),
3733
+ v(tl) ? (u(), Ye(Ao, { key: 11 })) : f("", !0)
3734
+ ], 46, Jo));
3735
+ }
3736
+ }, Wi = /* @__PURE__ */ Sa(Mi, [["__scopeId", "data-v-32b4494b"]]);
3737
+ export {
3738
+ Wi as default
3739
+ };