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,333 @@
1
+ import { computed as d, ref as w, onMounted as Q, openBlock as s, createElementBlock as n, normalizeStyle as N, renderSlot as D, normalizeProps as Y, guardReactiveProps as J, createElementVNode as f, toDisplayString as F, createCommentVNode as v, unref as c, Fragment as P, renderList as z, createBlock as K } from "vue";
2
+ import { u as ee, c as te, t as ae, o as le, e as G, g as ue, s as I, Q as oe, R as se, X as ne, r as C, L as W, f as B } from "./index-BMCvLyab.js";
3
+ import { u as E } from "./useNestedProp-CkP8xhG_.js";
4
+ import re from "./vue-ui-skeleton-BisWX1sO.js";
5
+ import { _ as ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], pe = ["stop-color"], ge = ["stop-color"], ke = ["id"], me = ["stop-color"], xe = ["stop-color"], _e = { key: 0 }, be = ["d", "fill"], we = ["d", "fill"], $e = ["d", "stroke", "stroke-width"], Le = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ne = ["x", "y", "width", "height", "fill", "rx"], Ie = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ce = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Me = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Se = ["x", "y", "font-size", "font-weight", "fill"], Ve = ["x", "y", "height", "width", "onMouseenter", "onClick"], Pe = {
7
+ __name: "vue-ui-sparkline",
8
+ props: {
9
+ config: {
10
+ type: Object,
11
+ default() {
12
+ return {};
13
+ }
14
+ },
15
+ dataset: {
16
+ type: Array,
17
+ default() {
18
+ return [];
19
+ }
20
+ },
21
+ showInfo: {
22
+ type: Boolean,
23
+ default: !0
24
+ },
25
+ selectedIndex: {
26
+ type: Number,
27
+ default: void 0
28
+ }
29
+ },
30
+ emits: ["hoverIndex", "selectDatapoint"],
31
+ setup(x, { emit: M }) {
32
+ const i = x, { vue_ui_sparkline: T } = ee(), $ = d(() => !!i.dataset && i.dataset.length), p = w(te()), e = d(() => {
33
+ const t = E({
34
+ userConfig: i.config,
35
+ defaultConfig: T
36
+ });
37
+ return t.theme ? {
38
+ ...E({
39
+ userConfig: ae.vue_ui_sparkline[t.theme] || i.config,
40
+ defaultConfig: t
41
+ })
42
+ } : t;
43
+ }), m = w(i.dataset.map((t) => e.value.style.animation.show ? {
44
+ ...t,
45
+ value: null
46
+ } : {
47
+ ...t,
48
+ value: [void 0].includes(t.value) ? null : t.value
49
+ }));
50
+ Q(() => {
51
+ if (le(i.dataset) ? G({
52
+ componentName: "VueUiSparkline",
53
+ type: "dataset"
54
+ }) : i.dataset.forEach((t, o) => {
55
+ ue({
56
+ datasetObject: t,
57
+ requiredAttributes: ["period", "value"]
58
+ }).forEach((a) => {
59
+ G({
60
+ componentName: "VueUiSparkline",
61
+ type: "datasetSerieAttribute",
62
+ property: a,
63
+ index: o
64
+ });
65
+ });
66
+ }), e.value.style.animation.show && i.dataset.length > 1) {
67
+ let a = function() {
68
+ o < i.dataset.length ? (m.value.push(i.dataset[o]), setTimeout(() => {
69
+ requestAnimationFrame(a);
70
+ }, t)) : m.value = i.dataset, o += 1;
71
+ };
72
+ m.value = [];
73
+ const t = e.value.style.animation.animationFrames / i.dataset.length;
74
+ let o = 0;
75
+ a();
76
+ }
77
+ });
78
+ const y = w({
79
+ height: 80,
80
+ width: 500
81
+ }), j = w(6), l = d(() => ({
82
+ top: 12,
83
+ left: 0,
84
+ right: y.value.width,
85
+ bottom: y.value.height - 3,
86
+ start: i.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? y.value.width - e.value.style.chartWidth : 30,
87
+ width: i.showInfo && e.value.style.dataLabel.show ? e.value.style.chartWidth : y.value.width - 30,
88
+ height: y.value.height - 12
89
+ })), S = d(() => Math.min(...m.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), O = d(() => Math.max(...m.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), _ = d(() => {
90
+ const t = S.value >= 0 ? 0 : S.value;
91
+ return Math.abs(t);
92
+ }), U = d(() => O.value + _.value + j.value), L = d(() => l.value.bottom - l.value.height * V(_.value));
93
+ function V(t) {
94
+ return t / U.value;
95
+ }
96
+ const g = d(() => i.dataset.length - 1), u = d(() => m.value.map((t, o) => {
97
+ const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0;
98
+ return {
99
+ absoluteValue: a,
100
+ period: t.period,
101
+ plotValue: a + _.value,
102
+ toMax: V(a + _.value),
103
+ x: l.value.start + o * (l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1)),
104
+ y: l.value.bottom - l.value.height * V(a + _.value),
105
+ id: `plot_${p.value}_${o}`,
106
+ color: b.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - o / g.value)) : e.value.style.line.color,
107
+ width: l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1)
108
+ };
109
+ })), X = d(() => {
110
+ const t = { x: u.value[0].x, y: y.value.height - 6 }, o = { x: u.value[u.value.length - 1].x, y: y.value.height - 6 }, a = [];
111
+ return u.value.forEach((r) => {
112
+ a.push(`${r.x},${r.y} `);
113
+ }), [t.x, t.y, ...a, o.x, o.y].toString();
114
+ }), h = w(void 0);
115
+ function R(t, o) {
116
+ h.value = t, M("hoverIndex", { index: o });
117
+ }
118
+ function Z() {
119
+ h.value = void 0, M("hoverIndex", { index: void 0 });
120
+ }
121
+ const k = d(() => {
122
+ if ($.value) {
123
+ const t = u.value.map((a) => a.absoluteValue), o = t.reduce((a, r) => a + r, 0);
124
+ return {
125
+ latest: u.value[u.value.length - 1].absoluteValue,
126
+ sum: o,
127
+ average: o / u.value.length,
128
+ median: oe(t),
129
+ trend: se(u.value.map(({ x: a, y: r, absoluteValue: A }) => ({
130
+ x: a,
131
+ y: r,
132
+ value: A
133
+ }))).trend
134
+ };
135
+ } else
136
+ return {
137
+ latest: null,
138
+ sum: null,
139
+ average: null,
140
+ median: null,
141
+ trend: null
142
+ };
143
+ }), q = d(() => $.value ? e.value.style.dataLabel.valueType === "latest" ? k.value.latest : e.value.style.dataLabel.valueType === "sum" ? k.value.sum : e.value.style.dataLabel.valueType === "average" ? k.value.average : 0 : 0), b = d(() => e.value.type && e.value.type === "bar");
144
+ function H(t, o) {
145
+ M("selectDatapoint", { datapoint: t, index: o });
146
+ }
147
+ return (t, o) => (s(), n("div", {
148
+ class: "vue-ui-sparkline",
149
+ id: p.value,
150
+ style: N(`width:100%;font-family:${e.value.style.fontFamily}`)
151
+ }, [
152
+ D(t.$slots, "before", Y(J({
153
+ selected: h.value,
154
+ latest: k.value.latest,
155
+ sum: k.value.sum,
156
+ average: k.value.average,
157
+ median: k.value.median,
158
+ trend: k.value.trend
159
+ })), void 0, !0),
160
+ e.value.style.title.show && x.showInfo ? (s(), n("div", {
161
+ key: 0,
162
+ class: "vue-ui-sparkline-title",
163
+ style: N(`display:flex;align-items:center;width:100%;color:${e.value.style.title.color};background:${e.value.style.backgroundColor};justify-content:${e.value.style.title.textAlign === "left" ? "flex-start" : e.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${e.value.style.title.fontSize * 2}px;font-size:${e.value.style.title.fontSize}px;font-weight:${e.value.style.title.bold ? "bold" : "normal"};`)
164
+ }, [
165
+ f("span", {
166
+ style: N(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
167
+ }, F(h.value ? h.value.period : e.value.style.title.text), 5)
168
+ ], 4)) : v("", !0),
169
+ $.value ? (s(), n("svg", {
170
+ key: 1,
171
+ xmlns: c(ne),
172
+ viewBox: `0 0 ${y.value.width} ${y.value.height}`,
173
+ style: N(`background:${e.value.style.backgroundColor};overflow:visible`)
174
+ }, [
175
+ f("defs", null, [
176
+ f("linearGradient", {
177
+ x1: "0%",
178
+ y1: "0%",
179
+ x2: "100%",
180
+ y2: "0%",
181
+ id: `sparkline_gradient_${p.value}`
182
+ }, [
183
+ f("stop", {
184
+ offset: "0%",
185
+ "stop-color": `${c(I)(e.value.style.area.color, 0.05)}${c(C)[e.value.style.area.opacity]}`
186
+ }, null, 8, ye),
187
+ f("stop", {
188
+ offset: "100%",
189
+ "stop-color": e.value.style.area.color + c(C)[e.value.style.area.opacity]
190
+ }, null, 8, he)
191
+ ], 8, ce),
192
+ f("linearGradient", {
193
+ x2: "0%",
194
+ y2: "100%",
195
+ id: `sparkline_bar_gradient_pos_${p.value}`
196
+ }, [
197
+ f("stop", {
198
+ offset: "0%",
199
+ "stop-color": e.value.style.bar.color
200
+ }, null, 8, pe),
201
+ f("stop", {
202
+ offset: "100%",
203
+ "stop-color": `${c(I)(e.value.style.bar.color, 0.05)}`
204
+ }, null, 8, ge)
205
+ ], 8, fe),
206
+ f("linearGradient", {
207
+ x2: "0%",
208
+ y2: "100%",
209
+ id: `sparkline_bar_gradient_neg_${p.value}`
210
+ }, [
211
+ f("stop", {
212
+ offset: "0%",
213
+ "stop-color": `${c(I)(e.value.style.bar.color, 0.05)}`
214
+ }, null, 8, me),
215
+ f("stop", {
216
+ offset: "100%",
217
+ "stop-color": e.value.style.bar.color
218
+ }, null, 8, xe)
219
+ ], 8, ke)
220
+ ]),
221
+ e.value.style.area.show && !b.value && u.value[0] ? (s(), n("g", _e, [
222
+ e.value.style.line.smooth ? (s(), n("path", {
223
+ key: 0,
224
+ d: `M ${u.value[0].x},${l.value.bottom} ${c(W)(u.value)} L ${u.value.at(-1).x},${l.value.bottom} Z`,
225
+ fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${c(C)[e.value.style.area.opacity]}`
226
+ }, null, 8, be)) : (s(), n("path", {
227
+ key: 1,
228
+ d: `M${X.value}Z`,
229
+ fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${c(C)[e.value.style.area.opacity]}`
230
+ }, null, 8, we))
231
+ ])) : v("", !0),
232
+ e.value.style.line.smooth && !b.value ? (s(), n("path", {
233
+ key: 1,
234
+ d: `M ${c(W)(u.value)}`,
235
+ stroke: e.value.style.line.color,
236
+ fill: "none",
237
+ "stroke-width": e.value.style.line.strokeWidth,
238
+ "stroke-linecap": "round"
239
+ }, null, 8, $e)) : v("", !0),
240
+ (s(!0), n(P, null, z(u.value, (a, r) => (s(), n("g", null, [
241
+ r < u.value.length - 1 && !e.value.style.line.smooth && !b.value ? (s(), n("line", {
242
+ key: 0,
243
+ x1: a.x,
244
+ x2: u.value[r + 1].x,
245
+ y1: a.y,
246
+ y2: u.value[r + 1].y,
247
+ stroke: a.color,
248
+ "stroke-width": e.value.style.line.strokeWidth,
249
+ "stroke-linecap": "round",
250
+ "stroke-linejoin": "round",
251
+ "shape-rendering": "geometricPrecision"
252
+ }, null, 8, Le)) : v("", !0),
253
+ b.value ? (s(), n("rect", {
254
+ key: 1,
255
+ x: a.x - a.width / 2,
256
+ y: a.absoluteValue > 0 ? a.y : L.value,
257
+ width: a.width,
258
+ height: Math.abs(a.y - L.value),
259
+ fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
260
+ rx: e.value.style.bar.borderRadius
261
+ }, null, 8, Ne)) : v("", !0),
262
+ e.value.style.verticalIndicator.show && (h.value && a.id === h.value.id || x.selectedIndex === r) ? (s(), n("line", {
263
+ key: 2,
264
+ x1: a.x,
265
+ x2: a.x,
266
+ y1: l.value.top - 6,
267
+ y2: l.value.bottom,
268
+ stroke: e.value.style.verticalIndicator.color || a.color,
269
+ "stroke-width": e.value.style.verticalIndicator.strokeWidth,
270
+ "stroke-linecap": "round",
271
+ "stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
272
+ }, null, 8, Ie)) : v("", !0)
273
+ ]))), 256)),
274
+ S.value < 0 ? (s(), n("line", {
275
+ key: 2,
276
+ x1: l.value.start,
277
+ x2: l.value.start + l.value.width - 16,
278
+ y1: L.value,
279
+ y2: L.value,
280
+ stroke: e.value.style.zeroLine.color,
281
+ "stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
282
+ "stroke-width": e.value.style.zeroLine.strokeWidth,
283
+ "stroke-linecap": "round"
284
+ }, null, 8, Ce)) : v("", !0),
285
+ e.value.style.plot.show ? (s(!0), n(P, { key: 3 }, z(u.value, (a, r) => (s(), n("g", null, [
286
+ h.value && a.id === h.value.id || x.selectedIndex === r ? (s(), n("circle", {
287
+ key: 0,
288
+ cx: a.x,
289
+ cy: a.y,
290
+ r: e.value.style.plot.radius,
291
+ fill: a.color,
292
+ stroke: e.value.style.plot.stroke,
293
+ "stroke-width": e.value.style.plot.strokeWidth
294
+ }, null, 8, Me)) : v("", !0)
295
+ ]))), 256)) : v("", !0),
296
+ x.showInfo && e.value.style.dataLabel.show ? (s(), n("text", {
297
+ key: 4,
298
+ x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : l.value.width + 12 + e.value.style.dataLabel.offsetX,
299
+ y: y.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
300
+ "font-size": e.value.style.dataLabel.fontSize,
301
+ "font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
302
+ fill: e.value.style.dataLabel.color
303
+ }, F(h.value ? c(B)({ p: e.value.style.dataLabel.prefix, v: h.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }) : c(B)({ p: e.value.style.dataLabel.prefix, v: q.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })), 9, Se)) : v("", !0),
304
+ (s(!0), n(P, null, z(u.value, (a, r) => (s(), n("rect", {
305
+ x: a.x - (l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1)) / 2,
306
+ y: l.value.top - 6,
307
+ height: l.value.height + 6,
308
+ width: l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1),
309
+ fill: "transparent",
310
+ onMouseenter: (A) => R(a, r),
311
+ onMouseleave: Z,
312
+ onClick: () => H(a, r)
313
+ }, null, 40, Ve))), 256)),
314
+ D(t.$slots, "svg", { svg: y.value }, void 0, !0)
315
+ ], 12, ve)) : v("", !0),
316
+ $.value ? v("", !0) : (s(), K(re, {
317
+ key: 2,
318
+ config: {
319
+ type: "sparkline",
320
+ style: {
321
+ backgroundColor: e.value.style.backgroundColor,
322
+ sparkline: {
323
+ color: "#CCCCCC"
324
+ }
325
+ }
326
+ }
327
+ }, null, 8, ["config"]))
328
+ ], 12, de));
329
+ }
330
+ }, We = /* @__PURE__ */ ie(Pe, [["__scopeId", "data-v-ee68f40e"]]);
331
+ export {
332
+ We as default
333
+ };
@@ -0,0 +1,244 @@
1
+ import { computed as p, ref as m, onMounted as T, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as u, toDisplayString as k, createCommentVNode as h, unref as _, Fragment as D, renderList as z, normalizeClass as A, createBlock as q } from "vue";
2
+ import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as U, X as W, s as Y, r as Z } from "./index-BMCvLyab.js";
3
+ import { u as I } from "./useNestedProp-CkP8xhG_.js";
4
+ import ee from "./vue-ui-skeleton-BisWX1sO.js";
5
+ import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const le = ["xmlns", "viewBox"], ae = ["id"], oe = ["stop-color"], se = ["stop-color"], ne = ["stop-color"], re = {
7
+ id: "stackPill",
8
+ clipPathUnits: "objectBoundingBox"
9
+ }, ue = ["fill"], ie = { "clip-path": "url(#stackPill)" }, ce = ["height", "width", "fill"], de = ["onClick", "x", "width", "height", "fill", "stroke"], ve = ["onClick"], ge = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, pe = ["height", "width"], he = ["fill"], ye = {
10
+ __name: "vue-ui-sparkstackbar",
11
+ props: {
12
+ config: {
13
+ type: Object,
14
+ default() {
15
+ return {};
16
+ }
17
+ },
18
+ dataset: {
19
+ type: Array,
20
+ default() {
21
+ return [];
22
+ }
23
+ }
24
+ },
25
+ emits: ["selectDatapoint"],
26
+ setup(O, { emit: V }) {
27
+ const i = O, { vue_ui_sparkstackbar: G } = H(), N = p(() => !!i.dataset && i.dataset.length), B = m(j()), e = p(() => {
28
+ const t = I({
29
+ userConfig: i.config,
30
+ defaultConfig: G
31
+ });
32
+ return t.theme ? {
33
+ ...I({
34
+ userConfig: X.vue_ui_sparkstackbar[t.theme] || i.config,
35
+ defaultConfig: t
36
+ }),
37
+ customPalette: J[t.theme] || d
38
+ } : t;
39
+ }), x = p(() => K(e.value.customPalette)), y = m(i.dataset.map((t, a) => ({
40
+ ...t,
41
+ value: e.value.style.animation.show ? 0 : t.value || 0,
42
+ color: t.color ? P(t.color) : x.value[a] || d[a] || d[a % d.length]
43
+ }))), b = m(!0);
44
+ T(() => {
45
+ if (Q(i.dataset) ? E({
46
+ componentName: "VueUiSparkStackbar",
47
+ type: "dataset"
48
+ }) : i.dataset.forEach((t, a) => {
49
+ R({
50
+ datasetObject: t,
51
+ requiredAttributes: ["name", "value"]
52
+ }).forEach((l) => {
53
+ E({
54
+ componentName: "VueUiSparkStackbar",
55
+ type: "datasetSerieAttribute",
56
+ property: l,
57
+ index: a
58
+ });
59
+ });
60
+ }), e.value.style.animation.show) {
61
+ let S = function() {
62
+ o += l / t, o < l ? (y.value = y.value.map((s, c) => ({
63
+ ...s,
64
+ value: s.value += a[c],
65
+ color: s.color ? P(s.color) : x.value[c] || d[c] || d[c % d.length]
66
+ })), requestAnimationFrame(S)) : (b.value = !1, y.value = i.dataset.map((s, c) => ({
67
+ ...s,
68
+ value: s.value || 0,
69
+ color: s.color ? P(s.color) : x.value[c] || d[c] || d[c % d.length],
70
+ id: j()
71
+ })));
72
+ };
73
+ const t = e.value.style.animation.animationFrames, a = i.dataset.map((s, c) => s.value / t), l = i.dataset.map((s) => s.value || 0).reduce((s, c) => s + c, 0);
74
+ let o = 0;
75
+ b.value = !0, S();
76
+ }
77
+ });
78
+ const f = m({
79
+ width: 500,
80
+ height: 16
81
+ }), v = m([]), w = p(() => i.dataset.map((t) => t.value || 0).filter((t, a) => !v.value.includes(a)).reduce((t, a) => t + a, 0)), L = p(() => y.value.map((t, a) => ({
82
+ ...t,
83
+ value: t.value || 0,
84
+ proportion: (t.value || 0) / w.value,
85
+ width: (t.value || 0) / w.value * f.value.width,
86
+ proportionLabel: U({
87
+ v: (t.value || 0) / w.value * 100,
88
+ s: "%",
89
+ r: e.value.style.legend.percentage.rounding
90
+ })
91
+ }))), $ = p(() => L.value.filter((t, a) => !v.value.includes(a)));
92
+ function M(t) {
93
+ v.value.includes(t) ? v.value = v.value.filter((a) => a !== t) : v.value.length < y.value.length - 1 && v.value.push(t);
94
+ }
95
+ const C = p(() => {
96
+ let t = 0;
97
+ const a = [];
98
+ for (let l = 0; l < $.value.length; l += 1)
99
+ a.push({
100
+ ...$.value[l],
101
+ start: t
102
+ }), t += $.value[l].width;
103
+ return a;
104
+ });
105
+ function F(t, a) {
106
+ V("selectDatapoint", { datapoint: t, index: a });
107
+ }
108
+ return (t, a) => (n(), r("div", {
109
+ style: g(`width:100%; background:${e.value.style.backgroundColor}`)
110
+ }, [
111
+ e.value.style.title.text ? (n(), r("div", {
112
+ key: 0,
113
+ style: g(`width:calc(100% - 12px);background:${e.value.style.backgroundColor};margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
114
+ }, [
115
+ u("div", {
116
+ style: g(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
117
+ }, k(e.value.style.title.text), 5),
118
+ e.value.style.title.subtitle.text ? (n(), r("div", {
119
+ key: 0,
120
+ style: g(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
121
+ }, k(e.value.style.title.subtitle.text), 5)) : h("", !0)
122
+ ], 4)) : h("", !0),
123
+ N.value ? (n(), r("svg", {
124
+ key: 1,
125
+ xmlns: _(W),
126
+ width: "100%",
127
+ viewBox: `0 0 ${f.value.width} ${f.value.height}`
128
+ }, [
129
+ u("defs", null, [
130
+ (n(!0), r(D, null, z(C.value, (l, o) => (n(), r("linearGradient", {
131
+ key: `stack_gradient_${o}`,
132
+ gradientTransform: "rotate(90)",
133
+ id: `stack_gradient_${o}_${B.value}`
134
+ }, [
135
+ u("stop", {
136
+ offset: "0%",
137
+ "stop-color": l.color
138
+ }, null, 8, oe),
139
+ u("stop", {
140
+ offset: "50%",
141
+ "stop-color": `${_(Y)(l.color, 0.05)}${_(Z)[100 - e.value.style.bar.gradient.intensity]}`
142
+ }, null, 8, se),
143
+ u("stop", {
144
+ offset: "100%",
145
+ "stop-color": l.color
146
+ }, null, 8, ne)
147
+ ], 8, ae))), 128)),
148
+ u("clipPath", re, [
149
+ u("rect", {
150
+ x: "0.005",
151
+ y: "-2",
152
+ width: "0.99",
153
+ height: "5",
154
+ rx: "3",
155
+ ry: "3",
156
+ fill: e.value.style.backgroundColor
157
+ }, null, 8, ue)
158
+ ])
159
+ ]),
160
+ u("g", ie, [
161
+ u("rect", {
162
+ x: 0,
163
+ y: 0,
164
+ height: f.value.height,
165
+ width: C.value.map((l) => l.width).reduce((l, o) => l + o, 0),
166
+ fill: e.value.style.bar.gradient.underlayerColor,
167
+ class: A({ animated: !b.value })
168
+ }, null, 10, ce),
169
+ (n(!0), r(D, null, z(C.value, (l, o) => (n(), r("rect", {
170
+ key: `stack_${o}`,
171
+ onClick: () => F(l, o),
172
+ x: l.start,
173
+ y: 0,
174
+ width: l.width,
175
+ height: f.value.height,
176
+ fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${o}_${B.value})` : l.color,
177
+ stroke: e.value.style.backgroundColor,
178
+ "stroke-linecap": "round",
179
+ class: A({ animated: !b.value })
180
+ }, null, 10, de))), 128))
181
+ ])
182
+ ], 8, le)) : h("", !0),
183
+ N.value ? h("", !0) : (n(), q(ee, {
184
+ key: 2,
185
+ config: {
186
+ type: "sparkStackbar",
187
+ style: {
188
+ backgroundColor: e.value.style.backgroundColor,
189
+ sparkStackbar: {
190
+ color: "#CCCCCC"
191
+ }
192
+ }
193
+ }
194
+ }, null, 8, ["config"])),
195
+ e.value.style.legend.show ? (n(), r("div", {
196
+ key: 3,
197
+ style: g(`background:${e.value.style.backgroundColor};margin:0 auto;margin:${e.value.style.legend.margin};justify-content:${e.value.style.legend.textAlign === "left" ? "flex-start" : e.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
198
+ class: "vue-ui-sparkstackbar-legend"
199
+ }, [
200
+ (n(!0), r(D, null, z(L.value, (l, o) => (n(), r("div", {
201
+ style: g(`font-size:${e.value.style.legend.fontSize}px;`),
202
+ class: A({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": v.value.includes(o) }),
203
+ onClick: (S) => {
204
+ M(o), F(l, o);
205
+ }
206
+ }, [
207
+ u("div", ge, [
208
+ (n(), r("svg", {
209
+ height: `${e.value.style.legend.fontSize}px`,
210
+ width: `${e.value.style.legend.fontSize}px`,
211
+ viewBox: "0 0 10 10"
212
+ }, [
213
+ u("circle", {
214
+ cx: 5,
215
+ cy: 5,
216
+ r: 5,
217
+ fill: l.color
218
+ }, null, 8, he)
219
+ ], 8, pe)),
220
+ u("span", {
221
+ style: g(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
222
+ }, k(l.name), 5),
223
+ e.value.style.legend.percentage.show ? (n(), r("span", {
224
+ key: 0,
225
+ style: g(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
226
+ }, k(v.value.includes(o) ? " - " : l.proportionLabel), 5)) : h("", !0),
227
+ e.value.style.legend.value.show ? (n(), r("span", {
228
+ key: 1,
229
+ style: g(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
230
+ }, " (" + k(_(U)({
231
+ p: e.value.style.legend.value.prefix,
232
+ v: l.value,
233
+ s: e.value.style.legend.value.suffix,
234
+ r: e.value.style.legend.value.rounding
235
+ })) + ") ", 5)) : h("", !0)
236
+ ])
237
+ ], 14, ve))), 256))
238
+ ], 4)) : h("", !0)
239
+ ], 4));
240
+ }
241
+ }, xe = /* @__PURE__ */ te(ye, [["__scopeId", "data-v-2006741b"]]);
242
+ export {
243
+ xe as default
244
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BkomIE9L.cjs"),x=require("./useNestedProp-BMxXyPbW.cjs"),E=require("./vue-ui-skeleton-JmGp11-u.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],T=["onClick"],H={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},I=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let k=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(k)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,k()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function C(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:h.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>C(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:k=>{S(r),C(a,r)}},[e.createElementVNode("div",H,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,I)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}))+") ",5)):e.createCommentVNode("",!0)])],14,T))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-2006741b"]]);exports.default=G;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkomIE9L.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-Cj_xubjI.cjs"),H=require("./usePrinter-r6uHYEcR.cjs"),se=require("./Tooltip-CdJ5hegk.cjs"),ne=require("./DataTable-ssrNbONo.cjs"),ue=require("./vue-ui-skeleton-JmGp11-u.cjs"),ie=require("./Shape-CaF4pvOn.cjs"),ce=require("./vue-ui-accordion-SXsobrUt.cjs"),j=require("./useNestedProp-BMxXyPbW.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],he=["xmlns","viewBox"],pe={key:0},me={key:0},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x","y","fill","font-size"],Ce=["x","y","font-size","fill"],we=["fill","font-size","transform"],Be=["fill","font-size","x","y"],_e=["x1","x2","y1","y2","stroke"],Ne=["cx","cy","fill"],Se=["cx","cy","fill"],$e=["id"],Le=["stop-color"],Te=["stop-color"],Ee=["stop-color"],Pe={key:0},ze=["x","y","font-size","fill"],Ve=["innerHTML"],Ae={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(X,{expose:J,emit:Y}){const d=X,{vue_ui_strip_plot:K}=r.useConfig(),p=e.computed({get(){return!!d.dataset&&d.dataset.length},set(l){return l}}),L=e.ref(r.createUid()),V=e.ref(0),T=e.ref(!1),E=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:d.config,defaultConfig:K});return l.theme?{...j.useNestedProp({userConfig:r.themes.vue_ui_strip_plot[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),C=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiStripPlot",type:"dataset"}):d.dataset.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=U.throttle(()=>{const{width:s,height:a}=U.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-v.value.left-v.value.right)/d.dataset.length,B.value=r.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},ee.value*50)}),e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:Q,isImaging:Z,generatePdf:O,generateImage:D}=H.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:k.value*d.dataset.length+v.value.left+v.value.right,height:t.value.style.chart.height}),o=e.computed(()=>{const l=k.value*d.dataset.length+v.value.left+v.value.right;return{left:v.value.left,right:l-v.value.right,top:v.value.top,bottom:w.value-v.value.bottom,width:k.value*d.dataset.length,height:w.value-v.value.top-v.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?d.dataset.map((l,s)=>{const a=r.createUid();return{...l,id:a,color:l.color?r.convertColorToHex(l.color):M.value[s]||r.palette[s]||r.palette[s%r.palette.length],plots:l.plots.map(n=>({...n,parentId:a,color:l.color?r.convertColorToHex(l.color):M.value[s]||r.palette[s]||r.palette[s%r.palette.length],id:r.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:o.value.left+(s+1)*o.value.stripWidth-o.value.stripWidth/2}))}))),ee=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),P=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>r.calculateNiceScale(P.value.min<0?P.value.min:0,P.value.max,t.value.style.chart.grid.scaleSteps)),te=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:o.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*o.value.height}))}))),W=e.computed(()=>m.value.ticks.map(l=>({y:o.value.bottom-o.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:o.value.left,x2:o.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function le({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(r.isFunction(a)&&r.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))E.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${r.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</div>`,E.value=`<div>${n}</div>`}}const N=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function I(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=r.createCsvContent(s);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=r.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ae(l){x.value=l,V.value+=1}function oe(){return h.value}function G(){c.value.showTable=!c.value.showTable}function q(){c.value.dataLabels.show=!c.value.dataLabels.show}function R(){c.value.showTooltip=!c.value.showTooltip}return J({getData:oe,generatePdf:O,generateCsv:I,generateImage:D,toggleTable:G,toggleLabels:q,toggleTooltip:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(H.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(Z),uid:L.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(O),onGenerateCsv:I,onGenerateImage:e.unref(D),onToggleTable:G,onToggleLabels:q,onToggleTooltip:R},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+(n+1)*o.value.stripWidth,x2:o.value.left+(n+1)*o.value.stripWidth,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,be))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:o.value.left,x2:o.value.left,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ge),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(W.value,a=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding})),9,xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+(n+1)*o.value.stripWidth-o.value.stripWidth/2,y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${o.value.top+o.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,we)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:o.value.left+o.value.width/2,y:o.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Be)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,_e),e.createElementVNode("circle",{cx:o.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ne),e.createElementVNode("circle",{cx:o.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Se)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Le),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ee)],8,$e))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(ie._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:o.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:$=>le({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>Y("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${f*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(r.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}):""),13,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:b.value,content:E.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ne.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Ve)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},Fe=ve._export_sfc(Ae,[["__scopeId","data-v-548755c9"]]);exports.default=Fe;