vue-data-ui 3.0.0-next.35 → 3.0.0-next.37

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