vue-data-ui 3.19.2 → 3.19.3

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