vue-data-ui 3.19.7 → 3.19.9

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