vue-data-ui 3.0.15 → 3.0.17

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