vue-data-ui 3.0.0-next.6 → 3.0.0-next.60

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