vue-data-ui 3.1.9 → 3.1.11

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