vue-data-ui 2.3.3 → 2.3.5

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 (154) hide show
  1. package/README.md +19 -15
  2. package/dist/Arrow-BSOdhAJO.cjs +1 -0
  3. package/dist/Arrow-BjDVSrfA.js +101 -0
  4. package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
  5. package/dist/BaseIcon-vmmfWlyR.js +174 -0
  6. package/dist/DataTable-CaB7GIwQ.js +127 -0
  7. package/dist/DataTable-ssrNbONo.cjs +1 -0
  8. package/dist/Legend-DHpoRTAE.js +62 -0
  9. package/dist/Legend-Dl5IYoxK.cjs +1 -0
  10. package/dist/Shape-CQT4S7N-.js +107 -0
  11. package/dist/Shape-CaF4pvOn.cjs +1 -0
  12. package/dist/Slicer-Bdb1BlrC.js +156 -0
  13. package/dist/Slicer-QC8nTm24.cjs +1 -0
  14. package/dist/Title-BNPZwnkp.js +46 -0
  15. package/dist/Title-Cj_xubjI.cjs +1 -0
  16. package/dist/Tooltip-CdJ5hegk.cjs +1 -0
  17. package/dist/Tooltip-ZnJAz6dl.js +94 -0
  18. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  19. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  20. package/dist/documentation/installation.md +14 -13
  21. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  22. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  23. package/dist/index-BMCvLyab.js +10369 -0
  24. package/dist/index-BkomIE9L.cjs +4 -0
  25. package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
  26. package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
  27. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  28. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  29. package/dist/pdf-97UbtKC2.js +44 -0
  30. package/dist/pdf-Cz3729tZ.cjs +1 -0
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +105 -5
  33. package/dist/types/vue-data-ui.d.ts +105 -5
  34. package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
  35. package/dist/useNestedProp-CkP8xhG_.js +13 -0
  36. package/dist/usePrinter-BuuBz5JR.js +513 -0
  37. package/dist/usePrinter-r6uHYEcR.cjs +1 -0
  38. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  39. package/dist/useResponsive-NZB-WLRF.js +187 -0
  40. package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
  41. package/dist/vue-data-ui-DxeO0iaC.js +254 -0
  42. package/dist/vue-data-ui.cjs +1 -1
  43. package/dist/vue-data-ui.js +61 -59
  44. package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
  45. package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
  46. package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
  47. package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
  48. package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
  49. package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
  50. package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
  51. package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
  52. package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
  53. package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
  54. package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
  55. package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
  56. package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
  57. package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
  58. package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
  59. package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
  60. package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
  61. package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
  62. package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
  63. package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
  64. package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
  65. package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
  66. package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
  67. package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
  68. package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
  69. package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
  70. package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
  71. package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
  72. package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
  73. package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
  74. package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
  75. package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
  76. package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
  77. package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
  78. package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
  79. package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
  80. package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
  81. package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
  82. package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
  83. package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
  84. package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
  85. package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
  86. package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
  87. package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
  88. package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
  89. package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
  90. package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
  91. package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
  92. package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
  93. package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
  94. package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
  95. package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
  96. package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
  97. package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
  98. package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
  99. package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
  100. package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
  101. package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
  102. package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
  103. package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
  104. package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
  105. package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
  106. package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
  107. package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
  108. package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
  109. package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
  110. package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
  111. package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
  112. package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
  113. package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
  114. package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
  115. package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
  116. package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
  117. package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
  118. package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
  119. package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
  120. package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
  121. package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
  122. package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
  123. package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
  124. package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
  125. package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
  126. package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
  127. package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
  128. package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
  129. package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
  130. package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
  131. package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
  132. package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
  133. package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
  134. package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
  135. package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
  136. package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
  137. package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
  138. package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
  139. package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
  140. package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
  141. package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
  142. package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
  143. package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
  144. package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
  145. package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
  146. package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
  147. package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
  148. package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
  149. package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
  150. package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
  151. package/dist/vue-ui-xy-qToggEfh.js +2064 -0
  152. package/package.json +1 -1
  153. package/dist/index-BcMihqI4.cjs +0 -843
  154. package/dist/index-C7FeCQ7K.js +0 -57303
