vue-data-ui 3.0.3 → 3.0.5

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