vue-data-ui 2.3.2 → 2.3.4

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 (148) hide show
  1. package/dist/Arrow-B6gJebT9.js +101 -0
  2. package/dist/Arrow-C5yj6zwY.cjs +1 -0
  3. package/dist/BaseIcon-7_g11dRj.js +174 -0
  4. package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
  5. package/dist/DataTable-CwaOlAsy.js +127 -0
  6. package/dist/DataTable-Rm9II-m2.cjs +1 -0
  7. package/dist/Legend-CxvJTjEm.js +62 -0
  8. package/dist/Legend-D59FIuMs.cjs +1 -0
  9. package/dist/Shape-CVItL3vh.cjs +1 -0
  10. package/dist/Shape-CjLV0scA.js +107 -0
  11. package/dist/Slicer-Bxg5niHl.js +156 -0
  12. package/dist/Slicer-Cdss5Rus.cjs +1 -0
  13. package/dist/Title-2iks1ziC.js +46 -0
  14. package/dist/Title-Bb-A5OSV.cjs +1 -0
  15. package/dist/Tooltip-C3phqKuU.js +94 -0
  16. package/dist/Tooltip-C_UE6y-E.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  18. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  19. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  20. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  21. package/dist/index-p5gfZSvB.cjs +4 -0
  22. package/dist/index-uOtklCCx.js +10268 -0
  23. package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
  25. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  26. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  27. package/dist/pdf-97UbtKC2.js +44 -0
  28. package/dist/pdf-Cz3729tZ.cjs +1 -0
  29. package/dist/style.css +1 -1
  30. package/dist/useNestedProp-2kIU-7On.cjs +1 -0
  31. package/dist/useNestedProp-BgWkUab_.js +13 -0
  32. package/dist/usePrinter-B6xQCyL-.js +464 -0
  33. package/dist/usePrinter-fZlsJid8.cjs +1 -0
  34. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  35. package/dist/useResponsive-NZB-WLRF.js +187 -0
  36. package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
  37. package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +62 -61
  40. package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
  41. package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
  42. package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
  43. package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
  44. package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
  45. package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
  46. package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
  47. package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
  48. package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
  49. package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
  50. package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
  51. package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
  52. package/dist/vue-ui-cursor-C96IChA3.js +229 -0
  53. package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
  54. package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
  55. package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
  56. package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
  57. package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
  58. package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
  59. package/dist/vue-ui-donut-B9iXisHK.js +743 -0
  60. package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
  61. package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
  62. package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
  63. package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
  64. package/dist/vue-ui-flow-BTivYoGd.js +454 -0
  65. package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
  66. package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
  67. package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
  68. package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
  69. package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
  70. package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
  71. package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
  72. package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
  73. package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
  74. package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
  75. package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
  76. package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
  77. package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
  78. package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
  80. package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
  81. package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
  82. package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
  83. package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
  84. package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
  85. package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
  86. package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
  87. package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
  88. package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
  89. package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
  90. package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
  91. package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
  92. package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
  93. package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
  94. package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
  95. package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
  96. package/dist/vue-ui-rings-CsUngX_F.js +510 -0
  97. package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
  98. package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
  99. package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
  100. package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
  101. package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
  102. package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
  103. package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
  104. package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
  105. package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
  106. package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
  107. package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
  108. package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
  109. package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
  110. package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
  111. package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
  112. package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
  113. package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
  114. package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
  115. package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
  116. package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
  117. package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
  118. package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
  119. package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
  120. package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
  121. package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
  122. package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
  124. package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
  125. package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
  126. package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
  127. package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
  128. package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
  129. package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
  130. package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
  131. package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
  132. package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
  133. package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
  134. package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
  135. package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
  136. package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
  137. package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
  138. package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
  139. package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
  140. package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
  141. package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
  142. package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
  143. package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
  144. package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
  145. package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
  146. package/package.json +1 -1
  147. package/dist/index-C6KVJkgd.cjs +0 -843
  148. package/dist/index-bDBuMYfe.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-uOtklCCx.js";
3
+ import { u as E } from "./useNestedProp-BgWkUab_.js";
4
+ import re from "./vue-ui-skeleton-BM9rwmxY.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 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-p5gfZSvB.cjs"),x=require("./useNestedProp-2kIU-7On.cjs"),E=require("./vue-ui-skeleton-sjfOtCZr.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,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-uOtklCCx.js";
3
+ import { u as I } from "./useNestedProp-BgWkUab_.js";
4
+ import ee from "./vue-ui-skeleton-BM9rwmxY.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
+ };