@@ -0,0 +1,466 @@
1
+ import { computed as p, ref as d, watch as he, onMounted as ye, onBeforeUnmount as fe, openBlock as r, createElementBlock as i, normalizeClass as q, normalizeStyle as F, createElementVNode as v, toDisplayString as m, createCommentVNode as g, createBlock as H, unref as h, createSlots as ge, withCtx as E, renderSlot as $, normalizeProps as pe, guardReactiveProps as me, Fragment as O, renderList as A } from "vue";
2
+ import { u as ke, c as be, t as xe, a as we, p as Z, b as _e, o as J, d as Fe, e as N, g as K, m as Q, X as ze, r as j, G as X, B as ee } from "./index-BMCvLyab.js";
3
+ import { t as Se, u as $e } from "./useResponsive-NZB-WLRF.js";
4
+ import { u as Ce, U as Me } from "./usePrinter-BuuBz5JR.js";
5
+ import Pe from "./vue-ui-skeleton-BisWX1sO.js";
6
+ import { u as te } from "./useNestedProp-CkP8xhG_.js";
7
+ import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ const Oe = ["id"], Ne = ["xmlns", "viewBox"], Xe = ["id"], Ye = ["stop-color"], Ge = ["stop-color"], Re = ["stop-color"], Ee = ["id"], Ae = ["stdDeviation"], je = ["d", "fill", "stroke"], Be = ["d", "filter"], Ue = ["y", "width", "height", "fill"], De = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ve = ["x", "y", "font-size", "font-weight", "fill"], We = { key: 1 }, Le = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Te = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], qe = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], He = { key: 2 }, Ze = ["d", "fill", "stroke", "stroke-width"], Je = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Ke = ["x", "y", "font-size", "fill"], Qe = {
9
+ __name: "vue-ui-gauge",
10
+ props: {
11
+ config: {
12
+ type: Object,
13
+ default() {
14
+ return {};
15
+ }
16
+ },
17
+ dataset: {
18
+ type: Object,
19
+ default() {
20
+ return {};
21
+ }
22
+ }
23
+ },
24
+ setup(Y, { expose: ae }) {
25
+ const u = Y, { vue_ui_gauge: le } = ke(), C = p(() => !!u.dataset && Object.keys(u.dataset).length), k = d(be()), oe = d(null), B = d(0), M = d(null), U = d(null), D = d(null), e = p(() => {
26
+ const l = te({
27
+ userConfig: u.config,
28
+ defaultConfig: le
29
+ });
30
+ return l.theme ? {
31
+ ...te({
32
+ userConfig: xe.vue_ui_gauge[l.theme] || u.config,
33
+ defaultConfig: l
34
+ }),
35
+ customPalette: we[l.theme] || Z
36
+ } : l;
37
+ }), { isPrinting: re, isImaging: se, generatePdf: V, generateImage: W } = Ce({
38
+ elementId: `vue-ui-gauge_${k.value}`,
39
+ fileName: e.value.style.chart.title.text || "vue-ui-gauge"
40
+ }), ue = p(() => _e(e.value.customPalette)), x = p(() => {
41
+ if (!C.value || J(u.dataset.series || {}))
42
+ return {
43
+ value: 0,
44
+ series: [
45
+ {
46
+ from: 0,
47
+ to: 1
48
+ }
49
+ ]
50
+ };
51
+ const l = [];
52
+ (u.dataset.series || []).forEach((a) => {
53
+ l.push(a.from || 0), l.push(a.to || 0);
54
+ });
55
+ const o = Math.max(...l);
56
+ return {
57
+ ...u.dataset,
58
+ series: (u.dataset.series || []).map((a, n) => ({
59
+ ...a,
60
+ color: Fe(a.color) || ue.value[n] || Z[n],
61
+ value: ((a.to || 0) - (a.from || 0)) / o * 100
62
+ }))
63
+ };
64
+ }), y = d(512), t = d({
65
+ height: 358.4,
66
+ width: y.value,
67
+ top: 0,
68
+ bottom: 358.4,
69
+ centerX: 179.2,
70
+ centerY: y.value / 2,
71
+ labelFontSize: 18,
72
+ legendFontSize: e.value.style.chart.legend.fontSize,
73
+ pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
74
+ trackSize: e.value.style.chart.layout.track.size,
75
+ pointerSize: e.value.style.chart.layout.pointer.size,
76
+ pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
77
+ markerOffset: e.value.style.chart.layout.markers.offsetY + 3
78
+ }), z = d(0), w = d(0), f = d(e.value.style.chart.animation.use ? 0 : u.dataset.value);
79
+ he(() => u.dataset.value, () => {
80
+ f.value = e.value.style.chart.animation.use ? 0 : u.dataset.value, T();
81
+ });
82
+ const c = p(() => {
83
+ const l = t.value.width / 2, o = s.value.base, a = Math.PI * ((f.value + 0 - w.value) / (z.value - w.value)) + Math.PI;
84
+ return {
85
+ x1: l,
86
+ y1: o,
87
+ x2: l + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(a),
88
+ y2: o + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(a)
89
+ };
90
+ }), L = p(() => {
91
+ const l = t.value.width / 2, o = s.value.base, a = Math.PI * ((f.value + 0 - w.value) / (z.value - w.value)) + Math.PI, n = l + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(a), R = o + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(a), b = t.value.pointerRadius, I = l + b * Math.cos(a + Math.PI / 2), ce = o + b * Math.sin(a + Math.PI / 2), ve = l + b * Math.cos(a - Math.PI / 2), de = o + b * Math.sin(a - Math.PI / 2);
92
+ return isNaN(n) ? null : `M ${n},${R} ${I},${ce} ${ve},${de} Z`;
93
+ }), G = p(() => {
94
+ for (let l = 0; l < x.value.series.length; l += 1) {
95
+ const { color: o, from: a, to: n } = x.value.series[l];
96
+ if (f.value >= a && f.value <= n)
97
+ return o;
98
+ }
99
+ return "#2D353C";
100
+ }), P = d(null);
101
+ ye(() => {
102
+ if (J(u.dataset) ? N({
103
+ componentName: "VueUiGauge",
104
+ type: "dataset"
105
+ }) : (K({
106
+ datasetObject: u.dataset,
107
+ requiredAttributes: ["value", "series"]
108
+ }).forEach((l) => {
109
+ N({
110
+ componentName: "VueUiGauge",
111
+ type: "datasetAttribute",
112
+ property: l
113
+ });
114
+ }), Object.hasOwn(u.dataset, "series") && (u.dataset.series.length ? u.dataset.series.forEach((l, o) => {
115
+ K({
116
+ datasetObject: l,
117
+ requiredAttributes: ["from", "to"]
118
+ }).forEach((a) => {
119
+ N({
120
+ componentName: "VueUiGauge",
121
+ type: "datasetSerieAttribute",
122
+ property: a,
123
+ index: o
124
+ });
125
+ });
126
+ }) : N({
127
+ componentName: "VueUiGauge",
128
+ type: "datasetAttributeEmpty",
129
+ property: "series"
130
+ }))), T(), e.value.responsive) {
131
+ const l = Se(() => {
132
+ const { width: o, height: a } = $e({
133
+ chart: M.value,
134
+ title: e.value.style.chart.title.text ? U.value : null,
135
+ legend: D.value
136
+ });
137
+ t.value.width = o, t.value.height = a, t.value.centerX = o / 2, t.value.centerY = y.value / 2 / 358.4 * a, t.value.bottom = a, t.value.labelFontSize = 18 / y.value * Math.min(a, o) < 10 ? 10 : 18 / y.value * Math.min(a, o), t.value.legendFontSize = e.value.style.chart.legend.fontSize / y.value * Math.min(a, o) < 14 ? 14 : e.value.style.chart.legend.fontSize / y.value * Math.min(a, o), t.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / y.value * Math.min(a, o), t.value.trackSize = e.value.style.chart.layout.track.size / y.value * Math.min(a, o), t.value.pointerStrokeWidth = ee({
138
+ relator: Math.min(o, a),
139
+ adjuster: y.value,
140
+ source: e.value.style.chart.layout.pointer.strokeWidth,
141
+ threshold: 2,
142
+ fallback: 2
143
+ }), t.value.markerOffset = ee({
144
+ relator: Math.max(o, a),
145
+ adjuster: y.value,
146
+ source: e.value.style.chart.layout.markers.offsetY + 3,
147
+ threshold: 2,
148
+ fallback: 2
149
+ });
150
+ });
151
+ P.value = new ResizeObserver(l), P.value.observe(M.value.parentNode);
152
+ }
153
+ }), fe(() => {
154
+ P.value && P.value.disconnect();
155
+ });
156
+ function T() {
157
+ const l = [];
158
+ (x.value.series || []).forEach((I) => {
159
+ l.push(I.from || 0), l.push(I.to || 0);
160
+ }), z.value = Math.max(...l), w.value = Math.min(...l);
161
+ const o = String(z.value).length;
162
+ let a = 0, n = (o > 2 ? 0.01 : 1e-3) * e.value.style.chart.animation.speed, R = (o > 2 ? 0.05 : 5e-3) * e.value.style.chart.animation.acceleration;
163
+ function b() {
164
+ f.value += n + a, a += R, f.value < u.dataset.value ? requestAnimationFrame(b) : f.value = u.dataset.value;
165
+ }
166
+ e.value.style.chart.animation.use && (f.value = w.value, b());
167
+ }
168
+ const s = p(() => {
169
+ const l = e.value.responsive ? Math.min(t.value.width, t.value.height) : t.value.width;
170
+ return {
171
+ arcs: l / 2.5,
172
+ gradients: l / 2.75,
173
+ base: e.value.responsive ? t.value.height / 2 : t.value.height * 0.7,
174
+ ratingBase: e.value.responsive ? t.value.height / 2 + t.value.height / 4 : t.value.height * 0.9,
175
+ pointerSize: e.value.responsive ? Math.min(t.value.width, t.value.height) / 3 : t.value.width / 3.2
176
+ };
177
+ }), _ = p(() => Q(
178
+ { series: x.value.series },
179
+ t.value.width / 2,
180
+ s.value.base,
181
+ s.value.arcs,
182
+ s.value.arcs,
183
+ 1,
184
+ 1,
185
+ 1,
186
+ 180,
187
+ 109.9495,
188
+ 40 * t.value.trackSize
189
+ )), ie = p(() => Q(
190
+ { series: x.value.series },
191
+ t.value.width / 2,
192
+ s.value.base,
193
+ s.value.gradients,
194
+ s.value.gradients,
195
+ 1,
196
+ 1,
197
+ 1,
198
+ 180,
199
+ 109.9495,
200
+ 2 * t.value.trackSize
201
+ )), S = d(!1);
202
+ function ne(l) {
203
+ S.value = l, B.value += 1;
204
+ }
205
+ return ae({
206
+ generatePdf: V,
207
+ generateImage: W
208
+ }), (l, o) => (r(), i("div", {
209
+ class: q(`vue-ui-gauge ${S.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
210
+ ref_key: "gaugeChart",
211
+ ref: M,
212
+ id: `vue-ui-gauge_${k.value}`,
213
+ style: F(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
214
+ }, [
215
+ e.value.style.chart.title.text ? (r(), i("div", {
216
+ key: 0,
217
+ ref_key: "chartTitle",
218
+ ref: U,
219
+ style: F(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px;${e.value.userOptions.show ? "padding-top:36px" : ""}`)
220
+ }, [
221
+ v("div", {
222
+ style: F(`width:100%;text-align:center;color:${e.value.style.chart.title.color};font-size:${e.value.style.chart.title.fontSize}px;font-weight:${e.value.style.chart.title.bold ? "bold" : ""}`)
223
+ }, m(e.value.style.chart.title.text), 5),
224
+ e.value.style.chart.title.subtitle.text ? (r(), i("div", {
225
+ key: 0,
226
+ style: F(`width:100%;text-align:center;color:${e.value.style.chart.title.subtitle.color};font-size:${e.value.style.chart.title.subtitle.fontSize}px;font-weight:${e.value.style.chart.title.subtitle.bold ? "bold" : ""}`)
227
+ }, m(e.value.style.chart.title.subtitle.text), 5)) : g("", !0),
228
+ isNaN(Y.dataset.base) ? g("", !0) : (r(), i("div", {
229
+ key: 1,
230
+ style: F(`width:100%;text-align:center;color:${e.value.style.chart.title.subtitle.color};font-size:${e.value.style.chart.title.subtitle.fontSize}px;font-weight:${e.value.style.chart.title.subtitle.bold ? "bold" : ""}`)
231
+ }, m(e.value.translations.base) + " : " + m(Y.dataset.base), 5))
232
+ ], 4)) : g("", !0),
233
+ e.value.userOptions.show && C.value ? (r(), H(Me, {
234
+ ref_key: "details",
235
+ ref: oe,
236
+ key: `user_options_${B.value}`,
237
+ backgroundColor: e.value.style.chart.backgroundColor,
238
+ color: e.value.style.chart.color,
239
+ isImaging: h(se),
240
+ isPrinting: h(re),
241
+ uid: k.value,
242
+ hasXls: !1,
243
+ hasPdf: e.value.userOptions.buttons.pdf,
244
+ hasImg: e.value.userOptions.buttons.img,
245
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
246
+ isFullscreen: S.value,
247
+ titles: { ...e.value.userOptions.buttonTitles },
248
+ chartElement: M.value,
249
+ onToggleFullscreen: ne,
250
+ onGeneratePdf: h(V),
251
+ onGenerateImage: h(W)
252
+ }, ge({ _: 2 }, [
253
+ l.$slots.optionPdf ? {
254
+ name: "optionPdf",
255
+ fn: E(() => [
256
+ $(l.$slots, "optionPdf", {}, void 0, !0)
257
+ ]),
258
+ key: "0"
259
+ } : void 0,
260
+ l.$slots.optionImg ? {
261
+ name: "optionImg",
262
+ fn: E(() => [
263
+ $(l.$slots, "optionImg", {}, void 0, !0)
264
+ ]),
265
+ key: "1"
266
+ } : void 0,
267
+ l.$slots.optionFullscreen ? {
268
+ name: "optionFullscreen",
269
+ fn: E(({ toggleFullscreen: a, isFullscreen: n }) => [
270
+ $(l.$slots, "optionFullscreen", pe(me({ toggleFullscreen: a, isFullscreen: n })), void 0, !0)
271
+ ]),
272
+ key: "2"
273
+ } : void 0
274
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : g("", !0),
275
+ C.value ? (r(), i("svg", {
276
+ key: 2,
277
+ xmlns: h(ze),
278
+ class: q({ "vue-data-ui-fullscreen--on": S.value, "vue-data-ui-fulscreen--off": !S.value }),
279
+ viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
280
+ style: F(`max-width:100%;overflow:hidden !important;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
281
+ }, [
282
+ v("defs", null, [
283
+ v("radialGradient", {
284
+ id: `gradient_${k.value}`,
285
+ cx: "50%",
286
+ cy: "50%",
287
+ r: "50%",
288
+ fx: "50%",
289
+ fy: "50%"
290
+ }, [
291
+ v("stop", {
292
+ offset: "0%",
293
+ "stop-color": `#FFFFFF${h(j)[1]}`
294
+ }, null, 8, Ye),
295
+ v("stop", {
296
+ offset: "80%",
297
+ "stop-color": `#FFFFFF${h(j)[e.value.style.chart.layout.track.gradientIntensity]}`
298
+ }, null, 8, Ge),
299
+ v("stop", {
300
+ offset: "100%",
301
+ "stop-color": `#FFFFFF${h(j)[1]}`
302
+ }, null, 8, Re)
303
+ ], 8, Xe)
304
+ ]),
305
+ v("defs", null, [
306
+ v("filter", {
307
+ id: `blur_${k.value}`,
308
+ x: "-50%",
309
+ y: "-50%",
310
+ width: "200%",
311
+ height: "200%"
312
+ }, [
313
+ v("feGaussianBlur", {
314
+ in: "SourceGraphic",
315
+ stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
316
+ }, null, 8, Ae)
317
+ ], 8, Ee)
318
+ ]),
319
+ (r(!0), i(O, null, A(_.value, (a, n) => (r(), i("path", {
320
+ key: `arc_${n}`,
321
+ d: a.arcSlice,
322
+ fill: a.color,
323
+ stroke: e.value.style.chart.backgroundColor,
324
+ "stroke-linecap": "round"
325
+ }, null, 8, je))), 128)),
326
+ e.value.style.chart.layout.track.useGradient ? (r(), i(O, { key: 0 }, [
327
+ (r(!0), i(O, null, A(ie.value, (a, n) => (r(), i("path", {
328
+ key: `arc_${n}`,
329
+ d: a.arcSlice,
330
+ fill: "#FFFFFF",
331
+ stroke: "none",
332
+ "stroke-linecap": "round",
333
+ filter: `url(#blur_${k.value})`
334
+ }, null, 8, Be))), 128)),
335
+ v("rect", {
336
+ x: 0,
337
+ y: s.value.base,
338
+ width: t.value.width <= 0 ? 1e-4 : t.value.width,
339
+ height: t.value.height * 0.3 <= 0 ? 1e-4 : t.value.height * 0.3,
340
+ fill: e.value.style.chart.backgroundColor
341
+ }, null, 8, Ue)
342
+ ], 64)) : g("", !0),
343
+ (r(!0), i(O, null, A(_.value, (a, n) => (r(), i("text", {
344
+ x: h(X)({
345
+ centerX: t.value.width / 2,
346
+ centerY: s.value.base,
347
+ initX: a.center.startX,
348
+ initY: a.center.startY,
349
+ offset: t.value.markerOffset
350
+ }).x,
351
+ y: h(X)({
352
+ centerX: t.value.width / 2,
353
+ centerY: s.value.base,
354
+ initX: a.center.startX,
355
+ initY: a.center.startY,
356
+ offset: t.value.markerOffset
357
+ }).y,
358
+ "text-anchor": a.center.startX < t.value.width / 2 - 5 ? "end" : a.center.startX > t.value.width / 2 + 5 ? "start" : "middle",
359
+ "font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
360
+ "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
361
+ fill: e.value.style.chart.layout.markers.color
362
+ }, m(a.from.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, De))), 256)),
363
+ v("text", {
364
+ x: h(X)({
365
+ centerX: t.value.width / 2,
366
+ centerY: s.value.base,
367
+ initX: _.value.at(-1).endX,
368
+ initY: _.value.at(-1).endY,
369
+ offset: t.value.markerOffset
370
+ }).x,
371
+ y: h(X)({
372
+ centerX: t.value.width / 2,
373
+ centerY: s.value.base,
374
+ initX: _.value.at(-1).endX,
375
+ initY: _.value.at(-1).endY,
376
+ offset: t.value.markerOffset
377
+ }).y,
378
+ "text-anchor": "start",
379
+ "font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
380
+ "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
381
+ fill: e.value.style.chart.layout.markers.color
382
+ }, m(z.value.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, Ve),
383
+ e.value.style.chart.layout.pointer.type === "rounded" ? (r(), i("g", We, [
384
+ isNaN(c.value.x2) ? g("", !0) : (r(), i("line", {
385
+ key: 0,
386
+ x1: c.value.x1,
387
+ y1: c.value.y1,
388
+ x2: c.value.x2,
389
+ y2: c.value.y2,
390
+ stroke: e.value.style.chart.layout.pointer.stroke,
391
+ "stroke-width": t.value.pointerStrokeWidth,
392
+ "stroke-linecap": "round"
393
+ }, null, 8, Le)),
394
+ isNaN(c.value.x2) ? g("", !0) : (r(), i("line", {
395
+ key: 1,
396
+ x1: c.value.x1,
397
+ y1: c.value.y1,
398
+ x2: c.value.x2,
399
+ y2: c.value.y2,
400
+ stroke: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
401
+ "stroke-linecap": "round",
402
+ "stroke-width": t.value.pointerStrokeWidth * 0.7
403
+ }, null, 8, Te)),
404
+ !isNaN(c.value.x2) && e.value.style.chart.layout.track.useGradient ? (r(), i("line", {
405
+ key: 2,
406
+ x1: c.value.x1,
407
+ y1: c.value.y1,
408
+ x2: c.value.x2,
409
+ y2: c.value.y2,
410
+ stroke: "white",
411
+ "stroke-linecap": "round",
412
+ "stroke-width": t.value.pointerStrokeWidth * 0.3,
413
+ filter: `url(#blur_${k.value})`
414
+ }, null, 8, qe)) : g("", !0)
415
+ ])) : (r(), i("g", He, [
416
+ L.value ? (r(), i("path", {
417
+ key: 0,
418
+ d: L.value,
419
+ fill: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
420
+ stroke: e.value.style.chart.layout.pointer.stroke,
421
+ "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
422
+ "stroke-linejoin": "round"
423
+ }, null, 8, Ze)) : g("", !0)
424
+ ])),
425
+ v("circle", {
426
+ cx: t.value.width / 2,
427
+ cy: s.value.base,
428
+ fill: e.value.style.chart.layout.pointer.circle.color,
429
+ r: t.value.pointerRadius <= 0 ? 1e-4 : t.value.pointerRadius,
430
+ "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
431
+ stroke: e.value.style.chart.layout.pointer.circle.stroke
432
+ }, null, 8, Je),
433
+ v("text", {
434
+ x: t.value.width / 2,
435
+ y: s.value.ratingBase,
436
+ "text-anchor": "middle",
437
+ "font-size": t.value.legendFontSize,
438
+ "font-weight": "bold",
439
+ fill: e.value.style.chart.legend.useRatingColor ? G.value : e.value.style.chart.legend.color
440
+ }, m(e.value.style.chart.legend.prefix) + " " + m(e.value.style.chart.legend.showPlusSymbol && f.value > 0 ? "+" : "") + m(f.value.toFixed(e.value.style.chart.legend.roundingValue)) + " " + m(e.value.style.chart.legend.suffix), 9, Ke),
441
+ $(l.$slots, "svg", { svg: t.value }, void 0, !0)
442
+ ], 14, Ne)) : g("", !0),
443
+ C.value ? g("", !0) : (r(), H(Pe, {
444
+ key: 3,
445
+ config: {
446
+ type: "gauge",
447
+ style: {
448
+ backgroundColor: e.value.style.chart.backgroundColor,
449
+ gauge: {
450
+ color: "#CCCCCC"
451
+ }
452
+ }
453
+ }
454
+ }, null, 8, ["config"])),
455
+ v("div", {
456
+ ref_key: "chartLegend",
457
+ ref: D
458
+ }, [
459
+ $(l.$slots, "legend", { legend: x.value }, void 0, !0)
460
+ ], 512)
461
+ ], 14, Oe));
462
+ }
463
+ }, ut = /* @__PURE__ */ Ie(Qe, [["__scopeId", "data-v-a862b4a9"]]);
464
+ export {
465
+ ut as default
466
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkomIE9L.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),I=require("./usePrinter-r6uHYEcR.cjs"),T=require("./vue-ui-skeleton-JmGp11-u.cjs"),O=require("./useNestedProp-BMxXyPbW.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=["id"],J=["xmlns","viewBox"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["stop-color"],ae=["id"],le=["stdDeviation"],oe=["d","fill","stroke"],re=["d","filter"],ne=["y","width","height","fill"],se=["x","y","text-anchor","font-size","font-weight","fill"],ue=["x","y","font-size","font-weight","fill"],ie={key:1},ce=["x1","y1","x2","y2","stroke","stroke-width"],de=["x1","y1","x2","y2","stroke","stroke-width"],ve=["x1","y1","x2","y2","stroke-width","filter"],he={key:2},ye=["d","fill","stroke","stroke-width"],fe=["cx","cy","fill","r","stroke-width","stroke"],me=["x","y","font-size","fill"],pe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(_,{expose:X}){const u=_,{vue_ui_gauge:D}=r.useConfig(),b=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),h=e.ref(r.createUid()),Y=e.ref(null),C=e.ref(0),x=e.ref(null),N=e.ref(null),$=e.ref(null),t=e.computed(()=>{const o=O.useNestedProp({userConfig:u.config,defaultConfig:D});return o.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:G,isImaging:R,generatePdf:B,generateImage:E}=I.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.computed(()=>{if(!b.value||r.objectIsEmpty(u.dataset.series||{}))return{value:0,series:[{from:0,to:1}]};const o=[];(u.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...u.dataset,series:(u.dataset.series||[]).map((l,i)=>({...l,color:r.convertColorToHex(l.color)||j.value[i]||r.palette[i],value:((l.to||0)-(l.from||0))/n*100}))}}),d=e.ref(512),a=e.ref({height:358.4,width:d.value,top:0,bottom:358.4,centerX:179.2,centerY:d.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),g=e.ref(0),m=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:u.dataset.value);e.watch(()=>u.dataset.value,()=>{v.value=t.value.style.chart.animation.use?0:u.dataset.value,M()});const c=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI;return{x1:o,y1:n,x2:o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),P=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI,i=o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),z=n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),y=a.value.pointerRadius,w=o+y*Math.cos(l+Math.PI/2),L=n+y*Math.sin(l+Math.PI/2),U=o+y*Math.cos(l-Math.PI/2),W=n+y*Math.sin(l-Math.PI/2);return isNaN(i)?null:`M ${i},${z} ${w},${L} ${U},${W} Z`}),F=e.computed(()=>{for(let o=0;o<f.value.series.length;o+=1){const{color:n,from:l,to:i}=f.value.series[o];if(v.value>=l&&v.value<=i)return n}return"#2D353C"}),S=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:u.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(u.dataset,"series")&&(u.dataset.series.length?u.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),M(),t.value.responsive){const o=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:x.value,title:t.value.style.chart.title.text?N.value:null,legend:$.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=d.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/d.value*Math.min(l,n)<10?10:18/d.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/d.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/d.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/d.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/d.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:d.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:d.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});S.value=new ResizeObserver(o),S.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});function M(){const o=[];(f.value.series||[]).forEach(w=>{o.push(w.from||0),o.push(w.to||0)}),g.value=Math.max(...o),m.value=Math.min(...o);const n=String(g.value).length;let l=0,i=(n>2?.01:.001)*t.value.style.chart.animation.speed,z=(n>2?.05:.005)*t.value.style.chart.animation.acceleration;function y(){v.value+=i+l,l+=z,v.value<u.dataset.value?requestAnimationFrame(y):v.value=u.dataset.value}t.value.style.chart.animation.use&&(v.value=m.value,y())}const s=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),p=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.arcs,s.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),A=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.gradients,s.value.gradients,1,1,1,180,109.9495,2*a.value.trackSize)),k=e.ref(!1);function q(o){k.value=o,C.value+=1}return X({generatePdf:B,generateImage:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:x,id:`vue-ui-gauge_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:N,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px;${t.value.userOptions.show?"padding-top:36px":""}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.color};font-size:${t.value.style.chart.title.fontSize}px;font-weight:${t.value.style.chart.title.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.text),5),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.subtitle.text),5)):e.createCommentVNode("",!0),isNaN(_.dataset.base)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.translations.base)+" : "+e.toDisplayString(_.dataset.base),5))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(I.UserOptions,{ref_key:"details",ref:Y,key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(G),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:q,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(E)},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,Q),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(r.opacity)[t.value.style.chart.layout.track.gradientIntensity]}`},null,8,ee),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,te)],8,K)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,le)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,oe))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,re))),128)),e.createElementVNode("rect",{x:0,y:s.value.base,width:a.value.width<=0?1e-4:a.value.width,height:a.value.height*.3<=0?1e-4:a.value.height*.3,fill:t.value.style.chart.backgroundColor},null,8,ne)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,se))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(g.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ue),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ie,[isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ce)),isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,de)),!isNaN(c.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,ve)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",he,[P.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:P.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,ye)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:s.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,fe),e.createElementVNode("text",{x:a.value.width/2,y:s.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(t.value.style.chart.legend.prefix)+" "+e.toDisplayString(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":"")+e.toDisplayString(v.value.toFixed(t.value.style.chart.legend.roundingValue))+" "+e.toDisplayString(t.value.style.chart.legend.suffix),9,me),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,J)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:f.value},void 0,!0)],512)],14,Z))}},ge=H._export_sfc(pe,[["__scopeId","data-v-a862b4a9"]]);exports.default=ge;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-BkomIE9L.cjs"),ae=require("./Title-Cj_xubjI.cjs"),X=require("./usePrinter-r6uHYEcR.cjs"),se=require("./Tooltip-CdJ5hegk.cjs"),ue=require("./vue-ui-skeleton-JmGp11-u.cjs"),ne=require("./BaseIcon-BoKtpbrI.cjs"),re=require("./vue-ui-accordion-SXsobrUt.cjs"),j=require("./useNestedProp-BMxXyPbW.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},me=["font-size","fill","x","y","font-weight"],fe={key:0},be=["x","y","font-size","fill","font-weight"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Ne=["stop-color"],Be=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],Ve=["x","y","font-size","fill"],$e=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],ze={key:3},Le={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Te=["stop-color"],Fe=["stop-color"],Ae=["x","y","width","height","rx"],Me=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Oe={class:"vue-ui-data-table"},Re={key:0},qe=["data-cell"],He={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ue=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:W}){const r=B;e.useCssVars(l=>({"2d7e5208":l.tdo}));const{vue_ui_heatmap:Y}=d.useConfig(),S=e.computed(()=>!!r.dataset&&r.dataset.length);d.objectIsEmpty(r.dataset)&&d.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(d.createUid()),E=e.ref(null),K=e.ref(null),z=e.ref(!1),L=e.ref(""),P=e.ref(void 0),k=e.ref(null),D=e.ref(0),I=e.ref(null),O=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:r.config,defaultConfig:Y});return l.theme?{...j.useNestedProp({userConfig:d.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:J,isImaging:Q,generatePdf:R,generateImage:q}=X.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(a=>{a.forEach(s=>{O.value=s.contentRect.width<Z.value})}).observe(I.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<r.dataset.length?r.dataset.length:b.value)*t.value.style.layout.cells.height,s=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:s,width:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),T=e.computed(()=>u.value.height*r.dataset.length),h=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),w=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),f=e.computed(()=>{const l=r.dataset.flatMap(s=>s.values);return l.reduce((s,n)=>s+n,0)/l.length}),u=e.computed(()=>({width:o.value.width/b.value,height:o.value.width/(b.value<r.dataset.length?r.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(s=>s.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,b.value)}}),$=e.computed(()=>(r.dataset.forEach((l,a)=>{d.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{d.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,s)=>a>=f.value?{side:"up",color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),ratio:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value))>1?1:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value)),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(f.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(f.value)),color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`})})))),g=e.ref(null),F=e.ref(null);function te(l,a,s,n){k.value={x:s,y:n},console.log(l);const{value:i,yAxisName:c,xAxisName:m,id:oe}=l;P.value=oe,g.value=i,F.value={datapoint:l,seriesIndex:a,series:$.value,config:t.value},z.value=!0;let A="";const M=t.value.style.tooltip.customFormat;d.isFunction(M)&&d.functionReturnsString(()=>M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}))?L.value=M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}):(A+=`<div>${c} ${m?`${m}`:""}</div>`,A+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,i)}">⬤</span><span>${isNaN(i)?"-":d.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:i,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue})}</span></div>`,L.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${A}</div>`)}const _=e.computed(()=>o.value.top+T.value*(1-g.value/h.value)),C=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(g.value/h.value));e.computed(()=>{const l=r.dataset.map(s=>({name:s.name})),a=r.dataset.map(s=>s.values);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=["",...r.dataset.map((i,c)=>i.name)],a=[];for(let i=0;i<p.value.xLabels.length;i+=1){const c=[p.value.xLabels[i]];for(let m=0;m<r.dataset.length;m+=1)c.push([r.dataset[m].values[i]]);a.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=d.createCsvContent(s);d.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const N=e.ref(!1);function le(l){N.value=l,D.value+=1}function U(){v.value.showTable=!v.value.showTable}function G(){v.value.showTooltip=!v.value.showTooltip}return W({generatePdf:R,generateCsv:H,generateImage:q,toggleTable:U,toggleTooltip:G}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:E,class:e.normalizeClass(`vue-ui-heatmap ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ae._sfc_main,{config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:E.value,onToggleFullscreen:le,onGeneratePdf:e.unref(R),onGenerateCsv:H,onGenerateImage:e.unref(q),onToggleTable:U,onToggleTooltip:G},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(d.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(s,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:i.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(d.adaptColorToBackground)(i.color),x:o.value.left+u.value.width*c+u.value.width/2,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(t.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(i.value.toFixed(t.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(t.value.style.layout.dataLabels.suffix),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c,y:o.value.top+u.value.height*n,width:u.value.width,height:u.value.height,fill:"transparent",stroke:"none",onMouseover:m=>te(i,n,o.value.left+u.value.width*c,o.value.top+u.value.height*n),onMouseout:a[0]||(a[0]=m=>{z.value=!1,P.value=void 0,g.value=null,k.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[n]),9,me)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+u.value.width/2+o.value.width/p.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX,y:o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(s),9,be))),256))])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:k.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:k.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:u.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ne)],8,_e)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Be),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:T.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Se),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+T.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Ve),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:_.value,y2:_.value},null,8,$e)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${_.value} ${o.value.right+26},${_.value-8} ${o.value.right+26},${_.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ae),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Me),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:C.value,x2:C.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,De)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${C.value},${o.value.bottom+t.value.style.layout.cells.height} ${C.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${C.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,parent:E.value,content:L.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":O.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=s=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(s=>v.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Oe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Re,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(s,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(s),1)],12,qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(i,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ge,e.toDisplayString(isNaN(i.values[n])?"-":e.unref(d.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:i.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ue))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},je=ie._export_sfc(Xe,[["__scopeId","data-v-52af0be2"]]);exports.default=je;