vue-data-ui 3.19.6 → 3.19.7

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