vue-data-ui 3.25.7 → 3.25.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
  2. package/dist/{PackageVersion-UfoQuPMf.js → PackageVersion-KBMdaOXg.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-accordion.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-annotator.js +1 -1
  7. package/dist/components/vue-ui-bullet.js +1 -1
  8. package/dist/components/vue-ui-bump.js +1 -1
  9. package/dist/components/vue-ui-candlestick.js +1 -1
  10. package/dist/components/vue-ui-carousel-table.js +1 -1
  11. package/dist/components/vue-ui-chestnut.js +1 -1
  12. package/dist/components/vue-ui-chord.js +1 -1
  13. package/dist/components/vue-ui-circle-pack.js +1 -1
  14. package/dist/components/vue-ui-cursor.js +1 -1
  15. package/dist/components/vue-ui-dag.js +1 -1
  16. package/dist/components/vue-ui-dashboard.js +1 -1
  17. package/dist/components/vue-ui-digits.js +1 -1
  18. package/dist/components/vue-ui-donut-evolution.js +1 -1
  19. package/dist/components/vue-ui-donut.js +1 -1
  20. package/dist/components/vue-ui-dumbbell.js +1 -1
  21. package/dist/components/vue-ui-flow.js +1 -1
  22. package/dist/components/vue-ui-funnel.js +1 -1
  23. package/dist/components/vue-ui-galaxy.js +1 -1
  24. package/dist/components/vue-ui-gauge.js +1 -1
  25. package/dist/components/vue-ui-geo.js +1 -1
  26. package/dist/components/vue-ui-gizmo.js +1 -1
  27. package/dist/components/vue-ui-heatmap.js +1 -1
  28. package/dist/components/vue-ui-hill.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-label.js +1 -1
  33. package/dist/components/vue-ui-mini-loader.js +1 -1
  34. package/dist/components/vue-ui-molecule.js +1 -1
  35. package/dist/components/vue-ui-mood-radar.js +1 -1
  36. package/dist/components/vue-ui-nested-donuts.js +1 -1
  37. package/dist/components/vue-ui-onion.js +1 -1
  38. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  39. package/dist/components/vue-ui-quadrant.js +1 -1
  40. package/dist/components/vue-ui-quick-chart.js +1 -1
  41. package/dist/components/vue-ui-radar.js +1 -1
  42. package/dist/components/vue-ui-rating.js +1 -1
  43. package/dist/components/vue-ui-relation-circle.js +1 -1
  44. package/dist/components/vue-ui-ridgeline.js +1 -1
  45. package/dist/components/vue-ui-rings.js +1 -1
  46. package/dist/components/vue-ui-scatter.js +1 -1
  47. package/dist/components/vue-ui-skeleton.js +1 -1
  48. package/dist/components/vue-ui-smiley.js +1 -1
  49. package/dist/components/vue-ui-spark-trend.js +1 -1
  50. package/dist/components/vue-ui-sparkbar.js +1 -1
  51. package/dist/components/vue-ui-sparkgauge.js +1 -1
  52. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  53. package/dist/components/vue-ui-sparkline.js +1 -1
  54. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  55. package/dist/components/vue-ui-stackbar.js +1 -1
  56. package/dist/components/vue-ui-stackline.js +1 -1
  57. package/dist/components/vue-ui-strip-plot.js +1 -1
  58. package/dist/components/vue-ui-table-heatmap.js +1 -1
  59. package/dist/components/vue-ui-table-sparkline.js +1 -1
  60. package/dist/components/vue-ui-table.js +1 -1
  61. package/dist/components/vue-ui-thermometer.js +1 -1
  62. package/dist/components/vue-ui-timer.js +1 -1
  63. package/dist/components/vue-ui-tiremarks.js +1 -1
  64. package/dist/components/vue-ui-treemap.js +1 -1
  65. package/dist/components/vue-ui-vertical-bar.js +1 -1
  66. package/dist/components/vue-ui-waffle.js +1 -1
  67. package/dist/components/vue-ui-wheel.js +1 -1
  68. package/dist/components/vue-ui-word-cloud.js +1 -1
  69. package/dist/components/vue-ui-world.js +1 -1
  70. package/dist/components/vue-ui-xy-canvas.js +1 -1
  71. package/dist/components/vue-ui-xy.js +1 -1
  72. package/dist/{package-B-3S5q00.js → package-BL27Ev_h.js} +1 -1
  73. package/dist/{render-common-CAXK7ycr.js → render-common-By8J0AE-.js} +1 -1
  74. package/dist/ssr/vue-ui-donut.js +1 -1
  75. package/dist/ssr/vue-ui-xy.js +1 -1
  76. package/dist/ssr.js +2 -2
  77. package/dist/style.css +1 -1
  78. package/dist/types/vue-data-ui.d.ts +2 -0
  79. package/dist/{useConfig-CIQZ6_r7.js → useConfig-D32D002m.js} +2 -0
  80. package/dist/{useObjectBindings---mHNfbS.js → useObjectBindings-Cd_WuYIn.js} +1 -1
  81. package/dist/utils.js +1 -1
  82. package/dist/{vue-data-ui-DlWT702n.js → vue-data-ui-CBWuUAXT.js} +69 -69
  83. package/dist/vue-data-ui.js +70 -70
  84. package/dist/{vue-ui-3d-bar-DbOk2kpM.js → vue-ui-3d-bar-BSbq90H3.js} +3 -3
  85. package/dist/{vue-ui-accordion-BSmBUjwZ.js → vue-ui-accordion-DmkL8A59.js} +1 -1
  86. package/dist/{vue-ui-age-pyramid-C7_mGIRk.js → vue-ui-age-pyramid-CrXl71iC.js} +263 -251
  87. package/dist/{vue-ui-annotator-CTQHAPho.js → vue-ui-annotator-BO5ihHOB.js} +2 -2
  88. package/dist/{vue-ui-bullet-CDy_dkYz.js → vue-ui-bullet-B2Y3Wqh9.js} +3 -3
  89. package/dist/{vue-ui-bump-DP24leiD.js → vue-ui-bump-DXvvjG4I.js} +3 -3
  90. package/dist/{vue-ui-candlestick-kJLmYaR7.js → vue-ui-candlestick-CFqR6W56.js} +453 -441
  91. package/dist/{vue-ui-carousel-table-BQzAQDw6.js → vue-ui-carousel-table-D-ZkPRta.js} +2 -2
  92. package/dist/{vue-ui-chestnut-DnnRp3Kl.js → vue-ui-chestnut-CyW3IoYC.js} +3 -3
  93. package/dist/{vue-ui-chord-DO15ZDCS.js → vue-ui-chord-DS0jni9A.js} +3 -3
  94. package/dist/{vue-ui-circle-pack-DYTllMPV.js → vue-ui-circle-pack-j2ChgLWr.js} +494 -482
  95. package/dist/{vue-ui-cursor-CtViSjNp.js → vue-ui-cursor-qOONOtcv.js} +2 -2
  96. package/dist/{vue-ui-dag-NXtGYzqg.js → vue-ui-dag-CmeFsKhR.js} +3 -3
  97. package/dist/{vue-ui-dashboard-D3_4QohV.js → vue-ui-dashboard-C7Z5BTN4.js} +65 -65
  98. package/dist/{vue-ui-digits-CB09pLQx.js → vue-ui-digits-Bf68x6fb.js} +2 -2
  99. package/dist/{vue-ui-donut-yTE6D8yV.js → vue-ui-donut-CkBPJW_T.js} +837 -825
  100. package/dist/{vue-ui-donut-eysaEyTy.js → vue-ui-donut-DzDSYgVp.js} +2 -2
  101. package/dist/{vue-ui-donut-evolution-DhrtxvAd.js → vue-ui-donut-evolution-CDJumo0t.js} +3 -3
  102. package/dist/{vue-ui-dumbbell-CmGIeULQ.js → vue-ui-dumbbell-Cr__26dN.js} +3 -3
  103. package/dist/vue-ui-flow-Cz6WRi2c.js +1229 -0
  104. package/dist/{vue-ui-funnel-CLAii4wi.js → vue-ui-funnel-BlC7KxS6.js} +2 -2
  105. package/dist/vue-ui-galaxy-Bg2smlcI.js +1097 -0
  106. package/dist/{vue-ui-gauge-D76-4Z_0.js → vue-ui-gauge-BHsaent1.js} +3 -3
  107. package/dist/{vue-ui-geo-BQ7-UnuG.js → vue-ui-geo-CE3Cr0or.js} +407 -395
  108. package/dist/{vue-ui-gizmo-C47zjcs-.js → vue-ui-gizmo-DqFUBEai.js} +3 -3
  109. package/dist/{vue-ui-heatmap-XJef60IZ.js → vue-ui-heatmap-DXqj9ial.js} +478 -446
  110. package/dist/{vue-ui-hill-D5BYGPXB.js → vue-ui-hill-B3fPAfhL.js} +2 -2
  111. package/dist/vue-ui-history-plot-CrnTnpaM.js +1710 -0
  112. package/dist/{vue-ui-horizontal-bar-BgFHi6_7.js → vue-ui-horizontal-bar-DqvN3imH.js} +432 -420
  113. package/dist/{vue-ui-kpi-Cb8QJeaj.js → vue-ui-kpi-Mf318HvK.js} +2 -2
  114. package/dist/{vue-ui-label-ClMQ5Gez.js → vue-ui-label-C1UAzvAu.js} +1 -1
  115. package/dist/{vue-ui-mini-loader-DtPOVIkK.js → vue-ui-mini-loader-wGeACd-Y.js} +1 -1
  116. package/dist/{vue-ui-molecule-BzwMl-in.js → vue-ui-molecule-CaLReo4h.js} +346 -334
  117. package/dist/{vue-ui-mood-radar-BUR_YCcr.js → vue-ui-mood-radar-jkE2ENX5.js} +3 -3
  118. package/dist/{vue-ui-nested-donuts-BEB4nfsD.js → vue-ui-nested-donuts-BgMOKjil.js} +360 -348
  119. package/dist/vue-ui-onion-DBN3Ev4j.js +1247 -0
  120. package/dist/{vue-ui-parallel-coordinate-plot-CSO4johj.js → vue-ui-parallel-coordinate-plot-BcJzEGJ-.js} +387 -375
  121. package/dist/{vue-ui-quadrant-CKav0I6g.js → vue-ui-quadrant-BvoVlxTI.js} +418 -406
  122. package/dist/{vue-ui-quick-chart-BAQNS9_2.js → vue-ui-quick-chart-2hn8-F_C.js} +550 -538
  123. package/dist/{vue-ui-radar-ClPAgf5I.js → vue-ui-radar-O3AjGrc-.js} +330 -318
  124. package/dist/{vue-ui-rating-CWFMoYpE.js → vue-ui-rating-Criq0ofQ.js} +1 -1
  125. package/dist/{vue-ui-relation-circle-Da2MhrVe.js → vue-ui-relation-circle-CRnH2ikm.js} +3 -3
  126. package/dist/{vue-ui-ridgeline-D7gFs8yR.js → vue-ui-ridgeline-Blejn8LY.js} +3 -3
  127. package/dist/{vue-ui-rings-DkDJ0k5b.js → vue-ui-rings-C1U38Bp0.js} +321 -309
  128. package/dist/{vue-ui-scatter-yv4JzJID.js → vue-ui-scatter-DTsCc9hg.js} +584 -572
  129. package/dist/{vue-ui-skeleton-oFnh5zWs.js → vue-ui-skeleton-BPr3u7IL.js} +2 -2
  130. package/dist/{vue-ui-smiley-DJVusLnp.js → vue-ui-smiley-BIjAIpJ9.js} +1 -1
  131. package/dist/{vue-ui-spark-trend-IqZWPvSB.js → vue-ui-spark-trend-B7w4Mg8O.js} +3 -3
  132. package/dist/{vue-ui-sparkbar-_FW47iYj.js → vue-ui-sparkbar-lVDnYEYA.js} +3 -3
  133. package/dist/{vue-ui-sparkgauge--2vk2Y23.js → vue-ui-sparkgauge-BryoGCoc.js} +3 -3
  134. package/dist/{vue-ui-sparkhistogram-CFEIPa5n.js → vue-ui-sparkhistogram-BdNoLb9L.js} +3 -3
  135. package/dist/{vue-ui-sparkline-Cs9CJR6W.js → vue-ui-sparkline-CNFD5K6z.js} +3 -3
  136. package/dist/vue-ui-sparkstackbar-CZ4tGL-_.js +750 -0
  137. package/dist/vue-ui-stackbar-DfsgaZy7.js +2369 -0
  138. package/dist/vue-ui-stackline-Cx7q2sGF.js +2483 -0
  139. package/dist/vue-ui-strip-plot-BcYhLPHM.js +1752 -0
  140. package/dist/{vue-ui-table-CiccGbRB.js → vue-ui-table-BzF75YjN.js} +3 -3
  141. package/dist/{vue-ui-table-heatmap-DnP3pzh2.js → vue-ui-table-heatmap-BSUab4fG.js} +1 -1
  142. package/dist/{vue-ui-table-sparkline-Bp7RiZh4.js → vue-ui-table-sparkline-B9ICTtoE.js} +2 -2
  143. package/dist/{vue-ui-thermometer-CawumQKP.js → vue-ui-thermometer-Am7llqdI.js} +3 -3
  144. package/dist/{vue-ui-timer-CXinMW7q.js → vue-ui-timer-D6EvkM31.js} +2 -2
  145. package/dist/{vue-ui-tiremarks-BnI2uhki.js → vue-ui-tiremarks-DiQJu8Em.js} +3 -3
  146. package/dist/{vue-ui-treemap-DTlFbfD6.js → vue-ui-treemap-wUZpijpr.js} +310 -298
  147. package/dist/vue-ui-waffle-6hO0flDT.js +1633 -0
  148. package/dist/{vue-ui-wheel-B02tiG0p.js → vue-ui-wheel-DnyCE0CK.js} +3 -3
  149. package/dist/{vue-ui-word-cloud-BZnCOMHx.js → vue-ui-word-cloud-D_MZ3gCS.js} +385 -372
  150. package/dist/{vue-ui-world-DO2VZ-T-.js → vue-ui-world-QNGY2WPz.js} +474 -462
  151. package/dist/{vue-ui-xy-CD6BiP_g.js → vue-ui-xy-BD-ighya.js} +2 -2
  152. package/dist/{vue-ui-xy-BC9GVdWE.js → vue-ui-xy-Ctcwn7Rk.js} +1447 -1432
  153. package/dist/{vue-ui-xy-canvas-DANPuyf4.js → vue-ui-xy-canvas-DUeglcdP.js} +523 -511
  154. package/package.json +1 -1
  155. package/dist/vue-ui-flow-qYAq3Rmn.js +0 -1217
  156. package/dist/vue-ui-galaxy-BVX-o2f-.js +0 -1085
  157. package/dist/vue-ui-history-plot-D-d-1ZiM.js +0 -1698
  158. package/dist/vue-ui-onion-CG6myK7a.js +0 -1235
  159. package/dist/vue-ui-sparkstackbar-Cvbue77A.js +0 -738
  160. package/dist/vue-ui-stackbar-C5ANS2hd.js +0 -2355
  161. package/dist/vue-ui-stackline-7yajJFW4.js +0 -2469
  162. package/dist/vue-ui-strip-plot-BT6Eqhup.js +0 -1740
  163. package/dist/vue-ui-waffle-CjgRkQAp.js +0 -1621
@@ -1,1698 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, Ct as n, D as r, G as i, Ht as a, Jt as o, Lt as s, Pt as c, S as ee, St as te, T as ne, X as l, Xt as u, Y as re, Yt as ie, Zt as ae, _ as oe, ht as se, i as d, jt as ce, nt as le, q as ue, r as de, t as fe, w as pe } from "./lib-Dql7cqyA.js";
3
- import { n as me, t as he } from "./useHints-Dq_w2E8B.js";
4
- import { t as ge } from "./useConfig-CIQZ6_r7.js";
5
- import { t as _e } from "./usePrinter-DISD7q5m.js";
6
- import { n as ve, t as ye } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as be } from "./useNestedProp-Chvyfpl-.js";
8
- import { t as xe } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as Se } from "./useChartExport-iwOqiIWX.js";
10
- import { t as Ce } from "./useTransitions-g_zBREk2.js";
11
- import { t as we } from "./useTimeLabelCollider-AEcY4Ioe.js";
12
- import { t as Te } from "./img-DhGApYG0.js";
13
- import { n as Ee } from "./Title-CPHi-evi.js";
14
- import { t as De } from "./_plugin-vue_export-helper-B3ysoDQm.js";
15
- import { l as Oe, t as ke } from "./useResponsive-ZtArZtUf.js";
16
- import { t as Ae } from "./DefGrad-DVBqDjhO.js";
17
- import { t as je } from "./BaseLegendToggle-CXQrLjd-.js";
18
- import { t as Me } from "./A11yDataTable-DdRsVULz.js";
19
- import { t as Ne } from "./useUserOptionState-DK-_1ddE.js";
20
- import { t as Pe } from "./useChartAccessibility-DYqac8yF.js";
21
- import { t as Fe } from "./Legend-X4kF4PvW.js";
22
- import { t as Ie } from "./vue_ui_history_plot-CuN63VEc.js";
23
- import { Fragment as f, Teleport as Le, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as v, guardReactiveProps as y, mergeProps as Ve, nextTick as He, normalizeClass as b, normalizeProps as x, normalizeStyle as S, onBeforeUnmount as Ue, onMounted as We, openBlock as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as Ge, shallowRef as Ke, toDisplayString as D, toRefs as qe, unref as O, watch as Je, watchEffect as Ye, withCtx as k } from "vue";
24
- //#region src/components/vue-ui-history-plot.vue
25
- var Xe = /* @__PURE__ */ e({ default: () => Ft }), Ze = ["id"], Qe = ["id"], $e = ["id"], et = { style: { position: "relative" } }, tt = [
26
- "xmlns",
27
- "viewBox",
28
- "aria-describedby"
29
- ], nt = [
30
- "x",
31
- "y",
32
- "width",
33
- "height"
34
- ], rt = { key: 1 }, it = [
35
- "id",
36
- "x1",
37
- "y1",
38
- "x2",
39
- "y2"
40
- ], at = ["stop-color", "offset"], ot = { key: 2 }, st = [
41
- "x1",
42
- "x2",
43
- "y1",
44
- "y2",
45
- "stroke",
46
- "stroke-width"
47
- ], ct = { key: 3 }, lt = [
48
- "stroke",
49
- "stroke-width",
50
- "x1",
51
- "x2",
52
- "y1",
53
- "y2"
54
- ], ut = [
55
- "x",
56
- "y",
57
- "fill",
58
- "font-size"
59
- ], dt = [
60
- "transform",
61
- "font-size",
62
- "fill",
63
- "font-weight"
64
- ], ft = { key: 6 }, pt = [
65
- "x1",
66
- "x2",
67
- "y1",
68
- "y2",
69
- "stroke",
70
- "stroke-width"
71
- ], mt = { key: 7 }, ht = [
72
- "stroke",
73
- "stroke-width",
74
- "x1",
75
- "x2",
76
- "y1",
77
- "y2"
78
- ], gt = [
79
- "transform",
80
- "fill",
81
- "font-size",
82
- "text-anchor"
83
- ], _t = [
84
- "x",
85
- "y",
86
- "font-size",
87
- "fill",
88
- "font-weight"
89
- ], vt = [
90
- "x1",
91
- "x2",
92
- "y1",
93
- "y2",
94
- "stroke",
95
- "stroke-width"
96
- ], yt = [
97
- "x1",
98
- "x2",
99
- "y1",
100
- "y2",
101
- "stroke",
102
- "stroke-width"
103
- ], bt = [
104
- "d",
105
- "stroke",
106
- "stroke-width"
107
- ], xt = [
108
- "d",
109
- "stroke",
110
- "stroke-width"
111
- ], St = [
112
- "cx",
113
- "cy",
114
- "fill",
115
- "r"
116
- ], Ct = [
117
- "cx",
118
- "cy",
119
- "fill",
120
- "r",
121
- "stroke",
122
- "stroke-width"
123
- ], wt = { key: 1 }, Tt = [
124
- "transform",
125
- "font-size",
126
- "fill",
127
- "font-weight"
128
- ], Et = [
129
- "transform",
130
- "font-size",
131
- "fill",
132
- "font-weight",
133
- "innerHTML"
134
- ], Dt = { key: 2 }, Ot = [
135
- "transform",
136
- "font-size",
137
- "font-weight",
138
- "fill"
139
- ], kt = [
140
- "cx",
141
- "cy",
142
- "r",
143
- "onMouseenter",
144
- "onMouseleave",
145
- "onClick"
146
- ], At = {
147
- key: 0,
148
- style: {
149
- position: "absolute",
150
- top: "100%",
151
- left: "0",
152
- width: "100%"
153
- },
154
- "data-dom-to-png-ignore": "",
155
- "aria-hidden": "true"
156
- }, jt = {
157
- key: 5,
158
- class: "vue-data-ui-watermark"
159
- }, Mt = ["id"], Nt = ["onClick"], Pt = { style: {
160
- display: "flex",
161
- "align-items": "center"
162
- } }, Ft = /*#__PURE__*/ De({
163
- __name: "vue-ui-history-plot",
164
- props: {
165
- config: {
166
- type: Object,
167
- default() {
168
- return {};
169
- }
170
- },
171
- dataset: {
172
- type: Array,
173
- default() {
174
- return [];
175
- }
176
- }
177
- },
178
- emits: [
179
- "selectLegend",
180
- "selectDatapoint",
181
- "copyAlt"
182
- ],
183
- setup(e, { expose: De, emit: Xe }) {
184
- let Ft = v(() => import("./Tooltip-hhrkQ3Lk.js")), It = v(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), Lt = v(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), Rt = v(() => import("./DataTable-oiM9uWrQ.js")), zt = v(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Bt = v(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Vt = v(() => import("./PackageVersion-UfoQuPMf.js").then((e) => e.t)), Ht = v(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_history_plot: Ut } = ge(), { isThemeValid: Wt, warnInvalidTheme: Gt } = xe(), A = e, j = w(null), Kt = w(null), qt = w(0), Jt = w(null), Yt = w(0), Xt = w(0), Zt = w(0), M = Ke(null), N = Ke(null), Qt = w(null), P = w(ue()), $t = w(!1), en = w(""), F = w([]), tn = w(!1), nn = w(null), rn = w(!1), an = w(null), on = w(!1), sn = w(null), cn = w(null), ln = w(null), un = w(null), dn = w(null), fn = w(null), I = w(null), L = w(null), pn = w({
185
- x: 0,
186
- y: 0
187
- }), mn = w("pointer"), hn = w(!1), gn = p({
188
- get: () => !!A.dataset && A.dataset.length,
189
- set: (e) => e
190
- }), _n = Xe;
191
- We(() => {
192
- on.value = !0, yn();
193
- });
194
- let vn = p(() => R.value.debug);
195
- function yn() {
196
- if (c(A.dataset) ? (le({
197
- componentName: "VueUiHistoryPlot",
198
- type: "dataset",
199
- debug: vn.value
200
- }), wn.value = !0) : A.dataset.forEach((e, t) => {
201
- se({
202
- datasetObject: e,
203
- requiredAttributes: ["name", "values"]
204
- }).forEach((e) => {
205
- gn.value = !1, le({
206
- componentName: "VueUiHistoryPlot",
207
- type: "datasetSerieAttribute",
208
- property: e,
209
- index: t,
210
- debug: vn.value
211
- });
212
- });
213
- }), c(A.dataset) || (wn.value = R.value.loading), R.value.responsive) {
214
- let e = Oe(() => {
215
- let { width: e, height: t } = ke({
216
- chart: j.value,
217
- title: H.value.title.text ? Kt.value : null,
218
- noTitle: Qt.value,
219
- legend: H.value.legend.show ? Jt.value : null,
220
- source: an.value
221
- });
222
- requestAnimationFrame(() => {
223
- q.value.width = e, q.value.height = t, R.value.responsiveProportionalSizing ? (Y.value.plots = u({
224
- relator: Math.min(e, t),
225
- adjuster: 600,
226
- source: z.value.radius,
227
- threshold: 3,
228
- fallback: 3
229
- }), Y.value.indexLabels = u({
230
- relator: Math.min(e, t),
231
- adjuster: 600,
232
- source: z.value.indexLabels.fontSize,
233
- threshold: 6,
234
- fallback: 6
235
- }), Y.value.labels = u({
236
- relator: Math.min(e, t),
237
- adjuster: 600,
238
- source: z.value.labels.fontSize,
239
- threshold: 6,
240
- fallback: 6
241
- }), Y.value.xAxisLabels = u({
242
- relator: Math.min(e, t),
243
- adjuster: 600,
244
- source: V.value.x.labels.fontSize,
245
- threshold: 6,
246
- fallback: 6
247
- }), Y.value.xAxisName = u({
248
- relator: Math.min(e, t),
249
- adjuster: 600,
250
- source: V.value.x.name.fontSize,
251
- threshold: 6,
252
- fallback: 6
253
- }), Y.value.yAxisLabels = u({
254
- relator: Math.min(e, t),
255
- adjuster: 600,
256
- source: V.value.y.labels.fontSize,
257
- threshold: 6,
258
- fallback: 6
259
- }), Y.value.yAxisName = u({
260
- relator: Math.min(e, t),
261
- adjuster: 600,
262
- source: V.value.y.name.fontSize,
263
- threshold: 6,
264
- fallback: 6
265
- })) : (Y.value.plots = z.value.radius, Y.value.indexLabels = z.value.indexLabels.fontSize, Y.value.labels = z.value.labels.fontSize, Y.value.xAxisLabels = V.value.x.labels.fontSize, Y.value.xAxisName = V.value.x.name.fontSize, Y.value.yAxisLabels = V.value.y.labels.fontSize, Y.value.yAxisName = V.value.y.name.fontSize);
266
- });
267
- });
268
- M.value && (N.value && M.value.unobserve(N.value), M.value.disconnect()), M.value = new ResizeObserver(e), N.value = j.value.parentNode, M.value.observe(N.value);
269
- }
270
- }
271
- Ue(() => {
272
- M.value && (N.value && M.value.unobserve(N.value), M.value.disconnect());
273
- });
274
- function bn() {
275
- let e = be({
276
- userConfig: A.config,
277
- defaultConfig: Ut
278
- }), t = {}, n = e.theme;
279
- if (n) {
280
- if (!Wt.value(e)) Gt(e), t = e;
281
- else {
282
- let r = be({
283
- userConfig: Ie[n] || A.config,
284
- defaultConfig: e
285
- });
286
- t = {
287
- ...be({
288
- userConfig: A.config,
289
- defaultConfig: r
290
- }),
291
- customPalette: e.customPalette.length ? e.customPalette : ie[n] || s
292
- };
293
- }
294
- } else t = e;
295
- return t;
296
- }
297
- let R = w(bn()), z = p(() => R.value.style.chart.plots), B = p(() => R.value.style.chart.grid), V = p(() => R.value.style.chart.axes), H = p(() => R.value.style.chart);
298
- me({
299
- config: () => R.value,
300
- dataset: () => A.dataset,
301
- component: "VueUiHistoryPlot",
302
- rules: [he.emptyArray, {
303
- test: (e) => e.length > 6,
304
- message: [
305
- "👀 The number of series is > 6. Consider:",
306
- "",
307
- "▶️ Using filters to let users choose a maximum number of series to display."
308
- ]
309
- }]
310
- });
311
- let { transitionEnabled: U } = Ce({
312
- config: () => R.value.transitions,
313
- dataset: () => A.dataset
314
- }), W = p(() => R.value.userOptions.useCursorPointer), xn = p(() => ae({
315
- defaultConfig: {
316
- userOptions: { show: !1 },
317
- table: { show: !1 },
318
- style: { chart: {
319
- backgroundColor: "#99999930",
320
- axes: {
321
- x: {
322
- scaleMin: 0,
323
- scaleMax: 10,
324
- labels: { show: !1 },
325
- name: { text: "" }
326
- },
327
- y: {
328
- scaleMin: 0,
329
- scaleMax: 10,
330
- labels: { show: !1 },
331
- name: { text: "" }
332
- }
333
- },
334
- grid: {
335
- xAxis: { stroke: "#6A6A6A" },
336
- horizontalLines: { stroke: "#6A6A6A50" },
337
- yAxis: { stroke: "#6A6A6A" },
338
- verticalLines: { stroke: "#6A6A6A50" }
339
- },
340
- legend: { backgroundColor: "transparent" },
341
- paths: {
342
- useSerieColor: !1,
343
- stroke: "#6A6A6A"
344
- },
345
- plots: {
346
- stroke: "#6A6A6A",
347
- indexLabels: { show: !1 },
348
- labels: { show: !1 }
349
- }
350
- } }
351
- },
352
- userConfig: R.value.skeletonConfig ?? {}
353
- })), { loading: Sn, FINAL_DATASET: Cn, manualLoading: wn } = ve({
354
- ...qe(A),
355
- FINAL_CONFIG: R,
356
- prepareConfig: bn,
357
- skeletonDataset: A.config?.skeletonDataset ?? [{
358
- name: "",
359
- color: "#CACACA",
360
- values: [
361
- {
362
- label: "",
363
- x: 1,
364
- y: 9
365
- },
366
- {
367
- label: "",
368
- x: 4,
369
- y: 1
370
- },
371
- {
372
- label: "",
373
- x: 7,
374
- y: 9
375
- },
376
- {
377
- label: "",
378
- x: 9,
379
- y: 4
380
- }
381
- ]
382
- }],
383
- skeletonConfig: ae({
384
- defaultConfig: R.value,
385
- userConfig: xn.value
386
- })
387
- }), { userOptionsVisible: Tn, setUserOptionsVisibility: En, keepUserOptionState: Dn } = Ne({ config: R.value }), { svgRef: G } = Pe({ config: H.value.title });
388
- Je(() => A.config, (e) => {
389
- Sn.value || (R.value = bn()), Tn.value = !R.value.userOptions.showOnChartHover, yn(), qt.value += 1, Xt.value += 1, Yt.value += 1, q.value.height = H.value.height, q.value.width = H.value.width, Y.value.plots = z.value.radius, Y.value.indexLabels = z.value.indexLabels.fontSize, Y.value.labels = z.value.labels.fontSize, Y.value.xAxisLabels = V.value.x.labels.fontSize, Y.value.xAxisName = V.value.x.name.fontSize, Y.value.yAxisLabels = V.value.y.labels.fontSize, Y.value.yAxisName = V.value.y.name.fontSize, K.value.showTable = R.value.table.show, K.value.showTooltip = H.value.tooltip.show;
390
- }, { deep: !0 }), Je(() => A.dataset, (e) => {
391
- Array.isArray(e) && e.length > 0 && (wn.value = !1);
392
- }, { deep: !0 });
393
- let { isPrinting: On, isImaging: kn, generatePdf: An, generateImage: jn } = _e({
394
- elementId: `history_plot_${P.value}`,
395
- fileName: H.value.title.text || "vue-ui-history-plot",
396
- options: R.value.userOptions.print
397
- }), Mn = p(() => R.value.userOptions.show && !H.value.title.text), Nn = p(() => pe(R.value.customPalette)), K = w({
398
- showTable: R.value.table.show,
399
- showTooltip: H.value.tooltip.show
400
- });
401
- Je(R, () => {
402
- K.value = {
403
- showTable: R.value.table.show,
404
- showTooltip: H.value.tooltip.show
405
- };
406
- }, { immediate: !0 });
407
- let q = w({
408
- height: H.value.height,
409
- width: H.value.width
410
- }), Pn = p(() => q.value.width), Fn = p(() => q.value.height);
411
- function In() {
412
- let e = 0;
413
- fn.value && (e = Array.from(fn.value.querySelectorAll("text")).reduce((e, t) => {
414
- let n = t.getComputedTextLength();
415
- return n > e ? n : e;
416
- }, 0));
417
- let t = un.value ? un.value.getBoundingClientRect().width : 0;
418
- return e + t + (t ? 24 : 0);
419
- }
420
- let Ln = w(0), Rn = Oe((e) => {
421
- Ln.value = e;
422
- });
423
- Ye((e) => {
424
- let t = dn.value;
425
- if (!t) return;
426
- let n = new ResizeObserver((e) => {
427
- Rn(e[0].contentRect.height);
428
- });
429
- n.observe(t), e(() => n.disconnect());
430
- });
431
- let zn = p(() => {
432
- let e = 0;
433
- ln.value && (e = ln.value.getBBox().height + Y.value.xAxisName / 2);
434
- let t = 0;
435
- return dn.value && (t = Ln.value), e + t;
436
- }), J = p(() => {
437
- let e = H.value.padding.left, t = H.value.padding.top, n = In(), r = z.value.radius;
438
- return {
439
- left: e + n + V.value.y.name.offsetX,
440
- top: t + r,
441
- right: q.value.width - H.value.padding.right - r - V.value.y.name.offsetX,
442
- bottom: q.value.height - H.value.padding.bottom - zn.value - r - V.value.x.name.offsetY,
443
- width: q.value.width - e - H.value.padding.right - n - r - V.value.y.name.offsetX,
444
- height: q.value.height - t - H.value.padding.bottom - zn.value - r * 2 - V.value.x.name.offsetY
445
- };
446
- }), Y = w({
447
- plots: z.value.radius,
448
- indexLabels: z.value.indexLabels.fontSize,
449
- labels: z.value.labels.fontSize,
450
- xAxisLabels: V.value.x.labels.fontSize,
451
- xAxisName: V.value.x.name.fontSize,
452
- yAxisLabels: V.value.y.labels.fontSize,
453
- yAxisName: V.value.y.name.fontSize
454
- }), X = p(() => Cn.value.map((e, t) => {
455
- let n = Array.isArray(e.temperatureColors) && e.temperatureColors.length ? e.temperatureColors.map((e) => ee(e)) : void 0;
456
- return {
457
- ...e,
458
- color: e.color ? ee(e.color) : Nn.value[t] || s[t] || s[t % s.length],
459
- temperatureColors: n,
460
- temperatureAngle: Bn(e.temperatureAngle),
461
- temperatureIndependant: e.temperatureIndependant === !0,
462
- usePlotTemperatureColors: e.usePlotTemperatureColors !== !1,
463
- seriesIndex: t
464
- };
465
- }));
466
- function Bn(e = 0) {
467
- let t = Number(e);
468
- return Number.isFinite(t) ? (t % 360 + 360) % 360 : 0;
469
- }
470
- let Vn = p(() => Math.max(...X.value.filter((e) => !F.value.includes(e.seriesIndex)).flatMap((e) => e.values.map((e) => e.x)))), Hn = p(() => {
471
- let e = Math.min(...X.value.filter((e) => !F.value.includes(e.seriesIndex)).flatMap((e) => e.values.map((e) => e.x)));
472
- return e < 0 ? e : 0;
473
- }), Un = p(() => Math.max(...X.value.filter((e) => !F.value.includes(e.seriesIndex)).flatMap((e) => e.values.map((e) => e.y)))), Wn = p(() => {
474
- let e = Math.min(...X.value.filter((e) => !F.value.includes(e.seriesIndex)).flatMap((e) => e.values.map((e) => e.y)));
475
- return e < 0 ? e : 0;
476
- }), Z = p(() => {
477
- let e = oe(V.value.x.scaleMin ?? Hn.value, V.value.x.scaleMax ?? Vn.value, V.value.x.ticks), t = oe(V.value.y.scaleMin ?? Wn.value, V.value.y.scaleMax ?? Un.value, V.value.y.ticks);
478
- return {
479
- x: e,
480
- y: t,
481
- tickX: e.ticks.map((t) => ({
482
- x: J.value.left + (t - e.min) / (e.max - e.min) * J.value.width,
483
- y1: J.value.top,
484
- y2: J.value.bottom,
485
- value: t
486
- })),
487
- tickY: t.ticks.map((e) => ({
488
- y: J.value.bottom - (e - t.min) / (t.max - t.min) * J.value.height,
489
- x1: J.value.left,
490
- x2: J.value.right,
491
- value: e
492
- }))
493
- };
494
- });
495
- function Gn(e) {
496
- let t = Z.value.x.min < 0 ? Math.abs(Z.value.x.min) : Z.value.x.min > 0 ? -Z.value.x.min : 0;
497
- return J.value.left + ((e || 0) + t) / (Z.value.x.max + t) * J.value.width;
498
- }
499
- function Kn(e) {
500
- let t = Z.value.y.min < 0 ? Math.abs(Z.value.y.min) : Z.value.y.min > 0 ? -Z.value.y.min : 0;
501
- return J.value.bottom - ((e || 0) + t) / (Z.value.y.max + t) * J.value.height;
502
- }
503
- let Q = p(() => X.value.filter((e) => !F.value.includes(e.seriesIndex)).map((e, t) => {
504
- let n = e.values.map((t, n) => ({
505
- valueX: t.x,
506
- valueY: t.y,
507
- label: t.label,
508
- x: Gn(t.x),
509
- y: Kn(t.y),
510
- color: e.color,
511
- seriesName: e.name,
512
- id: ue()
513
- })), r = e.smooth ? ne(n) : n.map((e) => `${e.x},${e.y} `).join("").trim();
514
- return {
515
- ...e,
516
- gradientIndex: t,
517
- plots: n,
518
- path: `M${r}`
519
- };
520
- })), qn = p(() => {
521
- if (nn.value === null || I.value === null) return Q.value;
522
- let e = Q.value.findIndex((e) => e.seriesIndex === I.value);
523
- if (e === -1) return Q.value;
524
- let t = Q.value[e];
525
- return [
526
- ...Q.value.slice(0, e),
527
- ...Q.value.slice(e + 1),
528
- t
529
- ];
530
- }), Jn = p(() => Q.value.some((e) => Yn(e)));
531
- function Yn(e) {
532
- return Array.isArray(e?.temperatureColors) && e.temperatureColors.length;
533
- }
534
- function Xn(e) {
535
- return Yn(e) && e.usePlotTemperatureColors;
536
- }
537
- function Zn(e) {
538
- let t = Array.isArray(e?.plots) ? e.plots : [];
539
- if (!t.length) return {
540
- minX: 0,
541
- maxX: 0,
542
- minY: 0,
543
- maxY: 0,
544
- width: 0,
545
- height: 0
546
- };
547
- let n = t.map((e) => e.x), r = t.map((e) => e.y), i = Math.min(...n), a = Math.max(...n), o = Math.min(...r), s = Math.max(...r);
548
- return {
549
- minX: i,
550
- maxX: a,
551
- minY: o,
552
- maxY: s,
553
- width: a - i,
554
- height: s - o
555
- };
556
- }
557
- function Qn() {
558
- let e = J.value;
559
- return {
560
- minX: e.left,
561
- maxX: e.right,
562
- minY: e.top,
563
- maxY: e.bottom,
564
- width: e.width,
565
- height: e.height
566
- };
567
- }
568
- function $n(e) {
569
- return e?.temperatureIndependant ? Zn(e) : Qn();
570
- }
571
- function er(e) {
572
- let t = Bn(e?.temperatureAngle) * Math.PI / 180, n = Math.sin(t), r = Math.cos(t), i = $n(e), a = i.minX + i.width / 2, o = i.minY + i.height / 2, s = (Math.abs(n) * i.width + Math.abs(r) * i.height) / 2 || 1;
573
- return {
574
- x1: a - n * s,
575
- y1: o - r * s,
576
- x2: a + n * s,
577
- y2: o + r * s
578
- };
579
- }
580
- function tr(e, t) {
581
- let { x1: n, y1: r, x2: i, y2: a } = er(e), o = i - n, s = a - r, c = o * o + s * s;
582
- if (!c) return 0;
583
- let ee = ((t.x - n) * o + (t.y - r) * s) / c;
584
- return Math.min(1, Math.max(0, ee));
585
- }
586
- function $(e, t) {
587
- return te({
588
- colors: e.temperatureColors,
589
- ratio: tr(e, t)
590
- });
591
- }
592
- function nr(e, t) {
593
- return `temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${P.value}`;
594
- }
595
- function rr(e, t, n) {
596
- return Xn(e) ? z.value.gradient.show ? `url(#${nr(e, t)})` : $(e, t) : z.value.gradient.show ? `url(#gradient_${n}_${P.value})` : t.color;
597
- }
598
- function ir(e, t) {
599
- return Xn(e) ? $(e, t) : e.color;
600
- }
601
- function ar(e, t) {
602
- return z.value.indexLabels.adaptColorToBackground ? de(ir(e, t)) : z.value.indexLabels.color;
603
- }
604
- function or(e, t) {
605
- let n = Q.value.find((t) => t.seriesIndex === e);
606
- return n && Xn(n) ? $(n, t) : t.color;
607
- }
608
- function sr(e) {
609
- return Yn(e) ? `url(#temperature_grad_history_${e.seriesIndex}_${P.value})` : H.value.paths.useSerieColor ? e.color : H.value.paths.stroke;
610
- }
611
- function cr(e) {
612
- return nn.value === null || I.value === e ? 1 : Math.min(1, z.value.unselectedOpacity);
613
- }
614
- p(() => nn.value !== null && I.value !== null);
615
- let lr = w(!1);
616
- function ur() {
617
- F.value.length ? F.value = [] : hr.value.forEach((e) => {
618
- F.value.push(e.seriesIndex);
619
- }), _n("selectLegend", Q.value);
620
- }
621
- function dr(e) {
622
- F.value.includes(e) ? F.value = F.value.filter((t) => t !== e) : F.value.push(e), _n("selectLegend", Q.value);
623
- }
624
- function fr(e) {
625
- return X.value.length ? X.value.find((t) => t.name === e) || (vn.value && console.warn(`VueUiHistoryPlot - Series name not found "${e}"`), null) : (vn.value && console.warn("VueUiHistoryPlot - There are no series to show."), null);
626
- }
627
- function pr(e) {
628
- let t = fr(e);
629
- t !== null && F.value.includes(t.seriesIndex) && dr(t.seriesIndex);
630
- }
631
- function mr(e) {
632
- let t = fr(e);
633
- t !== null && (F.value.includes(t.seriesIndex) || dr(t.seriesIndex));
634
- }
635
- let hr = p(() => X.value.map((e) => {
636
- let t = Yn(e) ? e.temperatureColors : null;
637
- return {
638
- ...e,
639
- gradientColors: t,
640
- opacity: F.value.includes(e.seriesIndex) ? .5 : 1,
641
- segregate: () => dr(e.seriesIndex),
642
- isSegregated: F.value.includes(e.seriesIndex),
643
- shape: t ? "gradient" : "circle"
644
- };
645
- })), gr = p(() => ({
646
- cy: "history-plot-div-legend",
647
- backgroundColor: H.value.legend.backgroundColor,
648
- color: H.value.legend.color,
649
- fontSize: H.value.legend.fontSize,
650
- paddingBottom: 12,
651
- fontWeight: H.value.legend.bold ? "bold" : ""
652
- }));
653
- function _r({ datapoint: e, plotIndex: t, seriesIndex: n }) {
654
- R.value.events.datapointClick && R.value.events.datapointClick({
655
- datapoint: {
656
- ...e,
657
- plotIndex: t,
658
- seriesIndex: n
659
- },
660
- seriesIndex: n
661
- }), _n("selectDatapoint", e);
662
- }
663
- function vr(e) {
664
- tn.value = e, Zt.value += 1;
665
- }
666
- let yr = w(null);
667
- function br({ datapoint: e, plotIndex: t, seriesIndex: n }) {
668
- R.value.events.datapointLeave && R.value.events.datapointLeave({
669
- datapoint: {
670
- ...e,
671
- plotIndex: t,
672
- seriesIndex: n
673
- },
674
- seriesIndex: n
675
- }), (mn.value !== "keyboard" || I.value !== n || L.value !== t) && ($t.value = !1, nn.value = null);
676
- }
677
- function xr(e, t) {
678
- if (!G.value) return;
679
- let n = Q.value.find((t) => t.seriesIndex === e);
680
- if (!n) return;
681
- let r = n.plots[t];
682
- if (!r) return;
683
- let i = o(r.x, r.y, G.value);
684
- i && (pn.value = i);
685
- }
686
- function Sr({ datapoint: e, plotIndex: t, seriesIndex: r, triggerMode: i = "pointer" }) {
687
- R.value.events.datapointEnter && R.value.events.datapointEnter({
688
- datapoint: {
689
- ...e,
690
- plotIndex: t,
691
- seriesIndex: r
692
- },
693
- seriesIndex: r
694
- }), I.value = r, L.value = t, mn.value = i, lr.value = !0;
695
- let a = or(r, e), o = {
696
- ...e,
697
- color: a
698
- };
699
- yr.value = {
700
- datapoint: o,
701
- color: a,
702
- seriesIndex: r,
703
- plotIndex: t,
704
- config: R.value,
705
- series: X.value
706
- }, nn.value = e;
707
- let s = H.value.tooltip.customFormat;
708
- if (rn.value = !1, n(s)) try {
709
- let e = s({
710
- seriesIndex: r,
711
- datapoint: o,
712
- color: a,
713
- plotIndex: t,
714
- series: X.value,
715
- config: R.value
716
- });
717
- typeof e == "string" && (en.value = e, rn.value = !0);
718
- } catch {
719
- console.warn("Custom format cannot be applied."), rn.value = !1;
720
- }
721
- if (!rn.value) {
722
- let t = "";
723
- t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${H.value.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a}"/></svg><span>${e.seriesName}</span></div>`, t += `<div>${e.label}</div>`, t += `<div>${V.value.x.name.text || "x"}: ${d(V.value.x.labels.formatter, e.valueX, l({
724
- p: V.value.x.labels.prefix,
725
- v: e.valueX,
726
- s: V.value.x.labels.suffix,
727
- r: V.value.x.labels.rounding
728
- }))}</div>`, t += `<div>${V.value.y.name.text || "y"}: ${d(V.value.y.labels.formatter, e.valueY, l({
729
- p: V.value.y.labels.prefix,
730
- v: e.valueY,
731
- s: V.value.y.labels.suffix,
732
- r: V.value.y.labels.rounding
733
- }))}</div>`, en.value = `<div>${t}</div>`;
734
- }
735
- $t.value = !0, i === "keyboard" && He(() => {
736
- xr(r, t);
737
- });
738
- }
739
- p(() => ({ head: Q.value.map((e) => ({
740
- name: e.name,
741
- color: e.color
742
- })) }));
743
- let Cr = p(() => {
744
- let e = [
745
- R.value.table.columnNames.series,
746
- R.value.table.columnNames.datapoint,
747
- R.value.table.columnNames.x,
748
- R.value.table.columnNames.y
749
- ];
750
- return {
751
- head: e,
752
- body: Q.value.flatMap((e) => e.plots.map((e) => [
753
- {
754
- color: e.color,
755
- name: e.seriesName
756
- },
757
- e.label,
758
- d(V.value.x.labels.formatter, e.valueX, l({
759
- p: V.value.x.labels.prefix,
760
- v: e.valueX,
761
- s: V.value.x.labels.suffix,
762
- r: V.value.x.labels.rounding
763
- })),
764
- d(V.value.y.labels.formatter, e.valueY, l({
765
- p: V.value.y.labels.prefix,
766
- v: e.valueY,
767
- s: V.value.y.labels.suffix,
768
- r: V.value.y.labels.rounding
769
- }))
770
- ])),
771
- config: {
772
- th: {
773
- backgroundColor: R.value.table.th.backgroundColor,
774
- color: R.value.table.th.color,
775
- outline: R.value.table.th.outline
776
- },
777
- td: {
778
- backgroundColor: R.value.table.td.backgroundColor,
779
- color: R.value.table.td.color,
780
- outline: R.value.table.td.outline
781
- },
782
- breakpoint: R.value.table.responsiveBreakpoint
783
- },
784
- colNames: e
785
- };
786
- });
787
- function wr(e = null) {
788
- He(() => {
789
- let n = [
790
- [R.value.table.columnNames.series],
791
- [R.value.table.columnNames.datapoint],
792
- [R.value.table.columnNames.x],
793
- [R.value.table.columnNames.y]
794
- ], i = Q.value.flatMap((e) => e.plots.map((e) => [
795
- [e.seriesName],
796
- [e.label],
797
- [e.valueX],
798
- [e.valueY]
799
- ])), a = [
800
- [H.value.title.text],
801
- [H.value.title.subtitle.text],
802
- n
803
- ].concat(i), o = r(a);
804
- e ? e(o) : t({
805
- csvContent: o,
806
- title: H.value.title.text || "vue-ui-history-plot"
807
- });
808
- });
809
- }
810
- let Tr = w(!1);
811
- function Er() {
812
- Tr.value = !Tr.value;
813
- }
814
- function Dr() {
815
- K.value.showTable = !K.value.showTable;
816
- }
817
- function Or() {
818
- K.value.showTooltip = !K.value.showTooltip;
819
- }
820
- function kr() {
821
- return Q.value;
822
- }
823
- async function Ar({ scale: e = 2 } = {}) {
824
- if (!j.value) return;
825
- let { width: t, height: n } = j.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Te({
826
- domElement: j.value,
827
- base64: !0,
828
- img: !0,
829
- scale: e
830
- });
831
- return {
832
- imageUri: i,
833
- base64: a,
834
- title: H.value.title.text,
835
- width: t,
836
- height: n,
837
- aspectRatio: r
838
- };
839
- }
840
- let jr = p(() => Z.value.tickX), Mr = p(() => ({
841
- start: 0,
842
- end: Z.value.tickX.length
843
- }));
844
- we({
845
- timeLabelsEls: dn,
846
- timeLabels: jr,
847
- slicer: Mr,
848
- configRef: R,
849
- rotationPath: [
850
- "style",
851
- "chart",
852
- "axes",
853
- "x",
854
- "labels",
855
- "rotation"
856
- ],
857
- autoRotatePath: [
858
- "style",
859
- "chart",
860
- "axes",
861
- "x",
862
- "labels",
863
- "autoRotate",
864
- "enable"
865
- ],
866
- isAutoSize: !1,
867
- width: Pn,
868
- height: Fn,
869
- targetClass: ".vue-ui-history-plot-x-axis-scale",
870
- rotation: V.value.x.labels.autoRotate.angle
871
- });
872
- let Nr = p(() => {
873
- let e = R.value.table.useDialog && !R.value.table.show, t = K.value.showTable;
874
- return {
875
- component: e ? Ht : Lt,
876
- title: `${H.value.title.text}${H.value.title.subtitle.text ? `: ${H.value.title.subtitle.text}` : ""}`,
877
- props: e ? {
878
- backgroundColor: R.value.table.th.backgroundColor,
879
- color: R.value.table.th.color,
880
- headerColor: R.value.table.th.color,
881
- headerBg: R.value.table.th.backgroundColor,
882
- isFullscreen: tn.value,
883
- fullscreenParent: j.value,
884
- forcedWidth: Math.min(800, window.innerWidth * .8)
885
- } : {
886
- hideDetails: !0,
887
- config: {
888
- open: t,
889
- maxHeight: 1e4,
890
- body: {
891
- backgroundColor: H.value.backgroundColor,
892
- color: H.value.color
893
- },
894
- head: {
895
- backgroundColor: H.value.backgroundColor,
896
- color: H.value.color
897
- }
898
- }
899
- }
900
- };
901
- });
902
- Je(() => K.value.showTable, (e) => {
903
- R.value.table.show || (e && R.value.table.useDialog && sn.value ? sn.value.open() : "close" in sn.value && sn.value.close());
904
- });
905
- function Pr() {
906
- K.value.showTable = !1, cn.value && cn.value.setTableIconState(!1);
907
- }
908
- let Fr = p(() => H.value.backgroundColor), Ir = p(() => H.value.legend), Lr = p(() => H.value.title), { isCallbackImaging: Rr, isCallbackSvg: zr, generateSvg: Br, onGenerateImage: Vr } = Se({
909
- svg: G,
910
- title: Lr,
911
- legend: Ir,
912
- legendItems: hr,
913
- backgroundColor: Fr,
914
- getSvgCallback: () => R.value.userOptions.callbacks.svg,
915
- generateImage: jn
916
- });
917
- async function Hr() {
918
- if (_n("copyAlt", {
919
- config: R.value,
920
- dataset: Q.value
921
- }), !R.value.userOptions.callbacks.altCopy) {
922
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
923
- return;
924
- }
925
- await Promise.resolve(R.value.userOptions.callbacks.altCopy({
926
- config: R.value,
927
- dataset: Q.value
928
- }));
929
- }
930
- let Ur = p(() => ({
931
- head: Cr.value.head,
932
- body: Cr.value.body.map((e) => [
933
- e[0]?.name || "",
934
- e[1],
935
- e[2],
936
- e[3]
937
- ]),
938
- caption: R.value.a11y.translations.tableCaption,
939
- notice: R.value.a11y.translations.tableAvailable
940
- }));
941
- function Wr(e) {
942
- return Q.value.findIndex((t) => t.seriesIndex === e);
943
- }
944
- function Gr() {
945
- if (I.value !== null && L.value !== null) {
946
- let e = Q.value.find((e) => e.seriesIndex === I.value)?.plots?.[L.value];
947
- e && br({
948
- datapoint: e,
949
- plotIndex: L.value,
950
- seriesIndex: I.value
951
- });
952
- }
953
- I.value = null, L.value = null, mn.value = "pointer", $t.value = !1, nn.value = null;
954
- }
955
- function Kr() {
956
- I.value = null, L.value = null, hn.value = !0;
957
- }
958
- function qr() {
959
- Gr(), hn.value = !1;
960
- }
961
- function Jr(e, t) {
962
- if (!e?.plots?.length) return null;
963
- let n = e.plots.length;
964
- return (t % n + n) % n;
965
- }
966
- function Yr({ seriesIndex: e, plotIndex: t, direction: n }) {
967
- if (!Q.value.length) return null;
968
- let r = Wr(e);
969
- if (r === -1) return null;
970
- if (n === "up" || n === "down") {
971
- let e = Q.value[r];
972
- if (!e?.plots?.length) return null;
973
- let i = Jr(e, t + (n === "up" ? -1 : 1));
974
- return {
975
- seriesIndex: e.seriesIndex,
976
- plotIndex: i
977
- };
978
- }
979
- if (n === "left" || n === "right") {
980
- let e = ((r + (n === "left" ? -1 : 1)) % Q.value.length + Q.value.length) % Q.value.length, i = Q.value[e];
981
- if (!i?.plots?.length) return null;
982
- let a = Math.min(t, i.plots.length - 1);
983
- return {
984
- seriesIndex: i.seriesIndex,
985
- plotIndex: a
986
- };
987
- }
988
- return null;
989
- }
990
- function Xr(e) {
991
- if (!G.value || Tr.value || document.activeElement !== G.value || !Q.value.length) return;
992
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
993
- if (!t && !n && !r && !i && !a && !o) return;
994
- if (e.preventDefault(), e.stopPropagation(), o) {
995
- Gr();
996
- return;
997
- }
998
- if (a) {
999
- if (I.value === null || L.value === null) return;
1000
- let e = Q.value.find((e) => e.seriesIndex === I.value)?.plots?.[L.value];
1001
- if (!e) return;
1002
- _r({
1003
- datapoint: e,
1004
- plotIndex: L.value,
1005
- seriesIndex: I.value
1006
- });
1007
- return;
1008
- }
1009
- let s = null;
1010
- if (I.value === null || L.value === null) {
1011
- let e = Q.value[0];
1012
- if (!e?.plots?.length) return;
1013
- s = {
1014
- seriesIndex: e.seriesIndex,
1015
- plotIndex: 0
1016
- };
1017
- } else r ? s = Yr({
1018
- seriesIndex: I.value,
1019
- plotIndex: L.value,
1020
- direction: "up"
1021
- }) : i ? s = Yr({
1022
- seriesIndex: I.value,
1023
- plotIndex: L.value,
1024
- direction: "down"
1025
- }) : t ? s = Yr({
1026
- seriesIndex: I.value,
1027
- plotIndex: L.value,
1028
- direction: "left"
1029
- }) : n && (s = Yr({
1030
- seriesIndex: I.value,
1031
- plotIndex: L.value,
1032
- direction: "right"
1033
- }));
1034
- if (!s) return;
1035
- let c = Q.value.find((e) => e.seriesIndex === s.seriesIndex)?.plots?.[s.plotIndex];
1036
- c && Sr({
1037
- datapoint: c,
1038
- plotIndex: s.plotIndex,
1039
- seriesIndex: s.seriesIndex,
1040
- triggerMode: "keyboard"
1041
- });
1042
- }
1043
- return De({
1044
- getData: kr,
1045
- getImage: Ar,
1046
- generatePdf: An,
1047
- generateCsv: wr,
1048
- generateImage: jn,
1049
- generateSvg: Br,
1050
- hideSeries: mr,
1051
- showSeries: pr,
1052
- toggleTable: Dr,
1053
- toggleTooltip: Or,
1054
- toggleAnnotator: Er,
1055
- toggleFullscreen: vr,
1056
- copyAlt: Hr
1057
- }), (e, t) => (C(), g("div", {
1058
- id: `history_plot_${P.value}`,
1059
- ref_key: "historyPlotChart",
1060
- ref: j,
1061
- class: b({
1062
- "vue-data-ui-component": !0,
1063
- "vue-ui-history-plot": !0,
1064
- "vue-data-ui-wrapper-fullscreen": tn.value
1065
- }),
1066
- style: S(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${R.value.style.fontFamily}; position: relative; ${R.value.responsive ? "height: 100%" : ""}`),
1067
- onMouseenter: t[2] ||= () => O(En)(!0),
1068
- onMouseleave: t[3] ||= () => O(En)(!1)
1069
- }, [
1070
- _("div", {
1071
- id: `chart-instructions-${P.value}`,
1072
- class: "sr-only"
1073
- }, [_("p", null, D(R.value.a11y.translations.keyboardNavigation), 1)], 8, Qe),
1074
- Ur.value.body.length ? (C(), m(Me, {
1075
- key: 0,
1076
- uid: P.value,
1077
- head: Ur.value.head,
1078
- body: Ur.value.body,
1079
- caption: Ur.value.caption,
1080
- notice: Ur.value.notice
1081
- }, null, 8, [
1082
- "uid",
1083
- "head",
1084
- "body",
1085
- "caption",
1086
- "notice"
1087
- ])) : h("", !0),
1088
- E(e.$slots, "userConfig", {}, void 0, !0),
1089
- R.value.userOptions.buttons.annotator ? (C(), m(O(zt), {
1090
- key: 1,
1091
- svgRef: O(G),
1092
- backgroundColor: H.value.backgroundColor,
1093
- color: H.value.color,
1094
- active: Tr.value,
1095
- isCursorPointer: W.value,
1096
- palette: R.value.userOptions.annotatorPalette,
1097
- onClose: Er
1098
- }, {
1099
- "annotator-action-close": k(() => [E(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1100
- "annotator-action-color": k(({ color: t }) => [E(e.$slots, "annotator-action-color", x(y({ color: t })), void 0, !0)]),
1101
- "annotator-action-draw": k(({ mode: t }) => [E(e.$slots, "annotator-action-draw", x(y({ mode: t })), void 0, !0)]),
1102
- "annotator-action-undo": k(({ disabled: t }) => [E(e.$slots, "annotator-action-undo", x(y({ disabled: t })), void 0, !0)]),
1103
- "annotator-action-redo": k(({ disabled: t }) => [E(e.$slots, "annotator-action-redo", x(y({ disabled: t })), void 0, !0)]),
1104
- "annotator-action-delete": k(({ disabled: t }) => [E(e.$slots, "annotator-action-delete", x(y({ disabled: t })), void 0, !0)]),
1105
- _: 3
1106
- }, 8, [
1107
- "svgRef",
1108
- "backgroundColor",
1109
- "color",
1110
- "active",
1111
- "isCursorPointer",
1112
- "palette"
1113
- ])) : h("", !0),
1114
- Mn.value ? (C(), g("div", {
1115
- key: 2,
1116
- ref_key: "noTitle",
1117
- ref: Qt,
1118
- class: "vue-data-ui-no-title-space",
1119
- style: "height:36px; width: 100%;background:transparent"
1120
- }, null, 512)) : h("", !0),
1121
- H.value.title.text ? (C(), g("div", {
1122
- key: 3,
1123
- ref_key: "chartTitle",
1124
- ref: Kt,
1125
- class: "vue-ui-xy-title",
1126
- style: S(`font-family:${R.value.style.fontFamily}`)
1127
- }, [(C(), m(Ee, {
1128
- key: `title_${qt.value}`,
1129
- config: {
1130
- title: {
1131
- cy: "history-plot-div-title",
1132
- ...H.value.title
1133
- },
1134
- subtitle: {
1135
- cy: "history-plot-div-subtitle",
1136
- ...H.value.title.subtitle
1137
- }
1138
- }
1139
- }, null, 8, ["config"]))], 4)) : h("", !0),
1140
- _("div", { id: `legend-top-${P.value}` }, null, 8, $e),
1141
- R.value.userOptions.show && gn.value && (O(Dn) || O(Tn)) ? (C(), m(O(Bt), {
1142
- ref_key: "userOptionsRef",
1143
- ref: cn,
1144
- key: `user_option_${Zt.value}`,
1145
- backgroundColor: H.value.backgroundColor,
1146
- color: H.value.color,
1147
- isPrinting: O(On),
1148
- isImaging: O(kn),
1149
- uid: P.value,
1150
- hasTooltip: H.value.tooltip.show && R.value.userOptions.buttons.tooltip,
1151
- hasPdf: R.value.userOptions.buttons.pdf,
1152
- hasImg: R.value.userOptions.buttons.img,
1153
- hasSvg: R.value.userOptions.buttons.svg,
1154
- hasXls: R.value.userOptions.buttons.csv,
1155
- hasTable: R.value.userOptions.buttons.table,
1156
- hasLabel: !1,
1157
- hasFullscreen: R.value.userOptions.buttons.fullscreen,
1158
- hasAltCopy: R.value.userOptions.buttons.altCopy,
1159
- isFullscreen: tn.value,
1160
- chartElement: j.value,
1161
- position: R.value.userOptions.position,
1162
- isTooltip: K.value.showTooltip,
1163
- titles: { ...R.value.userOptions.buttonTitles },
1164
- hasAnnotator: R.value.userOptions.buttons.annotator,
1165
- isAnnotation: Tr.value,
1166
- callbacks: R.value.userOptions.callbacks,
1167
- printScale: R.value.userOptions.print.scale,
1168
- tableDialog: R.value.table.useDialog,
1169
- isCursorPointer: W.value,
1170
- onToggleFullscreen: vr,
1171
- onGeneratePdf: O(An),
1172
- onGenerateCsv: wr,
1173
- onGenerateImage: O(Vr),
1174
- onGenerateSvg: O(Br),
1175
- onToggleTable: Dr,
1176
- onToggleTooltip: Or,
1177
- onToggleAnnotator: Er,
1178
- onCopyAlt: Hr,
1179
- style: S({ visibility: O(Dn) ? O(Tn) ? "visible" : "hidden" : "visible" })
1180
- }, Re({ _: 2 }, [
1181
- e.$slots.menuIcon ? {
1182
- name: "menuIcon",
1183
- fn: k(({ isOpen: t, color: n }) => [E(e.$slots, "menuIcon", x(y({
1184
- isOpen: t,
1185
- color: n
1186
- })), void 0, !0)]),
1187
- key: "0"
1188
- } : void 0,
1189
- e.$slots.optionTooltip ? {
1190
- name: "optionTooltip",
1191
- fn: k(() => [E(e.$slots, "optionTooltip", {}, void 0, !0)]),
1192
- key: "1"
1193
- } : void 0,
1194
- e.$slots.optionPdf ? {
1195
- name: "optionPdf",
1196
- fn: k(() => [E(e.$slots, "optionPdf", {}, void 0, !0)]),
1197
- key: "2"
1198
- } : void 0,
1199
- e.$slots.optionCsv ? {
1200
- name: "optionCsv",
1201
- fn: k(() => [E(e.$slots, "optionCsv", {}, void 0, !0)]),
1202
- key: "3"
1203
- } : void 0,
1204
- e.$slots.optionImg ? {
1205
- name: "optionImg",
1206
- fn: k(() => [E(e.$slots, "optionImg", {}, void 0, !0)]),
1207
- key: "4"
1208
- } : void 0,
1209
- e.$slots.optionSvg ? {
1210
- name: "optionSvg",
1211
- fn: k(() => [E(e.$slots, "optionSvg", {}, void 0, !0)]),
1212
- key: "5"
1213
- } : void 0,
1214
- e.$slots.optionTable ? {
1215
- name: "optionTable",
1216
- fn: k(() => [E(e.$slots, "optionTable", {}, void 0, !0)]),
1217
- key: "6"
1218
- } : void 0,
1219
- e.$slots.optionFullscreen ? {
1220
- name: "optionFullscreen",
1221
- fn: k(({ toggleFullscreen: t, isFullscreen: n }) => [E(e.$slots, "optionFullscreen", x(y({
1222
- toggleFullscreen: t,
1223
- isFullscreen: n
1224
- })), void 0, !0)]),
1225
- key: "7"
1226
- } : void 0,
1227
- e.$slots.optionAnnotator ? {
1228
- name: "optionAnnotator",
1229
- fn: k(({ toggleAnnotator: t, isAnnotator: n }) => [E(e.$slots, "optionAnnotator", x(y({
1230
- toggleAnnotator: t,
1231
- isAnnotator: n
1232
- })), void 0, !0)]),
1233
- key: "8"
1234
- } : void 0,
1235
- e.$slots.optionAltCopy ? {
1236
- name: "optionAltCopy",
1237
- fn: k(({ altCopy: t }) => [E(e.$slots, "optionAltCopy", x(y({ altCopy: t })), void 0, !0)]),
1238
- key: "9"
1239
- } : void 0,
1240
- e.$slots["custom-menu-before"] ? {
1241
- name: "custom-menu-before",
1242
- fn: k(() => [E(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1243
- key: "10"
1244
- } : void 0,
1245
- e.$slots["custom-menu-after"] ? {
1246
- name: "custom-menu-after",
1247
- fn: k(() => [E(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1248
- key: "11"
1249
- } : void 0
1250
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : h("", !0),
1251
- _("div", et, [(C(), g("svg", {
1252
- ref_key: "svgRef",
1253
- ref: G,
1254
- xmlns: O(fe),
1255
- viewBox: `0 0 ${q.value.width < 0 ? .1 : q.value.width} ${q.value.height < 0 ? .1 : q.value.height}`,
1256
- style: S(`max-width:100%;overflow:visible;background:transparent;color:${H.value.color}`),
1257
- "aria-describedby": `chart-instructions-${P.value}`,
1258
- tabindex: "0",
1259
- onFocus: Kr,
1260
- onBlur: qr,
1261
- onKeydown: Xr
1262
- }, [
1263
- Be(O(Vt)),
1264
- e.$slots["chart-background"] ? (C(), g("foreignObject", {
1265
- key: 0,
1266
- x: J.value.left,
1267
- y: J.value.top,
1268
- width: J.value.width <= 0 ? 10 : J.value.width,
1269
- height: J.value.height <= 0 ? 10 : J.value.height,
1270
- style: { pointerEvents: "none" }
1271
- }, [E(e.$slots, "chart-background", {}, void 0, !0)], 8, nt)) : h("", !0),
1272
- z.value.gradient.show || Jn.value ? (C(), g("defs", rt, [z.value.gradient.show ? (C(!0), g(f, { key: 0 }, T(Q.value, (e, t) => (C(), m(Ae, {
1273
- t: "radial",
1274
- key: `gradient_${t}_${P.value}`,
1275
- id: `gradient_${t}_${P.value}`,
1276
- fy: "30%",
1277
- stops: [
1278
- [
1279
- "10%",
1280
- O(ce)(e.color, z.value.gradient.intensity / 100),
1281
- 1
1282
- ],
1283
- [
1284
- "90%",
1285
- O(re)(e.color, .1),
1286
- 1
1287
- ],
1288
- [
1289
- "100%",
1290
- e.color,
1291
- 1
1292
- ]
1293
- ]
1294
- }, null, 8, ["id", "stops"]))), 128)) : h("", !0), (C(!0), g(f, null, T(Q.value, (e) => (C(), g(f, { key: `temperature_grad_history_template_${e.seriesIndex}_${P.value}` }, [z.value.gradient.show && Xn(e) ? (C(!0), g(f, { key: 0 }, T(e.plots, (t) => (C(), m(Ae, {
1295
- t: "radial",
1296
- key: `temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${P.value}`,
1297
- id: nr(e, t),
1298
- fy: "30%",
1299
- stops: [
1300
- [
1301
- "10%",
1302
- O(ce)($(e, t), z.value.gradient.intensity / 100),
1303
- 1
1304
- ],
1305
- [
1306
- "90%",
1307
- O(re)($(e, t), .1),
1308
- 1
1309
- ],
1310
- [
1311
- "100%",
1312
- $(e, t),
1313
- 1
1314
- ]
1315
- ]
1316
- }, null, 8, ["id", "stops"]))), 128)) : h("", !0), Yn(e) ? (C(), g("linearGradient", {
1317
- key: 1,
1318
- id: `temperature_grad_history_${e.seriesIndex}_${P.value}`,
1319
- gradientUnits: "userSpaceOnUse",
1320
- x1: er(e).x1,
1321
- y1: er(e).y1,
1322
- x2: er(e).x2,
1323
- y2: er(e).y2
1324
- }, [(C(!0), g(f, null, T(e.temperatureColors, (t, n) => (C(), g("stop", {
1325
- key: `temperature_grad_history_stop_${e.seriesIndex}_${n}_${P.value}`,
1326
- "stop-color": t,
1327
- offset: e.temperatureColors.length === 1 ? "0%" : O(a)(n, e.temperatureColors.length)
1328
- }, null, 8, at))), 128))], 8, it)) : h("", !0)], 64))), 128))])) : h("", !0),
1329
- B.value.verticalLines.show ? (C(), g("g", ot, [(C(!0), g(f, null, T(Z.value.tickX, (e) => (C(), g("line", {
1330
- x1: e.x,
1331
- x2: e.x,
1332
- y1: e.y1,
1333
- y2: e.y2,
1334
- stroke: B.value.verticalLines.stroke,
1335
- "stroke-width": B.value.verticalLines.strokeWidth,
1336
- "stroke-linecap": "round"
1337
- }, null, 8, st))), 256))])) : h("", !0),
1338
- V.value.y.labels.show ? (C(), g("g", ct, [(C(!0), g(f, null, T(Z.value.tickY, (e) => (C(), g("line", {
1339
- stroke: B.value.verticalLines.stroke,
1340
- "stroke-width": B.value.verticalLines.strokeWidth,
1341
- "stroke-linecap": "round",
1342
- x1: J.value.left - 5,
1343
- x2: J.value.left,
1344
- y1: e.y,
1345
- y2: e.y
1346
- }, null, 8, lt))), 256))])) : h("", !0),
1347
- V.value.y.labels.show ? (C(), g("g", {
1348
- key: 4,
1349
- ref_key: "yAxisScales",
1350
- ref: fn
1351
- }, [(C(!0), g(f, null, T(Z.value.tickY, (e) => (C(), g("text", {
1352
- x: J.value.left + V.value.y.labels.offsetX - 4 - z.value.radius,
1353
- y: e.y + Y.value.yAxisLabels / 3,
1354
- fill: V.value.y.labels.color,
1355
- "font-size": Y.value.yAxisLabels,
1356
- "text-anchor": "end"
1357
- }, D(O(d)(V.value.y.labels.formatter, e.value, O(l)({
1358
- p: V.value.y.labels.prefix,
1359
- v: e.value,
1360
- s: V.value.y.labels.suffix,
1361
- r: V.value.y.labels.rounding
1362
- }))), 9, ut))), 256))], 512)) : h("", !0),
1363
- V.value.y.name.text ? (C(), g("text", {
1364
- key: 5,
1365
- ref_key: "yAxisLabel",
1366
- ref: un,
1367
- transform: `translate(${Y.value.yAxisName}, ${q.value.height / 2 + V.value.y.name.offsetY}), rotate(-90)`,
1368
- "font-size": Y.value.yAxisName,
1369
- fill: V.value.y.name.color,
1370
- "font-weight": V.value.y.name.bold ? "bold" : "normal",
1371
- "text-anchor": "middle"
1372
- }, D(V.value.y.name.text), 9, dt)) : h("", !0),
1373
- B.value.horizontalLines.show ? (C(), g("g", ft, [(C(!0), g(f, null, T(Z.value.tickY, (e) => (C(), g("line", {
1374
- x1: e.x1,
1375
- x2: e.x2,
1376
- y1: e.y,
1377
- y2: e.y,
1378
- stroke: B.value.horizontalLines.stroke,
1379
- "stroke-width": B.value.horizontalLines.strokeWidth,
1380
- "stroke-linecap": "round"
1381
- }, null, 8, pt))), 256))])) : h("", !0),
1382
- V.value.x.labels.show ? (C(), g("g", mt, [(C(!0), g(f, null, T(Z.value.tickX, (e) => (C(), g("line", {
1383
- stroke: B.value.verticalLines.stroke,
1384
- "stroke-width": B.value.verticalLines.strokeWidth,
1385
- "stroke-linecap": "round",
1386
- x1: e.x,
1387
- x2: e.x,
1388
- y1: J.value.bottom,
1389
- y2: J.value.bottom + 5
1390
- }, null, 8, ht))), 256))])) : h("", !0),
1391
- V.value.x.labels.show ? (C(), g("g", {
1392
- key: 8,
1393
- ref_key: "xAxisScales",
1394
- ref: dn
1395
- }, [(C(!0), g(f, null, T(Z.value.tickX, (e) => (C(), g("text", {
1396
- class: "vue-ui-history-plot-x-axis-scale",
1397
- transform: `translate(${e.x}, ${J.value.bottom + V.value.x.labels.offsetY + Y.value.xAxisLabels + z.value.radius}), rotate(${V.value.x.labels.rotation})`,
1398
- fill: V.value.x.labels.color,
1399
- "font-size": Y.value.xAxisLabels,
1400
- "text-anchor": V.value.x.labels.rotation > 0 ? "start" : V.value.x.labels.rotation < 0 ? "end" : "middle"
1401
- }, D(O(d)(V.value.x.labels.formatter, e.value, O(l)({
1402
- p: V.value.x.labels.prefix,
1403
- v: e.value,
1404
- s: V.value.x.labels.suffix,
1405
- r: V.value.x.labels.rounding
1406
- }))), 9, gt))), 256))], 512)) : h("", !0),
1407
- V.value.x.name.text ? (C(), g("text", {
1408
- key: 9,
1409
- ref_key: "xAxisLabel",
1410
- ref: ln,
1411
- x: q.value.width / 2 + V.value.x.name.offsetX,
1412
- y: q.value.height,
1413
- "font-size": Y.value.xAxisName,
1414
- fill: V.value.x.name.color,
1415
- "font-weight": V.value.x.name.bold ? "bold" : "normal",
1416
- "text-anchor": "middle"
1417
- }, D(V.value.x.name.text), 9, _t)) : h("", !0),
1418
- B.value.xAxis.show ? (C(), g("line", {
1419
- key: 10,
1420
- x1: J.value.left,
1421
- x2: J.value.left + J.value.width,
1422
- y1: J.value.bottom,
1423
- y2: J.value.bottom,
1424
- stroke: B.value.xAxis.stroke,
1425
- "stroke-width": B.value.xAxis.strokeWidth,
1426
- "stroke-linecap": "round"
1427
- }, null, 8, vt)) : h("", !0),
1428
- B.value.yAxis.show ? (C(), g("line", {
1429
- key: 11,
1430
- x1: J.value.left,
1431
- x2: J.value.left,
1432
- y1: J.value.top,
1433
- y2: J.value.bottom,
1434
- stroke: B.value.yAxis.stroke,
1435
- "stroke-width": B.value.yAxis.strokeWidth,
1436
- "stroke-linecap": "round"
1437
- }, null, 8, yt)) : h("", !0),
1438
- (C(!0), g(f, null, T(qn.value, (e) => (C(), g("g", { key: `history_plot_serie_${e.seriesIndex}_${P.value}` }, [
1439
- H.value.paths.show ? (C(), g("g", {
1440
- key: 0,
1441
- style: S({ opacity: cr(e.seriesIndex) })
1442
- }, [_("path", {
1443
- class: b({ "vue-data-ui-transition": O(U) }),
1444
- d: e.path,
1445
- stroke: H.value.backgroundColor,
1446
- "stroke-width": H.value.paths.strokeWidth + 4,
1447
- fill: "none",
1448
- "stroke-linecap": "round",
1449
- "stroke-linejoin": "round"
1450
- }, null, 10, bt), _("path", {
1451
- class: b({ "vue-data-ui-transition": O(U) }),
1452
- d: e.path,
1453
- stroke: sr(e),
1454
- "stroke-width": H.value.paths.strokeWidth,
1455
- fill: "none",
1456
- "stroke-linecap": "round",
1457
- "stroke-linejoin": "round"
1458
- }, null, 10, xt)], 4)) : h("", !0),
1459
- (C(!0), g(f, null, T(e.plots, (e) => (C(), g("circle", {
1460
- cx: e.x,
1461
- cy: e.y,
1462
- fill: H.value.backgroundColor,
1463
- r: Y.value.plots,
1464
- stroke: "none",
1465
- class: b({ "vue-data-ui-transition": O(U) })
1466
- }, null, 10, St))), 256)),
1467
- (C(!0), g(f, null, T(e.plots, (t) => (C(), g("circle", {
1468
- cx: t.x,
1469
- cy: t.y,
1470
- fill: rr(e, t, e.gradientIndex),
1471
- r: Y.value.plots,
1472
- stroke: z.value.stroke,
1473
- "stroke-width": z.value.strokeWidth,
1474
- class: b({ "vue-data-ui-transition": O(U) }),
1475
- style: S({ opacity: cr(e.seriesIndex) })
1476
- }, null, 14, Ct))), 256)),
1477
- z.value.labels.show ? (C(), g("g", wt, [(C(!0), g(f, null, T(e.plots, (t, n) => (C(), g("g", { key: `plab_${n}` }, [String(t.label).includes("\n") ? (C(), g("text", {
1478
- key: 1,
1479
- class: b({ "vue-data-ui-transition": O(U) }),
1480
- transform: `translate(${t.x + z.value.labels.offsetX}, ${t.y + z.value.labels.offsetY + Y.value.plots + Y.value.labels})`,
1481
- "font-size": Y.value.labels,
1482
- fill: z.value.labels.color,
1483
- "font-weight": z.value.labels.bold ? "bold" : "normal",
1484
- "text-anchor": "middle",
1485
- style: S({ opacity: cr(e.seriesIndex) }),
1486
- innerHTML: O(i)({
1487
- content: String(t.label),
1488
- fontSize: Y.value.labels,
1489
- fill: z.value.labels.color,
1490
- x: 0,
1491
- y: 0
1492
- })
1493
- }, null, 14, Et)) : (C(), g("text", {
1494
- key: 0,
1495
- class: b({ "vue-data-ui-transition": O(U) }),
1496
- transform: `translate(${t.x + z.value.labels.offsetX}, ${t.y + z.value.labels.offsetY + Y.value.plots + Y.value.labels})`,
1497
- "font-size": Y.value.labels,
1498
- fill: z.value.labels.color,
1499
- "font-weight": z.value.labels.bold ? "bold" : "normal",
1500
- "text-anchor": "middle",
1501
- style: S({ opacity: cr(e.seriesIndex) })
1502
- }, D(t.label), 15, Tt))]))), 128))])) : h("", !0),
1503
- z.value.indexLabels.show ? (C(), g("g", Dt, [(C(!0), g(f, null, T(e.plots, (t, n) => (C(), g("text", {
1504
- key: `lab_${n}`,
1505
- class: b({ "vue-data-ui-transition": O(U) }),
1506
- transform: `translate(${t.x + z.value.indexLabels.offsetX}, ${t.y + z.value.indexLabels.offsetY + Y.value.indexLabels / 3})`,
1507
- "font-size": Y.value.indexLabels,
1508
- "font-weight": z.value.indexLabels.bold ? "bold" : "normal",
1509
- fill: ar(e, t),
1510
- "text-anchor": "middle",
1511
- style: S({ opacity: cr(e.seriesIndex) })
1512
- }, D(z.value.indexLabels.startAtZero ? n : n + 1), 15, Ot))), 128))])) : h("", !0)
1513
- ]))), 128)),
1514
- (C(!0), g(f, null, T(qn.value, (e) => (C(), g("g", { key: `history_plot_trap_serie_${e.seriesIndex}_${P.value}` }, [(C(!0), g(f, null, T(e.plots, (t, n) => (C(), g("circle", {
1515
- cx: t.x,
1516
- cy: t.y,
1517
- fill: "transparent",
1518
- r: Y.value.plots,
1519
- stroke: "none",
1520
- onMouseenter: (r) => Sr({
1521
- datapoint: t,
1522
- plotIndex: n,
1523
- seriesIndex: e.seriesIndex,
1524
- triggerMode: "pointer"
1525
- }),
1526
- onMouseleave: (r) => br({
1527
- datapoint: t,
1528
- plotIndex: n,
1529
- seriesIndex: e.seriesIndex
1530
- }),
1531
- onClick: (r) => _r({
1532
- datapoint: t,
1533
- plotIndex: n,
1534
- seriesIndex: e.seriesIndex
1535
- })
1536
- }, null, 40, kt))), 256))]))), 128)),
1537
- E(e.$slots, "svg", { svg: {
1538
- ...q.value,
1539
- drawingArea: J.value,
1540
- isPrintingImg: O(On) || O(kn) || O(Rr),
1541
- isPrintingSvg: O(zr)
1542
- } }, void 0, !0)
1543
- ], 44, tt)), e.$slots.hint ? (C(), g("div", At, [E(e.$slots, "hint", x(y({
1544
- hint: R.value.a11y.translations.keyboardNavigation,
1545
- isVisible: hn.value
1546
- })), void 0, !0)])) : h("", !0)]),
1547
- e.$slots.watermark ? (C(), g("div", jt, [E(e.$slots, "watermark", x(y({ isPrinting: O(On) || O(kn) || O(Rr) || O(zr) })), void 0, !0)])) : h("", !0),
1548
- _("div", { id: `legend-bottom-${P.value}` }, null, 8, Mt),
1549
- on.value && (H.value.legend.show || e.$slots.legend) ? (C(), m(Le, {
1550
- key: 6,
1551
- to: H.value.legend.position === "top" ? `#legend-top-${P.value}` : `#legend-bottom-${P.value}`
1552
- }, [_("div", {
1553
- ref_key: "chartLegend",
1554
- ref: Jt
1555
- }, [E(e.$slots, "legend", { legend: hr.value }, () => [H.value.legend.show && gn.value ? (C(), m(Fe, {
1556
- key: `legend_${Yt.value}`,
1557
- legendSet: hr.value,
1558
- config: gr.value,
1559
- isCursorPointer: W.value,
1560
- onClickMarker: t[0] ||= ({ legend: e }) => {
1561
- dr(e.seriesIndex);
1562
- }
1563
- }, {
1564
- item: k(({ legend: e, index: t }) => [_("div", {
1565
- onClick: (t) => e.segregate(),
1566
- style: S(`opacity:${F.value.includes(e.seriesIndex) ? .5 : 1}`)
1567
- }, D(e.name), 13, Nt)]),
1568
- legendToggle: k(() => [hr.value.length > 2 && H.value.legend.selectAllToggle.show && !O(Sn) ? (C(), m(je, {
1569
- key: 0,
1570
- backgroundColor: H.value.legend.selectAllToggle.backgroundColor,
1571
- color: H.value.legend.selectAllToggle.color,
1572
- fontSize: H.value.legend.fontSize,
1573
- checked: F.value.length > 0,
1574
- isCursorPointer: W.value,
1575
- onToggle: ur
1576
- }, null, 8, [
1577
- "backgroundColor",
1578
- "color",
1579
- "fontSize",
1580
- "checked",
1581
- "isCursorPointer"
1582
- ])) : h("", !0)]),
1583
- _: 1
1584
- }, 8, [
1585
- "legendSet",
1586
- "config",
1587
- "isCursorPointer"
1588
- ])) : h("", !0)], !0)], 512)], 8, ["to"])) : h("", !0),
1589
- e.$slots.source ? (C(), g("div", {
1590
- key: 7,
1591
- ref_key: "source",
1592
- ref: an,
1593
- dir: "auto"
1594
- }, [E(e.$slots, "source", {}, void 0, !0)], 512)) : h("", !0),
1595
- Be(O(Ft), {
1596
- teleportTo: H.value.tooltip.teleportTo,
1597
- show: K.value.showTooltip && $t.value,
1598
- backgroundColor: H.value.tooltip.backgroundColor,
1599
- color: H.value.tooltip.color,
1600
- fontSize: H.value.tooltip.fontSize,
1601
- borderRadius: H.value.tooltip.borderRadius,
1602
- borderColor: H.value.tooltip.borderColor,
1603
- borderWidth: H.value.tooltip.borderWidth,
1604
- backgroundOpacity: H.value.tooltip.backgroundOpacity,
1605
- position: H.value.tooltip.position,
1606
- offsetX: H.value.tooltip.offsetX,
1607
- offsetY: H.value.tooltip.offsetY,
1608
- parent: j.value,
1609
- content: en.value,
1610
- isCustom: rn.value,
1611
- isFullscreen: tn.value,
1612
- smooth: H.value.tooltip.smooth,
1613
- backdropFilter: H.value.tooltip.backdropFilter,
1614
- smoothForce: H.value.tooltip.smoothForce,
1615
- smoothSnapThreshold: H.value.tooltip.smoothSnapThreshold,
1616
- isA11yMode: mn.value === "keyboard",
1617
- a11yPosition: pn.value
1618
- }, {
1619
- "tooltip-before": k(() => [E(e.$slots, "tooltip-before", x(y({ ...yr.value })), void 0, !0)]),
1620
- tooltip: k(() => [E(e.$slots, "tooltip", x(y({ ...yr.value })), void 0, !0)]),
1621
- "tooltip-after": k(() => [E(e.$slots, "tooltip-after", x(y({ ...yr.value })), void 0, !0)]),
1622
- _: 3
1623
- }, 8, [
1624
- "teleportTo",
1625
- "show",
1626
- "backgroundColor",
1627
- "color",
1628
- "fontSize",
1629
- "borderRadius",
1630
- "borderColor",
1631
- "borderWidth",
1632
- "backgroundOpacity",
1633
- "position",
1634
- "offsetX",
1635
- "offsetY",
1636
- "parent",
1637
- "content",
1638
- "isCustom",
1639
- "isFullscreen",
1640
- "smooth",
1641
- "backdropFilter",
1642
- "smoothForce",
1643
- "smoothSnapThreshold",
1644
- "isA11yMode",
1645
- "a11yPosition"
1646
- ]),
1647
- gn.value && R.value.userOptions.buttons.table ? (C(), m(Ge(Nr.value.component), Ve({ key: 8 }, Nr.value.props, {
1648
- ref_key: "tableUnit",
1649
- ref: sn,
1650
- onClose: Pr
1651
- }), Re({
1652
- content: k(() => [(C(), m(O(Rt), {
1653
- key: `table_${Xt.value}`,
1654
- colNames: Cr.value.colNames,
1655
- head: Cr.value.head,
1656
- body: Cr.value.body,
1657
- config: Cr.value.config,
1658
- title: R.value.table.useDialog ? "" : Nr.value.title,
1659
- withCloseButton: !R.value.table.useDialog,
1660
- isCursorPointer: W.value,
1661
- onClose: Pr
1662
- }, {
1663
- th: k(({ th: e }) => [_("div", Pt, D(e), 1)]),
1664
- td: k(({ td: e }) => [ze(D(e.name || e), 1)]),
1665
- _: 1
1666
- }, 8, [
1667
- "colNames",
1668
- "head",
1669
- "body",
1670
- "config",
1671
- "title",
1672
- "withCloseButton",
1673
- "isCursorPointer"
1674
- ]))]),
1675
- _: 2
1676
- }, [R.value.table.useDialog ? {
1677
- name: "title",
1678
- fn: k(() => [ze(D(Nr.value.title), 1)]),
1679
- key: "0"
1680
- } : void 0, R.value.table.useDialog ? {
1681
- name: "actions",
1682
- fn: k(() => [_("button", {
1683
- tabindex: "0",
1684
- class: "vue-ui-user-options-button",
1685
- onClick: t[1] ||= (e) => wr(R.value.userOptions.callbacks.csv),
1686
- style: S({ cursor: W.value ? "pointer" : "default" })
1687
- }, [Be(O(It), {
1688
- name: "fileCsv",
1689
- stroke: Nr.value.props.color
1690
- }, null, 8, ["stroke"])], 4)]),
1691
- key: "1"
1692
- } : void 0]), 1040)) : h("", !0),
1693
- E(e.$slots, "skeleton", {}, () => [O(Sn) ? (C(), m(ye, { key: 0 })) : h("", !0)], !0)
1694
- ], 46, Ze));
1695
- }
1696
- }, [["__scopeId", "data-v-7a75a161"]]);
1697
- //#endregion
1698
- export { Xe as n, Ft as t };