vue-data-ui 3.0.0-next.7 → 3.0.0-next.70

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